"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1661],{lk1G:function(e,t,a){a.d(t,{u:function(){return useTranslations}});var r=a("q1tI"),n=a("O7Xk");function format(e,t){let a=[e];return(Object.keys(t).forEach(e=>{a=function(e,t,a){let n=[];return e.forEach(e=>{if("string"==typeof e){let i=RegExp(`\\{${a}\\}`,"gi");if("string"==typeof t||"number"==typeof t)n.push(e.replace(i,`${t}`));else{let a=e.split(i);a.forEach((e,i)=>{e&&(function(e){let t=[],a=!1,n=!1;return e.match(/^\s+/gi)&&(e=e.replace(/^\s+/gi,""),a=!0),e.match(/\s+$/gi)&&(e=e.replace(/\s+$/gi,""),n=!0),a&&t.push(r.createElement(r.Fragment,null,"\xa0")),t.push(e),n&&t.push(r.createElement(r.Fragment,null,"\xa0")),t})(e).forEach(e=>n.push(e)),i+1"string"==typeof e)?a.join(""):r.createElement(r.Fragment,null,a.map((e,t)=>r.createElement(r.Fragment,{key:t},e)))}function useTranslations(){let{values:e,locale:t}=(0,r.useContext)(n.T)||{locale:"en-PH"};return(0,r.useMemo)(()=>({t:(t,a)=>e?e[t]?a?format(e[t]||t,a):e[t]||t:a?format(t,a):t:t,locale:t}),[e,t])}},"1egP":function(e,t,a){a.d(t,{L:function(){return Loading}});var r=a("q1tI"),n=a("lk1G"),i=a("CqtA");let Loading=({className:e,size:t="md"})=>{let{t:a}=(0,n.u)();return r.createElement("div",{className:`PD6nRZX ${e}`},r.createElement(i.B,{size:t,color:"transparent",isLoading:!0},a("loading")))}},Az8i:function(e,t,a){a.d(t,{B:function(){return BabyPoopForm}});var r=a("NXpd"),n=a("q1tI"),i=a("/npG"),o=a("mYVa"),l=a("Eso5"),s=a("iuhU"),c=a("VkaC"),d=a("rQtb"),p=a("lk1G"),m=a("X5xi"),u=a("TJFH"),g=(0,i.k)((e,{hasOnClickFn:t})=>({root:{position:"relative",display:"flex",flexDirection:"column",gap:(0,o.h)(16)},sponsorBox:{display:"flex",gap:(0,o.h)(12),alignItems:"center",backgroundColor:e.colors.neutral[0],border:`1px solid ${e.colors.neutral[1]}`,borderRadius:(0,o.h)(4),padding:"4px 12px",alignSelf:"flex-start"},sponsorLogo:{maxHeight:(0,o.h)(32)},btn:{minWidth:(0,o.h)(180),[e.fn.largerThan("sm")]:{alignSelf:"flex-end"},visibility:t?"visible":"hidden"}}));let BabyPoopForm=e=>{var{babyPoopPage:t,onClickFindOut:a,currentUrl:i,sponsorLogo:o,btnProps:h,styles:v,classNames:f}=e,x=(0,r._)(e,["babyPoopPage","onClickFindOut","currentUrl","sponsorLogo","btnProps","styles","classNames"]);let{t:b}=(0,p.u)(),{classes:y}=g({hasOnClickFn:!!a},{name:"BabyPoopForm",styles:v,classNames:f}),{classes:E={}}=(0,n.useContext)(m.C);return n.createElement(u.H.FormRow,null,n.createElement(l.x,Object.assign({className:y.root},x),o&&n.createElement(l.x,{className:y.sponsorBox},n.createElement(c.T,{size:"p4"},b("common.sponsoredBy")),n.createElement("img",{loading:"lazy",src:o,alt:"sponsor",className:y.sponsorLogo})),n.createElement(c.T,{size:"p3",as:"div",className:"description",dangerouslySetInnerHTML:{__html:t.description}}),n.createElement(d.B,Object.assign({className:(0,s.default)(y.btn,E.submitBtn),onClick:a,dataEventCategory:"Health Tool",dataEventAction:"Baby Stool Inquiry",dataEventLabel:i},h),b("babyPoop.findOut"))))}},"3rRY":function(e,t,a){a.d(t,{A:function(){return Alert},B:function(){return Badge},C:function(){return CardCollapse},D:function(){return DragFreeCarousel},F:function(){return FileDropdown},G:function(){return Grid},H:function(){return HtmlContent},I:function(){return IconHeading},R:function(){return Radio},S:function(){return StepRenderer},T:function(){return Tag},U:function(){return Upload},a:function(){return BorderHeading},b:function(){return RateStars},c:function(){return Toggle},d:function(){return Z},e:function(){return W},f:function(){return i},g:function(){return o}});var r,n,i,o,l=a("q1tI"),s=a("VkaC"),c=a("rBCA"),d=a("iBNF"),p=a("tKpg"),m=a("4JiQ"),u=a("mYVa"),g=a("iuhU"),h=a("Iblh"),v=a("fUyO"),f=a("9aQb"),x=a("NXpd"),b=a("rAbs"),y=a("gEnE"),E=a("yVya"),w=a("w9lR"),k=a("tIlP"),C=a("lk1G"),$=a("Zdfy");let Upload=e=>l.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 18 18",fill:"none"},e),l.createElement("path",{d:"M9.82324 8.7033L10.8228 9.70287C10.9267 9.80662 11.056 9.8573 11.2107 9.85493C11.3655 9.85255 11.4948 9.79943 11.5987 9.69555C11.7026 9.59168 11.7545 9.46074 11.7545 9.30274C11.7545 9.14474 11.7026 9.01462 11.5987 8.91237L9.7353 7.04899C9.59968 6.91337 9.44149 6.84555 9.26074 6.84555C9.07999 6.84555 8.9218 6.91337 8.78618 7.04899L6.91549 8.91968C6.81174 9.02355 6.75987 9.15287 6.75987 9.30762C6.75987 9.46237 6.81174 9.59168 6.91549 9.69555C7.01937 9.79943 7.1503 9.85137 7.3083 9.85137C7.4663 9.85137 7.59643 9.79943 7.69868 9.69555L8.69824 8.7033L8.69824 11.5576C8.69824 11.717 8.75218 11.8506 8.86005 11.9583C8.96793 12.0662 9.10156 12.1201 9.26093 12.1201C9.42043 12.1201 9.55399 12.0662 9.66162 11.9583C9.76937 11.8506 9.82324 11.717 9.82324 11.5576L9.82324 8.7033ZM16.3857 9.3063C16.3857 10.2918 16.1987 11.2181 15.8247 12.0852C15.4507 12.9524 14.9432 13.7066 14.3021 14.348C13.6609 14.9894 12.907 15.4972 12.0402 15.8714C11.1735 16.2456 10.2474 16.4326 9.26205 16.4326C8.27655 16.4326 7.35024 16.2456 6.48312 15.8716C5.61599 15.4976 4.86174 14.9901 4.22037 14.3489C3.57899 13.7078 3.07118 12.9539 2.69693 12.0871C2.3228 11.2204 2.13574 10.2943 2.13574 9.30893C2.13574 8.32343 2.32274 7.39712 2.69674 6.52999C3.07074 5.66287 3.5783 4.90862 4.21943 4.26724C4.86055 3.62587 5.61449 3.11805 6.48124 2.7438C7.34799 2.36968 8.27405 2.18262 9.25943 2.18262C10.2449 2.18262 11.1712 2.36962 12.0384 2.74362C12.9055 3.11762 13.6597 3.62518 14.3011 4.2663C14.9425 4.90743 15.4503 5.66137 15.8246 6.52812C16.1987 7.39487 16.3857 8.32093 16.3857 9.3063ZM15.2607 9.30762C15.2607 7.63262 14.6795 6.21387 13.517 5.05137C12.3545 3.88887 10.9357 3.30762 9.26074 3.30762C7.58574 3.30762 6.16699 3.88887 5.00449 5.05137C3.84199 6.21387 3.26074 7.63262 3.26074 9.30762C3.26074 10.9826 3.84199 12.4014 5.00449 13.5639C6.16699 14.7264 7.58574 15.3076 9.26074 15.3076C10.9357 15.3076 12.3545 14.7264 13.517 13.5639C14.6795 12.4014 15.2607 10.9826 15.2607 9.30762Z",fill:"#595959"})),Alert=({style:e,onClose:t,text:a,type:r,contentIcon:n,closeIcon:i,className:o,description:c})=>l.createElement("div",{className:`CHw-fZZ ${o||""}`,style:e,"data-alert-type":r},l.createElement("div",{className:"_03U6VRS"},l.createElement("div",{className:"icon-title"},n,l.createElement(s.T,{weight:"bold",size:"label1"},a)),l.createElement(s.T,{weight:"regular",size:"p3"},c)),l.createElement("div",{className:"EO828Vv",onClick:t},i)),renderNotificationStyles=(e,t,a,r)=>{let n,i="";if("numeric"===e)switch(t){case"medium":i=` height: 16px; font-size: 11px; padding: 1px 6px; `;case"large":i=` height: 24px; font-size: 13px; padding: 1px 10px; `}let o="";a&&(o=` position: absolute; top: 0; left: 75%; `),a&&(n=` left: 70%; ${"large"===t?` top: -7px; `:"medium"===t?` top: -2px; width: 16px; height: 16px; `:""} `);let l="";switch(r){case"primary":l=` background: ${d.r.colors.primary50}; color: ${d.r.colors.primary600}; `;break;case"error":l=` background: ${d.r.colors.error}; color: white; `}switch(e){case"dot":return` ${o} width: 8px; height: 8px; font-size: 0px; border-radius: 50%; ${l} `;case"numeric":return` ${o} width: max-content; border-radius: 32px; ${i} ${n} ${l} `}},z=c.Z.div` position: relative; > div { width: max-content; position: relative; } span { font-weight: ${d.r.sizes.fwBold}; display: flex; justify-content: center; align-items: center; ${e=>renderNotificationStyles(e.notificationType,e.notificationSize,e.hasIcon,e.notificationColor)} } ${e=>e.hasIcon&&` svg { width: 40px; height: 40px; } `} `,Badge=({amount:e,type:t,size:a="medium",color:r="primary",icon:n,className:i})=>l.createElement(z,{"data-notification-type":t,"data-notification-size":a,"data-notification-color":r,"data-has-icon":!!n||void 0,notificationType:t,notificationSize:a,notificationColor:r,hasIcon:!!n,className:i},l.createElement("div",null,e&&l.createElement("span",null,e)," ",n&&l.createElement("div",null,n))),N=c.Z.h4` position: relative; line-height: 18px; &:after { position: absolute; top: 1px; left: 0; width: 4px; height: 18px; background-color: ${d.r.colors.primaryBase}; content: ''; } &[data-size='lg'] { font-size: 18px; padding-left: 12px; } &[data-size='sm'] { font-size: 14px; padding-left: 8px; &::after { width: 2px; height: 15px; } } &[data-type='bold'] { font-weight: ${d.r.sizes.fwBold}; } &[data-type='semiBold'] { font-weight: ${d.r.sizes.fwSemiBold}; } &[data-uppercase] { text-transform: uppercase; } ${p.M.mbDown} { &[data-size='lg'] { font-size: 16px; } } `,BorderHeading=({style:e,children:t,className:a,size:r="lg",type:n="bold",upperCase:i,as:o="h4",color:s})=>l.createElement(N,{style:Object.assign({color:s},e),className:a,"data-size":r,"data-type":n,"data-uppercase":i,as:o},t),T=(0,c.Z)(v.S)` flex-shrink: 0; color: ${d.r.colors.neutral800}; width: 16px; height: 16px; transition: transform 0.2s ease-in-out; transform: rotate(-180deg); &[data-is-collapsed='true'] { transform: rotate(0deg); } `,P=c.Z.div` background-color: white; .icon { width: 20px; height: 20px; flex-shrink: 0; color: ${d.r.colors.neutral800}; } .title-collapse { color: #111111; font-weight: var(--fwSemiBold); font-size: 1.0625rem; line-height: 1.5rem; flex-grow: 1; } .box-collapse { display: flex; padding: 1.5rem 1rem 1rem 1rem; gap: 0.75rem; align-items: center; } `;function CardCollapse({children:e,title:t,icon:a,defaultOpened:r=!0,haveCollapse:n=!0,id:i,className:o,as:c="h2"}){let[d,{toggle:p}]=(0,h.q)(r);return l.createElement(P,{id:i,className:o},l.createElement("div",{className:"box-collapse",onClick:()=>{n&&p()}},n&&a,l.createElement(s.T,{as:c,className:"title-collapse"},t),n&&l.createElement(T,{"data-is-collapsed":d})),l.createElement(m.U,{in:!n||d,transitionDuration:200,transitionTimingFunction:"ease"},e))}let S=c.Z.div` position: relative; box-sizing: border-box; border: 1px solid ${d.r.colors.gray200}; background: url('../../../public/bgSvg/arrow-down.svg') no-repeat; background-position: right 16px center; border-radius: ${d.r.borderRadius}; &[data-has-icons='true'] { border: none; background: ${d.r.colors.gray100}; img, svg { display: inline-block; max-width: 16px; margin-right: 6px; } span { vertical-align: middle; display: inline-block; } &:hover { box-shadow: none; } > div { position: relative; width: 100%; display: flex; align-items: center; box-sizing: border-box; } > div::after { content: ''; right: 12px; top: 50%; background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23595959' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A"); width: 10px; height: 8px; position: absolute; background-repeat: no-repeat; transform: translateY(-50%); } } &:hover { box-shadow: 0 0 2px 2px ${d.r.colors.primary200}; } `,M=c.Z.div` padding: 12px 18px 12px 16px; cursor: pointer; &[data-dropdown-open] { padding: 11px 15px 11px 15px; border: 1px solid ${d.r.colors.primaryBase}; border-radius: ${d.r.borderRadius}; box-shadow: 0 0 2px 2px ${d.r.colors.primary200}; } & > svg { height: 16px; width: 16px; } `,A=c.Z.ul` position: absolute; top: 100%; right: 0; left: 0; display: block; margin-top: 4px; background: ${d.r.colors.white}; border-radius: ${d.r.borderRadius}; box-shadow: -1px 1px 2px rgba(67, 70, 74, 0.0001), -2px 2px 5px rgba(67, 86, 100, 0.123689); cursor: pointer; &[data-has-icons='true'] { background: white; box-shadow: none; border: 1px solid ${d.r.colors.gray200}; filter: drop-shadow(0px 10px 16px rgba(0, 0, 0, 0.04)); } `,F=c.Z.li` margin: 8px; padding: 12px 18px 12px 16px; border-radius: ${d.r.borderRadius}; display: flex; &:hover, :active { background: ${d.r.colors.gray100}; } `,B=c.Z.div` display: flex; align-items: center; margin-right: 8px; & > svg { height: 16px; width: 16px; } `,ShareIconPathStyle=()=>l.createElement("style",null,".file-dropdown-path{fill:none;stroke:#595959;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.5px}"),DefaultFileIcon=()=>l.createElement("svg",{id:"prefix__Layer_1","data-name":"Layer 1",viewBox:"0 0 12.17 14.83"},l.createElement("defs",null,l.createElement("clipPath",{id:"prefix__clip-path",transform:"translate(-1.92 -1.54)"},l.createElement("path",{fill:"none",d:"M0 .96h16v16H0z"}))),l.createElement("title",null,"File"),l.createElement("g",{clipPath:"url(#prefix__clip-path)"},l.createElement("path",{className:"file-dropdown-path",d:"M8.67 2.29H4a1.33 1.33 0 00-1.33 1.33v10.67A1.33 1.33 0 004 15.62h8a1.33 1.33 0 001.33-1.33V7z",transform:"translate(-1.92 -1.54)"}),l.createElement("path",{className:"file-dropdown-path",d:"M8.67 2.29V7h4.66",transform:"translate(-1.92 -1.54)"}))),DownloadIcon=()=>l.createElement("svg",{id:"prefix__Layer_1","data-name":"Layer 1",viewBox:"0 0 13.5 13.5"},l.createElement("title",null,"download"),l.createElement("path",{className:"file-dropdown-path",d:"M14 11v2.66A1.33 1.33 0 0112.67 15H3.33A1.33 1.33 0 012 13.62V11M4.67 7.62L8 11l3.33-3.34M8 11V3",transform:"translate(-1.25 -2.21)"})),UploadIcon=()=>l.createElement("svg",{id:"prefix__Layer_1","data-name":"Layer 1",viewBox:"0 0 13.5 13.5"},l.createElement("title",null,"upload"),l.createElement("path",{className:"file-dropdown-path",d:"M14 11v2.66A1.33 1.33 0 0112.67 15H3.33A1.33 1.33 0 012 13.62V11M11.33 6.29L8 3 4.67 6.29M8 3v8",transform:"translate(-1.25 -2.21)"})),FileDropdown=({className:e,value:t,options:a,onUploadSelected:r,id:n,placeholderIcon:i,placeholder:o,style:s})=>{let[c,d]=(0,l.useState)(!1),showDropdown=()=>d(!c),p=(0,l.useRef)(a.map(e=>"upload"===e.type&&l.createElement("input",{id:"uploader-dropdown-input-"+n+"-"+e.value,key:"uploader-dropdown-input-"+n+"-"+e.value,accept:e.fileAcceptedType,multiple:e.multiple,type:"file",style:{display:"none"},onChange:e=>{console.log("change"),r(e.target.files)}}))),onUpload=e=>{var t;null===(t=document.querySelector(e))||void 0===t||t.click()},onDownload=e=>{e&&window.open(e,"_blank")};return l.createElement(S,{className:e,"data-dropdown-open":!!c,id:n,"data-has-icons":!0,style:s,onBlur:()=>d(!1),tabIndex:0},l.createElement(ShareIconPathStyle,null),l.createElement(M,{onClick:showDropdown},i||l.createElement(DefaultFileIcon,null)," ",l.createElement("span",null,t&&t.value?t.label:o)),c&&l.createElement(A,{onClick:showDropdown,"data-has-icons":!0},a.map(e=>l.createElement(F,{key:`${n}-${e.value}`,"data-selected":t&&t.value===e.value||void 0,onClick:()=>"upload"===e.type?onUpload("#uploader-dropdown-input-"+n+"-"+e.value):onDownload(e.url)},l.createElement(B,null,e.icon||"download"===e.type?l.createElement(DownloadIcon,null):l.createElement(UploadIcon,null)),e.label))),l.createElement(l.Fragment,null,p.current))},I=c.Z.div` --columns: var(--grid-template-columns, repeat(var(--columns-count), 1fr)); --columns-desktop: var( --grid-template-columns-desktop, repeat(var(--columns-count-desktop), 1fr) ); display: grid; grid-template-columns: var(--columns); grid-gap: var(--grid-gap); align-items: var(--align-items); ${p.M.tdUp} { grid-template-columns: var(--columns-desktop); } > * { justify-self: var(--justify-children); } `,Grid=({className:e,columns:t,columnsDesktop:a,gridTemplateColumns:r,gridTemplateColumnsDesktop:n,gap:i,children:o,justifyChildren:s,style:c,alignItems:d})=>l.createElement(I,{className:e,style:Object.assign({"--columns-count":t,"--columns-count-desktop":a,"--grid-template-columns":r,"--grid-template-columns-desktop":n,"--justify-children":s,"--grid-gap":i,"--align-items":d},c)},o),Radio=({size:e="small",label:t,name:a,checked:r,value:n,className:i,isDisabled:o=!1,onChange:s,dataEventCategory:c,dataEventAction:d,dataEventLabel:p})=>{let m=!!d&&!!c&&!!p,u=m?{"data-event-category":c,"data-event-action":d,"data-event-label":p}:{};return l.createElement(f.R,Object.assign({size:"small"===e?"md":"lg",label:t,name:a,checked:r,value:n,className:i,disabled:o,onChange:e=>null==s?void 0:s(e.target.value)},u))},D=c.Z.div` display: inline-flex; gap: calc(var(--gap) * 1px); > svg { width: calc(var(--star-size) * 1px); height: calc(var(--star-size) * 1px); } &[data-selectable='true'] { > svg { cursor: pointer; } } `,StarHalfIcon=e=>l.createElement("svg",Object.assign({},e,{viewBox:"0 0 24 24",fill:"none"}),l.createElement("path",{d:"m139.287 144.772 5.17 3.12c.38.23.85-.11.75-.54l-1.37-5.88 4.56-3.95c.33-.29.16-.84-.29-.88l-6.01-.51-2.35-5.54a.498.498 0 0 0-.92 0l-2.35 5.54-6.01.51a.499.499 0 0 0-.28.88l4.56 3.95-1.37 5.88c-.1.43.37.77.75.54z",fill:"#E4E8EC"}),l.createElement("path",{d:"M139.289 144.771s.013-14.488 0-14.488a.49.49 0 0 0-.46.308l-2.35 5.54-6.01.51a.499.499 0 0 0-.28.88l4.56 3.95-1.37 5.88c-.1.43.37.77.75.54z",fill:"#FFC326"})),StarIcon=e=>{var{isFull:t}=e,a=(0,x._)(e,["isFull"]);return l.createElement("svg",Object.assign({},a,{viewBox:"0 0 32 32",fill:"none"}),l.createElement("path",{d:"m16 23.027 6.893 4.16c.507.306 1.134-.147 1-.72l-1.826-7.84 6.08-5.267a.67.67 0 0 0-.387-1.173l-8.013-.68-3.134-7.387a.664.664 0 0 0-1.226 0l-3.133 7.387-8.014.68a.668.668 0 0 0-.373 1.173l6.08 5.267-1.827 7.84c-.133.573.493 1.026 1 .72z",fill:t?"#FFC326":"#D2D6DC"}))},RateStars=({gap:e=2,size:t=24,star:a,totalStars:r=5,onSelect:n,hideEmptyStars:i,style:o,className:s})=>{let c=Math.floor(a),d=a-c>=.5?1:0,[p,m]=(0,l.useState)(null),u=p||c,g=p?0:d;return l.createElement(D,{"data-selectable":!!n,style:Object.assign({"--gap":e,"--star-size":t},o),className:s},Array.from({length:i?c+d:r}).map((e,t)=>{let onMouseOver=()=>!!n&&m(t+1),onMouseLeave=()=>!!n&&m(null);return t+1<=u?l.createElement(StarIcon,{key:t,onClick:()=>null==n?void 0:n(t+1),onMouseOver:onMouseOver,onMouseLeave:onMouseLeave,isFull:!0}):t+1===u+g?l.createElement(StarHalfIcon,{key:t,onClick:()=>null==n?void 0:n(t+1),onMouseOver:onMouseOver,onMouseLeave:onMouseLeave}):l.createElement(StarIcon,{key:t,onClick:()=>null==n?void 0:n(t+1),onMouseOver:onMouseOver,onMouseLeave:onMouseLeave})}))},getTag=(e,t)=>{switch(e){case"yellow":{let e=t?d.r.colors.yellow50:d.r.colors.yellow600;return` background: ${e}; p { color: var( --text-props-color, ${d.r.colors.gray800} ); } `}case"standard":return` background: ${d.r.colors.white}; border: 1px solid ${d.r.colors.gray200}; p { color: var( --text-props-color, ${d.r.colors.gray800} ); } &:hover { background: ${d.r.colors.gray100}; } `;case"red":{let e=t?d.r.colors.red50:d.r.colors.red500;return` background: ${e}; `}case"green":{let e=t?d.r.colors.green50:d.r.colors.green500;return` background: ${e}; `}case"blue":{let e=t?d.r.colors.primary50:d.r.colors.primaryBase;return` background: ${e}; `}case"teal":{let e=t?d.r.colors.teal100:d.r.colors.teal600;return` background: ${e}; `}case"pink":{let e=t?d.r.colors.pink200:d.r.colors.pink800;return` background: ${e}; `}case"violet":{let e=t?d.r.colors.violet100:d.r.colors.violet500;return` background: ${e}; `}case"grey":{let e=t?d.r.colors.gray100:d.r.colors.gray600;return` background: ${e}; `}}},j=c.Z.div` --padding-horizontal: 8px; --pading-vertical: 2px; display: flex; align-items: center; justify-content: center; padding: var(--pading-vertical) var(--padding-horizontal); border-radius: 24px; ${e=>"sponsored"===e.tagType&&` --offset-size: 4px; display: flex; align-items: center; justify-content: center; box-sizing: content-box; position: relative; box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.08); border-radius: 0 4px 18px 0; height: 24px; width: 90px; border-left: var(--offset-size) solid ${d.r.colors.accentLight}; padding: 0; margin-left: calc(var(--offset-size) * -1); p { font-weight: ${d.r.sizes.fwBold}; color: var( --text-props-color, ${d.r.colors.secondaryDark} ); font-size: 11px; margin-left: calc(var(--offset-size) * -1); } &::after { width: calc(var(--offset-size) * 2); height: var(--offset-size); background: ${d.r.colors.accentMain}; position: absolute; left: calc(var(--offset-size) * -1); bottom: calc(var(--offset-size) * -1); clip-path: polygon(0 1%, 100% 0%, 100% 100%); content: ''; } `} ${e=>e.isInline&&` display: inline-block; `} ${e=>e.tagHasMorePadding&&` &[data-has-more-padding] { padding: calc(var(--pading-vertical) + 5px) var(--padding-horizontal); } `} p { ${e=>e.tagIsLight?` color: var(--text-props-color, #000); `:` color: var(--text-props-color, ${d.r.colors.white}); `} } ${e=>getTag(e.tagType,e.tagIsLight)} ${e=>e.tagIsSquared&&"sponsored"!==e.tagType&&` border-radius: 4px; `} ${e=>e.tagIsALink&&` cursor: pointer; `} &[data-is-selected], &:active { background: ${d.r.colors.primary50}; } `,Tag=({type:e,children:t,style:a,isInline:r,isSquared:n=!1,className:i,isLight:o,hasMorePadding:s,isLink:c,isSelected:d,textProps:p={size:"sm"}})=>{let m=p.color?{"--text-props-color":p.color}:{};return l.createElement(j,{"data-is-squared":n||void 0,"data-tag-type":e,"data-is-light":o||void 0,"data-has-more-padding":s||void 0,"data-is-inline":r||void 0,style:Object.assign(Object.assign({},a),m),className:i,"data-is-selected":d||void 0,"data-is-link":c||void 0,tagType:e,isInline:r,tagHasMorePadding:s,tagIsLight:o,tagIsSquared:n,tagIsALink:c},l.createElement(b.T,Object.assign({},p),t))},_="24px",O=(0,y.Z)(c.Z.span` position: relative; display: block; width: 40px; height: ${_}; background: #c3cbd4; border-radius: 100px; cursor: pointer; &:after { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; background: #fff; border-radius: 90px; content: ''; transition: 0.3s; } `,"hhgcomp-toggle-icon"),R=c.Z.span` padding-left: 15px; `,L=c.Z.div` height: ${_}; input[type='checkbox'] { width: 0; height: 0; visibility: hidden; } label { cursor: pointer; display: inline-flex; color: ${d.r.colors.gray600}; } input:checked + label ${O.classSelector} { background: ${d.r.colors.primaryBase}; &:after { left: calc(100% - 2px); transform: translateX(-100%); } } `,Toggle=({className:e,id:t,onChange:a,checked:r,style:n,label:i})=>l.createElement(L,{className:e,style:n},l.createElement("input",{type:"checkbox",id:t,onChange:a,checked:r}),l.createElement("label",{htmlFor:t},l.createElement(O,null),i&&l.createElement(R,null,i))),Z=(0,l.createContext)({currentStep:0,setCurrentStep:()=>!1,setMaxStep:()=>!1,nextStep:()=>!1,prevStep:()=>!1}),StepRenderer=({children:e,onStepChange:t})=>{let[a,r]=(0,l.useState)(0),[n,i]=(0,l.useState)(0),o=l.Children.count(e);return(0,l.useEffect)(()=>{i(o-1)},[o]),(0,l.useEffect)(()=>{null==t||t(a)},[a]),l.createElement(Z.Provider,{value:{currentStep:a,setCurrentStep:r,setMaxStep:i,nextStep:()=>a+1<=n&&r(a+1),prevStep:()=>a-1>=0&&r(a-1)}},(0,E.Z)(e).map((e,t)=>{let r=t===a;return l.createElement(l.Fragment,{key:t},l.isValidElement(e)?e.props.alwaysRender||r?l.cloneElement(e,{isActive:t===a,stepIndex:t}):null:r?e:null)}))},H=c.Z.div` display: flex; align-items: center; gap: 8px; `,U=(0,c.Z)(w.H)` font-weight: var(--fwBold); `,IconHeading=({icon:e,title:t,className:a,style:r})=>l.createElement(H,{className:a,style:r},e,l.createElement(U,{tag:"h6",color:"var(--secondaryDark)"},t)),sanitizeHtml=e=>{if(!e)return"";let t=e.replace(/\n$/,"").replace(/\n/g,"
");return t},HtmlContent=({htmlContent:e,className:t})=>{let a=sanitizeHtml(e);return l.createElement("div",{className:t,dangerouslySetInnerHTML:{__html:a}})};(r=i||(i={})).ONE_TO_ONE="1:1",r.THREE_TO_ONE="3:1",(n=o||(o={})).PNG=".png",n.JPG=".jpg",n.JPEG=".jpeg";let getBase64=e=>new Promise((t,a)=>{let r=new FileReader;r.onload=()=>t(r.result),r.onerror=a,r.readAsDataURL(e)}),handleMultipleImageFiles=e=>(0,x.a)(void 0,void 0,void 0,function*(){if(0===e.length)return[];let t=yield Promise.all(e.map(e=>getBase64(e)));return t}),V=c.Z.div` display: flex; flex-direction: column; .image-upload-input-error { margin-top: ${(0,u.h)(12)}; display: flex; flex-direction: column; gap: ${(0,u.h)(4)}; } `,G=c.Z.div` display: flex; flex-direction: column; gap: ${(0,u.h)(4)}; margin-top: ${(0,u.h)(4)}; span { color: ${d.r.colors.neutral500}; } `,q=c.Z.div` position: relative; width: fit-content; padding: ${(0,u.h)(8)} ${(0,u.h)(12)}; border-radius: ${(0,u.h)(12)}; border: ${(0,u.h)(1)} solid ${d.r.colors.neutral200}; cursor: pointer; display: flex; align-items: center; gap: ${(0,u.h)(8)}; margin-top: ${(0,u.h)(18)}; &.image-upload-dragover { border-color: ${d.r.colors.primaryBase}; } &.image-upload-error { border-color: ${d.r.colors.error}; } &.image-upload-disabled { cursor: not-allowed; background-color: ${d.r.colors.gray100}; color: ${d.r.colors.gray400}; border-color: ${d.r.colors.gray200}; } svg { width: ${(0,u.h)(18)}; height: ${(0,u.h)(18)}; } input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: -1; } `,X=c.Z.div` position: relative; width: ${(0,u.h)(90)}; height: ${(0,u.h)(90)}; border-radius: ${(0,u.h)(12)}; overflow: hidden; background-color: ${d.r.colors.gray100}; display: flex; align-items: center; justify-content: center; img { width: 100%; height: 100%; object-fit: contain; } svg { width: ${(0,u.h)(14)}; height: ${(0,u.h)(14)}; color: ${d.r.colors.white}; } .image-upload-remove-button { cursor: pointer; position: absolute; top: ${(0,u.h)(6)}; right: ${(0,u.h)(6)}; background: ${d.r.colors.black}; border-radius: ${(0,u.h)(12)}; padding: ${(0,u.h)(2)}; display: flex; &:hover { opacity: 0.8; } } `,K=c.Z.div` display: flex; gap: ${(0,u.h)(8)}; margin-top: ${(0,u.h)(18)}; `,W=(0,l.forwardRef)(({label:e,name:t,error:a,acceptedTypes:r=[o.PNG,o.JPG,o.JPEG],maxSize:n=1,acceptedRatios:i,multiple:c=!1,disabled:p=!1,id:m,className:h,onChange:v,value:f,showValidationRules:b=!1,description:y,useBase64:E=!1,placeholder:w},$)=>{let{t:z}=(0,C.u)(),[N,T]=(0,l.useState)(!1),[P,S]=(0,l.useState)([]),M=(0,l.useRef)(null),A=!!a||P.length>0,F=(0,l.useMemo)(()=>f?Array.isArray(f)?f:[f]:[],[f]),B=(0,l.useCallback)(e=>{var t;let a=[],i="."+(null===(t=e.name.split(".").pop())||void 0===t?void 0:t.toLowerCase());r.includes(i)||a.push(`Unsupported file format. Please upload a ${r.join(", ")} file.`);let o=e.size/1048576;return o>n&&a.push(`File too large. Please upload an image smaller than ${n}MB.`),{file:e,isValid:0===a.length,errors:a}},[r,n]),I=(0,l.useCallback)(e=>new Promise(t=>{if(!i||!i.length||!e.type.startsWith("image/")){t([]);return}let a=new Image;a.onload=()=>{let e=a.width/a.height,r=`${e.toFixed(1)}:1`,n=i.some(t=>{let[a,r]=t.split(":"),n=parseInt(a)/parseInt(r);return .1>Math.abs(e-n)});t(n?[]:[`Image ratio ${r} is not accepted.`])},a.onerror=()=>t(["Invalid image file"]),a.src=URL.createObjectURL(e)}),[i]),D=(0,l.useMemo)(()=>F.map(e=>"string"==typeof e?e:e instanceof File?URL.createObjectURL(e):"").filter(Boolean),[F]),j=(0,l.useCallback)(e=>(0,x.a)(void 0,void 0,void 0,function*(){let a=Array.from(e),r=[],n=[];for(let e of a){let t=B(e),a=yield I(e),i=[...t.errors,...a];0===i.length?n.push(e):r.push(...i)}if(S(r),0===n.length)return;let i=E?yield handleMultipleImageFiles(n):n;v({target:{name:t,value:c?[...F,...i]:i.slice(0,1)}})}),[B,I,c,v,t,F]),removeFile=e=>{let a=F.filter((t,a)=>a!==e);S([]),v({target:{name:t,value:c?a:""}})},_=(0,l.useCallback)(e=>{M.current=e,"function"==typeof $?$(e):$&&($.current=e)},[$]),O=(0,l.useCallback)(()=>{!p&&M.current&&M.current.click()},[p]),R=(0,l.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),T(!0)},[]),L=(0,l.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),T(!1)},[]),Z=(0,l.useCallback)(e=>{e.preventDefault(),e.stopPropagation()},[]),H=(0,l.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),T(!1);let t=e.dataTransfer.files;t.length>0&&j(t)},[j]);return l.createElement(V,{className:h},l.createElement("label",{htmlFor:m||t},"string"==typeof e?l.createElement(s.T,{size:"title2"},e):e,y&&l.createElement(s.T,{size:"p3",mt:(0,u.h)(4),color:d.r.colors.gray700},y)),b&&l.createElement(G,null,l.createElement(s.T,{size:"p3"},"Formats: ",r.join("/")),i&&l.createElement(s.T,{size:"p3"},"Max size: ",n,"MB - Accepted ratios:"," ",i.join("/"))),(c||0===F.length)&&l.createElement(q,{className:(0,g.default)(N&&"image-upload-dragover",A&&"image-upload-error",p&&"image-upload-disabled"),onDragEnter:R,onDragLeave:L,onDragOver:Z,onDrop:H,onClick:O},l.createElement("input",{ref:_,type:"file",id:m||t,name:t,accept:r.join(","),multiple:c,onChange:e=>{let t=e.target.files;t&&t.length>0&&j(t)},disabled:p}),l.createElement(Upload,null),l.createElement(s.T,{size:"p3",fw:500},w||z("common.btn.uploadPhoto"))),F.length>0&&l.createElement(K,null,D.map((e,t)=>l.createElement(X,{key:t},l.createElement("img",{src:e,alt:`Uploaded file ${t+1}`,className:"image-upload-preview-image"}),l.createElement("button",{onClick:e=>{e.stopPropagation(),removeFile(t)},className:"image-upload-remove-button"},l.createElement(k.C,null))))),A&&l.createElement("div",{className:"image-upload-input-error"},[...P,a].map(e=>l.createElement(s.T,{key:e,className:"error-text",size:"c1",color:d.r.colors.red600},e))))}),Y=(0,c.Z)($.l)` & .mantine-Carousel-control { width: auto; } `,DragFreeCarousel=e=>{var{children:t,gapItem:a=8,slideSize:r="auto",withControls:n=!1,withIndicators:i=!1,dragFree:o=!0,align:s="start"}=e,c=(0,x._)(e,["children","gapItem","slideSize","withControls","withIndicators","dragFree","align"]);return l.createElement(Y,Object.assign({slideSize:r,slideGap:a,withControls:n,withIndicators:i,dragFree:o,align:s,containScroll:"trimSnaps"},c),l.Children.map(t,(e,t)=>l.createElement($.l.Slide,{key:t},e)))}},aklU:function(e,t,a){a.d(t,{I:function(){return InputCommentBar},P:function(){return PopupDanger},S:function(){return SharePopup},a:function(){return PopupFrame},b:function(){return SubmitReportForm},c:function(){return S},d:function(){return getPostFormData},e:function(){return editPost},f:function(){return createPost},g:function(){return getDefaultFailNoti},h:function(){return deletePost},i:function(){return D},j:function(){return deleteComment},k:function(){return decodeCommentBody},l:function(){return likeUnlikeComment},m:function(){return likeUnlikePost},u:function(){return useImagePicker}});var r=a("q1tI"),n=a("CqtA"),i=a("w9lR"),o=a("VkaC"),l=a("tKpg"),s=a("i8i4"),c=a("Xp6P"),d=a("rBCA"),p=a("iBNF"),m=a("NXpd"),u=a("jAVh"),g=a("lk1G"),h=a("KF2R"),v=a("NnTf"),f=a("IQVP"),x=a("Z/8f"),b=a("KAYV"),y=a("1H8c"),E=a("c0tG"),w=a("jVpD"),k=a("t/pd"),C=a("D0vz"),$=a("0hhg"),z=a("+7ua"),N=a("/pFO");let useImagePicker=(e,t)=>{let[a,n]=(0,r.useState)(e||[]),i=(0,r.useMemo)(()=>(e||a).map(e=>"string"==typeof e?e:URL.createObjectURL(e)),[e,a]);return{onSelectImages:r=>{let i=r.target.files;if(i){if(t&&e){let r=e||a;t(r.concat(Array.from(i)))}else n(a=>{let r=e||a;return t&&t(r.concat(Array.from(i))),r.concat(Array.from(i))})}},onRemoveImage:a=>{t&&e?(e.splice(a,1),t(e.slice())):n(r=>{let n=e||r;return n.splice(a,1),t&&t(n.slice()),n.slice()})},onRemoveAllImages:()=>{t?t([]):n([])},imageSrcs:i,imageFiles:e||a}},getDefaultFailNoti=e=>({message:e("notification.failure"),type:"danger"}),likeUnlikePost=({id:e,locale:t})=>(0,m.a)(void 0,void 0,void 0,function*(){if(!e)return;let a=yield(0,c.b)((0,c.e)(f.yy.POST.LIKE,{id:e,_locale:t}),"GET");return a}),deletePost=({id:e,locale:t})=>(0,m.a)(void 0,void 0,void 0,function*(){if(!e)return;let a=yield(0,c.b)((0,c.e)(f.yy.POST.DELETE,{id:e,_locale:t}),"DELETE");return a}),getPostFormData=({title:e,description:t,communityId:a,imageFiles:r,previewUrl:n,topicIds:i,locale:o,sanitizeFunction:s,categoryCommunityId:c,categoryTopicIds:d,introUrl:p,bannerUrl:u,scheduleTime:g,isAnonymous:h,isAskDoctor:f})=>(0,m.a)(void 0,void 0,void 0,function*(){let m=new FormData,b=(0,x.j)(t),y=(0,x.j)(e),E=(0,x.i)(b);if(m.append("title",y),m.append("description",(0,x.k)(b,s)),c?m.append("category_community",String(c)):a&&m.append("community_id",String(a)),m.append("is_anonymous",h?"1":"0"),m.append("is_question",f?"1":"0"),(null==n?void 0:n.title)&&m.append("preview_title",n.title),(null==n?void 0:n.description)&&m.append("preview_description",n.description),(null==n?void 0:n.url)&&m.append("preview_link",(0,l.c)(n.url)),(null==n?void 0:n.image)&&m.append("preview_image",(0,l.c)(n.image)),null==i||i.forEach(e=>{m.append("topics[]",String(e||""))}),null==d||d.forEach(e=>{m.append("category_topics[]",String(e||""))}),null==r?void 0:r.length){let e=yield Promise.all(r.map((e,t)=>new Promise(a=>{setTimeout(()=>{a((0,x.u)(e,o))},2e3*t)})));null==e||e.filter(Boolean).slice(0,v.M).forEach((e,t)=>{m.append(`images[${t}]`,e)})}else m.append("images","");return null==E||E.forEach(e=>{m.append("mention_ids[]",e)}),m.append("intro_url",p||""),m.append("banner",u||""),g&&(m.append("post_type","scheduled"),m.append("schedule_datetime",g)),m}),createPost=({locale:e,formData:t,isArticleComment:a})=>(0,m.a)(void 0,void 0,void 0,function*(){let r=yield(0,c.b)((0,c.e)(a?f.yy.POST.CREATE_ARTICLE_COMMENT:f.yy.POST.CREATE,{_locale:e}),"POST",{data:t});return r}),editPost=({id:e,locale:t,formData:a})=>(0,m.a)(void 0,void 0,void 0,function*(){let r=yield(0,c.b)((0,c.e)(f.yy.POST.UPDATE,{id:e,_locale:t}),"POST",{data:a});return r}),reportPost=({id:e,reason:t,locale:a})=>{let r=new FormData;return r.append("reason",t),(0,c.b)((0,c.e)(f.yy.POST.REPORT,{_locale:a,id:e}),"POST",{data:r})},T=d.Z.div` [data-type='confirm'] { max-width: 468px; /* height: 486px; */ padding: 0; .popup-content { display: flex; flex-direction: column; padding: 0; .close-button { top: 16px; right: 16px; width: 24px; height: 24px; z-index: 5; } .header { display: flex; height: 56px; align-items: center; padding: 16px 56px 16px 32px; border-bottom: 1px solid ${p.r.colors.neutral100}; font-weight: 900; width: 100%; justify-content: space-between; } .content { overflow: auto; flex: 1; .topic-list-wrapper { padding: 1rem; } } } } > div&[data-open='true'] { z-index: 250; &:last-child { z-index: 200; } } ${e=>e.isExpand&&` & > div[data-open] { width: 100%; height: 100%; max-width: none; max-height: none; } `} ${e=>e.hasFullscreen&&` & > div[data-open] { transition: all 0.5s ease-in-out, width 0s, height 0s; } `} `,P=d.Z.div` cursor: pointer; display: flex; align-items: center; `,PopupFrame=({className:e,style:t,closeIcon:a,heading:n="",children:o,isOpen:l=!1,hasFullscreen:s=!1,disableClickOutside:c=!1,initExpand:d=!1,onExpandChange:p,onClose:m=()=>null})=>{let[u,g]=(0,r.useState)(d);return r.createElement(T,{className:e,style:t,isExpand:u,hasFullscreen:s},r.createElement($.P,{type:"confirm",onClose:m,isOpen:l,closeIcon:a||r.createElement("img",{src:z.C,loading:"lazy"}),enableAnimation:!s,disableClickOutside:c},r.createElement("div",{className:"header"},r.createElement(i.H,{tag:"h5"},n),s&&r.createElement(P,{onClick:()=>{null==p||p(),g(!u)}},r.createElement(C.Z,{size:14,isExpand:u}))),r.createElement("div",{className:"content"},"function"==typeof o?o(u):o)))};var S="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='25' fill='none'%3e%3cpath fill='%23262626' d='M12 22.984c5.523 0 10-4.477 10-10s-4.477-10-10-10-10 4.478-10 10 4.477 10 10 10'/%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m14.828 10.156-5.657 5.657M9.172 10.156l5.657 5.657'/%3e%3c/svg%3e";let M=d.Z.div` [data-type='confirm'] { width: min(360px, 100%); height: auto; &[data-open='false'] { top: calc(-100% - 500px); } } z-index: 600; .header { display: none !important; } .confirm-dialog { position: relative; overflow: auto; width: 100%; padding-top: 44px; background: #fff; border-radius: ${p.r.borderRadius}; .confirm-content { display: flex; flex-direction: column; align-items: center; padding: 0 16px 16px; text-align: center; .title { margin-bottom: 8px; font-size: 24px; line-height: 32px; word-break: break-word; overflow-wrap: break-word; } .desc { margin-bottom: 24px; color: ${p.r.colors.gray500}; font-size: 18px; line-height: 24px; text-align: center; word-break: break-word; overflow-wrap: break-word; } .btn-group { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; button { margin: 0 4px 0.5rem; } } } } .thumbnail-container { width: 80px; height: 80px; margin-bottom: 32px; .thumbnail { width: 100%; height: 100%; } &.is-icon { display: flex; align-items: center; justify-content: center; background: #e0e9fc; border-radius: 1rem; .thumbnail { width: 40px; height: 40px; } } } &[data-is-marrybaby='true'] { .popup-frame { > div:first-child { overflow: hidden; border-radius: 1rem; &[data-open='true'] { ${l.M.mbDown} { top: 100%; transform: translate(-50%, -100%); max-width: unset; width: 100%; background: unset; overflow: unset; } } } .popup-content { .close-button { ${l.M.mbDown} { display: none; } } .confirm-dialog { ${l.M.mbDown} { background: unset; position: relative; overflow-x: hidden; &::before { content: ''; width: 200%; background: #fff; position: absolute; left: 50%; top: 0; transform: translateX(-50%); z-index: -1; height: 100%; border-top-left-radius: 100%; border-top-right-radius: 100%; } } .confirm-content { padding: 0 40px 40px; ${l.M.mbDown} { padding-left: 1.5rem; padding-right: 1.5rem; } .btn-group { width: 100%; justify-content: space-between; button { flex: 1; margin: 0; &:first-child { margin-right: 0.5rem; } } } } } } .thumbnail-container { ${l.M.mbDown} { display: none; } &.is-icon { background: #ffeaf1; border-radius: 24px; } &.is-mobile { position: absolute; top: 0; left: 50%; display: none; width: 48px; height: 48px; transform: translate(-50%, -50%); &.is-icon { border-radius: 1rem; .thumbnail { width: 24px; height: 24px; } } ${l.M.mbDown} { display: flex; } } } } } `,PopupDanger=({className:e,isMarryBaby:t,style:a,title:d,description:p,acceptText:m,cancelText:u,onAccept:g,onCancel:h,thumbnail:v,isThumbnailIcon:f,onClose:x,acceptBtnTracking:b,acceptBtnProps:y,cancelBtnProps:E})=>{let{data:{env:{isMarryBaby:w}}}=(0,r.useContext)(c.T),k="boolean"==typeof t?t:w,[C,$]=(0,r.useState)(!1);return((0,r.useEffect)(()=>((0,l.t)(!0),setTimeout(()=>$(!0),0),()=>(0,l.t)(!1)),[]),"undefined"==typeof window)?null:s.createPortal(r.createElement(M,{"data-is-marrybaby":k,className:e,style:a,"data-open":C},r.createElement(PopupFrame,{className:"popup-frame",isOpen:C,onClose:x},r.createElement("div",{className:"confirm-dialog",onClick:e=>e.stopPropagation()},r.createElement("div",{className:"confirm-content"},v&&r.createElement("div",{className:`thumbnail-container ${f?"is-icon":""}`},r.createElement("img",{className:"thumbnail",src:v,loading:"lazy"})),r.createElement(i.H,{className:"title",tag:"h2"},d),r.createElement(o.T,{className:"desc",size:"lg"},p),r.createElement("div",{className:"btn-group"},r.createElement(n.B,Object.assign({theme:k?"marryBaby":"helloSites",size:"md",color:"tertiary",onClick:()=>{null==g||g(),null==x||x()}},y,b),m),r.createElement(n.B,Object.assign({theme:k?"marryBaby":"helloSites",size:"md",onClick:()=>{null==h||h(),null==x||x()}},E),u)))),k&&v&&r.createElement("div",{className:`thumbnail-container is-mobile ${f?"is-icon":""}`},r.createElement("img",{className:"thumbnail",src:v,loading:"lazy"})))),(0,l.a)())},A=d.Z.div` padding: 1rem; border-top: 1px solid #f2f2f2; &[data-is-reply='true'] { padding-right: 0; padding-left: 0; border-top: 1px solid #e4e8ec; margin-right: 1rem; margin-left: 1rem; } .error-text { padding: 1rem; color: ${p.r.colors.red700}; } .reply-to-container { display: flex; justify-content: space-between; padding-bottom: 0.75rem; margin-top: -0.25rem; .icon-close-comment { width: 16px; height: 16px; cursor: pointer; } a { text-decoration: none; } } .input-container { display: flex; align-items: center; .avatar-wrapper { display: flex; flex-shrink: 0; align-items: center; margin-right: 0.5rem; &.avatar-wrapper-reply { width: 32px; height: 32px; .avatar { width: 32px; height: 32px; } } } .input-wrapper { margin-right: 0.5rem; &[data-has-error] { .as-input { border-color: ${p.r.colors.red700}; } } .as-input { .textarea { width: 100%; max-height: 225px; min-height: 75px; .ql-toolbar { padding: 0; } .ql-editor { padding-left: 0; padding-right: 0; } .quill { height: 0; } } width: 100%; padding: 12px 16px; border: solid 1px ${p.r.colors.gray200}; border-radius: ${p.r.borderRadius}; &:active, &:focus { border-color: ${p.r.colors.primaryBase}; box-shadow: 0px 0px 2px 2px ${p.r.colors.primary200}; } &:disabled { background-color: ${p.r.colors.gray100}; cursor: not-allowed; } span { &[data-error='true'] { color: red; text-decoration: underline; } } } &[data-has-action-icon] { .as-input { padding: 12px 48px 12px 16px; } } &[data-has-display-icon] { .as-input { padding: 12px 16px 12px 48px; } } &[data-has-action-icon][data-has-display-icon] { .as-input { padding: 12px 48px; } } &[data-size='lg'] { .as-input { font-size: 16px; font-weight: ${p.r.sizes.fwRegular}; ${l.M.mbDown} { font-size: 22px; line-height: 1.2; } ${l.M.mbUp} { font-size: 26px; line-height: 1.2; } } } &[data-size='md'] { .as-input { font-weight: ${p.r.sizes.fwRegular}; line-height: 22px; ${l.M.mbDown} { font-size: 14px; line-height: 1.2; } ${l.M.mbUp} { font-size: 16px; line-height: 1.2; } } } &[data-size='sm'] { .as-input { font-weight: ${p.r.sizes.fwRegular}; line-height: 20px; ${l.M.mbDown} { font-size: 13px; line-height: 1.5; } ${l.M.mbUp} { font-size: 13px; line-height: 1.5; } } } } .images-input-label { height: 100%; cursor: pointer; .icon-images-input { width: 24px; height: 24px; vertical-align: middle; } } .send-button { display: flex; width: 40px; height: 40px; flex-shrink: 0; align-items: center; justify-content: center; padding: 0; border: none; &.send-button-post { background: ${p.r.colors.neutral100}; border-radius: 50%; } .icon-enter { width: 20px; height: 20px; vertical-align: middle; } &[data-is-loading='true'] { > div { display: flex; align-items: center; justify-content: center; } } } } .preview-images-container { margin-top: 1rem; .image-src-wrapper { position: relative; width: 100%; padding-top: 66.67%; &:not(:last-child) { margin-bottom: 1rem; } .preview-image { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; } .icon-close-circle { position: absolute; top: 10px; right: 10px; width: 20px; height: 20px; cursor: pointer; } } } `,F=(0,r.createContext)({}),getCommentFormBody=({postId:e,message:t,photos:a,link:r,locale:n,sanitizeFunction:i,replyingUserId:o,replyingUserName:l,replyingId:s})=>(0,m.a)(void 0,void 0,void 0,function*(){let c=new FormData,d=(0,x.k)(t.replace(/(\ )+/g," "),i),p=(0,x.i)(d);if(a&&a.length>0){let e=yield Promise.all(null==a?void 0:a.map(e=>(0,x.u)(e,n)));e.filter(Boolean).slice(0,v.M).forEach(e=>{c.append("images[]",e)})}return r&&c.append("link",r),null==p||p.forEach(e=>{c.append("mention_ids[]",e)}),c.append("post_id",e),s&&c.append("parent_id",s),o&&(p.unshift(o),d=`[mention+id="${o}"+name="${(l||"").replace('"',"'")}"]${d}`,c.append("parent_user_id",String(o))),c.append("content",d),c.append("content",d),c}),submitComment=(e,t)=>(0,m.a)(void 0,void 0,void 0,function*(){return(0,c.b)((0,c.e)(f.yy.COMMENT.CREATE,{_locale:t}),"POST",{data:e})}),decodeCommentBody=e=>{try{let t=e.match(/\[@([^\]]+)\]/),a=t?t[0].replace("[@","").replace("]",""):"",r=e.replace(/\[@([^\]]+)\]/,"");return{text:r.trim(),replyingTo:a}}catch(e){}return{text:""}},submitReply=(e,t)=>(0,m.a)(void 0,void 0,void 0,function*(){return(0,c.b)((0,c.e)(f.yy.COMMENT.REPLY,{_locale:t}),"POST",{data:e})}),likeUnlikeComment=({commentId:e,setLike:t=!1,locale:a})=>(0,m.a)(void 0,void 0,void 0,function*(){return(0,c.b)((0,c.e)(t?f.yy.COMMENT.LIKE:f.yy.COMMENT.UNLIKE,{_locale:a,id:e}),"GET")}),deleteComment=({id:e,locale:t})=>(0,c.b)((0,c.e)(f.yy.COMMENT.DELETE,{_locale:t,id:e}),"DELETE"),InputCommentBar=({isReply:e,className:t,onClose:a,replyToName:i,style:l,replyingId:s,replyingUser:d,onPostSuccess:p,post:f,isMarryBaby:x})=>{let{action:{pushNotifications:k,sanitizeFunction:C},data:{userInfo:$,locale:z,env:{isMarryBaby:N}}}=(0,r.useContext)(c.T),{t:T}=(0,g.u)(),{onSelectImages:P,onRemoveImage:M,imageSrcs:B,onRemoveAllImages:I,imageFiles:D}=useImagePicker(),[j,_]=(0,r.useState)(""),{trigger:O}=(0,r.useContext)(F),[R,L]=(0,r.useState)(!1),Z=(0,r.useRef)(null),H=(0,r.useRef)(null),U=(0,r.useRef)(null),[V,G]=(0,r.useState)([]),[q,X]=(0,r.useState)([]),[K,W]=(0,r.useState)(null);return(0,r.useEffect)(()=>{var e;null===(e=U.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"start"}),setTimeout(()=>{var e;null===(e=H.current)||void 0===e||e.focus()},400)},[O]),r.createElement(A,{"data-is-reply":e,className:t,style:l},e&&r.createElement("div",{className:"reply-to-container"},r.createElement(o.T,{size:"p4"},r.createElement("span",{dangerouslySetInnerHTML:{__html:T("inputComment.replyTo",{name:`@${i||""}`})}})),r.createElement("img",{src:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='17' fill='none'%3e%3ccircle cx='8' cy='8.5' r='6.667' fill='white' stroke='%23404040'/%3e%3cpath stroke='%23404040' stroke-linecap='round' stroke-linejoin='round' d='m10 6.5-4 4M6 6.5l4 4'/%3e%3c/svg%3e",className:"icon-close-comment",onClick:()=>a&&a(),loading:"lazy"})),r.createElement("div",{className:"input-container",ref:U},r.createElement(E.U,{className:`avatar-wrapper ${e?"avatar-wrapper-reply":""}`,avatar:(null==$?void 0:$.id)?$.avatar:v.a,username:(null==$?void 0:$.name)||(null==$?void 0:$.username)}),r.createElement("input",{ref:Z,onChange:P,type:"file",multiple:!0,accept:"image/png,image/jpeg",name:"images",style:{display:"none"}}),r.createElement(u.I,{value:j,name:"input",size:"md",className:"input-wrapper",displayIcon:r.createElement("img",{src:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3cpath stroke='%232D87F3' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='M10.754 4.854H4.492a1.79 1.79 0 0 0-1.789 1.789v12.524a1.79 1.79 0 0 0 1.79 1.789h12.523a1.79 1.79 0 0 0 1.79-1.79v-6.261'/%3e%3cpath stroke='%232D87F3' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='M17.463 3.512a1.898 1.898 0 0 1 2.684 2.684l-8.498 8.498-3.579.895.895-3.579z'/%3e%3c/svg%3e",loading:"lazy"}),CustomInput:r.createElement("div",{className:"as-input"},r.createElement(w.R,{className:"textarea",html:j,onChange:_,onImagePickerClick:()=>{var e;return null===(e=Z.current)||void 0===e?void 0:e.click()},bannedWords:q,onPreviewUrlChange:W,onInvalidUrlsChange:G,setEditorRef:e=>H.current=e,isReplying:e}))}),r.createElement(n.B,{theme:("boolean"==typeof x?x:N)?"marryBaby":"helloSites",className:"send-button",size:"sm",onClick:()=>(0,m.a)(void 0,void 0,void 0,function*(){var t,r,n,i,o,l,c,m,u;if((null==f?void 0:f.id)&&!R){L(!0);try{let g=yield getCommentFormBody(Object.assign({message:j,photos:D,postId:String(f.id),link:null==K?void 0:K.url,sanitizeFunction:C,locale:z},e&&s?{replyingUserId:String((null==d?void 0:d.id)||(null===(t=null==f?void 0:f.author)||void 0===t?void 0:t.id)||""),replyingId:s,replyingUserName:(null==d?void 0:d.name)||(null==d?void 0:d.username)||""}:{})),v=yield e&&s?submitReply(g,z):submitComment(g,z),x=null==v?void 0:v.data;(null==x?void 0:x.id)&&!(null===(n=null===(r=null==v?void 0:v.messages)||void 0===r?void 0:r.moderation)||void 0===n?void 0:n.type)?(e=>{_(""),I(),a&&a();let t=(0,h.e)(e.data);"string"==typeof t.images&&(t.images=JSON.parse(t.images)),p&&p(t)})(v):(null===(o=null===(i=null==v?void 0:v.messages)||void 0===i?void 0:i.moderation)||void 0===o?void 0:o.type)==="banned"?(k({title:T("notification.comment.blocked.title"),message:T("notification.comment.blocked.message"),type:"danger"}),v.messages.moderation.words&&X(v.messages.moderation.words)):(null===(c=null===(l=null==v?void 0:v.messages)||void 0===l?void 0:l.moderation)||void 0===c?void 0:c.type)==="suspect"?(k({title:T("notification.comment.suspect.title"),message:T("notification.comment.suspect.message"),type:"warning"}),_(""),I(),a&&a()):(null===(m=null==v?void 0:v.messages)||void 0===m?void 0:m.find(e=>{var t;return!!(null===(t=null==e?void 0:e.includes)||void 0===t?void 0:t.call(e,"suspend"))}))?(k({message:T("notification.suspend.message"),type:"warning"}),_(""),I(),a&&a()):k({title:"",message:(null===(u=null==v?void 0:v.messages)||void 0===u?void 0:u[0])||T("notification.comment.somethingWrong"),type:"danger"})}catch(e){k({title:"",message:T("notification.comment.somethingWrong"),type:"danger"})}L(!1)}}),isLoading:R,isDisabled:!!(null==V?void 0:V.length)||R||!j||(null==j?void 0:j.length)<2||!j.trim()},r.createElement("img",{src:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='20' height='21' fill='none'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m7.5 9.734-3.75 3.75 3.75 3.75'/%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M16.25 4.734v5.569c0 .843-.33 1.653-.915 2.25a3.1 3.1 0 0 1-2.21.931H3.75'/%3e%3c/svg%3e",className:"icon-enter",loading:"lazy"}))),(null==V?void 0:V.length)?r.createElement("div",{className:"error-text"},T("notification.limitUrlDomain")):null,(!B||0===B.length)&&K&&r.createElement("div",{className:"link-preview-wrapper"},K.isFetching?r.createElement(y.L,null):r.createElement(r.Fragment,null,r.createElement(b.C,{title:K.title,url:K.url||"#",image:K.image,noRefetch:!0}),r.createElement("img",{src:S,className:"icon-close",onClick:()=>W(null),loading:"lazy"}))),B&&B.length>0&&r.createElement("div",{className:"preview-images-container"},B.map((e,t)=>r.createElement("div",{key:t,className:"image-src-wrapper"},r.createElement("img",{className:"preview-image",src:e,loading:"lazy"}),r.createElement("img",{src:S,className:"icon-close-circle",onClick:()=>M(t),loading:"lazy"})))))},SharePopup=({trackingCategory:e,className:t,style:a,url:n,text:i,onClose:o})=>{let{data:{env:{isMarryBaby:s}}}=(0,r.useContext)(c.T),{t:d}=(0,g.u)(),[p,m]=(0,r.useState)(!1);return(0,r.useEffect)(()=>((0,l.t)(!0),setTimeout(()=>m(!0),0),()=>(0,l.t)(!1)),[]),r.createElement(k.h,null,r.createElement(B,{"data-is-marrybaby":s,className:t,style:a},r.createElement(PopupFrame,{className:"share-popup",isOpen:p,onClose:o,heading:d("bottomBar.share")},p&&r.createElement(N.r,{trackingCategory:e,shareUrl:n||("undefined"!=typeof window?window.location.href:""),title:i}))))},B=d.Z.div` .share-popup { > div:first-child { height: unset; } } .custom-share__header { display: flex; flex-wrap: no-wrap; align-items: center; padding: 1rem; border-bottom: 1px solid ${p.r.colors.neutral100}; margin-bottom: 16px; .custom-share__header-image { width: 38px; height: 38px; flex-shrink: 0; & > img { width: 100%; height: 100%; object-fit: cover; object-position: center; } } .custom-share__header-info { flex: 1; padding: 0 8px; word-break: break-word; [data-tag='h4'] { margin-bottom: 8px; font-size: 14px; font-weight: bold; line-height: 14px; } [data-size='md'] { color: #a5a5a5; font-size: 14px; line-height: 14px; } } } &[data-is-marrybaby='true'] { .share-popup { > div:first-child { overflow: hidden; border-radius: 1rem; &[data-open='true'] { ${l.M.mbDown} { max-width: unset; width: 100%; top: 100%; transform: translate(-50%, -100%); border-bottom-left-radius: 0; border-bottom-right-radius: 0; } } } .close-button { display: block; } .popup-content { .header { display: block; padding: 1rem; background-color: rgb(243, 243, 243); } .content { padding-bottom: 1rem; } } .share-mb-text { margin: 1rem 1rem 0.5rem; } } } `,I=d.Z.div` padding: 0 8px; margin-top: 18px; .report-list { margin-bottom: 18px; .report-item { display: flex; align-items: center; margin-bottom: 10px; font-weight: 600; & > img { width: 12px; height: 12px; margin-right: 8px; } .__label { font-size: 14px; } } } .report-submit { width: 100%; } &[data-is-marrybaby='true'] { padding: 0 1rem 1rem; } `;var D="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3e%3cpath stroke='%23737373' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12M8 5v3M8 11h.007'/%3e%3c/svg%3e";let SubmitReportForm=({className:e,style:t,reason:a,reasonText:i,onClose:l,postId:s})=>{let{data:{locale:d,env:{isMarryBaby:u}},action:{pushNotifications:h}}=(0,r.useContext)(c.T),{t:v}=(0,g.u)(),[f,x]=(0,r.useState)(!1);return r.createElement(I,{"data-is-marrybaby":u,className:e,style:t},r.createElement("ul",{className:"report-list"},r.createElement("li",{className:"report-item"},r.createElement("img",{src:D,loading:"lazy"}),r.createElement(o.T,{className:"__label",color:p.r.colors.gray800,size:"p4"},i))),r.createElement(n.B,{theme:u?"marryBaby":"helloSites",className:"report-submit",size:"lg",color:"primary",isLoading:f,onClick:()=>(0,m.a)(void 0,void 0,void 0,function*(){if(s&&!f){x(!0);try{let e=yield reportPost({id:s,reason:a,locale:d});(null==e?void 0:e.status)===1&&(h({message:"Post reported",type:"success"}),l&&l())}catch(e){}x(!1)}})},v("submit")))}},Di7p:function(e,t,a){a.d(t,{C:function(){return CardAuthor},P:function(){return PopupExpert},a:function(){return PopupDoctor},b:function(){return PopupHospital},c:function(){return ProfileDetailModal},d:function(){return CardAuthor$1}});var r=a("q1tI"),n=a("rCoo"),i=a("dgD7"),o=a("/npG"),l=a("Eso5"),s=a("SPK5"),c=a("mAfZ"),d=a("mYVa"),p=a("Wgwc"),m=a.n(p),u=a("QgiU"),g=a.n(u),h=a("lk1G"),v=a("tKpg"),f=a("MEry"),x=a("HecI"),b=a("NXpd"),y=a("c0tG"),E=a("YwFi"),w=a("vCEM"),k=a("Xp6P"),C=a("CqtA"),$=a("VkaC"),z=a("iBNF"),N=a("rBCA"),T=a("IQVP"),P=a("1H8c"),S=a("w9lR"),M=a("B1nu"),A=a("xrdX");let MainText=({children:e,className:t=""})=>r.createElement("div",{className:`tMiOKib ${t}`},e),SubText=({children:e,className:t=""})=>r.createElement("div",{className:`uDcqD-2 ${t}`},e);var F={container:"sTU4T4I",info:"tCql9Je",avatarWrapper:"_3j7uYhH",avatarIcon:"PHABgoT"};let CardAuthor$1=({avatarProps:e,title:t,subTitle:a,children:n,className:i="",style:o,onAvatarClick:l,avatarIcon:s,dataEventCategory:c,dataEventAction:d,dataEventLabel:p})=>r.createElement("div",{className:`${F.container} ${i}`,style:o},r.createElement("div",{className:F.avatarWrapper,onClick:l,"data-event-category":c,"data-event-action":d,"data-event-label":p},r.createElement(y.U,Object.assign({},e)),s&&r.createElement("div",{className:F.avatarIcon},s)),r.createElement("div",{className:`${F.info} ${i}`,style:{minHeight:`${(null==e?void 0:e.size)||40}px`}},n||r.createElement(r.Fragment,null,t&&r.createElement(MainText,null,t),a&&r.createElement(SubText,null,a))));CardAuthor$1.MainText=MainText,CardAuthor$1.SubText=SubText,CardAuthor$1.SubDivider=({className:e=""})=>r.createElement("span",{className:`m-HVXw1 ${e}`}),CardAuthor$1.Row=({children:e,className:t=""})=>r.createElement("div",{className:`dZWeHns ${t} row`},e),CardAuthor$1.ColLeft=({children:e,className:t=""})=>r.createElement("div",{className:`${t} col-left`},e),CardAuthor$1.ColRight=({children:e,className:t=""})=>r.createElement("div",{className:`${t} col-right`},e),CardAuthor$1.SubTextRow=e=>{var{children:t,className:a=""}=e,n=(0,b._)(e,["children","className"]);return r.createElement("div",Object.assign({className:`pDlsows ${a}`},n),t)};var B=(0,o.k)(()=>({root:{verticalAlign:"bottom"}}));let I=(0,r.createContext)({}),AuthorBadgeItem=({styles:e,className:t,classNames:a})=>{let{role:n,siteType:i,title:o}=(0,r.useContext)(I),{cx:l,classes:s}=B(void 0,{name:"AuthorBadgeItem",styles:e,classNames:a});return n?r.createElement(f.A,{className:l(s.root,t),siteType:i,role:n,title:o}):null};var D=(0,o.k)(()=>({root:{}}));let j=N.Z.div` position: fixed; left: 50%; width: 343px; background-color: ${z.r.colors.white}; border-radius: ${z.r.borderRadius}; box-shadow: 0px 0px 4px ${z.r.colors.gray200}; transform: translate(-50%, -50%); transition: all 0.5s ease-in-out; ${v.M.tdUp} { width: 750px; } &[data-animation='true'] { transition: all 0.5s ease-in-out; } &[data-open='true'] { z-index: 400; top: 50%; opacity: 1; visibility: visible; } &[data-open='false'] { top: -50%; } .popup-content { ${v.M.mbDown} { display: block; } display: flex; position: relative; z-index: 111; height: 100%; .button-see-more { margin: 32px 0; padding: 0; > * { display: inline-block; } } .close-button { position: absolute; z-index: 100; top: 10px; right: 10px; cursor: pointer; width: unset; height: unset; img { width: 100%; height: 100%; border-radius: 50%; } } } .main-info { padding-bottom: 32px; background-color: ${z.r.colors.primary50}; border-radius: ${z.r.borderRadius}; .btn-booking { display: flex; margin: 12px auto; } .avatar-title { position: relative; width: 100%; padding-top: 46px; text-align: center; } } `,_=N.Z.div` position: fixed; z-index: 110; top: 0; left: 0; width: 100%; height: 100%; align-items: center; background: rgba(38, 38, 38, 0.3); &[data-open='false'] { display: none; } `,O=N.Z.div` .image-container { .badge-avatar { position: absolute; right: 0; bottom: 0; top: 0; } } display: flex; justify-content: center; padding-bottom: 15px; text-align: center; .profile-image { width: 100px; min-width: 100px; height: 100px; min-height: 100px; border-radius: 50%; object-fit: cover; } .badge-avatar { width: 24px; height: 24px; } `,R=N.Z.div` position: relative; z-index: 9; .specialty { display: flex; flex-wrap: wrap; justify-content: center; } padding: 0px 16px; text-align: center; .specialty { justify-content: center; } .experience { padding: 16px 0px 32px; text-align: left; .btn-wrapper { margin-top: 24px; } } p { max-width: 100%; -webkit-line-clamp: 4; -webkit-box-orient: vertical; text-overflow: ellipsis; overflow: hidden; } `,L=N.Z.ul` padding-left: 18px; li { list-style-type: disc; } `;var Z="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3cpath stroke='%23262626' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M18 6 6 18M6 6l12 12'/%3e%3c/svg%3e",H="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none'%3e%3cpath fill='white' stroke='%23E4E8EC' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='M9 17A8 8 0 1 0 9 1a8 8 0 0 0 0 16'/%3e%3cpath fill='%23FF5331' d='M10.333 7.667V5H7.667v2.667H5v2.667h2.667V13h2.666v-2.666H13V7.667z'/%3e%3c/svg%3e";let PopupDoctor=({isOpen:e=!0,onClose:t,enableAnimation:a=!0,doctorId:n,locale:i,isMobile:o,overwriteProfileProps:l,avatarFallback:s=w.C.getAssetPath("avatar.jpg"),trackingCategory:c="Together"})=>{var d,p,m;let{t:u}=(0,h.u)(),[g,v]=(0,r.useState)(null),[f,x]=(0,r.useState)(!1);(0,r.useEffect)(()=>{if(e&&n&&String(null==g?void 0:g.id)!==String(n)){x(!0);try{v(null),(0,k.c)((0,k.g)(T.tC.GET_DOCTOR_INFO,{doctorId:n,website_url:k.l[i]}),"get").then(e=>{v(Object.assign(Object.assign({},null==e?void 0:e._data.doctor),l))})}catch(e){console.error(e)}x(!1)}},[e,n,null==g?void 0:g.id]);let b=(null==g?void 0:g.experiences)||[],y=(null==g?void 0:g.specialties)||[],N=y.map(e=>(null==e?void 0:e.name)||e).join(" • "),S=b.map(e=>{try{return JSON.parse(e.description)}catch(t){return e.description}}).filter(e=>e.content),renderExperienceText=e=>(null==e?void 0:e.year)?`${e.year} ${null==e?void 0:e.content}`:(null==e?void 0:e.content)?e.content:"string"==typeof e?e:"";return r.createElement(r.Fragment,null,r.createElement(j,{"data-open":e,"data-animation":a,onClick:e=>e.stopPropagation()},f||!g?r.createElement(P.L,null):r.createElement("div",{className:"popup-content"},r.createElement("div",{className:"close-button",onClick:t},r.createElement("img",{src:Z,style:{width:20,height:20},alt:"close-icon",loading:"lazy"})),r.createElement("div",{className:"main-info"},r.createElement("div",{className:"border-banner"}),r.createElement("div",{className:"avatar-title"},r.createElement(O,null,r.createElement("div",{className:"image-container"},r.createElement("div",{style:{position:"relative"}},r.createElement(E.I,{src:null==g?void 0:g.avatar,backupSrc:s,className:"profile-image",alt:"avatar"}),r.createElement("img",{className:"badge-avatar",src:H,alt:"badge",loading:"lazy"})))),r.createElement(R,null,r.createElement($.T,{size:"s3",weight:"semiBold",className:"full-name"},null==g?void 0:g.name),r.createElement("div",{className:"specialty"},N&&r.createElement(r.Fragment,null,r.createElement($.T,{size:"p4",color:z.r.colors.gray800},N," • ")),r.createElement("a",{href:(0,k.m)({id:null===(d=null==g?void 0:g.organization)||void 0===d?void 0:d.id,name:null===(p=null==g?void 0:g.organization)||void 0===p?void 0:p.name,slug:null===(m=null==g?void 0:g.organization)||void 0===m?void 0:m.slug,locale:i}),className:"organisation",target:"_blank",rel:"noreferrer"},r.createElement($.T,{size:"p4",className:"organisation",color:z.r.colors.gray800,style:{textDecoration:"underline"}},null==g?void 0:g.organization.name))))),!o&&r.createElement("div",{className:"btn-wrapper"},r.createElement("a",{href:(0,k.n)({name:g.name,id:g.id,locale:i})},r.createElement(C.B,{color:"primary",size:"md",className:"btn-booking"},u("careBooking.bookAnAppointment"))))),S&&r.createElement(R,null,r.createElement("div",{className:"experience"},r.createElement($.T,{weight:"bold",size:"s3",color:z.r.colors.gray800,style:{paddingBottom:16}},u("expert.content.description").toUpperCase()),r.createElement(L,null,S.map((e,t)=>r.createElement("li",{key:t},r.createElement($.T,{size:"p2"},renderExperienceText(e))))),o?r.createElement("div",{className:"btn-wrapper"},r.createElement("a",{href:(0,k.n)({name:g.name,id:g.id,locale:i})},r.createElement(C.B,{color:"primary",size:"md",className:"btn-booking"},u("careBooking.bookAnAppointment")))):r.createElement("a",{href:(0,k.n)({name:g.name,id:g.id,locale:i})},r.createElement($.T,{size:"s4",color:"#2D87F3",style:{paddingTop:24},"data-event-category":c,"data-event-action":"See Full Doctor Profile","data-event-label":(0,k.k)(i)+(0,k.n)({name:g.name,id:g.id,locale:i})},u("home.seeExpert"))))))),r.createElement(_,{"data-open":e,onClick:e=>{e.stopPropagation(),t()}}))},U=N.Z.div` position: fixed; left: 50%; width: 343px; background-color: ${z.r.colors.white}; border-radius: ${z.r.borderRadius}; box-shadow: 0px 0px 4px ${z.r.colors.gray200}; transform: translate(-50%, -50%); transition: all 0.5s ease-in-out; ${v.M.tdUp} { width: 750px; } &[data-animation='true'] { transition: all 0.5s ease-in-out; } &[data-open='true'] { z-index: 400; top: 50%; opacity: 1; visibility: visible; } &[data-open='false'] { top: -50%; } .popup-content { ${v.M.mbDown} { display: block; } display: flex; position: relative; z-index: 111; height: 100%; .button-see-more { margin: 32px 0; padding: 0; > * { display: inline-block; } } .close-button { position: absolute; z-index: 100; top: 10px; right: 10px; cursor: pointer; width: unset; height: unset; img { width: 100%; height: 100%; border-radius: 50%; } } } .main-info { padding-bottom: 32px; background-color: ${z.r.colors.primary50}; border-radius: ${z.r.borderRadius}; .avatar-title { position: relative; width: 100%; padding-top: 46px; text-align: center; } } `,V=N.Z.div` position: fixed; z-index: 110; top: 0; left: 0; width: 100%; height: 100%; align-items: center; background: rgba(38, 38, 38, 0.3); &[data-open='false'] { display: none; } `,G=N.Z.div` .image-container { .badge-avatar { position: absolute; right: 0; bottom: 0; top: 0; } } display: flex; justify-content: center; padding-bottom: 15px; text-align: center; .profile-image { width: 100px; min-width: 100px; height: 100px; min-height: 100px; border-radius: 50%; object-fit: cover; } .badge-avatar { width: 24px; height: 24px; } `,q=N.Z.div` position: relative; z-index: 9; .specialty { display: flex; flex-wrap: wrap; justify-content: center; } padding: 0px 16px; text-align: center; .specialty { justify-content: center; } .experience { padding: 16px 0px 32px; text-align: left; .btn-wrapper { margin-top: 24px; } } p { max-width: 100%; -webkit-line-clamp: 4; -webkit-box-orient: vertical; text-overflow: ellipsis; overflow: hidden; } `,X=N.Z.div` display: flex; margin-top: 8px; .bullet-point { width: 24px; height: 24px; } `;var K="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3cpath fill='%2345A4FF' d='M12 24c6.627 0 12-5.373 12-12S18.627 0 12 0 0 5.373 0 12s5.373 12 12 12'/%3e%3cpath fill='%232D87F3' d='M24 12a12 12 0 0 0-.128-1.758l-5.077-5.077L5.041 18.958l4.858 4.858c.682.12 1.384.184 2.1.184 6.628 0 12-5.373 12-12Z'/%3e%3cpath fill='white' d='M9.014 17.824 5.04 18.959l1.135-3.973 2.368.47z'/%3e%3cpath fill='%23F7F9FC' d='M8.544 15.456 5.041 18.96l3.972-1.135z'/%3e%3cpath fill='%23E4E8EC' d='M6.467 18.552 5.45 17.533l-.41 1.427 1.426-.407Z'/%3e%3cpath fill='%23D2D6DC' d='m5.957 18.043-.916.916 1.426-.407z'/%3e%3cpath fill='%23FFD658' d='m15.828 5.331 2.837 2.837-9.651 9.652-2.838-2.837z'/%3e%3cpath fill='%23FFC326' d='m7.594 16.404 9.651-9.651 1.419 1.418-9.652 9.652z'/%3e%3cpath fill='%23FF5331' d='m18.312 8.525-2.837-2.838 1.123-1.123c.44-.44 1.154-.44 1.595 0l1.243 1.243c.44.44.44 1.154 0 1.594z'/%3e%3cpath fill='%23F44D2C' d='m18.816 5.186-1.921 1.92 1.418 1.419 1.124-1.124c.44-.44.44-1.154 0-1.594l-.622-.621Z'/%3e%3c/svg%3e";let W={author:K,edtior:K,expert:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3ccircle cx='12' cy='12' r='12' fill='%23FFCB37'/%3e%3ccircle cx='12' cy='12' r='10.5' fill='%23FE921D'/%3e%3cpath fill='white' d='M11.443 5.137a.6.6 0 0 1 1.114 0l1.436 3.577a.6.6 0 0 0 .516.375l3.846.26a.6.6 0 0 1 .344 1.06l-2.958 2.471a.6.6 0 0 0-.197.607l.94 3.738a.6.6 0 0 1-.9.655l-3.265-2.05a.6.6 0 0 0-.638 0l-3.265 2.05a.6.6 0 0 1-.9-.655l.94-3.738a.6.6 0 0 0-.198-.607L5.3 10.41a.6.6 0 0 1 .344-1.06l3.846-.26a.6.6 0 0 0 .517-.375z'/%3e%3c/svg%3e","fact-check":"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3e%3cpath fill='%2300C076' d='M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16'/%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='m11.946 5.466-5.28 4.8-2.4-2.182'/%3e%3c/svg%3e",medical:H},PopupExpert=({trackingCategory:e="Together",locale:t,isOpen:a=!0,onClose:n,enableAnimation:i=!0,expertId:o,overwriteProfileProps:l,avatarFallback:s=w.C.getAssetPath("avatar.jpg")})=>{let{t:c}=(0,h.u)(),[d,p]=(0,r.useState)(null),[m,u]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{if(a&&o&&String(null==d?void 0:d.user_id)!==String(o)){u(!0);try{p(null),(0,k.c)((0,k.o)(T.D9.GET_EXPERT_BY_ID,{id:o}),"get").then(e=>{p(Object.assign(Object.assign({},null==e?void 0:e.data),l))})}catch(e){console.error(e)}u(!1)}},[a,o,null==d?void 0:d.user_id]),r.createElement(r.Fragment,null,r.createElement(U,{"data-open":a,"data-animation":i,onClick:e=>e.stopPropagation()},m||!d?r.createElement(P.L,null):r.createElement("div",{className:"popup-content"},r.createElement("div",{className:"close-button",onClick:n},r.createElement("img",{src:Z,style:{width:20,height:20},alt:"close-icon",loading:"lazy"})),r.createElement("div",{className:"main-info"},r.createElement("div",{className:"border-banner"}),r.createElement("div",{className:"avatar-title"},r.createElement(G,null,r.createElement("div",{className:"image-container"},r.createElement("div",{style:{position:"relative"}},r.createElement(E.I,{src:null==d?void 0:d.avatar,className:"profile-image",alt:"avatar",backupSrc:s}),r.createElement("img",{className:"badge-avatar",src:W[null==d?void 0:d.role],alt:"badge",loading:"lazy"})))),r.createElement(q,null,r.createElement($.T,{size:"s3",className:"full-name",weight:"semiBold"},null==d?void 0:d.display_name),r.createElement("div",null,r.createElement($.T,{size:"p4",color:z.r.colors.gray800},null==d?void 0:d.specialty," • "),r.createElement("a",{href:null==d?void 0:d.organisation_url,className:"organisation",target:"_blank",rel:"noreferrer"},r.createElement($.T,{size:"p4",className:"organisation",color:z.r.colors.gray800,style:{textDecoration:"underline"}},null==d?void 0:d.organisation)))))),r.createElement(q,null,r.createElement("div",{className:"experience"},r.createElement($.T,{weight:"bold",size:"p4",color:z.r.colors.gray800,style:{paddingBottom:16}},c("expert.content.description").toUpperCase()),r.createElement("div",{className:"list-items"},null!=d&&!!d.experiences&&d.experiences.filter(e=>!!(e&&(e.title||e.organization))).slice(0,3).map((e,t)=>r.createElement(X,{key:t},r.createElement("img",{className:"bullet-point",src:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3ccircle cx='12' cy='12' r='2' fill='%232D87F3'/%3e%3c/svg%3e",alt:"point",loading:"lazy"}),r.createElement("div",{className:"text-contain"},r.createElement(S.H,{tag:"h6",color:z.r.colors.gray800},null==e?void 0:e.title),r.createElement($.T,{size:"p2",color:z.r.colors.gray500},null==e?void 0:e.organization))))),r.createElement("a",{href:null==d?void 0:d.profile_url,style:{display:"inline-block",paddingTop:24}},r.createElement($.T,{as:"span",size:"s4",color:"#2D87F3","data-event-category":e,"data-event-action":"See Full Doctor Profile","data-event-label":(0,k.k)(t)+(null==d?void 0:d.profile_url)},c("home.seeExpert"))))))),r.createElement(V,{"data-open":a,onClick:e=>{e.stopPropagation(),n()}}))},Y=N.Z.div` position: fixed; left: 50%; width: 343px; background-color: ${z.r.colors.white}; border-radius: ${z.r.borderRadius}; box-shadow: 0px 0px 4px ${z.r.colors.gray200}; transform: translate(-50%, -50%); transition: all 0.5s ease-in-out; ${v.M.tdUp} { width: 750px; } &[data-animation='true'] { transition: all 0.5s ease-in-out; } &[data-open='true'] { z-index: 400; top: 50%; opacity: 1; visibility: visible; } &[data-open='false'] { top: -50%; } .popup-content { ${v.M.mbDown} { display: block; } display: flex; position: relative; z-index: 111; height: 100%; .button-see-more { margin: 32px 0; padding: 0; > * { display: inline-block; } } .close-button { position: absolute; z-index: 100; top: 10px; right: 10px; cursor: pointer; width: unset; height: unset; img { width: 100%; height: 100%; border-radius: 50%; } } } .main-info { padding-bottom: 32px; background-color: ${z.r.colors.primary50}; border-radius: ${z.r.borderRadius}; .btn-booking { display: flex; margin: 12px auto; } .avatar-title { position: relative; width: 100%; padding-top: 46px; text-align: center; } } `,J=N.Z.div` position: fixed; z-index: 110; top: 0; left: 0; width: 100%; height: 100%; align-items: center; background: rgba(38, 38, 38, 0.3); &[data-open='false'] { display: none; } `,Q=N.Z.div` .image-container { .badge-avatar { position: absolute; right: 0; bottom: 0; top: 0; } } display: flex; justify-content: center; padding-bottom: 15px; text-align: center; .profile-image { width: 100px; min-width: 100px; height: 100px; min-height: 100px; border-radius: 50%; object-fit: cover; } .badge-avatar { width: 24px; height: 24px; } `,ee=N.Z.div` position: relative; z-index: 9; .specialty { display: block; min-width: 240px; } padding: 0px 16px; text-align: center; .specialty { justify-content: center; } .experience { padding: 16px 0px 32px; text-align: left; .btn-wrapper { margin-top: 24px; } } p { max-width: 100%; } `,PopupHospital=({isOpen:e=!0,onClose:t,enableAnimation:a=!0,hospitalId:n,locale:i,isMobile:o,overwriteProfileProps:l,avatarFallback:s=w.C.getAssetPath("avatar.jpg"),trackingCategory:c="Together"})=>{let{t:d}=(0,h.u)(),[p,m]=(0,r.useState)(null),[u,g]=(0,r.useState)(!1);(0,r.useEffect)(()=>{if(e&&n&&String(null==p?void 0:p.id)!==String(n)){g(!0);try{m(null),(0,k.c)((0,k.g)(T.tC.GET_HOSPITAL_INFO,{hospital_branch_id:n,website_url:k.l[i]}),"get").then(e=>{m(Object.assign(Object.assign({},null==e?void 0:e._data.branch),l))})}catch(e){console.error(e)}g(!1)}},[e,n,null==p?void 0:p.id]);let v=(null==p?void 0:p.specialties)||[],f=(0,r.useMemo)(()=>v.map(e=>e.name),[v]);return r.createElement(r.Fragment,null,r.createElement(Y,{"data-open":e,"data-animation":a,onClick:e=>e.stopPropagation()},u||!p?r.createElement(P.L,null):r.createElement("div",{className:"popup-content"},r.createElement("div",{className:"close-button",onClick:t},r.createElement("img",{src:Z,style:{width:20,height:20},alt:"close-icon",loading:"lazy"})),r.createElement("div",{className:"main-info"},r.createElement("div",{className:"border-banner"}),r.createElement("div",{className:"avatar-title"},r.createElement(Q,null,r.createElement("div",{className:"image-container"},r.createElement("div",{style:{position:"relative"}},r.createElement(E.I,{src:null==p?void 0:p.logo,className:"profile-image",alt:"avatar",backupSrc:s}),r.createElement("img",{className:"badge-avatar",src:H,alt:"badge",loading:"lazy"})))),r.createElement(ee,null,r.createElement($.T,{size:"s3",weight:"semiBold",className:"full-name"},null==p?void 0:p.name),r.createElement("div",{className:"specialty"},v&&r.createElement($.T,{size:"p4",color:z.r.colors.gray800},f.join(" • "),"•"),r.createElement("a",{href:(0,k.m)({id:p.id,name:p.name,slug:p.slug,locale:i}),className:"organisation",target:"_blank",rel:"noreferrer"},r.createElement($.T,{size:"p4",className:"organisation",color:z.r.colors.gray800,style:{textDecoration:"underline"}},null==p?void 0:p.name))))),!o&&r.createElement("a",{href:(0,k.m)({id:p.id,name:p.name,slug:p.slug,locale:i})},r.createElement("div",{className:"btn-wrapper"},r.createElement(C.B,{color:"primary",size:"md",className:"btn-booking"},d("careBooking.bookAnAppointment"))))),r.createElement(ee,null,r.createElement("div",{className:"experience"},r.createElement($.T,{weight:"bold",size:"s3",color:z.r.colors.gray800,style:{paddingBottom:16}},d("hospital.content.description").toUpperCase()),r.createElement($.T,{size:"p2",color:z.r.colors.gray500},p.about),o?r.createElement("a",{href:(0,k.m)({id:p.id,name:p.name,slug:p.slug,locale:i})},r.createElement("div",{className:"btn-wrapper"},r.createElement(C.B,{color:"primary",size:"md",className:"btn-booking"},d("careBooking.bookAnAppointment")))):r.createElement("a",{href:(0,k.m)({id:p.id,name:p.name,slug:p.slug,locale:i})},r.createElement($.T,{size:"s4",color:"#2D87F3",as:"span","data-event-category":c,"data-event-action":"See Full Hospital Profile","data-event-label":(0,k.k)(i)+(0,k.m)({id:p.id,name:p.name,slug:p.slug,locale:i})},d("home.seeHospital"))))))),r.createElement(J,{"data-open":e,onClick:e=>{e.stopPropagation(),t()}}))},ProfileDetailModal=({open:e,onClose:t,children:a,profileModalProps:n})=>{let{t:i}=(0,h.u)();return r.createElement(M.M,Object.assign({title:i("profilePanel.modal.heading"),titleProps:!0,className:"_2UKyiK1",opened:e,onClose:t,overlayOpacity:.2,overflow:"inside",transitionProps:{transition:"slide-left"},styles:{header:{borderBottom:0},inner:{padding:0,justifyContent:"flex-end"},modal:{height:"100%",borderRadius:0},body:{maxHeight:"100%"},content:{maxHeight:"100%",height:"100%",borderRadius:0}}},n),a)};m().extend(g());let CardAuthor=e=>{let{className:t="",community:o,name:p,username:m,url:u,avatar:g,role:b,title:y,userType:C="user",expertId:$,specialty:N,organisation:T,isMarryBaby:P,doctorId:S,hospitalId:M,hasQuickBooking:F,handleMakeAppointment:B,communityTrackingAttr:j,isAnonymous:_,showDetailPopup:O,showChatbotButton:R=!1,subLine:L,authActionWrapper:Z,profileProps:H,profileModalProps:U,extendEle:V,avatarProps:G,hideInfo:q,timeText:X,onCloseFromPost:K,onChatWithBot:W,avatarIcon:Y,badgeIconSize:J,hideBackground:Q,children:ee,styles:et,dataEventCategory:ea,dataEventAction:er,dataEventLabel:en}=e,{data:{locale:ei,router:eo,env:{isMarryBaby:el,togetherBasePath:es}}}=(0,r.useContext)(k.T),{isMobile:ec}=(0,E.u)(),{t:ed}=(0,h.u)(),{classes:ep}=D(void 0,{name:"CardAuthor",styles:et}),em="boolean"==typeof P?P:el,eu=em?"marryBaby":"helloSites",eg=_?ed("cardPost.anonymous"):p||m||"",eh=_?w.C.getAssetPath("avatar.jpg"):g,ev=_?void 0:b,[ef,ex]=(0,r.useState)(!1),{asPath:eb}=eo||{},ey=`https://${A.v[ei]}${eb}`,onAuthorClick=()=>{if(_)return!1;O?ew(!0):u&&(window.location.href=u)};(0,r.useEffect)(()=>{(0,v.t)(ef)},[ef]);let[eE,ew]=(0,r.useState)(!1),ek=(null==e?void 0:e.role)==="expert",eC=!!(S||M),e$=["expert"===ev&&T&&r.createElement("span",null,T),"expert"===ev&&N&&r.createElement("span",null,N),!("expert"===ev&&N&&T)&&(null==o?void 0:o.name)&&r.createElement("a",Object.assign({href:(null==o?void 0:o.slug)&&o.isActive&&!o.isHidden?`${es}/${null==o?void 0:o.slug}/`:void 0,className:"author-community-name"},j),`${null==o?void 0:o.name}`),X&&r.createElement("span",null,X)].filter(Boolean),[ez,eN]=(0,r.useState)(null);return(0,r.useEffect)(()=>{eE&&!ez&&("chatbot"===C?Promise.all([a.e(5231),a.e(7797),a.e(5454),a.e(106),a.e(3684),a.e(5349),a.e(4148),a.e(2509),a.e(1533),a.e(1108),a.e(9124),a.e(4190),a.e(4447),a.e(3586),a.e(8674),a.e(9301),a.e(2432),a.e(7730),a.e(7515),a.e(7280),a.e(1661),a.e(2900),a.e(137),a.e(4414),a.e(7613),a.e(8098),a.e(3416),a.e(2500),a.e(1570),a.e(3506),a.e(1413)]).then(a.bind(a,"qH0b")).then(e=>{eN(()=>e.ProfileChatbot)}):Promise.all([a.e(9409),a.e(6259),a.e(1818),a.e(7519),a.e(761),a.e(2189),a.e(5231),a.e(7797),a.e(5454),a.e(106),a.e(3684),a.e(5349),a.e(4148),a.e(2509),a.e(1533),a.e(1108),a.e(9124),a.e(4190),a.e(4447),a.e(3586),a.e(8674),a.e(9301),a.e(2432),a.e(7730),a.e(7515),a.e(7280),a.e(1661),a.e(2900),a.e(137),a.e(4414),a.e(7613),a.e(8098),a.e(3416),a.e(2500),a.e(1570),a.e(3506),a.e(1413)]).then(a.bind(a,"aUqw")).then(e=>{eN(()=>e.ProfileDetail)}))},[eE,C]),r.createElement(I.Provider,{value:{displayName:eg,title:y,role:ev,siteType:eu,handleMakeAppointment:B,doctorId:S,hospitalId:M,currentUrl:ey}},r.createElement(ProfileDetailModal,{open:eE,onClose:()=>ew(!1),profileModalProps:U},ez&&r.createElement(ez,Object.assign({currentPageUrl:en,authActionWrapper:Z,onCloseFromPost:()=>{ew(!1),null==K||K()},onChatWithBot:W},H,{authorProps:Object.assign({userId:null==e?void 0:e.userId,avatar:eh,name:null==e?void 0:e.name,role:null==e?void 0:e.role,title:null==e?void 0:e.title,doctorId:S,hospitalId:M,hasQuickBooking:F,userType:C},null==H?void 0:H.authorProps)}))),"expert"===ev&&$?r.createElement(PopupExpert,{isOpen:ef,onClose:()=>ex(!1),expertId:$}):null,"expert"===ev&&S?r.createElement(PopupDoctor,{isOpen:ef,onClose:()=>ex(!1),doctorId:S,locale:ei}):null,"expert"===ev&&M?r.createElement(PopupHospital,{isOpen:ef,onClose:()=>ex(!1),hospitalId:M,locale:ei}):null,r.createElement("div",{className:`hhg-card-author ${ep.root} ${t} ${ek?"expert-author":""}`,"data-background":!Q&&ek,"data-is-marrybaby":em},r.createElement(CardAuthor$1,{dataEventCategory:ea,dataEventAction:er,dataEventLabel:en,onAvatarClick:onAuthorClick,avatarProps:Object.assign(Object.assign({avatar:_?w.C.getAssetPath(em?"anomyous-avatar-1.svg":"anomyous-avatar.svg"):eh,username:eg},G),{style:{cursor:!_&&(u||O)?"pointer":"default"}}),avatarIcon:Y||ek&&r.createElement(n.Z,{size:J||15})},ee?r.createElement("div",{onClick:onAuthorClick},ee):!q&&r.createElement(CardAuthor$1.Row,null,r.createElement(CardAuthor$1.ColLeft,null,r.createElement(s.k,{align:"center",onClick:onAuthorClick},r.createElement(CardAuthor$1.MainText,{onClick:onAuthorClick},eg,"chatbot"===C?r.createElement(r.Fragment,null," ",r.createElement(i.Z,{color:z.r.colors.primaryBase,size:16,style:{display:"inline-block",transform:"translate(0, 2px)"}}),R&&r.createElement("div",{style:{marginTop:"8px"}},r.createElement(c.z,{color:"primary",size:"xs",variant:"filled",type:"button",leftIcon:r.createElement(x.I.App,{size:16}),onClick:()=>{null==W||W()}},ed("chatbot.with.me")))):r.createElement(AuthorBadgeItem,null))),L||r.createElement(CardAuthor$1.SubTextRow,{style:F?{position:"relative"}:{}},e$.map((e,t)=>r.createElement(r.Fragment,null,0!==t&&r.createElement(CardAuthor$1.SubDivider,null),r.createElement(CardAuthor$1.SubText,null,e))),F&&eC&&r.createElement(l.x,{sx:{marginTop:(0,d.h)(5)}},r.createElement(f.B,{bookingId:S||M,bookingType:S?"doctor":M?"hospital":void 0,size:ec?"xs":"sm"})))))),V&&V))};CardAuthor.MainText=CardAuthor$1.MainText,CardAuthor.SubText=CardAuthor$1.SubText,CardAuthor.SubTextRow=CardAuthor$1.SubTextRow,CardAuthor.SubDivider=CardAuthor$1.SubDivider,CardAuthor.AuthorBadge=AuthorBadgeItem,CardAuthor.DisplayName=()=>{let{displayName:e}=(0,r.useContext)(I);return r.createElement(l.x,null,e)}},"1H8c":function(e,t,a){a.d(t,{L:function(){return Loading}});var r=a("q1tI"),n=a("CqtA"),i=a("lk1G"),o=a("AeFk"),l=a("rBCA"),s=a("iBNF");let c=l.Z.div` display: flex; align-items: center; justify-content: center; padding: 1em; button { position: relative; } `,d=o.F4` 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } `;l.Z.div` display: flex; width: fit-content; width: -moz-fit-content; flex-direction: column; align-items: center; justify-content: center; padding: 1rem 2rem; background: white; border-radius: ${s.r.borderRadius}; box-shadow: -1px 1px 2px rgba(67, 70, 74, 0.0001), -2px 2px 5px rgba(67, 86, 100, 0.123689); .loading-spinner { width: 24px; height: 24px; margin-bottom: 0.5rem; animation: ${d} 1.2s linear infinite; } &[data-is-marrybaby='true'] { box-shadow: none; } `;let Loading=({className:e,size:t="md"})=>{let{t:a}=(0,i.u)();return r.createElement(c,{className:e},r.createElement(n.B,{size:t,color:"transparent",isLoading:!0},a("loading")))}}}]);