"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7730],{nVin:function(e,t,r){r.d(t,{T:function(){return TextDivider}});var a=r("q1tI"),i=r("rBCA"),o=r("sDBT"),n=r("rrs9");let l=i.Z.div` background-color: var(--neutral50); padding: 12px 0; box-shadow: inset 0px 1px 0px #e4e8ec; > * { display: grid; grid-template-columns: 32px 1fr; align-content: center; p { font-weight: 600; } } .icon-wrapper { display: flex; align-items: center; } `,TextDivider=({children:e,icon:t,className:r,style:i})=>a.createElement(l,{style:i,className:r},a.createElement(o.C,null,a.createElement("div",{className:"icon-wrapper"},t),a.createElement(n.T,{size:"c1",color:"var(--neutral800)"},e)))},rrs9:function(e,t,r){r.d(t,{T:function(){return d}});var a=r("LufY"),i=r("q1tI"),o=r("/npG"),n=r("8vDj"),l=r("TIp3"),s=r("5juI"),c=(0,o.k)((e,t)=>{var r,a,i,o,n,l,c,d,p,u;let g=s.a[null==t?void 0:t.customStylesType]||s.a[s.C.NONE],m=null===(r=g.fontSize[null==t?void 0:t.size])||void 0===r?void 0:r[0],h=null===(a=g.lineHeight[null==t?void 0:t.size])||void 0===a?void 0:a[0],E=null!==(n=null===(o=null===(i=g.letterSpacing)||void 0===i?void 0:i[null==t?void 0:t.size])||void 0===o?void 0:o[0])&&void 0!==n?n:0,f=null===(l=g.fontSize[null==t?void 0:t.size])||void 0===l?void 0:l[1],v=null===(c=g.lineHeight[null==t?void 0:t.size])||void 0===c?void 0:c[1],b=null!==(u=null===(p=null===(d=g.letterSpacing)||void 0===d?void 0:d[null==t?void 0:t.size])||void 0===p?void 0:p[1])&&void 0!==u?u:0;return{root:Object.assign({},(null==t?void 0:t.size)&&{fontWeight:(null==t?void 0:t.as)==="label"?s.F.semiBold:g.fontWeight[t.weight]||g.fontWeightBySize[null==t?void 0:t.size]||s.F.regular,fontSize:`${m}`,lineHeight:`${h}`,letterSpacing:E,[e.fn.smallerThan("sm")]:{fontSize:`${f}`,lineHeight:`${v}`,letterSpacing:b}})}});let d=(0,i.forwardRef)((e,t)=>{var r,{size:o,color:d,weight:p,as:u="p",styles:g,className:m,dataEventCategory:h,dataEventAction:E,dataEventLabel:f,variant:v}=e,b=(0,a._)(e,["size","color","weight","as","styles","className","dataEventCategory","dataEventAction","dataEventLabel","variant"]);let x=(0,n.rZ)(),T=(0,s.u)(),{classes:S,cx:w}=c({size:o,weight:"caption"===p?"bold":p,as:u,customStylesType:T},{name:"Text",styles:g}),_="string"==typeof x.colors[d]?x.colors[d]:d;return i.createElement(l.x,Object.assign({"data-size":o,className:w(S.root,m),color:_||("label"===u?x.colors.gray[6]:(null===(r=null==x?void 0:x.other)||void 0===r?void 0:r.template)==="mb"?x.colors.delftGray[7]:void 0)||("primary"===v?x.colors.gray[9]:"secondary"===v?x.colors.gray[7]:"tertiary"===v?x.colors.gray[4]:"disabled"===v?x.colors.gray[3]:"error"===v?x.colors.red[6]:"success"===v?x.colors.green[6]:void 0)||x.colors.gray[7],component:u,"data-event-category":h,"data-event-action":E,"data-event-label":f,classNames:{root:Object.assign(Object.assign({},b.wordWrap?{"word-wrap":b.wordWrap}:void 0),b.isUppercase||"caption"===p?{"text-transform":"uppercase"}:void 0)},ref:t},b))})},"Wae/":function(e,t,r){r.d(t,{C:function(){return CardLink}});var a=r("LufY"),i=r("q1tI"),o=r("8vDj"),n=r("h7+k"),l=r("rrs9"),s=r("Y8gQ"),c=r("rBCA"),d=r("IQVP"),p=r("aIjN");let u=c.Z.div` .link-info-container { padding: 0.5rem 1rem; background: ${e=>e.color||"#f4faff"}; } .link-image-wrapper { position: relative; overflow: hidden; width: 100%; padding-top: min(280px, 56.25%); .link-image-blur { position: absolute; top: 50%; left: 50%; width: 110%; height: 110%; /* Add the blur effect */ -webkit-filter: blur(8px); filter: blur(8px); object-fit: cover; object-position: center; opacity: 0.8; transform: translate(-50%, -50%); } .link-image { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; object-position: center; } } a { text-decoration: none; } &[data-is-marrybaby='true'] { overflow: hidden; border-radius: 1rem; .link-info-container { padding-bottom: 1rem; p { color: #2661ad; } .link-logo { max-width: 2rem; height: 13px; margin-right: 4px; object-fit: contain; vertical-align: middle; } } .link-image-wrapper { padding-top: min(360px, 56.25%); .link-image { object-fit: cover; } } } `,CardLink=({title:e,url:t,image:r,logo:c,className:g,style:m,noRefetch:h})=>{let{data:{locale:E,env:{isMarryBaby:f}}}=(0,i.useContext)(s.T),[v,b]=(0,i.useState)(!1),x=(0,o.rZ)(),T=(0,i.useRef)(h);T.current=h;let[S,w]=(0,i.useState)(null);(0,i.useEffect)(()=>{(0,a.a)(void 0,void 0,void 0,function*(){if(!T.current){if(!t)return w(null);w(e=>Object.assign(Object.assign({},e),{isFetching:!0})),(0,s.c)((0,s.e)(d.yy.FETCH_PREVIEW,{_locale:E}),"POST",{data:{link:t},headers:{"Content-Type":"application/json"}}).then(e=>{var r,a,i;b(!1),w({title:null===(r=null==e?void 0:e.data)||void 0===r?void 0:r.title,url:t,image:(null===(a=null==e?void 0:e.data)||void 0===a?void 0:a.image)||(null===(i=null==e?void 0:e.data)||void 0===i?void 0:i.logo)})}).catch(()=>{w(null)})}})},[t]);let _=(null==S?void 0:S.image)||r,I=(null==S?void 0:S.title)||e,y=(null==S?void 0:S.logo)||c,C=(null==S?void 0:S.url)||t,N=C.replace("http://","").replace("https://","").split(/[/?#]/),k=N[0],O=(0,i.useRef)(!1);return i.createElement(u,{"data-is-marrybaby":f,className:`${g} no-replace-click`,style:m,color:x.colors[x.primaryColor][0]},i.createElement("a",{href:C,target:"_blank",rel:"noreferrer"},_&&i.createElement("div",{className:"link-image-wrapper"},!f&&i.createElement("img",{className:"link-image-blur",src:_,onError:e=>{O.current||(O.current=!0,e.currentTarget.src=p.D)},loading:"lazy"}),i.createElement("img",{className:"link-image",src:_,onError:e=>{O.current||(O.current=!0,e.currentTarget.src=p.D)},loading:"lazy"})),i.createElement("div",{className:"link-info-container"},i.createElement(l.T,{size:"n1"},f&&y&&!v&&i.createElement("img",{className:"link-logo",src:y,onError:()=>b(!0),loading:"lazy"}),k),i.createElement(n.H,{tag:"h6"},I))))}},"/rwG":function(e,t,r){r.d(t,{M:function(){return MantineProvider}});var a=r("LufY"),i=r("q1tI"),o=r("8vDj"),n=r("xMoD"),l=r("5juI");let MantineProvider=e=>{var{children:t,locale:r,template:s="hb",isNotifications:c=!0,customStyleType:d=l.C.NONE}=e,p=(0,a._)(e,["children","locale","template","isNotifications","customStyleType"]);return(0,n.u)(r),i.createElement(o.Me,Object.assign({theme:(0,n.g)(r,s,d)},p),i.createElement(l.T,{variant:d},t,c&&i.createElement(n.N,null)))}},Ywcn:function(e,t,r){r.d(t,{C:function(){return m},I:function(){return ImagePreviewPopup},P:function(){return PostSingleImageViewPopup},a:function(){return PostImagePreview},b:function(){return h}});var a=r("q1tI"),i=r("h7+k"),o=r("kO4G"),n=r("J5bt"),l=r("Y8gQ"),s=r("t/pd"),c=r("rrs9"),d=r("rBCA"),p=r("LufY"),u=r("iBNF"),g=r("gEnE"),m="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='24' height='25' fill='none'%3e%3cpath stroke='%23262626' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='M10.05 18.06 4 12.038l6.05-6.025M4.002 12.035h15'/%3e%3c/svg%3e";let E=d.Z.div` padding: 14px 16px 14px 17px; background: ${e=>e.bgColor}; border-left: 3px solid ${e=>e.highlight}; ${o.M.mbUp} { padding: 12px 12px 12px 17px; } `,f=d.Z.div` display: flex; `,v=d.Z.div` font-size: 12px; line-height: 18px; &[data-has-icon='true'] { margin-left: 10px; } `,b=d.Z.div` flex-shrink: 0; `,x=d.Z.div` display: grid; grid-gap: 3px; grid-template-columns: 1fr 1fr; grid-template-rows: auto; .img-wrapper { position: relative; overflow: hidden; width: 100%; padding-top: 56.25%; grid-column: auto; & > img { cursor: zoom-in; } .img-preview-blur { position: absolute; top: 50%; left: 50%; width: 110%; height: 110%; /* Add the blur effect */ -webkit-filter: blur(8px); filter: blur(8px); object-fit: cover; object-position: center; opacity: 0.8; transform: translate(-50%, -50%); } .img-preview { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; object-position: center; } .img-more-overlay { position: absolute; top: 0; left: 0; display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.5); z-index: 4; } } &[data-image-count='1'] { .img-wrapper { /* padding-top: 100%; */ grid-column: 1/3; } } &[data-image-count='2'] { .img-wrapper { /* padding-top: 100%; */ } } &[data-image-count='3'] { .img-wrapper { &:first-child { grid-column: 1/3; } } } &[data-image-count='4'] { .img-wrapper { /* padding-top: 100%; */ } } &[data-image-count='5'] { grid-template-columns: repeat(6, 1fr); .img-wrapper { /* padding-top: 100%; */ grid-column: auto/ span 2; &:first-child { padding-top: 56.25%; grid-column: 1/4; } &:nth-child(2) { padding-top: 56.25%; grid-column: 4/7; } } } &[data-is-marrybaby='true'] { grid-gap: 8px; .img-wrapper { padding-top: 66.66%; border-radius: 1rem; .img-preview { object-fit: cover; } } &[data-image-count='3'] { grid-template-columns: 1fr 1fr 1fr; .img-wrapper { &:first-child { padding-top: 100%; grid-column: 1/3; grid-row: 1/3; } } } } `,T=d.Z.div` position: fixed; z-index: 999; top: 0; left: 0; display: flex; overflow: hidden; width: 100vw; height: 100vh; flex-direction: column; background: white; opacity: 0; pointer-events: none; transition: opacity 0.2s linear; &[data-open='true'] { opacity: 1; pointer-events: auto; } .top-bar { position: relative; padding: 20px 40px; .icon-arrow-left { position: absolute; top: 50%; left: 20px; height: 24px; width: 24px; cursor: pointer; transform: translateY(-50%); } } .container { flex: 1; overflow-y: auto; .img-preview { width: 100%; min-width: 100%; margin-bottom: 0.5rem; cursor: pointer; max-height: 100%; object-fit: cover; } } `,S=(0,d.Z)(e=>{var{icon:t,bgColor:r=u.r.colors.yellow50,highlightColor:i=u.r.colors.yellow800,message:o}=e,n=(0,p._)(e,["icon","bgColor","highlightColor","message"]);return a.createElement(E,Object.assign({bgColor:r,highlight:i},n),a.createElement(f,null,t&&a.createElement(b,null,t),a.createElement(v,{"data-has-icon":!!t},o)))})` margin-bottom: 16px; &.noti-bottom { border-left: none; margin-top: 4px; padding: 4px 8px; margin-left: 16px; margin-right: 16px; border-radius: 4px; } `,ImagePreviewPopup=({className:e,style:t,authorName:r,images:i,onClose:o,onOpenSingleView:l,alt:d})=>{let{t:p}=(0,n.u)(),[u,g]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{setTimeout(()=>{g(!0)},0)},[]),a.createElement(s.h,null,a.createElement(T,{className:e,style:t,"data-open":u},a.createElement("div",{className:"top-bar"},a.createElement("img",{className:"icon-arrow-left",src:h,onClick:o,alt:"go back",loading:"lazy"}),a.createElement(c.T,{size:"p2",weight:"bold",style:{textAlign:"center"}},p("previewPhotos.title",{name:r}))),a.createElement("div",{className:"container"},i.map((e,t)=>a.createElement("img",{className:"img-preview",key:t,src:e,onClick:()=>null==l?void 0:l(t),alt:d,loading:"lazy"})))),",")},w=d.Z.div` position: fixed; z-index: 999; top: 0; left: 0; display: flex; width: 100%; height: 100%; flex-direction: column; background: black; opacity: 0; pointer-events: none; transition: opacity 0.2s linear; &[data-open='true'] { opacity: 1; pointer-events: auto; } `,_=d.Z.div` padding: 1rem; background: white; .icon-close { width: 26px; height: 26px; cursor: pointer; } `,I=d.Z.div` position: relative; flex: 1; overflow: hidden; > img { height: 100%; width: 100%; object-fit: contain; object-position: center; } `,y=d.Z.div` --inner-padding: max(16px, 20%); height: 100%; position: absolute; left: 0; padding: 8px; padding-right: var(--inner-padding); display: flex; align-items: center; top: 0; cursor: pointer; &[data-right] { padding-right: 8px; padding-left: var(--inner-padding); left: unset; right: 0; } &[data-disabled='true'] { cursor: not-allowed; } `,C=d.Z.div` border-radius: 50%; background: rgba(0, 0, 0, 0.3); display: flex; align-items: center; justify-content: center; padding: 4px; > img { width: 16px; height: 16px; &[data-disabled='true'] { opacity: 0.5; } } ${o.M.tdUp} { padding: 8px; > img { width: 30px; height: 30px; } } `;var N="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='17' fill='none'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='m6 12.813 4-4-4-4'/%3e%3c/svg%3e";let PostSingleImageViewPopup=({initialViewIndex:e,images:t,onClose:r,alt:i})=>{let[o,n]=(0,a.useState)(e),[l,c]=(0,a.useState)(!1);(0,a.useEffect)(()=>{setTimeout(()=>{c(!0)},0)},[]);let d=null==t?void 0:t[o],p=0===o,u=!(null==t?void 0:t.length)||o===(null==t?void 0:t.length)-1;return a.createElement(s.h,null,a.createElement(w,{"data-open":l&&!!d},a.createElement(_,null,a.createElement("img",{src:m,className:"icon-close",onClick:r,alt:"close",loading:"lazy"})),d&&o>=0&&a.createElement(a.Fragment,null,a.createElement(I,null,a.createElement("img",{className:"img-preview",src:d,alt:i,loading:"lazy"}),a.createElement(y,{"data-disabled":p,onClick:()=>!p&&n(o-1)},a.createElement(C,null,a.createElement("img",{src:N,style:{transform:"rotate(180deg)"},alt:"left arrow","data-disabled":p,loading:"lazy"}))),a.createElement(y,{"data-right":!0,"data-disabled":u,onClick:()=>!u&&n(o+1)},a.createElement(C,null,a.createElement("img",{src:N,alt:"right arrow","data-disabled":u,loading:"lazy"})))))))},k=(0,g.Z)(d.Z.div` position: absolute; top: 0; right: 0; left: 0; bottom: 0; background: rgba(0, 0, 0, 0.4); color: white; display: flex; align-items: center; justify-content: center; cursor: pointer; `,"hhgcomp-sensitivemask-inner"),O=d.Z.div``,R=d.Z.div` position: absolute; bottom: 0; left: 0; width: 100%; height: 100%; z-index: 3; background: white; cursor: pointer; &, * { // transition: all 300ms; transform-origin: bottom left; } img { transition: none; } .img-preview { width: 100%; } &[data-is-blurred='true'] { .img-preview { /* Add the blur effect */ -webkit-filter: blur(24px); filter: blur(24px); } } &[data-is-blurred='false'] { background: transparent; cursor: zoom-in; ${k.classSelector} { top: auto; right: auto; left: 8px; bottom: 8px; background: rgba(0, 0, 0, 0); align-items: flex-end; justify-content: flex-start; } } `,SensitiveMask=({image:e,showIcon:t=!0})=>{let[r,i]=(0,a.useState)(!0);return a.createElement(R,{"data-is-blurred":r,onClick:e=>r&&e.stopPropagation()},a.createElement("img",{loading:"lazy",className:"img-preview",src:e}),a.createElement(k,{onClick:e=>{e.stopPropagation(),i(!r)}},t&&a.createElement(O,null,r?a.createElement("svg",{width:"22",height:"20",viewBox:"0 0 22 20",fill:"none"},a.createElement("path",{d:"M1.71 2.54a.996.996 0 0 1 0-1.41c.39-.39 1.03-.39 1.42 0l16.31 16.33a.996.996 0 1 1-1.41 1.41l-2.72-2.72c-1.34.52-2.79.82-4.31.82-5 0-9.27-3.11-11-7.5C.77 7.5 2.06 5.8 3.68 4.51zM16 9.47c0-2.76-2.24-5-5-5-.51 0-1 .1-1.47.24L7.36 2.54c1.15-.37 2.37-.57 3.64-.57 5 0 9.27 3.11 11 7.49-.69 1.76-1.79 3.3-3.18 4.53l-3.06-3.06c.14-.46.24-.95.24-1.46m-5 5c-2.76 0-5-2.24-5-5 0-.77.18-1.5.49-2.14L8.06 8.9c-.03.18-.06.37-.06.57 0 1.66 1.34 3 3 3 .2 0 .38-.03.57-.07l1.57 1.57c-.65.32-1.37.5-2.14.5m2.97-5.33a2.97 2.97 0 0 0-2.64-2.64z",fill:"#fff"})):a.createElement("svg",{width:"23",height:"16",viewBox:"0 0 23 16",fill:"none"},a.createElement("path",{d:"M12 0C5.142 0 1.886 5.879 1.096 7.557c-.132.28-.132.604 0 .884C1.886 10.121 5.142 16 12 16c6.834 0 10.092-5.837 10.896-7.54a1.08 1.08 0 0 0 0-.92C22.092 5.836 18.834 0 12 0m0 3a5 5 0 1 1-.001 10.001 5 5 0 0 1 0-10.001m0 2a3 3 0 1 0 0 6 3 3 0 0 0 0-6",fill:"#2D87F3"})))))},PostImagePreview=({className:e,images:t=[],style:r,authorName:s,isSensitive:c=!1,alt:d,positionAlert:p="top"})=>{let{data:{env:{isMarryBaby:u}}}=(0,a.useContext)(l.T),{t:g}=(0,n.u)(),m=`+ ${(t.length||0)-4}`,[h,E]=(0,a.useState)(!1),[f,v]=(0,a.useState)(-1),b=t.length>5,T=(0,a.useRef)(!1);return(0,a.useEffect)(()=>()=>{T.current&&(0,o.t)(!1)},[]),(0,a.useEffect)(()=>{h||f>=0?((0,o.t)(!0),T.current=!0):((0,o.t)(!1),T.current=!1)},[h,f]),a.createElement(a.Fragment,null,c&&"top"===p&&a.createElement(S,{message:g("sensitiveMask.contentWarningDescription"),icon:a.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none"},a.createElement("path",{d:"M9 .667A8.336 8.336 0 0 0 .667 9c0 4.6 3.733 8.333 8.333 8.333S17.333 13.6 17.333 9 13.6.667 9 .667m0 9.166A.836.836 0 0 1 8.167 9V5.667c0-.459.375-.834.833-.834s.833.375.833.834V9A.836.836 0 0 1 9 9.833M8.167 11.5v1.667h1.666V11.5z",fill:"#FE921D"}))}),a.createElement(x,{className:e,style:r,"data-image-count":b?5:t.length||0,"data-is-marrybaby":u,"data-cursor-pointer":!c},null==t?void 0:t.slice(0,5).map((e,t)=>{let r=4===t&&b;return a.createElement("div",{className:"img-wrapper",key:t,onClick:()=>{t>=4&&b?E(!0):v(t)}},c&&a.createElement(SensitiveMask,{image:e,showIcon:!r}),!u&&a.createElement("img",{loading:"lazy",className:"img-preview-blur",src:e,alt:d}),a.createElement("img",{loading:"lazy",className:"img-preview",src:e,alt:d}),r&&a.createElement("div",{className:"img-more-overlay"},a.createElement(i.H,{tag:"h1",as:"h2",color:"white"},m)))})),h&&a.createElement(ImagePreviewPopup,{authorName:s||"",images:t,onClose:()=>E(!1),onOpenSingleView:v,alt:d}),f>=0&&a.createElement(PostSingleImageViewPopup,{images:t,initialViewIndex:f,onClose:()=>v(-1),alt:d}),c&&"bottom"===p&&a.createElement(S,{message:g("sensitiveMask.contentWarningDescription.community"),className:"noti-bottom",icon:a.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none"},a.createElement("path",{d:"M9 .667A8.336 8.336 0 0 0 .667 9c0 4.6 3.733 8.333 8.333 8.333S17.333 13.6 17.333 9 13.6.667 9 .667m0 9.166A.836.836 0 0 1 8.167 9V5.667c0-.459.375-.834.833-.834s.833.375.833.834V9A.836.836 0 0 1 9 9.833M8.167 11.5v1.667h1.666V11.5z",fill:"#FE921D"}))}))}},JULU:function(e,t,r){r.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 H},e:function(){return X},f:function(){return o},g:function(){return n}});var a,i,o,n,l=r("q1tI"),s=r("rrs9"),c=r("rBCA"),d=r("iBNF"),p=r("kO4G"),u=r("4JiQ"),g=r("mYVa"),m=r("iuhU"),h=r("Iblh"),E=r("Zgz+"),f=r("9uQI"),v=r("LufY"),b=r("vaiB"),x=r("gEnE"),T=r("yVya"),S=r("h7+k"),w=r("j+Q9"),_=r("J5bt"),I=r("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:r,type:a,contentIcon:i,closeIcon:o,className:n,description:c})=>l.createElement("div",{className:`CHw-fZZ ${n||""}`,style:e,"data-alert-type":a},l.createElement("div",{className:"_03U6VRS"},l.createElement("div",{className:"icon-title"},i,l.createElement(s.T,{weight:"bold",size:"label1"},r)),l.createElement(s.T,{weight:"regular",size:"p3"},c)),l.createElement("div",{className:"EO828Vv",onClick:t},o)),renderNotificationStyles=(e,t,r,a)=>{let i,o="";if("numeric"===e)switch(t){case"medium":o=` height: 16px; font-size: 11px; padding: 1px 6px; `;case"large":o=` height: 24px; font-size: 13px; padding: 1px 10px; `}let n="";r&&(n=` position: absolute; top: 0; left: 75%; `),r&&(i=` left: 70%; ${"large"===t?` top: -7px; `:"medium"===t?` top: -2px; width: 16px; height: 16px; `:""} `);let l="";switch(a){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` ${n} width: 8px; height: 8px; font-size: 0px; border-radius: 50%; ${l} `;case"numeric":return` ${n} width: max-content; border-radius: 32px; ${o} ${i} ${l} `}},y=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:r="medium",color:a="primary",icon:i,className:o})=>l.createElement(y,{"data-notification-type":t,"data-notification-size":r,"data-notification-color":a,"data-has-icon":!!i||void 0,notificationType:t,notificationSize:r,notificationColor:a,hasIcon:!!i,className:o},l.createElement("div",null,e&&l.createElement("span",null,e)," ",i&&l.createElement("div",null,i))),C=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:r,size:a="lg",type:i="bold",upperCase:o,as:n="h4",color:s})=>l.createElement(C,{style:Object.assign({color:s},e),className:r,"data-size":a,"data-type":i,"data-uppercase":o,as:n},t),N=(0,c.Z)(E.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); } `,k=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:r,defaultOpened:a=!0,haveCollapse:i=!0,id:o,className:n,as:c="h2"}){let[d,{toggle:p}]=(0,h.q)(a);return l.createElement(k,{id:o,className:n},l.createElement("div",{className:"box-collapse",onClick:()=>{i&&p()}},i&&r,l.createElement(s.T,{as:c,className:"title-collapse"},t),i&&l.createElement(N,{"data-is-collapsed":d})),l.createElement(u.U,{in:!i||d,transitionDuration:200,transitionTimingFunction:"ease"},e))}let O=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}; } `,R=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; } `,U=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)); } `,M=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:r,onUploadSelected:a,id:i,placeholderIcon:o,placeholder:n,style:s})=>{let[c,d]=(0,l.useState)(!1),showDropdown=()=>d(!c),p=(0,l.useRef)(r.map(e=>"upload"===e.type&&l.createElement("input",{id:"uploader-dropdown-input-"+i+"-"+e.value,key:"uploader-dropdown-input-"+i+"-"+e.value,accept:e.fileAcceptedType,multiple:e.multiple,type:"file",style:{display:"none"},onChange:e=>{console.log("change"),a(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(O,{className:e,"data-dropdown-open":!!c,id:i,"data-has-icons":!0,style:s,onBlur:()=>d(!1),tabIndex:0},l.createElement(ShareIconPathStyle,null),l.createElement(R,{onClick:showDropdown},o||l.createElement(DefaultFileIcon,null)," ",l.createElement("span",null,t&&t.value?t.label:n)),c&&l.createElement(U,{onClick:showDropdown,"data-has-icons":!0},r.map(e=>l.createElement(M,{key:`${i}-${e.value}`,"data-selected":t&&t.value===e.value||void 0,onClick:()=>"upload"===e.type?onUpload("#uploader-dropdown-input-"+i+"-"+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))},A=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:r,gridTemplateColumns:a,gridTemplateColumnsDesktop:i,gap:o,children:n,justifyChildren:s,style:c,alignItems:d})=>l.createElement(A,{className:e,style:Object.assign({"--columns-count":t,"--columns-count-desktop":r,"--grid-template-columns":a,"--grid-template-columns-desktop":i,"--justify-children":s,"--grid-gap":o,"--align-items":d},c)},n),Radio=({size:e="small",label:t,name:r,checked:a,value:i,className:o,isDisabled:n=!1,onChange:s,dataEventCategory:c,dataEventAction:d,dataEventLabel:p})=>{let u=!!d&&!!c&&!!p,g=u?{"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:r,checked:a,value:i,className:o,disabled:n,onChange:e=>null==s?void 0:s(e.target.value)},g))},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,r=(0,v._)(e,["isFull"]);return l.createElement("svg",Object.assign({},r,{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:r,totalStars:a=5,onSelect:i,hideEmptyStars:o,style:n,className:s})=>{let c=Math.floor(r),d=r-c>=.5?1:0,[p,u]=(0,l.useState)(null),g=p||c,m=p?0:d;return l.createElement(D,{"data-selectable":!!i,style:Object.assign({"--gap":e,"--star-size":t},n),className:s},Array.from({length:o?c+d:a}).map((e,t)=>{let onMouseOver=()=>!!i&&u(t+1),onMouseLeave=()=>!!i&&u(null);return t+1<=g?l.createElement(StarIcon,{key:t,onClick:()=>null==i?void 0:i(t+1),onMouseOver:onMouseOver,onMouseLeave:onMouseLeave,isFull:!0}):t+1===g+m?l.createElement(StarHalfIcon,{key:t,onClick:()=>null==i?void 0:i(t+1),onMouseOver:onMouseOver,onMouseLeave:onMouseLeave}):l.createElement(StarIcon,{key:t,onClick:()=>null==i?void 0:i(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}; `}}},L=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:r,isInline:a,isSquared:i=!1,className:o,isLight:n,hasMorePadding:s,isLink:c,isSelected:d,textProps:p={size:"sm"}})=>{let u=p.color?{"--text-props-color":p.color}:{};return l.createElement(L,{"data-is-squared":i||void 0,"data-tag-type":e,"data-is-light":n||void 0,"data-has-more-padding":s||void 0,"data-is-inline":a||void 0,style:Object.assign(Object.assign({},r),u),className:o,"data-is-selected":d||void 0,"data-is-link":c||void 0,tagType:e,isInline:a,tagHasMorePadding:s,tagIsLight:n,tagIsSquared:i,tagIsALink:c},l.createElement(b.T,Object.assign({},p),t))},$="24px",P=(0,x.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"),z=c.Z.span` padding-left: 15px; `,j=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 ${P.classSelector} { background: ${d.r.colors.primaryBase}; &:after { left: calc(100% - 2px); transform: translateX(-100%); } } `,Toggle=({className:e,id:t,onChange:r,checked:a,style:i,label:o})=>l.createElement(j,{className:e,style:i},l.createElement("input",{type:"checkbox",id:t,onChange:r,checked:a}),l.createElement("label",{htmlFor:t},l.createElement(P,null),o&&l.createElement(z,null,o))),H=(0,l.createContext)({currentStep:0,setCurrentStep:()=>!1,setMaxStep:()=>!1,nextStep:()=>!1,prevStep:()=>!1}),StepRenderer=({children:e,onStepChange:t})=>{let[r,a]=(0,l.useState)(0),[i,o]=(0,l.useState)(0),n=l.Children.count(e);return(0,l.useEffect)(()=>{o(n-1)},[n]),(0,l.useEffect)(()=>{null==t||t(r)},[r]),l.createElement(H.Provider,{value:{currentStep:r,setCurrentStep:a,setMaxStep:o,nextStep:()=>r+1<=i&&a(r+1),prevStep:()=>r-1>=0&&a(r-1)}},(0,T.Z)(e).map((e,t)=>{let a=t===r;return l.createElement(l.Fragment,{key:t},l.isValidElement(e)?e.props.alwaysRender||a?l.cloneElement(e,{isActive:t===r,stepIndex:t}):null:a?e:null)}))},F=c.Z.div` display: flex; align-items: center; gap: 8px; `,G=(0,c.Z)(S.H)` font-weight: var(--fwBold); `,IconHeading=({icon:e,title:t,className:r,style:a})=>l.createElement(F,{className:r,style:a},e,l.createElement(G,{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 r=sanitizeHtml(e);return l.createElement("div",{className:t,dangerouslySetInnerHTML:{__html:r}})};(a=o||(o={})).ONE_TO_ONE="1:1",a.THREE_TO_ONE="3:1",(i=n||(n={})).PNG=".png",i.JPG=".jpg",i.JPEG=".jpeg";let getBase64=e=>new Promise((t,r)=>{let a=new FileReader;a.onload=()=>t(a.result),a.onerror=r,a.readAsDataURL(e)}),handleMultipleImageFiles=e=>(0,v.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}),Z=c.Z.div` display: flex; flex-direction: column; .image-upload-input-error { margin-top: ${(0,g.h)(12)}; display: flex; flex-direction: column; gap: ${(0,g.h)(4)}; } `,V=c.Z.div` display: flex; flex-direction: column; gap: ${(0,g.h)(4)}; margin-top: ${(0,g.h)(4)}; span { color: ${d.r.colors.neutral500}; } `,Y=c.Z.div` position: relative; width: fit-content; padding: ${(0,g.h)(8)} ${(0,g.h)(12)}; border-radius: ${(0,g.h)(12)}; border: ${(0,g.h)(1)} solid ${d.r.colors.neutral200}; cursor: pointer; display: flex; align-items: center; gap: ${(0,g.h)(8)}; margin-top: ${(0,g.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,g.h)(18)}; height: ${(0,g.h)(18)}; } input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: -1; } `,W=c.Z.div` position: relative; width: ${(0,g.h)(90)}; height: ${(0,g.h)(90)}; border-radius: ${(0,g.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,g.h)(14)}; height: ${(0,g.h)(14)}; color: ${d.r.colors.white}; } .image-upload-remove-button { cursor: pointer; position: absolute; top: ${(0,g.h)(6)}; right: ${(0,g.h)(6)}; background: ${d.r.colors.black}; border-radius: ${(0,g.h)(12)}; padding: ${(0,g.h)(2)}; display: flex; &:hover { opacity: 0.8; } } `,K=c.Z.div` display: flex; gap: ${(0,g.h)(8)}; margin-top: ${(0,g.h)(18)}; `,X=(0,l.forwardRef)(({label:e,name:t,error:r,acceptedTypes:a=[n.PNG,n.JPG,n.JPEG],maxSize:i=1,acceptedRatios:o,multiple:c=!1,disabled:p=!1,id:u,className:h,onChange:E,value:f,showValidationRules:b=!1,description:x,useBase64:T=!1,placeholder:S},I)=>{let{t:y}=(0,_.u)(),[C,N]=(0,l.useState)(!1),[k,O]=(0,l.useState)([]),R=(0,l.useRef)(null),U=!!r||k.length>0,M=(0,l.useMemo)(()=>f?Array.isArray(f)?f:[f]:[],[f]),B=(0,l.useCallback)(e=>{var t;let r=[],o="."+(null===(t=e.name.split(".").pop())||void 0===t?void 0:t.toLowerCase());a.includes(o)||r.push(`Unsupported file format. Please upload a ${a.join(", ")} file.`);let n=e.size/1048576;return n>i&&r.push(`File too large. Please upload an image smaller than ${i}MB.`),{file:e,isValid:0===r.length,errors:r}},[a,i]),A=(0,l.useCallback)(e=>new Promise(t=>{if(!o||!o.length||!e.type.startsWith("image/")){t([]);return}let r=new Image;r.onload=()=>{let e=r.width/r.height,a=`${e.toFixed(1)}:1`,i=o.some(t=>{let[r,a]=t.split(":"),i=parseInt(r)/parseInt(a);return .1>Math.abs(e-i)});t(i?[]:[`Image ratio ${a} is not accepted.`])},r.onerror=()=>t(["Invalid image file"]),r.src=URL.createObjectURL(e)}),[o]),D=(0,l.useMemo)(()=>M.map(e=>"string"==typeof e?e:e instanceof File?URL.createObjectURL(e):"").filter(Boolean),[M]),L=(0,l.useCallback)(e=>(0,v.a)(void 0,void 0,void 0,function*(){let r=Array.from(e),a=[],i=[];for(let e of r){let t=B(e),r=yield A(e),o=[...t.errors,...r];0===o.length?i.push(e):a.push(...o)}if(O(a),0===i.length)return;let o=T?yield handleMultipleImageFiles(i):i;E({target:{name:t,value:c?[...M,...o]:o.slice(0,1)}})}),[B,A,c,E,t,M]),removeFile=e=>{let r=M.filter((t,r)=>r!==e);O([]),E({target:{name:t,value:c?r:""}})},$=(0,l.useCallback)(e=>{R.current=e,"function"==typeof I?I(e):I&&(I.current=e)},[I]),P=(0,l.useCallback)(()=>{!p&&R.current&&R.current.click()},[p]),z=(0,l.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),N(!0)},[]),j=(0,l.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),N(!1)},[]),H=(0,l.useCallback)(e=>{e.preventDefault(),e.stopPropagation()},[]),F=(0,l.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),N(!1);let t=e.dataTransfer.files;t.length>0&&L(t)},[L]);return l.createElement(Z,{className:h},l.createElement("label",{htmlFor:u||t},"string"==typeof e?l.createElement(s.T,{size:"title2"},e):e,x&&l.createElement(s.T,{size:"p3",mt:(0,g.h)(4),color:d.r.colors.gray700},x)),b&&l.createElement(V,null,l.createElement(s.T,{size:"p3"},"Formats: ",a.join("/")),o&&l.createElement(s.T,{size:"p3"},"Max size: ",i,"MB - Accepted ratios:"," ",o.join("/"))),(c||0===M.length)&&l.createElement(Y,{className:(0,m.default)(C&&"image-upload-dragover",U&&"image-upload-error",p&&"image-upload-disabled"),onDragEnter:z,onDragLeave:j,onDragOver:H,onDrop:F,onClick:P},l.createElement("input",{ref:$,type:"file",id:u||t,name:t,accept:a.join(","),multiple:c,onChange:e=>{let t=e.target.files;t&&t.length>0&&L(t)},disabled:p}),l.createElement(Upload,null),l.createElement(s.T,{size:"p3",fw:500},S||y("common.btn.uploadPhoto"))),M.length>0&&l.createElement(K,null,D.map((e,t)=>l.createElement(W,{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(w.C,null))))),U&&l.createElement("div",{className:"image-upload-input-error"},[...k,r].map(e=>l.createElement(s.T,{key:e,className:"error-text",size:"c1",color:d.r.colors.red600},e))))}),q=(0,c.Z)(I.l)` & .mantine-Carousel-control { width: auto; } `,DragFreeCarousel=e=>{var{children:t,gapItem:r=8,slideSize:a="auto",withControls:i=!1,withIndicators:o=!1,dragFree:n=!0,align:s="start"}=e,c=(0,v._)(e,["children","gapItem","slideSize","withControls","withIndicators","dragFree","align"]);return l.createElement(q,Object.assign({slideSize:a,slideGap:r,withControls:i,withIndicators:o,dragFree:n,align:s,containScroll:"trimSnaps"},c),l.Children.map(t,(e,t)=>l.createElement(I.l.Slide,{key:t},e)))}},"dn/s":function(e,t,r){r.d(t,{B:function(){return E},C:function(){return U},E:function(){return O},F:function(){return k},G:function(){return h},N:function(){return S},S:function(){return y},V:function(){return I},a:function(){return f},c:function(){return x},d:function(){return T},e:function(){return N},f:function(){return w},g:function(){return _},h:function(){return R},i:function(){return M}});var a,i,o,n,l,s,c,d,p,u,g,m,h,E,f,v,b,x,T,S,w,_,I,y,C=r("gFo6");(a=h||(h={})).Boy="boy",a.Girl="girl",(i=E||(E={}))[i.Height=0]="Height",i[i.Weight=1]="Weight",i[i.Head=2]="Head",i[i.BMI=3]="BMI",(o=f||(f={}))[o.Weekly=0]="Weekly",o[o.Monthly=1]="Monthly",o[o.Yearly=2]="Yearly",(n=v||(v={}))[n.Height=0]="Height",n[n.Weight=1]="Weight",n[n.Head=2]="Head",n[n.BMI=3]="BMI",n[n.Record=4]="Record",(l=b||(b={}))[l.Phone=0]="Phone",l[l.OTP=1]="OTP",l[l.OTPEmail=2]="OTPEmail",l[l.PersonalInfo=3]="PersonalInfo",l[l.UpdatePassword=4]="UpdatePassword",l[l.Result=5]="Result",l[l.DynamicForm=6]="DynamicForm",(s=x||(x={}))[s.HEAD=0]="HEAD",s[s.TAIL=1]="TAIL",s[s.MIDDLE=2]="MIDDLE",s[s.CONNECT=3]="CONNECT",s[s.SSO=4]="SSO",s[s.MULTIPLE=5]="MULTIPLE",(c=T||(T={}))[c.UNDEFINED=-1]="UNDEFINED",c[c.TEXT=0]="TEXT",c[c.IMAGE=1]="IMAGE",c[c.FORM=2]="FORM",c[c.CONDITION=3]="CONDITION",c[c.POLL=4]="POLL",c[c.FINAL_STANDARD=5]="FINAL_STANDARD",c[c.FINAL=6]="FINAL",c[c.FINAL_THANK_YOU=7]="FINAL_THANK_YOU",c[c.RATING=8]="RATING",c[c.REACTION=9]="REACTION",c[c.REVIEW=10]="REVIEW",c[c.RESULT_POLL=11]="RESULT_POLL",c[c.RESULT_RATING=12]="RESULT_RATING",c[c.RESULT_REACTION=13]="RESULT_REACTION",c[c.OTP=14]="OTP";let N=[T.FINAL,T.FINAL_STANDARD,T.FINAL_THANK_YOU];(d=S||(S={})).BOT_TEXT="bot-text",d.BOT_IMAGE="bot-image",d.BOT_BACKGROUND_IMAGE="bot-background-image",d.BOT_BUTTON="bot-button",d.BOT_URL="bot-url",d.BOT_RECALCULATE="bot-recalculate",d.BOT_BOOKING="bot-booking",d.BOT_MAIN_TITLE="bot-main-title",d.BOT_MAIN_IMAGE="bot-main-image",d.BOT_MAIN_BODY="bot-main-body",d.BOT_MAIN_BUTTON="bot-main-button",d.BOT_SUB_TITLE="bot-sub-title",d.BOT_SUB_BODY="bot-sub-body",d.BOT_LANDING_PAGE_URL="bot-landing-page-url",d.BOT_LANDING_PAGE_BUTTON="bot-landing-page-button",d.BOT_RISK_SCREEN="bot-risk-screen",d.BOT_RELATED_ARTICLE="bot-related-article",d.THANK_YOU_IMAGE="thank-you-image",d.THANK_YOU_TITLE="thank-you-title",d.THANK_YOU_BODY="thank-you-body",d.TOTAL_LINE="total-line",d.BOT_SUBMISSION="bot-submission",d.BOT_EVENT_SUBMISSION="bot-event-submission",d.BOT_SUGGESTED_SERVICE="bot-suggested-service",d.SSO_INTENT="sso-intent",(p=w||(w={})).ACTION_CONDITION="action-condition",p.ACTION_INTERNAL="action-internal",p.ACTION_EXTERNAL="action-external",p.ACTION_SSO_REDIRECT="action-sso-redirect",p.ACTION_MULTIPLE_BUTTON="action-multiple-button",p.USER_CHOICE_TEXT="user-choice-text",p.USER_CHOICE_TEXT_BY_INPUT="user-choice-text-by-input",p.USER_CHOICE_NEXT="user-choice-next",p.USER_CHOICE_IMAGE="user-choice-image",p.USER_SUBMIT_TEXT="user-submit-text",p.USER_SUBMIT_NUMBER="user-submit-number",p.USER_SUBMIT_NAME="user-submit-name",p.USER_SUBMIT_PHONE="user-submit-phone",p.USER_SUBMIT_EMAIL="user-submit-email",p.USER_SUBMIT_DROPDOWN="user-submit-dropdown",p.USER_SUBMIT_DATE="user-submit-date",p.USER_SUBMIT_DOB="user-submit-dob",p.USER_SUBMIT_CONFIRM="user-submit-confirm",p.USER_SUBMIT_SEND="user-submit-send",p.USER_SUBMIT_RESEND="user-submit-resend",p.USER_SUBMIT_ADDRESS="user-submit-address",p.USER_SUBMIT_ADDRESS_PROVINCE="user-submit-address-province",p.USER_SUBMIT_ADDRESS_DISTRICT="user-submit-address-district",p.USER_SUBMIT_ADDRESS_COMMUNE="user-submit-address-commune",p.USER_SUBMIT_BMI="user-submit-bmi",p.USER_SUBMIT_BMI_HIDDEN="user-submit-bmi-hidden",p.USER_SUBMIT_TERMS="user-submit-terms",p.USER_SUBMIT_GENDER="user-submit-gender",p.USER_SUBMIT_OTP="user-submit-otp",p.USER_SUBMIT_WHATSAPP="user-submit-whatsapp",p.POLL_CHOICE="poll-choice",p.POLL_CHOICE_TEXT_BY_INPUT="poll-choice-text-by-input",p.POLL_CHOICE_IMAGE="poll-choice-image",p.POLL_BUTTON="poll-button",p.RATING_STAR="rating-star",p.RATING_DESCRIPTION="rating-description",p.RATING_BUTTON="rating-button",p.LIKE_CHOICE="like-choice",p.DISLIKE_CHOICE="dislike-choice",p.REVIEW_CHOICE="review-choice",p.REVIEW_DESCRIPTION="review-description",p.REVIEW_BUTTON="review-button",p.RESULT_BUTTON="result-button",p.POLL_RESULT="poll-result",p.USER_SUBMIT_GOOGLE_API_ADDRESS="user-submit-google-api-address";let k=[w.USER_SUBMIT_ADDRESS_PROVINCE,w.USER_SUBMIT_ADDRESS_DISTRICT,w.USER_SUBMIT_ADDRESS_COMMUNE,w.USER_SUBMIT_ADDRESS];(u=_||(_={}))[u.UNLIMITED=0]="UNLIMITED",u[u.EXACT_NUMBER=1]="EXACT_NUMBER",u[u.RANGE=2]="RANGE";let O={[w.USER_SUBMIT_EMAIL]:"email",[w.USER_SUBMIT_TEXT]:"text",[w.USER_SUBMIT_DROPDOWN]:"text",[w.USER_SUBMIT_NAME]:"name",[w.USER_SUBMIT_NUMBER]:"number",[w.USER_SUBMIT_ADDRESS]:"address",[w.USER_SUBMIT_PHONE]:"tel",[w.USER_SUBMIT_OTP]:"tel",[w.USER_SUBMIT_WHATSAPP]:"tel",[w.USER_SUBMIT_DATE]:"date",[w.USER_SUBMIT_CONFIRM]:"confirm",[w.USER_SUBMIT_SEND]:"submit",[w.USER_SUBMIT_TERMS]:"terms",[w.USER_SUBMIT_ADDRESS_PROVINCE]:"province",[w.USER_SUBMIT_ADDRESS_DISTRICT]:"district",[w.USER_SUBMIT_ADDRESS_COMMUNE]:"commune",[w.USER_SUBMIT_BMI]:"bmi",[w.USER_SUBMIT_GENDER]:"gender",[w.POLL_CHOICE]:"poll",[w.POLL_CHOICE_TEXT_BY_INPUT]:"poll",[w.POLL_CHOICE_IMAGE]:"poll",[w.RATING_STAR]:"rating",[w.RATING_DESCRIPTION]:"text",[w.LIKE_CHOICE]:"like",[w.DISLIKE_CHOICE]:"dislike",[w.REVIEW_CHOICE]:"review",[w.USER_SUBMIT_GOOGLE_API_ADDRESS]:"google-api-address",[w.USER_SUBMIT_DOB]:"dob"},R={FRU:"FRU",survey:"Survey",ristScreener:"risk_screener",voucherAcuvue:"ACUVUE"};(g=I||(I={})).VIDEO="video",g.SHORTS="short",g.PODCAST="podcast",g.LIVESTREAM="live-stream",(m=y||(y={})).Facebook="facebook",m.Zalo="zalo",m.Twitter="twitter",m.WhatsApp="whatsApp",m.Line="line",m.Instagram="instagram",m.LinkedIn="linkedin",m.Youtube="youtube",m.Tiktok="tiktok",m.Telegram="telegram",m.Viber="viber";let U={DD:{id:"common.day",defaultMessage:"Day"},MM:{id:"common.month",defaultMessage:"Month"},YYYY:{id:"common.year",defaultMessage:"Year"}};var M=Object.freeze({__proto__:null,get SocialType(){return y},COMMON_DATE_TRANSLATE_KEY:U,get Gender(){return h},get BabyGrowthChartType(){return E},get BabyGrowthChartDuration(){return f},get BabyGrowthResultTab(){return v},get LOCALE(){return C.L},get OnboardingStep(){return b},get NodePosition(){return x},get NodeType(){return T},NodeFinalTypes:N,get NodeIntentType(){return S},get NodeActionType(){return w},FULL_KEY_ADDRESS:k,get NodeMultipleOptions(){return _},ELEMENT_CONTROL_INPUT_TYPE:O,SubotType:R,get VideoType(){return I}})}}]);