@dss-kit/ui-kit 0.1.9 → 0.1.11
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/components/controls/Button/Button.d.ts +2 -0
- package/dist/components/controls/Button/Button.d.ts.map +1 -1
- package/dist/components/controls/Select/Select.d.ts +1 -1
- package/dist/components/controls/Select/Select.d.ts.map +1 -1
- package/dist/ui-kit.cjs.js +4 -4
- package/dist/ui-kit.cjs.js.map +1 -1
- package/dist/ui-kit.es.js +230 -226
- package/dist/ui-kit.es.js.map +1 -1
- package/package.json +1 -1
package/dist/ui-kit.cjs.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react/jsx-runtime"),E=require("@emotion/css"),g=require("react"),Si=require("react-dom");function yr(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,s.get?s:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const V=yr(g);function vr(t){const{h:e,w:n,m:s,mx:i,my:r,mt:o,mr:a,mb:l,ml:u,p:c,px:h,py:d,pt:f,pr:v,pb:m,pl:x,xGap:b,yGap:w,row:y,flex:_,relative:
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react/jsx-runtime"),E=require("@emotion/css"),g=require("react"),Si=require("react-dom");function yr(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,s.get?s:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const V=yr(g);function vr(t){const{h:e,w:n,m:s,mx:i,my:r,mt:o,mr:a,mb:l,ml:u,p:c,px:h,py:d,pt:f,pr:v,pb:m,pl:x,xGap:b,yGap:w,row:y,flex:_,relative:C,absolute:S,display:P,overflow:T,...R}=t;return{spacers:{h:e,w:n,m:s,mx:i,my:r,mt:o,mr:a,mb:l,ml:u,p:c,px:h,py:d,pt:f,pr:v,pb:m,pl:x,xGap:b,yGap:w,row:y,flex:_,relative:C,absolute:S,overflow:T,...R},rest:R}}const xr=t=>E.css({display:t.display??"flex",flexDirection:t.row?"row":"column",height:t.h==="screen"?"100vh":t.h==="full"?"100%":t.h,width:t.w==="screen"?"100vw":t.w==="full"?"100%":t.w,margin:t.m,marginTop:t.mt??t.my,marginBottom:t.mb??t.my,marginLeft:t.ml??t.mx,marginRight:t.mr??t.mx,padding:t.p,paddingTop:t.pt??t.py,paddingBottom:t.pb??t.py,paddingLeft:t.pl??t.px,paddingRight:t.pr??t.px,gap:t.gap,columnGap:t.xGap,rowGap:t.yGap,justifyContent:t.center?"center":t.justifyContent,alignItems:t.center?"center":t.alignItems,alignSelf:t.alignSelf,borderWidth:t.borderWidth,borderBottomWidth:t.borderBottomWidth,borderColor:t.borderColor,borderRadius:t.borderRadius,zIndex:t.zIndex,overflow:t.overflow,minWidth:t.minWidth,minHeight:t.minHeight,maxWidth:t.maxWidth,maxHeight:t.maxHeight,flex:t.flex===!0?1:t.flex,flexWrap:t.flexWrap,flexGrow:t.flexGrow,flexShrink:t.flexShrink,flexBasis:t.flexBasis,backgroundColor:t.backgroundColor,position:t.absolute?"absolute":t.relative?"relative":"unset",...t.absoluteFill&&{position:"absolute",top:0,right:0,bottom:0,left:0}}),A=g.forwardRef(({className:t,children:e,...n},s)=>{const{spacers:i,rest:r}=vr(n),o=g.useMemo(()=>xr(i),[i]);return p.jsx("div",{ref:s,className:E.cx(o,t),...r,children:e})});A.displayName="Box";const Pi=t=>V.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},V.createElement("path",{d:"M18 6L6 18M6 6L18 18",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}));function br(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ee={exports:{}};/*!
|
|
2
2
|
Copyright (c) 2018 Jed Watson.
|
|
3
3
|
Licensed under the MIT License (MIT), see
|
|
4
4
|
http://jedwatson.github.io/classnames
|
|
5
|
-
*/var ts;function wr(){return ts||(ts=1,(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var r="",o=0;o<arguments.length;o++){var a=arguments[o];a&&(r=i(r,s(a)))}return r}function s(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var o="";for(var a in r)e.call(r,a)&&r[a]&&(o=i(o,a));return o}function i(r,o){return o?r?r+" "+o:r+o:r}t.exports?(n.default=n,t.exports=n):window.classNames=n})()})(Ee)),Ee.exports}var _r=wr();const xt=br(_r),Tr="_rippleOverlay_s2kim_8",Cr="_ripple_s2kim_8",es={rippleOverlay:Tr,ripple:Cr},Ae="button, a, input, label, [role='button'], [data-ripple']";function Sr(t){if(typeof t.composedPath=="function")return t.composedPath();const e=[];let n=t.target;for(;n;)e.push(n),n=n.parentNode||n.host;return e.push(window),e}const ee=g.forwardRef(({color:t="rgba(0,0,0,0.18)",duration:e=1e3,radius:n="auto",className:s},i)=>{const r=g.useRef(null),[o,a]=g.useState([]),l=g.useRef([]),u=g.useRef(1),c=g.useRef(null),h=()=>{l.current.forEach(m=>clearTimeout(m)),l.current=[]},d=g.useCallback((m,x,b,w)=>{const y=b.getBoundingClientRect(),_=n==="auto"?Math.max(y.width,y.height)*2:n,T=m-w.left,S=x-w.top,P=Math.max(0,y.top-w.top),C=Math.max(0,y.left-w.left),R=Math.max(0,w.right-y.right),k=Math.max(0,w.bottom-y.bottom),rt=window.getComputedStyle(b).borderRadius||"0px",gt=u.current++,ht={id:gt,left:T-_/2,top:S-_/2,size:Math.ceil(_),clip:{top:Math.round(P),right:Math.round(R),bottom:Math.round(k),left:Math.round(C)},borderRadius:rt};a(St=>[...St,ht]);const Ct=window.setTimeout(()=>{a(St=>St.filter(N=>N.id!==gt))},e+80);l.current.push(Ct)},[e,n]),f=g.useCallback(m=>{try{if(!r.current)return;const x=r.current,b=x.parentElement;if(!b)return;const w=Sr(m);let y=null;for(const C of w)if(C instanceof Element){if(C===b)break;if(C.matches&&C.matches(Ae)){y=C;break}}if(y||(y=b),y.closest&&(y.closest("[disabled]")||y.getAttribute("aria-disabled")==="true"||y.classList.contains("ripple-disabled")))return;const _=m.target;if(_&&_.closest&&(_.closest("[disabled]")||_.getAttribute?.("aria-disabled")==="true"))return;const T=x.getBoundingClientRect(),{clientX:S}=m,{clientY:P}=m;d(S,P,y,T)}catch{}},[d]),v=g.useCallback(m=>{if(!r.current||!(m.key==="Enter"||m.key===" "))return;const x=r.current,b=x.parentElement;if(!b)return;const w=document.activeElement;let y=null;if(w instanceof Element&&w.matches(Ae)&&(y=w),y||(y=b),y.closest&&(y.closest("[disabled]")||y.getAttribute("aria-disabled")==="true"))return;const _=x.getBoundingClientRect(),T=y.getBoundingClientRect().left+y.getBoundingClientRect().width/2,S=y.getBoundingClientRect().top+y.getBoundingClientRect().height/2;d(T,S,y,_)},[d]);return g.useImperativeHandle(i,()=>({trigger:({center:m=!0,x,y:b}={})=>{const w=r.current;if(!w)return;const y=w.parentElement;if(!y)return;const _=w.getBoundingClientRect(),T=document.activeElement instanceof Element&&document.activeElement.matches(Ae)?document.activeElement:y,S=m?T.getBoundingClientRect().left+T.getBoundingClientRect().width/2:x??_.left+_.width/2,P=m?T.getBoundingClientRect().top+T.getBoundingClientRect().height/2:b??_.top+_.height/2;d(S,P,T,_)}}),[d]),g.useEffect(()=>{const m=r.current;if(!m)return;const x=m.parentElement;if(!x)return;const b=window.getComputedStyle(x);let w=!1;return b.position==="static"&&(x.style.position="relative",w=!0,c.current=x),x.addEventListener("pointerdown",f,!0),x.addEventListener("keydown",v),()=>{x.removeEventListener("pointerdown",f,!0),x.removeEventListener("keydown",v),w&&c.current&&(c.current.style.position="",c.current=null),h()}},[f,v]),g.useEffect(()=>()=>h(),[]),p.jsx("div",{ref:r,className:`${es.rippleOverlay} ${s??""}`,"aria-hidden":!0,children:o.map(m=>p.jsx("span",{className:es.ripple,style:{left:`${m.left}px`,top:`${m.top}px`,width:`${m.size}px`,height:`${m.size}px`,backgroundColor:t,animationDuration:`${e}ms`,clipPath:`inset(${m.clip.top}px ${m.clip.right}px ${m.clip.bottom}px ${m.clip.left}px round ${m.borderRadius})`}},m.id))})});function we(t,e){const{current:n}=g.useRef(t!==void 0),[s,i]=g.useState(e),r=n?t:s,o=g.useCallback(a=>{n||i(a)},[n]);return[r,o]}const Mi=(t,e)=>{const[n,s]=g.useState({top:0,left:0,width:0});return g.useLayoutEffect(()=>{if(!e||!t.current)return;const i=()=>{const o=t.current.getBoundingClientRect();s({top:o.bottom+window.scrollY+4,left:o.left+window.scrollX,width:o.width})};i(),window.addEventListener("resize",i),window.addEventListener("scroll",i,!0);const r=new ResizeObserver(()=>i());return r.observe(t.current),()=>{window.removeEventListener("resize",i),window.removeEventListener("scroll",i,!0),r.disconnect()}},[e,t]),n};function _e(t,e,n,s=""){if(n)return t[`${e}_${n}${s}`]}function qt(t,e,n){return _e(t,e,n,"Size")}const Pr="_button_11ykb_8",Mr="_button_primary_11ykb_19",Er="_button_secondary_11ykb_22",Ar="_button_negative_11ykb_25",Vr="_button_positive_11ykb_28",Rr="_button_warning_11ykb_31",kr="_button_neutral_11ykb_34",Dr="_button_mdSize_11ykb_118",jr="_button_smSize_11ykb_128",Lr="_button_xsSize_11ykb_138",Ve={button:Pr,button_primary:Mr,button_secondary:Er,button_negative:Ar,button_positive:Vr,button_warning:Rr,button_neutral:kr,"button_neutral-white":"_button_neutral-white_11ykb_37","button_no-bg":"_button_no-bg_11ykb_40",button_mdSize:Dr,button_smSize:jr,button_xsSize:Lr};function gn({attr:t,children:e,className:n,type:s="button",color:i="primary",size:r="md",...o}){const a="button";return p.jsxs("button",{...t,...o,type:s,className:xt(Ve[a],n,qt(Ve,a,r),_e(Ve,a,i)),children:[p.jsx(ee,{}),e]})}const Or="_overlay_1udux_8",Ir="_open_1udux_21",Br="_modal_1udux_25",Nr="_closeButton_1udux_42",Fr="_size_lg_1udux_49",zr="_size_md_1udux_52",$r="_size_sm_1udux_55",Ft={overlay:Or,open:Ir,modal:Br,"modal-animation":"_modal-animation_1udux_1",closeButton:Nr,size_lg:Fr,size_md:zr,size_sm:$r},Ei=g.forwardRef(({isOpen:t=!0,onClose:e,overlayClassName:n,modalClassName:s,size:i="md",closeOnBackdropClick:r=!0,closeOnEsc:o=!0,disableBodyScroll:a=!1,showAbsoluteCloseButton:l=!1,children:u},c)=>{g.useEffect(()=>{if(a&&t&&typeof window<"u"&&typeof document<"u"){const f=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=f}}},[t,a]);const h=g.useCallback(f=>{f.key==="Escape"&&e&&e()},[e]);g.useEffect(()=>{if(typeof window<"u"&&typeof document<"u"&&o&&t)return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[t,o,h]);const d=g.useCallback(f=>{f.target===f.currentTarget&&r&&e&&e()},[r,e]);return p.jsx("div",{onClick:d,className:E.cx(Ft.overlay,{[Ft.open]:t},n),children:p.jsxs(A,{ref:c,className:E.cx(Ft.modal,Ft[`size_${i}`],s),children:[l&&p.jsx(gn,{className:Ft.closeButton,onClick:e,color:"neutral",children:p.jsx(Pi,{})}),u]})})});Ei.displayName="Modal";const yn=g.createContext({});function vn(t){const e=g.useRef(null);return e.current===null&&(e.current=t()),e.current}const xn=typeof window<"u",Ai=xn?g.useLayoutEffect:g.useEffect,Te=g.createContext(null);function bn(t,e){t.indexOf(e)===-1&&t.push(e)}function wn(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const lt=(t,e,n)=>n>e?e:n<t?t:n;function Ge(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}let Ot=()=>{},ct=()=>{};process.env.NODE_ENV!=="production"&&(Ot=(t,e,n)=>{!t&&typeof console<"u"&&console.warn(Ge(e,n))},ct=(t,e,n)=>{if(!t)throw new Error(Ge(e,n))});const ut={},Vi=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function Ri(t){return typeof t=="object"&&t!==null}const ki=t=>/^0[^.\s]+$/u.test(t);function _n(t){let e;return()=>(e===void 0&&(e=t()),e)}const et=t=>t,Wr=(t,e)=>n=>e(t(n)),ne=(...t)=>t.reduce(Wr),Xt=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s};class Tn{constructor(){this.subscriptions=[]}add(e){return bn(this.subscriptions,e),()=>wn(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let r=0;r<i;r++){const o=this.subscriptions[r];o&&o(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const it=t=>t*1e3,tt=t=>t/1e3;function Di(t,e){return e?t*(1e3/e):0}const ns=new Set;function Cn(t,e,n){t||ns.has(e)||(console.warn(Ge(e,n)),ns.add(e))}const ji=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Ur=1e-7,Kr=12;function Hr(t,e,n,s,i){let r,o,a=0;do o=e+(n-e)/2,r=ji(o,s,i)-t,r>0?n=o:e=o;while(Math.abs(r)>Ur&&++a<Kr);return o}function se(t,e,n,s){if(t===e&&n===s)return et;const i=r=>Hr(r,0,1,t,n);return r=>r===0||r===1?r:ji(i(r),e,s)}const Li=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Oi=t=>e=>1-t(1-e),Ii=se(.33,1.53,.69,.99),Sn=Oi(Ii),Bi=Li(Sn),Ni=t=>(t*=2)<1?.5*Sn(t):.5*(2-Math.pow(2,-10*(t-1))),Pn=t=>1-Math.sin(Math.acos(t)),Fi=Oi(Pn),zi=Li(Pn),Gr=se(.42,0,1,1),qr=se(0,0,.58,1),$i=se(.42,0,.58,1),Xr=t=>Array.isArray(t)&&typeof t[0]!="number",Wi=t=>Array.isArray(t)&&typeof t[0]=="number",ss={linear:et,easeIn:Gr,easeInOut:$i,easeOut:qr,circIn:Pn,circInOut:zi,circOut:Fi,backIn:Sn,backInOut:Bi,backOut:Ii,anticipate:Ni},Yr=t=>typeof t=="string",is=t=>{if(Wi(t)){ct(t.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,n,s,i]=t;return se(e,n,s,i)}else if(Yr(t))return ct(ss[t]!==void 0,`Invalid easing type '${t}'`,"invalid-easing-type"),ss[t];return t},ae=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Zr(t,e){let n=new Set,s=new Set,i=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){o.has(c)&&(u.schedule(c),t()),c(a)}const u={schedule:(c,h=!1,d=!1)=>{const v=d&&i?n:s;return h&&o.add(c),v.has(c)||v.add(c),c},cancel:c=>{s.delete(c),o.delete(c)},process:c=>{if(a=c,i){r=!0;return}i=!0,[n,s]=[s,n],n.forEach(l),n.clear(),i=!1,r&&(r=!1,u.process(c))}};return u}const Jr=40;function Ui(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=ae.reduce((y,_)=>(y[_]=Zr(r),y),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:h,preRender:d,render:f,postRender:v}=o,m=()=>{const y=ut.useManualTiming?i.timestamp:performance.now();n=!1,ut.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(y-i.timestamp,Jr),1)),i.timestamp=y,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),h.process(i),d.process(i),f.process(i),v.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(m))},x=()=>{n=!0,s=!0,i.isProcessing||t(m)};return{schedule:ae.reduce((y,_)=>{const T=o[_];return y[_]=(S,P=!1,C=!1)=>(n||x(),T.schedule(S,P,C)),y},{}),cancel:y=>{for(let _=0;_<ae.length;_++)o[ae[_]].cancel(y)},state:i,steps:o}}const{schedule:O,cancel:ft,state:W,steps:Re}=Ui(typeof requestAnimationFrame<"u"?requestAnimationFrame:et,!0);let de;function Qr(){de=void 0}const X={now:()=>(de===void 0&&X.set(W.isProcessing||ut.useManualTiming?W.timestamp:performance.now()),de),set:t=>{de=t,queueMicrotask(Qr)}},Ki=t=>e=>typeof e=="string"&&e.startsWith(t),Mn=Ki("--"),ta=Ki("var(--"),En=t=>ta(t)?ea.test(t.split("/*")[0].trim()):!1,ea=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,It={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Yt={...It,transform:t=>lt(0,1,t)},le={...It,default:1},Ut=t=>Math.round(t*1e5)/1e5,An=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function na(t){return t==null}const sa=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Vn=(t,e)=>n=>!!(typeof n=="string"&&sa.test(n)&&n.startsWith(t)||e&&!na(n)&&Object.prototype.hasOwnProperty.call(n,e)),Hi=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,r,o,a]=s.match(An);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},ia=t=>lt(0,255,t),ke={...It,transform:t=>Math.round(ia(t))},bt={test:Vn("rgb","red"),parse:Hi("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+ke.transform(t)+", "+ke.transform(e)+", "+ke.transform(n)+", "+Ut(Yt.transform(s))+")"};function oa(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const qe={test:Vn("#"),parse:oa,transform:bt.transform},ie=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),dt=ie("deg"),ot=ie("%"),M=ie("px"),ra=ie("vh"),aa=ie("vw"),os={...ot,parse:t=>ot.parse(t)/100,transform:t=>ot.transform(t*100)},Mt={test:Vn("hsl","hue"),parse:Hi("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+ot.transform(Ut(e))+", "+ot.transform(Ut(n))+", "+Ut(Yt.transform(s))+")"},z={test:t=>bt.test(t)||qe.test(t)||Mt.test(t),parse:t=>bt.test(t)?bt.parse(t):Mt.test(t)?Mt.parse(t):qe.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?bt.transform(t):Mt.transform(t),getAnimatableNone:t=>{const e=z.parse(t);return e.alpha=0,z.transform(e)}},la=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function ca(t){return isNaN(t)&&typeof t=="string"&&(t.match(An)?.length||0)+(t.match(la)?.length||0)>0}const Gi="number",qi="color",ua="var",ha="var(",rs="${}",da=/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 Zt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const a=e.replace(da,l=>(z.test(l)?(s.color.push(r),i.push(qi),n.push(z.parse(l))):l.startsWith(ha)?(s.var.push(r),i.push(ua),n.push(l)):(s.number.push(r),i.push(Gi),n.push(parseFloat(l))),++r,rs)).split(rs);return{values:n,split:a,indexes:s,types:i}}function Xi(t){return Zt(t).values}function Yi(t){const{split:e,types:n}=Zt(t),s=e.length;return i=>{let r="";for(let o=0;o<s;o++)if(r+=e[o],i[o]!==void 0){const a=n[o];a===Gi?r+=Ut(i[o]):a===qi?r+=z.transform(i[o]):r+=i[o]}return r}}const fa=t=>typeof t=="number"?0:z.test(t)?z.getAnimatableNone(t):t;function ma(t){const e=Xi(t);return Yi(t)(e.map(fa))}const mt={test:ca,parse:Xi,createTransformer:Yi,getAnimatableNone:ma};function De(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function pa({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,r=0,o=0;if(!e)i=r=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=De(l,a,t+1/3),r=De(l,a,t),o=De(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}function ge(t,e){return n=>n>0?e:t}const B=(t,e,n)=>t+(e-t)*n,je=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},ga=[qe,bt,Mt],ya=t=>ga.find(e=>e.test(t));function as(t){const e=ya(t);if(Ot(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return!1;let n=e.parse(t);return e===Mt&&(n=pa(n)),n}const ls=(t,e)=>{const n=as(t),s=as(e);if(!n||!s)return ge(t,e);const i={...n};return r=>(i.red=je(n.red,s.red,r),i.green=je(n.green,s.green,r),i.blue=je(n.blue,s.blue,r),i.alpha=B(n.alpha,s.alpha,r),bt.transform(i))},Xe=new Set(["none","hidden"]);function va(t,e){return Xe.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function xa(t,e){return n=>B(t,e,n)}function Rn(t){return typeof t=="number"?xa:typeof t=="string"?En(t)?ge:z.test(t)?ls:_a:Array.isArray(t)?Zi:typeof t=="object"?z.test(t)?ls:ba:ge}function Zi(t,e){const n=[...t],s=n.length,i=t.map((r,o)=>Rn(r)(r,e[o]));return r=>{for(let o=0;o<s;o++)n[o]=i[o](r);return n}}function ba(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=Rn(t[i])(t[i],e[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}}function wa(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const r=e.types[i],o=t.indexes[r][s[r]],a=t.values[o]??0;n[i]=a,s[r]++}return n}const _a=(t,e)=>{const n=mt.createTransformer(e),s=Zt(t),i=Zt(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?Xe.has(t)&&!i.values.length||Xe.has(e)&&!s.values.length?va(t,e):ne(Zi(wa(s,i),i.values),n):(Ot(!0,`Complex values '${t}' and '${e}' 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"),ge(t,e))};function Ji(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?B(t,e,n):Rn(t)(t,e)}const Ta=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>O.update(e,n),stop:()=>ft(e),now:()=>W.isProcessing?W.timestamp:X.now()}},Qi=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let r=0;r<i;r++)s+=Math.round(t(r/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},ye=2e4;function kn(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<ye;)e+=n,s=t.next(e);return e>=ye?1/0:e}function Ca(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(kn(s),ye);return{type:"keyframes",ease:r=>s.next(i*r).value/e,duration:tt(i)}}const Sa=5;function to(t,e,n){const s=Math.max(e-Sa,0);return Di(n-t(s),e-s)}const I={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Le=.001;function Pa({duration:t=I.duration,bounce:e=I.bounce,velocity:n=I.velocity,mass:s=I.mass}){let i,r;Ot(t<=it(I.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-e;o=lt(I.minDamping,I.maxDamping,o),t=lt(I.minDuration,I.maxDuration,tt(t)),o<1?(i=u=>{const c=u*o,h=c*t,d=c-n,f=Ye(u,o),v=Math.exp(-h);return Le-d/f*v},r=u=>{const h=u*o*t,d=h*n+n,f=Math.pow(o,2)*Math.pow(u,2)*t,v=Math.exp(-h),m=Ye(Math.pow(u,2),o);return(-i(u)+Le>0?-1:1)*((d-f)*v)/m}):(i=u=>{const c=Math.exp(-u*t),h=(u-n)*t+1;return-Le+c*h},r=u=>{const c=Math.exp(-u*t),h=(n-u)*(t*t);return c*h});const a=5/t,l=Ea(i,r,a);if(t=it(t),isNaN(l))return{stiffness:I.stiffness,damping:I.damping,duration:t};{const u=Math.pow(l,2)*s;return{stiffness:u,damping:o*2*Math.sqrt(s*u),duration:t}}}const Ma=12;function Ea(t,e,n){let s=n;for(let i=1;i<Ma;i++)s=s-t(s)/e(s);return s}function Ye(t,e){return t*Math.sqrt(1-e*e)}const Aa=["duration","bounce"],Va=["stiffness","damping","mass"];function cs(t,e){return e.some(n=>t[n]!==void 0)}function Ra(t){let e={velocity:I.velocity,stiffness:I.stiffness,damping:I.damping,mass:I.mass,isResolvedFromDuration:!1,...t};if(!cs(t,Va)&&cs(t,Aa))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,r=2*lt(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:I.mass,stiffness:i,damping:r}}else{const n=Pa(t);e={...e,...n,mass:I.mass},e.isResolvedFromDuration=!0}return e}function ve(t=I.visualDuration,e=I.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:l,damping:u,mass:c,duration:h,velocity:d,isResolvedFromDuration:f}=Ra({...n,velocity:-tt(n.velocity||0)}),v=d||0,m=u/(2*Math.sqrt(l*c)),x=o-r,b=tt(Math.sqrt(l/c)),w=Math.abs(x)<5;s||(s=w?I.restSpeed.granular:I.restSpeed.default),i||(i=w?I.restDelta.granular:I.restDelta.default);let y;if(m<1){const T=Ye(b,m);y=S=>{const P=Math.exp(-m*b*S);return o-P*((v+m*b*x)/T*Math.sin(T*S)+x*Math.cos(T*S))}}else if(m===1)y=T=>o-Math.exp(-b*T)*(x+(v+b*x)*T);else{const T=b*Math.sqrt(m*m-1);y=S=>{const P=Math.exp(-m*b*S),C=Math.min(T*S,300);return o-P*((v+m*b*x)*Math.sinh(C)+T*x*Math.cosh(C))/T}}const _={calculatedDuration:f&&h||null,next:T=>{const S=y(T);if(f)a.done=T>=h;else{let P=T===0?v:0;m<1&&(P=T===0?it(v):to(y,T,S));const C=Math.abs(P)<=s,R=Math.abs(o-S)<=i;a.done=C&&R}return a.value=a.done?o:S,a},toString:()=>{const T=Math.min(kn(_),ye),S=Qi(P=>_.next(T*P).value,T,30);return T+"ms "+S},toTransition:()=>{}};return _}ve.applyToOptions=t=>{const e=Ca(t,100,ve);return t.ease=e.ease,t.duration=it(e.duration),t.type="keyframes",t};function Ze({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],d={done:!1,value:h},f=C=>a!==void 0&&C<a||l!==void 0&&C>l,v=C=>a===void 0?l:l===void 0||Math.abs(a-C)<Math.abs(l-C)?a:l;let m=n*e;const x=h+m,b=o===void 0?x:o(x);b!==x&&(m=b-h);const w=C=>-m*Math.exp(-C/s),y=C=>b+w(C),_=C=>{const R=w(C),k=y(C);d.done=Math.abs(R)<=u,d.value=d.done?b:k};let T,S;const P=C=>{f(d.value)&&(T=C,S=ve({keyframes:[d.value,v(d.value)],velocity:to(y,C,d.value),damping:i,stiffness:r,restDelta:u,restSpeed:c}))};return P(0),{calculatedDuration:null,next:C=>{let R=!1;return!S&&T===void 0&&(R=!0,_(C),P(C)),T!==void 0&&C>=T?S.next(C-T):(!R&&_(C),d)}}}function ka(t,e,n){const s=[],i=n||ut.mix||Ji,r=t.length-1;for(let o=0;o<r;o++){let a=i(t[o],t[o+1]);if(e){const l=Array.isArray(e)?e[o]||et:e;a=ne(l,a)}s.push(a)}return s}function Da(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const r=t.length;if(ct(r===e.length,"Both input and output ranges must be the same length","range-length"),r===1)return()=>e[0];if(r===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=ka(e,s,i),l=a.length,u=c=>{if(o&&c<t[0])return e[0];let h=0;if(l>1)for(;h<t.length-2&&!(c<t[h+1]);h++);const d=Xt(t[h],t[h+1],c);return a[h](d)};return n?c=>u(lt(t[0],t[r-1],c)):u}function ja(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=Xt(0,e,s);t.push(B(n,1,i))}}function La(t){const e=[0];return ja(e,t.length-1),e}function Oa(t,e){return t.map(n=>n*e)}function Ia(t,e){return t.map(()=>e||$i).splice(0,t.length-1)}function Et({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Xr(s)?s.map(is):is(s),r={done:!1,value:e[0]},o=Oa(n&&n.length===e.length?n:La(e),t),a=Da(o,e,{ease:Array.isArray(i)?i:Ia(e,i)});return{calculatedDuration:t,next:l=>(r.value=a(l),r.done=l>=t,r)}}const Ba=t=>t!==null;function Dn(t,{repeat:e,repeatType:n="loop"},s,i=1){const r=t.filter(Ba),a=i<0||e&&n!=="loop"&&e%2===1?0:r.length-1;return!a||s===void 0?r[a]:s}const Na={decay:Ze,inertia:Ze,tween:Et,keyframes:Et,spring:ve};function eo(t){typeof t.type=="string"&&(t.type=Na[t.type])}class jn{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const Fa=t=>t/100;class Ln extends jn{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==X.now()&&this.tick(X.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;eo(e);const{type:n=Et,repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=e;let{keyframes:a}=e;const l=n||Et;process.env.NODE_ENV!=="production"&&l!==Et&&ct(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==Et&&typeof a[0]!="number"&&(this.mixKeyframes=ne(Fa,Ji(a[0],a[1])),a=[0,100]);const u=l({...e,keyframes:a});r==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=kn(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=u}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:s,totalDuration:i,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return s.next(0);const{delay:u=0,keyframes:c,repeat:h,repeatType:d,repeatDelay:f,type:v,onUpdate:m,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const b=this.currentTime-u*(this.playbackSpeed>=0?1:-1),w=this.playbackSpeed>=0?b<0:b>i;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let y=this.currentTime,_=s;if(h){const C=Math.min(this.currentTime,i)/a;let R=Math.floor(C),k=C%1;!k&&C>=1&&(k=1),k===1&&R--,R=Math.min(R,h+1),!!(R%2)&&(d==="reverse"?(k=1-k,f&&(k-=f/a)):d==="mirror"&&(_=o)),y=lt(0,1,k)*a}const T=w?{done:!1,value:c[0]}:_.next(y);r&&(T.value=r(T.value));let{done:S}=T;!w&&l!==null&&(S=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const P=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&S);return P&&v!==Ze&&(T.value=Dn(c,this.options,x,this.speed)),m&&m(T.value),P&&this.finish(),T}then(e,n){return this.finished.then(e,n)}get duration(){return tt(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+tt(e)}get time(){return tt(this.currentTime)}set time(e){e=it(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(X.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=tt(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=Ta,startTime:n}=this.options;this.driver||(this.driver=e(i=>this.tick(i))),this.options.onPlay?.();const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(X.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&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}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 za(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const wt=t=>t*180/Math.PI,Je=t=>{const e=wt(Math.atan2(t[1],t[0]));return Qe(e)},$a={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Je,rotateZ:Je,skewX:t=>wt(Math.atan(t[1])),skewY:t=>wt(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Qe=t=>(t=t%360,t<0&&(t+=360),t),us=Je,hs=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),ds=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Wa={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:hs,scaleY:ds,scale:t=>(hs(t)+ds(t))/2,rotateX:t=>Qe(wt(Math.atan2(t[6],t[5]))),rotateY:t=>Qe(wt(Math.atan2(-t[2],t[0]))),rotateZ:us,rotate:us,skewX:t=>wt(Math.atan(t[4])),skewY:t=>wt(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function tn(t){return t.includes("scale")?1:0}function en(t,e){if(!t||t==="none")return tn(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Wa,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=$a,i=a}if(!i)return tn(e);const r=s[e],o=i[1].split(",").map(Ka);return typeof r=="function"?r(o):o[r]}const Ua=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return en(n,e)};function Ka(t){return parseFloat(t.trim())}const Bt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Nt=new Set(Bt),fs=t=>t===It||t===M,Ha=new Set(["x","y","z"]),Ga=Bt.filter(t=>!Ha.has(t));function qa(t){const e=[];return Ga.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const _t={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>en(e,"x"),y:(t,{transform:e})=>en(e,"y")};_t.translateX=_t.x;_t.translateY=_t.y;const Tt=new Set;let nn=!1,sn=!1,on=!1;function no(){if(sn){const t=Array.from(Tt).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=qa(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([r,o])=>{s.getValue(r)?.set(o)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}sn=!1,nn=!1,Tt.forEach(t=>t.complete(on)),Tt.clear()}function so(){Tt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(sn=!0)})}function Xa(){on=!0,so(),no(),on=!1}class On{constructor(e,n,s,i,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Tt.add(this),nn||(nn=!0,O.read(so),O.resolveKeyframes(no))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const r=i?.get(),o=e[e.length-1];if(r!==void 0)e[0]=r;else if(s&&n){const a=s.readValue(n,o);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=o),i&&r===void 0&&i.set(e[0])}za(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Tt.delete(this)}cancel(){this.state==="scheduled"&&(Tt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Ya=t=>t.startsWith("--");function Za(t,e,n){Ya(e)?t.style.setProperty(e,n):t.style[e]=n}const Ja=_n(()=>window.ScrollTimeline!==void 0),Qa={};function tl(t,e){const n=_n(t);return()=>Qa[e]??n()}const io=tl(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Wt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,ms={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Wt([0,.65,.55,1]),circOut:Wt([.55,0,1,.45]),backIn:Wt([.31,.01,.66,-.59]),backOut:Wt([.33,1.53,.69,.99])};function oo(t,e){if(t)return typeof t=="function"?io()?Qi(t,e):"ease-out":Wi(t)?Wt(t):Array.isArray(t)?t.map(n=>oo(n,e)||ms.easeOut):ms[t]}function el(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[e]:n};l&&(c.offset=l);const h=oo(a,i);Array.isArray(h)&&(c.easing=h);const d={delay:s,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"};return u&&(d.pseudoElement=u),t.animate(c,d)}function ro(t){return typeof t=="function"&&"applyToOptions"in t}function nl({type:t,...e}){return ro(t)&&io()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class sl extends jn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=e,ct(typeof e.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=nl(e);this.animation=el(n,s,i,u,r),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const c=Dn(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):Za(n,s,c),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return tt(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+tt(e)}get time(){return tt(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=it(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&Ja()?(this.animation.timeline=e,et):n(this)}}const ao={anticipate:Ni,backInOut:Bi,circInOut:zi};function il(t){return t in ao}function ol(t){typeof t.ease=="string"&&il(t.ease)&&(t.ease=ao[t.ease])}const ps=10;class rl extends sl{constructor(e){ol(e),eo(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:s,onComplete:i,element:r,...o}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new Ln({...o,autoplay:!1}),l=it(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-ps).value,a.sample(l).value,ps),a.stop()}}const gs=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(mt.test(t)||t==="0")&&!t.startsWith("url("));function al(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function ll(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const r=t[t.length-1],o=gs(i,e),a=gs(r,e);return Ot(o===a,`You are trying to animate ${e} from "${i}" to "${r}". "${o?r:i}" is not an animatable value.`,"value-not-animatable"),!o||!a?!1:al(t)||(n==="spring"||ro(n))&&s}function rn(t){t.duration=0,t.type="keyframes"}const cl=new Set(["opacity","clipPath","filter","transform"]),ul=_n(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function hl(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:r,type:o}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=e.owner.getProps();return ul()&&n&&cl.has(n)&&(n!=="transform"||!u)&&!l&&!s&&i!=="mirror"&&r!==0&&o!=="inertia"}const dl=40;class fl extends jn{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:l,motionValue:u,element:c,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=X.now();const d={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:r,repeatType:o,name:l,motionValue:u,element:c,...h},f=c?.KeyframeResolver||On;this.keyframeResolver=new f(a,(v,m,x)=>this.onKeyframesResolved(v,m,d,!x),l,u,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,s,i){this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:l,isHandoff:u,onUpdate:c}=s;this.resolvedAt=X.now(),ll(e,r,o,a)||((ut.instantAnimations||!l)&&c?.(Dn(e,s,n)),e[0]=e[e.length-1],rn(s),s.repeat=0);const d={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>dl?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},f=!u&&hl(d)?new rl({...d,element:d.motionValue.owner.current}):new Ln(d);f.finished.then(()=>this.notifyFinished()).catch(et),this.pendingTimeline&&(this.stopTimeline=f.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=f}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Xa()),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()}}const ml=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function pl(t){const e=ml.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}const gl=4;function lo(t,e,n=1){ct(n<=gl,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,i]=pl(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const o=r.trim();return Vi(o)?parseFloat(o):o}return En(i)?lo(i,e,n+1):i}function In(t,e){return t?.[e]??t?.default??t}const co=new Set(["width","height","top","left","right","bottom",...Bt]),yl={test:t=>t==="auto",parse:t=>t},uo=t=>e=>e.test(t),ho=[It,M,ot,dt,aa,ra,yl],ys=t=>ho.find(uo(t));function vl(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||ki(t):!0}const xl=new Set(["brightness","contrast","saturate","opacity"]);function bl(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(An)||[];if(!s)return t;const i=n.replace(s,"");let r=xl.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const wl=/\b([a-z-]*)\(.*?\)/gu,an={...mt,getAnimatableNone:t=>{const e=t.match(wl);return e?e.map(bl).join(" "):t}},vs={...It,transform:Math.round},_l={rotate:dt,rotateX:dt,rotateY:dt,rotateZ:dt,scale:le,scaleX:le,scaleY:le,scaleZ:le,skew:dt,skewX:dt,skewY:dt,distance:M,translateX:M,translateY:M,translateZ:M,x:M,y:M,z:M,perspective:M,transformPerspective:M,opacity:Yt,originX:os,originY:os,originZ:M},Bn={borderWidth:M,borderTopWidth:M,borderRightWidth:M,borderBottomWidth:M,borderLeftWidth:M,borderRadius:M,radius:M,borderTopLeftRadius:M,borderTopRightRadius:M,borderBottomRightRadius:M,borderBottomLeftRadius:M,width:M,maxWidth:M,height:M,maxHeight:M,top:M,right:M,bottom:M,left:M,padding:M,paddingTop:M,paddingRight:M,paddingBottom:M,paddingLeft:M,margin:M,marginTop:M,marginRight:M,marginBottom:M,marginLeft:M,backgroundPositionX:M,backgroundPositionY:M,..._l,zIndex:vs,fillOpacity:Yt,strokeOpacity:Yt,numOctaves:vs},Tl={...Bn,color:z,backgroundColor:z,outlineColor:z,fill:z,stroke:z,borderColor:z,borderTopColor:z,borderRightColor:z,borderBottomColor:z,borderLeftColor:z,filter:an,WebkitFilter:an},fo=t=>Tl[t];function mo(t,e){let n=fo(t);return n!==an&&(n=mt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Cl=new Set(["auto","none","0"]);function Sl(t,e,n){let s=0,i;for(;s<t.length&&!i;){const r=t[s];typeof r=="string"&&!Cl.has(r)&&Zt(r).values.length&&(i=t[s]),s++}if(i&&n)for(const r of e)t[r]=mo(n,i)}class Pl extends On{constructor(e,n,s,i,r){super(e,n,s,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let u=e[l];if(typeof u=="string"&&(u=u.trim(),En(u))){const c=lo(u,n.current);c!==void 0&&(e[l]=c),l===e.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!co.has(s)||e.length!==2)return;const[i,r]=e,o=ys(i),a=ys(r);if(o!==a)if(fs(o)&&fs(a))for(let l=0;l<e.length;l++){const u=e[l];typeof u=="string"&&(e[l]=parseFloat(u))}else _t[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||vl(e[i]))&&s.push(i);s.length&&Sl(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e||!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=_t[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const r=s.length-1,o=s[r];s[r]=_t[n](e.measureViewportBox(),window.getComputedStyle(e.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,l])=>{e.getValue(a).set(l)}),this.resolveNoneKeyframes()}}function Ml(t,e,n){if(t instanceof EventTarget)return[t];if(typeof t=="string"){let s=document;const i=n?.[t]??s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}const po=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function go(t){return Ri(t)&&"offsetHeight"in t}const xs=30,El=t=>!isNaN(parseFloat(t));class Al{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=X.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=X.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=El(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!=="production"&&Cn(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Tn);const s=this.events[e].add(n);return e==="change"?()=>{s(),O.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&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 this.current}getPrevious(){return this.prev}getVelocity(){const e=X.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>xs)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,xs);return Di(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),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 jt(t,e){return new Al(t,e)}const{schedule:Nn}=Ui(queueMicrotask,!1),st={x:!1,y:!1};function yo(){return st.x||st.y}function Vl(t){return t==="x"||t==="y"?st[t]?null:(st[t]=!0,()=>{st[t]=!1}):st.x||st.y?null:(st.x=st.y=!0,()=>{st.x=st.y=!1})}function vo(t,e){const n=Ml(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function bs(t){return!(t.pointerType==="touch"||yo())}function Rl(t,e,n={}){const[s,i,r]=vo(t,n),o=a=>{if(!bs(a))return;const{target:l}=a,u=e(l,a);if(typeof u!="function"||!l)return;const c=h=>{bs(h)&&(u(h),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,i)};return s.forEach(a=>{a.addEventListener("pointerenter",o,i)}),r}const xo=(t,e)=>e?t===e?!0:xo(t,e.parentElement):!1,Fn=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,kl=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Dl(t){return kl.has(t.tagName)||t.tabIndex!==-1}const fe=new WeakSet;function ws(t){return e=>{e.key==="Enter"&&t(e)}}function Oe(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const jl=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=ws(()=>{if(fe.has(n))return;Oe(n,"down");const i=ws(()=>{Oe(n,"up")}),r=()=>Oe(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",r,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function _s(t){return Fn(t)&&!yo()}function Ll(t,e,n={}){const[s,i,r]=vo(t,n),o=a=>{const l=a.currentTarget;if(!_s(a))return;fe.add(l);const u=e(l,a),c=(f,v)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",d),fe.has(l)&&fe.delete(l),_s(f)&&typeof u=="function"&&u(f,{success:v})},h=f=>{c(f,l===window||l===document||n.useGlobalTarget||xo(l,f.target))},d=f=>{c(f,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",d,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),go(a)&&(a.addEventListener("focus",u=>jl(u,i)),!Dl(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}function bo(t){return Ri(t)&&"ownerSVGElement"in t}function Ol(t){return bo(t)&&t.tagName==="svg"}const K=t=>!!(t&&t.getVelocity),Il=[...ho,z,mt],Bl=t=>Il.find(uo(t)),zn=g.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function Ts(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Nl(...t){return e=>{let n=!1;const s=t.map(i=>{const r=Ts(i,e);return!n&&typeof r=="function"&&(n=!0),r});if(n)return()=>{for(let i=0;i<s.length;i++){const r=s[i];typeof r=="function"?r():Ts(t[i],null)}}}}function Fl(...t){return V.useCallback(Nl(...t),t)}class zl extends V.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const s=n.offsetParent,i=go(s)&&s.offsetWidth||0,r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft,r.right=i-r.width-r.left}return null}componentDidUpdate(){}render(){return this.props.children}}function $l({children:t,isPresent:e,anchorX:n,root:s}){const i=g.useId(),r=g.useRef(null),o=g.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=g.useContext(zn),l=Fl(r,t?.ref);return g.useInsertionEffect(()=>{const{width:u,height:c,top:h,left:d,right:f}=o.current;if(e||!r.current||!u||!c)return;const v=n==="left"?`left: ${d}`:`right: ${f}`;r.current.dataset.motionPopId=i;const m=document.createElement("style");a&&(m.nonce=a);const x=s??document.head;return x.appendChild(m),m.sheet&&m.sheet.insertRule(`
|
|
5
|
+
*/var ts;function wr(){return ts||(ts=1,(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var r="",o=0;o<arguments.length;o++){var a=arguments[o];a&&(r=i(r,s(a)))}return r}function s(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var o="";for(var a in r)e.call(r,a)&&r[a]&&(o=i(o,a));return o}function i(r,o){return o?r?r+" "+o:r+o:r}t.exports?(n.default=n,t.exports=n):window.classNames=n})()})(Ee)),Ee.exports}var _r=wr();const xt=br(_r),Cr="_rippleOverlay_s2kim_8",Tr="_ripple_s2kim_8",es={rippleOverlay:Cr,ripple:Tr},Ae="button, a, input, label, [role='button'], [data-ripple']";function Sr(t){if(typeof t.composedPath=="function")return t.composedPath();const e=[];let n=t.target;for(;n;)e.push(n),n=n.parentNode||n.host;return e.push(window),e}const ee=g.forwardRef(({color:t="rgba(0,0,0,0.18)",duration:e=1e3,radius:n="auto",className:s},i)=>{const r=g.useRef(null),[o,a]=g.useState([]),l=g.useRef([]),u=g.useRef(1),c=g.useRef(null),h=()=>{l.current.forEach(m=>clearTimeout(m)),l.current=[]},d=g.useCallback((m,x,b,w)=>{const y=b.getBoundingClientRect(),_=n==="auto"?Math.max(y.width,y.height)*2:n,C=m-w.left,S=x-w.top,P=Math.max(0,y.top-w.top),T=Math.max(0,y.left-w.left),R=Math.max(0,w.right-y.right),k=Math.max(0,w.bottom-y.bottom),rt=window.getComputedStyle(b).borderRadius||"0px",at=u.current++,dt={id:at,left:C-_/2,top:S-_/2,size:Math.ceil(_),clip:{top:Math.round(P),right:Math.round(R),bottom:Math.round(k),left:Math.round(T)},borderRadius:rt};a(St=>[...St,dt]);const Tt=window.setTimeout(()=>{a(St=>St.filter(N=>N.id!==at))},e+80);l.current.push(Tt)},[e,n]),f=g.useCallback(m=>{try{if(!r.current)return;const x=r.current,b=x.parentElement;if(!b)return;const w=Sr(m);let y=null;for(const T of w)if(T instanceof Element){if(T===b)break;if(T.matches&&T.matches(Ae)){y=T;break}}if(y||(y=b),y.closest&&(y.closest("[disabled]")||y.getAttribute("aria-disabled")==="true"||y.classList.contains("ripple-disabled")))return;const _=m.target;if(_&&_.closest&&(_.closest("[disabled]")||_.getAttribute?.("aria-disabled")==="true"))return;const C=x.getBoundingClientRect(),{clientX:S}=m,{clientY:P}=m;d(S,P,y,C)}catch{}},[d]),v=g.useCallback(m=>{if(!r.current||!(m.key==="Enter"||m.key===" "))return;const x=r.current,b=x.parentElement;if(!b)return;const w=document.activeElement;let y=null;if(w instanceof Element&&w.matches(Ae)&&(y=w),y||(y=b),y.closest&&(y.closest("[disabled]")||y.getAttribute("aria-disabled")==="true"))return;const _=x.getBoundingClientRect(),C=y.getBoundingClientRect().left+y.getBoundingClientRect().width/2,S=y.getBoundingClientRect().top+y.getBoundingClientRect().height/2;d(C,S,y,_)},[d]);return g.useImperativeHandle(i,()=>({trigger:({center:m=!0,x,y:b}={})=>{const w=r.current;if(!w)return;const y=w.parentElement;if(!y)return;const _=w.getBoundingClientRect(),C=document.activeElement instanceof Element&&document.activeElement.matches(Ae)?document.activeElement:y,S=m?C.getBoundingClientRect().left+C.getBoundingClientRect().width/2:x??_.left+_.width/2,P=m?C.getBoundingClientRect().top+C.getBoundingClientRect().height/2:b??_.top+_.height/2;d(S,P,C,_)}}),[d]),g.useEffect(()=>{const m=r.current;if(!m)return;const x=m.parentElement;if(!x)return;const b=window.getComputedStyle(x);let w=!1;return b.position==="static"&&(x.style.position="relative",w=!0,c.current=x),x.addEventListener("pointerdown",f,!0),x.addEventListener("keydown",v),()=>{x.removeEventListener("pointerdown",f,!0),x.removeEventListener("keydown",v),w&&c.current&&(c.current.style.position="",c.current=null),h()}},[f,v]),g.useEffect(()=>()=>h(),[]),p.jsx("div",{ref:r,className:`${es.rippleOverlay} ${s??""}`,"aria-hidden":!0,children:o.map(m=>p.jsx("span",{className:es.ripple,style:{left:`${m.left}px`,top:`${m.top}px`,width:`${m.size}px`,height:`${m.size}px`,backgroundColor:t,animationDuration:`${e}ms`,clipPath:`inset(${m.clip.top}px ${m.clip.right}px ${m.clip.bottom}px ${m.clip.left}px round ${m.borderRadius})`}},m.id))})});function we(t,e){const{current:n}=g.useRef(t!==void 0),[s,i]=g.useState(e),r=n?t:s,o=g.useCallback(a=>{n||i(a)},[n]);return[r,o]}const Mi=(t,e)=>{const[n,s]=g.useState({top:0,left:0,width:0});return g.useLayoutEffect(()=>{if(!e||!t.current)return;const i=()=>{const o=t.current.getBoundingClientRect();s({top:o.bottom+window.scrollY+4,left:o.left+window.scrollX,width:o.width})};i(),window.addEventListener("resize",i),window.addEventListener("scroll",i,!0);const r=new ResizeObserver(()=>i());return r.observe(t.current),()=>{window.removeEventListener("resize",i),window.removeEventListener("scroll",i,!0),r.disconnect()}},[e,t]),n};function _e(t,e,n,s=""){if(n)return t[`${e}_${n}${s}`]}function qt(t,e,n){return _e(t,e,n,"Size")}const Pr="_button_11ykb_8",Mr="_button_primary_11ykb_19",Er="_button_secondary_11ykb_22",Ar="_button_negative_11ykb_25",Vr="_button_positive_11ykb_28",Rr="_button_warning_11ykb_31",kr="_button_neutral_11ykb_34",Dr="_button_mdSize_11ykb_118",jr="_button_smSize_11ykb_128",Lr="_button_xsSize_11ykb_138",Ve={button:Pr,button_primary:Mr,button_secondary:Er,button_negative:Ar,button_positive:Vr,button_warning:Rr,button_neutral:kr,"button_neutral-white":"_button_neutral-white_11ykb_37","button_no-bg":"_button_no-bg_11ykb_40",button_mdSize:Dr,button_smSize:jr,button_xsSize:Lr};function gn({attr:t,children:e,className:n,type:s="button",color:i="primary",size:r="md",...o}){const a="button";return p.jsxs("button",{...t,...o,type:s,className:xt(Ve[a],n,qt(Ve,a,r),_e(Ve,a,i)),children:[p.jsx(ee,{}),e]})}const Or="_overlay_1udux_8",Ir="_open_1udux_21",Br="_modal_1udux_25",Nr="_closeButton_1udux_42",Fr="_size_lg_1udux_49",zr="_size_md_1udux_52",$r="_size_sm_1udux_55",Ft={overlay:Or,open:Ir,modal:Br,"modal-animation":"_modal-animation_1udux_1",closeButton:Nr,size_lg:Fr,size_md:zr,size_sm:$r},Ei=g.forwardRef(({isOpen:t=!0,onClose:e,overlayClassName:n,modalClassName:s,size:i="md",closeOnBackdropClick:r=!0,closeOnEsc:o=!0,disableBodyScroll:a=!1,showAbsoluteCloseButton:l=!1,children:u},c)=>{g.useEffect(()=>{if(a&&t&&typeof window<"u"&&typeof document<"u"){const f=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=f}}},[t,a]);const h=g.useCallback(f=>{f.key==="Escape"&&e&&e()},[e]);g.useEffect(()=>{if(typeof window<"u"&&typeof document<"u"&&o&&t)return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[t,o,h]);const d=g.useCallback(f=>{f.target===f.currentTarget&&r&&e&&e()},[r,e]);return p.jsx("div",{onClick:d,className:E.cx(Ft.overlay,{[Ft.open]:t},n),children:p.jsxs(A,{ref:c,className:E.cx(Ft.modal,Ft[`size_${i}`],s),children:[l&&p.jsx(gn,{className:Ft.closeButton,onClick:e,color:"neutral",children:p.jsx(Pi,{})}),u]})})});Ei.displayName="Modal";const yn=g.createContext({});function vn(t){const e=g.useRef(null);return e.current===null&&(e.current=t()),e.current}const xn=typeof window<"u",Ai=xn?g.useLayoutEffect:g.useEffect,Ce=g.createContext(null);function bn(t,e){t.indexOf(e)===-1&&t.push(e)}function wn(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const ct=(t,e,n)=>n>e?e:n<t?t:n;function Ge(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}let Ot=()=>{},ut=()=>{};process.env.NODE_ENV!=="production"&&(Ot=(t,e,n)=>{!t&&typeof console<"u"&&console.warn(Ge(e,n))},ut=(t,e,n)=>{if(!t)throw new Error(Ge(e,n))});const ht={},Vi=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function Ri(t){return typeof t=="object"&&t!==null}const ki=t=>/^0[^.\s]+$/u.test(t);function _n(t){let e;return()=>(e===void 0&&(e=t()),e)}const et=t=>t,Wr=(t,e)=>n=>e(t(n)),ne=(...t)=>t.reduce(Wr),Xt=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s};class Cn{constructor(){this.subscriptions=[]}add(e){return bn(this.subscriptions,e),()=>wn(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let r=0;r<i;r++){const o=this.subscriptions[r];o&&o(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const it=t=>t*1e3,tt=t=>t/1e3;function Di(t,e){return e?t*(1e3/e):0}const ns=new Set;function Tn(t,e,n){t||ns.has(e)||(console.warn(Ge(e,n)),ns.add(e))}const ji=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Ur=1e-7,Kr=12;function Hr(t,e,n,s,i){let r,o,a=0;do o=e+(n-e)/2,r=ji(o,s,i)-t,r>0?n=o:e=o;while(Math.abs(r)>Ur&&++a<Kr);return o}function se(t,e,n,s){if(t===e&&n===s)return et;const i=r=>Hr(r,0,1,t,n);return r=>r===0||r===1?r:ji(i(r),e,s)}const Li=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Oi=t=>e=>1-t(1-e),Ii=se(.33,1.53,.69,.99),Sn=Oi(Ii),Bi=Li(Sn),Ni=t=>(t*=2)<1?.5*Sn(t):.5*(2-Math.pow(2,-10*(t-1))),Pn=t=>1-Math.sin(Math.acos(t)),Fi=Oi(Pn),zi=Li(Pn),Gr=se(.42,0,1,1),qr=se(0,0,.58,1),$i=se(.42,0,.58,1),Xr=t=>Array.isArray(t)&&typeof t[0]!="number",Wi=t=>Array.isArray(t)&&typeof t[0]=="number",ss={linear:et,easeIn:Gr,easeInOut:$i,easeOut:qr,circIn:Pn,circInOut:zi,circOut:Fi,backIn:Sn,backInOut:Bi,backOut:Ii,anticipate:Ni},Yr=t=>typeof t=="string",is=t=>{if(Wi(t)){ut(t.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,n,s,i]=t;return se(e,n,s,i)}else if(Yr(t))return ut(ss[t]!==void 0,`Invalid easing type '${t}'`,"invalid-easing-type"),ss[t];return t},ae=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Zr(t,e){let n=new Set,s=new Set,i=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){o.has(c)&&(u.schedule(c),t()),c(a)}const u={schedule:(c,h=!1,d=!1)=>{const v=d&&i?n:s;return h&&o.add(c),v.has(c)||v.add(c),c},cancel:c=>{s.delete(c),o.delete(c)},process:c=>{if(a=c,i){r=!0;return}i=!0,[n,s]=[s,n],n.forEach(l),n.clear(),i=!1,r&&(r=!1,u.process(c))}};return u}const Jr=40;function Ui(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=ae.reduce((y,_)=>(y[_]=Zr(r),y),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:h,preRender:d,render:f,postRender:v}=o,m=()=>{const y=ht.useManualTiming?i.timestamp:performance.now();n=!1,ht.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(y-i.timestamp,Jr),1)),i.timestamp=y,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),h.process(i),d.process(i),f.process(i),v.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(m))},x=()=>{n=!0,s=!0,i.isProcessing||t(m)};return{schedule:ae.reduce((y,_)=>{const C=o[_];return y[_]=(S,P=!1,T=!1)=>(n||x(),C.schedule(S,P,T)),y},{}),cancel:y=>{for(let _=0;_<ae.length;_++)o[ae[_]].cancel(y)},state:i,steps:o}}const{schedule:O,cancel:mt,state:W,steps:Re}=Ui(typeof requestAnimationFrame<"u"?requestAnimationFrame:et,!0);let de;function Qr(){de=void 0}const X={now:()=>(de===void 0&&X.set(W.isProcessing||ht.useManualTiming?W.timestamp:performance.now()),de),set:t=>{de=t,queueMicrotask(Qr)}},Ki=t=>e=>typeof e=="string"&&e.startsWith(t),Mn=Ki("--"),ta=Ki("var(--"),En=t=>ta(t)?ea.test(t.split("/*")[0].trim()):!1,ea=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,It={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Yt={...It,transform:t=>ct(0,1,t)},le={...It,default:1},Ut=t=>Math.round(t*1e5)/1e5,An=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function na(t){return t==null}const sa=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Vn=(t,e)=>n=>!!(typeof n=="string"&&sa.test(n)&&n.startsWith(t)||e&&!na(n)&&Object.prototype.hasOwnProperty.call(n,e)),Hi=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,r,o,a]=s.match(An);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},ia=t=>ct(0,255,t),ke={...It,transform:t=>Math.round(ia(t))},bt={test:Vn("rgb","red"),parse:Hi("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+ke.transform(t)+", "+ke.transform(e)+", "+ke.transform(n)+", "+Ut(Yt.transform(s))+")"};function oa(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const qe={test:Vn("#"),parse:oa,transform:bt.transform},ie=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),ft=ie("deg"),ot=ie("%"),M=ie("px"),ra=ie("vh"),aa=ie("vw"),os={...ot,parse:t=>ot.parse(t)/100,transform:t=>ot.transform(t*100)},Mt={test:Vn("hsl","hue"),parse:Hi("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+ot.transform(Ut(e))+", "+ot.transform(Ut(n))+", "+Ut(Yt.transform(s))+")"},z={test:t=>bt.test(t)||qe.test(t)||Mt.test(t),parse:t=>bt.test(t)?bt.parse(t):Mt.test(t)?Mt.parse(t):qe.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?bt.transform(t):Mt.transform(t),getAnimatableNone:t=>{const e=z.parse(t);return e.alpha=0,z.transform(e)}},la=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function ca(t){return isNaN(t)&&typeof t=="string"&&(t.match(An)?.length||0)+(t.match(la)?.length||0)>0}const Gi="number",qi="color",ua="var",ha="var(",rs="${}",da=/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 Zt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const a=e.replace(da,l=>(z.test(l)?(s.color.push(r),i.push(qi),n.push(z.parse(l))):l.startsWith(ha)?(s.var.push(r),i.push(ua),n.push(l)):(s.number.push(r),i.push(Gi),n.push(parseFloat(l))),++r,rs)).split(rs);return{values:n,split:a,indexes:s,types:i}}function Xi(t){return Zt(t).values}function Yi(t){const{split:e,types:n}=Zt(t),s=e.length;return i=>{let r="";for(let o=0;o<s;o++)if(r+=e[o],i[o]!==void 0){const a=n[o];a===Gi?r+=Ut(i[o]):a===qi?r+=z.transform(i[o]):r+=i[o]}return r}}const fa=t=>typeof t=="number"?0:z.test(t)?z.getAnimatableNone(t):t;function ma(t){const e=Xi(t);return Yi(t)(e.map(fa))}const pt={test:ca,parse:Xi,createTransformer:Yi,getAnimatableNone:ma};function De(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function pa({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,r=0,o=0;if(!e)i=r=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=De(l,a,t+1/3),r=De(l,a,t),o=De(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}function ge(t,e){return n=>n>0?e:t}const B=(t,e,n)=>t+(e-t)*n,je=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},ga=[qe,bt,Mt],ya=t=>ga.find(e=>e.test(t));function as(t){const e=ya(t);if(Ot(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return!1;let n=e.parse(t);return e===Mt&&(n=pa(n)),n}const ls=(t,e)=>{const n=as(t),s=as(e);if(!n||!s)return ge(t,e);const i={...n};return r=>(i.red=je(n.red,s.red,r),i.green=je(n.green,s.green,r),i.blue=je(n.blue,s.blue,r),i.alpha=B(n.alpha,s.alpha,r),bt.transform(i))},Xe=new Set(["none","hidden"]);function va(t,e){return Xe.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function xa(t,e){return n=>B(t,e,n)}function Rn(t){return typeof t=="number"?xa:typeof t=="string"?En(t)?ge:z.test(t)?ls:_a:Array.isArray(t)?Zi:typeof t=="object"?z.test(t)?ls:ba:ge}function Zi(t,e){const n=[...t],s=n.length,i=t.map((r,o)=>Rn(r)(r,e[o]));return r=>{for(let o=0;o<s;o++)n[o]=i[o](r);return n}}function ba(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=Rn(t[i])(t[i],e[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}}function wa(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const r=e.types[i],o=t.indexes[r][s[r]],a=t.values[o]??0;n[i]=a,s[r]++}return n}const _a=(t,e)=>{const n=pt.createTransformer(e),s=Zt(t),i=Zt(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?Xe.has(t)&&!i.values.length||Xe.has(e)&&!s.values.length?va(t,e):ne(Zi(wa(s,i),i.values),n):(Ot(!0,`Complex values '${t}' and '${e}' 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"),ge(t,e))};function Ji(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?B(t,e,n):Rn(t)(t,e)}const Ca=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>O.update(e,n),stop:()=>mt(e),now:()=>W.isProcessing?W.timestamp:X.now()}},Qi=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let r=0;r<i;r++)s+=Math.round(t(r/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},ye=2e4;function kn(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<ye;)e+=n,s=t.next(e);return e>=ye?1/0:e}function Ta(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(kn(s),ye);return{type:"keyframes",ease:r=>s.next(i*r).value/e,duration:tt(i)}}const Sa=5;function to(t,e,n){const s=Math.max(e-Sa,0);return Di(n-t(s),e-s)}const I={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Le=.001;function Pa({duration:t=I.duration,bounce:e=I.bounce,velocity:n=I.velocity,mass:s=I.mass}){let i,r;Ot(t<=it(I.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-e;o=ct(I.minDamping,I.maxDamping,o),t=ct(I.minDuration,I.maxDuration,tt(t)),o<1?(i=u=>{const c=u*o,h=c*t,d=c-n,f=Ye(u,o),v=Math.exp(-h);return Le-d/f*v},r=u=>{const h=u*o*t,d=h*n+n,f=Math.pow(o,2)*Math.pow(u,2)*t,v=Math.exp(-h),m=Ye(Math.pow(u,2),o);return(-i(u)+Le>0?-1:1)*((d-f)*v)/m}):(i=u=>{const c=Math.exp(-u*t),h=(u-n)*t+1;return-Le+c*h},r=u=>{const c=Math.exp(-u*t),h=(n-u)*(t*t);return c*h});const a=5/t,l=Ea(i,r,a);if(t=it(t),isNaN(l))return{stiffness:I.stiffness,damping:I.damping,duration:t};{const u=Math.pow(l,2)*s;return{stiffness:u,damping:o*2*Math.sqrt(s*u),duration:t}}}const Ma=12;function Ea(t,e,n){let s=n;for(let i=1;i<Ma;i++)s=s-t(s)/e(s);return s}function Ye(t,e){return t*Math.sqrt(1-e*e)}const Aa=["duration","bounce"],Va=["stiffness","damping","mass"];function cs(t,e){return e.some(n=>t[n]!==void 0)}function Ra(t){let e={velocity:I.velocity,stiffness:I.stiffness,damping:I.damping,mass:I.mass,isResolvedFromDuration:!1,...t};if(!cs(t,Va)&&cs(t,Aa))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,r=2*ct(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:I.mass,stiffness:i,damping:r}}else{const n=Pa(t);e={...e,...n,mass:I.mass},e.isResolvedFromDuration=!0}return e}function ve(t=I.visualDuration,e=I.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:l,damping:u,mass:c,duration:h,velocity:d,isResolvedFromDuration:f}=Ra({...n,velocity:-tt(n.velocity||0)}),v=d||0,m=u/(2*Math.sqrt(l*c)),x=o-r,b=tt(Math.sqrt(l/c)),w=Math.abs(x)<5;s||(s=w?I.restSpeed.granular:I.restSpeed.default),i||(i=w?I.restDelta.granular:I.restDelta.default);let y;if(m<1){const C=Ye(b,m);y=S=>{const P=Math.exp(-m*b*S);return o-P*((v+m*b*x)/C*Math.sin(C*S)+x*Math.cos(C*S))}}else if(m===1)y=C=>o-Math.exp(-b*C)*(x+(v+b*x)*C);else{const C=b*Math.sqrt(m*m-1);y=S=>{const P=Math.exp(-m*b*S),T=Math.min(C*S,300);return o-P*((v+m*b*x)*Math.sinh(T)+C*x*Math.cosh(T))/C}}const _={calculatedDuration:f&&h||null,next:C=>{const S=y(C);if(f)a.done=C>=h;else{let P=C===0?v:0;m<1&&(P=C===0?it(v):to(y,C,S));const T=Math.abs(P)<=s,R=Math.abs(o-S)<=i;a.done=T&&R}return a.value=a.done?o:S,a},toString:()=>{const C=Math.min(kn(_),ye),S=Qi(P=>_.next(C*P).value,C,30);return C+"ms "+S},toTransition:()=>{}};return _}ve.applyToOptions=t=>{const e=Ta(t,100,ve);return t.ease=e.ease,t.duration=it(e.duration),t.type="keyframes",t};function Ze({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],d={done:!1,value:h},f=T=>a!==void 0&&T<a||l!==void 0&&T>l,v=T=>a===void 0?l:l===void 0||Math.abs(a-T)<Math.abs(l-T)?a:l;let m=n*e;const x=h+m,b=o===void 0?x:o(x);b!==x&&(m=b-h);const w=T=>-m*Math.exp(-T/s),y=T=>b+w(T),_=T=>{const R=w(T),k=y(T);d.done=Math.abs(R)<=u,d.value=d.done?b:k};let C,S;const P=T=>{f(d.value)&&(C=T,S=ve({keyframes:[d.value,v(d.value)],velocity:to(y,T,d.value),damping:i,stiffness:r,restDelta:u,restSpeed:c}))};return P(0),{calculatedDuration:null,next:T=>{let R=!1;return!S&&C===void 0&&(R=!0,_(T),P(T)),C!==void 0&&T>=C?S.next(T-C):(!R&&_(T),d)}}}function ka(t,e,n){const s=[],i=n||ht.mix||Ji,r=t.length-1;for(let o=0;o<r;o++){let a=i(t[o],t[o+1]);if(e){const l=Array.isArray(e)?e[o]||et:e;a=ne(l,a)}s.push(a)}return s}function Da(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const r=t.length;if(ut(r===e.length,"Both input and output ranges must be the same length","range-length"),r===1)return()=>e[0];if(r===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=ka(e,s,i),l=a.length,u=c=>{if(o&&c<t[0])return e[0];let h=0;if(l>1)for(;h<t.length-2&&!(c<t[h+1]);h++);const d=Xt(t[h],t[h+1],c);return a[h](d)};return n?c=>u(ct(t[0],t[r-1],c)):u}function ja(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=Xt(0,e,s);t.push(B(n,1,i))}}function La(t){const e=[0];return ja(e,t.length-1),e}function Oa(t,e){return t.map(n=>n*e)}function Ia(t,e){return t.map(()=>e||$i).splice(0,t.length-1)}function Et({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Xr(s)?s.map(is):is(s),r={done:!1,value:e[0]},o=Oa(n&&n.length===e.length?n:La(e),t),a=Da(o,e,{ease:Array.isArray(i)?i:Ia(e,i)});return{calculatedDuration:t,next:l=>(r.value=a(l),r.done=l>=t,r)}}const Ba=t=>t!==null;function Dn(t,{repeat:e,repeatType:n="loop"},s,i=1){const r=t.filter(Ba),a=i<0||e&&n!=="loop"&&e%2===1?0:r.length-1;return!a||s===void 0?r[a]:s}const Na={decay:Ze,inertia:Ze,tween:Et,keyframes:Et,spring:ve};function eo(t){typeof t.type=="string"&&(t.type=Na[t.type])}class jn{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const Fa=t=>t/100;class Ln extends jn{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==X.now()&&this.tick(X.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;eo(e);const{type:n=Et,repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=e;let{keyframes:a}=e;const l=n||Et;process.env.NODE_ENV!=="production"&&l!==Et&&ut(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==Et&&typeof a[0]!="number"&&(this.mixKeyframes=ne(Fa,Ji(a[0],a[1])),a=[0,100]);const u=l({...e,keyframes:a});r==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=kn(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=u}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:s,totalDuration:i,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return s.next(0);const{delay:u=0,keyframes:c,repeat:h,repeatType:d,repeatDelay:f,type:v,onUpdate:m,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const b=this.currentTime-u*(this.playbackSpeed>=0?1:-1),w=this.playbackSpeed>=0?b<0:b>i;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let y=this.currentTime,_=s;if(h){const T=Math.min(this.currentTime,i)/a;let R=Math.floor(T),k=T%1;!k&&T>=1&&(k=1),k===1&&R--,R=Math.min(R,h+1),!!(R%2)&&(d==="reverse"?(k=1-k,f&&(k-=f/a)):d==="mirror"&&(_=o)),y=ct(0,1,k)*a}const C=w?{done:!1,value:c[0]}:_.next(y);r&&(C.value=r(C.value));let{done:S}=C;!w&&l!==null&&(S=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const P=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&S);return P&&v!==Ze&&(C.value=Dn(c,this.options,x,this.speed)),m&&m(C.value),P&&this.finish(),C}then(e,n){return this.finished.then(e,n)}get duration(){return tt(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+tt(e)}get time(){return tt(this.currentTime)}set time(e){e=it(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(X.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=tt(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=Ca,startTime:n}=this.options;this.driver||(this.driver=e(i=>this.tick(i))),this.options.onPlay?.();const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(X.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&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}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 za(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const wt=t=>t*180/Math.PI,Je=t=>{const e=wt(Math.atan2(t[1],t[0]));return Qe(e)},$a={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Je,rotateZ:Je,skewX:t=>wt(Math.atan(t[1])),skewY:t=>wt(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Qe=t=>(t=t%360,t<0&&(t+=360),t),us=Je,hs=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),ds=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Wa={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:hs,scaleY:ds,scale:t=>(hs(t)+ds(t))/2,rotateX:t=>Qe(wt(Math.atan2(t[6],t[5]))),rotateY:t=>Qe(wt(Math.atan2(-t[2],t[0]))),rotateZ:us,rotate:us,skewX:t=>wt(Math.atan(t[4])),skewY:t=>wt(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function tn(t){return t.includes("scale")?1:0}function en(t,e){if(!t||t==="none")return tn(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Wa,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=$a,i=a}if(!i)return tn(e);const r=s[e],o=i[1].split(",").map(Ka);return typeof r=="function"?r(o):o[r]}const Ua=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return en(n,e)};function Ka(t){return parseFloat(t.trim())}const Bt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Nt=new Set(Bt),fs=t=>t===It||t===M,Ha=new Set(["x","y","z"]),Ga=Bt.filter(t=>!Ha.has(t));function qa(t){const e=[];return Ga.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const _t={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>en(e,"x"),y:(t,{transform:e})=>en(e,"y")};_t.translateX=_t.x;_t.translateY=_t.y;const Ct=new Set;let nn=!1,sn=!1,on=!1;function no(){if(sn){const t=Array.from(Ct).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=qa(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([r,o])=>{s.getValue(r)?.set(o)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}sn=!1,nn=!1,Ct.forEach(t=>t.complete(on)),Ct.clear()}function so(){Ct.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(sn=!0)})}function Xa(){on=!0,so(),no(),on=!1}class On{constructor(e,n,s,i,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Ct.add(this),nn||(nn=!0,O.read(so),O.resolveKeyframes(no))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const r=i?.get(),o=e[e.length-1];if(r!==void 0)e[0]=r;else if(s&&n){const a=s.readValue(n,o);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=o),i&&r===void 0&&i.set(e[0])}za(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Ct.delete(this)}cancel(){this.state==="scheduled"&&(Ct.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Ya=t=>t.startsWith("--");function Za(t,e,n){Ya(e)?t.style.setProperty(e,n):t.style[e]=n}const Ja=_n(()=>window.ScrollTimeline!==void 0),Qa={};function tl(t,e){const n=_n(t);return()=>Qa[e]??n()}const io=tl(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Wt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,ms={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Wt([0,.65,.55,1]),circOut:Wt([.55,0,1,.45]),backIn:Wt([.31,.01,.66,-.59]),backOut:Wt([.33,1.53,.69,.99])};function oo(t,e){if(t)return typeof t=="function"?io()?Qi(t,e):"ease-out":Wi(t)?Wt(t):Array.isArray(t)?t.map(n=>oo(n,e)||ms.easeOut):ms[t]}function el(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[e]:n};l&&(c.offset=l);const h=oo(a,i);Array.isArray(h)&&(c.easing=h);const d={delay:s,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"};return u&&(d.pseudoElement=u),t.animate(c,d)}function ro(t){return typeof t=="function"&&"applyToOptions"in t}function nl({type:t,...e}){return ro(t)&&io()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class sl extends jn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=e,ut(typeof e.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=nl(e);this.animation=el(n,s,i,u,r),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const c=Dn(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):Za(n,s,c),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return tt(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+tt(e)}get time(){return tt(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=it(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&Ja()?(this.animation.timeline=e,et):n(this)}}const ao={anticipate:Ni,backInOut:Bi,circInOut:zi};function il(t){return t in ao}function ol(t){typeof t.ease=="string"&&il(t.ease)&&(t.ease=ao[t.ease])}const ps=10;class rl extends sl{constructor(e){ol(e),eo(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:s,onComplete:i,element:r,...o}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new Ln({...o,autoplay:!1}),l=it(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-ps).value,a.sample(l).value,ps),a.stop()}}const gs=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(pt.test(t)||t==="0")&&!t.startsWith("url("));function al(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function ll(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const r=t[t.length-1],o=gs(i,e),a=gs(r,e);return Ot(o===a,`You are trying to animate ${e} from "${i}" to "${r}". "${o?r:i}" is not an animatable value.`,"value-not-animatable"),!o||!a?!1:al(t)||(n==="spring"||ro(n))&&s}function rn(t){t.duration=0,t.type="keyframes"}const cl=new Set(["opacity","clipPath","filter","transform"]),ul=_n(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function hl(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:r,type:o}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=e.owner.getProps();return ul()&&n&&cl.has(n)&&(n!=="transform"||!u)&&!l&&!s&&i!=="mirror"&&r!==0&&o!=="inertia"}const dl=40;class fl extends jn{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:l,motionValue:u,element:c,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=X.now();const d={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:r,repeatType:o,name:l,motionValue:u,element:c,...h},f=c?.KeyframeResolver||On;this.keyframeResolver=new f(a,(v,m,x)=>this.onKeyframesResolved(v,m,d,!x),l,u,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,s,i){this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:l,isHandoff:u,onUpdate:c}=s;this.resolvedAt=X.now(),ll(e,r,o,a)||((ht.instantAnimations||!l)&&c?.(Dn(e,s,n)),e[0]=e[e.length-1],rn(s),s.repeat=0);const d={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>dl?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},f=!u&&hl(d)?new rl({...d,element:d.motionValue.owner.current}):new Ln(d);f.finished.then(()=>this.notifyFinished()).catch(et),this.pendingTimeline&&(this.stopTimeline=f.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=f}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Xa()),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()}}const ml=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function pl(t){const e=ml.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}const gl=4;function lo(t,e,n=1){ut(n<=gl,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,i]=pl(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const o=r.trim();return Vi(o)?parseFloat(o):o}return En(i)?lo(i,e,n+1):i}function In(t,e){return t?.[e]??t?.default??t}const co=new Set(["width","height","top","left","right","bottom",...Bt]),yl={test:t=>t==="auto",parse:t=>t},uo=t=>e=>e.test(t),ho=[It,M,ot,ft,aa,ra,yl],ys=t=>ho.find(uo(t));function vl(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||ki(t):!0}const xl=new Set(["brightness","contrast","saturate","opacity"]);function bl(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(An)||[];if(!s)return t;const i=n.replace(s,"");let r=xl.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const wl=/\b([a-z-]*)\(.*?\)/gu,an={...pt,getAnimatableNone:t=>{const e=t.match(wl);return e?e.map(bl).join(" "):t}},vs={...It,transform:Math.round},_l={rotate:ft,rotateX:ft,rotateY:ft,rotateZ:ft,scale:le,scaleX:le,scaleY:le,scaleZ:le,skew:ft,skewX:ft,skewY:ft,distance:M,translateX:M,translateY:M,translateZ:M,x:M,y:M,z:M,perspective:M,transformPerspective:M,opacity:Yt,originX:os,originY:os,originZ:M},Bn={borderWidth:M,borderTopWidth:M,borderRightWidth:M,borderBottomWidth:M,borderLeftWidth:M,borderRadius:M,radius:M,borderTopLeftRadius:M,borderTopRightRadius:M,borderBottomRightRadius:M,borderBottomLeftRadius:M,width:M,maxWidth:M,height:M,maxHeight:M,top:M,right:M,bottom:M,left:M,padding:M,paddingTop:M,paddingRight:M,paddingBottom:M,paddingLeft:M,margin:M,marginTop:M,marginRight:M,marginBottom:M,marginLeft:M,backgroundPositionX:M,backgroundPositionY:M,..._l,zIndex:vs,fillOpacity:Yt,strokeOpacity:Yt,numOctaves:vs},Cl={...Bn,color:z,backgroundColor:z,outlineColor:z,fill:z,stroke:z,borderColor:z,borderTopColor:z,borderRightColor:z,borderBottomColor:z,borderLeftColor:z,filter:an,WebkitFilter:an},fo=t=>Cl[t];function mo(t,e){let n=fo(t);return n!==an&&(n=pt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Tl=new Set(["auto","none","0"]);function Sl(t,e,n){let s=0,i;for(;s<t.length&&!i;){const r=t[s];typeof r=="string"&&!Tl.has(r)&&Zt(r).values.length&&(i=t[s]),s++}if(i&&n)for(const r of e)t[r]=mo(n,i)}class Pl extends On{constructor(e,n,s,i,r){super(e,n,s,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let u=e[l];if(typeof u=="string"&&(u=u.trim(),En(u))){const c=lo(u,n.current);c!==void 0&&(e[l]=c),l===e.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!co.has(s)||e.length!==2)return;const[i,r]=e,o=ys(i),a=ys(r);if(o!==a)if(fs(o)&&fs(a))for(let l=0;l<e.length;l++){const u=e[l];typeof u=="string"&&(e[l]=parseFloat(u))}else _t[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||vl(e[i]))&&s.push(i);s.length&&Sl(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e||!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=_t[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const r=s.length-1,o=s[r];s[r]=_t[n](e.measureViewportBox(),window.getComputedStyle(e.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,l])=>{e.getValue(a).set(l)}),this.resolveNoneKeyframes()}}function Ml(t,e,n){if(t instanceof EventTarget)return[t];if(typeof t=="string"){let s=document;const i=n?.[t]??s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}const po=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function go(t){return Ri(t)&&"offsetHeight"in t}const xs=30,El=t=>!isNaN(parseFloat(t));class Al{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=X.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=X.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=El(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!=="production"&&Tn(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Cn);const s=this.events[e].add(n);return e==="change"?()=>{s(),O.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&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 this.current}getPrevious(){return this.prev}getVelocity(){const e=X.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>xs)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,xs);return Di(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),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 jt(t,e){return new Al(t,e)}const{schedule:Nn}=Ui(queueMicrotask,!1),st={x:!1,y:!1};function yo(){return st.x||st.y}function Vl(t){return t==="x"||t==="y"?st[t]?null:(st[t]=!0,()=>{st[t]=!1}):st.x||st.y?null:(st.x=st.y=!0,()=>{st.x=st.y=!1})}function vo(t,e){const n=Ml(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function bs(t){return!(t.pointerType==="touch"||yo())}function Rl(t,e,n={}){const[s,i,r]=vo(t,n),o=a=>{if(!bs(a))return;const{target:l}=a,u=e(l,a);if(typeof u!="function"||!l)return;const c=h=>{bs(h)&&(u(h),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,i)};return s.forEach(a=>{a.addEventListener("pointerenter",o,i)}),r}const xo=(t,e)=>e?t===e?!0:xo(t,e.parentElement):!1,Fn=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,kl=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Dl(t){return kl.has(t.tagName)||t.tabIndex!==-1}const fe=new WeakSet;function ws(t){return e=>{e.key==="Enter"&&t(e)}}function Oe(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const jl=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=ws(()=>{if(fe.has(n))return;Oe(n,"down");const i=ws(()=>{Oe(n,"up")}),r=()=>Oe(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",r,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function _s(t){return Fn(t)&&!yo()}function Ll(t,e,n={}){const[s,i,r]=vo(t,n),o=a=>{const l=a.currentTarget;if(!_s(a))return;fe.add(l);const u=e(l,a),c=(f,v)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",d),fe.has(l)&&fe.delete(l),_s(f)&&typeof u=="function"&&u(f,{success:v})},h=f=>{c(f,l===window||l===document||n.useGlobalTarget||xo(l,f.target))},d=f=>{c(f,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",d,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),go(a)&&(a.addEventListener("focus",u=>jl(u,i)),!Dl(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}function bo(t){return Ri(t)&&"ownerSVGElement"in t}function Ol(t){return bo(t)&&t.tagName==="svg"}const K=t=>!!(t&&t.getVelocity),Il=[...ho,z,pt],Bl=t=>Il.find(uo(t)),zn=g.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function Cs(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Nl(...t){return e=>{let n=!1;const s=t.map(i=>{const r=Cs(i,e);return!n&&typeof r=="function"&&(n=!0),r});if(n)return()=>{for(let i=0;i<s.length;i++){const r=s[i];typeof r=="function"?r():Cs(t[i],null)}}}}function Fl(...t){return V.useCallback(Nl(...t),t)}class zl extends V.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const s=n.offsetParent,i=go(s)&&s.offsetWidth||0,r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft,r.right=i-r.width-r.left}return null}componentDidUpdate(){}render(){return this.props.children}}function $l({children:t,isPresent:e,anchorX:n,root:s}){const i=g.useId(),r=g.useRef(null),o=g.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=g.useContext(zn),l=Fl(r,t?.ref);return g.useInsertionEffect(()=>{const{width:u,height:c,top:h,left:d,right:f}=o.current;if(e||!r.current||!u||!c)return;const v=n==="left"?`left: ${d}`:`right: ${f}`;r.current.dataset.motionPopId=i;const m=document.createElement("style");a&&(m.nonce=a);const x=s??document.head;return x.appendChild(m),m.sheet&&m.sheet.insertRule(`
|
|
6
6
|
[data-motion-pop-id="${i}"] {
|
|
7
7
|
position: absolute !important;
|
|
8
8
|
width: ${u}px !important;
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
${v}px !important;
|
|
11
11
|
top: ${h}px !important;
|
|
12
12
|
}
|
|
13
|
-
`),()=>{x.contains(m)&&x.removeChild(m)}},[e]),p.jsx(zl,{isPresent:e,childRef:r,sizeRef:o,children:V.cloneElement(t,{ref:l})})}const Wl=({children:t,initial:e,isPresent:n,onExitComplete:s,custom:i,presenceAffectsLayout:r,mode:o,anchorX:a,root:l})=>{const u=vn(Ul),c=g.useId();let h=!0,d=g.useMemo(()=>(h=!1,{id:c,initial:e,isPresent:n,custom:i,onExitComplete:f=>{u.set(f,!0);for(const v of u.values())if(!v)return;s&&s()},register:f=>(u.set(f,!1),()=>u.delete(f))}),[n,u,s]);return r&&h&&(d={...d}),g.useMemo(()=>{u.forEach((f,v)=>u.set(v,!1))},[n]),V.useEffect(()=>{!n&&!u.size&&s&&s()},[n]),o==="popLayout"&&(t=p.jsx($l,{isPresent:n,anchorX:a,root:l,children:t})),p.jsx(Te.Provider,{value:d,children:t})};function Ul(){return new Map}function wo(t=!0){const e=g.useContext(Te);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,r=g.useId();g.useEffect(()=>{if(t)return i(r)},[t]);const o=g.useCallback(()=>t&&s&&s(r),[r,s,t]);return!n&&s?[!1,o]:[!0]}const ce=t=>t.key||"";function Cs(t){const e=[];return g.Children.forEach(t,n=>{g.isValidElement(n)&&e.push(n)}),e}const Kl=({children:t,custom:e,initial:n=!0,onExitComplete:s,presenceAffectsLayout:i=!0,mode:r="sync",propagate:o=!1,anchorX:a="left",root:l})=>{const[u,c]=wo(o),h=g.useMemo(()=>Cs(t),[t]),d=o&&!u?[]:h.map(ce),f=g.useRef(!0),v=g.useRef(h),m=vn(()=>new Map),[x,b]=g.useState(h),[w,y]=g.useState(h);Ai(()=>{f.current=!1,v.current=h;for(let S=0;S<w.length;S++){const P=ce(w[S]);d.includes(P)?m.delete(P):m.get(P)!==!0&&m.set(P,!1)}},[w,d.length,d.join("-")]);const _=[];if(h!==x){let S=[...h];for(let P=0;P<w.length;P++){const C=w[P],R=ce(C);d.includes(R)||(S.splice(P,0,C),_.push(C))}return r==="wait"&&_.length&&(S=_),y(Cs(S)),b(h),null}process.env.NODE_ENV!=="production"&&r==="wait"&&w.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:T}=g.useContext(yn);return p.jsx(p.Fragment,{children:w.map(S=>{const P=ce(S),C=o&&!u?!1:h===w||d.includes(P),R=()=>{if(m.has(P))m.set(P,!0);else return;let k=!0;m.forEach(H=>{H||(k=!1)}),k&&(T?.(),y(v.current),o&&c?.(),s&&s())};return p.jsx(Wl,{isPresent:C,initial:!f.current||n?void 0:!1,custom:e,presenceAffectsLayout:i,mode:r,root:l,onExitComplete:C?void 0:R,anchorX:a,children:S},P)})})},_o=g.createContext({strict:!1}),Ss={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"]},Lt={};for(const t in Ss)Lt[t]={isEnabled:e=>Ss[t].some(n=>!!e[n])};function Hl(t){for(const e in t)Lt[e]={...Lt[e],...t[e]}}const Gl=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 xe(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Gl.has(t)}let To=t=>!xe(t);function ql(t){typeof t=="function"&&(To=e=>e.startsWith("on")?!xe(e):t(e))}try{ql(require("@emotion/is-prop-valid").default)}catch{}function Xl(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(To(i)||n===!0&&xe(i)||!e&&!xe(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const Ce=g.createContext({});function Se(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Jt(t){return typeof t=="string"||Array.isArray(t)}const $n=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Wn=["initial",...$n];function Pe(t){return Se(t.animate)||Wn.some(e=>Jt(t[e]))}function Co(t){return!!(Pe(t)||t.variants)}function Yl(t,e){if(Pe(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Jt(n)?n:void 0,animate:Jt(s)?s:void 0}}return t.inherit!==!1?e:{}}function Zl(t){const{initial:e,animate:n}=Yl(t,g.useContext(Ce));return g.useMemo(()=>({initial:e,animate:n}),[Ps(e),Ps(n)])}function Ps(t){return Array.isArray(t)?t.join(" "):t}const Qt={};function Jl(t){for(const e in t)Qt[e]=t[e],Mn(e)&&(Qt[e].isCSSVariable=!0)}function So(t,{layout:e,layoutId:n}){return Nt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Qt[t]||t==="opacity")}const Ql={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},tc=Bt.length;function ec(t,e,n){let s="",i=!0;for(let r=0;r<tc;r++){const o=Bt[r],a=t[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const u=po(a,Bn[o]);if(!l){i=!1;const c=Ql[o]||o;s+=`${c}(${u}) `}n&&(e[o]=u)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function Un(t,e,n){const{style:s,vars:i,transformOrigin:r}=t;let o=!1,a=!1;for(const l in e){const u=e[l];if(Nt.has(l)){o=!0;continue}else if(Mn(l)){i[l]=u;continue}else{const c=po(u,Bn[l]);l.startsWith("origin")?(a=!0,r[l]=c):s[l]=c}}if(e.transform||(o||n?s.transform=ec(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=r;s.transformOrigin=`${l} ${u} ${c}`}}const Kn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Po(t,e,n){for(const s in e)!K(e[s])&&!So(s,n)&&(t[s]=e[s])}function nc({transformTemplate:t},e){return g.useMemo(()=>{const n=Kn();return Un(n,e,t),Object.assign({},n.vars,n.style)},[e])}function sc(t,e){const n=t.style||{},s={};return Po(s,n,t),Object.assign(s,nc(t,e)),s}function ic(t,e){const n={},s=sc(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=s,n}const oc={offset:"stroke-dashoffset",array:"stroke-dasharray"},rc={offset:"strokeDashoffset",array:"strokeDasharray"};function ac(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?oc:rc;t[r.offset]=M.transform(-s);const o=M.transform(e),a=M.transform(n);t[r.array]=`${o} ${a}`}function Mo(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:r=1,pathOffset:o=0,...a},l,u,c){if(Un(t,a,u),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:d}=t;h.transform&&(d.transform=h.transform,delete h.transform),(d.transform||h.transformOrigin)&&(d.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),d.transform&&(d.transformBox=c?.transformBox??"fill-box",delete h.transformBox),e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),s!==void 0&&(h.scale=s),i!==void 0&&ac(h,i,r,o,!1)}const Eo=()=>({...Kn(),attrs:{}}),Ao=t=>typeof t=="string"&&t.toLowerCase()==="svg";function lc(t,e,n,s){const i=g.useMemo(()=>{const r=Eo();return Mo(r,e,Ao(s),t.transformTemplate,t.style),{...r.attrs,style:{...r.style}}},[e]);if(t.style){const r={};Po(r,t.style,t),i.style={...r,...i.style}}return i}const cc=["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 Hn(t){return typeof t!="string"||t.includes("-")?!1:!!(cc.indexOf(t)>-1||/[A-Z]/u.test(t))}function uc(t,e,n,{latestValues:s},i,r=!1){const a=(Hn(t)?lc:ic)(e,s,i,t),l=Xl(e,typeof t=="string",r),u=t!==g.Fragment?{...l,...a,ref:n}:{},{children:c}=e,h=g.useMemo(()=>K(c)?c.get():c,[c]);return g.createElement(t,{...u,children:h})}function Ms(t){const e=[{},{}];return t?.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function Gn(t,e,n,s){if(typeof e=="function"){const[i,r]=Ms(s);e=e(n!==void 0?n:t.custom,i,r)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,r]=Ms(s);e=e(n!==void 0?n:t.custom,i,r)}return e}function me(t){return K(t)?t.get():t}function hc({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:dc(n,s,i,t),renderState:e()}}function dc(t,e,n,s){const i={},r=s(t,{});for(const d in r)i[d]=me(r[d]);let{initial:o,animate:a}=t;const l=Pe(t),u=Co(t);e&&u&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const h=c?a:o;if(h&&typeof h!="boolean"&&!Se(h)){const d=Array.isArray(h)?h:[h];for(let f=0;f<d.length;f++){const v=Gn(t,d[f]);if(v){const{transitionEnd:m,transition:x,...b}=v;for(const w in b){let y=b[w];if(Array.isArray(y)){const _=c?y.length-1:0;y=y[_]}y!==null&&(i[w]=y)}for(const w in m)i[w]=m[w]}}}return i}const Vo=t=>(e,n)=>{const s=g.useContext(Ce),i=g.useContext(Te),r=()=>hc(t,e,s,i);return n?r():vn(r)};function qn(t,e,n){const{style:s}=t,i={};for(const r in s)(K(s[r])||e.style&&K(e.style[r])||So(r,t)||n?.getValue(r)?.liveStyle!==void 0)&&(i[r]=s[r]);return i}const fc=Vo({scrapeMotionValuesFromProps:qn,createRenderState:Kn});function Ro(t,e,n){const s=qn(t,e,n);for(const i in t)if(K(t[i])||K(e[i])){const r=Bt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=t[i]}return s}const mc=Vo({scrapeMotionValuesFromProps:Ro,createRenderState:Eo}),pc=Symbol.for("motionComponentSymbol");function At(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function gc(t,e,n){return g.useCallback(s=>{s&&t.onMount&&t.onMount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):At(n)&&(n.current=s))},[e])}const Xn=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),yc="framerAppearId",ko="data-"+Xn(yc),Do=g.createContext({});function vc(t,e,n,s,i){const{visualElement:r}=g.useContext(Ce),o=g.useContext(_o),a=g.useContext(Te),l=g.useContext(zn).reducedMotion,u=g.useRef(null);s=s||o.renderer,!u.current&&s&&(u.current=s(t,{visualState:e,parent:r,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const c=u.current,h=g.useContext(Do);c&&!c.projection&&i&&(c.type==="html"||c.type==="svg")&&xc(u.current,n,i,h);const d=g.useRef(!1);g.useInsertionEffect(()=>{c&&d.current&&c.update(n,a)});const f=n[ko],v=g.useRef(!!f&&!window.MotionHandoffIsComplete?.(f)&&window.MotionHasOptimisedAnimation?.(f));return Ai(()=>{c&&(d.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),v.current&&c.animationState&&c.animationState.animateChanges())}),g.useEffect(()=>{c&&(!v.current&&c.animationState&&c.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(f)}),v.current=!1),c.enteringChildren=void 0)}),c}function xc(t,e,n,s){const{layoutId:i,layout:r,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:jo(t.parent)),t.projection.setOptions({layoutId:i,layout:r,alwaysMeasureLayout:!!o||a&&At(a),visualElement:t,animationType:typeof r=="string"?r:"both",initialPromotionConfig:s,crossfade:c,layoutScroll:l,layoutRoot:u})}function jo(t){if(t)return t.options.allowProjection!==!1?t.projection:jo(t.parent)}function Ie(t,{forwardMotionProps:e=!1}={},n,s){n&&Hl(n);const i=Hn(t)?mc:fc;function r(a,l){let u;const c={...g.useContext(zn),...a,layoutId:bc(a)},{isStatic:h}=c,d=Zl(a),f=i(a,h);if(!h&&xn){wc(c,n);const v=_c(c);u=v.MeasureLayout,d.visualElement=vc(t,f,c,s,v.ProjectionNode)}return p.jsxs(Ce.Provider,{value:d,children:[u&&d.visualElement?p.jsx(u,{visualElement:d.visualElement,...c}):null,uc(t,a,gc(f,d.visualElement,l),f,h,e)]})}r.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const o=g.forwardRef(r);return o[pc]=t,o}function bc({layoutId:t}){const e=g.useContext(yn).id;return e&&t!==void 0?e+"-"+t:t}function wc(t,e){const n=g.useContext(_o).strict;if(process.env.NODE_ENV!=="production"&&e&&n){const s="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?Ot(!1,s,"lazy-strict-mode"):ct(!1,s,"lazy-strict-mode")}}function _c(t){const{drag:e,layout:n}=Lt;if(!e&&!n)return{};const s={...e,...n};return{MeasureLayout:e?.isEnabled(t)||n?.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function Tc(t,e){if(typeof Proxy>"u")return Ie;const n=new Map,s=(r,o)=>Ie(r,o,t,e),i=(r,o)=>(process.env.NODE_ENV!=="production"&&Cn(!1,"motion() is deprecated. Use motion.create() instead."),s(r,o));return new Proxy(i,{get:(r,o)=>o==="create"?s:(n.has(o)||n.set(o,Ie(o,void 0,t,e)),n.get(o))})}function Lo({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function Cc({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Sc(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function Be(t){return t===void 0||t===1}function ln({scale:t,scaleX:e,scaleY:n}){return!Be(t)||!Be(e)||!Be(n)}function vt(t){return ln(t)||Oo(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Oo(t){return Es(t.x)||Es(t.y)}function Es(t){return t&&t!=="0%"}function be(t,e,n){const s=t-n,i=e*s;return n+i}function As(t,e,n,s,i){return i!==void 0&&(t=be(t,i,s)),be(t,n,s)+e}function cn(t,e=0,n=1,s,i){t.min=As(t.min,e,n,s,i),t.max=As(t.max,e,n,s,i)}function Io(t,{x:e,y:n}){cn(t.x,e.translate,e.scale,e.originPoint),cn(t.y,n.translate,n.scale,n.originPoint)}const Vs=.999999999999,Rs=1.0000000000001;function Pc(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let r,o;for(let a=0;a<i;a++){r=n[a],o=r.projectionDelta;const{visualElement:l}=r.options;l&&l.props.style&&l.props.style.display==="contents"||(s&&r.options.layoutScroll&&r.scroll&&r!==r.root&&Rt(t,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,Io(t,o)),s&&vt(r.latestValues)&&Rt(t,r.latestValues))}e.x<Rs&&e.x>Vs&&(e.x=1),e.y<Rs&&e.y>Vs&&(e.y=1)}function Vt(t,e){t.min=t.min+e,t.max=t.max+e}function ks(t,e,n,s,i=.5){const r=B(t.min,t.max,i);cn(t,e,n,r,s)}function Rt(t,e){ks(t.x,e.x,e.scaleX,e.scale,e.originX),ks(t.y,e.y,e.scaleY,e.scale,e.originY)}function Bo(t,e){return Lo(Sc(t.getBoundingClientRect(),e))}function Mc(t,e,n){const s=Bo(t,n),{scroll:i}=e;return i&&(Vt(s.x,i.offset.x),Vt(s.y,i.offset.y)),s}const Ds=()=>({translate:0,scale:1,origin:0,originPoint:0}),kt=()=>({x:Ds(),y:Ds()}),js=()=>({min:0,max:0}),F=()=>({x:js(),y:js()}),un={current:null},No={current:!1};function Ec(){if(No.current=!0,!!xn)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>un.current=t.matches;t.addEventListener("change",e),e()}else un.current=!1}const Ac=new WeakMap;function Vc(t,e,n){for(const s in e){const i=e[s],r=n[s];if(K(i))t.addValue(s,i);else if(K(r))t.addValue(s,jt(i,{owner:t}));else if(r!==i)if(t.hasValue(s)){const o=t.getValue(s);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=t.getStaticValue(s);t.addValue(s,jt(o!==void 0?o:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const Ls=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Rc{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:r,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=On,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},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=()=>{const d=X.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,O.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!r,this.isControllingVariants=Pe(n),this.isVariantNode=Co(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:c,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in h){const f=h[d];l[d]!==void 0&&K(f)&&f.set(l[d])}}mount(e){this.current=e,Ac.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((n,s)=>this.bindToMotionValue(s,n)),No.current||Ec(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:un.current,process.env.NODE_ENV!=="production"&&Cn(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),ft(this.notifyUpdate),ft(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.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,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const s=Nt.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&O.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),r&&r(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Lt){const n=Lt[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const r=this.features[e];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):F()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<Ls.length;s++){const i=Ls[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r="on"+i,o=e[r];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=Vc(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){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=jt(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(Vi(s)||ki(s))?s=parseFloat(s):!Bl(s)&&mt.test(n)&&(s=mo(e,n)),this.setBaseTarget(e,K(s)?s.get():s)),K(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const r=Gn(this.props,n,this.presenceContext?.custom);r&&(s=r[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!K(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Tn),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){Nn.render(this.render)}}class Fo extends Rc{constructor(){super(...arguments),this.KeyframeResolver=Pl}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;K(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function zo(t,{style:e,vars:n},s,i){const r=t.style;let o;for(o in e)r[o]=e[o];i?.applyProjectionStyles(r,s);for(o in n)r.setProperty(o,n[o])}function kc(t){return window.getComputedStyle(t)}class Dc extends Fo{constructor(){super(...arguments),this.type="html",this.renderInstance=zo}readValueFromInstance(e,n){if(Nt.has(n))return this.projection?.isProjecting?tn(n):Ua(e,n);{const s=kc(e),i=(Mn(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Bo(e,n)}build(e,n,s){Un(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return qn(e,n,s)}}const $o=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"]);function jc(t,e,n,s){zo(t,e,void 0,s);for(const i in e.attrs)t.setAttribute($o.has(i)?i:Xn(i),e.attrs[i])}class Lc extends Fo{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=F}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Nt.has(n)){const s=fo(n);return s&&s.default||0}return n=$o.has(n)?n:Xn(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return Ro(e,n,s)}build(e,n,s){Mo(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){jc(e,n,s,i)}mount(e){this.isSVGTag=Ao(e.tagName),super.mount(e)}}const Oc=(t,e)=>Hn(t)?new Lc(e):new Dc(e,{allowProjection:t!==g.Fragment});function Dt(t,e,n){const s=t.getProps();return Gn(s,e,n!==void 0?n:s.custom,t)}const hn=t=>Array.isArray(t);function Ic(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,jt(n))}function Bc(t){return hn(t)?t[t.length-1]||0:t}function Nc(t,e){const n=Dt(t,e);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const o in r){const a=Bc(r[o]);Ic(t,o,a)}}function Fc(t){return!!(K(t)&&t.add)}function dn(t,e){const n=t.getValue("willChange");if(Fc(n))return n.add(e);if(!n&&ut.WillChange){const s=new ut.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function Wo(t){return t.props[ko]}const zc=t=>t!==null;function $c(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(zc),r=e&&n!=="loop"&&e%2===1?0:i.length-1;return i[r]}const Wc={type:"spring",stiffness:500,damping:25,restSpeed:10},Uc=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Kc={type:"keyframes",duration:.8},Hc={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Gc=(t,{keyframes:e})=>e.length>2?Kc:Nt.has(t)?t.startsWith("scale")?Uc(e[1]):Wc:Hc;function qc({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:r,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const Yn=(t,e,n,s={},i,r)=>o=>{const a=In(s,t)||{},l=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-it(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:d=>{e.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:i};qc(a)||Object.assign(c,Gc(t,c)),c.duration&&(c.duration=it(c.duration)),c.repeatDelay&&(c.repeatDelay=it(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let h=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(rn(c),c.delay===0&&(h=!0)),(ut.instantAnimations||ut.skipAnimations)&&(h=!0,rn(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,h&&!r&&e.get()!==void 0){const d=$c(c.keyframes,a);if(d!==void 0){O.update(()=>{c.onUpdate(d),c.onComplete()});return}}return a.isSync?new Ln(c):new fl(c)};function Xc({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Uo(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:r=t.getDefaultTransition(),transitionEnd:o,...a}=e;s&&(r=s);const l=[],u=i&&t.animationState&&t.animationState.getState()[i];for(const c in a){const h=t.getValue(c,t.latestValues[c]??null),d=a[c];if(d===void 0||u&&Xc(u,c))continue;const f={delay:n,...In(r||{},c)},v=h.get();if(v!==void 0&&!h.isAnimating&&!Array.isArray(d)&&d===v&&!f.velocity)continue;let m=!1;if(window.MotionHandoffAnimation){const b=Wo(t);if(b){const w=window.MotionHandoffAnimation(b,c,O);w!==null&&(f.startTime=w,m=!0)}}dn(t,c),h.start(Yn(c,h,d,t.shouldReduceMotion&&co.has(c)?{type:!1}:f,t,m));const x=h.animation;x&&l.push(x)}return o&&Promise.all(l).then(()=>{O.update(()=>{o&&Nc(t,o)})}),l}function Ko(t,e,n,s=0,i=1){const r=Array.from(t).sort((u,c)=>u.sortNodePosition(c)).indexOf(e),o=t.size,a=(o-1)*s;return typeof n=="function"?n(r,o):i===1?r*s:a-r*s}function fn(t,e,n={}){const s=Dt(t,e,n.type==="exit"?t.presenceContext?.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const r=s?()=>Promise.all(Uo(t,s,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:c,staggerDirection:h}=i;return Yc(t,e,l,u,c,h,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[l,u]=a==="beforeChildren"?[r,o]:[o,r];return l().then(()=>u())}else return Promise.all([r(),o(n.delay)])}function Yc(t,e,n=0,s=0,i=0,r=1,o){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(fn(l,e,{...o,delay:n+(typeof s=="function"?0:s)+Ko(t.variantChildren,l,s,i,r)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function Zc(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(r=>fn(t,r,n));s=Promise.all(i)}else if(typeof e=="string")s=fn(t,e,n);else{const i=typeof e=="function"?Dt(t,e,n.custom):e;s=Promise.all(Uo(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}function Ho(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}const Jc=Wn.length;function Go(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?Go(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<Jc;n++){const s=Wn[n],i=t.props[s];(Jt(i)||i===!1)&&(e[s]=i)}return e}const Qc=[...$n].reverse(),tu=$n.length;function eu(t){return e=>Promise.all(e.map(({animation:n,options:s})=>Zc(t,n,s)))}function nu(t){let e=eu(t),n=Os(),s=!0;const i=l=>(u,c)=>{const h=Dt(t,c,l==="exit"?t.presenceContext?.custom:void 0);if(h){const{transition:d,transitionEnd:f,...v}=h;u={...u,...v,...f}}return u};function r(l){e=l(t)}function o(l){const{props:u}=t,c=Go(t.parent)||{},h=[],d=new Set;let f={},v=1/0;for(let x=0;x<tu;x++){const b=Qc[x],w=n[b],y=u[b]!==void 0?u[b]:c[b],_=Jt(y),T=b===l?w.isActive:null;T===!1&&(v=x);let S=y===c[b]&&y!==u[b]&&_;if(S&&s&&t.manuallyAnimateOnMount&&(S=!1),w.protectedKeys={...f},!w.isActive&&T===null||!y&&!w.prevProp||Se(y)||typeof y=="boolean")continue;const P=su(w.prevProp,y);let C=P||b===l&&w.isActive&&!S&&_||x>v&&_,R=!1;const k=Array.isArray(y)?y:[y];let H=k.reduce(i(b),{});T===!1&&(H={});const{prevResolvedValues:rt={}}=w,gt={...rt,...H},ht=N=>{C=!0,d.has(N)&&(R=!0,d.delete(N)),w.needsAnimating[N]=!0;const q=t.getValue(N);q&&(q.liveStyle=!1)};for(const N in gt){const q=H[N],D=rt[N];if(f.hasOwnProperty(N))continue;let j=!1;hn(q)&&hn(D)?j=!Ho(q,D):j=q!==D,j?q!=null?ht(N):d.add(N):q!==void 0&&d.has(N)?ht(N):w.protectedKeys[N]=!0}w.prevProp=y,w.prevResolvedValues=H,w.isActive&&(f={...f,...H}),s&&t.blockInitialAnimation&&(C=!1);const Ct=S&&P;C&&(!Ct||R)&&h.push(...k.map(N=>{const q={type:b};if(typeof N=="string"&&s&&!Ct&&t.manuallyAnimateOnMount&&t.parent){const{parent:D}=t,j=Dt(D,N);if(D.enteringChildren&&j){const{delayChildren:U}=j.transition||{};q.delay=Ko(D.enteringChildren,t,U)}}return{animation:N,options:q}}))}if(d.size){const x={};if(typeof u.initial!="boolean"){const b=Dt(t,Array.isArray(u.initial)?u.initial[0]:u.initial);b&&b.transition&&(x.transition=b.transition)}d.forEach(b=>{const w=t.getBaseTarget(b),y=t.getValue(b);y&&(y.liveStyle=!0),x[b]=w??null}),h.push({animation:x})}let m=!!h.length;return s&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(m=!1),s=!1,m?e(h):Promise.resolve()}function a(l,u){if(n[l].isActive===u)return Promise.resolve();t.variantChildren?.forEach(h=>h.animationState?.setActive(l,u)),n[l].isActive=u;const c=o(l);for(const h in n)n[h].protectedKeys={};return c}return{animateChanges:o,setActive:a,setAnimateFunction:r,getState:()=>n,reset:()=>{n=Os(),s=!0}}}function su(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Ho(e,t):!1}function yt(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Os(){return{animate:yt(!0),whileInView:yt(),whileHover:yt(),whileTap:yt(),whileDrag:yt(),whileFocus:yt(),exit:yt()}}class pt{constructor(e){this.isMounted=!1,this.node=e}update(){}}class iu extends pt{constructor(e){super(e),e.animationState||(e.animationState=nu(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Se(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let ou=0;class ru extends pt{constructor(){super(...arguments),this.id=ou++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>{n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const au={animation:{Feature:iu},exit:{Feature:ru}};function te(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function oe(t){return{point:{x:t.pageX,y:t.pageY}}}const lu=t=>e=>Fn(e)&&t(e,oe(e));function Kt(t,e,n,s){return te(t,e,lu(n),s)}const qo=1e-4,cu=1-qo,uu=1+qo,Xo=.01,hu=0-Xo,du=0+Xo;function G(t){return t.max-t.min}function fu(t,e,n){return Math.abs(t-e)<=n}function Is(t,e,n,s=.5){t.origin=s,t.originPoint=B(e.min,e.max,t.origin),t.scale=G(n)/G(e),t.translate=B(n.min,n.max,t.origin)-t.originPoint,(t.scale>=cu&&t.scale<=uu||isNaN(t.scale))&&(t.scale=1),(t.translate>=hu&&t.translate<=du||isNaN(t.translate))&&(t.translate=0)}function Ht(t,e,n,s){Is(t.x,e.x,n.x,s?s.originX:void 0),Is(t.y,e.y,n.y,s?s.originY:void 0)}function Bs(t,e,n){t.min=n.min+e.min,t.max=t.min+G(e)}function mu(t,e,n){Bs(t.x,e.x,n.x),Bs(t.y,e.y,n.y)}function Ns(t,e,n){t.min=e.min-n.min,t.max=t.min+G(e)}function Gt(t,e,n){Ns(t.x,e.x,n.x),Ns(t.y,e.y,n.y)}function Q(t){return[t("x"),t("y")]}const Yo=({current:t})=>t?t.ownerDocument.defaultView:null,Fs=(t,e)=>Math.abs(t-e);function pu(t,e){const n=Fs(t.x,e.x),s=Fs(t.y,e.y);return Math.sqrt(n**2+s**2)}class Zo{constructor(e,n,{transformPagePoint:s,contextWindow:i=window,dragSnapToOrigin:r=!1,distanceThreshold:o=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=Fe(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,v=pu(d.offset,{x:0,y:0})>=this.distanceThreshold;if(!f&&!v)return;const{point:m}=d,{timestamp:x}=W;this.history.push({...m,timestamp:x});const{onStart:b,onMove:w}=this.handlers;f||(b&&b(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Ne(f,this.transformPagePoint),O.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:v,onSessionEnd:m,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=Fe(d.type==="pointercancel"?this.lastMoveEventInfo:Ne(f,this.transformPagePoint),this.history);this.startEvent&&v&&v(d,b),m&&m(d,b)},!Fn(e))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=o,this.contextWindow=i||window;const a=oe(e),l=Ne(a,this.transformPagePoint),{point:u}=l,{timestamp:c}=W;this.history=[{...u,timestamp:c}];const{onSessionStart:h}=n;h&&h(e,Fe(l,this.history)),this.removeListeners=ne(Kt(this.contextWindow,"pointermove",this.handlePointerMove),Kt(this.contextWindow,"pointerup",this.handlePointerUp),Kt(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),ft(this.updatePoint)}}function Ne(t,e){return e?{point:e(t.point)}:t}function zs(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Fe({point:t},e){return{point:t,delta:zs(t,Jo(e)),offset:zs(t,gu(e)),velocity:yu(e,.1)}}function gu(t){return t[0]}function Jo(t){return t[t.length-1]}function yu(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=Jo(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>it(e)));)n--;if(!s)return{x:0,y:0};const r=tt(i.timestamp-s.timestamp);if(r===0)return{x:0,y:0};const o={x:(i.x-s.x)/r,y:(i.y-s.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function vu(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?B(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?B(n,t,s.max):Math.min(t,n)),t}function $s(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function xu(t,{top:e,left:n,bottom:s,right:i}){return{x:$s(t.x,n,i),y:$s(t.y,e,s)}}function Ws(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}function bu(t,e){return{x:Ws(t.x,e.x),y:Ws(t.y,e.y)}}function wu(t,e){let n=.5;const s=G(t),i=G(e);return i>s?n=Xt(e.min,e.max-s,t.min):s>i&&(n=Xt(t.min,t.max-i,e.min)),lt(0,1,n)}function _u(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const mn=.35;function Tu(t=mn){return t===!1?t=0:t===!0&&(t=mn),{x:Us(t,"left","right"),y:Us(t,"top","bottom")}}function Us(t,e,n){return{min:Ks(t,e),max:Ks(t,n)}}function Ks(t,e){return typeof t=="number"?t:t[e]||0}const Cu=new WeakMap;class Su{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=F(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:s}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const r=h=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(oe(h).point)},o=(h,d)=>{const{drag:f,dragPropagation:v,onDragStart:m}=this.getProps();if(f&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Vl(f),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=d,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Q(b=>{let w=this.getAxisMotionValue(b).get()||0;if(ot.test(w)){const{projection:y}=this.visualElement;if(y&&y.layout){const _=y.layout.layoutBox[b];_&&(w=G(_)*(parseFloat(w)/100))}}this.originPoint[b]=w}),m&&O.postRender(()=>m(h,d)),dn(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},a=(h,d)=>{this.latestPointerEvent=h,this.latestPanInfo=d;const{dragPropagation:f,dragDirectionLock:v,onDirectionLock:m,onDrag:x}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:b}=d;if(v&&this.currentDirection===null){this.currentDirection=Pu(b),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",d.point,b),this.updateAxis("y",d.point,b),this.visualElement.render(),x&&x(h,d)},l=(h,d)=>{this.latestPointerEvent=h,this.latestPanInfo=d,this.stop(h,d),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>Q(h=>this.getAnimationState(h)==="paused"&&this.getAxisMotionValue(h).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Zo(e,{onSessionStart:r,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:s,contextWindow:Yo(this.visualElement)})}stop(e,n){const s=e||this.latestPointerEvent,i=n||this.latestPanInfo,r=this.isDragging;if(this.cancel(),!r||!i||!s)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&O.postRender(()=>a(s,i))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!ue(e,i,this.currentDirection))return;const r=this.getAxisMotionValue(e);let o=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(o=vu(o,this.constraints[e],this.elastic[e])),r.set(o)}resolveConstraints(){const{dragConstraints:e,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;e&&At(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=xu(s.layoutBox,e):this.constraints=!1,this.elastic=Tu(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&Q(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=_u(s.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!At(e))return!1;const s=e.current;ct(s!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const r=Mc(s,i.root,this.visualElement.getTransformPagePoint());let o=bu(i.layout.layoutBox,r);if(n){const a=n(Cc(o));this.hasMutatedConstraints=!!a,a&&(o=Lo(a))}return o}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=Q(c=>{if(!ue(c,n,this.currentDirection))return;let h=l&&l[c]||{};o&&(h={min:0,max:0});const d=i?200:1e6,f=i?40:1e7,v={type:"inertia",velocity:s?e[c]:0,bounceStiffness:d,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...r,...h};return this.startAxisValueAnimation(c,v)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return dn(this.visualElement,e),s.start(Yn(e,s,0,n,this.visualElement,!1))}stopAnimation(){Q(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){Q(e=>this.getAxisMotionValue(e).animation?.pause())}getAnimationState(e){return this.getAxisMotionValue(e).animation?.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){Q(n=>{const{drag:s}=this.getProps();if(!ue(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];r.set(e[n]-B(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!At(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Q(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=wu({min:l,max:l},this.constraints[o])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),Q(o=>{if(!ue(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(B(l,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;Cu.set(this.visualElement,this);const e=this.visualElement.current,n=Kt(e,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();At(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,r=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),O.read(s);const o=te(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(Q(c=>{const h=this.getAxisMotionValue(c);h&&(this.originPoint[c]+=l[c].translate,h.set(h.get()+l[c].translate))}),this.visualElement.render())}));return()=>{o(),n(),r(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:o=mn,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:a}}}function ue(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Pu(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class Mu extends pt{constructor(e){super(e),this.removeGroupControls=et,this.removeListeners=et,this.controls=new Su(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||et}unmount(){this.removeGroupControls(),this.removeListeners()}}const Hs=t=>(e,n)=>{t&&O.postRender(()=>t(e,n))};class Eu extends pt{constructor(){super(...arguments),this.removePointerDownListener=et}onPointerDown(e){this.session=new Zo(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Yo(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:Hs(e),onStart:Hs(n),onMove:s,onEnd:(r,o)=>{delete this.session,i&&O.postRender(()=>i(r,o))}}}mount(){this.removePointerDownListener=Kt(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const pe={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Gs(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const zt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(M.test(t))t=parseFloat(t);else return t;const n=Gs(t,e.target.x),s=Gs(t,e.target.y);return`${n}% ${s}%`}},Au={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=mt.parse(t);if(i.length>5)return s;const r=mt.createTransformer(t),o=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+o]/=a,i[1+o]/=l;const u=B(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),r(i)}};let ze=!1;class Vu extends g.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:r}=e;Jl(Ru),r&&(n.group&&n.group.add(r),s&&s.register&&i&&s.register(r),ze&&r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,onExitComplete:()=>this.safeToRemove()})),pe.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:r}=this.props,{projection:o}=s;return o&&(o.isPresent=r,ze=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==r?o.willUpdate():this.safeToRemove(),e.isPresent!==r&&(r?o.promote():o.relegate()||O.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Nn.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;ze=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Qo(t){const[e,n]=wo(),s=g.useContext(yn);return p.jsx(Vu,{...t,layoutGroup:s,switchLayoutGroup:g.useContext(Do),isPresent:e,safeToRemove:n})}const Ru={borderRadius:{...zt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:zt,borderTopRightRadius:zt,borderBottomLeftRadius:zt,borderBottomRightRadius:zt,boxShadow:Au};function ku(t,e,n){const s=K(t)?t:jt(t);return s.start(Yn("",s,e,n)),s.animation}const Du=(t,e)=>t.depth-e.depth;class ju{constructor(){this.children=[],this.isDirty=!1}add(e){bn(this.children,e),this.isDirty=!0}remove(e){wn(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Du),this.isDirty=!1,this.children.forEach(e)}}function Lu(t,e){const n=X.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(ft(s),t(r-e))};return O.setup(s,!0),()=>ft(s)}const tr=["TopLeft","TopRight","BottomLeft","BottomRight"],Ou=tr.length,qs=t=>typeof t=="string"?parseFloat(t):t,Xs=t=>typeof t=="number"||M.test(t);function Iu(t,e,n,s,i,r){i?(t.opacity=B(0,n.opacity??1,Bu(s)),t.opacityExit=B(e.opacity??1,0,Nu(s))):r&&(t.opacity=B(e.opacity??1,n.opacity??1,s));for(let o=0;o<Ou;o++){const a=`border${tr[o]}Radius`;let l=Ys(e,a),u=Ys(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||Xs(l)===Xs(u)?(t[a]=Math.max(B(qs(l),qs(u),s),0),(ot.test(u)||ot.test(l))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=B(e.rotate||0,n.rotate||0,s))}function Ys(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Bu=er(0,.5,Fi),Nu=er(.5,.95,et);function er(t,e,n){return s=>s<t?0:s>e?1:n(Xt(t,e,s))}function Zs(t,e){t.min=e.min,t.max=e.max}function Y(t,e){Zs(t.x,e.x),Zs(t.y,e.y)}function Js(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Qs(t,e,n,s,i){return t-=e,t=be(t,1/n,s),i!==void 0&&(t=be(t,1/i,s)),t}function Fu(t,e=0,n=1,s=.5,i,r=t,o=t){if(ot.test(e)&&(e=parseFloat(e),e=B(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=B(r.min,r.max,s);t===r&&(a-=e),t.min=Qs(t.min,e,n,a,i),t.max=Qs(t.max,e,n,a,i)}function ti(t,e,[n,s,i],r,o){Fu(t,e[n],e[s],e[i],e.scale,r,o)}const zu=["x","scaleX","originX"],$u=["y","scaleY","originY"];function ei(t,e,n,s){ti(t.x,e,zu,n?n.x:void 0,s?s.x:void 0),ti(t.y,e,$u,n?n.y:void 0,s?s.y:void 0)}function ni(t){return t.translate===0&&t.scale===1}function nr(t){return ni(t.x)&&ni(t.y)}function si(t,e){return t.min===e.min&&t.max===e.max}function Wu(t,e){return si(t.x,e.x)&&si(t.y,e.y)}function ii(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function sr(t,e){return ii(t.x,e.x)&&ii(t.y,e.y)}function oi(t){return G(t.x)/G(t.y)}function ri(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Uu{constructor(){this.members=[]}add(e){bn(this.members,e),e.scheduleRender()}remove(e){if(wn(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const r=this.members[i];if(r.isPresent!==!1){s=r;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Ku(t,e,n){let s="";const i=t.x.translate/e.x,r=t.y.translate/e.y,o=n?.z||0;if((i||r||o)&&(s=`translate3d(${i}px, ${r}px, ${o}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:h,rotateY:d,skewX:f,skewY:v}=n;u&&(s=`perspective(${u}px) ${s}`),c&&(s+=`rotate(${c}deg) `),h&&(s+=`rotateX(${h}deg) `),d&&(s+=`rotateY(${d}deg) `),f&&(s+=`skewX(${f}deg) `),v&&(s+=`skewY(${v}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const $e=["","X","Y","Z"],Hu=1e3;let Gu=0;function We(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function ir(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Wo(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",O,!(i||r))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&ir(s)}function or({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(o={},a=e?.()){this.id=Gu++,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.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(Yu),this.nodes.forEach(th),this.nodes.forEach(eh),this.nodes.forEach(Zu)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new ju)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Tn),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=bo(o)&&!Ol(o),this.instance=o;const{layoutId:a,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),t){let c,h=0;const d=()=>this.root.updateBlockedByResize=!1;O.read(()=>{h=window.innerWidth}),t(o,()=>{const f=window.innerWidth;f!==h&&(h=f,this.root.updateBlockedByResize=!0,c&&c(),c=Lu(d,250),pe.hasAnimatedSinceResize&&(pe.hasAnimatedSinceResize=!1,this.nodes.forEach(ci)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:h,hasRelativeLayoutChanged:d,layout:f})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||u.getDefaultTransition()||rh,{onLayoutAnimationStart:m,onLayoutAnimationComplete:x}=u.getProps(),b=!this.targetLayout||!sr(this.targetLayout,f),w=!h&&d;if(this.options.layoutRoot||this.resumeFrom||w||h&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const y={...In(v,"layout"),onPlay:m,onComplete:x};(u.shouldReduceMotion||this.options.layoutRoot)&&(y.delay=0,y.type=!1),this.startAnimation(y),this.setAnimationOrigin(c,w)}else h||ci(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=f})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ft(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(nh),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ir(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const h=this.path[c];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(ai);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(li);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Qu),this.nodes.forEach(qu),this.nodes.forEach(Xu)):this.nodes.forEach(li),this.clearAllSnapshots();const a=X.now();W.delta=lt(0,1e3/60,a-W.timestamp),W.timestamp=a,W.isProcessing=!0,Re.update.process(W),Re.preRender.process(W),Re.render.process(W),W.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Nn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Ju),this.sharedNodes.forEach(sh)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,O.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){O.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!G(this.snapshot.measuredBox.x)&&!G(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 l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=F(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const l=s(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!nr(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;o&&this.instance&&(a||vt(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),ah(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:o}=this.options;if(!o)return F();const a=o.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(lh))){const{scroll:u}=this.root;u&&(Vt(a.x,u.offset.x),Vt(a.y,u.offset.y))}return a}removeElementScroll(o){const a=F();if(Y(a,o),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:c,options:h}=u;u!==this.root&&c&&h.layoutScroll&&(c.wasRoot&&Y(a,o),Vt(a.x,c.offset.x),Vt(a.y,c.offset.y))}return a}applyTransform(o,a=!1){const l=F();Y(l,o);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&Rt(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),vt(c.latestValues)&&Rt(l,c.latestValues)}return vt(this.latestValues)&&Rt(l,this.latestValues),l}removeTransform(o){const a=F();Y(a,o);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!vt(u.latestValues))continue;ln(u.latestValues)&&u.updateSnapshot();const c=F(),h=u.measurePageBox();Y(c,h),ei(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return vt(this.latestValues)&&ei(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}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!==W.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:h}=this.options;if(!(!this.layout||!(c||h))){if(this.resolvedRelativeTargetAt=W.timestamp,!this.targetDelta&&!this.relativeTarget){const d=this.getClosestProjectingParent();d&&d.layout&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=F(),this.relativeTargetOrigin=F(),Gt(this.relativeTargetOrigin,this.layout.layoutBox,d.layout.layoutBox),Y(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=F(),this.targetWithTransforms=F()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),mu(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Y(this.target,this.layout.layoutBox),Io(this.target,this.targetDelta)):Y(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const d=this.getClosestProjectingParent();d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=F(),this.relativeTargetOrigin=F(),Gt(this.relativeTargetOrigin,this.target,d.target),Y(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||ln(this.parent.latestValues)||Oo(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===W.timestamp&&(l=!1),l)return;const{layout:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;Y(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,d=this.treeScale.y;Pc(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=F());const{target:f}=o;if(!f){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Js(this.prevProjectionDelta.x,this.projectionDelta.x),Js(this.prevProjectionDelta.y,this.projectionDelta.y)),Ht(this.projectionDelta,this.layoutCorrected,f,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==d||!ri(this.projectionDelta.x,this.prevProjectionDelta.x)||!ri(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",f))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){if(this.options.visualElement?.scheduleRender(),o){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=kt(),this.projectionDelta=kt(),this.projectionDeltaWithTransform=kt()}setAnimationOrigin(o,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},h=kt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=F(),f=l?l.source:void 0,v=this.layout?this.layout.source:void 0,m=f!==v,x=this.getStack(),b=!x||x.members.length<=1,w=!!(m&&!b&&this.options.crossfade===!0&&!this.path.some(oh));this.animationProgress=0;let y;this.mixTargetDelta=_=>{const T=_/1e3;ui(h.x,o.x,T),ui(h.y,o.y,T),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Gt(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),ih(this.relativeTarget,this.relativeTargetOrigin,d,T),y&&Wu(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=F()),Y(y,this.relativeTarget)),m&&(this.animationValues=c,Iu(c,u,this.latestValues,T,w,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(ft(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=O.update(()=>{pe.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=jt(0)),this.currentAnimation=ku(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Hu),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&rr(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||F();const h=G(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+h;const d=G(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+d}Y(a,l),Rt(a,c),Ht(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Uu),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){const{layoutId:o}=this.options;return o?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:o}=this.options;return o?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&We("z",o,u,this.animationValues);for(let c=0;c<$e.length;c++)We(`rotate${$e[c]}`,o,u,this.animationValues),We(`skew${$e[c]}`,o,u,this.animationValues);o.render();for(const c in u)o.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=me(a?.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=me(a?.pointerEvents)||""),this.hasProjected&&!vt(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let h=Ku(this.projectionDeltaWithTransform,this.treeScale,c);l&&(h=l(c,h)),o.transform=h;const{x:d,y:f}=this.projectionDelta;o.transformOrigin=`${d.origin*100}% ${f.origin*100}% 0`,u.animationValues?o.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:o.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const v in Qt){if(c[v]===void 0)continue;const{correct:m,applyTo:x,isCSSVariable:b}=Qt[v],w=h==="none"?c[v]:m(c[v],u);if(x){const y=x.length;for(let _=0;_<y;_++)o[x[_]]=w}else b?this.options.visualElement.renderState.vars[v]=w:o[v]=w}this.options.layoutId&&(o.pointerEvents=u===this?me(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>o.currentAnimation?.stop()),this.root.nodes.forEach(ai),this.root.sharedNodes.clear()}}}function qu(t){t.updateLayout()}function Xu(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=t.layout,{animationType:i}=t.options,r=e.source!==t.layout.source;i==="size"?Q(c=>{const h=r?e.measuredBox[c]:e.layoutBox[c],d=G(h);h.min=n[c].min,h.max=h.min+d}):rr(i,e.layoutBox,n)&&Q(c=>{const h=r?e.measuredBox[c]:e.layoutBox[c],d=G(n[c]);h.max=h.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[c].max=t.relativeTarget[c].min+d)});const o=kt();Ht(o,n,e.layoutBox);const a=kt();r?Ht(a,t.applyTransform(s,!0),e.measuredBox):Ht(a,n,e.layoutBox);const l=!nr(o);let u=!1;if(!t.resumeFrom){const c=t.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:h,layout:d}=c;if(h&&d){const f=F();Gt(f,e.layoutBox,h.layoutBox);const v=F();Gt(v,n,d.layoutBox),sr(f,v)||(u=!0),c.options.layoutRoot&&(t.relativeTarget=v,t.relativeTargetOrigin=f,t.relativeParent=c)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:o,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function Yu(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Zu(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Ju(t){t.clearSnapshot()}function ai(t){t.clearMeasurements()}function li(t){t.isLayoutDirty=!1}function Qu(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function ci(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function th(t){t.resolveTargetDelta()}function eh(t){t.calcProjection()}function nh(t){t.resetSkewAndRotation()}function sh(t){t.removeLeadSnapshot()}function ui(t,e,n){t.translate=B(e.translate,0,n),t.scale=B(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function hi(t,e,n,s){t.min=B(e.min,n.min,s),t.max=B(e.max,n.max,s)}function ih(t,e,n,s){hi(t.x,e.x,n.x,s),hi(t.y,e.y,n.y,s)}function oh(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const rh={duration:.45,ease:[.4,0,.1,1]},di=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),fi=di("applewebkit/")&&!di("chrome/")?Math.round:et;function mi(t){t.min=fi(t.min),t.max=fi(t.max)}function ah(t){mi(t.x),mi(t.y)}function rr(t,e,n){return t==="position"||t==="preserve-aspect"&&!fu(oi(e),oi(n),.2)}function lh(t){return t!==t.root&&t.scroll?.wasRoot}const ch=or({attachResizeListener:(t,e)=>te(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ue={current:void 0},ar=or({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Ue.current){const t=new ch({});t.mount(window),t.setOptions({layoutScroll:!0}),Ue.current=t}return Ue.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),uh={pan:{Feature:Eu},drag:{Feature:Mu,ProjectionNode:ar,MeasureLayout:Qo}};function pi(t,e,n){const{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,r=s[i];r&&O.postRender(()=>r(e,oe(e)))}class hh extends pt{mount(){const{current:e}=this.node;e&&(this.unmount=Rl(e,(n,s)=>(pi(this.node,s,"Start"),i=>pi(this.node,i,"End"))))}unmount(){}}class dh extends pt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{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=ne(te(this.node.current,"focus",()=>this.onFocus()),te(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function gi(t,e,n){const{props:s}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&s.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),r=s[i];r&&O.postRender(()=>r(e,oe(e)))}class fh extends pt{mount(){const{current:e}=this.node;e&&(this.unmount=Ll(e,(n,s)=>(gi(this.node,s,"Start"),(i,{success:r})=>gi(this.node,i,r?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const pn=new WeakMap,Ke=new WeakMap,mh=t=>{const e=pn.get(t.target);e&&e(t)},ph=t=>{t.forEach(mh)};function gh({root:t,...e}){const n=t||document;Ke.has(n)||Ke.set(n,{});const s=Ke.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(ph,{root:t,...e})),s[i]}function yh(t,e,n){const s=gh(e);return pn.set(t,n),s.observe(t),()=>{pn.delete(t),s.unobserve(t)}}const vh={some:0,all:1};class xh extends pt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:r}=e,o={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:vh[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,r&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:h}=this.node.getProps(),d=u?c:h;d&&d(l)};return yh(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(bh(e,n))&&this.startObserver()}unmount(){}}function bh({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const wh={inView:{Feature:xh},tap:{Feature:fh},focus:{Feature:dh},hover:{Feature:hh}},_h={layout:{ProjectionNode:ar,MeasureLayout:Qo}},Th={...au,...wh,...uh,..._h},Zn=Tc(Th,Oc),Ch="_primary_13825_8",Sh="_secondary_13825_12",Ph="_tertiary_13825_16",Mh="_positive_13825_20",Eh="_negative_13825_24",Ah="_warning_13825_28",Vh="_accent_13825_32",Rh="_inverse_13825_36",kh="_text_13825_111",Dh="_regular_13825_117",jh="_medium_13825_121",Lh="_semibold_13825_125",Oh="_bold_13825_129",he={primary:Ch,secondary:Sh,tertiary:Ph,positive:Mh,negative:Eh,warning:Ah,accent:Vh,inverse:Rh,"title-1":"_title-1_13825_41","title-2":"_title-2_13825_51","title-3":"_title-3_13825_61","headline-1":"_headline-1_13825_76","headline-2":"_headline-2_13825_81","headline-3":"_headline-3_13825_86","body-1":"_body-1_13825_91","body-2":"_body-2_13825_96","caption-1":"_caption-1_13825_101","caption-2":"_caption-2_13825_106",text:kh,regular:Dh,medium:jh,semibold:Lh,bold:Oh},Ih=t=>{let e;t.center?e="center":t.left?e="left":t.right&&(e="right");let n;return t.uppercase?n="uppercase":t.lowercase?n="lowercase":t.capitalize&&(n="capitalize"),E.css({marginTop:t.mt,marginBottom:t.mb,marginRight:t.mr,marginLeft:t.ml,flex:t.flex,cursor:t.cursor,wordBreak:t.wordBreak,whiteSpace:t.whiteSpace,textOverflow:t.textOverflow,textDecoration:t.decoration,textAlign:e,textTransform:n,color:t.color,opacity:t.disabled?.5:void 0,overflow:t.overflow})},L=g.forwardRef((t,e)=>{const{children:n,className:s,variant:i="body-1",fontWeight:r="medium",tag:o="p",colorName:a="primary",style:l,clickOpacity:u=.5,opacityDuration:c=200,onClick:h,disabled:d,...f}=t,[v,m]=g.useState(!1),x=!!h,b=()=>x&&m(!0),w=()=>x&&m(!1),y=o,_=x?E.css({opacity:v?u:1,transition:`opacity ${c}ms ease`}):"";return p.jsx(y,{ref:e,...f,className:E.cx(he.text,he[i],he[a],he[r],_,s,Ih(t)),style:l,onClick:h,onMouseDown:b,onMouseUp:w,onMouseLeave:w,onTouchStart:b,onTouchEnd:w,role:x?"button":void 0,tabIndex:x?0:void 0,children:n})});L.displayName="Text";const lr=Zn(L),Bh="_loader_1qleq_8",Nh={loader:Bh},Fh=({color:t="var(--text-accent)"})=>p.jsx("span",{className:E.cx(Nh.loader,E.css({"--loader-color":t}))}),zh=E.css({display:"flex",alignItems:"center",justifyContent:"center",position:"relative",borderRadius:16,height:48,padding:"0 16px",cursor:"pointer",fontSize:16,fontWeight:600,overflow:"hidden",transition:"all 0.2s ease",gap:8}),$t={zero:"var(--corner-zero)",xs:"var(--corner-xs)",sm:"var(--corner-sm)",md:"var(--corner-md)",lg:"var(--corner-lg)",xl:"var(--corner-xl)","2xl":"var(--corner-2xl)","3xl":"var(--corner-3xl)","4xl":"var(--corner-4xl)","5xl":"var(--corner-5xl)","6xl":"var(--corner-6xl)","full-round":"var(--corner-full-round)"},$h={xs:"var(--height-button-xs)",sm:"var(--height-button-sm)",md:"var(--height-button-md)",lg:"var(--height-button-lg)"},Wh={clear:E.css({backgroundColor:"transparent",border:"none"}),filled:E.css({backgroundColor:"var(--fill-accent-primary)",color:"white",border:"none"}),outline:E.css({backgroundColor:"transparent",border:"1px solid var(--border-accent-primary)"})},Uh=(t,e,n,s)=>{if(s)return E.css({cursor:"not-allowed",opacity:.7});const i={transition:"all 0.2s ease",borderRadius:"var(--corner-lg)",border:"none",color:t==="filled"?"var(--text-inverse)":`var(--text-${e})`};switch(t){case"filled":return E.css({...i,backgroundColor:`var(--fill-${e}-${n})`,":hover":{backgroundColor:`var(--fill-${e}-${n}-hover)`},":active":{backgroundColor:`var(--fill-${e}-${n}-hover)`}});case"outline":return E.css({...i,backgroundColor:"transparent",border:`1px solid var(--border-${e}-${n})`,":hover":{backgroundColor:`var(--fill-${e}-secondary-hover)`},":active":{backgroundColor:`var(--fill-${e}-secondary-hover)`}});case"clear":return E.css({...i,backgroundColor:"transparent",":hover":{backgroundColor:`var(--fill-${e}-secondary-hover)`},":active":{backgroundColor:`var(--fill-${e}-secondary-hover)`}});default:return E.css(i)}},Kh=({disabled:t,loading:e,onClick:n,wrapperClassName:s,buttonClassName:i,buttonDisabledClassName:r,textClassName:o,children:a,variant:l="filled",backgroundColor:u,textColor:c,textFontWeight:h,borderColor:d,color:f="accent",borderRadius:v,width:m="full",size:x="md",iconLeft:b,iconRight:w,intensity:y="primary",..._})=>{const T=g.useMemo(()=>{switch(m){case"full":return"100%";case"auto":return"auto";default:return m}},[m]),S=g.useMemo(()=>u||(l==="filled"?f==="neutral"?"var(--fill-neutral-secondary)":`var(--fill-${f}-${y})`:"transparent"),[l,t,u,f,y]),P=g.useMemo(()=>{if(y==="primary"){if(f==="neutral")return"var(--text-secondary)";if(l==="filled")return"var(--text-inverse)"}else if(f==="neutral")return"var(--text-secondary)";return`var(--text-${f})`},[y,f,l]),C=g.useMemo(()=>{if(y==="primary"){if(f==="neutral")return"secondary";if(l==="filled")return"inverse"}else if(f==="neutral")return"secondary";return f},[l,t,c,f,y]),R=g.useMemo(()=>d||(l==="outline"?`var(--border-${f}-${y})`:"transparent"),[l,d,f,y]),k=g.useMemo(()=>{switch(x){case"lg":return $t.lg;case"md":case"sm":return $t.md;case"xs":return $t.sm;default:return $t.md}},[x]),H=E.cx(zh,Uh(l,f,y,t),Wh[l],i,t?r:void 0,E.css({borderRadius:v?$t[v]:k,backgroundColor:S,borderColor:R,color:c,width:"100%",height:$h[x],opacity:t?.7:1})),rt=g.useMemo(()=>{switch(x){case"lg":case"md":return"body-1";case"sm":case"xs":return"body-2";default:return"body-1"}},[x]);return p.jsx(A,{className:E.cx(s),w:T,relative:!0,overflow:"hidden",children:p.jsxs(Zn.button,{whileTap:!t&&!e?{scale:.99,boxShadow:"inset 0 0 0 10000px rgba(0,0,0,0.1)",transition:{duration:0}}:{},className:H,disabled:t||e,onClick:n,..._,children:[e?p.jsx(Fh,{color:P}):p.jsxs(p.Fragment,{children:[b,p.jsx(lr,{style:{color:c},colorName:C,variant:rt,className:o,textOverflow:"ellipsis",overflow:"hidden",children:a}),w]}),p.jsx(ee,{})]})})},Hh=t=>V.createElement("svg",{viewBox:"0 0 24 24",fill:"none",...t},V.createElement("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z",fill:"currentColor"})),Gh=t=>V.createElement("svg",{viewBox:"0 0 24 24",fill:"none",...t},V.createElement("path",{d:"M19 13H5v-2h14v2z",fill:"currentColor"})),qh="_checkbox_asmiz_8",Xh="_disabled_asmiz_15",Yh="_checkbox__ripple_asmiz_15",Zh="_checkbox__input_asmiz_27",Jh="_checkbox__box_asmiz_35",Qh="_secondary_asmiz_48",td="_checked_asmiz_54",ed="_error_asmiz_63",at={checkbox:qh,disabled:Xh,checkbox__ripple:Yh,checkbox__input:Zh,checkbox__box:Jh,secondary:Qh,checked:td,error:ed},nd={sm:20,md:24},Jn=g.forwardRef(({checked:t,onChange:e,disabled:n,error:s,indeterminate:i,size:r="md",title:o,titleColor:a,subtitle:l,subtitleColor:u="secondary",name:c,required:h,variant:d="primary",flex:f},v)=>{const[m,x]=g.useState(!1),b=t!==void 0,w=b?t:m,y=S=>{b||x(S.target.checked),e?.(S)},_=nd[r],T=w||i;return p.jsxs("label",{className:E.cx(at.checkbox,E.css({flex:f}),{[at.disabled]:n}),children:[p.jsxs(A,{relative:!0,display:"inline-flex",style:{"--checkbox-size":`${_}px`,"--checkbox-size-double":`${_*2}px`},children:[p.jsx("input",{ref:v,type:"checkbox",checked:w,onChange:y,onClick:S=>S.stopPropagation(),disabled:n,name:c,required:h,className:E.cx(at.checkbox__input,{[at.disabled]:n})}),p.jsx("div",{className:E.cx(at.checkbox__box,at[d],{[at.disabled]:n,[at.error]:s,[at.checked]:T}),children:T&&(i?p.jsx(Gh,{width:_*.75,height:_*.75}):p.jsx(Hh,{width:_*.75,height:_*.75}))})]}),(o||l)&&p.jsxs(A,{gap:4,children:[o&&p.jsx(L,{colorName:a,variant:r==="sm"?"body-2":"body-1",children:o}),l&&p.jsx(L,{variant:"body-2",colorName:u,children:l})]})]})});Jn.displayName="Checkbox";const sd=t=>V.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},V.createElement("g",{opacity:.5},V.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.0002 17.9999C14.4185 17.9999 18.0002 14.4182 18.0002 9.99991C18.0002 5.58163 14.4185 1.99991 10.0002 1.99991C5.58197 1.99991 2.00024 5.58163 2.00024 9.99991C2.00024 14.4182 5.58197 17.9999 10.0002 17.9999ZM6.46514 6.46446C6.85566 6.07393 7.48883 6.07393 7.87935 6.46446L9.64712 8.23222C9.84238 8.42749 10.159 8.42749 10.3542 8.23222L12.122 6.46446C12.5125 6.07393 13.1457 6.07393 13.5362 6.46446C13.9267 6.85498 13.9267 7.48814 13.5362 7.87867L11.7684 9.64644C11.5732 9.8417 11.5732 10.1583 11.7684 10.3535L13.5362 12.1213C13.9267 12.5118 13.9267 13.145 13.5362 13.5355C13.1457 13.926 12.5125 13.926 12.122 13.5355L10.3542 11.7678C10.159 11.5725 9.84238 11.5725 9.64712 11.7678L7.87935 13.5355C7.48883 13.926 6.85566 13.926 6.46514 13.5355C6.07462 13.145 6.07462 12.5118 6.46514 12.1213L8.23291 10.3535C8.42817 10.1583 8.42817 9.8417 8.23291 9.64644L6.46514 7.87867C6.07462 7.48815 6.07462 6.85498 6.46514 6.46446Z",fill:"currentColor"}))),id="_disabled_1cgqj_20",od="_multiline_1cgqj_24",rd="_input_1cgqj_8",ad="_sm_1cgqj_64",ld="_md_1cgqj_69",cd="_error_1cgqj_74",ud="_white_1cgqj_78",hd="_gray_1cgqj_82",Z={"input-container":"_input-container_1cgqj_8",disabled:id,multiline:od,input:rd,"input-text-size_sm":"_input-text-size_sm_1cgqj_55","input-text-size_md":"_input-text-size_md_1cgqj_59",sm:ad,md:ld,error:cd,white:ud,gray:hd,"clear-button":"_clear-button_1cgqj_86"};function yi(t){return{...new Event("input",{bubbles:!0}),target:t,currentTarget:t}}const cr=g.forwardRef((t,e)=>{const{label:n,prompt:s,error:i,errorText:r,size:o="md",prefix:a,suffix:l,background:u="white",showClearButton:c,disabled:h,value:d,defaultValue:f,...v}=t,m=t.multiline===!0,x=g.useRef(null),b=g.useRef(null),[w,y]=we(d!==void 0?String(d):void 0,f!==void 0?String(f):"");g.useImperativeHandle(e,()=>({focus:()=>{x.current?.focus(),b.current?.focus()},blur:()=>{x.current?.blur(),b.current?.blur()},get value(){return x.current?.value||b.current?.value}}));const _=P=>{if(y(P.target.value),m){const C=t.onChange;C?.(P)}else{const C=t.onChange;C?.(P)}};g.useEffect(()=>{m&&t.autoResize&&b.current&&(b.current.style.height="auto",b.current.style.height=`${b.current.scrollHeight}px`)},[w,m,t.autoResize]);const T=()=>{if(y(""),!m){const C=x.current;if(C){C.value="";const R=yi(C),k=t.onChange;k?.(R)}return}const P=b.current;if(P){P.value="";const C=yi(P),R=t.onChange;R?.(C)}},S=()=>{if(m){const{rows:k,autoResize:H,onChange:rt,multiline:gt,...ht}=v;return p.jsx("textarea",{ref:b,rows:t.rows??3,className:E.cx(Z.input,{[Z.disabled]:h}),disabled:h,maxLength:t.maxLength,...ht,value:w,onChange:_})}const{onChange:P,multiline:C,...R}=v;return p.jsx("input",{...R,ref:x,className:E.cx(Z.input,Z[`input-text-size_${o}`],{[Z.disabled]:h}),disabled:h,type:t.type??"text",value:w,onChange:_})};return p.jsxs(A,{w:"full",gap:"var(--spacing-sm)",children:[n&&p.jsx(L,{variant:"body-2",fontWeight:"regular",colorName:"tertiary",children:n}),p.jsxs(A,{row:!0,alignItems:m?"flex-start":"center",w:"full",gap:"var(--spacing-md)",className:E.cx(Z["input-container"],Z[u],Z[o],{[Z.error]:i,[Z.disabled]:h,[Z.multiline]:m}),children:[a&&p.jsx(A,{flex:"none",children:a}),p.jsx(A,{flex:"1",children:S()}),c&&w&&!h&&p.jsx(A,{flex:"none",children:p.jsx("span",{className:Z["clear-button"],onClick:T,children:p.jsx(sd,{})})}),l&&p.jsx(A,{flex:"none",children:l})]}),(s||m)&&p.jsxs(A,{row:!0,gap:10,w:"full",children:[typeof s=="string"?p.jsx(L,{variant:"caption-1",colorName:"tertiary",children:s}):s,m&&t.maxLength&&p.jsx(L,{right:!0,ml:"auto",flex:"none",variant:"caption-1",colorName:"tertiary",children:`${w.length}/${t.maxLength}`})]}),r&&i&&p.jsx(L,{variant:"body-2",colorName:"negative",fontWeight:"regular",children:r})]})});cr.displayName="Input";const dd=t=>V.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},V.createElement("path",{d:"M6 9L12 15L18 9",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),fd=t=>V.createElement("svg",{fill:"currentColor",id:"Capa_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 462.035 462.035",xmlSpace:"preserve",...t},V.createElement("g",null,V.createElement("path",{d:"M457.83,158.441c-0.021-0.028-0.033-0.058-0.057-0.087l-50.184-62.48c-0.564-0.701-1.201-1.305-1.879-1.845 c-2.16-2.562-5.355-4.225-8.967-4.225H65.292c-3.615,0-6.804,1.661-8.965,4.225c-0.678,0.54-1.316,1.138-1.885,1.845l-50.178,62.48 c-0.023,0.029-0.034,0.059-0.057,0.087C1.655,160.602,0,163.787,0,167.39v193.07c0,6.5,5.27,11.771,11.77,11.771h438.496 c6.5,0,11.77-5.271,11.77-11.771V167.39C462.037,163.787,460.381,160.602,457.83,158.441z M408.516,134.615l16.873,21.005h-16.873 V134.615z M384.975,113.345v42.274H296.84c-2.514,0-4.955,0.805-6.979,2.293l-58.837,43.299l-58.849-43.305 c-2.023-1.482-4.466-2.287-6.978-2.287H77.061v-42.274H384.975z M53.523,155.62H36.65l16.873-21.005V155.62z M438.498,348.69H23.54 V179.16h137.796l62.711,46.148c4.15,3.046,9.805,3.052,13.954-0.005l62.698-46.144h137.799V348.69L438.498,348.69z"}))),md="_avatar_1oe2p_8",pd="_avatar_primary_1oe2p_22",gd="_avatar_secondary_1oe2p_25",yd="_avatar_negative_1oe2p_28",vd="_avatar_positive_1oe2p_31",xd="_avatar_warning_1oe2p_34",bd="_avatar_lgSize_1oe2p_71",wd="_avatar_mdSize_1oe2p_85",_d="_avatar_smSize_1oe2p_99",He={avatar:md,avatar_primary:pd,avatar_secondary:gd,avatar_negative:yd,avatar_positive:vd,avatar_warning:xd,avatar_lgSize:bd,avatar_mdSize:wd,avatar_smSize:_d};function Td({attr:t,children:e,className:n,color:s="primary",size:i="md",...r}){const o="avatar";return p.jsx("div",{...t,...r,className:xt(He[o],n,qt(He,o,i),_e(He,o,s)),children:e})}const Cd=t=>V.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},V.createElement("circle",{cx:12,cy:12,r:10,fill:"currentColor",fillOpacity:.15}),V.createElement("path",{d:"M16 9L10.0337 15L8 12.9548",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),vi=t=>V.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},V.createElement("path",{d:"M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z",fill:"currentColor",fillOpacity:.15}),V.createElement("path",{d:"M12 6C11.4477 6 11 6.44772 11 7V13C11 13.5523 11.4477 14 12 14C12.5523 14 13 13.5523 13 13V7C13 6.44772 12.5523 6 12 6Z",fill:"currentColor"}),V.createElement("path",{d:"M12 15C11.4477 15 11 15.4477 11 16V17C11 17.5523 11.4477 18 12 18C12.5523 18 13 17.5523 13 17V16C13 15.4477 12.5523 15 12 15Z",fill:"currentColor"})),Sd=t=>V.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},V.createElement("circle",{cx:12,cy:12,r:10,fill:"currentColor",fillOpacity:.12}),V.createElement("path",{d:"M16 8L8 16M16 16L8 8",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})),Pd=t=>V.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"black",...t},V.createElement("path",{d:"M12 2V22M19.0711 4.92893L4.92893 19.0711M22 12H2M19.0711 19.0711L4.92893 4.92893",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Md="_hint_prca1_8",Ed="_md_prca1_19",Ad="_sm_prca1_24",Vd="_icon_prca1_29",Rd="_content_prca1_40",kd="_title_prca1_46",Dd="_subtitle_prca1_50",jd="_disabled_prca1_55",Ld="_warning_prca1_60",Od="_solid_prca1_60",Id="_negative_prca1_65",Bd="_positive_prca1_70",Nd="_accent_prca1_75",Fd="_neutral_prca1_80",zd="_soft_prca1_85",J={hint:Md,md:Ed,sm:Ad,icon:Vd,content:Rd,title:kd,subtitle:Dd,disabled:jd,warning:Ld,solid:Od,negative:Id,positive:Bd,accent:Nd,neutral:Fd,soft:zd},$d={negative:p.jsx(Sd,{}),positive:p.jsx(Cd,{}),accent:p.jsx(vi,{}),warning:p.jsx(vi,{}),neutral:p.jsx(Pd,{})},Wd=({title:t,subtitle:e,color:n="warning",variant:s="soft",size:i="md",icon:r,disabled:o=!1,className:a,style:l})=>{const u=r||$d[n];return p.jsxs("div",{className:xt(J.hint,J[n],J[s],J[i],o&&J.disabled,a),style:l,"aria-disabled":o,children:[u&&p.jsx("span",{className:xt(J.icon,J[n]),children:u}),p.jsxs("div",{className:J.content,children:[t&&p.jsx(L,{className:xt(J.title,qt(J,"title",i)),variant:i==="md"?"body-1":"caption-2",children:t}),e&&p.jsx(L,{className:xt(J.subtitle,qt(J,"subtitle",i)),variant:i==="md"?"body-2":"caption-1",children:e})]})]})},Ud={primary:{bg:"var(--status-neutral-tint-low)",color:"var(--text-primary)"},accent:{bg:"var(--status-accent-tint-low)",color:"var(--text-accent)"},warning:{bg:"var(--status-warning-tint-low)",color:"var(--text-warning)"},positive:{bg:"var(--status-positive-tint-low)",color:"var(--text-positive)"},negative:{bg:"var(--status-negative-tint-low)",color:"var(--text-negative)"}},Kd={sm:28,md:32,lg:40},Qn=g.forwardRef(({label:t,color:e="primary",size:n="md",onClick:s,onDelete:i,avatar:r,icon:o,disabled:a,className:l},u)=>{const c=g.useRef(null),h=Ud[e],d=E.css({cursor:a?"not-allowed":s?"pointer":"default",opacity:a?.5:1,userSelect:"none",position:"relative",transition:"background-color 0.2s, opacity 0.2s","&:hover":a?void 0:{backgroundColor:h.bg}}),f=E.css({cursor:"pointer",opacity:.6,"&:hover":{opacity:1}});return p.jsxs(A,{ref:v=>{c.current=v,typeof u=="function"?u(v):u&&(u.current=v)},row:!0,alignItems:"center",gap:6,px:10,py:4,h:Kd[n],maxWidth:196,overflow:"hidden",borderRadius:"var(--corner-sm)",backgroundColor:h.bg,color:h.color,onClick:s,className:E.cx(d,l),children:[s&&p.jsx(ee,{}),r&&p.jsx(A,{w:20,h:20,borderRadius:"50%",overflow:"hidden",children:r}),o&&p.jsx(A,{children:o}),p.jsx(L,{variant:"caption-1",colorName:e,textOverflow:"ellipsis",children:t}),i&&!a&&p.jsx(L,{className:f,colorName:e,onClick:v=>{v.stopPropagation(),i(v)},children:"×"})]})});Qn.displayName="Tag";const ur=({children:t})=>{const[e]=g.useState(()=>document.createElement("div"));return g.useEffect(()=>{let n=document.getElementById("portal-root");return n||(n=document.createElement("div"),n.id="portal-root",document.body.appendChild(n)),n.appendChild(e),()=>{n&&n.contains(e)&&n.removeChild(e)}},[e]),Si.createPortal(t,e)},Hd="_disabled_1evr5_40",Gd="_open_1evr5_48",qd="_error_1evr5_51",Xd="_hidden_1evr5_87",Yd="_visible_1evr5_90",Zd="_selected_1evr5_163",$={"select-container":"_select-container_1evr5_8","full-width":"_full-width_1evr5_13","select-input":"_select-input_1evr5_17","size-xs":"_size-xs_1evr5_25","size-sm":"_size-sm_1evr5_30","size-md":"_size-md_1evr5_35",disabled:Hd,open:Gd,"select-arrow":"_select-arrow_1evr5_48",error:qd,"select-value":"_select-value_1evr5_62","select-value_xs":"_select-value_xs_1evr5_74","select-placeholder":"_select-placeholder_1evr5_81",hidden:Xd,visible:Yd,"select-arrow_xs":"_select-arrow_xs_1evr5_106","select-dropdown":"_select-dropdown_1evr5_116","select-menu":"_select-menu_1evr5_126","select-menu-item":"_select-menu-item_1evr5_145","select-menu-item-first":"_select-menu-item-first_1evr5_158",selected:Zd,"overflow-tooltip-container":"_overflow-tooltip-container_1evr5_167","overflow-tooltip-text":"_overflow-tooltip-text_1evr5_172","empty-block":"_empty-block_1evr5_179"};function Jd({value:t,onChange:e,multiple:n=!1,returnedValue:s,renderItem:i,placeholder:r,items:o=[],fullWidth:a,size:l="md",showDefaultItem:u,disabled:c,label:h,firstItem:d,lastItem:f,observer:v,emptyText:m,onBlur:x,prompt:b,error:w,errorText:y}){const[_,T]=we(t,n?[]:null),S=g.useRef(null),P=g.useRef(null),[C,R]=g.useState(!1),k=g.useMemo(()=>n?_||[]:_!=null?[_]:[],[_,n]),H=g.useMemo(()=>{const D=new Map;return o.forEach(j=>{D.set(s(j),j)}),D},[o,s]),rt=Mi(S,C),gt=!o.length&&!w,ht=D=>{const j=s(D);if(n){const U=k.includes(j)?k.filter(re=>re!==j):[...k,j];T(U),e?.(U)}else T(j),e?.(j),R(!1)},Ct=D=>{if(!n)return;const j=k.filter(U=>U!==D);T(j),e?.(j)},St=()=>{const D=n?[]:null;T(D),e?.(D),n||R(!1)};g.useEffect(()=>{if(!C)return;const D=j=>{const U=j.target;!S.current?.contains(U)&&!P.current?.contains(U)&&R(!1)};return document.addEventListener("mousedown",D),()=>document.removeEventListener("mousedown",D)},[C]);const N=()=>{if(!k.length)return p.jsx(L,{variant:l==="xs"?"caption-1":"body-2",textOverflow:"ellipsis",overflow:"hidden",children:r??"Select..."});if(n)return p.jsx(A,{flexWrap:"wrap",row:!0,gap:10,children:k.map(U=>{const re=H.get(U);return re?p.jsx(Qn,{size:"sm",label:i(re),onDelete:gr=>{gr.stopPropagation(),Ct(U)}},U):null})});const D=H.get(k[0]);if(!D)return p.jsx(L,{variant:l==="xs"?"caption-1":"body-2",textOverflow:"ellipsis",overflow:"hidden",children:r});const j=i(D);return typeof j=="string"?p.jsx(L,{variant:l==="xs"?"caption-1":"body-2",tag:"p",textOverflow:"ellipsis",overflow:"hidden",children:j}):p.jsx(p.Fragment,{children:j})},q=C&&p.jsx(ur,{children:p.jsx(Zn.div,{ref:P,className:$["select-dropdown"],initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.25,ease:"easeInOut"},style:{...rt,position:"absolute",zIndex:1},children:p.jsxs("ul",{className:$["select-menu"],children:[u&&!n&&p.jsx(A,{className:$["select-menu-item"],role:"option",onClick:St,children:p.jsx(L,{variant:"body-2",children:r})}),d&&p.jsx(A,{className:E.cx($["select-menu-item"],$["select-menu-item-first"]),children:d}),gt&&p.jsxs(A,{className:$["empty-block"],children:[p.jsx(A,{w:20,h:20,children:p.jsx(fd,{})}),p.jsx(L,{variant:"body-2",children:m??"There is nothing yet"})]}),o.map(D=>{const j=s(D),U=k.includes(j);return p.jsxs(A,{row:!0,gap:10,alignItems:"center",className:E.cx($["select-menu-item"],{[$.selected]:U}),role:"option",relative:!0,onClick:()=>ht(D),children:[n&&p.jsx(Jn,{size:"sm",checked:U}),typeof i(D)=="string"?p.jsx(L,{variant:"body-2",tag:"p",wordBreak:"break-all",whiteSpace:"break-spaces",children:i(D)}):i(D),p.jsx(ee,{})]},j)}),v,f&&p.jsx(A,{className:E.cx($["select-menu-item"],$["select-menu-item-first"]),children:f})]})},"dropdown")});return p.jsxs(A,{relative:!0,display:"inline-block",minWidth:120,w:a?"full":"auto",children:[typeof h=="string"?p.jsx(L,{variant:"body-2",colorName:"tertiary",fontWeight:"regular",mb:l==="sm"?4:8,children:h}):h,p.jsxs(A,{ref:S,row:!0,gap:10,tabIndex:c?-1:0,role:"button",alignItems:"flex-start","aria-haspopup":"listbox",relative:!0,w:"100%",className:E.cx($["select-input"],$[`size-${l}`],{[$.error]:w,[$.disabled]:c,[$.open]:C}),onClick:()=>!c&&R(D=>!D),onBlur:x,children:[p.jsx(A,{className:E.cx($["select-value"]),children:N()}),p.jsx(A,{className:E.cx($["select-arrow"],$[`select-arrow_${l}`]),children:p.jsx(dd,{})})]}),typeof b=="string"?p.jsx(L,{variant:"caption-1",colorName:"tertiary",mt:4,children:b}):b,w&&y&&p.jsx(L,{tag:"p",colorName:"negative",variant:"body-2",mt:5,children:y}),p.jsx(Kl,{initial:!1,children:q})]})}const Qd=t=>V.createElement("svg",{width:10,height:10,viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},V.createElement("path",{d:"M3.94629 0.220237C3.78013 0.264025 3.64089 0.377624 3.56348 0.53176C3.27371 1.11189 3.05664 1.46395 2.83887 1.74953C2.61807 2.03873 2.38547 2.27579 2.03027 2.63039C1.21079 3.45057 0.799805 4.52619 0.799805 5.60012C0.799838 6.67406 1.21073 7.74968 2.03027 8.56985C3.67062 10.2096 6.32931 10.2095 7.96973 8.56985C8.78929 7.74968 9.20016 6.67408 9.2002 5.60012C9.15131 4.32908 8.43217 3.48543 7.94727 3.05813C7.76902 2.90106 7.40643 3.02424 7.2627 3.2134C7.24031 3.24286 7.21612 3.2739 7.18945 3.30617C6.93211 3.61754 6.56236 3.80807 6.41504 3.83156C6.38264 3.83667 6.36979 3.76513 6.2959 3.58254C5.79455 2.34427 5.78927 2.49365 5.58887 2.01125C5.48847 1.7692 5.05517 1.02727 4.92676 0.828635C4.80206 0.635591 4.64095 0.439873 4.43359 0.301292C4.29028 0.205951 4.1124 0.175957 3.94629 0.220237ZM4.75293 4.17824C5.2689 4.63997 5.60857 5.26651 5.71484 5.95071C6.10631 5.85571 6.46727 5.68318 6.78125 5.45071C6.86578 5.70826 6.89338 5.98123 6.8623 6.25051C6.83115 6.51993 6.74174 6.77966 6.60059 7.01125C6.45944 7.24281 6.27008 7.44117 6.04492 7.59231C5.81977 7.74344 5.56462 7.8443 5.29688 7.88723C5.0292 7.93013 4.75518 7.91446 4.49414 7.84133C4.23299 7.76812 3.99064 7.6383 3.78418 7.46242C3.5778 7.28657 3.41161 7.06792 3.29785 6.8218C3.18419 6.57572 3.12519 6.30771 3.125 6.03664C3.12508 5.58233 3.29054 5.14308 3.58984 4.80129C3.88917 4.4597 4.30271 4.2382 4.75293 4.17824Z",fill:"#FEAD34"})),tf=t=>V.createElement("svg",{width:12,height:12,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},V.createElement("path",{d:"M10.1483 8.61509C10.3344 8.26159 9.98299 7.89856 9.58534 7.93723C9.42671 7.95265 9.25857 7.9605 9.07422 7.96035C6.36522 7.9582 4.17129 5.76427 4.16914 3.05527C4.169 2.87115 4.17682 2.70321 4.19221 2.54477C4.23082 2.14712 3.86769 1.79411 3.50976 1.97161C2.03398 2.70343 1.20002 4.02274 1.20002 5.89477C1.20002 8.60377 3.3961 10.7998 6.1051 10.7998C7.97571 10.7998 9.38737 10.06 10.1483 8.61509Z",fill:"white"})),ef="_container_e7tan_8",nf="_disabled_e7tan_17",sf="_reverse_e7tan_21",of="_input_e7tan_25",rf="_switchContainer_e7tan_35",af="_variant_accent_e7tan_43",lf="_variant_secondary_e7tan_47",cf="_thumb_e7tan_51",uf="_variant_theme_e7tan_54",hf="_moon_e7tan_58",df="_fire_e7tan_61",ff="_size_sm_e7tan_74",mf="_size_md_e7tan_80",pf="_size_lg_e7tan_86",nt={container:ef,disabled:nf,reverse:sf,input:of,switchContainer:rf,variant_accent:af,variant_secondary:lf,switch:"_switch_e7tan_35",thumb:cf,variant_theme:uf,moon:hf,fire:df,size_sm:ff,size_md:mf,size_lg:pf},hr=g.forwardRef(({title:t,text:e,icon:n,disabled:s,onChange:i,checked:r,defaultValue:o,className:a,size:l="md",variant:u="accent",reverse:c=!1,w:h="auto",...d},f)=>{const[v,m]=we(r,o),x=g.useRef(null);g.useImperativeHandle(f,()=>({focus:()=>{x.current?.focus()},blur:()=>{x.current?.blur()},get checked(){return v??!1},setChecked:_=>{m(_),i?.(_)},toggle:()=>{const _=!v;m(_),i?.(_)},isFocused:()=>document.activeElement===x.current,isDisabled:()=>s??!1,getInputElement:()=>x.current,checkValidity:()=>x.current?.checkValidity()??!0,reset:()=>{const _=o??!1;m(_),i?.(_)}}),[v,m,i,s,o]);const b=g.useCallback(_=>{m(_.target.checked),i?.(_.target.checked)},[i]),w=g.useMemo(()=>typeof t=="string"?p.jsx(L,{variant:"body-1",colorName:"primary",fontWeight:"medium",children:t}):t,[t]),y=g.useMemo(()=>typeof e=="string"?p.jsx(L,{variant:"body-2",colorName:"secondary",fontWeight:"regular",children:e}):e,[e]);return p.jsxs(A,{row:!0,w:h,gap:"var(--spacing-sm)",children:[p.jsxs("label",{className:E.cx(nt.container,a,{[nt.disabled]:s,[nt.reverse]:c}),children:[p.jsxs(A,{className:E.cx(nt.switchContainer,nt[`size_${l}`],nt[`variant_${u}`]),children:[p.jsx("input",{ref:x,type:"checkbox",checked:v,className:nt.input,onChange:b,disabled:s,...d}),p.jsx("div",{className:nt.switch,children:p.jsx("div",{className:nt.thumb,children:u==="theme"&&p.jsxs(p.Fragment,{children:[p.jsx(tf,{className:nt.moon}),p.jsx(Qd,{className:nt.fire})]})})})]}),p.jsxs(A,{gap:"var(--spacing-xs)",children:[w,y]})]}),n]})});hr.displayName="Switch";const gf="_header_446to_8",yf={header:gf},dr=g.forwardRef(({title:t,subtitle:e,onClose:n,w:s="full",p:i,py:r,px:o="var(--spacing-2xl)",pt:a="var(--spacing-2xl)",pb:l="var(--spacing-lg)",row:u=!0,justifyContent:c="space-between",showCloseButton:h=!0},d)=>p.jsxs(A,{w:s,p:i,py:r,px:o,pt:a,pb:l,row:u,justifyContent:c,ref:d,className:yf.header,children:[p.jsxs(A,{gap:"var(--spacing-sm)",children:[p.jsx(L,{variant:"title-3",colorName:"primary",fontWeight:"semibold",children:t}),p.jsx(L,{variant:"body-1",colorName:"tertiary",fontWeight:"medium",children:e})]}),h&&p.jsx(A,{children:p.jsx(gn,{onClick:n,color:"neutral",children:p.jsx(Pi,{})})})]}));dr.displayName="ModalHeader";const vf="_footer_1bo08_8",xf={footer:vf},fr=g.forwardRef(({children:t,row:e=!0,flex:n=!0,gap:s="var(--spacing-lg)",p:i="var(--spacing-2xl)",className:r,...o},a)=>p.jsx(A,{flex:n,row:e,gap:s,p:i,className:E.cx(xf.footer,r),ref:a,...o,children:t}));fr.displayName="ModalFooter";function Pt(t,e,n){let s=n.initialDeps??[],i;function r(){var o,a,l,u;let c;n.key&&((o=n.debug)!=null&&o.call(n))&&(c=Date.now());const h=t();if(!(h.length!==s.length||h.some((v,m)=>s[m]!==v)))return i;s=h;let f;if(n.key&&((a=n.debug)!=null&&a.call(n))&&(f=Date.now()),i=e(...h),n.key&&((l=n.debug)!=null&&l.call(n))){const v=Math.round((Date.now()-c)*100)/100,m=Math.round((Date.now()-f)*100)/100,x=m/16,b=(w,y)=>{for(w=String(w);w.length<y;)w=" "+w;return w};console.info(`%c⏱ ${b(m,5)} /${b(v,5)} ms`,`
|
|
13
|
+
`),()=>{x.contains(m)&&x.removeChild(m)}},[e]),p.jsx(zl,{isPresent:e,childRef:r,sizeRef:o,children:V.cloneElement(t,{ref:l})})}const Wl=({children:t,initial:e,isPresent:n,onExitComplete:s,custom:i,presenceAffectsLayout:r,mode:o,anchorX:a,root:l})=>{const u=vn(Ul),c=g.useId();let h=!0,d=g.useMemo(()=>(h=!1,{id:c,initial:e,isPresent:n,custom:i,onExitComplete:f=>{u.set(f,!0);for(const v of u.values())if(!v)return;s&&s()},register:f=>(u.set(f,!1),()=>u.delete(f))}),[n,u,s]);return r&&h&&(d={...d}),g.useMemo(()=>{u.forEach((f,v)=>u.set(v,!1))},[n]),V.useEffect(()=>{!n&&!u.size&&s&&s()},[n]),o==="popLayout"&&(t=p.jsx($l,{isPresent:n,anchorX:a,root:l,children:t})),p.jsx(Ce.Provider,{value:d,children:t})};function Ul(){return new Map}function wo(t=!0){const e=g.useContext(Ce);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,r=g.useId();g.useEffect(()=>{if(t)return i(r)},[t]);const o=g.useCallback(()=>t&&s&&s(r),[r,s,t]);return!n&&s?[!1,o]:[!0]}const ce=t=>t.key||"";function Ts(t){const e=[];return g.Children.forEach(t,n=>{g.isValidElement(n)&&e.push(n)}),e}const Kl=({children:t,custom:e,initial:n=!0,onExitComplete:s,presenceAffectsLayout:i=!0,mode:r="sync",propagate:o=!1,anchorX:a="left",root:l})=>{const[u,c]=wo(o),h=g.useMemo(()=>Ts(t),[t]),d=o&&!u?[]:h.map(ce),f=g.useRef(!0),v=g.useRef(h),m=vn(()=>new Map),[x,b]=g.useState(h),[w,y]=g.useState(h);Ai(()=>{f.current=!1,v.current=h;for(let S=0;S<w.length;S++){const P=ce(w[S]);d.includes(P)?m.delete(P):m.get(P)!==!0&&m.set(P,!1)}},[w,d.length,d.join("-")]);const _=[];if(h!==x){let S=[...h];for(let P=0;P<w.length;P++){const T=w[P],R=ce(T);d.includes(R)||(S.splice(P,0,T),_.push(T))}return r==="wait"&&_.length&&(S=_),y(Ts(S)),b(h),null}process.env.NODE_ENV!=="production"&&r==="wait"&&w.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:C}=g.useContext(yn);return p.jsx(p.Fragment,{children:w.map(S=>{const P=ce(S),T=o&&!u?!1:h===w||d.includes(P),R=()=>{if(m.has(P))m.set(P,!0);else return;let k=!0;m.forEach(H=>{H||(k=!1)}),k&&(C?.(),y(v.current),o&&c?.(),s&&s())};return p.jsx(Wl,{isPresent:T,initial:!f.current||n?void 0:!1,custom:e,presenceAffectsLayout:i,mode:r,root:l,onExitComplete:T?void 0:R,anchorX:a,children:S},P)})})},_o=g.createContext({strict:!1}),Ss={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"]},Lt={};for(const t in Ss)Lt[t]={isEnabled:e=>Ss[t].some(n=>!!e[n])};function Hl(t){for(const e in t)Lt[e]={...Lt[e],...t[e]}}const Gl=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 xe(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Gl.has(t)}let Co=t=>!xe(t);function ql(t){typeof t=="function"&&(Co=e=>e.startsWith("on")?!xe(e):t(e))}try{ql(require("@emotion/is-prop-valid").default)}catch{}function Xl(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(Co(i)||n===!0&&xe(i)||!e&&!xe(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const Te=g.createContext({});function Se(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Jt(t){return typeof t=="string"||Array.isArray(t)}const $n=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Wn=["initial",...$n];function Pe(t){return Se(t.animate)||Wn.some(e=>Jt(t[e]))}function To(t){return!!(Pe(t)||t.variants)}function Yl(t,e){if(Pe(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Jt(n)?n:void 0,animate:Jt(s)?s:void 0}}return t.inherit!==!1?e:{}}function Zl(t){const{initial:e,animate:n}=Yl(t,g.useContext(Te));return g.useMemo(()=>({initial:e,animate:n}),[Ps(e),Ps(n)])}function Ps(t){return Array.isArray(t)?t.join(" "):t}const Qt={};function Jl(t){for(const e in t)Qt[e]=t[e],Mn(e)&&(Qt[e].isCSSVariable=!0)}function So(t,{layout:e,layoutId:n}){return Nt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Qt[t]||t==="opacity")}const Ql={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},tc=Bt.length;function ec(t,e,n){let s="",i=!0;for(let r=0;r<tc;r++){const o=Bt[r],a=t[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const u=po(a,Bn[o]);if(!l){i=!1;const c=Ql[o]||o;s+=`${c}(${u}) `}n&&(e[o]=u)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function Un(t,e,n){const{style:s,vars:i,transformOrigin:r}=t;let o=!1,a=!1;for(const l in e){const u=e[l];if(Nt.has(l)){o=!0;continue}else if(Mn(l)){i[l]=u;continue}else{const c=po(u,Bn[l]);l.startsWith("origin")?(a=!0,r[l]=c):s[l]=c}}if(e.transform||(o||n?s.transform=ec(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=r;s.transformOrigin=`${l} ${u} ${c}`}}const Kn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Po(t,e,n){for(const s in e)!K(e[s])&&!So(s,n)&&(t[s]=e[s])}function nc({transformTemplate:t},e){return g.useMemo(()=>{const n=Kn();return Un(n,e,t),Object.assign({},n.vars,n.style)},[e])}function sc(t,e){const n=t.style||{},s={};return Po(s,n,t),Object.assign(s,nc(t,e)),s}function ic(t,e){const n={},s=sc(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=s,n}const oc={offset:"stroke-dashoffset",array:"stroke-dasharray"},rc={offset:"strokeDashoffset",array:"strokeDasharray"};function ac(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?oc:rc;t[r.offset]=M.transform(-s);const o=M.transform(e),a=M.transform(n);t[r.array]=`${o} ${a}`}function Mo(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:r=1,pathOffset:o=0,...a},l,u,c){if(Un(t,a,u),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:d}=t;h.transform&&(d.transform=h.transform,delete h.transform),(d.transform||h.transformOrigin)&&(d.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),d.transform&&(d.transformBox=c?.transformBox??"fill-box",delete h.transformBox),e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),s!==void 0&&(h.scale=s),i!==void 0&&ac(h,i,r,o,!1)}const Eo=()=>({...Kn(),attrs:{}}),Ao=t=>typeof t=="string"&&t.toLowerCase()==="svg";function lc(t,e,n,s){const i=g.useMemo(()=>{const r=Eo();return Mo(r,e,Ao(s),t.transformTemplate,t.style),{...r.attrs,style:{...r.style}}},[e]);if(t.style){const r={};Po(r,t.style,t),i.style={...r,...i.style}}return i}const cc=["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 Hn(t){return typeof t!="string"||t.includes("-")?!1:!!(cc.indexOf(t)>-1||/[A-Z]/u.test(t))}function uc(t,e,n,{latestValues:s},i,r=!1){const a=(Hn(t)?lc:ic)(e,s,i,t),l=Xl(e,typeof t=="string",r),u=t!==g.Fragment?{...l,...a,ref:n}:{},{children:c}=e,h=g.useMemo(()=>K(c)?c.get():c,[c]);return g.createElement(t,{...u,children:h})}function Ms(t){const e=[{},{}];return t?.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function Gn(t,e,n,s){if(typeof e=="function"){const[i,r]=Ms(s);e=e(n!==void 0?n:t.custom,i,r)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,r]=Ms(s);e=e(n!==void 0?n:t.custom,i,r)}return e}function me(t){return K(t)?t.get():t}function hc({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:dc(n,s,i,t),renderState:e()}}function dc(t,e,n,s){const i={},r=s(t,{});for(const d in r)i[d]=me(r[d]);let{initial:o,animate:a}=t;const l=Pe(t),u=To(t);e&&u&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const h=c?a:o;if(h&&typeof h!="boolean"&&!Se(h)){const d=Array.isArray(h)?h:[h];for(let f=0;f<d.length;f++){const v=Gn(t,d[f]);if(v){const{transitionEnd:m,transition:x,...b}=v;for(const w in b){let y=b[w];if(Array.isArray(y)){const _=c?y.length-1:0;y=y[_]}y!==null&&(i[w]=y)}for(const w in m)i[w]=m[w]}}}return i}const Vo=t=>(e,n)=>{const s=g.useContext(Te),i=g.useContext(Ce),r=()=>hc(t,e,s,i);return n?r():vn(r)};function qn(t,e,n){const{style:s}=t,i={};for(const r in s)(K(s[r])||e.style&&K(e.style[r])||So(r,t)||n?.getValue(r)?.liveStyle!==void 0)&&(i[r]=s[r]);return i}const fc=Vo({scrapeMotionValuesFromProps:qn,createRenderState:Kn});function Ro(t,e,n){const s=qn(t,e,n);for(const i in t)if(K(t[i])||K(e[i])){const r=Bt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=t[i]}return s}const mc=Vo({scrapeMotionValuesFromProps:Ro,createRenderState:Eo}),pc=Symbol.for("motionComponentSymbol");function At(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function gc(t,e,n){return g.useCallback(s=>{s&&t.onMount&&t.onMount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):At(n)&&(n.current=s))},[e])}const Xn=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),yc="framerAppearId",ko="data-"+Xn(yc),Do=g.createContext({});function vc(t,e,n,s,i){const{visualElement:r}=g.useContext(Te),o=g.useContext(_o),a=g.useContext(Ce),l=g.useContext(zn).reducedMotion,u=g.useRef(null);s=s||o.renderer,!u.current&&s&&(u.current=s(t,{visualState:e,parent:r,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const c=u.current,h=g.useContext(Do);c&&!c.projection&&i&&(c.type==="html"||c.type==="svg")&&xc(u.current,n,i,h);const d=g.useRef(!1);g.useInsertionEffect(()=>{c&&d.current&&c.update(n,a)});const f=n[ko],v=g.useRef(!!f&&!window.MotionHandoffIsComplete?.(f)&&window.MotionHasOptimisedAnimation?.(f));return Ai(()=>{c&&(d.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),v.current&&c.animationState&&c.animationState.animateChanges())}),g.useEffect(()=>{c&&(!v.current&&c.animationState&&c.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(f)}),v.current=!1),c.enteringChildren=void 0)}),c}function xc(t,e,n,s){const{layoutId:i,layout:r,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:jo(t.parent)),t.projection.setOptions({layoutId:i,layout:r,alwaysMeasureLayout:!!o||a&&At(a),visualElement:t,animationType:typeof r=="string"?r:"both",initialPromotionConfig:s,crossfade:c,layoutScroll:l,layoutRoot:u})}function jo(t){if(t)return t.options.allowProjection!==!1?t.projection:jo(t.parent)}function Ie(t,{forwardMotionProps:e=!1}={},n,s){n&&Hl(n);const i=Hn(t)?mc:fc;function r(a,l){let u;const c={...g.useContext(zn),...a,layoutId:bc(a)},{isStatic:h}=c,d=Zl(a),f=i(a,h);if(!h&&xn){wc(c,n);const v=_c(c);u=v.MeasureLayout,d.visualElement=vc(t,f,c,s,v.ProjectionNode)}return p.jsxs(Te.Provider,{value:d,children:[u&&d.visualElement?p.jsx(u,{visualElement:d.visualElement,...c}):null,uc(t,a,gc(f,d.visualElement,l),f,h,e)]})}r.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const o=g.forwardRef(r);return o[pc]=t,o}function bc({layoutId:t}){const e=g.useContext(yn).id;return e&&t!==void 0?e+"-"+t:t}function wc(t,e){const n=g.useContext(_o).strict;if(process.env.NODE_ENV!=="production"&&e&&n){const s="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?Ot(!1,s,"lazy-strict-mode"):ut(!1,s,"lazy-strict-mode")}}function _c(t){const{drag:e,layout:n}=Lt;if(!e&&!n)return{};const s={...e,...n};return{MeasureLayout:e?.isEnabled(t)||n?.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function Cc(t,e){if(typeof Proxy>"u")return Ie;const n=new Map,s=(r,o)=>Ie(r,o,t,e),i=(r,o)=>(process.env.NODE_ENV!=="production"&&Tn(!1,"motion() is deprecated. Use motion.create() instead."),s(r,o));return new Proxy(i,{get:(r,o)=>o==="create"?s:(n.has(o)||n.set(o,Ie(o,void 0,t,e)),n.get(o))})}function Lo({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function Tc({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Sc(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function Be(t){return t===void 0||t===1}function ln({scale:t,scaleX:e,scaleY:n}){return!Be(t)||!Be(e)||!Be(n)}function vt(t){return ln(t)||Oo(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Oo(t){return Es(t.x)||Es(t.y)}function Es(t){return t&&t!=="0%"}function be(t,e,n){const s=t-n,i=e*s;return n+i}function As(t,e,n,s,i){return i!==void 0&&(t=be(t,i,s)),be(t,n,s)+e}function cn(t,e=0,n=1,s,i){t.min=As(t.min,e,n,s,i),t.max=As(t.max,e,n,s,i)}function Io(t,{x:e,y:n}){cn(t.x,e.translate,e.scale,e.originPoint),cn(t.y,n.translate,n.scale,n.originPoint)}const Vs=.999999999999,Rs=1.0000000000001;function Pc(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let r,o;for(let a=0;a<i;a++){r=n[a],o=r.projectionDelta;const{visualElement:l}=r.options;l&&l.props.style&&l.props.style.display==="contents"||(s&&r.options.layoutScroll&&r.scroll&&r!==r.root&&Rt(t,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,Io(t,o)),s&&vt(r.latestValues)&&Rt(t,r.latestValues))}e.x<Rs&&e.x>Vs&&(e.x=1),e.y<Rs&&e.y>Vs&&(e.y=1)}function Vt(t,e){t.min=t.min+e,t.max=t.max+e}function ks(t,e,n,s,i=.5){const r=B(t.min,t.max,i);cn(t,e,n,r,s)}function Rt(t,e){ks(t.x,e.x,e.scaleX,e.scale,e.originX),ks(t.y,e.y,e.scaleY,e.scale,e.originY)}function Bo(t,e){return Lo(Sc(t.getBoundingClientRect(),e))}function Mc(t,e,n){const s=Bo(t,n),{scroll:i}=e;return i&&(Vt(s.x,i.offset.x),Vt(s.y,i.offset.y)),s}const Ds=()=>({translate:0,scale:1,origin:0,originPoint:0}),kt=()=>({x:Ds(),y:Ds()}),js=()=>({min:0,max:0}),F=()=>({x:js(),y:js()}),un={current:null},No={current:!1};function Ec(){if(No.current=!0,!!xn)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>un.current=t.matches;t.addEventListener("change",e),e()}else un.current=!1}const Ac=new WeakMap;function Vc(t,e,n){for(const s in e){const i=e[s],r=n[s];if(K(i))t.addValue(s,i);else if(K(r))t.addValue(s,jt(i,{owner:t}));else if(r!==i)if(t.hasValue(s)){const o=t.getValue(s);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=t.getStaticValue(s);t.addValue(s,jt(o!==void 0?o:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const Ls=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Rc{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:r,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=On,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},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=()=>{const d=X.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,O.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!r,this.isControllingVariants=Pe(n),this.isVariantNode=To(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:c,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in h){const f=h[d];l[d]!==void 0&&K(f)&&f.set(l[d])}}mount(e){this.current=e,Ac.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((n,s)=>this.bindToMotionValue(s,n)),No.current||Ec(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:un.current,process.env.NODE_ENV!=="production"&&Tn(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),mt(this.notifyUpdate),mt(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.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,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const s=Nt.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&O.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),r&&r(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Lt){const n=Lt[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const r=this.features[e];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):F()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<Ls.length;s++){const i=Ls[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r="on"+i,o=e[r];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=Vc(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){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=jt(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(Vi(s)||ki(s))?s=parseFloat(s):!Bl(s)&&pt.test(n)&&(s=mo(e,n)),this.setBaseTarget(e,K(s)?s.get():s)),K(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const r=Gn(this.props,n,this.presenceContext?.custom);r&&(s=r[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!K(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Cn),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){Nn.render(this.render)}}class Fo extends Rc{constructor(){super(...arguments),this.KeyframeResolver=Pl}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;K(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function zo(t,{style:e,vars:n},s,i){const r=t.style;let o;for(o in e)r[o]=e[o];i?.applyProjectionStyles(r,s);for(o in n)r.setProperty(o,n[o])}function kc(t){return window.getComputedStyle(t)}class Dc extends Fo{constructor(){super(...arguments),this.type="html",this.renderInstance=zo}readValueFromInstance(e,n){if(Nt.has(n))return this.projection?.isProjecting?tn(n):Ua(e,n);{const s=kc(e),i=(Mn(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Bo(e,n)}build(e,n,s){Un(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return qn(e,n,s)}}const $o=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"]);function jc(t,e,n,s){zo(t,e,void 0,s);for(const i in e.attrs)t.setAttribute($o.has(i)?i:Xn(i),e.attrs[i])}class Lc extends Fo{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=F}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Nt.has(n)){const s=fo(n);return s&&s.default||0}return n=$o.has(n)?n:Xn(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return Ro(e,n,s)}build(e,n,s){Mo(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){jc(e,n,s,i)}mount(e){this.isSVGTag=Ao(e.tagName),super.mount(e)}}const Oc=(t,e)=>Hn(t)?new Lc(e):new Dc(e,{allowProjection:t!==g.Fragment});function Dt(t,e,n){const s=t.getProps();return Gn(s,e,n!==void 0?n:s.custom,t)}const hn=t=>Array.isArray(t);function Ic(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,jt(n))}function Bc(t){return hn(t)?t[t.length-1]||0:t}function Nc(t,e){const n=Dt(t,e);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const o in r){const a=Bc(r[o]);Ic(t,o,a)}}function Fc(t){return!!(K(t)&&t.add)}function dn(t,e){const n=t.getValue("willChange");if(Fc(n))return n.add(e);if(!n&&ht.WillChange){const s=new ht.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function Wo(t){return t.props[ko]}const zc=t=>t!==null;function $c(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(zc),r=e&&n!=="loop"&&e%2===1?0:i.length-1;return i[r]}const Wc={type:"spring",stiffness:500,damping:25,restSpeed:10},Uc=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Kc={type:"keyframes",duration:.8},Hc={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Gc=(t,{keyframes:e})=>e.length>2?Kc:Nt.has(t)?t.startsWith("scale")?Uc(e[1]):Wc:Hc;function qc({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:r,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const Yn=(t,e,n,s={},i,r)=>o=>{const a=In(s,t)||{},l=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-it(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:d=>{e.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:i};qc(a)||Object.assign(c,Gc(t,c)),c.duration&&(c.duration=it(c.duration)),c.repeatDelay&&(c.repeatDelay=it(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let h=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(rn(c),c.delay===0&&(h=!0)),(ht.instantAnimations||ht.skipAnimations)&&(h=!0,rn(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,h&&!r&&e.get()!==void 0){const d=$c(c.keyframes,a);if(d!==void 0){O.update(()=>{c.onUpdate(d),c.onComplete()});return}}return a.isSync?new Ln(c):new fl(c)};function Xc({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Uo(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:r=t.getDefaultTransition(),transitionEnd:o,...a}=e;s&&(r=s);const l=[],u=i&&t.animationState&&t.animationState.getState()[i];for(const c in a){const h=t.getValue(c,t.latestValues[c]??null),d=a[c];if(d===void 0||u&&Xc(u,c))continue;const f={delay:n,...In(r||{},c)},v=h.get();if(v!==void 0&&!h.isAnimating&&!Array.isArray(d)&&d===v&&!f.velocity)continue;let m=!1;if(window.MotionHandoffAnimation){const b=Wo(t);if(b){const w=window.MotionHandoffAnimation(b,c,O);w!==null&&(f.startTime=w,m=!0)}}dn(t,c),h.start(Yn(c,h,d,t.shouldReduceMotion&&co.has(c)?{type:!1}:f,t,m));const x=h.animation;x&&l.push(x)}return o&&Promise.all(l).then(()=>{O.update(()=>{o&&Nc(t,o)})}),l}function Ko(t,e,n,s=0,i=1){const r=Array.from(t).sort((u,c)=>u.sortNodePosition(c)).indexOf(e),o=t.size,a=(o-1)*s;return typeof n=="function"?n(r,o):i===1?r*s:a-r*s}function fn(t,e,n={}){const s=Dt(t,e,n.type==="exit"?t.presenceContext?.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const r=s?()=>Promise.all(Uo(t,s,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:c,staggerDirection:h}=i;return Yc(t,e,l,u,c,h,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[l,u]=a==="beforeChildren"?[r,o]:[o,r];return l().then(()=>u())}else return Promise.all([r(),o(n.delay)])}function Yc(t,e,n=0,s=0,i=0,r=1,o){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(fn(l,e,{...o,delay:n+(typeof s=="function"?0:s)+Ko(t.variantChildren,l,s,i,r)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function Zc(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(r=>fn(t,r,n));s=Promise.all(i)}else if(typeof e=="string")s=fn(t,e,n);else{const i=typeof e=="function"?Dt(t,e,n.custom):e;s=Promise.all(Uo(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}function Ho(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}const Jc=Wn.length;function Go(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?Go(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<Jc;n++){const s=Wn[n],i=t.props[s];(Jt(i)||i===!1)&&(e[s]=i)}return e}const Qc=[...$n].reverse(),tu=$n.length;function eu(t){return e=>Promise.all(e.map(({animation:n,options:s})=>Zc(t,n,s)))}function nu(t){let e=eu(t),n=Os(),s=!0;const i=l=>(u,c)=>{const h=Dt(t,c,l==="exit"?t.presenceContext?.custom:void 0);if(h){const{transition:d,transitionEnd:f,...v}=h;u={...u,...v,...f}}return u};function r(l){e=l(t)}function o(l){const{props:u}=t,c=Go(t.parent)||{},h=[],d=new Set;let f={},v=1/0;for(let x=0;x<tu;x++){const b=Qc[x],w=n[b],y=u[b]!==void 0?u[b]:c[b],_=Jt(y),C=b===l?w.isActive:null;C===!1&&(v=x);let S=y===c[b]&&y!==u[b]&&_;if(S&&s&&t.manuallyAnimateOnMount&&(S=!1),w.protectedKeys={...f},!w.isActive&&C===null||!y&&!w.prevProp||Se(y)||typeof y=="boolean")continue;const P=su(w.prevProp,y);let T=P||b===l&&w.isActive&&!S&&_||x>v&&_,R=!1;const k=Array.isArray(y)?y:[y];let H=k.reduce(i(b),{});C===!1&&(H={});const{prevResolvedValues:rt={}}=w,at={...rt,...H},dt=N=>{T=!0,d.has(N)&&(R=!0,d.delete(N)),w.needsAnimating[N]=!0;const q=t.getValue(N);q&&(q.liveStyle=!1)};for(const N in at){const q=H[N],D=rt[N];if(f.hasOwnProperty(N))continue;let j=!1;hn(q)&&hn(D)?j=!Ho(q,D):j=q!==D,j?q!=null?dt(N):d.add(N):q!==void 0&&d.has(N)?dt(N):w.protectedKeys[N]=!0}w.prevProp=y,w.prevResolvedValues=H,w.isActive&&(f={...f,...H}),s&&t.blockInitialAnimation&&(T=!1);const Tt=S&&P;T&&(!Tt||R)&&h.push(...k.map(N=>{const q={type:b};if(typeof N=="string"&&s&&!Tt&&t.manuallyAnimateOnMount&&t.parent){const{parent:D}=t,j=Dt(D,N);if(D.enteringChildren&&j){const{delayChildren:U}=j.transition||{};q.delay=Ko(D.enteringChildren,t,U)}}return{animation:N,options:q}}))}if(d.size){const x={};if(typeof u.initial!="boolean"){const b=Dt(t,Array.isArray(u.initial)?u.initial[0]:u.initial);b&&b.transition&&(x.transition=b.transition)}d.forEach(b=>{const w=t.getBaseTarget(b),y=t.getValue(b);y&&(y.liveStyle=!0),x[b]=w??null}),h.push({animation:x})}let m=!!h.length;return s&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(m=!1),s=!1,m?e(h):Promise.resolve()}function a(l,u){if(n[l].isActive===u)return Promise.resolve();t.variantChildren?.forEach(h=>h.animationState?.setActive(l,u)),n[l].isActive=u;const c=o(l);for(const h in n)n[h].protectedKeys={};return c}return{animateChanges:o,setActive:a,setAnimateFunction:r,getState:()=>n,reset:()=>{n=Os(),s=!0}}}function su(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Ho(e,t):!1}function yt(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Os(){return{animate:yt(!0),whileInView:yt(),whileHover:yt(),whileTap:yt(),whileDrag:yt(),whileFocus:yt(),exit:yt()}}class gt{constructor(e){this.isMounted=!1,this.node=e}update(){}}class iu extends gt{constructor(e){super(e),e.animationState||(e.animationState=nu(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Se(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let ou=0;class ru extends gt{constructor(){super(...arguments),this.id=ou++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>{n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const au={animation:{Feature:iu},exit:{Feature:ru}};function te(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function oe(t){return{point:{x:t.pageX,y:t.pageY}}}const lu=t=>e=>Fn(e)&&t(e,oe(e));function Kt(t,e,n,s){return te(t,e,lu(n),s)}const qo=1e-4,cu=1-qo,uu=1+qo,Xo=.01,hu=0-Xo,du=0+Xo;function G(t){return t.max-t.min}function fu(t,e,n){return Math.abs(t-e)<=n}function Is(t,e,n,s=.5){t.origin=s,t.originPoint=B(e.min,e.max,t.origin),t.scale=G(n)/G(e),t.translate=B(n.min,n.max,t.origin)-t.originPoint,(t.scale>=cu&&t.scale<=uu||isNaN(t.scale))&&(t.scale=1),(t.translate>=hu&&t.translate<=du||isNaN(t.translate))&&(t.translate=0)}function Ht(t,e,n,s){Is(t.x,e.x,n.x,s?s.originX:void 0),Is(t.y,e.y,n.y,s?s.originY:void 0)}function Bs(t,e,n){t.min=n.min+e.min,t.max=t.min+G(e)}function mu(t,e,n){Bs(t.x,e.x,n.x),Bs(t.y,e.y,n.y)}function Ns(t,e,n){t.min=e.min-n.min,t.max=t.min+G(e)}function Gt(t,e,n){Ns(t.x,e.x,n.x),Ns(t.y,e.y,n.y)}function Q(t){return[t("x"),t("y")]}const Yo=({current:t})=>t?t.ownerDocument.defaultView:null,Fs=(t,e)=>Math.abs(t-e);function pu(t,e){const n=Fs(t.x,e.x),s=Fs(t.y,e.y);return Math.sqrt(n**2+s**2)}class Zo{constructor(e,n,{transformPagePoint:s,contextWindow:i=window,dragSnapToOrigin:r=!1,distanceThreshold:o=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=Fe(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,v=pu(d.offset,{x:0,y:0})>=this.distanceThreshold;if(!f&&!v)return;const{point:m}=d,{timestamp:x}=W;this.history.push({...m,timestamp:x});const{onStart:b,onMove:w}=this.handlers;f||(b&&b(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Ne(f,this.transformPagePoint),O.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:v,onSessionEnd:m,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=Fe(d.type==="pointercancel"?this.lastMoveEventInfo:Ne(f,this.transformPagePoint),this.history);this.startEvent&&v&&v(d,b),m&&m(d,b)},!Fn(e))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=o,this.contextWindow=i||window;const a=oe(e),l=Ne(a,this.transformPagePoint),{point:u}=l,{timestamp:c}=W;this.history=[{...u,timestamp:c}];const{onSessionStart:h}=n;h&&h(e,Fe(l,this.history)),this.removeListeners=ne(Kt(this.contextWindow,"pointermove",this.handlePointerMove),Kt(this.contextWindow,"pointerup",this.handlePointerUp),Kt(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),mt(this.updatePoint)}}function Ne(t,e){return e?{point:e(t.point)}:t}function zs(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Fe({point:t},e){return{point:t,delta:zs(t,Jo(e)),offset:zs(t,gu(e)),velocity:yu(e,.1)}}function gu(t){return t[0]}function Jo(t){return t[t.length-1]}function yu(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=Jo(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>it(e)));)n--;if(!s)return{x:0,y:0};const r=tt(i.timestamp-s.timestamp);if(r===0)return{x:0,y:0};const o={x:(i.x-s.x)/r,y:(i.y-s.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function vu(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?B(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?B(n,t,s.max):Math.min(t,n)),t}function $s(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function xu(t,{top:e,left:n,bottom:s,right:i}){return{x:$s(t.x,n,i),y:$s(t.y,e,s)}}function Ws(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}function bu(t,e){return{x:Ws(t.x,e.x),y:Ws(t.y,e.y)}}function wu(t,e){let n=.5;const s=G(t),i=G(e);return i>s?n=Xt(e.min,e.max-s,t.min):s>i&&(n=Xt(t.min,t.max-i,e.min)),ct(0,1,n)}function _u(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const mn=.35;function Cu(t=mn){return t===!1?t=0:t===!0&&(t=mn),{x:Us(t,"left","right"),y:Us(t,"top","bottom")}}function Us(t,e,n){return{min:Ks(t,e),max:Ks(t,n)}}function Ks(t,e){return typeof t=="number"?t:t[e]||0}const Tu=new WeakMap;class Su{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=F(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:s}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const r=h=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(oe(h).point)},o=(h,d)=>{const{drag:f,dragPropagation:v,onDragStart:m}=this.getProps();if(f&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Vl(f),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=d,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Q(b=>{let w=this.getAxisMotionValue(b).get()||0;if(ot.test(w)){const{projection:y}=this.visualElement;if(y&&y.layout){const _=y.layout.layoutBox[b];_&&(w=G(_)*(parseFloat(w)/100))}}this.originPoint[b]=w}),m&&O.postRender(()=>m(h,d)),dn(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},a=(h,d)=>{this.latestPointerEvent=h,this.latestPanInfo=d;const{dragPropagation:f,dragDirectionLock:v,onDirectionLock:m,onDrag:x}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:b}=d;if(v&&this.currentDirection===null){this.currentDirection=Pu(b),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",d.point,b),this.updateAxis("y",d.point,b),this.visualElement.render(),x&&x(h,d)},l=(h,d)=>{this.latestPointerEvent=h,this.latestPanInfo=d,this.stop(h,d),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>Q(h=>this.getAnimationState(h)==="paused"&&this.getAxisMotionValue(h).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Zo(e,{onSessionStart:r,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:s,contextWindow:Yo(this.visualElement)})}stop(e,n){const s=e||this.latestPointerEvent,i=n||this.latestPanInfo,r=this.isDragging;if(this.cancel(),!r||!i||!s)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&O.postRender(()=>a(s,i))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!ue(e,i,this.currentDirection))return;const r=this.getAxisMotionValue(e);let o=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(o=vu(o,this.constraints[e],this.elastic[e])),r.set(o)}resolveConstraints(){const{dragConstraints:e,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;e&&At(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=xu(s.layoutBox,e):this.constraints=!1,this.elastic=Cu(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&Q(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=_u(s.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!At(e))return!1;const s=e.current;ut(s!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const r=Mc(s,i.root,this.visualElement.getTransformPagePoint());let o=bu(i.layout.layoutBox,r);if(n){const a=n(Tc(o));this.hasMutatedConstraints=!!a,a&&(o=Lo(a))}return o}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=Q(c=>{if(!ue(c,n,this.currentDirection))return;let h=l&&l[c]||{};o&&(h={min:0,max:0});const d=i?200:1e6,f=i?40:1e7,v={type:"inertia",velocity:s?e[c]:0,bounceStiffness:d,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...r,...h};return this.startAxisValueAnimation(c,v)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return dn(this.visualElement,e),s.start(Yn(e,s,0,n,this.visualElement,!1))}stopAnimation(){Q(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){Q(e=>this.getAxisMotionValue(e).animation?.pause())}getAnimationState(e){return this.getAxisMotionValue(e).animation?.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){Q(n=>{const{drag:s}=this.getProps();if(!ue(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];r.set(e[n]-B(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!At(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Q(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=wu({min:l,max:l},this.constraints[o])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),Q(o=>{if(!ue(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(B(l,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;Tu.set(this.visualElement,this);const e=this.visualElement.current,n=Kt(e,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();At(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,r=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),O.read(s);const o=te(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(Q(c=>{const h=this.getAxisMotionValue(c);h&&(this.originPoint[c]+=l[c].translate,h.set(h.get()+l[c].translate))}),this.visualElement.render())}));return()=>{o(),n(),r(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:o=mn,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:a}}}function ue(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Pu(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class Mu extends gt{constructor(e){super(e),this.removeGroupControls=et,this.removeListeners=et,this.controls=new Su(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||et}unmount(){this.removeGroupControls(),this.removeListeners()}}const Hs=t=>(e,n)=>{t&&O.postRender(()=>t(e,n))};class Eu extends gt{constructor(){super(...arguments),this.removePointerDownListener=et}onPointerDown(e){this.session=new Zo(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Yo(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:Hs(e),onStart:Hs(n),onMove:s,onEnd:(r,o)=>{delete this.session,i&&O.postRender(()=>i(r,o))}}}mount(){this.removePointerDownListener=Kt(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const pe={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Gs(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const zt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(M.test(t))t=parseFloat(t);else return t;const n=Gs(t,e.target.x),s=Gs(t,e.target.y);return`${n}% ${s}%`}},Au={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=pt.parse(t);if(i.length>5)return s;const r=pt.createTransformer(t),o=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+o]/=a,i[1+o]/=l;const u=B(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),r(i)}};let ze=!1;class Vu extends g.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:r}=e;Jl(Ru),r&&(n.group&&n.group.add(r),s&&s.register&&i&&s.register(r),ze&&r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,onExitComplete:()=>this.safeToRemove()})),pe.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:r}=this.props,{projection:o}=s;return o&&(o.isPresent=r,ze=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==r?o.willUpdate():this.safeToRemove(),e.isPresent!==r&&(r?o.promote():o.relegate()||O.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Nn.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;ze=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Qo(t){const[e,n]=wo(),s=g.useContext(yn);return p.jsx(Vu,{...t,layoutGroup:s,switchLayoutGroup:g.useContext(Do),isPresent:e,safeToRemove:n})}const Ru={borderRadius:{...zt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:zt,borderTopRightRadius:zt,borderBottomLeftRadius:zt,borderBottomRightRadius:zt,boxShadow:Au};function ku(t,e,n){const s=K(t)?t:jt(t);return s.start(Yn("",s,e,n)),s.animation}const Du=(t,e)=>t.depth-e.depth;class ju{constructor(){this.children=[],this.isDirty=!1}add(e){bn(this.children,e),this.isDirty=!0}remove(e){wn(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Du),this.isDirty=!1,this.children.forEach(e)}}function Lu(t,e){const n=X.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(mt(s),t(r-e))};return O.setup(s,!0),()=>mt(s)}const tr=["TopLeft","TopRight","BottomLeft","BottomRight"],Ou=tr.length,qs=t=>typeof t=="string"?parseFloat(t):t,Xs=t=>typeof t=="number"||M.test(t);function Iu(t,e,n,s,i,r){i?(t.opacity=B(0,n.opacity??1,Bu(s)),t.opacityExit=B(e.opacity??1,0,Nu(s))):r&&(t.opacity=B(e.opacity??1,n.opacity??1,s));for(let o=0;o<Ou;o++){const a=`border${tr[o]}Radius`;let l=Ys(e,a),u=Ys(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||Xs(l)===Xs(u)?(t[a]=Math.max(B(qs(l),qs(u),s),0),(ot.test(u)||ot.test(l))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=B(e.rotate||0,n.rotate||0,s))}function Ys(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Bu=er(0,.5,Fi),Nu=er(.5,.95,et);function er(t,e,n){return s=>s<t?0:s>e?1:n(Xt(t,e,s))}function Zs(t,e){t.min=e.min,t.max=e.max}function Y(t,e){Zs(t.x,e.x),Zs(t.y,e.y)}function Js(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Qs(t,e,n,s,i){return t-=e,t=be(t,1/n,s),i!==void 0&&(t=be(t,1/i,s)),t}function Fu(t,e=0,n=1,s=.5,i,r=t,o=t){if(ot.test(e)&&(e=parseFloat(e),e=B(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=B(r.min,r.max,s);t===r&&(a-=e),t.min=Qs(t.min,e,n,a,i),t.max=Qs(t.max,e,n,a,i)}function ti(t,e,[n,s,i],r,o){Fu(t,e[n],e[s],e[i],e.scale,r,o)}const zu=["x","scaleX","originX"],$u=["y","scaleY","originY"];function ei(t,e,n,s){ti(t.x,e,zu,n?n.x:void 0,s?s.x:void 0),ti(t.y,e,$u,n?n.y:void 0,s?s.y:void 0)}function ni(t){return t.translate===0&&t.scale===1}function nr(t){return ni(t.x)&&ni(t.y)}function si(t,e){return t.min===e.min&&t.max===e.max}function Wu(t,e){return si(t.x,e.x)&&si(t.y,e.y)}function ii(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function sr(t,e){return ii(t.x,e.x)&&ii(t.y,e.y)}function oi(t){return G(t.x)/G(t.y)}function ri(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Uu{constructor(){this.members=[]}add(e){bn(this.members,e),e.scheduleRender()}remove(e){if(wn(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const r=this.members[i];if(r.isPresent!==!1){s=r;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Ku(t,e,n){let s="";const i=t.x.translate/e.x,r=t.y.translate/e.y,o=n?.z||0;if((i||r||o)&&(s=`translate3d(${i}px, ${r}px, ${o}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:h,rotateY:d,skewX:f,skewY:v}=n;u&&(s=`perspective(${u}px) ${s}`),c&&(s+=`rotate(${c}deg) `),h&&(s+=`rotateX(${h}deg) `),d&&(s+=`rotateY(${d}deg) `),f&&(s+=`skewX(${f}deg) `),v&&(s+=`skewY(${v}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const $e=["","X","Y","Z"],Hu=1e3;let Gu=0;function We(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function ir(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Wo(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",O,!(i||r))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&ir(s)}function or({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(o={},a=e?.()){this.id=Gu++,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.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(Yu),this.nodes.forEach(th),this.nodes.forEach(eh),this.nodes.forEach(Zu)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new ju)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Cn),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=bo(o)&&!Ol(o),this.instance=o;const{layoutId:a,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),t){let c,h=0;const d=()=>this.root.updateBlockedByResize=!1;O.read(()=>{h=window.innerWidth}),t(o,()=>{const f=window.innerWidth;f!==h&&(h=f,this.root.updateBlockedByResize=!0,c&&c(),c=Lu(d,250),pe.hasAnimatedSinceResize&&(pe.hasAnimatedSinceResize=!1,this.nodes.forEach(ci)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:h,hasRelativeLayoutChanged:d,layout:f})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||u.getDefaultTransition()||rh,{onLayoutAnimationStart:m,onLayoutAnimationComplete:x}=u.getProps(),b=!this.targetLayout||!sr(this.targetLayout,f),w=!h&&d;if(this.options.layoutRoot||this.resumeFrom||w||h&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const y={...In(v,"layout"),onPlay:m,onComplete:x};(u.shouldReduceMotion||this.options.layoutRoot)&&(y.delay=0,y.type=!1),this.startAnimation(y),this.setAnimationOrigin(c,w)}else h||ci(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=f})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),mt(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(nh),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ir(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const h=this.path[c];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(ai);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(li);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Qu),this.nodes.forEach(qu),this.nodes.forEach(Xu)):this.nodes.forEach(li),this.clearAllSnapshots();const a=X.now();W.delta=ct(0,1e3/60,a-W.timestamp),W.timestamp=a,W.isProcessing=!0,Re.update.process(W),Re.preRender.process(W),Re.render.process(W),W.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Nn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Ju),this.sharedNodes.forEach(sh)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,O.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){O.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!G(this.snapshot.measuredBox.x)&&!G(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 l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=F(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const l=s(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!nr(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;o&&this.instance&&(a||vt(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),ah(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:o}=this.options;if(!o)return F();const a=o.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(lh))){const{scroll:u}=this.root;u&&(Vt(a.x,u.offset.x),Vt(a.y,u.offset.y))}return a}removeElementScroll(o){const a=F();if(Y(a,o),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:c,options:h}=u;u!==this.root&&c&&h.layoutScroll&&(c.wasRoot&&Y(a,o),Vt(a.x,c.offset.x),Vt(a.y,c.offset.y))}return a}applyTransform(o,a=!1){const l=F();Y(l,o);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&Rt(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),vt(c.latestValues)&&Rt(l,c.latestValues)}return vt(this.latestValues)&&Rt(l,this.latestValues),l}removeTransform(o){const a=F();Y(a,o);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!vt(u.latestValues))continue;ln(u.latestValues)&&u.updateSnapshot();const c=F(),h=u.measurePageBox();Y(c,h),ei(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return vt(this.latestValues)&&ei(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}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!==W.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:h}=this.options;if(!(!this.layout||!(c||h))){if(this.resolvedRelativeTargetAt=W.timestamp,!this.targetDelta&&!this.relativeTarget){const d=this.getClosestProjectingParent();d&&d.layout&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=F(),this.relativeTargetOrigin=F(),Gt(this.relativeTargetOrigin,this.layout.layoutBox,d.layout.layoutBox),Y(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=F(),this.targetWithTransforms=F()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),mu(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Y(this.target,this.layout.layoutBox),Io(this.target,this.targetDelta)):Y(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const d=this.getClosestProjectingParent();d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=F(),this.relativeTargetOrigin=F(),Gt(this.relativeTargetOrigin,this.target,d.target),Y(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||ln(this.parent.latestValues)||Oo(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===W.timestamp&&(l=!1),l)return;const{layout:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;Y(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,d=this.treeScale.y;Pc(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=F());const{target:f}=o;if(!f){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Js(this.prevProjectionDelta.x,this.projectionDelta.x),Js(this.prevProjectionDelta.y,this.projectionDelta.y)),Ht(this.projectionDelta,this.layoutCorrected,f,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==d||!ri(this.projectionDelta.x,this.prevProjectionDelta.x)||!ri(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",f))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){if(this.options.visualElement?.scheduleRender(),o){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=kt(),this.projectionDelta=kt(),this.projectionDeltaWithTransform=kt()}setAnimationOrigin(o,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},h=kt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=F(),f=l?l.source:void 0,v=this.layout?this.layout.source:void 0,m=f!==v,x=this.getStack(),b=!x||x.members.length<=1,w=!!(m&&!b&&this.options.crossfade===!0&&!this.path.some(oh));this.animationProgress=0;let y;this.mixTargetDelta=_=>{const C=_/1e3;ui(h.x,o.x,C),ui(h.y,o.y,C),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Gt(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),ih(this.relativeTarget,this.relativeTargetOrigin,d,C),y&&Wu(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=F()),Y(y,this.relativeTarget)),m&&(this.animationValues=c,Iu(c,u,this.latestValues,C,w,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(mt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=O.update(()=>{pe.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=jt(0)),this.currentAnimation=ku(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Hu),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&rr(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||F();const h=G(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+h;const d=G(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+d}Y(a,l),Rt(a,c),Ht(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Uu),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){const{layoutId:o}=this.options;return o?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:o}=this.options;return o?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&We("z",o,u,this.animationValues);for(let c=0;c<$e.length;c++)We(`rotate${$e[c]}`,o,u,this.animationValues),We(`skew${$e[c]}`,o,u,this.animationValues);o.render();for(const c in u)o.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=me(a?.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=me(a?.pointerEvents)||""),this.hasProjected&&!vt(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let h=Ku(this.projectionDeltaWithTransform,this.treeScale,c);l&&(h=l(c,h)),o.transform=h;const{x:d,y:f}=this.projectionDelta;o.transformOrigin=`${d.origin*100}% ${f.origin*100}% 0`,u.animationValues?o.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:o.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const v in Qt){if(c[v]===void 0)continue;const{correct:m,applyTo:x,isCSSVariable:b}=Qt[v],w=h==="none"?c[v]:m(c[v],u);if(x){const y=x.length;for(let _=0;_<y;_++)o[x[_]]=w}else b?this.options.visualElement.renderState.vars[v]=w:o[v]=w}this.options.layoutId&&(o.pointerEvents=u===this?me(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>o.currentAnimation?.stop()),this.root.nodes.forEach(ai),this.root.sharedNodes.clear()}}}function qu(t){t.updateLayout()}function Xu(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=t.layout,{animationType:i}=t.options,r=e.source!==t.layout.source;i==="size"?Q(c=>{const h=r?e.measuredBox[c]:e.layoutBox[c],d=G(h);h.min=n[c].min,h.max=h.min+d}):rr(i,e.layoutBox,n)&&Q(c=>{const h=r?e.measuredBox[c]:e.layoutBox[c],d=G(n[c]);h.max=h.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[c].max=t.relativeTarget[c].min+d)});const o=kt();Ht(o,n,e.layoutBox);const a=kt();r?Ht(a,t.applyTransform(s,!0),e.measuredBox):Ht(a,n,e.layoutBox);const l=!nr(o);let u=!1;if(!t.resumeFrom){const c=t.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:h,layout:d}=c;if(h&&d){const f=F();Gt(f,e.layoutBox,h.layoutBox);const v=F();Gt(v,n,d.layoutBox),sr(f,v)||(u=!0),c.options.layoutRoot&&(t.relativeTarget=v,t.relativeTargetOrigin=f,t.relativeParent=c)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:o,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function Yu(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Zu(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Ju(t){t.clearSnapshot()}function ai(t){t.clearMeasurements()}function li(t){t.isLayoutDirty=!1}function Qu(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function ci(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function th(t){t.resolveTargetDelta()}function eh(t){t.calcProjection()}function nh(t){t.resetSkewAndRotation()}function sh(t){t.removeLeadSnapshot()}function ui(t,e,n){t.translate=B(e.translate,0,n),t.scale=B(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function hi(t,e,n,s){t.min=B(e.min,n.min,s),t.max=B(e.max,n.max,s)}function ih(t,e,n,s){hi(t.x,e.x,n.x,s),hi(t.y,e.y,n.y,s)}function oh(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const rh={duration:.45,ease:[.4,0,.1,1]},di=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),fi=di("applewebkit/")&&!di("chrome/")?Math.round:et;function mi(t){t.min=fi(t.min),t.max=fi(t.max)}function ah(t){mi(t.x),mi(t.y)}function rr(t,e,n){return t==="position"||t==="preserve-aspect"&&!fu(oi(e),oi(n),.2)}function lh(t){return t!==t.root&&t.scroll?.wasRoot}const ch=or({attachResizeListener:(t,e)=>te(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ue={current:void 0},ar=or({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Ue.current){const t=new ch({});t.mount(window),t.setOptions({layoutScroll:!0}),Ue.current=t}return Ue.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),uh={pan:{Feature:Eu},drag:{Feature:Mu,ProjectionNode:ar,MeasureLayout:Qo}};function pi(t,e,n){const{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,r=s[i];r&&O.postRender(()=>r(e,oe(e)))}class hh extends gt{mount(){const{current:e}=this.node;e&&(this.unmount=Rl(e,(n,s)=>(pi(this.node,s,"Start"),i=>pi(this.node,i,"End"))))}unmount(){}}class dh extends gt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{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=ne(te(this.node.current,"focus",()=>this.onFocus()),te(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function gi(t,e,n){const{props:s}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&s.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),r=s[i];r&&O.postRender(()=>r(e,oe(e)))}class fh extends gt{mount(){const{current:e}=this.node;e&&(this.unmount=Ll(e,(n,s)=>(gi(this.node,s,"Start"),(i,{success:r})=>gi(this.node,i,r?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const pn=new WeakMap,Ke=new WeakMap,mh=t=>{const e=pn.get(t.target);e&&e(t)},ph=t=>{t.forEach(mh)};function gh({root:t,...e}){const n=t||document;Ke.has(n)||Ke.set(n,{});const s=Ke.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(ph,{root:t,...e})),s[i]}function yh(t,e,n){const s=gh(e);return pn.set(t,n),s.observe(t),()=>{pn.delete(t),s.unobserve(t)}}const vh={some:0,all:1};class xh extends gt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:r}=e,o={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:vh[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,r&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:h}=this.node.getProps(),d=u?c:h;d&&d(l)};return yh(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(bh(e,n))&&this.startObserver()}unmount(){}}function bh({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const wh={inView:{Feature:xh},tap:{Feature:fh},focus:{Feature:dh},hover:{Feature:hh}},_h={layout:{ProjectionNode:ar,MeasureLayout:Qo}},Ch={...au,...wh,...uh,..._h},Zn=Cc(Ch,Oc),Th="_primary_13825_8",Sh="_secondary_13825_12",Ph="_tertiary_13825_16",Mh="_positive_13825_20",Eh="_negative_13825_24",Ah="_warning_13825_28",Vh="_accent_13825_32",Rh="_inverse_13825_36",kh="_text_13825_111",Dh="_regular_13825_117",jh="_medium_13825_121",Lh="_semibold_13825_125",Oh="_bold_13825_129",he={primary:Th,secondary:Sh,tertiary:Ph,positive:Mh,negative:Eh,warning:Ah,accent:Vh,inverse:Rh,"title-1":"_title-1_13825_41","title-2":"_title-2_13825_51","title-3":"_title-3_13825_61","headline-1":"_headline-1_13825_76","headline-2":"_headline-2_13825_81","headline-3":"_headline-3_13825_86","body-1":"_body-1_13825_91","body-2":"_body-2_13825_96","caption-1":"_caption-1_13825_101","caption-2":"_caption-2_13825_106",text:kh,regular:Dh,medium:jh,semibold:Lh,bold:Oh},Ih=t=>{let e;t.center?e="center":t.left?e="left":t.right&&(e="right");let n;return t.uppercase?n="uppercase":t.lowercase?n="lowercase":t.capitalize&&(n="capitalize"),E.css({marginTop:t.mt,marginBottom:t.mb,marginRight:t.mr,marginLeft:t.ml,flex:t.flex,cursor:t.cursor,wordBreak:t.wordBreak,whiteSpace:t.whiteSpace,textOverflow:t.textOverflow,textDecoration:t.decoration,textAlign:e,textTransform:n,color:t.color,opacity:t.disabled?.5:void 0,overflow:t.overflow})},L=g.forwardRef((t,e)=>{const{children:n,className:s,variant:i="body-1",fontWeight:r="medium",tag:o="p",colorName:a="primary",style:l,clickOpacity:u=.5,opacityDuration:c=200,onClick:h,disabled:d,...f}=t,[v,m]=g.useState(!1),x=!!h,b=()=>x&&m(!0),w=()=>x&&m(!1),y=o,_=x?E.css({opacity:v?u:1,transition:`opacity ${c}ms ease`}):"";return p.jsx(y,{ref:e,...f,className:E.cx(he.text,he[i],he[a],he[r],_,s,Ih(t)),style:l,onClick:h,onMouseDown:b,onMouseUp:w,onMouseLeave:w,onTouchStart:b,onTouchEnd:w,role:x?"button":void 0,tabIndex:x?0:void 0,children:n})});L.displayName="Text";const lr=Zn(L),Bh="_loader_1qleq_8",Nh={loader:Bh},Fh=({color:t="var(--text-accent)"})=>p.jsx("span",{className:E.cx(Nh.loader,E.css({"--loader-color":t}))}),zh=E.css({display:"flex",alignItems:"center",justifyContent:"center",position:"relative",borderRadius:16,height:48,padding:"0 16px",cursor:"pointer",fontSize:16,fontWeight:600,overflow:"hidden",transition:"all 0.2s ease",gap:8}),$t={zero:"var(--corner-zero)",xs:"var(--corner-xs)",sm:"var(--corner-sm)",md:"var(--corner-md)",lg:"var(--corner-lg)",xl:"var(--corner-xl)","2xl":"var(--corner-2xl)","3xl":"var(--corner-3xl)","4xl":"var(--corner-4xl)","5xl":"var(--corner-5xl)","6xl":"var(--corner-6xl)","full-round":"var(--corner-full-round)"},$h={xs:"var(--height-button-xs)",sm:"var(--height-button-sm)",md:"var(--height-button-md)",lg:"var(--height-button-lg)"},Wh={clear:E.css({backgroundColor:"transparent",border:"none"}),filled:E.css({backgroundColor:"var(--fill-accent-primary)",color:"white",border:"none"}),outline:E.css({backgroundColor:"transparent",border:"1px solid var(--border-accent-primary)"})},Uh=(t,e,n,s)=>{if(s)return E.css({cursor:"not-allowed",opacity:.7});const i={transition:"all 0.2s ease",borderRadius:"var(--corner-lg)",border:"none",color:t==="filled"?"var(--text-inverse)":`var(--text-${e})`};switch(t){case"filled":return E.css({...i,backgroundColor:`var(--fill-${e}-${n})`,":hover":{backgroundColor:`var(--fill-${e}-${n}-hover)`},":active":{backgroundColor:`var(--fill-${e}-${n}-hover)`}});case"outline":return E.css({...i,backgroundColor:"transparent",border:`1px solid var(--border-${e}-${n})`,":hover":{backgroundColor:`var(--fill-${e}-secondary-hover)`},":active":{backgroundColor:`var(--fill-${e}-secondary-hover)`}});case"clear":return E.css({...i,backgroundColor:"transparent",":hover":{backgroundColor:`var(--fill-${e}-secondary-hover)`},":active":{backgroundColor:`var(--fill-${e}-secondary-hover)`}});default:return E.css(i)}},Kh=({disabled:t,loading:e,onClick:n,wrapperClassName:s,buttonClassName:i,buttonDisabledClassName:r,textClassName:o,children:a,variant:l="filled",backgroundColor:u,textColor:c,textFontWeight:h,borderColor:d,color:f="accent",borderRadius:v,width:m="full",size:x="md",iconLeft:b,iconRight:w,intensity:y="primary",flex:_,...C})=>{const S=g.useMemo(()=>{switch(m){case"full":return"100%";case"auto":return"auto";default:return m}},[m]),P=g.useMemo(()=>u||(l==="filled"?f==="neutral"?"var(--fill-neutral-secondary)":`var(--fill-${f}-${y})`:"transparent"),[l,u,f,y]),T=g.useMemo(()=>{if(y==="primary"){if(f==="neutral")return"var(--text-secondary)";if(l==="filled")return"var(--text-inverse)"}else if(f==="neutral")return"var(--text-secondary)";return`var(--text-${f})`},[y,f,l]),R=g.useMemo(()=>{if(y==="primary"){if(f==="neutral")return"secondary";if(l==="filled")return"inverse"}else if(f==="neutral")return"secondary";return f},[l,f,y]),k=g.useMemo(()=>d||(l==="outline"?`var(--border-${f}-${y})`:"transparent"),[l,d,f,y]),H=g.useMemo(()=>{switch(x){case"lg":return $t.lg;case"md":case"sm":return $t.md;case"xs":return $t.sm;default:return $t.md}},[x]),rt=E.cx(zh,Uh(l,f,y,t),Wh[l],i,t?r:void 0,E.css({borderRadius:v?$t[v]:H,backgroundColor:P,borderColor:k,color:c,width:"100%",height:$h[x],opacity:t?.7:1})),at=g.useMemo(()=>{switch(x){case"lg":case"md":return"body-1";case"sm":case"xs":return"body-2";default:return"body-1"}},[x]);return p.jsx(A,{className:E.cx(s),w:S,flex:_,relative:!0,overflow:"hidden",children:p.jsxs(Zn.button,{whileTap:!t&&!e?{scale:.99,boxShadow:"inset 0 0 0 10000px rgba(0,0,0,0.1)",transition:{duration:0}}:{},className:rt,disabled:t||e,onClick:n,...C,children:[e?p.jsx(Fh,{color:T}):p.jsxs(p.Fragment,{children:[b,p.jsx(lr,{style:{color:c},colorName:R,variant:at,className:o,textOverflow:"ellipsis",overflow:"hidden",children:a}),w]}),p.jsx(ee,{})]})})},Hh=t=>V.createElement("svg",{viewBox:"0 0 24 24",fill:"none",...t},V.createElement("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z",fill:"currentColor"})),Gh=t=>V.createElement("svg",{viewBox:"0 0 24 24",fill:"none",...t},V.createElement("path",{d:"M19 13H5v-2h14v2z",fill:"currentColor"})),qh="_checkbox_asmiz_8",Xh="_disabled_asmiz_15",Yh="_checkbox__ripple_asmiz_15",Zh="_checkbox__input_asmiz_27",Jh="_checkbox__box_asmiz_35",Qh="_secondary_asmiz_48",td="_checked_asmiz_54",ed="_error_asmiz_63",lt={checkbox:qh,disabled:Xh,checkbox__ripple:Yh,checkbox__input:Zh,checkbox__box:Jh,secondary:Qh,checked:td,error:ed},nd={sm:20,md:24},Jn=g.forwardRef(({checked:t,onChange:e,disabled:n,error:s,indeterminate:i,size:r="md",title:o,titleColor:a,subtitle:l,subtitleColor:u="secondary",name:c,required:h,variant:d="primary",flex:f},v)=>{const[m,x]=g.useState(!1),b=t!==void 0,w=b?t:m,y=S=>{b||x(S.target.checked),e?.(S)},_=nd[r],C=w||i;return p.jsxs("label",{className:E.cx(lt.checkbox,E.css({flex:f}),{[lt.disabled]:n}),children:[p.jsxs(A,{relative:!0,display:"inline-flex",style:{"--checkbox-size":`${_}px`,"--checkbox-size-double":`${_*2}px`},children:[p.jsx("input",{ref:v,type:"checkbox",checked:w,onChange:y,onClick:S=>S.stopPropagation(),disabled:n,name:c,required:h,className:E.cx(lt.checkbox__input,{[lt.disabled]:n})}),p.jsx("div",{className:E.cx(lt.checkbox__box,lt[d],{[lt.disabled]:n,[lt.error]:s,[lt.checked]:C}),children:C&&(i?p.jsx(Gh,{width:_*.75,height:_*.75}):p.jsx(Hh,{width:_*.75,height:_*.75}))})]}),(o||l)&&p.jsxs(A,{gap:4,children:[o&&p.jsx(L,{colorName:a,variant:r==="sm"?"body-2":"body-1",children:o}),l&&p.jsx(L,{variant:"body-2",colorName:u,children:l})]})]})});Jn.displayName="Checkbox";const sd=t=>V.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},V.createElement("g",{opacity:.5},V.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.0002 17.9999C14.4185 17.9999 18.0002 14.4182 18.0002 9.99991C18.0002 5.58163 14.4185 1.99991 10.0002 1.99991C5.58197 1.99991 2.00024 5.58163 2.00024 9.99991C2.00024 14.4182 5.58197 17.9999 10.0002 17.9999ZM6.46514 6.46446C6.85566 6.07393 7.48883 6.07393 7.87935 6.46446L9.64712 8.23222C9.84238 8.42749 10.159 8.42749 10.3542 8.23222L12.122 6.46446C12.5125 6.07393 13.1457 6.07393 13.5362 6.46446C13.9267 6.85498 13.9267 7.48814 13.5362 7.87867L11.7684 9.64644C11.5732 9.8417 11.5732 10.1583 11.7684 10.3535L13.5362 12.1213C13.9267 12.5118 13.9267 13.145 13.5362 13.5355C13.1457 13.926 12.5125 13.926 12.122 13.5355L10.3542 11.7678C10.159 11.5725 9.84238 11.5725 9.64712 11.7678L7.87935 13.5355C7.48883 13.926 6.85566 13.926 6.46514 13.5355C6.07462 13.145 6.07462 12.5118 6.46514 12.1213L8.23291 10.3535C8.42817 10.1583 8.42817 9.8417 8.23291 9.64644L6.46514 7.87867C6.07462 7.48815 6.07462 6.85498 6.46514 6.46446Z",fill:"currentColor"}))),id="_disabled_1cgqj_20",od="_multiline_1cgqj_24",rd="_input_1cgqj_8",ad="_sm_1cgqj_64",ld="_md_1cgqj_69",cd="_error_1cgqj_74",ud="_white_1cgqj_78",hd="_gray_1cgqj_82",Z={"input-container":"_input-container_1cgqj_8",disabled:id,multiline:od,input:rd,"input-text-size_sm":"_input-text-size_sm_1cgqj_55","input-text-size_md":"_input-text-size_md_1cgqj_59",sm:ad,md:ld,error:cd,white:ud,gray:hd,"clear-button":"_clear-button_1cgqj_86"};function yi(t){return{...new Event("input",{bubbles:!0}),target:t,currentTarget:t}}const cr=g.forwardRef((t,e)=>{const{label:n,prompt:s,error:i,errorText:r,size:o="md",prefix:a,suffix:l,background:u="white",showClearButton:c,disabled:h,value:d,defaultValue:f,...v}=t,m=t.multiline===!0,x=g.useRef(null),b=g.useRef(null),[w,y]=we(d!==void 0?String(d):void 0,f!==void 0?String(f):"");g.useImperativeHandle(e,()=>({focus:()=>{x.current?.focus(),b.current?.focus()},blur:()=>{x.current?.blur(),b.current?.blur()},get value(){return x.current?.value||b.current?.value}}));const _=P=>{if(y(P.target.value),m){const T=t.onChange;T?.(P)}else{const T=t.onChange;T?.(P)}};g.useEffect(()=>{m&&t.autoResize&&b.current&&(b.current.style.height="auto",b.current.style.height=`${b.current.scrollHeight}px`)},[w,m,t.autoResize]);const C=()=>{if(y(""),!m){const T=x.current;if(T){T.value="";const R=yi(T),k=t.onChange;k?.(R)}return}const P=b.current;if(P){P.value="";const T=yi(P),R=t.onChange;R?.(T)}},S=()=>{if(m){const{rows:k,autoResize:H,onChange:rt,multiline:at,...dt}=v;return p.jsx("textarea",{ref:b,rows:t.rows??3,className:E.cx(Z.input,{[Z.disabled]:h}),disabled:h,maxLength:t.maxLength,...dt,value:w,onChange:_})}const{onChange:P,multiline:T,...R}=v;return p.jsx("input",{...R,ref:x,className:E.cx(Z.input,Z[`input-text-size_${o}`],{[Z.disabled]:h}),disabled:h,type:t.type??"text",value:w,onChange:_})};return p.jsxs(A,{w:"full",gap:"var(--spacing-sm)",children:[n&&p.jsx(L,{variant:"body-2",fontWeight:"regular",colorName:"tertiary",children:n}),p.jsxs(A,{row:!0,alignItems:m?"flex-start":"center",w:"full",gap:"var(--spacing-md)",className:E.cx(Z["input-container"],Z[u],Z[o],{[Z.error]:i,[Z.disabled]:h,[Z.multiline]:m}),children:[a&&p.jsx(A,{flex:"none",children:a}),p.jsx(A,{flex:"1",children:S()}),c&&w&&!h&&p.jsx(A,{flex:"none",children:p.jsx("span",{className:Z["clear-button"],onClick:C,children:p.jsx(sd,{})})}),l&&p.jsx(A,{flex:"none",children:l})]}),(s||m)&&p.jsxs(A,{row:!0,gap:10,w:"full",children:[typeof s=="string"?p.jsx(L,{variant:"caption-1",colorName:"tertiary",children:s}):s,m&&t.maxLength&&p.jsx(L,{right:!0,ml:"auto",flex:"none",variant:"caption-1",colorName:"tertiary",children:`${w.length}/${t.maxLength}`})]}),r&&i&&p.jsx(L,{variant:"body-2",colorName:"negative",fontWeight:"regular",children:r})]})});cr.displayName="Input";const dd=t=>V.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},V.createElement("path",{d:"M6 9L12 15L18 9",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),fd=t=>V.createElement("svg",{fill:"currentColor",id:"Capa_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 462.035 462.035",xmlSpace:"preserve",...t},V.createElement("g",null,V.createElement("path",{d:"M457.83,158.441c-0.021-0.028-0.033-0.058-0.057-0.087l-50.184-62.48c-0.564-0.701-1.201-1.305-1.879-1.845 c-2.16-2.562-5.355-4.225-8.967-4.225H65.292c-3.615,0-6.804,1.661-8.965,4.225c-0.678,0.54-1.316,1.138-1.885,1.845l-50.178,62.48 c-0.023,0.029-0.034,0.059-0.057,0.087C1.655,160.602,0,163.787,0,167.39v193.07c0,6.5,5.27,11.771,11.77,11.771h438.496 c6.5,0,11.77-5.271,11.77-11.771V167.39C462.037,163.787,460.381,160.602,457.83,158.441z M408.516,134.615l16.873,21.005h-16.873 V134.615z M384.975,113.345v42.274H296.84c-2.514,0-4.955,0.805-6.979,2.293l-58.837,43.299l-58.849-43.305 c-2.023-1.482-4.466-2.287-6.978-2.287H77.061v-42.274H384.975z M53.523,155.62H36.65l16.873-21.005V155.62z M438.498,348.69H23.54 V179.16h137.796l62.711,46.148c4.15,3.046,9.805,3.052,13.954-0.005l62.698-46.144h137.799V348.69L438.498,348.69z"}))),md="_avatar_1oe2p_8",pd="_avatar_primary_1oe2p_22",gd="_avatar_secondary_1oe2p_25",yd="_avatar_negative_1oe2p_28",vd="_avatar_positive_1oe2p_31",xd="_avatar_warning_1oe2p_34",bd="_avatar_lgSize_1oe2p_71",wd="_avatar_mdSize_1oe2p_85",_d="_avatar_smSize_1oe2p_99",He={avatar:md,avatar_primary:pd,avatar_secondary:gd,avatar_negative:yd,avatar_positive:vd,avatar_warning:xd,avatar_lgSize:bd,avatar_mdSize:wd,avatar_smSize:_d};function Cd({attr:t,children:e,className:n,color:s="primary",size:i="md",...r}){const o="avatar";return p.jsx("div",{...t,...r,className:xt(He[o],n,qt(He,o,i),_e(He,o,s)),children:e})}const Td=t=>V.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},V.createElement("circle",{cx:12,cy:12,r:10,fill:"currentColor",fillOpacity:.15}),V.createElement("path",{d:"M16 9L10.0337 15L8 12.9548",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),vi=t=>V.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},V.createElement("path",{d:"M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z",fill:"currentColor",fillOpacity:.15}),V.createElement("path",{d:"M12 6C11.4477 6 11 6.44772 11 7V13C11 13.5523 11.4477 14 12 14C12.5523 14 13 13.5523 13 13V7C13 6.44772 12.5523 6 12 6Z",fill:"currentColor"}),V.createElement("path",{d:"M12 15C11.4477 15 11 15.4477 11 16V17C11 17.5523 11.4477 18 12 18C12.5523 18 13 17.5523 13 17V16C13 15.4477 12.5523 15 12 15Z",fill:"currentColor"})),Sd=t=>V.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},V.createElement("circle",{cx:12,cy:12,r:10,fill:"currentColor",fillOpacity:.12}),V.createElement("path",{d:"M16 8L8 16M16 16L8 8",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})),Pd=t=>V.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"black",...t},V.createElement("path",{d:"M12 2V22M19.0711 4.92893L4.92893 19.0711M22 12H2M19.0711 19.0711L4.92893 4.92893",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Md="_hint_prca1_8",Ed="_md_prca1_19",Ad="_sm_prca1_24",Vd="_icon_prca1_29",Rd="_content_prca1_40",kd="_title_prca1_46",Dd="_subtitle_prca1_50",jd="_disabled_prca1_55",Ld="_warning_prca1_60",Od="_solid_prca1_60",Id="_negative_prca1_65",Bd="_positive_prca1_70",Nd="_accent_prca1_75",Fd="_neutral_prca1_80",zd="_soft_prca1_85",J={hint:Md,md:Ed,sm:Ad,icon:Vd,content:Rd,title:kd,subtitle:Dd,disabled:jd,warning:Ld,solid:Od,negative:Id,positive:Bd,accent:Nd,neutral:Fd,soft:zd},$d={negative:p.jsx(Sd,{}),positive:p.jsx(Td,{}),accent:p.jsx(vi,{}),warning:p.jsx(vi,{}),neutral:p.jsx(Pd,{})},Wd=({title:t,subtitle:e,color:n="warning",variant:s="soft",size:i="md",icon:r,disabled:o=!1,className:a,style:l})=>{const u=r||$d[n];return p.jsxs("div",{className:xt(J.hint,J[n],J[s],J[i],o&&J.disabled,a),style:l,"aria-disabled":o,children:[u&&p.jsx("span",{className:xt(J.icon,J[n]),children:u}),p.jsxs("div",{className:J.content,children:[t&&p.jsx(L,{className:xt(J.title,qt(J,"title",i)),variant:i==="md"?"body-1":"caption-2",children:t}),e&&p.jsx(L,{className:xt(J.subtitle,qt(J,"subtitle",i)),variant:i==="md"?"body-2":"caption-1",children:e})]})]})},Ud={primary:{bg:"var(--status-neutral-tint-low)",color:"var(--text-primary)"},accent:{bg:"var(--status-accent-tint-low)",color:"var(--text-accent)"},warning:{bg:"var(--status-warning-tint-low)",color:"var(--text-warning)"},positive:{bg:"var(--status-positive-tint-low)",color:"var(--text-positive)"},negative:{bg:"var(--status-negative-tint-low)",color:"var(--text-negative)"}},Kd={sm:28,md:32,lg:40},Qn=g.forwardRef(({label:t,color:e="primary",size:n="md",onClick:s,onDelete:i,avatar:r,icon:o,disabled:a,className:l},u)=>{const c=g.useRef(null),h=Ud[e],d=E.css({cursor:a?"not-allowed":s?"pointer":"default",opacity:a?.5:1,userSelect:"none",position:"relative",transition:"background-color 0.2s, opacity 0.2s","&:hover":a?void 0:{backgroundColor:h.bg}}),f=E.css({cursor:"pointer",opacity:.6,"&:hover":{opacity:1}});return p.jsxs(A,{ref:v=>{c.current=v,typeof u=="function"?u(v):u&&(u.current=v)},row:!0,alignItems:"center",gap:6,px:10,py:4,h:Kd[n],maxWidth:196,overflow:"hidden",borderRadius:"var(--corner-sm)",backgroundColor:h.bg,color:h.color,onClick:s,className:E.cx(d,l),children:[s&&p.jsx(ee,{}),r&&p.jsx(A,{w:20,h:20,borderRadius:"50%",overflow:"hidden",children:r}),o&&p.jsx(A,{children:o}),p.jsx(L,{variant:"caption-1",colorName:e,textOverflow:"ellipsis",children:t}),i&&!a&&p.jsx(L,{className:f,colorName:e,onClick:v=>{v.stopPropagation(),i(v)},children:"×"})]})});Qn.displayName="Tag";const ur=({children:t})=>{const[e]=g.useState(()=>document.createElement("div"));return g.useEffect(()=>{let n=document.getElementById("portal-root");return n||(n=document.createElement("div"),n.id="portal-root",document.body.appendChild(n)),n.appendChild(e),()=>{n&&n.contains(e)&&n.removeChild(e)}},[e]),Si.createPortal(t,e)},Hd="_disabled_1evr5_40",Gd="_open_1evr5_48",qd="_error_1evr5_51",Xd="_hidden_1evr5_87",Yd="_visible_1evr5_90",Zd="_selected_1evr5_163",$={"select-container":"_select-container_1evr5_8","full-width":"_full-width_1evr5_13","select-input":"_select-input_1evr5_17","size-xs":"_size-xs_1evr5_25","size-sm":"_size-sm_1evr5_30","size-md":"_size-md_1evr5_35",disabled:Hd,open:Gd,"select-arrow":"_select-arrow_1evr5_48",error:qd,"select-value":"_select-value_1evr5_62","select-value_xs":"_select-value_xs_1evr5_74","select-placeholder":"_select-placeholder_1evr5_81",hidden:Xd,visible:Yd,"select-arrow_xs":"_select-arrow_xs_1evr5_106","select-dropdown":"_select-dropdown_1evr5_116","select-menu":"_select-menu_1evr5_126","select-menu-item":"_select-menu-item_1evr5_145","select-menu-item-first":"_select-menu-item-first_1evr5_158",selected:Zd,"overflow-tooltip-container":"_overflow-tooltip-container_1evr5_167","overflow-tooltip-text":"_overflow-tooltip-text_1evr5_172","empty-block":"_empty-block_1evr5_179"};function Jd({value:t,onChange:e,multiple:n=!1,returnedValue:s,renderItem:i,placeholder:r,items:o=[],fullWidth:a,size:l="md",showDefaultItem:u,disabled:c,label:h,firstItem:d,lastItem:f,observer:v,emptyText:m,onBlur:x,prompt:b,error:w,errorText:y}){const[_,C]=we(t,n?[]:null),S=g.useRef(null),P=g.useRef(null),[T,R]=g.useState(!1),k=g.useMemo(()=>n?_||[]:_!=null?[_]:[],[_,n]),H=g.useMemo(()=>{const D=new Map;return o.forEach(j=>{D.set(s(j),j)}),D},[o,s]),rt=Mi(S,T),at=!o.length&&!w,dt=D=>{const j=s(D);if(n){const U=k.includes(j)?k.filter(re=>re!==j):[...k,j];C(U),e?.(U)}else C(j),e?.(j),R(!1)},Tt=D=>{if(!n)return;const j=k.filter(U=>U!==D);C(j),e?.(j)},St=()=>{const D=n?[]:null;C(D),e?.(D),n||R(!1)};g.useEffect(()=>{if(!T)return;const D=j=>{const U=j.target;!S.current?.contains(U)&&!P.current?.contains(U)&&(R(!1),x?.())};return document.addEventListener("mousedown",D),()=>document.removeEventListener("mousedown",D)},[T,x]);const N=()=>{if(!k.length)return p.jsx(L,{variant:l==="xs"?"caption-1":"body-2",textOverflow:"ellipsis",overflow:"hidden",colorName:"tertiary",children:r??"Select..."});if(n)return p.jsx(A,{flexWrap:"wrap",row:!0,gap:10,children:k.map(U=>{const re=H.get(U);return re?p.jsx(Qn,{size:"sm",label:i(re),onDelete:gr=>{gr.stopPropagation(),Tt(U)}},U):null})});const D=H.get(k[0]);if(!D)return p.jsx(L,{variant:l==="xs"?"caption-1":"body-2",textOverflow:"ellipsis",overflow:"hidden",colorName:"tertiary",children:r});const j=i(D);return typeof j=="string"?p.jsx(L,{variant:l==="xs"?"caption-1":"body-2",tag:"p",textOverflow:"ellipsis",overflow:"hidden",children:j}):p.jsx(p.Fragment,{children:j})},q=T&&p.jsx(ur,{children:p.jsx(Zn.div,{ref:P,className:$["select-dropdown"],initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.25,ease:"easeInOut"},style:{...rt,position:"absolute",zIndex:1},children:p.jsxs("ul",{className:$["select-menu"],children:[u&&!n&&p.jsx(A,{className:$["select-menu-item"],role:"option",onClick:St,children:p.jsx(L,{variant:"body-2",colorName:"tertiary",children:r})}),d&&p.jsx(A,{className:E.cx($["select-menu-item"],$["select-menu-item-first"]),children:d}),at&&p.jsxs(A,{className:$["empty-block"],children:[p.jsx(A,{w:20,h:20,children:p.jsx(fd,{})}),p.jsx(L,{variant:"body-2",children:m??"There is nothing yet"})]}),o.map(D=>{const j=s(D),U=k.includes(j);return p.jsxs(A,{row:!0,gap:10,alignItems:"center",className:E.cx($["select-menu-item"],{[$.selected]:U}),role:"option",relative:!0,onClick:()=>dt(D),children:[n&&p.jsx(Jn,{size:"sm",checked:U}),typeof i(D)=="string"?p.jsx(L,{variant:"body-2",tag:"p",wordBreak:"break-all",whiteSpace:"break-spaces",children:i(D)}):i(D),p.jsx(ee,{})]},j)}),v,f&&p.jsx(A,{className:E.cx($["select-menu-item"],$["select-menu-item-first"]),children:f})]})},"dropdown")});return p.jsxs(A,{relative:!0,display:"inline-block",minWidth:120,w:a?"full":"auto",children:[typeof h=="string"?p.jsx(L,{variant:"body-2",colorName:"tertiary",fontWeight:"regular",mb:l==="sm"?4:8,children:h}):h,p.jsxs(A,{ref:S,row:!0,gap:10,tabIndex:c?-1:0,role:"button",alignItems:"flex-start","aria-haspopup":"listbox",relative:!0,w:"100%",className:E.cx($["select-input"],$[`size-${l}`],{[$.error]:w,[$.disabled]:c,[$.open]:T}),onClick:()=>!c&&R(D=>!D),onBlur:x,children:[p.jsx(A,{className:E.cx($["select-value"]),children:N()}),p.jsx(A,{className:E.cx($["select-arrow"],$[`select-arrow_${l}`]),children:p.jsx(dd,{})})]}),typeof b=="string"?p.jsx(L,{variant:"caption-1",colorName:"tertiary",mt:4,children:b}):b,w&&y&&p.jsx(L,{tag:"p",colorName:"negative",variant:"body-2",mt:5,children:y}),p.jsx(Kl,{initial:!1,children:q})]})}const Qd=t=>V.createElement("svg",{width:10,height:10,viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},V.createElement("path",{d:"M3.94629 0.220237C3.78013 0.264025 3.64089 0.377624 3.56348 0.53176C3.27371 1.11189 3.05664 1.46395 2.83887 1.74953C2.61807 2.03873 2.38547 2.27579 2.03027 2.63039C1.21079 3.45057 0.799805 4.52619 0.799805 5.60012C0.799838 6.67406 1.21073 7.74968 2.03027 8.56985C3.67062 10.2096 6.32931 10.2095 7.96973 8.56985C8.78929 7.74968 9.20016 6.67408 9.2002 5.60012C9.15131 4.32908 8.43217 3.48543 7.94727 3.05813C7.76902 2.90106 7.40643 3.02424 7.2627 3.2134C7.24031 3.24286 7.21612 3.2739 7.18945 3.30617C6.93211 3.61754 6.56236 3.80807 6.41504 3.83156C6.38264 3.83667 6.36979 3.76513 6.2959 3.58254C5.79455 2.34427 5.78927 2.49365 5.58887 2.01125C5.48847 1.7692 5.05517 1.02727 4.92676 0.828635C4.80206 0.635591 4.64095 0.439873 4.43359 0.301292C4.29028 0.205951 4.1124 0.175957 3.94629 0.220237ZM4.75293 4.17824C5.2689 4.63997 5.60857 5.26651 5.71484 5.95071C6.10631 5.85571 6.46727 5.68318 6.78125 5.45071C6.86578 5.70826 6.89338 5.98123 6.8623 6.25051C6.83115 6.51993 6.74174 6.77966 6.60059 7.01125C6.45944 7.24281 6.27008 7.44117 6.04492 7.59231C5.81977 7.74344 5.56462 7.8443 5.29688 7.88723C5.0292 7.93013 4.75518 7.91446 4.49414 7.84133C4.23299 7.76812 3.99064 7.6383 3.78418 7.46242C3.5778 7.28657 3.41161 7.06792 3.29785 6.8218C3.18419 6.57572 3.12519 6.30771 3.125 6.03664C3.12508 5.58233 3.29054 5.14308 3.58984 4.80129C3.88917 4.4597 4.30271 4.2382 4.75293 4.17824Z",fill:"#FEAD34"})),tf=t=>V.createElement("svg",{width:12,height:12,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},V.createElement("path",{d:"M10.1483 8.61509C10.3344 8.26159 9.98299 7.89856 9.58534 7.93723C9.42671 7.95265 9.25857 7.9605 9.07422 7.96035C6.36522 7.9582 4.17129 5.76427 4.16914 3.05527C4.169 2.87115 4.17682 2.70321 4.19221 2.54477C4.23082 2.14712 3.86769 1.79411 3.50976 1.97161C2.03398 2.70343 1.20002 4.02274 1.20002 5.89477C1.20002 8.60377 3.3961 10.7998 6.1051 10.7998C7.97571 10.7998 9.38737 10.06 10.1483 8.61509Z",fill:"white"})),ef="_container_e7tan_8",nf="_disabled_e7tan_17",sf="_reverse_e7tan_21",of="_input_e7tan_25",rf="_switchContainer_e7tan_35",af="_variant_accent_e7tan_43",lf="_variant_secondary_e7tan_47",cf="_thumb_e7tan_51",uf="_variant_theme_e7tan_54",hf="_moon_e7tan_58",df="_fire_e7tan_61",ff="_size_sm_e7tan_74",mf="_size_md_e7tan_80",pf="_size_lg_e7tan_86",nt={container:ef,disabled:nf,reverse:sf,input:of,switchContainer:rf,variant_accent:af,variant_secondary:lf,switch:"_switch_e7tan_35",thumb:cf,variant_theme:uf,moon:hf,fire:df,size_sm:ff,size_md:mf,size_lg:pf},hr=g.forwardRef(({title:t,text:e,icon:n,disabled:s,onChange:i,checked:r,defaultValue:o,className:a,size:l="md",variant:u="accent",reverse:c=!1,w:h="auto",...d},f)=>{const[v,m]=we(r,o),x=g.useRef(null);g.useImperativeHandle(f,()=>({focus:()=>{x.current?.focus()},blur:()=>{x.current?.blur()},get checked(){return v??!1},setChecked:_=>{m(_),i?.(_)},toggle:()=>{const _=!v;m(_),i?.(_)},isFocused:()=>document.activeElement===x.current,isDisabled:()=>s??!1,getInputElement:()=>x.current,checkValidity:()=>x.current?.checkValidity()??!0,reset:()=>{const _=o??!1;m(_),i?.(_)}}),[v,m,i,s,o]);const b=g.useCallback(_=>{m(_.target.checked),i?.(_.target.checked)},[i]),w=g.useMemo(()=>typeof t=="string"?p.jsx(L,{variant:"body-1",colorName:"primary",fontWeight:"medium",children:t}):t,[t]),y=g.useMemo(()=>typeof e=="string"?p.jsx(L,{variant:"body-2",colorName:"secondary",fontWeight:"regular",children:e}):e,[e]);return p.jsxs(A,{row:!0,w:h,gap:"var(--spacing-sm)",children:[p.jsxs("label",{className:E.cx(nt.container,a,{[nt.disabled]:s,[nt.reverse]:c}),children:[p.jsxs(A,{className:E.cx(nt.switchContainer,nt[`size_${l}`],nt[`variant_${u}`]),children:[p.jsx("input",{ref:x,type:"checkbox",checked:v,className:nt.input,onChange:b,disabled:s,...d}),p.jsx("div",{className:nt.switch,children:p.jsx("div",{className:nt.thumb,children:u==="theme"&&p.jsxs(p.Fragment,{children:[p.jsx(tf,{className:nt.moon}),p.jsx(Qd,{className:nt.fire})]})})})]}),p.jsxs(A,{gap:"var(--spacing-xs)",children:[w,y]})]}),n]})});hr.displayName="Switch";const gf="_header_446to_8",yf={header:gf},dr=g.forwardRef(({title:t,subtitle:e,onClose:n,w:s="full",p:i,py:r,px:o="var(--spacing-2xl)",pt:a="var(--spacing-2xl)",pb:l="var(--spacing-lg)",row:u=!0,justifyContent:c="space-between",showCloseButton:h=!0},d)=>p.jsxs(A,{w:s,p:i,py:r,px:o,pt:a,pb:l,row:u,justifyContent:c,ref:d,className:yf.header,children:[p.jsxs(A,{gap:"var(--spacing-sm)",children:[p.jsx(L,{variant:"title-3",colorName:"primary",fontWeight:"semibold",children:t}),p.jsx(L,{variant:"body-1",colorName:"tertiary",fontWeight:"medium",children:e})]}),h&&p.jsx(A,{children:p.jsx(gn,{onClick:n,color:"neutral",children:p.jsx(Pi,{})})})]}));dr.displayName="ModalHeader";const vf="_footer_1bo08_8",xf={footer:vf},fr=g.forwardRef(({children:t,row:e=!0,flex:n=!0,gap:s="var(--spacing-lg)",p:i="var(--spacing-2xl)",className:r,...o},a)=>p.jsx(A,{flex:n,row:e,gap:s,p:i,className:E.cx(xf.footer,r),ref:a,...o,children:t}));fr.displayName="ModalFooter";function Pt(t,e,n){let s=n.initialDeps??[],i;function r(){var o,a,l,u;let c;n.key&&((o=n.debug)!=null&&o.call(n))&&(c=Date.now());const h=t();if(!(h.length!==s.length||h.some((v,m)=>s[m]!==v)))return i;s=h;let f;if(n.key&&((a=n.debug)!=null&&a.call(n))&&(f=Date.now()),i=e(...h),n.key&&((l=n.debug)!=null&&l.call(n))){const v=Math.round((Date.now()-c)*100)/100,m=Math.round((Date.now()-f)*100)/100,x=m/16,b=(w,y)=>{for(w=String(w);w.length<y;)w=" "+w;return w};console.info(`%c⏱ ${b(m,5)} /${b(v,5)} ms`,`
|
|
14
14
|
font-size: .6rem;
|
|
15
15
|
font-weight: bold;
|
|
16
|
-
color: hsl(${Math.max(0,Math.min(120-120*x,120))}deg 100% 31%);`,n?.key)}return(u=n?.onChange)==null||u.call(n,i),i}return r.updateDeps=o=>{s=o},r}function xi(t,e){if(t===void 0)throw new Error("Unexpected undefined");return t}const bf=(t,e)=>Math.abs(t-e)<1.01,wf=(t,e,n)=>{let s;return function(...i){t.clearTimeout(s),s=t.setTimeout(()=>e.apply(this,i),n)}},bi=t=>{const{offsetWidth:e,offsetHeight:n}=t;return{width:e,height:n}},_f=t=>t,Tf=t=>{const e=Math.max(t.startIndex-t.overscan,0),n=Math.min(t.endIndex+t.overscan,t.count-1),s=[];for(let i=e;i<=n;i++)s.push(i);return s},Cf=(t,e)=>{const n=t.scrollElement;if(!n)return;const s=t.targetWindow;if(!s)return;const i=o=>{const{width:a,height:l}=o;e({width:Math.round(a),height:Math.round(l)})};if(i(bi(n)),!s.ResizeObserver)return()=>{};const r=new s.ResizeObserver(o=>{const a=()=>{const l=o[0];if(l?.borderBoxSize){const u=l.borderBoxSize[0];if(u){i({width:u.inlineSize,height:u.blockSize});return}}i(bi(n))};t.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()});return r.observe(n,{box:"border-box"}),()=>{r.unobserve(n)}},wi={passive:!0},_i=typeof window>"u"?!0:"onscrollend"in window,Sf=(t,e)=>{const n=t.scrollElement;if(!n)return;const s=t.targetWindow;if(!s)return;let i=0;const r=t.options.useScrollendEvent&&_i?()=>{}:wf(s,()=>{e(i,!1)},t.options.isScrollingResetDelay),o=c=>()=>{const{horizontal:h,isRtl:d}=t.options;i=h?n.scrollLeft*(d&&-1||1):n.scrollTop,r(),e(i,c)},a=o(!0),l=o(!1);l(),n.addEventListener("scroll",a,wi);const u=t.options.useScrollendEvent&&_i;return u&&n.addEventListener("scrollend",l,wi),()=>{n.removeEventListener("scroll",a),u&&n.removeEventListener("scrollend",l)}},Pf=(t,e,n)=>{if(e?.borderBoxSize){const s=e.borderBoxSize[0];if(s)return Math.round(s[n.options.horizontal?"inlineSize":"blockSize"])}return t[n.options.horizontal?"offsetWidth":"offsetHeight"]},Mf=(t,{adjustments:e=0,behavior:n},s)=>{var i,r;const o=t+e;(r=(i=s.scrollElement)==null?void 0:i.scrollTo)==null||r.call(i,{[s.options.horizontal?"left":"top"]:o,behavior:n})};class Ef{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const s=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(i=>{i.forEach(r=>{const o=()=>{this._measureElement(r.target,r)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o):o()})}));return{disconnect:()=>{var i;(i=s())==null||i.disconnect(),n=null},observe:i=>{var r;return(r=s())==null?void 0:r.observe(i,{box:"border-box"})},unobserve:i=>{var r;return(r=s())==null?void 0:r.unobserve(i)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([s,i])=>{typeof i>"u"&&delete n[s]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:_f,rangeExtractor:Tf,onChange:()=>{},measureElement:Pf,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...n}},this.notify=n=>{var s,i;(i=(s=this.options).onChange)==null||i.call(s,this,n)},this.maybeNotify=Pt(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:process.env.NODE_ENV!=="production"&&"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const s=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==s){if(this.cleanup(),!s){this.maybeNotify();return}this.scrollElement=s,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(i=>{this.observer.observe(i)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,i=>{this.scrollRect=i,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(i,r)=>{this.scrollAdjustments=0,this.scrollDirection=r?this.getScrollOffset()<i?"forward":"backward":null,this.scrollOffset=i,this.isScrolling=r,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,s)=>{const i=new Map,r=new Map;for(let o=s-1;o>=0;o--){const a=n[o];if(i.has(a.lane))continue;const l=r.get(a.lane);if(l==null||a.end>l.end?r.set(a.lane,a):a.end<l.end&&i.set(a.lane,!0),i.size===this.options.lanes)break}return r.size===this.options.lanes?Array.from(r.values()).sort((o,a)=>o.end===a.end?o.index-a.index:o.end-a.end)[0]:void 0},this.getMeasurementOptions=Pt(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(n,s,i,r,o)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:s,scrollMargin:i,getItemKey:r,enabled:o}),{key:!1}),this.getMeasurements=Pt(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:s,scrollMargin:i,getItemKey:r,enabled:o},a)=>{if(!o)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(c=>{this.itemSizeCache.set(c.key,c.size)}));const l=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const u=this.measurementsCache.slice(0,l);for(let c=l;c<n;c++){const h=r(c),d=this.options.lanes===1?u[c-1]:this.getFurthestMeasurement(u,c),f=d?d.end+this.options.gap:s+i,v=a.get(h),m=typeof v=="number"?v:this.options.estimateSize(c),x=f+m,b=d?d.lane:c%this.options.lanes;u[c]={index:c,start:f,size:m,end:x,key:h,lane:b}}return this.measurementsCache=u,u},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=Pt(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,s,i,r)=>this.range=n.length>0&&s>0?Af({measurements:n,outerSize:s,scrollOffset:i,lanes:r}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=Pt(()=>{let n=null,s=null;const i=this.calculateRange();return i&&(n=i.startIndex,s=i.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,s]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,s]},(n,s,i,r,o)=>r===null||o===null?[]:n({startIndex:r,endIndex:o,overscan:s,count:i}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=n=>{const s=this.options.indexAttribute,i=n.getAttribute(s);return i?parseInt(i,10):(console.warn(`Missing attribute name '${s}={index}' on measured element.`),-1)},this._measureElement=(n,s)=>{const i=this.indexFromElement(n),r=this.measurementsCache[i];if(!r)return;const o=r.key,a=this.elementsCache.get(o);a!==n&&(a&&this.observer.unobserve(a),this.observer.observe(n),this.elementsCache.set(o,n)),n.isConnected&&this.resizeItem(i,this.options.measureElement(n,s,this))},this.resizeItem=(n,s)=>{const i=this.measurementsCache[n];if(!i)return;const r=this.itemSizeCache.get(i.key)??i.size,o=s-r;o!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(i,o,this):i.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",o),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=o,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(i.index),this.itemSizeCache=new Map(this.itemSizeCache.set(i.key,s)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((s,i)=>{s.isConnected||(this.observer.unobserve(s),this.elementsCache.delete(i))});return}this._measureElement(n,void 0)},this.getVirtualItems=Pt(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,s)=>{const i=[];for(let r=0,o=n.length;r<o;r++){const a=n[r],l=s[a];i.push(l)}return i},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const s=this.getMeasurements();if(s.length!==0)return xi(s[mr(0,s.length-1,i=>xi(s[i]).start,n)])},this.getOffsetForAlignment=(n,s,i=0)=>{const r=this.getSize(),o=this.getScrollOffset();s==="auto"&&(s=n>=o+r?"end":"start"),s==="center"?n+=(i-r)/2:s==="end"&&(n-=r);const a=this.getTotalSize()+this.options.scrollMargin-r;return Math.max(Math.min(a,n),0)},this.getOffsetForIndex=(n,s="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const i=this.measurementsCache[n];if(!i)return;const r=this.getSize(),o=this.getScrollOffset();if(s==="auto")if(i.end>=o+r-this.options.scrollPaddingEnd)s="end";else if(i.start<=o+this.options.scrollPaddingStart)s="start";else return[o,s];const a=s==="end"?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,s,i.size),s]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(n,{align:s="start",behavior:i}={})=>{i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,s),{adjustments:void 0,behavior:i})},this.scrollToIndex=(n,{align:s="auto",behavior:i}={})=>{i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),n=Math.max(0,Math.min(n,this.options.count-1));let r=0;const o=10,a=u=>{if(!this.targetWindow)return;const c=this.getOffsetForIndex(n,u);if(!c){console.warn("Failed to get offset for index:",n);return}const[h,d]=c;this._scrollToOffset(h,{adjustments:void 0,behavior:i}),this.targetWindow.requestAnimationFrame(()=>{const f=this.getScrollOffset(),v=this.getOffsetForIndex(n,d);if(!v){console.warn("Failed to get offset for index:",n);return}bf(v[0],f)||l(d)})},l=u=>{this.targetWindow&&(r++,r<o?(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("Schedule retry",r,o),this.targetWindow.requestAnimationFrame(()=>a(u))):console.warn(`Failed to scroll to index ${n} after ${o} attempts.`))};a(s)},this.scrollBy=(n,{behavior:s}={})=>{s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:s})},this.getTotalSize=()=>{var n;const s=this.getMeasurements();let i;if(s.length===0)i=this.options.paddingStart;else if(this.options.lanes===1)i=((n=s[s.length-1])==null?void 0:n.end)??0;else{const r=Array(this.options.lanes).fill(null);let o=s.length-1;for(;o>=0&&r.some(a=>a===null);){const a=s[o];r[a.lane]===null&&(r[a.lane]=a.end),o--}i=Math.max(...r.filter(a=>a!==null))}return Math.max(i-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:s,behavior:i})=>{this.options.scrollToFn(n,{behavior:i,adjustments:s},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(e)}}const mr=(t,e,n,s)=>{for(;t<=e;){const i=(t+e)/2|0,r=n(i);if(r<s)t=i+1;else if(r>s)e=i-1;else return i}return t>0?t-1:0};function Af({measurements:t,outerSize:e,scrollOffset:n,lanes:s}){const i=t.length-1,r=l=>t[l].start;if(t.length<=s)return{startIndex:0,endIndex:i};let o=mr(0,i,r,n),a=o;if(s===1)for(;a<i&&t[a].end<n+e;)a++;else if(s>1){const l=Array(s).fill(0);for(;a<i&&l.some(c=>c<n+e);){const c=t[a];l[c.lane]=c.end,a++}const u=Array(s).fill(n+e);for(;o>=0&&u.some(c=>c>=n);){const c=t[o];u[c.lane]=c.start,o--}o=Math.max(0,o-o%s),a=Math.min(i,a+(s-1-a%s))}return{startIndex:o,endIndex:a}}const Ti=typeof document<"u"?V.useLayoutEffect:V.useEffect;function Vf(t){const e=V.useReducer(()=>({}),{})[1],n={...t,onChange:(i,r)=>{var o;r?Si.flushSync(e):e(),(o=t.onChange)==null||o.call(t,i,r)}},[s]=V.useState(()=>new Ef(n));return s.setOptions(n),Ti(()=>s._didMount(),[]),Ti(()=>s._willUpdate()),s}function Rf(t){return Vf({observeElementRect:Cf,observeElementOffset:Sf,scrollToFn:Mf,...t})}const kf="_main_pl2ip_8",Ci={main:kf},pr=g.forwardRef(({children:t,className:e,row:n=!1,estimatedItemHeight:s=100,virtualize:i=!1},r)=>{const o=g.useRef(null),a=g.useMemo(()=>g.Children.toArray(t),[t]),l=Rf({count:a.length,getScrollElement:()=>o.current,estimateSize:()=>s,measureElement:c=>c.getBoundingClientRect().height});return g.useImperativeHandle(r,()=>({scrollToTop:()=>l.scrollToOffset(0,{behavior:"smooth"}),scrollToBottom:()=>l.scrollToOffset(l.getTotalSize(),{behavior:"smooth"}),scrollToIndex:(c,h={})=>l.scrollToIndex(c,{behavior:"smooth",...h}),scrollToOffset:(c,h={})=>l.scrollToOffset(c,{behavior:"smooth",...h}),scrollBy:c=>{const h=l.scrollOffset||0;l.scrollToOffset(h+c,{behavior:"smooth"})},getElement:()=>o.current,getScrollOffset:()=>l.scrollOffset||0,getTotalSize:()=>l.getTotalSize()}),[l]),g.useMemo(()=>i||a.length>50,[i,a])&&a.length>0?p.jsx(A,{ref:o,className:E.cx(Ci.main,e),w:"full",row:n,p:"var(--spacing-2xl)",children:p.jsx(A,{style:{height:`${l.getTotalSize()}px`,position:"relative"},children:l.getVirtualItems().map(c=>p.jsx(A,{"data-index":c.index,ref:l.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${c.start}px)`},children:a[c.index]},c.key))})}):p.jsx(A,{ref:o,className:E.cx(Ci.main,e),w:"full",row:n,pl:"var(--spacing-2xl)",pr:"var(--spacing-xs)",children:p.jsx(A,{py:"var(--spacing-2xl)",pr:"var(--spacing-xl)",children:t})})});pr.displayName="ModalMain";const Me=Ei;Me.Header=dr;Me.Main=pr;Me.Footer=fr;const Df="_themeProviderScoped_uzb80_9",jf={themeProviderScoped:Df};function Lf({className:t,children:e,theme:n}){return p.jsx("div",{className:xt(jf.themeProviderScoped,t),id:"theme-provider-scoped","data-theme":n,children:e})}exports.AnimatedText=lr;exports.Avatar=Td;exports.Box=A;exports.Button=Kh;exports.Checkbox=Jn;exports.Hint=Wd;exports.IconButton=gn;exports.Input=cr;exports.Modal=Me;exports.Portal=ur;exports.Ripple=ee;exports.Select=Jd;exports.Switch=hr;exports.Tag=Qn;exports.Text=L;exports.ThemeProviderScoped=Lf;exports.getSizeClass=qt;exports.getStyleClass=_e;exports.useControlled=we;exports.useDropdownPosition=Mi;
|
|
16
|
+
color: hsl(${Math.max(0,Math.min(120-120*x,120))}deg 100% 31%);`,n?.key)}return(u=n?.onChange)==null||u.call(n,i),i}return r.updateDeps=o=>{s=o},r}function xi(t,e){if(t===void 0)throw new Error("Unexpected undefined");return t}const bf=(t,e)=>Math.abs(t-e)<1.01,wf=(t,e,n)=>{let s;return function(...i){t.clearTimeout(s),s=t.setTimeout(()=>e.apply(this,i),n)}},bi=t=>{const{offsetWidth:e,offsetHeight:n}=t;return{width:e,height:n}},_f=t=>t,Cf=t=>{const e=Math.max(t.startIndex-t.overscan,0),n=Math.min(t.endIndex+t.overscan,t.count-1),s=[];for(let i=e;i<=n;i++)s.push(i);return s},Tf=(t,e)=>{const n=t.scrollElement;if(!n)return;const s=t.targetWindow;if(!s)return;const i=o=>{const{width:a,height:l}=o;e({width:Math.round(a),height:Math.round(l)})};if(i(bi(n)),!s.ResizeObserver)return()=>{};const r=new s.ResizeObserver(o=>{const a=()=>{const l=o[0];if(l?.borderBoxSize){const u=l.borderBoxSize[0];if(u){i({width:u.inlineSize,height:u.blockSize});return}}i(bi(n))};t.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()});return r.observe(n,{box:"border-box"}),()=>{r.unobserve(n)}},wi={passive:!0},_i=typeof window>"u"?!0:"onscrollend"in window,Sf=(t,e)=>{const n=t.scrollElement;if(!n)return;const s=t.targetWindow;if(!s)return;let i=0;const r=t.options.useScrollendEvent&&_i?()=>{}:wf(s,()=>{e(i,!1)},t.options.isScrollingResetDelay),o=c=>()=>{const{horizontal:h,isRtl:d}=t.options;i=h?n.scrollLeft*(d&&-1||1):n.scrollTop,r(),e(i,c)},a=o(!0),l=o(!1);l(),n.addEventListener("scroll",a,wi);const u=t.options.useScrollendEvent&&_i;return u&&n.addEventListener("scrollend",l,wi),()=>{n.removeEventListener("scroll",a),u&&n.removeEventListener("scrollend",l)}},Pf=(t,e,n)=>{if(e?.borderBoxSize){const s=e.borderBoxSize[0];if(s)return Math.round(s[n.options.horizontal?"inlineSize":"blockSize"])}return t[n.options.horizontal?"offsetWidth":"offsetHeight"]},Mf=(t,{adjustments:e=0,behavior:n},s)=>{var i,r;const o=t+e;(r=(i=s.scrollElement)==null?void 0:i.scrollTo)==null||r.call(i,{[s.options.horizontal?"left":"top"]:o,behavior:n})};class Ef{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const s=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(i=>{i.forEach(r=>{const o=()=>{this._measureElement(r.target,r)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o):o()})}));return{disconnect:()=>{var i;(i=s())==null||i.disconnect(),n=null},observe:i=>{var r;return(r=s())==null?void 0:r.observe(i,{box:"border-box"})},unobserve:i=>{var r;return(r=s())==null?void 0:r.unobserve(i)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([s,i])=>{typeof i>"u"&&delete n[s]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:_f,rangeExtractor:Cf,onChange:()=>{},measureElement:Pf,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...n}},this.notify=n=>{var s,i;(i=(s=this.options).onChange)==null||i.call(s,this,n)},this.maybeNotify=Pt(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:process.env.NODE_ENV!=="production"&&"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const s=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==s){if(this.cleanup(),!s){this.maybeNotify();return}this.scrollElement=s,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(i=>{this.observer.observe(i)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,i=>{this.scrollRect=i,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(i,r)=>{this.scrollAdjustments=0,this.scrollDirection=r?this.getScrollOffset()<i?"forward":"backward":null,this.scrollOffset=i,this.isScrolling=r,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,s)=>{const i=new Map,r=new Map;for(let o=s-1;o>=0;o--){const a=n[o];if(i.has(a.lane))continue;const l=r.get(a.lane);if(l==null||a.end>l.end?r.set(a.lane,a):a.end<l.end&&i.set(a.lane,!0),i.size===this.options.lanes)break}return r.size===this.options.lanes?Array.from(r.values()).sort((o,a)=>o.end===a.end?o.index-a.index:o.end-a.end)[0]:void 0},this.getMeasurementOptions=Pt(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(n,s,i,r,o)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:s,scrollMargin:i,getItemKey:r,enabled:o}),{key:!1}),this.getMeasurements=Pt(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:s,scrollMargin:i,getItemKey:r,enabled:o},a)=>{if(!o)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(c=>{this.itemSizeCache.set(c.key,c.size)}));const l=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const u=this.measurementsCache.slice(0,l);for(let c=l;c<n;c++){const h=r(c),d=this.options.lanes===1?u[c-1]:this.getFurthestMeasurement(u,c),f=d?d.end+this.options.gap:s+i,v=a.get(h),m=typeof v=="number"?v:this.options.estimateSize(c),x=f+m,b=d?d.lane:c%this.options.lanes;u[c]={index:c,start:f,size:m,end:x,key:h,lane:b}}return this.measurementsCache=u,u},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=Pt(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,s,i,r)=>this.range=n.length>0&&s>0?Af({measurements:n,outerSize:s,scrollOffset:i,lanes:r}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=Pt(()=>{let n=null,s=null;const i=this.calculateRange();return i&&(n=i.startIndex,s=i.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,s]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,s]},(n,s,i,r,o)=>r===null||o===null?[]:n({startIndex:r,endIndex:o,overscan:s,count:i}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=n=>{const s=this.options.indexAttribute,i=n.getAttribute(s);return i?parseInt(i,10):(console.warn(`Missing attribute name '${s}={index}' on measured element.`),-1)},this._measureElement=(n,s)=>{const i=this.indexFromElement(n),r=this.measurementsCache[i];if(!r)return;const o=r.key,a=this.elementsCache.get(o);a!==n&&(a&&this.observer.unobserve(a),this.observer.observe(n),this.elementsCache.set(o,n)),n.isConnected&&this.resizeItem(i,this.options.measureElement(n,s,this))},this.resizeItem=(n,s)=>{const i=this.measurementsCache[n];if(!i)return;const r=this.itemSizeCache.get(i.key)??i.size,o=s-r;o!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(i,o,this):i.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",o),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=o,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(i.index),this.itemSizeCache=new Map(this.itemSizeCache.set(i.key,s)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((s,i)=>{s.isConnected||(this.observer.unobserve(s),this.elementsCache.delete(i))});return}this._measureElement(n,void 0)},this.getVirtualItems=Pt(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,s)=>{const i=[];for(let r=0,o=n.length;r<o;r++){const a=n[r],l=s[a];i.push(l)}return i},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const s=this.getMeasurements();if(s.length!==0)return xi(s[mr(0,s.length-1,i=>xi(s[i]).start,n)])},this.getOffsetForAlignment=(n,s,i=0)=>{const r=this.getSize(),o=this.getScrollOffset();s==="auto"&&(s=n>=o+r?"end":"start"),s==="center"?n+=(i-r)/2:s==="end"&&(n-=r);const a=this.getTotalSize()+this.options.scrollMargin-r;return Math.max(Math.min(a,n),0)},this.getOffsetForIndex=(n,s="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const i=this.measurementsCache[n];if(!i)return;const r=this.getSize(),o=this.getScrollOffset();if(s==="auto")if(i.end>=o+r-this.options.scrollPaddingEnd)s="end";else if(i.start<=o+this.options.scrollPaddingStart)s="start";else return[o,s];const a=s==="end"?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,s,i.size),s]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(n,{align:s="start",behavior:i}={})=>{i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,s),{adjustments:void 0,behavior:i})},this.scrollToIndex=(n,{align:s="auto",behavior:i}={})=>{i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),n=Math.max(0,Math.min(n,this.options.count-1));let r=0;const o=10,a=u=>{if(!this.targetWindow)return;const c=this.getOffsetForIndex(n,u);if(!c){console.warn("Failed to get offset for index:",n);return}const[h,d]=c;this._scrollToOffset(h,{adjustments:void 0,behavior:i}),this.targetWindow.requestAnimationFrame(()=>{const f=this.getScrollOffset(),v=this.getOffsetForIndex(n,d);if(!v){console.warn("Failed to get offset for index:",n);return}bf(v[0],f)||l(d)})},l=u=>{this.targetWindow&&(r++,r<o?(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("Schedule retry",r,o),this.targetWindow.requestAnimationFrame(()=>a(u))):console.warn(`Failed to scroll to index ${n} after ${o} attempts.`))};a(s)},this.scrollBy=(n,{behavior:s}={})=>{s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:s})},this.getTotalSize=()=>{var n;const s=this.getMeasurements();let i;if(s.length===0)i=this.options.paddingStart;else if(this.options.lanes===1)i=((n=s[s.length-1])==null?void 0:n.end)??0;else{const r=Array(this.options.lanes).fill(null);let o=s.length-1;for(;o>=0&&r.some(a=>a===null);){const a=s[o];r[a.lane]===null&&(r[a.lane]=a.end),o--}i=Math.max(...r.filter(a=>a!==null))}return Math.max(i-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:s,behavior:i})=>{this.options.scrollToFn(n,{behavior:i,adjustments:s},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(e)}}const mr=(t,e,n,s)=>{for(;t<=e;){const i=(t+e)/2|0,r=n(i);if(r<s)t=i+1;else if(r>s)e=i-1;else return i}return t>0?t-1:0};function Af({measurements:t,outerSize:e,scrollOffset:n,lanes:s}){const i=t.length-1,r=l=>t[l].start;if(t.length<=s)return{startIndex:0,endIndex:i};let o=mr(0,i,r,n),a=o;if(s===1)for(;a<i&&t[a].end<n+e;)a++;else if(s>1){const l=Array(s).fill(0);for(;a<i&&l.some(c=>c<n+e);){const c=t[a];l[c.lane]=c.end,a++}const u=Array(s).fill(n+e);for(;o>=0&&u.some(c=>c>=n);){const c=t[o];u[c.lane]=c.start,o--}o=Math.max(0,o-o%s),a=Math.min(i,a+(s-1-a%s))}return{startIndex:o,endIndex:a}}const Ci=typeof document<"u"?V.useLayoutEffect:V.useEffect;function Vf(t){const e=V.useReducer(()=>({}),{})[1],n={...t,onChange:(i,r)=>{var o;r?Si.flushSync(e):e(),(o=t.onChange)==null||o.call(t,i,r)}},[s]=V.useState(()=>new Ef(n));return s.setOptions(n),Ci(()=>s._didMount(),[]),Ci(()=>s._willUpdate()),s}function Rf(t){return Vf({observeElementRect:Tf,observeElementOffset:Sf,scrollToFn:Mf,...t})}const kf="_main_pl2ip_8",Ti={main:kf},pr=g.forwardRef(({children:t,className:e,row:n=!1,estimatedItemHeight:s=100,virtualize:i=!1},r)=>{const o=g.useRef(null),a=g.useMemo(()=>g.Children.toArray(t),[t]),l=Rf({count:a.length,getScrollElement:()=>o.current,estimateSize:()=>s,measureElement:c=>c.getBoundingClientRect().height});return g.useImperativeHandle(r,()=>({scrollToTop:()=>l.scrollToOffset(0,{behavior:"smooth"}),scrollToBottom:()=>l.scrollToOffset(l.getTotalSize(),{behavior:"smooth"}),scrollToIndex:(c,h={})=>l.scrollToIndex(c,{behavior:"smooth",...h}),scrollToOffset:(c,h={})=>l.scrollToOffset(c,{behavior:"smooth",...h}),scrollBy:c=>{const h=l.scrollOffset||0;l.scrollToOffset(h+c,{behavior:"smooth"})},getElement:()=>o.current,getScrollOffset:()=>l.scrollOffset||0,getTotalSize:()=>l.getTotalSize()}),[l]),g.useMemo(()=>i||a.length>50,[i,a])&&a.length>0?p.jsx(A,{ref:o,className:E.cx(Ti.main,e),w:"full",row:n,p:"var(--spacing-2xl)",children:p.jsx(A,{style:{height:`${l.getTotalSize()}px`,position:"relative"},children:l.getVirtualItems().map(c=>p.jsx(A,{"data-index":c.index,ref:l.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${c.start}px)`},children:a[c.index]},c.key))})}):p.jsx(A,{ref:o,className:E.cx(Ti.main,e),w:"full",row:n,pl:"var(--spacing-2xl)",pr:"var(--spacing-xs)",children:p.jsx(A,{py:"var(--spacing-2xl)",pr:"var(--spacing-xl)",children:t})})});pr.displayName="ModalMain";const Me=Ei;Me.Header=dr;Me.Main=pr;Me.Footer=fr;const Df="_themeProviderScoped_uzb80_9",jf={themeProviderScoped:Df};function Lf({className:t,children:e,theme:n}){return p.jsx("div",{className:xt(jf.themeProviderScoped,t),id:"theme-provider-scoped","data-theme":n,children:e})}exports.AnimatedText=lr;exports.Avatar=Cd;exports.Box=A;exports.Button=Kh;exports.Checkbox=Jn;exports.Hint=Wd;exports.IconButton=gn;exports.Input=cr;exports.Modal=Me;exports.Portal=ur;exports.Ripple=ee;exports.Select=Jd;exports.Switch=hr;exports.Tag=Qn;exports.Text=L;exports.ThemeProviderScoped=Lf;exports.getSizeClass=qt;exports.getStyleClass=_e;exports.useControlled=we;exports.useDropdownPosition=Mi;
|
|
17
17
|
//# sourceMappingURL=ui-kit.cjs.js.map
|