@dss-kit/ui-kit 0.1.28 → 0.1.30

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.
@@ -1,26 +1,26 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react/jsx-runtime"),M=require("@emotion/css"),v=require("react"),Mo=require("react-dom");function Oa(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const T=Oa(v);function za(e){const{h:t,w:n,m:i,mx:s,my:o,mt:r,mr:a,mb:l,ml:c,p:u,px:d,py:f,pt:h,pr:p,pb:g,pl:x,gap:w,xGap:C,yGap:y,row:S,flex:_,relative:b,absolute:E,display:R,overflow:I,absoluteFill:A,center:z,justifyContent:J,alignItems:N,alignSelf:ee,borderWidth:te,borderBottomWidth:se,borderColor:$,borderRadius:K,zIndex:ne,minWidth:j,minHeight:H,maxWidth:P,maxHeight:L,flexWrap:oe,flexGrow:W,flexShrink:U,flexBasis:ye,backgroundColor:je,...$e}=e;return{spacers:{h:t,w:n,m:i,mx:s,my:o,mt:r,mr:a,mb:l,ml:c,p:u,px:d,py:f,pt:h,pr:p,pb:g,pl:x,gap:w,xGap:C,yGap:y,row:S,flex:_,relative:b,absolute:E,display:R,overflow:I,absoluteFill:A,center:z,justifyContent:J,alignItems:N,alignSelf:ee,borderWidth:te,borderBottomWidth:se,borderColor:$,borderRadius:K,zIndex:ne,minWidth:j,minHeight:H,maxWidth:P,maxHeight:L,flexWrap:oe,flexGrow:W,flexShrink:U,flexBasis:ye,backgroundColor:je},rest:$e}}const Ba=e=>M.css({display:e.display??"flex",flexDirection:e.row?"row":"column",height:e.h==="screen"?"100vh":e.h==="full"?"100%":e.h,width:e.w==="screen"?"100vw":e.w==="full"?"100%":e.w,margin:e.m,marginTop:e.mt??e.my,marginBottom:e.mb??e.my,marginLeft:e.ml??e.mx,marginRight:e.mr??e.mx,padding:e.p,paddingTop:e.pt??e.py,paddingBottom:e.pb??e.py,paddingLeft:e.pl??e.px,paddingRight:e.pr??e.px,gap:e.gap,columnGap:e.xGap,rowGap:e.yGap,justifyContent:e.center?"center":e.justifyContent,alignItems:e.center?"center":e.alignItems,alignSelf:e.alignSelf,borderWidth:e.borderWidth,borderBottomWidth:e.borderBottomWidth,borderColor:e.borderColor,borderRadius:e.borderRadius,zIndex:e.zIndex,overflow:e.overflow,minWidth:e.minWidth,minHeight:e.minHeight,maxWidth:e.maxWidth,maxHeight:e.maxHeight,flex:e.flex===!0?1:e.flex,flexWrap:e.flexWrap,flexGrow:e.flexGrow,flexShrink:e.flexShrink,flexBasis:e.flexBasis,backgroundColor:e.backgroundColor,position:e.absolute?"absolute":e.relative?"relative":"unset",...e.absoluteFill&&{position:"absolute",top:0,right:0,bottom:0,left:0}}),V=v.forwardRef(({className:e,children:t,...n},i)=>{const{spacers:s,rest:o}=za(n),r=v.useMemo(()=>Ba(s),[s]);return m.jsx("div",{ref:i,className:M.cx(r,e),...o,children:t})});V.displayName="Box";const To=e=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M18 6L6 18M6 6L18 18",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}));function Na(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ln={exports:{}};/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react/jsx-runtime"),M=require("@emotion/css"),v=require("react"),Mo=require("react-dom");function Oa(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const T=Oa(v);function za(e){const{h:t,w:n,m:i,mx:s,my:o,mt:r,mr:a,mb:l,ml:u,p:c,px:d,py:f,pt:h,pr:p,pb:g,pl:x,gap:w,xGap:C,yGap:y,row:S,flex:_,relative:b,absolute:E,display:R,overflow:I,absoluteFill:A,center:z,justifyContent:J,alignItems:N,alignSelf:ee,borderWidth:te,borderBottomWidth:se,borderColor:$,borderRadius:K,zIndex:ne,minWidth:j,minHeight:H,maxWidth:P,maxHeight:L,flexWrap:oe,flexGrow:W,flexShrink:U,flexBasis:ye,backgroundColor:je,position:$e,...Oe}=e;return{spacers:{h:t,w:n,m:i,mx:s,my:o,mt:r,mr:a,mb:l,ml:u,p:c,px:d,py:f,pt:h,pr:p,pb:g,pl:x,gap:w,xGap:C,yGap:y,row:S,flex:_,relative:b,absolute:E,display:R,overflow:I,absoluteFill:A,center:z,justifyContent:J,alignItems:N,alignSelf:ee,borderWidth:te,borderBottomWidth:se,borderColor:$,borderRadius:K,zIndex:ne,minWidth:j,minHeight:H,maxWidth:P,maxHeight:L,flexWrap:oe,flexGrow:W,flexShrink:U,flexBasis:ye,backgroundColor:je,position:$e},rest:Oe}}const Ba=e=>M.css({display:e.display??"flex",flexDirection:e.row?"row":"column",height:e.h==="screen"?"100vh":e.h==="full"?"100%":e.h,width:e.w==="screen"?"100vw":e.w==="full"?"100%":e.w,margin:e.m,marginTop:e.mt??e.my,marginBottom:e.mb??e.my,marginLeft:e.ml??e.mx,marginRight:e.mr??e.mx,padding:e.p,paddingTop:e.pt??e.py,paddingBottom:e.pb??e.py,paddingLeft:e.pl??e.px,paddingRight:e.pr??e.px,gap:e.gap,columnGap:e.xGap,rowGap:e.yGap,justifyContent:e.center?"center":e.justifyContent,alignItems:e.center?"center":e.alignItems,alignSelf:e.alignSelf,borderWidth:e.borderWidth,borderBottomWidth:e.borderBottomWidth,borderColor:e.borderColor,borderRadius:e.borderRadius,zIndex:e.zIndex,overflow:e.overflow,minWidth:e.minWidth,minHeight:e.minHeight,maxWidth:e.maxWidth,maxHeight:e.maxHeight,flex:e.flex===!0?1:e.flex,flexWrap:e.flexWrap,flexGrow:e.flexGrow,flexShrink:e.flexShrink,flexBasis:e.flexBasis,backgroundColor:e.backgroundColor,position:e?.position||e.absolute?"absolute":e.relative?"relative":void 0,...e.absoluteFill&&{position:"absolute",top:0,right:0,bottom:0,left:0}}),V=v.forwardRef(({className:e,children:t,...n},i)=>{const{spacers:s,rest:o}=za(n),r=v.useMemo(()=>Ba(s),[s]);return m.jsx("div",{ref:i,className:M.cx(r,e),...o,children:t})});V.displayName="Box";const To=e=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M18 6L6 18M6 6L18 18",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}));function Na(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ln={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 Ji;function Ha(){return Ji||(Ji=1,(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var o="",r=0;r<arguments.length;r++){var a=arguments[r];a&&(o=s(o,i(a)))}return o}function i(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var r="";for(var a in o)t.call(o,a)&&o[a]&&(r=s(r,a));return r}function s(o,r){return r?o?o+" "+r:o+r:o}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(ln)),ln.exports}var Ga=Ha();const Be=Na(Ga),Wa="_rippleOverlay_s2kim_8",Ua="_ripple_s2kim_8",Qi={rippleOverlay:Wa,ripple:Ua},un="button, a, input, label, [role='button'], [data-ripple]";function Ka(e){if(typeof e.composedPath=="function")return e.composedPath();const t=[];let n=e.target;for(;n;)t.push(n),n=n.parentNode||n.host;return t.push(window),t}const it=v.forwardRef(({color:e="rgba(0,0,0,0.18)",duration:t=1e3,radius:n="auto",className:i},s)=>{const o=v.useRef(null),[r,a]=v.useState([]),l=v.useRef([]),c=v.useRef(1),u=v.useRef(null),d=()=>{l.current.forEach(g=>clearTimeout(g)),l.current=[]},f=v.useCallback((g,x,w,C)=>{if(typeof window>"u")return;const y=w.getBoundingClientRect(),S=n==="auto"?Math.max(y.width,y.height)*2:n,_=g-C.left,b=x-C.top,E=Math.max(0,y.top-C.top),R=Math.max(0,y.left-C.left),I=Math.max(0,C.right-y.right),A=Math.max(0,C.bottom-y.bottom),J=window.getComputedStyle(w).borderRadius||"0px",N=c.current++,ee={id:N,left:_-S/2,top:b-S/2,size:Math.ceil(S),clip:{top:Math.round(E),right:Math.round(I),bottom:Math.round(A),left:Math.round(R)},borderRadius:J};a(se=>[...se,ee]);const te=window.setTimeout(()=>{a(se=>se.filter($=>$.id!==N))},t+80);l.current.push(te)},[t,n]),h=v.useCallback(g=>{try{if(!o.current)return;const x=o.current,w=x.parentElement;if(!w)return;const C=Ka(g);let y=null;for(const R of C)if(R instanceof Element){if(R===w)break;if(R.matches&&R.matches(un)){y=R;break}}if(y||(y=w),y.closest&&(y.closest("[disabled]")||y.getAttribute("aria-disabled")==="true"||y.classList.contains("ripple-disabled")))return;const S=g.target;if(S&&S.closest&&(S.closest("[disabled]")||S.getAttribute?.("aria-disabled")==="true"))return;const _=x.getBoundingClientRect(),{clientX:b}=g,{clientY:E}=g;f(b,E,y,_)}catch{}},[f]),p=v.useCallback(g=>{if(!o.current||!(g.key==="Enter"||g.key===" "))return;const x=o.current,w=x.parentElement;if(!w)return;const C=document.activeElement;let y=null;if(C instanceof Element&&C.matches(un)&&(y=C),y||(y=w),y.closest&&(y.closest("[disabled]")||y.getAttribute("aria-disabled")==="true"))return;const S=x.getBoundingClientRect(),_=y.getBoundingClientRect().left+y.getBoundingClientRect().width/2,b=y.getBoundingClientRect().top+y.getBoundingClientRect().height/2;f(_,b,y,S)},[f]);return v.useImperativeHandle(s,()=>({trigger:({center:g=!0,x,y:w}={})=>{const C=o.current;if(!C)return;const y=C.parentElement;if(!y)return;const S=C.getBoundingClientRect(),_=document.activeElement instanceof Element&&document.activeElement.matches(un)?document.activeElement:y,b=g?_.getBoundingClientRect().left+_.getBoundingClientRect().width/2:x??S.left+S.width/2,E=g?_.getBoundingClientRect().top+_.getBoundingClientRect().height/2:w??S.top+S.height/2;f(b,E,_,S)}}),[f]),v.useEffect(()=>{const g=o.current;if(!g)return;const x=g.parentElement;if(!x||typeof window>"u")return;const w=window.getComputedStyle(x);let C=!1;return w.position==="static"&&(x.style.position="relative",C=!0,u.current=x),x.addEventListener("pointerdown",h,!0),x.addEventListener("keydown",p),()=>{x.removeEventListener("pointerdown",h,!0),x.removeEventListener("keydown",p),C&&u.current&&(u.current.style.position="",u.current=null),d()}},[h,p]),v.useEffect(()=>()=>d(),[]),m.jsx("div",{ref:o,className:`${Qi.rippleOverlay} ${i??""}`,"aria-hidden":!0,children:r.map(g=>m.jsx("span",{className:Qi.ripple,style:{left:`${g.left}px`,top:`${g.top}px`,width:`${g.size}px`,height:`${g.size}px`,backgroundColor:e,animationDuration:`${t}ms`,clipPath:`inset(${g.clip.top}px ${g.clip.right}px ${g.clip.bottom}px ${g.clip.left}px round ${g.borderRadius})`}},g.id))})});function Yt(e,t){const{current:n}=v.useRef(e!==void 0),[i,s]=v.useState(t),o=n?e:i,r=v.useCallback(a=>{n||s(a)},[n]);return[o,r]}const Eo=(e,t)=>{const[n,i]=v.useState({top:0,left:0,width:0});return v.useLayoutEffect(()=>{if(!t||!e.current||typeof window>"u")return;const s=()=>{const r=e.current.getBoundingClientRect();i({top:r.bottom+window.scrollY+4,left:r.left+window.scrollX,width:r.width})};s(),window.addEventListener("resize",s),window.addEventListener("scroll",s,!0);const o=new ResizeObserver(()=>s());return o.observe(e.current),()=>{window.removeEventListener("resize",s),window.removeEventListener("scroll",s,!0),o.disconnect()}},[t,e]),n};function Zt(e,t,n,i=""){if(n)return e[`${t}_${n}${i}`]}function wt(e,t,n){return Zt(e,t,n,"Size")}const qa="_button_11ykb_8",Xa="_button_primary_11ykb_19",Ya="_button_secondary_11ykb_22",Za="_button_negative_11ykb_25",Ja="_button_positive_11ykb_28",Qa="_button_warning_11ykb_31",el="_button_neutral_11ykb_34",tl="_button_mdSize_11ykb_118",nl="_button_smSize_11ykb_128",il="_button_xsSize_11ykb_138",cn={button:qa,button_primary:Xa,button_secondary:Ya,button_negative:Za,button_positive:Ja,button_warning:Qa,button_neutral:el,"button_neutral-white":"_button_neutral-white_11ykb_37","button_no-bg":"_button_no-bg_11ykb_40",button_mdSize:tl,button_smSize:nl,button_xsSize:il};function xt({attr:e,children:t,className:n,type:i="button",color:s="primary",size:o="md",...r}){const a="button";return m.jsxs("button",{...e,...r,type:i,className:Be(cn[a],n,wt(cn,a,o),Zt(cn,a,s)),children:[m.jsx(it,{}),t]})}const sl="_overlay_1udux_8",ol="_open_1udux_21",rl="_modal_1udux_25",al="_closeButton_1udux_42",ll="_size_lg_1udux_49",ul="_size_md_1udux_52",cl="_size_sm_1udux_55",ut={overlay:sl,open:ol,modal:rl,"modal-animation":"_modal-animation_1udux_1",closeButton:al,size_lg:ll,size_md:ul,size_sm:cl},Vo=v.forwardRef(({isOpen:e=!0,onClose:t,overlayClassName:n,modalClassName:i,size:s="md",closeOnBackdropClick:o=!0,closeOnEsc:r=!0,disableBodyScroll:a=!1,showAbsoluteCloseButton:l=!1,children:c},u)=>{v.useEffect(()=>{if(a&&e&&typeof window<"u"&&typeof document<"u"){const h=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=h}}},[e,a]);const d=v.useCallback(h=>{h.key==="Escape"&&t&&t()},[t]);v.useEffect(()=>{if(typeof window<"u"&&typeof document<"u"&&r&&e)return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[e,r,d]);const f=v.useCallback(h=>{h.target===h.currentTarget&&o&&t&&t()},[o,t]);return m.jsx("div",{onClick:f,className:M.cx(ut.overlay,{[ut.open]:e},n),children:m.jsxs(V,{ref:u,className:M.cx(ut.modal,ut[`size_${s}`],i),children:[l&&m.jsx(xt,{className:ut.closeButton,onClick:t,color:"neutral",children:m.jsx(To,{})}),c]})})});Vo.displayName="Modal";const ai=v.createContext({});function li(e){const t=v.useRef(null);return t.current===null&&(t.current=e()),t.current}const ui=typeof window<"u",Ao=ui?v.useLayoutEffect:v.useEffect,Jt=v.createContext(null);function ci(e,t){e.indexOf(t)===-1&&e.push(t)}function di(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Me=(e,t,n)=>n>t?t:n<e?e:n;function kn(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let st=()=>{},Te=()=>{};process.env.NODE_ENV!=="production"&&(st=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(kn(t,n))},Te=(e,t,n)=>{if(!e)throw new Error(kn(t,n))});const Ee={},Do=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Fo(e){return typeof e=="object"&&e!==null}const ko=e=>/^0[^.\s]+$/u.test(e);function fi(e){let t;return()=>(t===void 0&&(t=e()),t)}const ve=e=>e,dl=(e,t)=>n=>t(e(n)),Mt=(...e)=>e.reduce(dl),Ct=(e,t,n)=>{const i=t-e;return i===0?1:(n-e)/i};class hi{constructor(){this.subscriptions=[]}add(t){return ci(this.subscriptions,t),()=>di(this.subscriptions,t)}notify(t,n,i){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,i);else for(let o=0;o<s;o++){const r=this.subscriptions[o];r&&r(t,n,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ce=e=>e*1e3,me=e=>e/1e3;function Io(e,t){return t?e*(1e3/t):0}const es=new Set;function gi(e,t,n){e||es.has(t)||(console.warn(kn(t,n)),es.add(t))}const Lo=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,fl=1e-7,hl=12;function gl(e,t,n,i,s){let o,r,a=0;do r=t+(n-t)/2,o=Lo(r,i,s)-e,o>0?n=r:t=r;while(Math.abs(o)>fl&&++a<hl);return r}function Tt(e,t,n,i){if(e===t&&n===i)return ve;const s=o=>gl(o,0,1,e,n);return o=>o===0||o===1?o:Lo(s(o),t,i)}const jo=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,$o=e=>t=>1-e(1-t),Oo=Tt(.33,1.53,.69,.99),pi=$o(Oo),zo=jo(pi),Bo=e=>(e*=2)<1?.5*pi(e):.5*(2-Math.pow(2,-10*(e-1))),mi=e=>1-Math.sin(Math.acos(e)),No=$o(mi),Ho=jo(mi),pl=Tt(.42,0,1,1),ml=Tt(0,0,.58,1),Go=Tt(.42,0,.58,1),vl=e=>Array.isArray(e)&&typeof e[0]!="number",Wo=e=>Array.isArray(e)&&typeof e[0]=="number",ts={linear:ve,easeIn:pl,easeInOut:Go,easeOut:ml,circIn:mi,circInOut:Ho,circOut:No,backIn:pi,backInOut:zo,backOut:Oo,anticipate:Bo},yl=e=>typeof e=="string",ns=e=>{if(Wo(e)){Te(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,i,s]=e;return Tt(t,n,i,s)}else if(yl(e))return Te(ts[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),ts[e];return e},At=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function wl(e,t){let n=new Set,i=new Set,s=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(u){r.has(u)&&(c.schedule(u),e()),u(a)}const c={schedule:(u,d=!1,f=!1)=>{const p=f&&s?n:i;return d&&r.add(u),p.has(u)||p.add(u),u},cancel:u=>{i.delete(u),r.delete(u)},process:u=>{if(a=u,s){o=!0;return}s=!0,[n,i]=[i,n],n.forEach(l),n.clear(),s=!1,o&&(o=!1,c.process(u))}};return c}const xl=40;function Uo(e,t){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=At.reduce((y,S)=>(y[S]=wl(o),y),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:h,postRender:p}=r,g=()=>{const y=Ee.useManualTiming?s.timestamp:performance.now();n=!1,Ee.useManualTiming||(s.delta=i?1e3/60:Math.max(Math.min(y-s.timestamp,xl),1)),s.timestamp=y,s.isProcessing=!0,a.process(s),l.process(s),c.process(s),u.process(s),d.process(s),f.process(s),h.process(s),p.process(s),s.isProcessing=!1,n&&t&&(i=!1,e(g))},x=()=>{n=!0,i=!0,s.isProcessing||e(g)};return{schedule:At.reduce((y,S)=>{const _=r[S];return y[S]=(b,E=!1,R=!1)=>(n||x(),_.schedule(b,E,R)),y},{}),cancel:y=>{for(let S=0;S<At.length;S++)r[At[S]].cancel(y)},state:s,steps:r}}const{schedule:q,cancel:Fe,state:re,steps:dn}=Uo(typeof requestAnimationFrame<"u"?requestAnimationFrame:ve,!0);let Ot;function Cl(){Ot=void 0}const de={now:()=>(Ot===void 0&&de.set(re.isProcessing||Ee.useManualTiming?re.timestamp:performance.now()),Ot),set:e=>{Ot=e,queueMicrotask(Cl)}},Ko=e=>t=>typeof t=="string"&&t.startsWith(e),vi=Ko("--"),Sl=Ko("var(--"),yi=e=>Sl(e)?_l.test(e.split("/*")[0].trim()):!1,_l=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,ot={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},St={...ot,transform:e=>Me(0,1,e)},Dt={...ot,default:1},gt=e=>Math.round(e*1e5)/1e5,wi=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function bl(e){return e==null}const Rl=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,xi=(e,t)=>n=>!!(typeof n=="string"&&Rl.test(n)&&n.startsWith(e)||t&&!bl(n)&&Object.prototype.hasOwnProperty.call(n,t)),qo=(e,t,n)=>i=>{if(typeof i!="string")return i;const[s,o,r,a]=i.match(wi);return{[e]:parseFloat(s),[t]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},Pl=e=>Me(0,255,e),fn={...ot,transform:e=>Math.round(Pl(e))},Ne={test:xi("rgb","red"),parse:qo("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:i=1})=>"rgba("+fn.transform(e)+", "+fn.transform(t)+", "+fn.transform(n)+", "+gt(St.transform(i))+")"};function Ml(e){let t="",n="",i="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),i=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),i=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,i+=i,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}}const In={test:xi("#"),parse:Ml,transform:Ne.transform},Et=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ae=Et("deg"),be=Et("%"),k=Et("px"),Tl=Et("vh"),El=Et("vw"),is={...be,parse:e=>be.parse(e)/100,transform:e=>be.transform(e*100)},qe={test:xi("hsl","hue"),parse:qo("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:i=1})=>"hsla("+Math.round(e)+", "+be.transform(gt(t))+", "+be.transform(gt(n))+", "+gt(St.transform(i))+")"},Q={test:e=>Ne.test(e)||In.test(e)||qe.test(e),parse:e=>Ne.test(e)?Ne.parse(e):qe.test(e)?qe.parse(e):In.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ne.transform(e):qe.transform(e),getAnimatableNone:e=>{const t=Q.parse(e);return t.alpha=0,Q.transform(t)}},Vl=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Al(e){return isNaN(e)&&typeof e=="string"&&(e.match(wi)?.length||0)+(e.match(Vl)?.length||0)>0}const Xo="number",Yo="color",Dl="var",Fl="var(",ss="${}",kl=/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 _t(e){const t=e.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const a=t.replace(kl,l=>(Q.test(l)?(i.color.push(o),s.push(Yo),n.push(Q.parse(l))):l.startsWith(Fl)?(i.var.push(o),s.push(Dl),n.push(l)):(i.number.push(o),s.push(Xo),n.push(parseFloat(l))),++o,ss)).split(ss);return{values:n,split:a,indexes:i,types:s}}function Zo(e){return _t(e).values}function Jo(e){const{split:t,types:n}=_t(e),i=t.length;return s=>{let o="";for(let r=0;r<i;r++)if(o+=t[r],s[r]!==void 0){const a=n[r];a===Xo?o+=gt(s[r]):a===Yo?o+=Q.transform(s[r]):o+=s[r]}return o}}const Il=e=>typeof e=="number"?0:Q.test(e)?Q.getAnimatableNone(e):e;function Ll(e){const t=Zo(e);return Jo(e)(t.map(Il))}const ke={test:Al,parse:Zo,createTransformer:Jo,getAnimatableNone:Ll};function hn(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function jl({hue:e,saturation:t,lightness:n,alpha:i}){e/=360,t/=100,n/=100;let s=0,o=0,r=0;if(!t)s=o=r=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;s=hn(l,a,e+1/3),o=hn(l,a,e),r=hn(l,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:i}}function Gt(e,t){return n=>n>0?t:e}const Y=(e,t,n)=>e+(t-e)*n,gn=(e,t,n)=>{const i=e*e,s=n*(t*t-i)+i;return s<0?0:Math.sqrt(s)},$l=[In,Ne,qe],Ol=e=>$l.find(t=>t.test(e));function os(e){const t=Ol(e);if(st(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===qe&&(n=jl(n)),n}const rs=(e,t)=>{const n=os(e),i=os(t);if(!n||!i)return Gt(e,t);const s={...n};return o=>(s.red=gn(n.red,i.red,o),s.green=gn(n.green,i.green,o),s.blue=gn(n.blue,i.blue,o),s.alpha=Y(n.alpha,i.alpha,o),Ne.transform(s))},Ln=new Set(["none","hidden"]);function zl(e,t){return Ln.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Bl(e,t){return n=>Y(e,t,n)}function Ci(e){return typeof e=="number"?Bl:typeof e=="string"?yi(e)?Gt:Q.test(e)?rs:Gl:Array.isArray(e)?Qo:typeof e=="object"?Q.test(e)?rs:Nl:Gt}function Qo(e,t){const n=[...e],i=n.length,s=e.map((o,r)=>Ci(o)(o,t[r]));return o=>{for(let r=0;r<i;r++)n[r]=s[r](o);return n}}function Nl(e,t){const n={...e,...t},i={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(i[s]=Ci(e[s])(e[s],t[s]));return s=>{for(const o in i)n[o]=i[o](s);return n}}function Hl(e,t){const n=[],i={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const o=t.types[s],r=e.indexes[o][i[o]],a=e.values[r]??0;n[s]=a,i[o]++}return n}const Gl=(e,t)=>{const n=ke.createTransformer(t),i=_t(e),s=_t(t);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?Ln.has(e)&&!s.values.length||Ln.has(t)&&!i.values.length?zl(e,t):Mt(Qo(Hl(i,s),s.values),n):(st(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Gt(e,t))};function er(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Y(e,t,n):Ci(e)(e,t)}const Wl=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>q.update(t,n),stop:()=>Fe(t),now:()=>re.isProcessing?re.timestamp:de.now()}},tr=(e,t,n=10)=>{let i="";const s=Math.max(Math.round(t/n),2);for(let o=0;o<s;o++)i+=Math.round(e(o/(s-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},Wt=2e4;function Si(e){let t=0;const n=50;let i=e.next(t);for(;!i.done&&t<Wt;)t+=n,i=e.next(t);return t>=Wt?1/0:t}function Ul(e,t=100,n){const i=n({...e,keyframes:[0,t]}),s=Math.min(Si(i),Wt);return{type:"keyframes",ease:o=>i.next(s*o).value/t,duration:me(s)}}const Kl=5;function nr(e,t,n){const i=Math.max(t-Kl,0);return Io(n-e(i),t-i)}const X={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},pn=.001;function ql({duration:e=X.duration,bounce:t=X.bounce,velocity:n=X.velocity,mass:i=X.mass}){let s,o;st(e<=Ce(X.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let r=1-t;r=Me(X.minDamping,X.maxDamping,r),e=Me(X.minDuration,X.maxDuration,me(e)),r<1?(s=c=>{const u=c*r,d=u*e,f=u-n,h=jn(c,r),p=Math.exp(-d);return pn-f/h*p},o=c=>{const d=c*r*e,f=d*n+n,h=Math.pow(r,2)*Math.pow(c,2)*e,p=Math.exp(-d),g=jn(Math.pow(c,2),r);return(-s(c)+pn>0?-1:1)*((f-h)*p)/g}):(s=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-pn+u*d},o=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=Yl(s,o,a);if(e=Ce(e),isNaN(l))return{stiffness:X.stiffness,damping:X.damping,duration:e};{const c=Math.pow(l,2)*i;return{stiffness:c,damping:r*2*Math.sqrt(i*c),duration:e}}}const Xl=12;function Yl(e,t,n){let i=n;for(let s=1;s<Xl;s++)i=i-e(i)/t(i);return i}function jn(e,t){return e*Math.sqrt(1-t*t)}const Zl=["duration","bounce"],Jl=["stiffness","damping","mass"];function as(e,t){return t.some(n=>e[n]!==void 0)}function Ql(e){let t={velocity:X.velocity,stiffness:X.stiffness,damping:X.damping,mass:X.mass,isResolvedFromDuration:!1,...e};if(!as(e,Jl)&&as(e,Zl))if(e.visualDuration){const n=e.visualDuration,i=2*Math.PI/(n*1.2),s=i*i,o=2*Me(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:X.mass,stiffness:s,damping:o}}else{const n=ql(e);t={...t,...n,mass:X.mass},t.isResolvedFromDuration=!0}return t}function Ut(e=X.visualDuration,t=X.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:i,restDelta:s}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:h}=Ql({...n,velocity:-me(n.velocity||0)}),p=f||0,g=c/(2*Math.sqrt(l*u)),x=r-o,w=me(Math.sqrt(l/u)),C=Math.abs(x)<5;i||(i=C?X.restSpeed.granular:X.restSpeed.default),s||(s=C?X.restDelta.granular:X.restDelta.default);let y;if(g<1){const _=jn(w,g);y=b=>{const E=Math.exp(-g*w*b);return r-E*((p+g*w*x)/_*Math.sin(_*b)+x*Math.cos(_*b))}}else if(g===1)y=_=>r-Math.exp(-w*_)*(x+(p+w*x)*_);else{const _=w*Math.sqrt(g*g-1);y=b=>{const E=Math.exp(-g*w*b),R=Math.min(_*b,300);return r-E*((p+g*w*x)*Math.sinh(R)+_*x*Math.cosh(R))/_}}const S={calculatedDuration:h&&d||null,next:_=>{const b=y(_);if(h)a.done=_>=d;else{let E=_===0?p:0;g<1&&(E=_===0?Ce(p):nr(y,_,b));const R=Math.abs(E)<=i,I=Math.abs(r-b)<=s;a.done=R&&I}return a.value=a.done?r:b,a},toString:()=>{const _=Math.min(Si(S),Wt),b=tr(E=>S.next(_*E).value,_,30);return _+"ms "+b},toTransition:()=>{}};return S}Ut.applyToOptions=e=>{const t=Ul(e,100,Ut);return e.ease=t.ease,e.duration=Ce(t.duration),e.type="keyframes",e};function $n({keyframes:e,velocity:t=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},h=R=>a!==void 0&&R<a||l!==void 0&&R>l,p=R=>a===void 0?l:l===void 0||Math.abs(a-R)<Math.abs(l-R)?a:l;let g=n*t;const x=d+g,w=r===void 0?x:r(x);w!==x&&(g=w-d);const C=R=>-g*Math.exp(-R/i),y=R=>w+C(R),S=R=>{const I=C(R),A=y(R);f.done=Math.abs(I)<=c,f.value=f.done?w:A};let _,b;const E=R=>{h(f.value)&&(_=R,b=Ut({keyframes:[f.value,p(f.value)],velocity:nr(y,R,f.value),damping:s,stiffness:o,restDelta:c,restSpeed:u}))};return E(0),{calculatedDuration:null,next:R=>{let I=!1;return!b&&_===void 0&&(I=!0,S(R),E(R)),_!==void 0&&R>=_?b.next(R-_):(!I&&S(R),f)}}}function eu(e,t,n){const i=[],s=n||Ee.mix||er,o=e.length-1;for(let r=0;r<o;r++){let a=s(e[r],e[r+1]);if(t){const l=Array.isArray(t)?t[r]||ve:t;a=Mt(l,a)}i.push(a)}return i}function tu(e,t,{clamp:n=!0,ease:i,mixer:s}={}){const o=e.length;if(Te(o===t.length,"Both input and output ranges must be the same length","range-length"),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const r=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=eu(t,i,s),l=a.length,c=u=>{if(r&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const f=Ct(e[d],e[d+1],u);return a[d](f)};return n?u=>c(Me(e[0],e[o-1],u)):c}function nu(e,t){const n=e[e.length-1];for(let i=1;i<=t;i++){const s=Ct(0,t,i);e.push(Y(n,1,s))}}function iu(e){const t=[0];return nu(t,e.length-1),t}function su(e,t){return e.map(n=>n*t)}function ou(e,t){return e.map(()=>t||Go).splice(0,e.length-1)}function Xe({duration:e=300,keyframes:t,times:n,ease:i="easeInOut"}){const s=vl(i)?i.map(ns):ns(i),o={done:!1,value:t[0]},r=su(n&&n.length===t.length?n:iu(t),e),a=tu(r,t,{ease:Array.isArray(s)?s:ou(t,s)});return{calculatedDuration:e,next:l=>(o.value=a(l),o.done=l>=e,o)}}const ru=e=>e!==null;function _i(e,{repeat:t,repeatType:n="loop"},i,s=1){const o=e.filter(ru),a=s<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!a||i===void 0?o[a]:i}const au={decay:$n,inertia:$n,tween:Xe,keyframes:Xe,spring:Ut};function ir(e){typeof e.type=="string"&&(e.type=au[e.type])}class bi{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const lu=e=>e/100;class Ri extends bi{constructor(t){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!==de.now()&&this.tick(de.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;ir(t);const{type:n=Xe,repeat:i=0,repeatDelay:s=0,repeatType:o,velocity:r=0}=t;let{keyframes:a}=t;const l=n||Xe;process.env.NODE_ENV!=="production"&&l!==Xe&&Te(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==Xe&&typeof a[0]!="number"&&(this.mixKeyframes=Mt(lu,er(a[0],a[1])),a=[0,100]);const c=l({...t,keyframes:a});o==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-r})),c.calculatedDuration===null&&(c.calculatedDuration=Si(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+s,this.totalDuration=this.resolvedDuration*(i+1)-s,this.generator=c}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:i,totalDuration:s,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return i.next(0);const{delay:c=0,keyframes:u,repeat:d,repeatType:f,repeatDelay:h,type:p,onUpdate:g,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const w=this.currentTime-c*(this.playbackSpeed>=0?1:-1),C=this.playbackSpeed>=0?w<0:w>s;this.currentTime=Math.max(w,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let y=this.currentTime,S=i;if(d){const R=Math.min(this.currentTime,s)/a;let I=Math.floor(R),A=R%1;!A&&R>=1&&(A=1),A===1&&I--,I=Math.min(I,d+1),!!(I%2)&&(f==="reverse"?(A=1-A,h&&(A-=h/a)):f==="mirror"&&(S=r)),y=Me(0,1,A)*a}const _=C?{done:!1,value:u[0]}:S.next(y);o&&(_.value=o(_.value));let{done:b}=_;!C&&l!==null&&(b=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&b);return E&&p!==$n&&(_.value=_i(u,this.options,x,this.speed)),g&&g(_.value),E&&this.finish(),_}then(t,n){return this.finished.then(t,n)}get duration(){return me(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+me(t)}get time(){return me(this.currentTime)}set time(t){t=Ce(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(de.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=me(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Wl,startTime:n}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),this.options.onPlay?.();const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=n??i),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(de.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(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function uu(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const He=e=>e*180/Math.PI,On=e=>{const t=He(Math.atan2(e[1],e[0]));return zn(t)},cu={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:On,rotateZ:On,skewX:e=>He(Math.atan(e[1])),skewY:e=>He(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},zn=e=>(e=e%360,e<0&&(e+=360),e),ls=On,us=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),cs=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),du={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:us,scaleY:cs,scale:e=>(us(e)+cs(e))/2,rotateX:e=>zn(He(Math.atan2(e[6],e[5]))),rotateY:e=>zn(He(Math.atan2(-e[2],e[0]))),rotateZ:ls,rotate:ls,skewX:e=>He(Math.atan(e[4])),skewY:e=>He(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Bn(e){return e.includes("scale")?1:0}function Nn(e,t){if(!e||e==="none")return Bn(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=du,s=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=cu,s=a}if(!s)return Bn(t);const o=i[t],r=s[1].split(",").map(hu);return typeof o=="function"?o(r):r[o]}const fu=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Nn(n,t)};function hu(e){return parseFloat(e.trim())}const rt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],at=new Set(rt),ds=e=>e===ot||e===k,gu=new Set(["x","y","z"]),pu=rt.filter(e=>!gu.has(e));function mu(e){const t=[];return pu.forEach(n=>{const i=e.getValue(n);i!==void 0&&(t.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),t}const Ge={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Nn(t,"x"),y:(e,{transform:t})=>Nn(t,"y")};Ge.translateX=Ge.x;Ge.translateY=Ge.y;const We=new Set;let Hn=!1,Gn=!1,Wn=!1;function sr(){if(Gn){const e=Array.from(We).filter(i=>i.needsMeasurement),t=new Set(e.map(i=>i.element)),n=new Map;t.forEach(i=>{const s=mu(i);s.length&&(n.set(i,s),i.render())}),e.forEach(i=>i.measureInitialState()),t.forEach(i=>{i.render();const s=n.get(i);s&&s.forEach(([o,r])=>{i.getValue(o)?.set(r)})}),e.forEach(i=>i.measureEndState()),e.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}Gn=!1,Hn=!1,We.forEach(e=>e.complete(Wn)),We.clear()}function or(){We.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Gn=!0)})}function vu(){Wn=!0,or(),sr(),Wn=!1}class Pi{constructor(t,n,i,s,o,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=i,this.motionValue=s,this.element=o,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(We.add(this),Hn||(Hn=!0,q.read(or),q.resolveKeyframes(sr))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:i,motionValue:s}=this;if(t[0]===null){const o=s?.get(),r=t[t.length-1];if(o!==void 0)t[0]=o;else if(i&&n){const a=i.readValue(n,r);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=r),s&&o===void 0&&s.set(t[0])}uu(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),We.delete(this)}cancel(){this.state==="scheduled"&&(We.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const yu=e=>e.startsWith("--");function wu(e,t,n){yu(t)?e.style.setProperty(t,n):e.style[t]=n}const xu=fi(()=>window.ScrollTimeline!==void 0),Cu={};function Su(e,t){const n=fi(e);return()=>Cu[t]??n()}const rr=Su(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ht=([e,t,n,i])=>`cubic-bezier(${e}, ${t}, ${n}, ${i})`,fs={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ht([0,.65,.55,1]),circOut:ht([.55,0,1,.45]),backIn:ht([.31,.01,.66,-.59]),backOut:ht([.33,1.53,.69,.99])};function ar(e,t){if(e)return typeof e=="function"?rr()?tr(e,t):"ease-out":Wo(e)?ht(e):Array.isArray(e)?e.map(n=>ar(n,t)||fs.easeOut):fs[e]}function _u(e,t,n,{delay:i=0,duration:s=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const d=ar(a,s);Array.isArray(d)&&(u.easing=d);const f={delay:i,duration:s,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),e.animate(u,f)}function lr(e){return typeof e=="function"&&"applyToOptions"in e}function bu({type:e,...t}){return lr(e)&&rr()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Ru extends bi{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:i,keyframes:s,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!o,this.allowFlatten=r,this.options=t,Te(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=bu(t);this.animation=_u(n,i,s,c,o),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const u=_i(s,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):wu(n,i,u),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:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return me(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+me(t)}get time(){return me(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Ce(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&xu()?(this.animation.timeline=t,ve):n(this)}}const ur={anticipate:Bo,backInOut:zo,circInOut:Ho};function Pu(e){return e in ur}function Mu(e){typeof e.ease=="string"&&Pu(e.ease)&&(e.ease=ur[e.ease])}const hs=10;class Tu extends Ru{constructor(t){Mu(t),ir(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:i,onComplete:s,element:o,...r}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new Ri({...r,autoplay:!1}),l=Ce(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-hs).value,a.sample(l).value,hs),a.stop()}}const gs=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ke.test(e)||e==="0")&&!e.startsWith("url("));function Eu(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Vu(e,t,n,i){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],r=gs(s,t),a=gs(o,t);return st(r===a,`You are trying to animate ${t} from "${s}" to "${o}". "${r?o:s}" is not an animatable value.`,"value-not-animatable"),!r||!a?!1:Eu(e)||(n==="spring"||lr(n))&&i}function Un(e){e.duration=0,e.type="keyframes"}const Au=new Set(["opacity","clipPath","filter","transform"]),Du=fi(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Fu(e){const{motionValue:t,name:n,repeatDelay:i,repeatType:s,damping:o,type:r}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=t.owner.getProps();return Du()&&n&&Au.has(n)&&(n!=="transform"||!c)&&!l&&!i&&s!=="mirror"&&o!==0&&r!=="inertia"}const ku=40;class Iu extends bi{constructor({autoplay:t=!0,delay:n=0,type:i="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:r="loop",keyframes:a,name:l,motionValue:c,element:u,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=de.now();const f={autoplay:t,delay:n,type:i,repeat:s,repeatDelay:o,repeatType:r,name:l,motionValue:c,element:u,...d},h=u?.KeyframeResolver||Pi;this.keyframeResolver=new h(a,(p,g,x)=>this.onKeyframesResolved(p,g,f,!x),l,c,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,i,s){this.keyframeResolver=void 0;const{name:o,type:r,velocity:a,delay:l,isHandoff:c,onUpdate:u}=i;this.resolvedAt=de.now(),Vu(t,o,r,a)||((Ee.instantAnimations||!l)&&u?.(_i(t,i,n)),t[0]=t[t.length-1],Un(i),i.repeat=0);const f={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>ku?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:t},h=!c&&Fu(f)?new Tu({...f,element:f.motionValue.owner.current}):new Ri(f);h.finished.then(()=>this.notifyFinished()).catch(ve),this.pendingTimeline&&(this.stopTimeline=h.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=h}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),vu()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const Lu=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ju(e){const t=Lu.exec(e);if(!t)return[,];const[,n,i,s]=t;return[`--${n??i}`,s]}const $u=4;function cr(e,t,n=1){Te(n<=$u,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[i,s]=ju(e);if(!i)return;const o=window.getComputedStyle(t).getPropertyValue(i);if(o){const r=o.trim();return Do(r)?parseFloat(r):r}return yi(s)?cr(s,t,n+1):s}function Mi(e,t){return e?.[t]??e?.default??e}const dr=new Set(["width","height","top","left","right","bottom",...rt]),Ou={test:e=>e==="auto",parse:e=>e},fr=e=>t=>t.test(e),hr=[ot,k,be,Ae,El,Tl,Ou],ps=e=>hr.find(fr(e));function zu(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||ko(e):!0}const Bu=new Set(["brightness","contrast","saturate","opacity"]);function Nu(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[i]=n.match(wi)||[];if(!i)return e;const s=n.replace(i,"");let o=Bu.has(t)?1:0;return i!==n&&(o*=100),t+"("+o+s+")"}const Hu=/\b([a-z-]*)\(.*?\)/gu,Kn={...ke,getAnimatableNone:e=>{const t=e.match(Hu);return t?t.map(Nu).join(" "):e}},ms={...ot,transform:Math.round},Gu={rotate:Ae,rotateX:Ae,rotateY:Ae,rotateZ:Ae,scale:Dt,scaleX:Dt,scaleY:Dt,scaleZ:Dt,skew:Ae,skewX:Ae,skewY:Ae,distance:k,translateX:k,translateY:k,translateZ:k,x:k,y:k,z:k,perspective:k,transformPerspective:k,opacity:St,originX:is,originY:is,originZ:k},Ti={borderWidth:k,borderTopWidth:k,borderRightWidth:k,borderBottomWidth:k,borderLeftWidth:k,borderRadius:k,radius:k,borderTopLeftRadius:k,borderTopRightRadius:k,borderBottomRightRadius:k,borderBottomLeftRadius:k,width:k,maxWidth:k,height:k,maxHeight:k,top:k,right:k,bottom:k,left:k,padding:k,paddingTop:k,paddingRight:k,paddingBottom:k,paddingLeft:k,margin:k,marginTop:k,marginRight:k,marginBottom:k,marginLeft:k,backgroundPositionX:k,backgroundPositionY:k,...Gu,zIndex:ms,fillOpacity:St,strokeOpacity:St,numOctaves:ms},Wu={...Ti,color:Q,backgroundColor:Q,outlineColor:Q,fill:Q,stroke:Q,borderColor:Q,borderTopColor:Q,borderRightColor:Q,borderBottomColor:Q,borderLeftColor:Q,filter:Kn,WebkitFilter:Kn},gr=e=>Wu[e];function pr(e,t){let n=gr(e);return n!==Kn&&(n=ke),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Uu=new Set(["auto","none","0"]);function Ku(e,t,n){let i=0,s;for(;i<e.length&&!s;){const o=e[i];typeof o=="string"&&!Uu.has(o)&&_t(o).values.length&&(s=e[i]),i++}if(s&&n)for(const o of t)e[o]=pr(n,s)}class qu extends Pi{constructor(t,n,i,s,o){super(t,n,i,s,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:i}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),yi(c))){const u=cr(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!dr.has(i)||t.length!==2)return;const[s,o]=t,r=ps(s),a=ps(o);if(r!==a)if(ds(r)&&ds(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else Ge[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,i=[];for(let s=0;s<t.length;s++)(t[s]===null||zu(t[s]))&&i.push(s);i.length&&Ku(t,i,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:i}=this;if(!t||!t.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ge[i](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(i,s).jump(s,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:i}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const o=i.length-1,r=i[o];i[o]=Ge[n](t.measureViewportBox(),window.getComputedStyle(t.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,l])=>{t.getValue(a).set(l)}),this.resolveNoneKeyframes()}}function Xu(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let i=document;const s=n?.[e]??i.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}const mr=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function vr(e){return Fo(e)&&"offsetHeight"in e}const vs=30,Yu=e=>!isNaN(parseFloat(e));class Zu{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{const s=de.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=de.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Yu(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&gi(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new hi);const i=this.events[t].add(n);return t==="change"?()=>{i(),q.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,i){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=de.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>vs)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,vs);return Io(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(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 tt(e,t){return new Zu(e,t)}const{schedule:Ei}=Uo(queueMicrotask,!1),xe={x:!1,y:!1};function yr(){return xe.x||xe.y}function Ju(e){return e==="x"||e==="y"?xe[e]?null:(xe[e]=!0,()=>{xe[e]=!1}):xe.x||xe.y?null:(xe.x=xe.y=!0,()=>{xe.x=xe.y=!1})}function wr(e,t){const n=Xu(e),i=new AbortController,s={passive:!0,...t,signal:i.signal};return[n,s,()=>i.abort()]}function ys(e){return!(e.pointerType==="touch"||yr())}function Qu(e,t,n={}){const[i,s,o]=wr(e,n),r=a=>{if(!ys(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const u=d=>{ys(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,s)};return i.forEach(a=>{a.addEventListener("pointerenter",r,s)}),o}const xr=(e,t)=>t?e===t?!0:xr(e,t.parentElement):!1,Vi=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,ec=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function tc(e){return ec.has(e.tagName)||e.tabIndex!==-1}const zt=new WeakSet;function ws(e){return t=>{t.key==="Enter"&&e(t)}}function mn(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const nc=(e,t)=>{const n=e.currentTarget;if(!n)return;const i=ws(()=>{if(zt.has(n))return;mn(n,"down");const s=ws(()=>{mn(n,"up")}),o=()=>mn(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",i,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),t)};function xs(e){return Vi(e)&&!yr()}function ic(e,t,n={}){const[i,s,o]=wr(e,n),r=a=>{const l=a.currentTarget;if(!xs(a))return;zt.add(l);const c=t(l,a),u=(h,p)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),zt.has(l)&&zt.delete(l),xs(h)&&typeof c=="function"&&c(h,{success:p})},d=h=>{u(h,l===window||l===document||n.useGlobalTarget||xr(l,h.target))},f=h=>{u(h,!1)};window.addEventListener("pointerup",d,s),window.addEventListener("pointercancel",f,s)};return i.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,s),vr(a)&&(a.addEventListener("focus",c=>nc(c,s)),!tc(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function Cr(e){return Fo(e)&&"ownerSVGElement"in e}function sc(e){return Cr(e)&&e.tagName==="svg"}const le=e=>!!(e&&e.getVelocity),oc=[...hr,Q,ke],rc=e=>oc.find(fr(e)),Ai=v.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Cs(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ac(...e){return t=>{let n=!1;const i=e.map(s=>{const o=Cs(s,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let s=0;s<i.length;s++){const o=i[s];typeof o=="function"?o():Cs(e[s],null)}}}}function lc(...e){return T.useCallback(ac(...e),e)}class uc extends T.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const i=n.offsetParent,s=vr(i)&&i.offsetWidth||0,o=this.props.sizeRef.current;o.height=n.offsetHeight||0,o.width=n.offsetWidth||0,o.top=n.offsetTop,o.left=n.offsetLeft,o.right=s-o.width-o.left}return null}componentDidUpdate(){}render(){return this.props.children}}function cc({children:e,isPresent:t,anchorX:n,root:i}){const s=v.useId(),o=v.useRef(null),r=v.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=v.useContext(Ai),l=lc(o,e?.ref);return v.useInsertionEffect(()=>{const{width:c,height:u,top:d,left:f,right:h}=r.current;if(t||!o.current||!c||!u)return;const p=n==="left"?`left: ${f}`:`right: ${h}`;o.current.dataset.motionPopId=s;const g=document.createElement("style");a&&(g.nonce=a);const x=i??document.head;return x.appendChild(g),g.sheet&&g.sheet.insertRule(`
6
- [data-motion-pop-id="${s}"] {
7
- position: absolute !important;
8
- width: ${c}px !important;
9
- height: ${u}px !important;
10
- ${p}px !important;
11
- top: ${d}px !important;
12
- }
13
- `),()=>{x.contains(g)&&x.removeChild(g)}},[t]),m.jsx(uc,{isPresent:t,childRef:o,sizeRef:r,children:T.cloneElement(e,{ref:l})})}const dc=({children:e,initial:t,isPresent:n,onExitComplete:i,custom:s,presenceAffectsLayout:o,mode:r,anchorX:a,root:l})=>{const c=li(fc),u=v.useId();let d=!0,f=v.useMemo(()=>(d=!1,{id:u,initial:t,isPresent:n,custom:s,onExitComplete:h=>{c.set(h,!0);for(const p of c.values())if(!p)return;i&&i()},register:h=>(c.set(h,!1),()=>c.delete(h))}),[n,c,i]);return o&&d&&(f={...f}),v.useMemo(()=>{c.forEach((h,p)=>c.set(p,!1))},[n]),T.useEffect(()=>{!n&&!c.size&&i&&i()},[n]),r==="popLayout"&&(e=m.jsx(cc,{isPresent:n,anchorX:a,root:l,children:e})),m.jsx(Jt.Provider,{value:f,children:e})};function fc(){return new Map}function Sr(e=!0){const t=v.useContext(Jt);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:i,register:s}=t,o=v.useId();v.useEffect(()=>{if(e)return s(o)},[e]);const r=v.useCallback(()=>e&&i&&i(o),[o,i,e]);return!n&&i?[!1,r]:[!0]}const Ft=e=>e.key||"";function Ss(e){const t=[];return v.Children.forEach(e,n=>{v.isValidElement(n)&&t.push(n)}),t}const hc=({children:e,custom:t,initial:n=!0,onExitComplete:i,presenceAffectsLayout:s=!0,mode:o="sync",propagate:r=!1,anchorX:a="left",root:l})=>{const[c,u]=Sr(r),d=v.useMemo(()=>Ss(e),[e]),f=r&&!c?[]:d.map(Ft),h=v.useRef(!0),p=v.useRef(d),g=li(()=>new Map),[x,w]=v.useState(d),[C,y]=v.useState(d);Ao(()=>{h.current=!1,p.current=d;for(let b=0;b<C.length;b++){const E=Ft(C[b]);f.includes(E)?g.delete(E):g.get(E)!==!0&&g.set(E,!1)}},[C,f.length,f.join("-")]);const S=[];if(d!==x){let b=[...d];for(let E=0;E<C.length;E++){const R=C[E],I=Ft(R);f.includes(I)||(b.splice(E,0,R),S.push(R))}return o==="wait"&&S.length&&(b=S),y(Ss(b)),w(d),null}process.env.NODE_ENV!=="production"&&o==="wait"&&C.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:_}=v.useContext(ai);return m.jsx(m.Fragment,{children:C.map(b=>{const E=Ft(b),R=r&&!c?!1:d===C||f.includes(E),I=()=>{if(g.has(E))g.set(E,!0);else return;let A=!0;g.forEach(z=>{z||(A=!1)}),A&&(_?.(),y(p.current),r&&u?.(),i&&i())};return m.jsx(dc,{isPresent:R,initial:!h.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:o,root:l,onExitComplete:R?void 0:I,anchorX:a,children:b},E)})})},_r=v.createContext({strict:!1}),_s={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"]},nt={};for(const e in _s)nt[e]={isEnabled:t=>_s[e].some(n=>!!t[n])};function gc(e){for(const t in e)nt[t]={...nt[t],...e[t]}}const pc=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 Kt(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||pc.has(e)}let br=e=>!Kt(e);function mc(e){typeof e=="function"&&(br=t=>t.startsWith("on")?!Kt(t):e(t))}try{mc(require("@emotion/is-prop-valid").default)}catch{}function vc(e,t,n){const i={};for(const s in e)s==="values"&&typeof e.values=="object"||(br(s)||n===!0&&Kt(s)||!t&&!Kt(s)||e.draggable&&s.startsWith("onDrag"))&&(i[s]=e[s]);return i}const Qt=v.createContext({});function en(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function bt(e){return typeof e=="string"||Array.isArray(e)}const Di=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Fi=["initial",...Di];function tn(e){return en(e.animate)||Fi.some(t=>bt(e[t]))}function Rr(e){return!!(tn(e)||e.variants)}function yc(e,t){if(tn(e)){const{initial:n,animate:i}=e;return{initial:n===!1||bt(n)?n:void 0,animate:bt(i)?i:void 0}}return e.inherit!==!1?t:{}}function wc(e){const{initial:t,animate:n}=yc(e,v.useContext(Qt));return v.useMemo(()=>({initial:t,animate:n}),[bs(t),bs(n)])}function bs(e){return Array.isArray(e)?e.join(" "):e}const Rt={};function xc(e){for(const t in e)Rt[t]=e[t],vi(t)&&(Rt[t].isCSSVariable=!0)}function Pr(e,{layout:t,layoutId:n}){return at.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Rt[e]||e==="opacity")}const Cc={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Sc=rt.length;function _c(e,t,n){let i="",s=!0;for(let o=0;o<Sc;o++){const r=rt[o],a=e[r];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(r.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=mr(a,Ti[r]);if(!l){s=!1;const u=Cc[r]||r;i+=`${u}(${c}) `}n&&(t[r]=c)}}return i=i.trim(),n?i=n(t,s?"":i):s&&(i="none"),i}function ki(e,t,n){const{style:i,vars:s,transformOrigin:o}=e;let r=!1,a=!1;for(const l in t){const c=t[l];if(at.has(l)){r=!0;continue}else if(vi(l)){s[l]=c;continue}else{const u=mr(c,Ti[l]);l.startsWith("origin")?(a=!0,o[l]=u):i[l]=u}}if(t.transform||(r||n?i.transform=_c(t,e.transform,n):i.transform&&(i.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=o;i.transformOrigin=`${l} ${c} ${u}`}}const Ii=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Mr(e,t,n){for(const i in t)!le(t[i])&&!Pr(i,n)&&(e[i]=t[i])}function bc({transformTemplate:e},t){return v.useMemo(()=>{const n=Ii();return ki(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Rc(e,t){const n=e.style||{},i={};return Mr(i,n,e),Object.assign(i,bc(e,t)),i}function Pc(e,t){const n={},i=Rc(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=i,n}const Mc={offset:"stroke-dashoffset",array:"stroke-dasharray"},Tc={offset:"strokeDashoffset",array:"strokeDasharray"};function Ec(e,t,n=1,i=0,s=!0){e.pathLength=1;const o=s?Mc:Tc;e[o.offset]=k.transform(-i);const r=k.transform(t),a=k.transform(n);e[o.array]=`${r} ${a}`}function Tr(e,{attrX:t,attrY:n,attrScale:i,pathLength:s,pathSpacing:o=1,pathOffset:r=0,...a},l,c,u){if(ki(e,a,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??"fill-box",delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),i!==void 0&&(d.scale=i),s!==void 0&&Ec(d,s,o,r,!1)}const Er=()=>({...Ii(),attrs:{}}),Vr=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Vc(e,t,n,i){const s=v.useMemo(()=>{const o=Er();return Tr(o,t,Vr(i),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};Mr(o,e.style,e),s.style={...o,...s.style}}return s}const Ac=["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 Li(e){return typeof e!="string"||e.includes("-")?!1:!!(Ac.indexOf(e)>-1||/[A-Z]/u.test(e))}function Dc(e,t,n,{latestValues:i},s,o=!1){const a=(Li(e)?Vc:Pc)(t,i,s,e),l=vc(t,typeof e=="string",o),c=e!==v.Fragment?{...l,...a,ref:n}:{},{children:u}=t,d=v.useMemo(()=>le(u)?u.get():u,[u]);return v.createElement(e,{...c,children:d})}function Rs(e){const t=[{},{}];return e?.values.forEach((n,i)=>{t[0][i]=n.get(),t[1][i]=n.getVelocity()}),t}function ji(e,t,n,i){if(typeof t=="function"){const[s,o]=Rs(i);t=t(n!==void 0?n:e.custom,s,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,o]=Rs(i);t=t(n!==void 0?n:e.custom,s,o)}return t}function Bt(e){return le(e)?e.get():e}function Fc({scrapeMotionValuesFromProps:e,createRenderState:t},n,i,s){return{latestValues:kc(n,i,s,e),renderState:t()}}function kc(e,t,n,i){const s={},o=i(e,{});for(const f in o)s[f]=Bt(o[f]);let{initial:r,animate:a}=e;const l=tn(e),c=Rr(e);t&&c&&!l&&e.inherit!==!1&&(r===void 0&&(r=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||r===!1;const d=u?a:r;if(d&&typeof d!="boolean"&&!en(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){const p=ji(e,f[h]);if(p){const{transitionEnd:g,transition:x,...w}=p;for(const C in w){let y=w[C];if(Array.isArray(y)){const S=u?y.length-1:0;y=y[S]}y!==null&&(s[C]=y)}for(const C in g)s[C]=g[C]}}}return s}const Ar=e=>(t,n)=>{const i=v.useContext(Qt),s=v.useContext(Jt),o=()=>Fc(e,t,i,s);return n?o():li(o)};function $i(e,t,n){const{style:i}=e,s={};for(const o in i)(le(i[o])||t.style&&le(t.style[o])||Pr(o,e)||n?.getValue(o)?.liveStyle!==void 0)&&(s[o]=i[o]);return s}const Ic=Ar({scrapeMotionValuesFromProps:$i,createRenderState:Ii});function Dr(e,t,n){const i=$i(e,t,n);for(const s in e)if(le(e[s])||le(t[s])){const o=rt.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;i[o]=e[s]}return i}const Lc=Ar({scrapeMotionValuesFromProps:Dr,createRenderState:Er}),jc=Symbol.for("motionComponentSymbol");function Ye(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function $c(e,t,n){return v.useCallback(i=>{i&&e.onMount&&e.onMount(i),t&&(i?t.mount(i):t.unmount()),n&&(typeof n=="function"?n(i):Ye(n)&&(n.current=i))},[t])}const Oi=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Oc="framerAppearId",Fr="data-"+Oi(Oc),kr=v.createContext({});function zc(e,t,n,i,s){const{visualElement:o}=v.useContext(Qt),r=v.useContext(_r),a=v.useContext(Jt),l=v.useContext(Ai).reducedMotion,c=v.useRef(null);i=i||r.renderer,!c.current&&i&&(c.current=i(e,{visualState:t,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,d=v.useContext(kr);u&&!u.projection&&s&&(u.type==="html"||u.type==="svg")&&Bc(c.current,n,s,d);const f=v.useRef(!1);v.useInsertionEffect(()=>{u&&f.current&&u.update(n,a)});const h=n[Fr],p=v.useRef(!!h&&!window.MotionHandoffIsComplete?.(h)&&window.MotionHasOptimisedAnimation?.(h));return Ao(()=>{u&&(f.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),u.scheduleRenderMicrotask(),p.current&&u.animationState&&u.animationState.animateChanges())}),v.useEffect(()=>{u&&(!p.current&&u.animationState&&u.animationState.animateChanges(),p.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(h)}),p.current=!1),u.enteringChildren=void 0)}),u}function Bc(e,t,n,i){const{layoutId:s,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Ir(e.parent)),e.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:!!r||a&&Ye(a),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:i,crossfade:u,layoutScroll:l,layoutRoot:c})}function Ir(e){if(e)return e.options.allowProjection!==!1?e.projection:Ir(e.parent)}function vn(e,{forwardMotionProps:t=!1}={},n,i){n&&gc(n);const s=Li(e)?Lc:Ic;function o(a,l){let c;const u={...v.useContext(Ai),...a,layoutId:Nc(a)},{isStatic:d}=u,f=wc(a),h=s(a,d);if(!d&&ui){Hc(u,n);const p=Gc(u);c=p.MeasureLayout,f.visualElement=zc(e,h,u,i,p.ProjectionNode)}return m.jsxs(Qt.Provider,{value:f,children:[c&&f.visualElement?m.jsx(c,{visualElement:f.visualElement,...u}):null,Dc(e,a,$c(h,f.visualElement,l),h,d,t)]})}o.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const r=v.forwardRef(o);return r[jc]=e,r}function Nc({layoutId:e}){const t=v.useContext(ai).id;return t&&e!==void 0?t+"-"+e:e}function Hc(e,t){const n=v.useContext(_r).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const i="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?st(!1,i,"lazy-strict-mode"):Te(!1,i,"lazy-strict-mode")}}function Gc(e){const{drag:t,layout:n}=nt;if(!t&&!n)return{};const i={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function Wc(e,t){if(typeof Proxy>"u")return vn;const n=new Map,i=(o,r)=>vn(o,r,e,t),s=(o,r)=>(process.env.NODE_ENV!=="production"&&gi(!1,"motion() is deprecated. Use motion.create() instead."),i(o,r));return new Proxy(s,{get:(o,r)=>r==="create"?i:(n.has(r)||n.set(r,vn(r,void 0,e,t)),n.get(r))})}function Lr({top:e,left:t,right:n,bottom:i}){return{x:{min:t,max:n},y:{min:e,max:i}}}function Uc({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Kc(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),i=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function yn(e){return e===void 0||e===1}function qn({scale:e,scaleX:t,scaleY:n}){return!yn(e)||!yn(t)||!yn(n)}function ze(e){return qn(e)||jr(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function jr(e){return Ps(e.x)||Ps(e.y)}function Ps(e){return e&&e!=="0%"}function qt(e,t,n){const i=e-n,s=t*i;return n+s}function Ms(e,t,n,i,s){return s!==void 0&&(e=qt(e,s,i)),qt(e,n,i)+t}function Xn(e,t=0,n=1,i,s){e.min=Ms(e.min,t,n,i,s),e.max=Ms(e.max,t,n,i,s)}function $r(e,{x:t,y:n}){Xn(e.x,t.translate,t.scale,t.originPoint),Xn(e.y,n.translate,n.scale,n.originPoint)}const Ts=.999999999999,Es=1.0000000000001;function qc(e,t,n,i=!1){const s=n.length;if(!s)return;t.x=t.y=1;let o,r;for(let a=0;a<s;a++){o=n[a],r=o.projectionDelta;const{visualElement:l}=o.options;l&&l.props.style&&l.props.style.display==="contents"||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Je(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(t.x*=r.x.scale,t.y*=r.y.scale,$r(e,r)),i&&ze(o.latestValues)&&Je(e,o.latestValues))}t.x<Es&&t.x>Ts&&(t.x=1),t.y<Es&&t.y>Ts&&(t.y=1)}function Ze(e,t){e.min=e.min+t,e.max=e.max+t}function Vs(e,t,n,i,s=.5){const o=Y(e.min,e.max,s);Xn(e,t,n,o,i)}function Je(e,t){Vs(e.x,t.x,t.scaleX,t.scale,t.originX),Vs(e.y,t.y,t.scaleY,t.scale,t.originY)}function Or(e,t){return Lr(Kc(e.getBoundingClientRect(),t))}function Xc(e,t,n){const i=Or(e,n),{scroll:s}=t;return s&&(Ze(i.x,s.offset.x),Ze(i.y,s.offset.y)),i}const As=()=>({translate:0,scale:1,origin:0,originPoint:0}),Qe=()=>({x:As(),y:As()}),Ds=()=>({min:0,max:0}),Z=()=>({x:Ds(),y:Ds()}),Yn={current:null},zr={current:!1};function Yc(){if(zr.current=!0,!!ui)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Yn.current=e.matches;e.addEventListener("change",t),t()}else Yn.current=!1}const Zc=new WeakMap;function Jc(e,t,n){for(const i in t){const s=t[i],o=n[i];if(le(s))e.addValue(i,s);else if(le(o))e.addValue(i,tt(s,{owner:e}));else if(o!==s)if(e.hasValue(i)){const r=e.getValue(i);r.liveStyle===!0?r.jump(s):r.hasAnimated||r.set(s)}else{const r=e.getStaticValue(i);e.addValue(i,tt(r!==void 0?r:s,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const Fs=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Qc{scrapeMotionValuesFromProps(t,n,i){return{}}constructor({parent:t,props:n,presenceContext:i,reducedMotionConfig:s,blockInitialAnimation:o,visualState:r},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Pi,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 f=de.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,q.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=tn(n),this.isVariantNode=Rr(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const h=d[f];l[f]!==void 0&&le(h)&&h.set(l[f])}}mount(t){this.current=t,Zc.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,i)=>this.bindToMotionValue(i,n)),zr.current||Yc(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Yn.current,process.env.NODE_ENV!=="production"&&gi(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(),Fe(this.notifyUpdate),Fe(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const i=at.has(t);i&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",r=>{this.latestValues[t]=r,this.props.onUpdate&&q.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in nt){const n=nt[t];if(!n)continue;const{isEnabled:i,Feature:s}=n;if(!this.features[t]&&s&&i(this.props)&&(this.features[t]=new s(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Z()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let i=0;i<Fs.length;i++){const s=Fs[i];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const o="on"+s,r=t[o];r&&(this.propEventSubscriptions[s]=this.on(s,r))}this.prevMotionValues=Jc(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]: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(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const i=this.values.get(t);n!==i&&(i&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let i=this.values.get(t);return i===void 0&&n!==void 0&&(i=tt(n===null?void 0:n,{owner:this}),this.addValue(t,i)),i}readValue(t,n){let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(Do(i)||ko(i))?i=parseFloat(i):!rc(i)&&ke.test(n)&&(i=pr(t,n)),this.setBaseTarget(t,le(i)?i.get():i)),le(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let i;if(typeof n=="string"||typeof n=="object"){const o=ji(this.props,n,this.presenceContext?.custom);o&&(i=o[t])}if(n&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!le(s)?s:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new hi),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Ei.render(this.render)}}class Br extends Qc{constructor(){super(...arguments),this.KeyframeResolver=qu}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:i}){delete n[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;le(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Nr(e,{style:t,vars:n},i,s){const o=e.style;let r;for(r in t)o[r]=t[r];s?.applyProjectionStyles(o,i);for(r in n)o.setProperty(r,n[r])}function ed(e){return window.getComputedStyle(e)}class td extends Br{constructor(){super(...arguments),this.type="html",this.renderInstance=Nr}readValueFromInstance(t,n){if(at.has(n))return this.projection?.isProjecting?Bn(n):fu(t,n);{const i=ed(t),s=(vi(n)?i.getPropertyValue(n):i[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Or(t,n)}build(t,n,i){ki(t,n,i.transformTemplate)}scrapeMotionValuesFromProps(t,n,i){return $i(t,n,i)}}const Hr=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 nd(e,t,n,i){Nr(e,t,void 0,i);for(const s in t.attrs)e.setAttribute(Hr.has(s)?s:Oi(s),t.attrs[s])}class id extends Br{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Z}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(at.has(n)){const i=gr(n);return i&&i.default||0}return n=Hr.has(n)?n:Oi(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,i){return Dr(t,n,i)}build(t,n,i){Tr(t,n,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,n,i,s){nd(t,n,i,s)}mount(t){this.isSVGTag=Vr(t.tagName),super.mount(t)}}const sd=(e,t)=>Li(e)?new id(t):new td(t,{allowProjection:e!==v.Fragment});function et(e,t,n){const i=e.getProps();return ji(i,t,n!==void 0?n:i.custom,e)}const Zn=e=>Array.isArray(e);function od(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,tt(n))}function rd(e){return Zn(e)?e[e.length-1]||0:e}function ad(e,t){const n=et(e,t);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const r in o){const a=rd(o[r]);od(e,r,a)}}function ld(e){return!!(le(e)&&e.add)}function Jn(e,t){const n=e.getValue("willChange");if(ld(n))return n.add(t);if(!n&&Ee.WillChange){const i=new Ee.WillChange("auto");e.addValue("willChange",i),i.add(t)}}function Gr(e){return e.props[Fr]}const ud=e=>e!==null;function cd(e,{repeat:t,repeatType:n="loop"},i){const s=e.filter(ud),o=t&&n!=="loop"&&t%2===1?0:s.length-1;return s[o]}const dd={type:"spring",stiffness:500,damping:25,restSpeed:10},fd=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),hd={type:"keyframes",duration:.8},gd={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},pd=(e,{keyframes:t})=>t.length>2?hd:at.has(e)?e.startsWith("scale")?fd(t[1]):dd:gd;function md({when:e,delay:t,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const zi=(e,t,n,i={},s,o)=>r=>{const a=Mi(i,e)||{},l=a.delay||i.delay||0;let{elapsed:c=0}=i;c=c-Ce(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:o?void 0:s};md(a)||Object.assign(u,pd(e,u)),u.duration&&(u.duration=Ce(u.duration)),u.repeatDelay&&(u.repeatDelay=Ce(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Un(u),u.delay===0&&(d=!0)),(Ee.instantAnimations||Ee.skipAnimations)&&(d=!0,Un(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,d&&!o&&t.get()!==void 0){const f=cd(u.keyframes,a);if(f!==void 0){q.update(()=>{u.onUpdate(f),u.onComplete()});return}}return a.isSync?new Ri(u):new Iu(u)};function vd({protectedKeys:e,needsAnimating:t},n){const i=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,i}function Wr(e,t,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:r,...a}=t;i&&(o=i);const l=[],c=s&&e.animationState&&e.animationState.getState()[s];for(const u in a){const d=e.getValue(u,e.latestValues[u]??null),f=a[u];if(f===void 0||c&&vd(c,u))continue;const h={delay:n,...Mi(o||{},u)},p=d.get();if(p!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===p&&!h.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const w=Gr(e);if(w){const C=window.MotionHandoffAnimation(w,u,q);C!==null&&(h.startTime=C,g=!0)}}Jn(e,u),d.start(zi(u,d,f,e.shouldReduceMotion&&dr.has(u)?{type:!1}:h,e,g));const x=d.animation;x&&l.push(x)}return r&&Promise.all(l).then(()=>{q.update(()=>{r&&ad(e,r)})}),l}function Ur(e,t,n,i=0,s=1){const o=Array.from(e).sort((c,u)=>c.sortNodePosition(u)).indexOf(t),r=e.size,a=(r-1)*i;return typeof n=="function"?n(o,r):s===1?o*i:a-o*i}function Qn(e,t,n={}){const i=et(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Promise.all(Wr(e,i,n)):()=>Promise.resolve(),r=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:d}=s;return yd(e,t,l,c,u,d,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[l,c]=a==="beforeChildren"?[o,r]:[r,o];return l().then(()=>c())}else return Promise.all([o(),r(n.delay)])}function yd(e,t,n=0,i=0,s=0,o=1,r){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(Qn(l,t,{...r,delay:n+(typeof i=="function"?0:i)+Ur(e.variantChildren,l,i,s,o)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function wd(e,t,n={}){e.notify("AnimationStart",t);let i;if(Array.isArray(t)){const s=t.map(o=>Qn(e,o,n));i=Promise.all(s)}else if(typeof t=="string")i=Qn(e,t,n);else{const s=typeof t=="function"?et(e,t,n.custom):t;i=Promise.all(Wr(e,s,n))}return i.then(()=>{e.notify("AnimationComplete",t)})}function Kr(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let i=0;i<n;i++)if(t[i]!==e[i])return!1;return!0}const xd=Fi.length;function qr(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?qr(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<xd;n++){const i=Fi[n],s=e.props[i];(bt(s)||s===!1)&&(t[i]=s)}return t}const Cd=[...Di].reverse(),Sd=Di.length;function _d(e){return t=>Promise.all(t.map(({animation:n,options:i})=>wd(e,n,i)))}function bd(e){let t=_d(e),n=ks(),i=!0;const s=l=>(c,u)=>{const d=et(e,u,l==="exit"?e.presenceContext?.custom:void 0);if(d){const{transition:f,transitionEnd:h,...p}=d;c={...c,...p,...h}}return c};function o(l){t=l(e)}function r(l){const{props:c}=e,u=qr(e.parent)||{},d=[],f=new Set;let h={},p=1/0;for(let x=0;x<Sd;x++){const w=Cd[x],C=n[w],y=c[w]!==void 0?c[w]:u[w],S=bt(y),_=w===l?C.isActive:null;_===!1&&(p=x);let b=y===u[w]&&y!==c[w]&&S;if(b&&i&&e.manuallyAnimateOnMount&&(b=!1),C.protectedKeys={...h},!C.isActive&&_===null||!y&&!C.prevProp||en(y)||typeof y=="boolean")continue;const E=Rd(C.prevProp,y);let R=E||w===l&&C.isActive&&!b&&S||x>p&&S,I=!1;const A=Array.isArray(y)?y:[y];let z=A.reduce(s(w),{});_===!1&&(z={});const{prevResolvedValues:J={}}=C,N={...J,...z},ee=$=>{R=!0,f.has($)&&(I=!0,f.delete($)),C.needsAnimating[$]=!0;const K=e.getValue($);K&&(K.liveStyle=!1)};for(const $ in N){const K=z[$],ne=J[$];if(h.hasOwnProperty($))continue;let j=!1;Zn(K)&&Zn(ne)?j=!Kr(K,ne):j=K!==ne,j?K!=null?ee($):f.add($):K!==void 0&&f.has($)?ee($):C.protectedKeys[$]=!0}C.prevProp=y,C.prevResolvedValues=z,C.isActive&&(h={...h,...z}),i&&e.blockInitialAnimation&&(R=!1);const te=b&&E;R&&(!te||I)&&d.push(...A.map($=>{const K={type:w};if(typeof $=="string"&&i&&!te&&e.manuallyAnimateOnMount&&e.parent){const{parent:ne}=e,j=et(ne,$);if(ne.enteringChildren&&j){const{delayChildren:H}=j.transition||{};K.delay=Ur(ne.enteringChildren,e,H)}}return{animation:$,options:K}}))}if(f.size){const x={};if(typeof c.initial!="boolean"){const w=et(e,Array.isArray(c.initial)?c.initial[0]:c.initial);w&&w.transition&&(x.transition=w.transition)}f.forEach(w=>{const C=e.getBaseTarget(w),y=e.getValue(w);y&&(y.liveStyle=!0),x[w]=C??null}),d.push({animation:x})}let g=!!d.length;return i&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(g=!1),i=!1,g?t(d):Promise.resolve()}function a(l,c){if(n[l].isActive===c)return Promise.resolve();e.variantChildren?.forEach(d=>d.animationState?.setActive(l,c)),n[l].isActive=c;const u=r(l);for(const d in n)n[d].protectedKeys={};return u}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=ks(),i=!0}}}function Rd(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Kr(t,e):!1}function Oe(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ks(){return{animate:Oe(!0),whileInView:Oe(),whileHover:Oe(),whileTap:Oe(),whileDrag:Oe(),whileFocus:Oe(),exit:Oe()}}class Le{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Pd extends Le{constructor(t){super(t),t.animationState||(t.animationState=bd(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();en(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let Md=0;class Td extends Le{constructor(){super(...arguments),this.id=Md++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const Ed={animation:{Feature:Pd},exit:{Feature:Td}};function Pt(e,t,n,i={passive:!0}){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n)}function Vt(e){return{point:{x:e.pageX,y:e.pageY}}}const Vd=e=>t=>Vi(t)&&e(t,Vt(t));function pt(e,t,n,i){return Pt(e,t,Vd(n),i)}const Xr=1e-4,Ad=1-Xr,Dd=1+Xr,Yr=.01,Fd=0-Yr,kd=0+Yr;function ue(e){return e.max-e.min}function Id(e,t,n){return Math.abs(e-t)<=n}function Is(e,t,n,i=.5){e.origin=i,e.originPoint=Y(t.min,t.max,e.origin),e.scale=ue(n)/ue(t),e.translate=Y(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Ad&&e.scale<=Dd||isNaN(e.scale))&&(e.scale=1),(e.translate>=Fd&&e.translate<=kd||isNaN(e.translate))&&(e.translate=0)}function mt(e,t,n,i){Is(e.x,t.x,n.x,i?i.originX:void 0),Is(e.y,t.y,n.y,i?i.originY:void 0)}function Ls(e,t,n){e.min=n.min+t.min,e.max=e.min+ue(t)}function Ld(e,t,n){Ls(e.x,t.x,n.x),Ls(e.y,t.y,n.y)}function js(e,t,n){e.min=t.min-n.min,e.max=e.min+ue(t)}function vt(e,t,n){js(e.x,t.x,n.x),js(e.y,t.y,n.y)}function pe(e){return[e("x"),e("y")]}const Zr=({current:e})=>e?e.ownerDocument.defaultView:null,$s=(e,t)=>Math.abs(e-t);function jd(e,t){const n=$s(e.x,t.x),i=$s(e.y,t.y);return Math.sqrt(n**2+i**2)}class Jr{constructor(t,n,{transformPagePoint:i,contextWindow:s=window,dragSnapToOrigin:o=!1,distanceThreshold:r=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 f=xn(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,p=jd(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!h&&!p)return;const{point:g}=f,{timestamp:x}=re;this.history.push({...g,timestamp:x});const{onStart:w,onMove:C}=this.handlers;h||(w&&w(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),C&&C(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=wn(h,this.transformPagePoint),q.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:p,onSessionEnd:g,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=xn(f.type==="pointercancel"?this.lastMoveEventInfo:wn(h,this.transformPagePoint),this.history);this.startEvent&&p&&p(f,w),g&&g(f,w)},!Vi(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=i,this.distanceThreshold=r,this.contextWindow=s||window;const a=Vt(t),l=wn(a,this.transformPagePoint),{point:c}=l,{timestamp:u}=re;this.history=[{...c,timestamp:u}];const{onSessionStart:d}=n;d&&d(t,xn(l,this.history)),this.removeListeners=Mt(pt(this.contextWindow,"pointermove",this.handlePointerMove),pt(this.contextWindow,"pointerup",this.handlePointerUp),pt(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Fe(this.updatePoint)}}function wn(e,t){return t?{point:t(e.point)}:e}function Os(e,t){return{x:e.x-t.x,y:e.y-t.y}}function xn({point:e},t){return{point:e,delta:Os(e,Qr(t)),offset:Os(e,$d(t)),velocity:Od(t,.1)}}function $d(e){return e[0]}function Qr(e){return e[e.length-1]}function Od(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,i=null;const s=Qr(e);for(;n>=0&&(i=e[n],!(s.timestamp-i.timestamp>Ce(t)));)n--;if(!i)return{x:0,y:0};const o=me(s.timestamp-i.timestamp);if(o===0)return{x:0,y:0};const r={x:(s.x-i.x)/o,y:(s.y-i.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function zd(e,{min:t,max:n},i){return t!==void 0&&e<t?e=i?Y(t,e,i.min):Math.max(e,t):n!==void 0&&e>n&&(e=i?Y(n,e,i.max):Math.min(e,n)),e}function zs(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function Bd(e,{top:t,left:n,bottom:i,right:s}){return{x:zs(e.x,n,s),y:zs(e.y,t,i)}}function Bs(e,t){let n=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,i]=[i,n]),{min:n,max:i}}function Nd(e,t){return{x:Bs(e.x,t.x),y:Bs(e.y,t.y)}}function Hd(e,t){let n=.5;const i=ue(e),s=ue(t);return s>i?n=Ct(t.min,t.max-i,e.min):i>s&&(n=Ct(e.min,e.max-s,t.min)),Me(0,1,n)}function Gd(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const ei=.35;function Wd(e=ei){return e===!1?e=0:e===!0&&(e=ei),{x:Ns(e,"left","right"),y:Ns(e,"top","bottom")}}function Ns(e,t,n){return{min:Hs(e,t),max:Hs(e,n)}}function Hs(e,t){return typeof e=="number"?e:e[t]||0}const Ud=new WeakMap;class Kd{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Z(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:i}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const o=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Vt(d).point)},r=(d,f)=>{const{drag:h,dragPropagation:p,onDragStart:g}=this.getProps();if(h&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Ju(h),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),pe(w=>{let C=this.getAxisMotionValue(w).get()||0;if(be.test(C)){const{projection:y}=this.visualElement;if(y&&y.layout){const S=y.layout.layoutBox[w];S&&(C=ue(S)*(parseFloat(C)/100))}}this.originPoint[w]=C}),g&&q.postRender(()=>g(d,f)),Jn(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},a=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:h,dragDirectionLock:p,onDirectionLock:g,onDrag:x}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:w}=f;if(p&&this.currentDirection===null){this.currentDirection=qd(w),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",f.point,w),this.updateAxis("y",f.point,w),this.visualElement.render(),x&&x(d,f)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>pe(d=>this.getAnimationState(d)==="paused"&&this.getAxisMotionValue(d).animation?.play()),{dragSnapToOrigin:u}=this.getProps();this.panSession=new Jr(t,{onSessionStart:o,onStart:r,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:i,contextWindow:Zr(this.visualElement)})}stop(t,n){const i=t||this.latestPointerEvent,s=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!s||!i)return;const{velocity:r}=s;this.startAnimation(r);const{onDragEnd:a}=this.getProps();a&&q.postRender(()=>a(i,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,i){const{drag:s}=this.getProps();if(!i||!kt(t,s,this.currentDirection))return;const o=this.getAxisMotionValue(t);let r=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(r=zd(r,this.constraints[t],this.elastic[t])),o.set(r)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,s=this.constraints;t&&Ye(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=Bd(i.layoutBox,t):this.constraints=!1,this.elastic=Wd(n),s!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&pe(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Gd(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Ye(t))return!1;const i=t.current;Te(i!==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:s}=this.visualElement;if(!s||!s.layout)return!1;const o=Xc(i,s.root,this.visualElement.getTransformPagePoint());let r=Nd(s.layout.layoutBox,o);if(n){const a=n(Uc(r));this.hasMutatedConstraints=!!a,a&&(r=Lr(a))}return r}startAnimation(t){const{drag:n,dragMomentum:i,dragElastic:s,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=pe(u=>{if(!kt(u,n,this.currentDirection))return;let d=l&&l[u]||{};r&&(d={min:0,max:0});const f=s?200:1e6,h=s?40:1e7,p={type:"inertia",velocity:i?t[u]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...o,...d};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const i=this.getAxisMotionValue(t);return Jn(this.visualElement,t),i.start(zi(t,i,0,n,this.visualElement,!1))}stopAnimation(){pe(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){pe(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps(),s=i[n];return s||this.visualElement.getValue(t,(i.initial?i.initial[t]:void 0)||0)}snapToCursor(t){pe(n=>{const{drag:i}=this.getProps();if(!kt(n,i,this.currentDirection))return;const{projection:s}=this.visualElement,o=this.getAxisMotionValue(n);if(s&&s.layout){const{min:r,max:a}=s.layout.layoutBox[n];o.set(t[n]-Y(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!Ye(n)||!i||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};pe(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();s[r]=Hd({min:l,max:l},this.constraints[r])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),pe(r=>{if(!kt(r,t,null))return;const a=this.getAxisMotionValue(r),{min:l,max:c}=this.constraints[r];a.set(Y(l,c,s[r]))})}addListeners(){if(!this.visualElement.current)return;Ud.set(this.visualElement,this);const t=this.visualElement.current,n=pt(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),i=()=>{const{dragConstraints:l}=this.getProps();Ye(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,o=s.addEventListener("measure",i);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),q.read(i);const r=Pt(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(pe(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())}));return()=>{r(),n(),o(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:i=!1,dragPropagation:s=!1,dragConstraints:o=!1,dragElastic:r=ei,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:i,dragPropagation:s,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function kt(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function qd(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Xd extends Le{constructor(t){super(t),this.removeGroupControls=ve,this.removeListeners=ve,this.controls=new Kd(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ve}unmount(){this.removeGroupControls(),this.removeListeners()}}const Gs=e=>(t,n)=>{e&&q.postRender(()=>e(t,n))};class Yd extends Le{constructor(){super(...arguments),this.removePointerDownListener=ve}onPointerDown(t){this.session=new Jr(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Zr(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:i,onPanEnd:s}=this.node.getProps();return{onSessionStart:Gs(t),onStart:Gs(n),onMove:i,onEnd:(o,r)=>{delete this.session,s&&q.postRender(()=>s(o,r))}}}mount(){this.removePointerDownListener=pt(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Nt={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Ws(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ct={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(k.test(e))e=parseFloat(e);else return e;const n=Ws(e,t.target.x),i=Ws(e,t.target.y);return`${n}% ${i}%`}},Zd={correct:(e,{treeScale:t,projectionDelta:n})=>{const i=e,s=ke.parse(e);if(s.length>5)return i;const o=ke.createTransformer(e),r=typeof s[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;s[0+r]/=a,s[1+r]/=l;const c=Y(a,l,.5);return typeof s[2+r]=="number"&&(s[2+r]/=c),typeof s[3+r]=="number"&&(s[3+r]/=c),o(s)}};let Cn=!1;class Jd extends v.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i,layoutId:s}=this.props,{projection:o}=t;xc(Qd),o&&(n.group&&n.group.add(o),i&&i.register&&s&&i.register(o),Cn&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Nt.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:i,drag:s,isPresent:o}=this.props,{projection:r}=i;return r&&(r.isPresent=o,Cn=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==o?r.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?r.promote():r.relegate()||q.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Ei.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i}=this.props,{projection:s}=t;Cn=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),i&&i.deregister&&i.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function ea(e){const[t,n]=Sr(),i=v.useContext(ai);return m.jsx(Jd,{...e,layoutGroup:i,switchLayoutGroup:v.useContext(kr),isPresent:t,safeToRemove:n})}const Qd={borderRadius:{...ct,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ct,borderTopRightRadius:ct,borderBottomLeftRadius:ct,borderBottomRightRadius:ct,boxShadow:Zd};function ef(e,t,n){const i=le(e)?e:tt(e);return i.start(zi("",i,t,n)),i.animation}const tf=(e,t)=>e.depth-t.depth;class nf{constructor(){this.children=[],this.isDirty=!1}add(t){ci(this.children,t),this.isDirty=!0}remove(t){di(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(tf),this.isDirty=!1,this.children.forEach(t)}}function sf(e,t){const n=de.now(),i=({timestamp:s})=>{const o=s-n;o>=t&&(Fe(i),e(o-t))};return q.setup(i,!0),()=>Fe(i)}const ta=["TopLeft","TopRight","BottomLeft","BottomRight"],of=ta.length,Us=e=>typeof e=="string"?parseFloat(e):e,Ks=e=>typeof e=="number"||k.test(e);function rf(e,t,n,i,s,o){s?(e.opacity=Y(0,n.opacity??1,af(i)),e.opacityExit=Y(t.opacity??1,0,lf(i))):o&&(e.opacity=Y(t.opacity??1,n.opacity??1,i));for(let r=0;r<of;r++){const a=`border${ta[r]}Radius`;let l=qs(t,a),c=qs(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Ks(l)===Ks(c)?(e[a]=Math.max(Y(Us(l),Us(c),i),0),(be.test(c)||be.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=Y(t.rotate||0,n.rotate||0,i))}function qs(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const af=na(0,.5,No),lf=na(.5,.95,ve);function na(e,t,n){return i=>i<e?0:i>t?1:n(Ct(e,t,i))}function Xs(e,t){e.min=t.min,e.max=t.max}function he(e,t){Xs(e.x,t.x),Xs(e.y,t.y)}function Ys(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Zs(e,t,n,i,s){return e-=t,e=qt(e,1/n,i),s!==void 0&&(e=qt(e,1/s,i)),e}function uf(e,t=0,n=1,i=.5,s,o=e,r=e){if(be.test(t)&&(t=parseFloat(t),t=Y(r.min,r.max,t/100)-r.min),typeof t!="number")return;let a=Y(o.min,o.max,i);e===o&&(a-=t),e.min=Zs(e.min,t,n,a,s),e.max=Zs(e.max,t,n,a,s)}function Js(e,t,[n,i,s],o,r){uf(e,t[n],t[i],t[s],t.scale,o,r)}const cf=["x","scaleX","originX"],df=["y","scaleY","originY"];function Qs(e,t,n,i){Js(e.x,t,cf,n?n.x:void 0,i?i.x:void 0),Js(e.y,t,df,n?n.y:void 0,i?i.y:void 0)}function eo(e){return e.translate===0&&e.scale===1}function ia(e){return eo(e.x)&&eo(e.y)}function to(e,t){return e.min===t.min&&e.max===t.max}function ff(e,t){return to(e.x,t.x)&&to(e.y,t.y)}function no(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function sa(e,t){return no(e.x,t.x)&&no(e.y,t.y)}function io(e){return ue(e.x)/ue(e.y)}function so(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class hf{constructor(){this.members=[]}add(t){ci(this.members,t),t.scheduleRender()}remove(t){if(di(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(s=>t===s);if(n===0)return!1;let i;for(let s=n;s>=0;s--){const o=this.members[s];if(o.isPresent!==!1){i=o;break}}return i?(this.promote(i),!0):!1}promote(t,n){const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:s}=t.options;s===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:i}=t;n.onExitComplete&&n.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function gf(e,t,n){let i="";const s=e.x.translate/t.x,o=e.y.translate/t.y,r=n?.z||0;if((s||o||r)&&(i=`translate3d(${s}px, ${o}px, ${r}px) `),(t.x!==1||t.y!==1)&&(i+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:h,skewY:p}=n;c&&(i=`perspective(${c}px) ${i}`),u&&(i+=`rotate(${u}deg) `),d&&(i+=`rotateX(${d}deg) `),f&&(i+=`rotateY(${f}deg) `),h&&(i+=`skewX(${h}deg) `),p&&(i+=`skewY(${p}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(i+=`scale(${a}, ${l})`),i||"none"}const Sn=["","X","Y","Z"],pf=1e3;let mf=0;function _n(e,t,n,i){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),i&&(i[e]=0))}function oa(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Gr(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",q,!(s||o))}const{parent:i}=e;i&&!i.hasCheckedOptimisedAppear&&oa(i)}function ra({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(r={},a=t?.()){this.id=mf++,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(wf),this.nodes.forEach(_f),this.nodes.forEach(bf),this.nodes.forEach(xf)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,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 nf)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new hi),this.eventHandlers.get(r).add(a)}notifyListeners(r,...a){const l=this.eventHandlers.get(r);l&&l.notify(...a)}hasListeners(r){return this.eventHandlers.has(r)}mount(r){if(this.instance)return;this.isSVG=Cr(r)&&!sc(r),this.instance=r;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let u,d=0;const f=()=>this.root.updateBlockedByResize=!1;q.read(()=>{d=window.innerWidth}),e(r,()=>{const h=window.innerWidth;h!==d&&(d=h,this.root.updateBlockedByResize=!0,u&&u(),u=sf(f,250),Nt.hasAnimatedSinceResize&&(Nt.hasAnimatedSinceResize=!1,this.nodes.forEach(ao)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||c.getDefaultTransition()||Ef,{onLayoutAnimationStart:g,onLayoutAnimationComplete:x}=c.getProps(),w=!this.targetLayout||!sa(this.targetLayout,h),C=!d&&f;if(this.options.layoutRoot||this.resumeFrom||C||d&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const y={...Mi(p,"layout"),onPlay:g,onComplete:x};(c.shouldReduceMotion||this.options.layoutRoot)&&(y.delay=0,y.type=!1),this.startAnimation(y),this.setAnimationOrigin(u,C)}else d||ao(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Fe(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(Rf),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&oa(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(oo);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(ro);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Sf),this.nodes.forEach(vf),this.nodes.forEach(yf)):this.nodes.forEach(ro),this.clearAllSnapshots();const a=de.now();re.delta=Me(0,1e3/60,a-re.timestamp),re.timestamp=a,re.isProcessing=!0,dn.update.process(re),dn.preRender.process(re),dn.render.process(re),re.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ei.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Cf),this.sharedNodes.forEach(Pf)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,q.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){q.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ue(this.snapshot.measuredBox.x)&&!ue(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 r=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Z(),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,r?r.layoutBox:void 0)}updateScroll(r="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(a=!1),a&&this.instance){const l=i(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!s)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!ia(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;r&&this.instance&&(a||ze(this.latestValues)||u)&&(s(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return r&&(l=this.removeTransform(l)),Vf(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return Z();const a=r.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Af))){const{scroll:c}=this.root;c&&(Ze(a.x,c.offset.x),Ze(a.y,c.offset.y))}return a}removeElementScroll(r){const a=Z();if(he(a,r),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:d}=c;c!==this.root&&u&&d.layoutScroll&&(u.wasRoot&&he(a,r),Ze(a.x,u.offset.x),Ze(a.y,u.offset.y))}return a}applyTransform(r,a=!1){const l=Z();he(l,r);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Je(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),ze(u.latestValues)&&Je(l,u.latestValues)}return ze(this.latestValues)&&Je(l,this.latestValues),l}removeTransform(r){const a=Z();he(a,r);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!ze(c.latestValues))continue;qn(c.latestValues)&&c.updateSnapshot();const u=Z(),d=c.measurePageBox();he(u,d),Qs(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return ze(this.latestValues)&&Qs(a,this.latestValues),a}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.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!==re.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!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(!(r||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:d}=this.options;if(!(!this.layout||!(u||d))){if(this.resolvedRelativeTargetAt=re.timestamp,!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Z(),this.relativeTargetOrigin=Z(),vt(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),he(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Z(),this.targetWithTransforms=Z()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Ld(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):he(this.target,this.layout.layoutBox),$r(this.target,this.targetDelta)):he(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const f=this.getClosestProjectingParent();f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Z(),this.relativeTargetOrigin=Z(),vt(this.relativeTargetOrigin,this.target,f.target),he(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||qn(this.parent.latestValues)||jr(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 r=this.getLead(),a=!!this.resumingFrom||this!==r;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===re.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;he(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;qc(this.layoutCorrected,this.treeScale,this.path,a),r.layout&&!r.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(r.target=r.layout.layoutBox,r.targetWithTransforms=Z());const{target:h}=r;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ys(this.prevProjectionDelta.x,this.projectionDelta.x),Ys(this.prevProjectionDelta.y,this.projectionDelta.y)),mt(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!so(this.projectionDelta.x,this.prevProjectionDelta.x)||!so(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){if(this.options.visualElement?.scheduleRender(),r){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Qe(),this.projectionDelta=Qe(),this.projectionDeltaWithTransform=Qe()}setAnimationOrigin(r,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=Qe();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=Z(),h=l?l.source:void 0,p=this.layout?this.layout.source:void 0,g=h!==p,x=this.getStack(),w=!x||x.members.length<=1,C=!!(g&&!w&&this.options.crossfade===!0&&!this.path.some(Tf));this.animationProgress=0;let y;this.mixTargetDelta=S=>{const _=S/1e3;lo(d.x,r.x,_),lo(d.y,r.y,_),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(vt(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Mf(this.relativeTarget,this.relativeTargetOrigin,f,_),y&&ff(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=Z()),he(y,this.relativeTarget)),g&&(this.animationValues=u,rf(u,c,this.latestValues,_,C,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=_},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Fe(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=q.update(()=>{Nt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=tt(0)),this.currentAnimation=ef(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),r.onUpdate&&r.onUpdate(a)},onStop:()=>{},onComplete:()=>{r.onComplete&&r.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 r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(pf),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=r;if(!(!a||!l||!c)){if(this!==r&&this.layout&&c&&aa(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Z();const d=ue(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+d;const f=ue(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+f}he(a,l),Je(a,u),mt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new hf),this.sharedNodes.get(r).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){const{layoutId:r}=this.options;return r?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:r}=this.options;return r?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:l}=r;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&_n("z",r,c,this.animationValues);for(let u=0;u<Sn.length;u++)_n(`rotate${Sn[u]}`,r,c,this.animationValues),_n(`skew${Sn[u]}`,r,c,this.animationValues);r.render();for(const u in c)r.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);r.scheduleRender()}applyProjectionStyles(r,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){r.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,r.visibility="",r.opacity="",r.pointerEvents=Bt(a?.pointerEvents)||"",r.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(r.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,r.pointerEvents=Bt(a?.pointerEvents)||""),this.hasProjected&&!ze(this.latestValues)&&(r.transform=l?l({},""):"none",this.hasProjected=!1);return}r.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let d=gf(this.projectionDeltaWithTransform,this.treeScale,u);l&&(d=l(u,d)),r.transform=d;const{x:f,y:h}=this.projectionDelta;r.transformOrigin=`${f.origin*100}% ${h.origin*100}% 0`,c.animationValues?r.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:r.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const p in Rt){if(u[p]===void 0)continue;const{correct:g,applyTo:x,isCSSVariable:w}=Rt[p],C=d==="none"?u[p]:g(u[p],c);if(x){const y=x.length;for(let S=0;S<y;S++)r[x[S]]=C}else w?this.options.visualElement.renderState.vars[p]=C:r[p]=C}this.options.layoutId&&(r.pointerEvents=c===this?Bt(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>r.currentAnimation?.stop()),this.root.nodes.forEach(oo),this.root.sharedNodes.clear()}}}function vf(e){e.updateLayout()}function yf(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=e.layout,{animationType:s}=e.options,o=t.source!==e.layout.source;s==="size"?pe(u=>{const d=o?t.measuredBox[u]:t.layoutBox[u],f=ue(d);d.min=n[u].min,d.max=d.min+f}):aa(s,t.layoutBox,n)&&pe(u=>{const d=o?t.measuredBox[u]:t.layoutBox[u],f=ue(n[u]);d.max=d.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+f)});const r=Qe();mt(r,n,t.layoutBox);const a=Qe();o?mt(a,e.applyTransform(i,!0),t.measuredBox):mt(a,n,t.layoutBox);const l=!ia(r);let c=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:d,layout:f}=u;if(d&&f){const h=Z();vt(h,t.layoutBox,d.layoutBox);const p=Z();vt(p,n,f.layoutBox),sa(h,p)||(c=!0),u.options.layoutRoot&&(e.relativeTarget=p,e.relativeTargetOrigin=h,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function wf(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function xf(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Cf(e){e.clearSnapshot()}function oo(e){e.clearMeasurements()}function ro(e){e.isLayoutDirty=!1}function Sf(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function ao(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function _f(e){e.resolveTargetDelta()}function bf(e){e.calcProjection()}function Rf(e){e.resetSkewAndRotation()}function Pf(e){e.removeLeadSnapshot()}function lo(e,t,n){e.translate=Y(t.translate,0,n),e.scale=Y(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function uo(e,t,n,i){e.min=Y(t.min,n.min,i),e.max=Y(t.max,n.max,i)}function Mf(e,t,n,i){uo(e.x,t.x,n.x,i),uo(e.y,t.y,n.y,i)}function Tf(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Ef={duration:.45,ease:[.4,0,.1,1]},co=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),fo=co("applewebkit/")&&!co("chrome/")?Math.round:ve;function ho(e){e.min=fo(e.min),e.max=fo(e.max)}function Vf(e){ho(e.x),ho(e.y)}function aa(e,t,n){return e==="position"||e==="preserve-aspect"&&!Id(io(t),io(n),.2)}function Af(e){return e!==e.root&&e.scroll?.wasRoot}const Df=ra({attachResizeListener:(e,t)=>Pt(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),bn={current:void 0},la=ra({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!bn.current){const e=new Df({});e.mount(window),e.setOptions({layoutScroll:!0}),bn.current=e}return bn.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Ff={pan:{Feature:Yd},drag:{Feature:Xd,ProjectionNode:la,MeasureLayout:ea}};function go(e,t,n){const{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,o=i[s];o&&q.postRender(()=>o(t,Vt(t)))}class kf extends Le{mount(){const{current:t}=this.node;t&&(this.unmount=Qu(t,(n,i)=>(go(this.node,i,"Start"),s=>go(this.node,s,"End"))))}unmount(){}}class If extends Le{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!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=Mt(Pt(this.node.current,"focus",()=>this.onFocus()),Pt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function po(e,t,n){const{props:i}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&i.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),o=i[s];o&&q.postRender(()=>o(t,Vt(t)))}class Lf extends Le{mount(){const{current:t}=this.node;t&&(this.unmount=ic(t,(n,i)=>(po(this.node,i,"Start"),(s,{success:o})=>po(this.node,s,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const ti=new WeakMap,Rn=new WeakMap,jf=e=>{const t=ti.get(e.target);t&&t(e)},$f=e=>{e.forEach(jf)};function Of({root:e,...t}){const n=e||document;Rn.has(n)||Rn.set(n,{});const i=Rn.get(n),s=JSON.stringify(t);return i[s]||(i[s]=new IntersectionObserver($f,{root:e,...t})),i[s]}function zf(e,t,n){const i=Of(t);return ti.set(e,n),i.observe(e),()=>{ti.delete(e),i.unobserve(e)}}const Bf={some:0,all:1};class Nf extends Le{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:i,amount:s="some",once:o}=t,r={root:n?n.current:void 0,rootMargin:i,threshold:typeof s=="number"?s:Bf[s]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,o&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return zf(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(Hf(t,n))&&this.startObserver()}unmount(){}}function Hf({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Gf={inView:{Feature:Nf},tap:{Feature:Lf},focus:{Feature:If},hover:{Feature:kf}},Wf={layout:{ProjectionNode:la,MeasureLayout:ea}},Uf={...Ed,...Gf,...Ff,...Wf},Bi=Wc(Uf,sd),Kf="_primary_13825_8",qf="_secondary_13825_12",Xf="_tertiary_13825_16",Yf="_positive_13825_20",Zf="_negative_13825_24",Jf="_warning_13825_28",Qf="_accent_13825_32",eh="_inverse_13825_36",th="_text_13825_111",nh="_regular_13825_117",ih="_medium_13825_121",sh="_semibold_13825_125",oh="_bold_13825_129",It={primary:Kf,secondary:qf,tertiary:Xf,positive:Yf,negative:Zf,warning:Jf,accent:Qf,inverse:eh,"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:th,regular:nh,medium:ih,semibold:sh,bold:oh},rh=e=>{let t;e.center?t="center":e.left?t="left":e.right&&(t="right");let n;return e.uppercase?n="uppercase":e.lowercase?n="lowercase":e.capitalize&&(n="capitalize"),M.css({marginTop:e.mt,marginBottom:e.mb,marginRight:e.mr,marginLeft:e.ml,flex:e.flex,cursor:e.cursor,wordBreak:e.wordBreak,whiteSpace:e.whiteSpace,textOverflow:e.textOverflow,textDecoration:e.decoration,textAlign:t,textTransform:n,opacity:e.disabled?.5:void 0,overflow:e.overflow,color:e.color})},B=v.forwardRef(({children:e,className:t,variant:n="body-1",fontWeight:i="medium",tag:s="p",colorName:o="primary",style:r,clickOpacity:a=.5,opacityDuration:l=200,onClick:c,disabled:u,mt:d,mb:f,ml:h,mr:p,flex:g,cursor:x,wordBreak:w,whiteSpace:C,textOverflow:y,decoration:S,color:_,center:b,left:E,right:R,uppercase:I,lowercase:A,capitalize:z,overflow:J,...N},ee)=>{const[te,se]=v.useState(!1),$=!!c,K=()=>$&&se(!0),ne=()=>$&&se(!1),j=rh({mt:d,mb:f,ml:h,mr:p,flex:g,cursor:x,wordBreak:w,whiteSpace:C,textOverflow:y,decoration:S,color:_,center:b,left:E,right:R,uppercase:I,lowercase:A,capitalize:z,overflow:J}),H=s,P=$?M.css({opacity:te?a:1,transition:`opacity ${l}ms ease`}):"";return m.jsx(H,{ref:ee,...N,className:M.cx(It.text,It[n],It[o],It[i],P,t,j),style:r,onClick:c,onMouseDown:K,onMouseUp:ne,onMouseLeave:ne,onTouchStart:K,onTouchEnd:ne,role:$?"button":void 0,tabIndex:$?0:void 0,children:e})});B.displayName="Text";const Xt=Bi(B),ah="_loader_1qleq_8",lh={loader:ah},uh=({color:e="var(--text-accent)"})=>m.jsx("span",{className:M.cx(lh.loader,M.css({"--loader-color":e}))}),ch=M.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}),dt={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)"},dh={xs:"var(--height-button-xs)",sm:"var(--height-button-sm)",md:"var(--height-button-md)",lg:"var(--height-button-lg)"},fh={clear:M.css({backgroundColor:"transparent",border:"none"}),filled:M.css({backgroundColor:"var(--fill-accent-primary)",color:"white",border:"none"}),outline:M.css({backgroundColor:"transparent",border:"1px solid var(--border-accent-primary)"})},hh=(e,t,n,i)=>{if(i)return M.css({cursor:"not-allowed",opacity:.7});const s={transition:"all 0.2s ease",borderRadius:"var(--corner-lg)",border:"none",color:e==="filled"?"var(--text-inverse)":`var(--text-${t})`};switch(e){case"filled":return M.css({...s,backgroundColor:`var(--fill-${t}-${n})`,":hover":{backgroundColor:`var(--fill-${t}-${n}-hover)`},":active":{backgroundColor:`var(--fill-${t}-${n}-hover)`}});case"outline":return M.css({...s,backgroundColor:"transparent",border:`1px solid var(--border-${t}-${n})`,":hover":{backgroundColor:`var(--fill-${t}-secondary-hover)`},":active":{backgroundColor:`var(--fill-${t}-secondary-hover)`}});case"clear":return M.css({...s,backgroundColor:"transparent",":hover":{backgroundColor:`var(--fill-${t}-secondary-hover)`},":active":{backgroundColor:`var(--fill-${t}-secondary-hover)`}});default:return M.css(s)}},gh=({disabled:e,loading:t,onClick:n,wrapperClassName:i,buttonClassName:s,buttonDisabledClassName:o,textClassName:r,children:a,variant:l="filled",backgroundColor:c,textColor:u,textFontWeight:d,borderColor:f,color:h="accent",borderRadius:p,width:g="full",size:x="md",iconLeft:w,iconRight:C,intensity:y="primary",flex:S,..._})=>{const b=v.useMemo(()=>{switch(g){case"full":return"100%";case"auto":return"auto";default:return g}},[g]),E=v.useMemo(()=>c||(l==="filled"?h==="neutral"?"var(--fill-neutral-secondary)":`var(--fill-${h}-${y})`:"transparent"),[l,c,h,y]),R=v.useMemo(()=>{if(y==="primary"){if(h==="neutral")return"var(--text-secondary)";if(l==="filled")return"var(--text-inverse)"}else if(h==="neutral")return"var(--text-secondary)";return`var(--text-${h})`},[y,h,l]),I=v.useMemo(()=>{if(y==="primary"){if(h==="neutral")return"secondary";if(l==="filled")return"inverse"}else if(h==="neutral")return"secondary";return h},[l,h,y]),A=v.useMemo(()=>f||(l==="outline"?`var(--border-${h}-${y})`:"transparent"),[l,f,h,y]),z=v.useMemo(()=>{switch(x){case"lg":return dt.lg;case"md":case"sm":return dt.md;case"xs":return dt.sm;default:return dt.md}},[x]),J=M.cx(ch,hh(l,h,y,e),fh[l],s,e?o:void 0,M.css({borderRadius:p?dt[p]:z,backgroundColor:E,borderColor:A,color:u,width:"100%",height:dh[x],opacity:e?.7:1})),N=v.useMemo(()=>{switch(x){case"lg":case"md":return"body-1";case"sm":case"xs":return"body-2";default:return"body-1"}},[x]);return m.jsx(V,{className:M.cx(i),w:b,flex:S,relative:!0,overflow:"hidden",children:m.jsxs(Bi.button,{whileTap:!e&&!t?{scale:.99,boxShadow:"inset 0 0 0 10000px rgba(0,0,0,0.1)",transition:{duration:0}}:{},className:J,disabled:e||t,onClick:n,..._,children:[t?m.jsx(uh,{color:R}):m.jsxs(m.Fragment,{children:[w,m.jsx(Xt,{style:{color:u},colorName:I,variant:N,className:r,textOverflow:"ellipsis",overflow:"hidden",children:a}),C]}),m.jsx(it,{})]})})},ph=e=>T.createElement("svg",{width:16,height:16,viewBox:"0 0 24 24",fill:"none",...e},T.createElement("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z",fill:"currentColor"})),mh=e=>T.createElement("svg",{viewBox:"0 0 24 24",fill:"none",...e},T.createElement("path",{d:"M19 13H5v-2h14v2z",fill:"currentColor"})),vh="_checkbox_asmiz_8",yh="_disabled_asmiz_15",wh="_checkbox__ripple_asmiz_15",xh="_checkbox__input_asmiz_27",Ch="_checkbox__box_asmiz_35",Sh="_secondary_asmiz_48",_h="_checked_asmiz_54",bh="_error_asmiz_63",Re={checkbox:vh,disabled:yh,checkbox__ripple:wh,checkbox__input:xh,checkbox__box:Ch,secondary:Sh,checked:_h,error:bh},Rh={sm:20,md:24},Ni=v.forwardRef(({checked:e,onChange:t,disabled:n,error:i,indeterminate:s,size:o="md",title:r,titleColor:a,subtitle:l,subtitleColor:c="secondary",name:u,required:d,variant:f="primary",flex:h},p)=>{const[g,x]=v.useState(!1),w=e!==void 0,C=w?e:g,y=b=>{w||x(b.target.checked),t?.(b)},S=Rh[o],_=C||s;return m.jsxs("label",{className:M.cx(Re.checkbox,M.css({flex:h}),{[Re.disabled]:n}),children:[m.jsxs(V,{relative:!0,display:"inline-flex",style:{"--checkbox-size":`${S}px`,"--checkbox-size-double":`${S*2}px`},children:[m.jsx("input",{ref:p,type:"checkbox",checked:C,onChange:y,onClick:b=>b.stopPropagation(),disabled:n,name:u,required:d,className:M.cx(Re.checkbox__input,{[Re.disabled]:n})}),m.jsx("div",{className:M.cx(Re.checkbox__box,Re[f],{[Re.disabled]:n,[Re.error]:i,[Re.checked]:_}),children:_&&(s?m.jsx(mh,{width:S*.75,height:S*.75}):m.jsx(ph,{width:S*.75,height:S*.75}))})]}),(r||l)&&m.jsxs(V,{gap:4,children:[r&&m.jsx(B,{colorName:a,variant:o==="sm"?"body-2":"body-1",children:r}),l&&m.jsx(B,{variant:"body-2",colorName:c,children:l})]})]})});Ni.displayName="Checkbox";const Ph=e=>T.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{opacity:.5},T.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"}))),Mh="_disabled_ph9zm_20",Th="_multiline_ph9zm_24",Eh="_input_ph9zm_8",Vh="_sm_ph9zm_74",Ah="_md_ph9zm_79",Dh="_error_ph9zm_84",Fh="_white_ph9zm_88",kh="_gray_ph9zm_92",ce={"input-container":"_input-container_ph9zm_8",disabled:Mh,multiline:Th,input:Eh,"input-text-size_sm":"_input-text-size_sm_ph9zm_55","input-text-size_md":"_input-text-size_md_ph9zm_59","input-text-align_left":"_input-text-align_left_ph9zm_64","input-text-align_center":"_input-text-align_center_ph9zm_67","input-text-align_right":"_input-text-align_right_ph9zm_70",sm:Vh,md:Ah,error:Dh,white:Fh,gray:kh,"clear-button":"_clear-button_ph9zm_96"};function mo(e){return{...new Event("input",{bubbles:!0}),target:e,currentTarget:e}}const ua=v.forwardRef((e,t)=>{const{label:n,prompt:i,error:s,errorText:o,size:r="md",prefix:a,suffix:l,background:c="white",showClearButton:u,disabled:d,value:f,defaultValue:h,inputClassName:p,textAlign:g="left",...x}=e,w=e.multiline===!0,C=v.useRef(null),y=v.useRef(null),[S,_]=Yt(f!==void 0?String(f):void 0,h!==void 0?String(h):"");v.useImperativeHandle(t,()=>({focus:()=>{C.current?.focus(),y.current?.focus()},blur:()=>{C.current?.blur(),y.current?.blur()},get value(){return C.current?.value||y.current?.value}}));const b=I=>{if(_(I.target.value),w){const A=e.onChange;A?.(I)}else{const A=e.onChange;A?.(I)}};v.useEffect(()=>{w&&e.autoResize&&y.current&&(y.current.style.height="auto",y.current.style.height=`${y.current.scrollHeight}px`)},[S,w,e.autoResize]);const E=()=>{if(_(""),!w){const A=C.current;if(A){A.value="";const z=mo(A),J=e.onChange;J?.(z)}return}const I=y.current;if(I){I.value="";const A=mo(I),z=e.onChange;z?.(A)}},R=()=>{if(w){const{rows:J,autoResize:N,onChange:ee,multiline:te,...se}=x;return m.jsx("textarea",{ref:y,rows:e.rows??3,className:M.cx(ce.input,p,{[ce.disabled]:d,[ce[`input-text-align_${g}`]]:!!g}),disabled:d,maxLength:e.maxLength,...se,value:S,onChange:b})}const{onChange:I,multiline:A,...z}=x;return m.jsx("input",{...z,ref:C,className:M.cx(ce.input,ce[`input-text-size_${r}`],p,{[ce.disabled]:d,[ce[`input-text-align_${g}`]]:!!g}),disabled:d,type:e.type??"text",value:S,onChange:b})};return m.jsxs(V,{w:"full",gap:"var(--spacing-sm)",children:[n&&m.jsx(B,{variant:"body-2",fontWeight:"regular",colorName:"tertiary",children:n}),m.jsxs(V,{row:!0,alignItems:w?"flex-start":"center",w:"full",gap:"var(--spacing-md)",className:M.cx(ce["input-container"],ce[c],ce[r],{[ce.error]:s,[ce.disabled]:d,[ce.multiline]:w}),children:[a&&m.jsx(V,{flex:"none",children:a}),m.jsx(V,{flex:"1",children:R()}),u&&S&&!d&&m.jsx(V,{flex:"none",children:m.jsx("span",{className:ce["clear-button"],onClick:E,children:m.jsx(Ph,{})})}),l&&m.jsx(V,{flex:"none",children:l})]}),(i||w)&&m.jsxs(V,{row:!0,gap:10,w:"full",children:[typeof i=="string"?m.jsx(B,{variant:"caption-1",colorName:"tertiary",children:i}):i,w&&e.maxLength&&m.jsx(B,{right:!0,ml:"auto",flex:"none",variant:"caption-1",colorName:"tertiary",children:`${S.length}/${e.maxLength}`})]}),o&&s&&m.jsx(B,{variant:"body-2",colorName:"negative",fontWeight:"regular",children:o})]})});ua.displayName="Input";const Ih=e=>T.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M6 9L12 15L18 9",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Lh=e=>T.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",...e},T.createElement("g",null,T.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"}))),jh="_avatar_1oe2p_8",$h="_avatar_primary_1oe2p_22",Oh="_avatar_secondary_1oe2p_25",zh="_avatar_negative_1oe2p_28",Bh="_avatar_positive_1oe2p_31",Nh="_avatar_warning_1oe2p_34",Hh="_avatar_lgSize_1oe2p_71",Gh="_avatar_mdSize_1oe2p_85",Wh="_avatar_smSize_1oe2p_99",Pn={avatar:jh,avatar_primary:$h,avatar_secondary:Oh,avatar_negative:zh,avatar_positive:Bh,avatar_warning:Nh,avatar_lgSize:Hh,avatar_mdSize:Gh,avatar_smSize:Wh};function Uh({attr:e,children:t,className:n,color:i="primary",size:s="md",...o}){const r="avatar";return m.jsx("div",{...e,...o,className:Be(Pn[r],n,wt(Pn,r,s),Zt(Pn,r,i)),children:t})}const Kh=e=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("circle",{cx:12,cy:12,r:10,fill:"currentColor",fillOpacity:.15}),T.createElement("path",{d:"M16 9L10.0337 15L8 12.9548",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),vo=e=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.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}),T.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"}),T.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"})),qh=e=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("circle",{cx:12,cy:12,r:10,fill:"currentColor",fillOpacity:.12}),T.createElement("path",{d:"M16 8L8 16M16 16L8 8",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})),Xh=e=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"black",...e},T.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"})),Yh="_hint_prca1_8",Zh="_md_prca1_19",Jh="_sm_prca1_24",Qh="_icon_prca1_29",eg="_content_prca1_40",tg="_title_prca1_46",ng="_subtitle_prca1_50",ig="_disabled_prca1_55",sg="_warning_prca1_60",og="_solid_prca1_60",rg="_negative_prca1_65",ag="_positive_prca1_70",lg="_accent_prca1_75",ug="_neutral_prca1_80",cg="_soft_prca1_85",ge={hint:Yh,md:Zh,sm:Jh,icon:Qh,content:eg,title:tg,subtitle:ng,disabled:ig,warning:sg,solid:og,negative:rg,positive:ag,accent:lg,neutral:ug,soft:cg},dg={negative:m.jsx(qh,{}),positive:m.jsx(Kh,{}),accent:m.jsx(vo,{}),warning:m.jsx(vo,{}),neutral:m.jsx(Xh,{})},fg=({title:e,subtitle:t,color:n="warning",variant:i="soft",size:s="md",icon:o,disabled:r=!1,className:a,style:l})=>{const c=o||dg[n];return m.jsxs("div",{className:Be(ge.hint,ge[n],ge[i],ge[s],r&&ge.disabled,a),style:l,"aria-disabled":r,children:[c&&m.jsx("span",{className:Be(ge.icon,ge[n]),children:c}),m.jsxs("div",{className:ge.content,children:[e&&m.jsx(B,{className:Be(ge.title,wt(ge,"title",s)),variant:s==="md"?"body-1":"caption-2",children:e}),t&&m.jsx(B,{className:Be(ge.subtitle,wt(ge,"subtitle",s)),variant:s==="md"?"body-2":"caption-1",children:t})]})]})},Hi=({children:e})=>{const[t]=v.useState(()=>document.createElement("div"));return v.useEffect(()=>{let n=document.getElementById("portal-root");return n||(n=document.createElement("div"),n.id="portal-root",document.body.appendChild(n)),n.appendChild(t),()=>{n&&n.contains(t)&&n.removeChild(t)}},[t]),Mo.createPortal(e,t)},hg=M.css({position:"relative",zIndex:1}),gg=({children:e,className:t,...n})=>m.jsx(V,{className:M.cx(hg,t),...n,children:e}),pg=M.keyframes`
5
+ */var Ji;function Ha(){return Ji||(Ji=1,(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var o="",r=0;r<arguments.length;r++){var a=arguments[r];a&&(o=s(o,i(a)))}return o}function i(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var r="";for(var a in o)t.call(o,a)&&o[a]&&(r=s(r,a));return r}function s(o,r){return r?o?o+" "+r:o+r:o}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(ln)),ln.exports}var Ga=Ha();const Ne=Na(Ga),Wa="_rippleOverlay_s2kim_8",Ua="_ripple_s2kim_8",Qi={rippleOverlay:Wa,ripple:Ua},un="button, a, input, label, [role='button'], [data-ripple]";function Ka(e){if(typeof e.composedPath=="function")return e.composedPath();const t=[];let n=e.target;for(;n;)t.push(n),n=n.parentNode||n.host;return t.push(window),t}const st=v.forwardRef(({color:e="rgba(0,0,0,0.18)",duration:t=1e3,radius:n="auto",className:i},s)=>{const o=v.useRef(null),[r,a]=v.useState([]),l=v.useRef([]),u=v.useRef(1),c=v.useRef(null),d=()=>{l.current.forEach(g=>clearTimeout(g)),l.current=[]},f=v.useCallback((g,x,w,C)=>{if(typeof window>"u")return;const y=w.getBoundingClientRect(),S=n==="auto"?Math.max(y.width,y.height)*2:n,_=g-C.left,b=x-C.top,E=Math.max(0,y.top-C.top),R=Math.max(0,y.left-C.left),I=Math.max(0,C.right-y.right),A=Math.max(0,C.bottom-y.bottom),J=window.getComputedStyle(w).borderRadius||"0px",N=u.current++,ee={id:N,left:_-S/2,top:b-S/2,size:Math.ceil(S),clip:{top:Math.round(E),right:Math.round(I),bottom:Math.round(A),left:Math.round(R)},borderRadius:J};a(se=>[...se,ee]);const te=window.setTimeout(()=>{a(se=>se.filter($=>$.id!==N))},t+80);l.current.push(te)},[t,n]),h=v.useCallback(g=>{try{if(!o.current)return;const x=o.current,w=x.parentElement;if(!w)return;const C=Ka(g);let y=null;for(const R of C)if(R instanceof Element){if(R===w)break;if(R.matches&&R.matches(un)){y=R;break}}if(y||(y=w),y.closest&&(y.closest("[disabled]")||y.getAttribute("aria-disabled")==="true"||y.classList.contains("ripple-disabled")))return;const S=g.target;if(S&&S.closest&&(S.closest("[disabled]")||S.getAttribute?.("aria-disabled")==="true"))return;const _=x.getBoundingClientRect(),{clientX:b}=g,{clientY:E}=g;f(b,E,y,_)}catch{}},[f]),p=v.useCallback(g=>{if(!o.current||!(g.key==="Enter"||g.key===" "))return;const x=o.current,w=x.parentElement;if(!w)return;const C=document.activeElement;let y=null;if(C instanceof Element&&C.matches(un)&&(y=C),y||(y=w),y.closest&&(y.closest("[disabled]")||y.getAttribute("aria-disabled")==="true"))return;const S=x.getBoundingClientRect(),_=y.getBoundingClientRect().left+y.getBoundingClientRect().width/2,b=y.getBoundingClientRect().top+y.getBoundingClientRect().height/2;f(_,b,y,S)},[f]);return v.useImperativeHandle(s,()=>({trigger:({center:g=!0,x,y:w}={})=>{const C=o.current;if(!C)return;const y=C.parentElement;if(!y)return;const S=C.getBoundingClientRect(),_=document.activeElement instanceof Element&&document.activeElement.matches(un)?document.activeElement:y,b=g?_.getBoundingClientRect().left+_.getBoundingClientRect().width/2:x??S.left+S.width/2,E=g?_.getBoundingClientRect().top+_.getBoundingClientRect().height/2:w??S.top+S.height/2;f(b,E,_,S)}}),[f]),v.useEffect(()=>{const g=o.current;if(!g)return;const x=g.parentElement;if(!x||typeof window>"u")return;const w=window.getComputedStyle(x);let C=!1;return w.position==="static"&&(x.style.position="relative",C=!0,c.current=x),x.addEventListener("pointerdown",h,!0),x.addEventListener("keydown",p),()=>{x.removeEventListener("pointerdown",h,!0),x.removeEventListener("keydown",p),C&&c.current&&(c.current.style.position="",c.current=null),d()}},[h,p]),v.useEffect(()=>()=>d(),[]),m.jsx("div",{ref:o,className:`${Qi.rippleOverlay} ${i??""}`,"aria-hidden":!0,children:r.map(g=>m.jsx("span",{className:Qi.ripple,style:{left:`${g.left}px`,top:`${g.top}px`,width:`${g.size}px`,height:`${g.size}px`,backgroundColor:e,animationDuration:`${t}ms`,clipPath:`inset(${g.clip.top}px ${g.clip.right}px ${g.clip.bottom}px ${g.clip.left}px round ${g.borderRadius})`}},g.id))})});function Xt(e,t){const{current:n}=v.useRef(e!==void 0),[i,s]=v.useState(t),o=n?e:i,r=v.useCallback(a=>{n||s(a)},[n]);return[o,r]}const Eo=(e,t)=>{const[n,i]=v.useState({top:0,left:0,width:0});return v.useLayoutEffect(()=>{if(!t||!e.current||typeof window>"u")return;const s=()=>{const r=e.current.getBoundingClientRect();i({top:r.bottom+window.scrollY+4,left:r.left+window.scrollX,width:r.width})};s(),window.addEventListener("resize",s),window.addEventListener("scroll",s,!0);const o=new ResizeObserver(()=>s());return o.observe(e.current),()=>{window.removeEventListener("resize",s),window.removeEventListener("scroll",s,!0),o.disconnect()}},[t,e]),n};function Yt(e,t,n,i=""){if(n)return e[`${t}_${n}${i}`]}function yt(e,t,n){return Yt(e,t,n,"Size")}const qa="_button_11ykb_8",Xa="_button_primary_11ykb_19",Ya="_button_secondary_11ykb_22",Za="_button_negative_11ykb_25",Ja="_button_positive_11ykb_28",Qa="_button_warning_11ykb_31",el="_button_neutral_11ykb_34",tl="_button_mdSize_11ykb_118",nl="_button_smSize_11ykb_128",il="_button_xsSize_11ykb_138",cn={button:qa,button_primary:Xa,button_secondary:Ya,button_negative:Za,button_positive:Ja,button_warning:Qa,button_neutral:el,"button_neutral-white":"_button_neutral-white_11ykb_37","button_no-bg":"_button_no-bg_11ykb_40",button_mdSize:tl,button_smSize:nl,button_xsSize:il};function wt({attr:e,children:t,className:n,type:i="button",color:s="primary",size:o="md",...r}){const a="button";return m.jsxs("button",{...e,...r,type:i,className:Ne(cn[a],n,yt(cn,a,o),Yt(cn,a,s)),children:[m.jsx(st,{}),t]})}const sl="_avatar_1oe2p_8",ol="_avatar_primary_1oe2p_22",rl="_avatar_secondary_1oe2p_25",al="_avatar_negative_1oe2p_28",ll="_avatar_positive_1oe2p_31",ul="_avatar_warning_1oe2p_34",cl="_avatar_lgSize_1oe2p_71",dl="_avatar_mdSize_1oe2p_85",fl="_avatar_smSize_1oe2p_99",dn={avatar:sl,avatar_primary:ol,avatar_secondary:rl,avatar_negative:al,avatar_positive:ll,avatar_warning:ul,avatar_lgSize:cl,avatar_mdSize:dl,avatar_smSize:fl};function hl({attr:e,children:t,className:n,color:i="primary",size:s="md",...o}){const r="avatar";return m.jsx("div",{...e,...o,className:Ne(dn[r],n,yt(dn,r,s),Yt(dn,r,i)),children:t})}const gl=e=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("circle",{cx:12,cy:12,r:10,fill:"currentColor",fillOpacity:.15}),T.createElement("path",{d:"M16 9L10.0337 15L8 12.9548",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),es=e=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.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}),T.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"}),T.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"})),pl=e=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("circle",{cx:12,cy:12,r:10,fill:"currentColor",fillOpacity:.12}),T.createElement("path",{d:"M16 8L8 16M16 16L8 8",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})),ml=e=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"black",...e},T.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"})),vl="_hint_prca1_8",yl="_md_prca1_19",wl="_sm_prca1_24",xl="_icon_prca1_29",Cl="_content_prca1_40",Sl="_title_prca1_46",_l="_subtitle_prca1_50",bl="_disabled_prca1_55",Rl="_warning_prca1_60",Pl="_solid_prca1_60",Ml="_negative_prca1_65",Tl="_positive_prca1_70",El="_accent_prca1_75",Vl="_neutral_prca1_80",Al="_soft_prca1_85",he={hint:vl,md:yl,sm:wl,icon:xl,content:Cl,title:Sl,subtitle:_l,disabled:bl,warning:Rl,solid:Pl,negative:Ml,positive:Tl,accent:El,neutral:Vl,soft:Al},Dl={negative:m.jsx(pl,{}),positive:m.jsx(gl,{}),accent:m.jsx(es,{}),warning:m.jsx(es,{}),neutral:m.jsx(ml,{})},Fl=({title:e,subtitle:t,color:n="warning",variant:i="soft",size:s="md",icon:o,disabled:r=!1,className:a,style:l})=>{const u=o||Dl[n];return m.jsxs("div",{className:Ne(he.hint,he[n],he[i],he[s],r&&he.disabled,a),style:l,"aria-disabled":r,children:[u&&m.jsx("span",{className:Ne(he.icon,he[n]),children:u}),m.jsxs("div",{className:he.content,children:[e&&m.jsx(B,{className:Ne(he.title,yt(he,"title",s)),variant:s==="md"?"body-1":"caption-2",children:e}),t&&m.jsx(B,{className:Ne(he.subtitle,yt(he,"subtitle",s)),variant:s==="md"?"body-2":"caption-1",children:t})]})]})},Zt=({children:e})=>{const[t]=v.useState(()=>document.createElement("div"));return v.useEffect(()=>{let n=document.getElementById("portal-root");return n||(n=document.createElement("div"),n.id="portal-root",document.body.appendChild(n)),n.appendChild(t),()=>{n&&n.contains(t)&&n.removeChild(t)}},[t]),Mo.createPortal(e,t)},kl=M.css({position:"relative",zIndex:1}),Il=({children:e,className:t,...n})=>m.jsx(V,{className:M.cx(kl,t),...n,children:e}),Ll=M.keyframes`
14
6
  from {
15
7
  opacity: 0;
16
8
  }
17
9
  to {
18
10
  opacity: 1;
19
11
  }
20
- `,mg=M.css({pointerEvents:"auto",animation:`${pg} 0.2s ease-out`,backgroundColor:"var(--fill-bg-primary)",borderRadius:"var(--corner-md)",boxShadow:"0 4px 20px 0 var(--shadow-accent-secondary)"}),vg=({children:e,content:t,isOpen:n,onOpenChange:i,placement:s="bottom",trigger:o="click",offset:r=12,closeOnClickOutside:a=!0,closeOnEsc:l=!0,className:c,contentClassName:u,style:d,disabled:f=!1,openDelay:h=200,closeDelay:p=200,zIndex:g=1,popoverContentComponent:x=gg})=>{const[w,C]=v.useState(!1),y=n!==void 0,S=y?n:w,_=v.useRef(null),b=v.useRef(null),E=v.useRef(),R=v.useRef(),[I,A]=v.useState({top:0,left:0}),[z,J]=v.useState(s),N=v.useCallback(P=>{f||(y||C(P),i?.(P))},[f,y,i]),ee=v.useCallback(()=>{if(typeof window>"u")return s;const P=_.current?.getBoundingClientRect();if(!P)return s;const L=b.current?.getBoundingClientRect();if(!L)return s;const oe=P.top,W=window.innerHeight-P.bottom,U=P.left,ye=window.innerWidth-P.right;if(s.startsWith("top")){if(oe<L.height+r&&W>L.height+r)return s.replace("top","bottom")}else if(s.startsWith("bottom")&&W<L.height+r&&oe>L.height+r)return s.replace("bottom","top");if(s.startsWith("left")){if(U<L.width+r&&ye>L.width+r)return s.replace("left","right")}else if(s.startsWith("right")&&ye<L.width+r&&U>L.width+r)return s.replace("right","left");return s},[r,s]),te=v.useCallback(()=>{if(!_.current||!b.current||typeof window>"u")return;const P=_.current.getBoundingClientRect(),L=b.current.getBoundingClientRect(),oe=ee();J(oe);let W=0,U=0;switch(oe){case"top":W=P.top-L.height-r,U=P.left+P.width/2-L.width/2;break;case"top-start":W=P.top-L.height-r,U=P.left;break;case"top-end":W=P.top-L.height-r,U=P.right-L.width;break;case"bottom":W=P.bottom+r,U=P.left+P.width/2-L.width/2;break;case"bottom-start":W=P.bottom+r,U=P.left;break;case"bottom-end":W=P.bottom+r,U=P.right-L.width;break;case"left":W=P.top+P.height/2-L.height/2,U=P.left-L.width-r;break;case"left-start":W=P.top,U=P.left-L.width-r;break;case"left-end":W=P.bottom-L.height,U=P.left-L.width-r;break;case"right":W=P.top+P.height/2-L.height/2,U=P.right+r;break;case"right-start":W=P.top,U=P.right+r;break;case"right-end":W=P.bottom-L.height,U=P.right+r;break}W+=window.scrollY,U+=window.scrollX;const ye=r,je=window.scrollY+ye,$e=window.scrollY+window.innerHeight-ye,lt=window.scrollX+ye,_e=window.scrollX+window.innerWidth-ye;U<lt&&(U=lt),U+L.width>_e&&(U=_e-L.width),W<je&&(W=je),W+L.height>$e&&(W=$e-L.height),A({top:W,left:U})},[r,ee]);v.useLayoutEffect(()=>{if(!S||typeof window>"u")return;te();const P=()=>te(),L=()=>{if(!_.current||!b.current)return;ee()!==z&&te()};window.addEventListener("resize",P),window.addEventListener("scroll",L,!0);const oe=new ResizeObserver(te);return _.current&&oe.observe(_.current),()=>{window.removeEventListener("resize",P),window.removeEventListener("scroll",L,!0),oe.disconnect()}},[S,te,z,ee]),v.useEffect(()=>{if(!S||!a||typeof document>"u")return;const P=L=>{const oe=L.target;_.current?.contains(oe)||b.current?.contains(oe)||N(!1)};return document.addEventListener("mousedown",P),()=>document.removeEventListener("mousedown",P)},[S,a,N]),v.useEffect(()=>{if(!S||!l||typeof document>"u")return;const P=L=>{L.key==="Escape"&&N(!1)};return document.addEventListener("keydown",P),()=>document.removeEventListener("keydown",P)},[S,l,N]);const se=v.useCallback(()=>{o==="click"&&N(!S)},[o,S,N]),$=v.useCallback(()=>{o==="hover"&&(R.current&&clearTimeout(R.current),E.current=setTimeout(()=>{N(!0)},h))},[o,h,N]),K=v.useCallback(()=>{o==="hover"&&(E.current&&clearTimeout(E.current),R.current=setTimeout(()=>{N(!1)},p))},[o,p,N]),ne=v.useCallback(()=>{o==="focus"&&N(!0)},[o,N]),j=v.useCallback(()=>{o==="focus"&&N(!1)},[o,N]);v.useEffect(()=>()=>{E.current&&clearTimeout(E.current),R.current&&clearTimeout(R.current)},[]);const H=v.cloneElement(e,{ref:_,onClick:P=>{e.props.onClick?.(P),se()},onMouseEnter:P=>{e.props.onMouseEnter?.(P),$()},onMouseLeave:P=>{e.props.onMouseLeave?.(P),K()},onFocus:P=>{e.props.onFocus?.(P),ne()},onBlur:P=>{e.props.onBlur?.(P),j()},"aria-describedby":S?"popover-content":void 0,"aria-expanded":S});return m.jsxs(m.Fragment,{children:[H,S&&m.jsx(Hi,{children:m.jsx(V,{ref:b,id:"popover-content",role:"tooltip",className:M.cx(mg,c),style:{...d,position:"absolute",top:`${I.top}px`,left:`${I.left}px`,zIndex:g},onMouseEnter:o==="hover"?$:void 0,onMouseLeave:o==="hover"?K:void 0,children:m.jsx(x,{className:u,children:t})})})]})},yg={sm:28,md:32,lg:40},Gi=v.forwardRef(({label:e,color:t="primary",size:n="md",onClick:i,onDelete:s,avatar:o,icon:r,disabled:a,className:l},c)=>{const u=v.useRef(null),d=v.useMemo(()=>{switch(t){case"primary":return{bg:"var(--status-neutral-tint-low)",color:"var(--text-primary)"};case"accent":return{bg:"var(--status-accent-tint-low)",color:"var(--text-accent)"};case"warning":return{bg:"var(--status-warning-tint-low)",color:"var(--text-warning)"};case"positive":return{bg:"var(--status-positive-tint-low)",color:"var(--text-positive)"};case"negative":return{bg:"var(--status-negative-tint-low)",color:"var(--text-negative)"};default:return{bg:"var(--status-neutral-tint-low)",color:"var(--text-primary)"}}},[t]),f=M.css({cursor:a?"not-allowed":i?"pointer":"default",opacity:a?.5:1,userSelect:"none",position:"relative",transition:"background-color 0.2s, opacity 0.2s","&:hover":a?void 0:{backgroundColor:d.bg}}),h=M.css({cursor:"pointer",opacity:.6,"&:hover":{opacity:1}});return m.jsxs(V,{ref:p=>{u.current=p,typeof c=="function"?c(p):c&&(c.current=p)},row:!0,alignItems:"center",gap:6,px:10,py:4,h:yg[n],maxWidth:196,overflow:"hidden",borderRadius:"var(--corner-sm)",backgroundColor:d.bg,color:d.color,onClick:i,className:M.cx(f,l),children:[i&&m.jsx(it,{}),o&&m.jsx(V,{w:20,h:20,borderRadius:"50%",overflow:"hidden",children:o}),r&&m.jsx(V,{children:r}),typeof e=="string"?m.jsx(B,{variant:"caption-1",colorName:t,textOverflow:"ellipsis",overflow:"hidden",children:e}):e,s&&!a&&m.jsx(B,{className:h,colorName:t,onClick:p=>{p.stopPropagation(),s(p)},children:"×"})]})});Gi.displayName="Tag";const wg="_disabled_v62jt_40",xg="_open_v62jt_48",Cg="_error_v62jt_51",Sg="_hidden_v62jt_87",_g="_visible_v62jt_90",bg="_selected_v62jt_163",ie={"select-container":"_select-container_v62jt_8","full-width":"_full-width_v62jt_13","select-input":"_select-input_v62jt_17","size-xs":"_size-xs_v62jt_25","size-sm":"_size-sm_v62jt_30","size-md":"_size-md_v62jt_35",disabled:wg,open:xg,"select-arrow":"_select-arrow_v62jt_48",error:Cg,"select-value":"_select-value_v62jt_62","select-value_xs":"_select-value_xs_v62jt_74","select-placeholder":"_select-placeholder_v62jt_81",hidden:Sg,visible:_g,"select-arrow_xs":"_select-arrow_xs_v62jt_106","select-dropdown":"_select-dropdown_v62jt_116","select-menu":"_select-menu_v62jt_126","select-menu-item":"_select-menu-item_v62jt_145","select-menu-item-first":"_select-menu-item-first_v62jt_158",selected:bg,"overflow-tooltip-container":"_overflow-tooltip-container_v62jt_167","overflow-tooltip-text":"_overflow-tooltip-text_v62jt_172","empty-block":"_empty-block_v62jt_179"};function ca({value:e,onChange:t,multiple:n=!1,returnedValue:i,renderItem:s,placeholder:o,items:r=[],fullWidth:a,size:l="md",showDefaultItem:c,disabled:u,label:d,firstItem:f,lastItem:h,observer:p,emptyText:g,onBlur:x,prompt:w,error:C,errorText:y}){const[S,_]=Yt(e,n?[]:null),b=v.useRef(null),E=v.useRef(null),[R,I]=v.useState(!1),A=v.useMemo(()=>n?S||[]:S!=null?[S]:[],[S,n]),z=v.useCallback(j=>i?i(j):j,[i]),J=v.useMemo(()=>{const j=new Map;return r.forEach(H=>{j.set(z(H),H)}),j},[r,z]),N=Eo(b,R),ee=!r.length&&!C,te=j=>{const H=z(j);if(n){const P=A.includes(H)?A.filter(L=>L!==H):[...A,H];_(P),t?.(P)}else _(H),t?.(H),I(!1)},se=j=>{if(!n)return;const H=A.filter(P=>P!==j);_(H),t?.(H)},$=()=>{const j=n?[]:null;_(j),t?.(j),n||I(!1)};v.useEffect(()=>{if(!R)return;const j=H=>{const P=H.target;!b.current?.contains(P)&&!E.current?.contains(P)&&(I(!1),x?.())};return document.addEventListener("mousedown",j),()=>document.removeEventListener("mousedown",j)},[R,x]);const K=()=>{if(!A.length)return m.jsx(B,{variant:l==="xs"?"caption-1":"body-2",textOverflow:"ellipsis",overflow:"hidden",colorName:"tertiary",children:o??"Select..."});if(n)return m.jsx(V,{flexWrap:"wrap",row:!0,gap:10,children:A.map(P=>{const L=J.get(P);return L?m.jsx(Gi,{size:"sm",label:s(L),onDelete:oe=>{oe.stopPropagation(),se(P)}},P):null})});const j=J.get(A[0]);if(!j)return m.jsx(B,{variant:l==="xs"?"caption-1":"body-2",textOverflow:"ellipsis",overflow:"hidden",colorName:"tertiary",children:o});const H=s(j);return typeof H=="string"?m.jsx(B,{variant:l==="xs"?"caption-1":"body-2",tag:"p",textOverflow:"ellipsis",overflow:"hidden",children:H}):m.jsx(m.Fragment,{children:H})},ne=R&&m.jsx(Hi,{children:m.jsx(Bi.div,{ref:E,className:ie["select-dropdown"],initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.25,ease:"easeInOut"},style:{...N,position:"absolute",zIndex:1},children:m.jsxs("ul",{className:ie["select-menu"],children:[c&&!n&&m.jsx(V,{className:ie["select-menu-item"],role:"option",onClick:$,children:m.jsx(B,{variant:"body-2",colorName:"tertiary",children:o})}),f&&m.jsx(V,{className:M.cx(ie["select-menu-item"],ie["select-menu-item-first"]),children:f}),ee&&m.jsxs(V,{className:ie["empty-block"],children:[m.jsx(V,{w:20,h:20,children:m.jsx(Lh,{})}),m.jsx(B,{variant:"body-2",children:g??"There is nothing yet"})]}),r.map(j=>{const H=z(j),P=A.includes(H);return m.jsxs(V,{row:!0,gap:10,alignItems:"center",className:M.cx(ie["select-menu-item"],{[ie.selected]:P}),role:"option",relative:!0,onClick:()=>te(j),children:[n&&m.jsx(Ni,{size:"sm",checked:P}),typeof s(j)=="string"?m.jsx(B,{variant:"body-2",tag:"p",wordBreak:"break-all",whiteSpace:"break-spaces",children:s(j)}):s(j),m.jsx(it,{})]},H)}),p,h&&m.jsx(V,{className:M.cx(ie["select-menu-item"],ie["select-menu-item-first"]),children:h})]})},"dropdown")});return m.jsxs(V,{relative:!0,display:"inline-block",minWidth:120,w:a?"full":"auto",children:[typeof d=="string"?m.jsx(B,{variant:"body-2",colorName:"tertiary",fontWeight:"regular",mb:l==="sm"?4:8,children:d}):d,m.jsxs(V,{ref:b,row:!0,gap:10,tabIndex:u?-1:0,role:"button",alignItems:"flex-start","aria-haspopup":"listbox",relative:!0,w:"100%",className:M.cx(ie["select-input"],ie[`size-${l}`],{[ie.error]:C,[ie.disabled]:u,[ie.open]:R}),onClick:()=>!u&&I(j=>!j),onBlur:x,children:[m.jsx(V,{className:M.cx(ie["select-value"]),children:K()}),m.jsx(V,{className:M.cx(ie["select-arrow"],ie[`select-arrow_${l}`]),children:m.jsx(Ih,{})})]}),typeof w=="string"?m.jsx(B,{variant:"caption-1",colorName:"tertiary",mt:4,children:w}):w,C&&y&&m.jsx(B,{tag:"p",colorName:"negative",variant:"body-2",mt:5,children:y}),m.jsx(hc,{initial:!1,children:ne})]})}const Rg=e=>T.createElement("svg",{width:10,height:10,viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.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"})),Pg=e=>T.createElement("svg",{width:12,height:12,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.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"})),Mg="_container_e7tan_8",Tg="_disabled_e7tan_17",Eg="_reverse_e7tan_21",Vg="_input_e7tan_25",Ag="_switchContainer_e7tan_35",Dg="_variant_accent_e7tan_43",Fg="_variant_secondary_e7tan_47",kg="_thumb_e7tan_51",Ig="_variant_theme_e7tan_54",Lg="_moon_e7tan_58",jg="_fire_e7tan_61",$g="_size_sm_e7tan_74",Og="_size_md_e7tan_80",zg="_size_lg_e7tan_86",we={container:Mg,disabled:Tg,reverse:Eg,input:Vg,switchContainer:Ag,variant_accent:Dg,variant_secondary:Fg,switch:"_switch_e7tan_35",thumb:kg,variant_theme:Ig,moon:Lg,fire:jg,size_sm:$g,size_md:Og,size_lg:zg},da=v.forwardRef(({title:e,text:t,icon:n,disabled:i,onChange:s,checked:o,defaultValue:r,className:a,size:l="md",variant:c="accent",reverse:u=!1,w:d="auto",...f},h)=>{const[p,g]=Yt(o,r),x=v.useRef(null);v.useImperativeHandle(h,()=>({focus:()=>{x.current?.focus()},blur:()=>{x.current?.blur()},get checked(){return p??!1},setChecked:S=>{g(S),s?.(S)},toggle:()=>{const S=!p;g(S),s?.(S)},isFocused:()=>document.activeElement===x.current,isDisabled:()=>i??!1,getInputElement:()=>x.current,checkValidity:()=>x.current?.checkValidity()??!0,reset:()=>{const S=r??!1;g(S),s?.(S)}}),[p,g,s,i,r]);const w=v.useCallback(S=>{g(S.target.checked),s?.(S.target.checked)},[s]),C=v.useMemo(()=>typeof e=="string"?m.jsx(B,{variant:"body-1",colorName:"primary",fontWeight:"medium",children:e}):e,[e]),y=v.useMemo(()=>typeof t=="string"?m.jsx(B,{variant:"body-2",colorName:"secondary",fontWeight:"regular",children:t}):t,[t]);return m.jsxs(V,{row:!0,w:d,gap:"var(--spacing-sm)",children:[m.jsxs("label",{className:M.cx(we.container,a,{[we.disabled]:i,[we.reverse]:u}),children:[m.jsxs(V,{className:M.cx(we.switchContainer,we[`size_${l}`],we[`variant_${c}`]),children:[m.jsx("input",{ref:x,type:"checkbox",checked:p,className:we.input,onChange:w,disabled:i,...f}),m.jsx("div",{className:we.switch,children:m.jsx("div",{className:we.thumb,children:c==="theme"&&m.jsxs(m.Fragment,{children:[m.jsx(Pg,{className:we.moon}),m.jsx(Rg,{className:we.fire})]})})})]}),m.jsxs(V,{gap:"var(--spacing-xs)",children:[C,y]})]}),n]})});da.displayName="Switch";const Bg="_primary_svt6d_8",Ng="_secondary_svt6d_13",Hg="_button_svt6d_18",Ve={primary:Bg,secondary:Ng,button:Hg,"button-active":"_button-active_svt6d_32","icon-container":"_icon-container_svt6d_35","button-primary":"_button-primary_svt6d_47","button-secondary":"_button-secondary_svt6d_51","button-disabled":"_button-disabled_svt6d_55","full-width":"_full-width_svt6d_60"};function Gg({value:e,onChange:t,options:n,variant:i="primary",fullWidth:s=!1,className:o}){return m.jsx(V,{row:!0,alignItems:"center",borderRadius:"var(--corner-md)",p:"var(--spacing-xs)",gap:"var(--spacing-md)",className:M.cx(Ve[i],s&&Ve["full-width"],o),children:n.map(r=>{const a=r.value===e,l=r.disabled,c=r.separatorAfter??!1;return m.jsxs(v.Fragment,{children:[m.jsxs("button",{type:"button",disabled:l,className:M.cx(Ve.button,s&&Ve["full-width"],a&&Ve["button-active"],a&&Ve[`button-${i}`],l&&Ve["button-disabled"]),onClick:()=>!l&&t(r.value),children:[r.icon&&m.jsx(V,{alignItems:"center",justifyContent:"center",className:Ve["icon-container"],children:r.icon}),r.label&&m.jsx(B,{colorName:a?"primary":"tertiary",children:r.label}),!l&&m.jsx(it,{color:"var(--fill-bg-overlay-primary)"})]}),c&&m.jsx(V,{w:1,h:24,backgroundColor:"var(--fill-bg-tertiary)"})]},r.value)})})}const Wg="_header_446to_8",Ug={header:Wg},fa=v.forwardRef(({title:e,subtitle:t,onClose:n,w:i="full",p:s,py:o,px:r="var(--spacing-2xl)",pt:a="var(--spacing-2xl)",pb:l="var(--spacing-lg)",row:c=!0,justifyContent:u="space-between",showCloseButton:d=!0},f)=>m.jsxs(V,{w:i,p:s,py:o,px:r,pt:a,pb:l,row:c,justifyContent:u,ref:f,className:Ug.header,children:[m.jsxs(V,{gap:"var(--spacing-sm)",children:[m.jsx(B,{variant:"title-3",colorName:"primary",fontWeight:"semibold",children:e}),m.jsx(B,{variant:"body-1",colorName:"tertiary",fontWeight:"medium",children:t})]}),d&&m.jsx(V,{children:m.jsx(xt,{onClick:n,color:"neutral",children:m.jsx(To,{})})})]}));fa.displayName="ModalHeader";const Kg="_footer_1bo08_8",qg={footer:Kg},ha=v.forwardRef(({children:e,row:t=!0,flex:n=!0,gap:i="var(--spacing-lg)",p:s="var(--spacing-2xl)",className:o,...r},a)=>m.jsx(V,{flex:n,row:t,gap:i,p:s,className:M.cx(qg.footer,o),ref:a,...r,children:e}));ha.displayName="ModalFooter";function Ke(e,t,n){let i=n.initialDeps??[],s;function o(){var r,a,l,c;let u;n.key&&((r=n.debug)!=null&&r.call(n))&&(u=Date.now());const d=e();if(!(d.length!==i.length||d.some((p,g)=>i[g]!==p)))return s;i=d;let h;if(n.key&&((a=n.debug)!=null&&a.call(n))&&(h=Date.now()),s=t(...d),n.key&&((l=n.debug)!=null&&l.call(n))){const p=Math.round((Date.now()-u)*100)/100,g=Math.round((Date.now()-h)*100)/100,x=g/16,w=(C,y)=>{for(C=String(C);C.length<y;)C=" "+C;return C};console.info(`%c⏱ ${w(g,5)} /${w(p,5)} ms`,`
12
+ `,jl=M.css({pointerEvents:"auto",animation:`${Ll} 0.2s ease-out`,backgroundColor:"var(--fill-bg-primary)",borderRadius:"var(--corner-md)",boxShadow:"0 4px 20px 0 var(--shadow-accent-secondary)"}),$l=({children:e,content:t,isOpen:n,onOpenChange:i,placement:s="bottom",trigger:o="click",offset:r=12,closeOnClickOutside:a=!0,closeOnEsc:l=!0,className:u,contentClassName:c,style:d,disabled:f=!1,openDelay:h=200,closeDelay:p=200,zIndex:g=1,popoverContentComponent:x=Il})=>{const[w,C]=v.useState(!1),y=n!==void 0,S=y?n:w,_=v.useRef(null),b=v.useRef(null),E=v.useRef(),R=v.useRef(),[I,A]=v.useState({top:0,left:0}),[z,J]=v.useState(s),N=v.useCallback(P=>{f||(y||C(P),i?.(P))},[f,y,i]),ee=v.useCallback(()=>{if(typeof window>"u")return s;const P=_.current?.getBoundingClientRect();if(!P)return s;const L=b.current?.getBoundingClientRect();if(!L)return s;const oe=P.top,W=window.innerHeight-P.bottom,U=P.left,ye=window.innerWidth-P.right;if(s.startsWith("top")){if(oe<L.height+r&&W>L.height+r)return s.replace("top","bottom")}else if(s.startsWith("bottom")&&W<L.height+r&&oe>L.height+r)return s.replace("bottom","top");if(s.startsWith("left")){if(U<L.width+r&&ye>L.width+r)return s.replace("left","right")}else if(s.startsWith("right")&&ye<L.width+r&&U>L.width+r)return s.replace("right","left");return s},[r,s]),te=v.useCallback(()=>{if(!_.current||!b.current||typeof window>"u")return;const P=_.current.getBoundingClientRect(),L=b.current.getBoundingClientRect(),oe=ee();J(oe);let W=0,U=0;switch(oe){case"top":W=P.top-L.height-r,U=P.left+P.width/2-L.width/2;break;case"top-start":W=P.top-L.height-r,U=P.left;break;case"top-end":W=P.top-L.height-r,U=P.right-L.width;break;case"bottom":W=P.bottom+r,U=P.left+P.width/2-L.width/2;break;case"bottom-start":W=P.bottom+r,U=P.left;break;case"bottom-end":W=P.bottom+r,U=P.right-L.width;break;case"left":W=P.top+P.height/2-L.height/2,U=P.left-L.width-r;break;case"left-start":W=P.top,U=P.left-L.width-r;break;case"left-end":W=P.bottom-L.height,U=P.left-L.width-r;break;case"right":W=P.top+P.height/2-L.height/2,U=P.right+r;break;case"right-start":W=P.top,U=P.right+r;break;case"right-end":W=P.bottom-L.height,U=P.right+r;break}W+=window.scrollY,U+=window.scrollX;const ye=r,je=window.scrollY+ye,$e=window.scrollY+window.innerHeight-ye,Oe=window.scrollX+ye,_e=window.scrollX+window.innerWidth-ye;U<Oe&&(U=Oe),U+L.width>_e&&(U=_e-L.width),W<je&&(W=je),W+L.height>$e&&(W=$e-L.height),A({top:W,left:U})},[r,ee]);v.useLayoutEffect(()=>{if(!S||typeof window>"u")return;te();const P=()=>te(),L=()=>{if(!_.current||!b.current)return;ee()!==z&&te()};window.addEventListener("resize",P),window.addEventListener("scroll",L,!0);const oe=new ResizeObserver(te);return _.current&&oe.observe(_.current),()=>{window.removeEventListener("resize",P),window.removeEventListener("scroll",L,!0),oe.disconnect()}},[S,te,z,ee]),v.useEffect(()=>{if(!S||!a||typeof document>"u")return;const P=L=>{const oe=L.target;_.current?.contains(oe)||b.current?.contains(oe)||N(!1)};return document.addEventListener("mousedown",P),()=>document.removeEventListener("mousedown",P)},[S,a,N]),v.useEffect(()=>{if(!S||!l||typeof document>"u")return;const P=L=>{L.key==="Escape"&&N(!1)};return document.addEventListener("keydown",P),()=>document.removeEventListener("keydown",P)},[S,l,N]);const se=v.useCallback(()=>{o==="click"&&N(!S)},[o,S,N]),$=v.useCallback(()=>{o==="hover"&&(R.current&&clearTimeout(R.current),E.current=setTimeout(()=>{N(!0)},h))},[o,h,N]),K=v.useCallback(()=>{o==="hover"&&(E.current&&clearTimeout(E.current),R.current=setTimeout(()=>{N(!1)},p))},[o,p,N]),ne=v.useCallback(()=>{o==="focus"&&N(!0)},[o,N]),j=v.useCallback(()=>{o==="focus"&&N(!1)},[o,N]);v.useEffect(()=>()=>{E.current&&clearTimeout(E.current),R.current&&clearTimeout(R.current)},[]);const H=v.cloneElement(e,{ref:_,onClick:P=>{e.props.onClick?.(P),se()},onMouseEnter:P=>{e.props.onMouseEnter?.(P),$()},onMouseLeave:P=>{e.props.onMouseLeave?.(P),K()},onFocus:P=>{e.props.onFocus?.(P),ne()},onBlur:P=>{e.props.onBlur?.(P),j()},"aria-describedby":S?"popover-content":void 0,"aria-expanded":S});return m.jsxs(m.Fragment,{children:[H,S&&m.jsx(Zt,{children:m.jsx(V,{ref:b,id:"popover-content",role:"tooltip",className:M.cx(jl,u),style:{...d,position:"absolute",top:`${I.top}px`,left:`${I.left}px`,zIndex:g},onMouseEnter:o==="hover"?$:void 0,onMouseLeave:o==="hover"?K:void 0,children:m.jsx(x,{className:c,children:t})})})]})},Ol={sm:28,md:32,lg:40},li=v.forwardRef(({label:e,color:t="primary",size:n="md",onClick:i,onDelete:s,avatar:o,icon:r,disabled:a,className:l},u)=>{const c=v.useRef(null),d=v.useMemo(()=>{switch(t){case"primary":return{bg:"var(--status-neutral-tint-low)",color:"var(--text-primary)"};case"accent":return{bg:"var(--status-accent-tint-low)",color:"var(--text-accent)"};case"warning":return{bg:"var(--status-warning-tint-low)",color:"var(--text-warning)"};case"positive":return{bg:"var(--status-positive-tint-low)",color:"var(--text-positive)"};case"negative":return{bg:"var(--status-negative-tint-low)",color:"var(--text-negative)"};default:return{bg:"var(--status-neutral-tint-low)",color:"var(--text-primary)"}}},[t]),f=M.css({cursor:a?"not-allowed":i?"pointer":"default",opacity:a?.5:1,userSelect:"none",position:"relative",transition:"background-color 0.2s, opacity 0.2s","&:hover":a?void 0:{backgroundColor:d.bg}}),h=M.css({cursor:"pointer",opacity:.6,"&:hover":{opacity:1}});return m.jsxs(V,{ref:p=>{c.current=p,typeof u=="function"?u(p):u&&(u.current=p)},row:!0,alignItems:"center",gap:6,px:10,py:4,h:Ol[n],maxWidth:196,overflow:"hidden",borderRadius:"var(--corner-sm)",backgroundColor:d.bg,color:d.color,onClick:i,className:M.cx(f,l),children:[i&&m.jsx(st,{}),o&&m.jsx(V,{w:20,h:20,borderRadius:"50%",overflow:"hidden",children:o}),r&&m.jsx(V,{children:r}),typeof e=="string"?m.jsx(B,{variant:"caption-1",colorName:t,textOverflow:"ellipsis",overflow:"hidden",children:e}):e,s&&!a&&m.jsx(B,{className:h,colorName:t,onClick:p=>{p.stopPropagation(),s(p)},children:"×"})]})});li.displayName="Tag";const zl="_modal_1irhv_8",Bl="_closeButton_1irhv_24",Nl="_size_lg_1irhv_31",Hl="_size_md_1irhv_34",Gl="_size_sm_1irhv_37",fn={modal:zl,"modal-animation":"_modal-animation_1irhv_1",closeButton:Bl,size_lg:Nl,size_md:Hl,size_sm:Gl},Vo=v.forwardRef(({isOpen:e=!1,onClose:t,overlayClassName:n,modalClassName:i,size:s="md",closeOnBackdropClick:o=!0,closeOnEsc:r=!0,disableBodyScroll:a=!0,showAbsoluteCloseButton:l=!1,children:u},c)=>{v.useEffect(()=>{if(a&&e&&typeof window<"u"&&typeof document<"u"){const h=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=h}}},[e,a]);const d=v.useCallback(h=>{h.key==="Escape"&&t&&t()},[t]);v.useEffect(()=>{if(typeof window<"u"&&typeof document<"u"&&r&&e)return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[e,r,d]);const f=v.useCallback(h=>{h.target===h.currentTarget&&o&&t&&t()},[o,t]);return e?m.jsx(Zt,{children:m.jsx(V,{row:!0,absoluteFill:!0,center:!0,flex:1,onClick:f,display:e?"flex":"none",backgroundColor:"var(--fill-bg-overlay-primary)",className:n,zIndex:1,children:m.jsxs(V,{ref:c,className:M.cx(fn.modal,fn[`size_${s}`],i),relative:!0,children:[l&&m.jsx(wt,{className:fn.closeButton,onClick:t,color:"neutral",children:m.jsx(To,{})}),u]})})}):null});Vo.displayName="Modal";const ui=v.createContext({});function ci(e){const t=v.useRef(null);return t.current===null&&(t.current=e()),t.current}const di=typeof window<"u",Ao=di?v.useLayoutEffect:v.useEffect,Jt=v.createContext(null);function fi(e,t){e.indexOf(t)===-1&&e.push(t)}function hi(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Me=(e,t,n)=>n>t?t:n<e?e:n;function In(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let ot=()=>{},Te=()=>{};process.env.NODE_ENV!=="production"&&(ot=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(In(t,n))},Te=(e,t,n)=>{if(!e)throw new Error(In(t,n))});const Ee={},Do=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Fo(e){return typeof e=="object"&&e!==null}const ko=e=>/^0[^.\s]+$/u.test(e);function gi(e){let t;return()=>(t===void 0&&(t=e()),t)}const ve=e=>e,Wl=(e,t)=>n=>t(e(n)),Pt=(...e)=>e.reduce(Wl),xt=(e,t,n)=>{const i=t-e;return i===0?1:(n-e)/i};class pi{constructor(){this.subscriptions=[]}add(t){return fi(this.subscriptions,t),()=>hi(this.subscriptions,t)}notify(t,n,i){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,i);else for(let o=0;o<s;o++){const r=this.subscriptions[o];r&&r(t,n,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ce=e=>e*1e3,me=e=>e/1e3;function Io(e,t){return t?e*(1e3/t):0}const ts=new Set;function mi(e,t,n){e||ts.has(t)||(console.warn(In(t,n)),ts.add(t))}const Lo=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Ul=1e-7,Kl=12;function ql(e,t,n,i,s){let o,r,a=0;do r=t+(n-t)/2,o=Lo(r,i,s)-e,o>0?n=r:t=r;while(Math.abs(o)>Ul&&++a<Kl);return r}function Mt(e,t,n,i){if(e===t&&n===i)return ve;const s=o=>ql(o,0,1,e,n);return o=>o===0||o===1?o:Lo(s(o),t,i)}const jo=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,$o=e=>t=>1-e(1-t),Oo=Mt(.33,1.53,.69,.99),vi=$o(Oo),zo=jo(vi),Bo=e=>(e*=2)<1?.5*vi(e):.5*(2-Math.pow(2,-10*(e-1))),yi=e=>1-Math.sin(Math.acos(e)),No=$o(yi),Ho=jo(yi),Xl=Mt(.42,0,1,1),Yl=Mt(0,0,.58,1),Go=Mt(.42,0,.58,1),Zl=e=>Array.isArray(e)&&typeof e[0]!="number",Wo=e=>Array.isArray(e)&&typeof e[0]=="number",ns={linear:ve,easeIn:Xl,easeInOut:Go,easeOut:Yl,circIn:yi,circInOut:Ho,circOut:No,backIn:vi,backInOut:zo,backOut:Oo,anticipate:Bo},Jl=e=>typeof e=="string",is=e=>{if(Wo(e)){Te(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,i,s]=e;return Mt(t,n,i,s)}else if(Jl(e))return Te(ns[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),ns[e];return e},Vt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Ql(e,t){let n=new Set,i=new Set,s=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){r.has(c)&&(u.schedule(c),e()),c(a)}const u={schedule:(c,d=!1,f=!1)=>{const p=f&&s?n:i;return d&&r.add(c),p.has(c)||p.add(c),c},cancel:c=>{i.delete(c),r.delete(c)},process:c=>{if(a=c,s){o=!0;return}s=!0,[n,i]=[i,n],n.forEach(l),n.clear(),s=!1,o&&(o=!1,u.process(c))}};return u}const eu=40;function Uo(e,t){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=Vt.reduce((y,S)=>(y[S]=Ql(o),y),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:f,render:h,postRender:p}=r,g=()=>{const y=Ee.useManualTiming?s.timestamp:performance.now();n=!1,Ee.useManualTiming||(s.delta=i?1e3/60:Math.max(Math.min(y-s.timestamp,eu),1)),s.timestamp=y,s.isProcessing=!0,a.process(s),l.process(s),u.process(s),c.process(s),d.process(s),f.process(s),h.process(s),p.process(s),s.isProcessing=!1,n&&t&&(i=!1,e(g))},x=()=>{n=!0,i=!0,s.isProcessing||e(g)};return{schedule:Vt.reduce((y,S)=>{const _=r[S];return y[S]=(b,E=!1,R=!1)=>(n||x(),_.schedule(b,E,R)),y},{}),cancel:y=>{for(let S=0;S<Vt.length;S++)r[Vt[S]].cancel(y)},state:s,steps:r}}const{schedule:q,cancel:Fe,state:re,steps:hn}=Uo(typeof requestAnimationFrame<"u"?requestAnimationFrame:ve,!0);let $t;function tu(){$t=void 0}const de={now:()=>($t===void 0&&de.set(re.isProcessing||Ee.useManualTiming?re.timestamp:performance.now()),$t),set:e=>{$t=e,queueMicrotask(tu)}},Ko=e=>t=>typeof t=="string"&&t.startsWith(e),wi=Ko("--"),nu=Ko("var(--"),xi=e=>nu(e)?iu.test(e.split("/*")[0].trim()):!1,iu=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,rt={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ct={...rt,transform:e=>Me(0,1,e)},At={...rt,default:1},ht=e=>Math.round(e*1e5)/1e5,Ci=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function su(e){return e==null}const ou=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Si=(e,t)=>n=>!!(typeof n=="string"&&ou.test(n)&&n.startsWith(e)||t&&!su(n)&&Object.prototype.hasOwnProperty.call(n,t)),qo=(e,t,n)=>i=>{if(typeof i!="string")return i;const[s,o,r,a]=i.match(Ci);return{[e]:parseFloat(s),[t]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},ru=e=>Me(0,255,e),gn={...rt,transform:e=>Math.round(ru(e))},He={test:Si("rgb","red"),parse:qo("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:i=1})=>"rgba("+gn.transform(e)+", "+gn.transform(t)+", "+gn.transform(n)+", "+ht(Ct.transform(i))+")"};function au(e){let t="",n="",i="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),i=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),i=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,i+=i,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}}const Ln={test:Si("#"),parse:au,transform:He.transform},Tt=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ae=Tt("deg"),be=Tt("%"),k=Tt("px"),lu=Tt("vh"),uu=Tt("vw"),ss={...be,parse:e=>be.parse(e)/100,transform:e=>be.transform(e*100)},Xe={test:Si("hsl","hue"),parse:qo("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:i=1})=>"hsla("+Math.round(e)+", "+be.transform(ht(t))+", "+be.transform(ht(n))+", "+ht(Ct.transform(i))+")"},Q={test:e=>He.test(e)||Ln.test(e)||Xe.test(e),parse:e=>He.test(e)?He.parse(e):Xe.test(e)?Xe.parse(e):Ln.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?He.transform(e):Xe.transform(e),getAnimatableNone:e=>{const t=Q.parse(e);return t.alpha=0,Q.transform(t)}},cu=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function du(e){return isNaN(e)&&typeof e=="string"&&(e.match(Ci)?.length||0)+(e.match(cu)?.length||0)>0}const Xo="number",Yo="color",fu="var",hu="var(",os="${}",gu=/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 St(e){const t=e.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const a=t.replace(gu,l=>(Q.test(l)?(i.color.push(o),s.push(Yo),n.push(Q.parse(l))):l.startsWith(hu)?(i.var.push(o),s.push(fu),n.push(l)):(i.number.push(o),s.push(Xo),n.push(parseFloat(l))),++o,os)).split(os);return{values:n,split:a,indexes:i,types:s}}function Zo(e){return St(e).values}function Jo(e){const{split:t,types:n}=St(e),i=t.length;return s=>{let o="";for(let r=0;r<i;r++)if(o+=t[r],s[r]!==void 0){const a=n[r];a===Xo?o+=ht(s[r]):a===Yo?o+=Q.transform(s[r]):o+=s[r]}return o}}const pu=e=>typeof e=="number"?0:Q.test(e)?Q.getAnimatableNone(e):e;function mu(e){const t=Zo(e);return Jo(e)(t.map(pu))}const ke={test:du,parse:Zo,createTransformer:Jo,getAnimatableNone:mu};function pn(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function vu({hue:e,saturation:t,lightness:n,alpha:i}){e/=360,t/=100,n/=100;let s=0,o=0,r=0;if(!t)s=o=r=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;s=pn(l,a,e+1/3),o=pn(l,a,e),r=pn(l,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:i}}function Ht(e,t){return n=>n>0?t:e}const Y=(e,t,n)=>e+(t-e)*n,mn=(e,t,n)=>{const i=e*e,s=n*(t*t-i)+i;return s<0?0:Math.sqrt(s)},yu=[Ln,He,Xe],wu=e=>yu.find(t=>t.test(e));function rs(e){const t=wu(e);if(ot(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===Xe&&(n=vu(n)),n}const as=(e,t)=>{const n=rs(e),i=rs(t);if(!n||!i)return Ht(e,t);const s={...n};return o=>(s.red=mn(n.red,i.red,o),s.green=mn(n.green,i.green,o),s.blue=mn(n.blue,i.blue,o),s.alpha=Y(n.alpha,i.alpha,o),He.transform(s))},jn=new Set(["none","hidden"]);function xu(e,t){return jn.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Cu(e,t){return n=>Y(e,t,n)}function _i(e){return typeof e=="number"?Cu:typeof e=="string"?xi(e)?Ht:Q.test(e)?as:bu:Array.isArray(e)?Qo:typeof e=="object"?Q.test(e)?as:Su:Ht}function Qo(e,t){const n=[...e],i=n.length,s=e.map((o,r)=>_i(o)(o,t[r]));return o=>{for(let r=0;r<i;r++)n[r]=s[r](o);return n}}function Su(e,t){const n={...e,...t},i={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(i[s]=_i(e[s])(e[s],t[s]));return s=>{for(const o in i)n[o]=i[o](s);return n}}function _u(e,t){const n=[],i={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const o=t.types[s],r=e.indexes[o][i[o]],a=e.values[r]??0;n[s]=a,i[o]++}return n}const bu=(e,t)=>{const n=ke.createTransformer(t),i=St(e),s=St(t);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?jn.has(e)&&!s.values.length||jn.has(t)&&!i.values.length?xu(e,t):Pt(Qo(_u(i,s),s.values),n):(ot(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Ht(e,t))};function er(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Y(e,t,n):_i(e)(e,t)}const Ru=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>q.update(t,n),stop:()=>Fe(t),now:()=>re.isProcessing?re.timestamp:de.now()}},tr=(e,t,n=10)=>{let i="";const s=Math.max(Math.round(t/n),2);for(let o=0;o<s;o++)i+=Math.round(e(o/(s-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},Gt=2e4;function bi(e){let t=0;const n=50;let i=e.next(t);for(;!i.done&&t<Gt;)t+=n,i=e.next(t);return t>=Gt?1/0:t}function Pu(e,t=100,n){const i=n({...e,keyframes:[0,t]}),s=Math.min(bi(i),Gt);return{type:"keyframes",ease:o=>i.next(s*o).value/t,duration:me(s)}}const Mu=5;function nr(e,t,n){const i=Math.max(t-Mu,0);return Io(n-e(i),t-i)}const X={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},vn=.001;function Tu({duration:e=X.duration,bounce:t=X.bounce,velocity:n=X.velocity,mass:i=X.mass}){let s,o;ot(e<=Ce(X.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let r=1-t;r=Me(X.minDamping,X.maxDamping,r),e=Me(X.minDuration,X.maxDuration,me(e)),r<1?(s=u=>{const c=u*r,d=c*e,f=c-n,h=$n(u,r),p=Math.exp(-d);return vn-f/h*p},o=u=>{const d=u*r*e,f=d*n+n,h=Math.pow(r,2)*Math.pow(u,2)*e,p=Math.exp(-d),g=$n(Math.pow(u,2),r);return(-s(u)+vn>0?-1:1)*((f-h)*p)/g}):(s=u=>{const c=Math.exp(-u*e),d=(u-n)*e+1;return-vn+c*d},o=u=>{const c=Math.exp(-u*e),d=(n-u)*(e*e);return c*d});const a=5/e,l=Vu(s,o,a);if(e=Ce(e),isNaN(l))return{stiffness:X.stiffness,damping:X.damping,duration:e};{const u=Math.pow(l,2)*i;return{stiffness:u,damping:r*2*Math.sqrt(i*u),duration:e}}}const Eu=12;function Vu(e,t,n){let i=n;for(let s=1;s<Eu;s++)i=i-e(i)/t(i);return i}function $n(e,t){return e*Math.sqrt(1-t*t)}const Au=["duration","bounce"],Du=["stiffness","damping","mass"];function ls(e,t){return t.some(n=>e[n]!==void 0)}function Fu(e){let t={velocity:X.velocity,stiffness:X.stiffness,damping:X.damping,mass:X.mass,isResolvedFromDuration:!1,...e};if(!ls(e,Du)&&ls(e,Au))if(e.visualDuration){const n=e.visualDuration,i=2*Math.PI/(n*1.2),s=i*i,o=2*Me(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:X.mass,stiffness:s,damping:o}}else{const n=Tu(e);t={...t,...n,mass:X.mass},t.isResolvedFromDuration=!0}return t}function Wt(e=X.visualDuration,t=X.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:i,restDelta:s}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:u,mass:c,duration:d,velocity:f,isResolvedFromDuration:h}=Fu({...n,velocity:-me(n.velocity||0)}),p=f||0,g=u/(2*Math.sqrt(l*c)),x=r-o,w=me(Math.sqrt(l/c)),C=Math.abs(x)<5;i||(i=C?X.restSpeed.granular:X.restSpeed.default),s||(s=C?X.restDelta.granular:X.restDelta.default);let y;if(g<1){const _=$n(w,g);y=b=>{const E=Math.exp(-g*w*b);return r-E*((p+g*w*x)/_*Math.sin(_*b)+x*Math.cos(_*b))}}else if(g===1)y=_=>r-Math.exp(-w*_)*(x+(p+w*x)*_);else{const _=w*Math.sqrt(g*g-1);y=b=>{const E=Math.exp(-g*w*b),R=Math.min(_*b,300);return r-E*((p+g*w*x)*Math.sinh(R)+_*x*Math.cosh(R))/_}}const S={calculatedDuration:h&&d||null,next:_=>{const b=y(_);if(h)a.done=_>=d;else{let E=_===0?p:0;g<1&&(E=_===0?Ce(p):nr(y,_,b));const R=Math.abs(E)<=i,I=Math.abs(r-b)<=s;a.done=R&&I}return a.value=a.done?r:b,a},toString:()=>{const _=Math.min(bi(S),Gt),b=tr(E=>S.next(_*E).value,_,30);return _+"ms "+b},toTransition:()=>{}};return S}Wt.applyToOptions=e=>{const t=Pu(e,100,Wt);return e.ease=t.ease,e.duration=Ce(t.duration),e.type="keyframes",e};function On({keyframes:e,velocity:t=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],f={done:!1,value:d},h=R=>a!==void 0&&R<a||l!==void 0&&R>l,p=R=>a===void 0?l:l===void 0||Math.abs(a-R)<Math.abs(l-R)?a:l;let g=n*t;const x=d+g,w=r===void 0?x:r(x);w!==x&&(g=w-d);const C=R=>-g*Math.exp(-R/i),y=R=>w+C(R),S=R=>{const I=C(R),A=y(R);f.done=Math.abs(I)<=u,f.value=f.done?w:A};let _,b;const E=R=>{h(f.value)&&(_=R,b=Wt({keyframes:[f.value,p(f.value)],velocity:nr(y,R,f.value),damping:s,stiffness:o,restDelta:u,restSpeed:c}))};return E(0),{calculatedDuration:null,next:R=>{let I=!1;return!b&&_===void 0&&(I=!0,S(R),E(R)),_!==void 0&&R>=_?b.next(R-_):(!I&&S(R),f)}}}function ku(e,t,n){const i=[],s=n||Ee.mix||er,o=e.length-1;for(let r=0;r<o;r++){let a=s(e[r],e[r+1]);if(t){const l=Array.isArray(t)?t[r]||ve:t;a=Pt(l,a)}i.push(a)}return i}function Iu(e,t,{clamp:n=!0,ease:i,mixer:s}={}){const o=e.length;if(Te(o===t.length,"Both input and output ranges must be the same length","range-length"),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const r=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=ku(t,i,s),l=a.length,u=c=>{if(r&&c<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(c<e[d+1]);d++);const f=xt(e[d],e[d+1],c);return a[d](f)};return n?c=>u(Me(e[0],e[o-1],c)):u}function Lu(e,t){const n=e[e.length-1];for(let i=1;i<=t;i++){const s=xt(0,t,i);e.push(Y(n,1,s))}}function ju(e){const t=[0];return Lu(t,e.length-1),t}function $u(e,t){return e.map(n=>n*t)}function Ou(e,t){return e.map(()=>t||Go).splice(0,e.length-1)}function Ye({duration:e=300,keyframes:t,times:n,ease:i="easeInOut"}){const s=Zl(i)?i.map(is):is(i),o={done:!1,value:t[0]},r=$u(n&&n.length===t.length?n:ju(t),e),a=Iu(r,t,{ease:Array.isArray(s)?s:Ou(t,s)});return{calculatedDuration:e,next:l=>(o.value=a(l),o.done=l>=e,o)}}const zu=e=>e!==null;function Ri(e,{repeat:t,repeatType:n="loop"},i,s=1){const o=e.filter(zu),a=s<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!a||i===void 0?o[a]:i}const Bu={decay:On,inertia:On,tween:Ye,keyframes:Ye,spring:Wt};function ir(e){typeof e.type=="string"&&(e.type=Bu[e.type])}class Pi{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const Nu=e=>e/100;class Mi extends Pi{constructor(t){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!==de.now()&&this.tick(de.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;ir(t);const{type:n=Ye,repeat:i=0,repeatDelay:s=0,repeatType:o,velocity:r=0}=t;let{keyframes:a}=t;const l=n||Ye;process.env.NODE_ENV!=="production"&&l!==Ye&&Te(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==Ye&&typeof a[0]!="number"&&(this.mixKeyframes=Pt(Nu,er(a[0],a[1])),a=[0,100]);const u=l({...t,keyframes:a});o==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-r})),u.calculatedDuration===null&&(u.calculatedDuration=bi(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+s,this.totalDuration=this.resolvedDuration*(i+1)-s,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:i,totalDuration:s,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return i.next(0);const{delay:u=0,keyframes:c,repeat:d,repeatType:f,repeatDelay:h,type:p,onUpdate:g,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const w=this.currentTime-u*(this.playbackSpeed>=0?1:-1),C=this.playbackSpeed>=0?w<0:w>s;this.currentTime=Math.max(w,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let y=this.currentTime,S=i;if(d){const R=Math.min(this.currentTime,s)/a;let I=Math.floor(R),A=R%1;!A&&R>=1&&(A=1),A===1&&I--,I=Math.min(I,d+1),!!(I%2)&&(f==="reverse"?(A=1-A,h&&(A-=h/a)):f==="mirror"&&(S=r)),y=Me(0,1,A)*a}const _=C?{done:!1,value:c[0]}:S.next(y);o&&(_.value=o(_.value));let{done:b}=_;!C&&l!==null&&(b=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&b);return E&&p!==On&&(_.value=Ri(c,this.options,x,this.speed)),g&&g(_.value),E&&this.finish(),_}then(t,n){return this.finished.then(t,n)}get duration(){return me(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+me(t)}get time(){return me(this.currentTime)}set time(t){t=Ce(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(de.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=me(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Ru,startTime:n}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),this.options.onPlay?.();const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=n??i),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(de.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(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function Hu(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Ge=e=>e*180/Math.PI,zn=e=>{const t=Ge(Math.atan2(e[1],e[0]));return Bn(t)},Gu={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:zn,rotateZ:zn,skewX:e=>Ge(Math.atan(e[1])),skewY:e=>Ge(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Bn=e=>(e=e%360,e<0&&(e+=360),e),us=zn,cs=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),ds=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Wu={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:cs,scaleY:ds,scale:e=>(cs(e)+ds(e))/2,rotateX:e=>Bn(Ge(Math.atan2(e[6],e[5]))),rotateY:e=>Bn(Ge(Math.atan2(-e[2],e[0]))),rotateZ:us,rotate:us,skewX:e=>Ge(Math.atan(e[4])),skewY:e=>Ge(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Nn(e){return e.includes("scale")?1:0}function Hn(e,t){if(!e||e==="none")return Nn(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=Wu,s=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=Gu,s=a}if(!s)return Nn(t);const o=i[t],r=s[1].split(",").map(Ku);return typeof o=="function"?o(r):r[o]}const Uu=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Hn(n,t)};function Ku(e){return parseFloat(e.trim())}const at=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],lt=new Set(at),fs=e=>e===rt||e===k,qu=new Set(["x","y","z"]),Xu=at.filter(e=>!qu.has(e));function Yu(e){const t=[];return Xu.forEach(n=>{const i=e.getValue(n);i!==void 0&&(t.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),t}const We={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Hn(t,"x"),y:(e,{transform:t})=>Hn(t,"y")};We.translateX=We.x;We.translateY=We.y;const Ue=new Set;let Gn=!1,Wn=!1,Un=!1;function sr(){if(Wn){const e=Array.from(Ue).filter(i=>i.needsMeasurement),t=new Set(e.map(i=>i.element)),n=new Map;t.forEach(i=>{const s=Yu(i);s.length&&(n.set(i,s),i.render())}),e.forEach(i=>i.measureInitialState()),t.forEach(i=>{i.render();const s=n.get(i);s&&s.forEach(([o,r])=>{i.getValue(o)?.set(r)})}),e.forEach(i=>i.measureEndState()),e.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}Wn=!1,Gn=!1,Ue.forEach(e=>e.complete(Un)),Ue.clear()}function or(){Ue.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Wn=!0)})}function Zu(){Un=!0,or(),sr(),Un=!1}class Ti{constructor(t,n,i,s,o,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=i,this.motionValue=s,this.element=o,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(Ue.add(this),Gn||(Gn=!0,q.read(or),q.resolveKeyframes(sr))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:i,motionValue:s}=this;if(t[0]===null){const o=s?.get(),r=t[t.length-1];if(o!==void 0)t[0]=o;else if(i&&n){const a=i.readValue(n,r);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=r),s&&o===void 0&&s.set(t[0])}Hu(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Ue.delete(this)}cancel(){this.state==="scheduled"&&(Ue.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Ju=e=>e.startsWith("--");function Qu(e,t,n){Ju(t)?e.style.setProperty(t,n):e.style[t]=n}const ec=gi(()=>window.ScrollTimeline!==void 0),tc={};function nc(e,t){const n=gi(e);return()=>tc[t]??n()}const rr=nc(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ft=([e,t,n,i])=>`cubic-bezier(${e}, ${t}, ${n}, ${i})`,hs={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ft([0,.65,.55,1]),circOut:ft([.55,0,1,.45]),backIn:ft([.31,.01,.66,-.59]),backOut:ft([.33,1.53,.69,.99])};function ar(e,t){if(e)return typeof e=="function"?rr()?tr(e,t):"ease-out":Wo(e)?ft(e):Array.isArray(e)?e.map(n=>ar(n,t)||hs.easeOut):hs[e]}function ic(e,t,n,{delay:i=0,duration:s=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[t]:n};l&&(c.offset=l);const d=ar(a,s);Array.isArray(d)&&(c.easing=d);const f={delay:i,duration:s,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),e.animate(c,f)}function lr(e){return typeof e=="function"&&"applyToOptions"in e}function sc({type:e,...t}){return lr(e)&&rr()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class oc extends Pi{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:i,keyframes:s,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!o,this.allowFlatten=r,this.options=t,Te(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=sc(t);this.animation=ic(n,i,s,u,o),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const c=Ri(s,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):Qu(n,i,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:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return me(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+me(t)}get time(){return me(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Ce(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&ec()?(this.animation.timeline=t,ve):n(this)}}const ur={anticipate:Bo,backInOut:zo,circInOut:Ho};function rc(e){return e in ur}function ac(e){typeof e.ease=="string"&&rc(e.ease)&&(e.ease=ur[e.ease])}const gs=10;class lc extends oc{constructor(t){ac(t),ir(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:i,onComplete:s,element:o,...r}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new Mi({...r,autoplay:!1}),l=Ce(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-gs).value,a.sample(l).value,gs),a.stop()}}const ps=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ke.test(e)||e==="0")&&!e.startsWith("url("));function uc(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function cc(e,t,n,i){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],r=ps(s,t),a=ps(o,t);return ot(r===a,`You are trying to animate ${t} from "${s}" to "${o}". "${r?o:s}" is not an animatable value.`,"value-not-animatable"),!r||!a?!1:uc(e)||(n==="spring"||lr(n))&&i}function Kn(e){e.duration=0,e.type="keyframes"}const dc=new Set(["opacity","clipPath","filter","transform"]),fc=gi(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function hc(e){const{motionValue:t,name:n,repeatDelay:i,repeatType:s,damping:o,type:r}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=t.owner.getProps();return fc()&&n&&dc.has(n)&&(n!=="transform"||!u)&&!l&&!i&&s!=="mirror"&&o!==0&&r!=="inertia"}const gc=40;class pc extends Pi{constructor({autoplay:t=!0,delay:n=0,type:i="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:r="loop",keyframes:a,name:l,motionValue:u,element:c,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=de.now();const f={autoplay:t,delay:n,type:i,repeat:s,repeatDelay:o,repeatType:r,name:l,motionValue:u,element:c,...d},h=c?.KeyframeResolver||Ti;this.keyframeResolver=new h(a,(p,g,x)=>this.onKeyframesResolved(p,g,f,!x),l,u,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,i,s){this.keyframeResolver=void 0;const{name:o,type:r,velocity:a,delay:l,isHandoff:u,onUpdate:c}=i;this.resolvedAt=de.now(),cc(t,o,r,a)||((Ee.instantAnimations||!l)&&c?.(Ri(t,i,n)),t[0]=t[t.length-1],Kn(i),i.repeat=0);const f={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>gc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:t},h=!u&&hc(f)?new lc({...f,element:f.motionValue.owner.current}):new Mi(f);h.finished.then(()=>this.notifyFinished()).catch(ve),this.pendingTimeline&&(this.stopTimeline=h.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=h}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Zu()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const mc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function vc(e){const t=mc.exec(e);if(!t)return[,];const[,n,i,s]=t;return[`--${n??i}`,s]}const yc=4;function cr(e,t,n=1){Te(n<=yc,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[i,s]=vc(e);if(!i)return;const o=window.getComputedStyle(t).getPropertyValue(i);if(o){const r=o.trim();return Do(r)?parseFloat(r):r}return xi(s)?cr(s,t,n+1):s}function Ei(e,t){return e?.[t]??e?.default??e}const dr=new Set(["width","height","top","left","right","bottom",...at]),wc={test:e=>e==="auto",parse:e=>e},fr=e=>t=>t.test(e),hr=[rt,k,be,Ae,uu,lu,wc],ms=e=>hr.find(fr(e));function xc(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||ko(e):!0}const Cc=new Set(["brightness","contrast","saturate","opacity"]);function Sc(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[i]=n.match(Ci)||[];if(!i)return e;const s=n.replace(i,"");let o=Cc.has(t)?1:0;return i!==n&&(o*=100),t+"("+o+s+")"}const _c=/\b([a-z-]*)\(.*?\)/gu,qn={...ke,getAnimatableNone:e=>{const t=e.match(_c);return t?t.map(Sc).join(" "):e}},vs={...rt,transform:Math.round},bc={rotate:Ae,rotateX:Ae,rotateY:Ae,rotateZ:Ae,scale:At,scaleX:At,scaleY:At,scaleZ:At,skew:Ae,skewX:Ae,skewY:Ae,distance:k,translateX:k,translateY:k,translateZ:k,x:k,y:k,z:k,perspective:k,transformPerspective:k,opacity:Ct,originX:ss,originY:ss,originZ:k},Vi={borderWidth:k,borderTopWidth:k,borderRightWidth:k,borderBottomWidth:k,borderLeftWidth:k,borderRadius:k,radius:k,borderTopLeftRadius:k,borderTopRightRadius:k,borderBottomRightRadius:k,borderBottomLeftRadius:k,width:k,maxWidth:k,height:k,maxHeight:k,top:k,right:k,bottom:k,left:k,padding:k,paddingTop:k,paddingRight:k,paddingBottom:k,paddingLeft:k,margin:k,marginTop:k,marginRight:k,marginBottom:k,marginLeft:k,backgroundPositionX:k,backgroundPositionY:k,...bc,zIndex:vs,fillOpacity:Ct,strokeOpacity:Ct,numOctaves:vs},Rc={...Vi,color:Q,backgroundColor:Q,outlineColor:Q,fill:Q,stroke:Q,borderColor:Q,borderTopColor:Q,borderRightColor:Q,borderBottomColor:Q,borderLeftColor:Q,filter:qn,WebkitFilter:qn},gr=e=>Rc[e];function pr(e,t){let n=gr(e);return n!==qn&&(n=ke),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Pc=new Set(["auto","none","0"]);function Mc(e,t,n){let i=0,s;for(;i<e.length&&!s;){const o=e[i];typeof o=="string"&&!Pc.has(o)&&St(o).values.length&&(s=e[i]),i++}if(s&&n)for(const o of t)e[o]=pr(n,s)}class Tc extends Ti{constructor(t,n,i,s,o){super(t,n,i,s,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:i}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let u=t[l];if(typeof u=="string"&&(u=u.trim(),xi(u))){const c=cr(u,n.current);c!==void 0&&(t[l]=c),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!dr.has(i)||t.length!==2)return;const[s,o]=t,r=ms(s),a=ms(o);if(r!==a)if(fs(r)&&fs(a))for(let l=0;l<t.length;l++){const u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else We[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,i=[];for(let s=0;s<t.length;s++)(t[s]===null||xc(t[s]))&&i.push(s);i.length&&Mc(t,i,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:i}=this;if(!t||!t.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=We[i](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(i,s).jump(s,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:i}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const o=i.length-1,r=i[o];i[o]=We[n](t.measureViewportBox(),window.getComputedStyle(t.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,l])=>{t.getValue(a).set(l)}),this.resolveNoneKeyframes()}}function Ec(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let i=document;const s=n?.[e]??i.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}const mr=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function vr(e){return Fo(e)&&"offsetHeight"in e}const ys=30,Vc=e=>!isNaN(parseFloat(e));class Ac{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{const s=de.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=de.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Vc(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&mi(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new pi);const i=this.events[t].add(n);return t==="change"?()=>{i(),q.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,i){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=de.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>ys)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,ys);return Io(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(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 nt(e,t){return new Ac(e,t)}const{schedule:Ai}=Uo(queueMicrotask,!1),xe={x:!1,y:!1};function yr(){return xe.x||xe.y}function Dc(e){return e==="x"||e==="y"?xe[e]?null:(xe[e]=!0,()=>{xe[e]=!1}):xe.x||xe.y?null:(xe.x=xe.y=!0,()=>{xe.x=xe.y=!1})}function wr(e,t){const n=Ec(e),i=new AbortController,s={passive:!0,...t,signal:i.signal};return[n,s,()=>i.abort()]}function ws(e){return!(e.pointerType==="touch"||yr())}function Fc(e,t,n={}){const[i,s,o]=wr(e,n),r=a=>{if(!ws(a))return;const{target:l}=a,u=t(l,a);if(typeof u!="function"||!l)return;const c=d=>{ws(d)&&(u(d),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,s)};return i.forEach(a=>{a.addEventListener("pointerenter",r,s)}),o}const xr=(e,t)=>t?e===t?!0:xr(e,t.parentElement):!1,Di=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,kc=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Ic(e){return kc.has(e.tagName)||e.tabIndex!==-1}const Ot=new WeakSet;function xs(e){return t=>{t.key==="Enter"&&e(t)}}function yn(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Lc=(e,t)=>{const n=e.currentTarget;if(!n)return;const i=xs(()=>{if(Ot.has(n))return;yn(n,"down");const s=xs(()=>{yn(n,"up")}),o=()=>yn(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",i,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),t)};function Cs(e){return Di(e)&&!yr()}function jc(e,t,n={}){const[i,s,o]=wr(e,n),r=a=>{const l=a.currentTarget;if(!Cs(a))return;Ot.add(l);const u=t(l,a),c=(h,p)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),Ot.has(l)&&Ot.delete(l),Cs(h)&&typeof u=="function"&&u(h,{success:p})},d=h=>{c(h,l===window||l===document||n.useGlobalTarget||xr(l,h.target))},f=h=>{c(h,!1)};window.addEventListener("pointerup",d,s),window.addEventListener("pointercancel",f,s)};return i.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,s),vr(a)&&(a.addEventListener("focus",u=>Lc(u,s)),!Ic(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function Cr(e){return Fo(e)&&"ownerSVGElement"in e}function $c(e){return Cr(e)&&e.tagName==="svg"}const le=e=>!!(e&&e.getVelocity),Oc=[...hr,Q,ke],zc=e=>Oc.find(fr(e)),Fi=v.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Ss(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Bc(...e){return t=>{let n=!1;const i=e.map(s=>{const o=Ss(s,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let s=0;s<i.length;s++){const o=i[s];typeof o=="function"?o():Ss(e[s],null)}}}}function Nc(...e){return T.useCallback(Bc(...e),e)}class Hc extends T.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const i=n.offsetParent,s=vr(i)&&i.offsetWidth||0,o=this.props.sizeRef.current;o.height=n.offsetHeight||0,o.width=n.offsetWidth||0,o.top=n.offsetTop,o.left=n.offsetLeft,o.right=s-o.width-o.left}return null}componentDidUpdate(){}render(){return this.props.children}}function Gc({children:e,isPresent:t,anchorX:n,root:i}){const s=v.useId(),o=v.useRef(null),r=v.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=v.useContext(Fi),l=Nc(o,e?.ref);return v.useInsertionEffect(()=>{const{width:u,height:c,top:d,left:f,right:h}=r.current;if(t||!o.current||!u||!c)return;const p=n==="left"?`left: ${f}`:`right: ${h}`;o.current.dataset.motionPopId=s;const g=document.createElement("style");a&&(g.nonce=a);const x=i??document.head;return x.appendChild(g),g.sheet&&g.sheet.insertRule(`
13
+ [data-motion-pop-id="${s}"] {
14
+ position: absolute !important;
15
+ width: ${u}px !important;
16
+ height: ${c}px !important;
17
+ ${p}px !important;
18
+ top: ${d}px !important;
19
+ }
20
+ `),()=>{x.contains(g)&&x.removeChild(g)}},[t]),m.jsx(Hc,{isPresent:t,childRef:o,sizeRef:r,children:T.cloneElement(e,{ref:l})})}const Wc=({children:e,initial:t,isPresent:n,onExitComplete:i,custom:s,presenceAffectsLayout:o,mode:r,anchorX:a,root:l})=>{const u=ci(Uc),c=v.useId();let d=!0,f=v.useMemo(()=>(d=!1,{id:c,initial:t,isPresent:n,custom:s,onExitComplete:h=>{u.set(h,!0);for(const p of u.values())if(!p)return;i&&i()},register:h=>(u.set(h,!1),()=>u.delete(h))}),[n,u,i]);return o&&d&&(f={...f}),v.useMemo(()=>{u.forEach((h,p)=>u.set(p,!1))},[n]),T.useEffect(()=>{!n&&!u.size&&i&&i()},[n]),r==="popLayout"&&(e=m.jsx(Gc,{isPresent:n,anchorX:a,root:l,children:e})),m.jsx(Jt.Provider,{value:f,children:e})};function Uc(){return new Map}function Sr(e=!0){const t=v.useContext(Jt);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:i,register:s}=t,o=v.useId();v.useEffect(()=>{if(e)return s(o)},[e]);const r=v.useCallback(()=>e&&i&&i(o),[o,i,e]);return!n&&i?[!1,r]:[!0]}const Dt=e=>e.key||"";function _s(e){const t=[];return v.Children.forEach(e,n=>{v.isValidElement(n)&&t.push(n)}),t}const Kc=({children:e,custom:t,initial:n=!0,onExitComplete:i,presenceAffectsLayout:s=!0,mode:o="sync",propagate:r=!1,anchorX:a="left",root:l})=>{const[u,c]=Sr(r),d=v.useMemo(()=>_s(e),[e]),f=r&&!u?[]:d.map(Dt),h=v.useRef(!0),p=v.useRef(d),g=ci(()=>new Map),[x,w]=v.useState(d),[C,y]=v.useState(d);Ao(()=>{h.current=!1,p.current=d;for(let b=0;b<C.length;b++){const E=Dt(C[b]);f.includes(E)?g.delete(E):g.get(E)!==!0&&g.set(E,!1)}},[C,f.length,f.join("-")]);const S=[];if(d!==x){let b=[...d];for(let E=0;E<C.length;E++){const R=C[E],I=Dt(R);f.includes(I)||(b.splice(E,0,R),S.push(R))}return o==="wait"&&S.length&&(b=S),y(_s(b)),w(d),null}process.env.NODE_ENV!=="production"&&o==="wait"&&C.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:_}=v.useContext(ui);return m.jsx(m.Fragment,{children:C.map(b=>{const E=Dt(b),R=r&&!u?!1:d===C||f.includes(E),I=()=>{if(g.has(E))g.set(E,!0);else return;let A=!0;g.forEach(z=>{z||(A=!1)}),A&&(_?.(),y(p.current),r&&c?.(),i&&i())};return m.jsx(Wc,{isPresent:R,initial:!h.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:o,root:l,onExitComplete:R?void 0:I,anchorX:a,children:b},E)})})},_r=v.createContext({strict:!1}),bs={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"]},it={};for(const e in bs)it[e]={isEnabled:t=>bs[e].some(n=>!!t[n])};function qc(e){for(const t in e)it[t]={...it[t],...e[t]}}const Xc=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 Ut(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Xc.has(e)}let br=e=>!Ut(e);function Yc(e){typeof e=="function"&&(br=t=>t.startsWith("on")?!Ut(t):e(t))}try{Yc(require("@emotion/is-prop-valid").default)}catch{}function Zc(e,t,n){const i={};for(const s in e)s==="values"&&typeof e.values=="object"||(br(s)||n===!0&&Ut(s)||!t&&!Ut(s)||e.draggable&&s.startsWith("onDrag"))&&(i[s]=e[s]);return i}const Qt=v.createContext({});function en(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function _t(e){return typeof e=="string"||Array.isArray(e)}const ki=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ii=["initial",...ki];function tn(e){return en(e.animate)||Ii.some(t=>_t(e[t]))}function Rr(e){return!!(tn(e)||e.variants)}function Jc(e,t){if(tn(e)){const{initial:n,animate:i}=e;return{initial:n===!1||_t(n)?n:void 0,animate:_t(i)?i:void 0}}return e.inherit!==!1?t:{}}function Qc(e){const{initial:t,animate:n}=Jc(e,v.useContext(Qt));return v.useMemo(()=>({initial:t,animate:n}),[Rs(t),Rs(n)])}function Rs(e){return Array.isArray(e)?e.join(" "):e}const bt={};function ed(e){for(const t in e)bt[t]=e[t],wi(t)&&(bt[t].isCSSVariable=!0)}function Pr(e,{layout:t,layoutId:n}){return lt.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!bt[e]||e==="opacity")}const td={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},nd=at.length;function id(e,t,n){let i="",s=!0;for(let o=0;o<nd;o++){const r=at[o],a=e[r];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(r.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const u=mr(a,Vi[r]);if(!l){s=!1;const c=td[r]||r;i+=`${c}(${u}) `}n&&(t[r]=u)}}return i=i.trim(),n?i=n(t,s?"":i):s&&(i="none"),i}function Li(e,t,n){const{style:i,vars:s,transformOrigin:o}=e;let r=!1,a=!1;for(const l in t){const u=t[l];if(lt.has(l)){r=!0;continue}else if(wi(l)){s[l]=u;continue}else{const c=mr(u,Vi[l]);l.startsWith("origin")?(a=!0,o[l]=c):i[l]=c}}if(t.transform||(r||n?i.transform=id(t,e.transform,n):i.transform&&(i.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=o;i.transformOrigin=`${l} ${u} ${c}`}}const ji=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Mr(e,t,n){for(const i in t)!le(t[i])&&!Pr(i,n)&&(e[i]=t[i])}function sd({transformTemplate:e},t){return v.useMemo(()=>{const n=ji();return Li(n,t,e),Object.assign({},n.vars,n.style)},[t])}function od(e,t){const n=e.style||{},i={};return Mr(i,n,e),Object.assign(i,sd(e,t)),i}function rd(e,t){const n={},i=od(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=i,n}const ad={offset:"stroke-dashoffset",array:"stroke-dasharray"},ld={offset:"strokeDashoffset",array:"strokeDasharray"};function ud(e,t,n=1,i=0,s=!0){e.pathLength=1;const o=s?ad:ld;e[o.offset]=k.transform(-i);const r=k.transform(t),a=k.transform(n);e[o.array]=`${r} ${a}`}function Tr(e,{attrX:t,attrY:n,attrScale:i,pathLength:s,pathSpacing:o=1,pathOffset:r=0,...a},l,u,c){if(Li(e,a,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=c?.transformBox??"fill-box",delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),i!==void 0&&(d.scale=i),s!==void 0&&ud(d,s,o,r,!1)}const Er=()=>({...ji(),attrs:{}}),Vr=e=>typeof e=="string"&&e.toLowerCase()==="svg";function cd(e,t,n,i){const s=v.useMemo(()=>{const o=Er();return Tr(o,t,Vr(i),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};Mr(o,e.style,e),s.style={...o,...s.style}}return s}const dd=["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 $i(e){return typeof e!="string"||e.includes("-")?!1:!!(dd.indexOf(e)>-1||/[A-Z]/u.test(e))}function fd(e,t,n,{latestValues:i},s,o=!1){const a=($i(e)?cd:rd)(t,i,s,e),l=Zc(t,typeof e=="string",o),u=e!==v.Fragment?{...l,...a,ref:n}:{},{children:c}=t,d=v.useMemo(()=>le(c)?c.get():c,[c]);return v.createElement(e,{...u,children:d})}function Ps(e){const t=[{},{}];return e?.values.forEach((n,i)=>{t[0][i]=n.get(),t[1][i]=n.getVelocity()}),t}function Oi(e,t,n,i){if(typeof t=="function"){const[s,o]=Ps(i);t=t(n!==void 0?n:e.custom,s,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,o]=Ps(i);t=t(n!==void 0?n:e.custom,s,o)}return t}function zt(e){return le(e)?e.get():e}function hd({scrapeMotionValuesFromProps:e,createRenderState:t},n,i,s){return{latestValues:gd(n,i,s,e),renderState:t()}}function gd(e,t,n,i){const s={},o=i(e,{});for(const f in o)s[f]=zt(o[f]);let{initial:r,animate:a}=e;const l=tn(e),u=Rr(e);t&&u&&!l&&e.inherit!==!1&&(r===void 0&&(r=t.initial),a===void 0&&(a=t.animate));let c=n?n.initial===!1:!1;c=c||r===!1;const d=c?a:r;if(d&&typeof d!="boolean"&&!en(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){const p=Oi(e,f[h]);if(p){const{transitionEnd:g,transition:x,...w}=p;for(const C in w){let y=w[C];if(Array.isArray(y)){const S=c?y.length-1:0;y=y[S]}y!==null&&(s[C]=y)}for(const C in g)s[C]=g[C]}}}return s}const Ar=e=>(t,n)=>{const i=v.useContext(Qt),s=v.useContext(Jt),o=()=>hd(e,t,i,s);return n?o():ci(o)};function zi(e,t,n){const{style:i}=e,s={};for(const o in i)(le(i[o])||t.style&&le(t.style[o])||Pr(o,e)||n?.getValue(o)?.liveStyle!==void 0)&&(s[o]=i[o]);return s}const pd=Ar({scrapeMotionValuesFromProps:zi,createRenderState:ji});function Dr(e,t,n){const i=zi(e,t,n);for(const s in e)if(le(e[s])||le(t[s])){const o=at.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;i[o]=e[s]}return i}const md=Ar({scrapeMotionValuesFromProps:Dr,createRenderState:Er}),vd=Symbol.for("motionComponentSymbol");function Ze(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function yd(e,t,n){return v.useCallback(i=>{i&&e.onMount&&e.onMount(i),t&&(i?t.mount(i):t.unmount()),n&&(typeof n=="function"?n(i):Ze(n)&&(n.current=i))},[t])}const Bi=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),wd="framerAppearId",Fr="data-"+Bi(wd),kr=v.createContext({});function xd(e,t,n,i,s){const{visualElement:o}=v.useContext(Qt),r=v.useContext(_r),a=v.useContext(Jt),l=v.useContext(Fi).reducedMotion,u=v.useRef(null);i=i||r.renderer,!u.current&&i&&(u.current=i(e,{visualState:t,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const c=u.current,d=v.useContext(kr);c&&!c.projection&&s&&(c.type==="html"||c.type==="svg")&&Cd(u.current,n,s,d);const f=v.useRef(!1);v.useInsertionEffect(()=>{c&&f.current&&c.update(n,a)});const h=n[Fr],p=v.useRef(!!h&&!window.MotionHandoffIsComplete?.(h)&&window.MotionHasOptimisedAnimation?.(h));return Ao(()=>{c&&(f.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),p.current&&c.animationState&&c.animationState.animateChanges())}),v.useEffect(()=>{c&&(!p.current&&c.animationState&&c.animationState.animateChanges(),p.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(h)}),p.current=!1),c.enteringChildren=void 0)}),c}function Cd(e,t,n,i){const{layoutId:s,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Ir(e.parent)),e.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:!!r||a&&Ze(a),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:i,crossfade:c,layoutScroll:l,layoutRoot:u})}function Ir(e){if(e)return e.options.allowProjection!==!1?e.projection:Ir(e.parent)}function wn(e,{forwardMotionProps:t=!1}={},n,i){n&&qc(n);const s=$i(e)?md:pd;function o(a,l){let u;const c={...v.useContext(Fi),...a,layoutId:Sd(a)},{isStatic:d}=c,f=Qc(a),h=s(a,d);if(!d&&di){_d(c,n);const p=bd(c);u=p.MeasureLayout,f.visualElement=xd(e,h,c,i,p.ProjectionNode)}return m.jsxs(Qt.Provider,{value:f,children:[u&&f.visualElement?m.jsx(u,{visualElement:f.visualElement,...c}):null,fd(e,a,yd(h,f.visualElement,l),h,d,t)]})}o.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const r=v.forwardRef(o);return r[vd]=e,r}function Sd({layoutId:e}){const t=v.useContext(ui).id;return t&&e!==void 0?t+"-"+e:e}function _d(e,t){const n=v.useContext(_r).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const i="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?ot(!1,i,"lazy-strict-mode"):Te(!1,i,"lazy-strict-mode")}}function bd(e){const{drag:t,layout:n}=it;if(!t&&!n)return{};const i={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function Rd(e,t){if(typeof Proxy>"u")return wn;const n=new Map,i=(o,r)=>wn(o,r,e,t),s=(o,r)=>(process.env.NODE_ENV!=="production"&&mi(!1,"motion() is deprecated. Use motion.create() instead."),i(o,r));return new Proxy(s,{get:(o,r)=>r==="create"?i:(n.has(r)||n.set(r,wn(r,void 0,e,t)),n.get(r))})}function Lr({top:e,left:t,right:n,bottom:i}){return{x:{min:t,max:n},y:{min:e,max:i}}}function Pd({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Md(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),i=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function xn(e){return e===void 0||e===1}function Xn({scale:e,scaleX:t,scaleY:n}){return!xn(e)||!xn(t)||!xn(n)}function Be(e){return Xn(e)||jr(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function jr(e){return Ms(e.x)||Ms(e.y)}function Ms(e){return e&&e!=="0%"}function Kt(e,t,n){const i=e-n,s=t*i;return n+s}function Ts(e,t,n,i,s){return s!==void 0&&(e=Kt(e,s,i)),Kt(e,n,i)+t}function Yn(e,t=0,n=1,i,s){e.min=Ts(e.min,t,n,i,s),e.max=Ts(e.max,t,n,i,s)}function $r(e,{x:t,y:n}){Yn(e.x,t.translate,t.scale,t.originPoint),Yn(e.y,n.translate,n.scale,n.originPoint)}const Es=.999999999999,Vs=1.0000000000001;function Td(e,t,n,i=!1){const s=n.length;if(!s)return;t.x=t.y=1;let o,r;for(let a=0;a<s;a++){o=n[a],r=o.projectionDelta;const{visualElement:l}=o.options;l&&l.props.style&&l.props.style.display==="contents"||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Qe(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(t.x*=r.x.scale,t.y*=r.y.scale,$r(e,r)),i&&Be(o.latestValues)&&Qe(e,o.latestValues))}t.x<Vs&&t.x>Es&&(t.x=1),t.y<Vs&&t.y>Es&&(t.y=1)}function Je(e,t){e.min=e.min+t,e.max=e.max+t}function As(e,t,n,i,s=.5){const o=Y(e.min,e.max,s);Yn(e,t,n,o,i)}function Qe(e,t){As(e.x,t.x,t.scaleX,t.scale,t.originX),As(e.y,t.y,t.scaleY,t.scale,t.originY)}function Or(e,t){return Lr(Md(e.getBoundingClientRect(),t))}function Ed(e,t,n){const i=Or(e,n),{scroll:s}=t;return s&&(Je(i.x,s.offset.x),Je(i.y,s.offset.y)),i}const Ds=()=>({translate:0,scale:1,origin:0,originPoint:0}),et=()=>({x:Ds(),y:Ds()}),Fs=()=>({min:0,max:0}),Z=()=>({x:Fs(),y:Fs()}),Zn={current:null},zr={current:!1};function Vd(){if(zr.current=!0,!!di)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Zn.current=e.matches;e.addEventListener("change",t),t()}else Zn.current=!1}const Ad=new WeakMap;function Dd(e,t,n){for(const i in t){const s=t[i],o=n[i];if(le(s))e.addValue(i,s);else if(le(o))e.addValue(i,nt(s,{owner:e}));else if(o!==s)if(e.hasValue(i)){const r=e.getValue(i);r.liveStyle===!0?r.jump(s):r.hasAnimated||r.set(s)}else{const r=e.getStaticValue(i);e.addValue(i,nt(r!==void 0?r:s,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const ks=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Fd{scrapeMotionValuesFromProps(t,n,i){return{}}constructor({parent:t,props:n,presenceContext:i,reducedMotionConfig:s,blockInitialAnimation:o,visualState:r},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Ti,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 f=de.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,q.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=tn(n),this.isVariantNode=Rr(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const h=d[f];l[f]!==void 0&&le(h)&&h.set(l[f])}}mount(t){this.current=t,Ad.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,i)=>this.bindToMotionValue(i,n)),zr.current||Vd(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Zn.current,process.env.NODE_ENV!=="production"&&mi(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(),Fe(this.notifyUpdate),Fe(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const i=lt.has(t);i&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",r=>{this.latestValues[t]=r,this.props.onUpdate&&q.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in it){const n=it[t];if(!n)continue;const{isEnabled:i,Feature:s}=n;if(!this.features[t]&&s&&i(this.props)&&(this.features[t]=new s(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Z()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let i=0;i<ks.length;i++){const s=ks[i];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const o="on"+s,r=t[o];r&&(this.propEventSubscriptions[s]=this.on(s,r))}this.prevMotionValues=Dd(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]: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(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const i=this.values.get(t);n!==i&&(i&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let i=this.values.get(t);return i===void 0&&n!==void 0&&(i=nt(n===null?void 0:n,{owner:this}),this.addValue(t,i)),i}readValue(t,n){let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(Do(i)||ko(i))?i=parseFloat(i):!zc(i)&&ke.test(n)&&(i=pr(t,n)),this.setBaseTarget(t,le(i)?i.get():i)),le(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let i;if(typeof n=="string"||typeof n=="object"){const o=Oi(this.props,n,this.presenceContext?.custom);o&&(i=o[t])}if(n&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!le(s)?s:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new pi),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Ai.render(this.render)}}class Br extends Fd{constructor(){super(...arguments),this.KeyframeResolver=Tc}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:i}){delete n[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;le(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Nr(e,{style:t,vars:n},i,s){const o=e.style;let r;for(r in t)o[r]=t[r];s?.applyProjectionStyles(o,i);for(r in n)o.setProperty(r,n[r])}function kd(e){return window.getComputedStyle(e)}class Id extends Br{constructor(){super(...arguments),this.type="html",this.renderInstance=Nr}readValueFromInstance(t,n){if(lt.has(n))return this.projection?.isProjecting?Nn(n):Uu(t,n);{const i=kd(t),s=(wi(n)?i.getPropertyValue(n):i[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Or(t,n)}build(t,n,i){Li(t,n,i.transformTemplate)}scrapeMotionValuesFromProps(t,n,i){return zi(t,n,i)}}const Hr=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 Ld(e,t,n,i){Nr(e,t,void 0,i);for(const s in t.attrs)e.setAttribute(Hr.has(s)?s:Bi(s),t.attrs[s])}class jd extends Br{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Z}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(lt.has(n)){const i=gr(n);return i&&i.default||0}return n=Hr.has(n)?n:Bi(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,i){return Dr(t,n,i)}build(t,n,i){Tr(t,n,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,n,i,s){Ld(t,n,i,s)}mount(t){this.isSVGTag=Vr(t.tagName),super.mount(t)}}const $d=(e,t)=>$i(e)?new jd(t):new Id(t,{allowProjection:e!==v.Fragment});function tt(e,t,n){const i=e.getProps();return Oi(i,t,n!==void 0?n:i.custom,e)}const Jn=e=>Array.isArray(e);function Od(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,nt(n))}function zd(e){return Jn(e)?e[e.length-1]||0:e}function Bd(e,t){const n=tt(e,t);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const r in o){const a=zd(o[r]);Od(e,r,a)}}function Nd(e){return!!(le(e)&&e.add)}function Qn(e,t){const n=e.getValue("willChange");if(Nd(n))return n.add(t);if(!n&&Ee.WillChange){const i=new Ee.WillChange("auto");e.addValue("willChange",i),i.add(t)}}function Gr(e){return e.props[Fr]}const Hd=e=>e!==null;function Gd(e,{repeat:t,repeatType:n="loop"},i){const s=e.filter(Hd),o=t&&n!=="loop"&&t%2===1?0:s.length-1;return s[o]}const Wd={type:"spring",stiffness:500,damping:25,restSpeed:10},Ud=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Kd={type:"keyframes",duration:.8},qd={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Xd=(e,{keyframes:t})=>t.length>2?Kd:lt.has(e)?e.startsWith("scale")?Ud(t[1]):Wd:qd;function Yd({when:e,delay:t,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const Ni=(e,t,n,i={},s,o)=>r=>{const a=Ei(i,e)||{},l=a.delay||i.delay||0;let{elapsed:u=0}=i;u=u-Ce(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:o?void 0:s};Yd(a)||Object.assign(c,Xd(e,c)),c.duration&&(c.duration=Ce(c.duration)),c.repeatDelay&&(c.repeatDelay=Ce(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(Kn(c),c.delay===0&&(d=!0)),(Ee.instantAnimations||Ee.skipAnimations)&&(d=!0,Kn(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,d&&!o&&t.get()!==void 0){const f=Gd(c.keyframes,a);if(f!==void 0){q.update(()=>{c.onUpdate(f),c.onComplete()});return}}return a.isSync?new Mi(c):new pc(c)};function Zd({protectedKeys:e,needsAnimating:t},n){const i=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,i}function Wr(e,t,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:r,...a}=t;i&&(o=i);const l=[],u=s&&e.animationState&&e.animationState.getState()[s];for(const c in a){const d=e.getValue(c,e.latestValues[c]??null),f=a[c];if(f===void 0||u&&Zd(u,c))continue;const h={delay:n,...Ei(o||{},c)},p=d.get();if(p!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===p&&!h.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const w=Gr(e);if(w){const C=window.MotionHandoffAnimation(w,c,q);C!==null&&(h.startTime=C,g=!0)}}Qn(e,c),d.start(Ni(c,d,f,e.shouldReduceMotion&&dr.has(c)?{type:!1}:h,e,g));const x=d.animation;x&&l.push(x)}return r&&Promise.all(l).then(()=>{q.update(()=>{r&&Bd(e,r)})}),l}function Ur(e,t,n,i=0,s=1){const o=Array.from(e).sort((u,c)=>u.sortNodePosition(c)).indexOf(t),r=e.size,a=(r-1)*i;return typeof n=="function"?n(o,r):s===1?o*i:a-o*i}function ei(e,t,n={}){const i=tt(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Promise.all(Wr(e,i,n)):()=>Promise.resolve(),r=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:c,staggerDirection:d}=s;return Jd(e,t,l,u,c,d,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[l,u]=a==="beforeChildren"?[o,r]:[r,o];return l().then(()=>u())}else return Promise.all([o(),r(n.delay)])}function Jd(e,t,n=0,i=0,s=0,o=1,r){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(ei(l,t,{...r,delay:n+(typeof i=="function"?0:i)+Ur(e.variantChildren,l,i,s,o)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function Qd(e,t,n={}){e.notify("AnimationStart",t);let i;if(Array.isArray(t)){const s=t.map(o=>ei(e,o,n));i=Promise.all(s)}else if(typeof t=="string")i=ei(e,t,n);else{const s=typeof t=="function"?tt(e,t,n.custom):t;i=Promise.all(Wr(e,s,n))}return i.then(()=>{e.notify("AnimationComplete",t)})}function Kr(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let i=0;i<n;i++)if(t[i]!==e[i])return!1;return!0}const ef=Ii.length;function qr(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?qr(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<ef;n++){const i=Ii[n],s=e.props[i];(_t(s)||s===!1)&&(t[i]=s)}return t}const tf=[...ki].reverse(),nf=ki.length;function sf(e){return t=>Promise.all(t.map(({animation:n,options:i})=>Qd(e,n,i)))}function of(e){let t=sf(e),n=Is(),i=!0;const s=l=>(u,c)=>{const d=tt(e,c,l==="exit"?e.presenceContext?.custom:void 0);if(d){const{transition:f,transitionEnd:h,...p}=d;u={...u,...p,...h}}return u};function o(l){t=l(e)}function r(l){const{props:u}=e,c=qr(e.parent)||{},d=[],f=new Set;let h={},p=1/0;for(let x=0;x<nf;x++){const w=tf[x],C=n[w],y=u[w]!==void 0?u[w]:c[w],S=_t(y),_=w===l?C.isActive:null;_===!1&&(p=x);let b=y===c[w]&&y!==u[w]&&S;if(b&&i&&e.manuallyAnimateOnMount&&(b=!1),C.protectedKeys={...h},!C.isActive&&_===null||!y&&!C.prevProp||en(y)||typeof y=="boolean")continue;const E=rf(C.prevProp,y);let R=E||w===l&&C.isActive&&!b&&S||x>p&&S,I=!1;const A=Array.isArray(y)?y:[y];let z=A.reduce(s(w),{});_===!1&&(z={});const{prevResolvedValues:J={}}=C,N={...J,...z},ee=$=>{R=!0,f.has($)&&(I=!0,f.delete($)),C.needsAnimating[$]=!0;const K=e.getValue($);K&&(K.liveStyle=!1)};for(const $ in N){const K=z[$],ne=J[$];if(h.hasOwnProperty($))continue;let j=!1;Jn(K)&&Jn(ne)?j=!Kr(K,ne):j=K!==ne,j?K!=null?ee($):f.add($):K!==void 0&&f.has($)?ee($):C.protectedKeys[$]=!0}C.prevProp=y,C.prevResolvedValues=z,C.isActive&&(h={...h,...z}),i&&e.blockInitialAnimation&&(R=!1);const te=b&&E;R&&(!te||I)&&d.push(...A.map($=>{const K={type:w};if(typeof $=="string"&&i&&!te&&e.manuallyAnimateOnMount&&e.parent){const{parent:ne}=e,j=tt(ne,$);if(ne.enteringChildren&&j){const{delayChildren:H}=j.transition||{};K.delay=Ur(ne.enteringChildren,e,H)}}return{animation:$,options:K}}))}if(f.size){const x={};if(typeof u.initial!="boolean"){const w=tt(e,Array.isArray(u.initial)?u.initial[0]:u.initial);w&&w.transition&&(x.transition=w.transition)}f.forEach(w=>{const C=e.getBaseTarget(w),y=e.getValue(w);y&&(y.liveStyle=!0),x[w]=C??null}),d.push({animation:x})}let g=!!d.length;return i&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(g=!1),i=!1,g?t(d):Promise.resolve()}function a(l,u){if(n[l].isActive===u)return Promise.resolve();e.variantChildren?.forEach(d=>d.animationState?.setActive(l,u)),n[l].isActive=u;const c=r(l);for(const d in n)n[d].protectedKeys={};return c}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Is(),i=!0}}}function rf(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Kr(t,e):!1}function ze(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Is(){return{animate:ze(!0),whileInView:ze(),whileHover:ze(),whileTap:ze(),whileDrag:ze(),whileFocus:ze(),exit:ze()}}class Le{constructor(t){this.isMounted=!1,this.node=t}update(){}}class af extends Le{constructor(t){super(t),t.animationState||(t.animationState=of(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();en(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let lf=0;class uf extends Le{constructor(){super(...arguments),this.id=lf++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const cf={animation:{Feature:af},exit:{Feature:uf}};function Rt(e,t,n,i={passive:!0}){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n)}function Et(e){return{point:{x:e.pageX,y:e.pageY}}}const df=e=>t=>Di(t)&&e(t,Et(t));function gt(e,t,n,i){return Rt(e,t,df(n),i)}const Xr=1e-4,ff=1-Xr,hf=1+Xr,Yr=.01,gf=0-Yr,pf=0+Yr;function ue(e){return e.max-e.min}function mf(e,t,n){return Math.abs(e-t)<=n}function Ls(e,t,n,i=.5){e.origin=i,e.originPoint=Y(t.min,t.max,e.origin),e.scale=ue(n)/ue(t),e.translate=Y(n.min,n.max,e.origin)-e.originPoint,(e.scale>=ff&&e.scale<=hf||isNaN(e.scale))&&(e.scale=1),(e.translate>=gf&&e.translate<=pf||isNaN(e.translate))&&(e.translate=0)}function pt(e,t,n,i){Ls(e.x,t.x,n.x,i?i.originX:void 0),Ls(e.y,t.y,n.y,i?i.originY:void 0)}function js(e,t,n){e.min=n.min+t.min,e.max=e.min+ue(t)}function vf(e,t,n){js(e.x,t.x,n.x),js(e.y,t.y,n.y)}function $s(e,t,n){e.min=t.min-n.min,e.max=e.min+ue(t)}function mt(e,t,n){$s(e.x,t.x,n.x),$s(e.y,t.y,n.y)}function pe(e){return[e("x"),e("y")]}const Zr=({current:e})=>e?e.ownerDocument.defaultView:null,Os=(e,t)=>Math.abs(e-t);function yf(e,t){const n=Os(e.x,t.x),i=Os(e.y,t.y);return Math.sqrt(n**2+i**2)}class Jr{constructor(t,n,{transformPagePoint:i,contextWindow:s=window,dragSnapToOrigin:o=!1,distanceThreshold:r=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 f=Sn(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,p=yf(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!h&&!p)return;const{point:g}=f,{timestamp:x}=re;this.history.push({...g,timestamp:x});const{onStart:w,onMove:C}=this.handlers;h||(w&&w(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),C&&C(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Cn(h,this.transformPagePoint),q.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:p,onSessionEnd:g,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=Sn(f.type==="pointercancel"?this.lastMoveEventInfo:Cn(h,this.transformPagePoint),this.history);this.startEvent&&p&&p(f,w),g&&g(f,w)},!Di(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=i,this.distanceThreshold=r,this.contextWindow=s||window;const a=Et(t),l=Cn(a,this.transformPagePoint),{point:u}=l,{timestamp:c}=re;this.history=[{...u,timestamp:c}];const{onSessionStart:d}=n;d&&d(t,Sn(l,this.history)),this.removeListeners=Pt(gt(this.contextWindow,"pointermove",this.handlePointerMove),gt(this.contextWindow,"pointerup",this.handlePointerUp),gt(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Fe(this.updatePoint)}}function Cn(e,t){return t?{point:t(e.point)}:e}function zs(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Sn({point:e},t){return{point:e,delta:zs(e,Qr(t)),offset:zs(e,wf(t)),velocity:xf(t,.1)}}function wf(e){return e[0]}function Qr(e){return e[e.length-1]}function xf(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,i=null;const s=Qr(e);for(;n>=0&&(i=e[n],!(s.timestamp-i.timestamp>Ce(t)));)n--;if(!i)return{x:0,y:0};const o=me(s.timestamp-i.timestamp);if(o===0)return{x:0,y:0};const r={x:(s.x-i.x)/o,y:(s.y-i.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function Cf(e,{min:t,max:n},i){return t!==void 0&&e<t?e=i?Y(t,e,i.min):Math.max(e,t):n!==void 0&&e>n&&(e=i?Y(n,e,i.max):Math.min(e,n)),e}function Bs(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function Sf(e,{top:t,left:n,bottom:i,right:s}){return{x:Bs(e.x,n,s),y:Bs(e.y,t,i)}}function Ns(e,t){let n=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,i]=[i,n]),{min:n,max:i}}function _f(e,t){return{x:Ns(e.x,t.x),y:Ns(e.y,t.y)}}function bf(e,t){let n=.5;const i=ue(e),s=ue(t);return s>i?n=xt(t.min,t.max-i,e.min):i>s&&(n=xt(e.min,e.max-s,t.min)),Me(0,1,n)}function Rf(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const ti=.35;function Pf(e=ti){return e===!1?e=0:e===!0&&(e=ti),{x:Hs(e,"left","right"),y:Hs(e,"top","bottom")}}function Hs(e,t,n){return{min:Gs(e,t),max:Gs(e,n)}}function Gs(e,t){return typeof e=="number"?e:e[t]||0}const Mf=new WeakMap;class Tf{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Z(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:i}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const o=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Et(d).point)},r=(d,f)=>{const{drag:h,dragPropagation:p,onDragStart:g}=this.getProps();if(h&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Dc(h),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),pe(w=>{let C=this.getAxisMotionValue(w).get()||0;if(be.test(C)){const{projection:y}=this.visualElement;if(y&&y.layout){const S=y.layout.layoutBox[w];S&&(C=ue(S)*(parseFloat(C)/100))}}this.originPoint[w]=C}),g&&q.postRender(()=>g(d,f)),Qn(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},a=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:h,dragDirectionLock:p,onDirectionLock:g,onDrag:x}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:w}=f;if(p&&this.currentDirection===null){this.currentDirection=Ef(w),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",f.point,w),this.updateAxis("y",f.point,w),this.visualElement.render(),x&&x(d,f)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>pe(d=>this.getAnimationState(d)==="paused"&&this.getAxisMotionValue(d).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Jr(t,{onSessionStart:o,onStart:r,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:i,contextWindow:Zr(this.visualElement)})}stop(t,n){const i=t||this.latestPointerEvent,s=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!s||!i)return;const{velocity:r}=s;this.startAnimation(r);const{onDragEnd:a}=this.getProps();a&&q.postRender(()=>a(i,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,i){const{drag:s}=this.getProps();if(!i||!Ft(t,s,this.currentDirection))return;const o=this.getAxisMotionValue(t);let r=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(r=Cf(r,this.constraints[t],this.elastic[t])),o.set(r)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,s=this.constraints;t&&Ze(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=Sf(i.layoutBox,t):this.constraints=!1,this.elastic=Pf(n),s!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&pe(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Rf(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Ze(t))return!1;const i=t.current;Te(i!==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:s}=this.visualElement;if(!s||!s.layout)return!1;const o=Ed(i,s.root,this.visualElement.getTransformPagePoint());let r=_f(s.layout.layoutBox,o);if(n){const a=n(Pd(r));this.hasMutatedConstraints=!!a,a&&(r=Lr(a))}return r}startAnimation(t){const{drag:n,dragMomentum:i,dragElastic:s,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=pe(c=>{if(!Ft(c,n,this.currentDirection))return;let d=l&&l[c]||{};r&&(d={min:0,max:0});const f=s?200:1e6,h=s?40:1e7,p={type:"inertia",velocity:i?t[c]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...o,...d};return this.startAxisValueAnimation(c,p)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const i=this.getAxisMotionValue(t);return Qn(this.visualElement,t),i.start(Ni(t,i,0,n,this.visualElement,!1))}stopAnimation(){pe(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){pe(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps(),s=i[n];return s||this.visualElement.getValue(t,(i.initial?i.initial[t]:void 0)||0)}snapToCursor(t){pe(n=>{const{drag:i}=this.getProps();if(!Ft(n,i,this.currentDirection))return;const{projection:s}=this.visualElement,o=this.getAxisMotionValue(n);if(s&&s.layout){const{min:r,max:a}=s.layout.layoutBox[n];o.set(t[n]-Y(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!Ze(n)||!i||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};pe(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();s[r]=bf({min:l,max:l},this.constraints[r])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),pe(r=>{if(!Ft(r,t,null))return;const a=this.getAxisMotionValue(r),{min:l,max:u}=this.constraints[r];a.set(Y(l,u,s[r]))})}addListeners(){if(!this.visualElement.current)return;Mf.set(this.visualElement,this);const t=this.visualElement.current,n=gt(t,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),i=()=>{const{dragConstraints:l}=this.getProps();Ze(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,o=s.addEventListener("measure",i);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),q.read(i);const r=Rt(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(pe(c=>{const d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=l[c].translate,d.set(d.get()+l[c].translate))}),this.visualElement.render())}));return()=>{r(),n(),o(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:i=!1,dragPropagation:s=!1,dragConstraints:o=!1,dragElastic:r=ti,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:i,dragPropagation:s,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function Ft(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Ef(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Vf extends Le{constructor(t){super(t),this.removeGroupControls=ve,this.removeListeners=ve,this.controls=new Tf(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ve}unmount(){this.removeGroupControls(),this.removeListeners()}}const Ws=e=>(t,n)=>{e&&q.postRender(()=>e(t,n))};class Af extends Le{constructor(){super(...arguments),this.removePointerDownListener=ve}onPointerDown(t){this.session=new Jr(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Zr(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:i,onPanEnd:s}=this.node.getProps();return{onSessionStart:Ws(t),onStart:Ws(n),onMove:i,onEnd:(o,r)=>{delete this.session,s&&q.postRender(()=>s(o,r))}}}mount(){this.removePointerDownListener=gt(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Bt={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Us(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ut={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(k.test(e))e=parseFloat(e);else return e;const n=Us(e,t.target.x),i=Us(e,t.target.y);return`${n}% ${i}%`}},Df={correct:(e,{treeScale:t,projectionDelta:n})=>{const i=e,s=ke.parse(e);if(s.length>5)return i;const o=ke.createTransformer(e),r=typeof s[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;s[0+r]/=a,s[1+r]/=l;const u=Y(a,l,.5);return typeof s[2+r]=="number"&&(s[2+r]/=u),typeof s[3+r]=="number"&&(s[3+r]/=u),o(s)}};let _n=!1;class Ff extends v.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i,layoutId:s}=this.props,{projection:o}=t;ed(kf),o&&(n.group&&n.group.add(o),i&&i.register&&s&&i.register(o),_n&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Bt.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:i,drag:s,isPresent:o}=this.props,{projection:r}=i;return r&&(r.isPresent=o,_n=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==o?r.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?r.promote():r.relegate()||q.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Ai.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i}=this.props,{projection:s}=t;_n=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),i&&i.deregister&&i.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function ea(e){const[t,n]=Sr(),i=v.useContext(ui);return m.jsx(Ff,{...e,layoutGroup:i,switchLayoutGroup:v.useContext(kr),isPresent:t,safeToRemove:n})}const kf={borderRadius:{...ut,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ut,borderTopRightRadius:ut,borderBottomLeftRadius:ut,borderBottomRightRadius:ut,boxShadow:Df};function If(e,t,n){const i=le(e)?e:nt(e);return i.start(Ni("",i,t,n)),i.animation}const Lf=(e,t)=>e.depth-t.depth;class jf{constructor(){this.children=[],this.isDirty=!1}add(t){fi(this.children,t),this.isDirty=!0}remove(t){hi(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Lf),this.isDirty=!1,this.children.forEach(t)}}function $f(e,t){const n=de.now(),i=({timestamp:s})=>{const o=s-n;o>=t&&(Fe(i),e(o-t))};return q.setup(i,!0),()=>Fe(i)}const ta=["TopLeft","TopRight","BottomLeft","BottomRight"],Of=ta.length,Ks=e=>typeof e=="string"?parseFloat(e):e,qs=e=>typeof e=="number"||k.test(e);function zf(e,t,n,i,s,o){s?(e.opacity=Y(0,n.opacity??1,Bf(i)),e.opacityExit=Y(t.opacity??1,0,Nf(i))):o&&(e.opacity=Y(t.opacity??1,n.opacity??1,i));for(let r=0;r<Of;r++){const a=`border${ta[r]}Radius`;let l=Xs(t,a),u=Xs(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||qs(l)===qs(u)?(e[a]=Math.max(Y(Ks(l),Ks(u),i),0),(be.test(u)||be.test(l))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=Y(t.rotate||0,n.rotate||0,i))}function Xs(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Bf=na(0,.5,No),Nf=na(.5,.95,ve);function na(e,t,n){return i=>i<e?0:i>t?1:n(xt(e,t,i))}function Ys(e,t){e.min=t.min,e.max=t.max}function ge(e,t){Ys(e.x,t.x),Ys(e.y,t.y)}function Zs(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Js(e,t,n,i,s){return e-=t,e=Kt(e,1/n,i),s!==void 0&&(e=Kt(e,1/s,i)),e}function Hf(e,t=0,n=1,i=.5,s,o=e,r=e){if(be.test(t)&&(t=parseFloat(t),t=Y(r.min,r.max,t/100)-r.min),typeof t!="number")return;let a=Y(o.min,o.max,i);e===o&&(a-=t),e.min=Js(e.min,t,n,a,s),e.max=Js(e.max,t,n,a,s)}function Qs(e,t,[n,i,s],o,r){Hf(e,t[n],t[i],t[s],t.scale,o,r)}const Gf=["x","scaleX","originX"],Wf=["y","scaleY","originY"];function eo(e,t,n,i){Qs(e.x,t,Gf,n?n.x:void 0,i?i.x:void 0),Qs(e.y,t,Wf,n?n.y:void 0,i?i.y:void 0)}function to(e){return e.translate===0&&e.scale===1}function ia(e){return to(e.x)&&to(e.y)}function no(e,t){return e.min===t.min&&e.max===t.max}function Uf(e,t){return no(e.x,t.x)&&no(e.y,t.y)}function io(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function sa(e,t){return io(e.x,t.x)&&io(e.y,t.y)}function so(e){return ue(e.x)/ue(e.y)}function oo(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Kf{constructor(){this.members=[]}add(t){fi(this.members,t),t.scheduleRender()}remove(t){if(hi(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(s=>t===s);if(n===0)return!1;let i;for(let s=n;s>=0;s--){const o=this.members[s];if(o.isPresent!==!1){i=o;break}}return i?(this.promote(i),!0):!1}promote(t,n){const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:s}=t.options;s===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:i}=t;n.onExitComplete&&n.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function qf(e,t,n){let i="";const s=e.x.translate/t.x,o=e.y.translate/t.y,r=n?.z||0;if((s||o||r)&&(i=`translate3d(${s}px, ${o}px, ${r}px) `),(t.x!==1||t.y!==1)&&(i+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:d,rotateY:f,skewX:h,skewY:p}=n;u&&(i=`perspective(${u}px) ${i}`),c&&(i+=`rotate(${c}deg) `),d&&(i+=`rotateX(${d}deg) `),f&&(i+=`rotateY(${f}deg) `),h&&(i+=`skewX(${h}deg) `),p&&(i+=`skewY(${p}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(i+=`scale(${a}, ${l})`),i||"none"}const bn=["","X","Y","Z"],Xf=1e3;let Yf=0;function Rn(e,t,n,i){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),i&&(i[e]=0))}function oa(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Gr(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",q,!(s||o))}const{parent:i}=e;i&&!i.hasCheckedOptimisedAppear&&oa(i)}function ra({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(r={},a=t?.()){this.id=Yf++,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(Qf),this.nodes.forEach(ih),this.nodes.forEach(sh),this.nodes.forEach(eh)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,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 jf)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new pi),this.eventHandlers.get(r).add(a)}notifyListeners(r,...a){const l=this.eventHandlers.get(r);l&&l.notify(...a)}hasListeners(r){return this.eventHandlers.has(r)}mount(r){if(this.instance)return;this.isSVG=Cr(r)&&!$c(r),this.instance=r;const{layoutId:a,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let c,d=0;const f=()=>this.root.updateBlockedByResize=!1;q.read(()=>{d=window.innerWidth}),e(r,()=>{const h=window.innerWidth;h!==d&&(d=h,this.root.updateBlockedByResize=!0,c&&c(),c=$f(f,250),Bt.hasAnimatedSinceResize&&(Bt.hasAnimatedSinceResize=!1,this.nodes.forEach(lo)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||u.getDefaultTransition()||uh,{onLayoutAnimationStart:g,onLayoutAnimationComplete:x}=u.getProps(),w=!this.targetLayout||!sa(this.targetLayout,h),C=!d&&f;if(this.options.layoutRoot||this.resumeFrom||C||d&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const y={...Ei(p,"layout"),onPlay:g,onComplete:x};(u.shouldReduceMotion||this.options.layoutRoot)&&(y.delay=0,y.type=!1),this.startAnimation(y),this.setAnimationOrigin(c,C)}else d||lo(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Fe(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(oh),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&oa(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const d=this.path[c];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.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(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(ro);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(ao);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(nh),this.nodes.forEach(Zf),this.nodes.forEach(Jf)):this.nodes.forEach(ao),this.clearAllSnapshots();const a=de.now();re.delta=Me(0,1e3/60,a-re.timestamp),re.timestamp=a,re.isProcessing=!0,hn.update.process(re),hn.preRender.process(re),hn.render.process(re),re.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ai.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(th),this.sharedNodes.forEach(rh)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,q.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){q.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ue(this.snapshot.measuredBox.x)&&!ue(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 r=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Z(),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,r?r.layoutBox:void 0)}updateScroll(r="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(a=!1),a&&this.instance){const l=i(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!s)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!ia(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;r&&this.instance&&(a||Be(this.latestValues)||c)&&(s(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return r&&(l=this.removeTransform(l)),ch(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return Z();const a=r.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(dh))){const{scroll:u}=this.root;u&&(Je(a.x,u.offset.x),Je(a.y,u.offset.y))}return a}removeElementScroll(r){const a=Z();if(ge(a,r),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:c,options:d}=u;u!==this.root&&c&&d.layoutScroll&&(c.wasRoot&&ge(a,r),Je(a.x,c.offset.x),Je(a.y,c.offset.y))}return a}applyTransform(r,a=!1){const l=Z();ge(l,r);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&Qe(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Be(c.latestValues)&&Qe(l,c.latestValues)}return Be(this.latestValues)&&Qe(l,this.latestValues),l}removeTransform(r){const a=Z();ge(a,r);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!Be(u.latestValues))continue;Xn(u.latestValues)&&u.updateSnapshot();const c=Z(),d=u.measurePageBox();ge(c,d),eo(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return Be(this.latestValues)&&eo(a,this.latestValues),a}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.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!==re.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!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(!(r||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:d}=this.options;if(!(!this.layout||!(c||d))){if(this.resolvedRelativeTargetAt=re.timestamp,!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Z(),this.relativeTargetOrigin=Z(),mt(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),ge(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Z(),this.targetWithTransforms=Z()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),vf(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ge(this.target,this.layout.layoutBox),$r(this.target,this.targetDelta)):ge(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const f=this.getClosestProjectingParent();f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Z(),this.relativeTargetOrigin=Z(),mt(this.relativeTargetOrigin,this.target,f.target),ge(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Xn(this.parent.latestValues)||jr(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 r=this.getLead(),a=!!this.resumingFrom||this!==r;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===re.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;ge(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;Td(this.layoutCorrected,this.treeScale,this.path,a),r.layout&&!r.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(r.target=r.layout.layoutBox,r.targetWithTransforms=Z());const{target:h}=r;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Zs(this.prevProjectionDelta.x,this.projectionDelta.x),Zs(this.prevProjectionDelta.y,this.projectionDelta.y)),pt(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!oo(this.projectionDelta.x,this.prevProjectionDelta.x)||!oo(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){if(this.options.visualElement?.scheduleRender(),r){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=et(),this.projectionDelta=et(),this.projectionDeltaWithTransform=et()}setAnimationOrigin(r,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},d=et();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=Z(),h=l?l.source:void 0,p=this.layout?this.layout.source:void 0,g=h!==p,x=this.getStack(),w=!x||x.members.length<=1,C=!!(g&&!w&&this.options.crossfade===!0&&!this.path.some(lh));this.animationProgress=0;let y;this.mixTargetDelta=S=>{const _=S/1e3;uo(d.x,r.x,_),uo(d.y,r.y,_),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(mt(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),ah(this.relativeTarget,this.relativeTargetOrigin,f,_),y&&Uf(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=Z()),ge(y,this.relativeTarget)),g&&(this.animationValues=c,zf(c,u,this.latestValues,_,C,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=_},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Fe(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=q.update(()=>{Bt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=nt(0)),this.currentAnimation=If(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),r.onUpdate&&r.onUpdate(a)},onStop:()=>{},onComplete:()=>{r.onComplete&&r.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 r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Xf),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=r;if(!(!a||!l||!u)){if(this!==r&&this.layout&&u&&aa(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Z();const d=ue(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+d;const f=ue(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+f}ge(a,l),Qe(a,c),pt(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Kf),this.sharedNodes.get(r).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 r=this.getStack();return r?r.lead===this:!0}getLead(){const{layoutId:r}=this.options;return r?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:r}=this.options;return r?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:l}=r;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&Rn("z",r,u,this.animationValues);for(let c=0;c<bn.length;c++)Rn(`rotate${bn[c]}`,r,u,this.animationValues),Rn(`skew${bn[c]}`,r,u,this.animationValues);r.render();for(const c in u)r.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);r.scheduleRender()}applyProjectionStyles(r,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){r.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,r.visibility="",r.opacity="",r.pointerEvents=zt(a?.pointerEvents)||"",r.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(r.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,r.pointerEvents=zt(a?.pointerEvents)||""),this.hasProjected&&!Be(this.latestValues)&&(r.transform=l?l({},""):"none",this.hasProjected=!1);return}r.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let d=qf(this.projectionDeltaWithTransform,this.treeScale,c);l&&(d=l(c,d)),r.transform=d;const{x:f,y:h}=this.projectionDelta;r.transformOrigin=`${f.origin*100}% ${h.origin*100}% 0`,u.animationValues?r.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:r.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const p in bt){if(c[p]===void 0)continue;const{correct:g,applyTo:x,isCSSVariable:w}=bt[p],C=d==="none"?c[p]:g(c[p],u);if(x){const y=x.length;for(let S=0;S<y;S++)r[x[S]]=C}else w?this.options.visualElement.renderState.vars[p]=C:r[p]=C}this.options.layoutId&&(r.pointerEvents=u===this?zt(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>r.currentAnimation?.stop()),this.root.nodes.forEach(ro),this.root.sharedNodes.clear()}}}function Zf(e){e.updateLayout()}function Jf(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=e.layout,{animationType:s}=e.options,o=t.source!==e.layout.source;s==="size"?pe(c=>{const d=o?t.measuredBox[c]:t.layoutBox[c],f=ue(d);d.min=n[c].min,d.max=d.min+f}):aa(s,t.layoutBox,n)&&pe(c=>{const d=o?t.measuredBox[c]:t.layoutBox[c],f=ue(n[c]);d.max=d.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[c].max=e.relativeTarget[c].min+f)});const r=et();pt(r,n,t.layoutBox);const a=et();o?pt(a,e.applyTransform(i,!0),t.measuredBox):pt(a,n,t.layoutBox);const l=!ia(r);let u=!1;if(!e.resumeFrom){const c=e.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:d,layout:f}=c;if(d&&f){const h=Z();mt(h,t.layoutBox,d.layoutBox);const p=Z();mt(p,n,f.layoutBox),sa(h,p)||(u=!0),c.options.layoutRoot&&(e.relativeTarget=p,e.relativeTargetOrigin=h,e.relativeParent=c)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function Qf(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function eh(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function th(e){e.clearSnapshot()}function ro(e){e.clearMeasurements()}function ao(e){e.isLayoutDirty=!1}function nh(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function lo(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function ih(e){e.resolveTargetDelta()}function sh(e){e.calcProjection()}function oh(e){e.resetSkewAndRotation()}function rh(e){e.removeLeadSnapshot()}function uo(e,t,n){e.translate=Y(t.translate,0,n),e.scale=Y(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function co(e,t,n,i){e.min=Y(t.min,n.min,i),e.max=Y(t.max,n.max,i)}function ah(e,t,n,i){co(e.x,t.x,n.x,i),co(e.y,t.y,n.y,i)}function lh(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const uh={duration:.45,ease:[.4,0,.1,1]},fo=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ho=fo("applewebkit/")&&!fo("chrome/")?Math.round:ve;function go(e){e.min=ho(e.min),e.max=ho(e.max)}function ch(e){go(e.x),go(e.y)}function aa(e,t,n){return e==="position"||e==="preserve-aspect"&&!mf(so(t),so(n),.2)}function dh(e){return e!==e.root&&e.scroll?.wasRoot}const fh=ra({attachResizeListener:(e,t)=>Rt(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Pn={current:void 0},la=ra({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Pn.current){const e=new fh({});e.mount(window),e.setOptions({layoutScroll:!0}),Pn.current=e}return Pn.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),hh={pan:{Feature:Af},drag:{Feature:Vf,ProjectionNode:la,MeasureLayout:ea}};function po(e,t,n){const{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,o=i[s];o&&q.postRender(()=>o(t,Et(t)))}class gh extends Le{mount(){const{current:t}=this.node;t&&(this.unmount=Fc(t,(n,i)=>(po(this.node,i,"Start"),s=>po(this.node,s,"End"))))}unmount(){}}class ph extends Le{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!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=Pt(Rt(this.node.current,"focus",()=>this.onFocus()),Rt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function mo(e,t,n){const{props:i}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&i.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),o=i[s];o&&q.postRender(()=>o(t,Et(t)))}class mh extends Le{mount(){const{current:t}=this.node;t&&(this.unmount=jc(t,(n,i)=>(mo(this.node,i,"Start"),(s,{success:o})=>mo(this.node,s,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const ni=new WeakMap,Mn=new WeakMap,vh=e=>{const t=ni.get(e.target);t&&t(e)},yh=e=>{e.forEach(vh)};function wh({root:e,...t}){const n=e||document;Mn.has(n)||Mn.set(n,{});const i=Mn.get(n),s=JSON.stringify(t);return i[s]||(i[s]=new IntersectionObserver(yh,{root:e,...t})),i[s]}function xh(e,t,n){const i=wh(t);return ni.set(e,n),i.observe(e),()=>{ni.delete(e),i.unobserve(e)}}const Ch={some:0,all:1};class Sh extends Le{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:i,amount:s="some",once:o}=t,r={root:n?n.current:void 0,rootMargin:i,threshold:typeof s=="number"?s:Ch[s]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),f=u?c:d;f&&f(l)};return xh(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(_h(t,n))&&this.startObserver()}unmount(){}}function _h({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const bh={inView:{Feature:Sh},tap:{Feature:mh},focus:{Feature:ph},hover:{Feature:gh}},Rh={layout:{ProjectionNode:la,MeasureLayout:ea}},Ph={...cf,...bh,...hh,...Rh},Hi=Rd(Ph,$d),Mh="_primary_13825_8",Th="_secondary_13825_12",Eh="_tertiary_13825_16",Vh="_positive_13825_20",Ah="_negative_13825_24",Dh="_warning_13825_28",Fh="_accent_13825_32",kh="_inverse_13825_36",Ih="_text_13825_111",Lh="_regular_13825_117",jh="_medium_13825_121",$h="_semibold_13825_125",Oh="_bold_13825_129",kt={primary:Mh,secondary:Th,tertiary:Eh,positive:Vh,negative:Ah,warning:Dh,accent:Fh,inverse:kh,"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:Ih,regular:Lh,medium:jh,semibold:$h,bold:Oh},zh=e=>{let t;e.center?t="center":e.left?t="left":e.right&&(t="right");let n;return e.uppercase?n="uppercase":e.lowercase?n="lowercase":e.capitalize&&(n="capitalize"),M.css({marginTop:e.mt,marginBottom:e.mb,marginRight:e.mr,marginLeft:e.ml,flex:e.flex,cursor:e.cursor,wordBreak:e.wordBreak,whiteSpace:e.whiteSpace,textOverflow:e.textOverflow,textDecoration:e.decoration,textAlign:t,textTransform:n,color:e.color,opacity:e.disabled?.5:void 0,overflow:e.overflow})},B=v.forwardRef(({children:e,className:t,variant:n="body-1",fontWeight:i="medium",tag:s="p",colorName:o="primary",style:r,clickOpacity:a=.5,opacityDuration:l=200,onClick:u,disabled:c,mt:d,mb:f,ml:h,mr:p,flex:g,cursor:x,wordBreak:w,whiteSpace:C,textOverflow:y,decoration:S,color:_,center:b,left:E,right:R,uppercase:I,lowercase:A,capitalize:z,overflow:J,...N},ee)=>{const[te,se]=v.useState(!1),$=!!u,K=()=>$&&se(!0),ne=()=>$&&se(!1),j=zh({mt:d,mb:f,ml:h,mr:p,flex:g,cursor:x,wordBreak:w,whiteSpace:C,textOverflow:y,decoration:S,color:_,center:b,left:E,right:R,uppercase:I,lowercase:A,capitalize:z,overflow:J}),H=s,P=$?M.css({opacity:te?a:1,transition:`opacity ${l}ms ease`}):"";return m.jsx(H,{ref:ee,...N,className:M.cx(kt.text,kt[n],kt[o],kt[i],P,t,j),style:r,onClick:u,onMouseDown:K,onMouseUp:ne,onMouseLeave:ne,onTouchStart:K,onTouchEnd:ne,role:$?"button":void 0,tabIndex:$?0:void 0,children:e})});B.displayName="Text";const qt=Hi(B),Bh="_loader_1qleq_8",Nh={loader:Bh},Hh=({color:e="var(--text-accent)"})=>m.jsx("span",{className:M.cx(Nh.loader,M.css({"--loader-color":e}))}),Gh=M.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}),ct={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)"},Wh={xs:"var(--height-button-xs)",sm:"var(--height-button-sm)",md:"var(--height-button-md)",lg:"var(--height-button-lg)"},Uh={clear:M.css({backgroundColor:"transparent",border:"none"}),filled:M.css({backgroundColor:"var(--fill-accent-primary)",color:"white",border:"none"}),outline:M.css({backgroundColor:"transparent",border:"1px solid var(--border-accent-primary)"})},Kh=(e,t,n,i)=>{if(i)return M.css({cursor:"not-allowed",opacity:.7});const s={transition:"all 0.2s ease",borderRadius:"var(--corner-lg)",border:"none",color:e==="filled"?"var(--text-inverse)":`var(--text-${t})`};switch(e){case"filled":return M.css({...s,backgroundColor:`var(--fill-${t}-${n})`,":hover":{backgroundColor:`var(--fill-${t}-${n}-hover)`},":active":{backgroundColor:`var(--fill-${t}-${n}-hover)`}});case"outline":return M.css({...s,backgroundColor:"transparent",border:`1px solid var(--border-${t}-${n})`,":hover":{backgroundColor:`var(--fill-${t}-secondary-hover)`},":active":{backgroundColor:`var(--fill-${t}-secondary-hover)`}});case"clear":return M.css({...s,backgroundColor:"transparent",":hover":{backgroundColor:`var(--fill-${t}-secondary-hover)`},":active":{backgroundColor:`var(--fill-${t}-secondary-hover)`}});default:return M.css(s)}},qh=({disabled:e,loading:t,onClick:n,wrapperClassName:i,buttonClassName:s,buttonDisabledClassName:o,textClassName:r,children:a,variant:l="filled",backgroundColor:u,textColor:c,textFontWeight:d,borderColor:f,color:h="accent",borderRadius:p,width:g="full",size:x="md",iconLeft:w,iconRight:C,intensity:y="primary",flex:S,..._})=>{const b=v.useMemo(()=>{switch(g){case"full":return"100%";case"auto":return"auto";default:return g}},[g]),E=v.useMemo(()=>u||(l==="filled"?h==="neutral"?"var(--fill-neutral-secondary)":`var(--fill-${h}-${y})`:"transparent"),[l,u,h,y]),R=v.useMemo(()=>{if(y==="primary"){if(h==="neutral")return"var(--text-secondary)";if(l==="filled")return"var(--text-inverse)"}else if(h==="neutral")return"var(--text-secondary)";return`var(--text-${h})`},[y,h,l]),I=v.useMemo(()=>{if(y==="primary"){if(h==="neutral")return"secondary";if(l==="filled")return"inverse"}else if(h==="neutral")return"secondary";return h},[l,h,y]),A=v.useMemo(()=>f||(l==="outline"?`var(--border-${h}-${y})`:"transparent"),[l,f,h,y]),z=v.useMemo(()=>{switch(x){case"lg":return ct.lg;case"md":case"sm":return ct.md;case"xs":return ct.sm;default:return ct.md}},[x]),J=M.cx(Gh,Kh(l,h,y,e),Uh[l],s,e?o:void 0,M.css({borderRadius:p?ct[p]:z,backgroundColor:E,borderColor:A,color:c,width:"100%",height:Wh[x],opacity:e?.7:1})),N=v.useMemo(()=>{switch(x){case"lg":case"md":return"body-1";case"sm":case"xs":return"body-2";default:return"body-1"}},[x]);return m.jsx(V,{className:M.cx(i),w:b,flex:S,relative:!0,overflow:"hidden",children:m.jsxs(Hi.button,{whileTap:!e&&!t?{scale:.99,boxShadow:"inset 0 0 0 10000px rgba(0,0,0,0.1)",transition:{duration:0}}:{},className:J,disabled:e||t,onClick:n,..._,children:[t?m.jsx(Hh,{color:R}):m.jsxs(m.Fragment,{children:[w,m.jsx(qt,{style:{color:c},colorName:I,variant:N,className:r,textOverflow:"ellipsis",overflow:"hidden",children:a}),C]}),m.jsx(st,{})]})})},Xh=e=>T.createElement("svg",{width:16,height:16,viewBox:"0 0 24 24",fill:"none",...e},T.createElement("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z",fill:"currentColor"})),Yh=e=>T.createElement("svg",{viewBox:"0 0 24 24",fill:"none",...e},T.createElement("path",{d:"M19 13H5v-2h14v2z",fill:"currentColor"})),Zh="_checkbox_asmiz_8",Jh="_disabled_asmiz_15",Qh="_checkbox__ripple_asmiz_15",eg="_checkbox__input_asmiz_27",tg="_checkbox__box_asmiz_35",ng="_secondary_asmiz_48",ig="_checked_asmiz_54",sg="_error_asmiz_63",Re={checkbox:Zh,disabled:Jh,checkbox__ripple:Qh,checkbox__input:eg,checkbox__box:tg,secondary:ng,checked:ig,error:sg},og={sm:20,md:24},Gi=v.forwardRef(({checked:e,onChange:t,disabled:n,error:i,indeterminate:s,size:o="md",title:r,titleColor:a,subtitle:l,subtitleColor:u="secondary",name:c,required:d,variant:f="primary",flex:h},p)=>{const[g,x]=v.useState(!1),w=e!==void 0,C=w?e:g,y=b=>{w||x(b.target.checked),t?.(b)},S=og[o],_=C||s;return m.jsxs("label",{className:M.cx(Re.checkbox,M.css({flex:h}),{[Re.disabled]:n}),children:[m.jsxs(V,{relative:!0,display:"inline-flex",style:{"--checkbox-size":`${S}px`,"--checkbox-size-double":`${S*2}px`},children:[m.jsx("input",{ref:p,type:"checkbox",checked:C,onChange:y,onClick:b=>b.stopPropagation(),disabled:n,name:c,required:d,className:M.cx(Re.checkbox__input,{[Re.disabled]:n})}),m.jsx("div",{className:M.cx(Re.checkbox__box,Re[f],{[Re.disabled]:n,[Re.error]:i,[Re.checked]:_}),children:_&&(s?m.jsx(Yh,{width:S*.75,height:S*.75}):m.jsx(Xh,{width:S*.75,height:S*.75}))})]}),(r||l)&&m.jsxs(V,{gap:4,children:[r&&m.jsx(B,{colorName:a,variant:o==="sm"?"body-2":"body-1",children:r}),l&&m.jsx(B,{variant:"body-2",colorName:u,children:l})]})]})});Gi.displayName="Checkbox";const rg=e=>T.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{opacity:.5},T.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"}))),ag="_disabled_ph9zm_20",lg="_multiline_ph9zm_24",ug="_input_ph9zm_8",cg="_sm_ph9zm_74",dg="_md_ph9zm_79",fg="_error_ph9zm_84",hg="_white_ph9zm_88",gg="_gray_ph9zm_92",ce={"input-container":"_input-container_ph9zm_8",disabled:ag,multiline:lg,input:ug,"input-text-size_sm":"_input-text-size_sm_ph9zm_55","input-text-size_md":"_input-text-size_md_ph9zm_59","input-text-align_left":"_input-text-align_left_ph9zm_64","input-text-align_center":"_input-text-align_center_ph9zm_67","input-text-align_right":"_input-text-align_right_ph9zm_70",sm:cg,md:dg,error:fg,white:hg,gray:gg,"clear-button":"_clear-button_ph9zm_96"};function vo(e){return{...new Event("input",{bubbles:!0}),target:e,currentTarget:e}}const ua=v.forwardRef((e,t)=>{const{label:n,prompt:i,error:s,errorText:o,size:r="md",prefix:a,suffix:l,background:u="white",showClearButton:c,disabled:d,value:f,defaultValue:h,inputClassName:p,textAlign:g="left",...x}=e,w=e.multiline===!0,C=v.useRef(null),y=v.useRef(null),[S,_]=Xt(f!==void 0?String(f):void 0,h!==void 0?String(h):"");v.useImperativeHandle(t,()=>({focus:()=>{C.current?.focus(),y.current?.focus()},blur:()=>{C.current?.blur(),y.current?.blur()},get value(){return C.current?.value||y.current?.value}}));const b=I=>{if(_(I.target.value),w){const A=e.onChange;A?.(I)}else{const A=e.onChange;A?.(I)}};v.useEffect(()=>{w&&e.autoResize&&y.current&&(y.current.style.height="auto",y.current.style.height=`${y.current.scrollHeight}px`)},[S,w,e.autoResize]);const E=()=>{if(_(""),!w){const A=C.current;if(A){A.value="";const z=vo(A),J=e.onChange;J?.(z)}return}const I=y.current;if(I){I.value="";const A=vo(I),z=e.onChange;z?.(A)}},R=()=>{if(w){const{rows:J,autoResize:N,onChange:ee,multiline:te,...se}=x;return m.jsx("textarea",{ref:y,rows:e.rows??3,className:M.cx(ce.input,p,{[ce.disabled]:d,[ce[`input-text-align_${g}`]]:!!g}),disabled:d,maxLength:e.maxLength,...se,value:S,onChange:b})}const{onChange:I,multiline:A,...z}=x;return m.jsx("input",{...z,ref:C,className:M.cx(ce.input,ce[`input-text-size_${r}`],p,{[ce.disabled]:d,[ce[`input-text-align_${g}`]]:!!g}),disabled:d,type:e.type??"text",value:S,onChange:b})};return m.jsxs(V,{w:"full",gap:"var(--spacing-sm)",children:[n&&m.jsx(B,{variant:"body-2",fontWeight:"regular",colorName:"tertiary",children:n}),m.jsxs(V,{row:!0,alignItems:w?"flex-start":"center",w:"full",gap:"var(--spacing-md)",className:M.cx(ce["input-container"],ce[u],ce[r],{[ce.error]:s,[ce.disabled]:d,[ce.multiline]:w}),children:[a&&m.jsx(V,{flex:"none",children:a}),m.jsx(V,{flex:"1",children:R()}),c&&S&&!d&&m.jsx(V,{flex:"none",children:m.jsx("span",{className:ce["clear-button"],onClick:E,children:m.jsx(rg,{})})}),l&&m.jsx(V,{flex:"none",children:l})]}),(i||w)&&m.jsxs(V,{row:!0,gap:10,w:"full",children:[typeof i=="string"?m.jsx(B,{variant:"caption-1",colorName:"tertiary",children:i}):i,w&&e.maxLength&&m.jsx(B,{right:!0,ml:"auto",flex:"none",variant:"caption-1",colorName:"tertiary",children:`${S.length}/${e.maxLength}`})]}),o&&s&&m.jsx(B,{variant:"body-2",colorName:"negative",fontWeight:"regular",children:o})]})});ua.displayName="Input";const pg=e=>T.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M6 9L12 15L18 9",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),mg=e=>T.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",...e},T.createElement("g",null,T.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"}))),vg="_disabled_v62jt_40",yg="_open_v62jt_48",wg="_error_v62jt_51",xg="_hidden_v62jt_87",Cg="_visible_v62jt_90",Sg="_selected_v62jt_163",ie={"select-container":"_select-container_v62jt_8","full-width":"_full-width_v62jt_13","select-input":"_select-input_v62jt_17","size-xs":"_size-xs_v62jt_25","size-sm":"_size-sm_v62jt_30","size-md":"_size-md_v62jt_35",disabled:vg,open:yg,"select-arrow":"_select-arrow_v62jt_48",error:wg,"select-value":"_select-value_v62jt_62","select-value_xs":"_select-value_xs_v62jt_74","select-placeholder":"_select-placeholder_v62jt_81",hidden:xg,visible:Cg,"select-arrow_xs":"_select-arrow_xs_v62jt_106","select-dropdown":"_select-dropdown_v62jt_116","select-menu":"_select-menu_v62jt_126","select-menu-item":"_select-menu-item_v62jt_145","select-menu-item-first":"_select-menu-item-first_v62jt_158",selected:Sg,"overflow-tooltip-container":"_overflow-tooltip-container_v62jt_167","overflow-tooltip-text":"_overflow-tooltip-text_v62jt_172","empty-block":"_empty-block_v62jt_179"};function ca({value:e,onChange:t,multiple:n=!1,returnedValue:i,renderItem:s,placeholder:o,items:r=[],fullWidth:a,size:l="md",showDefaultItem:u,disabled:c,label:d,firstItem:f,lastItem:h,observer:p,emptyText:g,onBlur:x,prompt:w,error:C,errorText:y}){const[S,_]=Xt(e,n?[]:null),b=v.useRef(null),E=v.useRef(null),[R,I]=v.useState(!1),A=v.useMemo(()=>n?S||[]:S!=null?[S]:[],[S,n]),z=v.useCallback(j=>i?i(j):j,[i]),J=v.useMemo(()=>{const j=new Map;return r.forEach(H=>{j.set(z(H),H)}),j},[r,z]),N=Eo(b,R),ee=!r.length&&!C,te=j=>{const H=z(j);if(n){const P=A.includes(H)?A.filter(L=>L!==H):[...A,H];_(P),t?.(P)}else _(H),t?.(H),I(!1)},se=j=>{if(!n)return;const H=A.filter(P=>P!==j);_(H),t?.(H)},$=()=>{const j=n?[]:null;_(j),t?.(j),n||I(!1)};v.useEffect(()=>{if(!R)return;const j=H=>{const P=H.target;!b.current?.contains(P)&&!E.current?.contains(P)&&(I(!1),x?.())};return document.addEventListener("mousedown",j),()=>document.removeEventListener("mousedown",j)},[R,x]);const K=()=>{if(!A.length)return m.jsx(B,{variant:l==="xs"?"caption-1":"body-2",textOverflow:"ellipsis",overflow:"hidden",colorName:"tertiary",children:o??"Select..."});if(n)return m.jsx(V,{flexWrap:"wrap",row:!0,gap:10,children:A.map(P=>{const L=J.get(P);return L?m.jsx(li,{size:"sm",label:s(L),onDelete:oe=>{oe.stopPropagation(),se(P)}},P):null})});const j=J.get(A[0]);if(!j)return m.jsx(B,{variant:l==="xs"?"caption-1":"body-2",textOverflow:"ellipsis",overflow:"hidden",colorName:"tertiary",children:o});const H=s(j);return typeof H=="string"?m.jsx(B,{variant:l==="xs"?"caption-1":"body-2",tag:"p",textOverflow:"ellipsis",overflow:"hidden",children:H}):m.jsx(m.Fragment,{children:H})},ne=R&&m.jsx(Zt,{children:m.jsx(Hi.div,{ref:E,className:ie["select-dropdown"],initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.25,ease:"easeInOut"},style:{...N,position:"absolute",zIndex:1},children:m.jsxs("ul",{className:ie["select-menu"],children:[u&&!n&&m.jsx(V,{className:ie["select-menu-item"],role:"option",onClick:$,children:m.jsx(B,{variant:"body-2",colorName:"tertiary",children:o})}),f&&m.jsx(V,{className:M.cx(ie["select-menu-item"],ie["select-menu-item-first"]),children:f}),ee&&m.jsxs(V,{className:ie["empty-block"],children:[m.jsx(V,{w:20,h:20,children:m.jsx(mg,{})}),m.jsx(B,{variant:"body-2",children:g??"There is nothing yet"})]}),r.map(j=>{const H=z(j),P=A.includes(H);return m.jsxs(V,{row:!0,gap:10,alignItems:"center",className:M.cx(ie["select-menu-item"],{[ie.selected]:P}),role:"option",relative:!0,onClick:()=>te(j),children:[n&&m.jsx(Gi,{size:"sm",checked:P}),typeof s(j)=="string"?m.jsx(B,{variant:"body-2",tag:"p",wordBreak:"break-all",whiteSpace:"break-spaces",children:s(j)}):s(j),m.jsx(st,{})]},H)}),p,h&&m.jsx(V,{className:M.cx(ie["select-menu-item"],ie["select-menu-item-first"]),children:h})]})},"dropdown")});return m.jsxs(V,{relative:!0,display:"inline-block",minWidth:120,w:a?"full":"auto",children:[typeof d=="string"?m.jsx(B,{variant:"body-2",colorName:"tertiary",fontWeight:"regular",mb:l==="sm"?4:8,children:d}):d,m.jsxs(V,{ref:b,row:!0,gap:10,tabIndex:c?-1:0,role:"button",alignItems:"flex-start","aria-haspopup":"listbox",relative:!0,w:"100%",className:M.cx(ie["select-input"],ie[`size-${l}`],{[ie.error]:C,[ie.disabled]:c,[ie.open]:R}),onClick:()=>!c&&I(j=>!j),onBlur:x,children:[m.jsx(V,{className:M.cx(ie["select-value"]),children:K()}),m.jsx(V,{className:M.cx(ie["select-arrow"],ie[`select-arrow_${l}`]),children:m.jsx(pg,{})})]}),typeof w=="string"?m.jsx(B,{variant:"caption-1",colorName:"tertiary",mt:4,children:w}):w,C&&y&&m.jsx(B,{tag:"p",colorName:"negative",variant:"body-2",mt:5,children:y}),m.jsx(Kc,{initial:!1,children:ne})]})}const _g=e=>T.createElement("svg",{width:10,height:10,viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.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"})),bg=e=>T.createElement("svg",{width:12,height:12,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.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"})),Rg="_container_e7tan_8",Pg="_disabled_e7tan_17",Mg="_reverse_e7tan_21",Tg="_input_e7tan_25",Eg="_switchContainer_e7tan_35",Vg="_variant_accent_e7tan_43",Ag="_variant_secondary_e7tan_47",Dg="_thumb_e7tan_51",Fg="_variant_theme_e7tan_54",kg="_moon_e7tan_58",Ig="_fire_e7tan_61",Lg="_size_sm_e7tan_74",jg="_size_md_e7tan_80",$g="_size_lg_e7tan_86",we={container:Rg,disabled:Pg,reverse:Mg,input:Tg,switchContainer:Eg,variant_accent:Vg,variant_secondary:Ag,switch:"_switch_e7tan_35",thumb:Dg,variant_theme:Fg,moon:kg,fire:Ig,size_sm:Lg,size_md:jg,size_lg:$g},da=v.forwardRef(({title:e,text:t,icon:n,disabled:i,onChange:s,checked:o,defaultValue:r,className:a,size:l="md",variant:u="accent",reverse:c=!1,w:d="auto",...f},h)=>{const[p,g]=Xt(o,r),x=v.useRef(null);v.useImperativeHandle(h,()=>({focus:()=>{x.current?.focus()},blur:()=>{x.current?.blur()},get checked(){return p??!1},setChecked:S=>{g(S),s?.(S)},toggle:()=>{const S=!p;g(S),s?.(S)},isFocused:()=>document.activeElement===x.current,isDisabled:()=>i??!1,getInputElement:()=>x.current,checkValidity:()=>x.current?.checkValidity()??!0,reset:()=>{const S=r??!1;g(S),s?.(S)}}),[p,g,s,i,r]);const w=v.useCallback(S=>{g(S.target.checked),s?.(S.target.checked)},[s]),C=v.useMemo(()=>typeof e=="string"?m.jsx(B,{variant:"body-1",colorName:"primary",fontWeight:"medium",children:e}):e,[e]),y=v.useMemo(()=>typeof t=="string"?m.jsx(B,{variant:"body-2",colorName:"secondary",fontWeight:"regular",children:t}):t,[t]);return m.jsxs(V,{row:!0,w:d,gap:"var(--spacing-sm)",children:[m.jsxs("label",{className:M.cx(we.container,a,{[we.disabled]:i,[we.reverse]:c}),children:[m.jsxs(V,{className:M.cx(we.switchContainer,we[`size_${l}`],we[`variant_${u}`]),children:[m.jsx("input",{ref:x,type:"checkbox",checked:p,className:we.input,onChange:w,disabled:i,...f}),m.jsx("div",{className:we.switch,children:m.jsx("div",{className:we.thumb,children:u==="theme"&&m.jsxs(m.Fragment,{children:[m.jsx(bg,{className:we.moon}),m.jsx(_g,{className:we.fire})]})})})]}),m.jsxs(V,{gap:"var(--spacing-xs)",children:[C,y]})]}),n]})});da.displayName="Switch";const Og="_primary_svt6d_8",zg="_secondary_svt6d_13",Bg="_button_svt6d_18",Ve={primary:Og,secondary:zg,button:Bg,"button-active":"_button-active_svt6d_32","icon-container":"_icon-container_svt6d_35","button-primary":"_button-primary_svt6d_47","button-secondary":"_button-secondary_svt6d_51","button-disabled":"_button-disabled_svt6d_55","full-width":"_full-width_svt6d_60"};function Ng({value:e,onChange:t,options:n,variant:i="primary",fullWidth:s=!1,className:o}){return m.jsx(V,{row:!0,alignItems:"center",borderRadius:"var(--corner-md)",p:"var(--spacing-xs)",gap:"var(--spacing-md)",className:M.cx(Ve[i],s&&Ve["full-width"],o),children:n.map(r=>{const a=r.value===e,l=r.disabled,u=r.separatorAfter??!1;return m.jsxs(v.Fragment,{children:[m.jsxs("button",{type:"button",disabled:l,className:M.cx(Ve.button,s&&Ve["full-width"],a&&Ve["button-active"],a&&Ve[`button-${i}`],l&&Ve["button-disabled"]),onClick:()=>!l&&t(r.value),children:[r.icon&&m.jsx(V,{alignItems:"center",justifyContent:"center",className:Ve["icon-container"],children:r.icon}),r.label&&m.jsx(B,{colorName:a?"primary":"tertiary",children:r.label}),!l&&m.jsx(st,{color:"var(--fill-bg-overlay-primary)"})]}),u&&m.jsx(V,{w:1,h:24,backgroundColor:"var(--fill-bg-tertiary)"})]},r.value)})})}const Hg="_header_446to_8",Gg={header:Hg},fa=v.forwardRef(({title:e,subtitle:t,onClose:n,w:i="full",p:s,py:o,px:r="var(--spacing-2xl)",pt:a="var(--spacing-2xl)",pb:l="var(--spacing-lg)",row:u=!0,justifyContent:c="space-between",showCloseButton:d=!0},f)=>m.jsxs(V,{w:i,p:s,py:o,px:r,pt:a,pb:l,row:u,justifyContent:c,ref:f,className:Gg.header,children:[m.jsxs(V,{gap:"var(--spacing-sm)",children:[m.jsx(B,{variant:"title-3",colorName:"primary",fontWeight:"semibold",children:e}),m.jsx(B,{variant:"body-1",colorName:"tertiary",fontWeight:"medium",children:t})]}),d&&m.jsx(V,{children:m.jsx(wt,{onClick:n,color:"neutral",children:m.jsx(To,{})})})]}));fa.displayName="ModalHeader";const Wg="_footer_1bo08_8",Ug={footer:Wg},ha=v.forwardRef(({children:e,row:t=!0,flex:n=!0,gap:i="var(--spacing-lg)",p:s="var(--spacing-2xl)",className:o,...r},a)=>m.jsx(V,{flex:n,row:t,gap:i,p:s,className:M.cx(Ug.footer,o),ref:a,...r,children:e}));ha.displayName="ModalFooter";function qe(e,t,n){let i=n.initialDeps??[],s;function o(){var r,a,l,u;let c;n.key&&((r=n.debug)!=null&&r.call(n))&&(c=Date.now());const d=e();if(!(d.length!==i.length||d.some((p,g)=>i[g]!==p)))return s;i=d;let h;if(n.key&&((a=n.debug)!=null&&a.call(n))&&(h=Date.now()),s=t(...d),n.key&&((l=n.debug)!=null&&l.call(n))){const p=Math.round((Date.now()-c)*100)/100,g=Math.round((Date.now()-h)*100)/100,x=g/16,w=(C,y)=>{for(C=String(C);C.length<y;)C=" "+C;return C};console.info(`%c⏱ ${w(g,5)} /${w(p,5)} ms`,`
21
21
  font-size: .6rem;
22
22
  font-weight: bold;
23
- color: hsl(${Math.max(0,Math.min(120-120*x,120))}deg 100% 31%);`,n?.key)}return(c=n?.onChange)==null||c.call(n,s),s}return o.updateDeps=r=>{i=r},o}function yo(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const Xg=(e,t)=>Math.abs(e-t)<1.01,Yg=(e,t,n)=>{let i;return function(...s){e.clearTimeout(i),i=e.setTimeout(()=>t.apply(this,s),n)}},wo=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},Zg=e=>e,Jg=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),i=[];for(let s=t;s<=n;s++)i.push(s);return i},Qg=(e,t)=>{const n=e.scrollElement;if(!n)return;const i=e.targetWindow;if(!i)return;const s=r=>{const{width:a,height:l}=r;t({width:Math.round(a),height:Math.round(l)})};if(s(wo(n)),!i.ResizeObserver)return()=>{};const o=new i.ResizeObserver(r=>{const a=()=>{const l=r[0];if(l?.borderBoxSize){const c=l.borderBoxSize[0];if(c){s({width:c.inlineSize,height:c.blockSize});return}}s(wo(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()});return o.observe(n,{box:"border-box"}),()=>{o.unobserve(n)}},xo={passive:!0},Co=typeof window>"u"?!0:"onscrollend"in window,ep=(e,t)=>{const n=e.scrollElement;if(!n)return;const i=e.targetWindow;if(!i)return;let s=0;const o=e.options.useScrollendEvent&&Co?()=>{}:Yg(i,()=>{t(s,!1)},e.options.isScrollingResetDelay),r=u=>()=>{const{horizontal:d,isRtl:f}=e.options;s=d?n.scrollLeft*(f&&-1||1):n.scrollTop,o(),t(s,u)},a=r(!0),l=r(!1);l(),n.addEventListener("scroll",a,xo);const c=e.options.useScrollendEvent&&Co;return c&&n.addEventListener("scrollend",l,xo),()=>{n.removeEventListener("scroll",a),c&&n.removeEventListener("scrollend",l)}},tp=(e,t,n)=>{if(t?.borderBoxSize){const i=t.borderBoxSize[0];if(i)return Math.round(i[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},np=(e,{adjustments:t=0,behavior:n},i)=>{var s,o;const r=e+t;(o=(s=i.scrollElement)==null?void 0:s.scrollTo)==null||o.call(s,{[i.options.horizontal?"left":"top"]:r,behavior:n})};class ip{constructor(t){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 i=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(s=>{s.forEach(o=>{const r=()=>{this._measureElement(o.target,o)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()})}));return{disconnect:()=>{var s;(s=i())==null||s.disconnect(),n=null},observe:s=>{var o;return(o=i())==null?void 0:o.observe(s,{box:"border-box"})},unobserve:s=>{var o;return(o=i())==null?void 0:o.unobserve(s)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([i,s])=>{typeof s>"u"&&delete n[i]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Zg,rangeExtractor:Jg,onChange:()=>{},measureElement:tp,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 i,s;(s=(i=this.options).onChange)==null||s.call(i,this,n)},this.maybeNotify=Ke(()=>(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 i=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==i){if(this.cleanup(),!i){this.maybeNotify();return}this.scrollElement=i,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(s=>{this.observer.observe(s)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,s=>{this.scrollRect=s,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(s,o)=>{this.scrollAdjustments=0,this.scrollDirection=o?this.getScrollOffset()<s?"forward":"backward":null,this.scrollOffset=s,this.isScrolling=o,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,i)=>{const s=new Map,o=new Map;for(let r=i-1;r>=0;r--){const a=n[r];if(s.has(a.lane))continue;const l=o.get(a.lane);if(l==null||a.end>l.end?o.set(a.lane,a):a.end<l.end&&s.set(a.lane,!0),s.size===this.options.lanes)break}return o.size===this.options.lanes?Array.from(o.values()).sort((r,a)=>r.end===a.end?r.index-a.index:r.end-a.end)[0]:void 0},this.getMeasurementOptions=Ke(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(n,i,s,o,r)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:i,scrollMargin:s,getItemKey:o,enabled:r}),{key:!1}),this.getMeasurements=Ke(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:i,scrollMargin:s,getItemKey:o,enabled:r},a)=>{if(!r)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(u=>{this.itemSizeCache.set(u.key,u.size)}));const l=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const c=this.measurementsCache.slice(0,l);for(let u=l;u<n;u++){const d=o(u),f=this.options.lanes===1?c[u-1]:this.getFurthestMeasurement(c,u),h=f?f.end+this.options.gap:i+s,p=a.get(d),g=typeof p=="number"?p:this.options.estimateSize(u),x=h+g,w=f?f.lane:u%this.options.lanes;c[u]={index:u,start:h,size:g,end:x,key:d,lane:w}}return this.measurementsCache=c,c},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=Ke(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,i,s,o)=>this.range=n.length>0&&i>0?sp({measurements:n,outerSize:i,scrollOffset:s,lanes:o}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=Ke(()=>{let n=null,i=null;const s=this.calculateRange();return s&&(n=s.startIndex,i=s.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,i]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,i]},(n,i,s,o,r)=>o===null||r===null?[]:n({startIndex:o,endIndex:r,overscan:i,count:s}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=n=>{const i=this.options.indexAttribute,s=n.getAttribute(i);return s?parseInt(s,10):(console.warn(`Missing attribute name '${i}={index}' on measured element.`),-1)},this._measureElement=(n,i)=>{const s=this.indexFromElement(n),o=this.measurementsCache[s];if(!o)return;const r=o.key,a=this.elementsCache.get(r);a!==n&&(a&&this.observer.unobserve(a),this.observer.observe(n),this.elementsCache.set(r,n)),n.isConnected&&this.resizeItem(s,this.options.measureElement(n,i,this))},this.resizeItem=(n,i)=>{const s=this.measurementsCache[n];if(!s)return;const o=this.itemSizeCache.get(s.key)??s.size,r=i-o;r!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(s,r,this):s.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",r),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=r,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(s.index),this.itemSizeCache=new Map(this.itemSizeCache.set(s.key,i)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((i,s)=>{i.isConnected||(this.observer.unobserve(i),this.elementsCache.delete(s))});return}this._measureElement(n,void 0)},this.getVirtualItems=Ke(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,i)=>{const s=[];for(let o=0,r=n.length;o<r;o++){const a=n[o],l=i[a];s.push(l)}return s},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const i=this.getMeasurements();if(i.length!==0)return yo(i[ga(0,i.length-1,s=>yo(i[s]).start,n)])},this.getOffsetForAlignment=(n,i,s=0)=>{const o=this.getSize(),r=this.getScrollOffset();i==="auto"&&(i=n>=r+o?"end":"start"),i==="center"?n+=(s-o)/2:i==="end"&&(n-=o);const a=this.getTotalSize()+this.options.scrollMargin-o;return Math.max(Math.min(a,n),0)},this.getOffsetForIndex=(n,i="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const s=this.measurementsCache[n];if(!s)return;const o=this.getSize(),r=this.getScrollOffset();if(i==="auto")if(s.end>=r+o-this.options.scrollPaddingEnd)i="end";else if(s.start<=r+this.options.scrollPaddingStart)i="start";else return[r,i];const a=i==="end"?s.end+this.options.scrollPaddingEnd:s.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,i,s.size),i]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(n,{align:i="start",behavior:s}={})=>{s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,i),{adjustments:void 0,behavior:s})},this.scrollToIndex=(n,{align:i="auto",behavior:s}={})=>{s==="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 o=0;const r=10,a=c=>{if(!this.targetWindow)return;const u=this.getOffsetForIndex(n,c);if(!u){console.warn("Failed to get offset for index:",n);return}const[d,f]=u;this._scrollToOffset(d,{adjustments:void 0,behavior:s}),this.targetWindow.requestAnimationFrame(()=>{const h=this.getScrollOffset(),p=this.getOffsetForIndex(n,f);if(!p){console.warn("Failed to get offset for index:",n);return}Xg(p[0],h)||l(f)})},l=c=>{this.targetWindow&&(o++,o<r?(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("Schedule retry",o,r),this.targetWindow.requestAnimationFrame(()=>a(c))):console.warn(`Failed to scroll to index ${n} after ${r} attempts.`))};a(i)},this.scrollBy=(n,{behavior:i}={})=>{i==="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:i})},this.getTotalSize=()=>{var n;const i=this.getMeasurements();let s;if(i.length===0)s=this.options.paddingStart;else if(this.options.lanes===1)s=((n=i[i.length-1])==null?void 0:n.end)??0;else{const o=Array(this.options.lanes).fill(null);let r=i.length-1;for(;r>=0&&o.some(a=>a===null);){const a=i[r];o[a.lane]===null&&(o[a.lane]=a.end),r--}s=Math.max(...o.filter(a=>a!==null))}return Math.max(s-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:i,behavior:s})=>{this.options.scrollToFn(n,{behavior:s,adjustments:i},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(t)}}const ga=(e,t,n,i)=>{for(;e<=t;){const s=(e+t)/2|0,o=n(s);if(o<i)e=s+1;else if(o>i)t=s-1;else return s}return e>0?e-1:0};function sp({measurements:e,outerSize:t,scrollOffset:n,lanes:i}){const s=e.length-1,o=l=>e[l].start;if(e.length<=i)return{startIndex:0,endIndex:s};let r=ga(0,s,o,n),a=r;if(i===1)for(;a<s&&e[a].end<n+t;)a++;else if(i>1){const l=Array(i).fill(0);for(;a<s&&l.some(u=>u<n+t);){const u=e[a];l[u.lane]=u.end,a++}const c=Array(i).fill(n+t);for(;r>=0&&c.some(u=>u>=n);){const u=e[r];c[u.lane]=u.start,r--}r=Math.max(0,r-r%i),a=Math.min(s,a+(i-1-a%i))}return{startIndex:r,endIndex:a}}const So=typeof document<"u"?T.useLayoutEffect:T.useEffect;function op(e){const t=T.useReducer(()=>({}),{})[1],n={...e,onChange:(s,o)=>{var r;o?Mo.flushSync(t):t(),(r=e.onChange)==null||r.call(e,s,o)}},[i]=T.useState(()=>new ip(n));return i.setOptions(n),So(()=>i._didMount(),[]),So(()=>i._willUpdate()),i}function rp(e){return op({observeElementRect:Qg,observeElementOffset:ep,scrollToFn:np,...e})}const ap="_main_pl2ip_8",_o={main:ap},pa=v.forwardRef(({children:e,className:t,row:n=!1,estimatedItemHeight:i=100,virtualize:s=!1},o)=>{const r=v.useRef(null),a=v.useMemo(()=>v.Children.toArray(e),[e]),l=rp({count:a.length,getScrollElement:()=>r.current,estimateSize:()=>i,measureElement:u=>u.getBoundingClientRect().height});return v.useImperativeHandle(o,()=>({scrollToTop:()=>l.scrollToOffset(0,{behavior:"smooth"}),scrollToBottom:()=>l.scrollToOffset(l.getTotalSize(),{behavior:"smooth"}),scrollToIndex:(u,d={})=>l.scrollToIndex(u,{behavior:"smooth",...d}),scrollToOffset:(u,d={})=>l.scrollToOffset(u,{behavior:"smooth",...d}),scrollBy:u=>{const d=l.scrollOffset||0;l.scrollToOffset(d+u,{behavior:"smooth"})},getElement:()=>r.current,getScrollOffset:()=>l.scrollOffset||0,getTotalSize:()=>l.getTotalSize()}),[l]),v.useMemo(()=>s||a.length>50,[s,a])&&a.length>0?m.jsx(V,{ref:r,className:M.cx(_o.main,t),w:"full",row:n,p:"var(--spacing-2xl)",children:m.jsx(V,{style:{height:`${l.getTotalSize()}px`,position:"relative"},children:l.getVirtualItems().map(u=>m.jsx(V,{"data-index":u.index,ref:l.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${u.start}px)`},children:a[u.index]},u.key))})}):m.jsx(V,{ref:r,className:M.cx(_o.main,t),w:"full",row:n,pl:"var(--spacing-2xl)",pr:"var(--spacing-xs)",children:m.jsx(V,{py:"var(--spacing-2xl)",pr:"var(--spacing-xl)",children:e})})});pa.displayName="ModalMain";const nn=Vo;nn.Header=fa;nn.Main=pa;nn.Footer=ha;/**
23
+ color: hsl(${Math.max(0,Math.min(120-120*x,120))}deg 100% 31%);`,n?.key)}return(u=n?.onChange)==null||u.call(n,s),s}return o.updateDeps=r=>{i=r},o}function yo(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const Kg=(e,t)=>Math.abs(e-t)<1.01,qg=(e,t,n)=>{let i;return function(...s){e.clearTimeout(i),i=e.setTimeout(()=>t.apply(this,s),n)}},wo=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},Xg=e=>e,Yg=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),i=[];for(let s=t;s<=n;s++)i.push(s);return i},Zg=(e,t)=>{const n=e.scrollElement;if(!n)return;const i=e.targetWindow;if(!i)return;const s=r=>{const{width:a,height:l}=r;t({width:Math.round(a),height:Math.round(l)})};if(s(wo(n)),!i.ResizeObserver)return()=>{};const o=new i.ResizeObserver(r=>{const a=()=>{const l=r[0];if(l?.borderBoxSize){const u=l.borderBoxSize[0];if(u){s({width:u.inlineSize,height:u.blockSize});return}}s(wo(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()});return o.observe(n,{box:"border-box"}),()=>{o.unobserve(n)}},xo={passive:!0},Co=typeof window>"u"?!0:"onscrollend"in window,Jg=(e,t)=>{const n=e.scrollElement;if(!n)return;const i=e.targetWindow;if(!i)return;let s=0;const o=e.options.useScrollendEvent&&Co?()=>{}:qg(i,()=>{t(s,!1)},e.options.isScrollingResetDelay),r=c=>()=>{const{horizontal:d,isRtl:f}=e.options;s=d?n.scrollLeft*(f&&-1||1):n.scrollTop,o(),t(s,c)},a=r(!0),l=r(!1);l(),n.addEventListener("scroll",a,xo);const u=e.options.useScrollendEvent&&Co;return u&&n.addEventListener("scrollend",l,xo),()=>{n.removeEventListener("scroll",a),u&&n.removeEventListener("scrollend",l)}},Qg=(e,t,n)=>{if(t?.borderBoxSize){const i=t.borderBoxSize[0];if(i)return Math.round(i[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},ep=(e,{adjustments:t=0,behavior:n},i)=>{var s,o;const r=e+t;(o=(s=i.scrollElement)==null?void 0:s.scrollTo)==null||o.call(s,{[i.options.horizontal?"left":"top"]:r,behavior:n})};class tp{constructor(t){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 i=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(s=>{s.forEach(o=>{const r=()=>{this._measureElement(o.target,o)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()})}));return{disconnect:()=>{var s;(s=i())==null||s.disconnect(),n=null},observe:s=>{var o;return(o=i())==null?void 0:o.observe(s,{box:"border-box"})},unobserve:s=>{var o;return(o=i())==null?void 0:o.unobserve(s)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([i,s])=>{typeof s>"u"&&delete n[i]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Xg,rangeExtractor:Yg,onChange:()=>{},measureElement:Qg,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 i,s;(s=(i=this.options).onChange)==null||s.call(i,this,n)},this.maybeNotify=qe(()=>(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 i=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==i){if(this.cleanup(),!i){this.maybeNotify();return}this.scrollElement=i,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(s=>{this.observer.observe(s)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,s=>{this.scrollRect=s,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(s,o)=>{this.scrollAdjustments=0,this.scrollDirection=o?this.getScrollOffset()<s?"forward":"backward":null,this.scrollOffset=s,this.isScrolling=o,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,i)=>{const s=new Map,o=new Map;for(let r=i-1;r>=0;r--){const a=n[r];if(s.has(a.lane))continue;const l=o.get(a.lane);if(l==null||a.end>l.end?o.set(a.lane,a):a.end<l.end&&s.set(a.lane,!0),s.size===this.options.lanes)break}return o.size===this.options.lanes?Array.from(o.values()).sort((r,a)=>r.end===a.end?r.index-a.index:r.end-a.end)[0]:void 0},this.getMeasurementOptions=qe(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(n,i,s,o,r)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:i,scrollMargin:s,getItemKey:o,enabled:r}),{key:!1}),this.getMeasurements=qe(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:i,scrollMargin:s,getItemKey:o,enabled:r},a)=>{if(!r)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 d=o(c),f=this.options.lanes===1?u[c-1]:this.getFurthestMeasurement(u,c),h=f?f.end+this.options.gap:i+s,p=a.get(d),g=typeof p=="number"?p:this.options.estimateSize(c),x=h+g,w=f?f.lane:c%this.options.lanes;u[c]={index:c,start:h,size:g,end:x,key:d,lane:w}}return this.measurementsCache=u,u},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=qe(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,i,s,o)=>this.range=n.length>0&&i>0?np({measurements:n,outerSize:i,scrollOffset:s,lanes:o}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=qe(()=>{let n=null,i=null;const s=this.calculateRange();return s&&(n=s.startIndex,i=s.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,i]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,i]},(n,i,s,o,r)=>o===null||r===null?[]:n({startIndex:o,endIndex:r,overscan:i,count:s}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=n=>{const i=this.options.indexAttribute,s=n.getAttribute(i);return s?parseInt(s,10):(console.warn(`Missing attribute name '${i}={index}' on measured element.`),-1)},this._measureElement=(n,i)=>{const s=this.indexFromElement(n),o=this.measurementsCache[s];if(!o)return;const r=o.key,a=this.elementsCache.get(r);a!==n&&(a&&this.observer.unobserve(a),this.observer.observe(n),this.elementsCache.set(r,n)),n.isConnected&&this.resizeItem(s,this.options.measureElement(n,i,this))},this.resizeItem=(n,i)=>{const s=this.measurementsCache[n];if(!s)return;const o=this.itemSizeCache.get(s.key)??s.size,r=i-o;r!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(s,r,this):s.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",r),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=r,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(s.index),this.itemSizeCache=new Map(this.itemSizeCache.set(s.key,i)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((i,s)=>{i.isConnected||(this.observer.unobserve(i),this.elementsCache.delete(s))});return}this._measureElement(n,void 0)},this.getVirtualItems=qe(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,i)=>{const s=[];for(let o=0,r=n.length;o<r;o++){const a=n[o],l=i[a];s.push(l)}return s},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const i=this.getMeasurements();if(i.length!==0)return yo(i[ga(0,i.length-1,s=>yo(i[s]).start,n)])},this.getOffsetForAlignment=(n,i,s=0)=>{const o=this.getSize(),r=this.getScrollOffset();i==="auto"&&(i=n>=r+o?"end":"start"),i==="center"?n+=(s-o)/2:i==="end"&&(n-=o);const a=this.getTotalSize()+this.options.scrollMargin-o;return Math.max(Math.min(a,n),0)},this.getOffsetForIndex=(n,i="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const s=this.measurementsCache[n];if(!s)return;const o=this.getSize(),r=this.getScrollOffset();if(i==="auto")if(s.end>=r+o-this.options.scrollPaddingEnd)i="end";else if(s.start<=r+this.options.scrollPaddingStart)i="start";else return[r,i];const a=i==="end"?s.end+this.options.scrollPaddingEnd:s.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,i,s.size),i]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(n,{align:i="start",behavior:s}={})=>{s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,i),{adjustments:void 0,behavior:s})},this.scrollToIndex=(n,{align:i="auto",behavior:s}={})=>{s==="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 o=0;const r=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[d,f]=c;this._scrollToOffset(d,{adjustments:void 0,behavior:s}),this.targetWindow.requestAnimationFrame(()=>{const h=this.getScrollOffset(),p=this.getOffsetForIndex(n,f);if(!p){console.warn("Failed to get offset for index:",n);return}Kg(p[0],h)||l(f)})},l=u=>{this.targetWindow&&(o++,o<r?(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("Schedule retry",o,r),this.targetWindow.requestAnimationFrame(()=>a(u))):console.warn(`Failed to scroll to index ${n} after ${r} attempts.`))};a(i)},this.scrollBy=(n,{behavior:i}={})=>{i==="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:i})},this.getTotalSize=()=>{var n;const i=this.getMeasurements();let s;if(i.length===0)s=this.options.paddingStart;else if(this.options.lanes===1)s=((n=i[i.length-1])==null?void 0:n.end)??0;else{const o=Array(this.options.lanes).fill(null);let r=i.length-1;for(;r>=0&&o.some(a=>a===null);){const a=i[r];o[a.lane]===null&&(o[a.lane]=a.end),r--}s=Math.max(...o.filter(a=>a!==null))}return Math.max(s-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:i,behavior:s})=>{this.options.scrollToFn(n,{behavior:s,adjustments:i},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(t)}}const ga=(e,t,n,i)=>{for(;e<=t;){const s=(e+t)/2|0,o=n(s);if(o<i)e=s+1;else if(o>i)t=s-1;else return s}return e>0?e-1:0};function np({measurements:e,outerSize:t,scrollOffset:n,lanes:i}){const s=e.length-1,o=l=>e[l].start;if(e.length<=i)return{startIndex:0,endIndex:s};let r=ga(0,s,o,n),a=r;if(i===1)for(;a<s&&e[a].end<n+t;)a++;else if(i>1){const l=Array(i).fill(0);for(;a<s&&l.some(c=>c<n+t);){const c=e[a];l[c.lane]=c.end,a++}const u=Array(i).fill(n+t);for(;r>=0&&u.some(c=>c>=n);){const c=e[r];u[c.lane]=c.start,r--}r=Math.max(0,r-r%i),a=Math.min(s,a+(i-1-a%i))}return{startIndex:r,endIndex:a}}const So=typeof document<"u"?T.useLayoutEffect:T.useEffect;function ip(e){const t=T.useReducer(()=>({}),{})[1],n={...e,onChange:(s,o)=>{var r;o?Mo.flushSync(t):t(),(r=e.onChange)==null||r.call(e,s,o)}},[i]=T.useState(()=>new tp(n));return i.setOptions(n),So(()=>i._didMount(),[]),So(()=>i._willUpdate()),i}function sp(e){return ip({observeElementRect:Zg,observeElementOffset:Jg,scrollToFn:ep,...e})}const op="_main_1qx2l_8",_o={main:op},pa=v.forwardRef(({children:e,className:t,row:n=!1,estimatedItemHeight:i=100,virtualize:s=!1,maxHeight:o=448},r)=>{const a=v.useRef(null),l=v.useMemo(()=>v.Children.toArray(e),[e]),u=sp({count:l.length,getScrollElement:()=>a.current,estimateSize:()=>i,measureElement:d=>d.getBoundingClientRect().height});return v.useImperativeHandle(r,()=>({scrollToTop:()=>u.scrollToOffset(0,{behavior:"smooth"}),scrollToBottom:()=>u.scrollToOffset(u.getTotalSize(),{behavior:"smooth"}),scrollToIndex:(d,f={})=>u.scrollToIndex(d,{behavior:"smooth",...f}),scrollToOffset:(d,f={})=>u.scrollToOffset(d,{behavior:"smooth",...f}),scrollBy:d=>{const f=u.scrollOffset||0;u.scrollToOffset(f+d,{behavior:"smooth"})},getElement:()=>a.current,getScrollOffset:()=>u.scrollOffset||0,getTotalSize:()=>u.getTotalSize()}),[u]),v.useMemo(()=>s||l.length>50,[s,l])&&l.length>0?m.jsx(V,{ref:a,row:n,maxHeight:o,className:M.cx(_o.main,t),w:"full",p:"var(--spacing-2xl)",children:m.jsx(V,{relative:!0,h:u.getTotalSize(),children:u.getVirtualItems().map(d=>m.jsx(V,{"data-index":d.index,ref:u.measureElement,w:"full",absolute:!0,style:{top:0,left:0,transform:`translateY(${d.start}px)`},children:l[d.index]},d.key))})}):m.jsx(V,{ref:a,className:M.cx(_o.main,t),w:"full",row:n,pl:"var(--spacing-2xl)",pr:"var(--spacing-xs)",children:m.jsx(V,{py:"var(--spacing-2xl)",pr:"var(--spacing-xl)",children:e})})});pa.displayName="ModalMain";const nn=Vo;nn.Header=fa;nn.Main=pa;nn.Footer=ha;/**
24
24
  * table-core
25
25
  *
26
26
  * Copyright (c) TanStack
@@ -29,10 +29,10 @@
29
29
  * LICENSE.md file in the root directory of this source tree.
30
30
  *
31
31
  * @license MIT
32
- */function lp(){return{accessor:(e,t)=>typeof e=="function"?{...t,accessorFn:e}:{...t,accessorKey:e},display:e=>e,group:e=>e}}function De(e,t){return typeof e=="function"?e(t):e}function fe(e,t){return n=>{t.setState(i=>({...i,[e]:De(n,i[e])}))}}function sn(e){return e instanceof Function}function up(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function cp(e,t){const n=[],i=s=>{s.forEach(o=>{n.push(o);const r=t(o);r!=null&&r.length&&i(r)})};return i(e),n}function D(e,t,n){let i=[],s;return o=>{let r;n.key&&n.debug&&(r=Date.now());const a=e(o);if(!(a.length!==i.length||a.some((u,d)=>i[d]!==u)))return s;i=a;let c;if(n.key&&n.debug&&(c=Date.now()),s=t(...a),n==null||n.onChange==null||n.onChange(s),n.key&&n.debug&&n!=null&&n.debug()){const u=Math.round((Date.now()-r)*100)/100,d=Math.round((Date.now()-c)*100)/100,f=d/16,h=(p,g)=>{for(p=String(p);p.length<g;)p=" "+p;return p};console.info(`%c⏱ ${h(d,5)} /${h(u,5)} ms`,`
32
+ */function rp(){return{accessor:(e,t)=>typeof e=="function"?{...t,accessorFn:e}:{...t,accessorKey:e},display:e=>e,group:e=>e}}function De(e,t){return typeof e=="function"?e(t):e}function fe(e,t){return n=>{t.setState(i=>({...i,[e]:De(n,i[e])}))}}function sn(e){return e instanceof Function}function ap(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function lp(e,t){const n=[],i=s=>{s.forEach(o=>{n.push(o);const r=t(o);r!=null&&r.length&&i(r)})};return i(e),n}function D(e,t,n){let i=[],s;return o=>{let r;n.key&&n.debug&&(r=Date.now());const a=e(o);if(!(a.length!==i.length||a.some((c,d)=>i[d]!==c)))return s;i=a;let u;if(n.key&&n.debug&&(u=Date.now()),s=t(...a),n==null||n.onChange==null||n.onChange(s),n.key&&n.debug&&n!=null&&n.debug()){const c=Math.round((Date.now()-r)*100)/100,d=Math.round((Date.now()-u)*100)/100,f=d/16,h=(p,g)=>{for(p=String(p);p.length<g;)p=" "+p;return p};console.info(`%c⏱ ${h(d,5)} /${h(c,5)} ms`,`
33
33
  font-size: .6rem;
34
34
  font-weight: bold;
35
- color: hsl(${Math.max(0,Math.min(120-120*f,120))}deg 100% 31%);`,n?.key)}return s}}function F(e,t,n,i){return{debug:()=>{var s;return(s=e?.debugAll)!=null?s:e[t]},key:process.env.NODE_ENV==="development"&&n,onChange:i}}function dp(e,t,n,i){const s=()=>{var r;return(r=o.getValue())!=null?r:e.options.renderFallbackValue},o={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(i),renderValue:s,getContext:D(()=>[e,n,t,o],(r,a,l,c)=>({table:r,column:a,row:l,cell:c,getValue:c.getValue,renderValue:c.renderValue}),F(e.options,"debugCells","cell.getContext"))};return e._features.forEach(r=>{r.createCell==null||r.createCell(o,n,t,e)},{}),o}function fp(e,t,n,i){var s,o;const a={...e._getDefaultColumnDef(),...t},l=a.accessorKey;let c=(s=(o=a.id)!=null?o:l?typeof String.prototype.replaceAll=="function"?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)!=null?s:typeof a.header=="string"?a.header:void 0,u;if(a.accessorFn?u=a.accessorFn:l&&(l.includes(".")?u=f=>{let h=f;for(const g of l.split(".")){var p;h=(p=h)==null?void 0:p[g],process.env.NODE_ENV!=="production"&&h===void 0&&console.warn(`"${g}" in deeply nested key "${l}" returned undefined.`)}return h}:u=f=>f[a.accessorKey]),!c)throw process.env.NODE_ENV!=="production"?new Error(a.accessorFn?"Columns require an id when using an accessorFn":"Columns require an id when using a non-string header"):new Error;let d={id:`${String(c)}`,accessorFn:u,parent:i,depth:n,columnDef:a,columns:[],getFlatColumns:D(()=>[!0],()=>{var f;return[d,...(f=d.columns)==null?void 0:f.flatMap(h=>h.getFlatColumns())]},F(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:D(()=>[e._getOrderColumnsFn()],f=>{var h;if((h=d.columns)!=null&&h.length){let p=d.columns.flatMap(g=>g.getLeafColumns());return f(p)}return[d]},F(e.options,"debugColumns","column.getLeafColumns"))};for(const f of e._features)f.createColumn==null||f.createColumn(d,e);return d}const ae="debugHeaders";function bo(e,t,n){var i;let o={id:(i=n.id)!=null?i:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const r=[],a=l=>{l.subHeaders&&l.subHeaders.length&&l.subHeaders.map(a),r.push(l)};return a(o),r},getContext:()=>({table:e,header:o,column:t})};return e._features.forEach(r=>{r.createHeader==null||r.createHeader(o,e)}),o}const hp={createTable:e=>{e.getHeaderGroups=D(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,i,s)=>{var o,r;const a=(o=i?.map(d=>n.find(f=>f.id===d)).filter(Boolean))!=null?o:[],l=(r=s?.map(d=>n.find(f=>f.id===d)).filter(Boolean))!=null?r:[],c=n.filter(d=>!(i!=null&&i.includes(d.id))&&!(s!=null&&s.includes(d.id)));return Lt(t,[...a,...c,...l],e)},F(e.options,ae,"getHeaderGroups")),e.getCenterHeaderGroups=D(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,i,s)=>(n=n.filter(o=>!(i!=null&&i.includes(o.id))&&!(s!=null&&s.includes(o.id))),Lt(t,n,e,"center")),F(e.options,ae,"getCenterHeaderGroups")),e.getLeftHeaderGroups=D(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,i)=>{var s;const o=(s=i?.map(r=>n.find(a=>a.id===r)).filter(Boolean))!=null?s:[];return Lt(t,o,e,"left")},F(e.options,ae,"getLeftHeaderGroups")),e.getRightHeaderGroups=D(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,i)=>{var s;const o=(s=i?.map(r=>n.find(a=>a.id===r)).filter(Boolean))!=null?s:[];return Lt(t,o,e,"right")},F(e.options,ae,"getRightHeaderGroups")),e.getFooterGroups=D(()=>[e.getHeaderGroups()],t=>[...t].reverse(),F(e.options,ae,"getFooterGroups")),e.getLeftFooterGroups=D(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),F(e.options,ae,"getLeftFooterGroups")),e.getCenterFooterGroups=D(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),F(e.options,ae,"getCenterFooterGroups")),e.getRightFooterGroups=D(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),F(e.options,ae,"getRightFooterGroups")),e.getFlatHeaders=D(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),F(e.options,ae,"getFlatHeaders")),e.getLeftFlatHeaders=D(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),F(e.options,ae,"getLeftFlatHeaders")),e.getCenterFlatHeaders=D(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),F(e.options,ae,"getCenterFlatHeaders")),e.getRightFlatHeaders=D(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),F(e.options,ae,"getRightFlatHeaders")),e.getCenterLeafHeaders=D(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var i;return!((i=n.subHeaders)!=null&&i.length)}),F(e.options,ae,"getCenterLeafHeaders")),e.getLeftLeafHeaders=D(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var i;return!((i=n.subHeaders)!=null&&i.length)}),F(e.options,ae,"getLeftLeafHeaders")),e.getRightLeafHeaders=D(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var i;return!((i=n.subHeaders)!=null&&i.length)}),F(e.options,ae,"getRightLeafHeaders")),e.getLeafHeaders=D(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,i)=>{var s,o,r,a,l,c;return[...(s=(o=t[0])==null?void 0:o.headers)!=null?s:[],...(r=(a=n[0])==null?void 0:a.headers)!=null?r:[],...(l=(c=i[0])==null?void 0:c.headers)!=null?l:[]].map(u=>u.getLeafHeaders()).flat()},F(e.options,ae,"getLeafHeaders"))}};function Lt(e,t,n,i){var s,o;let r=0;const a=function(f,h){h===void 0&&(h=1),r=Math.max(r,h),f.filter(p=>p.getIsVisible()).forEach(p=>{var g;(g=p.columns)!=null&&g.length&&a(p.columns,h+1)},0)};a(e);let l=[];const c=(f,h)=>{const p={depth:h,id:[i,`${h}`].filter(Boolean).join("_"),headers:[]},g=[];f.forEach(x=>{const w=[...g].reverse()[0],C=x.column.depth===p.depth;let y,S=!1;if(C&&x.column.parent?y=x.column.parent:(y=x.column,S=!0),w&&w?.column===y)w.subHeaders.push(x);else{const _=bo(n,y,{id:[i,h,y.id,x?.id].filter(Boolean).join("_"),isPlaceholder:S,placeholderId:S?`${g.filter(b=>b.column===y).length}`:void 0,depth:h,index:g.length});_.subHeaders.push(x),g.push(_)}p.headers.push(x),x.headerGroup=p}),l.push(p),h>0&&c(g,h-1)},u=t.map((f,h)=>bo(n,f,{depth:r,index:h}));c(u,r-1),l.reverse();const d=f=>f.filter(p=>p.column.getIsVisible()).map(p=>{let g=0,x=0,w=[0];p.subHeaders&&p.subHeaders.length?(w=[],d(p.subHeaders).forEach(y=>{let{colSpan:S,rowSpan:_}=y;g+=S,w.push(_)})):g=1;const C=Math.min(...w);return x=x+C,p.colSpan=g,p.rowSpan=x,{colSpan:g,rowSpan:x}});return d((s=(o=l[0])==null?void 0:o.headers)!=null?s:[]),l}const gp=(e,t,n,i,s,o,r)=>{let a={id:t,index:i,original:n,depth:s,parentId:r,_valuesCache:{},_uniqueValuesCache:{},getValue:l=>{if(a._valuesCache.hasOwnProperty(l))return a._valuesCache[l];const c=e.getColumn(l);if(c!=null&&c.accessorFn)return a._valuesCache[l]=c.accessorFn(a.original,i),a._valuesCache[l]},getUniqueValues:l=>{if(a._uniqueValuesCache.hasOwnProperty(l))return a._uniqueValuesCache[l];const c=e.getColumn(l);if(c!=null&&c.accessorFn)return c.columnDef.getUniqueValues?(a._uniqueValuesCache[l]=c.columnDef.getUniqueValues(a.original,i),a._uniqueValuesCache[l]):(a._uniqueValuesCache[l]=[a.getValue(l)],a._uniqueValuesCache[l])},renderValue:l=>{var c;return(c=a.getValue(l))!=null?c:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>cp(a.subRows,l=>l.subRows),getParentRow:()=>a.parentId?e.getRow(a.parentId,!0):void 0,getParentRows:()=>{let l=[],c=a;for(;;){const u=c.getParentRow();if(!u)break;l.push(u),c=u}return l.reverse()},getAllCells:D(()=>[e.getAllLeafColumns()],l=>l.map(c=>dp(e,a,c,c.id)),F(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:D(()=>[a.getAllCells()],l=>l.reduce((c,u)=>(c[u.column.id]=u,c),{}),F(e.options,"debugRows","getAllCellsByColumnId"))};for(let l=0;l<e._features.length;l++){const c=e._features[l];c==null||c.createRow==null||c.createRow(a,e)}return a},pp={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},ma=(e,t,n)=>{var i,s;const o=n==null||(i=n.toString())==null?void 0:i.toLowerCase();return!!(!((s=e.getValue(t))==null||(s=s.toString())==null||(s=s.toLowerCase())==null)&&s.includes(o))};ma.autoRemove=e=>Se(e);const va=(e,t,n)=>{var i;return!!(!((i=e.getValue(t))==null||(i=i.toString())==null)&&i.includes(n))};va.autoRemove=e=>Se(e);const ya=(e,t,n)=>{var i;return((i=e.getValue(t))==null||(i=i.toString())==null?void 0:i.toLowerCase())===n?.toLowerCase()};ya.autoRemove=e=>Se(e);const wa=(e,t,n)=>{var i;return(i=e.getValue(t))==null?void 0:i.includes(n)};wa.autoRemove=e=>Se(e);const xa=(e,t,n)=>!n.some(i=>{var s;return!((s=e.getValue(t))!=null&&s.includes(i))});xa.autoRemove=e=>Se(e)||!(e!=null&&e.length);const Ca=(e,t,n)=>n.some(i=>{var s;return(s=e.getValue(t))==null?void 0:s.includes(i)});Ca.autoRemove=e=>Se(e)||!(e!=null&&e.length);const Sa=(e,t,n)=>e.getValue(t)===n;Sa.autoRemove=e=>Se(e);const _a=(e,t,n)=>e.getValue(t)==n;_a.autoRemove=e=>Se(e);const Wi=(e,t,n)=>{let[i,s]=n;const o=e.getValue(t);return o>=i&&o<=s};Wi.resolveFilterValue=e=>{let[t,n]=e,i=typeof t!="number"?parseFloat(t):t,s=typeof n!="number"?parseFloat(n):n,o=t===null||Number.isNaN(i)?-1/0:i,r=n===null||Number.isNaN(s)?1/0:s;if(o>r){const a=o;o=r,r=a}return[o,r]};Wi.autoRemove=e=>Se(e)||Se(e[0])&&Se(e[1]);const Pe={includesString:ma,includesStringSensitive:va,equalsString:ya,arrIncludes:wa,arrIncludesAll:xa,arrIncludesSome:Ca,equals:Sa,weakEquals:_a,inNumberRange:Wi};function Se(e){return e==null||e===""}const mp={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:fe("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],i=n?.getValue(e.id);return typeof i=="string"?Pe.includesString:typeof i=="number"?Pe.inNumberRange:typeof i=="boolean"||i!==null&&typeof i=="object"?Pe.equals:Array.isArray(i)?Pe.arrIncludes:Pe.weakEquals},e.getFilterFn=()=>{var n,i;return sn(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(i=t.options.filterFns)==null?void 0:i[e.columnDef.filterFn])!=null?n:Pe[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,i,s;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((i=t.options.enableColumnFilters)!=null?i:!0)&&((s=t.options.enableFilters)!=null?s:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(i=>i.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,i;return(n=(i=t.getState().columnFilters)==null?void 0:i.findIndex(s=>s.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(i=>{const s=e.getFilterFn(),o=i?.find(u=>u.id===e.id),r=De(n,o?o.value:void 0);if(Ro(s,r,e)){var a;return(a=i?.filter(u=>u.id!==e.id))!=null?a:[]}const l={id:e.id,value:r};if(o){var c;return(c=i?.map(u=>u.id===e.id?l:u))!=null?c:[]}return i!=null&&i.length?[...i,l]:[l]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),i=s=>{var o;return(o=De(t,s))==null?void 0:o.filter(r=>{const a=n.find(l=>l.id===r.id);if(a){const l=a.getFilterFn();if(Ro(l,r.value,a))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(i)},e.resetColumnFilters=t=>{var n,i;e.setColumnFilters(t?[]:(n=(i=e.initialState)==null?void 0:i.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function Ro(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const vp=(e,t,n)=>n.reduce((i,s)=>{const o=s.getValue(e);return i+(typeof o=="number"?o:0)},0),yp=(e,t,n)=>{let i;return n.forEach(s=>{const o=s.getValue(e);o!=null&&(i>o||i===void 0&&o>=o)&&(i=o)}),i},wp=(e,t,n)=>{let i;return n.forEach(s=>{const o=s.getValue(e);o!=null&&(i<o||i===void 0&&o>=o)&&(i=o)}),i},xp=(e,t,n)=>{let i,s;return n.forEach(o=>{const r=o.getValue(e);r!=null&&(i===void 0?r>=r&&(i=s=r):(i>r&&(i=r),s<r&&(s=r)))}),[i,s]},Cp=(e,t)=>{let n=0,i=0;if(t.forEach(s=>{let o=s.getValue(e);o!=null&&(o=+o)>=o&&(++n,i+=o)}),n)return i/n},Sp=(e,t)=>{if(!t.length)return;const n=t.map(o=>o.getValue(e));if(!up(n))return;if(n.length===1)return n[0];const i=Math.floor(n.length/2),s=n.sort((o,r)=>o-r);return n.length%2!==0?s[i]:(s[i-1]+s[i])/2},_p=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),bp=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,Rp=(e,t)=>t.length,Mn={sum:vp,min:yp,max:wp,extent:xp,mean:Cp,median:Sp,unique:_p,uniqueCount:bp,count:Rp},Pp={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:fe("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(i=>i!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,i;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((i=t.options.enableGrouping)!=null?i:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],i=n?.getValue(e.id);if(typeof i=="number")return Mn.sum;if(Object.prototype.toString.call(i)==="[object Date]")return Mn.extent},e.getAggregationFn=()=>{var n,i;if(!e)throw new Error;return sn(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(i=t.options.aggregationFns)==null?void 0:i[e.columnDef.aggregationFn])!=null?n:Mn[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,i;e.setGrouping(t?[]:(n=(i=e.initialState)==null?void 0:i.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const i=t.getColumn(n);return i!=null&&i.columnDef.getGroupingValue?(e._groupingValuesCache[n]=i.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,i)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var s;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((s=n.subRows)!=null&&s.length)}}};function Mp(e,t,n){if(!(t!=null&&t.length)||!n)return e;const i=e.filter(o=>!t.includes(o.id));return n==="remove"?i:[...t.map(o=>e.find(r=>r.id===o)).filter(Boolean),...i]}const Tp={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:fe("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=D(n=>[yt(t,n)],n=>n.findIndex(i=>i.id===e.id),F(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=n=>{var i;return((i=yt(t,n)[0])==null?void 0:i.id)===e.id},e.getIsLastColumn=n=>{var i;const s=yt(t,n);return((i=s[s.length-1])==null?void 0:i.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=D(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,i)=>s=>{let o=[];if(!(t!=null&&t.length))o=s;else{const r=[...t],a=[...s];for(;a.length&&r.length;){const l=r.shift(),c=a.findIndex(u=>u.id===l);c>-1&&o.push(a.splice(c,1)[0])}o=[...o,...a]}return Mp(o,n,i)},F(e.options,"debugTable","_getOrderColumnsFn"))}},Tn=()=>({left:[],right:[]}),Ep={getInitialState:e=>({columnPinning:Tn(),...e}),getDefaultOptions:e=>({onColumnPinningChange:fe("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const i=e.getLeafColumns().map(s=>s.id).filter(Boolean);t.setColumnPinning(s=>{var o,r;if(n==="right"){var a,l;return{left:((a=s?.left)!=null?a:[]).filter(d=>!(i!=null&&i.includes(d))),right:[...((l=s?.right)!=null?l:[]).filter(d=>!(i!=null&&i.includes(d))),...i]}}if(n==="left"){var c,u;return{left:[...((c=s?.left)!=null?c:[]).filter(d=>!(i!=null&&i.includes(d))),...i],right:((u=s?.right)!=null?u:[]).filter(d=>!(i!=null&&i.includes(d)))}}return{left:((o=s?.left)!=null?o:[]).filter(d=>!(i!=null&&i.includes(d))),right:((r=s?.right)!=null?r:[]).filter(d=>!(i!=null&&i.includes(d)))}})},e.getCanPin=()=>e.getLeafColumns().some(i=>{var s,o,r;return((s=i.columnDef.enablePinning)!=null?s:!0)&&((o=(r=t.options.enableColumnPinning)!=null?r:t.options.enablePinning)!=null?o:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(a=>a.id),{left:i,right:s}=t.getState().columnPinning,o=n.some(a=>i?.includes(a)),r=n.some(a=>s?.includes(a));return o?"left":r?"right":!1},e.getPinnedIndex=()=>{var n,i;const s=e.getIsPinned();return s?(n=(i=t.getState().columnPinning)==null||(i=i[s])==null?void 0:i.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=D(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,i,s)=>{const o=[...i??[],...s??[]];return n.filter(r=>!o.includes(r.column.id))},F(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=D(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,i)=>(i??[]).map(o=>n.find(r=>r.column.id===o)).filter(Boolean).map(o=>({...o,position:"left"})),F(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=D(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,i)=>(i??[]).map(o=>n.find(r=>r.column.id===o)).filter(Boolean).map(o=>({...o,position:"right"})),F(t.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,i;return e.setColumnPinning(t?Tn():(n=(i=e.initialState)==null?void 0:i.columnPinning)!=null?n:Tn())},e.getIsSomeColumnsPinned=t=>{var n;const i=e.getState().columnPinning;if(!t){var s,o;return!!((s=i.left)!=null&&s.length||(o=i.right)!=null&&o.length)}return!!((n=i[t])!=null&&n.length)},e.getLeftLeafColumns=D(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(i=>t.find(s=>s.id===i)).filter(Boolean),F(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=D(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(i=>t.find(s=>s.id===i)).filter(Boolean),F(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=D(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,i)=>{const s=[...n??[],...i??[]];return t.filter(o=>!s.includes(o.id))},F(e.options,"debugColumns","getCenterLeafColumns"))}};function Vp(e){return e||(typeof document<"u"?document:null)}const jt={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},En=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),Ap={getDefaultColumnDef:()=>jt,getInitialState:e=>({columnSizing:{},columnSizingInfo:En(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:fe("columnSizing",e),onColumnSizingInfoChange:fe("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,i,s;const o=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:jt.minSize,(i=o??e.columnDef.size)!=null?i:jt.size),(s=e.columnDef.maxSize)!=null?s:jt.maxSize)},e.getStart=D(n=>[n,yt(t,n),t.getState().columnSizing],(n,i)=>i.slice(0,e.getIndex(n)).reduce((s,o)=>s+o.getSize(),0),F(t.options,"debugColumns","getStart")),e.getAfter=D(n=>[n,yt(t,n),t.getState().columnSizing],(n,i)=>i.slice(e.getIndex(n)+1).reduce((s,o)=>s+o.getSize(),0),F(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:i,...s}=n;return s})},e.getCanResize=()=>{var n,i;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((i=t.options.enableColumnResizing)!=null?i:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const i=s=>{if(s.subHeaders.length)s.subHeaders.forEach(i);else{var o;n+=(o=s.column.getSize())!=null?o:0}};return i(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const i=t.getColumn(e.column.id),s=i?.getCanResize();return o=>{if(!i||!s||(o.persist==null||o.persist(),Vn(o)&&o.touches&&o.touches.length>1))return;const r=e.getSize(),a=e?e.getLeafHeaders().map(w=>[w.column.id,w.column.getSize()]):[[i.id,i.getSize()]],l=Vn(o)?Math.round(o.touches[0].clientX):o.clientX,c={},u=(w,C)=>{typeof C=="number"&&(t.setColumnSizingInfo(y=>{var S,_;const b=t.options.columnResizeDirection==="rtl"?-1:1,E=(C-((S=y?.startOffset)!=null?S:0))*b,R=Math.max(E/((_=y?.startSize)!=null?_:0),-.999999);return y.columnSizingStart.forEach(I=>{let[A,z]=I;c[A]=Math.round(Math.max(z+z*R,0)*100)/100}),{...y,deltaOffset:E,deltaPercentage:R}}),(t.options.columnResizeMode==="onChange"||w==="end")&&t.setColumnSizing(y=>({...y,...c})))},d=w=>u("move",w),f=w=>{u("end",w),t.setColumnSizingInfo(C=>({...C,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},h=Vp(n),p={moveHandler:w=>d(w.clientX),upHandler:w=>{h?.removeEventListener("mousemove",p.moveHandler),h?.removeEventListener("mouseup",p.upHandler),f(w.clientX)}},g={moveHandler:w=>(w.cancelable&&(w.preventDefault(),w.stopPropagation()),d(w.touches[0].clientX),!1),upHandler:w=>{var C;h?.removeEventListener("touchmove",g.moveHandler),h?.removeEventListener("touchend",g.upHandler),w.cancelable&&(w.preventDefault(),w.stopPropagation()),f((C=w.touches[0])==null?void 0:C.clientX)}},x=Dp()?{passive:!1}:!1;Vn(o)?(h?.addEventListener("touchmove",g.moveHandler,x),h?.addEventListener("touchend",g.upHandler,x)):(h?.addEventListener("mousemove",p.moveHandler,x),h?.addEventListener("mouseup",p.upHandler,x)),t.setColumnSizingInfo(w=>({...w,startOffset:l,startSize:r,deltaOffset:0,deltaPercentage:0,columnSizingStart:a,isResizingColumn:i.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?En():(n=e.initialState.columnSizingInfo)!=null?n:En())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((i,s)=>i+s.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((i,s)=>i+s.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((i,s)=>i+s.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((i,s)=>i+s.getSize(),0))!=null?t:0}}};let $t=null;function Dp(){if(typeof $t=="boolean")return $t;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return $t=e,$t}function Vn(e){return e.type==="touchstart"}const Fp={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:fe("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(i=>({...i,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,i;const s=e.columns;return(n=s.length?s.some(o=>o.getIsVisible()):(i=t.getState().columnVisibility)==null?void 0:i[e.id])!=null?n:!0},e.getCanHide=()=>{var n,i;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((i=t.options.enableHiding)!=null?i:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=D(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(i=>i.column.getIsVisible()),F(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=D(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,i,s)=>[...n,...i,...s],F(t.options,"debugRows","getVisibleCells"))},createTable:e=>{const t=(n,i)=>D(()=>[i(),i().filter(s=>s.getIsVisible()).map(s=>s.id).join("_")],s=>s.filter(o=>o.getIsVisible==null?void 0:o.getIsVisible()),F(e.options,"debugColumns",n));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var i;e.setColumnVisibility(n?{}:(i=e.initialState.columnVisibility)!=null?i:{})},e.toggleAllColumnsVisible=n=>{var i;n=(i=n)!=null?i:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((s,o)=>({...s,[o.id]:n||!(o.getCanHide!=null&&o.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var i;e.toggleAllColumnsVisible((i=n.target)==null?void 0:i.checked)}}};function yt(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const kp={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},Ip={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:fe("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const i=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof i=="string"||typeof i=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,i,s,o;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((i=t.options.enableGlobalFilter)!=null?i:!0)&&((s=t.options.enableFilters)!=null?s:!0)&&((o=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?o:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Pe.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:i}=e.options;return sn(i)?i:i==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[i])!=null?t:Pe[i]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},Lp={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:fe("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var i,s;if(!t){e._queue(()=>{t=!0});return}if((i=(s=e.options.autoResetAll)!=null?s:e.options.autoResetExpanded)!=null?i:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=i=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(i),e.toggleAllRowsExpanded=i=>{i??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=i=>{var s,o;e.setExpanded(i?{}:(s=(o=e.initialState)==null?void 0:o.expanded)!=null?s:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(i=>i.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>i=>{i.persist==null||i.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const i=e.getState().expanded;return i===!0||Object.values(i).some(Boolean)},e.getIsAllRowsExpanded=()=>{const i=e.getState().expanded;return typeof i=="boolean"?i===!0:!(!Object.keys(i).length||e.getRowModel().flatRows.some(s=>!s.getIsExpanded()))},e.getExpandedDepth=()=>{let i=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(o=>{const r=o.split(".");i=Math.max(i,r.length)}),i},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(i=>{var s;const o=i===!0?!0:!!(i!=null&&i[e.id]);let r={};if(i===!0?Object.keys(t.getRowModel().rowsById).forEach(a=>{r[a]=!0}):r=i,n=(s=n)!=null?s:!o,!o&&n)return{...r,[e.id]:!0};if(o&&!n){const{[e.id]:a,...l}=r;return l}return i})},e.getIsExpanded=()=>{var n;const i=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:i===!0||i?.[e.id])},e.getCanExpand=()=>{var n,i,s;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((i=t.options.enableExpanding)!=null?i:!0)&&!!((s=e.subRows)!=null&&s.length)},e.getIsAllParentsExpanded=()=>{let n=!0,i=e;for(;n&&i.parentId;)i=t.getRow(i.parentId,!0),n=i.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},ni=0,ii=10,An=()=>({pageIndex:ni,pageSize:ii}),jp={getInitialState:e=>({...e,pagination:{...An(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:fe("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var i,s;if(!t){e._queue(()=>{t=!0});return}if((i=(s=e.options.autoResetAll)!=null?s:e.options.autoResetPageIndex)!=null?i:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=i=>{const s=o=>De(i,o);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(s)},e.resetPagination=i=>{var s;e.setPagination(i?An():(s=e.initialState.pagination)!=null?s:An())},e.setPageIndex=i=>{e.setPagination(s=>{let o=De(i,s.pageIndex);const r=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return o=Math.max(0,Math.min(o,r)),{...s,pageIndex:o}})},e.resetPageIndex=i=>{var s,o;e.setPageIndex(i?ni:(s=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageIndex)!=null?s:ni)},e.resetPageSize=i=>{var s,o;e.setPageSize(i?ii:(s=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageSize)!=null?s:ii)},e.setPageSize=i=>{e.setPagination(s=>{const o=Math.max(1,De(i,s.pageSize)),r=s.pageSize*s.pageIndex,a=Math.floor(r/o);return{...s,pageIndex:a,pageSize:o}})},e.setPageCount=i=>e.setPagination(s=>{var o;let r=De(i,(o=e.options.pageCount)!=null?o:-1);return typeof r=="number"&&(r=Math.max(-1,r)),{...s,pageCount:r}}),e.getPageOptions=D(()=>[e.getPageCount()],i=>{let s=[];return i&&i>0&&(s=[...new Array(i)].fill(null).map((o,r)=>r)),s},F(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:i}=e.getState().pagination,s=e.getPageCount();return s===-1?!0:s===0?!1:i<s-1},e.previousPage=()=>e.setPageIndex(i=>i-1),e.nextPage=()=>e.setPageIndex(i=>i+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var i;return(i=e.options.pageCount)!=null?i:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var i;return(i=e.options.rowCount)!=null?i:e.getPrePaginationRowModel().rows.length}}},Dn=()=>({top:[],bottom:[]}),$p={getInitialState:e=>({rowPinning:Dn(),...e}),getDefaultOptions:e=>({onRowPinningChange:fe("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,i,s)=>{const o=i?e.getLeafRows().map(l=>{let{id:c}=l;return c}):[],r=s?e.getParentRows().map(l=>{let{id:c}=l;return c}):[],a=new Set([...r,e.id,...o]);t.setRowPinning(l=>{var c,u;if(n==="bottom"){var d,f;return{top:((d=l?.top)!=null?d:[]).filter(g=>!(a!=null&&a.has(g))),bottom:[...((f=l?.bottom)!=null?f:[]).filter(g=>!(a!=null&&a.has(g))),...Array.from(a)]}}if(n==="top"){var h,p;return{top:[...((h=l?.top)!=null?h:[]).filter(g=>!(a!=null&&a.has(g))),...Array.from(a)],bottom:((p=l?.bottom)!=null?p:[]).filter(g=>!(a!=null&&a.has(g)))}}return{top:((c=l?.top)!=null?c:[]).filter(g=>!(a!=null&&a.has(g))),bottom:((u=l?.bottom)!=null?u:[]).filter(g=>!(a!=null&&a.has(g)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:i,enablePinning:s}=t.options;return typeof i=="function"?i(e):(n=i??s)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:i,bottom:s}=t.getState().rowPinning,o=n.some(a=>i?.includes(a)),r=n.some(a=>s?.includes(a));return o?"top":r?"bottom":!1},e.getPinnedIndex=()=>{var n,i;const s=e.getIsPinned();if(!s)return-1;const o=(n=s==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(r=>{let{id:a}=r;return a});return(i=o?.indexOf(e.id))!=null?i:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,i;return e.setRowPinning(t?Dn():(n=(i=e.initialState)==null?void 0:i.rowPinning)!=null?n:Dn())},e.getIsSomeRowsPinned=t=>{var n;const i=e.getState().rowPinning;if(!t){var s,o;return!!((s=i.top)!=null&&s.length||(o=i.bottom)!=null&&o.length)}return!!((n=i[t])!=null&&n.length)},e._getPinnedRows=(t,n,i)=>{var s;return((s=e.options.keepPinnedRows)==null||s?(n??[]).map(r=>{const a=e.getRow(r,!0);return a.getIsAllParentsExpanded()?a:null}):(n??[]).map(r=>t.find(a=>a.id===r))).filter(Boolean).map(r=>({...r,position:i}))},e.getTopRows=D(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),F(e.options,"debugRows","getTopRows")),e.getBottomRows=D(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),F(e.options,"debugRows","getBottomRows")),e.getCenterRows=D(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,i)=>{const s=new Set([...n??[],...i??[]]);return t.filter(o=>!s.has(o.id))},F(e.options,"debugRows","getCenterRows"))}},Op={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:fe("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const i={...n},s=e.getPreGroupedRowModel().flatRows;return t?s.forEach(o=>{o.getCanSelect()&&(i[o.id]=!0)}):s.forEach(o=>{delete i[o.id]}),i})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const i=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),s={...n};return e.getRowModel().rows.forEach(o=>{si(s,o.id,i,!0,e)}),s}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=D(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?Fn(e,n):{rows:[],flatRows:[],rowsById:{}},F(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=D(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?Fn(e,n):{rows:[],flatRows:[],rowsById:{}},F(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=D(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?Fn(e,n):{rows:[],flatRows:[],rowsById:{}},F(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let i=!!(t.length&&Object.keys(n).length);return i&&t.some(s=>s.getCanSelect()&&!n[s.id])&&(i=!1),i},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(s=>s.getCanSelect()),{rowSelection:n}=e.getState();let i=!!t.length;return i&&t.some(s=>!n[s.id])&&(i=!1),i},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,i)=>{const s=e.getIsSelected();t.setRowSelection(o=>{var r;if(n=typeof n<"u"?n:!s,e.getCanSelect()&&s===n)return o;const a={...o};return si(a,e.id,n,(r=i?.selectChildren)!=null?r:!0,t),a})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return Ui(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return oi(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return oi(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return i=>{var s;n&&e.toggleSelected((s=i.target)==null?void 0:s.checked)}}}},si=(e,t,n,i,s)=>{var o;const r=s.getRow(t,!0);n?(r.getCanMultiSelect()||Object.keys(e).forEach(a=>delete e[a]),r.getCanSelect()&&(e[t]=!0)):delete e[t],i&&(o=r.subRows)!=null&&o.length&&r.getCanSelectSubRows()&&r.subRows.forEach(a=>si(e,a.id,n,i,s))};function Fn(e,t){const n=e.getState().rowSelection,i=[],s={},o=function(r,a){return r.map(l=>{var c;const u=Ui(l,n);if(u&&(i.push(l),s[l.id]=l),(c=l.subRows)!=null&&c.length&&(l={...l,subRows:o(l.subRows)}),u)return l}).filter(Boolean)};return{rows:o(t.rows),flatRows:i,rowsById:s}}function Ui(e,t){var n;return(n=t[e.id])!=null?n:!1}function oi(e,t,n){var i;if(!((i=e.subRows)!=null&&i.length))return!1;let s=!0,o=!1;return e.subRows.forEach(r=>{if(!(o&&!s)&&(r.getCanSelect()&&(Ui(r,t)?o=!0:s=!1),r.subRows&&r.subRows.length)){const a=oi(r,t);a==="all"?o=!0:(a==="some"&&(o=!0),s=!1)}}),s?"all":o?"some":!1}const ri=/([0-9]+)/gm,zp=(e,t,n)=>ba(Ie(e.getValue(n)).toLowerCase(),Ie(t.getValue(n)).toLowerCase()),Bp=(e,t,n)=>ba(Ie(e.getValue(n)),Ie(t.getValue(n))),Np=(e,t,n)=>Ki(Ie(e.getValue(n)).toLowerCase(),Ie(t.getValue(n)).toLowerCase()),Hp=(e,t,n)=>Ki(Ie(e.getValue(n)),Ie(t.getValue(n))),Gp=(e,t,n)=>{const i=e.getValue(n),s=t.getValue(n);return i>s?1:i<s?-1:0},Wp=(e,t,n)=>Ki(e.getValue(n),t.getValue(n));function Ki(e,t){return e===t?0:e>t?1:-1}function Ie(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function ba(e,t){const n=e.split(ri).filter(Boolean),i=t.split(ri).filter(Boolean);for(;n.length&&i.length;){const s=n.shift(),o=i.shift(),r=parseInt(s,10),a=parseInt(o,10),l=[r,a].sort();if(isNaN(l[0])){if(s>o)return 1;if(o>s)return-1;continue}if(isNaN(l[1]))return isNaN(r)?-1:1;if(r>a)return 1;if(a>r)return-1}return n.length-i.length}const ft={alphanumeric:zp,alphanumericCaseSensitive:Bp,text:Np,textCaseSensitive:Hp,datetime:Gp,basic:Wp},Up={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:fe("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let i=!1;for(const s of n){const o=s?.getValue(e.id);if(Object.prototype.toString.call(o)==="[object Date]")return ft.datetime;if(typeof o=="string"&&(i=!0,o.split(ri).length>1))return ft.alphanumeric}return i?ft.text:ft.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof n?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,i;if(!e)throw new Error;return sn(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(i=t.options.sortingFns)==null?void 0:i[e.columnDef.sortingFn])!=null?n:ft[e.columnDef.sortingFn]},e.toggleSorting=(n,i)=>{const s=e.getNextSortingOrder(),o=typeof n<"u"&&n!==null;t.setSorting(r=>{const a=r?.find(h=>h.id===e.id),l=r?.findIndex(h=>h.id===e.id);let c=[],u,d=o?n:s==="desc";if(r!=null&&r.length&&e.getCanMultiSort()&&i?a?u="toggle":u="add":r!=null&&r.length&&l!==r.length-1?u="replace":a?u="toggle":u="replace",u==="toggle"&&(o||s||(u="remove")),u==="add"){var f;c=[...r,{id:e.id,desc:d}],c.splice(0,c.length-((f=t.options.maxMultiSortColCount)!=null?f:Number.MAX_SAFE_INTEGER))}else u==="toggle"?c=r.map(h=>h.id===e.id?{...h,desc:d}:h):u==="remove"?c=r.filter(h=>h.id!==e.id):c=[{id:e.id,desc:d}];return c})},e.getFirstSortDir=()=>{var n,i;return((n=(i=e.columnDef.sortDescFirst)!=null?i:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var i,s;const o=e.getFirstSortDir(),r=e.getIsSorted();return r?r!==o&&((i=t.options.enableSortingRemoval)==null||i)&&(!(n&&(s=t.options.enableMultiRemove)!=null)||s)?!1:r==="desc"?"asc":"desc":o},e.getCanSort=()=>{var n,i;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((i=t.options.enableSorting)!=null?i:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,i;return(n=(i=e.columnDef.enableMultiSort)!=null?i:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const i=(n=t.getState().sorting)==null?void 0:n.find(s=>s.id===e.id);return i?i.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,i;return(n=(i=t.getState().sorting)==null?void 0:i.findIndex(s=>s.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(i=>i.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return i=>{n&&(i.persist==null||i.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(i):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,i;e.setSorting(t?[]:(n=(i=e.initialState)==null?void 0:i.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},Kp=[hp,Fp,Tp,Ep,pp,mp,kp,Ip,Up,Pp,Lp,jp,$p,Op,Ap];function qp(e){var t,n;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const i=[...Kp,...(t=e._features)!=null?t:[]];let s={_features:i};const o=s._features.reduce((f,h)=>Object.assign(f,h.getDefaultOptions==null?void 0:h.getDefaultOptions(s)),{}),r=f=>s.options.mergeOptions?s.options.mergeOptions(o,f):{...o,...f};let l={...{},...(n=e.initialState)!=null?n:{}};s._features.forEach(f=>{var h;l=(h=f.getInitialState==null?void 0:f.getInitialState(l))!=null?h:l});const c=[];let u=!1;const d={_features:i,options:{...o,...e},initialState:l,_queue:f=>{c.push(f),u||(u=!0,Promise.resolve().then(()=>{for(;c.length;)c.shift()();u=!1}).catch(h=>setTimeout(()=>{throw h})))},reset:()=>{s.setState(s.initialState)},setOptions:f=>{const h=De(f,s.options);s.options=r(h)},getState:()=>s.options.state,setState:f=>{s.options.onStateChange==null||s.options.onStateChange(f)},_getRowId:(f,h,p)=>{var g;return(g=s.options.getRowId==null?void 0:s.options.getRowId(f,h,p))!=null?g:`${p?[p.id,h].join("."):h}`},getCoreRowModel:()=>(s._getCoreRowModel||(s._getCoreRowModel=s.options.getCoreRowModel(s)),s._getCoreRowModel()),getRowModel:()=>s.getPaginationRowModel(),getRow:(f,h)=>{let p=(h?s.getPrePaginationRowModel():s.getRowModel()).rowsById[f];if(!p&&(p=s.getCoreRowModel().rowsById[f],!p))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${f}`):new Error;return p},_getDefaultColumnDef:D(()=>[s.options.defaultColumn],f=>{var h;return f=(h=f)!=null?h:{},{header:p=>{const g=p.header.column.columnDef;return g.accessorKey?g.accessorKey:g.accessorFn?g.id:null},cell:p=>{var g,x;return(g=(x=p.renderValue())==null||x.toString==null?void 0:x.toString())!=null?g:null},...s._features.reduce((p,g)=>Object.assign(p,g.getDefaultColumnDef==null?void 0:g.getDefaultColumnDef()),{}),...f}},F(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>s.options.columns,getAllColumns:D(()=>[s._getColumnDefs()],f=>{const h=function(p,g,x){return x===void 0&&(x=0),p.map(w=>{const C=fp(s,w,x,g),y=w;return C.columns=y.columns?h(y.columns,C,x+1):[],C})};return h(f)},F(e,"debugColumns","getAllColumns")),getAllFlatColumns:D(()=>[s.getAllColumns()],f=>f.flatMap(h=>h.getFlatColumns()),F(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:D(()=>[s.getAllFlatColumns()],f=>f.reduce((h,p)=>(h[p.id]=p,h),{}),F(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:D(()=>[s.getAllColumns(),s._getOrderColumnsFn()],(f,h)=>{let p=f.flatMap(g=>g.getLeafColumns());return h(p)},F(e,"debugColumns","getAllLeafColumns")),getColumn:f=>{const h=s._getAllFlatColumnsById()[f];return process.env.NODE_ENV!=="production"&&!h&&console.error(`[Table] Column with id '${f}' does not exist.`),h}};Object.assign(s,d);for(let f=0;f<s._features.length;f++){const h=s._features[f];h==null||h.createTable==null||h.createTable(s)}return s}function Xp(){return e=>D(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},i=function(s,o,r){o===void 0&&(o=0);const a=[];for(let c=0;c<s.length;c++){const u=gp(e,e._getRowId(s[c],c,r),s[c],c,o,void 0,r?.id);if(n.flatRows.push(u),n.rowsById[u.id]=u,a.push(u),e.options.getSubRows){var l;u.originalSubRows=e.options.getSubRows(s[c],c),(l=u.originalSubRows)!=null&&l.length&&(u.subRows=i(u.originalSubRows,o+1,u))}}return a};return n.rows=i(t),n},F(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function Yp(e){const t=[],n=i=>{var s;t.push(i),(s=i.subRows)!=null&&s.length&&i.getIsExpanded()&&i.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function Zp(e){return t=>D(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(n,i)=>{if(!i.rows.length)return i;const{pageSize:s,pageIndex:o}=n;let{rows:r,flatRows:a,rowsById:l}=i;const c=s*o,u=c+s;r=r.slice(c,u);let d;t.options.paginateExpandedRows?d={rows:r,flatRows:a,rowsById:l}:d=Yp({rows:r,flatRows:a,rowsById:l}),d.flatRows=[];const f=h=>{d.flatRows.push(h),h.subRows.length&&h.subRows.forEach(f)};return d.rows.forEach(f),d},F(t.options,"debugTable","getPaginationRowModel"))}function Jp(){return e=>D(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const i=e.getState().sorting,s=[],o=i.filter(l=>{var c;return(c=e.getColumn(l.id))==null?void 0:c.getCanSort()}),r={};o.forEach(l=>{const c=e.getColumn(l.id);c&&(r[l.id]={sortUndefined:c.columnDef.sortUndefined,invertSorting:c.columnDef.invertSorting,sortingFn:c.getSortingFn()})});const a=l=>{const c=l.map(u=>({...u}));return c.sort((u,d)=>{for(let h=0;h<o.length;h+=1){var f;const p=o[h],g=r[p.id],x=g.sortUndefined,w=(f=p?.desc)!=null?f:!1;let C=0;if(x){const y=u.getValue(p.id),S=d.getValue(p.id),_=y===void 0,b=S===void 0;if(_||b){if(x==="first")return _?-1:1;if(x==="last")return _?1:-1;C=_&&b?0:_?x:-x}}if(C===0&&(C=g.sortingFn(u,d,p.id)),C!==0)return w&&(C*=-1),g.invertSorting&&(C*=-1),C}return u.index-d.index}),c.forEach(u=>{var d;s.push(u),(d=u.subRows)!=null&&d.length&&(u.subRows=a(u.subRows))}),c};return{rows:a(n.rows),flatRows:s,rowsById:n.rowsById}},F(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}/**
35
+ color: hsl(${Math.max(0,Math.min(120-120*f,120))}deg 100% 31%);`,n?.key)}return s}}function F(e,t,n,i){return{debug:()=>{var s;return(s=e?.debugAll)!=null?s:e[t]},key:process.env.NODE_ENV==="development"&&n,onChange:i}}function up(e,t,n,i){const s=()=>{var r;return(r=o.getValue())!=null?r:e.options.renderFallbackValue},o={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(i),renderValue:s,getContext:D(()=>[e,n,t,o],(r,a,l,u)=>({table:r,column:a,row:l,cell:u,getValue:u.getValue,renderValue:u.renderValue}),F(e.options,"debugCells","cell.getContext"))};return e._features.forEach(r=>{r.createCell==null||r.createCell(o,n,t,e)},{}),o}function cp(e,t,n,i){var s,o;const a={...e._getDefaultColumnDef(),...t},l=a.accessorKey;let u=(s=(o=a.id)!=null?o:l?typeof String.prototype.replaceAll=="function"?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)!=null?s:typeof a.header=="string"?a.header:void 0,c;if(a.accessorFn?c=a.accessorFn:l&&(l.includes(".")?c=f=>{let h=f;for(const g of l.split(".")){var p;h=(p=h)==null?void 0:p[g],process.env.NODE_ENV!=="production"&&h===void 0&&console.warn(`"${g}" in deeply nested key "${l}" returned undefined.`)}return h}:c=f=>f[a.accessorKey]),!u)throw process.env.NODE_ENV!=="production"?new Error(a.accessorFn?"Columns require an id when using an accessorFn":"Columns require an id when using a non-string header"):new Error;let d={id:`${String(u)}`,accessorFn:c,parent:i,depth:n,columnDef:a,columns:[],getFlatColumns:D(()=>[!0],()=>{var f;return[d,...(f=d.columns)==null?void 0:f.flatMap(h=>h.getFlatColumns())]},F(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:D(()=>[e._getOrderColumnsFn()],f=>{var h;if((h=d.columns)!=null&&h.length){let p=d.columns.flatMap(g=>g.getLeafColumns());return f(p)}return[d]},F(e.options,"debugColumns","column.getLeafColumns"))};for(const f of e._features)f.createColumn==null||f.createColumn(d,e);return d}const ae="debugHeaders";function bo(e,t,n){var i;let o={id:(i=n.id)!=null?i:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const r=[],a=l=>{l.subHeaders&&l.subHeaders.length&&l.subHeaders.map(a),r.push(l)};return a(o),r},getContext:()=>({table:e,header:o,column:t})};return e._features.forEach(r=>{r.createHeader==null||r.createHeader(o,e)}),o}const dp={createTable:e=>{e.getHeaderGroups=D(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,i,s)=>{var o,r;const a=(o=i?.map(d=>n.find(f=>f.id===d)).filter(Boolean))!=null?o:[],l=(r=s?.map(d=>n.find(f=>f.id===d)).filter(Boolean))!=null?r:[],u=n.filter(d=>!(i!=null&&i.includes(d.id))&&!(s!=null&&s.includes(d.id)));return It(t,[...a,...u,...l],e)},F(e.options,ae,"getHeaderGroups")),e.getCenterHeaderGroups=D(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,i,s)=>(n=n.filter(o=>!(i!=null&&i.includes(o.id))&&!(s!=null&&s.includes(o.id))),It(t,n,e,"center")),F(e.options,ae,"getCenterHeaderGroups")),e.getLeftHeaderGroups=D(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,i)=>{var s;const o=(s=i?.map(r=>n.find(a=>a.id===r)).filter(Boolean))!=null?s:[];return It(t,o,e,"left")},F(e.options,ae,"getLeftHeaderGroups")),e.getRightHeaderGroups=D(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,i)=>{var s;const o=(s=i?.map(r=>n.find(a=>a.id===r)).filter(Boolean))!=null?s:[];return It(t,o,e,"right")},F(e.options,ae,"getRightHeaderGroups")),e.getFooterGroups=D(()=>[e.getHeaderGroups()],t=>[...t].reverse(),F(e.options,ae,"getFooterGroups")),e.getLeftFooterGroups=D(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),F(e.options,ae,"getLeftFooterGroups")),e.getCenterFooterGroups=D(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),F(e.options,ae,"getCenterFooterGroups")),e.getRightFooterGroups=D(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),F(e.options,ae,"getRightFooterGroups")),e.getFlatHeaders=D(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),F(e.options,ae,"getFlatHeaders")),e.getLeftFlatHeaders=D(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),F(e.options,ae,"getLeftFlatHeaders")),e.getCenterFlatHeaders=D(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),F(e.options,ae,"getCenterFlatHeaders")),e.getRightFlatHeaders=D(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),F(e.options,ae,"getRightFlatHeaders")),e.getCenterLeafHeaders=D(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var i;return!((i=n.subHeaders)!=null&&i.length)}),F(e.options,ae,"getCenterLeafHeaders")),e.getLeftLeafHeaders=D(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var i;return!((i=n.subHeaders)!=null&&i.length)}),F(e.options,ae,"getLeftLeafHeaders")),e.getRightLeafHeaders=D(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var i;return!((i=n.subHeaders)!=null&&i.length)}),F(e.options,ae,"getRightLeafHeaders")),e.getLeafHeaders=D(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,i)=>{var s,o,r,a,l,u;return[...(s=(o=t[0])==null?void 0:o.headers)!=null?s:[],...(r=(a=n[0])==null?void 0:a.headers)!=null?r:[],...(l=(u=i[0])==null?void 0:u.headers)!=null?l:[]].map(c=>c.getLeafHeaders()).flat()},F(e.options,ae,"getLeafHeaders"))}};function It(e,t,n,i){var s,o;let r=0;const a=function(f,h){h===void 0&&(h=1),r=Math.max(r,h),f.filter(p=>p.getIsVisible()).forEach(p=>{var g;(g=p.columns)!=null&&g.length&&a(p.columns,h+1)},0)};a(e);let l=[];const u=(f,h)=>{const p={depth:h,id:[i,`${h}`].filter(Boolean).join("_"),headers:[]},g=[];f.forEach(x=>{const w=[...g].reverse()[0],C=x.column.depth===p.depth;let y,S=!1;if(C&&x.column.parent?y=x.column.parent:(y=x.column,S=!0),w&&w?.column===y)w.subHeaders.push(x);else{const _=bo(n,y,{id:[i,h,y.id,x?.id].filter(Boolean).join("_"),isPlaceholder:S,placeholderId:S?`${g.filter(b=>b.column===y).length}`:void 0,depth:h,index:g.length});_.subHeaders.push(x),g.push(_)}p.headers.push(x),x.headerGroup=p}),l.push(p),h>0&&u(g,h-1)},c=t.map((f,h)=>bo(n,f,{depth:r,index:h}));u(c,r-1),l.reverse();const d=f=>f.filter(p=>p.column.getIsVisible()).map(p=>{let g=0,x=0,w=[0];p.subHeaders&&p.subHeaders.length?(w=[],d(p.subHeaders).forEach(y=>{let{colSpan:S,rowSpan:_}=y;g+=S,w.push(_)})):g=1;const C=Math.min(...w);return x=x+C,p.colSpan=g,p.rowSpan=x,{colSpan:g,rowSpan:x}});return d((s=(o=l[0])==null?void 0:o.headers)!=null?s:[]),l}const fp=(e,t,n,i,s,o,r)=>{let a={id:t,index:i,original:n,depth:s,parentId:r,_valuesCache:{},_uniqueValuesCache:{},getValue:l=>{if(a._valuesCache.hasOwnProperty(l))return a._valuesCache[l];const u=e.getColumn(l);if(u!=null&&u.accessorFn)return a._valuesCache[l]=u.accessorFn(a.original,i),a._valuesCache[l]},getUniqueValues:l=>{if(a._uniqueValuesCache.hasOwnProperty(l))return a._uniqueValuesCache[l];const u=e.getColumn(l);if(u!=null&&u.accessorFn)return u.columnDef.getUniqueValues?(a._uniqueValuesCache[l]=u.columnDef.getUniqueValues(a.original,i),a._uniqueValuesCache[l]):(a._uniqueValuesCache[l]=[a.getValue(l)],a._uniqueValuesCache[l])},renderValue:l=>{var u;return(u=a.getValue(l))!=null?u:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>lp(a.subRows,l=>l.subRows),getParentRow:()=>a.parentId?e.getRow(a.parentId,!0):void 0,getParentRows:()=>{let l=[],u=a;for(;;){const c=u.getParentRow();if(!c)break;l.push(c),u=c}return l.reverse()},getAllCells:D(()=>[e.getAllLeafColumns()],l=>l.map(u=>up(e,a,u,u.id)),F(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:D(()=>[a.getAllCells()],l=>l.reduce((u,c)=>(u[c.column.id]=c,u),{}),F(e.options,"debugRows","getAllCellsByColumnId"))};for(let l=0;l<e._features.length;l++){const u=e._features[l];u==null||u.createRow==null||u.createRow(a,e)}return a},hp={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},ma=(e,t,n)=>{var i,s;const o=n==null||(i=n.toString())==null?void 0:i.toLowerCase();return!!(!((s=e.getValue(t))==null||(s=s.toString())==null||(s=s.toLowerCase())==null)&&s.includes(o))};ma.autoRemove=e=>Se(e);const va=(e,t,n)=>{var i;return!!(!((i=e.getValue(t))==null||(i=i.toString())==null)&&i.includes(n))};va.autoRemove=e=>Se(e);const ya=(e,t,n)=>{var i;return((i=e.getValue(t))==null||(i=i.toString())==null?void 0:i.toLowerCase())===n?.toLowerCase()};ya.autoRemove=e=>Se(e);const wa=(e,t,n)=>{var i;return(i=e.getValue(t))==null?void 0:i.includes(n)};wa.autoRemove=e=>Se(e);const xa=(e,t,n)=>!n.some(i=>{var s;return!((s=e.getValue(t))!=null&&s.includes(i))});xa.autoRemove=e=>Se(e)||!(e!=null&&e.length);const Ca=(e,t,n)=>n.some(i=>{var s;return(s=e.getValue(t))==null?void 0:s.includes(i)});Ca.autoRemove=e=>Se(e)||!(e!=null&&e.length);const Sa=(e,t,n)=>e.getValue(t)===n;Sa.autoRemove=e=>Se(e);const _a=(e,t,n)=>e.getValue(t)==n;_a.autoRemove=e=>Se(e);const Wi=(e,t,n)=>{let[i,s]=n;const o=e.getValue(t);return o>=i&&o<=s};Wi.resolveFilterValue=e=>{let[t,n]=e,i=typeof t!="number"?parseFloat(t):t,s=typeof n!="number"?parseFloat(n):n,o=t===null||Number.isNaN(i)?-1/0:i,r=n===null||Number.isNaN(s)?1/0:s;if(o>r){const a=o;o=r,r=a}return[o,r]};Wi.autoRemove=e=>Se(e)||Se(e[0])&&Se(e[1]);const Pe={includesString:ma,includesStringSensitive:va,equalsString:ya,arrIncludes:wa,arrIncludesAll:xa,arrIncludesSome:Ca,equals:Sa,weakEquals:_a,inNumberRange:Wi};function Se(e){return e==null||e===""}const gp={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:fe("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],i=n?.getValue(e.id);return typeof i=="string"?Pe.includesString:typeof i=="number"?Pe.inNumberRange:typeof i=="boolean"||i!==null&&typeof i=="object"?Pe.equals:Array.isArray(i)?Pe.arrIncludes:Pe.weakEquals},e.getFilterFn=()=>{var n,i;return sn(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(i=t.options.filterFns)==null?void 0:i[e.columnDef.filterFn])!=null?n:Pe[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,i,s;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((i=t.options.enableColumnFilters)!=null?i:!0)&&((s=t.options.enableFilters)!=null?s:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(i=>i.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,i;return(n=(i=t.getState().columnFilters)==null?void 0:i.findIndex(s=>s.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(i=>{const s=e.getFilterFn(),o=i?.find(c=>c.id===e.id),r=De(n,o?o.value:void 0);if(Ro(s,r,e)){var a;return(a=i?.filter(c=>c.id!==e.id))!=null?a:[]}const l={id:e.id,value:r};if(o){var u;return(u=i?.map(c=>c.id===e.id?l:c))!=null?u:[]}return i!=null&&i.length?[...i,l]:[l]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),i=s=>{var o;return(o=De(t,s))==null?void 0:o.filter(r=>{const a=n.find(l=>l.id===r.id);if(a){const l=a.getFilterFn();if(Ro(l,r.value,a))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(i)},e.resetColumnFilters=t=>{var n,i;e.setColumnFilters(t?[]:(n=(i=e.initialState)==null?void 0:i.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function Ro(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const pp=(e,t,n)=>n.reduce((i,s)=>{const o=s.getValue(e);return i+(typeof o=="number"?o:0)},0),mp=(e,t,n)=>{let i;return n.forEach(s=>{const o=s.getValue(e);o!=null&&(i>o||i===void 0&&o>=o)&&(i=o)}),i},vp=(e,t,n)=>{let i;return n.forEach(s=>{const o=s.getValue(e);o!=null&&(i<o||i===void 0&&o>=o)&&(i=o)}),i},yp=(e,t,n)=>{let i,s;return n.forEach(o=>{const r=o.getValue(e);r!=null&&(i===void 0?r>=r&&(i=s=r):(i>r&&(i=r),s<r&&(s=r)))}),[i,s]},wp=(e,t)=>{let n=0,i=0;if(t.forEach(s=>{let o=s.getValue(e);o!=null&&(o=+o)>=o&&(++n,i+=o)}),n)return i/n},xp=(e,t)=>{if(!t.length)return;const n=t.map(o=>o.getValue(e));if(!ap(n))return;if(n.length===1)return n[0];const i=Math.floor(n.length/2),s=n.sort((o,r)=>o-r);return n.length%2!==0?s[i]:(s[i-1]+s[i])/2},Cp=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),Sp=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,_p=(e,t)=>t.length,Tn={sum:pp,min:mp,max:vp,extent:yp,mean:wp,median:xp,unique:Cp,uniqueCount:Sp,count:_p},bp={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:fe("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(i=>i!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,i;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((i=t.options.enableGrouping)!=null?i:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],i=n?.getValue(e.id);if(typeof i=="number")return Tn.sum;if(Object.prototype.toString.call(i)==="[object Date]")return Tn.extent},e.getAggregationFn=()=>{var n,i;if(!e)throw new Error;return sn(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(i=t.options.aggregationFns)==null?void 0:i[e.columnDef.aggregationFn])!=null?n:Tn[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,i;e.setGrouping(t?[]:(n=(i=e.initialState)==null?void 0:i.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const i=t.getColumn(n);return i!=null&&i.columnDef.getGroupingValue?(e._groupingValuesCache[n]=i.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,i)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var s;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((s=n.subRows)!=null&&s.length)}}};function Rp(e,t,n){if(!(t!=null&&t.length)||!n)return e;const i=e.filter(o=>!t.includes(o.id));return n==="remove"?i:[...t.map(o=>e.find(r=>r.id===o)).filter(Boolean),...i]}const Pp={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:fe("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=D(n=>[vt(t,n)],n=>n.findIndex(i=>i.id===e.id),F(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=n=>{var i;return((i=vt(t,n)[0])==null?void 0:i.id)===e.id},e.getIsLastColumn=n=>{var i;const s=vt(t,n);return((i=s[s.length-1])==null?void 0:i.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=D(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,i)=>s=>{let o=[];if(!(t!=null&&t.length))o=s;else{const r=[...t],a=[...s];for(;a.length&&r.length;){const l=r.shift(),u=a.findIndex(c=>c.id===l);u>-1&&o.push(a.splice(u,1)[0])}o=[...o,...a]}return Rp(o,n,i)},F(e.options,"debugTable","_getOrderColumnsFn"))}},En=()=>({left:[],right:[]}),Mp={getInitialState:e=>({columnPinning:En(),...e}),getDefaultOptions:e=>({onColumnPinningChange:fe("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const i=e.getLeafColumns().map(s=>s.id).filter(Boolean);t.setColumnPinning(s=>{var o,r;if(n==="right"){var a,l;return{left:((a=s?.left)!=null?a:[]).filter(d=>!(i!=null&&i.includes(d))),right:[...((l=s?.right)!=null?l:[]).filter(d=>!(i!=null&&i.includes(d))),...i]}}if(n==="left"){var u,c;return{left:[...((u=s?.left)!=null?u:[]).filter(d=>!(i!=null&&i.includes(d))),...i],right:((c=s?.right)!=null?c:[]).filter(d=>!(i!=null&&i.includes(d)))}}return{left:((o=s?.left)!=null?o:[]).filter(d=>!(i!=null&&i.includes(d))),right:((r=s?.right)!=null?r:[]).filter(d=>!(i!=null&&i.includes(d)))}})},e.getCanPin=()=>e.getLeafColumns().some(i=>{var s,o,r;return((s=i.columnDef.enablePinning)!=null?s:!0)&&((o=(r=t.options.enableColumnPinning)!=null?r:t.options.enablePinning)!=null?o:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(a=>a.id),{left:i,right:s}=t.getState().columnPinning,o=n.some(a=>i?.includes(a)),r=n.some(a=>s?.includes(a));return o?"left":r?"right":!1},e.getPinnedIndex=()=>{var n,i;const s=e.getIsPinned();return s?(n=(i=t.getState().columnPinning)==null||(i=i[s])==null?void 0:i.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=D(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,i,s)=>{const o=[...i??[],...s??[]];return n.filter(r=>!o.includes(r.column.id))},F(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=D(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,i)=>(i??[]).map(o=>n.find(r=>r.column.id===o)).filter(Boolean).map(o=>({...o,position:"left"})),F(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=D(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,i)=>(i??[]).map(o=>n.find(r=>r.column.id===o)).filter(Boolean).map(o=>({...o,position:"right"})),F(t.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,i;return e.setColumnPinning(t?En():(n=(i=e.initialState)==null?void 0:i.columnPinning)!=null?n:En())},e.getIsSomeColumnsPinned=t=>{var n;const i=e.getState().columnPinning;if(!t){var s,o;return!!((s=i.left)!=null&&s.length||(o=i.right)!=null&&o.length)}return!!((n=i[t])!=null&&n.length)},e.getLeftLeafColumns=D(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(i=>t.find(s=>s.id===i)).filter(Boolean),F(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=D(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(i=>t.find(s=>s.id===i)).filter(Boolean),F(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=D(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,i)=>{const s=[...n??[],...i??[]];return t.filter(o=>!s.includes(o.id))},F(e.options,"debugColumns","getCenterLeafColumns"))}};function Tp(e){return e||(typeof document<"u"?document:null)}const Lt={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Vn=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),Ep={getDefaultColumnDef:()=>Lt,getInitialState:e=>({columnSizing:{},columnSizingInfo:Vn(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:fe("columnSizing",e),onColumnSizingInfoChange:fe("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,i,s;const o=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:Lt.minSize,(i=o??e.columnDef.size)!=null?i:Lt.size),(s=e.columnDef.maxSize)!=null?s:Lt.maxSize)},e.getStart=D(n=>[n,vt(t,n),t.getState().columnSizing],(n,i)=>i.slice(0,e.getIndex(n)).reduce((s,o)=>s+o.getSize(),0),F(t.options,"debugColumns","getStart")),e.getAfter=D(n=>[n,vt(t,n),t.getState().columnSizing],(n,i)=>i.slice(e.getIndex(n)+1).reduce((s,o)=>s+o.getSize(),0),F(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:i,...s}=n;return s})},e.getCanResize=()=>{var n,i;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((i=t.options.enableColumnResizing)!=null?i:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const i=s=>{if(s.subHeaders.length)s.subHeaders.forEach(i);else{var o;n+=(o=s.column.getSize())!=null?o:0}};return i(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const i=t.getColumn(e.column.id),s=i?.getCanResize();return o=>{if(!i||!s||(o.persist==null||o.persist(),An(o)&&o.touches&&o.touches.length>1))return;const r=e.getSize(),a=e?e.getLeafHeaders().map(w=>[w.column.id,w.column.getSize()]):[[i.id,i.getSize()]],l=An(o)?Math.round(o.touches[0].clientX):o.clientX,u={},c=(w,C)=>{typeof C=="number"&&(t.setColumnSizingInfo(y=>{var S,_;const b=t.options.columnResizeDirection==="rtl"?-1:1,E=(C-((S=y?.startOffset)!=null?S:0))*b,R=Math.max(E/((_=y?.startSize)!=null?_:0),-.999999);return y.columnSizingStart.forEach(I=>{let[A,z]=I;u[A]=Math.round(Math.max(z+z*R,0)*100)/100}),{...y,deltaOffset:E,deltaPercentage:R}}),(t.options.columnResizeMode==="onChange"||w==="end")&&t.setColumnSizing(y=>({...y,...u})))},d=w=>c("move",w),f=w=>{c("end",w),t.setColumnSizingInfo(C=>({...C,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},h=Tp(n),p={moveHandler:w=>d(w.clientX),upHandler:w=>{h?.removeEventListener("mousemove",p.moveHandler),h?.removeEventListener("mouseup",p.upHandler),f(w.clientX)}},g={moveHandler:w=>(w.cancelable&&(w.preventDefault(),w.stopPropagation()),d(w.touches[0].clientX),!1),upHandler:w=>{var C;h?.removeEventListener("touchmove",g.moveHandler),h?.removeEventListener("touchend",g.upHandler),w.cancelable&&(w.preventDefault(),w.stopPropagation()),f((C=w.touches[0])==null?void 0:C.clientX)}},x=Vp()?{passive:!1}:!1;An(o)?(h?.addEventListener("touchmove",g.moveHandler,x),h?.addEventListener("touchend",g.upHandler,x)):(h?.addEventListener("mousemove",p.moveHandler,x),h?.addEventListener("mouseup",p.upHandler,x)),t.setColumnSizingInfo(w=>({...w,startOffset:l,startSize:r,deltaOffset:0,deltaPercentage:0,columnSizingStart:a,isResizingColumn:i.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?Vn():(n=e.initialState.columnSizingInfo)!=null?n:Vn())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((i,s)=>i+s.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((i,s)=>i+s.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((i,s)=>i+s.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((i,s)=>i+s.getSize(),0))!=null?t:0}}};let jt=null;function Vp(){if(typeof jt=="boolean")return jt;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return jt=e,jt}function An(e){return e.type==="touchstart"}const Ap={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:fe("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(i=>({...i,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,i;const s=e.columns;return(n=s.length?s.some(o=>o.getIsVisible()):(i=t.getState().columnVisibility)==null?void 0:i[e.id])!=null?n:!0},e.getCanHide=()=>{var n,i;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((i=t.options.enableHiding)!=null?i:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=D(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(i=>i.column.getIsVisible()),F(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=D(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,i,s)=>[...n,...i,...s],F(t.options,"debugRows","getVisibleCells"))},createTable:e=>{const t=(n,i)=>D(()=>[i(),i().filter(s=>s.getIsVisible()).map(s=>s.id).join("_")],s=>s.filter(o=>o.getIsVisible==null?void 0:o.getIsVisible()),F(e.options,"debugColumns",n));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var i;e.setColumnVisibility(n?{}:(i=e.initialState.columnVisibility)!=null?i:{})},e.toggleAllColumnsVisible=n=>{var i;n=(i=n)!=null?i:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((s,o)=>({...s,[o.id]:n||!(o.getCanHide!=null&&o.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var i;e.toggleAllColumnsVisible((i=n.target)==null?void 0:i.checked)}}};function vt(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const Dp={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},Fp={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:fe("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const i=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof i=="string"||typeof i=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,i,s,o;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((i=t.options.enableGlobalFilter)!=null?i:!0)&&((s=t.options.enableFilters)!=null?s:!0)&&((o=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?o:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Pe.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:i}=e.options;return sn(i)?i:i==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[i])!=null?t:Pe[i]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},kp={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:fe("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var i,s;if(!t){e._queue(()=>{t=!0});return}if((i=(s=e.options.autoResetAll)!=null?s:e.options.autoResetExpanded)!=null?i:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=i=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(i),e.toggleAllRowsExpanded=i=>{i??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=i=>{var s,o;e.setExpanded(i?{}:(s=(o=e.initialState)==null?void 0:o.expanded)!=null?s:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(i=>i.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>i=>{i.persist==null||i.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const i=e.getState().expanded;return i===!0||Object.values(i).some(Boolean)},e.getIsAllRowsExpanded=()=>{const i=e.getState().expanded;return typeof i=="boolean"?i===!0:!(!Object.keys(i).length||e.getRowModel().flatRows.some(s=>!s.getIsExpanded()))},e.getExpandedDepth=()=>{let i=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(o=>{const r=o.split(".");i=Math.max(i,r.length)}),i},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(i=>{var s;const o=i===!0?!0:!!(i!=null&&i[e.id]);let r={};if(i===!0?Object.keys(t.getRowModel().rowsById).forEach(a=>{r[a]=!0}):r=i,n=(s=n)!=null?s:!o,!o&&n)return{...r,[e.id]:!0};if(o&&!n){const{[e.id]:a,...l}=r;return l}return i})},e.getIsExpanded=()=>{var n;const i=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:i===!0||i?.[e.id])},e.getCanExpand=()=>{var n,i,s;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((i=t.options.enableExpanding)!=null?i:!0)&&!!((s=e.subRows)!=null&&s.length)},e.getIsAllParentsExpanded=()=>{let n=!0,i=e;for(;n&&i.parentId;)i=t.getRow(i.parentId,!0),n=i.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},ii=0,si=10,Dn=()=>({pageIndex:ii,pageSize:si}),Ip={getInitialState:e=>({...e,pagination:{...Dn(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:fe("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var i,s;if(!t){e._queue(()=>{t=!0});return}if((i=(s=e.options.autoResetAll)!=null?s:e.options.autoResetPageIndex)!=null?i:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=i=>{const s=o=>De(i,o);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(s)},e.resetPagination=i=>{var s;e.setPagination(i?Dn():(s=e.initialState.pagination)!=null?s:Dn())},e.setPageIndex=i=>{e.setPagination(s=>{let o=De(i,s.pageIndex);const r=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return o=Math.max(0,Math.min(o,r)),{...s,pageIndex:o}})},e.resetPageIndex=i=>{var s,o;e.setPageIndex(i?ii:(s=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageIndex)!=null?s:ii)},e.resetPageSize=i=>{var s,o;e.setPageSize(i?si:(s=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageSize)!=null?s:si)},e.setPageSize=i=>{e.setPagination(s=>{const o=Math.max(1,De(i,s.pageSize)),r=s.pageSize*s.pageIndex,a=Math.floor(r/o);return{...s,pageIndex:a,pageSize:o}})},e.setPageCount=i=>e.setPagination(s=>{var o;let r=De(i,(o=e.options.pageCount)!=null?o:-1);return typeof r=="number"&&(r=Math.max(-1,r)),{...s,pageCount:r}}),e.getPageOptions=D(()=>[e.getPageCount()],i=>{let s=[];return i&&i>0&&(s=[...new Array(i)].fill(null).map((o,r)=>r)),s},F(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:i}=e.getState().pagination,s=e.getPageCount();return s===-1?!0:s===0?!1:i<s-1},e.previousPage=()=>e.setPageIndex(i=>i-1),e.nextPage=()=>e.setPageIndex(i=>i+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var i;return(i=e.options.pageCount)!=null?i:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var i;return(i=e.options.rowCount)!=null?i:e.getPrePaginationRowModel().rows.length}}},Fn=()=>({top:[],bottom:[]}),Lp={getInitialState:e=>({rowPinning:Fn(),...e}),getDefaultOptions:e=>({onRowPinningChange:fe("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,i,s)=>{const o=i?e.getLeafRows().map(l=>{let{id:u}=l;return u}):[],r=s?e.getParentRows().map(l=>{let{id:u}=l;return u}):[],a=new Set([...r,e.id,...o]);t.setRowPinning(l=>{var u,c;if(n==="bottom"){var d,f;return{top:((d=l?.top)!=null?d:[]).filter(g=>!(a!=null&&a.has(g))),bottom:[...((f=l?.bottom)!=null?f:[]).filter(g=>!(a!=null&&a.has(g))),...Array.from(a)]}}if(n==="top"){var h,p;return{top:[...((h=l?.top)!=null?h:[]).filter(g=>!(a!=null&&a.has(g))),...Array.from(a)],bottom:((p=l?.bottom)!=null?p:[]).filter(g=>!(a!=null&&a.has(g)))}}return{top:((u=l?.top)!=null?u:[]).filter(g=>!(a!=null&&a.has(g))),bottom:((c=l?.bottom)!=null?c:[]).filter(g=>!(a!=null&&a.has(g)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:i,enablePinning:s}=t.options;return typeof i=="function"?i(e):(n=i??s)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:i,bottom:s}=t.getState().rowPinning,o=n.some(a=>i?.includes(a)),r=n.some(a=>s?.includes(a));return o?"top":r?"bottom":!1},e.getPinnedIndex=()=>{var n,i;const s=e.getIsPinned();if(!s)return-1;const o=(n=s==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(r=>{let{id:a}=r;return a});return(i=o?.indexOf(e.id))!=null?i:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,i;return e.setRowPinning(t?Fn():(n=(i=e.initialState)==null?void 0:i.rowPinning)!=null?n:Fn())},e.getIsSomeRowsPinned=t=>{var n;const i=e.getState().rowPinning;if(!t){var s,o;return!!((s=i.top)!=null&&s.length||(o=i.bottom)!=null&&o.length)}return!!((n=i[t])!=null&&n.length)},e._getPinnedRows=(t,n,i)=>{var s;return((s=e.options.keepPinnedRows)==null||s?(n??[]).map(r=>{const a=e.getRow(r,!0);return a.getIsAllParentsExpanded()?a:null}):(n??[]).map(r=>t.find(a=>a.id===r))).filter(Boolean).map(r=>({...r,position:i}))},e.getTopRows=D(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),F(e.options,"debugRows","getTopRows")),e.getBottomRows=D(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),F(e.options,"debugRows","getBottomRows")),e.getCenterRows=D(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,i)=>{const s=new Set([...n??[],...i??[]]);return t.filter(o=>!s.has(o.id))},F(e.options,"debugRows","getCenterRows"))}},jp={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:fe("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const i={...n},s=e.getPreGroupedRowModel().flatRows;return t?s.forEach(o=>{o.getCanSelect()&&(i[o.id]=!0)}):s.forEach(o=>{delete i[o.id]}),i})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const i=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),s={...n};return e.getRowModel().rows.forEach(o=>{oi(s,o.id,i,!0,e)}),s}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=D(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?kn(e,n):{rows:[],flatRows:[],rowsById:{}},F(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=D(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?kn(e,n):{rows:[],flatRows:[],rowsById:{}},F(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=D(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?kn(e,n):{rows:[],flatRows:[],rowsById:{}},F(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let i=!!(t.length&&Object.keys(n).length);return i&&t.some(s=>s.getCanSelect()&&!n[s.id])&&(i=!1),i},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(s=>s.getCanSelect()),{rowSelection:n}=e.getState();let i=!!t.length;return i&&t.some(s=>!n[s.id])&&(i=!1),i},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,i)=>{const s=e.getIsSelected();t.setRowSelection(o=>{var r;if(n=typeof n<"u"?n:!s,e.getCanSelect()&&s===n)return o;const a={...o};return oi(a,e.id,n,(r=i?.selectChildren)!=null?r:!0,t),a})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return Ui(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return ri(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return ri(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return i=>{var s;n&&e.toggleSelected((s=i.target)==null?void 0:s.checked)}}}},oi=(e,t,n,i,s)=>{var o;const r=s.getRow(t,!0);n?(r.getCanMultiSelect()||Object.keys(e).forEach(a=>delete e[a]),r.getCanSelect()&&(e[t]=!0)):delete e[t],i&&(o=r.subRows)!=null&&o.length&&r.getCanSelectSubRows()&&r.subRows.forEach(a=>oi(e,a.id,n,i,s))};function kn(e,t){const n=e.getState().rowSelection,i=[],s={},o=function(r,a){return r.map(l=>{var u;const c=Ui(l,n);if(c&&(i.push(l),s[l.id]=l),(u=l.subRows)!=null&&u.length&&(l={...l,subRows:o(l.subRows)}),c)return l}).filter(Boolean)};return{rows:o(t.rows),flatRows:i,rowsById:s}}function Ui(e,t){var n;return(n=t[e.id])!=null?n:!1}function ri(e,t,n){var i;if(!((i=e.subRows)!=null&&i.length))return!1;let s=!0,o=!1;return e.subRows.forEach(r=>{if(!(o&&!s)&&(r.getCanSelect()&&(Ui(r,t)?o=!0:s=!1),r.subRows&&r.subRows.length)){const a=ri(r,t);a==="all"?o=!0:(a==="some"&&(o=!0),s=!1)}}),s?"all":o?"some":!1}const ai=/([0-9]+)/gm,$p=(e,t,n)=>ba(Ie(e.getValue(n)).toLowerCase(),Ie(t.getValue(n)).toLowerCase()),Op=(e,t,n)=>ba(Ie(e.getValue(n)),Ie(t.getValue(n))),zp=(e,t,n)=>Ki(Ie(e.getValue(n)).toLowerCase(),Ie(t.getValue(n)).toLowerCase()),Bp=(e,t,n)=>Ki(Ie(e.getValue(n)),Ie(t.getValue(n))),Np=(e,t,n)=>{const i=e.getValue(n),s=t.getValue(n);return i>s?1:i<s?-1:0},Hp=(e,t,n)=>Ki(e.getValue(n),t.getValue(n));function Ki(e,t){return e===t?0:e>t?1:-1}function Ie(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function ba(e,t){const n=e.split(ai).filter(Boolean),i=t.split(ai).filter(Boolean);for(;n.length&&i.length;){const s=n.shift(),o=i.shift(),r=parseInt(s,10),a=parseInt(o,10),l=[r,a].sort();if(isNaN(l[0])){if(s>o)return 1;if(o>s)return-1;continue}if(isNaN(l[1]))return isNaN(r)?-1:1;if(r>a)return 1;if(a>r)return-1}return n.length-i.length}const dt={alphanumeric:$p,alphanumericCaseSensitive:Op,text:zp,textCaseSensitive:Bp,datetime:Np,basic:Hp},Gp={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:fe("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let i=!1;for(const s of n){const o=s?.getValue(e.id);if(Object.prototype.toString.call(o)==="[object Date]")return dt.datetime;if(typeof o=="string"&&(i=!0,o.split(ai).length>1))return dt.alphanumeric}return i?dt.text:dt.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof n?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,i;if(!e)throw new Error;return sn(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(i=t.options.sortingFns)==null?void 0:i[e.columnDef.sortingFn])!=null?n:dt[e.columnDef.sortingFn]},e.toggleSorting=(n,i)=>{const s=e.getNextSortingOrder(),o=typeof n<"u"&&n!==null;t.setSorting(r=>{const a=r?.find(h=>h.id===e.id),l=r?.findIndex(h=>h.id===e.id);let u=[],c,d=o?n:s==="desc";if(r!=null&&r.length&&e.getCanMultiSort()&&i?a?c="toggle":c="add":r!=null&&r.length&&l!==r.length-1?c="replace":a?c="toggle":c="replace",c==="toggle"&&(o||s||(c="remove")),c==="add"){var f;u=[...r,{id:e.id,desc:d}],u.splice(0,u.length-((f=t.options.maxMultiSortColCount)!=null?f:Number.MAX_SAFE_INTEGER))}else c==="toggle"?u=r.map(h=>h.id===e.id?{...h,desc:d}:h):c==="remove"?u=r.filter(h=>h.id!==e.id):u=[{id:e.id,desc:d}];return u})},e.getFirstSortDir=()=>{var n,i;return((n=(i=e.columnDef.sortDescFirst)!=null?i:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var i,s;const o=e.getFirstSortDir(),r=e.getIsSorted();return r?r!==o&&((i=t.options.enableSortingRemoval)==null||i)&&(!(n&&(s=t.options.enableMultiRemove)!=null)||s)?!1:r==="desc"?"asc":"desc":o},e.getCanSort=()=>{var n,i;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((i=t.options.enableSorting)!=null?i:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,i;return(n=(i=e.columnDef.enableMultiSort)!=null?i:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const i=(n=t.getState().sorting)==null?void 0:n.find(s=>s.id===e.id);return i?i.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,i;return(n=(i=t.getState().sorting)==null?void 0:i.findIndex(s=>s.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(i=>i.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return i=>{n&&(i.persist==null||i.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(i):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,i;e.setSorting(t?[]:(n=(i=e.initialState)==null?void 0:i.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},Wp=[dp,Ap,Pp,Mp,hp,gp,Dp,Fp,Gp,bp,kp,Ip,Lp,jp,Ep];function Up(e){var t,n;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const i=[...Wp,...(t=e._features)!=null?t:[]];let s={_features:i};const o=s._features.reduce((f,h)=>Object.assign(f,h.getDefaultOptions==null?void 0:h.getDefaultOptions(s)),{}),r=f=>s.options.mergeOptions?s.options.mergeOptions(o,f):{...o,...f};let l={...{},...(n=e.initialState)!=null?n:{}};s._features.forEach(f=>{var h;l=(h=f.getInitialState==null?void 0:f.getInitialState(l))!=null?h:l});const u=[];let c=!1;const d={_features:i,options:{...o,...e},initialState:l,_queue:f=>{u.push(f),c||(c=!0,Promise.resolve().then(()=>{for(;u.length;)u.shift()();c=!1}).catch(h=>setTimeout(()=>{throw h})))},reset:()=>{s.setState(s.initialState)},setOptions:f=>{const h=De(f,s.options);s.options=r(h)},getState:()=>s.options.state,setState:f=>{s.options.onStateChange==null||s.options.onStateChange(f)},_getRowId:(f,h,p)=>{var g;return(g=s.options.getRowId==null?void 0:s.options.getRowId(f,h,p))!=null?g:`${p?[p.id,h].join("."):h}`},getCoreRowModel:()=>(s._getCoreRowModel||(s._getCoreRowModel=s.options.getCoreRowModel(s)),s._getCoreRowModel()),getRowModel:()=>s.getPaginationRowModel(),getRow:(f,h)=>{let p=(h?s.getPrePaginationRowModel():s.getRowModel()).rowsById[f];if(!p&&(p=s.getCoreRowModel().rowsById[f],!p))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${f}`):new Error;return p},_getDefaultColumnDef:D(()=>[s.options.defaultColumn],f=>{var h;return f=(h=f)!=null?h:{},{header:p=>{const g=p.header.column.columnDef;return g.accessorKey?g.accessorKey:g.accessorFn?g.id:null},cell:p=>{var g,x;return(g=(x=p.renderValue())==null||x.toString==null?void 0:x.toString())!=null?g:null},...s._features.reduce((p,g)=>Object.assign(p,g.getDefaultColumnDef==null?void 0:g.getDefaultColumnDef()),{}),...f}},F(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>s.options.columns,getAllColumns:D(()=>[s._getColumnDefs()],f=>{const h=function(p,g,x){return x===void 0&&(x=0),p.map(w=>{const C=cp(s,w,x,g),y=w;return C.columns=y.columns?h(y.columns,C,x+1):[],C})};return h(f)},F(e,"debugColumns","getAllColumns")),getAllFlatColumns:D(()=>[s.getAllColumns()],f=>f.flatMap(h=>h.getFlatColumns()),F(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:D(()=>[s.getAllFlatColumns()],f=>f.reduce((h,p)=>(h[p.id]=p,h),{}),F(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:D(()=>[s.getAllColumns(),s._getOrderColumnsFn()],(f,h)=>{let p=f.flatMap(g=>g.getLeafColumns());return h(p)},F(e,"debugColumns","getAllLeafColumns")),getColumn:f=>{const h=s._getAllFlatColumnsById()[f];return process.env.NODE_ENV!=="production"&&!h&&console.error(`[Table] Column with id '${f}' does not exist.`),h}};Object.assign(s,d);for(let f=0;f<s._features.length;f++){const h=s._features[f];h==null||h.createTable==null||h.createTable(s)}return s}function Kp(){return e=>D(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},i=function(s,o,r){o===void 0&&(o=0);const a=[];for(let u=0;u<s.length;u++){const c=fp(e,e._getRowId(s[u],u,r),s[u],u,o,void 0,r?.id);if(n.flatRows.push(c),n.rowsById[c.id]=c,a.push(c),e.options.getSubRows){var l;c.originalSubRows=e.options.getSubRows(s[u],u),(l=c.originalSubRows)!=null&&l.length&&(c.subRows=i(c.originalSubRows,o+1,c))}}return a};return n.rows=i(t),n},F(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function qp(e){const t=[],n=i=>{var s;t.push(i),(s=i.subRows)!=null&&s.length&&i.getIsExpanded()&&i.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function Xp(e){return t=>D(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(n,i)=>{if(!i.rows.length)return i;const{pageSize:s,pageIndex:o}=n;let{rows:r,flatRows:a,rowsById:l}=i;const u=s*o,c=u+s;r=r.slice(u,c);let d;t.options.paginateExpandedRows?d={rows:r,flatRows:a,rowsById:l}:d=qp({rows:r,flatRows:a,rowsById:l}),d.flatRows=[];const f=h=>{d.flatRows.push(h),h.subRows.length&&h.subRows.forEach(f)};return d.rows.forEach(f),d},F(t.options,"debugTable","getPaginationRowModel"))}function Yp(){return e=>D(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const i=e.getState().sorting,s=[],o=i.filter(l=>{var u;return(u=e.getColumn(l.id))==null?void 0:u.getCanSort()}),r={};o.forEach(l=>{const u=e.getColumn(l.id);u&&(r[l.id]={sortUndefined:u.columnDef.sortUndefined,invertSorting:u.columnDef.invertSorting,sortingFn:u.getSortingFn()})});const a=l=>{const u=l.map(c=>({...c}));return u.sort((c,d)=>{for(let h=0;h<o.length;h+=1){var f;const p=o[h],g=r[p.id],x=g.sortUndefined,w=(f=p?.desc)!=null?f:!1;let C=0;if(x){const y=c.getValue(p.id),S=d.getValue(p.id),_=y===void 0,b=S===void 0;if(_||b){if(x==="first")return _?-1:1;if(x==="last")return _?1:-1;C=_&&b?0:_?x:-x}}if(C===0&&(C=g.sortingFn(c,d,p.id)),C!==0)return w&&(C*=-1),g.invertSorting&&(C*=-1),C}return c.index-d.index}),u.forEach(c=>{var d;s.push(c),(d=c.subRows)!=null&&d.length&&(c.subRows=a(c.subRows))}),u};return{rows:a(n.rows),flatRows:s,rowsById:n.rowsById}},F(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}/**
36
36
  * react-table
37
37
  *
38
38
  * Copyright (c) TanStack
@@ -41,7 +41,7 @@
41
41
  * LICENSE.md file in the root directory of this source tree.
42
42
  *
43
43
  * @license MIT
44
- */function Po(e,t){return e?Qp(e)?T.createElement(e,t):e:null}function Qp(e){return em(e)||typeof e=="function"||tm(e)}function em(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function tm(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function nm(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=T.useState(()=>({current:qp(t)})),[i,s]=T.useState(()=>n.current.initialState);return n.current.setOptions(o=>({...o,...e,state:{...i,...e.state},onStateChange:r=>{s(r),e.onStateChange==null||e.onStateChange(r)}})),n.current}const im=e=>T.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("style",null,`
44
+ */function Po(e,t){return e?Zp(e)?T.createElement(e,t):e:null}function Zp(e){return Jp(e)||typeof e=="function"||Qp(e)}function Jp(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function Qp(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function em(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=T.useState(()=>({current:Up(t)})),[i,s]=T.useState(()=>n.current.initialState);return n.current.setOptions(o=>({...o,...e,state:{...i,...e.state},onStateChange:r=>{s(r),e.onStateChange==null||e.onStateChange(r)}})),n.current}const tm=e=>T.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("style",null,`
45
45
  @keyframes spin {
46
46
  from {
47
47
  transform: rotate(0deg);
@@ -54,5 +54,5 @@
54
54
  transform-origin: center;
55
55
  animation: spin 1s linear infinite;
56
56
  }
57
- `),T.createElement("g",{className:"spinner"},T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.0003 6.83317C13.5692 6.83317 11.2376 7.79894 9.51851 9.51803C7.79943 11.2371 6.83366 13.5687 6.83366 15.9998C6.83366 18.431 7.79943 20.7626 9.51851 22.4817C11.2376 24.2007 13.5692 25.1665 16.0003 25.1665C18.4315 25.1665 20.7631 24.2007 22.4821 22.4817C24.2012 20.7626 25.167 18.431 25.167 15.9998C25.167 13.5687 24.2012 11.2371 22.4821 9.51803C20.7631 7.79894 18.4315 6.83317 16.0003 6.83317ZM3.16699 15.9998C3.16699 8.91217 8.91266 3.1665 16.0003 3.1665C23.088 3.1665 28.8337 8.91217 28.8337 15.9998C28.8337 23.0875 23.088 28.8332 16.0003 28.8332C8.91266 28.8332 3.16699 23.0875 3.16699 15.9998Z",fill:"currentColor",fillOpacity:.12}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.9997 6.83319C13.6363 6.82787 11.3633 7.74068 9.65999 9.37907C9.30711 9.70535 8.84021 9.88001 8.35982 9.86545C7.87943 9.85089 7.42396 9.64827 7.09149 9.30122C6.75902 8.95416 6.57612 8.49043 6.58218 8.00985C6.58823 7.52928 6.78276 7.07031 7.12388 6.73174C9.50956 4.43941 12.6912 3.16143 15.9997 3.16652C16.4859 3.16652 16.9522 3.35967 17.296 3.70349C17.6398 4.04731 17.833 4.51362 17.833 4.99985C17.833 5.48608 17.6398 5.9524 17.296 6.29621C16.9522 6.64003 16.4859 6.83319 15.9997 6.83319Z",fill:"currentColor"}))),sm=e=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{clipPath:"url(#clip0_2074_3858)"},T.createElement("path",{d:"M21 21L16.65 16.65M19 11C19 15.4183 15.4183 19 11 19C6.58172 19 3 15.4183 3 11C3 6.58172 6.58172 3 11 3C15.4183 3 19 6.58172 19 11Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_2074_3858"},T.createElement("rect",{width:24,height:24,fill:"white"})))),om="_table_19yhs_8",rm={table:om},am=v.forwardRef(({children:e,className:t,style:n,...i},s)=>m.jsx("td",{ref:s,className:M.cx(t),style:n,...i,children:e})),Ra=v.forwardRef(({children:e,className:t,showBorders:n=!1,isSelected:i=!1,...s},o)=>{const r=M.css({borderBottom:n?"1px solid var(--border-neutral-alpha-low)":"none"});return m.jsx("tr",{ref:o,className:M.cx(r,t),...s,children:e})});Ra.displayName="TableBodyRow";const lm=v.forwardRef(({children:e,className:t,style:n,justifyContent:i="flex-start",alignItems:s="flex-start",...o},r)=>{const a=M.css({justifyContent:i,alignItems:s,fontWeight:"inherit"});return m.jsx("th",{ref:r,className:M.cx(a,t),style:n,...o,children:e})}),Pa=v.forwardRef(({children:e,className:t,showBorders:n=!1,...i},s)=>{const o=M.css({backgroundColor:"var(--fill-bg-secondary)",borderBottom:n?"1px solid var(--border-neutral-alpha-low)":"none"});return m.jsx("tr",{ref:s,className:M.cx(o,t),...i,children:e})});Pa.displayName="TableHeadRow";const um=e=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M15 18L9 12L15 6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),cm=e=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M9 18L15 12L9 6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),dm=e=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M12 13C12.5523 13 13 12.5523 13 12C13 11.4477 12.5523 11 12 11C11.4477 11 11 11.4477 11 12C11 12.5523 11.4477 13 12 13Z",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),T.createElement("path",{d:"M19 13C19.5523 13 20 12.5523 20 12C20 11.4477 19.5523 11 19 11C18.4477 11 18 11.4477 18 12C18 12.5523 18.4477 13 19 13Z",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),T.createElement("path",{d:"M5 13C5.55228 13 6 12.5523 6 12C6 11.4477 5.55228 11 5 11C4.44772 11 4 11.4477 4 12C4 12.5523 4.44772 13 5 13Z",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),fm=(e,t)=>{const n=[];if(t<=10){for(let o=1;o<=t;o++)n.push(o);return n}const i=2,s=[];for(let o=Math.max(2,e+1-i);o<=Math.min(t-1,e+1+i);o++)s.push(o);return e+1-i>2?n.push(1,"..."):n.push(1),n.push(...s),e+1+i<t-1?n.push("...",t):t>1&&n.push(t),n},hm=({pageIndex:e,pageSize:t,totalCount:n,onPageChange:i,onPageSizeChange:s,pageSizeOptions:o=[10,20,50,100],showPageSizeSelector:r=!0,renderPageSizeSelectorItem:a=l=>l.label})=>{const l=Math.ceil(n/t),c=e>0,u=e<l-1,d=()=>{c&&i(e-1)},f=()=>{u&&i(e+1)},h=g=>{s(Number(g))},p=fm(e,l);return n===0?null:m.jsxs(V,{row:!0,justifyContent:"space-between",children:[m.jsxs(V,{row:!0,gap:"var(--spacing-sm)",children:[m.jsx(xt,{onClick:d,disabled:!c,color:"neutral",size:"sm",children:m.jsx(um,{})}),m.jsx(V,{row:!0,gap:"var(--spacing-sm)",children:p.map(g=>m.jsx(gm,{isDots:g==="...",isCurrentPage:g===e+1,disabled:g==="...",onClick:()=>i(g-1),children:g},g))}),m.jsx(xt,{color:"neutral",size:"sm",onClick:f,disabled:!u,children:m.jsx(cm,{})})]}),r&&m.jsx(V,{children:m.jsx(ca,{value:t.toString(),size:"sm",items:o.map(g=>({value:g.toString(),label:g.toString()})),returnedValue:g=>g.value,renderItem:a,onChange:g=>h(g)})})]})},gm=({children:e,isCurrentPage:t=!1,onClick:n,isDots:i=!1,disabled:s=!1})=>{const o=M.css({cursor:s?"not-allowed":"pointer",userSelect:"none",width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:t?"var(--fill-accent-secondary)":"var(--fill-bg-secondary)",borderRadius:"var(--corner-sm)",border:t?"1px solid var(--fill-accent-secondary-hover)":"1px solid var(--border-neutral-alpha-basic)"}),r=M.css({width:"24px",height:"24px",color:t?"var(--icon-secondary)":"var(--icon-tertiary)"});return m.jsx(V,{className:o,onClick:s?void 0:n,children:i?m.jsx(dm,{className:r}):m.jsx(B,{center:!0,variant:"body-2",fontWeight:"medium",children:e})})},pm=M.css({position:"relative",borderRadius:"var(--corner-md)",overflow:"hidden","&::before, &::after":{content:'""',position:"absolute",top:0,bottom:14,width:96,pointerEvents:"none",zIndex:2,transition:"opacity 0.2s ease"},"&::before":{left:0,background:"linear-gradient(to left, rgba(255, 255, 255, 0.00) 0%, #FFF 100%)"},"&::after":{right:0,background:"linear-gradient(to right, rgba(255, 255, 255, 0.00) 0%, #FFF 100%)"}}),mm=M.css({overflowX:"auto",scrollbarWidth:"thin",scrollbarColor:"var(--neutral-86) var(--neutral-96)"}),Ma=v.memo(({data:e,children:t,className:n,showBorders:i=!1,...s})=>{const[o,r]=v.useState(!1),[a,l]=v.useState(!1),c=v.useRef(null),u=v.useCallback(()=>{const f=c.current;if(!f)return;const{scrollLeft:h,scrollWidth:p,clientWidth:g}=f,x=p>g;r(x&&h>0),l(x&&h<p-g-1)},[]);v.useEffect(()=>{const f=c.current;if(!f)return;u();const h=new ResizeObserver(u);return h.observe(f),f.addEventListener("scroll",u),()=>{h.disconnect(),f.removeEventListener("scroll",u)}},[u,e]);const d=M.css({border:i?"1px solid var(--border-neutral-alpha-low)":"transparent","&::before":{opacity:o?1:0},"&::after":{opacity:a?1:0}});return m.jsx(V,{className:M.cx(pm,d,n),...s,children:m.jsx(V,{ref:c,className:mm,children:t})})});Ma.displayName="TableWrapper";const Ta=v.forwardRef(({data:e,columns:t,showBorders:n=!0,enableSorting:i=!1,enablePagination:s=!1,enableRowSelection:o=!1,enableMultiRowSelection:r=!1,sorting:a,onSortingChange:l,columnFilters:c,onColumnFiltersChange:u,columnVisibility:d,onColumnVisibilityChange:f,pagination:h,onPaginationChange:p,rowSelection:g,onRowSelectionChange:x,totalCount:w,loading:C=!1,emptyLabels:y={title:"Nothing found",description:"No results found for “result”",action:"Reset"},loadingLabels:S={title:"Loading...",description:"Please wait or reset your promt",action:"Reset"},className:_,containerClassName:b,tableOptions:E={},onRowClick:R,getRowId:I,headCellComponent:A=lm,bodyCellComponent:z=am,headRowComponent:J=Pa,bodyRowComponent:N=Ra,onReset:ee,renderPageSizeSelectorItem:te},se)=>{const $=v.useMemo(()=>lp(),[]),[K,ne]=v.useState([]),[j,H]=v.useState([]),[P,L]=v.useState({}),[oe,W]=v.useState({pageIndex:0,pageSize:10}),[U,ye]=v.useState({}),je=a??K,$e=c??j,lt=d??P,_e=h??oe,Yi=g??U,Va=O=>{const G=typeof O=="function"?O(je):O;l?l(G):ne(G)},Aa=O=>{const G=typeof O=="function"?O($e):O;u?u(G):H(G)},Da=O=>{const G=typeof O=="function"?O(lt):O;f?f(G):L(G)},rn=O=>{const G=typeof O=="function"?O(_e):O;p?p(G):W(G)},Fa=O=>{const G=typeof O=="function"?O(Yi):O;x?x(G):ye(G)},ka=v.useMemo(()=>t.map(({key:O,accessor:G,...Ue})=>O==="accessor"?$.accessor($a=>$a[G],{id:G.toString(),...Ue}):$[O]({id:G.toString(),...Ue})),[t,$]),an=nm({data:e,columns:ka,state:{sorting:je,columnFilters:$e,columnVisibility:lt,pagination:_e,rowSelection:Yi},onSortingChange:Va,onColumnFiltersChange:Aa,onColumnVisibilityChange:Da,onPaginationChange:rn,onRowSelectionChange:Fa,getCoreRowModel:Xp(),getSortedRowModel:i?Jp():void 0,getPaginationRowModel:s?Zp():void 0,enableRowSelection:o,enableMultiRowSelection:r,getRowId:I,manualPagination:!!w,pageCount:w?Math.ceil(w/_e.pageSize):void 0,...E});v.useImperativeHandle(se,()=>an);const{rows:Zi}=an.getRowModel(),Ia=(O,G)=>{R&&R(O.original,G)},La=M.css({width:"100%",maxWidth:"100%",minWidth:"max-content",borderCollapse:"collapse",borderSpacing:0,backgroundColor:"var(--fill-bg-primary)"}),ja=M.css({backgroundColor:"var(--fill-bg-secondary)",color:"var(--text-tertiary)"});return C?m.jsxs(V,{w:"full",borderRadius:"var(--corner-md)",py:"var(--spacing-5xl)",px:"var(--spacing-10xl)",alignItems:"center",className:M.cx(b),children:[m.jsx(im,{width:32,height:32,style:{color:"var(--icon-tertiary)",marginBottom:"var(--spacing-sm)"}}),m.jsx(B,{mb:"var(--spacing-xs)",variant:"title-3",fontWeight:"semibold",children:S.title}),m.jsx(B,{mb:"var(--spacing-md)",colorName:"tertiary",variant:"body-1",fontWeight:"medium",children:S.description}),m.jsx(Xt,{onClick:ee,whileTap:{scale:.95},fontWeight:"medium",cursor:"pointer",colorName:"accent",children:S.action})]}):Zi.length?m.jsxs(V,{w:"full",gap:"var(--spacing-xl)",className:M.cx(b),children:[m.jsx(Ma,{data:e,showBorders:n,children:m.jsxs("table",{className:M.cx(La,rm.table,_),children:[m.jsx("thead",{className:ja,children:an.getHeaderGroups().map(O=>m.jsx(J,{showBorders:n,children:O.headers.map(G=>m.jsx(A,{style:{width:G.getSize()},onClick:G.column.getToggleSortingHandler(),children:G.isPlaceholder?null:Po(G.column.columnDef.header,G.getContext())},G.id))},O.id))}),m.jsx("tbody",{children:Zi.map((O,G)=>m.jsx(N,{showBorders:n,isSelected:O.getIsSelected(),onClick:()=>Ia(O,G),children:O.getVisibleCells().map(Ue=>m.jsx(z,{children:Po(Ue.column.columnDef.cell,Ue.getContext())},Ue.id))},O.id))})]})}),s&&!C&&m.jsx(hm,{pageIndex:_e.pageIndex,pageSize:_e.pageSize,totalCount:w||e.length,renderPageSizeSelectorItem:te,onPageChange:O=>rn({..._e,pageIndex:O}),onPageSizeChange:O=>rn({..._e,pageSize:O,pageIndex:0})})]}):m.jsxs(V,{w:"full",borderRadius:"var(--corner-md)",py:"var(--spacing-5xl)",px:"var(--spacing-10xl)",alignItems:"center",className:M.cx(b),children:[m.jsx(sm,{width:24,height:24,style:{color:"var(--icon-tertiary)",marginBottom:"var(--spacing-sm)"}}),m.jsx(B,{mb:"var(--spacing-xs)",variant:"title-3",fontWeight:"semibold",children:y.title}),m.jsx(B,{mb:"var(--spacing-md)",colorName:"tertiary",variant:"body-1",fontWeight:"medium",children:y.description}),m.jsx(Xt,{onClick:ee,whileTap:{scale:.95},fontWeight:"medium",cursor:"pointer",colorName:"accent",children:y.action})]})});Ta.displayName="Table";const vm=v.forwardRef(({children:e,row:t=!0,justifyContent:n="flex-start",alignItems:i="center",py:s="var(--spacing-sm)",px:o="var(--spacing-md)",minHeight:r="56px",...a},l)=>m.jsx(V,{row:t,justifyContent:n,alignItems:i,py:s,px:o,minHeight:r,ref:l,...a,children:e})),qi=v.forwardRef(({children:e,row:t=!0,justifyContent:n="flex-start",alignItems:i="center",py:s="var(--spacing-sm)",px:o="var(--spacing-md)",minHeight:r="56px",...a},l)=>m.jsx(V,{row:t,justifyContent:n,alignItems:i,py:s,px:o,minHeight:r,ref:l,...a,children:e}));qi.displayName="TableHeadCellContent";const ym=e=>T.createElement("svg",{width:10,height:6,viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M8.75 4.75L4.75 0.75L0.75 4.75",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),wm=e=>T.createElement("svg",{width:10,height:6,viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M8.75 0.75L4.75 4.75L0.75 0.75",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),xm=({sortDirection:e,gap:t="5px",...n})=>m.jsxs(V,{gap:t,...n,children:[m.jsx(ym,{style:{color:e==="asc"?"var(--icon-accent)":"var(--icon-tertiary)"}}),m.jsx(wm,{style:{color:e==="desc"?"var(--icon-accent)":"var(--icon-tertiary)"}})]}),Ea=({children:e,tableProps:t,gap:n="10px",...i})=>{const s=t.column.getIsSorted();return m.jsxs(qi,{style:{cursor:"pointer",userSelect:"none"},gap:n,...i,children:[e,m.jsx(xm,{sortDirection:s})]})};Ea.displayName="TableHeadCellContentSortable";const on=Ta;on.HeadCellContent=qi;on.HeadCellContentSortable=Ea;on.BodyCellContent=vm;const Cm=e=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M9 17L14 12L9 7",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Sm="_link_aolvt_8",_m="_separator_aolvt_19",bm="_nav_aolvt_23",Ht={link:Sm,separator:_m,nav:bm,"nav-item":"_nav-item_aolvt_29"},Xi=({children:e,separator:t=m.jsx(Cm,{className:Ht.separator})})=>{const n=v.Children.toArray(e).filter(i=>v.isValidElement(i));return m.jsx("nav",{"aria-label":"breadcrumb",className:Ht.nav,children:n.map((i,s)=>{const o=s===n.length-1;return m.jsxs(B,{tag:"span",className:Ht["nav-item"],children:[v.cloneElement(i,{active:i.props.active??o}),!o&&t]},s)})})},Rm=({children:e,href:t,active:n,className:i,activeClassName:s,activeElement:o,onClick:r})=>n?o||m.jsx(B,{tag:"span",variant:"body-2",fontWeight:"medium",colorName:"primary",className:M.cx(i,s),onClick:r,children:e}):m.jsx("a",{href:t,className:M.cx(Ht.link,i),onClick:r,children:e});Xi.Item=Rm;Xi.displayName="Breadcrumbs";const Pm=Xi,Mm="_themeProviderScoped_1qquh_9",Tm={themeProviderScoped:Mm};function Em({className:e,children:t,theme:n}){return m.jsx("div",{className:Be(Tm.themeProviderScoped,e),id:"theme-provider-scoped","data-theme":n,children:t})}exports.AnimatedText=Xt;exports.Avatar=Uh;exports.Box=V;exports.Breadcrumbs=Pm;exports.Button=gh;exports.Checkbox=Ni;exports.Hint=fg;exports.IconButton=xt;exports.Input=ua;exports.Modal=nn;exports.Popover=vg;exports.Portal=Hi;exports.Ripple=it;exports.SegmentControl=Gg;exports.Select=ca;exports.Switch=da;exports.Table=on;exports.Tag=Gi;exports.Text=B;exports.ThemeProviderScoped=Em;exports.getSizeClass=wt;exports.getStyleClass=Zt;exports.useControlled=Yt;exports.useDropdownPosition=Eo;
57
+ `),T.createElement("g",{className:"spinner"},T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.0003 6.83317C13.5692 6.83317 11.2376 7.79894 9.51851 9.51803C7.79943 11.2371 6.83366 13.5687 6.83366 15.9998C6.83366 18.431 7.79943 20.7626 9.51851 22.4817C11.2376 24.2007 13.5692 25.1665 16.0003 25.1665C18.4315 25.1665 20.7631 24.2007 22.4821 22.4817C24.2012 20.7626 25.167 18.431 25.167 15.9998C25.167 13.5687 24.2012 11.2371 22.4821 9.51803C20.7631 7.79894 18.4315 6.83317 16.0003 6.83317ZM3.16699 15.9998C3.16699 8.91217 8.91266 3.1665 16.0003 3.1665C23.088 3.1665 28.8337 8.91217 28.8337 15.9998C28.8337 23.0875 23.088 28.8332 16.0003 28.8332C8.91266 28.8332 3.16699 23.0875 3.16699 15.9998Z",fill:"currentColor",fillOpacity:.12}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.9997 6.83319C13.6363 6.82787 11.3633 7.74068 9.65999 9.37907C9.30711 9.70535 8.84021 9.88001 8.35982 9.86545C7.87943 9.85089 7.42396 9.64827 7.09149 9.30122C6.75902 8.95416 6.57612 8.49043 6.58218 8.00985C6.58823 7.52928 6.78276 7.07031 7.12388 6.73174C9.50956 4.43941 12.6912 3.16143 15.9997 3.16652C16.4859 3.16652 16.9522 3.35967 17.296 3.70349C17.6398 4.04731 17.833 4.51362 17.833 4.99985C17.833 5.48608 17.6398 5.9524 17.296 6.29621C16.9522 6.64003 16.4859 6.83319 15.9997 6.83319Z",fill:"currentColor"}))),nm=e=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{clipPath:"url(#clip0_2074_3858)"},T.createElement("path",{d:"M21 21L16.65 16.65M19 11C19 15.4183 15.4183 19 11 19C6.58172 19 3 15.4183 3 11C3 6.58172 6.58172 3 11 3C15.4183 3 19 6.58172 19 11Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_2074_3858"},T.createElement("rect",{width:24,height:24,fill:"white"})))),im="_table_19yhs_8",sm={table:im},om=v.forwardRef(({children:e,className:t,style:n,...i},s)=>m.jsx("td",{ref:s,className:M.cx(t),style:n,...i,children:e})),Ra=v.forwardRef(({children:e,className:t,showBorders:n=!1,isSelected:i=!1,...s},o)=>{const r=M.css({borderBottom:n?"1px solid var(--border-neutral-alpha-low)":"none"});return m.jsx("tr",{ref:o,className:M.cx(r,t),...s,children:e})});Ra.displayName="TableBodyRow";const rm=v.forwardRef(({children:e,className:t,style:n,justifyContent:i="flex-start",alignItems:s="flex-start",...o},r)=>{const a=M.css({justifyContent:i,alignItems:s,fontWeight:"inherit"});return m.jsx("th",{ref:r,className:M.cx(a,t),style:n,...o,children:e})}),Pa=v.forwardRef(({children:e,className:t,showBorders:n=!1,...i},s)=>{const o=M.css({backgroundColor:"var(--fill-bg-secondary)",borderBottom:n?"1px solid var(--border-neutral-alpha-low)":"none"});return m.jsx("tr",{ref:s,className:M.cx(o,t),...i,children:e})});Pa.displayName="TableHeadRow";const am=e=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M15 18L9 12L15 6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),lm=e=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M9 18L15 12L9 6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),um=e=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M12 13C12.5523 13 13 12.5523 13 12C13 11.4477 12.5523 11 12 11C11.4477 11 11 11.4477 11 12C11 12.5523 11.4477 13 12 13Z",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),T.createElement("path",{d:"M19 13C19.5523 13 20 12.5523 20 12C20 11.4477 19.5523 11 19 11C18.4477 11 18 11.4477 18 12C18 12.5523 18.4477 13 19 13Z",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),T.createElement("path",{d:"M5 13C5.55228 13 6 12.5523 6 12C6 11.4477 5.55228 11 5 11C4.44772 11 4 11.4477 4 12C4 12.5523 4.44772 13 5 13Z",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),cm=(e,t)=>{const n=[];if(t<=10){for(let o=1;o<=t;o++)n.push(o);return n}const i=2,s=[];for(let o=Math.max(2,e+1-i);o<=Math.min(t-1,e+1+i);o++)s.push(o);return e+1-i>2?n.push(1,"..."):n.push(1),n.push(...s),e+1+i<t-1?n.push("...",t):t>1&&n.push(t),n},dm=({pageIndex:e,pageSize:t,totalCount:n,onPageChange:i,onPageSizeChange:s,pageSizeOptions:o=[10,20,50,100],showPageSizeSelector:r=!0,renderPageSizeSelectorItem:a=l=>l.label})=>{const l=Math.ceil(n/t),u=e>0,c=e<l-1,d=()=>{u&&i(e-1)},f=()=>{c&&i(e+1)},h=g=>{s(Number(g))},p=cm(e,l);return n===0?null:m.jsxs(V,{row:!0,justifyContent:"space-between",children:[m.jsxs(V,{row:!0,gap:"var(--spacing-sm)",children:[m.jsx(wt,{onClick:d,disabled:!u,color:"neutral",size:"sm",children:m.jsx(am,{})}),m.jsx(V,{row:!0,gap:"var(--spacing-sm)",children:p.map(g=>m.jsx(fm,{isDots:g==="...",isCurrentPage:g===e+1,disabled:g==="...",onClick:()=>i(g-1),children:g},g))}),m.jsx(wt,{color:"neutral",size:"sm",onClick:f,disabled:!c,children:m.jsx(lm,{})})]}),r&&m.jsx(V,{children:m.jsx(ca,{value:t.toString(),size:"sm",items:o.map(g=>({value:g.toString(),label:g.toString()})),returnedValue:g=>g.value,renderItem:a,onChange:g=>h(g)})})]})},fm=({children:e,isCurrentPage:t=!1,onClick:n,isDots:i=!1,disabled:s=!1})=>{const o=M.css({cursor:s?"not-allowed":"pointer",userSelect:"none",width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:t?"var(--fill-accent-secondary)":"var(--fill-bg-secondary)",borderRadius:"var(--corner-sm)",border:t?"1px solid var(--fill-accent-secondary-hover)":"1px solid var(--border-neutral-alpha-basic)"}),r=M.css({width:"24px",height:"24px",color:t?"var(--icon-secondary)":"var(--icon-tertiary)"});return m.jsx(V,{className:o,onClick:s?void 0:n,children:i?m.jsx(um,{className:r}):m.jsx(B,{center:!0,variant:"body-2",fontWeight:"medium",children:e})})},hm=M.css({position:"relative",borderRadius:"var(--corner-md)",overflow:"hidden","&::before, &::after":{content:'""',position:"absolute",top:0,bottom:14,width:96,pointerEvents:"none",zIndex:2,transition:"opacity 0.2s ease"},"&::before":{left:0,background:"linear-gradient(to left, rgba(255, 255, 255, 0.00) 0%, #FFF 100%)"},"&::after":{right:0,background:"linear-gradient(to right, rgba(255, 255, 255, 0.00) 0%, #FFF 100%)"}}),gm=M.css({overflowX:"auto",scrollbarWidth:"thin",scrollbarColor:"var(--neutral-86) var(--neutral-96)"}),Ma=v.memo(({data:e,children:t,className:n,showBorders:i=!1,...s})=>{const[o,r]=v.useState(!1),[a,l]=v.useState(!1),u=v.useRef(null),c=v.useCallback(()=>{const f=u.current;if(!f)return;const{scrollLeft:h,scrollWidth:p,clientWidth:g}=f,x=p>g;r(x&&h>0),l(x&&h<p-g-1)},[]);v.useEffect(()=>{const f=u.current;if(!f)return;c();const h=new ResizeObserver(c);return h.observe(f),f.addEventListener("scroll",c),()=>{h.disconnect(),f.removeEventListener("scroll",c)}},[c,e]);const d=M.css({border:i?"1px solid var(--border-neutral-alpha-low)":"transparent","&::before":{opacity:o?1:0},"&::after":{opacity:a?1:0}});return m.jsx(V,{className:M.cx(hm,d,n),...s,children:m.jsx(V,{ref:u,className:gm,children:t})})});Ma.displayName="TableWrapper";const Ta=v.forwardRef(({data:e,columns:t,showBorders:n=!0,enableSorting:i=!1,enablePagination:s=!1,enableRowSelection:o=!1,enableMultiRowSelection:r=!1,sorting:a,onSortingChange:l,columnFilters:u,onColumnFiltersChange:c,columnVisibility:d,onColumnVisibilityChange:f,pagination:h,onPaginationChange:p,rowSelection:g,onRowSelectionChange:x,totalCount:w,loading:C=!1,emptyLabels:y={title:"Nothing found",description:"No results found for “result”",action:"Reset"},loadingLabels:S={title:"Loading...",description:"Please wait or reset your promt",action:"Reset"},className:_,containerClassName:b,tableOptions:E={},onRowClick:R,getRowId:I,headCellComponent:A=rm,bodyCellComponent:z=om,headRowComponent:J=Pa,bodyRowComponent:N=Ra,onReset:ee,renderPageSizeSelectorItem:te},se)=>{const $=v.useMemo(()=>rp(),[]),[K,ne]=v.useState([]),[j,H]=v.useState([]),[P,L]=v.useState({}),[oe,W]=v.useState({pageIndex:0,pageSize:10}),[U,ye]=v.useState({}),je=a??K,$e=u??j,Oe=d??P,_e=h??oe,Yi=g??U,Va=O=>{const G=typeof O=="function"?O(je):O;l?l(G):ne(G)},Aa=O=>{const G=typeof O=="function"?O($e):O;c?c(G):H(G)},Da=O=>{const G=typeof O=="function"?O(Oe):O;f?f(G):L(G)},rn=O=>{const G=typeof O=="function"?O(_e):O;p?p(G):W(G)},Fa=O=>{const G=typeof O=="function"?O(Yi):O;x?x(G):ye(G)},ka=v.useMemo(()=>t.map(({key:O,accessor:G,...Ke})=>O==="accessor"?$.accessor($a=>$a[G],{id:G.toString(),...Ke}):$[O]({id:G.toString(),...Ke})),[t,$]),an=em({data:e,columns:ka,state:{sorting:je,columnFilters:$e,columnVisibility:Oe,pagination:_e,rowSelection:Yi},onSortingChange:Va,onColumnFiltersChange:Aa,onColumnVisibilityChange:Da,onPaginationChange:rn,onRowSelectionChange:Fa,getCoreRowModel:Kp(),getSortedRowModel:i?Yp():void 0,getPaginationRowModel:s?Xp():void 0,enableRowSelection:o,enableMultiRowSelection:r,getRowId:I,manualPagination:!!w,pageCount:w?Math.ceil(w/_e.pageSize):void 0,...E});v.useImperativeHandle(se,()=>an);const{rows:Zi}=an.getRowModel(),Ia=(O,G)=>{R&&R(O.original,G)},La=M.css({width:"100%",maxWidth:"100%",minWidth:"max-content",borderCollapse:"collapse",borderSpacing:0,backgroundColor:"var(--fill-bg-primary)"}),ja=M.css({backgroundColor:"var(--fill-bg-secondary)",color:"var(--text-tertiary)"});return C?m.jsxs(V,{w:"full",borderRadius:"var(--corner-md)",py:"var(--spacing-5xl)",px:"var(--spacing-10xl)",alignItems:"center",className:M.cx(b),children:[m.jsx(tm,{width:32,height:32,style:{color:"var(--icon-tertiary)",marginBottom:"var(--spacing-sm)"}}),m.jsx(B,{mb:"var(--spacing-xs)",variant:"title-3",fontWeight:"semibold",children:S.title}),m.jsx(B,{mb:"var(--spacing-md)",colorName:"tertiary",variant:"body-1",fontWeight:"medium",children:S.description}),m.jsx(qt,{onClick:ee,whileTap:{scale:.95},fontWeight:"medium",cursor:"pointer",colorName:"accent",children:S.action})]}):Zi.length?m.jsxs(V,{w:"full",gap:"var(--spacing-xl)",className:M.cx(b),children:[m.jsx(Ma,{data:e,showBorders:n,children:m.jsxs("table",{className:M.cx(La,sm.table,_),children:[m.jsx("thead",{className:ja,children:an.getHeaderGroups().map(O=>m.jsx(J,{showBorders:n,children:O.headers.map(G=>m.jsx(A,{style:{width:G.getSize()},onClick:G.column.getToggleSortingHandler(),children:G.isPlaceholder?null:Po(G.column.columnDef.header,G.getContext())},G.id))},O.id))}),m.jsx("tbody",{children:Zi.map((O,G)=>m.jsx(N,{showBorders:n,isSelected:O.getIsSelected(),onClick:()=>Ia(O,G),children:O.getVisibleCells().map(Ke=>m.jsx(z,{children:Po(Ke.column.columnDef.cell,Ke.getContext())},Ke.id))},O.id))})]})}),s&&!C&&m.jsx(dm,{pageIndex:_e.pageIndex,pageSize:_e.pageSize,totalCount:w||e.length,renderPageSizeSelectorItem:te,onPageChange:O=>rn({..._e,pageIndex:O}),onPageSizeChange:O=>rn({..._e,pageSize:O,pageIndex:0})})]}):m.jsxs(V,{w:"full",borderRadius:"var(--corner-md)",py:"var(--spacing-5xl)",px:"var(--spacing-10xl)",alignItems:"center",className:M.cx(b),children:[m.jsx(nm,{width:24,height:24,style:{color:"var(--icon-tertiary)",marginBottom:"var(--spacing-sm)"}}),m.jsx(B,{mb:"var(--spacing-xs)",variant:"title-3",fontWeight:"semibold",children:y.title}),m.jsx(B,{mb:"var(--spacing-md)",colorName:"tertiary",variant:"body-1",fontWeight:"medium",children:y.description}),m.jsx(qt,{onClick:ee,whileTap:{scale:.95},fontWeight:"medium",cursor:"pointer",colorName:"accent",children:y.action})]})});Ta.displayName="Table";const pm=v.forwardRef(({children:e,row:t=!0,justifyContent:n="flex-start",alignItems:i="center",py:s="var(--spacing-sm)",px:o="var(--spacing-md)",minHeight:r="56px",...a},l)=>m.jsx(V,{row:t,justifyContent:n,alignItems:i,py:s,px:o,minHeight:r,ref:l,...a,children:e})),qi=v.forwardRef(({children:e,row:t=!0,justifyContent:n="flex-start",alignItems:i="center",py:s="var(--spacing-sm)",px:o="var(--spacing-md)",minHeight:r="56px",...a},l)=>m.jsx(V,{row:t,justifyContent:n,alignItems:i,py:s,px:o,minHeight:r,ref:l,...a,children:e}));qi.displayName="TableHeadCellContent";const mm=e=>T.createElement("svg",{width:10,height:6,viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M8.75 4.75L4.75 0.75L0.75 4.75",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),vm=e=>T.createElement("svg",{width:10,height:6,viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M8.75 0.75L4.75 4.75L0.75 0.75",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),ym=({sortDirection:e,gap:t="5px",...n})=>m.jsxs(V,{gap:t,...n,children:[m.jsx(mm,{style:{color:e==="asc"?"var(--icon-accent)":"var(--icon-tertiary)"}}),m.jsx(vm,{style:{color:e==="desc"?"var(--icon-accent)":"var(--icon-tertiary)"}})]}),Ea=({children:e,tableProps:t,gap:n="10px",...i})=>{const s=t.column.getIsSorted();return m.jsxs(qi,{style:{cursor:"pointer",userSelect:"none"},gap:n,...i,children:[e,m.jsx(ym,{sortDirection:s})]})};Ea.displayName="TableHeadCellContentSortable";const on=Ta;on.HeadCellContent=qi;on.HeadCellContentSortable=Ea;on.BodyCellContent=pm;const wm=e=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M9 17L14 12L9 7",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),xm="_link_aolvt_8",Cm="_separator_aolvt_19",Sm="_nav_aolvt_23",Nt={link:xm,separator:Cm,nav:Sm,"nav-item":"_nav-item_aolvt_29"},Xi=({children:e,separator:t=m.jsx(wm,{className:Nt.separator})})=>{const n=v.Children.toArray(e).filter(i=>v.isValidElement(i));return m.jsx("nav",{"aria-label":"breadcrumb",className:Nt.nav,children:n.map((i,s)=>{const o=s===n.length-1;return m.jsxs(B,{tag:"span",className:Nt["nav-item"],children:[v.cloneElement(i,{active:i.props.active??o}),!o&&t]},s)})})},_m=({children:e,href:t,active:n,className:i,activeClassName:s,activeElement:o,onClick:r})=>n?o||m.jsx(B,{tag:"span",variant:"body-2",fontWeight:"medium",colorName:"primary",className:M.cx(i,s),onClick:r,children:e}):m.jsx("a",{href:t,className:M.cx(Nt.link,i),onClick:r,children:e});Xi.Item=_m;Xi.displayName="Breadcrumbs";const bm=Xi,Rm="_themeProviderScoped_1qquh_9",Pm={themeProviderScoped:Rm};function Mm({className:e,children:t,theme:n}){return m.jsx("div",{className:Ne(Pm.themeProviderScoped,e),id:"theme-provider-scoped","data-theme":n,children:t})}exports.AnimatedText=qt;exports.Avatar=hl;exports.Box=V;exports.Breadcrumbs=bm;exports.Button=qh;exports.Checkbox=Gi;exports.Hint=Fl;exports.IconButton=wt;exports.Input=ua;exports.Modal=nn;exports.Popover=$l;exports.Portal=Zt;exports.Ripple=st;exports.SegmentControl=Ng;exports.Select=ca;exports.Switch=da;exports.Table=on;exports.Tag=li;exports.Text=B;exports.ThemeProviderScoped=Mm;exports.getSizeClass=yt;exports.getStyleClass=Yt;exports.useControlled=Xt;exports.useDropdownPosition=Eo;
58
58
  //# sourceMappingURL=ui-kit.cjs.js.map