@neurodyn/ai-try-on 0.0.3 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai-try-on.embed.min.js +20 -13
- package/dist/ai-try-on.global.min.js +20 -13
- package/package.json +2 -2
|
@@ -918,6 +918,10 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
918
918
|
height: auto;
|
|
919
919
|
}
|
|
920
920
|
|
|
921
|
+
.h-dvh {
|
|
922
|
+
height: 100dvh;
|
|
923
|
+
}
|
|
924
|
+
|
|
921
925
|
.h-full {
|
|
922
926
|
height: 100%;
|
|
923
927
|
}
|
|
@@ -926,10 +930,6 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
926
930
|
height: 1px;
|
|
927
931
|
}
|
|
928
932
|
|
|
929
|
-
.h-svh {
|
|
930
|
-
height: 100svh;
|
|
931
|
-
}
|
|
932
|
-
|
|
933
933
|
.max-h-\\(--radix-select-content-available-height\\) {
|
|
934
934
|
max-height: var(--radix-select-content-available-height);
|
|
935
935
|
}
|
|
@@ -938,12 +938,12 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
938
938
|
max-height: calc(var(--spacing) * 179);
|
|
939
939
|
}
|
|
940
940
|
|
|
941
|
-
.max-h-
|
|
942
|
-
max-height:
|
|
941
|
+
.max-h-dvh {
|
|
942
|
+
max-height: 100dvh;
|
|
943
943
|
}
|
|
944
944
|
|
|
945
|
-
.max-h-
|
|
946
|
-
max-height:
|
|
945
|
+
.max-h-none {
|
|
946
|
+
max-height: none;
|
|
947
947
|
}
|
|
948
948
|
|
|
949
949
|
.min-h-0 {
|
|
@@ -5478,13 +5478,20 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
5478
5478
|
font-style: normal;
|
|
5479
5479
|
font-display: swap;
|
|
5480
5480
|
}
|
|
5481
|
-
`,""]);let s=i.toString()},"../../node_modules/.pnpm/@rsbuild+core@1.7.1/node_modules/@rsbuild/core/compiled/css-loader/api.js"(e){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var r="",n=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),n&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),n&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r}).join("")},t.i=function(e,r,n,a,o){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(n)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(i[l]=!0)}for(var u=0;u<e.length;u++){var c=[].concat(e[u]);n&&i[c[0]]||(void 0!==o&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=o),r&&(c[2]&&(c[1]="@media ".concat(c[2]," {").concat(c[1],"}")),c[2]=r),a&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=a):c[4]="".concat(a)),t.push(c))}},t}},"../../node_modules/.pnpm/@rsbuild+core@1.7.1/node_modules/@rsbuild/core/compiled/css-loader/noSourceMaps.js"(e){e.exports=function(e){return e[1]}}},oK={};function oG(e){var t=oK[e];if(void 0!==t)return t.exports;var r=oK[e]={id:e,exports:{}};return oq[e](r,r.exports,oG),r.exports}function oX(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function oY(...e){return t=>{let r=!1,n=e.map(e=>{let n=oX(e,t);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let t=0;t<n.length;t++){let r=n[t];"function"==typeof r?r():oX(e[t],null)}}}}oG.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return oG.d(t,{a:t}),t},oG.d=(e,t)=>{for(var r in t)oG.o(t,r)&&!oG.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},oG.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var oQ=Symbol.for("react.lazy"),oZ=I[" use ".trim().toString()];function oJ(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===oQ&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var o0=((m=L.forwardRef((e,t)=>{let{children:r,...n}=e;if(oJ(r)&&"function"==typeof oZ&&(r=oZ(r._payload)),L.isValidElement(r)){var a;let e,o,i=(a=r,(o=(e=Object.getOwnPropertyDescriptor(a.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?a.ref:(o=(e=Object.getOwnPropertyDescriptor(a,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?a.props.ref:a.props.ref||a.ref),s=function(e,t){let r={...t};for(let n in t){let a=e[n],o=t[n];/^on[A-Z]/.test(n)?a&&o?r[n]=(...e)=>{let t=o(...e);return a(...e),t}:a&&(r[n]=a):"style"===n?r[n]={...a,...o}:"className"===n&&(r[n]=[a,o].filter(Boolean).join(" "))}return{...e,...r}}(n,r.props);return r.type!==L.Fragment&&(s.ref=t?oY(t,i):i),L.cloneElement(r,s)}return L.Children.count(r)>1?L.Children.only(null):null})).displayName="Slot.SlotClone",c=m,(d=L.forwardRef((e,t)=>{let{children:r,...n}=e;oJ(r)&&"function"==typeof oZ&&(r=oZ(r._payload));let a=L.Children.toArray(r),o=a.find(o2);if(o){let e=o.props.children,r=a.map(t=>t!==o?t:L.Children.count(e)>1?L.Children.only(null):L.isValidElement(e)?e.props.children:null);return(0,A.jsx)(c,{...n,ref:t,children:L.isValidElement(e)?L.cloneElement(e,void 0,r):null})}return(0,A.jsx)(c,{...n,ref:t,children:r})})).displayName="Slot.Slot",d),o1=Symbol("radix.slottable");function o2(e){return L.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===o1}function o3(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=function e(t){var r,n,a="";if("string"==typeof t||"number"==typeof t)a+=t;else if("object"==typeof t)if(Array.isArray(t)){var o=t.length;for(r=0;r<o;r++)t[r]&&(n=e(t[r]))&&(a&&(a+=" "),a+=n)}else for(n in t)t[n]&&(a&&(a+=" "),a+=n);return a}(e))&&(n&&(n+=" "),n+=t);return n}let o5=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),o9=[],o4=(e,t,r)=>{if(0==e.length-t)return r.classGroupId;let n=e[t],a=r.nextPart.get(n);if(a){let r=o4(e,t+1,a);if(r)return r}let o=r.validators;if(null===o)return;let i=0===t?e.join("-"):e.slice(t).join("-"),s=o.length;for(let e=0;e<s;e++){let t=o[e];if(t.validator(i))return t.classGroupId}},o6=(e,t)=>{let r=o5();for(let n in e)o8(e[n],r,n,t);return r},o8=(e,t,r,n)=>{let a=e.length;for(let o=0;o<a;o++)o7(e[o],t,r,n)},o7=(e,t,r,n)=>{"string"==typeof e?ie(e,t,r):"function"==typeof e?it(e,t,r,n):ir(e,t,r,n)},ie=(e,t,r)=>{(""===e?t:ia(t,e)).classGroupId=r},it=(e,t,r,n)=>{io(e)?o8(e(n),t,r,n):(null===t.validators&&(t.validators=[]),t.validators.push({classGroupId:r,validator:e}))},ir=(e,t,r,n)=>{let a=Object.entries(e),o=a.length;for(let e=0;e<o;e++){let[o,i]=a[e];o8(i,ia(t,o),r,n)}},ia=(e,t)=>{let r=e,n=t.split("-"),a=n.length;for(let e=0;e<a;e++){let t=n[e],a=r.nextPart.get(t);a||(a=o5(),r.nextPart.set(t,a)),r=a}return r},io=e=>"isThemeGetter"in e&&!0===e.isThemeGetter,ii=[],is=(e,t,r,n,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:a}),il=/\s+/,iu=e=>{let t;if("string"==typeof e)return e;let r="";for(let n=0;n<e.length;n++)e[n]&&(t=iu(e[n]))&&(r&&(r+=" "),r+=t);return r},ic=[],id=e=>{let t=t=>t[e]||ic;return t.isThemeGetter=!0,t},ip=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ih=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ig=/^\d+\/\d+$/,im=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,iv=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,iy=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ib=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,iw=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ik=e=>ig.test(e),ix=e=>!!e&&!Number.isNaN(Number(e)),iS=e=>!!e&&Number.isInteger(Number(e)),iC=e=>e.endsWith("%")&&ix(e.slice(0,-1)),iP=e=>im.test(e),iE=()=>!0,iT=e=>iv.test(e)&&!iy.test(e),iR=()=>!1,iO=e=>ib.test(e),ij=e=>iw.test(e),i_=e=>!iN(e)&&!iD(e),iz=e=>iq(e,iY,iR),iN=e=>ip.test(e),iA=e=>iq(e,iQ,iT),iL=e=>iq(e,iZ,ix),iI=e=>iq(e,iG,iR),iM=e=>iq(e,iX,ij),iF=e=>iq(e,i0,iO),iD=e=>ih.test(e),iB=e=>iK(e,iQ),i$=e=>iK(e,iJ),iV=e=>iK(e,iG),iU=e=>iK(e,iY),iH=e=>iK(e,iX),iW=e=>iK(e,i0,!0),iq=(e,t,r)=>{let n=ip.exec(e);return!!n&&(n[1]?t(n[1]):r(n[2]))},iK=(e,t,r=!1)=>{let n=ih.exec(e);return!!n&&(n[1]?t(n[1]):r)},iG=e=>"position"===e||"percentage"===e,iX=e=>"image"===e||"url"===e,iY=e=>"length"===e||"size"===e||"bg-size"===e,iQ=e=>"length"===e,iZ=e=>"number"===e,iJ=e=>"family-name"===e,i0=e=>"shadow"===e,i1=((e,...t)=>{let r,n,a,o,i=e=>{let t=n(e);if(t)return t;let o=((e,t)=>{let{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a,sortModifiers:o}=t,i=[],s=e.trim().split(il),l="";for(let e=s.length-1;e>=0;e-=1){let t=s[e],{isExternal:u,modifiers:c,hasImportantModifier:d,baseClassName:p,maybePostfixModifierPosition:h}=r(t);if(u){l=t+(l.length>0?" "+l:l);continue}let f=!!h,g=n(f?p.substring(0,h):p);if(!g){if(!f||!(g=n(p))){l=t+(l.length>0?" "+l:l);continue}f=!1}let m=0===c.length?"":1===c.length?c[0]:o(c).join(":"),v=d?m+"!":m,y=v+g;if(i.indexOf(y)>-1)continue;i.push(y);let b=a(g,f);for(let e=0;e<b.length;++e){let t=b[e];i.push(v+t)}l=t+(l.length>0?" "+l:l)}return l})(e,r);return a(e,o),o};return o=s=>{var l;let u;return n=(r={cache:(e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null),a=(a,o)=>{r[a]=o,++t>e&&(t=0,n=r,r=Object.create(null))};return{get(e){let t=r[e];return void 0!==t?t:void 0!==(t=n[e])?(a(e,t),t):void 0},set(e,t){e in r?r[e]=t:a(e,t)}}})((l=t.reduce((e,t)=>t(e),e())).cacheSize),parseClassName:(e=>{let{prefix:t,experimentalParseClassName:r}=e,n=e=>{let t,r=[],n=0,a=0,o=0,i=e.length;for(let s=0;s<i;s++){let i=e[s];if(0===n&&0===a){if(":"===i){r.push(e.slice(o,s)),o=s+1;continue}if("/"===i){t=s;continue}}"["===i?n++:"]"===i?n--:"("===i?a++:")"===i&&a--}let s=0===r.length?e:e.slice(o),l=s,u=!1;return s.endsWith("!")?(l=s.slice(0,-1),u=!0):s.startsWith("!")&&(l=s.slice(1),u=!0),is(r,u,l,t&&t>o?t-o:void 0)};if(t){let e=t+":",r=n;n=t=>t.startsWith(e)?r(t.slice(e.length)):is(ii,!1,t,void 0,!0)}if(r){let e=n;n=t=>r({className:t,parseClassName:e})}return n})(l),sortModifiers:(u=new Map,l.orderSensitiveModifiers.forEach((e,t)=>{u.set(e,1e6+t)}),e=>{let t=[],r=[];for(let n=0;n<e.length;n++){let a=e[n],o="["===a[0],i=u.has(a);o||i?(r.length>0&&(r.sort(),t.push(...r),r=[]),t.push(a)):r.push(a)}return r.length>0&&(r.sort(),t.push(...r)),t}),...(e=>{let t=(e=>{let{theme:t,classGroups:r}=e;return o6(r,t)})(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:e=>{if(e.startsWith("[")&&e.endsWith("]")){var r;let t,n,a;return -1===(r=e).slice(1,-1).indexOf(":")?void 0:(n=(t=r.slice(1,-1)).indexOf(":"),(a=t.slice(0,n))?"arbitrary.."+a:void 0)}let n=e.split("-"),a=+(""===n[0]&&n.length>1);return o4(n,a,t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=n[e],a=r[e];if(t){if(a){let e=Array(a.length+t.length);for(let t=0;t<a.length;t++)e[t]=a[t];for(let r=0;r<t.length;r++)e[a.length+r]=t[r];return e}return t}return a||o9}return r[e]||o9}}})(l)}).cache.get,a=r.cache.set,o=i,i(s)},(...e)=>o(((...e)=>{let t,r,n=0,a="";for(;n<e.length;)(t=e[n++])&&(r=iu(t))&&(a&&(a+=" "),a+=r);return a})(...e))})(()=>{let e=id("color"),t=id("font"),r=id("text"),n=id("font-weight"),a=id("tracking"),o=id("leading"),i=id("breakpoint"),s=id("container"),l=id("spacing"),u=id("radius"),c=id("shadow"),d=id("inset-shadow"),p=id("text-shadow"),h=id("drop-shadow"),f=id("blur"),g=id("perspective"),m=id("aspect"),v=id("ease"),y=id("animate"),b=()=>["auto","avoid","all","avoid-page","page","left","right","column"],w=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],k=()=>[...w(),iD,iN],x=()=>["auto","hidden","clip","visible","scroll"],S=()=>["auto","contain","none"],C=()=>[iD,iN,l],P=()=>[ik,"full","auto",...C()],E=()=>[iS,"none","subgrid",iD,iN],T=()=>["auto",{span:["full",iS,iD,iN]},iS,iD,iN],R=()=>[iS,"auto",iD,iN],O=()=>["auto","min","max","fr",iD,iN],j=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],_=()=>["start","end","center","stretch","center-safe","end-safe"],z=()=>["auto",...C()],N=()=>[ik,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],A=()=>[e,iD,iN],L=()=>[...w(),iV,iI,{position:[iD,iN]}],I=()=>["no-repeat",{repeat:["","x","y","space","round"]}],M=()=>["auto","cover","contain",iU,iz,{size:[iD,iN]}],F=()=>[iC,iB,iA],D=()=>["","none","full",u,iD,iN],B=()=>["",ix,iB,iA],$=()=>["solid","dashed","dotted","double"],V=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],U=()=>[ix,iC,iV,iI],H=()=>["","none",f,iD,iN],W=()=>["none",ix,iD,iN],q=()=>["none",ix,iD,iN],K=()=>[ix,iD,iN],G=()=>[ik,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[iP],breakpoint:[iP],color:[iE],container:[iP],"drop-shadow":[iP],ease:["in","out","in-out"],font:[i_],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[iP],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[iP],shadow:[iP],spacing:["px",ix],text:[iP],"text-shadow":[iP],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ik,iN,iD,m]}],container:["container"],columns:[{columns:[ix,iN,iD,s]}],"break-after":[{"break-after":b()}],"break-before":[{"break-before":b()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:k()}],overflow:[{overflow:x()}],"overflow-x":[{"overflow-x":x()}],"overflow-y":[{"overflow-y":x()}],overscroll:[{overscroll:S()}],"overscroll-x":[{"overscroll-x":S()}],"overscroll-y":[{"overscroll-y":S()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{start:P()}],end:[{end:P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[iS,"auto",iD,iN]}],basis:[{basis:[ik,"full","auto",s,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ix,ik,"auto","initial","none",iN]}],grow:[{grow:["",ix,iD,iN]}],shrink:[{shrink:["",ix,iD,iN]}],order:[{order:[iS,"first","last","none",iD,iN]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:T()}],"col-start":[{"col-start":R()}],"col-end":[{"col-end":R()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:T()}],"row-start":[{"row-start":R()}],"row-end":[{"row-end":R()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":O()}],"auto-rows":[{"auto-rows":O()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...j(),"normal"]}],"justify-items":[{"justify-items":[..._(),"normal"]}],"justify-self":[{"justify-self":["auto",..._()]}],"align-content":[{content:["normal",...j()]}],"align-items":[{items:[..._(),{baseline:["","last"]}]}],"align-self":[{self:["auto",..._(),{baseline:["","last"]}]}],"place-content":[{"place-content":j()}],"place-items":[{"place-items":[..._(),"baseline"]}],"place-self":[{"place-self":["auto",..._()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:z()}],mx:[{mx:z()}],my:[{my:z()}],ms:[{ms:z()}],me:[{me:z()}],mt:[{mt:z()}],mr:[{mr:z()}],mb:[{mb:z()}],ml:[{ml:z()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:N()}],w:[{w:[s,"screen",...N()]}],"min-w":[{"min-w":[s,"screen","none",...N()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[i]},...N()]}],h:[{h:["screen","lh",...N()]}],"min-h":[{"min-h":["screen","lh","none",...N()]}],"max-h":[{"max-h":["screen","lh",...N()]}],"font-size":[{text:["base",r,iB,iA]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,iD,iL]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",iC,iN]}],"font-family":[{font:[i$,iN,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,iD,iN]}],"line-clamp":[{"line-clamp":[ix,"none",iD,iL]}],leading:[{leading:[o,...C()]}],"list-image":[{"list-image":["none",iD,iN]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",iD,iN]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...$(),"wavy"]}],"text-decoration-thickness":[{decoration:[ix,"from-font","auto",iD,iA]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[ix,"auto",iD,iN]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",iD,iN]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",iD,iN]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:L()}],"bg-repeat":[{bg:I()}],"bg-size":[{bg:M()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},iS,iD,iN],radial:["",iD,iN],conic:[iS,iD,iN]},iH,iM]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:F()}],"gradient-via-pos":[{via:F()}],"gradient-to-pos":[{to:F()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:D()}],"rounded-s":[{"rounded-s":D()}],"rounded-e":[{"rounded-e":D()}],"rounded-t":[{"rounded-t":D()}],"rounded-r":[{"rounded-r":D()}],"rounded-b":[{"rounded-b":D()}],"rounded-l":[{"rounded-l":D()}],"rounded-ss":[{"rounded-ss":D()}],"rounded-se":[{"rounded-se":D()}],"rounded-ee":[{"rounded-ee":D()}],"rounded-es":[{"rounded-es":D()}],"rounded-tl":[{"rounded-tl":D()}],"rounded-tr":[{"rounded-tr":D()}],"rounded-br":[{"rounded-br":D()}],"rounded-bl":[{"rounded-bl":D()}],"border-w":[{border:B()}],"border-w-x":[{"border-x":B()}],"border-w-y":[{"border-y":B()}],"border-w-s":[{"border-s":B()}],"border-w-e":[{"border-e":B()}],"border-w-t":[{"border-t":B()}],"border-w-r":[{"border-r":B()}],"border-w-b":[{"border-b":B()}],"border-w-l":[{"border-l":B()}],"divide-x":[{"divide-x":B()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":B()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...$(),"hidden","none"]}],"divide-style":[{divide:[...$(),"hidden","none"]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...$(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ix,iD,iN]}],"outline-w":[{outline:["",ix,iB,iA]}],"outline-color":[{outline:A()}],shadow:[{shadow:["","none",c,iW,iF]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":["none",d,iW,iF]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[ix,iA]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":B()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":["none",p,iW,iF]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[ix,iD,iN]}],"mix-blend":[{"mix-blend":[...V(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":V()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ix]}],"mask-image-linear-from-pos":[{"mask-linear-from":U()}],"mask-image-linear-to-pos":[{"mask-linear-to":U()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":U()}],"mask-image-t-to-pos":[{"mask-t-to":U()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":U()}],"mask-image-r-to-pos":[{"mask-r-to":U()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":U()}],"mask-image-b-to-pos":[{"mask-b-to":U()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":U()}],"mask-image-l-to-pos":[{"mask-l-to":U()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":U()}],"mask-image-x-to-pos":[{"mask-x-to":U()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":U()}],"mask-image-y-to-pos":[{"mask-y-to":U()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[iD,iN]}],"mask-image-radial-from-pos":[{"mask-radial-from":U()}],"mask-image-radial-to-pos":[{"mask-radial-to":U()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":w()}],"mask-image-conic-pos":[{"mask-conic":[ix]}],"mask-image-conic-from-pos":[{"mask-conic-from":U()}],"mask-image-conic-to-pos":[{"mask-conic-to":U()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:I()}],"mask-size":[{mask:M()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",iD,iN]}],filter:[{filter:["","none",iD,iN]}],blur:[{blur:H()}],brightness:[{brightness:[ix,iD,iN]}],contrast:[{contrast:[ix,iD,iN]}],"drop-shadow":[{"drop-shadow":["","none",h,iW,iF]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:["",ix,iD,iN]}],"hue-rotate":[{"hue-rotate":[ix,iD,iN]}],invert:[{invert:["",ix,iD,iN]}],saturate:[{saturate:[ix,iD,iN]}],sepia:[{sepia:["",ix,iD,iN]}],"backdrop-filter":[{"backdrop-filter":["","none",iD,iN]}],"backdrop-blur":[{"backdrop-blur":H()}],"backdrop-brightness":[{"backdrop-brightness":[ix,iD,iN]}],"backdrop-contrast":[{"backdrop-contrast":[ix,iD,iN]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ix,iD,iN]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ix,iD,iN]}],"backdrop-invert":[{"backdrop-invert":["",ix,iD,iN]}],"backdrop-opacity":[{"backdrop-opacity":[ix,iD,iN]}],"backdrop-saturate":[{"backdrop-saturate":[ix,iD,iN]}],"backdrop-sepia":[{"backdrop-sepia":["",ix,iD,iN]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",iD,iN]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ix,"initial",iD,iN]}],ease:[{ease:["linear","initial",v,iD,iN]}],delay:[{delay:[ix,iD,iN]}],animate:[{animate:["none",y,iD,iN]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,iD,iN]}],"perspective-origin":[{"perspective-origin":k()}],rotate:[{rotate:W()}],"rotate-x":[{"rotate-x":W()}],"rotate-y":[{"rotate-y":W()}],"rotate-z":[{"rotate-z":W()}],scale:[{scale:q()}],"scale-x":[{"scale-x":q()}],"scale-y":[{"scale-y":q()}],"scale-z":[{"scale-z":q()}],"scale-3d":["scale-3d"],skew:[{skew:K()}],"skew-x":[{"skew-x":K()}],"skew-y":[{"skew-y":K()}],transform:[{transform:[iD,iN,"","none","gpu","cpu"]}],"transform-origin":[{origin:k()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:G()}],"translate-x":[{"translate-x":G()}],"translate-y":[{"translate-y":G()}],"translate-z":[{"translate-z":G()}],"translate-none":["translate-none"],accent:[{accent:A()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:A()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",iD,iN]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",iD,iN]}],fill:[{fill:["none",...A()]}],"stroke-w":[{stroke:[ix,iB,iA,iL]}],stroke:[{stroke:["none",...A()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function i2(...e){return i1(o3(e))}let i3=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,i5=(e,t)=>r=>{var n;if((null==t?void 0:t.variants)==null)return o3(e,null==r?void 0:r.class,null==r?void 0:r.className);let{variants:a,defaultVariants:o}=t,i=Object.keys(a).map(e=>{let t=null==r?void 0:r[e],n=null==o?void 0:o[e];if(null===t)return null;let i=i3(t)||i3(n);return a[e][i]}),s=r&&Object.entries(r).reduce((e,t)=>{let[r,n]=t;return void 0===n||(e[r]=n),e},{});return o3(e,i,null==t||null==(n=t.compoundVariants)?void 0:n.reduce((e,t)=>{let{class:r,className:n,...a}=t;return Object.entries(a).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...o,...s}[t]):({...o,...s})[t]===r})?[...e,r,n]:e},[]),null==r?void 0:r.class,null==r?void 0:r.className)},i9=i5("cursor-pointer inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-xl transition-all disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg:not([class*=size-])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary--hover active:bg-primary--pressed disabled:bg-primary--disabled disabled:opacity-20",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary--hover active:bg-secondary--pressed disabled:bg-secondary--disabled disabled:opacity-20",outline:"border border-button-outline bg-transparent text-foreground hover:border-button-outline-hover active:bg-button-outline-pressed disabled:border-border-dark disabled:opacity-20",ghost:"hover:bg-accent hover:text-accent-foreground active:bg-accent--pressed",contrast:"bg-contrast text-contrast-foreground hover:bg-contrast--hover active:bg-contrast--pressed disabled:bg-contrast--disabled disabled:opacity-30"},size:{default:"h-9 px-3.5 typo-button-normal [&_svg]:size-5",sm:"h-8 px-3 typo-button-small [&_svg]:size-4",lg:"h-11 px-4 typo-button-big [&_svg]:size-6",icon:"size-9 rounded-full [&_svg]:size-5","icon-sm":"size-8 rounded-full [&_svg]:size-4","icon-lg":"size-11 rounded-full [&_svg]:size-6"}},defaultVariants:{variant:"default",size:"default"}});function i4({className:e,variant:t,size:r,asChild:n=!1,...a}){return(0,A.jsx)(n?o0:"button",{"data-slot":"button",className:i2(i9({variant:t,size:r,className:e})),...a})}let i6=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)},i8=(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim();var i7={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let se=(0,L.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:a="",children:o,iconNode:i,...s},l)=>(0,L.createElement)("svg",{ref:l,...i7,width:t,height:t,stroke:e,strokeWidth:n?24*Number(r)/Number(t):r,className:i8("lucide",a),...!o&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(s)&&{"aria-hidden":"true"},...s},[...i.map(([e,t])=>(0,L.createElement)(e,t)),...Array.isArray(o)?o:[o]])),st=(R=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],(p=(0,L.forwardRef)(({className:e,...t},r)=>(0,L.createElement)(se,{ref:r,iconNode:R,className:i8(`lucide-${i6("x").replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,"lucide-x",e),...t}))).displayName=i6("x"),p);function sr({...e}){return(0,A.jsx)(ta,{"data-slot":"dialog",...e})}function sn({...e}){return(0,A.jsx)(tu,{"data-slot":"dialog-portal",...e})}function sa({className:e,...t}){return(0,A.jsx)(td,{"data-slot":"dialog-overlay",className:i2("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function so({className:e,children:t,contentInsideOverlay:r=!1,showCloseButton:n=!0,portalContainer:a,...o}){let i=(0,A.jsxs)(tg,{"data-slot":"dialog-content",className:i2("bg-background-containers data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-6 rounded-3xl border-0 p-6 shadow-[var(--shadow-login)] duration-200 outline-none sm:max-w-120 sm:p-10",e),...o,children:[t,n&&(0,A.jsxs)(tC,{"data-slot":"dialog-close",className:"focus-visible:ring-ring/30 absolute top-4 right-4 inline-flex size-6 cursor-pointer items-center justify-center rounded-full text-icons-light transition-colors hover:text-icons-normal focus-visible:text-icons-dark focus-visible:ring-2 focus-visible:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0",children:[(0,A.jsx)(st,{className:"size-6"}),(0,A.jsx)("span",{className:"sr-only",children:"Close"})]})]});return(0,A.jsx)(sn,{"data-slot":"dialog-portal",container:a,children:r?(0,A.jsx)(sa,{children:i}):(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(sa,{}),i]})})}function si({className:e,...t}){return(0,A.jsx)("div",{"data-slot":"dialog-header",className:i2("flex flex-col gap-2 text-left",e),...t})}function ss({className:e,...t}){return(0,A.jsx)(tw,{"data-slot":"dialog-title",className:i2("typo-base-18 text-text-dark",e),...t})}function sl({className:e,...t}){return(0,A.jsx)(tx,{"data-slot":"dialog-description",className:i2("typo-base-16 text-text-light",e),...t})}let su=(0,L.createContext)({theme:"system",setTheme:()=>null});function sc({children:e,defaultTheme:t="system",storageKey:r="v-theme",root:n=window.document.documentElement,enableStorage:a=!1,...o}){let[i,s]=(0,L.useState)(()=>a&&localStorage.getItem(r)||t);return(0,L.useEffect)(()=>{if(n.classList.remove("light","dark"),"system"===i){let e=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";n.classList.add(e);return}n.classList.add(i)},[i,n]),(0,A.jsx)(su,{...o,value:{theme:i,setTheme:e=>{a&&localStorage.setItem(r,e),s(e)}},children:e})}var sd=oG("../ui/src/styles/fonts.css?inline");function sp(e){return az.create({baseURL:e,timeout:3e4})}let sh=new Set(["common","delete","get","head","post","put","patch","options","purge","link","unlink"]);function sf(){return globalThis.process?.env?.NODE_ENV}function sg(e){if(void 0===e)return[];let t="function"==typeof e.toJSON?e.toJSON():e,r=[];return!function e(t,r){if(null!==t&&"object"==typeof t)for(let[n,a]of Object.entries(t)){if(null==a)continue;let t=n.toLowerCase();if("common"===t){e(a,r);continue}sh.has(t)||r.push([n,String(a)])}}(t,r),r}function sm(e){return!!("u">typeof FormData&&e instanceof FormData)||null!==e&&"object"==typeof e&&(e.constructor?.name==="FormData"||"function"==typeof e.getBoundary)}let sv=new Set(["authorization","cookie","set-cookie","x-xsrf-token"]);function sy(e){if(null==e)return;let t="function"==typeof e.toJSON?e.toJSON():e;if(null===t||"object"!=typeof t)return;let r={};for(let[e,n]of Object.entries(t))null!=n&&(r[e]=sv.has(e.toLowerCase())?"[redacted]":String(n));return r}function sb(e){if(null!=e){if("string"==typeof e)try{return JSON.parse(e)}catch{return e.length>2e3?`${e.slice(0,2e3)}… (${e.length} chars)`:e}return sm(e)?"[FormData]":e}}function sw(e){let t=(e.requestConfig.method??"GET").toUpperCase(),r=e.requestConfig.url??"",n=`[api:server] ${t} ${r} → ${e.status} (${e.durationMs}ms)`,a={requestId:e.requestId,...e.error?{error:e.error}:{},params:e.requestConfig.params,requestBody:sb(e.requestConfig.data),requestHeaders:sy(e.requestConfig.headers),responseHeaders:sy(e.responseHeaders),responseBody:sb(e.responseBody)};(e.status>=500||void 0!==e.error&&0===e.status?console.error:e.status>=400?console.warn:console.log)(n,a)}let sk=function({clientName:e,configureFunctionName:t,defaultBaseURL:r}){let n=sp(r),a=sp(r),o=null,i=null,s=null,l=null,u=null,c=null;async function d(e,t){let r=function(e,t){let r;if(void 0===t.data||sm(t.data))return t;let n=aH.from(t.headers);return n.has("Content-Type")||void 0!==(r=e.defaults.headers.common)&&aH.from(r).has("Content-Type")||n.set("Content-Type","application/json"),t.headers=n,t}(e,function(e){let t=aH.from(e.headers);if(null!==s){let e=s()?.trim();e&&!t.has("Authorization")&&t.set("Authorization",`Bearer ${e}`)}if(null!==c)for(let[r,n]of Object.entries(c({url:e.url,method:e.method})))n&&!t.has(r)&&t.set(r,n);return e.headers=t,e}({...t})),n=function(e){let t,r=aH.from(e.headers),n=r.get("x-request-id");if("string"==typeof n&&n.length>0)return n;let a=(t=globalThis.crypto,"function"==typeof t?.randomUUID?t.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`);return r.set("x-request-id",a),e.headers=r,a}(r),a=function(){if("u">typeof window)return!1;let e=sf(),t=globalThis.process;return t?.env?.DEBUG_API==="true"||"production"!==e&&"test"!==e&&"testing"!==e}(),o=a?Date.now():0;try{let t=await e.request(r);return a&&sw({requestConfig:r,requestId:n,status:t.status,durationMs:Date.now()-o,responseHeaders:t.headers,responseBody:t.data}),t}catch(e){throw a&&sw({requestConfig:r,requestId:n,status:e.response?.status??0,durationMs:Date.now()-o,responseHeaders:e.response?.headers,responseBody:e.response?.data,error:e.message}),e}}async function p(e){return d(e.skipUnauthorizedRecovery?a:n,function(e){let{skipUnauthorizedRecovery:t,...r}=e;return r}(e))}let h=async e=>p({...e,skipUnauthorizedRecovery:!0});function f(){return null!==o}return{configureClientRuntime:function(t){let r,i=(r=function(e){let t=sg(e);if(0===t.length)return;let r=new Map;for(let[e,n]of t)r.set(e.toLowerCase(),n);return Object.fromEntries(Array.from(r.entries()).sort(([e],[t])=>e.localeCompare(t)))}(t.headers),JSON.stringify({...void 0!==t.baseURL?{baseURL:t.baseURL}:{},...void 0!==t.timeout?{timeout:t.timeout}:{},...void 0!==r?{headers:r}:{}}));if("{}"!==i){if(null!==o){if(o===i)return;let t=`${e} already configured. Existing: ${o}. New: ${i}.`;if("production"===sf())return void console.warn(t);throw Error(t)}for(let e of[n,a])void 0!==t.baseURL&&(e.defaults.baseURL=t.baseURL),void 0!==t.timeout&&(e.defaults.timeout=t.timeout),void 0!==t.headers&&function(e,t){let r=e.defaults.headers,n=r.common,a=aH.from(n);for(let[e,r]of sg(t))a.set(e,r);r.common=a.toJSON(),e.defaults.headers=r}(e,t.headers);o=i}},configureAccessTokenResolverRuntime:function(e){s=e},configureUnauthorizedHandlerRuntime:function(e){if(l=e,null===e){null!==i&&(n.interceptors.response.eject(i),i=null),u=null;return}null===i&&(i=n.interceptors.response.use(e=>e,async e=>{let t=e.config;if(e.response?.status!==401||null===l||void 0===t||t._apiRetried)return Promise.reject(e);if(null===u){let t=l;if(null===t)return Promise.reject(e);u=Promise.resolve().then(()=>t(e,{requestWithoutUnauthorizedRecovery:h})).finally(()=>{u=null})}try{if(!await u)return Promise.reject(e);t._apiRetried=!0;let r=aH.from(t.headers);return r.delete("Authorization"),t.headers=r,d(n,t)}catch{return Promise.reject(e)}}))},configureHeadersResolverRuntime:function(e){c=e},isClientConfiguredRuntime:f,assertClientConfiguredRuntime:function(){if(!f())throw Error(`${e} is not configured. Call ${t}(...) before making requests.`)},resetClientForTestsRuntime:function(){let e;if("test"!==(e=sf())&&"testing"!==e)throw Error("resetApiClientForTests() can only be called in test environment.");n=sp(r),a=sp(r),o=null,i=null,s=null,l=null,u=null,c=null},requestRuntime:p,requestWithoutUnauthorizedRecovery:h,addResponseInterceptorRuntime:function(e,t){return n.interceptors.response.use(e,t)}}}({clientName:"API node client",configureFunctionName:"configureNodeApiClient",defaultBaseURL:"https://api.vizbl.com"}),sx=sk.configureClientRuntime;sk.configureAccessTokenResolverRuntime,sk.configureHeadersResolverRuntime,sk.configureUnauthorizedHandlerRuntime,sk.isClientConfiguredRuntime,sk.assertClientConfiguredRuntime,sk.resetClientForTestsRuntime;let sS=sk.requestRuntime;async function sC(e){return sS(e)}async function sP(e,t={}){let{client:r=sC,...n}=t;return(await r({method:"POST",url:"/nano-banana/guest/try-on/generate/sync",data:e,...n})).data}async function sE(e,t={}){let{client:r=sC,...n}=t;return(await r({method:"POST",url:"/nano-banana/guest/upload/request",params:e,...n})).data}async function sT(e,t={}){let{client:r=sC,...n}=t;return(await r({method:"POST",url:"/public/widget/activate-try-on",params:e,...n})).data}async function sR(e,t={}){let{client:r=sC,...n}=t;return(await r({method:"POST",url:"/public/try-on/upload/request",params:e,...n})).data}async function sO(e,t={}){let{client:r=sC,...n}=t;return(await r({method:"POST",url:"/public/try-on/generate",data:e,...n})).data}async function sj(e,t={}){let{client:r=sC,...n}=t;return(await r({method:"POST",url:"/public/widget/token",data:e,...n})).data}async function s_(e,t={}){let{client:r=sC,...n}=t;return(await r({method:"POST",url:"/public/widget/events",data:e,...n})).data}async function sz(e={}){let{client:t=sC,...r}=e;return(await t({method:"POST",url:"/session/guest",...r})).data}function sN(e){return e?.trim()||void 0}sk.requestWithoutUnauthorizedRecovery,sk.addResponseInterceptorRuntime;let sA="x-guest-token";class sL{createGuestSession;guestTokenPromise=null;constructor({createGuestSession:e=sI}={}){this.createGuestSession=e}async requestUploadUrls(e){return this.withGuestAuth(t=>sE({count:e},{headers:t}))}async generateTryOn(e,t={}){return this.withGuestAuth(r=>sP(e,{headers:r,responseType:"blob",timeout:t.timeout??9e4}))}sendWidgetEvent(){}async withGuestAuth(e){let t=this.getGuestToken(),r=await t;try{return await e({[sA]:r})}catch(r){var n;if(n=r,n?.response?.status!==401&&n?.status!==401)throw r;return e({[sA]:await this.replaceGuestToken(t)})}}getGuestToken(){return this.guestTokenPromise||(this.guestTokenPromise=this.requestGuestToken(),this.forgetTokenOnFailure(this.guestTokenPromise)),this.guestTokenPromise}replaceGuestToken(e){return(this.guestTokenPromise===e||null===this.guestTokenPromise)&&(this.guestTokenPromise=this.requestGuestToken(),this.forgetTokenOnFailure(this.guestTokenPromise)),this.guestTokenPromise}async requestGuestToken(){var e,t=await this.createGuestSession();let r="string"==typeof(e=t?.token)?e.trim():"";if(!r)throw Error("AI try-on guest session response is missing a token");return r}forgetTokenOnFailure(e){e.catch(()=>{this.guestTokenPromise===e&&(this.guestTokenPromise=null)})}}function sI(e){return sz(e)}class sM{apiConfig;issueWidgetToken;now;refreshThresholdMs;refreshPromise=null;session;constructor(e,t={}){this.apiConfig=t.apiConfig,this.issueWidgetToken=t.issueWidgetToken??sj,this.now=t.now??Date.now,this.refreshThresholdMs=t.refreshThresholdMs??3e4,this.session=this.toSnapshot(e)}get snapshot(){return{...this.session}}async getTokenForRequest(){return this.isCloseToExpiry()?(await this.refresh()).token:this.session.token}async getApiConfigForRequest(e){let t=await this.getTokenForRequest();return{...this.apiConfig,...e,headers:{...this.apiConfig?.headers,...e?.headers,"x-widget-session-token":t}}}isCloseToExpiry(){return this.session.expiresAt-this.now()<=this.refreshThresholdMs}refresh(){return this.refreshPromise||(this.refreshPromise=this.issueWidgetToken({token:this.session.token},this.apiConfig).then(e=>(this.session=this.toSnapshot(e),this.snapshot)).finally(()=>{this.refreshPromise=null})),this.refreshPromise}toSnapshot(e){return{token:e.token,sid:e.sid,expiresAt:this.now()+1e3*e.expiresIn}}}let sF=(e,t)=>s_(e,t),sD=e=>sT.length>0?sT(void 0,e):sT(e);class sB{activateTryOn;apiConfig;createWidgetEvent;sessionPromise=null;constructor({activateTryOn:e=sD,createWidgetEvent:t=sF,apiKey:r}={}){this.activateTryOn=e,this.createWidgetEvent=t,this.apiConfig={headers:function(e){let t=e?.trim();return t?{"x-api-key":t}:{}}(r)}}async requestUploadUrls(e){return sR({count:e},await this.getApiConfigForRequest())}async generateTryOn(e,t={}){return sO(e,await this.getApiConfigForRequest({responseType:"blob",timeout:t.timeout??9e4}))}async getApiConfigForRequest(e={}){return(await this.getSession()).getApiConfigForRequest({...e,headers:{...this.apiConfig.headers,...e.headers}})}sendWidgetEvent(e){this.getApiConfigForRequest().then(t=>this.createWidgetEvent({event:e,timestamp:new Date().toISOString()},t)).catch(()=>{})}getSession(){if(this.sessionPromise)return this.sessionPromise;let e=this.activateTryOn(this.apiConfig).then(e=>{var t,r;let n=(t=function(e){let t=e?.widgetSession;if(null===t||"object"!=typeof t)throw Error("AI try-on activation response is missing Widget Session");return{expiresIn:Number(t.expiresIn),sid:s$(t.sid),token:s$(t.token)}}(e),r={apiConfig:this.apiConfig},t?.token&&t.sid&&Number.isFinite(t.expiresIn)?new sM(t,r):null);if(!n)throw Error("AI try-on activation response is missing Widget Session");return n});return this.sessionPromise=e,e.catch(()=>{this.sessionPromise===e&&(this.sessionPromise=null)}),e}}function s$(e){return"string"==typeof e?e.trim():""}function sV({apiKey:e}={}){let t=sN(e);return t?new sB({apiKey:t}):new sL(void 0)}let sU={en:{ns1:{back:"Back",badge:"Try it on",confirmBadge:"Almost there",close:"Close",comparisonSlider:"Comparison slider",comparisonTitle:"Compare before and after",confirmChangePhoto:"Change photo",confirmGenerate:"Generate my look",confirmSubtitle:"Hit Generate and see how it looks on you",confirmTitle:"Ready to try it on?",dialogDescription:"AI try-on widget dialog",dialogTitle:"AI Try-On",download:"Download",errorBadge:"Little error",errorDifferentPhoto:"Change photo",errorGuidance:"Try again with a different photo. Make sure it shows your full body.",errorRetry:"Try again",errorSubtitle:"It happens — let's try again",errorTitle:"Something went wrong",historyPhoto:"Previous photo",historySubtitle:"Use a previous photo or upload something new",historyTitle:"Your photos",historyUploadNew:"Upload new",bagIntroBadCropped:"Cropped photo",bagIntroBadHandsFull:"Both hands already full",bagIntroGoodAngle:"Slight angle",bagIntroGoodFullBody:"Full body, one hand free",bagIntroSubtitle:"A full-body shot with one shoulder or hand free",bagIntroTitle:"Strike a carrying pose",eyewearIntroBadFaceTurned:"Face turned away",eyewearIntroBadWearingGlasses:"Already wearing glasses",eyewearIntroGoodFacingCamera:"Facing camera, eyes visible",eyewearIntroGoodHairBack:"Hair back, good light",eyewearIntroSubtitle:"Straight-on photo works best.",eyewearIntroTitle:"Glasses go right on your face",fullBodyIntroBadCropped:"Cropped at the waist",fullBodyIntroBadSitting:"Sitting hides the fit",fullBodyIntroGoodAngle:"Slight angle, body visible",fullBodyIntroGoodHeadToToe:"Head to toe in frame",fullBodyIntroSubtitle:"Full-body photos work best — here's what to look for",fullBodyIntroTitle:"Better photo, better result",footwearIntroBadFeetHidden:"Feet hidden",footwearIntroBadOneFootCropped:"One foot out of frame",footwearIntroGoodKneesDown:"Knees-down on flat ground",footwearIntroGoodStanding:"Standing, both feet visible",footwearIntroSubtitle:"Both feet in the frame, standing on a plain floor.",footwearIntroTitle:"Down to your feet",headwearIntroBadCroppedHead:"Head cropped out",headwearIntroBadWearingHat:"Already wearing a hat",headwearIntroGoodAngle:"Slight angle, head in frame",headwearIntroGoodFront:"Head and shoulders, front on",headwearIntroSubtitle:"A head-and-shoulders shot with your whole head in view",headwearIntroTitle:"Heads up",introCta:"Got it, continue",introBadge:"Quick tip",myFits:"My fits",lowerBodyIntroBadCoveredWaist:"Top covers the waistline",lowerBodyIntroBadSitting:"Sitting bends the legs",lowerBodyIntroGoodFullBody:"Full body works too",lowerBodyIntroGoodWaistToFeet:"Waist to feet, standing",lowerBodyIntroSubtitle:"Stand up and show us everything from waist to feet.",lowerBodyIntroTitle:"It’s all about the legs",neckIntroBadHairCovering:"Hair covers neck and ears",neckIntroBadHighCollar:"High collar hides the neck",neckIntroGoodHairUp:"Hair up, neck visible",neckIntroGoodOpenNeckline:"Open neckline, chest up",neckIntroSubtitle:"Jewelry needs open skin — hair back, neckline clear.",neckIntroTitle:"Neck and ears, front and center",processingBadge:"Wait a second",processingProgress:"Reading your photo…",processingSubtitle:"Hang tight while we dress you up",processingTitle:"Working our magic…",reset:"Reset",resultBadge:"That’s the one",resultCompare:"Change photo",resultOpenComparison:"View before / after",resultProductLink:"View product",resultReset:"Save",resultShare:"Share",resultTitle:"Here's how it looks on you",resultTryAnother:"Add To Cart",resultTryAnotherWithPrice:"Add To Cart – {{price}}",share:"Share",startHistory:"View previous results",startTitle:"Want to see it on you?",startUpload:"Choose your photo",termsJoiner:"&",termsLink:"Terms",termsPrefix:"By using this service, your agree to",privacyLink:"privacy Policy",upperBodyIntroBadArmsCrossed:"Arms crossed hide the fit",upperBodyIntroBadObjectBlockingTorso:"Object blocks the torso",upperBodyIntroGoodAngle:"Slight angle",upperBodyIntroGoodFacingCamera:"Hips up, facing camera",upperBodyIntroSubtitle:"From the hips up, arms relaxed — that’s all this one needs.",upperBodyIntroTitle:"Let’s see your top half",waistIntroBadOversizedTop:"Oversized top hides the waist",waistIntroBadSitting:"Sitting folds the waistline",waistIntroGoodFullBody:"Full body, waistline visible",waistIntroGoodTopTucked:"Top tucked in, waist visible",waistIntroSubtitle:"Tuck in your top so we can see exactly where the belt sits.",waistIntroTitle:"Show your waistline",wristIntroBadClenchedFist:"Clenched fist",wristIntroBadCovered:"Sleeve covers the wrist",wristIntroGoodCloseUp:"Wrist close-up, hand relaxed",wristIntroGoodSleeveBack:"Sleeve pulled back",wristIntroSubtitle:"A close-up of your wrist does the trick.",wristIntroTitle:"Give us a hand"}},ru:{ns1:{back:"Назад",badge:"Примерить",confirmBadge:"Почти готово",close:"Закрыть",comparisonSlider:"Слайдер сравнения",comparisonTitle:"Сравнение до и после",confirmChangePhoto:"Изменить фото",confirmGenerate:"Сгенерировать образ",confirmSubtitle:"Нажмите \xabСгенерировать\xbb, чтобы увидеть, как это выглядит на вас",confirmTitle:"Готовы примерить?",dialogDescription:"Диалог виджета AI-примерки",dialogTitle:"AI-примерка",download:"Скачать",errorBadge:"Небольшая ошибка",errorDifferentPhoto:"Изменить фото",errorGuidance:"Попробуйте другое фото. Убедитесь, что вы видны в полный рост.",errorRetry:"Попробовать снова",errorSubtitle:"Так бывает — попробуем еще раз",errorTitle:"Что-то пошло не так",historyPhoto:"Предыдущее фото",historySubtitle:"Используйте предыдущее фото или загрузите новое",historyTitle:"Ваши фото",historyUploadNew:"Загрузить новое",bagIntroBadCropped:"Слишком крупный план",bagIntroBadHandsFull:"Обе руки заняты",bagIntroGoodAngle:"По пояс, под небольшим углом",bagIntroGoodFullBody:"В полный рост, одна рука свободна",bagIntroSubtitle:"В кадре должен быть виден торс. Оставьте свободной одну руку или плечо.",bagIntroTitle:"Загрузите фото по пояс или в полный рост",eyewearIntroBadFaceTurned:"Лицо отвернуто от камеры",eyewearIntroBadWearingGlasses:"Очки уже надеты",eyewearIntroGoodFacingCamera:"Лицом к камере, глаза видны",eyewearIntroGoodHairBack:"Селфи под небольшим углом",eyewearIntroSubtitle:"В кадре должны быть хорошо видны лицо и глаза.",eyewearIntroTitle:"Загрузите фото лица",fullBodyIntroBadCropped:"Фото по пояс",fullBodyIntroBadSitting:"Сидячая поза",fullBodyIntroGoodAngle:"Селфи под небольшим углом",fullBodyIntroGoodHeadToToe:"Всё тело в кадре",fullBodyIntroSubtitle:"В кадре должно быть видно вас целиком.",fullBodyIntroTitle:"Загрузите фото в полный рост",footwearIntroBadFeetHidden:"Стопы не видны",footwearIntroBadOneFootCropped:"Одна стопа не попала в кадр",footwearIntroGoodKneesDown:"От колен до стоп, на ровном полу",footwearIntroGoodStanding:"В полный рост, обе стопы в кадре",footwearIntroSubtitle:"Встаньте на ровный пол. Обе стопы должны быть в кадре.",footwearIntroTitle:"Загрузите фото, где видны обе стопы",headwearIntroBadCroppedHead:"Часть головы не попала в кадр",headwearIntroBadWearingHat:"На фото уже есть головной убор",headwearIntroGoodAngle:"Селфи под небольшим углом",headwearIntroGoodFront:"Анфас, голова и плечи в кадре",headwearIntroSubtitle:"В кадре должны быть видны голова и плечи целиком.",headwearIntroTitle:"Загрузите фото головы и плеч",introCta:"Продолжить",introBadge:"Совет",myFits:"My fits",lowerBodyIntroBadCoveredWaist:"Свободная одежда скрывает линию талии",lowerBodyIntroBadSitting:"В сидячей позе ноги согнуты",lowerBodyIntroGoodFullBody:"Фото в полный рост",lowerBodyIntroGoodWaistToFeet:"От пояса до стоп, стоя",lowerBodyIntroSubtitle:"В кадре должны быть видны ноги целиком.",lowerBodyIntroTitle:"Загрузите фото от пояса до стоп",neckIntroBadHairCovering:"Волосы закрывают шею и уши",neckIntroBadHighCollar:"Одежда закрывает шею",neckIntroGoodHairUp:"Лицом к камере, волосы убраны",neckIntroGoodOpenNeckline:"Селфи под небольшим углом",neckIntroSubtitle:"В кадре должны быть видны шея и уши.",neckIntroTitle:"Загрузите фото головы и плеч",processingBadge:"Секунду",processingProgress:"Считываем ваше фото…",processingSubtitle:"Подождите, пока мы примеряем образ",processingTitle:"Творим магию…",reset:"Сбросить",resultBadge:"То, что нужно",resultCompare:"Изменить фото",resultOpenComparison:"До / после",resultProductLink:"Открыть товар",resultReset:"Сохранить",resultShare:"Поделиться",resultTitle:"Вот как это выглядит на вас",resultTryAnother:"Add To Cart",resultTryAnotherWithPrice:"Add To Cart – {{price}}",share:"Поделиться",startHistory:"Смотреть прошлые результаты",startTitle:"Хотите увидеть это на себе?",startUpload:"Выбрать фото",termsJoiner:"и",termsLink:"Условиями",termsPrefix:"Используя сервис, вы соглашаетесь с",privacyLink:"Политикой конфиденциальности",upperBodyIntroBadArmsCrossed:"Скрещённые руки закрывают торс",upperBodyIntroBadObjectBlockingTorso:"Предмет в руках закрывает торс",upperBodyIntroGoodAngle:"Селфи под небольшим углом",upperBodyIntroGoodFacingCamera:"По пояс, лицом к камере",upperBodyIntroSubtitle:"В кадре должны быть видны торс и расслабленные руки.",upperBodyIntroTitle:"Загрузите фото по пояс",waistIntroBadOversizedTop:"Одежда закрывает линию талии",waistIntroBadSitting:"В сидячей позе линия талии искажается",waistIntroGoodFullBody:"В полный рост, талия видна",waistIntroGoodTopTucked:"По пояс, талия видна",waistIntroSubtitle:"Линия талии должна быть открыта и хорошо видна.",waistIntroTitle:"Загрузите фото, где видна талия",wristIntroBadClenchedFist:"Сжатый кулак исказит результат",wristIntroBadCovered:"Одежда закрывает запястье",wristIntroGoodCloseUp:"Расслабленная кисть",wristIntroGoodSleeveBack:"Запястье открыто",wristIntroSubtitle:"В кадре должны быть видны кисть и запястье.",wristIntroTitle:"Загрузите фото руки"}}},sH=/initial-value:([^;\n]+);/i,sW=(h=(O=oG("./src/style.css?inline").A).replace(/:root\s*,\s*:host|:root/g,":host"),(f=Array.from(O.matchAll(/@property\s+(--[^{\s]+)\s*\{([^}]*)\}/g)).map(([,e,t])=>{let r=t.match(sH);if(!r)return null;let n=r[1].trim();return` ${e}: ${n};`}).filter(e=>null!==e).join("\n"))?`:host {
|
|
5482
|
-
${f}
|
|
5483
|
-
}
|
|
5481
|
+
`,""]);let s=i.toString()},"../../node_modules/.pnpm/@rsbuild+core@1.7.1/node_modules/@rsbuild/core/compiled/css-loader/api.js"(e){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var r="",n=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),n&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),n&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r}).join("")},t.i=function(e,r,n,a,o){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(n)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(i[l]=!0)}for(var u=0;u<e.length;u++){var c=[].concat(e[u]);n&&i[c[0]]||(void 0!==o&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=o),r&&(c[2]&&(c[1]="@media ".concat(c[2]," {").concat(c[1],"}")),c[2]=r),a&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=a):c[4]="".concat(a)),t.push(c))}},t}},"../../node_modules/.pnpm/@rsbuild+core@1.7.1/node_modules/@rsbuild/core/compiled/css-loader/noSourceMaps.js"(e){e.exports=function(e){return e[1]}}},oK={};function oG(e){var t=oK[e];if(void 0!==t)return t.exports;var r=oK[e]={id:e,exports:{}};return oq[e](r,r.exports,oG),r.exports}function oX(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function oY(...e){return t=>{let r=!1,n=e.map(e=>{let n=oX(e,t);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let t=0;t<n.length;t++){let r=n[t];"function"==typeof r?r():oX(e[t],null)}}}}oG.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return oG.d(t,{a:t}),t},oG.d=(e,t)=>{for(var r in t)oG.o(t,r)&&!oG.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},oG.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var oQ=Symbol.for("react.lazy"),oZ=I[" use ".trim().toString()];function oJ(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===oQ&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var o0=((m=L.forwardRef((e,t)=>{let{children:r,...n}=e;if(oJ(r)&&"function"==typeof oZ&&(r=oZ(r._payload)),L.isValidElement(r)){var a;let e,o,i=(a=r,(o=(e=Object.getOwnPropertyDescriptor(a.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?a.ref:(o=(e=Object.getOwnPropertyDescriptor(a,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?a.props.ref:a.props.ref||a.ref),s=function(e,t){let r={...t};for(let n in t){let a=e[n],o=t[n];/^on[A-Z]/.test(n)?a&&o?r[n]=(...e)=>{let t=o(...e);return a(...e),t}:a&&(r[n]=a):"style"===n?r[n]={...a,...o}:"className"===n&&(r[n]=[a,o].filter(Boolean).join(" "))}return{...e,...r}}(n,r.props);return r.type!==L.Fragment&&(s.ref=t?oY(t,i):i),L.cloneElement(r,s)}return L.Children.count(r)>1?L.Children.only(null):null})).displayName="Slot.SlotClone",c=m,(d=L.forwardRef((e,t)=>{let{children:r,...n}=e;oJ(r)&&"function"==typeof oZ&&(r=oZ(r._payload));let a=L.Children.toArray(r),o=a.find(o2);if(o){let e=o.props.children,r=a.map(t=>t!==o?t:L.Children.count(e)>1?L.Children.only(null):L.isValidElement(e)?e.props.children:null);return(0,A.jsx)(c,{...n,ref:t,children:L.isValidElement(e)?L.cloneElement(e,void 0,r):null})}return(0,A.jsx)(c,{...n,ref:t,children:r})})).displayName="Slot.Slot",d),o1=Symbol("radix.slottable");function o2(e){return L.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===o1}function o3(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=function e(t){var r,n,a="";if("string"==typeof t||"number"==typeof t)a+=t;else if("object"==typeof t)if(Array.isArray(t)){var o=t.length;for(r=0;r<o;r++)t[r]&&(n=e(t[r]))&&(a&&(a+=" "),a+=n)}else for(n in t)t[n]&&(a&&(a+=" "),a+=n);return a}(e))&&(n&&(n+=" "),n+=t);return n}let o5=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),o9=[],o4=(e,t,r)=>{if(0==e.length-t)return r.classGroupId;let n=e[t],a=r.nextPart.get(n);if(a){let r=o4(e,t+1,a);if(r)return r}let o=r.validators;if(null===o)return;let i=0===t?e.join("-"):e.slice(t).join("-"),s=o.length;for(let e=0;e<s;e++){let t=o[e];if(t.validator(i))return t.classGroupId}},o6=(e,t)=>{let r=o5();for(let n in e)o8(e[n],r,n,t);return r},o8=(e,t,r,n)=>{let a=e.length;for(let o=0;o<a;o++)o7(e[o],t,r,n)},o7=(e,t,r,n)=>{"string"==typeof e?ie(e,t,r):"function"==typeof e?it(e,t,r,n):ir(e,t,r,n)},ie=(e,t,r)=>{(""===e?t:ia(t,e)).classGroupId=r},it=(e,t,r,n)=>{io(e)?o8(e(n),t,r,n):(null===t.validators&&(t.validators=[]),t.validators.push({classGroupId:r,validator:e}))},ir=(e,t,r,n)=>{let a=Object.entries(e),o=a.length;for(let e=0;e<o;e++){let[o,i]=a[e];o8(i,ia(t,o),r,n)}},ia=(e,t)=>{let r=e,n=t.split("-"),a=n.length;for(let e=0;e<a;e++){let t=n[e],a=r.nextPart.get(t);a||(a=o5(),r.nextPart.set(t,a)),r=a}return r},io=e=>"isThemeGetter"in e&&!0===e.isThemeGetter,ii=[],is=(e,t,r,n,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:a}),il=/\s+/,iu=e=>{let t;if("string"==typeof e)return e;let r="";for(let n=0;n<e.length;n++)e[n]&&(t=iu(e[n]))&&(r&&(r+=" "),r+=t);return r},ic=[],id=e=>{let t=t=>t[e]||ic;return t.isThemeGetter=!0,t},ip=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ih=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ig=/^\d+\/\d+$/,im=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,iv=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,iy=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ib=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,iw=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ik=e=>ig.test(e),ix=e=>!!e&&!Number.isNaN(Number(e)),iS=e=>!!e&&Number.isInteger(Number(e)),iC=e=>e.endsWith("%")&&ix(e.slice(0,-1)),iP=e=>im.test(e),iE=()=>!0,iT=e=>iv.test(e)&&!iy.test(e),iR=()=>!1,iO=e=>ib.test(e),ij=e=>iw.test(e),i_=e=>!iN(e)&&!iD(e),iz=e=>iq(e,iY,iR),iN=e=>ip.test(e),iA=e=>iq(e,iQ,iT),iL=e=>iq(e,iZ,ix),iI=e=>iq(e,iG,iR),iM=e=>iq(e,iX,ij),iF=e=>iq(e,i0,iO),iD=e=>ih.test(e),iB=e=>iK(e,iQ),i$=e=>iK(e,iJ),iV=e=>iK(e,iG),iU=e=>iK(e,iY),iH=e=>iK(e,iX),iW=e=>iK(e,i0,!0),iq=(e,t,r)=>{let n=ip.exec(e);return!!n&&(n[1]?t(n[1]):r(n[2]))},iK=(e,t,r=!1)=>{let n=ih.exec(e);return!!n&&(n[1]?t(n[1]):r)},iG=e=>"position"===e||"percentage"===e,iX=e=>"image"===e||"url"===e,iY=e=>"length"===e||"size"===e||"bg-size"===e,iQ=e=>"length"===e,iZ=e=>"number"===e,iJ=e=>"family-name"===e,i0=e=>"shadow"===e,i1=((e,...t)=>{let r,n,a,o,i=e=>{let t=n(e);if(t)return t;let o=((e,t)=>{let{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a,sortModifiers:o}=t,i=[],s=e.trim().split(il),l="";for(let e=s.length-1;e>=0;e-=1){let t=s[e],{isExternal:u,modifiers:c,hasImportantModifier:d,baseClassName:p,maybePostfixModifierPosition:h}=r(t);if(u){l=t+(l.length>0?" "+l:l);continue}let f=!!h,g=n(f?p.substring(0,h):p);if(!g){if(!f||!(g=n(p))){l=t+(l.length>0?" "+l:l);continue}f=!1}let m=0===c.length?"":1===c.length?c[0]:o(c).join(":"),v=d?m+"!":m,y=v+g;if(i.indexOf(y)>-1)continue;i.push(y);let b=a(g,f);for(let e=0;e<b.length;++e){let t=b[e];i.push(v+t)}l=t+(l.length>0?" "+l:l)}return l})(e,r);return a(e,o),o};return o=s=>{var l;let u;return n=(r={cache:(e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null),a=(a,o)=>{r[a]=o,++t>e&&(t=0,n=r,r=Object.create(null))};return{get(e){let t=r[e];return void 0!==t?t:void 0!==(t=n[e])?(a(e,t),t):void 0},set(e,t){e in r?r[e]=t:a(e,t)}}})((l=t.reduce((e,t)=>t(e),e())).cacheSize),parseClassName:(e=>{let{prefix:t,experimentalParseClassName:r}=e,n=e=>{let t,r=[],n=0,a=0,o=0,i=e.length;for(let s=0;s<i;s++){let i=e[s];if(0===n&&0===a){if(":"===i){r.push(e.slice(o,s)),o=s+1;continue}if("/"===i){t=s;continue}}"["===i?n++:"]"===i?n--:"("===i?a++:")"===i&&a--}let s=0===r.length?e:e.slice(o),l=s,u=!1;return s.endsWith("!")?(l=s.slice(0,-1),u=!0):s.startsWith("!")&&(l=s.slice(1),u=!0),is(r,u,l,t&&t>o?t-o:void 0)};if(t){let e=t+":",r=n;n=t=>t.startsWith(e)?r(t.slice(e.length)):is(ii,!1,t,void 0,!0)}if(r){let e=n;n=t=>r({className:t,parseClassName:e})}return n})(l),sortModifiers:(u=new Map,l.orderSensitiveModifiers.forEach((e,t)=>{u.set(e,1e6+t)}),e=>{let t=[],r=[];for(let n=0;n<e.length;n++){let a=e[n],o="["===a[0],i=u.has(a);o||i?(r.length>0&&(r.sort(),t.push(...r),r=[]),t.push(a)):r.push(a)}return r.length>0&&(r.sort(),t.push(...r)),t}),...(e=>{let t=(e=>{let{theme:t,classGroups:r}=e;return o6(r,t)})(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:e=>{if(e.startsWith("[")&&e.endsWith("]")){var r;let t,n,a;return -1===(r=e).slice(1,-1).indexOf(":")?void 0:(n=(t=r.slice(1,-1)).indexOf(":"),(a=t.slice(0,n))?"arbitrary.."+a:void 0)}let n=e.split("-"),a=+(""===n[0]&&n.length>1);return o4(n,a,t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=n[e],a=r[e];if(t){if(a){let e=Array(a.length+t.length);for(let t=0;t<a.length;t++)e[t]=a[t];for(let r=0;r<t.length;r++)e[a.length+r]=t[r];return e}return t}return a||o9}return r[e]||o9}}})(l)}).cache.get,a=r.cache.set,o=i,i(s)},(...e)=>o(((...e)=>{let t,r,n=0,a="";for(;n<e.length;)(t=e[n++])&&(r=iu(t))&&(a&&(a+=" "),a+=r);return a})(...e))})(()=>{let e=id("color"),t=id("font"),r=id("text"),n=id("font-weight"),a=id("tracking"),o=id("leading"),i=id("breakpoint"),s=id("container"),l=id("spacing"),u=id("radius"),c=id("shadow"),d=id("inset-shadow"),p=id("text-shadow"),h=id("drop-shadow"),f=id("blur"),g=id("perspective"),m=id("aspect"),v=id("ease"),y=id("animate"),b=()=>["auto","avoid","all","avoid-page","page","left","right","column"],w=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],k=()=>[...w(),iD,iN],x=()=>["auto","hidden","clip","visible","scroll"],S=()=>["auto","contain","none"],C=()=>[iD,iN,l],P=()=>[ik,"full","auto",...C()],E=()=>[iS,"none","subgrid",iD,iN],T=()=>["auto",{span:["full",iS,iD,iN]},iS,iD,iN],R=()=>[iS,"auto",iD,iN],O=()=>["auto","min","max","fr",iD,iN],j=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],_=()=>["start","end","center","stretch","center-safe","end-safe"],z=()=>["auto",...C()],N=()=>[ik,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],A=()=>[e,iD,iN],L=()=>[...w(),iV,iI,{position:[iD,iN]}],I=()=>["no-repeat",{repeat:["","x","y","space","round"]}],M=()=>["auto","cover","contain",iU,iz,{size:[iD,iN]}],F=()=>[iC,iB,iA],D=()=>["","none","full",u,iD,iN],B=()=>["",ix,iB,iA],$=()=>["solid","dashed","dotted","double"],V=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],U=()=>[ix,iC,iV,iI],H=()=>["","none",f,iD,iN],W=()=>["none",ix,iD,iN],q=()=>["none",ix,iD,iN],K=()=>[ix,iD,iN],G=()=>[ik,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[iP],breakpoint:[iP],color:[iE],container:[iP],"drop-shadow":[iP],ease:["in","out","in-out"],font:[i_],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[iP],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[iP],shadow:[iP],spacing:["px",ix],text:[iP],"text-shadow":[iP],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ik,iN,iD,m]}],container:["container"],columns:[{columns:[ix,iN,iD,s]}],"break-after":[{"break-after":b()}],"break-before":[{"break-before":b()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:k()}],overflow:[{overflow:x()}],"overflow-x":[{"overflow-x":x()}],"overflow-y":[{"overflow-y":x()}],overscroll:[{overscroll:S()}],"overscroll-x":[{"overscroll-x":S()}],"overscroll-y":[{"overscroll-y":S()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{start:P()}],end:[{end:P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[iS,"auto",iD,iN]}],basis:[{basis:[ik,"full","auto",s,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ix,ik,"auto","initial","none",iN]}],grow:[{grow:["",ix,iD,iN]}],shrink:[{shrink:["",ix,iD,iN]}],order:[{order:[iS,"first","last","none",iD,iN]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:T()}],"col-start":[{"col-start":R()}],"col-end":[{"col-end":R()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:T()}],"row-start":[{"row-start":R()}],"row-end":[{"row-end":R()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":O()}],"auto-rows":[{"auto-rows":O()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...j(),"normal"]}],"justify-items":[{"justify-items":[..._(),"normal"]}],"justify-self":[{"justify-self":["auto",..._()]}],"align-content":[{content:["normal",...j()]}],"align-items":[{items:[..._(),{baseline:["","last"]}]}],"align-self":[{self:["auto",..._(),{baseline:["","last"]}]}],"place-content":[{"place-content":j()}],"place-items":[{"place-items":[..._(),"baseline"]}],"place-self":[{"place-self":["auto",..._()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:z()}],mx:[{mx:z()}],my:[{my:z()}],ms:[{ms:z()}],me:[{me:z()}],mt:[{mt:z()}],mr:[{mr:z()}],mb:[{mb:z()}],ml:[{ml:z()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:N()}],w:[{w:[s,"screen",...N()]}],"min-w":[{"min-w":[s,"screen","none",...N()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[i]},...N()]}],h:[{h:["screen","lh",...N()]}],"min-h":[{"min-h":["screen","lh","none",...N()]}],"max-h":[{"max-h":["screen","lh",...N()]}],"font-size":[{text:["base",r,iB,iA]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,iD,iL]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",iC,iN]}],"font-family":[{font:[i$,iN,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,iD,iN]}],"line-clamp":[{"line-clamp":[ix,"none",iD,iL]}],leading:[{leading:[o,...C()]}],"list-image":[{"list-image":["none",iD,iN]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",iD,iN]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...$(),"wavy"]}],"text-decoration-thickness":[{decoration:[ix,"from-font","auto",iD,iA]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[ix,"auto",iD,iN]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",iD,iN]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",iD,iN]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:L()}],"bg-repeat":[{bg:I()}],"bg-size":[{bg:M()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},iS,iD,iN],radial:["",iD,iN],conic:[iS,iD,iN]},iH,iM]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:F()}],"gradient-via-pos":[{via:F()}],"gradient-to-pos":[{to:F()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:D()}],"rounded-s":[{"rounded-s":D()}],"rounded-e":[{"rounded-e":D()}],"rounded-t":[{"rounded-t":D()}],"rounded-r":[{"rounded-r":D()}],"rounded-b":[{"rounded-b":D()}],"rounded-l":[{"rounded-l":D()}],"rounded-ss":[{"rounded-ss":D()}],"rounded-se":[{"rounded-se":D()}],"rounded-ee":[{"rounded-ee":D()}],"rounded-es":[{"rounded-es":D()}],"rounded-tl":[{"rounded-tl":D()}],"rounded-tr":[{"rounded-tr":D()}],"rounded-br":[{"rounded-br":D()}],"rounded-bl":[{"rounded-bl":D()}],"border-w":[{border:B()}],"border-w-x":[{"border-x":B()}],"border-w-y":[{"border-y":B()}],"border-w-s":[{"border-s":B()}],"border-w-e":[{"border-e":B()}],"border-w-t":[{"border-t":B()}],"border-w-r":[{"border-r":B()}],"border-w-b":[{"border-b":B()}],"border-w-l":[{"border-l":B()}],"divide-x":[{"divide-x":B()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":B()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...$(),"hidden","none"]}],"divide-style":[{divide:[...$(),"hidden","none"]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...$(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ix,iD,iN]}],"outline-w":[{outline:["",ix,iB,iA]}],"outline-color":[{outline:A()}],shadow:[{shadow:["","none",c,iW,iF]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":["none",d,iW,iF]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[ix,iA]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":B()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":["none",p,iW,iF]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[ix,iD,iN]}],"mix-blend":[{"mix-blend":[...V(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":V()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ix]}],"mask-image-linear-from-pos":[{"mask-linear-from":U()}],"mask-image-linear-to-pos":[{"mask-linear-to":U()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":U()}],"mask-image-t-to-pos":[{"mask-t-to":U()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":U()}],"mask-image-r-to-pos":[{"mask-r-to":U()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":U()}],"mask-image-b-to-pos":[{"mask-b-to":U()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":U()}],"mask-image-l-to-pos":[{"mask-l-to":U()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":U()}],"mask-image-x-to-pos":[{"mask-x-to":U()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":U()}],"mask-image-y-to-pos":[{"mask-y-to":U()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[iD,iN]}],"mask-image-radial-from-pos":[{"mask-radial-from":U()}],"mask-image-radial-to-pos":[{"mask-radial-to":U()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":w()}],"mask-image-conic-pos":[{"mask-conic":[ix]}],"mask-image-conic-from-pos":[{"mask-conic-from":U()}],"mask-image-conic-to-pos":[{"mask-conic-to":U()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:I()}],"mask-size":[{mask:M()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",iD,iN]}],filter:[{filter:["","none",iD,iN]}],blur:[{blur:H()}],brightness:[{brightness:[ix,iD,iN]}],contrast:[{contrast:[ix,iD,iN]}],"drop-shadow":[{"drop-shadow":["","none",h,iW,iF]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:["",ix,iD,iN]}],"hue-rotate":[{"hue-rotate":[ix,iD,iN]}],invert:[{invert:["",ix,iD,iN]}],saturate:[{saturate:[ix,iD,iN]}],sepia:[{sepia:["",ix,iD,iN]}],"backdrop-filter":[{"backdrop-filter":["","none",iD,iN]}],"backdrop-blur":[{"backdrop-blur":H()}],"backdrop-brightness":[{"backdrop-brightness":[ix,iD,iN]}],"backdrop-contrast":[{"backdrop-contrast":[ix,iD,iN]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ix,iD,iN]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ix,iD,iN]}],"backdrop-invert":[{"backdrop-invert":["",ix,iD,iN]}],"backdrop-opacity":[{"backdrop-opacity":[ix,iD,iN]}],"backdrop-saturate":[{"backdrop-saturate":[ix,iD,iN]}],"backdrop-sepia":[{"backdrop-sepia":["",ix,iD,iN]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",iD,iN]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ix,"initial",iD,iN]}],ease:[{ease:["linear","initial",v,iD,iN]}],delay:[{delay:[ix,iD,iN]}],animate:[{animate:["none",y,iD,iN]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,iD,iN]}],"perspective-origin":[{"perspective-origin":k()}],rotate:[{rotate:W()}],"rotate-x":[{"rotate-x":W()}],"rotate-y":[{"rotate-y":W()}],"rotate-z":[{"rotate-z":W()}],scale:[{scale:q()}],"scale-x":[{"scale-x":q()}],"scale-y":[{"scale-y":q()}],"scale-z":[{"scale-z":q()}],"scale-3d":["scale-3d"],skew:[{skew:K()}],"skew-x":[{"skew-x":K()}],"skew-y":[{"skew-y":K()}],transform:[{transform:[iD,iN,"","none","gpu","cpu"]}],"transform-origin":[{origin:k()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:G()}],"translate-x":[{"translate-x":G()}],"translate-y":[{"translate-y":G()}],"translate-z":[{"translate-z":G()}],"translate-none":["translate-none"],accent:[{accent:A()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:A()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",iD,iN]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",iD,iN]}],fill:[{fill:["none",...A()]}],"stroke-w":[{stroke:[ix,iB,iA,iL]}],stroke:[{stroke:["none",...A()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function i2(...e){return i1(o3(e))}let i3=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,i5=(e,t)=>r=>{var n;if((null==t?void 0:t.variants)==null)return o3(e,null==r?void 0:r.class,null==r?void 0:r.className);let{variants:a,defaultVariants:o}=t,i=Object.keys(a).map(e=>{let t=null==r?void 0:r[e],n=null==o?void 0:o[e];if(null===t)return null;let i=i3(t)||i3(n);return a[e][i]}),s=r&&Object.entries(r).reduce((e,t)=>{let[r,n]=t;return void 0===n||(e[r]=n),e},{});return o3(e,i,null==t||null==(n=t.compoundVariants)?void 0:n.reduce((e,t)=>{let{class:r,className:n,...a}=t;return Object.entries(a).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...o,...s}[t]):({...o,...s})[t]===r})?[...e,r,n]:e},[]),null==r?void 0:r.class,null==r?void 0:r.className)},i9=i5("cursor-pointer inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-xl transition-all disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg:not([class*=size-])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary--hover active:bg-primary--pressed disabled:bg-primary--disabled disabled:opacity-20",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary--hover active:bg-secondary--pressed disabled:bg-secondary--disabled disabled:opacity-20",outline:"border border-button-outline bg-transparent text-foreground hover:border-button-outline-hover active:bg-button-outline-pressed disabled:border-border-dark disabled:opacity-20",ghost:"hover:bg-accent hover:text-accent-foreground active:bg-accent--pressed",contrast:"bg-contrast text-contrast-foreground hover:bg-contrast--hover active:bg-contrast--pressed disabled:bg-contrast--disabled disabled:opacity-30"},size:{default:"h-9 px-3.5 typo-button-normal [&_svg]:size-5",sm:"h-8 px-3 typo-button-small [&_svg]:size-4",lg:"h-11 px-4 typo-button-big [&_svg]:size-6",icon:"size-9 rounded-full [&_svg]:size-5","icon-sm":"size-8 rounded-full [&_svg]:size-4","icon-lg":"size-11 rounded-full [&_svg]:size-6"}},defaultVariants:{variant:"default",size:"default"}});function i4({className:e,variant:t,size:r,asChild:n=!1,...a}){return(0,A.jsx)(n?o0:"button",{"data-slot":"button",className:i2(i9({variant:t,size:r,className:e})),...a})}let i6=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)},i8=(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim();var i7={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let se=(0,L.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:a="",children:o,iconNode:i,...s},l)=>(0,L.createElement)("svg",{ref:l,...i7,width:t,height:t,stroke:e,strokeWidth:n?24*Number(r)/Number(t):r,className:i8("lucide",a),...!o&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(s)&&{"aria-hidden":"true"},...s},[...i.map(([e,t])=>(0,L.createElement)(e,t)),...Array.isArray(o)?o:[o]])),st=(R=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],(p=(0,L.forwardRef)(({className:e,...t},r)=>(0,L.createElement)(se,{ref:r,iconNode:R,className:i8(`lucide-${i6("x").replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,"lucide-x",e),...t}))).displayName=i6("x"),p);function sr({...e}){return(0,A.jsx)(ta,{"data-slot":"dialog",...e})}function sn({...e}){return(0,A.jsx)(tu,{"data-slot":"dialog-portal",...e})}function sa({className:e,...t}){return(0,A.jsx)(td,{"data-slot":"dialog-overlay",className:i2("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function so({className:e,children:t,contentInsideOverlay:r=!1,showCloseButton:n=!0,portalContainer:a,...o}){let i=(0,A.jsxs)(tg,{"data-slot":"dialog-content",className:i2("bg-background-containers data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-6 rounded-3xl border-0 p-6 shadow-[var(--shadow-login)] duration-200 outline-none sm:max-w-120 sm:p-10",e),...o,children:[t,n&&(0,A.jsxs)(tC,{"data-slot":"dialog-close",className:"focus-visible:ring-ring/30 absolute top-4 right-4 inline-flex size-6 cursor-pointer items-center justify-center rounded-full text-icons-light transition-colors hover:text-icons-normal focus-visible:text-icons-dark focus-visible:ring-2 focus-visible:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0",children:[(0,A.jsx)(st,{className:"size-6"}),(0,A.jsx)("span",{className:"sr-only",children:"Close"})]})]});return(0,A.jsx)(sn,{"data-slot":"dialog-portal",container:a,children:r?(0,A.jsx)(sa,{children:i}):(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(sa,{}),i]})})}function si({className:e,...t}){return(0,A.jsx)("div",{"data-slot":"dialog-header",className:i2("flex flex-col gap-2 text-left",e),...t})}function ss({className:e,...t}){return(0,A.jsx)(tw,{"data-slot":"dialog-title",className:i2("typo-base-18 text-text-dark",e),...t})}function sl({className:e,...t}){return(0,A.jsx)(tx,{"data-slot":"dialog-description",className:i2("typo-base-16 text-text-light",e),...t})}let su=(0,L.createContext)({theme:"system",setTheme:()=>null});function sc({children:e,defaultTheme:t="system",storageKey:r="v-theme",root:n=window.document.documentElement,enableStorage:a=!1,...o}){let[i,s]=(0,L.useState)(()=>a&&localStorage.getItem(r)||t);return(0,L.useEffect)(()=>{if(n.classList.remove("light","dark"),"system"===i){let e=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";n.classList.add(e);return}n.classList.add(i)},[i,n]),(0,A.jsx)(su,{...o,value:{theme:i,setTheme:e=>{a&&localStorage.setItem(r,e),s(e)}},children:e})}var sd=oG("../ui/src/styles/fonts.css?inline");function sp(e){return az.create({baseURL:e,timeout:3e4})}let sh=new Set(["common","delete","get","head","post","put","patch","options","purge","link","unlink"]);function sf(){return globalThis.process?.env?.NODE_ENV}function sg(e){if(void 0===e)return[];let t="function"==typeof e.toJSON?e.toJSON():e,r=[];return!function e(t,r){if(null!==t&&"object"==typeof t)for(let[n,a]of Object.entries(t)){if(null==a)continue;let t=n.toLowerCase();if("common"===t){e(a,r);continue}sh.has(t)||r.push([n,String(a)])}}(t,r),r}function sm(e){return!!("u">typeof FormData&&e instanceof FormData)||null!==e&&"object"==typeof e&&(e.constructor?.name==="FormData"||"function"==typeof e.getBoundary)}let sv=new Set(["authorization","cookie","set-cookie","x-xsrf-token"]);function sy(e){if(null==e)return;let t="function"==typeof e.toJSON?e.toJSON():e;if(null===t||"object"!=typeof t)return;let r={};for(let[e,n]of Object.entries(t))null!=n&&(r[e]=sv.has(e.toLowerCase())?"[redacted]":String(n));return r}function sb(e){if(null!=e){if("string"==typeof e)try{return JSON.parse(e)}catch{return e.length>2e3?`${e.slice(0,2e3)}… (${e.length} chars)`:e}return sm(e)?"[FormData]":e}}function sw(e){let t=(e.requestConfig.method??"GET").toUpperCase(),r=e.requestConfig.url??"",n=`[api:server] ${t} ${r} → ${e.status} (${e.durationMs}ms)`,a={requestId:e.requestId,...e.error?{error:e.error}:{},params:e.requestConfig.params,requestBody:sb(e.requestConfig.data),requestHeaders:sy(e.requestConfig.headers),responseHeaders:sy(e.responseHeaders),responseBody:sb(e.responseBody)};(e.status>=500||void 0!==e.error&&0===e.status?console.error:e.status>=400?console.warn:console.log)(n,a)}let sk=function({clientName:e,configureFunctionName:t,defaultBaseURL:r}){let n=sp(r),a=sp(r),o=null,i=null,s=null,l=null,u=null,c=null;async function d(e,t){let r=function(e,t){let r;if(void 0===t.data||sm(t.data))return t;let n=aH.from(t.headers);return n.has("Content-Type")||void 0!==(r=e.defaults.headers.common)&&aH.from(r).has("Content-Type")||n.set("Content-Type","application/json"),t.headers=n,t}(e,function(e){let t=aH.from(e.headers);if(null!==s){let e=s()?.trim();e&&!t.has("Authorization")&&t.set("Authorization",`Bearer ${e}`)}if(null!==c)for(let[r,n]of Object.entries(c({url:e.url,method:e.method})))n&&!t.has(r)&&t.set(r,n);return e.headers=t,e}({...t})),n=function(e){let t,r=aH.from(e.headers),n=r.get("x-request-id");if("string"==typeof n&&n.length>0)return n;let a=(t=globalThis.crypto,"function"==typeof t?.randomUUID?t.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`);return r.set("x-request-id",a),e.headers=r,a}(r),a=function(){if("u">typeof window)return!1;let e=sf(),t=globalThis.process;return t?.env?.DEBUG_API==="true"||"production"!==e&&"test"!==e&&"testing"!==e}(),o=a?Date.now():0;try{let t=await e.request(r);return a&&sw({requestConfig:r,requestId:n,status:t.status,durationMs:Date.now()-o,responseHeaders:t.headers,responseBody:t.data}),t}catch(e){throw a&&sw({requestConfig:r,requestId:n,status:e.response?.status??0,durationMs:Date.now()-o,responseHeaders:e.response?.headers,responseBody:e.response?.data,error:e.message}),e}}async function p(e){return d(e.skipUnauthorizedRecovery?a:n,function(e){let{skipUnauthorizedRecovery:t,...r}=e;return r}(e))}let h=async e=>p({...e,skipUnauthorizedRecovery:!0});function f(){return null!==o}return{configureClientRuntime:function(t){let r,i=(r=function(e){let t=sg(e);if(0===t.length)return;let r=new Map;for(let[e,n]of t)r.set(e.toLowerCase(),n);return Object.fromEntries(Array.from(r.entries()).sort(([e],[t])=>e.localeCompare(t)))}(t.headers),JSON.stringify({...void 0!==t.baseURL?{baseURL:t.baseURL}:{},...void 0!==t.timeout?{timeout:t.timeout}:{},...void 0!==r?{headers:r}:{}}));if("{}"!==i){if(null!==o){if(o===i)return;let t=`${e} already configured. Existing: ${o}. New: ${i}.`;if("production"===sf())return void console.warn(t);throw Error(t)}for(let e of[n,a])void 0!==t.baseURL&&(e.defaults.baseURL=t.baseURL),void 0!==t.timeout&&(e.defaults.timeout=t.timeout),void 0!==t.headers&&function(e,t){let r=e.defaults.headers,n=r.common,a=aH.from(n);for(let[e,r]of sg(t))a.set(e,r);r.common=a.toJSON(),e.defaults.headers=r}(e,t.headers);o=i}},configureAccessTokenResolverRuntime:function(e){s=e},configureUnauthorizedHandlerRuntime:function(e){if(l=e,null===e){null!==i&&(n.interceptors.response.eject(i),i=null),u=null;return}null===i&&(i=n.interceptors.response.use(e=>e,async e=>{let t=e.config;if(e.response?.status!==401||null===l||void 0===t||t._apiRetried)return Promise.reject(e);if(null===u){let t=l;if(null===t)return Promise.reject(e);u=Promise.resolve().then(()=>t(e,{requestWithoutUnauthorizedRecovery:h})).finally(()=>{u=null})}try{if(!await u)return Promise.reject(e);t._apiRetried=!0;let r=aH.from(t.headers);return r.delete("Authorization"),t.headers=r,d(n,t)}catch{return Promise.reject(e)}}))},configureHeadersResolverRuntime:function(e){c=e},isClientConfiguredRuntime:f,assertClientConfiguredRuntime:function(){if(!f())throw Error(`${e} is not configured. Call ${t}(...) before making requests.`)},resetClientForTestsRuntime:function(){let e;if("test"!==(e=sf())&&"testing"!==e)throw Error("resetApiClientForTests() can only be called in test environment.");n=sp(r),a=sp(r),o=null,i=null,s=null,l=null,u=null,c=null},requestRuntime:p,requestWithoutUnauthorizedRecovery:h,addResponseInterceptorRuntime:function(e,t){return n.interceptors.response.use(e,t)}}}({clientName:"API node client",configureFunctionName:"configureNodeApiClient",defaultBaseURL:"https://api.vizbl.com"}),sx=sk.configureClientRuntime;sk.configureAccessTokenResolverRuntime,sk.configureHeadersResolverRuntime,sk.configureUnauthorizedHandlerRuntime,sk.isClientConfiguredRuntime,sk.assertClientConfiguredRuntime,sk.resetClientForTestsRuntime;let sS=sk.requestRuntime;async function sC(e){return sS(e)}async function sP(e,t={}){let{client:r=sC,...n}=t;return(await r({method:"POST",url:"/nano-banana/guest/try-on/generate/sync",data:e,...n})).data}async function sE(e,t={}){let{client:r=sC,...n}=t;return(await r({method:"POST",url:"/nano-banana/guest/upload/request",params:e,...n})).data}async function sT(e,t={}){let{client:r=sC,...n}=t;return(await r({method:"POST",url:"/public/widget/activate-try-on",params:e,...n})).data}async function sR(e,t={}){let{client:r=sC,...n}=t;return(await r({method:"POST",url:"/public/try-on/upload/request",params:e,...n})).data}async function sO(e,t={}){let{client:r=sC,...n}=t;return(await r({method:"POST",url:"/public/try-on/generate",data:e,...n})).data}async function sj(e,t={}){let{client:r=sC,...n}=t;return(await r({method:"POST",url:"/public/widget/token",data:e,...n})).data}async function s_(e,t={}){let{client:r=sC,...n}=t;return(await r({method:"POST",url:"/public/widget/events",data:e,...n})).data}async function sz(e={}){let{client:t=sC,...r}=e;return(await t({method:"POST",url:"/session/guest",...r})).data}function sN(e){return e?.trim()||void 0}sk.requestWithoutUnauthorizedRecovery,sk.addResponseInterceptorRuntime;let sA="x-guest-token";class sL{createGuestSession;guestTokenPromise=null;constructor({createGuestSession:e=sI}={}){this.createGuestSession=e}async requestUploadUrls(e){return this.withGuestAuth(t=>sE({count:e},{headers:t}))}async generateTryOn(e,t={}){return this.withGuestAuth(r=>sP(e,{headers:r,responseType:"blob",timeout:t.timeout??9e4}))}sendWidgetEvent(){}async withGuestAuth(e){let t=this.getGuestToken(),r=await t;try{return await e({[sA]:r})}catch(r){var n;if(n=r,n?.response?.status!==401&&n?.status!==401)throw r;return e({[sA]:await this.replaceGuestToken(t)})}}getGuestToken(){return this.guestTokenPromise||(this.guestTokenPromise=this.requestGuestToken(),this.forgetTokenOnFailure(this.guestTokenPromise)),this.guestTokenPromise}replaceGuestToken(e){return(this.guestTokenPromise===e||null===this.guestTokenPromise)&&(this.guestTokenPromise=this.requestGuestToken(),this.forgetTokenOnFailure(this.guestTokenPromise)),this.guestTokenPromise}async requestGuestToken(){var e,t=await this.createGuestSession();let r="string"==typeof(e=t?.token)?e.trim():"";if(!r)throw Error("AI try-on guest session response is missing a token");return r}forgetTokenOnFailure(e){e.catch(()=>{this.guestTokenPromise===e&&(this.guestTokenPromise=null)})}}function sI(e){return sz(e)}class sM{apiConfig;issueWidgetToken;now;refreshThresholdMs;refreshPromise=null;session;constructor(e,t={}){this.apiConfig=t.apiConfig,this.issueWidgetToken=t.issueWidgetToken??sj,this.now=t.now??Date.now,this.refreshThresholdMs=t.refreshThresholdMs??3e4,this.session=this.toSnapshot(e)}get snapshot(){return{...this.session}}async getTokenForRequest(){return this.isCloseToExpiry()?(await this.refresh()).token:this.session.token}async getApiConfigForRequest(e){let t=await this.getTokenForRequest();return{...this.apiConfig,...e,headers:{...this.apiConfig?.headers,...e?.headers,"x-widget-session-token":t}}}isCloseToExpiry(){return this.session.expiresAt-this.now()<=this.refreshThresholdMs}refresh(){return this.refreshPromise||(this.refreshPromise=this.issueWidgetToken({token:this.session.token},this.apiConfig).then(e=>(this.session=this.toSnapshot(e),this.snapshot)).finally(()=>{this.refreshPromise=null})),this.refreshPromise}toSnapshot(e){return{token:e.token,sid:e.sid,expiresAt:this.now()+1e3*e.expiresIn}}}let sF=(e,t)=>s_(e,t),sD=e=>sT.length>0?sT(void 0,e):sT(e);class sB{activateTryOn;apiConfig;createWidgetEvent;sessionPromise=null;constructor({activateTryOn:e=sD,createWidgetEvent:t=sF,apiKey:r}={}){this.activateTryOn=e,this.createWidgetEvent=t,this.apiConfig={headers:function(e){let t=e?.trim();return t?{"x-api-key":t}:{}}(r)}}async requestUploadUrls(e){return sR({count:e},await this.getApiConfigForRequest())}async generateTryOn(e,t={}){return sO(e,await this.getApiConfigForRequest({responseType:"blob",timeout:t.timeout??9e4}))}async getApiConfigForRequest(e={}){return(await this.getSession()).getApiConfigForRequest({...e,headers:{...this.apiConfig.headers,...e.headers}})}sendWidgetEvent(e){this.getApiConfigForRequest().then(t=>this.createWidgetEvent({event:e,timestamp:new Date().toISOString()},t)).catch(()=>{})}getSession(){if(this.sessionPromise)return this.sessionPromise;let e=this.activateTryOn(this.apiConfig).then(e=>{var t,r;let n=(t=function(e){let t=e?.widgetSession;if(null===t||"object"!=typeof t)throw Error("AI try-on activation response is missing Widget Session");return{expiresIn:Number(t.expiresIn),sid:s$(t.sid),token:s$(t.token)}}(e),r={apiConfig:this.apiConfig},t?.token&&t.sid&&Number.isFinite(t.expiresIn)?new sM(t,r):null);if(!n)throw Error("AI try-on activation response is missing Widget Session");return n});return this.sessionPromise=e,e.catch(()=>{this.sessionPromise===e&&(this.sessionPromise=null)}),e}}function s$(e){return"string"==typeof e?e.trim():""}function sV({apiKey:e}={}){let t=sN(e);return t?new sB({apiKey:t}):new sL(void 0)}let sU={en:{ns1:{back:"Back",badge:"Try it on",confirmBadge:"Almost there",close:"Close",comparisonSlider:"Comparison slider",comparisonTitle:"Compare before and after",confirmChangePhoto:"Change photo",confirmGenerate:"Generate my look",confirmSubtitle:"Hit Generate and see how it looks on you",confirmTitle:"Ready to try it on?",dialogDescription:"AI try-on widget dialog",dialogTitle:"AI Try-On",download:"Download",errorBadge:"Little error",errorDifferentPhoto:"Change photo",errorFileTooLarge:"File is too large. Maximum file size is 10 MB",errorGuidance:"Try again with a different photo. Make sure it shows your full body.",errorRetry:"Try again",errorSubtitle:"It happens — let's try again",errorTitle:"Something went wrong",historyPhoto:"Previous photo",historySubtitle:"Use a previous photo or upload something new",historyTitle:"Your photos",historyUploadNew:"Upload new",bagIntroBadCropped:"Cropped photo",bagIntroBadHandsFull:"Both hands already full",bagIntroGoodAngle:"Slight angle",bagIntroGoodFullBody:"Full body, one hand free",bagIntroSubtitle:"A full-body shot with one shoulder or hand free",bagIntroTitle:"Strike a carrying pose",eyewearIntroBadFaceTurned:"Face turned away",eyewearIntroBadWearingGlasses:"Already wearing glasses",eyewearIntroGoodFacingCamera:"Facing camera, eyes visible",eyewearIntroGoodHairBack:"Hair back, good light",eyewearIntroSubtitle:"Straight-on photo works best.",eyewearIntroTitle:"Glasses go right on your face",fullBodyIntroBadCropped:"Cropped at the waist",fullBodyIntroBadSitting:"Sitting hides the fit",fullBodyIntroGoodAngle:"Slight angle, body visible",fullBodyIntroGoodHeadToToe:"Head to toe in frame",fullBodyIntroSubtitle:"Full-body photos work best — here's what to look for",fullBodyIntroTitle:"Better photo, better result",footwearIntroBadFeetHidden:"Feet hidden",footwearIntroBadOneFootCropped:"One foot out of frame",footwearIntroGoodKneesDown:"Knees-down on flat ground",footwearIntroGoodStanding:"Standing, both feet visible",footwearIntroSubtitle:"Both feet in the frame, standing on a plain floor.",footwearIntroTitle:"Down to your feet",headwearIntroBadCroppedHead:"Head cropped out",headwearIntroBadWearingHat:"Already wearing a hat",headwearIntroGoodAngle:"Slight angle, head in frame",headwearIntroGoodFront:"Head and shoulders, front on",headwearIntroSubtitle:"A head-and-shoulders shot with your whole head in view",headwearIntroTitle:"Heads up",introCta:"Got it, continue",introBadge:"Quick tip",myFits:"My fits",lowerBodyIntroBadCoveredWaist:"Top covers the waistline",lowerBodyIntroBadSitting:"Sitting bends the legs",lowerBodyIntroGoodFullBody:"Full body works too",lowerBodyIntroGoodWaistToFeet:"Waist to feet, standing",lowerBodyIntroSubtitle:"Stand up and show us everything from waist to feet.",lowerBodyIntroTitle:"It’s all about the legs",neckIntroBadHairCovering:"Hair covers neck and ears",neckIntroBadHighCollar:"High collar hides the neck",neckIntroGoodHairUp:"Hair up, neck visible",neckIntroGoodOpenNeckline:"Open neckline, chest up",neckIntroSubtitle:"Jewelry needs open skin — hair back, neckline clear.",neckIntroTitle:"Neck and ears, front and center",processingBadge:"Wait a second",processingProgress:"Reading your photo…",processingSubtitle:"Hang tight while we dress you up",processingTitle:"Working our magic…",reset:"Reset",resultBadge:"That’s the one",resultCompare:"Change photo",resultOpenComparison:"View before / after",resultProductLink:"View product",resultReset:"Save",resultShare:"Share",resultTitle:"Here's how it looks on you",resultTryAnother:"Add To Cart",resultTryAnotherWithPrice:"Add To Cart – {{price}}",share:"Share",startHistory:"View previous results",startTitle:"Want to see it on you?",startUpload:"Choose your photo",termsJoiner:"&",termsLink:"Terms",termsPrefix:"By using this service, your agree to",privacyLink:"privacy Policy",upperBodyIntroBadArmsCrossed:"Arms crossed hide the fit",upperBodyIntroBadObjectBlockingTorso:"Object blocks the torso",upperBodyIntroGoodAngle:"Slight angle",upperBodyIntroGoodFacingCamera:"Hips up, facing camera",upperBodyIntroSubtitle:"From the hips up, arms relaxed — that’s all this one needs.",upperBodyIntroTitle:"Let’s see your top half",waistIntroBadOversizedTop:"Oversized top hides the waist",waistIntroBadSitting:"Sitting folds the waistline",waistIntroGoodFullBody:"Full body, waistline visible",waistIntroGoodTopTucked:"Top tucked in, waist visible",waistIntroSubtitle:"Tuck in your top so we can see exactly where the belt sits.",waistIntroTitle:"Show your waistline",wristIntroBadClenchedFist:"Clenched fist",wristIntroBadCovered:"Sleeve covers the wrist",wristIntroGoodCloseUp:"Wrist close-up, hand relaxed",wristIntroGoodSleeveBack:"Sleeve pulled back",wristIntroSubtitle:"A close-up of your wrist does the trick.",wristIntroTitle:"Give us a hand"}},ru:{ns1:{back:"Назад",badge:"Примерить",confirmBadge:"Почти готово",close:"Закрыть",comparisonSlider:"Слайдер сравнения",comparisonTitle:"Сравнение до и после",confirmChangePhoto:"Изменить фото",confirmGenerate:"Сгенерировать образ",confirmSubtitle:"Нажмите \xabСгенерировать\xbb, чтобы увидеть, как это выглядит на вас",confirmTitle:"Готовы примерить?",dialogDescription:"Диалог виджета AI-примерки",dialogTitle:"AI-примерка",download:"Скачать",errorBadge:"Небольшая ошибка",errorDifferentPhoto:"Изменить фото",errorFileTooLarge:"Файл слишком большой. Максимальный размер файла — 10 МБ",errorGuidance:"Попробуйте другое фото. Убедитесь, что вы видны в полный рост.",errorRetry:"Попробовать снова",errorSubtitle:"Так бывает — попробуем еще раз",errorTitle:"Что-то пошло не так",historyPhoto:"Предыдущее фото",historySubtitle:"Используйте предыдущее фото или загрузите новое",historyTitle:"Ваши фото",historyUploadNew:"Загрузить новое",bagIntroBadCropped:"Слишком крупный план",bagIntroBadHandsFull:"Обе руки заняты",bagIntroGoodAngle:"По пояс, под небольшим углом",bagIntroGoodFullBody:"В полный рост, одна рука свободна",bagIntroSubtitle:"В кадре должен быть виден торс. Оставьте свободной одну руку или плечо.",bagIntroTitle:"Загрузите фото по пояс или в полный рост",eyewearIntroBadFaceTurned:"Лицо отвернуто от камеры",eyewearIntroBadWearingGlasses:"Очки уже надеты",eyewearIntroGoodFacingCamera:"Лицом к камере, глаза видны",eyewearIntroGoodHairBack:"Селфи под небольшим углом",eyewearIntroSubtitle:"В кадре должны быть хорошо видны лицо и глаза.",eyewearIntroTitle:"Загрузите фото лица",fullBodyIntroBadCropped:"Фото по пояс",fullBodyIntroBadSitting:"Сидячая поза",fullBodyIntroGoodAngle:"Селфи под небольшим углом",fullBodyIntroGoodHeadToToe:"Всё тело в кадре",fullBodyIntroSubtitle:"В кадре должно быть видно вас целиком.",fullBodyIntroTitle:"Загрузите фото в полный рост",footwearIntroBadFeetHidden:"Стопы не видны",footwearIntroBadOneFootCropped:"Одна стопа не попала в кадр",footwearIntroGoodKneesDown:"От колен до стоп, на ровном полу",footwearIntroGoodStanding:"В полный рост, обе стопы в кадре",footwearIntroSubtitle:"Встаньте на ровный пол. Обе стопы должны быть в кадре.",footwearIntroTitle:"Загрузите фото, где видны обе стопы",headwearIntroBadCroppedHead:"Часть головы не попала в кадр",headwearIntroBadWearingHat:"На фото уже есть головной убор",headwearIntroGoodAngle:"Селфи под небольшим углом",headwearIntroGoodFront:"Анфас, голова и плечи в кадре",headwearIntroSubtitle:"В кадре должны быть видны голова и плечи целиком.",headwearIntroTitle:"Загрузите фото головы и плеч",introCta:"Продолжить",introBadge:"Совет",myFits:"My fits",lowerBodyIntroBadCoveredWaist:"Свободная одежда скрывает линию талии",lowerBodyIntroBadSitting:"В сидячей позе ноги согнуты",lowerBodyIntroGoodFullBody:"Фото в полный рост",lowerBodyIntroGoodWaistToFeet:"От пояса до стоп, стоя",lowerBodyIntroSubtitle:"В кадре должны быть видны ноги целиком.",lowerBodyIntroTitle:"Загрузите фото от пояса до стоп",neckIntroBadHairCovering:"Волосы закрывают шею и уши",neckIntroBadHighCollar:"Одежда закрывает шею",neckIntroGoodHairUp:"Лицом к камере, волосы убраны",neckIntroGoodOpenNeckline:"Селфи под небольшим углом",neckIntroSubtitle:"В кадре должны быть видны шея и уши.",neckIntroTitle:"Загрузите фото головы и плеч",processingBadge:"Секунду",processingProgress:"Считываем ваше фото…",processingSubtitle:"Подождите, пока мы примеряем образ",processingTitle:"Творим магию…",reset:"Сбросить",resultBadge:"То, что нужно",resultCompare:"Изменить фото",resultOpenComparison:"До / после",resultProductLink:"Открыть товар",resultReset:"Сохранить",resultShare:"Поделиться",resultTitle:"Вот как это выглядит на вас",resultTryAnother:"Add To Cart",resultTryAnotherWithPrice:"Add To Cart – {{price}}",share:"Поделиться",startHistory:"Смотреть прошлые результаты",startTitle:"Хотите увидеть это на себе?",startUpload:"Выбрать фото",termsJoiner:"и",termsLink:"Условиями",termsPrefix:"Используя сервис, вы соглашаетесь с",privacyLink:"Политикой конфиденциальности",upperBodyIntroBadArmsCrossed:"Скрещённые руки закрывают торс",upperBodyIntroBadObjectBlockingTorso:"Предмет в руках закрывает торс",upperBodyIntroGoodAngle:"Селфи под небольшим углом",upperBodyIntroGoodFacingCamera:"По пояс, лицом к камере",upperBodyIntroSubtitle:"В кадре должны быть видны торс и расслабленные руки.",upperBodyIntroTitle:"Загрузите фото по пояс",waistIntroBadOversizedTop:"Одежда закрывает линию талии",waistIntroBadSitting:"В сидячей позе линия талии искажается",waistIntroGoodFullBody:"В полный рост, талия видна",waistIntroGoodTopTucked:"По пояс, талия видна",waistIntroSubtitle:"Линия талии должна быть открыта и хорошо видна.",waistIntroTitle:"Загрузите фото, где видна талия",wristIntroBadClenchedFist:"Сжатый кулак исказит результат",wristIntroBadCovered:"Одежда закрывает запястье",wristIntroGoodCloseUp:"Расслабленная кисть",wristIntroGoodSleeveBack:"Запястье открыто",wristIntroSubtitle:"В кадре должны быть видны кисть и запястье.",wristIntroTitle:"Загрузите фото руки"}}},sH=/initial-value:([^;}]+)/i,sW=/inherits:\s*false(?:\s*;|\s*$)/i,sq=(h=(O=oG("./src/style.css?inline").A).replace(/:root\s*,\s*:host|:root/g,":host"),(f=Array.from(O.matchAll(/@property\s+(--[^{\s]+)\s*\{([^}]*)\}/g)).map(([,e,t])=>{if(!sW.test(t))return null;let r=t.match(sH)?.[1].trim()??"initial";return` ${e}: ${r};`}).filter(e=>null!==e).join("\n"))?`${h}
|
|
5484
5482
|
|
|
5485
|
-
${h}`:h),sq=["full-body","upper-body","lower-body","footwear","headwear","eyewear","neck","wrist","bag","waist"],sK=new Set(sq);function sG(e){return"string"==typeof e&&sK.has(e)}function sX(e,t="productType"){if(!sG(e)){let r="string"==typeof e&&e.length>0?` "${e}"`:"";throw Error(`AI try-on ${t} must be one of: ${sq.join(", ")}; received${r||" no value"}`)}}function sY(e){return(0,A.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 8.37303 5.00342",fill:"none",...e,children:(0,A.jsx)("path",{d:"M1 1L4.18652 4.00342L7.37303 1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function sQ(e,t){-1===e.indexOf(t)&&e.push(t)}function sZ(e,t){let r=e.indexOf(t);r>-1&&e.splice(r,1)}class sJ{constructor(){this.subscriptions=[]}add(e){return sQ(this.subscriptions,e),()=>sZ(this.subscriptions,e)}notify(e,t,r){let n=this.subscriptions.length;if(n)if(1===n)this.subscriptions[0](e,t,r);else for(let a=0;a<n;a++){let n=this.subscriptions[a];n&&n(e,t,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}let s0={},s1=e=>e,s2=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function s3(e,t){let r=!1,n=!0,a={delta:0,timestamp:0,isProcessing:!1},o=()=>r=!0,i=s2.reduce((e,r)=>(e[r]=function(e,t){let r=new Set,n=new Set,a=!1,o=!1,i=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},l=0;function u(t){i.has(t)&&(c.schedule(t),e()),l++,t(s)}let c={schedule:(e,t=!1,o=!1)=>{let s=o&&a?r:n;return t&&i.add(e),s.add(e),e},cancel:e=>{n.delete(e),i.delete(e)},process:e=>{if(s=e,a){o=!0;return}a=!0;let i=r;r=n,n=i,r.forEach(u),t,l=0,r.clear(),a=!1,o&&(o=!1,c.process(e))}};return c}(o,t?r:void 0),e),{}),{setup:s,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:p,render:h,postRender:f}=i,g=()=>{let o=s0.useManualTiming,i=o?a.timestamp:performance.now();r=!1,o||(a.delta=n?1e3/60:Math.max(Math.min(i-a.timestamp,40),1)),a.timestamp=i,a.isProcessing=!0,s.process(a),l.process(a),u.process(a),c.process(a),d.process(a),p.process(a),h.process(a),f.process(a),a.isProcessing=!1,r&&t&&(n=!1,e(g))};return{schedule:s2.reduce((t,o)=>{let s=i[o];return t[o]=(t,o=!1,i=!1)=>(!r&&(r=!0,n=!0,a.isProcessing||e(g)),s.schedule(t,o,i)),t},{}),cancel:e=>{for(let t=0;t<s2.length;t++)i[s2[t]].cancel(e)},state:a,steps:i}}let{schedule:s5,cancel:s9,state:s4,steps:s6}=s3("u">typeof requestAnimationFrame?requestAnimationFrame:s1,!0);function s8(){t=void 0}let s7={now:()=>(void 0===t&&s7.set(s4.isProcessing||s0.useManualTiming?s4.timestamp:performance.now()),t),set:e=>{t=e,queueMicrotask(s8)}},le={current:void 0};class lt{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=s7.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=s7.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=!isNaN(parseFloat(this.current)))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new sJ);let r=this.events[e].add(t);return"change"===e?()=>{r(),s5.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,r){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return le.current&&le.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){var e;let t=s7.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;let r=Math.min(this.updatedAt-this.prevUpdatedAt,30);return e=parseFloat(this.current)-parseFloat(this.prevFrameValue),r?1e3/r*e:0}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function lr(e,t){return new lt(e,t)}let ln=(0,L.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function la(e){let t=(0,L.useRef)(null);return null===t.current&&(t.current=e()),t.current}function lo(e){let t=la(()=>lr(e)),{isStatic:r}=(0,L.useContext)(ln);if(r){let[,r]=(0,L.useState)(e);(0,L.useEffect)(()=>t.on("change",r),[])}return t}let li=e=>!!(e&&e.getVelocity),ls=()=>{},ll=()=>{},lu=(e,t)=>r=>t(e(r)),lc=(...e)=>e.reduce(lu),ld=(e,t,r)=>r>t?t:r<e?e:r,lp=e=>1e3*e,lh={layout:0,mainThread:0,waapi:0},lf=e=>t=>"string"==typeof t&&t.startsWith(e),lg=lf("--"),lm=lf("var(--"),lv=e=>!!lm(e)&&ly.test(e.split("/*")[0].trim()),ly=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function lb(e){return"string"==typeof e&&e.split("/*")[0].includes("var(--")}let lw={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},lk={...lw,transform:e=>ld(0,1,e)},lx={...lw,default:1},lS=e=>Math.round(1e5*e)/1e5,lC=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,lP=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,lE=(e,t)=>r=>!!("string"==typeof r&&lP.test(r)&&r.startsWith(e)||t&&null!=r&&Object.prototype.hasOwnProperty.call(r,t)),lT=(e,t,r)=>n=>{if("string"!=typeof n)return n;let[a,o,i,s]=n.match(lC);return{[e]:parseFloat(a),[t]:parseFloat(o),[r]:parseFloat(i),alpha:void 0!==s?parseFloat(s):1}},lR={...lw,transform:e=>Math.round(ld(0,255,e))},lO={test:lE("rgb","red"),parse:lT("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+lR.transform(e)+", "+lR.transform(t)+", "+lR.transform(r)+", "+lS(lk.transform(n))+")"},lj={test:lE("#"),parse:function(e){let t="",r="",n="",a="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),n=e.substring(5,7),a=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),n=e.substring(3,4),a=e.substring(4,5),t+=t,r+=r,n+=n,a+=a),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:a?parseInt(a,16)/255:1}},transform:lO.transform},l_=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),lz=l_("deg"),lN=l_("%"),lA=l_("px"),lL=l_("vh"),lI=l_("vw"),lM={...lN,parse:e=>lN.parse(e)/100,transform:e=>lN.transform(100*e)},lF={test:lE("hsl","hue"),parse:lT("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+lN.transform(lS(t))+", "+lN.transform(lS(r))+", "+lS(lk.transform(n))+")"},lD={test:e=>lO.test(e)||lj.test(e)||lF.test(e),parse:e=>lO.test(e)?lO.parse(e):lF.test(e)?lF.parse(e):lj.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?lO.transform(e):lF.transform(e),getAnimatableNone:e=>{let t=lD.parse(e);return t.alpha=0,lD.transform(t)}},lB=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,l$="number",lV="color",lU=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function lH(e){let t=e.toString(),r=[],n={color:[],number:[],var:[]},a=[],o=0,i=t.replace(lU,e=>(lD.test(e)?(n.color.push(o),a.push(lV),r.push(lD.parse(e))):e.startsWith("var(")?(n.var.push(o),a.push("var"),r.push(e)):(n.number.push(o),a.push(l$),r.push(parseFloat(e))),++o,"${}")).split("${}");return{values:r,split:i,indexes:n,types:a}}function lW({split:e,types:t}){let r=e.length;return n=>{let a="";for(let o=0;o<r;o++)if(a+=e[o],void 0!==n[o]){let e=t[o];e===l$?a+=lS(n[o]):e===lV?a+=lD.transform(n[o]):a+=n[o]}return a}}let lq={test:function(e){return isNaN(e)&&"string"==typeof e&&(e.match(lC)?.length||0)+(e.match(lB)?.length||0)>0},parse:function(e){return lH(e).values},createTransformer:function(e){return lW(lH(e))},getAnimatableNone:function(e){let t=lH(e);return lW(t)(t.values.map((e,r)=>((e,t)=>"number"==typeof e?t?.trim().endsWith("/")?e:0:"number"==typeof e?0:lD.test(e)?lD.getAnimatableNone(e):e)(e,t.split[r])))}};function lK(e,t,r){return(r<0&&(r+=1),r>1&&(r-=1),r<1/6)?e+(t-e)*6*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function lG(e,t){return r=>r>0?t:e}let lX=(e,t,r)=>e+(t-e)*r,lY=(e,t,r)=>{let n=e*e,a=r*(t*t-n)+n;return a<0?0:Math.sqrt(a)},lQ=[lj,lO,lF];function lZ(e){let t=lQ.find(t=>t.test(e));if(ls(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let r=t.parse(e);return t===lF&&(r=function({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,r/=100;let a=0,o=0,i=0;if(t/=100){let n=r<.5?r*(1+t):r+t-r*t,s=2*r-n;a=lK(s,n,e+1/3),o=lK(s,n,e),i=lK(s,n,e-1/3)}else a=o=i=r;return{red:Math.round(255*a),green:Math.round(255*o),blue:Math.round(255*i),alpha:n}}(r)),r}let lJ=(e,t)=>{let r=lZ(e),n=lZ(t);if(!r||!n)return lG(e,t);let a={...r};return e=>(a.red=lY(r.red,n.red,e),a.green=lY(r.green,n.green,e),a.blue=lY(r.blue,n.blue,e),a.alpha=lX(r.alpha,n.alpha,e),lO.transform(a))},l0=new Set(["none","hidden"]);function l1(e,t){return r=>lX(e,t,r)}function l2(e){return"number"==typeof e?l1:"string"==typeof e?lv(e)?lG:lD.test(e)?lJ:l9:Array.isArray(e)?l3:"object"==typeof e?lD.test(e)?lJ:l5:lG}function l3(e,t){let r=[...e],n=r.length,a=e.map((e,r)=>l2(e)(e,t[r]));return e=>{for(let t=0;t<n;t++)r[t]=a[t](e);return r}}function l5(e,t){let r={...e,...t},n={};for(let a in r)void 0!==e[a]&&void 0!==t[a]&&(n[a]=l2(e[a])(e[a],t[a]));return e=>{for(let t in n)r[t]=n[t](e);return r}}let l9=(e,t)=>{let r=lq.createTransformer(t),n=lH(e),a=lH(t);if(n.indexes.var.length===a.indexes.var.length&&n.indexes.color.length===a.indexes.color.length&&n.indexes.number.length>=a.indexes.number.length){if(l0.has(e)&&!a.values.length||l0.has(t)&&!n.values.length)return l0.has(e)?r=>r<=0?e:t:r=>r>=1?t:e;return lc(l3(function(e,t){let r=[],n={color:0,var:0,number:0};for(let a=0;a<t.values.length;a++){let o=t.types[a],i=e.indexes[o][n[o]],s=e.values[i]??0;r[a]=s,n[o]++}return r}(n,a),a.values),r)}return ls(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),lG(e,t)};function l4(e,t,r){return"number"==typeof e&&"number"==typeof t&&"number"==typeof r?lX(e,t,r):l2(e)(e,t)}let l6=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>s5.update(t,e),stop:()=>s9(t),now:()=>s4.isProcessing?s4.timestamp:s7.now()}},l8=(e,t,r=10)=>{let n="",a=Math.max(Math.round(t/r),2);for(let t=0;t<a;t++)n+=Math.round(1e4*e(t/(a-1)))/1e4+", ";return`linear(${n.substring(0,n.length-2)})`};function l7(e){let t=0,r=e.next(t);for(;!r.done&&t<2e4;)t+=50,r=e.next(t);return t>=2e4?1/0:t}let ue=.01,ut=2,ur=.005,un=.5;function ua(e,t){return e*Math.sqrt(1-t*t)}let uo=["duration","bounce"],ui=["stiffness","damping","mass"];function us(e,t){return t.some(t=>void 0!==e[t])}function ul(e=.3,t=.3){let r,n,a,o,i,s,l="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e,{restSpeed:u,restDelta:c}=l,d=l.keyframes[0],p=l.keyframes[l.keyframes.length-1],h={done:!1,value:d},{stiffness:f,damping:g,mass:m,duration:v,velocity:y,isResolvedFromDuration:b}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!us(e,ui)&&us(e,uo))if(t.velocity=0,e.visualDuration){let r=2*Math.PI/(1.2*e.visualDuration),n=r*r,a=2*ld(.05,1,1-(e.bounce||0))*Math.sqrt(n);t={...t,mass:1,stiffness:n,damping:a}}else{let r=function({duration:e=800,bounce:t=.3,velocity:r=0,mass:n=1}){let a,o;ls(e<=lp(10),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-t;i=ld(.05,1,i),e=ld(.01,10,e/1e3),i<1?(a=t=>{let n=t*i,a=n*e;return .001-(n-r)/ua(t,i)*Math.exp(-a)},o=t=>{let n=t*i*e,o=Math.pow(i,2)*Math.pow(t,2)*e,s=Math.exp(-n),l=ua(Math.pow(t,2),i);return(n*r+r-o)*s*(-a(t)+.001>0?-1:1)/l}):(a=t=>-.001+Math.exp(-t*e)*((t-r)*e+1),o=t=>e*e*(r-t)*Math.exp(-t*e));let s=function(e,t,r){let n=r;for(let r=1;r<12;r++)n-=e(n)/t(n);return n}(a,o,5/e);if(e=lp(e),isNaN(s))return{stiffness:100,damping:10,duration:e};{let t=Math.pow(s,2)*n;return{stiffness:t,damping:2*i*Math.sqrt(n*t),duration:e}}}({...e,velocity:0});(t={...t,...r,mass:1}).isResolvedFromDuration=!0}return t}({...l,velocity:-((l.velocity||0)/1e3)}),w=y||0,k=g/(2*Math.sqrt(f*m)),x=p-d,S=Math.sqrt(f/m)/1e3,C=5>Math.abs(x);if(u||(u=C?ue:ut),c||(c=C?ur:un),k<1)a=ua(S,k),o=(w+k*S*x)/a,r=e=>p-Math.exp(-k*S*e)*(o*Math.sin(a*e)+x*Math.cos(a*e)),i=k*S*o+x*a,s=k*S*x-o*a,n=e=>Math.exp(-k*S*e)*(i*Math.sin(a*e)+s*Math.cos(a*e));else if(1===k){r=e=>p-Math.exp(-S*e)*(x+(w+S*x)*e);let e=w+S*x;n=t=>Math.exp(-S*t)*(S*e*t-w)}else{let e=S*Math.sqrt(k*k-1);r=t=>{let r=Math.exp(-k*S*t),n=Math.min(e*t,300);return p-r*((w+k*S*x)*Math.sinh(n)+e*x*Math.cosh(n))/e};let t=(w+k*S*x)/e,a=k*S*t-x*e,o=k*S*x-t*e;n=t=>{let r=Math.exp(-k*S*t),n=Math.min(e*t,300);return r*(a*Math.sinh(n)+o*Math.cosh(n))}}let P={calculatedDuration:b&&v||null,velocity:e=>lp(n(e)),next:e=>{if(!b&&k<1){let t=Math.exp(-k*S*e),r=Math.sin(a*e),n=Math.cos(a*e),l=p-t*(o*r+x*n);return h.done=Math.abs(lp(t*(i*r+s*n)))<=u&&Math.abs(p-l)<=c,h.value=h.done?p:l,h}let t=r(e);return b?h.done=e>=v:h.done=Math.abs(lp(n(e)))<=u&&Math.abs(p-t)<=c,h.value=h.done?p:t,h},toString:()=>{let e=Math.min(l7(P),2e4),t=l8(t=>P.next(e*t).value,e,30);return e+"ms "+t},toTransition:()=>{}};return P}function uu(e,t,r){var n,a;let o=Math.max(t-5,0);return n=r-e(o),(a=t-o)?1e3/a*n:0}function uc({keyframes:e,velocity:t=0,power:r=.8,timeConstant:n=325,bounceDamping:a=10,bounceStiffness:o=500,modifyTarget:i,min:s,max:l,restDelta:u=.5,restSpeed:c}){let d,p,h=e[0],f={done:!1,value:h},g=r*t,m=h+g,v=void 0===i?m:i(m);v!==m&&(g=v-h);let y=e=>-g*Math.exp(-e/n),b=e=>v+y(e),w=e=>{let t=y(e),r=b(e);f.done=Math.abs(t)<=u,f.value=f.done?v:r},k=e=>{let t;if(t=f.value,void 0!==s&&t<s||void 0!==l&&t>l){var r;d=e,p=ul({keyframes:[f.value,(r=f.value,void 0===s?l:void 0===l||Math.abs(s-r)<Math.abs(l-r)?s:l)],velocity:uu(b,e,f.value),damping:a,stiffness:o,restDelta:u,restSpeed:c})}};return k(0),{calculatedDuration:null,next:e=>{let t=!1;return(p||void 0!==d||(t=!0,w(e),k(e)),void 0!==d&&e>=d)?p.next(e-d):(t||w(e),f)}}}ul.applyToOptions=e=>{let t=function(e,t=100,r){let n=r({...e,keyframes:[0,t]}),a=Math.min(l7(n),2e4);return{type:"keyframes",ease:e=>n.next(a*e).value/t,duration:a/1e3}}(e,100,ul);return e.ease=t.ease,e.duration=lp(t.duration),e.type="keyframes",e};let ud=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e;function up(e,t,r,n){return e===t&&r===n?s1:a=>0===a||1===a?a:ud(function(e,t,r,n,a){let o,i,s=0;do(o=ud(i=t+(r-t)/2,n,a)-e)>0?r=i:t=i;while(Math.abs(o)>1e-7&&++s<12);return i}(a,0,1,e,r),t,n)}let uh=up(.42,0,1,1),uf=up(0,0,.58,1),ug=up(.42,0,.58,1),um=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,uv=e=>t=>1-e(1-t),uy=up(.33,1.53,.69,.99),ub=uv(uy),uw=um(ub),uk=e=>e>=1?1:(e*=2)<1?.5*ub(e):.5*(2-Math.pow(2,-10*(e-1))),ux=e=>1-Math.sin(Math.acos(e)),uS=uv(ux),uC=um(ux),uP=e=>Array.isArray(e)&&"number"==typeof e[0],uE={linear:s1,easeIn:uh,easeInOut:ug,easeOut:uf,circIn:ux,circInOut:uC,circOut:uS,backIn:ub,backInOut:uw,backOut:uy,anticipate:uk},uT=e=>{if(uP(e)){ll(4===e.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[t,r,n,a]=e;return up(t,r,n,a)}return"string"==typeof e?(ll(void 0!==uE[e],`Invalid easing type '${e}'`,"invalid-easing-type"),uE[e]):e},uR=(e,t,r)=>{let n=t-e;return 0===n?1:(r-e)/n};function uO(e,t,{clamp:r=!0,ease:n,mixer:a}={}){let o=e.length;if(ll(o===t.length,"Both input and output ranges must be the same length","range-length"),1===o)return()=>t[0];if(2===o&&t[0]===t[1])return()=>t[1];let i=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=function(e,t,r){let n=[],a=r||s0.mix||l4,o=e.length-1;for(let r=0;r<o;r++){let o=a(e[r],e[r+1]);t&&(o=lc(Array.isArray(t)?t[r]||s1:t,o)),n.push(o)}return n}(t,n,a),l=s.length,u=r=>{if(i&&r<e[0])return t[0];let n=0;if(l>1)for(;n<e.length-2&&!(r<e[n+1]);n++);let a=uR(e[n],e[n+1],r);return s[n](a)};return r?t=>u(ld(e[0],e[o-1],t)):u}function uj({duration:e=300,keyframes:t,times:r,ease:n="easeInOut"}){var a;let o,i=Array.isArray(n)&&"number"!=typeof n[0]?n.map(uT):uT(n),s={done:!1,value:t[0]},l=uO((a=r&&r.length===t.length?r:(!function(e,t){let r=e[e.length-1];for(let n=1;n<=t;n++){let a=uR(0,t,n);e.push(lX(r,1,a))}}(o=[0],t.length-1),o),a.map(t=>t*e)),t,{ease:Array.isArray(i)?i:t.map(()=>i||ug).splice(0,t.length-1)});return{calculatedDuration:e,next:t=>(s.value=l(t),s.done=t>=e,s)}}let u_=e=>null!==e;function uz(e,{repeat:t,repeatType:r="loop"},n,a=1){let o=e.filter(u_),i=a<0||t&&"loop"!==r&&t%2==1?0:o.length-1;return i&&void 0!==n?n:o[i]}let uN={decay:uc,inertia:uc,tween:uj,keyframes:uj,spring:ul};function uA(e){"string"==typeof e.type&&(e.type=uN[e.type])}class uL{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}}let uI=e=>e/100;class uM extends uL{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==s7.now()&&this.tick(s7.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},lh.mainThread++,this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){let{options:e}=this;uA(e);let{type:t=uj,repeat:r=0,repeatDelay:n=0,repeatType:a,velocity:o=0}=e,{keyframes:i}=e,s=t||uj;s!==uj&&"number"!=typeof i[0]&&(this.mixKeyframes=lc(uI,l4(i[0],i[1])),i=[0,100]);let l=s({...e,keyframes:i});"mirror"===a&&(this.mirroredGenerator=s({...e,keyframes:[...i].reverse(),velocity:-o})),null===l.calculatedDuration&&(l.calculatedDuration=l7(l));let{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+n,this.totalDuration=this.resolvedDuration*(r+1)-n,this.generator=l}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){let r,{generator:n,totalDuration:a,mixKeyframes:o,mirroredGenerator:i,resolvedDuration:s,calculatedDuration:l}=this;if(null===this.startTime)return n.next(0);let{delay:u=0,keyframes:c,repeat:d,repeatType:p,repeatDelay:h,type:f,onUpdate:g,finalKeyframe:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-a/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let v=this.currentTime-u*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?v<0:v>a;this.currentTime=Math.max(v,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=a);let b=this.currentTime,w=n;if(d){let e=Math.min(this.currentTime,a)/s,t=Math.floor(e),r=e%1;!r&&e>=1&&(r=1),1===r&&t--,(t=Math.min(t,d+1))%2&&("reverse"===p?(r=1-r,h&&(r-=h/s)):"mirror"===p&&(w=i)),b=ld(0,1,r)*s}y?(this.delayState.value=c[0],r=this.delayState):r=w.next(b),o&&!y&&(r.value=o(r.value));let{done:k}=r;y||null===l||(k=this.playbackSpeed>=0?this.currentTime>=a:this.currentTime<=0);let x=null===this.holdTime&&("finished"===this.state||"running"===this.state&&k);return x&&f!==uc&&(r.value=uz(c,this.options,m,this.speed)),g&&g(r.value),x&&this.finish(),r}then(e,t){return this.finished.then(e,t)}get duration(){return this.calculatedDuration/1e3}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+e/1e3}get time(){return this.currentTime/1e3}set time(e){e=lp(e),this.currentTime=e,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return uu(e=>this.generator.next(e).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(s7.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=this.currentTime/1e3)}play(){if(this.isStopped)return;let{driver:e=l6,startTime:t}=this.options;this.driver||(this.driver=e(e=>this.tick(e))),this.options.onPlay?.();let r=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=r):null!==this.holdTime?this.startTime=r-this.holdTime:this.startTime||(this.startTime=t??r),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(s7.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,lh.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}function uF(e){return"number"==typeof e?e:parseFloat(e)}let uD="u">typeof window,uB=uD?L.useLayoutEffect:L.useEffect;function u$(e,t){let r=lo(t()),n=()=>r.set(t());return n(),uB(()=>{let t=()=>s5.preRender(n,!1,!0),r=e.map(e=>e.on("change",t));return()=>{r.forEach(e=>e()),s9(n)}}),r}function uV(e,t,r,n){if("function"==typeof e){let t;return le.current=[],e(),t=u$(le.current,e),le.current=void 0,t}if(void 0!==r&&!Array.isArray(r)&&"function"!=typeof t){var a=e,o=t,i=r,s=n;let l=la(()=>Object.keys(i)),u=la(()=>({}));for(let e of l)u[e]=uV(a,o,i[e],s);return u}let l="function"==typeof t?t:function(...e){let t=!Array.isArray(e[0]),r=t?0:-1,n=e[0+r],a=uO(e[1+r],e[2+r],e[3+r]);return t?a(n):a}(t,r,n);return Array.isArray(e)?uU(e,l):uU([e],([e])=>l(e))}function uU(e,t){let r=la(()=>[]);return u$(e,()=>{r.length=0;let n=e.length;for(let t=0;t<n;t++)r[t]=e[t].get();return t(r)})}let uH=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],uW=new Set(uH),uq=new Set(["brightness","contrast","saturate","opacity"]);function uK(e){let[t,r]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;let[n]=r.match(lC)||[];if(!n)return e;let a=r.replace(n,""),o=+!!uq.has(t);return n!==r&&(o*=100),t+"("+o+a+")"}let uG=/\b([a-z-]*)\(.*?\)/gu,uX={...lq,getAnimatableNone:e=>{let t=e.match(uG);return t?t.map(uK).join(" "):e}},uY={...lq,getAnimatableNone:e=>{let t=lq.parse(e);return lq.createTransformer(e)(t.map(e=>"number"==typeof e?0:"object"==typeof e?{...e,alpha:1}:e))}},uQ={...lw,transform:Math.round},uZ={borderWidth:lA,borderTopWidth:lA,borderRightWidth:lA,borderBottomWidth:lA,borderLeftWidth:lA,borderRadius:lA,borderTopLeftRadius:lA,borderTopRightRadius:lA,borderBottomRightRadius:lA,borderBottomLeftRadius:lA,width:lA,maxWidth:lA,height:lA,maxHeight:lA,top:lA,right:lA,bottom:lA,left:lA,inset:lA,insetBlock:lA,insetBlockStart:lA,insetBlockEnd:lA,insetInline:lA,insetInlineStart:lA,insetInlineEnd:lA,padding:lA,paddingTop:lA,paddingRight:lA,paddingBottom:lA,paddingLeft:lA,paddingBlock:lA,paddingBlockStart:lA,paddingBlockEnd:lA,paddingInline:lA,paddingInlineStart:lA,paddingInlineEnd:lA,margin:lA,marginTop:lA,marginRight:lA,marginBottom:lA,marginLeft:lA,marginBlock:lA,marginBlockStart:lA,marginBlockEnd:lA,marginInline:lA,marginInlineStart:lA,marginInlineEnd:lA,fontSize:lA,backgroundPositionX:lA,backgroundPositionY:lA,rotate:lz,rotateX:lz,rotateY:lz,rotateZ:lz,scale:lx,scaleX:lx,scaleY:lx,scaleZ:lx,skew:lz,skewX:lz,skewY:lz,distance:lA,translateX:lA,translateY:lA,translateZ:lA,x:lA,y:lA,z:lA,perspective:lA,transformPerspective:lA,opacity:lk,originX:lM,originY:lM,originZ:lA,zIndex:uQ,fillOpacity:lk,strokeOpacity:lk,numOctaves:uQ},uJ={...uZ,color:lD,backgroundColor:lD,outlineColor:lD,fill:lD,stroke:lD,borderColor:lD,borderTopColor:lD,borderRightColor:lD,borderBottomColor:lD,borderLeftColor:lD,filter:uX,WebkitFilter:uX,mask:uY,WebkitMask:uY},u0=e=>uJ[e],u1=()=>({translate:0,scale:1,origin:0,originPoint:0}),u2=()=>({x:u1(),y:u1()}),u3=()=>({min:0,max:0}),u5=()=>({x:u3(),y:u3()}),u9=new Set(["width","height","top","left","right","bottom",...uH]),u4=e=>t=>t.test(e),u6=[lw,lA,lN,lz,lI,lL,{test:e=>"auto"===e,parse:e=>e}],u8=e=>u6.find(u4(e)),u7=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u,ce=e=>180*e/Math.PI,ct=e=>cn(ce(Math.atan2(e[1],e[0]))),cr={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:ct,rotateZ:ct,skewX:e=>ce(Math.atan(e[1])),skewY:e=>ce(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},cn=e=>((e%=360)<0&&(e+=360),e),ca=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),co=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),ci={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ca,scaleY:co,scale:e=>(ca(e)+co(e))/2,rotateX:e=>cn(ce(Math.atan2(e[6],e[5]))),rotateY:e=>cn(ce(Math.atan2(-e[2],e[0]))),rotateZ:ct,rotate:ct,skewX:e=>ce(Math.atan(e[4])),skewY:e=>ce(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function cs(e){return+!!e.includes("scale")}function cl(e,t){let r,n;if(!e||"none"===e)return cs(t);let a=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);if(a)r=ci,n=a;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=cr,n=t}if(!n)return cs(t);let o=r[t],i=n[1].split(",").map(cu);return"function"==typeof o?o(i):i[o]}function cu(e){return parseFloat(e.trim())}let cc=e=>e===lw||e===lA,cd=new Set(["x","y","z"]),cp=uH.filter(e=>!cd.has(e)),ch={width:({x:e},{paddingLeft:t="0",paddingRight:r="0",boxSizing:n})=>{let a=e.max-e.min;return"border-box"===n?a:a-parseFloat(t)-parseFloat(r)},height:({y:e},{paddingTop:t="0",paddingBottom:r="0",boxSizing:n})=>{let a=e.max-e.min;return"border-box"===n?a:a-parseFloat(t)-parseFloat(r)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>cl(t,"x"),y:(e,{transform:t})=>cl(t,"y")};ch.translateX=ch.x,ch.translateY=ch.y;let cf=new Set,cg=!1,cm=!1,cv=!1;function cy(){if(cm){let e=Array.from(cf).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),r=new Map;t.forEach(e=>{let t,n=(t=[],cp.forEach(r=>{let n=e.getValue(r);void 0!==n&&(t.push([r,n.get()]),n.set(+!!r.startsWith("scale")))}),t);n.length&&(r.set(e,n),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=r.get(e);t&&t.forEach(([t,r])=>{e.getValue(t)?.set(r)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}cm=!1,cg=!1,cf.forEach(e=>e.complete(cv)),cf.clear()}function cb(){cf.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(cm=!0)})}class cw{constructor(e,t,r,n,a,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=r,this.motionValue=n,this.element=a,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(cf.add(this),cg||(cg=!0,s5.read(cb),s5.resolveKeyframes(cy))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:r,motionValue:n}=this;if(null===e[0]){let a=n?.get(),o=e[e.length-1];if(void 0!==a)e[0]=a;else if(r&&t){let n=r.readValue(t,o);null!=n&&(e[0]=n)}void 0===e[0]&&(e[0]=o),n&&void 0===a&&n.set(e[0])}for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),cf.delete(this)}cancel(){"scheduled"===this.state&&(cf.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}let ck=new Set([uX,uY]);function cx(e,t){let r=u0(e);return ck.has(r)||(r=lq),r.getAnimatableNone?r.getAnimatableNone(t):void 0}let cS=new Set(["auto","none","0"]);class cC extends cw{constructor(e,t,r,n,a){super(e,t,r,n,a,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:r}=this;if(!t||!t.current)return;super.readKeyframes();for(let r=0;r<e.length;r++){let n=e[r];if("string"==typeof n&&lv(n=n.trim())){let a=function e(t,r,n=1){ll(n<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[a,o]=function(e){let t=u7.exec(e);if(!t)return[,];let[,r,n,a]=t;return[`--${r??n}`,a]}(t);if(!a)return;let i=window.getComputedStyle(r).getPropertyValue(a);if(i){let e=i.trim();return/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e)?parseFloat(e):e}return lv(o)?e(o,r,n+1):o}(n,t.current);void 0!==a&&(e[r]=a),r===e.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!u9.has(r)||2!==e.length)return;let[n,a]=e,o=u8(n),i=u8(a);if(lb(n)!==lb(a)&&ch[r]){this.needsMeasurement=!0;return}if(o!==i)if(cc(o)&&cc(i))for(let t=0;t<e.length;t++){let r=e[t];"string"==typeof r&&(e[t]=parseFloat(r))}else ch[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,r=[];for(let t=0;t<e.length;t++)(null===e[t]||function(e){if("number"==typeof e)return 0===e;if(null!==e)return"none"===e||"0"===e||/^0[^.\s]+$/u.test(e);return!0}(e[t]))&&r.push(t);r.length&&function(e,t,r){let n,a=0;for(;a<e.length&&!n;){let t=e[a];"string"==typeof t&&!cS.has(t)&&lH(t).values.length&&(n=e[a]),a++}if(n&&r)for(let a of t)e[a]=cx(r,n)}(e,r,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:r}=this;if(!e||!e.current)return;"height"===r&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ch[r](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let n=t[t.length-1];void 0!==n&&e.getValue(r,n).jump(n,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:r}=this;if(!e||!e.current)return;let n=e.getValue(t);n&&n.jump(this.measuredOrigin,!1);let a=r.length-1,o=r[a];r[a]=ch[t](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,r])=>{e.getValue(t).set(r)}),this.resolveNoneKeyframes()}}function cP(e,t,r){t.startsWith("--")?e.style.setProperty(t,r):e.style[t]=r}function cE(e){let t;return()=>(void 0===t&&(t=e()),t)}let cT={};function cR(e,t){let r=cE(e);return()=>cT[t]??r()}let cO=cR(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),cj=cR(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing"),c_=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`,cz={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:c_([0,.65,.55,1]),circOut:c_([.55,0,1,.45]),backIn:c_([.31,.01,.66,-.59]),backOut:c_([.33,1.53,.69,.99])};function cN(e){return"function"==typeof e&&"applyToOptions"in e}class cA extends uL{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:t,name:r,keyframes:n,pseudoElement:a,allowFlatten:o=!1,finalKeyframe:i,onComplete:s}=e;this.isPseudoElement=!!a,this.allowFlatten=o,this.options=e,ll("string"!=typeof e.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const l=function({type:e,...t}){return cN(e)&&cj()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}(e);this.animation=function(e,t,r,{delay:n=0,duration:a=300,repeat:o=0,repeatType:i="loop",ease:s="easeOut",times:l}={},u){let c={[t]:r};l&&(c.offset=l);let d=function e(t,r){if(t)return"function"==typeof t?cj()?l8(t,r):"ease-out":uP(t)?c_(t):Array.isArray(t)?t.map(t=>e(t,r)||cz.easeOut):cz[t]}(s,a);Array.isArray(d)&&(c.easing=d);let p={delay:n,duration:a,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:"reverse"===i?"alternate":"normal"};u&&(p.pseudoElement=u);let h=e.animate(c,p);return h}(t,r,n,l,a),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){let e=uz(n,this.options,i,this.speed);this.updateMotionValue&&this.updateMotionValue(e),cP(t,r,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(e){}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;"idle"!==e&&"finished"!==e&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){return Number(this.animation.effect?.getComputedTiming?.().duration||0)/1e3}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+e/1e3}get time(){return(Number(this.animation.currentTime)||0)/1e3}set time(e){let t=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=lp(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:r,observe:n}){return(this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&cO())?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),r&&(this.animation.rangeEnd=r),s1):n(this)}}let cL=new Set(["opacity","clipPath","filter","transform"]),{schedule:cI}=s3(queueMicrotask,!1),cM=[...u6,lD,lq],cF=new WeakMap;function cD(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function cB(e){return"string"==typeof e||Array.isArray(e)}let c$=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],cV=["initial",...c$];function cU(e){return cD(e.animate)||cV.some(t=>cB(e[t]))}function cH(e){return!!(cU(e)||e.variants)}let cW={current:null},cq={current:!1},cK="u">typeof window;function cG(e){let t=[{},{}];return e?.values.forEach((e,r)=>{t[0][r]=e.get(),t[1][r]=e.getVelocity()}),t}function cX(e,t,r,n){if("function"==typeof t){let[a,o]=cG(n);t=t(void 0!==r?r:e.custom,a,o)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){let[a,o]=cG(n);t=t(void 0!==r?r:e.custom,a,o)}return t}let cY=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],cQ={};class cZ{scrapeMotionValuesFromProps(e,t,r){return{}}constructor({parent:e,props:t,presenceContext:r,reducedMotionConfig:n,skipAnimations:a,blockInitialAnimation:o,visualState:i},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=cw,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=s7.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,s5.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=i;this.latestValues=l,this.baseTarget={...l},this.initialValues=t.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=t,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=n,this.skipAnimationsConfig=a,this.options=s,this.blockInitialAnimation=!!o,this.isControllingVariants=cU(t),this.isVariantNode=cH(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(const e in d){const t=d[e];void 0!==l[e]&&li(t)&&t.set(l[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,cF.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(cq.current||function(){if(cq.current=!0,cK)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>cW.current=e.matches;e.addEventListener("change",t),t()}else cW.current=!1}(),this.shouldReduceMotion=cW.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){for(let e in this.projection&&this.projection.unmount(),s9(this.notifyUpdate),s9(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this),this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){let r;if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&cL.has(e)&&this.current instanceof HTMLElement){let{factory:r,keyframes:n,times:a,ease:o,duration:i}=t.accelerate,s=new cA({element:this.current,name:e,keyframes:n,times:a,ease:o,duration:lp(i)}),l=r(s);this.valueSubscriptions.set(e,()=>{l(),s.cancel()});return}let n=uW.has(e);n&&this.onBindTransform&&this.onBindTransform();let a=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&s5.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});"u">typeof window&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{a(),r&&r(),t.owner&&t.stop()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in cQ){let t=cQ[e];if(!t)continue;let{isEnabled:r,Feature:n}=t;if(!this.features[e]&&n&&r(this.props)&&(this.features[e]=new n(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):u5()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<cY.length;t++){let r=cY[t];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);let n=e["on"+r];n&&(this.propEventSubscriptions[r]=this.on(r,n))}this.prevMotionValues=function(e,t,r){for(let n in t){let a=t[n],o=r[n];if(li(a))e.addValue(n,a);else if(li(o))e.addValue(n,lr(a,{owner:e}));else if(o!==a)if(e.hasValue(n)){let t=e.getValue(n);!0===t.liveStyle?t.jump(a):t.hasAnimated||t.set(a)}else{let t=e.getStaticValue(n);e.addValue(n,lr(void 0!==t?t:a,{owner:e}))}}for(let n in r)void 0===t[n]&&e.removeValue(n);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let r=this.values.get(e);t!==r&&(r&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let r=this.values.get(e);return void 0===r&&void 0!==t&&(r=lr(null===t?void 0:t,{owner:this}),this.addValue(e,r)),r}readValue(e,t){let r=void 0===this.latestValues[e]&&this.current?this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];if(null!=r){let n,a;if("string"==typeof r&&(n=r,/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n)||(a=r,/^0[^.\s]+$/u.test(a))))r=parseFloat(r);else{let n;n=r,!cM.find(u4(n))&&lq.test(t)&&(r=cx(e,t))}this.setBaseTarget(e,li(r)?r.get():r)}return li(r)?r.get():r}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let t,{initial:r}=this.props;if("string"==typeof r||"object"==typeof r){let n=cX(this.props,r,this.presenceContext?.custom);n&&(t=n[e])}if(r&&void 0!==t)return t;let n=this.getBaseTargetFromProps(this.props,e);return void 0===n||li(n)?void 0!==this.initialValues[e]&&void 0===t?void 0:this.baseTarget[e]:n}on(e,t){return this.events[e]||(this.events[e]=new sJ),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){cI.render(this.render)}}class cJ extends cZ{constructor(){super(...arguments),this.KeyframeResolver=cC}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){let r=e.style;return r?r[t]:void 0}removeValueFromRenderState(e,{vars:t,style:r}){delete t[e],delete r[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;li(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}function c0(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}let c1=(e,t)=>t&&"number"==typeof e?t.transform(e):e,c2={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},c3=uH.length;function c5(e,t,r){let{style:n,vars:a,transformOrigin:o}=e,i=!1,s=!1;for(let e in t){let r=t[e];if(uW.has(e)){i=!0;continue}if(lg(e)){a[e]=r;continue}{let t=c1(r,uZ[e]);e.startsWith("origin")?(s=!0,o[e]=t):n[e]=t}}if(!t.transform&&(i||r?n.transform=function(e,t,r){let n="",a=!0;for(let o=0;o<c3;o++){let i=uH[o],s=e[i];if(void 0===s)continue;let l=!0;if("number"==typeof s)l=s===+!!i.startsWith("scale");else{let e=parseFloat(s);l=i.startsWith("scale")?1===e:0===e}if(!l||r){let e=c1(s,uZ[i]);if(!l){a=!1;let t=c2[i]||i;n+=`${t}(${e}) `}r&&(t[i]=e)}}return n=n.trim(),r?n=r(t,a?"":n):a&&(n="none"),n}(t,e.transform,r):n.transform&&(n.transform="none")),s){let{originX:e="50%",originY:t="50%",originZ:r=0}=o;n.transformOrigin=`${e} ${t} ${r}`}}let c9={offset:"stroke-dashoffset",array:"stroke-dasharray"},c4={offset:"strokeDashoffset",array:"strokeDasharray"},c6=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function c8(e,{attrX:t,attrY:r,attrScale:n,pathLength:a,pathSpacing:o=1,pathOffset:i=0,...s},l,u,c){if(c5(e,s,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:p}=e;for(let e of(d.transform&&(p.transform=d.transform,delete d.transform),(p.transform||d.transformOrigin)&&(p.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),p.transform&&(p.transformBox=c?.transformBox??"fill-box",delete d.transformBox),c6))void 0!==d[e]&&(p[e]=d[e],delete d[e]);void 0!==t&&(d.x=t),void 0!==r&&(d.y=r),void 0!==n&&(d.scale=n),void 0!==a&&function(e,t,r=1,n=0,a=!0){e.pathLength=1;let o=a?c9:c4;e[o.offset]=`${-n}`,e[o.array]=`${t} ${r}`}(d,a,o,i,!1)}let c7=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),de=e=>"string"==typeof e&&"svg"===e.toLowerCase();function dt(e,{style:t,vars:r},n,a){let o,i=e.style;for(o in t)i[o]=t[o];for(o in a?.applyProjectionStyles(i,n),r)i.setProperty(o,r[o])}function dr(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}let dn={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e)if(!lA.test(e))return e;else e=parseFloat(e);let r=dr(e,t.target.x),n=dr(e,t.target.y);return`${r}% ${n}%`}},da={borderRadius:{...dn,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:dn,borderTopRightRadius:dn,borderBottomLeftRadius:dn,borderBottomRightRadius:dn,boxShadow:{correct:(e,{treeScale:t,projectionDelta:r})=>{let n=lq.parse(e);if(n.length>5)return e;let a=lq.createTransformer(e),o=+("number"!=typeof n[0]),i=r.x.scale*t.x,s=r.y.scale*t.y;n[0+o]/=i,n[1+o]/=s;let l=lX(i,s,.5);return"number"==typeof n[2+o]&&(n[2+o]/=l),"number"==typeof n[3+o]&&(n[3+o]/=l),a(n)}}};function di(e,{layout:t,layoutId:r}){return uW.has(e)||e.startsWith("origin")||(t||void 0!==r)&&(!!da[e]||"opacity"===e)}function ds(e,t,r){let n=e.style,a=t?.style,o={};if(!n)return o;for(let t in n)(li(n[t])||a&&li(a[t])||di(t,e)||r?.getValue(t)?.liveStyle!==void 0)&&(o[t]=n[t]);return o}function dl(e,t,r){let n=ds(e,t,r);for(let r in e)(li(e[r])||li(t[r]))&&(n[-1!==uH.indexOf(r)?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r]=e[r]);return n}class du extends cJ{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=u5}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(uW.has(t)){let e=u0(t);return e&&e.default||0}return t=c7.has(t)?t:c0(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,r){return dl(e,t,r)}build(e,t,r){c8(e,t,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(e,t,r,n){for(let r in dt(e,t,void 0,n),t.attrs)e.setAttribute(c7.has(r)?r:c0(r),t.attrs[r])}mount(e){this.isSVGTag=de(e.tagName),super.mount(e)}}function dc({top:e,left:t,right:r,bottom:n}){return{x:{min:t,max:r},y:{min:e,max:n}}}function dd(e){return void 0===e||1===e}function dp({scale:e,scaleX:t,scaleY:r}){return!dd(e)||!dd(t)||!dd(r)}function dh(e){return dp(e)||df(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function df(e){var t,r;return(t=e.x)&&"0%"!==t||(r=e.y)&&"0%"!==r}function dg(e,t,r,n,a){return void 0!==a&&(e=n+a*(e-n)),n+r*(e-n)+t}function dm(e,t=0,r=1,n,a){e.min=dg(e.min,t,r,n,a),e.max=dg(e.max,t,r,n,a)}function dv(e,{x:t,y:r}){dm(e.x,t.translate,t.scale,t.originPoint),dm(e.y,r.translate,r.scale,r.originPoint)}function dy(e,t){e.min+=t,e.max+=t}function db(e,t,r,n,a=.5){let o=lX(e.min,e.max,a);dm(e,t,r,o,n)}function dw(e,t){return"string"==typeof e?parseFloat(e)/100*(t.max-t.min):e}function dk(e,t,r){let n=r??e;db(e.x,dw(t.x,n.x),t.scaleX,t.scale,t.originX),db(e.y,dw(t.y,n.y),t.scaleY,t.scale,t.originY)}function dx(e,t){return dc(function(e,t){if(!t)return e;let r=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}(e.getBoundingClientRect(),t))}class dS extends cJ{constructor(){super(...arguments),this.type="html",this.renderInstance=dt}readValueFromInstance(e,t){if(uW.has(t))return this.projection?.isProjecting?cs(t):((e,t)=>{let{transform:r="none"}=getComputedStyle(e);return cl(r,t)})(e,t);{let r=window.getComputedStyle(e),n=(lg(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof n?n.trim():n}}measureInstanceViewportBox(e,{transformPagePoint:t}){return dx(e,t)}build(e,t,r){c5(e,t,r.transformTemplate)}scrapeMotionValuesFromProps(e,t,r){return ds(e,t,r)}}let dC=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function dP(e){if("string"!=typeof e||e.includes("-"));else if(dC.indexOf(e)>-1||/[A-Z]/u.test(e))return!0;return!1}let dE=(0,L.createContext)({}),dT=(0,L.createContext)({strict:!1}),dR=(0,L.createContext)({});function dO(e){return Array.isArray(e)?e.join(" "):e}let dj=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function d_(e,t,r){for(let n in t)li(t[n])||di(n,r)||(e[n]=t[n])}let dz=()=>({...dj(),attrs:{}}),dN=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function dA(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||dN.has(e)}let dL=e=>!dA(e);try{j=require("@emotion/is-prop-valid").default,"function"==typeof j&&(dL=e=>e.startsWith("on")?!dA(e):j(e))}catch{}function dI(e){return li(e)?e.get():e}let dM=(0,L.createContext)(null),dF=e=>(t,r)=>{let n=(0,L.useContext)(dR),a=(0,L.useContext)(dM),o=()=>(function({scrapeMotionValuesFromProps:e,createRenderState:t},r,n,a){return{latestValues:function(e,t,r,n){let a={},o=n(e,{});for(let e in o)a[e]=dI(o[e]);let{initial:i,animate:s}=e,l=cU(e),u=cH(e);t&&u&&!l&&!1!==e.inherit&&(void 0===i&&(i=t.initial),void 0===s&&(s=t.animate));let c=!!r&&!1===r.initial,d=(c=c||!1===i)?s:i;if(d&&"boolean"!=typeof d&&!cD(d)){let t=Array.isArray(d)?d:[d];for(let r=0;r<t.length;r++){let n=cX(e,t[r]);if(n){let{transitionEnd:e,transition:t,...r}=n;for(let e in r){let t=r[e];if(Array.isArray(t)){let e=c?t.length-1:0;t=t[e]}null!==t&&(a[e]=t)}for(let t in e)a[t]=e[t]}}}return a}(r,n,a,e),renderState:t()}})(e,t,n,a);return r?o():la(o)},dD=dF({scrapeMotionValuesFromProps:ds,createRenderState:dj}),dB=dF({scrapeMotionValuesFromProps:dl,createRenderState:dz}),d$={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},dV=!1;function dU(){return!function(){if(dV)return;let e={};for(let t in d$)e[t]={isEnabled:e=>d$[t].some(t=>!!e[t])};cQ=e,dV=!0}(),cQ}let dH=Symbol.for("motionComponentSymbol"),dW="data-"+c0("framerAppearId"),dq=(0,L.createContext)({});function dK(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function dG(e,{forwardMotionProps:t=!1,type:r}={},n,a){n&&function(e){let t=dU();for(let r in e)t[r]={...t[r],...e[r]};cQ=t}(n);let o=r?"svg"===r:dP(e),i=o?dB:dD;function s(r,n){var s;let l,u,c,d={...(0,L.useContext)(ln),...r,layoutId:function({layoutId:e}){let t=(0,L.useContext)(dE).id;return t&&void 0!==e?t+"-"+e:e}(r)},{isStatic:p}=d,h=function(e){let{initial:t,animate:r}=function(e,t){if(cU(e)){let{initial:t,animate:r}=e;return{initial:!1===t||cB(t)?t:void 0,animate:cB(r)?r:void 0}}return!1!==e.inherit?t:{}}(e,(0,L.useContext)(dR));return(0,L.useMemo)(()=>({initial:t,animate:r}),[dO(t),dO(r)])}(r),f=i(r,p);if(!p&&uD){(0,L.useContext)(dT).strict;let t=function(e){let{drag:t,layout:r}=dU();if(!t&&!r)return{};let n={...t,...r};return{MeasureLayout:t?.isEnabled(e)||r?.isEnabled(e)?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}(d);l=t.MeasureLayout,h.visualElement=function(e,t,r,n,a,o){let{visualElement:i}=(0,L.useContext)(dR),s=(0,L.useContext)(dT),l=(0,L.useContext)(dM),u=(0,L.useContext)(ln).reducedMotion,c=(0,L.useRef)(null),d=(0,L.useRef)(!1);n=n||s.renderer,!c.current&&n&&(c.current=n(e,{visualState:t,parent:i,props:r,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:u,isSVG:o}),d.current&&c.current&&(c.current.manuallyAnimateOnMount=!0));let p=c.current,h=(0,L.useContext)(dq);p&&!p.projection&&a&&("html"===p.type||"svg"===p.type)&&function(e,t,r,n){let{layoutId:a,layout:o,drag:i,dragConstraints:s,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:function e(t){if(t)return!1!==t.options.allowProjection?t.projection:e(t.parent)}(e.parent)),e.projection.setOptions({layoutId:a,layout:o,alwaysMeasureLayout:!!i||s&&dK(s),visualElement:e,animationType:"string"==typeof o?o:"both",initialPromotionConfig:n,crossfade:c,layoutScroll:l,layoutRoot:u})}(c.current,r,a,h);let f=(0,L.useRef)(!1);(0,L.useInsertionEffect)(()=>{p&&f.current&&p.update(r,l)});let g=r[dW],m=(0,L.useRef)(!!g&&!window.MotionHandoffIsComplete?.(g)&&window.MotionHasOptimisedAnimation?.(g));return uB(()=>{d.current=!0,p&&(f.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),p.scheduleRenderMicrotask(),m.current&&p.animationState&&p.animationState.animateChanges())}),(0,L.useEffect)(()=>{p&&(!m.current&&p.animationState&&p.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(g)}),m.current=!1),p.enteringChildren=void 0)}),p}(e,f,d,a,t.ProjectionNode,o)}return(0,A.jsxs)(dR.Provider,{value:h,children:[l&&h.visualElement?(0,A.jsx)(l,{visualElement:h.visualElement,...d}):null,function(e,t,r,{latestValues:n},a,o=!1,i){let s=(i??dP(e)?function(e,t,r,n){let a=(0,L.useMemo)(()=>{let r=dz();return c8(r,t,de(n),e.transformTemplate,e.style),{...r.attrs,style:{...r.style}}},[t]);if(e.style){let t={};d_(t,e.style,e),a.style={...t,...a.style}}return a}:function(e,t){let r,n,a={},o=(r=e.style||{},d_(n={},r,e),Object.assign(n,function({transformTemplate:e},t){return(0,L.useMemo)(()=>{let r=dj();return c5(r,t,e),Object.assign({},r.vars,r.style)},[t])}(e,t)),n);return e.drag&&!1!==e.dragListener&&(a.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=!0===e.drag?"none":`pan-${"x"===e.drag?"y":"x"}`),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(a.tabIndex=0),a.style=o,a})(t,n,a,e),l=function(e,t,r){let n={};for(let a in e)("values"!==a||"object"!=typeof e.values)&&(dL(a)||!0===r&&dA(a)||!t&&!dA(a)||e.draggable&&a.startsWith("onDrag"))&&(n[a]=e[a]);return n}(t,"string"==typeof e,o),u=e!==L.Fragment?{...l,...s,ref:r}:{},{children:c}=t,d=(0,L.useMemo)(()=>li(c)?c.get():c,[c]);return(0,L.createElement)(e,{...u,children:d})}(e,r,(s=h.visualElement,u=(0,L.useRef)(n),(0,L.useInsertionEffect)(()=>{u.current=n}),c=(0,L.useRef)(null),(0,L.useCallback)(e=>{e&&f.onMount?.(e),s&&(e?s.mount(e):s.unmount());let t=u.current;if("function"==typeof t)if(e){let r=t(e);"function"==typeof r&&(c.current=r)}else c.current?(c.current(),c.current=null):t(e);else t&&(t.current=e)},[s])),f,p,t,o)]})}s.displayName=`motion.${"string"==typeof e?e:`create(${e.displayName??e.name??""})`}`;let l=(0,L.forwardRef)(s);return l[dH]=e,l}class dX{constructor(e){this.isMounted=!1,this.node=e}update(){}}function dY(e,t,r){let n=e.getProps();return cX(n,t,void 0!==r?r:n.custom,e)}function dQ(e,t){if(e?.inherit&&t){let{inherit:r,...n}=e;return{...t,...n}}return e}function dZ(e,t){let r=e?.[t]??e?.default??e;return r!==e?dQ(r,e):r}let dJ=e=>Array.isArray(e);function d0(e,t){let r=e.getValue("willChange");if(li(r)&&r.add)return r.add(t);if(!r&&s0.WillChange){let r=new s0.WillChange("auto");e.addValue("willChange",r),r.add(t)}}let d1={anticipate:uk,backInOut:uw,circInOut:uC};class d2 extends cA{constructor(e){!function(e){"string"==typeof e.ease&&e.ease in d1&&(e.ease=d1[e.ease])}(e),uA(e),super(e),void 0!==e.startTime&&!1!==e.autoplay&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:r,onComplete:n,element:a,...o}=this.options;if(!t)return;if(void 0!==e)return void t.set(e);let i=new uM({...o,autoplay:!1}),s=Math.max(10,s7.now()-this.startTime),l=ld(0,10,s-10),u=i.sample(s).value,{name:c}=this.options;a&&c&&cP(a,c,u),t.setWithVelocity(i.sample(Math.max(0,s-l)).value,u,l),i.stop()}}let d3=(e,t)=>"zIndex"!==t&&!!("number"==typeof e||Array.isArray(e)||"string"==typeof e&&(lq.test(e)||"0"===e)&&!e.startsWith("url("));function d5(e){e.duration=0,e.type="keyframes"}let d9=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/,d4=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),d6=cE(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class d8 extends uL{constructor({autoplay:e=!0,delay:t=0,type:r="keyframes",repeat:n=0,repeatDelay:a=0,repeatType:o="loop",keyframes:i,name:s,motionValue:l,element:u,...c}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=s7.now();const d={autoplay:e,delay:t,type:r,repeat:n,repeatDelay:a,repeatType:o,name:s,motionValue:l,element:u,...c},p=u?.KeyframeResolver||cw;this.keyframeResolver=new p(i,(e,t,r)=>this.onKeyframesResolved(e,t,d,!r),s,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,r,n){let a;this.keyframeResolver=void 0;let{name:o,type:i,velocity:s,delay:l,isHandoff:u,onUpdate:c}=r;this.resolvedAt=s7.now();let d=!0;!function(e,t,r,n){let a=e[0];if(null===a)return!1;if("display"===t||"visibility"===t)return!0;let o=e[e.length-1],i=d3(a,t),s=d3(o,t);return ls(i===s,`You are trying to animate ${t} from "${a}" to "${o}". "${i?o:a}" is not an animatable value.`,"value-not-animatable"),!!i&&!!s&&(function(e){let t=e[0];if(1===e.length)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}(e)||("spring"===r||cN(r))&&n)}(e,o,i,s)&&(d=!1,(s0.instantAnimations||!l)&&c?.(uz(e,r,t)),e[0]=e[e.length-1],d5(r),r.repeat=0);let p={startTime:n?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...r,keyframes:e},h=d&&!u&&function(e){let{motionValue:t,name:r,repeatDelay:n,repeatType:a,damping:o,type:i,keyframes:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:l,transformTemplate:u}=t.owner.getProps();return d6()&&r&&(cL.has(r)||d4.has(r)&&function(e){for(let t=0;t<e.length;t++)if("string"==typeof e[t]&&d9.test(e[t]))return!0;return!1}(s))&&("transform"!==r||!u)&&!l&&!n&&"mirror"!==a&&0!==o&&"inertia"!==i}(p),f=p.motionValue?.owner?.current;if(h)try{a=new d2({...p,element:f})}catch{a=new uM(p)}else a=new uM(p);a.finished.then(()=>{this.notifyFinished()}).catch(s1),this.pendingTimeline&&(this.stopTimeline=a.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=a}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),cv=!0,cb(),cy(),cv=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}let d7={type:"spring",stiffness:500,damping:25,restSpeed:10},pe={type:"keyframes",duration:.8},pt={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},pr=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]),pn=(e,t,r,n={},a,o)=>i=>{let s=dZ(n,e)||{},l=s.delay||n.delay||0,{elapsed:u=0}=n;u-=lp(l);let c={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-u,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{i(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:o?void 0:a};!function(e){for(let t in e)if(!pr.has(t))return!0;return!1}(s)&&Object.assign(c,((e,{keyframes:t})=>t.length>2?pe:uW.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:d7:pt)(e,c)),c.duration&&(c.duration=lp(c.duration)),c.repeatDelay&&(c.repeatDelay=lp(c.repeatDelay)),void 0!==c.from&&(c.keyframes[0]=c.from);let d=!1;if(!1!==c.type&&(0!==c.duration||c.repeatDelay)||(d5(c),0===c.delay&&(d=!0)),(s0.instantAnimations||s0.skipAnimations||a?.shouldSkipAnimations)&&(d=!0,d5(c),c.delay=0),c.allowFlatten=!s.type&&!s.ease,d&&!o&&void 0!==t.get()){let e=uz(c.keyframes,s);if(void 0!==e)return void s5.update(()=>{c.onUpdate(e),c.onComplete()})}return s.isSync?new uM(c):new d8(c)};function pa(e,t,{delay:r=0,transitionOverride:n,type:a}={}){let{transition:o,transitionEnd:i,...s}=t,l=e.getDefaultTransition();o=o?dQ(o,l):l;let u=o?.reduceMotion;n&&(o=n);let c=[],d=a&&e.animationState&&e.animationState.getState()[a];for(let t in s){let n=e.getValue(t,e.latestValues[t]??null),a=s[t];if(void 0===a||d&&function({protectedKeys:e,needsAnimating:t},r){let n=e.hasOwnProperty(r)&&!0!==t[r];return t[r]=!1,n}(d,t))continue;let i={delay:r,...dZ(o||{},t)},l=n.get();if(void 0!==l&&!n.isAnimating()&&!Array.isArray(a)&&a===l&&!i.velocity){s5.update(()=>n.set(a));continue}let p=!1;if(window.MotionHandoffAnimation){let r=e.props[dW];if(r){let e=window.MotionHandoffAnimation(r,t,s5);null!==e&&(i.startTime=e,p=!0)}}d0(e,t);let h=u??e.shouldReduceMotion;n.start(pn(t,n,a,h&&u9.has(t)?{type:!1}:i,e,p));let f=n.animation;f&&c.push(f)}if(i){let t=()=>s5.update(()=>{i&&function(e,t){let{transitionEnd:r={},transition:n={},...a}=dY(e,t)||{};for(let t in a={...a,...r}){var o;let r=dJ(o=a[t])?o[o.length-1]||0:o;e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,lr(r))}}(e,i)});c.length?Promise.all(c).then(t):t()}return c}function po(e,t,r,n=0,a=1){let o=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),i=e.size,s=(i-1)*n;return"function"==typeof r?r(o,i):1===a?o*n:s-o*n}function pi(e,t,r={}){let n=dY(e,t,"exit"===r.type?e.presenceContext?.custom:void 0),{transition:a=e.getDefaultTransition()||{}}=n||{};r.transitionOverride&&(a=r.transitionOverride);let o=n?()=>Promise.all(pa(e,n,r)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(n=0)=>{let{delayChildren:o=0,staggerChildren:i,staggerDirection:s}=a;return function(e,t,r=0,n=0,a=0,o=1,i){let s=[];for(let l of e.variantChildren)l.notify("AnimationStart",t),s.push(pi(l,t,{...i,delay:r+("function"==typeof n?0:n)+po(e.variantChildren,l,n,a,o)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(s)}(e,t,n,o,i,s,r)}:()=>Promise.resolve(),{when:s}=a;if(!s)return Promise.all([o(),i(r.delay)]);{let[e,t]="beforeChildren"===s?[o,i]:[i,o];return e().then(()=>t())}}let ps=cV.length;function pl(e,t){if(!Array.isArray(t))return!1;let r=t.length;if(r!==e.length)return!1;for(let n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}let pu=[...c$].reverse(),pc=c$.length;function pd(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function pp(){return{animate:pd(!0),whileInView:pd(),whileHover:pd(),whileTap:pd(),whileDrag:pd(),whileFocus:pd(),exit:pd()}}let ph=0,pf={x:!1,y:!1};function pg(e){return[e("x"),e("y")]}function pm(e){return e.max-e.min}function pv(e,t,r,n=.5){e.origin=n,e.originPoint=lX(t.min,t.max,e.origin),e.scale=pm(r)/pm(t),e.translate=lX(r.min,r.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function py(e,t,r,n){pv(e.x,t.x,r.x,n?n.originX:void 0),pv(e.y,t.y,r.y,n?n.originY:void 0)}function pb(e,t,r,n=0){e.min=(n?lX(r.min,r.max,n):r.min)+t.min,e.max=e.min+pm(t)}function pw(e,t,r,n=0){let a=n?lX(r.min,r.max,n):r.min;e.min=t.min-a,e.max=e.min+pm(t)}function pk(e,t,r,n){pw(e.x,t.x,r.x,n?.x),pw(e.y,t.y,r.y,n?.y)}let px=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function pS(e){return px.has(e.tagName)||!0===e.isContentEditable}function pC(e,t,r,n={passive:!0}){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r)}let pP=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function pE(e){return{point:{x:e.pageX,y:e.pageY}}}function pT(e,t,r,n){return pC(e,t,e=>pP(e)&&r(e,pE(e)),n)}let pR=({current:e})=>e?e.ownerDocument.defaultView:null,pO=(e,t)=>Math.abs(e-t),pj=new Set(["auto","scroll"]);class p_{constructor(e,t,{transformPagePoint:r,contextWindow:n=window,dragSnapToOrigin:a=!1,distanceThreshold:o=3,element:i}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{var e,t;if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let r=pA(this.lastMoveEventInfo,this.history),n=null!==this.startEvent,a=(e=r.offset,t={x:0,y:0},Math.sqrt(pO(e.x,t.x)**2+pO(e.y,t.y)**2)>=this.distanceThreshold);if(!n&&!a)return;let{point:o}=r,{timestamp:i}=s4;this.history.push({...o,timestamp:i});let{onStart:s,onMove:l}=this.handlers;n||(s&&s(this.lastMoveEvent,r),this.startEvent=this.lastMoveEvent),l&&l(this.lastMoveEvent,r)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=pz(t,this.transformPagePoint),s5.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:r,onSessionEnd:n,resumeAnimation:a}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&a&&a(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let o=pA("pointercancel"===e.type?this.lastMoveEventInfo:pz(t,this.transformPagePoint),this.history);this.startEvent&&r&&r(e,o),n&&n(e,o)},!pP(e))return;this.dragSnapToOrigin=a,this.handlers=t,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=n||window;const s=pz(pE(e),this.transformPagePoint),{point:l}=s,{timestamp:u}=s4;this.history=[{...l,timestamp:u}];const{onSessionStart:c}=t;c&&c(e,pA(s,this.history)),this.removeListeners=lc(pT(this.contextWindow,"pointermove",this.handlePointerMove),pT(this.contextWindow,"pointerup",this.handlePointerUp),pT(this.contextWindow,"pointercancel",this.handlePointerUp)),i&&this.startScrollTracking(i)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(pj.has(e.overflowX)||pj.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let r=e===window,n=r?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},a={x:n.x-t.x,y:n.y-t.y};(0!==a.x||0!==a.y)&&(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=a.x,this.lastMoveEventInfo.point.y+=a.y):this.history.length>0&&(this.history[0].x-=a.x,this.history[0].y-=a.y),this.scrollPositions.set(e,n),s5.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),s9(this.updatePoint)}}function pz(e,t){return t?{point:t(e.point)}:e}function pN(e,t){return{x:e.x-t.x,y:e.y-t.y}}function pA({point:e},t){return{point:e,delta:pN(e,pL(t)),offset:pN(e,t[0]),velocity:function(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,n=null,a=pL(e);for(;r>=0&&(n=e[r],!(a.timestamp-n.timestamp>lp(.1)));)r--;if(!n)return{x:0,y:0};let o=(a.timestamp-n.timestamp)/1e3;if(0===o)return{x:0,y:0};let i={x:(a.x-n.x)/o,y:(a.y-n.y)/o};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}(t,.1)}}function pL(e){return e[e.length-1]}function pI(e,t,r){return{min:void 0!==t?e.min+t:void 0,max:void 0!==r?e.max+r-(e.max-e.min):void 0}}function pM(e,t){let r=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,n]=[n,r]),{min:r,max:n}}function pF(e,t,r){return{min:pD(e,t),max:pD(e,r)}}function pD(e,t){return"number"==typeof e?e:e[t]||0}let pB=new WeakMap;class p${constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=u5(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:r}={}){let{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;let a=e=>{t?(this.stopAnimation(),this.snapToCursor(pE(e).point)):this.pauseAnimation()},o=(e,t)=>{this.stopAnimation();let{drag:r,dragPropagation:n,onDragStart:a}=this.getProps();if(r&&!n&&(this.openDragLock&&this.openDragLock(),this.openDragLock=function(e){if("x"===e||"y"===e)if(pf[e])return null;else return pf[e]=!0,()=>{pf[e]=!1};return pf.x||pf.y?null:(pf.x=pf.y=!0,()=>{pf.x=pf.y=!1})}(r),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),pg(e=>{let t=this.getAxisMotionValue(e).get()||0;if(lN.test(t)){let{projection:r}=this.visualElement;if(r&&r.layout){let n=r.layout.layoutBox[e];n&&(t=pm(n)*(parseFloat(t)/100))}}this.originPoint[e]=t}),a&&s5.postRender(()=>a(e,t)),d0(this.visualElement,"transform");let{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},i=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:r,dragDirectionLock:n,onDirectionLock:a,onDrag:o}=this.getProps();if(!r&&!this.openDragLock)return;let{offset:i}=t;if(n&&null===this.currentDirection){this.currentDirection=function(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}(i),null!==this.currentDirection&&a&&a(this.currentDirection);return}this.updateAxis("x",t.point,i),this.updateAxis("y",t.point,i),this.visualElement.render(),o&&o(e,t)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},l=()=>pg(e=>"paused"===this.getAnimationState(e)&&this.getAxisMotionValue(e).animation?.play()),{dragSnapToOrigin:u}=this.getProps();this.panSession=new p_(e,{onSessionStart:a,onStart:o,onMove:i,onSessionEnd:s,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:r,contextWindow:pR(this.visualElement),element:this.visualElement.current})}stop(e,t){let r=e||this.latestPointerEvent,n=t||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!n||!r)return;let{velocity:o}=n;this.startAnimation(o);let{onDragEnd:i}=this.getProps();i&&s5.postRender(()=>i(r,n))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,r){let{drag:n}=this.getProps();if(!r||!pV(e,n,this.currentDirection))return;let a=this.getAxisMotionValue(e),o=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(o=function(e,{min:t,max:r},n){return void 0!==t&&e<t?e=n?lX(t,e,n.min):Math.max(e,t):void 0!==r&&e>r&&(e=n?lX(r,e,n.max):Math.min(e,r)),e}(o,this.constraints[e],this.elastic[e])),a.set(o)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,n=this.constraints;e&&dK(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&r?this.constraints=function(e,{top:t,left:r,bottom:n,right:a}){return{x:pI(e.x,r,a),y:pI(e.y,t,n)}}(r.layoutBox,e):this.constraints=!1,this.elastic=function(e=.35){return!1===e?e=0:!0===e&&(e=.35),{x:pF(e,"left","right"),y:pF(e,"top","bottom")}}(t),n!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&pg(e=>{var t,n;let a;!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=(t=r.layoutBox[e],n=this.constraints[e],a={},void 0!==n.min&&(a.min=n.min-t.min),void 0!==n.max&&(a.max=n.max-t.min),a))})}resolveRefConstraints(){var e;let{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!dK(t))return!1;let n=t.current;ll(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");let{projection:a}=this.visualElement;if(!a||!a.layout)return!1;let o=function(e,t,r){let n=dx(e,r),{scroll:a}=t;return a&&(dy(n.x,a.offset.x),dy(n.y,a.offset.y)),n}(n,a.root,this.visualElement.getTransformPagePoint()),i=(e=a.layout.layoutBox,{x:pM(e.x,o.x),y:pM(e.y,o.y)});if(r){let e=r(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(i));this.hasMutatedConstraints=!!e,e&&(i=dc(e))}return i}startAnimation(e){let{drag:t,dragMomentum:r,dragElastic:n,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:i}=this.getProps(),s=this.constraints||{};return Promise.all(pg(i=>{if(!pV(i,t,this.currentDirection))return;let l=s&&s[i]||{};o&&(l={min:0,max:0});let u={type:"inertia",velocity:r?e[i]:0,bounceStiffness:n?200:1e6,bounceDamping:n?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...a,...l};return this.startAxisValueAnimation(i,u)})).then(i)}startAxisValueAnimation(e,t){let r=this.getAxisMotionValue(e);return d0(this.visualElement,e),r.start(pn(e,r,0,t,this.visualElement,!1))}stopAnimation(){pg(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){pg(e=>this.getAxisMotionValue(e).animation?.pause())}getAnimationState(e){return this.getAxisMotionValue(e).animation?.state}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,r=this.visualElement.getProps();return r[t]||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){pg(t=>{let{drag:r}=this.getProps();if(!pV(t,r,this.currentDirection))return;let{projection:n}=this.visualElement,a=this.getAxisMotionValue(t);if(n&&n.layout){let{min:r,max:o}=n.layout.layoutBox[t],i=a.get()||0;a.set(e[t]-lX(r,o,.5)+i)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:r}=this.visualElement;if(!dK(t)||!r||!this.constraints)return;this.stopAnimation();let n={x:0,y:0};pg(e=>{let t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){var r,a;let o,i,s,l=t.get();n[e]=(r={min:l,max:l},a=this.constraints[e],o=.5,i=pm(r),(s=pm(a))>i?o=uR(a.min,a.max-i,r.min):i>s&&(o=uR(r.min,r.max-s,a.min)),ld(0,1,o))}});let{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),pg(t=>{if(!pV(t,e,null))return;let r=this.getAxisMotionValue(t),{min:a,max:o}=this.constraints[t];r.set(lX(a,o,n[t]))})}addListeners(){if(!this.visualElement.current)return;pB.set(this.visualElement,this);let e=this.visualElement.current,t=pT(e,"pointerdown",t=>{let{drag:r,dragListener:n=!0}=this.getProps(),a=t.target,o=a!==e&&pS(a);r&&n&&!o&&this.start(t)}),r=()=>{let{dragConstraints:e}=this.getProps();dK(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,a=n.addEventListener("measure",r);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),s5.read(r);let o=pC(window,"resize",()=>this.scalePositionWithinConstraints()),i=n.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(pg(t=>{let r=this.getAxisMotionValue(t);r&&(this.originPoint[t]+=e[t].translate,r.set(r.get()+e[t].translate))}),this.visualElement.render())});return()=>{o(),t(),a(),i&&i()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:r=!1,dragPropagation:n=!1,dragConstraints:a=!1,dragElastic:o=.35,dragMomentum:i=!0}=e;return{...e,drag:t,dragDirectionLock:r,dragPropagation:n,dragConstraints:a,dragElastic:o,dragMomentum:i}}}function pV(e,t,r){return(!0===t||t===e)&&(null===r||r===e)}let pU=e=>(t,r)=>{e&&s5.postRender(()=>e(t,r))},pH={hasAnimatedSinceResize:!0,hasEverUpdated:!1},pW=!1;class pq extends L.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:r,layoutId:n}=this.props,{projection:a}=e;a&&(t.group&&t.group.add(a),r&&r.register&&n&&r.register(a),pW&&a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),pH.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:r,drag:n,isPresent:a}=this.props,{projection:o}=r;return o&&(o.isPresent=a,e.layoutDependency!==t&&o.setOptions({...o.options,layoutDependency:t}),pW=!0,n||e.layoutDependency!==t||void 0===t||e.isPresent!==a?o.willUpdate():this.safeToRemove(),e.isPresent!==a&&(a?o.promote():o.relegate()||s5.postRender(()=>{let e=o.getStack();e&&e.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),cI.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:r}=this.props,{projection:n}=e;pW=!0,n&&(n.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(n),r&&r.deregister&&r.deregister(n))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}}function pK(e){let[t,r]=function(e=!0){let t=(0,L.useContext)(dM);if(null===t)return[!0,null];let{isPresent:r,onExitComplete:n,register:a}=t,o=(0,L.useId)();(0,L.useEffect)(()=>{if(e)return a(o)},[e]);let i=(0,L.useCallback)(()=>e&&n&&n(o),[o,n,e]);return!r&&n?[!1,i]:[!0]}(),n=(0,L.useContext)(dE);return(0,A.jsx)(pq,{...e,layoutGroup:n,switchLayoutGroup:(0,L.useContext)(dq),isPresent:t,safeToRemove:r})}function pG(e){return"object"==typeof e&&null!==e}function pX(e){return pG(e)&&"ownerSVGElement"in e}let pY=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],pQ=pY.length,pZ=e=>"string"==typeof e?parseFloat(e):e,pJ=e=>"number"==typeof e||lA.test(e);function p0(e,t){return void 0!==e[t]?e[t]:e.borderRadius}let p1=p3(0,.5,uS),p2=p3(.5,.95,s1);function p3(e,t,r){return n=>n<e?0:n>t?1:r(uR(e,t,n))}function p5(e,t){e.min=t.min,e.max=t.max}function p9(e,t){p5(e.x,t.x),p5(e.y,t.y)}function p4(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function p6(e,t,r,n,a){return e-=t,e=n+1/r*(e-n),void 0!==a&&(e=n+1/a*(e-n)),e}function p8(e,t,[r,n,a],o,i){!function(e,t=0,r=1,n=.5,a,o=e,i=e){if(lN.test(t)&&(t=parseFloat(t),t=lX(i.min,i.max,t/100)-i.min),"number"!=typeof t)return;let s=lX(o.min,o.max,n);e===o&&(s-=t),e.min=p6(e.min,t,r,s,a),e.max=p6(e.max,t,r,s,a)}(e,t[r],t[n],t[a],t.scale,o,i)}let p7=["x","scaleX","originX"],he=["y","scaleY","originY"];function ht(e,t,r,n){p8(e.x,t,p7,r?r.x:void 0,n?n.x:void 0),p8(e.y,t,he,r?r.y:void 0,n?n.y:void 0)}function hr(e){return 0===e.translate&&1===e.scale}function hn(e){return hr(e.x)&&hr(e.y)}function ha(e,t){return e.min===t.min&&e.max===t.max}function ho(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function hi(e,t){return ho(e.x,t.x)&&ho(e.y,t.y)}function hs(e){return pm(e.x)/pm(e.y)}function hl(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class hu{constructor(){this.members=[]}add(e){sQ(this.members,e);for(let t=this.members.length-1;t>=0;t--){let r=this.members[t];if(r===e||r===this.lead||r===this.prevLead)continue;let n=r.instance;n&&!1!==n.isConnected||r.snapshot||(sZ(this.members,r),r.unmount())}e.scheduleRender()}remove(e){if(sZ(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(!1!==e.isPresent&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.updateSnapshot(),e.scheduleRender();let{layoutDependency:n}=r.options,{layoutDependency:a}=e.options;(void 0===n||n!==a)&&(e.resumeFrom=r,t&&(r.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),!1===e.options.crossfade&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}let hc=(e,t)=>e.depth-t.depth;class hd{constructor(){this.children=[],this.isDirty=!1}add(e){sQ(this.children,e),this.isDirty=!0}remove(e){sZ(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(hc),this.isDirty=!1,this.children.forEach(e)}}let hp=["","X","Y","Z"],hh=0;function hf(e,t,r,n){let{latestValues:a}=t;a[e]&&(r[e]=a[e],t.setStaticValue(e,0),n&&(n[e]=0))}function hg({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:n,resetTransform:a}){return class{constructor(e={},r=t?.()){this.id=hh++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(hy),this.nodes.forEach(hT),this.nodes.forEach(hR),this.nodes.forEach(hb)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=r?r.root||r:this,this.path=r?[...r.path,r]:[],this.parent=r,this.depth=r?r.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new hd)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new sJ),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let r=this.eventHandlers.get(e);r&&r.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=pX(t)&&!(pX(t)&&"svg"===t.tagName),this.instance=t;let{layoutId:r,layout:n,visualElement:a}=this.options;if(a&&!a.current&&a.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(n||r)&&(this.isLayoutDirty=!0),e){let r,n=0,a=()=>this.root.updateBlockedByResize=!1;s5.read(()=>{n=window.innerWidth}),e(t,()=>{let e=window.innerWidth;if(e!==n){let t,o;n=e,this.root.updateBlockedByResize=!0,r&&r(),t=s7.now(),o=({timestamp:e})=>{let r=e-t;r>=250&&(s9(o),a(r-250))},s5.setup(o,!0),r=()=>s9(o),pH.hasAnimatedSinceResize&&(pH.hasAnimatedSinceResize=!1,this.nodes.forEach(hE))}})}r&&this.root.registerSharedNode(r,this),!1!==this.options.animate&&a&&(r||n)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:r,layout:n})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let o=this.options.transition||a.getDefaultTransition()||hA,{onLayoutAnimationStart:i,onLayoutAnimationComplete:s}=a.getProps(),l=!this.targetLayout||!hi(this.targetLayout,n),u=!t&&r;if(this.options.layoutRoot||this.resumeFrom||u||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...dZ(o,"layout"),onPlay:i,onComplete:s};(a.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,u)}else t||hE(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=n})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),s9(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){!this.isUpdateBlocked()&&(this.isUpdating=!0,this.nodes&&this.nodes.forEach(hO),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&function e(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;let{visualElement:r}=t.options;if(!r)return;let n=r.props[dW];if(window.MotionHasOptimisedAnimation(n,"transform")){let{layout:e,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",s5,!(e||r))}let{parent:a}=t;a&&!a.hasCheckedOptimisedAppear&&e(a)}(this),this.root.isUpdating||this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,("string"==typeof t.latestValues.x||"string"==typeof t.latestValues.y)&&(t.isLayoutDirty=!0),t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:r}=this.options;if(void 0===t&&!r)return;let n=this.getTransformTemplate();this.prevTransformTemplateValue=n?n(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(hx),this.nodes.forEach(hk);return}if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(hS);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(hC),this.nodes.forEach(hP),this.nodes.forEach(hm),this.nodes.forEach(hv)):this.nodes.forEach(hS),this.clearAllSnapshots();let e=s7.now();s4.delta=ld(0,1e3/60,e-s4.timestamp),s4.timestamp=e,s4.isProcessing=!0,s6.update.process(s4),s6.preRender.process(s4),s6.render.process(s4),s4.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,cI.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(hw),this.sharedNodes.forEach(hj)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,s5.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){s5.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||pm(this.snapshot.measuredBox.x)||pm(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=u5()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=n(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!a)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!hn(this.projectionDelta),r=this.getTransformTemplate(),n=r?r(this.latestValues,""):void 0,o=n!==this.prevTransformTemplateValue;e&&this.instance&&(t||dh(this.latestValues)||o)&&(a(this.instance,n),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){var t;let r=this.measurePageBox(),n=this.removeElementScroll(r);return e&&(n=this.removeTransform(n)),hM((t=n).x),hM(t.y),{animationId:this.root.animationId,measuredBox:r,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return u5();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(hD))){let{scroll:e}=this.root;e&&(dy(t.x,e.offset.x),dy(t.y,e.offset.y))}return t}removeElementScroll(e){let t=u5();if(p9(t,e),this.scroll?.wasRoot)return t;for(let r=0;r<this.path.length;r++){let n=this.path[r],{scroll:a,options:o}=n;n!==this.root&&a&&o.layoutScroll&&(a.wasRoot&&p9(t,e),dy(t.x,a.offset.x),dy(t.y,a.offset.y))}return t}applyTransform(e,t=!1,r){let n=r||u5();p9(n,e);for(let e=0;e<this.path.length;e++){let r=this.path[e];!t&&r.options.layoutScroll&&r.scroll&&r!==r.root&&(dy(n.x,-r.scroll.offset.x),dy(n.y,-r.scroll.offset.y)),dh(r.latestValues)&&dk(n,r.latestValues,r.layout?.layoutBox)}return dh(this.latestValues)&&dk(n,this.latestValues,this.layout?.layoutBox),n}removeTransform(e){let t=u5();p9(t,e);for(let e=0;e<this.path.length;e++){let r,n=this.path[e];dh(n.latestValues)&&(n.instance&&(dp(n.latestValues)&&n.updateSnapshot(),p9(r=u5(),n.measurePageBox())),ht(t,n.latestValues,n.snapshot?.layoutBox,r))}return dh(this.latestValues)&&ht(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==s4.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=t.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=t.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=t.isSharedProjectionDirty);let r=!!this.resumingFrom||this!==t;if(!(e||r&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:n,layoutId:a}=this.options;if(!this.layout||!(n||a))return;this.resolvedRelativeTargetAt=s4.timestamp;let o=this.getClosestProjectingParent();if(o&&this.linkedParentVersion!==o.layoutVersion&&!o.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(!1!==this.options.layoutAnchor&&o&&o.layout?this.createRelativeTarget(o,this.layout.layoutBox,o.layout.layoutBox):this.removeRelativeTarget()),this.relativeTarget||this.targetDelta){if(this.target||(this.target=u5(),this.targetWithTransforms=u5()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target){var i,s,l,u;this.forceRelativeParentToResolveTarget(),i=this.target,s=this.relativeTarget,l=this.relativeParent.target,u=this.options.layoutAnchor||void 0,pb(i.x,s.x,l.x,u?.x),pb(i.y,s.y,l.y,u?.y)}else this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):p9(this.target,this.layout.layoutBox),dv(this.target,this.targetDelta)):p9(this.target,this.layout.layoutBox);this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,!1!==this.options.layoutAnchor&&o&&!!o.resumingFrom==!!this.resumingFrom&&!o.options.layoutScroll&&o.target&&1!==this.animationProgress?this.createRelativeTarget(o,this.target,o.target):this.relativeParent=this.relativeTarget=void 0)}}getClosestProjectingParent(){if(!(!this.parent||dp(this.parent.latestValues)||df(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,r){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=u5(),this.relativeTargetOrigin=u5(),pk(this.relativeTargetOrigin,t,r,this.options.layoutAnchor||void 0),p9(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,r=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(r=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===s4.timestamp&&(r=!1),r)return;let{layout:n,layoutId:a}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(n||a))return;p9(this.layoutCorrected,this.layout.layoutBox);let o=this.treeScale.x,i=this.treeScale.y;!function(e,t,r,n=!1){let a,o,i=r.length;if(i){t.x=t.y=1;for(let s=0;s<i;s++){o=(a=r[s]).projectionDelta;let{visualElement:i}=a.options;(!i||!i.props.style||"contents"!==i.props.style.display)&&(n&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(dy(e.x,-a.scroll.offset.x),dy(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,dv(e,o)),n&&dh(a.latestValues)&&dk(e,a.latestValues,a.layout?.layoutBox))}t.x<1.0000000000001&&t.x>.999999999999&&(t.x=1),t.y<1.0000000000001&&t.y>.999999999999&&(t.y=1)}}(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(1!==this.treeScale.x||1!==this.treeScale.y)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=u5());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}this.projectionDelta&&this.prevProjectionDelta?(p4(this.prevProjectionDelta.x,this.projectionDelta.x),p4(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),py(this.projectionDelta,this.layoutCorrected,s,this.latestValues),this.treeScale.x===o&&this.treeScale.y===i&&hl(this.projectionDelta.x,this.prevProjectionDelta.x)&&hl(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",s))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=u2(),this.projectionDelta=u2(),this.projectionDeltaWithTransform=u2()}setAnimationOrigin(e,t=!1){let r,n=this.snapshot,a=n?n.latestValues:{},o={...this.latestValues},i=u2();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=u5(),l=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),u=this.getStack(),c=!u||u.members.length<=1,d=!!(l&&!c&&!0===this.options.crossfade&&!this.path.some(hN));this.animationProgress=0,this.mixTargetDelta=t=>{let n=t/1e3;if(h_(i.x,e.x,n),h_(i.y,e.y,n),this.setTargetDelta(i),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){var u,p,h,f,g,m;pk(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),h=this.relativeTarget,f=this.relativeTargetOrigin,g=s,m=n,hz(h.x,f.x,g.x,m),hz(h.y,f.y,g.y,m),r&&(u=this.relativeTarget,p=r,ha(u.x,p.x)&&ha(u.y,p.y))&&(this.isProjectionDirty=!1),r||(r=u5()),p9(r,this.relativeTarget)}l&&(this.animationValues=o,function(e,t,r,n,a,o){a?(e.opacity=lX(0,r.opacity??1,p1(n)),e.opacityExit=lX(t.opacity??1,0,p2(n))):o&&(e.opacity=lX(t.opacity??1,r.opacity??1,n));for(let a=0;a<pQ;a++){let o=pY[a],i=p0(t,o),s=p0(r,o);(void 0!==i||void 0!==s)&&(i||(i=0),s||(s=0),0===i||0===s||pJ(i)===pJ(s)?(e[o]=Math.max(lX(pZ(i),pZ(s),n),0),(lN.test(s)||lN.test(i))&&(e[o]+="%")):e[o]=s)}(t.rotate||r.rotate)&&(e.rotate=lX(t.rotate||0,r.rotate||0,n))}(o,a,this.latestValues,n,d,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(1e3*!!this.options.layoutRoot)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(s9(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=s5.update(()=>{var t,r,n;let a;pH.hasAnimatedSinceResize=!0,lh.layout++,this.motionValue||(this.motionValue=lr(0)),this.motionValue.jump(0,!1),this.currentAnimation=(t=this.motionValue,r=[0,1e3],n={...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{lh.layout--},onComplete:()=>{lh.layout--,e.onComplete&&e.onComplete(),this.completeAnimation()}},(a=li(t)?t:lr(t)).start(pn("",a,r,n)),a.animation),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:r,layout:n,latestValues:a}=e;if(t&&r&&n){if(this!==e&&this.layout&&n&&hF(this.options.animationType,this.layout.layoutBox,n.layoutBox)){r=this.target||u5();let t=pm(this.layout.layoutBox.x);r.x.min=e.target.x.min,r.x.max=r.x.min+t;let n=pm(this.layout.layoutBox.y);r.y.min=e.target.y.min,r.y.max=r.y.min+n}p9(t,r),dk(t,a),py(this.projectionDeltaWithTransform,this.layoutCorrected,t,a)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new hu),this.sharedNodes.get(e).add(t);let r=t.options.initialPromotionConfig;t.promote({transition:r?r.transition:void 0,preserveFollowOpacity:r&&r.shouldPreserveFollowOpacity?r.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:r}={}){let n=this.getStack();n&&n.promote(this,r),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:r}=e;if((r.z||r.rotate||r.rotateX||r.rotateY||r.rotateZ||r.skewX||r.skewY)&&(t=!0),!t)return;let n={};r.z&&hf("z",e,n,this.animationValues);for(let t=0;t<hp.length;t++)hf(`rotate${hp[t]}`,e,n,this.animationValues),hf(`skew${hp[t]}`,e,n,this.animationValues);for(let t in e.render(),n)e.setStaticValue(t,n[t]),this.animationValues&&(this.animationValues[t]=n[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility="hidden";return}let r=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility="",e.opacity="",e.pointerEvents=dI(t?.pointerEvents)||"",e.transform=r?r(this.latestValues,""):"none";return}let n=this.getLead();if(!this.projectionDelta||!this.layout||!n.target){this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=dI(t?.pointerEvents)||""),this.hasProjected&&!dh(this.latestValues)&&(e.transform=r?r({},""):"none",this.hasProjected=!1);return}e.visibility="";let a=n.animationValues||n.latestValues;this.applyTransformsToTarget();let o=function(e,t,r){let n="",a=e.x.translate/t.x,o=e.y.translate/t.y,i=r?.z||0;if((a||o||i)&&(n=`translate3d(${a}px, ${o}px, ${i}px) `),(1!==t.x||1!==t.y)&&(n+=`scale(${1/t.x}, ${1/t.y}) `),r){let{transformPerspective:e,rotate:t,rotateX:a,rotateY:o,skewX:i,skewY:s}=r;e&&(n=`perspective(${e}px) ${n}`),t&&(n+=`rotate(${t}deg) `),a&&(n+=`rotateX(${a}deg) `),o&&(n+=`rotateY(${o}deg) `),i&&(n+=`skewX(${i}deg) `),s&&(n+=`skewY(${s}deg) `)}let s=e.x.scale*t.x,l=e.y.scale*t.y;return(1!==s||1!==l)&&(n+=`scale(${s}, ${l})`),n||"none"}(this.projectionDeltaWithTransform,this.treeScale,a);r&&(o=r(a,o)),e.transform=o;let{x:i,y:s}=this.projectionDelta;for(let t in e.transformOrigin=`${100*i.origin}% ${100*s.origin}% 0`,n.animationValues?e.opacity=n===this?a.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:a.opacityExit:e.opacity=n===this?void 0!==a.opacity?a.opacity:"":void 0!==a.opacityExit?a.opacityExit:0,da){if(void 0===a[t])continue;let{correct:r,applyTo:i,isCSSVariable:s}=da[t],l="none"===o?a[t]:r(a[t],n);if(i){let t=i.length;for(let r=0;r<t;r++)e[i[r]]=l}else s?this.options.visualElement.renderState.vars[t]=l:e[t]=l}this.options.layoutId&&(e.pointerEvents=n===this?dI(t?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(hk),this.root.sharedNodes.clear()}}}function hm(e){e.updateLayout()}function hv(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){let{layoutBox:r,measuredBox:n}=e.layout,{animationType:a}=e.options,o=t.source!==e.layout.source;if("size"===a)pg(e=>{let n=o?t.measuredBox[e]:t.layoutBox[e],a=pm(n);n.min=r[e].min,n.max=n.min+a});else if("x"===a||"y"===a){let e="x"===a?"y":"x";p5(o?t.measuredBox[e]:t.layoutBox[e],r[e])}else hF(a,t.layoutBox,r)&&pg(n=>{let a=o?t.measuredBox[n]:t.layoutBox[n],i=pm(r[n]);a.max=a.min+i,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[n].max=e.relativeTarget[n].min+i)});let i=u2();py(i,r,t.layoutBox);let s=u2();o?py(s,e.applyTransform(n,!0),t.measuredBox):py(s,r,t.layoutBox);let l=!hn(i),u=!1;if(!e.resumeFrom){let n=e.getClosestProjectingParent();if(n&&!n.resumeFrom){let{snapshot:a,layout:o}=n;if(a&&o){let i=e.options.layoutAnchor||void 0,s=u5();pk(s,t.layoutBox,a.layoutBox,i);let l=u5();pk(l,r,o.layoutBox,i),hi(s,l)||(u=!0),n.options.layoutRoot&&(e.relativeTarget=l,e.relativeTargetOrigin=s,e.relativeParent=n)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:s,layoutDelta:i,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function hy(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function hb(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function hw(e){e.clearSnapshot()}function hk(e){e.clearMeasurements()}function hx(e){e.isLayoutDirty=!0,e.updateLayout()}function hS(e){e.isLayoutDirty=!1}function hC(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function hP(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function hE(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function hT(e){e.resolveTargetDelta()}function hR(e){e.calcProjection()}function hO(e){e.resetSkewAndRotation()}function hj(e){e.removeLeadSnapshot()}function h_(e,t,r){e.translate=lX(t.translate,0,r),e.scale=lX(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function hz(e,t,r,n){e.min=lX(t.min,r.min,n),e.max=lX(t.max,r.max,n)}function hN(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}let hA={duration:.45,ease:[.4,0,.1,1]},hL=e=>"u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),hI=hL("applewebkit/")&&!hL("chrome/")?Math.round:s1;function hM(e){e.min=hI(e.min),e.max=hI(e.max)}function hF(e,t,r){return"position"===e||"preserve-aspect"===e&&!(.2>=Math.abs(hs(t)-hs(r)))}function hD(e){return e!==e.root&&e.scroll?.wasRoot}let hB=hg({attachResizeListener:(e,t)=>pC(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),h$={current:void 0},hV=hg({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!h$.current){let e=new hB({});e.mount(window),e.setOptions({layoutScroll:!0}),h$.current=e}return h$.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>"fixed"===window.getComputedStyle(e).position});function hU(e,t){let r=function(e,t,r){if(null==e)return[];if(e instanceof EventTarget)return[e];if("string"==typeof e){let t=document,r=(void 0)??t.querySelectorAll(e);return r?Array.from(r):[]}return Array.from(e).filter(e=>null!=e)}(e),n=new AbortController;return[r,{passive:!0,...t,signal:n.signal},()=>n.abort()]}function hH(e,t,r){let{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover","Start"===r);let a=n["onHover"+r];a&&s5.postRender(()=>a(t,pE(t)))}let hW=(e,t)=>!!t&&(e===t||hW(e,t.parentElement)),hq=new WeakSet;function hK(e){return t=>{"Enter"===t.key&&e(t)}}function hG(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function hX(e){return pP(e)&&!(pf.x||pf.y)}let hY=new WeakSet;function hQ(e,t,r){let{props:n}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&n.whileTap&&e.animationState.setActive("whileTap","Start"===r);let a=n["onTap"+("End"===r?"":r)];a&&s5.postRender(()=>a(t,pE(t)))}let hZ=new WeakMap,hJ=new WeakMap,h0=e=>{let t=hZ.get(e.target);t&&t(e)},h1=e=>{e.forEach(h0)},h2={some:0,all:1},h3=function(e,t){if("u"<typeof Proxy)return dG;let r=new Map,n=(r,n)=>dG(r,n,e,t);return new Proxy((e,t)=>n(e,t),{get:(a,o)=>"create"===o?n:(r.has(o)||r.set(o,dG(o,void 0,e,t)),r.get(o))})}({animation:{Feature:class extends dX{constructor(e){super(e),e.animationState||(e.animationState=function(e){let t=t=>Promise.all(t.map(({animation:t,options:r})=>(function(e,t,r={}){let n;if(e.notify("AnimationStart",t),Array.isArray(t))n=Promise.all(t.map(t=>pi(e,t,r)));else if("string"==typeof t)n=pi(e,t,r);else{let a="function"==typeof t?dY(e,t,r.custom):t;n=Promise.all(pa(e,a,r))}return n.then(()=>{e.notify("AnimationComplete",t)})})(e,t,r))),r=pp(),n=!0,a=!1,o=t=>(r,n)=>{let a=dY(e,n,"exit"===t?e.presenceContext?.custom:void 0);if(a){let{transition:e,transitionEnd:t,...n}=a;r={...r,...n,...t}}return r};function i(i){let{props:s}=e,l=function e(t){if(!t)return;if(!t.isControllingVariants){let r=t.parent&&e(t.parent)||{};return void 0!==t.props.initial&&(r.initial=t.props.initial),r}let r={};for(let e=0;e<ps;e++){let n=cV[e],a=t.props[n];(cB(a)||!1===a)&&(r[n]=a)}return r}(e.parent)||{},u=[],c=new Set,d={},p=1/0;for(let t=0;t<pc;t++){var h,f;let g=pu[t],m=r[g],v=void 0!==s[g]?s[g]:l[g],y=cB(v),b=g===i?m.isActive:null;!1===b&&(p=t);let w=v===l[g]&&v!==s[g]&&y;if(w&&(n||a)&&e.manuallyAnimateOnMount&&(w=!1),m.protectedKeys={...d},!m.isActive&&null===b||!v&&!m.prevProp||cD(v)||"boolean"==typeof v)continue;if("exit"===g&&m.isActive&&!0!==b){m.prevResolvedValues&&(d={...d,...m.prevResolvedValues});continue}let k=(h=m.prevProp,"string"==typeof(f=v)?f!==h:!!Array.isArray(f)&&!pl(f,h)),x=k||g===i&&m.isActive&&!w&&y||t>p&&y,S=!1,C=Array.isArray(v)?v:[v],P=C.reduce(o(g),{});!1===b&&(P={});let{prevResolvedValues:E={}}=m,T={...E,...P},R=t=>{x=!0,c.has(t)&&(S=!0,c.delete(t)),m.needsAnimating[t]=!0;let r=e.getValue(t);r&&(r.liveStyle=!1)};for(let e in T){let t=P[e],r=E[e];if(!d.hasOwnProperty(e))(dJ(t)&&dJ(r)?pl(t,r):t===r)?void 0!==t&&c.has(e)?R(e):m.protectedKeys[e]=!0:null!=t?R(e):c.add(e)}m.prevProp=v,m.prevResolvedValues=P,m.isActive&&(d={...d,...P}),(n||a)&&e.blockInitialAnimation&&(x=!1);let O=w&&k,j=!O||S;x&&j&&u.push(...C.map(t=>{let r={type:g};if("string"==typeof t&&(n||a)&&!O&&e.manuallyAnimateOnMount&&e.parent){let{parent:n}=e,a=dY(n,t);if(n.enteringChildren&&a){let{delayChildren:t}=a.transition||{};r.delay=po(n.enteringChildren,e,t)}}return{animation:t,options:r}}))}if(c.size){let t={};if("boolean"!=typeof s.initial){let r=dY(e,Array.isArray(s.initial)?s.initial[0]:s.initial);r&&r.transition&&(t.transition=r.transition)}c.forEach(r=>{let n=e.getBaseTarget(r),a=e.getValue(r);a&&(a.liveStyle=!0),t[r]=n??null}),u.push({animation:t})}let g=!!u.length;return n&&(!1===s.initial||s.initial===s.animate)&&!e.manuallyAnimateOnMount&&(g=!1),n=!1,a=!1,g?t(u):Promise.resolve()}return{animateChanges:i,setActive:function(t,n){if(r[t].isActive===n)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,n)),r[t].isActive=n;let a=i(t);for(let e in r)r[e].protectedKeys={};return a},setAnimateFunction:function(r){t=r(e)},getState:()=>r,reset:()=>{r=pp(),a=!0}}}(e))}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();cD(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends dX{constructor(){super(...arguments),this.id=ph++}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;let n=this.node.animationState.setActive("exit",!e);t&&!e&&n.then(()=>{t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}},inView:{Feature:class extends dX{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var e;let t;this.unmount();let{viewport:r={}}=this.node.getProps(),{root:n,margin:a,amount:o="some",once:i}=r,s={root:n?n.current:void 0,rootMargin:a,threshold:"number"==typeof o?o:h2[o]},l=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);let{onViewportEnter:r,onViewportLeave:n}=this.node.getProps(),a=t?r:n;a&&a(e)};return e=this.node.current,t=function({root:e,...t}){let r=e||document;hJ.has(r)||hJ.set(r,{});let n=hJ.get(r),a=JSON.stringify(t);return n[a]||(n[a]=new IntersectionObserver(h1,{root:e,...t})),n[a]}(s),hZ.set(e,l),t.observe(e),()=>{hZ.delete(e),t.unobserve(e)}}mount(){this.startObserver()}update(){if("u"<typeof IntersectionObserver)return;let{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends dX{mount(){let{current:e}=this.node;e&&(this.unmount=function(e,t,r={}){let[n,a,o]=hU(e,r),i=e=>{let n=e.currentTarget;if(!hX(e)||hY.has(e))return;hq.add(n),r.stopPropagation&&hY.add(e);let o=t(n,e),i=(e,t)=>{window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",l),hq.has(n)&&hq.delete(n),hX(e)&&"function"==typeof o&&o(e,{success:t})},s=e=>{i(e,n===window||n===document||r.useGlobalTarget||hW(n,e.target))},l=e=>{i(e,!1)};window.addEventListener("pointerup",s,a),window.addEventListener("pointercancel",l,a)};return n.forEach(e=>{(r.useGlobalTarget?window:e).addEventListener("pointerdown",i,a),pG(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)&&(e.addEventListener("focus",e=>((e,t)=>{let r=e.currentTarget;if(!r)return;let n=hK(()=>{if(hq.has(r))return;hG(r,"down");let e=hK(()=>{hG(r,"up")});r.addEventListener("keyup",e,t),r.addEventListener("blur",()=>hG(r,"cancel"),t)});r.addEventListener("keydown",n,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",n),t)})(e,a)),pS(e)||e.hasAttribute("tabindex")||(e.tabIndex=0))}),o}(e,(e,t)=>(hQ(this.node,t,"Start"),(e,{success:t})=>hQ(this.node,e,t?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends dX{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=lc(pC(this.node.current,"focus",()=>this.onFocus()),pC(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends dX{mount(){let{current:e}=this.node;e&&(this.unmount=function(e,t,r={}){let[n,a,o]=hU(e,r);return n.forEach(e=>{let r,n=!1,o=!1,i=t=>{r&&(r(t),r=void 0),e.removeEventListener("pointerleave",l)},s=e=>{n=!1,window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",s),o&&(o=!1,i(e))},l=e=>{if("touch"!==e.pointerType){if(n){o=!0;return}i(e)}};e.addEventListener("pointerenter",n=>{if("touch"===n.pointerType||pf.x||pf.y)return;o=!1;let i=t(e,n);"function"==typeof i&&(r=i,e.addEventListener("pointerleave",l,a))},a),e.addEventListener("pointerdown",()=>{n=!0,window.addEventListener("pointerup",s,a),window.addEventListener("pointercancel",s,a)},a)}),o}(e,(e,t)=>(hH(this.node,t,"Start"),e=>hH(this.node,e,"End"))))}unmount(){}}},pan:{Feature:class extends dX{constructor(){super(...arguments),this.removePointerDownListener=s1}onPointerDown(e){this.session=new p_(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:pR(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:r,onPanEnd:n}=this.node.getProps();return{onSessionStart:pU(e),onStart:pU(t),onMove:r,onEnd:(e,t)=>{delete this.session,n&&s5.postRender(()=>n(e,t))}}}mount(){this.removePointerDownListener=pT(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends dX{constructor(e){super(e),this.removeGroupControls=s1,this.removeListeners=s1,this.controls=new p$(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||s1}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},ProjectionNode:hV,MeasureLayout:pK},layout:{ProjectionNode:hV,MeasureLayout:pK}},(e,t)=>t.isSVG??dP(e)?new du(t):new dS(t,{allowProjection:e!==L.Fragment})),h5=(0,L.createContext)(null);function h9(){let e=(0,L.use)(h5);if(!e)throw Error("useComparisonSliderContext must be used within ComparisonSlider");return e}function h4({"aria-label":e="Comparison slider",className:t,mode:r="drag",onDragEnd:n,onDragStart:a,...o}){let[i,s]=(0,L.useState)(!1),l=lo(50),u=function(e,t={}){return function(e,t={}){let{isStatic:r}=(0,L.useContext)(ln),n=()=>li(e)?e.get():e;if(r)return uV(n);let a=lo(n());return(0,L.useInsertionEffect)(()=>(function(e,t,r={}){let n,a=e.get(),o=null,i=a,s="string"==typeof a?a.replace(/[\d.-]/g,""):void 0,l=()=>{o&&(o.stop(),o=null),e.animation=void 0},u=()=>{(()=>{let t=uF(e.get()),a=uF(i);if(t===a)return l();let s=o?o.getGeneratorVelocity():e.getVelocity();l(),o=new uM({keyframes:[t,a],velocity:s,type:"spring",restDelta:.001,restSpeed:.01,...r,onUpdate:n})})(),e.animation=o??void 0,e.events.animationStart?.notify(),o?.then(()=>{e.animation=void 0,e.events.animationComplete?.notify()})};if(e.attach((e,t)=>{i=e,n=e=>{var r,n;return t((r=e,(n=s)?r+n:r))},s5.postRender(u)},l),li(t)){let n=!0===r.skipInitialAnimation,a=t.on("change",t=>{var r,a,o,i;n?(n=!1,e.jump((r=t,(a=s)?r+a:r),!1)):e.set((o=t,(i=s)?o+i:o))}),o=e.on("destroy",a);return()=>{a(),o()}}return l})(a,e,t),[a,JSON.stringify(t)]),a}(e,{type:"spring",...t})}(l,{bounce:0,duration:0}),[c,d]=(0,L.useState)(50),p=(0,L.useMemo)(()=>({mode:r,motionSliderPosition:u,setSliderPosition:d,sliderPosition:c}),[r,u,c]);function h(e){let t=Math.min(Math.max(e,0),100);l.set(t),d(t)}function f(e,t){(i||"drag"!==r)&&h((t-e.left)/e.width*100)}function g(){"drag"===r&&(s(!0),a?.())}function m(){"drag"===r&&(s(!1),n?.())}return(0,A.jsx)(h5,{value:p,children:(0,A.jsx)("div",{"aria-label":e,"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":c,className:i2("relative isolate w-full select-none overflow-hidden",t),role:"slider",tabIndex:0,onKeyDown:e=>{let t=e.shiftKey?10:1;("ArrowLeft"===e.key||"ArrowDown"===e.key)&&(e.preventDefault(),h(c-t)),("ArrowRight"===e.key||"ArrowUp"===e.key)&&(e.preventDefault(),h(c+t)),"Home"===e.key&&(e.preventDefault(),h(0)),"End"===e.key&&(e.preventDefault(),h(100))},onMouseDown:g,onMouseLeave:m,onMouseMove:e=>{f(e.currentTarget.getBoundingClientRect(),e.clientX)},onMouseUp:m,onTouchEnd:m,onTouchMove:e=>{f(e.currentTarget.getBoundingClientRect(),e.touches[0]?.clientX??0)},onTouchStart:g,...o})})}function h6({className:e,position:t,...r}){let{motionSliderPosition:n}=h9(),a=uV(n,e=>`inset(0 0 0 ${e}%)`),o=uV(n,e=>`inset(0 ${100-e}% 0 0)`);return(0,A.jsx)(h3.div,{"aria-hidden":"true",className:i2("absolute inset-0 h-full w-full object-cover",e),role:"img",style:{clipPath:"left"===t?a:o},...r})}function h8({className:e,children:t,...r}){let{mode:n,motionSliderPosition:a}=h9(),o=uV(a,e=>`${e}%`);return(0,A.jsx)(h3.div,{"aria-hidden":"true",className:i2("-translate-x-1/2 absolute top-0 z-50 flex h-full w-10 items-center justify-center","drag"===n&&"cursor-grab active:cursor-grabbing",e),role:"presentation",style:{left:o},...r,children:t??(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)("div",{className:"-translate-x-1/2 absolute left-1/2 h-full w-0.5 bg-background"}),"drag"===n&&(0,A.jsx)("div",{className:"z-50 flex items-center justify-center rounded-sm bg-background px-0.5 py-1",children:(0,A.jsx)("span",{className:"h-4 w-0.5 rounded-full bg-muted-foreground"})})]})})}function h7(e){return(0,A.jsxs)("svg",{fill:"none",viewBox:"0 0 20 19",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,A.jsx)("path",{d:"M5.83302 17.3478C5.83302 16.9097 6.00874 16.4895 6.3213 16.1797C6.63386 15.8699 7.05766 15.6957 7.49968 15.6957C7.9417 15.6957 8.3655 15.8699 8.67806 16.1797C8.99062 16.4895 9.16634 16.9097 9.16634 17.3478C9.16634 17.786 8.99062 18.2061 8.67806 18.516C8.3655 18.8258 7.9417 19 7.49968 19C7.05766 19 6.63386 18.8258 6.3213 18.516C6.00874 18.2061 5.83302 17.786 5.83302 17.3478Z",fill:"currentColor"}),(0,A.jsx)("path",{d:"M14.9999 17.3478C14.9999 16.9097 15.1756 16.4896 15.4882 16.1797C15.8008 15.8699 16.2246 15.6957 16.6666 15.6957C17.1086 15.6957 17.5324 15.8699 17.845 16.1797C18.1575 16.4896 18.3332 16.9097 18.3332 17.3478C18.3332 17.786 18.1575 18.2061 17.845 18.516C17.5324 18.8258 17.1086 19 16.6666 19C16.2246 19 15.8008 18.8258 15.4882 18.516C15.1756 18.2061 14.9999 17.786 14.9999 17.3478Z",fill:"currentColor"}),(0,A.jsx)("path",{d:"M4.16665 0L4.2407 0.00322688C4.60569 0.0352804 4.91062 0.302097 4.9837 0.66393L5.68357 4.1304H19.1666C19.4149 4.1304 19.6503 4.24008 19.8087 4.4297C19.967 4.61939 20.0318 4.86954 19.9853 5.11137L18.6514 12.0419L18.6506 12.0484C18.5363 12.6188 18.223 13.1309 17.766 13.4956C17.3132 13.857 16.7478 14.0499 16.1669 14.0426L8.06637 14.0434C7.48543 14.0507 6.92009 13.857 6.46725 13.4956C6.01045 13.1311 5.69711 12.6193 5.58265 12.0492L4.18618 5.13235C4.18448 5.12458 4.18277 5.11681 4.18129 5.10895L3.48387 1.65216H0.833329C0.373094 1.65216 0 1.28231 0 0.826081C0 0.369849 0.373094 0 0.833329 0H4.16665ZM7.21676 11.7249L7.21757 11.7265C7.2557 11.9166 7.35986 12.0874 7.51217 12.2089C7.66452 12.3305 7.85536 12.3949 8.0509 12.3912H16.1824C16.3779 12.3949 16.5688 12.3305 16.7211 12.2089C16.8544 12.1025 16.951 11.9584 16.9986 11.7967L17.0157 11.7265L18.1591 5.78257H6.01722L7.21676 11.7249Z",fill:"currentColor"})]})}function fe(e){return(0,A.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,A.jsx)("g",{clipPath:"url(#clip0_3784_10212)",children:(0,A.jsx)("path",{d:"M13.4104 11.9958L17.7104 7.70579C17.8036 7.61255 17.8776 7.50186 17.928 7.38004C17.9785 7.25822 18.0045 7.12765 18.0045 6.99579C18.0045 6.86393 17.9785 6.73336 17.928 6.61154C17.8776 6.48972 17.8036 6.37903 17.7104 6.28579C17.6171 6.19255 17.5064 6.11859 17.3846 6.06813C17.2628 6.01767 17.1322 5.9917 17.0004 5.9917C16.8685 5.9917 16.7379 6.01767 16.6161 6.06813C16.4943 6.11859 16.3836 6.19255 16.2904 6.28579L12.0004 10.5858L7.71036 6.28579C7.52206 6.09749 7.26666 5.9917 7.00036 5.9917C6.73406 5.9917 6.47866 6.09749 6.29036 6.28579C6.10206 6.47409 5.99627 6.72949 5.99627 6.99579C5.99627 7.26209 6.10206 7.51749 6.29036 7.70579L10.5904 11.9958L6.29036 16.2858C6.19651 16.3787 6.12201 16.4893 6.07116 16.6111C6.02032 16.733 5.99414 16.8637 5.99414 16.9958C5.99414 17.1278 6.02032 17.2586 6.07116 17.3804C6.12201 17.5023 6.19651 17.6129 6.29036 17.7058C6.38332 17.7995 6.49392 17.8739 6.61578 17.9247C6.73764 17.9754 6.86835 18.0016 7.00036 18.0016C7.13237 18.0016 7.26308 17.9754 7.38494 17.9247C7.5068 17.8739 7.6174 17.7995 7.71036 17.7058L12.0004 13.4058L16.2904 17.7058C16.4067 17.8236 16.5505 17.9107 16.7087 17.9593C16.867 18.0079 17.0349 18.0165 17.1973 17.9843C17.3597 17.9521 17.5116 17.8801 17.6394 17.7748C17.7671 17.6695 17.8668 17.5341 17.9294 17.3808C18.0058 17.1971 18.0257 16.9948 17.9865 16.7997C17.9473 16.6047 17.8508 16.4257 17.7094 16.2858L13.4104 11.9958Z",fill:"currentColor"})}),(0,A.jsx)("defs",{children:(0,A.jsx)("clipPath",{id:"clip0_3784_10212",children:(0,A.jsx)("rect",{width:"24",height:"24",fill:"white"})})})]})}function ft(e){return(0,A.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...e,children:[(0,A.jsx)("path",{d:"M14.3102 16.38L13.0002 17.64V12C13.0002 11.7348 12.8948 11.4804 12.7073 11.2929C12.5197 11.1053 12.2654 11 12.0002 11C11.735 11 11.4806 11.1053 11.2931 11.2929C11.1055 11.4804 11.0002 11.7348 11.0002 12V17.59L9.71018 16.29C9.56958 16.15 9.39071 16.0548 9.1961 16.0163C9.00149 15.9779 8.79984 15.9978 8.61656 16.0738C8.43329 16.1497 8.27658 16.2781 8.16618 16.443C8.05578 16.6078 7.99663 16.8016 7.99618 17C7.99616 17.1318 8.02212 17.2624 8.07256 17.3842C8.12301 17.506 8.19695 17.6167 8.29018 17.71L11.2902 20.71C11.4758 20.8945 11.7264 20.999 11.9881 21.0008C12.2499 21.0027 12.5019 20.9019 12.6902 20.72L15.6902 17.82C15.796 17.7323 15.8827 17.6237 15.9448 17.5011C16.0069 17.3785 16.0431 17.2444 16.0512 17.1072C16.0593 16.97 16.039 16.8325 15.9917 16.7035C15.9444 16.5744 15.871 16.4565 15.7762 16.357C15.6811 16.2574 15.5664 16.1786 15.4394 16.1255C15.3124 16.0723 15.1758 16.046 15.0382 16.0482C14.9005 16.0503 14.7648 16.0809 14.6395 16.138C14.5142 16.1951 14.4021 16.2775 14.3102 16.38Z",fill:"currentColor"}),(0,A.jsx)("path",{d:"M17.6704 6.999C17.2623 5.82006 16.497 4.79762 15.4807 4.07397C14.4645 3.35031 13.2479 2.96143 12.0004 2.96143C10.7528 2.96143 9.53628 3.35031 8.52005 4.07397C7.50381 4.79762 6.73842 5.82006 6.33038 6.999C5.43194 7.11934 4.5831 7.48166 3.87468 8.0472C3.16627 8.61274 2.62492 9.36022 2.30855 10.2097C1.99218 11.0592 1.91269 11.9787 2.07859 12.8698C2.24449 13.761 2.64953 14.5903 3.25038 15.269C3.32296 15.3968 3.42284 15.5071 3.54289 15.592C3.66295 15.6768 3.80023 15.7341 3.94497 15.7599C4.08971 15.7856 4.23834 15.7791 4.38029 15.7408C4.52223 15.7026 4.65399 15.6335 4.76618 15.5385C4.87838 15.4435 4.96825 15.3249 5.0294 15.1912C5.09055 15.0576 5.12147 14.912 5.11996 14.765C5.11845 14.618 5.08455 14.4732 5.02067 14.3408C4.95679 14.2084 4.86451 14.0917 4.75038 13.999C4.3635 13.5665 4.11037 13.031 4.02167 12.4575C3.93297 11.884 4.01252 11.2971 4.25066 10.7679C4.4888 10.2387 4.87532 9.7899 5.36338 9.47593C5.85143 9.16197 6.42007 8.9963 7.00038 8.999H7.10038C7.33433 9.00372 7.56252 8.92625 7.74524 8.78008C7.92796 8.6339 8.05363 8.42828 8.10038 8.199C8.284 7.29477 8.77457 6.48182 9.48898 5.8979C10.2034 5.31398 11.0977 4.99499 12.0204 4.99499C12.9431 4.99499 13.8374 5.31398 14.5518 5.8979C15.2662 6.48182 15.7568 7.29477 15.9404 8.199C15.9871 8.42828 16.1128 8.6339 16.2955 8.78008C16.4782 8.92625 16.7064 9.00372 16.9404 8.999H17.0004C17.5807 8.9963 18.1493 9.16197 18.6374 9.47593C19.1254 9.7899 19.512 10.2387 19.7501 10.7679C19.9883 11.2971 20.0678 11.884 19.9791 12.4575C19.8904 13.031 19.6373 13.5665 19.2504 13.999C19.1623 14.0978 19.0947 14.2131 19.0515 14.3382C19.0083 14.4633 18.9904 14.5957 18.9987 14.7278C19.0071 14.8599 19.0416 14.989 19.1003 15.1077C19.1589 15.2263 19.2405 15.3321 19.3404 15.419C19.5394 15.5938 19.7996 15.6825 20.064 15.6656C20.3283 15.6488 20.5752 15.5277 20.7504 15.329C21.3679 14.6514 21.7873 13.8172 21.9626 12.9173C22.138 12.0175 22.0625 11.0868 21.7446 10.227C21.4267 9.36713 20.8785 8.61124 20.1599 8.04194C19.4414 7.47264 18.5802 7.11185 17.6704 6.999Z",fill:"currentColor"})]})}function fr(e){return(0,A.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 13.3333 13.3343",fill:"none",...e,children:(0,A.jsx)("path",{d:"M12.6667 2.66759H9.33333V1.55425C9.31769 1.12747 9.13347 0.724291 8.82105 0.433114C8.50862 0.141937 8.0935 -0.0134857 7.66667 0.000918958H5.66667C5.23984 -0.0134857 4.82471 0.141937 4.51229 0.433114C4.19986 0.724291 4.01564 1.12747 4 1.55425V2.66759H0.666667C0.489856 2.66759 0.320286 2.73782 0.195262 2.86285C0.0702379 2.98787 0 3.15744 0 3.33425C0 3.51106 0.0702379 3.68063 0.195262 3.80566C0.320286 3.93068 0.489856 4.00092 0.666667 4.00092H1.33333V11.3343C1.33333 11.8647 1.54405 12.3734 1.91912 12.7485C2.29419 13.1235 2.8029 13.3343 3.33333 13.3343H10C10.5304 13.3343 11.0391 13.1235 11.4142 12.7485C11.7893 12.3734 12 11.8647 12 11.3343V4.00092H12.6667C12.8435 4.00092 13.013 3.93068 13.1381 3.80566C13.2631 3.68063 13.3333 3.51106 13.3333 3.33425C13.3333 3.15744 13.2631 2.98787 13.1381 2.86285C13.013 2.73782 12.8435 2.66759 12.6667 2.66759ZM5.33333 1.55425C5.33333 1.44759 5.47333 1.33425 5.66667 1.33425H7.66667C7.86 1.33425 8 1.44759 8 1.55425V2.66759H5.33333V1.55425ZM10.6667 11.3343C10.6667 11.5111 10.5964 11.6806 10.4714 11.8057C10.3464 11.9307 10.1768 12.0009 10 12.0009H3.33333C3.15652 12.0009 2.98695 11.9307 2.86193 11.8057C2.7369 11.6806 2.66667 11.5111 2.66667 11.3343V4.00092H10.6667V11.3343Z",fill:"currentColor"})})}function fn(e){return(0,A.jsxs)("svg",{fill:"none",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,A.jsx)("path",{d:"M20 11C19.7348 11 19.4804 11.1054 19.2929 11.2929C19.1054 11.4804 19 11.7348 19 12V18C19 18.2652 18.8946 18.5196 18.7071 18.7071C18.5196 18.8946 18.2652 19 18 19H6C5.73478 19 5.48043 18.8946 5.29289 18.7071C5.10536 18.5196 5 18.2652 5 18V6C5 5.73478 5.10536 5.48043 5.29289 5.29289C5.48043 5.10536 5.73478 5 6 5H12C12.2652 5 12.5196 4.89464 12.7071 4.70711C12.8946 4.51957 13 4.26522 13 4C13 3.73478 12.8946 3.48043 12.7071 3.29289C12.5196 3.10536 12.2652 3 12 3H6C5.20435 3 4.44129 3.31607 3.87868 3.87868C3.31607 4.44129 3 5.20435 3 6V18C3 18.7956 3.31607 19.5587 3.87868 20.1213C4.44129 20.6839 5.20435 21 6 21H18C18.7956 21 19.5587 20.6839 20.1213 20.1213C20.6839 19.5587 21 18.7956 21 18V12C21 11.7348 20.8946 11.4804 20.7071 11.2929C20.5196 11.1054 20.2652 11 20 11Z",fill:"currentColor"}),(0,A.jsx)("path",{d:"M16.0001 5H17.5801L11.2901 11.28C11.1725 11.3965 11.0856 11.5402 11.0371 11.6985C10.9887 11.8567 10.9802 12.0245 11.0123 12.1868C11.0445 12.3491 11.1164 12.5009 11.2216 12.6287C11.3268 12.7565 11.462 12.8562 11.6151 12.919C11.7987 12.9957 12.0009 13.0158 12.196 12.9768C12.3911 12.9378 12.5701 12.8414 12.7101 12.7L19.0001 6.42V8C19.0001 8.26522 19.1054 8.51957 19.293 8.70711C19.4805 8.89464 19.7349 9 20.0001 9C20.2653 9 20.5197 8.89464 20.7072 8.70711C20.8947 8.51957 21.0001 8.26522 21.0001 8V4C21.0001 3.73478 20.8947 3.48043 20.7072 3.29289C20.5197 3.10536 20.2653 3 20.0001 3H16.0001C15.7349 3 15.4805 3.10536 15.293 3.29289C15.1054 3.48043 15.0001 3.73478 15.0001 4C15.0001 4.26522 15.1054 4.51957 15.293 4.70711C15.4805 4.89464 15.7349 5 16.0001 5Z",fill:"currentColor"})]})}function fa(e){return(0,A.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,A.jsx)("path",{d:"M20 15.9998C20.5522 15.9998 20.9999 16.4476 21 16.9998V18.9998C20.9999 19.7952 20.6835 20.5584 20.1211 21.1209C19.5585 21.6833 18.7955 21.9998 18 21.9998H6C5.20446 21.9998 4.44149 21.6833 3.87891 21.1209C3.31646 20.5584 3.00012 19.7952 3 18.9998V16.9998C3.00009 16.4476 3.44777 15.9998 4 15.9998C4.55223 15.9998 4.99991 16.4476 5 16.9998V18.9998C5.00012 19.2648 5.1056 19.5194 5.29297 19.7068C5.48048 19.8942 5.7349 19.9998 6 19.9998H18C18.2651 19.9998 18.5195 19.8942 18.707 19.7068C18.8944 19.5194 18.9999 19.2648 19 18.9998V16.9998C19.0001 16.4476 19.4478 15.9998 20 15.9998Z",fill:"currentColor"}),(0,A.jsx)("path",{d:"M11.3691 3.22437C11.7619 2.90402 12.3409 2.92662 12.707 3.29273L17.707 8.29273C18.0973 8.68328 18.0975 9.31635 17.707 9.7068C17.3166 10.097 16.6834 10.097 16.293 9.7068L13 6.41383V15.9998C12.9997 16.5518 12.552 16.9997 12 16.9998C11.4479 16.9998 11.0003 16.5518 11 15.9998V6.41383L7.70703 9.7068C7.31657 10.097 6.68343 10.097 6.29297 9.7068C5.90252 9.31635 5.90268 8.68328 6.29297 8.29273L11.293 3.29273L11.3691 3.22437Z",fill:"currentColor"})]})}var fo=Symbol("radix.slottable");function fi(e){return L.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===fo}var fs=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{var r,n;let a,o,i,s=(n=r=`Primitive.${t}`,(a=L.forwardRef((e,t)=>{let{children:r,...n}=e;if(L.isValidElement(r)){var a;let e,o,i=(a=r,(o=(e=Object.getOwnPropertyDescriptor(a.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?a.ref:(o=(e=Object.getOwnPropertyDescriptor(a,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?a.props.ref:a.props.ref||a.ref),s=function(e,t){let r={...t};for(let n in t){let a=e[n],o=t[n];/^on[A-Z]/.test(n)?a&&o?r[n]=(...e)=>{let t=o(...e);return a(...e),t}:a&&(r[n]=a):"style"===n?r[n]={...a,...o}:"className"===n&&(r[n]=[a,o].filter(Boolean).join(" "))}return{...e,...r}}(n,r.props);return r.type!==L.Fragment&&(s.ref=t?oY(t,i):i),L.cloneElement(r,s)}return L.Children.count(r)>1?L.Children.only(null):null})).displayName=`${n}.SlotClone`,o=a,(i=L.forwardRef((e,t)=>{let{children:r,...n}=e,a=L.Children.toArray(r),i=a.find(fi);if(i){let e=i.props.children,r=a.map(t=>t!==i?t:L.Children.count(e)>1?L.Children.only(null):L.isValidElement(e)?e.props.children:null);return(0,A.jsx)(o,{...n,ref:t,children:L.isValidElement(e)?L.cloneElement(e,void 0,r):null})}return(0,A.jsx)(o,{...n,ref:t,children:r})})).displayName=`${r}.Slot`,i),l=L.forwardRef((e,r)=>{let{asChild:n,...a}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,A.jsx)(n?s:t,{...a,ref:r})});return l.displayName=`Primitive.${t}`,{...e,[t]:l}},{}),fl="Progress",[fu,fc]=function(e,t=[]){let r=[],n=()=>{let t=r.map(e=>L.createContext(e));return function(r){let n=r?.[e]||t;return L.useMemo(()=>({[`__scope${e}`]:{...r,[e]:n}}),[r,n])}};return n.scopeName=e,[function(t,n){let a=L.createContext(n),o=r.length;r=[...r,n];let i=t=>{let{scope:r,children:n,...i}=t,s=r?.[e]?.[o]||a,l=L.useMemo(()=>i,Object.values(i));return(0,A.jsx)(s.Provider,{value:l,children:n})};return i.displayName=t+"Provider",[i,function(r,i){let s=i?.[e]?.[o]||a,l=L.useContext(s);if(l)return l;if(void 0!==n)return n;throw Error(`\`${r}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let r=()=>{let r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let n=r.reduce((t,{useScope:r,scopeName:n})=>{let a=r(e)[`__scope${n}`];return{...t,...a}},{});return L.useMemo(()=>({[`__scope${t.scopeName}`]:n}),[n])}};return r.scopeName=t.scopeName,r}(n,...t)]}(fl),[fd,fp]=fu(fl),fh=L.forwardRef((e,t)=>{var r,n;let{__scopeProgress:a,value:o=null,max:i,getValueLabel:s=fm,...l}=e;(i||0===i)&&!fb(i)&&console.error((r=`${i}`,`Invalid prop \`max\` of value \`${r}\` supplied to \`Progress\`. Only numbers greater than 0 are valid max values. Defaulting to \`100\`.`));let u=fb(i)?i:100;null===o||fw(o,u)||console.error((n=`${o}`,`Invalid prop \`value\` of value \`${n}\` supplied to \`Progress\`. The \`value\` prop must be:
|
|
5483
|
+
@layer base {
|
|
5484
|
+
:host,
|
|
5485
|
+
*,
|
|
5486
|
+
::before,
|
|
5487
|
+
::after,
|
|
5488
|
+
::backdrop,
|
|
5489
|
+
::file-selector-button {
|
|
5490
|
+
${f}
|
|
5491
|
+
}
|
|
5492
|
+
}`:h),sK=["full-body","upper-body","lower-body","footwear","headwear","eyewear","neck","wrist","bag","waist"],sG=new Set(sK);function sX(e){return"string"==typeof e&&sG.has(e)}function sY(e,t="productType"){if(!sX(e)){let r="string"==typeof e&&e.length>0?` "${e}"`:"";throw Error(`AI try-on ${t} must be one of: ${sK.join(", ")}; received${r||" no value"}`)}}function sQ(e){return(0,A.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 8.37303 5.00342",fill:"none",...e,children:(0,A.jsx)("path",{d:"M1 1L4.18652 4.00342L7.37303 1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function sZ(e,t){-1===e.indexOf(t)&&e.push(t)}function sJ(e,t){let r=e.indexOf(t);r>-1&&e.splice(r,1)}class s0{constructor(){this.subscriptions=[]}add(e){return sZ(this.subscriptions,e),()=>sJ(this.subscriptions,e)}notify(e,t,r){let n=this.subscriptions.length;if(n)if(1===n)this.subscriptions[0](e,t,r);else for(let a=0;a<n;a++){let n=this.subscriptions[a];n&&n(e,t,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}let s1={},s2=e=>e,s3=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function s5(e,t){let r=!1,n=!0,a={delta:0,timestamp:0,isProcessing:!1},o=()=>r=!0,i=s3.reduce((e,r)=>(e[r]=function(e,t){let r=new Set,n=new Set,a=!1,o=!1,i=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},l=0;function u(t){i.has(t)&&(c.schedule(t),e()),l++,t(s)}let c={schedule:(e,t=!1,o=!1)=>{let s=o&&a?r:n;return t&&i.add(e),s.add(e),e},cancel:e=>{n.delete(e),i.delete(e)},process:e=>{if(s=e,a){o=!0;return}a=!0;let i=r;r=n,n=i,r.forEach(u),t,l=0,r.clear(),a=!1,o&&(o=!1,c.process(e))}};return c}(o,t?r:void 0),e),{}),{setup:s,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:p,render:h,postRender:f}=i,g=()=>{let o=s1.useManualTiming,i=o?a.timestamp:performance.now();r=!1,o||(a.delta=n?1e3/60:Math.max(Math.min(i-a.timestamp,40),1)),a.timestamp=i,a.isProcessing=!0,s.process(a),l.process(a),u.process(a),c.process(a),d.process(a),p.process(a),h.process(a),f.process(a),a.isProcessing=!1,r&&t&&(n=!1,e(g))};return{schedule:s3.reduce((t,o)=>{let s=i[o];return t[o]=(t,o=!1,i=!1)=>(!r&&(r=!0,n=!0,a.isProcessing||e(g)),s.schedule(t,o,i)),t},{}),cancel:e=>{for(let t=0;t<s3.length;t++)i[s3[t]].cancel(e)},state:a,steps:i}}let{schedule:s9,cancel:s4,state:s6,steps:s8}=s5("u">typeof requestAnimationFrame?requestAnimationFrame:s2,!0);function s7(){t=void 0}let le={now:()=>(void 0===t&&le.set(s6.isProcessing||s1.useManualTiming?s6.timestamp:performance.now()),t),set:e=>{t=e,queueMicrotask(s7)}},lt={current:void 0};class lr{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=le.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=le.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=!isNaN(parseFloat(this.current)))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new s0);let r=this.events[e].add(t);return"change"===e?()=>{r(),s9.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,r){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return lt.current&<.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){var e;let t=le.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;let r=Math.min(this.updatedAt-this.prevUpdatedAt,30);return e=parseFloat(this.current)-parseFloat(this.prevFrameValue),r?1e3/r*e:0}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ln(e,t){return new lr(e,t)}let la=(0,L.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function lo(e){let t=(0,L.useRef)(null);return null===t.current&&(t.current=e()),t.current}function li(e){let t=lo(()=>ln(e)),{isStatic:r}=(0,L.useContext)(la);if(r){let[,r]=(0,L.useState)(e);(0,L.useEffect)(()=>t.on("change",r),[])}return t}let ls=e=>!!(e&&e.getVelocity),ll=()=>{},lu=()=>{},lc=(e,t)=>r=>t(e(r)),ld=(...e)=>e.reduce(lc),lp=(e,t,r)=>r>t?t:r<e?e:r,lh=e=>1e3*e,lf={layout:0,mainThread:0,waapi:0},lg=e=>t=>"string"==typeof t&&t.startsWith(e),lm=lg("--"),lv=lg("var(--"),ly=e=>!!lv(e)&&lb.test(e.split("/*")[0].trim()),lb=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function lw(e){return"string"==typeof e&&e.split("/*")[0].includes("var(--")}let lk={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},lx={...lk,transform:e=>lp(0,1,e)},lS={...lk,default:1},lC=e=>Math.round(1e5*e)/1e5,lP=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,lE=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,lT=(e,t)=>r=>!!("string"==typeof r&&lE.test(r)&&r.startsWith(e)||t&&null!=r&&Object.prototype.hasOwnProperty.call(r,t)),lR=(e,t,r)=>n=>{if("string"!=typeof n)return n;let[a,o,i,s]=n.match(lP);return{[e]:parseFloat(a),[t]:parseFloat(o),[r]:parseFloat(i),alpha:void 0!==s?parseFloat(s):1}},lO={...lk,transform:e=>Math.round(lp(0,255,e))},lj={test:lT("rgb","red"),parse:lR("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+lO.transform(e)+", "+lO.transform(t)+", "+lO.transform(r)+", "+lC(lx.transform(n))+")"},l_={test:lT("#"),parse:function(e){let t="",r="",n="",a="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),n=e.substring(5,7),a=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),n=e.substring(3,4),a=e.substring(4,5),t+=t,r+=r,n+=n,a+=a),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:a?parseInt(a,16)/255:1}},transform:lj.transform},lz=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),lN=lz("deg"),lA=lz("%"),lL=lz("px"),lI=lz("vh"),lM=lz("vw"),lF={...lA,parse:e=>lA.parse(e)/100,transform:e=>lA.transform(100*e)},lD={test:lT("hsl","hue"),parse:lR("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+lA.transform(lC(t))+", "+lA.transform(lC(r))+", "+lC(lx.transform(n))+")"},lB={test:e=>lj.test(e)||l_.test(e)||lD.test(e),parse:e=>lj.test(e)?lj.parse(e):lD.test(e)?lD.parse(e):l_.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?lj.transform(e):lD.transform(e),getAnimatableNone:e=>{let t=lB.parse(e);return t.alpha=0,lB.transform(t)}},l$=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,lV="number",lU="color",lH=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function lW(e){let t=e.toString(),r=[],n={color:[],number:[],var:[]},a=[],o=0,i=t.replace(lH,e=>(lB.test(e)?(n.color.push(o),a.push(lU),r.push(lB.parse(e))):e.startsWith("var(")?(n.var.push(o),a.push("var"),r.push(e)):(n.number.push(o),a.push(lV),r.push(parseFloat(e))),++o,"${}")).split("${}");return{values:r,split:i,indexes:n,types:a}}function lq({split:e,types:t}){let r=e.length;return n=>{let a="";for(let o=0;o<r;o++)if(a+=e[o],void 0!==n[o]){let e=t[o];e===lV?a+=lC(n[o]):e===lU?a+=lB.transform(n[o]):a+=n[o]}return a}}let lK={test:function(e){return isNaN(e)&&"string"==typeof e&&(e.match(lP)?.length||0)+(e.match(l$)?.length||0)>0},parse:function(e){return lW(e).values},createTransformer:function(e){return lq(lW(e))},getAnimatableNone:function(e){let t=lW(e);return lq(t)(t.values.map((e,r)=>((e,t)=>"number"==typeof e?t?.trim().endsWith("/")?e:0:"number"==typeof e?0:lB.test(e)?lB.getAnimatableNone(e):e)(e,t.split[r])))}};function lG(e,t,r){return(r<0&&(r+=1),r>1&&(r-=1),r<1/6)?e+(t-e)*6*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function lX(e,t){return r=>r>0?t:e}let lY=(e,t,r)=>e+(t-e)*r,lQ=(e,t,r)=>{let n=e*e,a=r*(t*t-n)+n;return a<0?0:Math.sqrt(a)},lZ=[l_,lj,lD];function lJ(e){let t=lZ.find(t=>t.test(e));if(ll(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let r=t.parse(e);return t===lD&&(r=function({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,r/=100;let a=0,o=0,i=0;if(t/=100){let n=r<.5?r*(1+t):r+t-r*t,s=2*r-n;a=lG(s,n,e+1/3),o=lG(s,n,e),i=lG(s,n,e-1/3)}else a=o=i=r;return{red:Math.round(255*a),green:Math.round(255*o),blue:Math.round(255*i),alpha:n}}(r)),r}let l0=(e,t)=>{let r=lJ(e),n=lJ(t);if(!r||!n)return lX(e,t);let a={...r};return e=>(a.red=lQ(r.red,n.red,e),a.green=lQ(r.green,n.green,e),a.blue=lQ(r.blue,n.blue,e),a.alpha=lY(r.alpha,n.alpha,e),lj.transform(a))},l1=new Set(["none","hidden"]);function l2(e,t){return r=>lY(e,t,r)}function l3(e){return"number"==typeof e?l2:"string"==typeof e?ly(e)?lX:lB.test(e)?l0:l4:Array.isArray(e)?l5:"object"==typeof e?lB.test(e)?l0:l9:lX}function l5(e,t){let r=[...e],n=r.length,a=e.map((e,r)=>l3(e)(e,t[r]));return e=>{for(let t=0;t<n;t++)r[t]=a[t](e);return r}}function l9(e,t){let r={...e,...t},n={};for(let a in r)void 0!==e[a]&&void 0!==t[a]&&(n[a]=l3(e[a])(e[a],t[a]));return e=>{for(let t in n)r[t]=n[t](e);return r}}let l4=(e,t)=>{let r=lK.createTransformer(t),n=lW(e),a=lW(t);if(n.indexes.var.length===a.indexes.var.length&&n.indexes.color.length===a.indexes.color.length&&n.indexes.number.length>=a.indexes.number.length){if(l1.has(e)&&!a.values.length||l1.has(t)&&!n.values.length)return l1.has(e)?r=>r<=0?e:t:r=>r>=1?t:e;return ld(l5(function(e,t){let r=[],n={color:0,var:0,number:0};for(let a=0;a<t.values.length;a++){let o=t.types[a],i=e.indexes[o][n[o]],s=e.values[i]??0;r[a]=s,n[o]++}return r}(n,a),a.values),r)}return ll(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),lX(e,t)};function l6(e,t,r){return"number"==typeof e&&"number"==typeof t&&"number"==typeof r?lY(e,t,r):l3(e)(e,t)}let l8=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>s9.update(t,e),stop:()=>s4(t),now:()=>s6.isProcessing?s6.timestamp:le.now()}},l7=(e,t,r=10)=>{let n="",a=Math.max(Math.round(t/r),2);for(let t=0;t<a;t++)n+=Math.round(1e4*e(t/(a-1)))/1e4+", ";return`linear(${n.substring(0,n.length-2)})`};function ue(e){let t=0,r=e.next(t);for(;!r.done&&t<2e4;)t+=50,r=e.next(t);return t>=2e4?1/0:t}let ut=.01,ur=2,un=.005,ua=.5;function uo(e,t){return e*Math.sqrt(1-t*t)}let ui=["duration","bounce"],us=["stiffness","damping","mass"];function ul(e,t){return t.some(t=>void 0!==e[t])}function uu(e=.3,t=.3){let r,n,a,o,i,s,l="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e,{restSpeed:u,restDelta:c}=l,d=l.keyframes[0],p=l.keyframes[l.keyframes.length-1],h={done:!1,value:d},{stiffness:f,damping:g,mass:m,duration:v,velocity:y,isResolvedFromDuration:b}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!ul(e,us)&&ul(e,ui))if(t.velocity=0,e.visualDuration){let r=2*Math.PI/(1.2*e.visualDuration),n=r*r,a=2*lp(.05,1,1-(e.bounce||0))*Math.sqrt(n);t={...t,mass:1,stiffness:n,damping:a}}else{let r=function({duration:e=800,bounce:t=.3,velocity:r=0,mass:n=1}){let a,o;ll(e<=lh(10),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-t;i=lp(.05,1,i),e=lp(.01,10,e/1e3),i<1?(a=t=>{let n=t*i,a=n*e;return .001-(n-r)/uo(t,i)*Math.exp(-a)},o=t=>{let n=t*i*e,o=Math.pow(i,2)*Math.pow(t,2)*e,s=Math.exp(-n),l=uo(Math.pow(t,2),i);return(n*r+r-o)*s*(-a(t)+.001>0?-1:1)/l}):(a=t=>-.001+Math.exp(-t*e)*((t-r)*e+1),o=t=>e*e*(r-t)*Math.exp(-t*e));let s=function(e,t,r){let n=r;for(let r=1;r<12;r++)n-=e(n)/t(n);return n}(a,o,5/e);if(e=lh(e),isNaN(s))return{stiffness:100,damping:10,duration:e};{let t=Math.pow(s,2)*n;return{stiffness:t,damping:2*i*Math.sqrt(n*t),duration:e}}}({...e,velocity:0});(t={...t,...r,mass:1}).isResolvedFromDuration=!0}return t}({...l,velocity:-((l.velocity||0)/1e3)}),w=y||0,k=g/(2*Math.sqrt(f*m)),x=p-d,S=Math.sqrt(f/m)/1e3,C=5>Math.abs(x);if(u||(u=C?ut:ur),c||(c=C?un:ua),k<1)a=uo(S,k),o=(w+k*S*x)/a,r=e=>p-Math.exp(-k*S*e)*(o*Math.sin(a*e)+x*Math.cos(a*e)),i=k*S*o+x*a,s=k*S*x-o*a,n=e=>Math.exp(-k*S*e)*(i*Math.sin(a*e)+s*Math.cos(a*e));else if(1===k){r=e=>p-Math.exp(-S*e)*(x+(w+S*x)*e);let e=w+S*x;n=t=>Math.exp(-S*t)*(S*e*t-w)}else{let e=S*Math.sqrt(k*k-1);r=t=>{let r=Math.exp(-k*S*t),n=Math.min(e*t,300);return p-r*((w+k*S*x)*Math.sinh(n)+e*x*Math.cosh(n))/e};let t=(w+k*S*x)/e,a=k*S*t-x*e,o=k*S*x-t*e;n=t=>{let r=Math.exp(-k*S*t),n=Math.min(e*t,300);return r*(a*Math.sinh(n)+o*Math.cosh(n))}}let P={calculatedDuration:b&&v||null,velocity:e=>lh(n(e)),next:e=>{if(!b&&k<1){let t=Math.exp(-k*S*e),r=Math.sin(a*e),n=Math.cos(a*e),l=p-t*(o*r+x*n);return h.done=Math.abs(lh(t*(i*r+s*n)))<=u&&Math.abs(p-l)<=c,h.value=h.done?p:l,h}let t=r(e);return b?h.done=e>=v:h.done=Math.abs(lh(n(e)))<=u&&Math.abs(p-t)<=c,h.value=h.done?p:t,h},toString:()=>{let e=Math.min(ue(P),2e4),t=l7(t=>P.next(e*t).value,e,30);return e+"ms "+t},toTransition:()=>{}};return P}function uc(e,t,r){var n,a;let o=Math.max(t-5,0);return n=r-e(o),(a=t-o)?1e3/a*n:0}function ud({keyframes:e,velocity:t=0,power:r=.8,timeConstant:n=325,bounceDamping:a=10,bounceStiffness:o=500,modifyTarget:i,min:s,max:l,restDelta:u=.5,restSpeed:c}){let d,p,h=e[0],f={done:!1,value:h},g=r*t,m=h+g,v=void 0===i?m:i(m);v!==m&&(g=v-h);let y=e=>-g*Math.exp(-e/n),b=e=>v+y(e),w=e=>{let t=y(e),r=b(e);f.done=Math.abs(t)<=u,f.value=f.done?v:r},k=e=>{let t;if(t=f.value,void 0!==s&&t<s||void 0!==l&&t>l){var r;d=e,p=uu({keyframes:[f.value,(r=f.value,void 0===s?l:void 0===l||Math.abs(s-r)<Math.abs(l-r)?s:l)],velocity:uc(b,e,f.value),damping:a,stiffness:o,restDelta:u,restSpeed:c})}};return k(0),{calculatedDuration:null,next:e=>{let t=!1;return(p||void 0!==d||(t=!0,w(e),k(e)),void 0!==d&&e>=d)?p.next(e-d):(t||w(e),f)}}}uu.applyToOptions=e=>{let t=function(e,t=100,r){let n=r({...e,keyframes:[0,t]}),a=Math.min(ue(n),2e4);return{type:"keyframes",ease:e=>n.next(a*e).value/t,duration:a/1e3}}(e,100,uu);return e.ease=t.ease,e.duration=lh(t.duration),e.type="keyframes",e};let up=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e;function uh(e,t,r,n){return e===t&&r===n?s2:a=>0===a||1===a?a:up(function(e,t,r,n,a){let o,i,s=0;do(o=up(i=t+(r-t)/2,n,a)-e)>0?r=i:t=i;while(Math.abs(o)>1e-7&&++s<12);return i}(a,0,1,e,r),t,n)}let uf=uh(.42,0,1,1),ug=uh(0,0,.58,1),um=uh(.42,0,.58,1),uv=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,uy=e=>t=>1-e(1-t),ub=uh(.33,1.53,.69,.99),uw=uy(ub),uk=uv(uw),ux=e=>e>=1?1:(e*=2)<1?.5*uw(e):.5*(2-Math.pow(2,-10*(e-1))),uS=e=>1-Math.sin(Math.acos(e)),uC=uy(uS),uP=uv(uS),uE=e=>Array.isArray(e)&&"number"==typeof e[0],uT={linear:s2,easeIn:uf,easeInOut:um,easeOut:ug,circIn:uS,circInOut:uP,circOut:uC,backIn:uw,backInOut:uk,backOut:ub,anticipate:ux},uR=e=>{if(uE(e)){lu(4===e.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[t,r,n,a]=e;return uh(t,r,n,a)}return"string"==typeof e?(lu(void 0!==uT[e],`Invalid easing type '${e}'`,"invalid-easing-type"),uT[e]):e},uO=(e,t,r)=>{let n=t-e;return 0===n?1:(r-e)/n};function uj(e,t,{clamp:r=!0,ease:n,mixer:a}={}){let o=e.length;if(lu(o===t.length,"Both input and output ranges must be the same length","range-length"),1===o)return()=>t[0];if(2===o&&t[0]===t[1])return()=>t[1];let i=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=function(e,t,r){let n=[],a=r||s1.mix||l6,o=e.length-1;for(let r=0;r<o;r++){let o=a(e[r],e[r+1]);t&&(o=ld(Array.isArray(t)?t[r]||s2:t,o)),n.push(o)}return n}(t,n,a),l=s.length,u=r=>{if(i&&r<e[0])return t[0];let n=0;if(l>1)for(;n<e.length-2&&!(r<e[n+1]);n++);let a=uO(e[n],e[n+1],r);return s[n](a)};return r?t=>u(lp(e[0],e[o-1],t)):u}function u_({duration:e=300,keyframes:t,times:r,ease:n="easeInOut"}){var a;let o,i=Array.isArray(n)&&"number"!=typeof n[0]?n.map(uR):uR(n),s={done:!1,value:t[0]},l=uj((a=r&&r.length===t.length?r:(!function(e,t){let r=e[e.length-1];for(let n=1;n<=t;n++){let a=uO(0,t,n);e.push(lY(r,1,a))}}(o=[0],t.length-1),o),a.map(t=>t*e)),t,{ease:Array.isArray(i)?i:t.map(()=>i||um).splice(0,t.length-1)});return{calculatedDuration:e,next:t=>(s.value=l(t),s.done=t>=e,s)}}let uz=e=>null!==e;function uN(e,{repeat:t,repeatType:r="loop"},n,a=1){let o=e.filter(uz),i=a<0||t&&"loop"!==r&&t%2==1?0:o.length-1;return i&&void 0!==n?n:o[i]}let uA={decay:ud,inertia:ud,tween:u_,keyframes:u_,spring:uu};function uL(e){"string"==typeof e.type&&(e.type=uA[e.type])}class uI{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}}let uM=e=>e/100;class uF extends uI{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==le.now()&&this.tick(le.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},lf.mainThread++,this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){let{options:e}=this;uL(e);let{type:t=u_,repeat:r=0,repeatDelay:n=0,repeatType:a,velocity:o=0}=e,{keyframes:i}=e,s=t||u_;s!==u_&&"number"!=typeof i[0]&&(this.mixKeyframes=ld(uM,l6(i[0],i[1])),i=[0,100]);let l=s({...e,keyframes:i});"mirror"===a&&(this.mirroredGenerator=s({...e,keyframes:[...i].reverse(),velocity:-o})),null===l.calculatedDuration&&(l.calculatedDuration=ue(l));let{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+n,this.totalDuration=this.resolvedDuration*(r+1)-n,this.generator=l}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){let r,{generator:n,totalDuration:a,mixKeyframes:o,mirroredGenerator:i,resolvedDuration:s,calculatedDuration:l}=this;if(null===this.startTime)return n.next(0);let{delay:u=0,keyframes:c,repeat:d,repeatType:p,repeatDelay:h,type:f,onUpdate:g,finalKeyframe:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-a/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let v=this.currentTime-u*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?v<0:v>a;this.currentTime=Math.max(v,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=a);let b=this.currentTime,w=n;if(d){let e=Math.min(this.currentTime,a)/s,t=Math.floor(e),r=e%1;!r&&e>=1&&(r=1),1===r&&t--,(t=Math.min(t,d+1))%2&&("reverse"===p?(r=1-r,h&&(r-=h/s)):"mirror"===p&&(w=i)),b=lp(0,1,r)*s}y?(this.delayState.value=c[0],r=this.delayState):r=w.next(b),o&&!y&&(r.value=o(r.value));let{done:k}=r;y||null===l||(k=this.playbackSpeed>=0?this.currentTime>=a:this.currentTime<=0);let x=null===this.holdTime&&("finished"===this.state||"running"===this.state&&k);return x&&f!==ud&&(r.value=uN(c,this.options,m,this.speed)),g&&g(r.value),x&&this.finish(),r}then(e,t){return this.finished.then(e,t)}get duration(){return this.calculatedDuration/1e3}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+e/1e3}get time(){return this.currentTime/1e3}set time(e){e=lh(e),this.currentTime=e,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return uc(e=>this.generator.next(e).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(le.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=this.currentTime/1e3)}play(){if(this.isStopped)return;let{driver:e=l8,startTime:t}=this.options;this.driver||(this.driver=e(e=>this.tick(e))),this.options.onPlay?.();let r=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=r):null!==this.holdTime?this.startTime=r-this.holdTime:this.startTime||(this.startTime=t??r),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(le.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,lf.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}function uD(e){return"number"==typeof e?e:parseFloat(e)}let uB="u">typeof window,u$=uB?L.useLayoutEffect:L.useEffect;function uV(e,t){let r=li(t()),n=()=>r.set(t());return n(),u$(()=>{let t=()=>s9.preRender(n,!1,!0),r=e.map(e=>e.on("change",t));return()=>{r.forEach(e=>e()),s4(n)}}),r}function uU(e,t,r,n){if("function"==typeof e){let t;return lt.current=[],e(),t=uV(lt.current,e),lt.current=void 0,t}if(void 0!==r&&!Array.isArray(r)&&"function"!=typeof t){var a=e,o=t,i=r,s=n;let l=lo(()=>Object.keys(i)),u=lo(()=>({}));for(let e of l)u[e]=uU(a,o,i[e],s);return u}let l="function"==typeof t?t:function(...e){let t=!Array.isArray(e[0]),r=t?0:-1,n=e[0+r],a=uj(e[1+r],e[2+r],e[3+r]);return t?a(n):a}(t,r,n);return Array.isArray(e)?uH(e,l):uH([e],([e])=>l(e))}function uH(e,t){let r=lo(()=>[]);return uV(e,()=>{r.length=0;let n=e.length;for(let t=0;t<n;t++)r[t]=e[t].get();return t(r)})}let uW=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],uq=new Set(uW),uK=new Set(["brightness","contrast","saturate","opacity"]);function uG(e){let[t,r]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;let[n]=r.match(lP)||[];if(!n)return e;let a=r.replace(n,""),o=+!!uK.has(t);return n!==r&&(o*=100),t+"("+o+a+")"}let uX=/\b([a-z-]*)\(.*?\)/gu,uY={...lK,getAnimatableNone:e=>{let t=e.match(uX);return t?t.map(uG).join(" "):e}},uQ={...lK,getAnimatableNone:e=>{let t=lK.parse(e);return lK.createTransformer(e)(t.map(e=>"number"==typeof e?0:"object"==typeof e?{...e,alpha:1}:e))}},uZ={...lk,transform:Math.round},uJ={borderWidth:lL,borderTopWidth:lL,borderRightWidth:lL,borderBottomWidth:lL,borderLeftWidth:lL,borderRadius:lL,borderTopLeftRadius:lL,borderTopRightRadius:lL,borderBottomRightRadius:lL,borderBottomLeftRadius:lL,width:lL,maxWidth:lL,height:lL,maxHeight:lL,top:lL,right:lL,bottom:lL,left:lL,inset:lL,insetBlock:lL,insetBlockStart:lL,insetBlockEnd:lL,insetInline:lL,insetInlineStart:lL,insetInlineEnd:lL,padding:lL,paddingTop:lL,paddingRight:lL,paddingBottom:lL,paddingLeft:lL,paddingBlock:lL,paddingBlockStart:lL,paddingBlockEnd:lL,paddingInline:lL,paddingInlineStart:lL,paddingInlineEnd:lL,margin:lL,marginTop:lL,marginRight:lL,marginBottom:lL,marginLeft:lL,marginBlock:lL,marginBlockStart:lL,marginBlockEnd:lL,marginInline:lL,marginInlineStart:lL,marginInlineEnd:lL,fontSize:lL,backgroundPositionX:lL,backgroundPositionY:lL,rotate:lN,rotateX:lN,rotateY:lN,rotateZ:lN,scale:lS,scaleX:lS,scaleY:lS,scaleZ:lS,skew:lN,skewX:lN,skewY:lN,distance:lL,translateX:lL,translateY:lL,translateZ:lL,x:lL,y:lL,z:lL,perspective:lL,transformPerspective:lL,opacity:lx,originX:lF,originY:lF,originZ:lL,zIndex:uZ,fillOpacity:lx,strokeOpacity:lx,numOctaves:uZ},u0={...uJ,color:lB,backgroundColor:lB,outlineColor:lB,fill:lB,stroke:lB,borderColor:lB,borderTopColor:lB,borderRightColor:lB,borderBottomColor:lB,borderLeftColor:lB,filter:uY,WebkitFilter:uY,mask:uQ,WebkitMask:uQ},u1=e=>u0[e],u2=()=>({translate:0,scale:1,origin:0,originPoint:0}),u3=()=>({x:u2(),y:u2()}),u5=()=>({min:0,max:0}),u9=()=>({x:u5(),y:u5()}),u4=new Set(["width","height","top","left","right","bottom",...uW]),u6=e=>t=>t.test(e),u8=[lk,lL,lA,lN,lM,lI,{test:e=>"auto"===e,parse:e=>e}],u7=e=>u8.find(u6(e)),ce=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u,ct=e=>180*e/Math.PI,cr=e=>ca(ct(Math.atan2(e[1],e[0]))),cn={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:cr,rotateZ:cr,skewX:e=>ct(Math.atan(e[1])),skewY:e=>ct(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},ca=e=>((e%=360)<0&&(e+=360),e),co=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),ci=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),cs={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:co,scaleY:ci,scale:e=>(co(e)+ci(e))/2,rotateX:e=>ca(ct(Math.atan2(e[6],e[5]))),rotateY:e=>ca(ct(Math.atan2(-e[2],e[0]))),rotateZ:cr,rotate:cr,skewX:e=>ct(Math.atan(e[4])),skewY:e=>ct(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function cl(e){return+!!e.includes("scale")}function cu(e,t){let r,n;if(!e||"none"===e)return cl(t);let a=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);if(a)r=cs,n=a;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=cn,n=t}if(!n)return cl(t);let o=r[t],i=n[1].split(",").map(cc);return"function"==typeof o?o(i):i[o]}function cc(e){return parseFloat(e.trim())}let cd=e=>e===lk||e===lL,cp=new Set(["x","y","z"]),ch=uW.filter(e=>!cp.has(e)),cf={width:({x:e},{paddingLeft:t="0",paddingRight:r="0",boxSizing:n})=>{let a=e.max-e.min;return"border-box"===n?a:a-parseFloat(t)-parseFloat(r)},height:({y:e},{paddingTop:t="0",paddingBottom:r="0",boxSizing:n})=>{let a=e.max-e.min;return"border-box"===n?a:a-parseFloat(t)-parseFloat(r)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>cu(t,"x"),y:(e,{transform:t})=>cu(t,"y")};cf.translateX=cf.x,cf.translateY=cf.y;let cg=new Set,cm=!1,cv=!1,cy=!1;function cb(){if(cv){let e=Array.from(cg).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),r=new Map;t.forEach(e=>{let t,n=(t=[],ch.forEach(r=>{let n=e.getValue(r);void 0!==n&&(t.push([r,n.get()]),n.set(+!!r.startsWith("scale")))}),t);n.length&&(r.set(e,n),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=r.get(e);t&&t.forEach(([t,r])=>{e.getValue(t)?.set(r)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}cv=!1,cm=!1,cg.forEach(e=>e.complete(cy)),cg.clear()}function cw(){cg.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(cv=!0)})}class ck{constructor(e,t,r,n,a,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=r,this.motionValue=n,this.element=a,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(cg.add(this),cm||(cm=!0,s9.read(cw),s9.resolveKeyframes(cb))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:r,motionValue:n}=this;if(null===e[0]){let a=n?.get(),o=e[e.length-1];if(void 0!==a)e[0]=a;else if(r&&t){let n=r.readValue(t,o);null!=n&&(e[0]=n)}void 0===e[0]&&(e[0]=o),n&&void 0===a&&n.set(e[0])}for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),cg.delete(this)}cancel(){"scheduled"===this.state&&(cg.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}let cx=new Set([uY,uQ]);function cS(e,t){let r=u1(e);return cx.has(r)||(r=lK),r.getAnimatableNone?r.getAnimatableNone(t):void 0}let cC=new Set(["auto","none","0"]);class cP extends ck{constructor(e,t,r,n,a){super(e,t,r,n,a,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:r}=this;if(!t||!t.current)return;super.readKeyframes();for(let r=0;r<e.length;r++){let n=e[r];if("string"==typeof n&&ly(n=n.trim())){let a=function e(t,r,n=1){lu(n<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[a,o]=function(e){let t=ce.exec(e);if(!t)return[,];let[,r,n,a]=t;return[`--${r??n}`,a]}(t);if(!a)return;let i=window.getComputedStyle(r).getPropertyValue(a);if(i){let e=i.trim();return/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e)?parseFloat(e):e}return ly(o)?e(o,r,n+1):o}(n,t.current);void 0!==a&&(e[r]=a),r===e.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!u4.has(r)||2!==e.length)return;let[n,a]=e,o=u7(n),i=u7(a);if(lw(n)!==lw(a)&&cf[r]){this.needsMeasurement=!0;return}if(o!==i)if(cd(o)&&cd(i))for(let t=0;t<e.length;t++){let r=e[t];"string"==typeof r&&(e[t]=parseFloat(r))}else cf[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,r=[];for(let t=0;t<e.length;t++)(null===e[t]||function(e){if("number"==typeof e)return 0===e;if(null!==e)return"none"===e||"0"===e||/^0[^.\s]+$/u.test(e);return!0}(e[t]))&&r.push(t);r.length&&function(e,t,r){let n,a=0;for(;a<e.length&&!n;){let t=e[a];"string"==typeof t&&!cC.has(t)&&lW(t).values.length&&(n=e[a]),a++}if(n&&r)for(let a of t)e[a]=cS(r,n)}(e,r,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:r}=this;if(!e||!e.current)return;"height"===r&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=cf[r](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let n=t[t.length-1];void 0!==n&&e.getValue(r,n).jump(n,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:r}=this;if(!e||!e.current)return;let n=e.getValue(t);n&&n.jump(this.measuredOrigin,!1);let a=r.length-1,o=r[a];r[a]=cf[t](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,r])=>{e.getValue(t).set(r)}),this.resolveNoneKeyframes()}}function cE(e,t,r){t.startsWith("--")?e.style.setProperty(t,r):e.style[t]=r}function cT(e){let t;return()=>(void 0===t&&(t=e()),t)}let cR={};function cO(e,t){let r=cT(e);return()=>cR[t]??r()}let cj=cO(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),c_=cO(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing"),cz=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`,cN={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:cz([0,.65,.55,1]),circOut:cz([.55,0,1,.45]),backIn:cz([.31,.01,.66,-.59]),backOut:cz([.33,1.53,.69,.99])};function cA(e){return"function"==typeof e&&"applyToOptions"in e}class cL extends uI{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:t,name:r,keyframes:n,pseudoElement:a,allowFlatten:o=!1,finalKeyframe:i,onComplete:s}=e;this.isPseudoElement=!!a,this.allowFlatten=o,this.options=e,lu("string"!=typeof e.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const l=function({type:e,...t}){return cA(e)&&c_()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}(e);this.animation=function(e,t,r,{delay:n=0,duration:a=300,repeat:o=0,repeatType:i="loop",ease:s="easeOut",times:l}={},u){let c={[t]:r};l&&(c.offset=l);let d=function e(t,r){if(t)return"function"==typeof t?c_()?l7(t,r):"ease-out":uE(t)?cz(t):Array.isArray(t)?t.map(t=>e(t,r)||cN.easeOut):cN[t]}(s,a);Array.isArray(d)&&(c.easing=d);let p={delay:n,duration:a,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:"reverse"===i?"alternate":"normal"};u&&(p.pseudoElement=u);let h=e.animate(c,p);return h}(t,r,n,l,a),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){let e=uN(n,this.options,i,this.speed);this.updateMotionValue&&this.updateMotionValue(e),cE(t,r,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(e){}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;"idle"!==e&&"finished"!==e&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){return Number(this.animation.effect?.getComputedTiming?.().duration||0)/1e3}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+e/1e3}get time(){return(Number(this.animation.currentTime)||0)/1e3}set time(e){let t=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=lh(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:r,observe:n}){return(this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&cj())?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),r&&(this.animation.rangeEnd=r),s2):n(this)}}let cI=new Set(["opacity","clipPath","filter","transform"]),{schedule:cM}=s5(queueMicrotask,!1),cF=[...u8,lB,lK],cD=new WeakMap;function cB(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function c$(e){return"string"==typeof e||Array.isArray(e)}let cV=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],cU=["initial",...cV];function cH(e){return cB(e.animate)||cU.some(t=>c$(e[t]))}function cW(e){return!!(cH(e)||e.variants)}let cq={current:null},cK={current:!1},cG="u">typeof window;function cX(e){let t=[{},{}];return e?.values.forEach((e,r)=>{t[0][r]=e.get(),t[1][r]=e.getVelocity()}),t}function cY(e,t,r,n){if("function"==typeof t){let[a,o]=cX(n);t=t(void 0!==r?r:e.custom,a,o)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){let[a,o]=cX(n);t=t(void 0!==r?r:e.custom,a,o)}return t}let cQ=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],cZ={};class cJ{scrapeMotionValuesFromProps(e,t,r){return{}}constructor({parent:e,props:t,presenceContext:r,reducedMotionConfig:n,skipAnimations:a,blockInitialAnimation:o,visualState:i},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=ck,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=le.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,s9.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=i;this.latestValues=l,this.baseTarget={...l},this.initialValues=t.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=t,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=n,this.skipAnimationsConfig=a,this.options=s,this.blockInitialAnimation=!!o,this.isControllingVariants=cH(t),this.isVariantNode=cW(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(const e in d){const t=d[e];void 0!==l[e]&&ls(t)&&t.set(l[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,cD.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(cK.current||function(){if(cK.current=!0,cG)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>cq.current=e.matches;e.addEventListener("change",t),t()}else cq.current=!1}(),this.shouldReduceMotion=cq.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){for(let e in this.projection&&this.projection.unmount(),s4(this.notifyUpdate),s4(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this),this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){let r;if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&cI.has(e)&&this.current instanceof HTMLElement){let{factory:r,keyframes:n,times:a,ease:o,duration:i}=t.accelerate,s=new cL({element:this.current,name:e,keyframes:n,times:a,ease:o,duration:lh(i)}),l=r(s);this.valueSubscriptions.set(e,()=>{l(),s.cancel()});return}let n=uq.has(e);n&&this.onBindTransform&&this.onBindTransform();let a=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&s9.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});"u">typeof window&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{a(),r&&r(),t.owner&&t.stop()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in cZ){let t=cZ[e];if(!t)continue;let{isEnabled:r,Feature:n}=t;if(!this.features[e]&&n&&r(this.props)&&(this.features[e]=new n(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):u9()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<cQ.length;t++){let r=cQ[t];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);let n=e["on"+r];n&&(this.propEventSubscriptions[r]=this.on(r,n))}this.prevMotionValues=function(e,t,r){for(let n in t){let a=t[n],o=r[n];if(ls(a))e.addValue(n,a);else if(ls(o))e.addValue(n,ln(a,{owner:e}));else if(o!==a)if(e.hasValue(n)){let t=e.getValue(n);!0===t.liveStyle?t.jump(a):t.hasAnimated||t.set(a)}else{let t=e.getStaticValue(n);e.addValue(n,ln(void 0!==t?t:a,{owner:e}))}}for(let n in r)void 0===t[n]&&e.removeValue(n);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let r=this.values.get(e);t!==r&&(r&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let r=this.values.get(e);return void 0===r&&void 0!==t&&(r=ln(null===t?void 0:t,{owner:this}),this.addValue(e,r)),r}readValue(e,t){let r=void 0===this.latestValues[e]&&this.current?this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];if(null!=r){let n,a;if("string"==typeof r&&(n=r,/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n)||(a=r,/^0[^.\s]+$/u.test(a))))r=parseFloat(r);else{let n;n=r,!cF.find(u6(n))&&lK.test(t)&&(r=cS(e,t))}this.setBaseTarget(e,ls(r)?r.get():r)}return ls(r)?r.get():r}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let t,{initial:r}=this.props;if("string"==typeof r||"object"==typeof r){let n=cY(this.props,r,this.presenceContext?.custom);n&&(t=n[e])}if(r&&void 0!==t)return t;let n=this.getBaseTargetFromProps(this.props,e);return void 0===n||ls(n)?void 0!==this.initialValues[e]&&void 0===t?void 0:this.baseTarget[e]:n}on(e,t){return this.events[e]||(this.events[e]=new s0),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){cM.render(this.render)}}class c0 extends cJ{constructor(){super(...arguments),this.KeyframeResolver=cP}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){let r=e.style;return r?r[t]:void 0}removeValueFromRenderState(e,{vars:t,style:r}){delete t[e],delete r[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;ls(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}function c1(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}let c2=(e,t)=>t&&"number"==typeof e?t.transform(e):e,c3={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},c5=uW.length;function c9(e,t,r){let{style:n,vars:a,transformOrigin:o}=e,i=!1,s=!1;for(let e in t){let r=t[e];if(uq.has(e)){i=!0;continue}if(lm(e)){a[e]=r;continue}{let t=c2(r,uJ[e]);e.startsWith("origin")?(s=!0,o[e]=t):n[e]=t}}if(!t.transform&&(i||r?n.transform=function(e,t,r){let n="",a=!0;for(let o=0;o<c5;o++){let i=uW[o],s=e[i];if(void 0===s)continue;let l=!0;if("number"==typeof s)l=s===+!!i.startsWith("scale");else{let e=parseFloat(s);l=i.startsWith("scale")?1===e:0===e}if(!l||r){let e=c2(s,uJ[i]);if(!l){a=!1;let t=c3[i]||i;n+=`${t}(${e}) `}r&&(t[i]=e)}}return n=n.trim(),r?n=r(t,a?"":n):a&&(n="none"),n}(t,e.transform,r):n.transform&&(n.transform="none")),s){let{originX:e="50%",originY:t="50%",originZ:r=0}=o;n.transformOrigin=`${e} ${t} ${r}`}}let c4={offset:"stroke-dashoffset",array:"stroke-dasharray"},c6={offset:"strokeDashoffset",array:"strokeDasharray"},c8=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function c7(e,{attrX:t,attrY:r,attrScale:n,pathLength:a,pathSpacing:o=1,pathOffset:i=0,...s},l,u,c){if(c9(e,s,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:p}=e;for(let e of(d.transform&&(p.transform=d.transform,delete d.transform),(p.transform||d.transformOrigin)&&(p.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),p.transform&&(p.transformBox=c?.transformBox??"fill-box",delete d.transformBox),c8))void 0!==d[e]&&(p[e]=d[e],delete d[e]);void 0!==t&&(d.x=t),void 0!==r&&(d.y=r),void 0!==n&&(d.scale=n),void 0!==a&&function(e,t,r=1,n=0,a=!0){e.pathLength=1;let o=a?c4:c6;e[o.offset]=`${-n}`,e[o.array]=`${t} ${r}`}(d,a,o,i,!1)}let de=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),dt=e=>"string"==typeof e&&"svg"===e.toLowerCase();function dr(e,{style:t,vars:r},n,a){let o,i=e.style;for(o in t)i[o]=t[o];for(o in a?.applyProjectionStyles(i,n),r)i.setProperty(o,r[o])}function dn(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}let da={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e)if(!lL.test(e))return e;else e=parseFloat(e);let r=dn(e,t.target.x),n=dn(e,t.target.y);return`${r}% ${n}%`}},di={borderRadius:{...da,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:da,borderTopRightRadius:da,borderBottomLeftRadius:da,borderBottomRightRadius:da,boxShadow:{correct:(e,{treeScale:t,projectionDelta:r})=>{let n=lK.parse(e);if(n.length>5)return e;let a=lK.createTransformer(e),o=+("number"!=typeof n[0]),i=r.x.scale*t.x,s=r.y.scale*t.y;n[0+o]/=i,n[1+o]/=s;let l=lY(i,s,.5);return"number"==typeof n[2+o]&&(n[2+o]/=l),"number"==typeof n[3+o]&&(n[3+o]/=l),a(n)}}};function ds(e,{layout:t,layoutId:r}){return uq.has(e)||e.startsWith("origin")||(t||void 0!==r)&&(!!di[e]||"opacity"===e)}function dl(e,t,r){let n=e.style,a=t?.style,o={};if(!n)return o;for(let t in n)(ls(n[t])||a&&ls(a[t])||ds(t,e)||r?.getValue(t)?.liveStyle!==void 0)&&(o[t]=n[t]);return o}function du(e,t,r){let n=dl(e,t,r);for(let r in e)(ls(e[r])||ls(t[r]))&&(n[-1!==uW.indexOf(r)?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r]=e[r]);return n}class dc extends c0{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=u9}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(uq.has(t)){let e=u1(t);return e&&e.default||0}return t=de.has(t)?t:c1(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,r){return du(e,t,r)}build(e,t,r){c7(e,t,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(e,t,r,n){for(let r in dr(e,t,void 0,n),t.attrs)e.setAttribute(de.has(r)?r:c1(r),t.attrs[r])}mount(e){this.isSVGTag=dt(e.tagName),super.mount(e)}}function dd({top:e,left:t,right:r,bottom:n}){return{x:{min:t,max:r},y:{min:e,max:n}}}function dp(e){return void 0===e||1===e}function dh({scale:e,scaleX:t,scaleY:r}){return!dp(e)||!dp(t)||!dp(r)}function df(e){return dh(e)||dg(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function dg(e){var t,r;return(t=e.x)&&"0%"!==t||(r=e.y)&&"0%"!==r}function dm(e,t,r,n,a){return void 0!==a&&(e=n+a*(e-n)),n+r*(e-n)+t}function dv(e,t=0,r=1,n,a){e.min=dm(e.min,t,r,n,a),e.max=dm(e.max,t,r,n,a)}function dy(e,{x:t,y:r}){dv(e.x,t.translate,t.scale,t.originPoint),dv(e.y,r.translate,r.scale,r.originPoint)}function db(e,t){e.min+=t,e.max+=t}function dw(e,t,r,n,a=.5){let o=lY(e.min,e.max,a);dv(e,t,r,o,n)}function dk(e,t){return"string"==typeof e?parseFloat(e)/100*(t.max-t.min):e}function dx(e,t,r){let n=r??e;dw(e.x,dk(t.x,n.x),t.scaleX,t.scale,t.originX),dw(e.y,dk(t.y,n.y),t.scaleY,t.scale,t.originY)}function dS(e,t){return dd(function(e,t){if(!t)return e;let r=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}(e.getBoundingClientRect(),t))}class dC extends c0{constructor(){super(...arguments),this.type="html",this.renderInstance=dr}readValueFromInstance(e,t){if(uq.has(t))return this.projection?.isProjecting?cl(t):((e,t)=>{let{transform:r="none"}=getComputedStyle(e);return cu(r,t)})(e,t);{let r=window.getComputedStyle(e),n=(lm(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof n?n.trim():n}}measureInstanceViewportBox(e,{transformPagePoint:t}){return dS(e,t)}build(e,t,r){c9(e,t,r.transformTemplate)}scrapeMotionValuesFromProps(e,t,r){return dl(e,t,r)}}let dP=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function dE(e){if("string"!=typeof e||e.includes("-"));else if(dP.indexOf(e)>-1||/[A-Z]/u.test(e))return!0;return!1}let dT=(0,L.createContext)({}),dR=(0,L.createContext)({strict:!1}),dO=(0,L.createContext)({});function dj(e){return Array.isArray(e)?e.join(" "):e}let d_=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function dz(e,t,r){for(let n in t)ls(t[n])||ds(n,r)||(e[n]=t[n])}let dN=()=>({...d_(),attrs:{}}),dA=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function dL(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||dA.has(e)}let dI=e=>!dL(e);try{j=require("@emotion/is-prop-valid").default,"function"==typeof j&&(dI=e=>e.startsWith("on")?!dL(e):j(e))}catch{}function dM(e){return ls(e)?e.get():e}let dF=(0,L.createContext)(null),dD=e=>(t,r)=>{let n=(0,L.useContext)(dO),a=(0,L.useContext)(dF),o=()=>(function({scrapeMotionValuesFromProps:e,createRenderState:t},r,n,a){return{latestValues:function(e,t,r,n){let a={},o=n(e,{});for(let e in o)a[e]=dM(o[e]);let{initial:i,animate:s}=e,l=cH(e),u=cW(e);t&&u&&!l&&!1!==e.inherit&&(void 0===i&&(i=t.initial),void 0===s&&(s=t.animate));let c=!!r&&!1===r.initial,d=(c=c||!1===i)?s:i;if(d&&"boolean"!=typeof d&&!cB(d)){let t=Array.isArray(d)?d:[d];for(let r=0;r<t.length;r++){let n=cY(e,t[r]);if(n){let{transitionEnd:e,transition:t,...r}=n;for(let e in r){let t=r[e];if(Array.isArray(t)){let e=c?t.length-1:0;t=t[e]}null!==t&&(a[e]=t)}for(let t in e)a[t]=e[t]}}}return a}(r,n,a,e),renderState:t()}})(e,t,n,a);return r?o():lo(o)},dB=dD({scrapeMotionValuesFromProps:dl,createRenderState:d_}),d$=dD({scrapeMotionValuesFromProps:du,createRenderState:dN}),dV={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},dU=!1;function dH(){return!function(){if(dU)return;let e={};for(let t in dV)e[t]={isEnabled:e=>dV[t].some(t=>!!e[t])};cZ=e,dU=!0}(),cZ}let dW=Symbol.for("motionComponentSymbol"),dq="data-"+c1("framerAppearId"),dK=(0,L.createContext)({});function dG(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function dX(e,{forwardMotionProps:t=!1,type:r}={},n,a){n&&function(e){let t=dH();for(let r in e)t[r]={...t[r],...e[r]};cZ=t}(n);let o=r?"svg"===r:dE(e),i=o?d$:dB;function s(r,n){var s;let l,u,c,d={...(0,L.useContext)(la),...r,layoutId:function({layoutId:e}){let t=(0,L.useContext)(dT).id;return t&&void 0!==e?t+"-"+e:e}(r)},{isStatic:p}=d,h=function(e){let{initial:t,animate:r}=function(e,t){if(cH(e)){let{initial:t,animate:r}=e;return{initial:!1===t||c$(t)?t:void 0,animate:c$(r)?r:void 0}}return!1!==e.inherit?t:{}}(e,(0,L.useContext)(dO));return(0,L.useMemo)(()=>({initial:t,animate:r}),[dj(t),dj(r)])}(r),f=i(r,p);if(!p&&uB){(0,L.useContext)(dR).strict;let t=function(e){let{drag:t,layout:r}=dH();if(!t&&!r)return{};let n={...t,...r};return{MeasureLayout:t?.isEnabled(e)||r?.isEnabled(e)?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}(d);l=t.MeasureLayout,h.visualElement=function(e,t,r,n,a,o){let{visualElement:i}=(0,L.useContext)(dO),s=(0,L.useContext)(dR),l=(0,L.useContext)(dF),u=(0,L.useContext)(la).reducedMotion,c=(0,L.useRef)(null),d=(0,L.useRef)(!1);n=n||s.renderer,!c.current&&n&&(c.current=n(e,{visualState:t,parent:i,props:r,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:u,isSVG:o}),d.current&&c.current&&(c.current.manuallyAnimateOnMount=!0));let p=c.current,h=(0,L.useContext)(dK);p&&!p.projection&&a&&("html"===p.type||"svg"===p.type)&&function(e,t,r,n){let{layoutId:a,layout:o,drag:i,dragConstraints:s,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:function e(t){if(t)return!1!==t.options.allowProjection?t.projection:e(t.parent)}(e.parent)),e.projection.setOptions({layoutId:a,layout:o,alwaysMeasureLayout:!!i||s&&dG(s),visualElement:e,animationType:"string"==typeof o?o:"both",initialPromotionConfig:n,crossfade:c,layoutScroll:l,layoutRoot:u})}(c.current,r,a,h);let f=(0,L.useRef)(!1);(0,L.useInsertionEffect)(()=>{p&&f.current&&p.update(r,l)});let g=r[dq],m=(0,L.useRef)(!!g&&!window.MotionHandoffIsComplete?.(g)&&window.MotionHasOptimisedAnimation?.(g));return u$(()=>{d.current=!0,p&&(f.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),p.scheduleRenderMicrotask(),m.current&&p.animationState&&p.animationState.animateChanges())}),(0,L.useEffect)(()=>{p&&(!m.current&&p.animationState&&p.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(g)}),m.current=!1),p.enteringChildren=void 0)}),p}(e,f,d,a,t.ProjectionNode,o)}return(0,A.jsxs)(dO.Provider,{value:h,children:[l&&h.visualElement?(0,A.jsx)(l,{visualElement:h.visualElement,...d}):null,function(e,t,r,{latestValues:n},a,o=!1,i){let s=(i??dE(e)?function(e,t,r,n){let a=(0,L.useMemo)(()=>{let r=dN();return c7(r,t,dt(n),e.transformTemplate,e.style),{...r.attrs,style:{...r.style}}},[t]);if(e.style){let t={};dz(t,e.style,e),a.style={...t,...a.style}}return a}:function(e,t){let r,n,a={},o=(r=e.style||{},dz(n={},r,e),Object.assign(n,function({transformTemplate:e},t){return(0,L.useMemo)(()=>{let r=d_();return c9(r,t,e),Object.assign({},r.vars,r.style)},[t])}(e,t)),n);return e.drag&&!1!==e.dragListener&&(a.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=!0===e.drag?"none":`pan-${"x"===e.drag?"y":"x"}`),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(a.tabIndex=0),a.style=o,a})(t,n,a,e),l=function(e,t,r){let n={};for(let a in e)("values"!==a||"object"!=typeof e.values)&&(dI(a)||!0===r&&dL(a)||!t&&!dL(a)||e.draggable&&a.startsWith("onDrag"))&&(n[a]=e[a]);return n}(t,"string"==typeof e,o),u=e!==L.Fragment?{...l,...s,ref:r}:{},{children:c}=t,d=(0,L.useMemo)(()=>ls(c)?c.get():c,[c]);return(0,L.createElement)(e,{...u,children:d})}(e,r,(s=h.visualElement,u=(0,L.useRef)(n),(0,L.useInsertionEffect)(()=>{u.current=n}),c=(0,L.useRef)(null),(0,L.useCallback)(e=>{e&&f.onMount?.(e),s&&(e?s.mount(e):s.unmount());let t=u.current;if("function"==typeof t)if(e){let r=t(e);"function"==typeof r&&(c.current=r)}else c.current?(c.current(),c.current=null):t(e);else t&&(t.current=e)},[s])),f,p,t,o)]})}s.displayName=`motion.${"string"==typeof e?e:`create(${e.displayName??e.name??""})`}`;let l=(0,L.forwardRef)(s);return l[dW]=e,l}class dY{constructor(e){this.isMounted=!1,this.node=e}update(){}}function dQ(e,t,r){let n=e.getProps();return cY(n,t,void 0!==r?r:n.custom,e)}function dZ(e,t){if(e?.inherit&&t){let{inherit:r,...n}=e;return{...t,...n}}return e}function dJ(e,t){let r=e?.[t]??e?.default??e;return r!==e?dZ(r,e):r}let d0=e=>Array.isArray(e);function d1(e,t){let r=e.getValue("willChange");if(ls(r)&&r.add)return r.add(t);if(!r&&s1.WillChange){let r=new s1.WillChange("auto");e.addValue("willChange",r),r.add(t)}}let d2={anticipate:ux,backInOut:uk,circInOut:uP};class d3 extends cL{constructor(e){!function(e){"string"==typeof e.ease&&e.ease in d2&&(e.ease=d2[e.ease])}(e),uL(e),super(e),void 0!==e.startTime&&!1!==e.autoplay&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:r,onComplete:n,element:a,...o}=this.options;if(!t)return;if(void 0!==e)return void t.set(e);let i=new uF({...o,autoplay:!1}),s=Math.max(10,le.now()-this.startTime),l=lp(0,10,s-10),u=i.sample(s).value,{name:c}=this.options;a&&c&&cE(a,c,u),t.setWithVelocity(i.sample(Math.max(0,s-l)).value,u,l),i.stop()}}let d5=(e,t)=>"zIndex"!==t&&!!("number"==typeof e||Array.isArray(e)||"string"==typeof e&&(lK.test(e)||"0"===e)&&!e.startsWith("url("));function d9(e){e.duration=0,e.type="keyframes"}let d4=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/,d6=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),d8=cT(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class d7 extends uI{constructor({autoplay:e=!0,delay:t=0,type:r="keyframes",repeat:n=0,repeatDelay:a=0,repeatType:o="loop",keyframes:i,name:s,motionValue:l,element:u,...c}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=le.now();const d={autoplay:e,delay:t,type:r,repeat:n,repeatDelay:a,repeatType:o,name:s,motionValue:l,element:u,...c},p=u?.KeyframeResolver||ck;this.keyframeResolver=new p(i,(e,t,r)=>this.onKeyframesResolved(e,t,d,!r),s,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,r,n){let a;this.keyframeResolver=void 0;let{name:o,type:i,velocity:s,delay:l,isHandoff:u,onUpdate:c}=r;this.resolvedAt=le.now();let d=!0;!function(e,t,r,n){let a=e[0];if(null===a)return!1;if("display"===t||"visibility"===t)return!0;let o=e[e.length-1],i=d5(a,t),s=d5(o,t);return ll(i===s,`You are trying to animate ${t} from "${a}" to "${o}". "${i?o:a}" is not an animatable value.`,"value-not-animatable"),!!i&&!!s&&(function(e){let t=e[0];if(1===e.length)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}(e)||("spring"===r||cA(r))&&n)}(e,o,i,s)&&(d=!1,(s1.instantAnimations||!l)&&c?.(uN(e,r,t)),e[0]=e[e.length-1],d9(r),r.repeat=0);let p={startTime:n?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...r,keyframes:e},h=d&&!u&&function(e){let{motionValue:t,name:r,repeatDelay:n,repeatType:a,damping:o,type:i,keyframes:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:l,transformTemplate:u}=t.owner.getProps();return d8()&&r&&(cI.has(r)||d6.has(r)&&function(e){for(let t=0;t<e.length;t++)if("string"==typeof e[t]&&d4.test(e[t]))return!0;return!1}(s))&&("transform"!==r||!u)&&!l&&!n&&"mirror"!==a&&0!==o&&"inertia"!==i}(p),f=p.motionValue?.owner?.current;if(h)try{a=new d3({...p,element:f})}catch{a=new uF(p)}else a=new uF(p);a.finished.then(()=>{this.notifyFinished()}).catch(s2),this.pendingTimeline&&(this.stopTimeline=a.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=a}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),cy=!0,cw(),cb(),cy=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}let pe={type:"spring",stiffness:500,damping:25,restSpeed:10},pt={type:"keyframes",duration:.8},pr={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},pn=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]),pa=(e,t,r,n={},a,o)=>i=>{let s=dJ(n,e)||{},l=s.delay||n.delay||0,{elapsed:u=0}=n;u-=lh(l);let c={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-u,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{i(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:o?void 0:a};!function(e){for(let t in e)if(!pn.has(t))return!0;return!1}(s)&&Object.assign(c,((e,{keyframes:t})=>t.length>2?pt:uq.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:pe:pr)(e,c)),c.duration&&(c.duration=lh(c.duration)),c.repeatDelay&&(c.repeatDelay=lh(c.repeatDelay)),void 0!==c.from&&(c.keyframes[0]=c.from);let d=!1;if(!1!==c.type&&(0!==c.duration||c.repeatDelay)||(d9(c),0===c.delay&&(d=!0)),(s1.instantAnimations||s1.skipAnimations||a?.shouldSkipAnimations)&&(d=!0,d9(c),c.delay=0),c.allowFlatten=!s.type&&!s.ease,d&&!o&&void 0!==t.get()){let e=uN(c.keyframes,s);if(void 0!==e)return void s9.update(()=>{c.onUpdate(e),c.onComplete()})}return s.isSync?new uF(c):new d7(c)};function po(e,t,{delay:r=0,transitionOverride:n,type:a}={}){let{transition:o,transitionEnd:i,...s}=t,l=e.getDefaultTransition();o=o?dZ(o,l):l;let u=o?.reduceMotion;n&&(o=n);let c=[],d=a&&e.animationState&&e.animationState.getState()[a];for(let t in s){let n=e.getValue(t,e.latestValues[t]??null),a=s[t];if(void 0===a||d&&function({protectedKeys:e,needsAnimating:t},r){let n=e.hasOwnProperty(r)&&!0!==t[r];return t[r]=!1,n}(d,t))continue;let i={delay:r,...dJ(o||{},t)},l=n.get();if(void 0!==l&&!n.isAnimating()&&!Array.isArray(a)&&a===l&&!i.velocity){s9.update(()=>n.set(a));continue}let p=!1;if(window.MotionHandoffAnimation){let r=e.props[dq];if(r){let e=window.MotionHandoffAnimation(r,t,s9);null!==e&&(i.startTime=e,p=!0)}}d1(e,t);let h=u??e.shouldReduceMotion;n.start(pa(t,n,a,h&&u4.has(t)?{type:!1}:i,e,p));let f=n.animation;f&&c.push(f)}if(i){let t=()=>s9.update(()=>{i&&function(e,t){let{transitionEnd:r={},transition:n={},...a}=dQ(e,t)||{};for(let t in a={...a,...r}){var o;let r=d0(o=a[t])?o[o.length-1]||0:o;e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,ln(r))}}(e,i)});c.length?Promise.all(c).then(t):t()}return c}function pi(e,t,r,n=0,a=1){let o=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),i=e.size,s=(i-1)*n;return"function"==typeof r?r(o,i):1===a?o*n:s-o*n}function ps(e,t,r={}){let n=dQ(e,t,"exit"===r.type?e.presenceContext?.custom:void 0),{transition:a=e.getDefaultTransition()||{}}=n||{};r.transitionOverride&&(a=r.transitionOverride);let o=n?()=>Promise.all(po(e,n,r)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(n=0)=>{let{delayChildren:o=0,staggerChildren:i,staggerDirection:s}=a;return function(e,t,r=0,n=0,a=0,o=1,i){let s=[];for(let l of e.variantChildren)l.notify("AnimationStart",t),s.push(ps(l,t,{...i,delay:r+("function"==typeof n?0:n)+pi(e.variantChildren,l,n,a,o)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(s)}(e,t,n,o,i,s,r)}:()=>Promise.resolve(),{when:s}=a;if(!s)return Promise.all([o(),i(r.delay)]);{let[e,t]="beforeChildren"===s?[o,i]:[i,o];return e().then(()=>t())}}let pl=cU.length;function pu(e,t){if(!Array.isArray(t))return!1;let r=t.length;if(r!==e.length)return!1;for(let n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}let pc=[...cV].reverse(),pd=cV.length;function pp(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ph(){return{animate:pp(!0),whileInView:pp(),whileHover:pp(),whileTap:pp(),whileDrag:pp(),whileFocus:pp(),exit:pp()}}let pf=0,pg={x:!1,y:!1};function pm(e){return[e("x"),e("y")]}function pv(e){return e.max-e.min}function py(e,t,r,n=.5){e.origin=n,e.originPoint=lY(t.min,t.max,e.origin),e.scale=pv(r)/pv(t),e.translate=lY(r.min,r.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function pb(e,t,r,n){py(e.x,t.x,r.x,n?n.originX:void 0),py(e.y,t.y,r.y,n?n.originY:void 0)}function pw(e,t,r,n=0){e.min=(n?lY(r.min,r.max,n):r.min)+t.min,e.max=e.min+pv(t)}function pk(e,t,r,n=0){let a=n?lY(r.min,r.max,n):r.min;e.min=t.min-a,e.max=e.min+pv(t)}function px(e,t,r,n){pk(e.x,t.x,r.x,n?.x),pk(e.y,t.y,r.y,n?.y)}let pS=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function pC(e){return pS.has(e.tagName)||!0===e.isContentEditable}function pP(e,t,r,n={passive:!0}){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r)}let pE=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function pT(e){return{point:{x:e.pageX,y:e.pageY}}}function pR(e,t,r,n){return pP(e,t,e=>pE(e)&&r(e,pT(e)),n)}let pO=({current:e})=>e?e.ownerDocument.defaultView:null,pj=(e,t)=>Math.abs(e-t),p_=new Set(["auto","scroll"]);class pz{constructor(e,t,{transformPagePoint:r,contextWindow:n=window,dragSnapToOrigin:a=!1,distanceThreshold:o=3,element:i}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{var e,t;if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let r=pL(this.lastMoveEventInfo,this.history),n=null!==this.startEvent,a=(e=r.offset,t={x:0,y:0},Math.sqrt(pj(e.x,t.x)**2+pj(e.y,t.y)**2)>=this.distanceThreshold);if(!n&&!a)return;let{point:o}=r,{timestamp:i}=s6;this.history.push({...o,timestamp:i});let{onStart:s,onMove:l}=this.handlers;n||(s&&s(this.lastMoveEvent,r),this.startEvent=this.lastMoveEvent),l&&l(this.lastMoveEvent,r)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=pN(t,this.transformPagePoint),s9.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:r,onSessionEnd:n,resumeAnimation:a}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&a&&a(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let o=pL("pointercancel"===e.type?this.lastMoveEventInfo:pN(t,this.transformPagePoint),this.history);this.startEvent&&r&&r(e,o),n&&n(e,o)},!pE(e))return;this.dragSnapToOrigin=a,this.handlers=t,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=n||window;const s=pN(pT(e),this.transformPagePoint),{point:l}=s,{timestamp:u}=s6;this.history=[{...l,timestamp:u}];const{onSessionStart:c}=t;c&&c(e,pL(s,this.history)),this.removeListeners=ld(pR(this.contextWindow,"pointermove",this.handlePointerMove),pR(this.contextWindow,"pointerup",this.handlePointerUp),pR(this.contextWindow,"pointercancel",this.handlePointerUp)),i&&this.startScrollTracking(i)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(p_.has(e.overflowX)||p_.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let r=e===window,n=r?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},a={x:n.x-t.x,y:n.y-t.y};(0!==a.x||0!==a.y)&&(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=a.x,this.lastMoveEventInfo.point.y+=a.y):this.history.length>0&&(this.history[0].x-=a.x,this.history[0].y-=a.y),this.scrollPositions.set(e,n),s9.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),s4(this.updatePoint)}}function pN(e,t){return t?{point:t(e.point)}:e}function pA(e,t){return{x:e.x-t.x,y:e.y-t.y}}function pL({point:e},t){return{point:e,delta:pA(e,pI(t)),offset:pA(e,t[0]),velocity:function(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,n=null,a=pI(e);for(;r>=0&&(n=e[r],!(a.timestamp-n.timestamp>lh(.1)));)r--;if(!n)return{x:0,y:0};let o=(a.timestamp-n.timestamp)/1e3;if(0===o)return{x:0,y:0};let i={x:(a.x-n.x)/o,y:(a.y-n.y)/o};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}(t,.1)}}function pI(e){return e[e.length-1]}function pM(e,t,r){return{min:void 0!==t?e.min+t:void 0,max:void 0!==r?e.max+r-(e.max-e.min):void 0}}function pF(e,t){let r=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,n]=[n,r]),{min:r,max:n}}function pD(e,t,r){return{min:pB(e,t),max:pB(e,r)}}function pB(e,t){return"number"==typeof e?e:e[t]||0}let p$=new WeakMap;class pV{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=u9(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:r}={}){let{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;let a=e=>{t?(this.stopAnimation(),this.snapToCursor(pT(e).point)):this.pauseAnimation()},o=(e,t)=>{this.stopAnimation();let{drag:r,dragPropagation:n,onDragStart:a}=this.getProps();if(r&&!n&&(this.openDragLock&&this.openDragLock(),this.openDragLock=function(e){if("x"===e||"y"===e)if(pg[e])return null;else return pg[e]=!0,()=>{pg[e]=!1};return pg.x||pg.y?null:(pg.x=pg.y=!0,()=>{pg.x=pg.y=!1})}(r),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),pm(e=>{let t=this.getAxisMotionValue(e).get()||0;if(lA.test(t)){let{projection:r}=this.visualElement;if(r&&r.layout){let n=r.layout.layoutBox[e];n&&(t=pv(n)*(parseFloat(t)/100))}}this.originPoint[e]=t}),a&&s9.postRender(()=>a(e,t)),d1(this.visualElement,"transform");let{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},i=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:r,dragDirectionLock:n,onDirectionLock:a,onDrag:o}=this.getProps();if(!r&&!this.openDragLock)return;let{offset:i}=t;if(n&&null===this.currentDirection){this.currentDirection=function(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}(i),null!==this.currentDirection&&a&&a(this.currentDirection);return}this.updateAxis("x",t.point,i),this.updateAxis("y",t.point,i),this.visualElement.render(),o&&o(e,t)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},l=()=>pm(e=>"paused"===this.getAnimationState(e)&&this.getAxisMotionValue(e).animation?.play()),{dragSnapToOrigin:u}=this.getProps();this.panSession=new pz(e,{onSessionStart:a,onStart:o,onMove:i,onSessionEnd:s,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:r,contextWindow:pO(this.visualElement),element:this.visualElement.current})}stop(e,t){let r=e||this.latestPointerEvent,n=t||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!n||!r)return;let{velocity:o}=n;this.startAnimation(o);let{onDragEnd:i}=this.getProps();i&&s9.postRender(()=>i(r,n))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,r){let{drag:n}=this.getProps();if(!r||!pU(e,n,this.currentDirection))return;let a=this.getAxisMotionValue(e),o=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(o=function(e,{min:t,max:r},n){return void 0!==t&&e<t?e=n?lY(t,e,n.min):Math.max(e,t):void 0!==r&&e>r&&(e=n?lY(r,e,n.max):Math.min(e,r)),e}(o,this.constraints[e],this.elastic[e])),a.set(o)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,n=this.constraints;e&&dG(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&r?this.constraints=function(e,{top:t,left:r,bottom:n,right:a}){return{x:pM(e.x,r,a),y:pM(e.y,t,n)}}(r.layoutBox,e):this.constraints=!1,this.elastic=function(e=.35){return!1===e?e=0:!0===e&&(e=.35),{x:pD(e,"left","right"),y:pD(e,"top","bottom")}}(t),n!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&pm(e=>{var t,n;let a;!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=(t=r.layoutBox[e],n=this.constraints[e],a={},void 0!==n.min&&(a.min=n.min-t.min),void 0!==n.max&&(a.max=n.max-t.min),a))})}resolveRefConstraints(){var e;let{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!dG(t))return!1;let n=t.current;lu(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");let{projection:a}=this.visualElement;if(!a||!a.layout)return!1;let o=function(e,t,r){let n=dS(e,r),{scroll:a}=t;return a&&(db(n.x,a.offset.x),db(n.y,a.offset.y)),n}(n,a.root,this.visualElement.getTransformPagePoint()),i=(e=a.layout.layoutBox,{x:pF(e.x,o.x),y:pF(e.y,o.y)});if(r){let e=r(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(i));this.hasMutatedConstraints=!!e,e&&(i=dd(e))}return i}startAnimation(e){let{drag:t,dragMomentum:r,dragElastic:n,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:i}=this.getProps(),s=this.constraints||{};return Promise.all(pm(i=>{if(!pU(i,t,this.currentDirection))return;let l=s&&s[i]||{};o&&(l={min:0,max:0});let u={type:"inertia",velocity:r?e[i]:0,bounceStiffness:n?200:1e6,bounceDamping:n?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...a,...l};return this.startAxisValueAnimation(i,u)})).then(i)}startAxisValueAnimation(e,t){let r=this.getAxisMotionValue(e);return d1(this.visualElement,e),r.start(pa(e,r,0,t,this.visualElement,!1))}stopAnimation(){pm(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){pm(e=>this.getAxisMotionValue(e).animation?.pause())}getAnimationState(e){return this.getAxisMotionValue(e).animation?.state}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,r=this.visualElement.getProps();return r[t]||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){pm(t=>{let{drag:r}=this.getProps();if(!pU(t,r,this.currentDirection))return;let{projection:n}=this.visualElement,a=this.getAxisMotionValue(t);if(n&&n.layout){let{min:r,max:o}=n.layout.layoutBox[t],i=a.get()||0;a.set(e[t]-lY(r,o,.5)+i)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:r}=this.visualElement;if(!dG(t)||!r||!this.constraints)return;this.stopAnimation();let n={x:0,y:0};pm(e=>{let t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){var r,a;let o,i,s,l=t.get();n[e]=(r={min:l,max:l},a=this.constraints[e],o=.5,i=pv(r),(s=pv(a))>i?o=uO(a.min,a.max-i,r.min):i>s&&(o=uO(r.min,r.max-s,a.min)),lp(0,1,o))}});let{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),pm(t=>{if(!pU(t,e,null))return;let r=this.getAxisMotionValue(t),{min:a,max:o}=this.constraints[t];r.set(lY(a,o,n[t]))})}addListeners(){if(!this.visualElement.current)return;p$.set(this.visualElement,this);let e=this.visualElement.current,t=pR(e,"pointerdown",t=>{let{drag:r,dragListener:n=!0}=this.getProps(),a=t.target,o=a!==e&&pC(a);r&&n&&!o&&this.start(t)}),r=()=>{let{dragConstraints:e}=this.getProps();dG(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,a=n.addEventListener("measure",r);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),s9.read(r);let o=pP(window,"resize",()=>this.scalePositionWithinConstraints()),i=n.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(pm(t=>{let r=this.getAxisMotionValue(t);r&&(this.originPoint[t]+=e[t].translate,r.set(r.get()+e[t].translate))}),this.visualElement.render())});return()=>{o(),t(),a(),i&&i()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:r=!1,dragPropagation:n=!1,dragConstraints:a=!1,dragElastic:o=.35,dragMomentum:i=!0}=e;return{...e,drag:t,dragDirectionLock:r,dragPropagation:n,dragConstraints:a,dragElastic:o,dragMomentum:i}}}function pU(e,t,r){return(!0===t||t===e)&&(null===r||r===e)}let pH=e=>(t,r)=>{e&&s9.postRender(()=>e(t,r))},pW={hasAnimatedSinceResize:!0,hasEverUpdated:!1},pq=!1;class pK extends L.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:r,layoutId:n}=this.props,{projection:a}=e;a&&(t.group&&t.group.add(a),r&&r.register&&n&&r.register(a),pq&&a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),pW.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:r,drag:n,isPresent:a}=this.props,{projection:o}=r;return o&&(o.isPresent=a,e.layoutDependency!==t&&o.setOptions({...o.options,layoutDependency:t}),pq=!0,n||e.layoutDependency!==t||void 0===t||e.isPresent!==a?o.willUpdate():this.safeToRemove(),e.isPresent!==a&&(a?o.promote():o.relegate()||s9.postRender(()=>{let e=o.getStack();e&&e.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),cM.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:r}=this.props,{projection:n}=e;pq=!0,n&&(n.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(n),r&&r.deregister&&r.deregister(n))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}}function pG(e){let[t,r]=function(e=!0){let t=(0,L.useContext)(dF);if(null===t)return[!0,null];let{isPresent:r,onExitComplete:n,register:a}=t,o=(0,L.useId)();(0,L.useEffect)(()=>{if(e)return a(o)},[e]);let i=(0,L.useCallback)(()=>e&&n&&n(o),[o,n,e]);return!r&&n?[!1,i]:[!0]}(),n=(0,L.useContext)(dT);return(0,A.jsx)(pK,{...e,layoutGroup:n,switchLayoutGroup:(0,L.useContext)(dK),isPresent:t,safeToRemove:r})}function pX(e){return"object"==typeof e&&null!==e}function pY(e){return pX(e)&&"ownerSVGElement"in e}let pQ=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],pZ=pQ.length,pJ=e=>"string"==typeof e?parseFloat(e):e,p0=e=>"number"==typeof e||lL.test(e);function p1(e,t){return void 0!==e[t]?e[t]:e.borderRadius}let p2=p5(0,.5,uC),p3=p5(.5,.95,s2);function p5(e,t,r){return n=>n<e?0:n>t?1:r(uO(e,t,n))}function p9(e,t){e.min=t.min,e.max=t.max}function p4(e,t){p9(e.x,t.x),p9(e.y,t.y)}function p6(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function p8(e,t,r,n,a){return e-=t,e=n+1/r*(e-n),void 0!==a&&(e=n+1/a*(e-n)),e}function p7(e,t,[r,n,a],o,i){!function(e,t=0,r=1,n=.5,a,o=e,i=e){if(lA.test(t)&&(t=parseFloat(t),t=lY(i.min,i.max,t/100)-i.min),"number"!=typeof t)return;let s=lY(o.min,o.max,n);e===o&&(s-=t),e.min=p8(e.min,t,r,s,a),e.max=p8(e.max,t,r,s,a)}(e,t[r],t[n],t[a],t.scale,o,i)}let he=["x","scaleX","originX"],ht=["y","scaleY","originY"];function hr(e,t,r,n){p7(e.x,t,he,r?r.x:void 0,n?n.x:void 0),p7(e.y,t,ht,r?r.y:void 0,n?n.y:void 0)}function hn(e){return 0===e.translate&&1===e.scale}function ha(e){return hn(e.x)&&hn(e.y)}function ho(e,t){return e.min===t.min&&e.max===t.max}function hi(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function hs(e,t){return hi(e.x,t.x)&&hi(e.y,t.y)}function hl(e){return pv(e.x)/pv(e.y)}function hu(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class hc{constructor(){this.members=[]}add(e){sZ(this.members,e);for(let t=this.members.length-1;t>=0;t--){let r=this.members[t];if(r===e||r===this.lead||r===this.prevLead)continue;let n=r.instance;n&&!1!==n.isConnected||r.snapshot||(sJ(this.members,r),r.unmount())}e.scheduleRender()}remove(e){if(sJ(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(!1!==e.isPresent&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.updateSnapshot(),e.scheduleRender();let{layoutDependency:n}=r.options,{layoutDependency:a}=e.options;(void 0===n||n!==a)&&(e.resumeFrom=r,t&&(r.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),!1===e.options.crossfade&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}let hd=(e,t)=>e.depth-t.depth;class hp{constructor(){this.children=[],this.isDirty=!1}add(e){sZ(this.children,e),this.isDirty=!0}remove(e){sJ(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(hd),this.isDirty=!1,this.children.forEach(e)}}let hh=["","X","Y","Z"],hf=0;function hg(e,t,r,n){let{latestValues:a}=t;a[e]&&(r[e]=a[e],t.setStaticValue(e,0),n&&(n[e]=0))}function hm({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:n,resetTransform:a}){return class{constructor(e={},r=t?.()){this.id=hf++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(hb),this.nodes.forEach(hR),this.nodes.forEach(hO),this.nodes.forEach(hw)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=r?r.root||r:this,this.path=r?[...r.path,r]:[],this.parent=r,this.depth=r?r.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new hp)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new s0),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let r=this.eventHandlers.get(e);r&&r.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=pY(t)&&!(pY(t)&&"svg"===t.tagName),this.instance=t;let{layoutId:r,layout:n,visualElement:a}=this.options;if(a&&!a.current&&a.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(n||r)&&(this.isLayoutDirty=!0),e){let r,n=0,a=()=>this.root.updateBlockedByResize=!1;s9.read(()=>{n=window.innerWidth}),e(t,()=>{let e=window.innerWidth;if(e!==n){let t,o;n=e,this.root.updateBlockedByResize=!0,r&&r(),t=le.now(),o=({timestamp:e})=>{let r=e-t;r>=250&&(s4(o),a(r-250))},s9.setup(o,!0),r=()=>s4(o),pW.hasAnimatedSinceResize&&(pW.hasAnimatedSinceResize=!1,this.nodes.forEach(hT))}})}r&&this.root.registerSharedNode(r,this),!1!==this.options.animate&&a&&(r||n)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:r,layout:n})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let o=this.options.transition||a.getDefaultTransition()||hL,{onLayoutAnimationStart:i,onLayoutAnimationComplete:s}=a.getProps(),l=!this.targetLayout||!hs(this.targetLayout,n),u=!t&&r;if(this.options.layoutRoot||this.resumeFrom||u||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...dJ(o,"layout"),onPlay:i,onComplete:s};(a.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,u)}else t||hT(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=n})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),s4(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){!this.isUpdateBlocked()&&(this.isUpdating=!0,this.nodes&&this.nodes.forEach(hj),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&function e(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;let{visualElement:r}=t.options;if(!r)return;let n=r.props[dq];if(window.MotionHasOptimisedAnimation(n,"transform")){let{layout:e,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",s9,!(e||r))}let{parent:a}=t;a&&!a.hasCheckedOptimisedAppear&&e(a)}(this),this.root.isUpdating||this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,("string"==typeof t.latestValues.x||"string"==typeof t.latestValues.y)&&(t.isLayoutDirty=!0),t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:r}=this.options;if(void 0===t&&!r)return;let n=this.getTransformTemplate();this.prevTransformTemplateValue=n?n(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(hS),this.nodes.forEach(hx);return}if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(hC);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(hP),this.nodes.forEach(hE),this.nodes.forEach(hv),this.nodes.forEach(hy)):this.nodes.forEach(hC),this.clearAllSnapshots();let e=le.now();s6.delta=lp(0,1e3/60,e-s6.timestamp),s6.timestamp=e,s6.isProcessing=!0,s8.update.process(s6),s8.preRender.process(s6),s8.render.process(s6),s6.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,cM.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(hk),this.sharedNodes.forEach(h_)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,s9.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){s9.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||pv(this.snapshot.measuredBox.x)||pv(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=u9()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=n(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!a)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!ha(this.projectionDelta),r=this.getTransformTemplate(),n=r?r(this.latestValues,""):void 0,o=n!==this.prevTransformTemplateValue;e&&this.instance&&(t||df(this.latestValues)||o)&&(a(this.instance,n),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){var t;let r=this.measurePageBox(),n=this.removeElementScroll(r);return e&&(n=this.removeTransform(n)),hF((t=n).x),hF(t.y),{animationId:this.root.animationId,measuredBox:r,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return u9();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(hB))){let{scroll:e}=this.root;e&&(db(t.x,e.offset.x),db(t.y,e.offset.y))}return t}removeElementScroll(e){let t=u9();if(p4(t,e),this.scroll?.wasRoot)return t;for(let r=0;r<this.path.length;r++){let n=this.path[r],{scroll:a,options:o}=n;n!==this.root&&a&&o.layoutScroll&&(a.wasRoot&&p4(t,e),db(t.x,a.offset.x),db(t.y,a.offset.y))}return t}applyTransform(e,t=!1,r){let n=r||u9();p4(n,e);for(let e=0;e<this.path.length;e++){let r=this.path[e];!t&&r.options.layoutScroll&&r.scroll&&r!==r.root&&(db(n.x,-r.scroll.offset.x),db(n.y,-r.scroll.offset.y)),df(r.latestValues)&&dx(n,r.latestValues,r.layout?.layoutBox)}return df(this.latestValues)&&dx(n,this.latestValues,this.layout?.layoutBox),n}removeTransform(e){let t=u9();p4(t,e);for(let e=0;e<this.path.length;e++){let r,n=this.path[e];df(n.latestValues)&&(n.instance&&(dh(n.latestValues)&&n.updateSnapshot(),p4(r=u9(),n.measurePageBox())),hr(t,n.latestValues,n.snapshot?.layoutBox,r))}return df(this.latestValues)&&hr(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==s6.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=t.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=t.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=t.isSharedProjectionDirty);let r=!!this.resumingFrom||this!==t;if(!(e||r&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:n,layoutId:a}=this.options;if(!this.layout||!(n||a))return;this.resolvedRelativeTargetAt=s6.timestamp;let o=this.getClosestProjectingParent();if(o&&this.linkedParentVersion!==o.layoutVersion&&!o.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(!1!==this.options.layoutAnchor&&o&&o.layout?this.createRelativeTarget(o,this.layout.layoutBox,o.layout.layoutBox):this.removeRelativeTarget()),this.relativeTarget||this.targetDelta){if(this.target||(this.target=u9(),this.targetWithTransforms=u9()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target){var i,s,l,u;this.forceRelativeParentToResolveTarget(),i=this.target,s=this.relativeTarget,l=this.relativeParent.target,u=this.options.layoutAnchor||void 0,pw(i.x,s.x,l.x,u?.x),pw(i.y,s.y,l.y,u?.y)}else this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):p4(this.target,this.layout.layoutBox),dy(this.target,this.targetDelta)):p4(this.target,this.layout.layoutBox);this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,!1!==this.options.layoutAnchor&&o&&!!o.resumingFrom==!!this.resumingFrom&&!o.options.layoutScroll&&o.target&&1!==this.animationProgress?this.createRelativeTarget(o,this.target,o.target):this.relativeParent=this.relativeTarget=void 0)}}getClosestProjectingParent(){if(!(!this.parent||dh(this.parent.latestValues)||dg(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,r){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=u9(),this.relativeTargetOrigin=u9(),px(this.relativeTargetOrigin,t,r,this.options.layoutAnchor||void 0),p4(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,r=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(r=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===s6.timestamp&&(r=!1),r)return;let{layout:n,layoutId:a}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(n||a))return;p4(this.layoutCorrected,this.layout.layoutBox);let o=this.treeScale.x,i=this.treeScale.y;!function(e,t,r,n=!1){let a,o,i=r.length;if(i){t.x=t.y=1;for(let s=0;s<i;s++){o=(a=r[s]).projectionDelta;let{visualElement:i}=a.options;(!i||!i.props.style||"contents"!==i.props.style.display)&&(n&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(db(e.x,-a.scroll.offset.x),db(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,dy(e,o)),n&&df(a.latestValues)&&dx(e,a.latestValues,a.layout?.layoutBox))}t.x<1.0000000000001&&t.x>.999999999999&&(t.x=1),t.y<1.0000000000001&&t.y>.999999999999&&(t.y=1)}}(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(1!==this.treeScale.x||1!==this.treeScale.y)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=u9());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}this.projectionDelta&&this.prevProjectionDelta?(p6(this.prevProjectionDelta.x,this.projectionDelta.x),p6(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),pb(this.projectionDelta,this.layoutCorrected,s,this.latestValues),this.treeScale.x===o&&this.treeScale.y===i&&hu(this.projectionDelta.x,this.prevProjectionDelta.x)&&hu(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",s))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=u3(),this.projectionDelta=u3(),this.projectionDeltaWithTransform=u3()}setAnimationOrigin(e,t=!1){let r,n=this.snapshot,a=n?n.latestValues:{},o={...this.latestValues},i=u3();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=u9(),l=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),u=this.getStack(),c=!u||u.members.length<=1,d=!!(l&&!c&&!0===this.options.crossfade&&!this.path.some(hA));this.animationProgress=0,this.mixTargetDelta=t=>{let n=t/1e3;if(hz(i.x,e.x,n),hz(i.y,e.y,n),this.setTargetDelta(i),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){var u,p,h,f,g,m;px(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),h=this.relativeTarget,f=this.relativeTargetOrigin,g=s,m=n,hN(h.x,f.x,g.x,m),hN(h.y,f.y,g.y,m),r&&(u=this.relativeTarget,p=r,ho(u.x,p.x)&&ho(u.y,p.y))&&(this.isProjectionDirty=!1),r||(r=u9()),p4(r,this.relativeTarget)}l&&(this.animationValues=o,function(e,t,r,n,a,o){a?(e.opacity=lY(0,r.opacity??1,p2(n)),e.opacityExit=lY(t.opacity??1,0,p3(n))):o&&(e.opacity=lY(t.opacity??1,r.opacity??1,n));for(let a=0;a<pZ;a++){let o=pQ[a],i=p1(t,o),s=p1(r,o);(void 0!==i||void 0!==s)&&(i||(i=0),s||(s=0),0===i||0===s||p0(i)===p0(s)?(e[o]=Math.max(lY(pJ(i),pJ(s),n),0),(lA.test(s)||lA.test(i))&&(e[o]+="%")):e[o]=s)}(t.rotate||r.rotate)&&(e.rotate=lY(t.rotate||0,r.rotate||0,n))}(o,a,this.latestValues,n,d,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(1e3*!!this.options.layoutRoot)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(s4(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=s9.update(()=>{var t,r,n;let a;pW.hasAnimatedSinceResize=!0,lf.layout++,this.motionValue||(this.motionValue=ln(0)),this.motionValue.jump(0,!1),this.currentAnimation=(t=this.motionValue,r=[0,1e3],n={...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{lf.layout--},onComplete:()=>{lf.layout--,e.onComplete&&e.onComplete(),this.completeAnimation()}},(a=ls(t)?t:ln(t)).start(pa("",a,r,n)),a.animation),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:r,layout:n,latestValues:a}=e;if(t&&r&&n){if(this!==e&&this.layout&&n&&hD(this.options.animationType,this.layout.layoutBox,n.layoutBox)){r=this.target||u9();let t=pv(this.layout.layoutBox.x);r.x.min=e.target.x.min,r.x.max=r.x.min+t;let n=pv(this.layout.layoutBox.y);r.y.min=e.target.y.min,r.y.max=r.y.min+n}p4(t,r),dx(t,a),pb(this.projectionDeltaWithTransform,this.layoutCorrected,t,a)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new hc),this.sharedNodes.get(e).add(t);let r=t.options.initialPromotionConfig;t.promote({transition:r?r.transition:void 0,preserveFollowOpacity:r&&r.shouldPreserveFollowOpacity?r.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:r}={}){let n=this.getStack();n&&n.promote(this,r),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:r}=e;if((r.z||r.rotate||r.rotateX||r.rotateY||r.rotateZ||r.skewX||r.skewY)&&(t=!0),!t)return;let n={};r.z&&hg("z",e,n,this.animationValues);for(let t=0;t<hh.length;t++)hg(`rotate${hh[t]}`,e,n,this.animationValues),hg(`skew${hh[t]}`,e,n,this.animationValues);for(let t in e.render(),n)e.setStaticValue(t,n[t]),this.animationValues&&(this.animationValues[t]=n[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility="hidden";return}let r=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility="",e.opacity="",e.pointerEvents=dM(t?.pointerEvents)||"",e.transform=r?r(this.latestValues,""):"none";return}let n=this.getLead();if(!this.projectionDelta||!this.layout||!n.target){this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=dM(t?.pointerEvents)||""),this.hasProjected&&!df(this.latestValues)&&(e.transform=r?r({},""):"none",this.hasProjected=!1);return}e.visibility="";let a=n.animationValues||n.latestValues;this.applyTransformsToTarget();let o=function(e,t,r){let n="",a=e.x.translate/t.x,o=e.y.translate/t.y,i=r?.z||0;if((a||o||i)&&(n=`translate3d(${a}px, ${o}px, ${i}px) `),(1!==t.x||1!==t.y)&&(n+=`scale(${1/t.x}, ${1/t.y}) `),r){let{transformPerspective:e,rotate:t,rotateX:a,rotateY:o,skewX:i,skewY:s}=r;e&&(n=`perspective(${e}px) ${n}`),t&&(n+=`rotate(${t}deg) `),a&&(n+=`rotateX(${a}deg) `),o&&(n+=`rotateY(${o}deg) `),i&&(n+=`skewX(${i}deg) `),s&&(n+=`skewY(${s}deg) `)}let s=e.x.scale*t.x,l=e.y.scale*t.y;return(1!==s||1!==l)&&(n+=`scale(${s}, ${l})`),n||"none"}(this.projectionDeltaWithTransform,this.treeScale,a);r&&(o=r(a,o)),e.transform=o;let{x:i,y:s}=this.projectionDelta;for(let t in e.transformOrigin=`${100*i.origin}% ${100*s.origin}% 0`,n.animationValues?e.opacity=n===this?a.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:a.opacityExit:e.opacity=n===this?void 0!==a.opacity?a.opacity:"":void 0!==a.opacityExit?a.opacityExit:0,di){if(void 0===a[t])continue;let{correct:r,applyTo:i,isCSSVariable:s}=di[t],l="none"===o?a[t]:r(a[t],n);if(i){let t=i.length;for(let r=0;r<t;r++)e[i[r]]=l}else s?this.options.visualElement.renderState.vars[t]=l:e[t]=l}this.options.layoutId&&(e.pointerEvents=n===this?dM(t?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(hx),this.root.sharedNodes.clear()}}}function hv(e){e.updateLayout()}function hy(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){let{layoutBox:r,measuredBox:n}=e.layout,{animationType:a}=e.options,o=t.source!==e.layout.source;if("size"===a)pm(e=>{let n=o?t.measuredBox[e]:t.layoutBox[e],a=pv(n);n.min=r[e].min,n.max=n.min+a});else if("x"===a||"y"===a){let e="x"===a?"y":"x";p9(o?t.measuredBox[e]:t.layoutBox[e],r[e])}else hD(a,t.layoutBox,r)&&pm(n=>{let a=o?t.measuredBox[n]:t.layoutBox[n],i=pv(r[n]);a.max=a.min+i,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[n].max=e.relativeTarget[n].min+i)});let i=u3();pb(i,r,t.layoutBox);let s=u3();o?pb(s,e.applyTransform(n,!0),t.measuredBox):pb(s,r,t.layoutBox);let l=!ha(i),u=!1;if(!e.resumeFrom){let n=e.getClosestProjectingParent();if(n&&!n.resumeFrom){let{snapshot:a,layout:o}=n;if(a&&o){let i=e.options.layoutAnchor||void 0,s=u9();px(s,t.layoutBox,a.layoutBox,i);let l=u9();px(l,r,o.layoutBox,i),hs(s,l)||(u=!0),n.options.layoutRoot&&(e.relativeTarget=l,e.relativeTargetOrigin=s,e.relativeParent=n)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:s,layoutDelta:i,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function hb(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function hw(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function hk(e){e.clearSnapshot()}function hx(e){e.clearMeasurements()}function hS(e){e.isLayoutDirty=!0,e.updateLayout()}function hC(e){e.isLayoutDirty=!1}function hP(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function hE(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function hT(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function hR(e){e.resolveTargetDelta()}function hO(e){e.calcProjection()}function hj(e){e.resetSkewAndRotation()}function h_(e){e.removeLeadSnapshot()}function hz(e,t,r){e.translate=lY(t.translate,0,r),e.scale=lY(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function hN(e,t,r,n){e.min=lY(t.min,r.min,n),e.max=lY(t.max,r.max,n)}function hA(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}let hL={duration:.45,ease:[.4,0,.1,1]},hI=e=>"u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),hM=hI("applewebkit/")&&!hI("chrome/")?Math.round:s2;function hF(e){e.min=hM(e.min),e.max=hM(e.max)}function hD(e,t,r){return"position"===e||"preserve-aspect"===e&&!(.2>=Math.abs(hl(t)-hl(r)))}function hB(e){return e!==e.root&&e.scroll?.wasRoot}let h$=hm({attachResizeListener:(e,t)=>pP(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),hV={current:void 0},hU=hm({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!hV.current){let e=new h$({});e.mount(window),e.setOptions({layoutScroll:!0}),hV.current=e}return hV.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>"fixed"===window.getComputedStyle(e).position});function hH(e,t){let r=function(e,t,r){if(null==e)return[];if(e instanceof EventTarget)return[e];if("string"==typeof e){let t=document,r=(void 0)??t.querySelectorAll(e);return r?Array.from(r):[]}return Array.from(e).filter(e=>null!=e)}(e),n=new AbortController;return[r,{passive:!0,...t,signal:n.signal},()=>n.abort()]}function hW(e,t,r){let{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover","Start"===r);let a=n["onHover"+r];a&&s9.postRender(()=>a(t,pT(t)))}let hq=(e,t)=>!!t&&(e===t||hq(e,t.parentElement)),hK=new WeakSet;function hG(e){return t=>{"Enter"===t.key&&e(t)}}function hX(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function hY(e){return pE(e)&&!(pg.x||pg.y)}let hQ=new WeakSet;function hZ(e,t,r){let{props:n}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&n.whileTap&&e.animationState.setActive("whileTap","Start"===r);let a=n["onTap"+("End"===r?"":r)];a&&s9.postRender(()=>a(t,pT(t)))}let hJ=new WeakMap,h0=new WeakMap,h1=e=>{let t=hJ.get(e.target);t&&t(e)},h2=e=>{e.forEach(h1)},h3={some:0,all:1},h5=function(e,t){if("u"<typeof Proxy)return dX;let r=new Map,n=(r,n)=>dX(r,n,e,t);return new Proxy((e,t)=>n(e,t),{get:(a,o)=>"create"===o?n:(r.has(o)||r.set(o,dX(o,void 0,e,t)),r.get(o))})}({animation:{Feature:class extends dY{constructor(e){super(e),e.animationState||(e.animationState=function(e){let t=t=>Promise.all(t.map(({animation:t,options:r})=>(function(e,t,r={}){let n;if(e.notify("AnimationStart",t),Array.isArray(t))n=Promise.all(t.map(t=>ps(e,t,r)));else if("string"==typeof t)n=ps(e,t,r);else{let a="function"==typeof t?dQ(e,t,r.custom):t;n=Promise.all(po(e,a,r))}return n.then(()=>{e.notify("AnimationComplete",t)})})(e,t,r))),r=ph(),n=!0,a=!1,o=t=>(r,n)=>{let a=dQ(e,n,"exit"===t?e.presenceContext?.custom:void 0);if(a){let{transition:e,transitionEnd:t,...n}=a;r={...r,...n,...t}}return r};function i(i){let{props:s}=e,l=function e(t){if(!t)return;if(!t.isControllingVariants){let r=t.parent&&e(t.parent)||{};return void 0!==t.props.initial&&(r.initial=t.props.initial),r}let r={};for(let e=0;e<pl;e++){let n=cU[e],a=t.props[n];(c$(a)||!1===a)&&(r[n]=a)}return r}(e.parent)||{},u=[],c=new Set,d={},p=1/0;for(let t=0;t<pd;t++){var h,f;let g=pc[t],m=r[g],v=void 0!==s[g]?s[g]:l[g],y=c$(v),b=g===i?m.isActive:null;!1===b&&(p=t);let w=v===l[g]&&v!==s[g]&&y;if(w&&(n||a)&&e.manuallyAnimateOnMount&&(w=!1),m.protectedKeys={...d},!m.isActive&&null===b||!v&&!m.prevProp||cB(v)||"boolean"==typeof v)continue;if("exit"===g&&m.isActive&&!0!==b){m.prevResolvedValues&&(d={...d,...m.prevResolvedValues});continue}let k=(h=m.prevProp,"string"==typeof(f=v)?f!==h:!!Array.isArray(f)&&!pu(f,h)),x=k||g===i&&m.isActive&&!w&&y||t>p&&y,S=!1,C=Array.isArray(v)?v:[v],P=C.reduce(o(g),{});!1===b&&(P={});let{prevResolvedValues:E={}}=m,T={...E,...P},R=t=>{x=!0,c.has(t)&&(S=!0,c.delete(t)),m.needsAnimating[t]=!0;let r=e.getValue(t);r&&(r.liveStyle=!1)};for(let e in T){let t=P[e],r=E[e];if(!d.hasOwnProperty(e))(d0(t)&&d0(r)?pu(t,r):t===r)?void 0!==t&&c.has(e)?R(e):m.protectedKeys[e]=!0:null!=t?R(e):c.add(e)}m.prevProp=v,m.prevResolvedValues=P,m.isActive&&(d={...d,...P}),(n||a)&&e.blockInitialAnimation&&(x=!1);let O=w&&k,j=!O||S;x&&j&&u.push(...C.map(t=>{let r={type:g};if("string"==typeof t&&(n||a)&&!O&&e.manuallyAnimateOnMount&&e.parent){let{parent:n}=e,a=dQ(n,t);if(n.enteringChildren&&a){let{delayChildren:t}=a.transition||{};r.delay=pi(n.enteringChildren,e,t)}}return{animation:t,options:r}}))}if(c.size){let t={};if("boolean"!=typeof s.initial){let r=dQ(e,Array.isArray(s.initial)?s.initial[0]:s.initial);r&&r.transition&&(t.transition=r.transition)}c.forEach(r=>{let n=e.getBaseTarget(r),a=e.getValue(r);a&&(a.liveStyle=!0),t[r]=n??null}),u.push({animation:t})}let g=!!u.length;return n&&(!1===s.initial||s.initial===s.animate)&&!e.manuallyAnimateOnMount&&(g=!1),n=!1,a=!1,g?t(u):Promise.resolve()}return{animateChanges:i,setActive:function(t,n){if(r[t].isActive===n)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,n)),r[t].isActive=n;let a=i(t);for(let e in r)r[e].protectedKeys={};return a},setAnimateFunction:function(r){t=r(e)},getState:()=>r,reset:()=>{r=ph(),a=!0}}}(e))}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();cB(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends dY{constructor(){super(...arguments),this.id=pf++}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;let n=this.node.animationState.setActive("exit",!e);t&&!e&&n.then(()=>{t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}},inView:{Feature:class extends dY{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var e;let t;this.unmount();let{viewport:r={}}=this.node.getProps(),{root:n,margin:a,amount:o="some",once:i}=r,s={root:n?n.current:void 0,rootMargin:a,threshold:"number"==typeof o?o:h3[o]},l=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);let{onViewportEnter:r,onViewportLeave:n}=this.node.getProps(),a=t?r:n;a&&a(e)};return e=this.node.current,t=function({root:e,...t}){let r=e||document;h0.has(r)||h0.set(r,{});let n=h0.get(r),a=JSON.stringify(t);return n[a]||(n[a]=new IntersectionObserver(h2,{root:e,...t})),n[a]}(s),hJ.set(e,l),t.observe(e),()=>{hJ.delete(e),t.unobserve(e)}}mount(){this.startObserver()}update(){if("u"<typeof IntersectionObserver)return;let{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends dY{mount(){let{current:e}=this.node;e&&(this.unmount=function(e,t,r={}){let[n,a,o]=hH(e,r),i=e=>{let n=e.currentTarget;if(!hY(e)||hQ.has(e))return;hK.add(n),r.stopPropagation&&hQ.add(e);let o=t(n,e),i=(e,t)=>{window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",l),hK.has(n)&&hK.delete(n),hY(e)&&"function"==typeof o&&o(e,{success:t})},s=e=>{i(e,n===window||n===document||r.useGlobalTarget||hq(n,e.target))},l=e=>{i(e,!1)};window.addEventListener("pointerup",s,a),window.addEventListener("pointercancel",l,a)};return n.forEach(e=>{(r.useGlobalTarget?window:e).addEventListener("pointerdown",i,a),pX(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)&&(e.addEventListener("focus",e=>((e,t)=>{let r=e.currentTarget;if(!r)return;let n=hG(()=>{if(hK.has(r))return;hX(r,"down");let e=hG(()=>{hX(r,"up")});r.addEventListener("keyup",e,t),r.addEventListener("blur",()=>hX(r,"cancel"),t)});r.addEventListener("keydown",n,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",n),t)})(e,a)),pC(e)||e.hasAttribute("tabindex")||(e.tabIndex=0))}),o}(e,(e,t)=>(hZ(this.node,t,"Start"),(e,{success:t})=>hZ(this.node,e,t?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends dY{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ld(pP(this.node.current,"focus",()=>this.onFocus()),pP(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends dY{mount(){let{current:e}=this.node;e&&(this.unmount=function(e,t,r={}){let[n,a,o]=hH(e,r);return n.forEach(e=>{let r,n=!1,o=!1,i=t=>{r&&(r(t),r=void 0),e.removeEventListener("pointerleave",l)},s=e=>{n=!1,window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",s),o&&(o=!1,i(e))},l=e=>{if("touch"!==e.pointerType){if(n){o=!0;return}i(e)}};e.addEventListener("pointerenter",n=>{if("touch"===n.pointerType||pg.x||pg.y)return;o=!1;let i=t(e,n);"function"==typeof i&&(r=i,e.addEventListener("pointerleave",l,a))},a),e.addEventListener("pointerdown",()=>{n=!0,window.addEventListener("pointerup",s,a),window.addEventListener("pointercancel",s,a)},a)}),o}(e,(e,t)=>(hW(this.node,t,"Start"),e=>hW(this.node,e,"End"))))}unmount(){}}},pan:{Feature:class extends dY{constructor(){super(...arguments),this.removePointerDownListener=s2}onPointerDown(e){this.session=new pz(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:pO(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:r,onPanEnd:n}=this.node.getProps();return{onSessionStart:pH(e),onStart:pH(t),onMove:r,onEnd:(e,t)=>{delete this.session,n&&s9.postRender(()=>n(e,t))}}}mount(){this.removePointerDownListener=pR(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends dY{constructor(e){super(e),this.removeGroupControls=s2,this.removeListeners=s2,this.controls=new pV(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||s2}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},ProjectionNode:hU,MeasureLayout:pG},layout:{ProjectionNode:hU,MeasureLayout:pG}},(e,t)=>t.isSVG??dE(e)?new dc(t):new dC(t,{allowProjection:e!==L.Fragment})),h9=(0,L.createContext)(null);function h4(){let e=(0,L.use)(h9);if(!e)throw Error("useComparisonSliderContext must be used within ComparisonSlider");return e}function h6({"aria-label":e="Comparison slider",className:t,mode:r="drag",onDragEnd:n,onDragStart:a,...o}){let[i,s]=(0,L.useState)(!1),l=li(50),u=function(e,t={}){return function(e,t={}){let{isStatic:r}=(0,L.useContext)(la),n=()=>ls(e)?e.get():e;if(r)return uU(n);let a=li(n());return(0,L.useInsertionEffect)(()=>(function(e,t,r={}){let n,a=e.get(),o=null,i=a,s="string"==typeof a?a.replace(/[\d.-]/g,""):void 0,l=()=>{o&&(o.stop(),o=null),e.animation=void 0},u=()=>{(()=>{let t=uD(e.get()),a=uD(i);if(t===a)return l();let s=o?o.getGeneratorVelocity():e.getVelocity();l(),o=new uF({keyframes:[t,a],velocity:s,type:"spring",restDelta:.001,restSpeed:.01,...r,onUpdate:n})})(),e.animation=o??void 0,e.events.animationStart?.notify(),o?.then(()=>{e.animation=void 0,e.events.animationComplete?.notify()})};if(e.attach((e,t)=>{i=e,n=e=>{var r,n;return t((r=e,(n=s)?r+n:r))},s9.postRender(u)},l),ls(t)){let n=!0===r.skipInitialAnimation,a=t.on("change",t=>{var r,a,o,i;n?(n=!1,e.jump((r=t,(a=s)?r+a:r),!1)):e.set((o=t,(i=s)?o+i:o))}),o=e.on("destroy",a);return()=>{a(),o()}}return l})(a,e,t),[a,JSON.stringify(t)]),a}(e,{type:"spring",...t})}(l,{bounce:0,duration:0}),[c,d]=(0,L.useState)(50),p=(0,L.useMemo)(()=>({mode:r,motionSliderPosition:u,setSliderPosition:d,sliderPosition:c}),[r,u,c]);function h(e){let t=Math.min(Math.max(e,0),100);l.set(t),d(t)}function f(e,t){(i||"drag"!==r)&&h((t-e.left)/e.width*100)}function g(){"drag"===r&&(s(!0),a?.())}function m(){"drag"===r&&(s(!1),n?.())}return(0,A.jsx)(h9,{value:p,children:(0,A.jsx)("div",{"aria-label":e,"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":c,className:i2("relative isolate w-full select-none overflow-hidden",t),role:"slider",tabIndex:0,onKeyDown:e=>{let t=e.shiftKey?10:1;("ArrowLeft"===e.key||"ArrowDown"===e.key)&&(e.preventDefault(),h(c-t)),("ArrowRight"===e.key||"ArrowUp"===e.key)&&(e.preventDefault(),h(c+t)),"Home"===e.key&&(e.preventDefault(),h(0)),"End"===e.key&&(e.preventDefault(),h(100))},onMouseDown:g,onMouseLeave:m,onMouseMove:e=>{f(e.currentTarget.getBoundingClientRect(),e.clientX)},onMouseUp:m,onTouchEnd:m,onTouchMove:e=>{f(e.currentTarget.getBoundingClientRect(),e.touches[0]?.clientX??0)},onTouchStart:g,...o})})}function h8({className:e,position:t,...r}){let{motionSliderPosition:n}=h4(),a=uU(n,e=>`inset(0 0 0 ${e}%)`),o=uU(n,e=>`inset(0 ${100-e}% 0 0)`);return(0,A.jsx)(h5.div,{"aria-hidden":"true",className:i2("absolute inset-0 h-full w-full object-cover",e),role:"img",style:{clipPath:"left"===t?a:o},...r})}function h7({className:e,children:t,...r}){let{mode:n,motionSliderPosition:a}=h4(),o=uU(a,e=>`${e}%`);return(0,A.jsx)(h5.div,{"aria-hidden":"true",className:i2("-translate-x-1/2 absolute top-0 z-50 flex h-full w-10 items-center justify-center","drag"===n&&"cursor-grab active:cursor-grabbing",e),role:"presentation",style:{left:o},...r,children:t??(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)("div",{className:"-translate-x-1/2 absolute left-1/2 h-full w-0.5 bg-background"}),"drag"===n&&(0,A.jsx)("div",{className:"z-50 flex items-center justify-center rounded-sm bg-background px-0.5 py-1",children:(0,A.jsx)("span",{className:"h-4 w-0.5 rounded-full bg-muted-foreground"})})]})})}function fe(e){return(0,A.jsxs)("svg",{fill:"none",viewBox:"0 0 20 19",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,A.jsx)("path",{d:"M5.83302 17.3478C5.83302 16.9097 6.00874 16.4895 6.3213 16.1797C6.63386 15.8699 7.05766 15.6957 7.49968 15.6957C7.9417 15.6957 8.3655 15.8699 8.67806 16.1797C8.99062 16.4895 9.16634 16.9097 9.16634 17.3478C9.16634 17.786 8.99062 18.2061 8.67806 18.516C8.3655 18.8258 7.9417 19 7.49968 19C7.05766 19 6.63386 18.8258 6.3213 18.516C6.00874 18.2061 5.83302 17.786 5.83302 17.3478Z",fill:"currentColor"}),(0,A.jsx)("path",{d:"M14.9999 17.3478C14.9999 16.9097 15.1756 16.4896 15.4882 16.1797C15.8008 15.8699 16.2246 15.6957 16.6666 15.6957C17.1086 15.6957 17.5324 15.8699 17.845 16.1797C18.1575 16.4896 18.3332 16.9097 18.3332 17.3478C18.3332 17.786 18.1575 18.2061 17.845 18.516C17.5324 18.8258 17.1086 19 16.6666 19C16.2246 19 15.8008 18.8258 15.4882 18.516C15.1756 18.2061 14.9999 17.786 14.9999 17.3478Z",fill:"currentColor"}),(0,A.jsx)("path",{d:"M4.16665 0L4.2407 0.00322688C4.60569 0.0352804 4.91062 0.302097 4.9837 0.66393L5.68357 4.1304H19.1666C19.4149 4.1304 19.6503 4.24008 19.8087 4.4297C19.967 4.61939 20.0318 4.86954 19.9853 5.11137L18.6514 12.0419L18.6506 12.0484C18.5363 12.6188 18.223 13.1309 17.766 13.4956C17.3132 13.857 16.7478 14.0499 16.1669 14.0426L8.06637 14.0434C7.48543 14.0507 6.92009 13.857 6.46725 13.4956C6.01045 13.1311 5.69711 12.6193 5.58265 12.0492L4.18618 5.13235C4.18448 5.12458 4.18277 5.11681 4.18129 5.10895L3.48387 1.65216H0.833329C0.373094 1.65216 0 1.28231 0 0.826081C0 0.369849 0.373094 0 0.833329 0H4.16665ZM7.21676 11.7249L7.21757 11.7265C7.2557 11.9166 7.35986 12.0874 7.51217 12.2089C7.66452 12.3305 7.85536 12.3949 8.0509 12.3912H16.1824C16.3779 12.3949 16.5688 12.3305 16.7211 12.2089C16.8544 12.1025 16.951 11.9584 16.9986 11.7967L17.0157 11.7265L18.1591 5.78257H6.01722L7.21676 11.7249Z",fill:"currentColor"})]})}function ft(e){return(0,A.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,A.jsx)("g",{clipPath:"url(#clip0_3784_10212)",children:(0,A.jsx)("path",{d:"M13.4104 11.9958L17.7104 7.70579C17.8036 7.61255 17.8776 7.50186 17.928 7.38004C17.9785 7.25822 18.0045 7.12765 18.0045 6.99579C18.0045 6.86393 17.9785 6.73336 17.928 6.61154C17.8776 6.48972 17.8036 6.37903 17.7104 6.28579C17.6171 6.19255 17.5064 6.11859 17.3846 6.06813C17.2628 6.01767 17.1322 5.9917 17.0004 5.9917C16.8685 5.9917 16.7379 6.01767 16.6161 6.06813C16.4943 6.11859 16.3836 6.19255 16.2904 6.28579L12.0004 10.5858L7.71036 6.28579C7.52206 6.09749 7.26666 5.9917 7.00036 5.9917C6.73406 5.9917 6.47866 6.09749 6.29036 6.28579C6.10206 6.47409 5.99627 6.72949 5.99627 6.99579C5.99627 7.26209 6.10206 7.51749 6.29036 7.70579L10.5904 11.9958L6.29036 16.2858C6.19651 16.3787 6.12201 16.4893 6.07116 16.6111C6.02032 16.733 5.99414 16.8637 5.99414 16.9958C5.99414 17.1278 6.02032 17.2586 6.07116 17.3804C6.12201 17.5023 6.19651 17.6129 6.29036 17.7058C6.38332 17.7995 6.49392 17.8739 6.61578 17.9247C6.73764 17.9754 6.86835 18.0016 7.00036 18.0016C7.13237 18.0016 7.26308 17.9754 7.38494 17.9247C7.5068 17.8739 7.6174 17.7995 7.71036 17.7058L12.0004 13.4058L16.2904 17.7058C16.4067 17.8236 16.5505 17.9107 16.7087 17.9593C16.867 18.0079 17.0349 18.0165 17.1973 17.9843C17.3597 17.9521 17.5116 17.8801 17.6394 17.7748C17.7671 17.6695 17.8668 17.5341 17.9294 17.3808C18.0058 17.1971 18.0257 16.9948 17.9865 16.7997C17.9473 16.6047 17.8508 16.4257 17.7094 16.2858L13.4104 11.9958Z",fill:"currentColor"})}),(0,A.jsx)("defs",{children:(0,A.jsx)("clipPath",{id:"clip0_3784_10212",children:(0,A.jsx)("rect",{width:"24",height:"24",fill:"white"})})})]})}function fr(e){return(0,A.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...e,children:[(0,A.jsx)("path",{d:"M14.3102 16.38L13.0002 17.64V12C13.0002 11.7348 12.8948 11.4804 12.7073 11.2929C12.5197 11.1053 12.2654 11 12.0002 11C11.735 11 11.4806 11.1053 11.2931 11.2929C11.1055 11.4804 11.0002 11.7348 11.0002 12V17.59L9.71018 16.29C9.56958 16.15 9.39071 16.0548 9.1961 16.0163C9.00149 15.9779 8.79984 15.9978 8.61656 16.0738C8.43329 16.1497 8.27658 16.2781 8.16618 16.443C8.05578 16.6078 7.99663 16.8016 7.99618 17C7.99616 17.1318 8.02212 17.2624 8.07256 17.3842C8.12301 17.506 8.19695 17.6167 8.29018 17.71L11.2902 20.71C11.4758 20.8945 11.7264 20.999 11.9881 21.0008C12.2499 21.0027 12.5019 20.9019 12.6902 20.72L15.6902 17.82C15.796 17.7323 15.8827 17.6237 15.9448 17.5011C16.0069 17.3785 16.0431 17.2444 16.0512 17.1072C16.0593 16.97 16.039 16.8325 15.9917 16.7035C15.9444 16.5744 15.871 16.4565 15.7762 16.357C15.6811 16.2574 15.5664 16.1786 15.4394 16.1255C15.3124 16.0723 15.1758 16.046 15.0382 16.0482C14.9005 16.0503 14.7648 16.0809 14.6395 16.138C14.5142 16.1951 14.4021 16.2775 14.3102 16.38Z",fill:"currentColor"}),(0,A.jsx)("path",{d:"M17.6704 6.999C17.2623 5.82006 16.497 4.79762 15.4807 4.07397C14.4645 3.35031 13.2479 2.96143 12.0004 2.96143C10.7528 2.96143 9.53628 3.35031 8.52005 4.07397C7.50381 4.79762 6.73842 5.82006 6.33038 6.999C5.43194 7.11934 4.5831 7.48166 3.87468 8.0472C3.16627 8.61274 2.62492 9.36022 2.30855 10.2097C1.99218 11.0592 1.91269 11.9787 2.07859 12.8698C2.24449 13.761 2.64953 14.5903 3.25038 15.269C3.32296 15.3968 3.42284 15.5071 3.54289 15.592C3.66295 15.6768 3.80023 15.7341 3.94497 15.7599C4.08971 15.7856 4.23834 15.7791 4.38029 15.7408C4.52223 15.7026 4.65399 15.6335 4.76618 15.5385C4.87838 15.4435 4.96825 15.3249 5.0294 15.1912C5.09055 15.0576 5.12147 14.912 5.11996 14.765C5.11845 14.618 5.08455 14.4732 5.02067 14.3408C4.95679 14.2084 4.86451 14.0917 4.75038 13.999C4.3635 13.5665 4.11037 13.031 4.02167 12.4575C3.93297 11.884 4.01252 11.2971 4.25066 10.7679C4.4888 10.2387 4.87532 9.7899 5.36338 9.47593C5.85143 9.16197 6.42007 8.9963 7.00038 8.999H7.10038C7.33433 9.00372 7.56252 8.92625 7.74524 8.78008C7.92796 8.6339 8.05363 8.42828 8.10038 8.199C8.284 7.29477 8.77457 6.48182 9.48898 5.8979C10.2034 5.31398 11.0977 4.99499 12.0204 4.99499C12.9431 4.99499 13.8374 5.31398 14.5518 5.8979C15.2662 6.48182 15.7568 7.29477 15.9404 8.199C15.9871 8.42828 16.1128 8.6339 16.2955 8.78008C16.4782 8.92625 16.7064 9.00372 16.9404 8.999H17.0004C17.5807 8.9963 18.1493 9.16197 18.6374 9.47593C19.1254 9.7899 19.512 10.2387 19.7501 10.7679C19.9883 11.2971 20.0678 11.884 19.9791 12.4575C19.8904 13.031 19.6373 13.5665 19.2504 13.999C19.1623 14.0978 19.0947 14.2131 19.0515 14.3382C19.0083 14.4633 18.9904 14.5957 18.9987 14.7278C19.0071 14.8599 19.0416 14.989 19.1003 15.1077C19.1589 15.2263 19.2405 15.3321 19.3404 15.419C19.5394 15.5938 19.7996 15.6825 20.064 15.6656C20.3283 15.6488 20.5752 15.5277 20.7504 15.329C21.3679 14.6514 21.7873 13.8172 21.9626 12.9173C22.138 12.0175 22.0625 11.0868 21.7446 10.227C21.4267 9.36713 20.8785 8.61124 20.1599 8.04194C19.4414 7.47264 18.5802 7.11185 17.6704 6.999Z",fill:"currentColor"})]})}function fn(e){return(0,A.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 13.3333 13.3343",fill:"none",...e,children:(0,A.jsx)("path",{d:"M12.6667 2.66759H9.33333V1.55425C9.31769 1.12747 9.13347 0.724291 8.82105 0.433114C8.50862 0.141937 8.0935 -0.0134857 7.66667 0.000918958H5.66667C5.23984 -0.0134857 4.82471 0.141937 4.51229 0.433114C4.19986 0.724291 4.01564 1.12747 4 1.55425V2.66759H0.666667C0.489856 2.66759 0.320286 2.73782 0.195262 2.86285C0.0702379 2.98787 0 3.15744 0 3.33425C0 3.51106 0.0702379 3.68063 0.195262 3.80566C0.320286 3.93068 0.489856 4.00092 0.666667 4.00092H1.33333V11.3343C1.33333 11.8647 1.54405 12.3734 1.91912 12.7485C2.29419 13.1235 2.8029 13.3343 3.33333 13.3343H10C10.5304 13.3343 11.0391 13.1235 11.4142 12.7485C11.7893 12.3734 12 11.8647 12 11.3343V4.00092H12.6667C12.8435 4.00092 13.013 3.93068 13.1381 3.80566C13.2631 3.68063 13.3333 3.51106 13.3333 3.33425C13.3333 3.15744 13.2631 2.98787 13.1381 2.86285C13.013 2.73782 12.8435 2.66759 12.6667 2.66759ZM5.33333 1.55425C5.33333 1.44759 5.47333 1.33425 5.66667 1.33425H7.66667C7.86 1.33425 8 1.44759 8 1.55425V2.66759H5.33333V1.55425ZM10.6667 11.3343C10.6667 11.5111 10.5964 11.6806 10.4714 11.8057C10.3464 11.9307 10.1768 12.0009 10 12.0009H3.33333C3.15652 12.0009 2.98695 11.9307 2.86193 11.8057C2.7369 11.6806 2.66667 11.5111 2.66667 11.3343V4.00092H10.6667V11.3343Z",fill:"currentColor"})})}function fa(e){return(0,A.jsxs)("svg",{fill:"none",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,A.jsx)("path",{d:"M20 11C19.7348 11 19.4804 11.1054 19.2929 11.2929C19.1054 11.4804 19 11.7348 19 12V18C19 18.2652 18.8946 18.5196 18.7071 18.7071C18.5196 18.8946 18.2652 19 18 19H6C5.73478 19 5.48043 18.8946 5.29289 18.7071C5.10536 18.5196 5 18.2652 5 18V6C5 5.73478 5.10536 5.48043 5.29289 5.29289C5.48043 5.10536 5.73478 5 6 5H12C12.2652 5 12.5196 4.89464 12.7071 4.70711C12.8946 4.51957 13 4.26522 13 4C13 3.73478 12.8946 3.48043 12.7071 3.29289C12.5196 3.10536 12.2652 3 12 3H6C5.20435 3 4.44129 3.31607 3.87868 3.87868C3.31607 4.44129 3 5.20435 3 6V18C3 18.7956 3.31607 19.5587 3.87868 20.1213C4.44129 20.6839 5.20435 21 6 21H18C18.7956 21 19.5587 20.6839 20.1213 20.1213C20.6839 19.5587 21 18.7956 21 18V12C21 11.7348 20.8946 11.4804 20.7071 11.2929C20.5196 11.1054 20.2652 11 20 11Z",fill:"currentColor"}),(0,A.jsx)("path",{d:"M16.0001 5H17.5801L11.2901 11.28C11.1725 11.3965 11.0856 11.5402 11.0371 11.6985C10.9887 11.8567 10.9802 12.0245 11.0123 12.1868C11.0445 12.3491 11.1164 12.5009 11.2216 12.6287C11.3268 12.7565 11.462 12.8562 11.6151 12.919C11.7987 12.9957 12.0009 13.0158 12.196 12.9768C12.3911 12.9378 12.5701 12.8414 12.7101 12.7L19.0001 6.42V8C19.0001 8.26522 19.1054 8.51957 19.293 8.70711C19.4805 8.89464 19.7349 9 20.0001 9C20.2653 9 20.5197 8.89464 20.7072 8.70711C20.8947 8.51957 21.0001 8.26522 21.0001 8V4C21.0001 3.73478 20.8947 3.48043 20.7072 3.29289C20.5197 3.10536 20.2653 3 20.0001 3H16.0001C15.7349 3 15.4805 3.10536 15.293 3.29289C15.1054 3.48043 15.0001 3.73478 15.0001 4C15.0001 4.26522 15.1054 4.51957 15.293 4.70711C15.4805 4.89464 15.7349 5 16.0001 5Z",fill:"currentColor"})]})}function fo(e){return(0,A.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,A.jsx)("path",{d:"M20 15.9998C20.5522 15.9998 20.9999 16.4476 21 16.9998V18.9998C20.9999 19.7952 20.6835 20.5584 20.1211 21.1209C19.5585 21.6833 18.7955 21.9998 18 21.9998H6C5.20446 21.9998 4.44149 21.6833 3.87891 21.1209C3.31646 20.5584 3.00012 19.7952 3 18.9998V16.9998C3.00009 16.4476 3.44777 15.9998 4 15.9998C4.55223 15.9998 4.99991 16.4476 5 16.9998V18.9998C5.00012 19.2648 5.1056 19.5194 5.29297 19.7068C5.48048 19.8942 5.7349 19.9998 6 19.9998H18C18.2651 19.9998 18.5195 19.8942 18.707 19.7068C18.8944 19.5194 18.9999 19.2648 19 18.9998V16.9998C19.0001 16.4476 19.4478 15.9998 20 15.9998Z",fill:"currentColor"}),(0,A.jsx)("path",{d:"M11.3691 3.22437C11.7619 2.90402 12.3409 2.92662 12.707 3.29273L17.707 8.29273C18.0973 8.68328 18.0975 9.31635 17.707 9.7068C17.3166 10.097 16.6834 10.097 16.293 9.7068L13 6.41383V15.9998C12.9997 16.5518 12.552 16.9997 12 16.9998C11.4479 16.9998 11.0003 16.5518 11 15.9998V6.41383L7.70703 9.7068C7.31657 10.097 6.68343 10.097 6.29297 9.7068C5.90252 9.31635 5.90268 8.68328 6.29297 8.29273L11.293 3.29273L11.3691 3.22437Z",fill:"currentColor"})]})}var fi=Symbol("radix.slottable");function fs(e){return L.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===fi}var fl=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{var r,n;let a,o,i,s=(n=r=`Primitive.${t}`,(a=L.forwardRef((e,t)=>{let{children:r,...n}=e;if(L.isValidElement(r)){var a;let e,o,i=(a=r,(o=(e=Object.getOwnPropertyDescriptor(a.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?a.ref:(o=(e=Object.getOwnPropertyDescriptor(a,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?a.props.ref:a.props.ref||a.ref),s=function(e,t){let r={...t};for(let n in t){let a=e[n],o=t[n];/^on[A-Z]/.test(n)?a&&o?r[n]=(...e)=>{let t=o(...e);return a(...e),t}:a&&(r[n]=a):"style"===n?r[n]={...a,...o}:"className"===n&&(r[n]=[a,o].filter(Boolean).join(" "))}return{...e,...r}}(n,r.props);return r.type!==L.Fragment&&(s.ref=t?oY(t,i):i),L.cloneElement(r,s)}return L.Children.count(r)>1?L.Children.only(null):null})).displayName=`${n}.SlotClone`,o=a,(i=L.forwardRef((e,t)=>{let{children:r,...n}=e,a=L.Children.toArray(r),i=a.find(fs);if(i){let e=i.props.children,r=a.map(t=>t!==i?t:L.Children.count(e)>1?L.Children.only(null):L.isValidElement(e)?e.props.children:null);return(0,A.jsx)(o,{...n,ref:t,children:L.isValidElement(e)?L.cloneElement(e,void 0,r):null})}return(0,A.jsx)(o,{...n,ref:t,children:r})})).displayName=`${r}.Slot`,i),l=L.forwardRef((e,r)=>{let{asChild:n,...a}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,A.jsx)(n?s:t,{...a,ref:r})});return l.displayName=`Primitive.${t}`,{...e,[t]:l}},{}),fu="Progress",[fc,fd]=function(e,t=[]){let r=[],n=()=>{let t=r.map(e=>L.createContext(e));return function(r){let n=r?.[e]||t;return L.useMemo(()=>({[`__scope${e}`]:{...r,[e]:n}}),[r,n])}};return n.scopeName=e,[function(t,n){let a=L.createContext(n),o=r.length;r=[...r,n];let i=t=>{let{scope:r,children:n,...i}=t,s=r?.[e]?.[o]||a,l=L.useMemo(()=>i,Object.values(i));return(0,A.jsx)(s.Provider,{value:l,children:n})};return i.displayName=t+"Provider",[i,function(r,i){let s=i?.[e]?.[o]||a,l=L.useContext(s);if(l)return l;if(void 0!==n)return n;throw Error(`\`${r}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let r=()=>{let r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let n=r.reduce((t,{useScope:r,scopeName:n})=>{let a=r(e)[`__scope${n}`];return{...t,...a}},{});return L.useMemo(()=>({[`__scope${t.scopeName}`]:n}),[n])}};return r.scopeName=t.scopeName,r}(n,...t)]}(fu),[fp,fh]=fc(fu),ff=L.forwardRef((e,t)=>{var r,n;let{__scopeProgress:a,value:o=null,max:i,getValueLabel:s=fv,...l}=e;(i||0===i)&&!fw(i)&&console.error((r=`${i}`,`Invalid prop \`max\` of value \`${r}\` supplied to \`Progress\`. Only numbers greater than 0 are valid max values. Defaulting to \`100\`.`));let u=fw(i)?i:100;null===o||fk(o,u)||console.error((n=`${o}`,`Invalid prop \`value\` of value \`${n}\` supplied to \`Progress\`. The \`value\` prop must be:
|
|
5486
5493
|
- a positive number
|
|
5487
5494
|
- less than the value passed to \`max\` (or 100 if no \`max\` prop is set)
|
|
5488
5495
|
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
5489
5496
|
|
|
5490
|
-
Defaulting to \`null\`.`));let c=fw(o,u)?o:null,d=fy(c)?s(c,u):void 0;return(0,A.jsx)(fd,{scope:a,value:c,max:u,children:(0,A.jsx)(fs.div,{"aria-valuemax":u,"aria-valuemin":0,"aria-valuenow":fy(c)?c:void 0,"aria-valuetext":d,role:"progressbar","data-state":fv(c,u),"data-value":c??void 0,"data-max":u,...l,ref:t})})});fh.displayName=fl;var ff="ProgressIndicator",fg=L.forwardRef((e,t)=>{let{__scopeProgress:r,...n}=e,a=fp(ff,r);return(0,A.jsx)(fs.div,{"data-state":fv(a.value,a.max),"data-value":a.value??void 0,"data-max":a.max,...n,ref:t})});function fm(e,t){return`${Math.round(e/t*100)}%`}function fv(e,t){return null==e?"indeterminate":e===t?"complete":"loading"}function fy(e){return"number"==typeof e}function fb(e){return fy(e)&&!isNaN(e)&&e>0}function fw(e,t){return fy(e)&&!isNaN(e)&&e<=t&&e>=0}function fk({className:e,value:t,max:r=100,...n}){let a=r>0?r:100,o="number"==typeof t?Math.min(Math.max(t/a*100,0),100):0;return(0,A.jsx)(fh,{"data-slot":"progress",className:i2("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),value:t,max:a,...n,children:(0,A.jsx)(fg,{"data-slot":"progress-indicator",className:"h-full bg-primary transition-[width]",style:{width:`${o}%`}})})}function fx(e){return(0,A.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",...e,children:(0,A.jsx)("path",{d:"M8.21723 14.9975C8.10298 14.997 7.99004 14.9731 7.8854 14.9272C7.78077 14.8814 7.68665 14.8145 7.60889 14.7308L3.55889 10.4225C3.4075 10.2611 3.3264 10.0463 3.33343 9.82513C3.34046 9.604 3.43505 9.39471 3.59639 9.24332C3.75773 9.09192 3.97261 9.01082 4.19374 9.01785C4.41488 9.02489 4.62417 9.11948 4.77556 9.28082L8.20889 12.9392L15.2172 5.27248C15.2883 5.18392 15.3768 5.11083 15.4772 5.0577C15.5776 5.00458 15.6878 4.97254 15.8011 4.96355C15.9143 4.95456 16.0282 4.96882 16.1357 5.00544C16.2432 5.04207 16.3421 5.10029 16.4263 5.17652C16.5105 5.25276 16.5782 5.3454 16.6253 5.44877C16.6724 5.55213 16.6979 5.66403 16.7001 5.7776C16.7024 5.89116 16.6815 6.00399 16.6385 6.10916C16.5956 6.21433 16.5316 6.30961 16.4506 6.38915L8.83389 14.7225C8.75686 14.8077 8.66308 14.8761 8.55841 14.9234C8.45373 14.9707 8.34042 14.996 8.22556 14.9975H8.21723Z",fill:"currentColor"})})}function fS(e){return(0,A.jsxs)("svg",{fill:"none",viewBox:"0 0 19.9993 19.9996",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,A.jsx)("path",{d:"M16 9C16 7.14348 15.2629 5.36256 13.9502 4.0498C12.6374 2.73705 10.8565 2 9 2C7.14348 2 5.36256 2.73705 4.0498 4.0498C2.73705 5.36256 2 7.14348 2 9C2 10.8565 2.73705 12.6374 4.0498 13.9502C5.36256 15.2629 7.14348 16 9 16C10.8565 16 12.6374 15.2629 13.9502 13.9502C15.2629 12.6374 16 10.8565 16 9ZM18 9C18 11.3869 17.0521 13.6764 15.3643 15.3643C13.6764 17.0521 11.3869 18 9 18C6.61305 18 4.32357 17.0521 2.63574 15.3643C0.947915 13.6764 0 11.3869 0 9C0 6.61305 0.947915 4.32357 2.63574 2.63574C4.32357 0.947915 6.61305 0 9 0C11.3869 0 13.6764 0.947915 15.3643 2.63574C17.0521 4.32357 18 6.61305 18 9Z",fill:"currentColor"}),(0,A.jsx)("path",{d:"M13.9428 13.943C14.3333 13.5525 14.9663 13.5525 15.3568 13.943L19.7064 18.2926C20.097 18.6832 20.097 19.3162 19.7064 19.7067C19.3159 20.0972 18.6829 20.0972 18.2924 19.7067L13.9428 15.3571C13.5522 14.9666 13.5522 14.3335 13.9428 13.943Z",fill:"currentColor"}),(0,A.jsx)("path",{d:"M7.99983 12.0001V6.00008C7.99983 5.4478 8.44755 5.00008 8.99983 5.00008C9.55211 5.00008 9.99983 5.4478 9.99983 6.00008V12.0001C9.99983 12.5524 9.55211 13.0001 8.99983 13.0001C8.44755 13.0001 7.99983 12.5524 7.99983 12.0001Z",fill:"currentColor"}),(0,A.jsx)("path",{d:"M11.9998 8.00008C12.5521 8.00008 12.9998 8.4478 12.9998 9.00008C12.9998 9.55237 12.5521 10.0001 11.9998 10.0001H5.99983C5.44755 10.0001 4.99983 9.55237 4.99983 9.00008C4.99983 8.4478 5.44755 8.00008 5.99983 8.00008H11.9998Z",fill:"currentColor"})]})}function fC({children:e,className:t,...r}){return(0,A.jsx)("div",{className:i2("relative h-82 w-full overflow-hidden rounded-xl bg-background-base sm:h-100",t),...r,children:e})}function fP({className:e,src:t}){return(0,A.jsxs)(A.Fragment,{children:[t&&(0,A.jsx)("img",{"aria-hidden":"true",className:i2("absolute inset-0 size-full scale-125 object-cover blur-3xl",e),src:t}),(0,A.jsx)("div",{"aria-hidden":"true",className:"absolute inset-0 bg-background-dark/5"})]})}function fE({backdropClassName:e,className:t,fallbackSrc:r,imageClassName:n,photo:a}){let o=a?.src??r;function i(e){r&&(e.currentTarget.src=r)}return(0,A.jsxs)(A.Fragment,{children:[o&&(0,A.jsx)("img",{"aria-hidden":"true",className:i2("absolute inset-0 size-full scale-125 object-cover blur-3xl",t,e),src:o,onError:i}),(0,A.jsx)("div",{"aria-hidden":"true",className:"absolute inset-0 bg-background-dark/5"}),o&&(0,A.jsx)("img",{alt:a?.name??"",className:i2("absolute inset-0 size-full object-contain",t,n),src:o,onError:i})]})}function fT({className:e,fallbackSrc:t,photo:r}){let n=r?.src??t;return(0,A.jsxs)(A.Fragment,{children:[n&&(0,A.jsx)("img",{"aria-hidden":"true",className:i2("absolute inset-0 size-full scale-125 object-cover blur-3xl",e),src:n,onError:e=>{t&&(e.currentTarget.src=t)}}),(0,A.jsx)("div",{"aria-hidden":"true",className:"absolute inset-0 bg-background-dark/20"})]})}function fR({className:e,...t}){let r=(0,L.useId)().replace(/:/g,""),n=`${r}-loading-texture-gradient`,a=`${r}-loading-texture-pattern`,o=`${r}-loading-texture-mask`;return(0,A.jsxs)("svg",{className:i2("text-constant-white",e),fill:"none",focusable:"false",viewBox:"0 0 776 992",xmlns:"http://www.w3.org/2000/svg",...t,children:[(0,A.jsxs)("defs",{children:[(0,A.jsxs)("radialGradient",{id:n,cx:"0",cy:"0",gradientTransform:"translate(388 496) rotate(90) scale(1021)",gradientUnits:"userSpaceOnUse",r:"1",children:[(0,A.jsx)("stop",{stopColor:"currentColor",stopOpacity:"0.7"}),(0,A.jsx)("stop",{offset:"0.586538",stopColor:"currentColor",stopOpacity:"0"})]}),(0,A.jsx)("pattern",{id:a,width:"24",height:"24",patternUnits:"userSpaceOnUse",children:(0,A.jsx)("circle",{cx:"4",cy:"4",r:"4",fill:"currentColor"})}),(0,A.jsx)("mask",{id:o,children:(0,A.jsx)("rect",{width:"776",height:"992",fill:`url(#${a})`})})]}),(0,A.jsx)("rect",{width:"776",height:"992",fill:`url(#${n})`,mask:`url(#${o})`})]})}function fO({animated:e=!1,className:t,...r}){return(0,A.jsxs)("div",{"aria-hidden":"true",className:i2("absolute h-133 w-104 max-w-none",t),...r,children:[!e&&(0,A.jsx)(fR,{className:"absolute inset-0 size-full opacity-30"}),e&&(0,A.jsx)("span",{className:"absolute inset-0 [mask-image:radial-gradient(circle,var(--v-constant-black)_0_36%,transparent_82%)] [mask-position:center] [mask-repeat:no-repeat] [mask-size:18%_18%] [-webkit-mask-image:radial-gradient(circle,var(--v-constant-black)_0_36%,transparent_82%)] [-webkit-mask-position:center] [-webkit-mask-repeat:no-repeat] [-webkit-mask-size:18%_18%] animate-[ai-try-on-loading-texture-pulse_2.6s_linear_infinite] motion-reduce:animate-none motion-reduce:[mask-size:220%_220%] motion-reduce:[-webkit-mask-size:220%_220%]",children:(0,A.jsx)(fR,{className:"absolute inset-0 size-full opacity-70"})})]})}function fj({badge:e,className:t,fallbackSrc:r,photo:n,selected:a,...o}){return(0,A.jsxs)("button",{className:i2("group relative aspect-square w-full overflow-hidden rounded-xl bg-background-base-2 text-left ring-offset-2 transition","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-foreground",a?"ring-2 ring-foreground":null,t),type:"button",...o,children:[n?.src?(0,A.jsx)("img",{alt:n.name??"",className:"size-full object-cover",src:n.src}):r?(0,A.jsx)("img",{alt:"",className:"size-full object-cover",src:r}):null,a&&(0,A.jsx)("span",{className:"absolute right-2 top-2 flex size-7 items-center justify-center rounded-full bg-foreground text-background-containers",children:(0,A.jsx)(fx,{className:"size-4"})}),e&&(0,A.jsx)("span",{className:"absolute right-2 top-2",children:e})]})}function f_({className:e,label:t,progress:r=0,...n}){let a=Math.min(Math.max(r,0),100);return(0,A.jsxs)("div",{className:i2("rounded-xl bg-background-base px-6 py-8",e),...n,children:[(0,A.jsxs)("div",{className:"mb-2 flex items-center justify-between text-sm font-medium text-text-sub",children:[(0,A.jsx)("span",{children:t}),(0,A.jsxs)("span",{children:[Math.round(a),"%"]})]}),(0,A.jsx)(fk,{className:"h-1 bg-background-base-3 [&_[data-slot=progress-indicator]]:bg-background-dark",value:a})]})}function fz({className:e,fallbackSrc:t,photo:r}){let n=r?.src??t;return n?(0,A.jsx)("img",{alt:r?.name??"",className:i2("absolute left-1/2 top-0 h-full w-69 -translate-x-1/2 object-cover",e),src:n,onError:e=>{t&&(e.currentTarget.src=t)}}):null}function fN({className:e,imageSrc:t,name:r}){return t?(0,A.jsx)("img",{alt:r??"",className:i2("absolute bottom-2 left-2 h-30 w-auto rounded-xl border border-background-containers bg-background-containers object-contain shadow-md",e),src:t}):null}function fA({good:e,imageSrc:t,label:r}){return(0,A.jsxs)("figure",{className:"flex min-w-0 flex-col items-start gap-2",children:[(0,A.jsxs)("div",{className:"relative aspect-square w-full overflow-hidden rounded-xl border border-border-light bg-background-base",children:[(0,A.jsx)("img",{alt:r,className:"size-full object-cover",src:t}),(0,A.jsx)("span",{className:i2("absolute right-2 top-2 flex size-7 items-center justify-center rounded-full",e?"bg-background-green":"bg-background-red"),children:e?(0,A.jsx)(fx,{className:"size-5 text-background-containers"}):(0,A.jsx)(fe,{className:"size-5 text-background-containers"})})]}),(0,A.jsx)("figcaption",{className:"w-[90%] break-words text-xs font-medium leading-[1.6] tracking-[0.02em] text-text-base",children:r})]})}function fL({className:e,onOpenComparison:t,productLabel:r,productUrl:n,result:a,zoomLabel:o}){let i="inline-flex h-8 min-w-0 max-w-52 flex-1 items-center justify-center gap-1.5 rounded-xl bg-button-light px-3 text-xs font-semibold text-text-dark";return(0,A.jsxs)(fC,{"aria-label":o,className:i2("block cursor-pointer text-left",e),role:"button",tabIndex:0,onClick:t,onKeyDown:function(e){("Enter"===e.key||" "===e.key)&&(e.preventDefault(),t())},children:[(0,A.jsx)(fE,{photo:a?.after}),(0,A.jsxs)("div",{className:"absolute bottom-2 left-2 right-2 flex items-center justify-between gap-2",children:[n?(0,A.jsxs)("a",{className:i,href:n,onClick:e=>e.stopPropagation(),children:[(0,A.jsx)(fn,{"aria-hidden":"true",className:"size-4"}),(0,A.jsx)("span",{className:"truncate",children:r})]}):(0,A.jsxs)("span",{className:i,children:[(0,A.jsx)(fn,{"aria-hidden":"true",className:"size-4"}),(0,A.jsx)("span",{className:"truncate",children:r})]}),(0,A.jsx)("button",{"aria-label":o,className:"inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-full bg-button-light text-text-dark",type:"button",onClick:e=>{e.stopPropagation(),t()},children:(0,A.jsx)(fS,{"aria-hidden":"true",className:"size-3.5"})})]})]})}function fI({onAddToCart:e,onClose:t,onDeleteResult:r,onSaveResult:n,onShareResult:a,portalContainer:o,productName:i,productPrice:s,productUrl:l,result:u}){var c;let{t:d}=rT(),p=i??d("resultProductLink"),h=(c=s,c?.trim()||void 0),f=h?d("resultTryAnotherWithPrice",{price:h}):d("resultTryAnother");return(0,A.jsx)(sr,{open:!0,onOpenChange:e=>!e&&t(),children:(0,A.jsxs)(so,{className:"dark fixed inset-0 left-0 top-0 flex h-svh max-h-none w-svw max-w-none translate-x-0 translate-y-0 flex-col rounded-none bg-[#212124E5] p-0 text-text-dark duration-200 sm:max-w-none sm:p-0",portalContainer:o,showCloseButton:!1,children:[(0,A.jsxs)(si,{className:"sr-only",children:[(0,A.jsx)(ss,{children:d("comparisonTitle")}),(0,A.jsx)(sl,{children:d("comparisonSlider")})]}),(0,A.jsxs)("div",{className:"flex h-23 shrink-0 items-center justify-between px-8 py-6",children:[l?(0,A.jsx)(i4,{asChild:!0,className:"max-w-80",size:"lg",variant:"outline",children:(0,A.jsxs)("a",{href:l,children:[(0,A.jsx)(fn,{"data-icon":"inline-start"}),(0,A.jsx)("span",{className:"truncate",children:p})]})}):(0,A.jsxs)(i4,{className:"max-w-80",size:"lg",type:"button",variant:"outline",children:[(0,A.jsx)(fn,{"data-icon":"inline-start"}),(0,A.jsx)("span",{className:"truncate",children:p})]}),(0,A.jsx)(i4,{"aria-label":d("close"),size:"icon-lg",type:"button",variant:"outline",onClick:t,children:(0,A.jsx)(fe,{className:"!size-3","data-icon":"inline-start"})})]}),(0,A.jsx)("div",{className:"flex min-h-0 flex-1 items-center justify-center px-8",children:(0,A.jsxs)(h4,{"aria-label":d("comparisonSlider"),className:"h-full max-h-179 w-full max-w-143 bg-background-base-2",children:[(0,A.jsx)(h6,{position:"right",children:(0,A.jsx)(fz,{className:"w-full object-contain",photo:u?.after})}),(0,A.jsx)(h6,{position:"left",children:(0,A.jsx)(fz,{className:"w-full object-contain",photo:u?.before})}),(0,A.jsxs)(h8,{className:"w-11",children:[(0,A.jsx)("div",{className:"absolute left-1/2 h-full w-0.5 -translate-x-1/2 bg-constant-white"}),(0,A.jsx)("div",{className:"flex size-9 items-center justify-center rounded-full bg-constant-white text-constant-black shadow-lg",children:(0,A.jsx)("span",{className:"h-5 w-0.5 rounded-full bg-current"})})]})]})}),(0,A.jsx)("div",{className:"flex h-23 shrink-0 items-center justify-center px-8 pb-6 pt-3",children:(0,A.jsxs)("div",{className:"flex w-full max-w-104 items-start gap-2",children:[(0,A.jsxs)(i4,{className:"min-w-0 flex-1",size:"lg",type:"button",variant:"contrast",onClick:e,children:[(0,A.jsx)(h7,{"data-icon":"inline-start"}),(0,A.jsx)("span",{className:"truncate",children:f})]}),(0,A.jsx)(i4,{"aria-label":d("share"),size:"icon-lg",type:"button",variant:"outline",onClick:a,children:(0,A.jsx)(fa,{"data-icon":"inline-start"})}),(0,A.jsx)(i4,{"aria-label":d("download"),size:"icon-lg",type:"button",variant:"outline",onClick:n,children:(0,A.jsx)(ft,{"data-icon":"inline-start"})}),(0,A.jsx)(i4,{"aria-label":d("reset"),size:"icon-lg",type:"button",variant:"outline",onClick:function(){r()},children:(0,A.jsx)(fr,{"data-icon":"inline-start"})})]})})]})})}fg.displayName=ff;let fM=i5("inline-flex w-fit items-center justify-center overflow-hidden rounded-full whitespace-nowrap",{variants:{variant:{default:"bg-contrast text-contrast-foreground",secondary:"bg-[var(--color-background-gray-transparent)] text-text-base",positive:"bg-[var(--color-background-green-transparent)] text-text-green",negative:"bg-[var(--color-background-red-transparent)] text-text-red",standard:"bg-[var(--color-background-blue-transparent)] text-text-blue"},size:{sm:"h-6 px-2 typo-button-small",md:"h-[30px] px-3 typo-button-normal"}},defaultVariants:{variant:"default",size:"sm"}});function fF({className:e,variant:t,size:r,asChild:n=!1,...a}){return(0,A.jsx)(n?o0:"span",{"data-slot":"badge",className:i2(fM({variant:t,size:r,className:e})),...a})}function fD({className:e,...t}){return(0,A.jsx)("div",{className:i2("flex max-h-svh w-svw flex-col overflow-hidden rounded-t-3xl rounded-b-none bg-background-containers text-foreground shadow-2xl sm:max-h-[min(calc(100svh-var(--spacing)*8),--spacing(176))] sm:w-120 sm:rounded-3xl",e),...t})}function fB({badge:e,badgeTone:t="gray",className:r,closeLabel:n,leftSlot:a,middleSlot:o,onClose:i,preferMiddleSlotFirst:s=!1,showCloseButton:l=!1,...u}){let c=e?(0,A.jsx)(f$,{tone:t,children:e}):null;return(0,A.jsxs)("div",{className:i2("flex h-17 items-center justify-between p-4",r),...u,children:[(0,A.jsxs)("div",{className:"flex items-center gap-2",children:[a,s?o:c,s?c:o]}),l&&(0,A.jsx)(i4,{"aria-label":n,size:"icon",type:"button",variant:"outline",onClick:i,children:(0,A.jsx)(fe,{"data-icon":"inline-start"})})]})}function f$({className:e,tone:t="gray",...r}){return(0,A.jsx)(fF,{className:e,size:"md",variant:"blue"===t?"standard":"green"===t?"positive":"red"===t?"negative":"secondary",...r})}function fV({className:e,...t}){return(0,A.jsx)("div",{className:i2("flex min-h-0 flex-1 flex-col animate-in fade-in-0 duration-100 motion-reduce:animate-none",e),...t})}function fU(e){return(0,A.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...e,children:(0,A.jsx)("path",{d:"M21.1667 8.4C21.1667 8.16131 21.07 7.93245 20.8981 7.76367C20.7262 7.59489 20.4931 7.5 20.25 7.5H16.5833C16.2768 7.5 15.9906 7.3496 15.8206 7.09922L14.2594 4.8H9.74056L8.17936 7.09922C8.00935 7.3496 7.72316 7.5 7.41667 7.5H3.75C3.50688 7.5 3.2738 7.59489 3.10189 7.76367C2.92998 7.93245 2.83333 8.16131 2.83333 8.4V18.3C2.83333 18.5387 2.92998 18.7675 3.10189 18.9363C3.2738 19.1051 3.50689 19.2 3.75 19.2H20.25C20.4931 19.2 20.7262 19.1051 20.8981 18.9363C21.07 18.7675 21.1667 18.5387 21.1667 18.3V8.4ZM14.75 12.9C14.75 12.184 14.46 11.4973 13.9443 10.991C13.4287 10.4847 12.7292 10.2001 12 10.2C11.2707 10.2 10.5705 10.4847 10.0548 10.991C9.53923 11.4973 9.25 12.1841 9.25 12.9C9.25 13.6159 9.53923 14.3027 10.0548 14.809C10.5705 15.3153 11.2707 15.6 12 15.6C12.7292 15.5999 13.4287 15.3153 13.9443 14.809C14.46 14.3027 14.75 13.616 14.75 12.9ZM16.5833 12.9C16.5833 14.0934 16.1 15.2377 15.2406 16.0816C14.3811 16.9255 13.2155 17.3999 12 17.4C10.7844 17.4 9.61809 16.9256 8.75854 16.0816C7.89919 15.2378 7.41667 14.0933 7.41667 12.9C7.41667 11.7067 7.89919 10.5622 8.75854 9.71836C9.61809 8.87445 10.7844 8.4 12 8.4C13.2155 8.40008 14.3811 8.87452 15.2406 9.71836C16.1 10.5623 16.5833 11.7066 16.5833 12.9ZM23 18.3C23 19.0161 22.7101 19.7026 22.1943 20.209C21.6786 20.7153 20.9793 21 20.25 21H3.75C3.02065 21 2.32139 20.7153 1.80566 20.209C1.28994 19.7026 1 19.0161 1 18.3V8.4C1 7.68392 1.28994 6.99736 1.80566 6.49102C2.32139 5.98467 3.02065 5.7 3.75 5.7H6.92611L8.4873 3.40078L8.55623 3.31201C8.72911 3.11535 8.98172 3 9.25 3H14.75L14.8637 3.00703C15.1262 3.03922 15.3639 3.18167 15.5127 3.40078L17.0739 5.7H20.25C20.9793 5.7 21.6786 5.98467 22.1943 6.49102C22.7101 6.99736 23 7.68392 23 8.4V18.3Z",fill:"currentColor"})})}function fH(e){return(0,A.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 5.00342 8.37303",fill:"none",...e,children:(0,A.jsx)("path",{d:"M1 1L4.00342 4.18652L1 7.37303",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function fW(e){return(0,A.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...e,children:[(0,A.jsx)("path",{d:"M18 3H6C5.20435 3 4.44129 3.31607 3.87868 3.87868C3.31607 4.44129 3 5.20435 3 6V18C3 18.7956 3.31607 19.5587 3.87868 20.1213C4.44129 20.6839 5.20435 21 6 21H18C18.7956 21 19.5587 20.6839 20.1213 20.1213C20.6839 19.5587 21 18.7956 21 18V6C21 5.20435 20.6839 4.44129 20.1213 3.87868C19.5587 3.31607 18.7956 3 18 3ZM6 5H18C18.2652 5 18.5196 5.10536 18.7071 5.29289C18.8946 5.48043 19 5.73478 19 6V14.36L15.8 11.63C15.3042 11.222 14.6821 10.999 14.04 10.999C13.3979 10.999 12.7758 11.222 12.28 11.63L5 17.7V6C5 5.73478 5.10536 5.48043 5.29289 5.29289C5.48043 5.10536 5.73478 5 6 5ZM18 19H6.56L13.56 13.16C13.6945 13.0602 13.8575 13.0062 14.025 13.0062C14.1925 13.0062 14.3555 13.0602 14.49 13.16L19 17V18C19 18.2652 18.8946 18.5196 18.7071 18.7071C18.5196 18.8946 18.2652 19 18 19Z",fill:"currentColor"}),(0,A.jsx)("path",{d:"M7.99983 9.99992C8.39766 9.99992 8.77919 9.84188 9.06049 9.56058C9.34179 9.27927 9.49983 8.89774 9.49983 8.49992C9.49983 8.10209 9.34179 7.72056 9.06049 7.43925C8.77919 7.15795 8.39766 6.99992 7.99983 6.99992C7.60201 6.99992 7.22047 7.15795 6.93917 7.43925C6.65787 7.72056 6.49983 8.10209 6.49983 8.49992C6.49983 8.89774 6.65787 9.27927 6.93917 9.56058C7.22047 9.84188 7.60201 9.99992 7.99983 9.99992Z",fill:"currentColor"})]})}function fq(e){return(0,A.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...e,children:(0,A.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18 3C18.7956 3 19.5585 3.3163 20.1211 3.87891C20.6837 4.44152 21 5.20435 21 6V18C21 18.7956 20.6837 19.5585 20.1211 20.1211C19.5585 20.6837 18.7956 21 18 21H6C5.20435 21 4.44152 20.6837 3.87891 20.1211C3.3163 19.5585 3 18.7956 3 18V6C3 5.20435 3.3163 4.44152 3.87891 3.87891C4.44152 3.3163 5.20435 3 6 3H18ZM14.0352 12C13.8633 12 13.6974 12.0639 13.5703 12.1797L6 19H18C18.2876 18.977 18.5547 18.8414 18.7422 18.6221C18.9296 18.4028 19.0221 18.1177 19 17.8301V16.6602L14.5 12.1797C14.3729 12.0639 14.2071 12 14.0352 12ZM8 7C7.60218 7 7.22076 7.15815 6.93945 7.43945C6.65815 7.72076 6.5 8.10218 6.5 8.5C6.5 8.89782 6.65815 9.27924 6.93945 9.56055C7.22076 9.84185 7.60218 10 8 10C8.39782 10 8.77924 9.84185 9.06055 9.56055C9.34185 9.27924 9.5 8.89782 9.5 8.5C9.5 8.10218 9.34185 7.72076 9.06055 7.43945C8.77924 7.15815 8.39782 7 8 7Z",fill:"currentColor"})})}function fK(e){return(0,A.jsx)("svg",{fill:"none",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,A.jsx)("path",{d:"M6.05944 11.1406C6.47507 8.23438 8.97819 6 12.0001 6C13.6563 6 15.1563 6.67187 16.2438 7.75625L16.2626 7.775L16.5001 8H15.0032C14.4501 8 14.0032 8.44687 14.0032 9C14.0032 9.55313 14.4501 10 15.0032 10H19.0032C19.5563 10 20.0032 9.55313 20.0032 9V5C20.0032 4.44688 19.5563 4 19.0032 4C18.4501 4 18.0032 4.44688 18.0032 5V6.66875L17.6501 6.33437C16.2032 4.89375 14.2032 4 12.0001 4C7.96882 4 4.63444 6.98125 4.08132 10.8594C4.00319 11.4062 4.38132 11.9125 4.92819 11.9906C5.47507 12.0688 5.98132 11.6875 6.05944 11.1438V11.1406ZM19.9188 13.1406C19.9969 12.5938 19.6157 12.0875 19.0719 12.0094C18.5282 11.9312 18.0188 12.3125 17.9407 12.8562C17.5251 15.7625 15.0219 17.9969 12.0001 17.9969C10.3438 17.9969 8.84382 17.325 7.75632 16.2406L7.73757 16.2219L7.50007 15.9969H8.99694C9.55007 15.9969 9.99694 15.55 9.99694 14.9969C9.99694 14.4437 9.55007 13.9969 8.99694 13.9969L5.00007 14C4.73444 14 4.47819 14.1063 4.29069 14.2969C4.10319 14.4875 3.99694 14.7406 4.00007 15.0094L4.03132 18.9781C4.03444 19.5312 4.48757 19.975 5.04069 19.9688C5.59382 19.9625 6.03757 19.5125 6.03132 18.9594L6.01882 17.35L6.35319 17.6656C7.80007 19.1062 9.79694 20 12.0001 20C16.0313 20 19.3657 17.0187 19.9188 13.1406Z",fill:"currentColor"})})}function fG({className:e,...t}){return(0,A.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",className:i2("size-6",e),...t,children:[(0,A.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.0625 1.70412C12.1393 1.70359 12.2136 1.7151 12.2842 1.73439C12.6576 1.76978 13.0261 1.88527 13.3604 2.08303L19.7012 5.84084L19.7031 5.84181C20.1036 6.08032 20.4348 6.42322 20.665 6.83498C20.8952 7.24671 21.0168 7.71415 21.0166 8.19142V8.19338L20.998 15.7403C20.9979 16.1352 20.9124 16.526 20.751 16.8848C20.7319 16.9557 20.7049 17.026 20.667 17.0928C20.6355 17.1482 20.5983 17.1987 20.5576 17.2442C20.3296 17.6 20.023 17.8979 19.6631 18.1133L13.2998 21.9072C12.4738 22.3996 11.4611 22.4004 10.6436 21.917L10.6416 21.916L4.30078 18.1582L4.29883 18.1572C3.91023 17.9258 3.58764 17.5957 3.3584 17.2002C3.35105 17.1885 3.34181 17.1773 3.33496 17.1651C3.32803 17.1526 3.32268 17.1387 3.31641 17.126C3.09976 16.7236 2.98517 16.2703 2.98535 15.8076V15.8057L3.00391 8.25588C3.00603 7.28279 3.51293 6.37777 4.33984 5.88478L10.7021 2.09181C11.0682 1.87369 11.4708 1.75231 11.877 1.72658C11.9365 1.71245 11.999 1.70462 12.0625 1.70412ZM5.16895 7.36818C4.87108 7.54583 4.6844 7.87497 4.68359 8.23635L4.66602 15.3838L9.45801 12.5254C9.51085 12.7718 9.60256 13.0142 9.73535 13.2442C9.90127 13.5315 10.1161 13.7727 10.3633 13.9639L5.49512 16.8662L11.499 20.4248C11.8036 20.6044 12.1738 20.6008 12.4707 20.4238L18.5107 16.8233L13.4971 13.877C13.9543 13.482 14.2391 12.9423 14.3242 12.3672L19.3193 15.3037L19.3379 8.21291L19.3369 8.21388C19.3369 8.03517 19.2923 7.85955 19.2061 7.7051C19.1196 7.55056 18.9947 7.42151 18.8447 7.33205L12.8887 3.80275L12.8535 9.73439C12.3304 9.51037 11.7366 9.46806 11.1738 9.63576L11.21 3.76662L5.16895 7.36818Z",fill:"currentColor"}),(0,A.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.91641 8.60885C11.7928 7.52595 14.1912 8.16845 15.2748 10.0444C16.3582 11.9209 15.7156 14.3211 13.8393 15.4047C11.9627 16.4879 9.56339 15.8446 8.47989 13.9682C7.39671 12.0916 8.03987 9.69227 9.91641 8.60885ZM13.8031 10.894C13.189 9.83118 11.8293 9.46704 10.766 10.0805C9.7026 10.6945 9.33693 12.0551 9.95059 13.1186C10.5646 14.1821 11.9261 14.5469 12.9897 13.9331C14.0529 13.3189 14.4171 11.9575 13.8031 10.894Z",fill:"currentColor"})]})}let fX={privacy:"https://vizbl.com/legal/privacy-policy",terms:"https://vizbl.com/legal/terms-of-use"},fY={privacy:"https://arizo.ru/privacy-policy/",terms:"https://arizo.ru/terms-of-use/"},fQ={bag:{cards:[{good:!0,imageSrc:ou,labelKey:"bagIntroGoodFullBody"},{good:!0,imageSrc:ol,labelKey:"bagIntroGoodAngle"},{good:!1,imageSrc:os,labelKey:"bagIntroBadHandsFull"},{good:!1,imageSrc:oi,labelKey:"bagIntroBadCropped"}],subtitleKey:"bagIntroSubtitle",titleKey:"bagIntroTitle"},eyewear:{cards:[{good:!0,imageSrc:op,labelKey:"eyewearIntroGoodFacingCamera"},{good:!0,imageSrc:oh,labelKey:"eyewearIntroGoodHairBack"},{good:!1,imageSrc:od,labelKey:"eyewearIntroBadWearingGlasses"},{good:!1,imageSrc:oc,labelKey:"eyewearIntroBadFaceTurned"}],subtitleKey:"eyewearIntroSubtitle",titleKey:"eyewearIntroTitle"},footwear:{cards:[{good:!0,imageSrc:ov,labelKey:"footwearIntroGoodStanding"},{good:!0,imageSrc:om,labelKey:"footwearIntroGoodKneesDown"},{good:!1,imageSrc:og,labelKey:"footwearIntroBadOneFootCropped"},{good:!1,imageSrc:of,labelKey:"footwearIntroBadFeetHidden"}],subtitleKey:"footwearIntroSubtitle",titleKey:"footwearIntroTitle"},"full-body":{cards:[{good:!0,imageSrc:ok,labelKey:"fullBodyIntroGoodHeadToToe"},{good:!0,imageSrc:ow,labelKey:"fullBodyIntroGoodAngle"},{good:!1,imageSrc:oy,labelKey:"fullBodyIntroBadCropped"},{good:!1,imageSrc:ob,labelKey:"fullBodyIntroBadSitting"}],subtitleKey:"fullBodyIntroSubtitle",titleKey:"fullBodyIntroTitle"},headwear:{cards:[{good:!0,imageSrc:oP,labelKey:"headwearIntroGoodFront"},{good:!0,imageSrc:oC,labelKey:"headwearIntroGoodAngle"},{good:!1,imageSrc:oS,labelKey:"headwearIntroBadWearingHat"},{good:!1,imageSrc:ox,labelKey:"headwearIntroBadCroppedHead"}],subtitleKey:"headwearIntroSubtitle",titleKey:"headwearIntroTitle"},"lower-body":{cards:[{good:!0,imageSrc:oO,labelKey:"lowerBodyIntroGoodWaistToFeet"},{good:!0,imageSrc:oR,labelKey:"lowerBodyIntroGoodFullBody"},{good:!1,imageSrc:oT,labelKey:"lowerBodyIntroBadSitting"},{good:!1,imageSrc:oE,labelKey:"lowerBodyIntroBadCoveredWaist"}],subtitleKey:"lowerBodyIntroSubtitle",titleKey:"lowerBodyIntroTitle"},neck:{cards:[{good:!0,imageSrc:oz,labelKey:"neckIntroGoodHairUp"},{good:!0,imageSrc:oN,labelKey:"neckIntroGoodOpenNeckline"},{good:!1,imageSrc:oj,labelKey:"neckIntroBadHairCovering"},{good:!1,imageSrc:o_,labelKey:"neckIntroBadHighCollar"}],subtitleKey:"neckIntroSubtitle",titleKey:"neckIntroTitle"},"upper-body":{cards:[{good:!0,imageSrc:oM,labelKey:"upperBodyIntroGoodFacingCamera"},{good:!0,imageSrc:oI,labelKey:"upperBodyIntroGoodAngle"},{good:!1,imageSrc:oA,labelKey:"upperBodyIntroBadArmsCrossed"},{good:!1,imageSrc:oL,labelKey:"upperBodyIntroBadObjectBlockingTorso"}],subtitleKey:"upperBodyIntroSubtitle",titleKey:"upperBodyIntroTitle"},waist:{cards:[{good:!0,imageSrc:oB,labelKey:"waistIntroGoodFullBody"},{good:!0,imageSrc:o$,labelKey:"waistIntroGoodTopTucked"},{good:!1,imageSrc:oF,labelKey:"waistIntroBadOversizedTop"},{good:!1,imageSrc:oD,labelKey:"waistIntroBadSitting"}],subtitleKey:"waistIntroSubtitle",titleKey:"waistIntroTitle"},wrist:{cards:[{good:!0,imageSrc:oH,labelKey:"wristIntroGoodCloseUp"},{good:!0,imageSrc:oW,labelKey:"wristIntroGoodSleeveBack"},{good:!1,imageSrc:oV,labelKey:"wristIntroBadClenchedFist"},{good:!1,imageSrc:oU,labelKey:"wristIntroBadCovered"}],subtitleKey:"wristIntroSubtitle",titleKey:"wristIntroTitle"}};function fZ({view:e}){let{t}=rT(),r=fQ[e.productType];return(0,A.jsxs)(f6,{title:t("startTitle"),subtitle:t(r.titleKey),children:[(0,A.jsxs)(fC,{className:"mt-3",children:[(0,A.jsx)(fP,{src:e.productImageSrc}),(0,A.jsx)(fz,{fallbackSrc:e.productImageSrc})]}),(0,A.jsxs)(f8,{className:"mt-4",children:[(0,A.jsxs)(i4,{className:"w-full",size:"lg",type:"button",variant:"contrast",onClick:e.choosePhoto,children:[(0,A.jsx)(fU,{"data-icon":"inline-start"}),t("startUpload")]}),(0,A.jsxs)(i4,{className:"w-full",disabled:!e.canOpenHistory,size:"lg",type:"button",variant:"outline",onClick:e.openHistory,children:[(0,A.jsx)(fq,{"data-icon":"inline-start"}),t("startHistory")]}),(0,A.jsx)(f7,{})]})]})}function fJ({view:e}){let{t}=rT(),r=fQ[e.productType];return(0,A.jsxs)(f6,{title:t(r.titleKey),subtitle:t(r.subtitleKey),children:[(0,A.jsx)("div",{className:"mt-4 grid grid-cols-2 gap-3 sm:gap-4",children:r.cards.map(e=>(0,A.jsx)(fA,{good:e.good,imageSrc:e.imageSrc,label:t(e.labelKey)},e.labelKey))}),(0,A.jsx)("div",{className:"mt-4",children:(0,A.jsx)(i4,{className:"w-full",size:"lg",type:"button",variant:"contrast",onClick:e.continueIntro,children:t("introCta")})})]})}function f0({view:e}){let{t}=rT();return(0,A.jsxs)(f6,{title:t("historyTitle"),subtitle:t("historySubtitle"),children:[(0,A.jsx)("div",{className:"mt-3 grid min-h-104 flex-1 grid-cols-3 content-start gap-x-3 gap-y-4 overflow-x-hidden overflow-y-auto overscroll-contain pb-2 sm:gap-4",children:e.history.map(r=>(0,A.jsx)(fj,{"aria-label":r.after.name??t("historyPhoto"),photo:r.after,onClick:()=>e.selectResult(r.id)},r.id))}),(0,A.jsxs)(f8,{className:"mt-4",children:[(0,A.jsxs)(i4,{className:"w-full",size:"lg",type:"button",variant:"contrast",onClick:e.chooseNew,children:[(0,A.jsx)(fW,{"data-icon":"inline-start"}),t("historyUploadNew")]}),(0,A.jsx)(f7,{})]})]})}function f1({view:e}){let{t}=rT();return(0,A.jsxs)(f6,{title:t("confirmTitle"),subtitle:t("confirmSubtitle"),children:[(0,A.jsxs)(fC,{className:"mt-3",children:[(0,A.jsx)(fE,{fallbackSrc:e.productImageSrc,photo:e.photo}),(0,A.jsx)(fN,{className:"bottom-2 left-2",imageSrc:e.productImageSrc,name:e.productName})]}),(0,A.jsxs)(f8,{className:"mt-4",children:[(0,A.jsxs)(i4,{className:"w-full",size:"lg",type:"button",variant:"contrast",onClick:e.generate,children:[(0,A.jsx)(fG,{"data-icon":"inline-start"}),t("confirmGenerate")]}),(0,A.jsxs)(i4,{className:"w-full",size:"lg",type:"button",variant:"outline",onClick:e.changePhoto,children:[(0,A.jsx)(fK,{"data-icon":"inline-start"}),t("confirmChangePhoto")]}),(0,A.jsx)(f7,{})]})]})}function f2({view:e}){let{t}=rT();return(0,A.jsxs)(f6,{title:t("processingTitle"),subtitle:t("processingSubtitle"),children:[(0,A.jsxs)(fC,{className:"mt-3",children:[(0,A.jsx)(fT,{fallbackSrc:e.productImageSrc,photo:e.photo}),(0,A.jsx)(fO,{animated:!0,className:"left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2"}),(0,A.jsxs)("div",{className:"absolute inset-0 flex items-center justify-center gap-2",children:[(0,A.jsx)("div",{className:"size-32 overflow-hidden rounded-xl border border-constant-white shadow-md sm:size-37.5",children:(0,A.jsx)("img",{alt:e.productName,className:"size-full object-cover",src:e.productImageSrc})}),(0,A.jsx)("div",{className:"size-32 overflow-hidden rounded-xl border border-constant-white sm:size-37.5",children:e.photo?.src?(0,A.jsx)("img",{alt:"",className:"size-full object-cover",src:e.photo.src}):null})]})]}),(0,A.jsx)(f_,{className:"mt-4",label:t("processingProgress"),progress:e.processingProgress})]})}function f3({view:e}){let{t}=rT();return(0,A.jsxs)(f6,{title:t("errorTitle"),subtitle:t("errorSubtitle"),children:[(0,A.jsxs)(fC,{className:"mt-3",children:[(0,A.jsx)(fT,{fallbackSrc:e.productImageSrc,photo:e.photo}),(0,A.jsx)(fO,{className:"left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2"}),(0,A.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-6 px-6 sm:px-12",children:[(0,A.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,A.jsx)("div",{className:"size-32 overflow-hidden rounded-xl border border-constant-white bg-background-containers shadow-md sm:size-37.5",children:(0,A.jsx)("img",{alt:e.productName,className:"size-full object-cover",src:e.productImageSrc})}),(0,A.jsx)("div",{className:"size-32 overflow-hidden rounded-xl border border-constant-white sm:size-37.5",children:e.photo?.src?(0,A.jsx)("img",{alt:e.photo.name??"",className:"size-full object-cover",src:e.photo.src,onError:t=>{t.currentTarget.src=e.productImageSrc}}):null})]}),(0,A.jsx)("p",{className:"w-56 text-center text-xs font-medium tracking-wider text-constant-white",children:t("errorGuidance")})]})]}),(0,A.jsxs)(f8,{className:"mt-4",children:[(0,A.jsxs)(i4,{className:"w-full",size:"lg",type:"button",variant:"contrast",onClick:e.retry,children:[(0,A.jsx)(fG,{"data-icon":"inline-start"}),t("errorRetry")]}),(0,A.jsxs)(i4,{className:"w-full",size:"lg",type:"button",variant:"outline",onClick:e.chooseDifferentPhoto,children:[(0,A.jsx)(fK,{"data-icon":"inline-start"}),t("errorDifferentPhoto")]}),(0,A.jsx)(f7,{className:"text-text-sub"})]})]})}function f5({view:e}){let{t}=rT(),r=ge(e.productPrice),n=r?t("resultTryAnotherWithPrice",{price:r}):t("resultTryAnother");return e.myFitsOpen?(0,A.jsx)("div",{className:"min-h-0 flex-1 overflow-x-hidden overflow-y-auto overscroll-contain pb-4",children:(0,A.jsx)("div",{className:"flex flex-col gap-4 px-6 pb-2 pt-4 sm:px-8",children:e.resultHistory.map((t,r)=>(0,A.jsx)(f9,{compact:r>0,onAddToCart:e.addToCart,productName:t.productName??e.productName,productPrice:t.productPrice,productUrl:t.productUrl??e.productUrl,result:t,onDeleteResult:e.deleteResult,onOpenComparison:e.openComparison,onSaveResult:e.saveResult,onShareResult:e.shareResult},t.id??t.after.id))})}):(0,A.jsxs)(f6,{className:"pb-6",subtitle:void 0,title:t("resultTitle"),children:[(0,A.jsx)(fL,{className:"mt-6",productLabel:e.productName??t("resultProductLink"),productUrl:e.productUrl,zoomLabel:t("resultOpenComparison"),result:e.result,onOpenComparison:()=>e.openComparison(e.result?.id)}),(0,A.jsxs)(f8,{className:"mt-4",children:[(0,A.jsxs)(i4,{className:"w-full",size:"lg",type:"button",variant:"contrast",onClick:e.addToCart,children:[(0,A.jsx)(h7,{"data-icon":"inline-start"}),n]}),(0,A.jsxs)("div",{className:"grid grid-cols-3 gap-2",children:[(0,A.jsxs)(i4,{type:"button",variant:"outline",onClick:e.changePhoto,children:[(0,A.jsx)(fK,{"data-icon":"inline-start"}),t("resultCompare")]}),(0,A.jsxs)(i4,{type:"button",variant:"outline",onClick:()=>e.shareResult(e.result?.id),children:[(0,A.jsx)(fa,{"data-icon":"inline-start"}),t("resultShare")]}),(0,A.jsxs)(i4,{type:"button",variant:"outline",onClick:()=>e.saveResult(e.result?.id),children:[(0,A.jsx)(ft,{"data-icon":"inline-start"}),t("resultReset")]})]})]})]})}function f9({compact:e=!1,onAddToCart:t,onDeleteResult:r,onOpenComparison:n,onSaveResult:a,onShareResult:o,productName:i,productPrice:s,productUrl:l,result:u}){let{t:c}=rT(),d=i??c("resultProductLink"),p=ge(s),h=p?c("resultTryAnotherWithPrice",{price:p}):c("resultTryAnother");return(0,A.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,A.jsx)(fL,{productLabel:d,productUrl:l,zoomLabel:c("resultOpenComparison"),result:u,onOpenComparison:()=>n(u.id)}),(0,A.jsxs)("div",{className:"flex gap-2",children:[(0,A.jsxs)(i4,{className:"min-w-0 flex-1",size:"default",type:"button",variant:"contrast",onClick:t,children:[(0,A.jsx)(h7,{"data-icon":"inline-start"}),(0,A.jsx)("span",{className:"truncate",children:h})]}),(0,A.jsx)(i4,{"aria-label":c("share"),size:"icon",type:"button",variant:"outline",onClick:()=>o(u.id),children:(0,A.jsx)(fa,{"data-icon":"inline-start"})}),(0,A.jsx)(i4,{"aria-label":c("download"),size:"icon",type:"button",variant:"outline",onClick:()=>a(u.id),children:(0,A.jsx)(ft,{"data-icon":"inline-start"})}),!e&&(0,A.jsx)(i4,{"aria-label":c("reset"),size:"icon",type:"button",variant:"outline",onClick:()=>r(u.id),children:(0,A.jsx)(fr,{"data-icon":"inline-start"})})]})]})}function f4({label:e,onClick:t}){return(0,A.jsx)(i4,{"aria-label":e,size:"icon",type:"button",variant:"outline",onClick:t,children:(0,A.jsx)(fH,{className:"rotate-180 !size-3","data-icon":"inline-start"})})}function f6({children:e,className:t,subtitle:r,title:n}){return(0,A.jsxs)("div",{className:i2("flex min-h-0 flex-1 flex-col overflow-x-hidden overflow-y-auto overscroll-contain px-6 pb-5 sm:px-8",t),children:[(0,A.jsxs)("div",{className:"mb-1 flex flex-col gap-1",children:[(0,A.jsx)("h2",{className:"text-2xl font-medium tracking-tight text-text-dark",children:n}),r&&(0,A.jsx)("p",{className:"text-sm font-medium text-text-base",children:r})]}),e]})}function f8({children:e,className:t}){return(0,A.jsx)("div",{className:i2("flex flex-col gap-2",t),children:e})}function f7({className:e}){var t;let{i18n:r,t:n}=rT(),a=(t=r.resolvedLanguage??r.language,t?.startsWith("ru")?fY:fX);return(0,A.jsxs)("p",{className:i2("pt-1 text-center text-xs font-medium text-text-base",e),children:[n("termsPrefix")," ",(0,A.jsx)("a",{className:"underline underline-offset-2",href:a.terms,rel:"noopener noreferrer",target:"_blank",children:n("termsLink")})," ",n("termsJoiner")," ",(0,A.jsx)("a",{className:"underline underline-offset-2",href:a.privacy,rel:"noopener noreferrer",target:"_blank",children:n("privacyLink")})]})}function ge(e){return e?.trim()||void 0}function gt(e){return"string"==typeof e?e.trim():""}function gr(e){if(e)return e;if("function"==typeof fetch)return fetch;throw Error("Fetch API is not available for AI try-on image upload")}async function gn(e,t,r){let n=await gr(r)(e,{body:t,method:"PUT"});if(!n.ok){let e=await n.text().catch(()=>"");throw Error(`Nano Banana image upload failed with status ${n.status}${e?`: ${e}`:""}`)}}async function ga(e,t){let r=e?.trim();return r?gi(r,t,"AI try-on product image fetch failed"):null}async function go(e,t){return e.blob?e.blob:e.file?e.file:e.src?gi(e.src,t,"AI try-on source photo fetch failed"):null}async function gi(e,t,r){let n=await gr(t)(e);if(!n.ok){let e=await n.text().catch(()=>"");throw Error(`${r} with status ${n.status}${e?`: ${e}`:""}`)}return n.blob()}async function gs(e){if(e instanceof Blob)return e.type?e:new Blob([e],{type:"image/jpeg"});if(e instanceof ArrayBuffer||"string"==typeof e)return new Blob([e],{type:"image/jpeg"});throw Error("AI try-on generation did not return an image")}let gl="ai-try-on-result";async function gu(e,t={}){let r=await gd(e,t.fetch),n=t.document??globalThis.document;if(!r||!n?.body)return!1;let a=t.createObjectUrl??gh,o=t.revokeObjectUrl??gf,i=a(r);if(!i)return!1;let s=n.createElement("a");return s.href=i,s.download=gp(r,e,t.filename),s.style.display="none",n.body.appendChild(s),s.click(),s.remove(),o(i),!0}async function gc(e,t={}){let r=await gd(e,t.fetch),n=t.navigator??globalThis.navigator;if(!r)return!1;if("function"==typeof File&&"function"==typeof n?.share){let a={files:[new File([r],gp(r,e,t.filename),{type:r.type||e?.type||"image/png"})]};if("function"!=typeof n.canShare||n.canShare(a))try{return await n.share(a),!0}catch(e){if("u">typeof DOMException&&e instanceof DOMException&&"AbortError"===e.name)return!1}}return gu(e,t)}async function gd(e,t=globalThis.fetch){if(!e)return null;if(e.blob)return e.blob;if(e.file)return e.file;if(!e.src||"function"!=typeof t)return null;try{let r=await t(e.src);if(!r.ok)return null;return r.blob()}catch{return null}}function gp(e,t,r=gl){var n;let a=function(e){switch(e){case"image/jpeg":return"jpg";case"image/png":return"png";case"image/webp":return"webp";case"image/gif":return"gif";case"image/svg+xml":return"svg";default:return null}}(e.type||t?.type)??(n=t?.name,n?.match(/\.([a-z0-9]+)$/i)?.[1]?.toLowerCase()??null)??"png",o=r.replace(/\.[a-z0-9]+$/i,"").replace(/[^\w-]+/g,"-").replace(/^-+|-+$/g,"")||gl;return`${o}.${a}`}function gh(e){return"function"==typeof URL.createObjectURL?URL.createObjectURL(e):""}function gf(e){"function"==typeof URL.revokeObjectURL&&URL.revokeObjectURL(e)}let gg="results";function gm(){return void 0===globalThis.indexedDB?null:globalThis.indexedDB}function gv(e){return new Promise((t,r)=>{let n=e.open("neurodyn-ai-try-on",1);n.onupgradeneeded=()=>{let e=n.result;e.objectStoreNames.contains(gg)||e.createObjectStore(gg,{keyPath:"id"}).createIndex("createdAt","createdAt")},n.onerror=()=>r(n.error),n.onsuccess=()=>t(n.result)})}function gy(e){return new Promise((t,r)=>{e.onabort=()=>r(e.error),e.onerror=()=>r(e.error),e.oncomplete=()=>t()})}async function gb(e){return{after:await gw(e.after),before:await gw(e.before),createdAt:e.createdAt,id:e.id,productImageSrc:e.productImageSrc,productName:e.productName,productPrice:e.productPrice,productUrl:e.productUrl}}async function gw(e){let t=await gk(e);if(!t)throw Error("AI try-on photo cannot be persisted without image data");return{blob:t,id:e.id,lastModified:e.file?.lastModified??e.lastModified,name:e.name,size:t.size,type:t.type||e.type}}async function gk(e){if(e.blob)return e.blob;if(e.file)return e.file;if(!e.src||"function"!=typeof fetch)return null;try{let t=await fetch(e.src);return t.ok?t.blob():null}catch{return null}}function gx(e){return`neurodyn_ai_try_on_seen_tip:${e}`}function gS(e,t=gC()){if(t)try{t.setItem(gx(e),"true")}catch{}}function gC(){try{return void 0===globalThis.localStorage?null:globalThis.localStorage}catch{return null}}let gP={delete:async function e(e){let t=gm();if(!t)return!1;try{let r=await gv(t),n=r.transaction(gg,"readwrite"),a=gy(n);return n.objectStore(gg).delete(e),await a,r.close(),!0}catch(e){throw Error("AI try-on result could not be removed from history",{cause:e})}},list:async function e(){let e=gm();if(!e)return[];try{var t;let r=await gv(e),n=r.transaction(gg,"readonly"),a=gy(n),o=await (t=n.objectStore(gg).getAll(),new Promise((e,r)=>{t.onerror=()=>r(t.error),t.onsuccess=()=>e(t.result)}));return await a,r.close(),o.sort((e,t)=>t.createdAt-e.createdAt)}catch(e){throw Error("AI try-on history could not be loaded",{cause:e})}},save:async function e(e){let t=gm();if(!t)return!1;try{let r=await gb(e),n=await gv(t),a=n.transaction(gg,"readwrite"),o=gy(a);return a.objectStore(gg).put(r),await o,n.close(),!0}catch(e){throw Error("AI try-on result could not be saved to history",{cause:e})}}},gE={save:gu,share:gc},gT={consumeFirstView:function(e,t=gC()){return!function(e,t=gC()){if(!t)return!1;try{return"true"===t.getItem(gx(e))}catch{return!1}}(e,t)&&(gS(e,t),!0)},markSeen:gS},gR={createObjectUrl:e=>"function"==typeof URL.createObjectURL?URL.createObjectURL(e):"",revokeObjectUrl:e=>{"function"==typeof URL.revokeObjectURL&&URL.revokeObjectURL(e)}},gO=["image/jpeg","image/png"];class gj{createObjectUrl;tipStore;state;constructor({createObjectUrl:e,productImageSrc:t,productName:r,productPrice:n,productType:a,productUrl:o,tipStore:i}){this.createObjectUrl=e,this.tipStore=i,this.state={comparisonOpen:!1,comparisonResultId:null,error:null,generationProduct:null,history:[],myFitsOpen:!1,processingProgress:0,productImageSrc:t,productName:r,productPrice:g_(n),productType:a,productUrl:o,result:null,selectedPhoto:null,stage:"start"}}get view(){switch(this.state.stage){case"intro":return{productType:this.state.productType,stage:"intro"};case"history":return{history:this.state.history,stage:"history"};case"confirm":return{photo:this.state.selectedPhoto,productImageSrc:this.state.productImageSrc,productName:this.state.productName,stage:"confirm"};case"processing":return this.createProcessingView();case"error":return this.createErrorView();case"result":return{canOpenMyFits:this.state.history.length>0,myFitsOpen:this.state.myFitsOpen,productName:this.state.result?.productName??this.state.productName,productPrice:this.state.result?g_(this.state.result.productPrice):this.state.productPrice,productUrl:this.state.result?.productUrl??this.state.productUrl,result:this.state.result,resultHistory:function(e,t){if(!e)return[];let r=[e,...t.filter(t=>t.id!==e.id)];return r.filter((e,t)=>{let n=e.id??e.after.id;return r.findIndex(e=>(e.id??e.after.id)===n)===t})}(this.state.result,this.state.history),stage:"result"};default:return{canOpenHistory:this.state.history.length>0,productImageSrc:this.state.productImageSrc,productName:this.state.productName,productType:this.state.productType,productUrl:this.state.productUrl,stage:"start"}}}get comparison(){let e=this.getComparisonResult();return{open:this.state.comparisonOpen&&null!==e,productName:e?.productName??this.state.productName,productPrice:e?g_(e.productPrice):this.state.productPrice,productUrl:e?.productUrl??this.state.productUrl,result:e}}get selectedPhoto(){return this.state.selectedPhoto}get history(){return this.state.history}updateProduct({productImageSrc:e,productName:t,productPrice:r,productType:n,productUrl:a}){this.state={...this.state,productImageSrc:e,productName:t,productPrice:g_(r),productType:n,productUrl:a}}hydrateHistory(e){this.state={...this.state,error:null,history:[...e,...this.state.history].reduce((e,t)=>gz(e,t),[])}}failHistory(e,t){this.state={...this.state,error:{kind:"hydrate-history"===e?"history-load":"save-result"===e?"history-save":"history-delete",message:t}}}choosePhoto(){return this.tipStore.consumeFirstView(this.state.productType)?(this.state={...this.state,stage:"intro"},null):{type:"request-file-input"}}continueIntro(){return this.tipStore.markSeen(this.state.productType),{type:"request-file-input"}}requestClose(){return"intro"===this.state.stage?(this.tipStore.markSeen(this.state.productType),this.goBack(),null):{type:"close-dialog"}}openHistory(){0!==this.state.history.length&&(this.state={...this.state,stage:"history"})}goBack(){switch(this.state.stage){case"intro":case"history":this.state={...this.state,stage:"start"};return;case"confirm":this.state={...this.state,stage:this.state.history.length>0?"history":"start"};return;case"processing":case"error":case"result":this.state={...this.state,stage:"confirm"}}}reset(){this.state={...this.state,comparisonOpen:!1,comparisonResultId:null,error:null,generationProduct:null,myFitsOpen:!1,processingProgress:0,result:null,selectedPhoto:null,stage:"start"}}selectHistoryResult(e){let t=this.state.history.find(t=>t.id===e);t&&(this.state={...this.state,error:null,myFitsOpen:!1,result:t,selectedPhoto:t.before,stage:"result"})}selectFile(e){var t,r;let n=(t=e,gO.includes(t.type)||""===t.type&&/\.(?:jpe?g|png)$/i.test(t.name)?t.size>0xa00000?"file-too-large":null:"unsupported-file-format");if(n)return this.state={...this.state,error:{code:n,kind:"upload-validation"},myFitsOpen:!1,processingProgress:0,result:null,selectedPhoto:null,stage:"error"},null;let a=this.createObjectUrl(e),o={blob:e,file:e,id:(r=e,`${r.name}-${r.size}-${r.lastModified}`),lastModified:e.lastModified,name:e.name,size:e.size,src:a,type:e.type};return this.selectPhoto(o),o}selectPhoto(e){this.state={...this.state,error:null,myFitsOpen:!1,processingProgress:0,selectedPhoto:e,stage:"confirm"}}startGeneration(){return!!this.state.selectedPhoto&&(this.state={...this.state,error:null,generationProduct:this.getProductMetadata(),myFitsOpen:!1,processingProgress:0,result:null,stage:"processing"},!0)}reportGenerationProgress(e){var t;"processing"===this.state.stage&&(this.state={...this.state,processingProgress:Math.max(this.state.processingProgress,Number.isFinite(t=e)?Math.min(Math.max(t,0),100):0)})}completeGeneration(e,t=Date.now()){let r=function(e,t,r=Date.now()){return{...e,...t,productPrice:g_(t.productPrice),createdAt:r,id:`${e.before.id}-result-${r}`}}(e,this.state.generationProduct??this.getProductMetadata(),t);return this.state={...this.state,error:null,generationProduct:null,history:gz(this.state.history,r),myFitsOpen:!1,processingProgress:100,result:r,selectedPhoto:r.before,stage:"result"},r}failGeneration(e){this.state={...this.state,error:{kind:"generation",message:e},generationProduct:null,stage:"error"}}toggleMyFits(){"result"===this.state.stage&&0!==this.state.history.length&&(this.state={...this.state,myFitsOpen:!this.state.myFitsOpen})}closeMyFits(){this.state={...this.state,myFitsOpen:!1}}openComparison(e){let t=e?this.findResult(e):this.state.result;t&&(this.state={...this.state,comparisonOpen:!0,comparisonResultId:t.id})}closeComparison(){this.state={...this.state,comparisonOpen:!1,comparisonResultId:null}}deleteResult(e){let t=this.findResult(e),r=this.state.history.filter(t=>!gN(t,e)),n=this.state.result?.id??this.state.result?.after.id,a=this.getComparisonResult()?.id===e;if(n!==e)return this.state={...this.state,comparisonOpen:!a&&this.state.comparisonOpen,comparisonResultId:a?null:this.state.comparisonResultId,history:r},t;let o=r[0]??null;return this.state=o?{...this.state,comparisonOpen:!a&&this.state.comparisonOpen,comparisonResultId:a?null:this.state.comparisonResultId,error:null,generationProduct:null,history:r,myFitsOpen:r.length>0&&this.state.myFitsOpen,result:o,selectedPhoto:o.before,stage:"result"}:{...this.state,comparisonOpen:!1,comparisonResultId:null,error:null,generationProduct:null,history:r,myFitsOpen:!1,processingProgress:0,result:null,selectedPhoto:null,stage:"start"},t}resolveResultActionPhoto(e){let t=e?this.findResult(e):this.comparison.open?this.comparison.result:this.state.result;return t?.after??null}findResult(e){return this.state.history.find(t=>gN(t,e))??null}createProcessingView(){let e=this.state.generationProduct??this.getProductMetadata();return{photo:this.state.selectedPhoto,processingProgress:this.state.processingProgress,productImageSrc:e.productImageSrc,productName:e.productName,stage:"processing"}}createErrorView(){let e=this.state.generationProduct??this.getProductMetadata();return{error:this.state.error??{kind:"generation"},photo:this.state.selectedPhoto,productImageSrc:e.productImageSrc,productName:e.productName,stage:"error"}}getProductMetadata(){return{productImageSrc:this.state.productImageSrc,productName:this.state.productName,productPrice:this.state.productPrice,productUrl:this.state.productUrl}}getComparisonResult(){return this.state.comparisonOpen?this.state.comparisonResultId?this.findResult(this.state.comparisonResultId):this.state.result:null}}function g_(e){return e?.trim()||void 0}function gz(e,t){return[t,...e.filter(e=>e.id!==t.id)].sort((e,t)=>t.createdAt-e.createdAt)}function gN(e,t){return e.id===t||e.after.id===t}function gA(e,t){return{blob:e.blob,id:e.id,lastModified:e.lastModified,name:e.name,size:e.size,src:t(e.blob),type:e.type}}function gL(e,t){t&&(gI(e,t.before),gI(e,t.after))}function gI(e,t){gM(t)?.forEach(t=>e.add(t))}function gM(e){return e?.src?.startsWith("blob:")?[e.src]:null}function gF(e){return function(e=5e3){return new Promise(t=>setTimeout(t,e))}(function(e,t=Date.now()){return Math.max(0,5e3-(t-e))}(e))}function gD({dialogPortalContainer:e,language:t,onClose:r,processPhoto:n,productImageSrc:a,productName:o,productPrice:i,productType:s,productUrl:l,tryOnClient:u,apiKey:c,showDialogCloseButton:d=!1}){sX(s);let{i18n:p,t:h}=rT(),f=(0,L.useRef)(null),g=sN(c),m=(0,L.useMemo)(()=>u??sV({apiKey:g}),[u,g]);(0,L.useEffect)(()=>{"string"==typeof t&&p.changeLanguage(t)},[p,t]);let v=function({historyStore:e=gP,objectUrls:t=gR,onRequestClose:r,onRequestFileInput:n,processPhoto:a,productImageSrc:o,productName:i,productPrice:s,productType:l,productUrl:u,tryOnClient:c,resultActions:d=gE,tipStore:p=gT}){var h;let[,f]=(0,L.useReducer)(e=>e+1,0),g=(0,L.useRef)(new Set),m=(0,L.useCallback)(e=>{let r=t.createObjectUrl(e);return r&&g.current.add(r),r},[t]),v=(0,L.useRef)(null);v.current||(v.current=new gj({createObjectUrl:m,productImageSrc:o,productName:i,productPrice:s,productType:l,productUrl:u,tipStore:p}));let y=v.current;y.updateProduct({productImageSrc:o,productName:i,productPrice:s,productType:l,productUrl:u});let b=(0,L.useMemo)(()=>a??function({createObjectUrl:e=function(e){return"function"==typeof URL.createObjectURL?URL.createObjectURL(e):""},fetch:t,productImageSrc:r,productType:n,tryOnClient:a,apiKey:o}){sX(n);let i=a??sV({apiKey:o});return async function(a,o){let s;o?.reportProgress(4);let l=await go(a,t);if(!l||l.size<=0)throw Error("AI try-on source photo is empty");o?.reportProgress(12);let u=await ga(r,t);if(!u||u.size<=0)throw Error("AI try-on product image is missing");o?.reportProgress(22),o?.reportProgress(32);let[c,d]=function(e,t){let r=e?.uploads;if(!Array.isArray(r)||r.length<2)throw Error("Nano Banana upload URL response is missing uploads");return r.slice(0,2).map(e=>{if(null===e||"object"!=typeof e)throw Error("Nano Banana upload URL response is missing uploads");let t=gt(e.key),r=gt(e.uploadUrl);if(!t||!r)throw Error("Nano Banana upload URL response is missing key or uploadUrl");return{key:t,uploadUrl:r}})}(await i.requestUploadUrls(2),2);o?.reportProgress(44),await Promise.all([gn(c.uploadUrl,l,t),gn(d.uploadUrl,u,t)]),o?.reportProgress(62);let p=function(e){if(!e)return()=>{};e(70);let t=Date.now(),r=globalThis.setInterval(()=>{e(70+24*(1-(1-Math.min((Date.now()-t)/45e3,1))**3))},750);return()=>globalThis.clearInterval(r)}(o?.reportProgress);try{s=await i.generateTryOn({category:n,personImage:c.key,productImages:[d.key]},{timeout:9e4})}finally{p()}o?.reportProgress(96);let h=await gs(s);if(h.size<=0)throw Error("AI try-on generation returned an empty image");o?.reportProgress(98);let f=e(h);if(!f)throw Error("AI try-on result image URL cannot be created");return{before:a,after:{blob:h,id:`${a.id}-nano-banana-result`,name:a.name?`${a.name} result`:"AI try-on result",size:h.size,src:f,type:h.type||"image/jpeg"}}}}({createObjectUrl:m,productImageSrc:o,productType:l,tryOnClient:c}),[m,a,o,l,c]),w=(0,L.useCallback)(e=>{if(e){if("request-file-input"===e.type)return void n();r?.()}},[r,n]),k=(0,L.useCallback)(()=>f(),[]),x=(0,L.useCallback)(e=>{let t=e()??null;k(),w(t)},[w,k]),S=(0,L.useCallback)(e=>{y.failHistory(e),k()},[y,k]),C=(0,L.useCallback)(t=>{e.save(t).catch(()=>{S("save-result")})},[e,S]),P=(0,L.useCallback)(t=>{e.delete(t).catch(()=>{S("delete-result")})},[e,S]),E=(0,L.useCallback)(()=>{x(()=>y.choosePhoto())},[x,y]),T=(0,L.useCallback)(async()=>{let e=y.selectedPhoto;if(!e||!y.startGeneration())return;k();let t=Date.now();try{var r;let n=await b(e,{reportProgress:e=>{y.reportGenerationProgress(e),k()}});await gF(t);let a=y.completeGeneration(n);r=g.current,gM(a.before)?.forEach(e=>r.add(e)),gM(a.after)?.forEach(e=>r.add(e)),C(a),k()}catch(e){await gF(t),y.failGeneration(e instanceof Error?e.message:void 0),k()}},[C,b,y,k]),R=(0,L.useCallback)(e=>{let t=y.deleteResult(e);t&&P(t.id),k()},[P,y,k]),O=(0,L.useCallback)(e=>{d.save(y.resolveResultActionPhoto(e))},[d,y]),j=(0,L.useCallback)(e=>{d.share(y.resolveResultActionPhoto(e))},[d,y]),_=(0,L.useCallback)(()=>{c.sendWidgetEvent("add_to_cart_from_widget")},[c]);(0,L.useEffect)(()=>{let t=!1;return async function(){try{let r=await e.list();if(t)return;y.hydrateHistory(r.map(e=>({after:gA(e.after,m),before:gA(e.before,m),createdAt:e.createdAt,id:e.id,productImageSrc:e.productImageSrc,productName:e.productName,productPrice:e.productPrice,productUrl:e.productUrl}))),k()}catch{t||S("hydrate-history")}}(),()=>{t=!0}},[m,e,S,y,k]),(0,L.useEffect)(()=>()=>{var e,r;e=g.current,r=t.revokeObjectUrl,e.forEach(e=>r(e)),e.clear()},[t]),(0,L.useEffect)(()=>{var e,r,n,a,o;let i;a=g.current,e=y.view,r=y.comparison.result,n=y.history,i=new Set,"photo"in e&&gI(i,e.photo),"result"===e.stage&&(gL(i,e.result),e.resultHistory.forEach(e=>gL(i,e))),n.forEach(e=>gL(i,e)),gL(i,r),o=t.revokeObjectUrl,a.forEach(e=>{i.has(e)||(o(e),a.delete(e))})},[t,y.view,y.comparison.result,y.history]);let z=(0,L.useMemo)(()=>(function(e,{addToCart:t,choosePhoto:r,deleteResult:n,generate:a,runSessionCommand:o,saveResult:i,shareResult:s,sync:l}){let u=e.view;switch(u.stage){case"start":return{...u,choosePhoto:r,openHistory:()=>o(()=>e.openHistory())};case"intro":return{...u,continueIntro:()=>o(()=>e.continueIntro())};case"history":return{...u,chooseNew:r,selectResult:t=>o(()=>e.selectHistoryResult(t))};case"confirm":return{...u,changePhoto:r,generate:a};case"error":return{...u,chooseDifferentPhoto:r,retry:u.photo?a:r};case"result":return{...u,addToCart:t,changePhoto:()=>{e.closeMyFits(),l(),r()},deleteResult:n,openComparison:t=>o(()=>e.openComparison(t)),reset:()=>o(()=>e.reset()),saveResult:i,shareResult:s,toggleMyFits:()=>o(()=>e.toggleMyFits())};default:return u}})(y,{addToCart:_,choosePhoto:E,deleteResult:R,generate:()=>void T(),runSessionCommand:x,saveResult:O,shareResult:j,sync:k}),[_,E,R,T,x,O,y,j,k]);return{canGoBack:"start"!==(h=y.view.stage)&&"intro"!==h&&"processing"!==h&&"error"!==h&&"result"!==h,comparison:function(e,{addToCart:t,deleteResult:r,runSessionCommand:n,saveResult:a,shareResult:o}){let i=e.comparison;return{...i,addToCart:t,close:()=>n(()=>e.closeComparison()),deleteResult:()=>{let e=i.result?.id??i.result?.after.id;e&&r(e)},saveResult:()=>a(i.result?.id??i.result?.after.id),shareResult:()=>o(i.result?.id??i.result?.after.id)}}(y,{addToCart:_,deleteResult:R,runSessionCommand:x,saveResult:O,shareResult:j}),goBack:()=>x(()=>y.goBack()),requestClose:()=>x(()=>y.requestClose()),selectFile:e=>x(()=>{y.selectFile(e)}),view:z}}({onRequestClose:r,onRequestFileInput:()=>f.current?.click(),processPhoto:n,productImageSrc:a,productName:o,productPrice:i,productType:s,productUrl:l,tryOnClient:m}),y=v.view.stage,b="result"===v.view.stage&&v.view.myFitsOpen,w=v.canGoBack?(0,A.jsx)(f4,{label:h("back"),onClick:v.goBack}):null,k="result"===v.view.stage&&v.view.canOpenMyFits?(0,A.jsxs)(i4,{"aria-expanded":b,className:"h-9 px-3.5",type:"button",variant:"outline",onClick:v.view.toggleMyFits,children:[h("myFits"),(0,A.jsx)(sY,{className:i2("!size-3 transition-transform",b&&"rotate-180"),"data-icon":"inline-end"})]}):null;return(0,A.jsxs)(fD,{className:b?"h-svh max-h-svh sm:h-230 sm:max-h-[calc(100svh-var(--spacing)*8)]":void 0,"data-ai-try-on-stage":y,children:[(0,A.jsx)(fB,{badge:"history"===y?null:h(function(e){switch(e){case"intro":return"introBadge";case"confirm":return"confirmBadge";case"processing":return"processingBadge";case"error":return"errorBadge";case"result":return"resultBadge";default:return"badge"}}(y)),badgeTone:function(e){switch(e){case"confirm":return"blue";case"result":return"green";case"error":return"red";default:return"gray"}}(y),closeLabel:h("close"),leftSlot:w,middleSlot:k,preferMiddleSlotFirst:"result"===y,showCloseButton:d,onClose:v.requestClose}),(0,A.jsx)("input",{ref:f,accept:"image/jpeg,image/png",className:"hidden",type:"file",onChange:function(e){let t=e.currentTarget.files?.[0];t&&v.selectFile(t),e.currentTarget.value=""}}),(0,A.jsxs)(fV,{children:["start"===v.view.stage?(0,A.jsx)(fZ,{view:v.view}):null,"intro"===v.view.stage?(0,A.jsx)(fJ,{view:v.view}):null,"history"===v.view.stage?(0,A.jsx)(f0,{view:v.view}):null,"confirm"===v.view.stage?(0,A.jsx)(f1,{view:v.view}):null,"processing"===v.view.stage?(0,A.jsx)(f2,{view:v.view}):null,"error"===v.view.stage?(0,A.jsx)(f3,{view:v.view}):null,"result"===v.view.stage?(0,A.jsx)(f5,{view:v.view}):null]},y),v.comparison.open&&(0,A.jsx)(fI,{productName:v.comparison.productName,productPrice:v.comparison.productPrice,productUrl:v.comparison.productUrl,portalContainer:e??void 0,result:v.comparison.result,onAddToCart:v.comparison.addToCart,onClose:v.comparison.close,onDeleteResult:v.comparison.deleteResult,onSaveResult:v.comparison.saveResult,onShareResult:v.comparison.shareResult})]})}function gB({defaultOpen:e=!1,language:t,onOpenChange:r,open:n,productImageSrc:a,productName:o,productPrice:i,productType:s,productUrl:l,apiKey:u,...c}){sX(s);let d=(0,L.useMemo)(()=>{let e;return(e=rl.createInstance()).use(oo).use(rO).init({defaultNS:"ns1",fallbackLng:"en",interpolation:{escapeValue:!1},lng:t,resources:sU}),e},[t]),[p,h]=(0,L.useState)(null),[f,g]=(0,L.useState)(e),m=(0,L.useRef)(!1),v=void 0!==n,y=v?n:f,b=sN(u),w=(0,L.useMemo)(()=>sV({apiKey:b}),[b]);function k(e){v||g(e),r?.(e)}return(0,L.useEffect)(()=>{if(!y){m.current=!1;return}m.current||(m.current=!0,w.sendWidgetEvent("widget_opened"))},[y,w]),(0,A.jsxs)(A.Fragment,{children:[(0,q.createPortal)((0,A.jsx)("style",{children:sd.A}),document.head),(0,q.createPortal)((0,A.jsxs)(rG.div,{className:"fixed inset-x-0 bottom-0 w-svw tracking-normal sm:inset-x-auto sm:right-4 sm:bottom-4 sm:w-120",style:{zIndex:0x7fffffff},children:[(0,A.jsx)("style",{children:sW}),(0,A.jsx)("div",{ref:h}),p&&(0,A.jsx)(sc,{defaultTheme:"light",root:p,storageKey:"neurodyn-ai-try-on-theme",children:(0,A.jsx)(rR,{i18n:d,children:(0,A.jsx)(g$,{language:t,open:y,portalContainer:p,productImageSrc:a,productName:o,productPrice:i,productType:s,productUrl:l,tryOnClient:w,onRequestClose:()=>k(!1),onOpenChange:k,...c})})})]}),document.body)]})}function g$({language:e,onRequestClose:t,portalContainer:r,productImageSrc:n,productName:a,productPrice:o,productType:i,productUrl:s,tryOnClient:l,...u}){let{t:c}=rT();return(0,A.jsx)(sr,{...u,children:(0,A.jsxs)(so,{className:"inset-x-0 bottom-0 top-auto block max-h-svh w-svw max-w-none translate-x-0 translate-y-0 gap-0 overflow-hidden rounded-t-3xl rounded-b-none p-0 sm:inset-x-auto sm:right-4 sm:bottom-4 sm:left-auto sm:max-h-230 sm:w-120 sm:max-w-120 sm:rounded-3xl sm:p-0",contentInsideOverlay:!0,portalContainer:r,showCloseButton:!1,onInteractOutside:e=>{e.preventDefault()},children:[(0,A.jsxs)(si,{className:"sr-only",children:[(0,A.jsx)(ss,{children:c("dialogTitle")}),(0,A.jsx)(sl,{children:c("dialogDescription")})]}),(0,A.jsx)(gD,{dialogPortalContainer:r,language:e,productImageSrc:n,productName:a,productPrice:o,productType:i,productUrl:s,tryOnClient:l,showDialogCloseButton:!0,onClose:t})]})})}sx({baseURL:"https://api.neurodyn.ai/"});var gV=r("../../node_modules/.pnpm/react-dom@19.2.3_react@19.2.3/node_modules/react-dom/client.js");let gU=0,gH="data-neurodyn-ai-try-on-product-type";function gW(e,t){return gq(e.getAttribute(t))}function gq(e){return e?.trim()||void 0}function gK(e,t){let r=gW(e,t);if(!r)throw Error(`AI try-on dialog trigger is missing ${t}`);return r}window.__neurodynAiTryOnDialog?.destroy();let gG=new class{container=null;openState=!1;props=null;root=null;destroy(){this.root?.unmount(),this.root=null,this.container?.remove(),this.container=null,this.props=null,this.openState=!1}open(e){this.props=e,this.openState=!0,this.render()}handleOpenChange=e=>{this.openState=e,this.render()};ensureRoot(){return this.root||(this.container=document.createElement("div"),this.container.id=`neurodyn-ai-try-on-dialog-root-${gU++}`,document.body.appendChild(this.container),this.root=(0,gV.createRoot)(this.container)),this.root}render(){let e=this.ensureRoot();this.props&&this.openState?e.render((0,L.createElement)(gB,{...this.props,open:!0,onOpenChange:this.handleOpenChange})):e.render(null)}};function gX(e){let t=e.target instanceof Element?e.target.closest("[data-neurodyn-ai-try-on-dialog]"):null;t&&gG.open(function(e,t={}){var r,n;let a;return{language:void 0!==t.language?t.language:(r="data-neurodyn-ai-try-on-language","en"===(a=e.getAttribute(r))||"ru"===a?a:void 0),productImageSrc:void 0!==t.productImageSrc?t.productImageSrc:gK(e,"data-neurodyn-ai-try-on-product-image-src"),productName:void 0!==t.productName?t.productName:gK(e,"data-neurodyn-ai-try-on-product-name"),productPrice:void 0!==t.productPrice?gq(t.productPrice):gW(e,"data-neurodyn-ai-try-on-product-price"),productUrl:void 0!==t.productUrl?t.productUrl:gW(e,"data-neurodyn-ai-try-on-product-url"),productType:function(e){if(!sG(e)){let t="string"==typeof e&&e.length>0?` "${e}"`:"";throw Error(`AI try-on product type from ${gH} must be one of: ${sq.join(", ")}; received${t||" no value"}`)}return e}(void 0!==t.productType?t.productType:e.getAttribute(gH)),apiKey:(n=void 0!==t.apiKey?t.apiKey:e.getAttribute("data-neurodyn-ai-try-on-api-key"),n?.trim()||void 0)}}(t))}n={destroy:function(){document.removeEventListener("click",gX),gG.destroy(),window.__neurodynAiTryOnDialog===n&&(window.__neurodynAiTryOnDialog=void 0)}},document.addEventListener("click",gX),window.__neurodynAiTryOnDialog=n})()})();
|
|
5497
|
+
Defaulting to \`null\`.`));let c=fk(o,u)?o:null,d=fb(c)?s(c,u):void 0;return(0,A.jsx)(fp,{scope:a,value:c,max:u,children:(0,A.jsx)(fl.div,{"aria-valuemax":u,"aria-valuemin":0,"aria-valuenow":fb(c)?c:void 0,"aria-valuetext":d,role:"progressbar","data-state":fy(c,u),"data-value":c??void 0,"data-max":u,...l,ref:t})})});ff.displayName=fu;var fg="ProgressIndicator",fm=L.forwardRef((e,t)=>{let{__scopeProgress:r,...n}=e,a=fh(fg,r);return(0,A.jsx)(fl.div,{"data-state":fy(a.value,a.max),"data-value":a.value??void 0,"data-max":a.max,...n,ref:t})});function fv(e,t){return`${Math.round(e/t*100)}%`}function fy(e,t){return null==e?"indeterminate":e===t?"complete":"loading"}function fb(e){return"number"==typeof e}function fw(e){return fb(e)&&!isNaN(e)&&e>0}function fk(e,t){return fb(e)&&!isNaN(e)&&e<=t&&e>=0}function fx({className:e,value:t,max:r=100,...n}){let a=r>0?r:100,o="number"==typeof t?Math.min(Math.max(t/a*100,0),100):0;return(0,A.jsx)(ff,{"data-slot":"progress",className:i2("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),value:t,max:a,...n,children:(0,A.jsx)(fm,{"data-slot":"progress-indicator",className:"h-full bg-primary transition-[width]",style:{width:`${o}%`}})})}function fS(e){return(0,A.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",...e,children:(0,A.jsx)("path",{d:"M8.21723 14.9975C8.10298 14.997 7.99004 14.9731 7.8854 14.9272C7.78077 14.8814 7.68665 14.8145 7.60889 14.7308L3.55889 10.4225C3.4075 10.2611 3.3264 10.0463 3.33343 9.82513C3.34046 9.604 3.43505 9.39471 3.59639 9.24332C3.75773 9.09192 3.97261 9.01082 4.19374 9.01785C4.41488 9.02489 4.62417 9.11948 4.77556 9.28082L8.20889 12.9392L15.2172 5.27248C15.2883 5.18392 15.3768 5.11083 15.4772 5.0577C15.5776 5.00458 15.6878 4.97254 15.8011 4.96355C15.9143 4.95456 16.0282 4.96882 16.1357 5.00544C16.2432 5.04207 16.3421 5.10029 16.4263 5.17652C16.5105 5.25276 16.5782 5.3454 16.6253 5.44877C16.6724 5.55213 16.6979 5.66403 16.7001 5.7776C16.7024 5.89116 16.6815 6.00399 16.6385 6.10916C16.5956 6.21433 16.5316 6.30961 16.4506 6.38915L8.83389 14.7225C8.75686 14.8077 8.66308 14.8761 8.55841 14.9234C8.45373 14.9707 8.34042 14.996 8.22556 14.9975H8.21723Z",fill:"currentColor"})})}function fC(e){return(0,A.jsxs)("svg",{fill:"none",viewBox:"0 0 19.9993 19.9996",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,A.jsx)("path",{d:"M16 9C16 7.14348 15.2629 5.36256 13.9502 4.0498C12.6374 2.73705 10.8565 2 9 2C7.14348 2 5.36256 2.73705 4.0498 4.0498C2.73705 5.36256 2 7.14348 2 9C2 10.8565 2.73705 12.6374 4.0498 13.9502C5.36256 15.2629 7.14348 16 9 16C10.8565 16 12.6374 15.2629 13.9502 13.9502C15.2629 12.6374 16 10.8565 16 9ZM18 9C18 11.3869 17.0521 13.6764 15.3643 15.3643C13.6764 17.0521 11.3869 18 9 18C6.61305 18 4.32357 17.0521 2.63574 15.3643C0.947915 13.6764 0 11.3869 0 9C0 6.61305 0.947915 4.32357 2.63574 2.63574C4.32357 0.947915 6.61305 0 9 0C11.3869 0 13.6764 0.947915 15.3643 2.63574C17.0521 4.32357 18 6.61305 18 9Z",fill:"currentColor"}),(0,A.jsx)("path",{d:"M13.9428 13.943C14.3333 13.5525 14.9663 13.5525 15.3568 13.943L19.7064 18.2926C20.097 18.6832 20.097 19.3162 19.7064 19.7067C19.3159 20.0972 18.6829 20.0972 18.2924 19.7067L13.9428 15.3571C13.5522 14.9666 13.5522 14.3335 13.9428 13.943Z",fill:"currentColor"}),(0,A.jsx)("path",{d:"M7.99983 12.0001V6.00008C7.99983 5.4478 8.44755 5.00008 8.99983 5.00008C9.55211 5.00008 9.99983 5.4478 9.99983 6.00008V12.0001C9.99983 12.5524 9.55211 13.0001 8.99983 13.0001C8.44755 13.0001 7.99983 12.5524 7.99983 12.0001Z",fill:"currentColor"}),(0,A.jsx)("path",{d:"M11.9998 8.00008C12.5521 8.00008 12.9998 8.4478 12.9998 9.00008C12.9998 9.55237 12.5521 10.0001 11.9998 10.0001H5.99983C5.44755 10.0001 4.99983 9.55237 4.99983 9.00008C4.99983 8.4478 5.44755 8.00008 5.99983 8.00008H11.9998Z",fill:"currentColor"})]})}function fP({children:e,className:t,...r}){return(0,A.jsx)("div",{className:i2("relative h-82 w-full overflow-hidden rounded-xl bg-background-base sm:h-100",t),...r,children:e})}function fE({className:e,src:t}){return(0,A.jsxs)(A.Fragment,{children:[t&&(0,A.jsx)("img",{"aria-hidden":"true",className:i2("absolute inset-0 size-full scale-125 object-cover blur-3xl",e),src:t}),(0,A.jsx)("div",{"aria-hidden":"true",className:"absolute inset-0 bg-background-dark/5"})]})}function fT({backdropClassName:e,className:t,fallbackSrc:r,imageClassName:n,photo:a}){let o=a?.src??r;function i(e){r&&(e.currentTarget.src=r)}return(0,A.jsxs)(A.Fragment,{children:[o&&(0,A.jsx)("img",{"aria-hidden":"true",className:i2("absolute inset-0 size-full scale-125 object-cover blur-3xl",t,e),src:o,onError:i}),(0,A.jsx)("div",{"aria-hidden":"true",className:"absolute inset-0 bg-background-dark/5"}),o&&(0,A.jsx)("img",{alt:a?.name??"",className:i2("absolute inset-0 size-full object-contain",t,n),src:o,onError:i})]})}function fR({className:e,fallbackSrc:t,photo:r}){let n=r?.src??t;return(0,A.jsxs)(A.Fragment,{children:[n&&(0,A.jsx)("img",{"aria-hidden":"true",className:i2("absolute inset-0 size-full scale-125 object-cover blur-3xl",e),src:n,onError:e=>{t&&(e.currentTarget.src=t)}}),(0,A.jsx)("div",{"aria-hidden":"true",className:"absolute inset-0 bg-background-dark/20"})]})}function fO({className:e,...t}){let r=(0,L.useId)().replace(/:/g,""),n=`${r}-loading-texture-gradient`,a=`${r}-loading-texture-pattern`,o=`${r}-loading-texture-mask`;return(0,A.jsxs)("svg",{className:i2("text-constant-white",e),fill:"none",focusable:"false",viewBox:"0 0 776 992",xmlns:"http://www.w3.org/2000/svg",...t,children:[(0,A.jsxs)("defs",{children:[(0,A.jsxs)("radialGradient",{id:n,cx:"0",cy:"0",gradientTransform:"translate(388 496) rotate(90) scale(1021)",gradientUnits:"userSpaceOnUse",r:"1",children:[(0,A.jsx)("stop",{stopColor:"currentColor",stopOpacity:"0.7"}),(0,A.jsx)("stop",{offset:"0.586538",stopColor:"currentColor",stopOpacity:"0"})]}),(0,A.jsx)("pattern",{id:a,width:"24",height:"24",patternUnits:"userSpaceOnUse",children:(0,A.jsx)("circle",{cx:"4",cy:"4",r:"4",fill:"currentColor"})}),(0,A.jsx)("mask",{id:o,children:(0,A.jsx)("rect",{width:"776",height:"992",fill:`url(#${a})`})})]}),(0,A.jsx)("rect",{width:"776",height:"992",fill:`url(#${n})`,mask:`url(#${o})`})]})}function fj({animated:e=!1,className:t,...r}){return(0,A.jsxs)("div",{"aria-hidden":"true",className:i2("absolute h-133 w-104 max-w-none",t),...r,children:[!e&&(0,A.jsx)(fO,{className:"absolute inset-0 size-full opacity-30"}),e&&(0,A.jsx)("span",{className:"absolute inset-0 [mask-image:radial-gradient(circle,var(--v-constant-black)_0_36%,transparent_82%)] [mask-position:center] [mask-repeat:no-repeat] [mask-size:18%_18%] [-webkit-mask-image:radial-gradient(circle,var(--v-constant-black)_0_36%,transparent_82%)] [-webkit-mask-position:center] [-webkit-mask-repeat:no-repeat] [-webkit-mask-size:18%_18%] animate-[ai-try-on-loading-texture-pulse_2.6s_linear_infinite] motion-reduce:animate-none motion-reduce:[mask-size:220%_220%] motion-reduce:[-webkit-mask-size:220%_220%]",children:(0,A.jsx)(fO,{className:"absolute inset-0 size-full opacity-70"})})]})}function f_({badge:e,className:t,fallbackSrc:r,photo:n,selected:a,...o}){return(0,A.jsxs)("button",{className:i2("group relative aspect-square w-full overflow-hidden rounded-xl bg-background-base-2 text-left ring-offset-2 transition","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-foreground",a?"ring-2 ring-foreground":null,t),type:"button",...o,children:[n?.src?(0,A.jsx)("img",{alt:n.name??"",className:"size-full object-cover",src:n.src}):r?(0,A.jsx)("img",{alt:"",className:"size-full object-cover",src:r}):null,a&&(0,A.jsx)("span",{className:"absolute right-2 top-2 flex size-7 items-center justify-center rounded-full bg-foreground text-background-containers",children:(0,A.jsx)(fS,{className:"size-4"})}),e&&(0,A.jsx)("span",{className:"absolute right-2 top-2",children:e})]})}function fz({className:e,label:t,progress:r=0,...n}){let a=Math.min(Math.max(r,0),100);return(0,A.jsxs)("div",{className:i2("rounded-xl bg-background-base px-6 py-8",e),...n,children:[(0,A.jsxs)("div",{className:"mb-2 flex items-center justify-between text-sm font-medium text-text-sub",children:[(0,A.jsx)("span",{children:t}),(0,A.jsxs)("span",{children:[Math.round(a),"%"]})]}),(0,A.jsx)(fx,{className:"h-1 bg-background-base-3 [&_[data-slot=progress-indicator]]:bg-background-dark",value:a})]})}function fN({className:e,fallbackSrc:t,photo:r}){let n=r?.src??t;return n?(0,A.jsx)("img",{alt:r?.name??"",className:i2("absolute left-1/2 top-0 h-full w-69 -translate-x-1/2 object-cover",e),src:n,onError:e=>{t&&(e.currentTarget.src=t)}}):null}function fA({className:e,imageSrc:t,name:r}){return t?(0,A.jsx)("img",{alt:r??"",className:i2("absolute bottom-2 left-2 h-30 w-auto rounded-xl border border-background-containers bg-background-containers object-contain shadow-md",e),src:t}):null}function fL({good:e,imageSrc:t,label:r}){return(0,A.jsxs)("figure",{className:"flex min-w-0 flex-col items-start gap-2",children:[(0,A.jsxs)("div",{className:"relative aspect-square w-full overflow-hidden rounded-xl border border-border-light bg-background-base",children:[(0,A.jsx)("img",{alt:r,className:"size-full object-cover",src:t}),(0,A.jsx)("span",{className:i2("absolute right-2 top-2 flex size-7 items-center justify-center rounded-full",e?"bg-background-green":"bg-background-red"),children:e?(0,A.jsx)(fS,{className:"size-5 text-background-containers"}):(0,A.jsx)(ft,{className:"size-5 text-background-containers"})})]}),(0,A.jsx)("figcaption",{className:"w-[90%] break-words text-xs font-medium leading-[1.6] tracking-[0.02em] text-text-base",children:r})]})}function fI({className:e,onOpenComparison:t,productLabel:r,productUrl:n,result:a,zoomLabel:o}){let i="inline-flex h-8 min-w-0 max-w-52 flex-1 items-center justify-center gap-1.5 rounded-xl bg-button-light px-3 text-xs font-semibold text-text-dark";return(0,A.jsxs)(fP,{"aria-label":o,className:i2("block cursor-pointer text-left",e),role:"button",tabIndex:0,onClick:t,onKeyDown:function(e){("Enter"===e.key||" "===e.key)&&(e.preventDefault(),t())},children:[(0,A.jsx)(fT,{photo:a?.after}),(0,A.jsxs)("div",{className:"absolute bottom-2 left-2 right-2 flex items-center justify-between gap-2",children:[n?(0,A.jsxs)("a",{className:i,href:n,onClick:e=>e.stopPropagation(),children:[(0,A.jsx)(fa,{"aria-hidden":"true",className:"size-4"}),(0,A.jsx)("span",{className:"truncate",children:r})]}):(0,A.jsxs)("span",{className:i,children:[(0,A.jsx)(fa,{"aria-hidden":"true",className:"size-4"}),(0,A.jsx)("span",{className:"truncate",children:r})]}),(0,A.jsx)("button",{"aria-label":o,className:"inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-full bg-button-light text-text-dark",type:"button",onClick:e=>{e.stopPropagation(),t()},children:(0,A.jsx)(fC,{"aria-hidden":"true",className:"size-3.5"})})]})]})}function fM({onAddToCart:e,onClose:t,onDeleteResult:r,onSaveResult:n,onShareResult:a,portalContainer:o,productName:i,productPrice:s,productUrl:l,result:u}){var c;let{t:d}=rT(),p=i??d("resultProductLink"),h=(c=s,c?.trim()||void 0),f=h?d("resultTryAnotherWithPrice",{price:h}):d("resultTryAnother");return(0,A.jsx)(sr,{open:!0,onOpenChange:e=>!e&&t(),children:(0,A.jsxs)(so,{className:"dark fixed inset-0 left-0 top-0 flex h-dvh max-h-none w-svw max-w-none translate-x-0 translate-y-0 flex-col rounded-none bg-[#212124E5] p-0 text-text-dark duration-200 sm:max-w-none sm:p-0",portalContainer:o,showCloseButton:!1,children:[(0,A.jsxs)(si,{className:"sr-only",children:[(0,A.jsx)(ss,{children:d("comparisonTitle")}),(0,A.jsx)(sl,{children:d("comparisonSlider")})]}),(0,A.jsxs)("div",{className:"flex h-23 shrink-0 items-center justify-between px-8 py-6",children:[l?(0,A.jsx)(i4,{asChild:!0,className:"max-w-80",size:"lg",variant:"outline",children:(0,A.jsxs)("a",{href:l,children:[(0,A.jsx)(fa,{"data-icon":"inline-start"}),(0,A.jsx)("span",{className:"truncate",children:p})]})}):(0,A.jsxs)(i4,{className:"max-w-80",size:"lg",type:"button",variant:"outline",children:[(0,A.jsx)(fa,{"data-icon":"inline-start"}),(0,A.jsx)("span",{className:"truncate",children:p})]}),(0,A.jsx)(i4,{"aria-label":d("close"),size:"icon-lg",type:"button",variant:"outline",onClick:t,children:(0,A.jsx)(ft,{className:"!size-3","data-icon":"inline-start"})})]}),(0,A.jsx)("div",{className:"flex min-h-0 flex-1 items-center justify-center px-8",children:(0,A.jsxs)(h6,{"aria-label":d("comparisonSlider"),className:"h-full max-h-179 w-full max-w-143 bg-background-base-2",children:[(0,A.jsx)(h8,{position:"right",children:(0,A.jsx)(fN,{className:"w-full object-contain",photo:u?.after})}),(0,A.jsx)(h8,{position:"left",children:(0,A.jsx)(fN,{className:"w-full object-contain",photo:u?.before})}),(0,A.jsxs)(h7,{className:"w-11",children:[(0,A.jsx)("div",{className:"absolute left-1/2 h-full w-0.5 -translate-x-1/2 bg-constant-white"}),(0,A.jsx)("div",{className:"flex size-9 items-center justify-center rounded-full bg-constant-white text-constant-black shadow-lg",children:(0,A.jsx)("span",{className:"h-5 w-0.5 rounded-full bg-current"})})]})]})}),(0,A.jsx)("div",{className:"flex h-23 shrink-0 items-center justify-center px-8 pb-6 pt-3",children:(0,A.jsxs)("div",{className:"flex w-full max-w-104 items-start gap-2",children:[(0,A.jsxs)(i4,{className:"min-w-0 flex-1",size:"lg",type:"button",variant:"contrast",onClick:e,children:[(0,A.jsx)(fe,{"data-icon":"inline-start"}),(0,A.jsx)("span",{className:"truncate",children:f})]}),(0,A.jsx)(i4,{"aria-label":d("share"),size:"icon-lg",type:"button",variant:"outline",onClick:a,children:(0,A.jsx)(fo,{"data-icon":"inline-start"})}),(0,A.jsx)(i4,{"aria-label":d("download"),size:"icon-lg",type:"button",variant:"outline",onClick:n,children:(0,A.jsx)(fr,{"data-icon":"inline-start"})}),(0,A.jsx)(i4,{"aria-label":d("reset"),size:"icon-lg",type:"button",variant:"outline",onClick:function(){r()},children:(0,A.jsx)(fn,{"data-icon":"inline-start"})})]})})]})})}fm.displayName=fg;let fF=i5("inline-flex w-fit items-center justify-center overflow-hidden rounded-full whitespace-nowrap",{variants:{variant:{default:"bg-contrast text-contrast-foreground",secondary:"bg-[var(--color-background-gray-transparent)] text-text-base",positive:"bg-[var(--color-background-green-transparent)] text-text-green",negative:"bg-[var(--color-background-red-transparent)] text-text-red",standard:"bg-[var(--color-background-blue-transparent)] text-text-blue"},size:{sm:"h-6 px-2 typo-button-small",md:"h-[30px] px-3 typo-button-normal"}},defaultVariants:{variant:"default",size:"sm"}});function fD({className:e,variant:t,size:r,asChild:n=!1,...a}){return(0,A.jsx)(n?o0:"span",{"data-slot":"badge",className:i2(fF({variant:t,size:r,className:e})),...a})}function fB({className:e,...t}){return(0,A.jsx)("div",{className:i2("flex max-h-dvh w-svw flex-col overflow-hidden rounded-t-3xl rounded-b-none bg-background-containers text-foreground shadow-2xl sm:max-h-[min(calc(100svh-var(--spacing)*8),--spacing(176))] sm:w-120 sm:rounded-3xl",e),...t})}function f$({badge:e,badgeTone:t="gray",className:r,closeLabel:n,leftSlot:a,middleSlot:o,onClose:i,preferMiddleSlotFirst:s=!1,showCloseButton:l=!1,...u}){let c=e?(0,A.jsx)(fV,{tone:t,children:e}):null;return(0,A.jsxs)("div",{className:i2("flex h-17 items-center justify-between p-4",r),...u,children:[(0,A.jsxs)("div",{className:"flex items-center gap-2",children:[a,s?o:c,s?c:o]}),l&&(0,A.jsx)(i4,{"aria-label":n,size:"icon",type:"button",variant:"outline",onClick:i,children:(0,A.jsx)(ft,{"data-icon":"inline-start"})})]})}function fV({className:e,tone:t="gray",...r}){return(0,A.jsx)(fD,{className:e,size:"md",variant:"blue"===t?"standard":"green"===t?"positive":"red"===t?"negative":"secondary",...r})}function fU({className:e,...t}){return(0,A.jsx)("div",{className:i2("flex min-h-0 flex-1 flex-col animate-in fade-in-0 duration-100 motion-reduce:animate-none",e),...t})}function fH(e){return(0,A.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...e,children:(0,A.jsx)("path",{d:"M21.1667 8.4C21.1667 8.16131 21.07 7.93245 20.8981 7.76367C20.7262 7.59489 20.4931 7.5 20.25 7.5H16.5833C16.2768 7.5 15.9906 7.3496 15.8206 7.09922L14.2594 4.8H9.74056L8.17936 7.09922C8.00935 7.3496 7.72316 7.5 7.41667 7.5H3.75C3.50688 7.5 3.2738 7.59489 3.10189 7.76367C2.92998 7.93245 2.83333 8.16131 2.83333 8.4V18.3C2.83333 18.5387 2.92998 18.7675 3.10189 18.9363C3.2738 19.1051 3.50689 19.2 3.75 19.2H20.25C20.4931 19.2 20.7262 19.1051 20.8981 18.9363C21.07 18.7675 21.1667 18.5387 21.1667 18.3V8.4ZM14.75 12.9C14.75 12.184 14.46 11.4973 13.9443 10.991C13.4287 10.4847 12.7292 10.2001 12 10.2C11.2707 10.2 10.5705 10.4847 10.0548 10.991C9.53923 11.4973 9.25 12.1841 9.25 12.9C9.25 13.6159 9.53923 14.3027 10.0548 14.809C10.5705 15.3153 11.2707 15.6 12 15.6C12.7292 15.5999 13.4287 15.3153 13.9443 14.809C14.46 14.3027 14.75 13.616 14.75 12.9ZM16.5833 12.9C16.5833 14.0934 16.1 15.2377 15.2406 16.0816C14.3811 16.9255 13.2155 17.3999 12 17.4C10.7844 17.4 9.61809 16.9256 8.75854 16.0816C7.89919 15.2378 7.41667 14.0933 7.41667 12.9C7.41667 11.7067 7.89919 10.5622 8.75854 9.71836C9.61809 8.87445 10.7844 8.4 12 8.4C13.2155 8.40008 14.3811 8.87452 15.2406 9.71836C16.1 10.5623 16.5833 11.7066 16.5833 12.9ZM23 18.3C23 19.0161 22.7101 19.7026 22.1943 20.209C21.6786 20.7153 20.9793 21 20.25 21H3.75C3.02065 21 2.32139 20.7153 1.80566 20.209C1.28994 19.7026 1 19.0161 1 18.3V8.4C1 7.68392 1.28994 6.99736 1.80566 6.49102C2.32139 5.98467 3.02065 5.7 3.75 5.7H6.92611L8.4873 3.40078L8.55623 3.31201C8.72911 3.11535 8.98172 3 9.25 3H14.75L14.8637 3.00703C15.1262 3.03922 15.3639 3.18167 15.5127 3.40078L17.0739 5.7H20.25C20.9793 5.7 21.6786 5.98467 22.1943 6.49102C22.7101 6.99736 23 7.68392 23 8.4V18.3Z",fill:"currentColor"})})}function fW(e){return(0,A.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 5.00342 8.37303",fill:"none",...e,children:(0,A.jsx)("path",{d:"M1 1L4.00342 4.18652L1 7.37303",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function fq(e){return(0,A.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...e,children:[(0,A.jsx)("path",{d:"M18 3H6C5.20435 3 4.44129 3.31607 3.87868 3.87868C3.31607 4.44129 3 5.20435 3 6V18C3 18.7956 3.31607 19.5587 3.87868 20.1213C4.44129 20.6839 5.20435 21 6 21H18C18.7956 21 19.5587 20.6839 20.1213 20.1213C20.6839 19.5587 21 18.7956 21 18V6C21 5.20435 20.6839 4.44129 20.1213 3.87868C19.5587 3.31607 18.7956 3 18 3ZM6 5H18C18.2652 5 18.5196 5.10536 18.7071 5.29289C18.8946 5.48043 19 5.73478 19 6V14.36L15.8 11.63C15.3042 11.222 14.6821 10.999 14.04 10.999C13.3979 10.999 12.7758 11.222 12.28 11.63L5 17.7V6C5 5.73478 5.10536 5.48043 5.29289 5.29289C5.48043 5.10536 5.73478 5 6 5ZM18 19H6.56L13.56 13.16C13.6945 13.0602 13.8575 13.0062 14.025 13.0062C14.1925 13.0062 14.3555 13.0602 14.49 13.16L19 17V18C19 18.2652 18.8946 18.5196 18.7071 18.7071C18.5196 18.8946 18.2652 19 18 19Z",fill:"currentColor"}),(0,A.jsx)("path",{d:"M7.99983 9.99992C8.39766 9.99992 8.77919 9.84188 9.06049 9.56058C9.34179 9.27927 9.49983 8.89774 9.49983 8.49992C9.49983 8.10209 9.34179 7.72056 9.06049 7.43925C8.77919 7.15795 8.39766 6.99992 7.99983 6.99992C7.60201 6.99992 7.22047 7.15795 6.93917 7.43925C6.65787 7.72056 6.49983 8.10209 6.49983 8.49992C6.49983 8.89774 6.65787 9.27927 6.93917 9.56058C7.22047 9.84188 7.60201 9.99992 7.99983 9.99992Z",fill:"currentColor"})]})}function fK(e){return(0,A.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...e,children:(0,A.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18 3C18.7956 3 19.5585 3.3163 20.1211 3.87891C20.6837 4.44152 21 5.20435 21 6V18C21 18.7956 20.6837 19.5585 20.1211 20.1211C19.5585 20.6837 18.7956 21 18 21H6C5.20435 21 4.44152 20.6837 3.87891 20.1211C3.3163 19.5585 3 18.7956 3 18V6C3 5.20435 3.3163 4.44152 3.87891 3.87891C4.44152 3.3163 5.20435 3 6 3H18ZM14.0352 12C13.8633 12 13.6974 12.0639 13.5703 12.1797L6 19H18C18.2876 18.977 18.5547 18.8414 18.7422 18.6221C18.9296 18.4028 19.0221 18.1177 19 17.8301V16.6602L14.5 12.1797C14.3729 12.0639 14.2071 12 14.0352 12ZM8 7C7.60218 7 7.22076 7.15815 6.93945 7.43945C6.65815 7.72076 6.5 8.10218 6.5 8.5C6.5 8.89782 6.65815 9.27924 6.93945 9.56055C7.22076 9.84185 7.60218 10 8 10C8.39782 10 8.77924 9.84185 9.06055 9.56055C9.34185 9.27924 9.5 8.89782 9.5 8.5C9.5 8.10218 9.34185 7.72076 9.06055 7.43945C8.77924 7.15815 8.39782 7 8 7Z",fill:"currentColor"})})}function fG(e){return(0,A.jsx)("svg",{fill:"none",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,A.jsx)("path",{d:"M6.05944 11.1406C6.47507 8.23438 8.97819 6 12.0001 6C13.6563 6 15.1563 6.67187 16.2438 7.75625L16.2626 7.775L16.5001 8H15.0032C14.4501 8 14.0032 8.44687 14.0032 9C14.0032 9.55313 14.4501 10 15.0032 10H19.0032C19.5563 10 20.0032 9.55313 20.0032 9V5C20.0032 4.44688 19.5563 4 19.0032 4C18.4501 4 18.0032 4.44688 18.0032 5V6.66875L17.6501 6.33437C16.2032 4.89375 14.2032 4 12.0001 4C7.96882 4 4.63444 6.98125 4.08132 10.8594C4.00319 11.4062 4.38132 11.9125 4.92819 11.9906C5.47507 12.0688 5.98132 11.6875 6.05944 11.1438V11.1406ZM19.9188 13.1406C19.9969 12.5938 19.6157 12.0875 19.0719 12.0094C18.5282 11.9312 18.0188 12.3125 17.9407 12.8562C17.5251 15.7625 15.0219 17.9969 12.0001 17.9969C10.3438 17.9969 8.84382 17.325 7.75632 16.2406L7.73757 16.2219L7.50007 15.9969H8.99694C9.55007 15.9969 9.99694 15.55 9.99694 14.9969C9.99694 14.4437 9.55007 13.9969 8.99694 13.9969L5.00007 14C4.73444 14 4.47819 14.1063 4.29069 14.2969C4.10319 14.4875 3.99694 14.7406 4.00007 15.0094L4.03132 18.9781C4.03444 19.5312 4.48757 19.975 5.04069 19.9688C5.59382 19.9625 6.03757 19.5125 6.03132 18.9594L6.01882 17.35L6.35319 17.6656C7.80007 19.1062 9.79694 20 12.0001 20C16.0313 20 19.3657 17.0187 19.9188 13.1406Z",fill:"currentColor"})})}function fX({className:e,...t}){return(0,A.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",className:i2("size-6",e),...t,children:[(0,A.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.0625 1.70412C12.1393 1.70359 12.2136 1.7151 12.2842 1.73439C12.6576 1.76978 13.0261 1.88527 13.3604 2.08303L19.7012 5.84084L19.7031 5.84181C20.1036 6.08032 20.4348 6.42322 20.665 6.83498C20.8952 7.24671 21.0168 7.71415 21.0166 8.19142V8.19338L20.998 15.7403C20.9979 16.1352 20.9124 16.526 20.751 16.8848C20.7319 16.9557 20.7049 17.026 20.667 17.0928C20.6355 17.1482 20.5983 17.1987 20.5576 17.2442C20.3296 17.6 20.023 17.8979 19.6631 18.1133L13.2998 21.9072C12.4738 22.3996 11.4611 22.4004 10.6436 21.917L10.6416 21.916L4.30078 18.1582L4.29883 18.1572C3.91023 17.9258 3.58764 17.5957 3.3584 17.2002C3.35105 17.1885 3.34181 17.1773 3.33496 17.1651C3.32803 17.1526 3.32268 17.1387 3.31641 17.126C3.09976 16.7236 2.98517 16.2703 2.98535 15.8076V15.8057L3.00391 8.25588C3.00603 7.28279 3.51293 6.37777 4.33984 5.88478L10.7021 2.09181C11.0682 1.87369 11.4708 1.75231 11.877 1.72658C11.9365 1.71245 11.999 1.70462 12.0625 1.70412ZM5.16895 7.36818C4.87108 7.54583 4.6844 7.87497 4.68359 8.23635L4.66602 15.3838L9.45801 12.5254C9.51085 12.7718 9.60256 13.0142 9.73535 13.2442C9.90127 13.5315 10.1161 13.7727 10.3633 13.9639L5.49512 16.8662L11.499 20.4248C11.8036 20.6044 12.1738 20.6008 12.4707 20.4238L18.5107 16.8233L13.4971 13.877C13.9543 13.482 14.2391 12.9423 14.3242 12.3672L19.3193 15.3037L19.3379 8.21291L19.3369 8.21388C19.3369 8.03517 19.2923 7.85955 19.2061 7.7051C19.1196 7.55056 18.9947 7.42151 18.8447 7.33205L12.8887 3.80275L12.8535 9.73439C12.3304 9.51037 11.7366 9.46806 11.1738 9.63576L11.21 3.76662L5.16895 7.36818Z",fill:"currentColor"}),(0,A.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.91641 8.60885C11.7928 7.52595 14.1912 8.16845 15.2748 10.0444C16.3582 11.9209 15.7156 14.3211 13.8393 15.4047C11.9627 16.4879 9.56339 15.8446 8.47989 13.9682C7.39671 12.0916 8.03987 9.69227 9.91641 8.60885ZM13.8031 10.894C13.189 9.83118 11.8293 9.46704 10.766 10.0805C9.7026 10.6945 9.33693 12.0551 9.95059 13.1186C10.5646 14.1821 11.9261 14.5469 12.9897 13.9331C14.0529 13.3189 14.4171 11.9575 13.8031 10.894Z",fill:"currentColor"})]})}let fY={privacy:"https://vizbl.com/legal/privacy-policy",terms:"https://vizbl.com/legal/terms-of-use"},fQ={privacy:"https://arizo.ru/privacy-policy/",terms:"https://arizo.ru/terms-of-use/"},fZ={bag:{cards:[{good:!0,imageSrc:ou,labelKey:"bagIntroGoodFullBody"},{good:!0,imageSrc:ol,labelKey:"bagIntroGoodAngle"},{good:!1,imageSrc:os,labelKey:"bagIntroBadHandsFull"},{good:!1,imageSrc:oi,labelKey:"bagIntroBadCropped"}],subtitleKey:"bagIntroSubtitle",titleKey:"bagIntroTitle"},eyewear:{cards:[{good:!0,imageSrc:op,labelKey:"eyewearIntroGoodFacingCamera"},{good:!0,imageSrc:oh,labelKey:"eyewearIntroGoodHairBack"},{good:!1,imageSrc:od,labelKey:"eyewearIntroBadWearingGlasses"},{good:!1,imageSrc:oc,labelKey:"eyewearIntroBadFaceTurned"}],subtitleKey:"eyewearIntroSubtitle",titleKey:"eyewearIntroTitle"},footwear:{cards:[{good:!0,imageSrc:ov,labelKey:"footwearIntroGoodStanding"},{good:!0,imageSrc:om,labelKey:"footwearIntroGoodKneesDown"},{good:!1,imageSrc:og,labelKey:"footwearIntroBadOneFootCropped"},{good:!1,imageSrc:of,labelKey:"footwearIntroBadFeetHidden"}],subtitleKey:"footwearIntroSubtitle",titleKey:"footwearIntroTitle"},"full-body":{cards:[{good:!0,imageSrc:ok,labelKey:"fullBodyIntroGoodHeadToToe"},{good:!0,imageSrc:ow,labelKey:"fullBodyIntroGoodAngle"},{good:!1,imageSrc:oy,labelKey:"fullBodyIntroBadCropped"},{good:!1,imageSrc:ob,labelKey:"fullBodyIntroBadSitting"}],subtitleKey:"fullBodyIntroSubtitle",titleKey:"fullBodyIntroTitle"},headwear:{cards:[{good:!0,imageSrc:oP,labelKey:"headwearIntroGoodFront"},{good:!0,imageSrc:oC,labelKey:"headwearIntroGoodAngle"},{good:!1,imageSrc:oS,labelKey:"headwearIntroBadWearingHat"},{good:!1,imageSrc:ox,labelKey:"headwearIntroBadCroppedHead"}],subtitleKey:"headwearIntroSubtitle",titleKey:"headwearIntroTitle"},"lower-body":{cards:[{good:!0,imageSrc:oO,labelKey:"lowerBodyIntroGoodWaistToFeet"},{good:!0,imageSrc:oR,labelKey:"lowerBodyIntroGoodFullBody"},{good:!1,imageSrc:oT,labelKey:"lowerBodyIntroBadSitting"},{good:!1,imageSrc:oE,labelKey:"lowerBodyIntroBadCoveredWaist"}],subtitleKey:"lowerBodyIntroSubtitle",titleKey:"lowerBodyIntroTitle"},neck:{cards:[{good:!0,imageSrc:oz,labelKey:"neckIntroGoodHairUp"},{good:!0,imageSrc:oN,labelKey:"neckIntroGoodOpenNeckline"},{good:!1,imageSrc:oj,labelKey:"neckIntroBadHairCovering"},{good:!1,imageSrc:o_,labelKey:"neckIntroBadHighCollar"}],subtitleKey:"neckIntroSubtitle",titleKey:"neckIntroTitle"},"upper-body":{cards:[{good:!0,imageSrc:oM,labelKey:"upperBodyIntroGoodFacingCamera"},{good:!0,imageSrc:oI,labelKey:"upperBodyIntroGoodAngle"},{good:!1,imageSrc:oA,labelKey:"upperBodyIntroBadArmsCrossed"},{good:!1,imageSrc:oL,labelKey:"upperBodyIntroBadObjectBlockingTorso"}],subtitleKey:"upperBodyIntroSubtitle",titleKey:"upperBodyIntroTitle"},waist:{cards:[{good:!0,imageSrc:oB,labelKey:"waistIntroGoodFullBody"},{good:!0,imageSrc:o$,labelKey:"waistIntroGoodTopTucked"},{good:!1,imageSrc:oF,labelKey:"waistIntroBadOversizedTop"},{good:!1,imageSrc:oD,labelKey:"waistIntroBadSitting"}],subtitleKey:"waistIntroSubtitle",titleKey:"waistIntroTitle"},wrist:{cards:[{good:!0,imageSrc:oH,labelKey:"wristIntroGoodCloseUp"},{good:!0,imageSrc:oW,labelKey:"wristIntroGoodSleeveBack"},{good:!1,imageSrc:oV,labelKey:"wristIntroBadClenchedFist"},{good:!1,imageSrc:oU,labelKey:"wristIntroBadCovered"}],subtitleKey:"wristIntroSubtitle",titleKey:"wristIntroTitle"}};function fJ({view:e}){let{t}=rT(),r=fZ[e.productType];return(0,A.jsxs)(f8,{title:t("startTitle"),subtitle:t(r.titleKey),children:[(0,A.jsxs)(fP,{className:"mt-3",children:[(0,A.jsx)(fE,{src:e.productImageSrc}),(0,A.jsx)(fN,{fallbackSrc:e.productImageSrc})]}),(0,A.jsxs)(f7,{className:"mt-4",children:[(0,A.jsxs)(i4,{className:"w-full",size:"lg",type:"button",variant:"contrast",onClick:e.choosePhoto,children:[(0,A.jsx)(fH,{"data-icon":"inline-start"}),t("startUpload")]}),(0,A.jsxs)(i4,{className:"w-full",disabled:!e.canOpenHistory,size:"lg",type:"button",variant:"outline",onClick:e.openHistory,children:[(0,A.jsx)(fK,{"data-icon":"inline-start"}),t("startHistory")]}),(0,A.jsx)(ge,{})]})]})}function f0({view:e}){let{t}=rT(),r=fZ[e.productType];return(0,A.jsxs)(f8,{title:t(r.titleKey),subtitle:t(r.subtitleKey),children:[(0,A.jsx)("div",{className:"mt-4 grid grid-cols-2 gap-3 sm:gap-4",children:r.cards.map(e=>(0,A.jsx)(fL,{good:e.good,imageSrc:e.imageSrc,label:t(e.labelKey)},e.labelKey))}),(0,A.jsx)("div",{className:"mt-4",children:(0,A.jsx)(i4,{className:"w-full",size:"lg",type:"button",variant:"contrast",onClick:e.continueIntro,children:t("introCta")})})]})}function f1({view:e}){let{t}=rT();return(0,A.jsxs)(f8,{title:t("historyTitle"),subtitle:t("historySubtitle"),children:[(0,A.jsx)("div",{className:"mt-3 grid min-h-104 flex-1 grid-cols-3 content-start gap-x-3 gap-y-4 overflow-x-hidden overflow-y-auto overscroll-contain pb-2 sm:gap-4",children:e.history.map(r=>(0,A.jsx)(f_,{"aria-label":r.after.name??t("historyPhoto"),photo:r.after,onClick:()=>e.selectResult(r.id)},r.id))}),(0,A.jsxs)(f7,{className:"mt-4",children:[(0,A.jsxs)(i4,{className:"w-full",size:"lg",type:"button",variant:"contrast",onClick:e.chooseNew,children:[(0,A.jsx)(fq,{"data-icon":"inline-start"}),t("historyUploadNew")]}),(0,A.jsx)(ge,{})]})]})}function f2({view:e}){let{t}=rT();return(0,A.jsxs)(f8,{title:t("confirmTitle"),subtitle:t("confirmSubtitle"),children:[(0,A.jsxs)(fP,{className:"mt-3",children:[(0,A.jsx)(fT,{fallbackSrc:e.productImageSrc,photo:e.photo}),(0,A.jsx)(fA,{className:"bottom-2 left-2",imageSrc:e.productImageSrc,name:e.productName})]}),(0,A.jsxs)(f7,{className:"mt-4",children:[(0,A.jsxs)(i4,{className:"w-full",size:"lg",type:"button",variant:"contrast",onClick:e.generate,children:[(0,A.jsx)(fX,{"data-icon":"inline-start"}),t("confirmGenerate")]}),(0,A.jsxs)(i4,{className:"w-full",size:"lg",type:"button",variant:"outline",onClick:e.changePhoto,children:[(0,A.jsx)(fG,{"data-icon":"inline-start"}),t("confirmChangePhoto")]}),(0,A.jsx)(ge,{})]})]})}function f3({view:e}){let{t}=rT();return(0,A.jsxs)(f8,{title:t("processingTitle"),subtitle:t("processingSubtitle"),children:[(0,A.jsxs)(fP,{className:"mt-3",children:[(0,A.jsx)(fR,{fallbackSrc:e.productImageSrc,photo:e.photo}),(0,A.jsx)(fj,{animated:!0,className:"left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2"}),(0,A.jsxs)("div",{className:"absolute inset-0 flex items-center justify-center gap-2",children:[(0,A.jsx)("div",{className:"size-32 overflow-hidden rounded-xl border border-constant-white shadow-md sm:size-37.5",children:(0,A.jsx)("img",{alt:e.productName,className:"size-full object-cover",src:e.productImageSrc})}),(0,A.jsx)("div",{className:"size-32 overflow-hidden rounded-xl border border-constant-white sm:size-37.5",children:e.photo?.src?(0,A.jsx)("img",{alt:"",className:"size-full object-cover",src:e.photo.src}):null})]})]}),(0,A.jsx)(fz,{className:"mt-4",label:t("processingProgress"),progress:e.processingProgress})]})}function f5({view:e}){let{t}=rT(),r="upload-validation"===e.error.kind&&"file-too-large"===e.error.code;return(0,A.jsxs)(f8,{title:t(r?"errorFileTooLarge":"errorTitle"),subtitle:r?void 0:t("errorSubtitle"),children:[!r&&(0,A.jsxs)(fP,{className:"mt-3",children:[(0,A.jsx)(fR,{fallbackSrc:e.productImageSrc,photo:e.photo}),(0,A.jsx)(fj,{className:"left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2"}),(0,A.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-6 px-6 sm:px-12",children:[(0,A.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,A.jsx)("div",{className:"size-32 overflow-hidden rounded-xl border border-constant-white bg-background-containers shadow-md sm:size-37.5",children:(0,A.jsx)("img",{alt:e.productName,className:"size-full object-cover",src:e.productImageSrc})}),(0,A.jsx)("div",{className:"size-32 overflow-hidden rounded-xl border border-constant-white sm:size-37.5",children:e.photo?.src?(0,A.jsx)("img",{alt:e.photo.name??"",className:"size-full object-cover",src:e.photo.src,onError:t=>{t.currentTarget.src=e.productImageSrc}}):null})]}),(0,A.jsx)("p",{className:"w-56 text-center text-xs font-medium tracking-wider text-constant-white",children:t("errorGuidance")})]})]}),(0,A.jsxs)(f7,{className:"mt-4",children:[(0,A.jsxs)(i4,{className:"w-full",size:"lg",type:"button",variant:"contrast",onClick:e.retry,children:[(0,A.jsx)(fX,{"data-icon":"inline-start"}),t("errorRetry")]}),(0,A.jsxs)(i4,{className:"w-full",size:"lg",type:"button",variant:"outline",onClick:e.chooseDifferentPhoto,children:[(0,A.jsx)(fG,{"data-icon":"inline-start"}),t("errorDifferentPhoto")]}),(0,A.jsx)(ge,{className:"text-text-sub"})]})]})}function f9({view:e}){let{t}=rT(),r=gt(e.productPrice),n=r?t("resultTryAnotherWithPrice",{price:r}):t("resultTryAnother");return e.myFitsOpen?(0,A.jsx)("div",{className:"min-h-0 flex-1 overflow-x-hidden overflow-y-auto overscroll-contain pb-4",children:(0,A.jsx)("div",{className:"flex flex-col gap-4 px-6 pb-2 pt-4 sm:px-8",children:e.resultHistory.map((t,r)=>(0,A.jsx)(f4,{compact:r>0,onAddToCart:e.addToCart,productName:t.productName??e.productName,productPrice:t.productPrice,productUrl:t.productUrl??e.productUrl,result:t,onDeleteResult:e.deleteResult,onOpenComparison:e.openComparison,onSaveResult:e.saveResult,onShareResult:e.shareResult},t.id??t.after.id))})}):(0,A.jsxs)(f8,{className:"pb-6",subtitle:void 0,title:t("resultTitle"),children:[(0,A.jsx)(fI,{className:"mt-6",productLabel:e.productName??t("resultProductLink"),productUrl:e.productUrl,zoomLabel:t("resultOpenComparison"),result:e.result,onOpenComparison:()=>e.openComparison(e.result?.id)}),(0,A.jsxs)(f7,{className:"mt-4",children:[(0,A.jsxs)(i4,{className:"w-full",size:"lg",type:"button",variant:"contrast",onClick:e.addToCart,children:[(0,A.jsx)(fe,{"data-icon":"inline-start"}),n]}),(0,A.jsxs)("div",{className:"grid grid-cols-3 gap-2",children:[(0,A.jsxs)(i4,{type:"button",variant:"outline",onClick:e.changePhoto,children:[(0,A.jsx)(fG,{"data-icon":"inline-start"}),t("resultCompare")]}),(0,A.jsxs)(i4,{type:"button",variant:"outline",onClick:()=>e.shareResult(e.result?.id),children:[(0,A.jsx)(fo,{"data-icon":"inline-start"}),t("resultShare")]}),(0,A.jsxs)(i4,{type:"button",variant:"outline",onClick:()=>e.saveResult(e.result?.id),children:[(0,A.jsx)(fr,{"data-icon":"inline-start"}),t("resultReset")]})]})]})]})}function f4({compact:e=!1,onAddToCart:t,onDeleteResult:r,onOpenComparison:n,onSaveResult:a,onShareResult:o,productName:i,productPrice:s,productUrl:l,result:u}){let{t:c}=rT(),d=i??c("resultProductLink"),p=gt(s),h=p?c("resultTryAnotherWithPrice",{price:p}):c("resultTryAnother");return(0,A.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,A.jsx)(fI,{productLabel:d,productUrl:l,zoomLabel:c("resultOpenComparison"),result:u,onOpenComparison:()=>n(u.id)}),(0,A.jsxs)("div",{className:"flex gap-2",children:[(0,A.jsxs)(i4,{className:"min-w-0 flex-1",size:"default",type:"button",variant:"contrast",onClick:t,children:[(0,A.jsx)(fe,{"data-icon":"inline-start"}),(0,A.jsx)("span",{className:"truncate",children:h})]}),(0,A.jsx)(i4,{"aria-label":c("share"),size:"icon",type:"button",variant:"outline",onClick:()=>o(u.id),children:(0,A.jsx)(fo,{"data-icon":"inline-start"})}),(0,A.jsx)(i4,{"aria-label":c("download"),size:"icon",type:"button",variant:"outline",onClick:()=>a(u.id),children:(0,A.jsx)(fr,{"data-icon":"inline-start"})}),!e&&(0,A.jsx)(i4,{"aria-label":c("reset"),size:"icon",type:"button",variant:"outline",onClick:()=>r(u.id),children:(0,A.jsx)(fn,{"data-icon":"inline-start"})})]})]})}function f6({label:e,onClick:t}){return(0,A.jsx)(i4,{"aria-label":e,size:"icon",type:"button",variant:"outline",onClick:t,children:(0,A.jsx)(fW,{className:"rotate-180 !size-3","data-icon":"inline-start"})})}function f8({children:e,className:t,subtitle:r,title:n}){return(0,A.jsxs)("div",{className:i2("flex min-h-0 flex-1 flex-col overflow-x-hidden overflow-y-auto overscroll-contain px-6 pb-5 sm:px-8",t),children:[(0,A.jsxs)("div",{className:"mb-1 flex flex-col gap-1",children:[(0,A.jsx)("h2",{className:"text-2xl font-medium tracking-tight text-text-dark",children:n}),r&&(0,A.jsx)("p",{className:"text-sm font-medium text-text-base",children:r})]}),e]})}function f7({children:e,className:t}){return(0,A.jsx)("div",{className:i2("flex flex-col gap-2",t),children:e})}function ge({className:e}){var t;let{i18n:r,t:n}=rT(),a=(t=r.resolvedLanguage??r.language,t?.startsWith("ru")?fQ:fY);return(0,A.jsxs)("p",{className:i2("pt-1 text-center text-xs font-medium text-text-base",e),children:[n("termsPrefix")," ",(0,A.jsx)("a",{className:"underline underline-offset-2",href:a.terms,rel:"noopener noreferrer",target:"_blank",children:n("termsLink")})," ",n("termsJoiner")," ",(0,A.jsx)("a",{className:"underline underline-offset-2",href:a.privacy,rel:"noopener noreferrer",target:"_blank",children:n("privacyLink")})]})}function gt(e){return e?.trim()||void 0}function gr(e){return"string"==typeof e?e.trim():""}function gn(e){if(e)return e;if("function"==typeof fetch)return fetch;throw Error("Fetch API is not available for AI try-on image upload")}async function ga(e,t,r){let n=await gn(r)(e,{body:t,method:"PUT"});if(!n.ok){let e=await n.text().catch(()=>"");throw Error(`Nano Banana image upload failed with status ${n.status}${e?`: ${e}`:""}`)}}async function go(e,t){let r=e?.trim();return r?gs(r,t,"AI try-on product image fetch failed"):null}async function gi(e,t){return e.blob?e.blob:e.file?e.file:e.src?gs(e.src,t,"AI try-on source photo fetch failed"):null}async function gs(e,t,r){let n=await gn(t)(e);if(!n.ok){let e=await n.text().catch(()=>"");throw Error(`${r} with status ${n.status}${e?`: ${e}`:""}`)}return n.blob()}async function gl(e){if(e instanceof Blob)return e.type?e:new Blob([e],{type:"image/jpeg"});if(e instanceof ArrayBuffer||"string"==typeof e)return new Blob([e],{type:"image/jpeg"});throw Error("AI try-on generation did not return an image")}let gu="ai-try-on-result";async function gc(e,t={}){let r=await gp(e,t.fetch),n=t.document??globalThis.document;if(!r||!n?.body)return!1;let a=t.createObjectUrl??gf,o=t.revokeObjectUrl??gg,i=a(r);if(!i)return!1;let s=n.createElement("a");return s.href=i,s.download=gh(r,e,t.filename),s.style.display="none",n.body.appendChild(s),s.click(),s.remove(),o(i),!0}async function gd(e,t={}){let r=await gp(e,t.fetch),n=t.navigator??globalThis.navigator;if(!r)return!1;if("function"==typeof File&&"function"==typeof n?.share){let a={files:[new File([r],gh(r,e,t.filename),{type:r.type||e?.type||"image/png"})]};if("function"!=typeof n.canShare||n.canShare(a))try{return await n.share(a),!0}catch(e){if("u">typeof DOMException&&e instanceof DOMException&&"AbortError"===e.name)return!1}}return gc(e,t)}async function gp(e,t=globalThis.fetch){if(!e)return null;if(e.blob)return e.blob;if(e.file)return e.file;if(!e.src||"function"!=typeof t)return null;try{let r=await t(e.src);if(!r.ok)return null;return r.blob()}catch{return null}}function gh(e,t,r=gu){var n;let a=function(e){switch(e){case"image/jpeg":return"jpg";case"image/png":return"png";case"image/webp":return"webp";case"image/gif":return"gif";case"image/svg+xml":return"svg";default:return null}}(e.type||t?.type)??(n=t?.name,n?.match(/\.([a-z0-9]+)$/i)?.[1]?.toLowerCase()??null)??"png",o=r.replace(/\.[a-z0-9]+$/i,"").replace(/[^\w-]+/g,"-").replace(/^-+|-+$/g,"")||gu;return`${o}.${a}`}function gf(e){return"function"==typeof URL.createObjectURL?URL.createObjectURL(e):""}function gg(e){"function"==typeof URL.revokeObjectURL&&URL.revokeObjectURL(e)}let gm="results";function gv(){return void 0===globalThis.indexedDB?null:globalThis.indexedDB}function gy(e){return new Promise((t,r)=>{let n=e.open("neurodyn-ai-try-on",1);n.onupgradeneeded=()=>{let e=n.result;e.objectStoreNames.contains(gm)||e.createObjectStore(gm,{keyPath:"id"}).createIndex("createdAt","createdAt")},n.onerror=()=>r(n.error),n.onsuccess=()=>t(n.result)})}function gb(e){return new Promise((t,r)=>{e.onabort=()=>r(e.error),e.onerror=()=>r(e.error),e.oncomplete=()=>t()})}async function gw(e){return{after:await gk(e.after),before:await gk(e.before),createdAt:e.createdAt,id:e.id,productImageSrc:e.productImageSrc,productName:e.productName,productPrice:e.productPrice,productUrl:e.productUrl}}async function gk(e){let t=await gx(e);if(!t)throw Error("AI try-on photo cannot be persisted without image data");return{blob:t,id:e.id,lastModified:e.file?.lastModified??e.lastModified,name:e.name,size:t.size,type:t.type||e.type}}async function gx(e){if(e.blob)return e.blob;if(e.file)return e.file;if(!e.src||"function"!=typeof fetch)return null;try{let t=await fetch(e.src);return t.ok?t.blob():null}catch{return null}}function gS(e){return`neurodyn_ai_try_on_seen_tip:${e}`}function gC(e,t=gP()){if(t)try{t.setItem(gS(e),"true")}catch{}}function gP(){try{return void 0===globalThis.localStorage?null:globalThis.localStorage}catch{return null}}let gE={delete:async function e(e){let t=gv();if(!t)return!1;try{let r=await gy(t),n=r.transaction(gm,"readwrite"),a=gb(n);return n.objectStore(gm).delete(e),await a,r.close(),!0}catch(e){throw Error("AI try-on result could not be removed from history",{cause:e})}},list:async function e(){let e=gv();if(!e)return[];try{var t;let r=await gy(e),n=r.transaction(gm,"readonly"),a=gb(n),o=await (t=n.objectStore(gm).getAll(),new Promise((e,r)=>{t.onerror=()=>r(t.error),t.onsuccess=()=>e(t.result)}));return await a,r.close(),o.sort((e,t)=>t.createdAt-e.createdAt)}catch(e){throw Error("AI try-on history could not be loaded",{cause:e})}},save:async function e(e){let t=gv();if(!t)return!1;try{let r=await gw(e),n=await gy(t),a=n.transaction(gm,"readwrite"),o=gb(a);return a.objectStore(gm).put(r),await o,n.close(),!0}catch(e){throw Error("AI try-on result could not be saved to history",{cause:e})}}},gT={save:gc,share:gd},gR={consumeFirstView:function(e,t=gP()){return!function(e,t=gP()){if(!t)return!1;try{return"true"===t.getItem(gS(e))}catch{return!1}}(e,t)&&(gC(e,t),!0)},markSeen:gC},gO={createObjectUrl:e=>"function"==typeof URL.createObjectURL?URL.createObjectURL(e):"",revokeObjectUrl:e=>{"function"==typeof URL.revokeObjectURL&&URL.revokeObjectURL(e)}},gj=["image/jpeg","image/png"];class g_{createObjectUrl;tipStore;state;constructor({createObjectUrl:e,productImageSrc:t,productName:r,productPrice:n,productType:a,productUrl:o,tipStore:i}){this.createObjectUrl=e,this.tipStore=i,this.state={comparisonOpen:!1,comparisonResultId:null,error:null,generationProduct:null,history:[],myFitsOpen:!1,processingProgress:0,productImageSrc:t,productName:r,productPrice:gz(n),productType:a,productUrl:o,result:null,selectedPhoto:null,stage:"start"}}get view(){switch(this.state.stage){case"intro":return{productType:this.state.productType,stage:"intro"};case"history":return{history:this.state.history,stage:"history"};case"confirm":return{photo:this.state.selectedPhoto,productImageSrc:this.state.productImageSrc,productName:this.state.productName,stage:"confirm"};case"processing":return this.createProcessingView();case"error":return this.createErrorView();case"result":return{canOpenMyFits:this.state.history.length>0,myFitsOpen:this.state.myFitsOpen,productName:this.state.result?.productName??this.state.productName,productPrice:this.state.result?gz(this.state.result.productPrice):this.state.productPrice,productUrl:this.state.result?.productUrl??this.state.productUrl,result:this.state.result,resultHistory:function(e,t){if(!e)return[];let r=[e,...t.filter(t=>t.id!==e.id)];return r.filter((e,t)=>{let n=e.id??e.after.id;return r.findIndex(e=>(e.id??e.after.id)===n)===t})}(this.state.result,this.state.history),stage:"result"};default:return{canOpenHistory:this.state.history.length>0,productImageSrc:this.state.productImageSrc,productName:this.state.productName,productType:this.state.productType,productUrl:this.state.productUrl,stage:"start"}}}get comparison(){let e=this.getComparisonResult();return{open:this.state.comparisonOpen&&null!==e,productName:e?.productName??this.state.productName,productPrice:e?gz(e.productPrice):this.state.productPrice,productUrl:e?.productUrl??this.state.productUrl,result:e}}get selectedPhoto(){return this.state.selectedPhoto}get history(){return this.state.history}updateProduct({productImageSrc:e,productName:t,productPrice:r,productType:n,productUrl:a}){this.state={...this.state,productImageSrc:e,productName:t,productPrice:gz(r),productType:n,productUrl:a}}hydrateHistory(e){this.state={...this.state,error:null,history:[...e,...this.state.history].reduce((e,t)=>gN(e,t),[])}}failHistory(e,t){this.state={...this.state,error:{kind:"hydrate-history"===e?"history-load":"save-result"===e?"history-save":"history-delete",message:t}}}choosePhoto(){return this.tipStore.consumeFirstView(this.state.productType)?(this.state={...this.state,stage:"intro"},null):{type:"request-file-input"}}continueIntro(){return this.tipStore.markSeen(this.state.productType),{type:"request-file-input"}}requestClose(){return"intro"===this.state.stage?(this.tipStore.markSeen(this.state.productType),this.goBack(),null):{type:"close-dialog"}}openHistory(){0!==this.state.history.length&&(this.state={...this.state,stage:"history"})}goBack(){switch(this.state.stage){case"intro":case"history":this.state={...this.state,stage:"start"};return;case"confirm":this.state={...this.state,stage:this.state.history.length>0?"history":"start"};return;case"processing":case"error":case"result":this.state={...this.state,stage:"confirm"}}}reset(){this.state={...this.state,comparisonOpen:!1,comparisonResultId:null,error:null,generationProduct:null,myFitsOpen:!1,processingProgress:0,result:null,selectedPhoto:null,stage:"start"}}selectHistoryResult(e){let t=this.state.history.find(t=>t.id===e);t&&(this.state={...this.state,error:null,myFitsOpen:!1,result:t,selectedPhoto:t.before,stage:"result"})}selectFile(e){var t,r;let n=(t=e,gj.includes(t.type)||""===t.type&&/\.(?:jpe?g|png)$/i.test(t.name)?t.size>0xa00000?"file-too-large":null:"unsupported-file-format");if(n)return this.state={...this.state,error:{code:n,kind:"upload-validation"},myFitsOpen:!1,processingProgress:0,result:null,selectedPhoto:null,stage:"error"},null;let a=this.createObjectUrl(e),o={blob:e,file:e,id:(r=e,`${r.name}-${r.size}-${r.lastModified}`),lastModified:e.lastModified,name:e.name,size:e.size,src:a,type:e.type};return this.selectPhoto(o),o}selectPhoto(e){this.state={...this.state,error:null,myFitsOpen:!1,processingProgress:0,selectedPhoto:e,stage:"confirm"}}startGeneration(){return!!this.state.selectedPhoto&&(this.state={...this.state,error:null,generationProduct:this.getProductMetadata(),myFitsOpen:!1,processingProgress:0,result:null,stage:"processing"},!0)}reportGenerationProgress(e){var t;"processing"===this.state.stage&&(this.state={...this.state,processingProgress:Math.max(this.state.processingProgress,Number.isFinite(t=e)?Math.min(Math.max(t,0),100):0)})}completeGeneration(e,t=Date.now()){let r=function(e,t,r=Date.now()){return{...e,...t,productPrice:gz(t.productPrice),createdAt:r,id:`${e.before.id}-result-${r}`}}(e,this.state.generationProduct??this.getProductMetadata(),t);return this.state={...this.state,error:null,generationProduct:null,history:gN(this.state.history,r),myFitsOpen:!1,processingProgress:100,result:r,selectedPhoto:r.before,stage:"result"},r}failGeneration(e){this.state={...this.state,error:{kind:"generation",message:e},generationProduct:null,stage:"error"}}toggleMyFits(){"result"===this.state.stage&&0!==this.state.history.length&&(this.state={...this.state,myFitsOpen:!this.state.myFitsOpen})}closeMyFits(){this.state={...this.state,myFitsOpen:!1}}openComparison(e){let t=e?this.findResult(e):this.state.result;t&&(this.state={...this.state,comparisonOpen:!0,comparisonResultId:t.id})}closeComparison(){this.state={...this.state,comparisonOpen:!1,comparisonResultId:null}}deleteResult(e){let t=this.findResult(e),r=this.state.history.filter(t=>!gA(t,e)),n=this.state.result?.id??this.state.result?.after.id,a=this.getComparisonResult()?.id===e;if(n!==e)return this.state={...this.state,comparisonOpen:!a&&this.state.comparisonOpen,comparisonResultId:a?null:this.state.comparisonResultId,history:r},t;let o=r[0]??null;return this.state=o?{...this.state,comparisonOpen:!a&&this.state.comparisonOpen,comparisonResultId:a?null:this.state.comparisonResultId,error:null,generationProduct:null,history:r,myFitsOpen:r.length>0&&this.state.myFitsOpen,result:o,selectedPhoto:o.before,stage:"result"}:{...this.state,comparisonOpen:!1,comparisonResultId:null,error:null,generationProduct:null,history:r,myFitsOpen:!1,processingProgress:0,result:null,selectedPhoto:null,stage:"start"},t}resolveResultActionPhoto(e){let t=e?this.findResult(e):this.comparison.open?this.comparison.result:this.state.result;return t?.after??null}findResult(e){return this.state.history.find(t=>gA(t,e))??null}createProcessingView(){let e=this.state.generationProduct??this.getProductMetadata();return{photo:this.state.selectedPhoto,processingProgress:this.state.processingProgress,productImageSrc:e.productImageSrc,productName:e.productName,stage:"processing"}}createErrorView(){let e=this.state.generationProduct??this.getProductMetadata();return{error:this.state.error??{kind:"generation"},photo:this.state.selectedPhoto,productImageSrc:e.productImageSrc,productName:e.productName,stage:"error"}}getProductMetadata(){return{productImageSrc:this.state.productImageSrc,productName:this.state.productName,productPrice:this.state.productPrice,productUrl:this.state.productUrl}}getComparisonResult(){return this.state.comparisonOpen?this.state.comparisonResultId?this.findResult(this.state.comparisonResultId):this.state.result:null}}function gz(e){return e?.trim()||void 0}function gN(e,t){return[t,...e.filter(e=>e.id!==t.id)].sort((e,t)=>t.createdAt-e.createdAt)}function gA(e,t){return e.id===t||e.after.id===t}function gL(e,t){return{blob:e.blob,id:e.id,lastModified:e.lastModified,name:e.name,size:e.size,src:t(e.blob),type:e.type}}function gI(e,t){t&&(gM(e,t.before),gM(e,t.after))}function gM(e,t){gF(t)?.forEach(t=>e.add(t))}function gF(e){return e?.src?.startsWith("blob:")?[e.src]:null}function gD(e){return function(e=5e3){return new Promise(t=>setTimeout(t,e))}(function(e,t=Date.now()){return Math.max(0,5e3-(t-e))}(e))}function gB({dialogPortalContainer:e,language:t,onClose:r,processPhoto:n,productImageSrc:a,productName:o,productPrice:i,productType:s,productUrl:l,tryOnClient:u,apiKey:c,showDialogCloseButton:d=!1}){sY(s);let{i18n:p,t:h}=rT(),f=(0,L.useRef)(null),g=sN(c),m=(0,L.useMemo)(()=>u??sV({apiKey:g}),[u,g]);(0,L.useEffect)(()=>{"string"==typeof t&&p.changeLanguage(t)},[p,t]);let v=function({historyStore:e=gE,objectUrls:t=gO,onRequestClose:r,onRequestFileInput:n,processPhoto:a,productImageSrc:o,productName:i,productPrice:s,productType:l,productUrl:u,tryOnClient:c,resultActions:d=gT,tipStore:p=gR}){var h;let[,f]=(0,L.useReducer)(e=>e+1,0),g=(0,L.useRef)(new Set),m=(0,L.useCallback)(e=>{let r=t.createObjectUrl(e);return r&&g.current.add(r),r},[t]),v=(0,L.useRef)(null);v.current||(v.current=new g_({createObjectUrl:m,productImageSrc:o,productName:i,productPrice:s,productType:l,productUrl:u,tipStore:p}));let y=v.current;y.updateProduct({productImageSrc:o,productName:i,productPrice:s,productType:l,productUrl:u});let b=(0,L.useMemo)(()=>a??function({createObjectUrl:e=function(e){return"function"==typeof URL.createObjectURL?URL.createObjectURL(e):""},fetch:t,productImageSrc:r,productType:n,tryOnClient:a,apiKey:o}){sY(n);let i=a??sV({apiKey:o});return async function(a,o){let s;o?.reportProgress(4);let l=await gi(a,t);if(!l||l.size<=0)throw Error("AI try-on source photo is empty");o?.reportProgress(12);let u=await go(r,t);if(!u||u.size<=0)throw Error("AI try-on product image is missing");o?.reportProgress(22),o?.reportProgress(32);let[c,d]=function(e,t){let r=e?.uploads;if(!Array.isArray(r)||r.length<2)throw Error("Nano Banana upload URL response is missing uploads");return r.slice(0,2).map(e=>{if(null===e||"object"!=typeof e)throw Error("Nano Banana upload URL response is missing uploads");let t=gr(e.key),r=gr(e.uploadUrl);if(!t||!r)throw Error("Nano Banana upload URL response is missing key or uploadUrl");return{key:t,uploadUrl:r}})}(await i.requestUploadUrls(2),2);o?.reportProgress(44),await Promise.all([ga(c.uploadUrl,l,t),ga(d.uploadUrl,u,t)]),o?.reportProgress(62);let p=function(e){if(!e)return()=>{};e(70);let t=Date.now(),r=globalThis.setInterval(()=>{e(70+24*(1-(1-Math.min((Date.now()-t)/45e3,1))**3))},750);return()=>globalThis.clearInterval(r)}(o?.reportProgress);try{s=await i.generateTryOn({category:n,personImage:c.key,productImages:[d.key]},{timeout:9e4})}finally{p()}o?.reportProgress(96);let h=await gl(s);if(h.size<=0)throw Error("AI try-on generation returned an empty image");o?.reportProgress(98);let f=e(h);if(!f)throw Error("AI try-on result image URL cannot be created");return{before:a,after:{blob:h,id:`${a.id}-nano-banana-result`,name:a.name?`${a.name} result`:"AI try-on result",size:h.size,src:f,type:h.type||"image/jpeg"}}}}({createObjectUrl:m,productImageSrc:o,productType:l,tryOnClient:c}),[m,a,o,l,c]),w=(0,L.useCallback)(e=>{if(e){if("request-file-input"===e.type)return void n();r?.()}},[r,n]),k=(0,L.useCallback)(()=>f(),[]),x=(0,L.useCallback)(e=>{let t=e()??null;k(),w(t)},[w,k]),S=(0,L.useCallback)(e=>{y.failHistory(e),k()},[y,k]),C=(0,L.useCallback)(t=>{e.save(t).catch(()=>{S("save-result")})},[e,S]),P=(0,L.useCallback)(t=>{e.delete(t).catch(()=>{S("delete-result")})},[e,S]),E=(0,L.useCallback)(()=>{x(()=>y.choosePhoto())},[x,y]),T=(0,L.useCallback)(async()=>{let e=y.selectedPhoto;if(!e||!y.startGeneration())return;k();let t=Date.now();try{var r;let n=await b(e,{reportProgress:e=>{y.reportGenerationProgress(e),k()}});await gD(t);let a=y.completeGeneration(n);r=g.current,gF(a.before)?.forEach(e=>r.add(e)),gF(a.after)?.forEach(e=>r.add(e)),C(a),k()}catch(e){await gD(t),y.failGeneration(e instanceof Error?e.message:void 0),k()}},[C,b,y,k]),R=(0,L.useCallback)(e=>{let t=y.deleteResult(e);t&&P(t.id),k()},[P,y,k]),O=(0,L.useCallback)(e=>{d.save(y.resolveResultActionPhoto(e))},[d,y]),j=(0,L.useCallback)(e=>{d.share(y.resolveResultActionPhoto(e))},[d,y]),_=(0,L.useCallback)(()=>{c.sendWidgetEvent("add_to_cart_from_widget")},[c]);(0,L.useEffect)(()=>{let t=!1;return async function(){try{let r=await e.list();if(t)return;y.hydrateHistory(r.map(e=>({after:gL(e.after,m),before:gL(e.before,m),createdAt:e.createdAt,id:e.id,productImageSrc:e.productImageSrc,productName:e.productName,productPrice:e.productPrice,productUrl:e.productUrl}))),k()}catch{t||S("hydrate-history")}}(),()=>{t=!0}},[m,e,S,y,k]),(0,L.useEffect)(()=>()=>{var e,r;e=g.current,r=t.revokeObjectUrl,e.forEach(e=>r(e)),e.clear()},[t]),(0,L.useEffect)(()=>{var e,r,n,a,o;let i;a=g.current,e=y.view,r=y.comparison.result,n=y.history,i=new Set,"photo"in e&&gM(i,e.photo),"result"===e.stage&&(gI(i,e.result),e.resultHistory.forEach(e=>gI(i,e))),n.forEach(e=>gI(i,e)),gI(i,r),o=t.revokeObjectUrl,a.forEach(e=>{i.has(e)||(o(e),a.delete(e))})},[t,y.view,y.comparison.result,y.history]);let z=(0,L.useMemo)(()=>(function(e,{addToCart:t,choosePhoto:r,deleteResult:n,generate:a,runSessionCommand:o,saveResult:i,shareResult:s,sync:l}){let u=e.view;switch(u.stage){case"start":return{...u,choosePhoto:r,openHistory:()=>o(()=>e.openHistory())};case"intro":return{...u,continueIntro:()=>o(()=>e.continueIntro())};case"history":return{...u,chooseNew:r,selectResult:t=>o(()=>e.selectHistoryResult(t))};case"confirm":return{...u,changePhoto:r,generate:a};case"error":return{...u,chooseDifferentPhoto:r,retry:u.photo?a:r};case"result":return{...u,addToCart:t,changePhoto:()=>{e.closeMyFits(),l(),r()},deleteResult:n,openComparison:t=>o(()=>e.openComparison(t)),reset:()=>o(()=>e.reset()),saveResult:i,shareResult:s,toggleMyFits:()=>o(()=>e.toggleMyFits())};default:return u}})(y,{addToCart:_,choosePhoto:E,deleteResult:R,generate:()=>void T(),runSessionCommand:x,saveResult:O,shareResult:j,sync:k}),[_,E,R,T,x,O,y,j,k]);return{canGoBack:"start"!==(h=y.view.stage)&&"intro"!==h&&"processing"!==h&&"error"!==h&&"result"!==h,comparison:function(e,{addToCart:t,deleteResult:r,runSessionCommand:n,saveResult:a,shareResult:o}){let i=e.comparison;return{...i,addToCart:t,close:()=>n(()=>e.closeComparison()),deleteResult:()=>{let e=i.result?.id??i.result?.after.id;e&&r(e)},saveResult:()=>a(i.result?.id??i.result?.after.id),shareResult:()=>o(i.result?.id??i.result?.after.id)}}(y,{addToCart:_,deleteResult:R,runSessionCommand:x,saveResult:O,shareResult:j}),goBack:()=>x(()=>y.goBack()),requestClose:()=>x(()=>y.requestClose()),selectFile:e=>x(()=>{y.selectFile(e)}),view:z}}({onRequestClose:r,onRequestFileInput:()=>f.current?.click(),processPhoto:n,productImageSrc:a,productName:o,productPrice:i,productType:s,productUrl:l,tryOnClient:m}),y=v.view.stage,b="result"===v.view.stage&&v.view.myFitsOpen,w=v.canGoBack?(0,A.jsx)(f6,{label:h("back"),onClick:v.goBack}):null,k="result"===v.view.stage&&v.view.canOpenMyFits?(0,A.jsxs)(i4,{"aria-expanded":b,className:"h-9 px-3.5",type:"button",variant:"outline",onClick:v.view.toggleMyFits,children:[h("myFits"),(0,A.jsx)(sQ,{className:i2("!size-3 transition-transform",b&&"rotate-180"),"data-icon":"inline-end"})]}):null;return(0,A.jsxs)(fB,{className:b?"h-dvh max-h-dvh sm:h-230 sm:max-h-[calc(100svh-var(--spacing)*8)]":void 0,"data-ai-try-on-stage":y,children:[(0,A.jsx)(f$,{badge:"history"===y?null:h(function(e){switch(e){case"intro":return"introBadge";case"confirm":return"confirmBadge";case"processing":return"processingBadge";case"error":return"errorBadge";case"result":return"resultBadge";default:return"badge"}}(y)),badgeTone:function(e){switch(e){case"confirm":return"blue";case"result":return"green";case"error":return"red";default:return"gray"}}(y),closeLabel:h("close"),leftSlot:w,middleSlot:k,preferMiddleSlotFirst:"result"===y,showCloseButton:d,onClose:v.requestClose}),(0,A.jsx)("input",{ref:f,accept:"image/jpeg,image/png",className:"hidden",type:"file",onChange:function(e){let t=e.currentTarget.files?.[0];t&&v.selectFile(t),e.currentTarget.value=""}}),(0,A.jsxs)(fU,{children:["start"===v.view.stage?(0,A.jsx)(fJ,{view:v.view}):null,"intro"===v.view.stage?(0,A.jsx)(f0,{view:v.view}):null,"history"===v.view.stage?(0,A.jsx)(f1,{view:v.view}):null,"confirm"===v.view.stage?(0,A.jsx)(f2,{view:v.view}):null,"processing"===v.view.stage?(0,A.jsx)(f3,{view:v.view}):null,"error"===v.view.stage?(0,A.jsx)(f5,{view:v.view}):null,"result"===v.view.stage?(0,A.jsx)(f9,{view:v.view}):null]},y),v.comparison.open&&(0,A.jsx)(fM,{productName:v.comparison.productName,productPrice:v.comparison.productPrice,productUrl:v.comparison.productUrl,portalContainer:e??void 0,result:v.comparison.result,onAddToCart:v.comparison.addToCart,onClose:v.comparison.close,onDeleteResult:v.comparison.deleteResult,onSaveResult:v.comparison.saveResult,onShareResult:v.comparison.shareResult})]})}function g$({defaultOpen:e=!1,language:t,onOpenChange:r,open:n,productImageSrc:a,productName:o,productPrice:i,productType:s,productUrl:l,apiKey:u,...c}){sY(s);let d=(0,L.useMemo)(()=>{let e;return(e=rl.createInstance()).use(oo).use(rO).init({defaultNS:"ns1",fallbackLng:"en",interpolation:{escapeValue:!1},lng:t,resources:sU}),e},[t]),[p,h]=(0,L.useState)(null),[f,g]=(0,L.useState)(e),m=(0,L.useRef)(!1),v=void 0!==n,y=v?n:f,b=sN(u),w=(0,L.useMemo)(()=>sV({apiKey:b}),[b]);function k(e){v||g(e),r?.(e)}return(0,L.useEffect)(()=>{if(!y){m.current=!1;return}m.current||(m.current=!0,w.sendWidgetEvent("widget_opened"))},[y,w]),(0,A.jsxs)(A.Fragment,{children:[(0,q.createPortal)((0,A.jsx)("style",{children:sd.A}),document.head),(0,q.createPortal)((0,A.jsxs)(rG.div,{className:"fixed inset-x-0 bottom-0 w-svw tracking-normal sm:inset-x-auto sm:right-4 sm:bottom-4 sm:w-120",style:{zIndex:0x7fffffff},children:[(0,A.jsx)("style",{children:sq}),(0,A.jsx)("div",{ref:h}),p&&(0,A.jsx)(sc,{defaultTheme:"light",root:p,storageKey:"neurodyn-ai-try-on-theme",children:(0,A.jsx)(rR,{i18n:d,children:(0,A.jsx)(gV,{language:t,open:y,portalContainer:p,productImageSrc:a,productName:o,productPrice:i,productType:s,productUrl:l,tryOnClient:w,onRequestClose:()=>k(!1),onOpenChange:k,...c})})})]}),document.body)]})}function gV({language:e,onRequestClose:t,portalContainer:r,productImageSrc:n,productName:a,productPrice:o,productType:i,productUrl:s,tryOnClient:l,...u}){let{t:c}=rT();return(0,A.jsx)(sr,{...u,children:(0,A.jsxs)(so,{className:"inset-x-0 bottom-0 top-auto block max-h-dvh w-svw max-w-none translate-x-0 translate-y-0 gap-0 overflow-hidden rounded-t-3xl rounded-b-none p-0 sm:inset-x-auto sm:right-4 sm:bottom-4 sm:left-auto sm:max-h-230 sm:w-120 sm:max-w-120 sm:rounded-3xl sm:p-0",contentInsideOverlay:!0,portalContainer:r,showCloseButton:!1,onInteractOutside:e=>{e.preventDefault()},children:[(0,A.jsxs)(si,{className:"sr-only",children:[(0,A.jsx)(ss,{children:c("dialogTitle")}),(0,A.jsx)(sl,{children:c("dialogDescription")})]}),(0,A.jsx)(gB,{dialogPortalContainer:r,language:e,productImageSrc:n,productName:a,productPrice:o,productType:i,productUrl:s,tryOnClient:l,showDialogCloseButton:!0,onClose:t})]})})}sx({baseURL:"https://api.neurodyn.ai/"});var gU=r("../../node_modules/.pnpm/react-dom@19.2.3_react@19.2.3/node_modules/react-dom/client.js");let gH=0,gW="data-neurodyn-ai-try-on-product-type";function gq(e,t){return gK(e.getAttribute(t))}function gK(e){return e?.trim()||void 0}function gG(e,t){let r=gq(e,t);if(!r)throw Error(`AI try-on dialog trigger is missing ${t}`);return r}window.__neurodynAiTryOnDialog?.destroy();let gX=new class{container=null;openState=!1;props=null;root=null;destroy(){this.root?.unmount(),this.root=null,this.container?.remove(),this.container=null,this.props=null,this.openState=!1}open(e){this.props=e,this.openState=!0,this.render()}handleOpenChange=e=>{this.openState=e,this.render()};ensureRoot(){return this.root||(this.container=document.createElement("div"),this.container.id=`neurodyn-ai-try-on-dialog-root-${gH++}`,document.body.appendChild(this.container),this.root=(0,gU.createRoot)(this.container)),this.root}render(){let e=this.ensureRoot();this.props&&this.openState?e.render((0,L.createElement)(g$,{...this.props,open:!0,onOpenChange:this.handleOpenChange})):e.render(null)}};function gY(e){let t=e.target instanceof Element?e.target.closest("[data-neurodyn-ai-try-on-dialog]"):null;t&&gX.open(function(e,t={}){var r,n;let a;return{language:void 0!==t.language?t.language:(r="data-neurodyn-ai-try-on-language","en"===(a=e.getAttribute(r))||"ru"===a?a:void 0),productImageSrc:void 0!==t.productImageSrc?t.productImageSrc:gG(e,"data-neurodyn-ai-try-on-product-image-src"),productName:void 0!==t.productName?t.productName:gG(e,"data-neurodyn-ai-try-on-product-name"),productPrice:void 0!==t.productPrice?gK(t.productPrice):gq(e,"data-neurodyn-ai-try-on-product-price"),productUrl:void 0!==t.productUrl?t.productUrl:gq(e,"data-neurodyn-ai-try-on-product-url"),productType:function(e){if(!sX(e)){let t="string"==typeof e&&e.length>0?` "${e}"`:"";throw Error(`AI try-on product type from ${gW} must be one of: ${sK.join(", ")}; received${t||" no value"}`)}return e}(void 0!==t.productType?t.productType:e.getAttribute(gW)),apiKey:(n=void 0!==t.apiKey?t.apiKey:e.getAttribute("data-neurodyn-ai-try-on-api-key"),n?.trim()||void 0)}}(t))}n={destroy:function(){document.removeEventListener("click",gY),gX.destroy(),window.__neurodynAiTryOnDialog===n&&(window.__neurodynAiTryOnDialog=void 0)}},document.addEventListener("click",gY),window.__neurodynAiTryOnDialog=n})()})();
|