"use strict";(self.webpackChunkhhgDiscoverV1=self.webpackChunkhhgDiscoverV1||[]).push([[3186],{ZI5f:function(e,t,r){r.d(t,{A:function(){return Avatar},D:function(){return DistanceTag},I:function(){return IconWrapper},P:function(){return Pin3},S:function(){return ShapedArrowDown}});var a=r("+OUp"),o=r.n(a),l=r("rBCA"),i=r("iBNF"),n=r("RBzE"),s=r("uzh1");let Pin3=e=>a.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 12 12",fill:"none"},e),a.createElement("g",{clipPath:"url(#clip0_5371_10640)"},a.createElement("path",{d:"M6.6665 4.3335L8.1665 5.8335L6.6665 7.3335",stroke:"#8C8C8C",strokeWidth:.72,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M8.16667 5.8335H5.83333C5.09667 5.8335 4.5 6.43016 4.5 7.16683V7.50016",stroke:"#8C8C8C",strokeWidth:.72,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M6.94331 10.3902L10.3907 6.94281C10.9114 6.42211 10.9114 5.57789 10.3907 5.05719L6.94331 1.60981C6.42261 1.08911 5.57839 1.08911 5.05769 1.60981L1.61031 5.05719C1.08961 5.57789 1.08961 6.42211 1.61031 6.94281L5.05769 10.3902C5.57839 10.9109 6.42261 10.9109 6.94331 10.3902Z",stroke:"#8C8C8C",strokeWidth:.72,strokeLinecap:"round",strokeLinejoin:"round"})),a.createElement("defs",null,a.createElement("clipPath",{id:"clip0_5371_10640"},a.createElement("rect",{width:12,height:12,fill:"white"})))),ShapedArrowDown=e=>a.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"none"},e),a.createElement("path",{d:"M13.5554 9.33398L7.99989 5.55621L2.44434 9.33398",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"})),c=l.A.div` background-color: var(--background-color, transparent); color: white; cursor: pointer; img { --width: var(--width-prop, 40px); --height: var(--height-prop, 40px); width: var(--width); height: var(--height); } &[data-has-max='true'] { img { max-width: var(--width); max-height: var(--height); } } &[data-avatar-type='square'] { img { --width: var(--width-prop, 72px); --height: var(--height-prop, 72px); border-radius: ${i.w.borderRadius}; } } &[data-avatar-type='rounded'] { img { border-radius: 50%; } } &[data-custom-size='true'] { display: flex; overflow: hidden; overflow: hidden; width: var(--size); height: var(--size); align-items: center; justify-content: center; background-size: cover; font-size: calc(var(--size) / 2); font-weight: bold; &[data-avatar-type='square'] { border-radius: ${i.w.borderRadius}; } &[data-avatar-type='rounded'] { border-radius: 50%; img { --width: 100%; --height: 100%; } } img { object-fit: cover; } } `,d={xs:28,small:32,medium:40,large:48,xl:64,xxl:80,xxxl:96},Avatar=({type:e="square",size:t,avatarImg:r,avatarUrl:l,firstLetter:i,backgroundColor:s,onClick:p,style:u,className:g,width:m,height:h,alt:f})=>{let v=t?d[t]:void 0,[w,x]=(0,a.useState)(!1);(0,a.useEffect)(()=>{if(l){let e=document.createElement("img");e.setAttribute("src",l),e.addEventListener("error",()=>{x(!0)})}},[l,x]);let b=(!l&&!r||w)&&i;return o().createElement(c,{style:Object.assign(Object.assign({},u),{"--size":v?v+"px":void 0,"--width-prop":m?m+"px":void 0,"--height-prop":h?h+"px":void 0,"--background-color":s}),"data-has-max":!!(m&&h),"data-avatar-type":e,onClick:p,className:g,avatarUrl:l,"data-custom-size":!!t},r,l&&!w&&o().createElement(n.I,{src:l,alt:f||"avatar"}),b&&i)},p=l.A.div` display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; color: ${i.w.colors.red700}; border-radius: 8px; border: 1px solid ${i.w.colors.neutral100}; font-size: 0.6875rem; line-height: 1rem; border-radius: 0.5rem; `,u=(0,l.A)(Pin3)` width: 0.75rem; height: 0.75rem; color: ${i.w.colors.gray400}; `;function DistanceTag({value:e,className:t}){return o().createElement(p,{className:t},o().createElement(u,null),o().createElement(s.T,{size:"p3",weight:"regular",color:i.w.colors.gray400},e))}let g=l.A.div` display: inline-flex; align-items: center; justify-content: center; flex-grow: 0; flex-shrink: 0; width: calc(var(--wrapper-size, var(--icon-size)) * 1px); height: calc(var(--wrapper-size, var(--icon-size)) * 1px); &[data-clickable='true'] { cursor: pointer; } > * { width: calc(var(--icon-size) * 1px); height: calc(var(--icon-size) * 1px); } &[data-svg-custom-stroke='true'] > svg * { stroke: var(--icon-stroke-color); } &[data-svg-custom-fill='true'] > svg * { fill: var(--icon-fill-color); } `,IconWrapper=({children:e,className:t,onClick:r,wrapperSize:a,iconSize:l=24,wrapperStyle:i,iconStyle:n,svgIcon:s,wrapperProps:c})=>o().createElement(g,Object.assign({className:t,onClick:r,style:Object.assign(Object.assign(Object.assign(Object.assign({},a&&{"--wrapper-size":a}),l&&{"--icon-size":l}),s&&Object.assign(Object.assign({},s.fill&&{"--icon-fill-color":s.fill}),s.stroke&&{"--icon-stroke-color":s.stroke})),i),"data-clickable":!!r,"data-svg-custom-stroke":!!(null==s?void 0:s.stroke),"data-svg-custom-fill":!!(null==s?void 0:s.fill)},c),o().cloneElement(e,{style:n}))},"0q2u":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 _},e:function(){return J},f:function(){return l},g:function(){return i}});var a,o,l,i,n=r("+OUp"),s=r.n(n),c=r("uzh1"),d=r("rBCA"),p=r("iBNF"),u=r("CL9C"),g=r("vH4S"),m=r("Iblh"),h=r("ZI5f"),f=r("aHnw"),v=r("vEfc"),w=r("+YhV"),x=r("gEnE"),b=r("yVya"),y=r("U+Ez"),k=r("uJ2t"),E=r("sFNn"),C=r("AJQa");let Upload=e=>n.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 18 18",fill:"none"},e),n.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:o,closeIcon:l,className:i,description:n})=>s().createElement("div",{className:`CHw-fZZ ${i||""}`,style:e,"data-alert-type":a},s().createElement("div",{className:"_03U6VRS"},s().createElement("div",{className:"icon-title"},o,s().createElement(c.T,{weight:"bold",size:"label1"},r)),s().createElement(c.T,{weight:"regular",size:"p3"},n)),s().createElement("div",{className:"EO828Vv",onClick:t},l)),renderNotificationStyles=(e,t,r,a)=>{let o,l="";if("numeric"===e)switch(t){case"medium":l=` height: 16px; font-size: 11px; padding: 1px 6px; `;case"large":l=` height: 24px; font-size: 13px; padding: 1px 10px; `}let i="";r&&(i=` position: absolute; top: 0; left: 75%; `),r&&(o=` left: 70%; ${"large"===t?` top: -7px; `:"medium"===t?` top: -2px; width: 16px; height: 16px; `:""} `);let n="";switch(a){case"primary":n=` background: ${p.w.colors.primary50}; color: ${p.w.colors.primary600}; `;break;case"error":n=` background: ${p.w.colors.error}; color: white; `}switch(e){case"dot":return` ${i} width: 8px; height: 8px; font-size: 0px; border-radius: 50%; ${n} `;case"numeric":return` ${i} width: max-content; border-radius: 32px; ${l} ${o} ${n} `}},$=d.A.div` position: relative; > div { width: max-content; position: relative; } span { font-weight: ${p.w.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:o,className:l})=>s().createElement($,{"data-notification-type":t,"data-notification-size":r,"data-notification-color":a,"data-has-icon":!!o||void 0,notificationType:t,notificationSize:r,notificationColor:a,hasIcon:!!o,className:l},s().createElement("div",null,e&&s().createElement("span",null,e)," ",o&&s().createElement("div",null,o))),z=d.A.h4` position: relative; line-height: 18px; &:after { position: absolute; top: 1px; left: 0; width: 4px; height: 18px; background-color: ${p.w.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: ${p.w.sizes.fwBold}; } &[data-type='semiBold'] { font-weight: ${p.w.sizes.fwSemiBold}; } &[data-uppercase] { text-transform: uppercase; } ${u.M.mbDown} { &[data-size='lg'] { font-size: 16px; } } `,BorderHeading=({style:e,children:t,className:r,size:a="lg",type:o="bold",upperCase:l,as:i="h4",color:n})=>s().createElement(z,{style:Object.assign({color:n},e),className:r,"data-size":a,"data-type":o,"data-uppercase":l,as:i},t),A=(0,d.A)(h.S)` flex-shrink: 0; color: ${p.w.colors.neutral800}; width: 16px; height: 16px; transition: transform 0.2s ease-in-out; transform: rotate(-180deg); &[data-is-collapsed='true'] { transform: rotate(0deg); } `,L=d.A.div` background-color: white; .icon { width: 20px; height: 20px; flex-shrink: 0; color: ${p.w.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:o=!0,id:l,className:i,as:n="h2"}){let[d,{toggle:p}]=(0,m.j)(a);return s().createElement(L,{id:l,className:i},s().createElement("div",{className:"box-collapse",onClick:()=>{o&&p()}},o&&r,s().createElement(c.T,{as:n,className:"title-collapse"},t),o&&s().createElement(A,{"data-is-collapsed":d})),s().createElement(g.Collapse,{in:!o||d,transitionDuration:200,transitionTimingFunction:"ease"},e))}let S=d.A.div` position: relative; box-sizing: border-box; border: 1px solid ${p.w.colors.gray200}; background: url('../../../public/bgSvg/arrow-down.svg') no-repeat; background-position: right 16px center; border-radius: ${p.w.borderRadius}; &[data-has-icons='true'] { border: none; background: ${p.w.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 ${p.w.colors.primary200}; } `,j=d.A.div` padding: 12px 18px 12px 16px; cursor: pointer; &[data-dropdown-open] { padding: 11px 15px 11px 15px; border: 1px solid ${p.w.colors.primaryBase}; border-radius: ${p.w.borderRadius}; box-shadow: 0 0 2px 2px ${p.w.colors.primary200}; } & > svg { height: 16px; width: 16px; } `,I=d.A.ul` position: absolute; top: 100%; right: 0; left: 0; display: block; margin-top: 4px; background: ${p.w.colors.white}; border-radius: ${p.w.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 ${p.w.colors.gray200}; filter: drop-shadow(0px 10px 16px rgba(0, 0, 0, 0.04)); } `,M=d.A.li` margin: 8px; padding: 12px 18px 12px 16px; border-radius: ${p.w.borderRadius}; display: flex; &:hover, :active { background: ${p.w.colors.gray100}; } `,N=d.A.div` display: flex; align-items: center; margin-right: 8px; & > svg { height: 16px; width: 16px; } `,ShareIconPathStyle=()=>s().createElement("style",null,".file-dropdown-path{fill:none;stroke:#595959;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.5px}"),DefaultFileIcon=()=>s().createElement("svg",{id:"prefix__Layer_1","data-name":"Layer 1",viewBox:"0 0 12.17 14.83"},s().createElement("defs",null,s().createElement("clipPath",{id:"prefix__clip-path",transform:"translate(-1.92 -1.54)"},s().createElement("path",{fill:"none",d:"M0 .96h16v16H0z"}))),s().createElement("title",null,"File"),s().createElement("g",{clipPath:"url(#prefix__clip-path)"},s().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)"}),s().createElement("path",{className:"file-dropdown-path",d:"M8.67 2.29V7h4.66",transform:"translate(-1.92 -1.54)"}))),DownloadIcon=()=>s().createElement("svg",{id:"prefix__Layer_1","data-name":"Layer 1",viewBox:"0 0 13.5 13.5"},s().createElement("title",null,"download"),s().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=()=>s().createElement("svg",{id:"prefix__Layer_1","data-name":"Layer 1",viewBox:"0 0 13.5 13.5"},s().createElement("title",null,"upload"),s().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:o,placeholderIcon:l,placeholder:i,style:c})=>{let[d,p]=(0,n.useState)(!1),showDropdown=()=>p(!d),u=(0,n.useRef)(r.map(e=>"upload"===e.type&&s().createElement("input",{id:"uploader-dropdown-input-"+o+"-"+e.value,key:"uploader-dropdown-input-"+o+"-"+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 s().createElement(S,{className:e,"data-dropdown-open":!!d,id:o,"data-has-icons":!0,style:c,onBlur:()=>p(!1),tabIndex:0},s().createElement(ShareIconPathStyle,null),s().createElement(j,{onClick:showDropdown},l||s().createElement(DefaultFileIcon,null)," ",s().createElement("span",null,t&&t.value?t.label:i)),d&&s().createElement(I,{onClick:showDropdown,"data-has-icons":!0},r.map(e=>s().createElement(M,{key:`${o}-${e.value}`,"data-selected":t&&t.value===e.value||void 0,onClick:()=>"upload"===e.type?onUpload("#uploader-dropdown-input-"+o+"-"+e.value):onDownload(e.url)},s().createElement(N,null,e.icon||"download"===e.type?s().createElement(DownloadIcon,null):s().createElement(UploadIcon,null)),e.label))),s().createElement(s().Fragment,null,u.current))},O=d.A.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); ${u.M.tdUp} { grid-template-columns: var(--columns-desktop); } > * { justify-self: var(--justify-children); } `,Grid=({className:e,columns:t,columnsDesktop:r,gridTemplateColumns:a,gridTemplateColumnsDesktop:o,gap:l,children:i,justifyChildren:n,style:c,alignItems:d})=>s().createElement(O,{className:e,style:Object.assign({"--columns-count":t,"--columns-count-desktop":r,"--grid-template-columns":a,"--grid-template-columns-desktop":o,"--justify-children":n,"--grid-gap":l,"--align-items":d},c)},i),Radio=({size:e="small",label:t,name:r,checked:a,value:o,className:l,isDisabled:i=!1,onChange:n,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 s().createElement(f.R,Object.assign({size:"small"===e?"md":"lg",label:t,name:r,checked:a,value:o,className:l,disabled:i,onChange:e=>null==n?void 0:n(e.target.value)},g))},B=d.A.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=>s().createElement("svg",Object.assign({},e,{viewBox:"0 0 24 24",fill:"none"}),s().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"}),s().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.a)(e,["isFull"]);return s().createElement("svg",Object.assign({},r,{viewBox:"0 0 32 32",fill:"none"}),s().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:o,hideEmptyStars:l,style:i,className:c})=>{let d=Math.floor(r),p=r-d>=.5?1:0,[u,g]=(0,n.useState)(null),m=u||d,h=u?0:p;return s().createElement(B,{"data-selectable":!!o,style:Object.assign({"--gap":e,"--star-size":t},i),className:c},Array.from({length:l?d+p:a}).map((e,t)=>{let onMouseOver=()=>!!o&&g(t+1),onMouseLeave=()=>!!o&&g(null);return t+1<=m?s().createElement(StarIcon,{key:t,onClick:()=>null==o?void 0:o(t+1),onMouseOver:onMouseOver,onMouseLeave:onMouseLeave,isFull:!0}):t+1===m+h?s().createElement(StarHalfIcon,{key:t,onClick:()=>null==o?void 0:o(t+1),onMouseOver:onMouseOver,onMouseLeave:onMouseLeave}):s().createElement(StarIcon,{key:t,onClick:()=>null==o?void 0:o(t+1),onMouseOver:onMouseOver,onMouseLeave:onMouseLeave})}))},getTag=(e,t)=>{switch(e){case"yellow":{let e=t?p.w.colors.yellow50:p.w.colors.yellow600;return` background: ${e}; p { color: var( --text-props-color, ${p.w.colors.gray800} ); } `}case"standard":return` background: ${p.w.colors.white}; border: 1px solid ${p.w.colors.gray200}; p { color: var( --text-props-color, ${p.w.colors.gray800} ); } &:hover { background: ${p.w.colors.gray100}; } `;case"red":{let e=t?p.w.colors.red50:p.w.colors.red500;return` background: ${e}; `}case"green":{let e=t?p.w.colors.green50:p.w.colors.green500;return` background: ${e}; `}case"blue":{let e=t?p.w.colors.primary50:p.w.colors.primaryBase;return` background: ${e}; `}case"teal":{let e=t?p.w.colors.teal100:p.w.colors.teal600;return` background: ${e}; `}case"pink":{let e=t?p.w.colors.pink200:p.w.colors.pink800;return` background: ${e}; `}case"violet":{let e=t?p.w.colors.violet100:p.w.colors.violet500;return` background: ${e}; `}case"grey":{let e=t?p.w.colors.gray100:p.w.colors.gray600;return` background: ${e}; `}}},D=d.A.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 ${p.w.colors.accentLight}; padding: 0; margin-left: calc(var(--offset-size) * -1); p { font-weight: ${p.w.sizes.fwBold}; color: var( --text-props-color, ${p.w.colors.secondaryDark} ); font-size: 11px; margin-left: calc(var(--offset-size) * -1); } &::after { width: calc(var(--offset-size) * 2); height: var(--offset-size); background: ${p.w.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, ${p.w.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: ${p.w.colors.primary50}; } `,Tag=({type:e,children:t,style:r,isInline:a,isSquared:o=!1,className:l,isLight:i,hasMorePadding:n,isLink:c,isSelected:d,textProps:p={size:"sm"}})=>{let u=p.color?{"--text-props-color":p.color}:{};return s().createElement(D,{"data-is-squared":o||void 0,"data-tag-type":e,"data-is-light":i||void 0,"data-has-more-padding":n||void 0,"data-is-inline":a||void 0,style:Object.assign(Object.assign({},r),u),className:l,"data-is-selected":d||void 0,"data-is-link":c||void 0,tagType:e,isInline:a,tagHasMorePadding:n,tagIsLight:i,tagIsSquared:o,tagIsALink:c},s().createElement(w.T,Object.assign({},p),t))},F="24px",T=(0,x.s)(d.A.span` position: relative; display: block; width: 40px; height: ${F}; 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"),P=d.A.span` padding-left: 15px; `,R=d.A.div` height: ${F}; input[type='checkbox'] { width: 0; height: 0; visibility: hidden; } label { cursor: pointer; display: inline-flex; color: ${p.w.colors.gray600}; } input:checked + label ${T.classSelector} { background: ${p.w.colors.primaryBase}; &:after { left: calc(100% - 2px); transform: translateX(-100%); } } `,Toggle=({className:e,id:t,onChange:r,checked:a,style:o,label:l})=>s().createElement(R,{className:e,style:o},s().createElement("input",{type:"checkbox",id:t,onChange:r,checked:a}),s().createElement("label",{htmlFor:t},s().createElement(T,null),l&&s().createElement(P,null,l))),_=(0,n.createContext)({currentStep:0,setCurrentStep:()=>!1,setMaxStep:()=>!1,nextStep:()=>!1,prevStep:()=>!1}),StepRenderer=({children:e,onStepChange:t})=>{let[r,a]=(0,n.useState)(0),[o,l]=(0,n.useState)(0),i=s().Children.count(e);return(0,n.useEffect)(()=>{l(i-1)},[i]),(0,n.useEffect)(()=>{null==t||t(r)},[r]),s().createElement(_.Provider,{value:{currentStep:r,setCurrentStep:a,setMaxStep:l,nextStep:()=>r+1<=o&&a(r+1),prevStep:()=>r-1>=0&&a(r-1)}},(0,b.A)(e).map((e,t)=>{let a=t===r;return s().createElement(n.Fragment,{key:t},s().isValidElement(e)?e.props.alwaysRender||a?s().cloneElement(e,{isActive:t===r,stepIndex:t}):null:a?e:null)}))},H=d.A.div` display: flex; align-items: center; gap: 8px; `,U=(0,d.A)(y.H)` font-weight: var(--fwBold); `,IconHeading=({icon:e,title:t,className:r,style:a})=>s().createElement(H,{className:r,style:a},e,s().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 r=sanitizeHtml(e);return s().createElement("div",{className:t,dangerouslySetInnerHTML:{__html:r}})};(a=l||(l={})).ONE_TO_ONE="1:1",a.THREE_TO_ONE="3:1",(o=i||(i={})).PNG=".png",o.JPG=".jpg",o.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._)(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=d.A.div` display: flex; flex-direction: column; .image-upload-input-error { margin-top: ${(0,g.rem)(12)}; display: flex; flex-direction: column; gap: ${(0,g.rem)(4)}; } `,G=d.A.div` display: flex; flex-direction: column; gap: ${(0,g.rem)(4)}; margin-top: ${(0,g.rem)(4)}; span { color: ${p.w.colors.neutral500}; } `,q=d.A.div` position: relative; width: fit-content; padding: ${(0,g.rem)(8)} ${(0,g.rem)(12)}; border-radius: ${(0,g.rem)(12)}; border: ${(0,g.rem)(1)} solid ${p.w.colors.neutral200}; cursor: pointer; display: flex; align-items: center; gap: ${(0,g.rem)(8)}; margin-top: ${(0,g.rem)(18)}; &.image-upload-dragover { border-color: ${p.w.colors.primaryBase}; } &.image-upload-error { border-color: ${p.w.colors.error}; } &.image-upload-disabled { cursor: not-allowed; background-color: ${p.w.colors.gray100}; color: ${p.w.colors.gray400}; border-color: ${p.w.colors.gray200}; } svg { width: ${(0,g.rem)(18)}; height: ${(0,g.rem)(18)}; } input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: -1; } `,Z=d.A.div` position: relative; width: ${(0,g.rem)(90)}; height: ${(0,g.rem)(90)}; border-radius: ${(0,g.rem)(12)}; overflow: hidden; background-color: ${p.w.colors.gray100}; display: flex; align-items: center; justify-content: center; img { width: 100%; height: 100%; object-fit: contain; } svg { width: ${(0,g.rem)(14)}; height: ${(0,g.rem)(14)}; color: ${p.w.colors.white}; } .image-upload-remove-button { cursor: pointer; position: absolute; top: ${(0,g.rem)(6)}; right: ${(0,g.rem)(6)}; background: ${p.w.colors.black}; border-radius: ${(0,g.rem)(12)}; padding: ${(0,g.rem)(2)}; display: flex; &:hover { opacity: 0.8; } } `,W=d.A.div` display: flex; gap: ${(0,g.rem)(8)}; margin-top: ${(0,g.rem)(18)}; `,J=(0,n.forwardRef)(({label:e,name:t,error:r,acceptedTypes:a=[i.PNG,i.JPG,i.JPEG],maxSize:o=1,acceptedRatios:l,multiple:d=!1,disabled:u=!1,id:m,className:h,onChange:f,value:w,showValidationRules:x=!1,description:b,useBase64:y=!1,placeholder:C},$)=>{let{t:z}=(0,E.u)(),[A,L]=(0,n.useState)(!1),[S,j]=(0,n.useState)([]),I=(0,n.useRef)(null),M=!!r||S.length>0,N=(0,n.useMemo)(()=>w?Array.isArray(w)?w:[w]:[],[w]),O=(0,n.useCallback)(e=>{var t;let r=[],l="."+(null===(t=e.name.split(".").pop())||void 0===t?void 0:t.toLowerCase());a.includes(l)||r.push(`Unsupported file format. Please upload a ${a.join(", ")} file.`);let i=e.size/1048576;return i>o&&r.push(`File too large. Please upload an image smaller than ${o}MB.`),{file:e,isValid:0===r.length,errors:r}},[a,o]),B=(0,n.useCallback)(e=>new Promise(t=>{if(!l||!l.length||!e.type.startsWith("image/")){t([]);return}let r=new Image;r.onload=()=>{let e=r.width/r.height,a=`${e.toFixed(1)}:1`,o=l.some(t=>{let[r,a]=t.split(":"),o=parseInt(r)/parseInt(a);return .1>Math.abs(e-o)});t(o?[]:[`Image ratio ${a} is not accepted.`])},r.onerror=()=>t(["Invalid image file"]),r.src=URL.createObjectURL(e)}),[l]),D=(0,n.useMemo)(()=>N.map(e=>"string"==typeof e?e:e instanceof File?URL.createObjectURL(e):"").filter(Boolean),[N]),F=(0,n.useCallback)(e=>(0,v._)(void 0,void 0,void 0,function*(){let r=Array.from(e),a=[],o=[];for(let e of r){let t=O(e),r=yield B(e),l=[...t.errors,...r];0===l.length?o.push(e):a.push(...l)}if(j(a),0===o.length)return;let l=y?yield handleMultipleImageFiles(o):o;f({target:{name:t,value:d?[...N,...l]:l.slice(0,1)}})}),[O,B,d,f,t,N]),removeFile=e=>{let r=N.filter((t,r)=>r!==e);j([]),f({target:{name:t,value:d?r:""}})},T=(0,n.useCallback)(e=>{I.current=e,"function"==typeof $?$(e):$&&($.current=e)},[$]),P=(0,n.useCallback)(()=>{!u&&I.current&&I.current.click()},[u]),R=(0,n.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),L(!0)},[]),_=(0,n.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),L(!1)},[]),H=(0,n.useCallback)(e=>{e.preventDefault(),e.stopPropagation()},[]),U=(0,n.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),L(!1);let t=e.dataTransfer.files;t.length>0&&F(t)},[F]);return s().createElement(V,{className:h},s().createElement("label",{htmlFor:m||t},"string"==typeof e?s().createElement(c.T,{size:"title2"},e):e,b&&s().createElement(c.T,{size:"p3",mt:(0,g.rem)(4),color:p.w.colors.gray700},b)),x&&s().createElement(G,null,s().createElement(c.T,{size:"p3"},"Formats: ",a.join("/")),l&&s().createElement(c.T,{size:"p3"},"Max size: ",o,"MB - Accepted ratios:"," ",l.join("/"))),(d||0===N.length)&&s().createElement(q,{className:(0,g.clsx)(A&&"image-upload-dragover",M&&"image-upload-error",u&&"image-upload-disabled"),onDragEnter:R,onDragLeave:_,onDragOver:H,onDrop:U,onClick:P},s().createElement("input",{ref:T,type:"file",id:m||t,name:t,accept:a.join(","),multiple:d,onChange:e=>{let t=e.target.files;t&&t.length>0&&F(t)},disabled:u}),s().createElement(Upload,null),s().createElement(c.T,{size:"p3",fw:500},C||z("common.btn.uploadPhoto"))),N.length>0&&s().createElement(W,null,D.map((e,t)=>s().createElement(Z,{key:t},s().createElement("img",{src:e,alt:`Uploaded file ${t+1}`,className:"image-upload-preview-image"}),s().createElement("button",{onClick:e=>{e.stopPropagation(),removeFile(t)},className:"image-upload-remove-button"},s().createElement(k.C,null))))),M&&s().createElement("div",{className:"image-upload-input-error"},[...S,r].map(e=>s().createElement(c.T,{key:e,className:"error-text",size:"c1",color:p.w.colors.red600},e))))}),Y=(0,d.A)(C.F)` & .mantine-Carousel-control { width: auto; } `,DragFreeCarousel=e=>{var{children:t,gapItem:r=8,slideSize:a="auto",withControls:o=!1,withIndicators:l=!1,dragFree:i=!0,align:n="start"}=e,c=(0,v.a)(e,["children","gapItem","slideSize","withControls","withIndicators","dragFree","align"]);return s().createElement(Y,Object.assign({slideSize:a,slideGap:r,withControls:o,withIndicators:l,dragFree:i,align:n,containScroll:"trimSnaps"},c),s().Children.map(t,(e,t)=>s().createElement(C.F.Slide,{key:t},e)))}}}]);