@matthiaskrijgsman/mat-ui 0.0.28 → 0.0.29

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,4 +1,4 @@
1
- (function(B,S){typeof exports=="object"&&typeof module<"u"?S(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],S):(B=typeof globalThis<"u"?globalThis:B||self,S(B.MatUI={},B.React,B.ReactDOM))})(this,(function(B,S,Tu){"use strict";"use client";function Co(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 C=Co(S),Po=Co(Tu);function Ao(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var yn={exports:{}},Wt={};/**
1
+ (function(Y,S){typeof exports=="object"&&typeof module<"u"?S(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],S):(Y=typeof globalThis<"u"?globalThis:Y||self,S(Y.MatUI={},Y.React,Y.ReactDOM))})(this,(function(Y,S,gd){"use strict";"use client";function ss(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 j=ss(S),as=ss(gd);function ls(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Hn={exports:{}},un={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Do;function Su(){if(Do)return Wt;Do=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(i,r,o){var s=null;if(o!==void 0&&(s=""+o),r.key!==void 0&&(s=""+r.key),"key"in r){o={};for(var a in r)a!=="key"&&(o[a]=r[a])}else o=r;return r=o.ref,{$$typeof:e,type:i,key:s,ref:r!==void 0?r:null,props:o}}return Wt.Fragment=t,Wt.jsx=n,Wt.jsxs=n,Wt}var Ut={};/**
9
+ */var cs;function vd(){if(cs)return un;cs=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(i,r,s){var o=null;if(s!==void 0&&(o=""+s),r.key!==void 0&&(o=""+r.key),"key"in r){s={};for(var a in r)a!=="key"&&(s[a]=r[a])}else s=r;return r=s.ref,{$$typeof:e,type:i,key:o,ref:r!==void 0?r:null,props:s}}return un.Fragment=t,un.jsx=n,un.jsxs=n,un}var dn={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,12 +14,12 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var Ro;function ku(){return Ro||(Ro=1,process.env.NODE_ENV!=="production"&&(function(){function e(x){if(x==null)return null;if(typeof x=="function")return x.$$typeof===W?null:x.displayName||x.name||null;if(typeof x=="string")return x;switch(x){case v:return"Fragment";case h:return"Profiler";case b:return"StrictMode";case y:return"Suspense";case P:return"SuspenseList";case M:return"Activity"}if(typeof x=="object")switch(typeof x.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),x.$$typeof){case g:return"Portal";case w:return(x.displayName||"Context")+".Provider";case T:return(x._context.displayName||"Context")+".Consumer";case k:var j=x.render;return x=x.displayName,x||(x=j.displayName||j.name||"",x=x!==""?"ForwardRef("+x+")":"ForwardRef"),x;case E:return j=x.displayName||null,j!==null?j:e(x.type)||"Memo";case A:j=x._payload,x=x._init;try{return e(x(j))}catch{}}return null}function t(x){return""+x}function n(x){try{t(x);var j=!1}catch{j=!0}if(j){j=console;var I=j.error,V=typeof Symbol=="function"&&Symbol.toStringTag&&x[Symbol.toStringTag]||x.constructor.name||"Object";return I.call(j,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",V),t(x)}}function i(x){if(x===v)return"<>";if(typeof x=="object"&&x!==null&&x.$$typeof===A)return"<...>";try{var j=e(x);return j?"<"+j+">":"<...>"}catch{return"<...>"}}function r(){var x=O.A;return x===null?null:x.getOwner()}function o(){return Error("react-stack-top-frame")}function s(x){if(J.call(x,"key")){var j=Object.getOwnPropertyDescriptor(x,"key").get;if(j&&j.isReactWarning)return!1}return x.key!==void 0}function a(x,j){function I(){ee||(ee=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",j))}I.isReactWarning=!0,Object.defineProperty(x,"key",{get:I,configurable:!0})}function l(){var x=e(this.type);return ie[x]||(ie[x]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),x=this.props.ref,x!==void 0?x:null}function u(x,j,I,V,_,z,H,$){return I=z.ref,x={$$typeof:m,type:x,key:j,props:z,_owner:_},(I!==void 0?I:null)!==null?Object.defineProperty(x,"ref",{enumerable:!1,get:l}):Object.defineProperty(x,"ref",{enumerable:!1,value:null}),x._store={},Object.defineProperty(x._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(x,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(x,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:H}),Object.defineProperty(x,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:$}),Object.freeze&&(Object.freeze(x.props),Object.freeze(x)),x}function c(x,j,I,V,_,z,H,$){var L=j.children;if(L!==void 0)if(V)if(Y(L)){for(V=0;V<L.length;V++)d(L[V]);Object.freeze&&Object.freeze(L)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else d(L);if(J.call(j,"key")){L=e(x);var G=Object.keys(j).filter(function(de){return de!=="key"});V=0<G.length?"{key: someKey, "+G.join(": ..., ")+": ...}":"{key: someKey}",Z[L+V]||(G=0<G.length?"{"+G.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
17
+ */var us;function xd(){return us||(us=1,process.env.NODE_ENV!=="production"&&(function(){function e(x){if(x==null)return null;if(typeof x=="function")return x.$$typeof===_?null:x.displayName||x.name||null;if(typeof x=="string")return x;switch(x){case g:return"Fragment";case v:return"Profiler";case y:return"StrictMode";case b:return"Suspense";case C:return"SuspenseList";case I:return"Activity"}if(typeof x=="object")switch(typeof x.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),x.$$typeof){case h:return"Portal";case w:return(x.displayName||"Context")+".Provider";case T:return(x._context.displayName||"Context")+".Consumer";case k:var P=x.render;return x=x.displayName,x||(x=P.displayName||P.name||"",x=x!==""?"ForwardRef("+x+")":"ForwardRef"),x;case R:return P=x.displayName||null,P!==null?P:e(x.type)||"Memo";case E:P=x._payload,x=x._init;try{return e(x(P))}catch{}}return null}function t(x){return""+x}function n(x){try{t(x);var P=!1}catch{P=!0}if(P){P=console;var D=P.error,M=typeof Symbol=="function"&&Symbol.toStringTag&&x[Symbol.toStringTag]||x.constructor.name||"Object";return D.call(P,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",M),t(x)}}function i(x){if(x===g)return"<>";if(typeof x=="object"&&x!==null&&x.$$typeof===E)return"<...>";try{var P=e(x);return P?"<"+P+">":"<...>"}catch{return"<...>"}}function r(){var x=N.A;return x===null?null:x.getOwner()}function s(){return Error("react-stack-top-frame")}function o(x){if(Z.call(x,"key")){var P=Object.getOwnPropertyDescriptor(x,"key").get;if(P&&P.isReactWarning)return!1}return x.key!==void 0}function a(x,P){function D(){J||(J=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",P))}D.isReactWarning=!0,Object.defineProperty(x,"key",{get:D,configurable:!0})}function l(){var x=e(this.type);return U[x]||(U[x]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),x=this.props.ref,x!==void 0?x:null}function u(x,P,D,M,z,K,X,A){return D=K.ref,x={$$typeof:m,type:x,key:P,props:K,_owner:z},(D!==void 0?D:null)!==null?Object.defineProperty(x,"ref",{enumerable:!1,get:l}):Object.defineProperty(x,"ref",{enumerable:!1,value:null}),x._store={},Object.defineProperty(x._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(x,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(x,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:X}),Object.defineProperty(x,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:A}),Object.freeze&&(Object.freeze(x.props),Object.freeze(x)),x}function c(x,P,D,M,z,K,X,A){var F=P.children;if(F!==void 0)if(M)if(H(F)){for(M=0;M<F.length;M++)d(F[M]);Object.freeze&&Object.freeze(F)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else d(F);if(Z.call(P,"key")){F=e(x);var Q=Object.keys(P).filter(function(he){return he!=="key"});M=0<Q.length?"{key: someKey, "+Q.join(": ..., ")+": ...}":"{key: someKey}",G[F+M]||(Q=0<Q.length?"{"+Q.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
18
18
  let props = %s;
19
19
  <%s {...props} />
20
20
  React keys must be passed directly to JSX without using spread:
21
21
  let props = %s;
22
- <%s key={someKey} {...props} />`,V,L,G,L),Z[L+V]=!0)}if(L=null,I!==void 0&&(n(I),L=""+I),s(j)&&(n(j.key),L=""+j.key),"key"in j){I={};for(var Q in j)Q!=="key"&&(I[Q]=j[Q])}else I=j;return L&&a(I,typeof x=="function"?x.displayName||x.name||"Unknown":x),u(x,L,z,_,r(),I,H,$)}function d(x){typeof x=="object"&&x!==null&&x.$$typeof===m&&x._store&&(x._store.validated=1)}var f=S,m=Symbol.for("react.transitional.element"),g=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),T=Symbol.for("react.consumer"),w=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),M=Symbol.for("react.activity"),W=Symbol.for("react.client.reference"),O=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J=Object.prototype.hasOwnProperty,Y=Array.isArray,F=console.createTask?console.createTask:function(){return null};f={react_stack_bottom_frame:function(x){return x()}};var ee,ie={},X=f.react_stack_bottom_frame.bind(f,o)(),q=F(i(o)),Z={};Ut.Fragment=v,Ut.jsx=function(x,j,I,V,_){var z=1e4>O.recentlyCreatedOwnerStacks++;return c(x,j,I,!1,V,_,z?Error("react-stack-top-frame"):X,z?F(i(x)):q)},Ut.jsxs=function(x,j,I,V,_){var z=1e4>O.recentlyCreatedOwnerStacks++;return c(x,j,I,!0,V,_,z?Error("react-stack-top-frame"):X,z?F(i(x)):q)}})()),Ut}var Oo;function ju(){return Oo||(Oo=1,process.env.NODE_ENV==="production"?yn.exports=Su():yn.exports=ku()),yn.exports}var p=ju();const N=(...e)=>e.filter(Boolean).join(" "),ai=S.createContext({});function li(e){const t=S.useRef(null);return t.current===null&&(t.current=e()),t.current}const ci=typeof window<"u",Mo=ci?S.useLayoutEffect:S.useEffect,bn=S.createContext(null);function ui(e,t){e.indexOf(t)===-1&&e.push(t)}function wn(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const We=(e,t,n)=>n>t?t:n<e?e:n;function di(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let bt=()=>{},Ee=()=>{};process.env.NODE_ENV!=="production"&&(bt=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(di(t,n))},Ee=(e,t,n)=>{if(!e)throw new Error(di(t,n))});const Ue={},Io=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function No(e){return typeof e=="object"&&e!==null}const Fo=e=>/^0[^.\s]+$/u.test(e);function pi(e){let t;return()=>(t===void 0&&(t=e()),t)}const Ce=e=>e,Eu=(e,t)=>n=>t(e(n)),qt=(...e)=>e.reduce(Eu),wt=(e,t,n)=>{const i=t-e;return i===0?1:(n-e)/i};class fi{constructor(){this.subscriptions=[]}add(t){return ui(this.subscriptions,t),()=>wn(this.subscriptions,t)}notify(t,n,i){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](t,n,i);else for(let o=0;o<r;o++){const s=this.subscriptions[o];s&&s(t,n,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Pe=e=>e*1e3,Ie=e=>e/1e3;function Vo(e,t){return t?e*(1e3/t):0}const _o=new Set;function mi(e,t,n){e||_o.has(t)||(console.warn(di(t,n)),_o.add(t))}const Cu=(e,t,n)=>{const i=t-e;return((n-e)%i+i)%i+e},Lo=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Pu=1e-7,Au=12;function Du(e,t,n,i,r){let o,s,a=0;do s=t+(n-t)/2,o=Lo(s,i,r)-e,o>0?n=s:t=s;while(Math.abs(o)>Pu&&++a<Au);return s}function Ht(e,t,n,i){if(e===t&&n===i)return Ce;const r=o=>Du(o,0,1,e,n);return o=>o===0||o===1?o:Lo(r(o),t,i)}const zo=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Bo=e=>t=>1-e(1-t),$o=Ht(.33,1.53,.69,.99),hi=Bo($o),Wo=zo(hi),Uo=e=>(e*=2)<1?.5*hi(e):.5*(2-Math.pow(2,-10*(e-1))),gi=e=>1-Math.sin(Math.acos(e)),qo=Bo(gi),Ho=zo(gi),Ru=Ht(.42,0,1,1),Ou=Ht(0,0,.58,1),Ko=Ht(.42,0,.58,1),Yo=e=>Array.isArray(e)&&typeof e[0]!="number";function Go(e,t){return Yo(e)?e[Cu(0,e.length,t)]:e}const Xo=e=>Array.isArray(e)&&typeof e[0]=="number",Zo={linear:Ce,easeIn:Ru,easeInOut:Ko,easeOut:Ou,circIn:gi,circInOut:Ho,circOut:qo,backIn:hi,backInOut:Wo,backOut:$o,anticipate:Uo},Mu=e=>typeof e=="string",Jo=e=>{if(Xo(e)){Ee(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,i,r]=e;return Ht(t,n,i,r)}else if(Mu(e))return Ee(Zo[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Zo[e];return e},Tn=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Iu(e,t){let n=new Set,i=new Set,r=!1,o=!1;const s=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){s.has(c)&&(u.schedule(c),e()),c(a)}const u={schedule:(c,d=!1,f=!1)=>{const g=f&&r?n:i;return d&&s.add(c),g.has(c)||g.add(c),c},cancel:c=>{i.delete(c),s.delete(c)},process:c=>{if(a=c,r){o=!0;return}r=!0,[n,i]=[i,n],n.forEach(l),n.clear(),r=!1,o&&(o=!1,u.process(c))}};return u}const Nu=40;function Qo(e,t){let n=!1,i=!0;const r={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=Tn.reduce((w,k)=>(w[k]=Iu(o),w),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:f,render:m,postRender:g}=s,v=()=>{const w=Ue.useManualTiming?r.timestamp:performance.now();n=!1,Ue.useManualTiming||(r.delta=i?1e3/60:Math.max(Math.min(w-r.timestamp,Nu),1)),r.timestamp=w,r.isProcessing=!0,a.process(r),l.process(r),u.process(r),c.process(r),d.process(r),f.process(r),m.process(r),g.process(r),r.isProcessing=!1,n&&t&&(i=!1,e(v))},b=()=>{n=!0,i=!0,r.isProcessing||e(v)};return{schedule:Tn.reduce((w,k)=>{const y=s[k];return w[k]=(P,E=!1,A=!1)=>(n||b(),y.schedule(P,E,A)),w},{}),cancel:w=>{for(let k=0;k<Tn.length;k++)s[Tn[k]].cancel(w)},state:r,steps:s}}const{schedule:se,cancel:Xe,state:ge,steps:vi}=Qo(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ce,!0);let Sn;function Fu(){Sn=void 0}const we={now:()=>(Sn===void 0&&we.set(ge.isProcessing||Ue.useManualTiming?ge.timestamp:performance.now()),Sn),set:e=>{Sn=e,queueMicrotask(Fu)}},es=e=>t=>typeof t=="string"&&t.startsWith(e),xi=es("--"),Vu=es("var(--"),yi=e=>Vu(e)?_u.test(e.split("/*")[0].trim()):!1,_u=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Tt={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Kt={...Tt,transform:e=>We(0,1,e)},kn={...Tt,default:1},Yt=e=>Math.round(e*1e5)/1e5,bi=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Lu(e){return e==null}const zu=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,wi=(e,t)=>n=>!!(typeof n=="string"&&zu.test(n)&&n.startsWith(e)||t&&!Lu(n)&&Object.prototype.hasOwnProperty.call(n,t)),ts=(e,t,n)=>i=>{if(typeof i!="string")return i;const[r,o,s,a]=i.match(bi);return{[e]:parseFloat(r),[t]:parseFloat(o),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},Bu=e=>We(0,255,e),Ti={...Tt,transform:e=>Math.round(Bu(e))},rt={test:wi("rgb","red"),parse:ts("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:i=1})=>"rgba("+Ti.transform(e)+", "+Ti.transform(t)+", "+Ti.transform(n)+", "+Yt(Kt.transform(i))+")"};function $u(e){let t="",n="",i="",r="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),i=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),i=e.substring(3,4),r=e.substring(4,5),t+=t,n+=n,i+=i,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:r?parseInt(r,16)/255:1}}const Si={test:wi("#"),parse:$u,transform:rt.transform},Gt=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ze=Gt("deg"),Ne=Gt("%"),K=Gt("px"),Wu=Gt("vh"),Uu=Gt("vw"),ns={...Ne,parse:e=>Ne.parse(e)/100,transform:e=>Ne.transform(e*100)},St={test:wi("hsl","hue"),parse:ts("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:i=1})=>"hsla("+Math.round(e)+", "+Ne.transform(Yt(t))+", "+Ne.transform(Yt(n))+", "+Yt(Kt.transform(i))+")"},pe={test:e=>rt.test(e)||Si.test(e)||St.test(e),parse:e=>rt.test(e)?rt.parse(e):St.test(e)?St.parse(e):Si.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?rt.transform(e):St.transform(e),getAnimatableNone:e=>{const t=pe.parse(e);return t.alpha=0,pe.transform(t)}},qu=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Hu(e){return isNaN(e)&&typeof e=="string"&&(e.match(bi)?.length||0)+(e.match(qu)?.length||0)>0}const is="number",rs="color",Ku="var",Yu="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 Xt(e){const t=e.toString(),n=[],i={color:[],number:[],var:[]},r=[];let o=0;const a=t.replace(Gu,l=>(pe.test(l)?(i.color.push(o),r.push(rs),n.push(pe.parse(l))):l.startsWith(Yu)?(i.var.push(o),r.push(Ku),n.push(l)):(i.number.push(o),r.push(is),n.push(parseFloat(l))),++o,os)).split(os);return{values:n,split:a,indexes:i,types:r}}function ss(e){return Xt(e).values}function as(e){const{split:t,types:n}=Xt(e),i=t.length;return r=>{let o="";for(let s=0;s<i;s++)if(o+=t[s],r[s]!==void 0){const a=n[s];a===is?o+=Yt(r[s]):a===rs?o+=pe.transform(r[s]):o+=r[s]}return o}}const Xu=e=>typeof e=="number"?0:pe.test(e)?pe.getAnimatableNone(e):e;function Zu(e){const t=ss(e);return as(e)(t.map(Xu))}const Je={test:Hu,parse:ss,createTransformer:as,getAnimatableNone:Zu};function ki(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 Ju({hue:e,saturation:t,lightness:n,alpha:i}){e/=360,t/=100,n/=100;let r=0,o=0,s=0;if(!t)r=o=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;r=ki(l,a,e+1/3),o=ki(l,a,e),s=ki(l,a,e-1/3)}return{red:Math.round(r*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:i}}function jn(e,t){return n=>n>0?t:e}const ae=(e,t,n)=>e+(t-e)*n,ji=(e,t,n)=>{const i=e*e,r=n*(t*t-i)+i;return r<0?0:Math.sqrt(r)},Qu=[Si,rt,St],ed=e=>Qu.find(t=>t.test(e));function ls(e){const t=ed(e);if(bt(!!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===St&&(n=Ju(n)),n}const cs=(e,t)=>{const n=ls(e),i=ls(t);if(!n||!i)return jn(e,t);const r={...n};return o=>(r.red=ji(n.red,i.red,o),r.green=ji(n.green,i.green,o),r.blue=ji(n.blue,i.blue,o),r.alpha=ae(n.alpha,i.alpha,o),rt.transform(r))},Ei=new Set(["none","hidden"]);function td(e,t){return Ei.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function nd(e,t){return n=>ae(e,t,n)}function Ci(e){return typeof e=="number"?nd:typeof e=="string"?yi(e)?jn:pe.test(e)?cs:od:Array.isArray(e)?us:typeof e=="object"?pe.test(e)?cs:id:jn}function us(e,t){const n=[...e],i=n.length,r=e.map((o,s)=>Ci(o)(o,t[s]));return o=>{for(let s=0;s<i;s++)n[s]=r[s](o);return n}}function id(e,t){const n={...e,...t},i={};for(const r in n)e[r]!==void 0&&t[r]!==void 0&&(i[r]=Ci(e[r])(e[r],t[r]));return r=>{for(const o in i)n[o]=i[o](r);return n}}function rd(e,t){const n=[],i={color:0,var:0,number:0};for(let r=0;r<t.values.length;r++){const o=t.types[r],s=e.indexes[o][i[o]],a=e.values[s]??0;n[r]=a,i[o]++}return n}const od=(e,t)=>{const n=Je.createTransformer(t),i=Xt(e),r=Xt(t);return i.indexes.var.length===r.indexes.var.length&&i.indexes.color.length===r.indexes.color.length&&i.indexes.number.length>=r.indexes.number.length?Ei.has(e)&&!r.values.length||Ei.has(t)&&!i.values.length?td(e,t):qt(us(rd(i,r),r.values),n):(bt(!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"),jn(e,t))};function ds(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ae(e,t,n):Ci(e)(e,t)}const sd=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>se.update(t,n),stop:()=>Xe(t),now:()=>ge.isProcessing?ge.timestamp:we.now()}},ps=(e,t,n=10)=>{let i="";const r=Math.max(Math.round(t/n),2);for(let o=0;o<r;o++)i+=Math.round(e(o/(r-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},En=2e4;function Pi(e){let t=0;const n=50;let i=e.next(t);for(;!i.done&&t<En;)t+=n,i=e.next(t);return t>=En?1/0:t}function fs(e,t=100,n){const i=n({...e,keyframes:[0,t]}),r=Math.min(Pi(i),En);return{type:"keyframes",ease:o=>i.next(r*o).value/t,duration:Ie(r)}}const ad=5;function ms(e,t,n){const i=Math.max(t-ad,0);return Vo(n-e(i),t-i)}const le={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},Ai=.001;function ld({duration:e=le.duration,bounce:t=le.bounce,velocity:n=le.velocity,mass:i=le.mass}){let r,o;bt(e<=Pe(le.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let s=1-t;s=We(le.minDamping,le.maxDamping,s),e=We(le.minDuration,le.maxDuration,Ie(e)),s<1?(r=u=>{const c=u*s,d=c*e,f=c-n,m=Di(u,s),g=Math.exp(-d);return Ai-f/m*g},o=u=>{const d=u*s*e,f=d*n+n,m=Math.pow(s,2)*Math.pow(u,2)*e,g=Math.exp(-d),v=Di(Math.pow(u,2),s);return(-r(u)+Ai>0?-1:1)*((f-m)*g)/v}):(r=u=>{const c=Math.exp(-u*e),d=(u-n)*e+1;return-Ai+c*d},o=u=>{const c=Math.exp(-u*e),d=(n-u)*(e*e);return c*d});const a=5/e,l=ud(r,o,a);if(e=Pe(e),isNaN(l))return{stiffness:le.stiffness,damping:le.damping,duration:e};{const u=Math.pow(l,2)*i;return{stiffness:u,damping:s*2*Math.sqrt(i*u),duration:e}}}const cd=12;function ud(e,t,n){let i=n;for(let r=1;r<cd;r++)i=i-e(i)/t(i);return i}function Di(e,t){return e*Math.sqrt(1-t*t)}const dd=["duration","bounce"],pd=["stiffness","damping","mass"];function hs(e,t){return t.some(n=>e[n]!==void 0)}function fd(e){let t={velocity:le.velocity,stiffness:le.stiffness,damping:le.damping,mass:le.mass,isResolvedFromDuration:!1,...e};if(!hs(e,pd)&&hs(e,dd))if(e.visualDuration){const n=e.visualDuration,i=2*Math.PI/(n*1.2),r=i*i,o=2*We(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:le.mass,stiffness:r,damping:o}}else{const n=ld(e);t={...t,...n,mass:le.mass},t.isResolvedFromDuration=!0}return t}function Zt(e=le.visualDuration,t=le.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:i,restDelta:r}=n;const o=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:u,mass:c,duration:d,velocity:f,isResolvedFromDuration:m}=fd({...n,velocity:-Ie(n.velocity||0)}),g=f||0,v=u/(2*Math.sqrt(l*c)),b=s-o,h=Ie(Math.sqrt(l/c)),T=Math.abs(b)<5;i||(i=T?le.restSpeed.granular:le.restSpeed.default),r||(r=T?le.restDelta.granular:le.restDelta.default);let w;if(v<1){const y=Di(h,v);w=P=>{const E=Math.exp(-v*h*P);return s-E*((g+v*h*b)/y*Math.sin(y*P)+b*Math.cos(y*P))}}else if(v===1)w=y=>s-Math.exp(-h*y)*(b+(g+h*b)*y);else{const y=h*Math.sqrt(v*v-1);w=P=>{const E=Math.exp(-v*h*P),A=Math.min(y*P,300);return s-E*((g+v*h*b)*Math.sinh(A)+y*b*Math.cosh(A))/y}}const k={calculatedDuration:m&&d||null,next:y=>{const P=w(y);if(m)a.done=y>=d;else{let E=y===0?g:0;v<1&&(E=y===0?Pe(g):ms(w,y,P));const A=Math.abs(E)<=i,M=Math.abs(s-P)<=r;a.done=A&&M}return a.value=a.done?s:P,a},toString:()=>{const y=Math.min(Pi(k),En),P=ps(E=>k.next(y*E).value,y,30);return y+"ms "+P},toTransition:()=>{}};return k}Zt.applyToOptions=e=>{const t=fs(e,100,Zt);return e.ease=t.ease,e.duration=Pe(t.duration),e.type="keyframes",e};function Ri({keyframes:e,velocity:t=0,power:n=.8,timeConstant:i=325,bounceDamping:r=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],f={done:!1,value:d},m=A=>a!==void 0&&A<a||l!==void 0&&A>l,g=A=>a===void 0?l:l===void 0||Math.abs(a-A)<Math.abs(l-A)?a:l;let v=n*t;const b=d+v,h=s===void 0?b:s(b);h!==b&&(v=h-d);const T=A=>-v*Math.exp(-A/i),w=A=>h+T(A),k=A=>{const M=T(A),W=w(A);f.done=Math.abs(M)<=u,f.value=f.done?h:W};let y,P;const E=A=>{m(f.value)&&(y=A,P=Zt({keyframes:[f.value,g(f.value)],velocity:ms(w,A,f.value),damping:r,stiffness:o,restDelta:u,restSpeed:c}))};return E(0),{calculatedDuration:null,next:A=>{let M=!1;return!P&&y===void 0&&(M=!0,k(A),E(A)),y!==void 0&&A>=y?P.next(A-y):(!M&&k(A),f)}}}function md(e,t,n){const i=[],r=n||Ue.mix||ds,o=e.length-1;for(let s=0;s<o;s++){let a=r(e[s],e[s+1]);if(t){const l=Array.isArray(t)?t[s]||Ce:t;a=qt(l,a)}i.push(a)}return i}function hd(e,t,{clamp:n=!0,ease:i,mixer:r}={}){const o=e.length;if(Ee(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 s=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=md(t,i,r),l=a.length,u=c=>{if(s&&c<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(c<e[d+1]);d++);const f=wt(e[d],e[d+1],c);return a[d](f)};return n?c=>u(We(e[0],e[o-1],c)):u}function gs(e,t){const n=e[e.length-1];for(let i=1;i<=t;i++){const r=wt(0,t,i);e.push(ae(n,1,r))}}function vs(e){const t=[0];return gs(t,e.length-1),t}function gd(e,t){return e.map(n=>n*t)}function vd(e,t){return e.map(()=>t||Ko).splice(0,e.length-1)}function kt({duration:e=300,keyframes:t,times:n,ease:i="easeInOut"}){const r=Yo(i)?i.map(Jo):Jo(i),o={done:!1,value:t[0]},s=gd(n&&n.length===t.length?n:vs(t),e),a=hd(s,t,{ease:Array.isArray(r)?r:vd(t,r)});return{calculatedDuration:e,next:l=>(o.value=a(l),o.done=l>=e,o)}}const xd=e=>e!==null;function Oi(e,{repeat:t,repeatType:n="loop"},i,r=1){const o=e.filter(xd),a=r<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!a||i===void 0?o[a]:i}const yd={decay:Ri,inertia:Ri,tween:kt,keyframes:kt,spring:Zt};function xs(e){typeof e.type=="string"&&(e.type=yd[e.type])}class Mi{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 bd=e=>e/100;class Ii extends Mi{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!==we.now()&&this.tick(we.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;xs(t);const{type:n=kt,repeat:i=0,repeatDelay:r=0,repeatType:o,velocity:s=0}=t;let{keyframes:a}=t;const l=n||kt;process.env.NODE_ENV!=="production"&&l!==kt&&Ee(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==kt&&typeof a[0]!="number"&&(this.mixKeyframes=qt(bd,ds(a[0],a[1])),a=[0,100]);const u=l({...t,keyframes:a});o==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-s})),u.calculatedDuration===null&&(u.calculatedDuration=Pi(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+r,this.totalDuration=this.resolvedDuration*(i+1)-r,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:r,mixKeyframes:o,mirroredGenerator:s,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return i.next(0);const{delay:u=0,keyframes:c,repeat:d,repeatType:f,repeatDelay:m,type:g,onUpdate:v,finalKeyframe:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-r/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const h=this.currentTime-u*(this.playbackSpeed>=0?1:-1),T=this.playbackSpeed>=0?h<0:h>r;this.currentTime=Math.max(h,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=r);let w=this.currentTime,k=i;if(d){const A=Math.min(this.currentTime,r)/a;let M=Math.floor(A),W=A%1;!W&&A>=1&&(W=1),W===1&&M--,M=Math.min(M,d+1),!!(M%2)&&(f==="reverse"?(W=1-W,m&&(W-=m/a)):f==="mirror"&&(k=s)),w=We(0,1,W)*a}const y=T?{done:!1,value:c[0]}:k.next(w);o&&(y.value=o(y.value));let{done:P}=y;!T&&l!==null&&(P=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&P);return E&&g!==Ri&&(y.value=Oi(c,this.options,b,this.speed)),v&&v(y.value),E&&this.finish(),y}then(t,n){return this.finished.then(t,n)}get duration(){return Ie(this.calculatedDuration)}get time(){return Ie(this.currentTime)}set time(t){t=Pe(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(we.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Ie(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=sd,startTime:n}=this.options;this.driver||(this.driver=t(r=>this.tick(r))),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(we.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 wd(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const ot=e=>e*180/Math.PI,Ni=e=>{const t=ot(Math.atan2(e[1],e[0]));return Fi(t)},Td={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Ni,rotateZ:Ni,skewX:e=>ot(Math.atan(e[1])),skewY:e=>ot(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Fi=e=>(e=e%360,e<0&&(e+=360),e),ys=Ni,bs=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),ws=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Sd={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:bs,scaleY:ws,scale:e=>(bs(e)+ws(e))/2,rotateX:e=>Fi(ot(Math.atan2(e[6],e[5]))),rotateY:e=>Fi(ot(Math.atan2(-e[2],e[0]))),rotateZ:ys,rotate:ys,skewX:e=>ot(Math.atan(e[4])),skewY:e=>ot(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Vi(e){return e.includes("scale")?1:0}function _i(e,t){if(!e||e==="none")return Vi(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,r;if(n)i=Sd,r=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=Td,r=a}if(!r)return Vi(t);const o=i[t],s=r[1].split(",").map(jd);return typeof o=="function"?o(s):s[o]}const kd=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return _i(n,t)};function jd(e){return parseFloat(e.trim())}const jt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Et=new Set(jt),Ts=e=>e===Tt||e===K,Ed=new Set(["x","y","z"]),Cd=jt.filter(e=>!Ed.has(e));function Pd(e){const t=[];return Cd.forEach(n=>{const i=e.getValue(n);i!==void 0&&(t.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),t}const st={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})=>_i(t,"x"),y:(e,{transform:t})=>_i(t,"y")};st.translateX=st.x,st.translateY=st.y;const at=new Set;let Li=!1,zi=!1,Bi=!1;function Ss(){if(zi){const e=Array.from(at).filter(i=>i.needsMeasurement),t=new Set(e.map(i=>i.element)),n=new Map;t.forEach(i=>{const r=Pd(i);r.length&&(n.set(i,r),i.render())}),e.forEach(i=>i.measureInitialState()),t.forEach(i=>{i.render();const r=n.get(i);r&&r.forEach(([o,s])=>{i.getValue(o)?.set(s)})}),e.forEach(i=>i.measureEndState()),e.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}zi=!1,Li=!1,at.forEach(e=>e.complete(Bi)),at.clear()}function ks(){at.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(zi=!0)})}function Ad(){Bi=!0,ks(),Ss(),Bi=!1}class $i{constructor(t,n,i,r,o,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=i,this.motionValue=r,this.element=o,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(at.add(this),Li||(Li=!0,se.read(ks),se.resolveKeyframes(Ss))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:i,motionValue:r}=this;if(t[0]===null){const o=r?.get(),s=t[t.length-1];if(o!==void 0)t[0]=o;else if(i&&n){const a=i.readValue(n,s);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=s),r&&o===void 0&&r.set(t[0])}wd(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),at.delete(this)}cancel(){this.state==="scheduled"&&(at.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Dd=e=>e.startsWith("--");function Rd(e,t,n){Dd(t)?e.style.setProperty(t,n):e.style[t]=n}const Od=pi(()=>window.ScrollTimeline!==void 0),Md={};function Id(e,t){const n=pi(e);return()=>Md[t]??n()}const js=Id(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Jt=([e,t,n,i])=>`cubic-bezier(${e}, ${t}, ${n}, ${i})`,Es={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Jt([0,.65,.55,1]),circOut:Jt([.55,0,1,.45]),backIn:Jt([.31,.01,.66,-.59]),backOut:Jt([.33,1.53,.69,.99])};function Cs(e,t){if(e)return typeof e=="function"?js()?ps(e,t):"ease-out":Xo(e)?Jt(e):Array.isArray(e)?e.map(n=>Cs(n,t)||Es.easeOut):Es[e]}function Nd(e,t,n,{delay:i=0,duration:r=300,repeat:o=0,repeatType:s="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[t]:n};l&&(c.offset=l);const d=Cs(a,r);Array.isArray(d)&&(c.easing=d);const f={delay:i,duration:r,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:s==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),e.animate(c,f)}function Wi(e){return typeof e=="function"&&"applyToOptions"in e}function Fd({type:e,...t}){return Wi(e)&&js()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Vd extends Mi{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:i,keyframes:r,pseudoElement:o,allowFlatten:s=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!o,this.allowFlatten=s,this.options=t,Ee(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=Fd(t);this.animation=Nd(n,i,r,u,o),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const c=Oi(r,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):Rd(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 Ie(Number(t))}get time(){return Ie(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Pe(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&&Od()?(this.animation.timeline=t,Ce):n(this)}}const Ps={anticipate:Uo,backInOut:Wo,circInOut:Ho};function _d(e){return e in Ps}function Ld(e){typeof e.ease=="string"&&_d(e.ease)&&(e.ease=Ps[e.ease])}const As=10;class zd extends Vd{constructor(t){Ld(t),xs(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:i,onComplete:r,element:o,...s}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new Ii({...s,autoplay:!1}),l=Pe(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-As).value,a.sample(l).value,As),a.stop()}}const Ds=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Je.test(e)||e==="0")&&!e.startsWith("url("));function Bd(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 $d(e,t,n,i){const r=e[0];if(r===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],s=Ds(r,t),a=Ds(o,t);return bt(s===a,`You are trying to animate ${t} from "${r}" to "${o}". "${s?o:r}" is not an animatable value.`,"value-not-animatable"),!s||!a?!1:Bd(e)||(n==="spring"||Wi(n))&&i}function Ui(e){e.duration=0,e.type}const Wd=new Set(["opacity","clipPath","filter","transform"]),Ud=pi(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function qd(e){const{motionValue:t,name:n,repeatDelay:i,repeatType:r,damping:o,type:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=t.owner.getProps();return Ud()&&n&&Wd.has(n)&&(n!=="transform"||!u)&&!l&&!i&&r!=="mirror"&&o!==0&&s!=="inertia"}const Hd=40;class Kd extends Mi{constructor({autoplay:t=!0,delay:n=0,type:i="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:s="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=we.now();const f={autoplay:t,delay:n,type:i,repeat:r,repeatDelay:o,repeatType:s,name:l,motionValue:u,element:c,...d},m=c?.KeyframeResolver||$i;this.keyframeResolver=new m(a,(g,v,b)=>this.onKeyframesResolved(g,v,f,!b),l,u,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,i,r){this.keyframeResolver=void 0;const{name:o,type:s,velocity:a,delay:l,isHandoff:u,onUpdate:c}=i;this.resolvedAt=we.now(),$d(t,o,s,a)||((Ue.instantAnimations||!l)&&c?.(Oi(t,i,n)),t[0]=t[t.length-1],Ui(i),i.repeat=0);const f={startTime:r?this.resolvedAt?this.resolvedAt-this.createdAt>Hd?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:t},m=!u&&qd(f)?new zd({...f,element:f.motionValue.owner.current}):new Ii(f);m.finished.then(()=>this.notifyFinished()).catch(Ce),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}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(),Ad()),this._animation}get duration(){return this.animation.duration}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()}}class Yd{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let i=0;i<this.animations.length;i++)this.animations[i][t]=n}attachTimeline(t){const n=this.animations.map(i=>i.attachTimeline(t));return()=>{n.forEach((i,r)=>{i&&i(),this.animations[r].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class Gd extends Yd{then(t,n){return this.finished.finally(t).then(()=>{})}}const Xd=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Zd(e){const t=Xd.exec(e);if(!t)return[,];const[,n,i,r]=t;return[`--${n??i}`,r]}const Jd=4;function Rs(e,t,n=1){Ee(n<=Jd,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[i,r]=Zd(e);if(!i)return;const o=window.getComputedStyle(t).getPropertyValue(i);if(o){const s=o.trim();return Io(s)?parseFloat(s):s}return yi(r)?Rs(r,t,n+1):r}function qi(e,t){return e?.[t]??e?.default??e}const Os=new Set(["width","height","top","left","right","bottom",...jt]),Qd={test:e=>e==="auto",parse:e=>e},Ms=e=>t=>t.test(e),Is=[Tt,K,Ne,Ze,Uu,Wu,Qd],Ns=e=>Is.find(Ms(e));function ep(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Fo(e):!0}const tp=new Set(["brightness","contrast","saturate","opacity"]);function np(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[i]=n.match(bi)||[];if(!i)return e;const r=n.replace(i,"");let o=tp.has(t)?1:0;return i!==n&&(o*=100),t+"("+o+r+")"}const ip=/\b([a-z-]*)\(.*?\)/gu,Hi={...Je,getAnimatableNone:e=>{const t=e.match(ip);return t?t.map(np).join(" "):e}},Fs={...Tt,transform:Math.round},Ki={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,...{rotate:Ze,rotateX:Ze,rotateY:Ze,rotateZ:Ze,scale:kn,scaleX:kn,scaleY:kn,scaleZ:kn,skew:Ze,skewX:Ze,skewY:Ze,distance:K,translateX:K,translateY:K,translateZ:K,x:K,y:K,z:K,perspective:K,transformPerspective:K,opacity:Kt,originX:ns,originY:ns,originZ:K},zIndex:Fs,fillOpacity:Kt,strokeOpacity:Kt,numOctaves:Fs},rp={...Ki,color:pe,backgroundColor:pe,outlineColor:pe,fill:pe,stroke:pe,borderColor:pe,borderTopColor:pe,borderRightColor:pe,borderBottomColor:pe,borderLeftColor:pe,filter:Hi,WebkitFilter:Hi},Vs=e=>rp[e];function _s(e,t){let n=Vs(e);return n!==Hi&&(n=Je),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const op=new Set(["auto","none","0"]);function sp(e,t,n){let i=0,r;for(;i<e.length&&!r;){const o=e[i];typeof o=="string"&&!op.has(o)&&Xt(o).values.length&&(r=e[i]),i++}if(r&&n)for(const o of t)e[o]=_s(n,r)}class ap extends $i{constructor(t,n,i,r,o){super(t,n,i,r,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(),yi(u))){const c=Rs(u,n.current);c!==void 0&&(t[l]=c),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Os.has(i)||t.length!==2)return;const[r,o]=t,s=Ns(r),a=Ns(o);if(s!==a)if(Ts(s)&&Ts(a))for(let l=0;l<t.length;l++){const u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else st[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,i=[];for(let r=0;r<t.length;r++)(t[r]===null||ep(t[r]))&&i.push(r);i.length&&sp(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=st[i](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const r=n[n.length-1];r!==void 0&&t.getValue(i,r).jump(r,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:i}=this;if(!t||!t.current)return;const r=t.getValue(n);r&&r.jump(this.measuredOrigin,!1);const o=i.length-1,s=i[o];i[o]=st[n](t.measureViewportBox(),window.getComputedStyle(t.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,l])=>{t.getValue(a).set(l)}),this.resolveNoneKeyframes()}}function Ls(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let i=document;const r=n?.[e]??i.querySelectorAll(e);return r?Array.from(r):[]}return Array.from(e)}const zs=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Bs(e){return No(e)&&"offsetHeight"in e}const $s=30,lp=e=>!isNaN(parseFloat(e));class cp{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{const r=we.now();if(this.updatedAt!==r&&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=we.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=lp(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 fi);const i=this.events[t].add(n);return t==="change"?()=>{i(),se.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=we.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>$s)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,$s);return Vo(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 Ct(e,t){return new cp(e,t)}const{schedule:Yi}=Qo(queueMicrotask,!1),Oe={x:!1,y:!1};function Ws(){return Oe.x||Oe.y}function up(e){return e==="x"||e==="y"?Oe[e]?null:(Oe[e]=!0,()=>{Oe[e]=!1}):Oe.x||Oe.y?null:(Oe.x=Oe.y=!0,()=>{Oe.x=Oe.y=!1})}function Us(e,t){const n=Ls(e),i=new AbortController,r={passive:!0,...t,signal:i.signal};return[n,r,()=>i.abort()]}function qs(e){return!(e.pointerType==="touch"||Ws())}function dp(e,t,n={}){const[i,r,o]=Us(e,n),s=a=>{if(!qs(a))return;const{target:l}=a,u=t(l,a);if(typeof u!="function"||!l)return;const c=d=>{qs(d)&&(u(d),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,r)};return i.forEach(a=>{a.addEventListener("pointerenter",s,r)}),o}const Hs=(e,t)=>t?e===t?!0:Hs(e,t.parentElement):!1,Gi=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,pp=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function fp(e){return pp.has(e.tagName)||e.tabIndex!==-1}const Cn=new WeakSet;function Ks(e){return t=>{t.key==="Enter"&&e(t)}}function Xi(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const mp=(e,t)=>{const n=e.currentTarget;if(!n)return;const i=Ks(()=>{if(Cn.has(n))return;Xi(n,"down");const r=Ks(()=>{Xi(n,"up")}),o=()=>Xi(n,"cancel");n.addEventListener("keyup",r,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",i,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),t)};function Ys(e){return Gi(e)&&!Ws()}function hp(e,t,n={}){const[i,r,o]=Us(e,n),s=a=>{const l=a.currentTarget;if(!Ys(a))return;Cn.add(l);const u=t(l,a),c=(m,g)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),Cn.has(l)&&Cn.delete(l),Ys(m)&&typeof u=="function"&&u(m,{success:g})},d=m=>{c(m,l===window||l===document||n.useGlobalTarget||Hs(l,m.target))},f=m=>{c(m,!1)};window.addEventListener("pointerup",d,r),window.addEventListener("pointercancel",f,r)};return i.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",s,r),Bs(a)&&(a.addEventListener("focus",u=>mp(u,r)),!fp(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function Zi(e){return No(e)&&"ownerSVGElement"in e}function Gs(e){return Zi(e)&&e.tagName==="svg"}const he=e=>!!(e&&e.getVelocity),gp=[...Is,pe,Je],vp=e=>gp.find(Ms(e)),Ji=S.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class xp extends C.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const i=n.offsetParent,r=Bs(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=r-o.width-o.left}return null}componentDidUpdate(){}render(){return this.props.children}}function yp({children:e,isPresent:t,anchorX:n,root:i}){const r=S.useId(),o=S.useRef(null),s=S.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=S.useContext(Ji);return S.useInsertionEffect(()=>{const{width:l,height:u,top:c,left:d,right:f}=s.current;if(t||!o.current||!l||!u)return;const m=n==="left"?`left: ${d}`:`right: ${f}`;o.current.dataset.motionPopId=r;const g=document.createElement("style");a&&(g.nonce=a);const v=i??document.head;return v.appendChild(g),g.sheet&&g.sheet.insertRule(`
22
+ <%s key={someKey} {...props} />`,M,F,Q,F),G[F+M]=!0)}if(F=null,D!==void 0&&(n(D),F=""+D),o(P)&&(n(P.key),F=""+P.key),"key"in P){D={};for(var ee in P)ee!=="key"&&(D[ee]=P[ee])}else D=P;return F&&a(D,typeof x=="function"?x.displayName||x.name||"Unknown":x),u(x,F,K,z,r(),D,X,A)}function d(x){typeof x=="object"&&x!==null&&x.$$typeof===m&&x._store&&(x._store.validated=1)}var f=S,m=Symbol.for("react.transitional.element"),h=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),T=Symbol.for("react.consumer"),w=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),I=Symbol.for("react.activity"),_=Symbol.for("react.client.reference"),N=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=Object.prototype.hasOwnProperty,H=Array.isArray,W=console.createTask?console.createTask:function(){return null};f={react_stack_bottom_frame:function(x){return x()}};var J,U={},L=f.react_stack_bottom_frame.bind(f,s)(),V=W(i(s)),G={};dn.Fragment=g,dn.jsx=function(x,P,D,M,z){var K=1e4>N.recentlyCreatedOwnerStacks++;return c(x,P,D,!1,M,z,K?Error("react-stack-top-frame"):L,K?W(i(x)):V)},dn.jsxs=function(x,P,D,M,z){var K=1e4>N.recentlyCreatedOwnerStacks++;return c(x,P,D,!0,M,z,K?Error("react-stack-top-frame"):L,K?W(i(x)):V)}})()),dn}var ds;function yd(){return ds||(ds=1,process.env.NODE_ENV==="production"?Hn.exports=vd():Hn.exports=xd()),Hn.exports}var p=yd();const q=(...e)=>e.filter(Boolean).join(" "),$i=S.createContext({});function Wi(e){const t=S.useRef(null);return t.current===null&&(t.current=e()),t.current}const Ui=typeof window<"u",ps=Ui?S.useLayoutEffect:S.useEffect,Yn=S.createContext(null);function qi(e,t){e.indexOf(t)===-1&&e.push(t)}function Gn(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const ot=(e,t,n)=>n>t?t:n<e?e:n;function Ki(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Lt=()=>{},Me=()=>{};process.env.NODE_ENV!=="production"&&(Lt=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(Ki(t,n))},Me=(e,t,n)=>{if(!e)throw new Error(Ki(t,n))});const st={},fs=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function ms(e){return typeof e=="object"&&e!==null}const hs=e=>/^0[^.\s]+$/u.test(e);function Hi(e){let t;return()=>(t===void 0&&(t=e()),t)}const Ne=e=>e,bd=(e,t)=>n=>t(e(n)),pn=(...e)=>e.reduce(bd),_t=(e,t,n)=>{const i=t-e;return i===0?1:(n-e)/i};class Yi{constructor(){this.subscriptions=[]}add(t){return qi(this.subscriptions,t),()=>Gn(this.subscriptions,t)}notify(t,n,i){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](t,n,i);else for(let s=0;s<r;s++){const o=this.subscriptions[s];o&&o(t,n,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Fe=e=>e*1e3,Xe=e=>e/1e3;function gs(e,t){return t?e*(1e3/t):0}const vs=new Set;function Gi(e,t,n){e||vs.has(t)||(console.warn(Ki(t,n)),vs.add(t))}const wd=(e,t,n)=>{const i=t-e;return((n-e)%i+i)%i+e},xs=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Td=1e-7,Sd=12;function kd(e,t,n,i,r){let s,o,a=0;do o=t+(n-t)/2,s=xs(o,i,r)-e,s>0?n=o:t=o;while(Math.abs(s)>Td&&++a<Sd);return o}function fn(e,t,n,i){if(e===t&&n===i)return Ne;const r=s=>kd(s,0,1,e,n);return s=>s===0||s===1?s:xs(r(s),t,i)}const ys=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,bs=e=>t=>1-e(1-t),ws=fn(.33,1.53,.69,.99),Xi=bs(ws),Ts=ys(Xi),Ss=e=>(e*=2)<1?.5*Xi(e):.5*(2-Math.pow(2,-10*(e-1))),Zi=e=>1-Math.sin(Math.acos(e)),ks=bs(Zi),Es=ys(Zi),Ed=fn(.42,0,1,1),jd=fn(0,0,.58,1),js=fn(.42,0,.58,1),Cs=e=>Array.isArray(e)&&typeof e[0]!="number";function Ps(e,t){return Cs(e)?e[wd(0,e.length,t)]:e}const As=e=>Array.isArray(e)&&typeof e[0]=="number",Ds={linear:Ne,easeIn:Ed,easeInOut:js,easeOut:jd,circIn:Zi,circInOut:Es,circOut:ks,backIn:Xi,backInOut:Ts,backOut:ws,anticipate:Ss},Cd=e=>typeof e=="string",Rs=e=>{if(As(e)){Me(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,i,r]=e;return fn(t,n,i,r)}else if(Cd(e))return Me(Ds[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Ds[e];return e},Xn=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Pd(e,t){let n=new Set,i=new Set,r=!1,s=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){o.has(c)&&(u.schedule(c),e()),c(a)}const u={schedule:(c,d=!1,f=!1)=>{const h=f&&r?n:i;return d&&o.add(c),h.has(c)||h.add(c),c},cancel:c=>{i.delete(c),o.delete(c)},process:c=>{if(a=c,r){s=!0;return}r=!0,[n,i]=[i,n],n.forEach(l),n.clear(),r=!1,s&&(s=!1,u.process(c))}};return u}const Ad=40;function Is(e,t){let n=!1,i=!0;const r={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=Xn.reduce((w,k)=>(w[k]=Pd(s),w),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:f,render:m,postRender:h}=o,g=()=>{const w=st.useManualTiming?r.timestamp:performance.now();n=!1,st.useManualTiming||(r.delta=i?1e3/60:Math.max(Math.min(w-r.timestamp,Ad),1)),r.timestamp=w,r.isProcessing=!0,a.process(r),l.process(r),u.process(r),c.process(r),d.process(r),f.process(r),m.process(r),h.process(r),r.isProcessing=!1,n&&t&&(i=!1,e(g))},y=()=>{n=!0,i=!0,r.isProcessing||e(g)};return{schedule:Xn.reduce((w,k)=>{const b=o[k];return w[k]=(C,R=!1,E=!1)=>(n||y(),b.schedule(C,R,E)),w},{}),cancel:w=>{for(let k=0;k<Xn.length;k++)o[Xn[k]].cancel(w)},state:r,steps:o}}const{schedule:pe,cancel:ct,state:Se,steps:Ji}=Is(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ne,!0);let Zn;function Dd(){Zn=void 0}const Ae={now:()=>(Zn===void 0&&Ae.set(Se.isProcessing||st.useManualTiming?Se.timestamp:performance.now()),Zn),set:e=>{Zn=e,queueMicrotask(Dd)}},Os=e=>t=>typeof t=="string"&&t.startsWith(e),Qi=Os("--"),Rd=Os("var(--"),er=e=>Rd(e)?Id.test(e.split("/*")[0].trim()):!1,Id=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,zt={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},mn={...zt,transform:e=>ot(0,1,e)},Jn={...zt,default:1},hn=e=>Math.round(e*1e5)/1e5,tr=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Od(e){return e==null}const Md=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,nr=(e,t)=>n=>!!(typeof n=="string"&&Md.test(n)&&n.startsWith(e)||t&&!Od(n)&&Object.prototype.hasOwnProperty.call(n,t)),Ms=(e,t,n)=>i=>{if(typeof i!="string")return i;const[r,s,o,a]=i.match(tr);return{[e]:parseFloat(r),[t]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Nd=e=>ot(0,255,e),ir={...zt,transform:e=>Math.round(Nd(e))},St={test:nr("rgb","red"),parse:Ms("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:i=1})=>"rgba("+ir.transform(e)+", "+ir.transform(t)+", "+ir.transform(n)+", "+hn(mn.transform(i))+")"};function Fd(e){let t="",n="",i="",r="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),i=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),i=e.substring(3,4),r=e.substring(4,5),t+=t,n+=n,i+=i,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:r?parseInt(r,16)/255:1}}const rr={test:nr("#"),parse:Fd,transform:St.transform},gn=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ut=gn("deg"),Ze=gn("%"),ie=gn("px"),Vd=gn("vh"),Ld=gn("vw"),Ns={...Ze,parse:e=>Ze.parse(e)/100,transform:e=>Ze.transform(e*100)},Bt={test:nr("hsl","hue"),parse:Ms("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:i=1})=>"hsla("+Math.round(e)+", "+Ze.transform(hn(t))+", "+Ze.transform(hn(n))+", "+hn(mn.transform(i))+")"},ye={test:e=>St.test(e)||rr.test(e)||Bt.test(e),parse:e=>St.test(e)?St.parse(e):Bt.test(e)?Bt.parse(e):rr.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?St.transform(e):Bt.transform(e),getAnimatableNone:e=>{const t=ye.parse(e);return t.alpha=0,ye.transform(t)}},_d=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function zd(e){return isNaN(e)&&typeof e=="string"&&(e.match(tr)?.length||0)+(e.match(_d)?.length||0)>0}const Fs="number",Vs="color",Bd="var",$d="var(",Ls="${}",Wd=/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 vn(e){const t=e.toString(),n=[],i={color:[],number:[],var:[]},r=[];let s=0;const a=t.replace(Wd,l=>(ye.test(l)?(i.color.push(s),r.push(Vs),n.push(ye.parse(l))):l.startsWith($d)?(i.var.push(s),r.push(Bd),n.push(l)):(i.number.push(s),r.push(Fs),n.push(parseFloat(l))),++s,Ls)).split(Ls);return{values:n,split:a,indexes:i,types:r}}function _s(e){return vn(e).values}function zs(e){const{split:t,types:n}=vn(e),i=t.length;return r=>{let s="";for(let o=0;o<i;o++)if(s+=t[o],r[o]!==void 0){const a=n[o];a===Fs?s+=hn(r[o]):a===Vs?s+=ye.transform(r[o]):s+=r[o]}return s}}const Ud=e=>typeof e=="number"?0:ye.test(e)?ye.getAnimatableNone(e):e;function qd(e){const t=_s(e);return zs(e)(t.map(Ud))}const dt={test:zd,parse:_s,createTransformer:zs,getAnimatableNone:qd};function or(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 Kd({hue:e,saturation:t,lightness:n,alpha:i}){e/=360,t/=100,n/=100;let r=0,s=0,o=0;if(!t)r=s=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;r=or(l,a,e+1/3),s=or(l,a,e),o=or(l,a,e-1/3)}return{red:Math.round(r*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:i}}function Qn(e,t){return n=>n>0?t:e}const fe=(e,t,n)=>e+(t-e)*n,sr=(e,t,n)=>{const i=e*e,r=n*(t*t-i)+i;return r<0?0:Math.sqrt(r)},Hd=[rr,St,Bt],Yd=e=>Hd.find(t=>t.test(e));function Bs(e){const t=Yd(e);if(Lt(!!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===Bt&&(n=Kd(n)),n}const $s=(e,t)=>{const n=Bs(e),i=Bs(t);if(!n||!i)return Qn(e,t);const r={...n};return s=>(r.red=sr(n.red,i.red,s),r.green=sr(n.green,i.green,s),r.blue=sr(n.blue,i.blue,s),r.alpha=fe(n.alpha,i.alpha,s),St.transform(r))},ar=new Set(["none","hidden"]);function Gd(e,t){return ar.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Xd(e,t){return n=>fe(e,t,n)}function lr(e){return typeof e=="number"?Xd:typeof e=="string"?er(e)?Qn:ye.test(e)?$s:Qd:Array.isArray(e)?Ws:typeof e=="object"?ye.test(e)?$s:Zd:Qn}function Ws(e,t){const n=[...e],i=n.length,r=e.map((s,o)=>lr(s)(s,t[o]));return s=>{for(let o=0;o<i;o++)n[o]=r[o](s);return n}}function Zd(e,t){const n={...e,...t},i={};for(const r in n)e[r]!==void 0&&t[r]!==void 0&&(i[r]=lr(e[r])(e[r],t[r]));return r=>{for(const s in i)n[s]=i[s](r);return n}}function Jd(e,t){const n=[],i={color:0,var:0,number:0};for(let r=0;r<t.values.length;r++){const s=t.types[r],o=e.indexes[s][i[s]],a=e.values[o]??0;n[r]=a,i[s]++}return n}const Qd=(e,t)=>{const n=dt.createTransformer(t),i=vn(e),r=vn(t);return i.indexes.var.length===r.indexes.var.length&&i.indexes.color.length===r.indexes.color.length&&i.indexes.number.length>=r.indexes.number.length?ar.has(e)&&!r.values.length||ar.has(t)&&!i.values.length?Gd(e,t):pn(Ws(Jd(i,r),r.values),n):(Lt(!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"),Qn(e,t))};function Us(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?fe(e,t,n):lr(e)(e,t)}const ep=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>pe.update(t,n),stop:()=>ct(t),now:()=>Se.isProcessing?Se.timestamp:Ae.now()}},qs=(e,t,n=10)=>{let i="";const r=Math.max(Math.round(t/n),2);for(let s=0;s<r;s++)i+=Math.round(e(s/(r-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},ei=2e4;function cr(e){let t=0;const n=50;let i=e.next(t);for(;!i.done&&t<ei;)t+=n,i=e.next(t);return t>=ei?1/0:t}function Ks(e,t=100,n){const i=n({...e,keyframes:[0,t]}),r=Math.min(cr(i),ei);return{type:"keyframes",ease:s=>i.next(r*s).value/t,duration:Xe(r)}}const tp=5;function Hs(e,t,n){const i=Math.max(t-tp,0);return gs(n-e(i),t-i)}const me={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},ur=.001;function np({duration:e=me.duration,bounce:t=me.bounce,velocity:n=me.velocity,mass:i=me.mass}){let r,s;Lt(e<=Fe(me.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=ot(me.minDamping,me.maxDamping,o),e=ot(me.minDuration,me.maxDuration,Xe(e)),o<1?(r=u=>{const c=u*o,d=c*e,f=c-n,m=dr(u,o),h=Math.exp(-d);return ur-f/m*h},s=u=>{const d=u*o*e,f=d*n+n,m=Math.pow(o,2)*Math.pow(u,2)*e,h=Math.exp(-d),g=dr(Math.pow(u,2),o);return(-r(u)+ur>0?-1:1)*((f-m)*h)/g}):(r=u=>{const c=Math.exp(-u*e),d=(u-n)*e+1;return-ur+c*d},s=u=>{const c=Math.exp(-u*e),d=(n-u)*(e*e);return c*d});const a=5/e,l=rp(r,s,a);if(e=Fe(e),isNaN(l))return{stiffness:me.stiffness,damping:me.damping,duration:e};{const u=Math.pow(l,2)*i;return{stiffness:u,damping:o*2*Math.sqrt(i*u),duration:e}}}const ip=12;function rp(e,t,n){let i=n;for(let r=1;r<ip;r++)i=i-e(i)/t(i);return i}function dr(e,t){return e*Math.sqrt(1-t*t)}const op=["duration","bounce"],sp=["stiffness","damping","mass"];function Ys(e,t){return t.some(n=>e[n]!==void 0)}function ap(e){let t={velocity:me.velocity,stiffness:me.stiffness,damping:me.damping,mass:me.mass,isResolvedFromDuration:!1,...e};if(!Ys(e,sp)&&Ys(e,op))if(e.visualDuration){const n=e.visualDuration,i=2*Math.PI/(n*1.2),r=i*i,s=2*ot(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:me.mass,stiffness:r,damping:s}}else{const n=np(e);t={...t,...n,mass:me.mass},t.isResolvedFromDuration=!0}return t}function xn(e=me.visualDuration,t=me.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:i,restDelta:r}=n;const s=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:u,mass:c,duration:d,velocity:f,isResolvedFromDuration:m}=ap({...n,velocity:-Xe(n.velocity||0)}),h=f||0,g=u/(2*Math.sqrt(l*c)),y=o-s,v=Xe(Math.sqrt(l/c)),T=Math.abs(y)<5;i||(i=T?me.restSpeed.granular:me.restSpeed.default),r||(r=T?me.restDelta.granular:me.restDelta.default);let w;if(g<1){const b=dr(v,g);w=C=>{const R=Math.exp(-g*v*C);return o-R*((h+g*v*y)/b*Math.sin(b*C)+y*Math.cos(b*C))}}else if(g===1)w=b=>o-Math.exp(-v*b)*(y+(h+v*y)*b);else{const b=v*Math.sqrt(g*g-1);w=C=>{const R=Math.exp(-g*v*C),E=Math.min(b*C,300);return o-R*((h+g*v*y)*Math.sinh(E)+b*y*Math.cosh(E))/b}}const k={calculatedDuration:m&&d||null,next:b=>{const C=w(b);if(m)a.done=b>=d;else{let R=b===0?h:0;g<1&&(R=b===0?Fe(h):Hs(w,b,C));const E=Math.abs(R)<=i,I=Math.abs(o-C)<=r;a.done=E&&I}return a.value=a.done?o:C,a},toString:()=>{const b=Math.min(cr(k),ei),C=qs(R=>k.next(b*R).value,b,30);return b+"ms "+C},toTransition:()=>{}};return k}xn.applyToOptions=e=>{const t=Ks(e,100,xn);return e.ease=t.ease,e.duration=Fe(t.duration),e.type="keyframes",e};function pr({keyframes:e,velocity:t=0,power:n=.8,timeConstant:i=325,bounceDamping:r=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],f={done:!1,value:d},m=E=>a!==void 0&&E<a||l!==void 0&&E>l,h=E=>a===void 0?l:l===void 0||Math.abs(a-E)<Math.abs(l-E)?a:l;let g=n*t;const y=d+g,v=o===void 0?y:o(y);v!==y&&(g=v-d);const T=E=>-g*Math.exp(-E/i),w=E=>v+T(E),k=E=>{const I=T(E),_=w(E);f.done=Math.abs(I)<=u,f.value=f.done?v:_};let b,C;const R=E=>{m(f.value)&&(b=E,C=xn({keyframes:[f.value,h(f.value)],velocity:Hs(w,E,f.value),damping:r,stiffness:s,restDelta:u,restSpeed:c}))};return R(0),{calculatedDuration:null,next:E=>{let I=!1;return!C&&b===void 0&&(I=!0,k(E),R(E)),b!==void 0&&E>=b?C.next(E-b):(!I&&k(E),f)}}}function lp(e,t,n){const i=[],r=n||st.mix||Us,s=e.length-1;for(let o=0;o<s;o++){let a=r(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||Ne:t;a=pn(l,a)}i.push(a)}return i}function cp(e,t,{clamp:n=!0,ease:i,mixer:r}={}){const s=e.length;if(Me(s===t.length,"Both input and output ranges must be the same length","range-length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=lp(t,i,r),l=a.length,u=c=>{if(o&&c<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(c<e[d+1]);d++);const f=_t(e[d],e[d+1],c);return a[d](f)};return n?c=>u(ot(e[0],e[s-1],c)):u}function Gs(e,t){const n=e[e.length-1];for(let i=1;i<=t;i++){const r=_t(0,t,i);e.push(fe(n,1,r))}}function Xs(e){const t=[0];return Gs(t,e.length-1),t}function up(e,t){return e.map(n=>n*t)}function dp(e,t){return e.map(()=>t||js).splice(0,e.length-1)}function $t({duration:e=300,keyframes:t,times:n,ease:i="easeInOut"}){const r=Cs(i)?i.map(Rs):Rs(i),s={done:!1,value:t[0]},o=up(n&&n.length===t.length?n:Xs(t),e),a=cp(o,t,{ease:Array.isArray(r)?r:dp(t,r)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const pp=e=>e!==null;function fr(e,{repeat:t,repeatType:n="loop"},i,r=1){const s=e.filter(pp),a=r<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!a||i===void 0?s[a]:i}const fp={decay:pr,inertia:pr,tween:$t,keyframes:$t,spring:xn};function Zs(e){typeof e.type=="string"&&(e.type=fp[e.type])}class mr{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 mp=e=>e/100;class hr extends mr{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!==Ae.now()&&this.tick(Ae.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;Zs(t);const{type:n=$t,repeat:i=0,repeatDelay:r=0,repeatType:s,velocity:o=0}=t;let{keyframes:a}=t;const l=n||$t;process.env.NODE_ENV!=="production"&&l!==$t&&Me(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==$t&&typeof a[0]!="number"&&(this.mixKeyframes=pn(mp,Us(a[0],a[1])),a=[0,100]);const u=l({...t,keyframes:a});s==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=cr(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+r,this.totalDuration=this.resolvedDuration*(i+1)-r,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:r,mixKeyframes:s,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return i.next(0);const{delay:u=0,keyframes:c,repeat:d,repeatType:f,repeatDelay:m,type:h,onUpdate:g,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-r/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const v=this.currentTime-u*(this.playbackSpeed>=0?1:-1),T=this.playbackSpeed>=0?v<0:v>r;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=r);let w=this.currentTime,k=i;if(d){const E=Math.min(this.currentTime,r)/a;let I=Math.floor(E),_=E%1;!_&&E>=1&&(_=1),_===1&&I--,I=Math.min(I,d+1),!!(I%2)&&(f==="reverse"?(_=1-_,m&&(_-=m/a)):f==="mirror"&&(k=o)),w=ot(0,1,_)*a}const b=T?{done:!1,value:c[0]}:k.next(w);s&&(b.value=s(b.value));let{done:C}=b;!T&&l!==null&&(C=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const R=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return R&&h!==pr&&(b.value=fr(c,this.options,y,this.speed)),g&&g(b.value),R&&this.finish(),b}then(t,n){return this.finished.then(t,n)}get duration(){return Xe(this.calculatedDuration)}get time(){return Xe(this.currentTime)}set time(t){t=Fe(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(Ae.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Xe(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=ep,startTime:n}=this.options;this.driver||(this.driver=t(r=>this.tick(r))),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(Ae.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 hp(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const kt=e=>e*180/Math.PI,gr=e=>{const t=kt(Math.atan2(e[1],e[0]));return vr(t)},gp={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:gr,rotateZ:gr,skewX:e=>kt(Math.atan(e[1])),skewY:e=>kt(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},vr=e=>(e=e%360,e<0&&(e+=360),e),Js=gr,Qs=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),ea=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),vp={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Qs,scaleY:ea,scale:e=>(Qs(e)+ea(e))/2,rotateX:e=>vr(kt(Math.atan2(e[6],e[5]))),rotateY:e=>vr(kt(Math.atan2(-e[2],e[0]))),rotateZ:Js,rotate:Js,skewX:e=>kt(Math.atan(e[4])),skewY:e=>kt(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function xr(e){return e.includes("scale")?1:0}function yr(e,t){if(!e||e==="none")return xr(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,r;if(n)i=vp,r=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=gp,r=a}if(!r)return xr(t);const s=i[t],o=r[1].split(",").map(yp);return typeof s=="function"?s(o):o[s]}const xp=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return yr(n,t)};function yp(e){return parseFloat(e.trim())}const Wt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ut=new Set(Wt),ta=e=>e===zt||e===ie,bp=new Set(["x","y","z"]),wp=Wt.filter(e=>!bp.has(e));function Tp(e){const t=[];return wp.forEach(n=>{const i=e.getValue(n);i!==void 0&&(t.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),t}const Et={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})=>yr(t,"x"),y:(e,{transform:t})=>yr(t,"y")};Et.translateX=Et.x,Et.translateY=Et.y;const jt=new Set;let br=!1,wr=!1,Tr=!1;function na(){if(wr){const e=Array.from(jt).filter(i=>i.needsMeasurement),t=new Set(e.map(i=>i.element)),n=new Map;t.forEach(i=>{const r=Tp(i);r.length&&(n.set(i,r),i.render())}),e.forEach(i=>i.measureInitialState()),t.forEach(i=>{i.render();const r=n.get(i);r&&r.forEach(([s,o])=>{i.getValue(s)?.set(o)})}),e.forEach(i=>i.measureEndState()),e.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}wr=!1,br=!1,jt.forEach(e=>e.complete(Tr)),jt.clear()}function ia(){jt.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(wr=!0)})}function Sp(){Tr=!0,ia(),na(),Tr=!1}class Sr{constructor(t,n,i,r,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=i,this.motionValue=r,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(jt.add(this),br||(br=!0,pe.read(ia),pe.resolveKeyframes(na))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:i,motionValue:r}=this;if(t[0]===null){const s=r?.get(),o=t[t.length-1];if(s!==void 0)t[0]=s;else if(i&&n){const a=i.readValue(n,o);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=o),r&&s===void 0&&r.set(t[0])}hp(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),jt.delete(this)}cancel(){this.state==="scheduled"&&(jt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const kp=e=>e.startsWith("--");function Ep(e,t,n){kp(t)?e.style.setProperty(t,n):e.style[t]=n}const jp=Hi(()=>window.ScrollTimeline!==void 0),Cp={};function Pp(e,t){const n=Hi(e);return()=>Cp[t]??n()}const ra=Pp(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),yn=([e,t,n,i])=>`cubic-bezier(${e}, ${t}, ${n}, ${i})`,oa={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:yn([0,.65,.55,1]),circOut:yn([.55,0,1,.45]),backIn:yn([.31,.01,.66,-.59]),backOut:yn([.33,1.53,.69,.99])};function sa(e,t){if(e)return typeof e=="function"?ra()?qs(e,t):"ease-out":As(e)?yn(e):Array.isArray(e)?e.map(n=>sa(n,t)||oa.easeOut):oa[e]}function Ap(e,t,n,{delay:i=0,duration:r=300,repeat:s=0,repeatType:o="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[t]:n};l&&(c.offset=l);const d=sa(a,r);Array.isArray(d)&&(c.easing=d);const f={delay:i,duration:r,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),e.animate(c,f)}function kr(e){return typeof e=="function"&&"applyToOptions"in e}function Dp({type:e,...t}){return kr(e)&&ra()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Rp extends mr{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:i,keyframes:r,pseudoElement:s,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!s,this.allowFlatten=o,this.options=t,Me(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=Dp(t);this.animation=Ap(n,i,r,u,s),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const c=fr(r,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):Ep(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 Xe(Number(t))}get time(){return Xe(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Fe(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&&jp()?(this.animation.timeline=t,Ne):n(this)}}const aa={anticipate:Ss,backInOut:Ts,circInOut:Es};function Ip(e){return e in aa}function Op(e){typeof e.ease=="string"&&Ip(e.ease)&&(e.ease=aa[e.ease])}const la=10;class Mp extends Rp{constructor(t){Op(t),Zs(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:i,onComplete:r,element:s,...o}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new hr({...o,autoplay:!1}),l=Fe(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-la).value,a.sample(l).value,la),a.stop()}}const ca=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(dt.test(e)||e==="0")&&!e.startsWith("url("));function Np(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 Fp(e,t,n,i){const r=e[0];if(r===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],o=ca(r,t),a=ca(s,t);return Lt(o===a,`You are trying to animate ${t} from "${r}" to "${s}". "${o?s:r}" is not an animatable value.`,"value-not-animatable"),!o||!a?!1:Np(e)||(n==="spring"||kr(n))&&i}function Er(e){e.duration=0,e.type}const Vp=new Set(["opacity","clipPath","filter","transform"]),Lp=Hi(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function _p(e){const{motionValue:t,name:n,repeatDelay:i,repeatType:r,damping:s,type:o}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=t.owner.getProps();return Lp()&&n&&Vp.has(n)&&(n!=="transform"||!u)&&!l&&!i&&r!=="mirror"&&s!==0&&o!=="inertia"}const zp=40;class Bp extends mr{constructor({autoplay:t=!0,delay:n=0,type:i="keyframes",repeat:r=0,repeatDelay:s=0,repeatType:o="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=Ae.now();const f={autoplay:t,delay:n,type:i,repeat:r,repeatDelay:s,repeatType:o,name:l,motionValue:u,element:c,...d},m=c?.KeyframeResolver||Sr;this.keyframeResolver=new m(a,(h,g,y)=>this.onKeyframesResolved(h,g,f,!y),l,u,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,i,r){this.keyframeResolver=void 0;const{name:s,type:o,velocity:a,delay:l,isHandoff:u,onUpdate:c}=i;this.resolvedAt=Ae.now(),Fp(t,s,o,a)||((st.instantAnimations||!l)&&c?.(fr(t,i,n)),t[0]=t[t.length-1],Er(i),i.repeat=0);const f={startTime:r?this.resolvedAt?this.resolvedAt-this.createdAt>zp?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:t},m=!u&&_p(f)?new Mp({...f,element:f.motionValue.owner.current}):new hr(f);m.finished.then(()=>this.notifyFinished()).catch(Ne),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}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(),Sp()),this._animation}get duration(){return this.animation.duration}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()}}class $p{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let i=0;i<this.animations.length;i++)this.animations[i][t]=n}attachTimeline(t){const n=this.animations.map(i=>i.attachTimeline(t));return()=>{n.forEach((i,r)=>{i&&i(),this.animations[r].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class Wp extends $p{then(t,n){return this.finished.finally(t).then(()=>{})}}const Up=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function qp(e){const t=Up.exec(e);if(!t)return[,];const[,n,i,r]=t;return[`--${n??i}`,r]}const Kp=4;function ua(e,t,n=1){Me(n<=Kp,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[i,r]=qp(e);if(!i)return;const s=window.getComputedStyle(t).getPropertyValue(i);if(s){const o=s.trim();return fs(o)?parseFloat(o):o}return er(r)?ua(r,t,n+1):r}function jr(e,t){return e?.[t]??e?.default??e}const da=new Set(["width","height","top","left","right","bottom",...Wt]),Hp={test:e=>e==="auto",parse:e=>e},pa=e=>t=>t.test(e),fa=[zt,ie,Ze,ut,Ld,Vd,Hp],ma=e=>fa.find(pa(e));function Yp(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||hs(e):!0}const Gp=new Set(["brightness","contrast","saturate","opacity"]);function Xp(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[i]=n.match(tr)||[];if(!i)return e;const r=n.replace(i,"");let s=Gp.has(t)?1:0;return i!==n&&(s*=100),t+"("+s+r+")"}const Zp=/\b([a-z-]*)\(.*?\)/gu,Cr={...dt,getAnimatableNone:e=>{const t=e.match(Zp);return t?t.map(Xp).join(" "):e}},ha={...zt,transform:Math.round},Pr={borderWidth:ie,borderTopWidth:ie,borderRightWidth:ie,borderBottomWidth:ie,borderLeftWidth:ie,borderRadius:ie,radius:ie,borderTopLeftRadius:ie,borderTopRightRadius:ie,borderBottomRightRadius:ie,borderBottomLeftRadius:ie,width:ie,maxWidth:ie,height:ie,maxHeight:ie,top:ie,right:ie,bottom:ie,left:ie,padding:ie,paddingTop:ie,paddingRight:ie,paddingBottom:ie,paddingLeft:ie,margin:ie,marginTop:ie,marginRight:ie,marginBottom:ie,marginLeft:ie,backgroundPositionX:ie,backgroundPositionY:ie,...{rotate:ut,rotateX:ut,rotateY:ut,rotateZ:ut,scale:Jn,scaleX:Jn,scaleY:Jn,scaleZ:Jn,skew:ut,skewX:ut,skewY:ut,distance:ie,translateX:ie,translateY:ie,translateZ:ie,x:ie,y:ie,z:ie,perspective:ie,transformPerspective:ie,opacity:mn,originX:Ns,originY:Ns,originZ:ie},zIndex:ha,fillOpacity:mn,strokeOpacity:mn,numOctaves:ha},Jp={...Pr,color:ye,backgroundColor:ye,outlineColor:ye,fill:ye,stroke:ye,borderColor:ye,borderTopColor:ye,borderRightColor:ye,borderBottomColor:ye,borderLeftColor:ye,filter:Cr,WebkitFilter:Cr},ga=e=>Jp[e];function va(e,t){let n=ga(e);return n!==Cr&&(n=dt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Qp=new Set(["auto","none","0"]);function ef(e,t,n){let i=0,r;for(;i<e.length&&!r;){const s=e[i];typeof s=="string"&&!Qp.has(s)&&vn(s).values.length&&(r=e[i]),i++}if(r&&n)for(const s of t)e[s]=va(n,r)}class tf extends Sr{constructor(t,n,i,r,s){super(t,n,i,r,s,!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(),er(u))){const c=ua(u,n.current);c!==void 0&&(t[l]=c),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!da.has(i)||t.length!==2)return;const[r,s]=t,o=ma(r),a=ma(s);if(o!==a)if(ta(o)&&ta(a))for(let l=0;l<t.length;l++){const u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else Et[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,i=[];for(let r=0;r<t.length;r++)(t[r]===null||Yp(t[r]))&&i.push(r);i.length&&ef(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=Et[i](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const r=n[n.length-1];r!==void 0&&t.getValue(i,r).jump(r,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:i}=this;if(!t||!t.current)return;const r=t.getValue(n);r&&r.jump(this.measuredOrigin,!1);const s=i.length-1,o=i[s];i[s]=Et[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,l])=>{t.getValue(a).set(l)}),this.resolveNoneKeyframes()}}function xa(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let i=document;const r=n?.[e]??i.querySelectorAll(e);return r?Array.from(r):[]}return Array.from(e)}const ya=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function ba(e){return ms(e)&&"offsetHeight"in e}const wa=30,nf=e=>!isNaN(parseFloat(e));class rf{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{const r=Ae.now();if(this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const s of this.dependents)s.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Ae.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=nf(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 Yi);const i=this.events[t].add(n);return t==="change"?()=>{i(),pe.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=Ae.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>wa)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,wa);return gs(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 qt(e,t){return new rf(e,t)}const{schedule:Ar}=Is(queueMicrotask,!1),Ue={x:!1,y:!1};function Ta(){return Ue.x||Ue.y}function of(e){return e==="x"||e==="y"?Ue[e]?null:(Ue[e]=!0,()=>{Ue[e]=!1}):Ue.x||Ue.y?null:(Ue.x=Ue.y=!0,()=>{Ue.x=Ue.y=!1})}function Sa(e,t){const n=xa(e),i=new AbortController,r={passive:!0,...t,signal:i.signal};return[n,r,()=>i.abort()]}function ka(e){return!(e.pointerType==="touch"||Ta())}function sf(e,t,n={}){const[i,r,s]=Sa(e,n),o=a=>{if(!ka(a))return;const{target:l}=a,u=t(l,a);if(typeof u!="function"||!l)return;const c=d=>{ka(d)&&(u(d),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,r)};return i.forEach(a=>{a.addEventListener("pointerenter",o,r)}),s}const Ea=(e,t)=>t?e===t?!0:Ea(e,t.parentElement):!1,Dr=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,af=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function lf(e){return af.has(e.tagName)||e.tabIndex!==-1}const ti=new WeakSet;function ja(e){return t=>{t.key==="Enter"&&e(t)}}function Rr(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const cf=(e,t)=>{const n=e.currentTarget;if(!n)return;const i=ja(()=>{if(ti.has(n))return;Rr(n,"down");const r=ja(()=>{Rr(n,"up")}),s=()=>Rr(n,"cancel");n.addEventListener("keyup",r,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",i,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),t)};function Ca(e){return Dr(e)&&!Ta()}function uf(e,t,n={}){const[i,r,s]=Sa(e,n),o=a=>{const l=a.currentTarget;if(!Ca(a))return;ti.add(l);const u=t(l,a),c=(m,h)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),ti.has(l)&&ti.delete(l),Ca(m)&&typeof u=="function"&&u(m,{success:h})},d=m=>{c(m,l===window||l===document||n.useGlobalTarget||Ea(l,m.target))},f=m=>{c(m,!1)};window.addEventListener("pointerup",d,r),window.addEventListener("pointercancel",f,r)};return i.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,r),ba(a)&&(a.addEventListener("focus",u=>cf(u,r)),!lf(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}function Ir(e){return ms(e)&&"ownerSVGElement"in e}function Pa(e){return Ir(e)&&e.tagName==="svg"}const Te=e=>!!(e&&e.getVelocity),df=[...fa,ye,dt],pf=e=>df.find(pa(e)),Or=S.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class ff extends j.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const i=n.offsetParent,r=ba(i)&&i.offsetWidth||0,s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft,s.right=r-s.width-s.left}return null}componentDidUpdate(){}render(){return this.props.children}}function mf({children:e,isPresent:t,anchorX:n,root:i}){const r=S.useId(),s=S.useRef(null),o=S.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=S.useContext(Or);return S.useInsertionEffect(()=>{const{width:l,height:u,top:c,left:d,right:f}=o.current;if(t||!s.current||!l||!u)return;const m=n==="left"?`left: ${d}`:`right: ${f}`;s.current.dataset.motionPopId=r;const h=document.createElement("style");a&&(h.nonce=a);const g=i??document.head;return g.appendChild(h),h.sheet&&h.sheet.insertRule(`
23
23
  [data-motion-pop-id="${r}"] {
24
24
  position: absolute !important;
25
25
  width: ${l}px !important;
@@ -27,157 +27,157 @@ React keys must be passed directly to JSX without using spread:
27
27
  ${m}px !important;
28
28
  top: ${c}px !important;
29
29
  }
30
- `),()=>{v.contains(g)&&v.removeChild(g)}},[t]),p.jsx(xp,{isPresent:t,childRef:o,sizeRef:s,children:C.cloneElement(e,{ref:o})})}const bp=({children:e,initial:t,isPresent:n,onExitComplete:i,custom:r,presenceAffectsLayout:o,mode:s,anchorX:a,root:l})=>{const u=li(wp),c=S.useId();let d=!0,f=S.useMemo(()=>(d=!1,{id:c,initial:t,isPresent:n,custom:r,onExitComplete:m=>{u.set(m,!0);for(const g of u.values())if(!g)return;i&&i()},register:m=>(u.set(m,!1),()=>u.delete(m))}),[n,u,i]);return o&&d&&(f={...f}),S.useMemo(()=>{u.forEach((m,g)=>u.set(g,!1))},[n]),C.useEffect(()=>{!n&&!u.size&&i&&i()},[n]),s==="popLayout"&&(e=p.jsx(yp,{isPresent:n,anchorX:a,root:l,children:e})),p.jsx(bn.Provider,{value:f,children:e})};function wp(){return new Map}function Xs(e=!0){const t=S.useContext(bn);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:i,register:r}=t,o=S.useId();S.useEffect(()=>{if(e)return r(o)},[e]);const s=S.useCallback(()=>e&&i&&i(o),[o,i,e]);return!n&&i?[!1,s]:[!0]}const Pn=e=>e.key||"";function Zs(e){const t=[];return S.Children.forEach(e,n=>{S.isValidElement(n)&&t.push(n)}),t}const An=({children:e,custom:t,initial:n=!0,onExitComplete:i,presenceAffectsLayout:r=!0,mode:o="sync",propagate:s=!1,anchorX:a="left",root:l})=>{const[u,c]=Xs(s),d=S.useMemo(()=>Zs(e),[e]),f=s&&!u?[]:d.map(Pn),m=S.useRef(!0),g=S.useRef(d),v=li(()=>new Map),[b,h]=S.useState(d),[T,w]=S.useState(d);Mo(()=>{m.current=!1,g.current=d;for(let P=0;P<T.length;P++){const E=Pn(T[P]);f.includes(E)?v.delete(E):v.get(E)!==!0&&v.set(E,!1)}},[T,f.length,f.join("-")]);const k=[];if(d!==b){let P=[...d];for(let E=0;E<T.length;E++){const A=T[E],M=Pn(A);f.includes(M)||(P.splice(E,0,A),k.push(A))}return o==="wait"&&k.length&&(P=k),w(Zs(P)),h(d),null}process.env.NODE_ENV!=="production"&&o==="wait"&&T.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:y}=S.useContext(ai);return p.jsx(p.Fragment,{children:T.map(P=>{const E=Pn(P),A=s&&!u?!1:d===T||f.includes(E),M=()=>{if(v.has(E))v.set(E,!0);else return;let W=!0;v.forEach(O=>{O||(W=!1)}),W&&(y?.(),w(g.current),s&&c?.(),i&&i())};return p.jsx(bp,{isPresent:A,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:r,mode:o,root:l,onExitComplete:A?void 0:M,anchorX:a,children:P},E)})})},Js=S.createContext({strict:!1}),Qs={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"]},Pt={};for(const e in Qs)Pt[e]={isEnabled:t=>Qs[e].some(n=>!!t[n])};function Tp(e){for(const t in e)Pt[t]={...Pt[t],...e[t]}}const Sp=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 Dn(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Sp.has(e)}let ea=e=>!Dn(e);function kp(e){typeof e=="function"&&(ea=t=>t.startsWith("on")?!Dn(t):e(t))}try{kp(require("@emotion/is-prop-valid").default)}catch{}function jp(e,t,n){const i={};for(const r in e)r==="values"&&typeof e.values=="object"||(ea(r)||n===!0&&Dn(r)||!t&&!Dn(r)||e.draggable&&r.startsWith("onDrag"))&&(i[r]=e[r]);return i}const Rn=S.createContext({});function On(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Qt(e){return typeof e=="string"||Array.isArray(e)}const Qi=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],er=["initial",...Qi];function Mn(e){return On(e.animate)||er.some(t=>Qt(e[t]))}function ta(e){return!!(Mn(e)||e.variants)}function Ep(e,t){if(Mn(e)){const{initial:n,animate:i}=e;return{initial:n===!1||Qt(n)?n:void 0,animate:Qt(i)?i:void 0}}return e.inherit!==!1?t:{}}function Cp(e){const{initial:t,animate:n}=Ep(e,S.useContext(Rn));return S.useMemo(()=>({initial:t,animate:n}),[na(t),na(n)])}function na(e){return Array.isArray(e)?e.join(" "):e}const en={};function Pp(e){for(const t in e)en[t]=e[t],xi(t)&&(en[t].isCSSVariable=!0)}function ia(e,{layout:t,layoutId:n}){return Et.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!en[e]||e==="opacity")}const Ap={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Dp=jt.length;function Rp(e,t,n){let i="",r=!0;for(let o=0;o<Dp;o++){const s=jt[o],a=e[s];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(s.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const u=zs(a,Ki[s]);if(!l){r=!1;const c=Ap[s]||s;i+=`${c}(${u}) `}n&&(t[s]=u)}}return i=i.trim(),n?i=n(t,r?"":i):r&&(i="none"),i}function tr(e,t,n){const{style:i,vars:r,transformOrigin:o}=e;let s=!1,a=!1;for(const l in t){const u=t[l];if(Et.has(l)){s=!0;continue}else if(xi(l)){r[l]=u;continue}else{const c=zs(u,Ki[l]);l.startsWith("origin")?(a=!0,o[l]=c):i[l]=c}}if(t.transform||(s||n?i.transform=Rp(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 nr=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ra(e,t,n){for(const i in t)!he(t[i])&&!ia(i,n)&&(e[i]=t[i])}function Op({transformTemplate:e},t){return S.useMemo(()=>{const n=nr();return tr(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Mp(e,t){const n=e.style||{},i={};return ra(i,n,e),Object.assign(i,Op(e,t)),i}function Ip(e,t){const n={},i=Mp(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 Np={offset:"stroke-dashoffset",array:"stroke-dasharray"},Fp={offset:"strokeDashoffset",array:"strokeDasharray"};function Vp(e,t,n=1,i=0,r=!0){e.pathLength=1;const o=r?Np:Fp;e[o.offset]=K.transform(-i);const s=K.transform(t),a=K.transform(n);e[o.array]=`${s} ${a}`}function oa(e,{attrX:t,attrY:n,attrScale:i,pathLength:r,pathSpacing:o=1,pathOffset:s=0,...a},l,u,c){if(tr(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),r!==void 0&&Vp(d,r,o,s,!1)}const sa=()=>({...nr(),attrs:{}}),aa=e=>typeof e=="string"&&e.toLowerCase()==="svg";function _p(e,t,n,i){const r=S.useMemo(()=>{const o=sa();return oa(o,t,aa(i),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};ra(o,e.style,e),r.style={...o,...r.style}}return r}const Lp=["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 ir(e){return typeof e!="string"||e.includes("-")?!1:!!(Lp.indexOf(e)>-1||/[A-Z]/u.test(e))}function zp(e,t,n,{latestValues:i},r,o=!1){const a=(ir(e)?_p:Ip)(t,i,r,e),l=jp(t,typeof e=="string",o),u=e!==S.Fragment?{...l,...a,ref:n}:{},{children:c}=t,d=S.useMemo(()=>he(c)?c.get():c,[c]);return S.createElement(e,{...u,children:d})}function la(e){const t=[{},{}];return e?.values.forEach((n,i)=>{t[0][i]=n.get(),t[1][i]=n.getVelocity()}),t}function rr(e,t,n,i){if(typeof t=="function"){const[r,o]=la(i);t=t(n!==void 0?n:e.custom,r,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[r,o]=la(i);t=t(n!==void 0?n:e.custom,r,o)}return t}function In(e){return he(e)?e.get():e}function Bp({scrapeMotionValuesFromProps:e,createRenderState:t},n,i,r){return{latestValues:$p(n,i,r,e),renderState:t()}}function $p(e,t,n,i){const r={},o=i(e,{});for(const f in o)r[f]=In(o[f]);let{initial:s,animate:a}=e;const l=Mn(e),u=ta(e);t&&u&&!l&&e.inherit!==!1&&(s===void 0&&(s=t.initial),a===void 0&&(a=t.animate));let c=n?n.initial===!1:!1;c=c||s===!1;const d=c?a:s;if(d&&typeof d!="boolean"&&!On(d)){const f=Array.isArray(d)?d:[d];for(let m=0;m<f.length;m++){const g=rr(e,f[m]);if(g){const{transitionEnd:v,transition:b,...h}=g;for(const T in h){let w=h[T];if(Array.isArray(w)){const k=c?w.length-1:0;w=w[k]}w!==null&&(r[T]=w)}for(const T in v)r[T]=v[T]}}}return r}const ca=e=>(t,n)=>{const i=S.useContext(Rn),r=S.useContext(bn),o=()=>Bp(e,t,i,r);return n?o():li(o)};function or(e,t,n){const{style:i}=e,r={};for(const o in i)(he(i[o])||t.style&&he(t.style[o])||ia(o,e)||n?.getValue(o)?.liveStyle!==void 0)&&(r[o]=i[o]);return r}const Wp=ca({scrapeMotionValuesFromProps:or,createRenderState:nr});function ua(e,t,n){const i=or(e,t,n);for(const r in e)if(he(e[r])||he(t[r])){const o=jt.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;i[o]=e[r]}return i}const Up=ca({scrapeMotionValuesFromProps:ua,createRenderState:sa}),qp=Symbol.for("motionComponentSymbol");function At(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Hp(e,t,n){return S.useCallback(i=>{i&&e.onMount&&e.onMount(i),t&&(i?t.mount(i):t.unmount()),n&&(typeof n=="function"?n(i):At(n)&&(n.current=i))},[t])}const sr=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),da="data-"+sr("framerAppearId"),pa=S.createContext({});function Kp(e,t,n,i,r){const{visualElement:o}=S.useContext(Rn),s=S.useContext(Js),a=S.useContext(bn),l=S.useContext(Ji).reducedMotion,u=S.useRef(null);i=i||s.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=S.useContext(pa);c&&!c.projection&&r&&(c.type==="html"||c.type==="svg")&&Yp(u.current,n,r,d);const f=S.useRef(!1);S.useInsertionEffect(()=>{c&&f.current&&c.update(n,a)});const m=n[da],g=S.useRef(!!m&&!window.MotionHandoffIsComplete?.(m)&&window.MotionHasOptimisedAnimation?.(m));return Mo(()=>{c&&(f.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),g.current&&c.animationState&&c.animationState.animateChanges())}),S.useEffect(()=>{c&&(!g.current&&c.animationState&&c.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(m)}),g.current=!1),c.enteringChildren=void 0)}),c}function Yp(e,t,n,i){const{layoutId:r,layout:o,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:fa(e.parent)),e.projection.setOptions({layoutId:r,layout:o,alwaysMeasureLayout:!!s||a&&At(a),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:i,crossfade:c,layoutScroll:l,layoutRoot:u})}function fa(e){if(e)return e.options.allowProjection!==!1?e.projection:fa(e.parent)}function ar(e,{forwardMotionProps:t=!1}={},n,i){n&&Tp(n);const r=ir(e)?Up:Wp;function o(a,l){let u;const c={...S.useContext(Ji),...a,layoutId:Gp(a)},{isStatic:d}=c,f=Cp(a),m=r(a,d);if(!d&&ci){Xp(c,n);const g=Zp(c);u=g.MeasureLayout,f.visualElement=Kp(e,m,c,i,g.ProjectionNode)}return p.jsxs(Rn.Provider,{value:f,children:[u&&f.visualElement?p.jsx(u,{visualElement:f.visualElement,...c}):null,zp(e,a,Hp(m,f.visualElement,l),m,d,t)]})}o.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const s=S.forwardRef(o);return s[qp]=e,s}function Gp({layoutId:e}){const t=S.useContext(ai).id;return t&&e!==void 0?t+"-"+e:e}function Xp(e,t){const n=S.useContext(Js).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?bt(!1,i,"lazy-strict-mode"):Ee(!1,i,"lazy-strict-mode")}}function Zp(e){const{drag:t,layout:n}=Pt;if(!t&&!n)return{};const i={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function Jp(e,t){if(typeof Proxy>"u")return ar;const n=new Map,i=(o,s)=>ar(o,s,e,t),r=(o,s)=>(process.env.NODE_ENV!=="production"&&mi(!1,"motion() is deprecated. Use motion.create() instead."),i(o,s));return new Proxy(r,{get:(o,s)=>s==="create"?i:(n.has(s)||n.set(s,ar(s,void 0,e,t)),n.get(s))})}function ma({top:e,left:t,right:n,bottom:i}){return{x:{min:t,max:n},y:{min:e,max:i}}}function Qp({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function ef(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 lr(e){return e===void 0||e===1}function cr({scale:e,scaleX:t,scaleY:n}){return!lr(e)||!lr(t)||!lr(n)}function lt(e){return cr(e)||ha(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function ha(e){return ga(e.x)||ga(e.y)}function ga(e){return e&&e!=="0%"}function Nn(e,t,n){const i=e-n,r=t*i;return n+r}function va(e,t,n,i,r){return r!==void 0&&(e=Nn(e,r,i)),Nn(e,n,i)+t}function ur(e,t=0,n=1,i,r){e.min=va(e.min,t,n,i,r),e.max=va(e.max,t,n,i,r)}function xa(e,{x:t,y:n}){ur(e.x,t.translate,t.scale,t.originPoint),ur(e.y,n.translate,n.scale,n.originPoint)}const ya=.999999999999,ba=1.0000000000001;function tf(e,t,n,i=!1){const r=n.length;if(!r)return;t.x=t.y=1;let o,s;for(let a=0;a<r;a++){o=n[a],s=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&&Rt(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,xa(e,s)),i&&lt(o.latestValues)&&Rt(e,o.latestValues))}t.x<ba&&t.x>ya&&(t.x=1),t.y<ba&&t.y>ya&&(t.y=1)}function Dt(e,t){e.min=e.min+t,e.max=e.max+t}function wa(e,t,n,i,r=.5){const o=ae(e.min,e.max,r);ur(e,t,n,o,i)}function Rt(e,t){wa(e.x,t.x,t.scaleX,t.scale,t.originX),wa(e.y,t.y,t.scaleY,t.scale,t.originY)}function Ta(e,t){return ma(ef(e.getBoundingClientRect(),t))}function nf(e,t,n){const i=Ta(e,n),{scroll:r}=t;return r&&(Dt(i.x,r.offset.x),Dt(i.y,r.offset.y)),i}const Sa=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ot=()=>({x:Sa(),y:Sa()}),ka=()=>({min:0,max:0}),ue=()=>({x:ka(),y:ka()}),dr={current:null},ja={current:!1};function rf(){if(ja.current=!0,!!ci)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>dr.current=e.matches;e.addEventListener("change",t),t()}else dr.current=!1}const tn=new WeakMap;function of(e,t,n){for(const i in t){const r=t[i],o=n[i];if(he(r))e.addValue(i,r);else if(he(o))e.addValue(i,Ct(r,{owner:e}));else if(o!==r)if(e.hasValue(i)){const s=e.getValue(i);s.liveStyle===!0?s.jump(r):s.hasAnimated||s.set(r)}else{const s=e.getStaticValue(i);e.addValue(i,Ct(s!==void 0?s:r,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const Ea=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Ca{scrapeMotionValuesFromProps(t,n,i){return{}}constructor({parent:t,props:n,presenceContext:i,reducedMotionConfig:r,blockInitialAnimation:o,visualState:s},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=$i,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=we.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,se.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=s;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=r,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=Mn(n),this.isVariantNode=ta(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 m=d[f];l[f]!==void 0&&he(m)&&m.set(l[f])}}mount(t){this.current=t,tn.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)),ja.current||rf(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:dr.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(),Xe(this.notifyUpdate),Xe(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=Et.has(t);i&&this.onBindTransform&&this.onBindTransform();const r=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&se.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,()=>{r(),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 Pt){const n=Pt[t];if(!n)continue;const{isEnabled:i,Feature:r}=n;if(!this.features[t]&&r&&i(this.props)&&(this.features[t]=new r(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):ue()}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<Ea.length;i++){const r=Ea[i];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const o="on"+r,s=t[o];s&&(this.propEventSubscriptions[r]=this.on(r,s))}this.prevMotionValues=of(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=Ct(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"&&(Io(i)||Fo(i))?i=parseFloat(i):!vp(i)&&Je.test(n)&&(i=_s(t,n)),this.setBaseTarget(t,he(i)?i.get():i)),he(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=rr(this.props,n,this.presenceContext?.custom);o&&(i=o[t])}if(n&&i!==void 0)return i;const r=this.getBaseTargetFromProps(this.props,t);return r!==void 0&&!he(r)?r:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new fi),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Yi.render(this.render)}}class Pa extends Ca{constructor(){super(...arguments),this.KeyframeResolver=ap}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;he(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Aa(e,{style:t,vars:n},i,r){const o=e.style;let s;for(s in t)o[s]=t[s];r?.applyProjectionStyles(o,i);for(s in n)o.setProperty(s,n[s])}function sf(e){return window.getComputedStyle(e)}class Da extends Pa{constructor(){super(...arguments),this.type="html",this.renderInstance=Aa}readValueFromInstance(t,n){if(Et.has(n))return this.projection?.isProjecting?Vi(n):kd(t,n);{const i=sf(t),r=(xi(n)?i.getPropertyValue(n):i[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Ta(t,n)}build(t,n,i){tr(t,n,i.transformTemplate)}scrapeMotionValuesFromProps(t,n,i){return or(t,n,i)}}const Ra=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 af(e,t,n,i){Aa(e,t,void 0,i);for(const r in t.attrs)e.setAttribute(Ra.has(r)?r:sr(r),t.attrs[r])}class Oa extends Pa{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ue}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Et.has(n)){const i=Vs(n);return i&&i.default||0}return n=Ra.has(n)?n:sr(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,i){return ua(t,n,i)}build(t,n,i){oa(t,n,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,n,i,r){af(t,n,i,r)}mount(t){this.isSVGTag=aa(t.tagName),super.mount(t)}}const lf=(e,t)=>ir(e)?new Oa(t):new Da(t,{allowProjection:e!==S.Fragment});function Mt(e,t,n){const i=e.getProps();return rr(i,t,n!==void 0?n:i.custom,e)}const pr=e=>Array.isArray(e);function cf(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ct(n))}function uf(e){return pr(e)?e[e.length-1]||0:e}function df(e,t){const n=Mt(e,t);let{transitionEnd:i={},transition:r={},...o}=n||{};o={...o,...i};for(const s in o){const a=uf(o[s]);cf(e,s,a)}}function pf(e){return!!(he(e)&&e.add)}function fr(e,t){const n=e.getValue("willChange");if(pf(n))return n.add(t);if(!n&&Ue.WillChange){const i=new Ue.WillChange("auto");e.addValue("willChange",i),i.add(t)}}function Ma(e){return e.props[da]}const ff=e=>e!==null;function mf(e,{repeat:t,repeatType:n="loop"},i){const r=e.filter(ff),o=t&&n!=="loop"&&t%2===1?0:r.length-1;return r[o]}const hf={type:"spring",stiffness:500,damping:25,restSpeed:10},gf=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),vf={type:"keyframes",duration:.8},xf={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},yf=(e,{keyframes:t})=>t.length>2?vf:Et.has(e)?e.startsWith("scale")?gf(t[1]):hf:xf;function bf({when:e,delay:t,delayChildren:n,staggerChildren:i,staggerDirection:r,repeat:o,repeatType:s,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const mr=(e,t,n,i={},r,o)=>s=>{const a=qi(i,e)||{},l=a.delay||i.delay||0;let{elapsed:u=0}=i;u=u-Pe(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:()=>{s(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:o?void 0:r};bf(a)||Object.assign(c,yf(e,c)),c.duration&&(c.duration=Pe(c.duration)),c.repeatDelay&&(c.repeatDelay=Pe(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(Ui(c),c.delay===0&&(d=!0)),(Ue.instantAnimations||Ue.skipAnimations)&&(d=!0,Ui(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,d&&!o&&t.get()!==void 0){const f=mf(c.keyframes,a);if(f!==void 0){se.update(()=>{c.onUpdate(f),c.onComplete()});return}}return a.isSync?new Ii(c):new Kd(c)};function wf({protectedKeys:e,needsAnimating:t},n){const i=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,i}function hr(e,t,{delay:n=0,transitionOverride:i,type:r}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:s,...a}=t;i&&(o=i);const l=[],u=r&&e.animationState&&e.animationState.getState()[r];for(const c in a){const d=e.getValue(c,e.latestValues[c]??null),f=a[c];if(f===void 0||u&&wf(u,c))continue;const m={delay:n,...qi(o||{},c)},g=d.get();if(g!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===g&&!m.velocity)continue;let v=!1;if(window.MotionHandoffAnimation){const h=Ma(e);if(h){const T=window.MotionHandoffAnimation(h,c,se);T!==null&&(m.startTime=T,v=!0)}}fr(e,c),d.start(mr(c,d,f,e.shouldReduceMotion&&Os.has(c)?{type:!1}:m,e,v));const b=d.animation;b&&l.push(b)}return s&&Promise.all(l).then(()=>{se.update(()=>{s&&df(e,s)})}),l}function Ia(e,t,n,i=0,r=1){const o=Array.from(e).sort((u,c)=>u.sortNodePosition(c)).indexOf(t),s=e.size,a=(s-1)*i;return typeof n=="function"?n(o,s):r===1?o*i:a-o*i}function gr(e,t,n={}){const i=Mt(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:r=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(r=n.transitionOverride);const o=i?()=>Promise.all(hr(e,i,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:c,staggerDirection:d}=r;return Tf(e,t,l,u,c,d,n)}:()=>Promise.resolve(),{when:a}=r;if(a){const[l,u]=a==="beforeChildren"?[o,s]:[s,o];return l().then(()=>u())}else return Promise.all([o(),s(n.delay)])}function Tf(e,t,n=0,i=0,r=0,o=1,s){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(gr(l,t,{...s,delay:n+(typeof i=="function"?0:i)+Ia(e.variantChildren,l,i,r,o)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function Sf(e,t,n={}){e.notify("AnimationStart",t);let i;if(Array.isArray(t)){const r=t.map(o=>gr(e,o,n));i=Promise.all(r)}else if(typeof t=="string")i=gr(e,t,n);else{const r=typeof t=="function"?Mt(e,t,n.custom):t;i=Promise.all(hr(e,r,n))}return i.then(()=>{e.notify("AnimationComplete",t)})}function Na(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 kf=er.length;function Fa(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Fa(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<kf;n++){const i=er[n],r=e.props[i];(Qt(r)||r===!1)&&(t[i]=r)}return t}const jf=[...Qi].reverse(),Ef=Qi.length;function Cf(e){return t=>Promise.all(t.map(({animation:n,options:i})=>Sf(e,n,i)))}function Pf(e){let t=Cf(e),n=Va(),i=!0;const r=l=>(u,c)=>{const d=Mt(e,c,l==="exit"?e.presenceContext?.custom:void 0);if(d){const{transition:f,transitionEnd:m,...g}=d;u={...u,...g,...m}}return u};function o(l){t=l(e)}function s(l){const{props:u}=e,c=Fa(e.parent)||{},d=[],f=new Set;let m={},g=1/0;for(let b=0;b<Ef;b++){const h=jf[b],T=n[h],w=u[h]!==void 0?u[h]:c[h],k=Qt(w),y=h===l?T.isActive:null;y===!1&&(g=b);let P=w===c[h]&&w!==u[h]&&k;if(P&&i&&e.manuallyAnimateOnMount&&(P=!1),T.protectedKeys={...m},!T.isActive&&y===null||!w&&!T.prevProp||On(w)||typeof w=="boolean")continue;const E=Af(T.prevProp,w);let A=E||h===l&&T.isActive&&!P&&k||b>g&&k,M=!1;const W=Array.isArray(w)?w:[w];let O=W.reduce(r(h),{});y===!1&&(O={});const{prevResolvedValues:J={}}=T,Y={...J,...O},F=X=>{A=!0,f.has(X)&&(M=!0,f.delete(X)),T.needsAnimating[X]=!0;const q=e.getValue(X);q&&(q.liveStyle=!1)};for(const X in Y){const q=O[X],Z=J[X];if(m.hasOwnProperty(X))continue;let x=!1;pr(q)&&pr(Z)?x=!Na(q,Z):x=q!==Z,x?q!=null?F(X):f.add(X):q!==void 0&&f.has(X)?F(X):T.protectedKeys[X]=!0}T.prevProp=w,T.prevResolvedValues=O,T.isActive&&(m={...m,...O}),i&&e.blockInitialAnimation&&(A=!1);const ee=P&&E;A&&(!ee||M)&&d.push(...W.map(X=>{const q={type:h};if(typeof X=="string"&&i&&!ee&&e.manuallyAnimateOnMount&&e.parent){const{parent:Z}=e,x=Mt(Z,X);if(Z.enteringChildren&&x){const{delayChildren:j}=x.transition||{};q.delay=Ia(Z.enteringChildren,e,j)}}return{animation:X,options:q}}))}if(f.size){const b={};if(typeof u.initial!="boolean"){const h=Mt(e,Array.isArray(u.initial)?u.initial[0]:u.initial);h&&h.transition&&(b.transition=h.transition)}f.forEach(h=>{const T=e.getBaseTarget(h),w=e.getValue(h);w&&(w.liveStyle=!0),b[h]=T??null}),d.push({animation:b})}let v=!!d.length;return i&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(v=!1),i=!1,v?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=s(l);for(const d in n)n[d].protectedKeys={};return c}return{animateChanges:s,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Va(),i=!0}}}function Af(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Na(t,e):!1}function ct(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Va(){return{animate:ct(!0),whileInView:ct(),whileHover:ct(),whileTap:ct(),whileDrag:ct(),whileFocus:ct(),exit:ct()}}class Qe{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Df extends Qe{constructor(t){super(t),t.animationState||(t.animationState=Pf(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();On(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 Rf=0;class Of extends Qe{constructor(){super(...arguments),this.id=Rf++}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 r=this.node.animationState.setActive("exit",!t);n&&!t&&r.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 Mf={animation:{Feature:Df},exit:{Feature:Of}};function nn(e,t,n,i={passive:!0}){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n)}function rn(e){return{point:{x:e.pageX,y:e.pageY}}}const If=e=>t=>Gi(t)&&e(t,rn(t));function on(e,t,n,i){return nn(e,t,If(n),i)}const _a=1e-4,Nf=1-_a,Ff=1+_a,La=.01,Vf=0-La,_f=0+La;function be(e){return e.max-e.min}function Lf(e,t,n){return Math.abs(e-t)<=n}function za(e,t,n,i=.5){e.origin=i,e.originPoint=ae(t.min,t.max,e.origin),e.scale=be(n)/be(t),e.translate=ae(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Nf&&e.scale<=Ff||isNaN(e.scale))&&(e.scale=1),(e.translate>=Vf&&e.translate<=_f||isNaN(e.translate))&&(e.translate=0)}function sn(e,t,n,i){za(e.x,t.x,n.x,i?i.originX:void 0),za(e.y,t.y,n.y,i?i.originY:void 0)}function Ba(e,t,n){e.min=n.min+t.min,e.max=e.min+be(t)}function zf(e,t,n){Ba(e.x,t.x,n.x),Ba(e.y,t.y,n.y)}function $a(e,t,n){e.min=t.min-n.min,e.max=e.min+be(t)}function an(e,t,n){$a(e.x,t.x,n.x),$a(e.y,t.y,n.y)}function Ae(e){return[e("x"),e("y")]}const Wa=({current:e})=>e?e.ownerDocument.defaultView:null,Ua=(e,t)=>Math.abs(e-t);function Bf(e,t){const n=Ua(e.x,t.x),i=Ua(e.y,t.y);return Math.sqrt(n**2+i**2)}class qa{constructor(t,n,{transformPagePoint:i,contextWindow:r=window,dragSnapToOrigin:o=!1,distanceThreshold:s=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=xr(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,g=Bf(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!g)return;const{point:v}=f,{timestamp:b}=ge;this.history.push({...v,timestamp:b});const{onStart:h,onMove:T}=this.handlers;m||(h&&h(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),T&&T(this.lastMoveEvent,f)},this.handlePointerMove=(f,m)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=vr(m,this.transformPagePoint),se.update(this.updatePoint,!0)},this.handlePointerUp=(f,m)=>{this.end();const{onEnd:g,onSessionEnd:v,resumeAnimation:b}=this.handlers;if(this.dragSnapToOrigin&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=xr(f.type==="pointercancel"?this.lastMoveEventInfo:vr(m,this.transformPagePoint),this.history);this.startEvent&&g&&g(f,h),v&&v(f,h)},!Gi(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=i,this.distanceThreshold=s,this.contextWindow=r||window;const a=rn(t),l=vr(a,this.transformPagePoint),{point:u}=l,{timestamp:c}=ge;this.history=[{...u,timestamp:c}];const{onSessionStart:d}=n;d&&d(t,xr(l,this.history)),this.removeListeners=qt(on(this.contextWindow,"pointermove",this.handlePointerMove),on(this.contextWindow,"pointerup",this.handlePointerUp),on(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Xe(this.updatePoint)}}function vr(e,t){return t?{point:t(e.point)}:e}function Ha(e,t){return{x:e.x-t.x,y:e.y-t.y}}function xr({point:e},t){return{point:e,delta:Ha(e,Ka(t)),offset:Ha(e,$f(t)),velocity:Wf(t,.1)}}function $f(e){return e[0]}function Ka(e){return e[e.length-1]}function Wf(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,i=null;const r=Ka(e);for(;n>=0&&(i=e[n],!(r.timestamp-i.timestamp>Pe(t)));)n--;if(!i)return{x:0,y:0};const o=Ie(r.timestamp-i.timestamp);if(o===0)return{x:0,y:0};const s={x:(r.x-i.x)/o,y:(r.y-i.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function Uf(e,{min:t,max:n},i){return t!==void 0&&e<t?e=i?ae(t,e,i.min):Math.max(e,t):n!==void 0&&e>n&&(e=i?ae(n,e,i.max):Math.min(e,n)),e}function Ya(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 qf(e,{top:t,left:n,bottom:i,right:r}){return{x:Ya(e.x,n,r),y:Ya(e.y,t,i)}}function Ga(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 Hf(e,t){return{x:Ga(e.x,t.x),y:Ga(e.y,t.y)}}function Kf(e,t){let n=.5;const i=be(e),r=be(t);return r>i?n=wt(t.min,t.max-i,e.min):i>r&&(n=wt(e.min,e.max-r,t.min)),We(0,1,n)}function Yf(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 yr=.35;function Gf(e=yr){return e===!1?e=0:e===!0&&(e=yr),{x:Xa(e,"left","right"),y:Xa(e,"top","bottom")}}function Xa(e,t,n){return{min:Za(e,t),max:Za(e,n)}}function Za(e,t){return typeof e=="number"?e:e[t]||0}const Xf=new WeakMap;class Zf{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=ue(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:i}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(rn(d).point)},s=(d,f)=>{const{drag:m,dragPropagation:g,onDragStart:v}=this.getProps();if(m&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=up(m),!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),Ae(h=>{let T=this.getAxisMotionValue(h).get()||0;if(Ne.test(T)){const{projection:w}=this.visualElement;if(w&&w.layout){const k=w.layout.layoutBox[h];k&&(T=be(k)*(parseFloat(T)/100))}}this.originPoint[h]=T}),v&&se.postRender(()=>v(d,f)),fr(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},a=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:m,dragDirectionLock:g,onDirectionLock:v,onDrag:b}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:h}=f;if(g&&this.currentDirection===null){this.currentDirection=Jf(h),this.currentDirection!==null&&v&&v(this.currentDirection);return}this.updateAxis("x",f.point,h),this.updateAxis("y",f.point,h),this.visualElement.render(),b&&b(d,f)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>Ae(d=>this.getAnimationState(d)==="paused"&&this.getAxisMotionValue(d).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new qa(t,{onSessionStart:o,onStart:s,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:i,contextWindow:Wa(this.visualElement)})}stop(t,n){const i=t||this.latestPointerEvent,r=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!r||!i)return;const{velocity:s}=r;this.startAnimation(s);const{onDragEnd:a}=this.getProps();a&&se.postRender(()=>a(i,r))}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:r}=this.getProps();if(!i||!Fn(t,r,this.currentDirection))return;const o=this.getAxisMotionValue(t);let s=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(s=Uf(s,this.constraints[t],this.elastic[t])),o.set(s)}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,r=this.constraints;t&&At(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=qf(i.layoutBox,t):this.constraints=!1,this.elastic=Gf(n),r!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Ae(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Yf(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!At(t))return!1;const i=t.current;Ee(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:r}=this.visualElement;if(!r||!r.layout)return!1;const o=nf(i,r.root,this.visualElement.getTransformPagePoint());let s=Hf(r.layout.layoutBox,o);if(n){const a=n(Qp(s));this.hasMutatedConstraints=!!a,a&&(s=ma(a))}return s}startAnimation(t){const{drag:n,dragMomentum:i,dragElastic:r,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=Ae(c=>{if(!Fn(c,n,this.currentDirection))return;let d=l&&l[c]||{};s&&(d={min:0,max:0});const f=r?200:1e6,m=r?40:1e7,g={type:"inertia",velocity:i?t[c]:0,bounceStiffness:f,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...o,...d};return this.startAxisValueAnimation(c,g)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const i=this.getAxisMotionValue(t);return fr(this.visualElement,t),i.start(mr(t,i,0,n,this.visualElement,!1))}stopAnimation(){Ae(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Ae(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(),r=i[n];return r||this.visualElement.getValue(t,(i.initial?i.initial[t]:void 0)||0)}snapToCursor(t){Ae(n=>{const{drag:i}=this.getProps();if(!Fn(n,i,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(n);if(r&&r.layout){const{min:s,max:a}=r.layout.layoutBox[n];o.set(t[n]-ae(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!At(n)||!i||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Ae(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const l=a.get();r[s]=Kf({min:l,max:l},this.constraints[s])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),Ae(s=>{if(!Fn(s,t,null))return;const a=this.getAxisMotionValue(s),{min:l,max:u}=this.constraints[s];a.set(ae(l,u,r[s]))})}addListeners(){if(!this.visualElement.current)return;Xf.set(this.visualElement,this);const t=this.visualElement.current,n=on(t,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),i=()=>{const{dragConstraints:l}=this.getProps();At(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,o=r.addEventListener("measure",i);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),se.read(i);const s=nn(window,"resize",()=>this.scalePositionWithinConstraints()),a=r.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(Ae(c=>{const d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=l[c].translate,d.set(d.get()+l[c].translate))}),this.visualElement.render())}));return()=>{s(),n(),o(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:i=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:s=yr,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:i,dragPropagation:r,dragConstraints:o,dragElastic:s,dragMomentum:a}}}function Fn(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Jf(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Qf extends Qe{constructor(t){super(t),this.removeGroupControls=Ce,this.removeListeners=Ce,this.controls=new Zf(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ce}unmount(){this.removeGroupControls(),this.removeListeners()}}const Ja=e=>(t,n)=>{e&&se.postRender(()=>e(t,n))};class em extends Qe{constructor(){super(...arguments),this.removePointerDownListener=Ce}onPointerDown(t){this.session=new qa(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Wa(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:i,onPanEnd:r}=this.node.getProps();return{onSessionStart:Ja(t),onStart:Ja(n),onMove:i,onEnd:(o,s)=>{delete this.session,r&&se.postRender(()=>r(o,s))}}}mount(){this.removePointerDownListener=on(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 Vn={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Qa(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ln={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(K.test(e))e=parseFloat(e);else return e;const n=Qa(e,t.target.x),i=Qa(e,t.target.y);return`${n}% ${i}%`}},tm={correct:(e,{treeScale:t,projectionDelta:n})=>{const i=e,r=Je.parse(e);if(r.length>5)return i;const o=Je.createTransformer(e),s=typeof r[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;r[0+s]/=a,r[1+s]/=l;const u=ae(a,l,.5);return typeof r[2+s]=="number"&&(r[2+s]/=u),typeof r[3+s]=="number"&&(r[3+s]/=u),o(r)}};let br=!1;class nm extends S.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i,layoutId:r}=this.props,{projection:o}=t;Pp(im),o&&(n.group&&n.group.add(o),i&&i.register&&r&&i.register(o),br&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Vn.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:i,drag:r,isPresent:o}=this.props,{projection:s}=i;return s&&(s.isPresent=o,br=!0,r||t.layoutDependency!==n||n===void 0||t.isPresent!==o?s.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?s.promote():s.relegate()||se.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Yi.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i}=this.props,{projection:r}=t;br=!0,r&&(r.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(r),i&&i.deregister&&i.deregister(r))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function el(e){const[t,n]=Xs(),i=S.useContext(ai);return p.jsx(nm,{...e,layoutGroup:i,switchLayoutGroup:S.useContext(pa),isPresent:t,safeToRemove:n})}const im={borderRadius:{...ln,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ln,borderTopRightRadius:ln,borderBottomLeftRadius:ln,borderBottomRightRadius:ln,boxShadow:tm};function tl(e,t,n){const i=he(e)?e:Ct(e);return i.start(mr("",i,t,n)),i.animation}const rm=(e,t)=>e.depth-t.depth;class om{constructor(){this.children=[],this.isDirty=!1}add(t){ui(this.children,t),this.isDirty=!0}remove(t){wn(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(rm),this.isDirty=!1,this.children.forEach(t)}}function sm(e,t){const n=we.now(),i=({timestamp:r})=>{const o=r-n;o>=t&&(Xe(i),e(o-t))};return se.setup(i,!0),()=>Xe(i)}const nl=["TopLeft","TopRight","BottomLeft","BottomRight"],am=nl.length,il=e=>typeof e=="string"?parseFloat(e):e,rl=e=>typeof e=="number"||K.test(e);function lm(e,t,n,i,r,o){r?(e.opacity=ae(0,n.opacity??1,cm(i)),e.opacityExit=ae(t.opacity??1,0,um(i))):o&&(e.opacity=ae(t.opacity??1,n.opacity??1,i));for(let s=0;s<am;s++){const a=`border${nl[s]}Radius`;let l=ol(t,a),u=ol(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||rl(l)===rl(u)?(e[a]=Math.max(ae(il(l),il(u),i),0),(Ne.test(u)||Ne.test(l))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=ae(t.rotate||0,n.rotate||0,i))}function ol(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const cm=sl(0,.5,qo),um=sl(.5,.95,Ce);function sl(e,t,n){return i=>i<e?0:i>t?1:n(wt(e,t,i))}function al(e,t){e.min=t.min,e.max=t.max}function De(e,t){al(e.x,t.x),al(e.y,t.y)}function ll(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function cl(e,t,n,i,r){return e-=t,e=Nn(e,1/n,i),r!==void 0&&(e=Nn(e,1/r,i)),e}function dm(e,t=0,n=1,i=.5,r,o=e,s=e){if(Ne.test(t)&&(t=parseFloat(t),t=ae(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=ae(o.min,o.max,i);e===o&&(a-=t),e.min=cl(e.min,t,n,a,r),e.max=cl(e.max,t,n,a,r)}function ul(e,t,[n,i,r],o,s){dm(e,t[n],t[i],t[r],t.scale,o,s)}const pm=["x","scaleX","originX"],fm=["y","scaleY","originY"];function dl(e,t,n,i){ul(e.x,t,pm,n?n.x:void 0,i?i.x:void 0),ul(e.y,t,fm,n?n.y:void 0,i?i.y:void 0)}function pl(e){return e.translate===0&&e.scale===1}function fl(e){return pl(e.x)&&pl(e.y)}function ml(e,t){return e.min===t.min&&e.max===t.max}function mm(e,t){return ml(e.x,t.x)&&ml(e.y,t.y)}function hl(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function gl(e,t){return hl(e.x,t.x)&&hl(e.y,t.y)}function vl(e){return be(e.x)/be(e.y)}function xl(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class hm{constructor(){this.members=[]}add(t){ui(this.members,t),t.scheduleRender()}remove(t){if(wn(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(r=>t===r);if(n===0)return!1;let i;for(let r=n;r>=0;r--){const o=this.members[r];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:r}=t.options;r===!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 gm(e,t,n){let i="";const r=e.x.translate/t.x,o=e.y.translate/t.y,s=n?.z||0;if((r||o||s)&&(i=`translate3d(${r}px, ${o}px, ${s}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:m,skewY:g}=n;u&&(i=`perspective(${u}px) ${i}`),c&&(i+=`rotate(${c}deg) `),d&&(i+=`rotateX(${d}deg) `),f&&(i+=`rotateY(${f}deg) `),m&&(i+=`skewX(${m}deg) `),g&&(i+=`skewY(${g}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 wr=["","X","Y","Z"],vm=1e3;let xm=0;function Tr(e,t,n,i){const{latestValues:r}=t;r[e]&&(n[e]=r[e],t.setStaticValue(e,0),i&&(i[e]=0))}function yl(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Ma(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:r,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",se,!(r||o))}const{parent:i}=e;i&&!i.hasCheckedOptimisedAppear&&yl(i)}function bl({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:i,resetTransform:r}){return class{constructor(s={},a=t?.()){this.id=xm++,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(wm),this.nodes.forEach(jm),this.nodes.forEach(Em),this.nodes.forEach(Tm)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,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 om)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new fi),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const l=this.eventHandlers.get(s);l&&l.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s){if(this.instance)return;this.isSVG=Zi(s)&&!Gs(s),this.instance=s;const{layoutId:a,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(s),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;se.read(()=>{d=window.innerWidth}),e(s,()=>{const m=window.innerWidth;m!==d&&(d=m,this.root.updateBlockedByResize=!0,c&&c(),c=sm(f,250),Vn.hasAnimatedSinceResize&&(Vn.hasAnimatedSinceResize=!1,this.nodes.forEach(Sl)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||u.getDefaultTransition()||Rm,{onLayoutAnimationStart:v,onLayoutAnimationComplete:b}=u.getProps(),h=!this.targetLayout||!gl(this.targetLayout,m),T=!d&&f;if(this.options.layoutRoot||this.resumeFrom||T||d&&(h||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const w={...qi(g,"layout"),onPlay:v,onComplete:b};(u.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(c,T)}else d||Sl(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Xe(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(Cm),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&yl(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(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(wl);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Tl);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(km),this.nodes.forEach(ym),this.nodes.forEach(bm)):this.nodes.forEach(Tl),this.clearAllSnapshots();const a=we.now();ge.delta=We(0,1e3/60,a-ge.timestamp),ge.timestamp=a,ge.isProcessing=!0,vi.update.process(ge),vi.preRender.process(ge),vi.render.process(ge),ge.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Yi.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Sm),this.sharedNodes.forEach(Pm)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,se.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){se.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!be(this.snapshot.measuredBox.x)&&!be(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 s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=ue(),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,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&this.instance){const l=i(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!r)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!fl(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;s&&this.instance&&(a||lt(this.latestValues)||c)&&(r(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return s&&(l=this.removeTransform(l)),Om(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return ue();const a=s.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Mm))){const{scroll:u}=this.root;u&&(Dt(a.x,u.offset.x),Dt(a.y,u.offset.y))}return a}removeElementScroll(s){const a=ue();if(De(a,s),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&&De(a,s),Dt(a.x,c.offset.x),Dt(a.y,c.offset.y))}return a}applyTransform(s,a=!1){const l=ue();De(l,s);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&Rt(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),lt(c.latestValues)&&Rt(l,c.latestValues)}return lt(this.latestValues)&&Rt(l,this.latestValues),l}removeTransform(s){const a=ue();De(a,s);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!lt(u.latestValues))continue;cr(u.latestValues)&&u.updateSnapshot();const c=ue(),d=u.measurePageBox();De(c,d),dl(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return lt(this.latestValues)&&dl(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.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!==ge.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!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(!(s||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=ge.timestamp,!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ue(),this.relativeTargetOrigin=ue(),an(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),De(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=ue(),this.targetWithTransforms=ue()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),zf(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):De(this.target,this.layout.layoutBox),xa(this.target,this.targetDelta)):De(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=ue(),this.relativeTargetOrigin=ue(),an(this.relativeTargetOrigin,this.target,f.target),De(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||cr(this.parent.latestValues)||ha(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 s=this.getLead(),a=!!this.resumingFrom||this!==s;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===ge.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;De(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;tf(this.layoutCorrected,this.treeScale,this.path,a),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=ue());const{target:m}=s;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(ll(this.prevProjectionDelta.x,this.projectionDelta.x),ll(this.prevProjectionDelta.y,this.projectionDelta.y)),sn(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!xl(this.projectionDelta.x,this.prevProjectionDelta.x)||!xl(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.visualElement?.scheduleRender(),s){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ot(),this.projectionDelta=Ot(),this.projectionDeltaWithTransform=Ot()}setAnimationOrigin(s,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},d=Ot();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=ue(),m=l?l.source:void 0,g=this.layout?this.layout.source:void 0,v=m!==g,b=this.getStack(),h=!b||b.members.length<=1,T=!!(v&&!h&&this.options.crossfade===!0&&!this.path.some(Dm));this.animationProgress=0;let w;this.mixTargetDelta=k=>{const y=k/1e3;kl(d.x,s.x,y),kl(d.y,s.y,y),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(an(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Am(this.relativeTarget,this.relativeTargetOrigin,f,y),w&&mm(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=ue()),De(w,this.relativeTarget)),v&&(this.animationValues=c,lm(c,u,this.latestValues,y,T,h)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=y},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Xe(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=se.update(()=>{Vn.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ct(0)),this.currentAnimation=tl(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onStop:()=>{},onComplete:()=>{s.onComplete&&s.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 s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(vm),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=s;if(!(!a||!l||!u)){if(this!==s&&this.layout&&u&&Al(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||ue();const d=be(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+d;const f=be(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+f}De(a,l),Rt(a,c),sn(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new hm),this.sharedNodes.get(s).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 s=this.getStack();return s?s.lead===this:!0}getLead(){const{layoutId:s}=this.options;return s?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:s}=this.options;return s?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&Tr("z",s,u,this.animationValues);for(let c=0;c<wr.length;c++)Tr(`rotate${wr[c]}`,s,u,this.animationValues),Tr(`skew${wr[c]}`,s,u,this.animationValues);s.render();for(const c in u)s.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);s.scheduleRender()}applyProjectionStyles(s,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){s.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,s.visibility="",s.opacity="",s.pointerEvents=In(a?.pointerEvents)||"",s.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(s.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,s.pointerEvents=In(a?.pointerEvents)||""),this.hasProjected&&!lt(this.latestValues)&&(s.transform=l?l({},""):"none",this.hasProjected=!1);return}s.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let d=gm(this.projectionDeltaWithTransform,this.treeScale,c);l&&(d=l(c,d)),s.transform=d;const{x:f,y:m}=this.projectionDelta;s.transformOrigin=`${f.origin*100}% ${m.origin*100}% 0`,u.animationValues?s.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:s.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const g in en){if(c[g]===void 0)continue;const{correct:v,applyTo:b,isCSSVariable:h}=en[g],T=d==="none"?c[g]:v(c[g],u);if(b){const w=b.length;for(let k=0;k<w;k++)s[b[k]]=T}else h?this.options.visualElement.renderState.vars[g]=T:s[g]=T}this.options.layoutId&&(s.pointerEvents=u===this?In(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>s.currentAnimation?.stop()),this.root.nodes.forEach(wl),this.root.sharedNodes.clear()}}}function ym(e){e.updateLayout()}function bm(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:r}=e.options,o=t.source!==e.layout.source;r==="size"?Ae(c=>{const d=o?t.measuredBox[c]:t.layoutBox[c],f=be(d);d.min=n[c].min,d.max=d.min+f}):Al(r,t.layoutBox,n)&&Ae(c=>{const d=o?t.measuredBox[c]:t.layoutBox[c],f=be(n[c]);d.max=d.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[c].max=e.relativeTarget[c].min+f)});const s=Ot();sn(s,n,t.layoutBox);const a=Ot();o?sn(a,e.applyTransform(i,!0),t.measuredBox):sn(a,n,t.layoutBox);const l=!fl(s);let u=!1;if(!e.resumeFrom){const c=e.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:d,layout:f}=c;if(d&&f){const m=ue();an(m,t.layoutBox,d.layoutBox);const g=ue();an(g,n,f.layoutBox),gl(m,g)||(u=!0),c.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=m,e.relativeParent=c)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function wm(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 Tm(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Sm(e){e.clearSnapshot()}function wl(e){e.clearMeasurements()}function Tl(e){e.isLayoutDirty=!1}function km(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Sl(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function jm(e){e.resolveTargetDelta()}function Em(e){e.calcProjection()}function Cm(e){e.resetSkewAndRotation()}function Pm(e){e.removeLeadSnapshot()}function kl(e,t,n){e.translate=ae(t.translate,0,n),e.scale=ae(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function jl(e,t,n,i){e.min=ae(t.min,n.min,i),e.max=ae(t.max,n.max,i)}function Am(e,t,n,i){jl(e.x,t.x,n.x,i),jl(e.y,t.y,n.y,i)}function Dm(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Rm={duration:.45,ease:[.4,0,.1,1]},El=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Cl=El("applewebkit/")&&!El("chrome/")?Math.round:Ce;function Pl(e){e.min=Cl(e.min),e.max=Cl(e.max)}function Om(e){Pl(e.x),Pl(e.y)}function Al(e,t,n){return e==="position"||e==="preserve-aspect"&&!Lf(vl(t),vl(n),.2)}function Mm(e){return e!==e.root&&e.scroll?.wasRoot}const Im=bl({attachResizeListener:(e,t)=>nn(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Sr={current:void 0},Dl=bl({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Sr.current){const e=new Im({});e.mount(window),e.setOptions({layoutScroll:!0}),Sr.current=e}return Sr.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Nm={pan:{Feature:em},drag:{Feature:Qf,ProjectionNode:Dl,MeasureLayout:el}};function Rl(e,t,n){const{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",n==="Start");const r="onHover"+n,o=i[r];o&&se.postRender(()=>o(t,rn(t)))}class Fm extends Qe{mount(){const{current:t}=this.node;t&&(this.unmount=dp(t,(n,i)=>(Rl(this.node,i,"Start"),r=>Rl(this.node,r,"End"))))}unmount(){}}class Vm extends Qe{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=qt(nn(this.node.current,"focus",()=>this.onFocus()),nn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Ol(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 r="onTap"+(n==="End"?"":n),o=i[r];o&&se.postRender(()=>o(t,rn(t)))}class _m extends Qe{mount(){const{current:t}=this.node;t&&(this.unmount=hp(t,(n,i)=>(Ol(this.node,i,"Start"),(r,{success:o})=>Ol(this.node,r,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const kr=new WeakMap,jr=new WeakMap,Lm=e=>{const t=kr.get(e.target);t&&t(e)},zm=e=>{e.forEach(Lm)};function Bm({root:e,...t}){const n=e||document;jr.has(n)||jr.set(n,{});const i=jr.get(n),r=JSON.stringify(t);return i[r]||(i[r]=new IntersectionObserver(zm,{root:e,...t})),i[r]}function $m(e,t,n){const i=Bm(t);return kr.set(e,n),i.observe(e),()=>{kr.delete(e),i.unobserve(e)}}const Wm={some:0,all:1};class Um extends Qe{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:i,amount:r="some",once:o}=t,s={root:n?n.current:void 0,rootMargin:i,threshold:typeof r=="number"?r:Wm[r]},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 $m(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(qm(t,n))&&this.startObserver()}unmount(){}}function qm({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Hm={...Mf,...{inView:{Feature:Um},tap:{Feature:_m},focus:{Feature:Vm},hover:{Feature:Fm}},...Nm,...{layout:{ProjectionNode:Dl,MeasureLayout:el}}},Fe=Jp(Hm,lf);function Er(e){return typeof e=="object"&&!Array.isArray(e)}function Ml(e,t,n,i){return typeof e=="string"&&Er(t)?Ls(e,n,i):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function Km(e,t,n){return e*(t+1)}function Il(e,t,n,i){return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:t.startsWith("<")?Math.max(0,n+parseFloat(t.slice(1))):i.get(t)??e}function Ym(e,t,n){for(let i=0;i<e.length;i++){const r=e[i];r.at>t&&r.at<n&&(wn(e,r),i--)}}function Gm(e,t,n,i,r,o){Ym(e,r,o);for(let s=0;s<t.length;s++)e.push({value:t[s],at:ae(r,o,i[s]),easing:Go(n,s)})}function Xm(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function Zm(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const Jm="easeInOut",Qm=20;function eh(e,{defaultTransition:t={},...n}={},i,r){const o=t.duration||.3,s=new Map,a=new Map,l={},u=new Map;let c=0,d=0,f=0;for(let m=0;m<e.length;m++){const g=e[m];if(typeof g=="string"){u.set(g,d);continue}else if(!Array.isArray(g)){u.set(g.name,Il(d,g.at,c,u));continue}let[v,b,h={}]=g;h.at!==void 0&&(d=Il(d,h.at,c,u));let T=0;const w=(k,y,P,E=0,A=0)=>{const M=th(k),{delay:W=0,times:O=vs(M),type:J="keyframes",repeat:Y,repeatType:F,repeatDelay:ee=0,...ie}=y;let{ease:X=t.ease||"easeOut",duration:q}=y;const Z=typeof W=="function"?W(E,A):W,x=M.length,j=Wi(J)?J:r?.[J||"keyframes"];if(x<=2&&j){let z=100;if(x===2&&rh(M)){const L=M[1]-M[0];z=Math.abs(L)}const H={...ie};q!==void 0&&(H.duration=Pe(q));const $=fs(H,z,j);X=$.ease,q=$.duration}q??(q=o);const I=d+Z;O.length===1&&O[0]===0&&(O[1]=1);const V=O.length-M.length;if(V>0&&gs(O,V),M.length===1&&M.unshift(null),Y){Ee(Y<Qm,"Repeat count too high, must be less than 20","repeat-count-high"),q=Km(q,Y);const z=[...M],H=[...O];X=Array.isArray(X)?[...X]:[X];const $=[...X];for(let L=0;L<Y;L++){M.push(...z);for(let G=0;G<z.length;G++)O.push(H[G]+(L+1)),X.push(G===0?"linear":Go($,G-1))}Xm(O,Y)}const _=I+q;Gm(P,M,X,O,I,_),T=Math.max(Z+q,T),f=Math.max(_,f)};if(he(v)){const k=Nl(v,a);w(b,h,Fl("default",k))}else{const k=Ml(v,b,i,l),y=k.length;for(let P=0;P<y;P++){b=b,h=h;const E=k[P],A=Nl(E,a);for(const M in b)w(b[M],nh(h,M),Fl(M,A),P,y)}}c=d,d+=T}return a.forEach((m,g)=>{for(const v in m){const b=m[v];b.sort(Zm);const h=[],T=[],w=[];for(let y=0;y<b.length;y++){const{at:P,value:E,easing:A}=b[y];h.push(E),T.push(wt(0,f,P)),w.push(A||"easeOut")}T[0]!==0&&(T.unshift(0),h.unshift(h[0]),w.unshift(Jm)),T[T.length-1]!==1&&(T.push(1),h.push(null)),s.has(g)||s.set(g,{keyframes:{},transition:{}});const k=s.get(g);k.keyframes[v]=h,k.transition[v]={...t,duration:f,ease:w,times:T,...n}}}),s}function Nl(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function Fl(e,t){return t[e]||(t[e]=[]),t[e]}function th(e){return Array.isArray(e)?e:[e]}function nh(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const ih=e=>typeof e=="number",rh=e=>e.every(ih);function oh(e,t){return e in t}class sh extends Ca{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(oh(n,t)){const i=t[n];if(typeof i=="string"||typeof i=="number")return i}}getBaseTargetFromProps(){}removeValueFromRenderState(t,n){delete n.output[t]}measureInstanceViewportBox(){return ue()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}function ah(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Zi(e)&&!Gs(e)?new Oa(t):new Da(t);n.mount(e),tn.set(e,n)}function lh(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new sh(t);n.mount(e),tn.set(e,n)}function ch(e,t){return he(e)||typeof e=="number"||typeof e=="string"&&!Er(t)}function Vl(e,t,n,i){const r=[];if(ch(e,t))r.push(tl(e,Er(t)&&t.default||t,n&&(n.default||n)));else{const o=Ml(e,t,i),s=o.length;Ee(!!s,"No valid elements provided.","no-valid-elements");for(let a=0;a<s;a++){const l=o[a];Ee(l!==null,"You're trying to perform an animation on null. Ensure that selectors are correctly finding elements and refs are correctly hydrated.","animate-null");const u=l instanceof Element?ah:lh;tn.has(l)||u(l);const c=tn.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(a,s)),r.push(...hr(c,{...t,transition:d},{}))}}return r}function uh(e,t,n){const i=[];return eh(e,t,n,{spring:Zt}).forEach(({keyframes:o,transition:s},a)=>{i.push(...Vl(a,o,s))}),i}function dh(e){return Array.isArray(e)&&e.some(Array.isArray)}function ph(e){function t(n,i,r){let o=[];return dh(n)?o=uh(n,i,e):o=Vl(n,i,r,e),new Gd(o)}return t}const fh=ph(),mh=["polygon(50% 50%,0 0,0 0,0 0,0 0,0 0)","polygon(50% 50%,0 0,100% 0,100% 0,100% 0,100% 0)","polygon(50% 50%,0 0,100% 0,100% 100%,100% 100%,100% 100%)","polygon(50% 50%,0 0,100% 0,100% 100%,0 100%,0 100%)","polygon(50% 50%,0 0,100% 0,100% 100%,0 100%,0 0)"],It=e=>{const{speed:t=1,className:n}=e,i=1/t,r=2/t;return p.jsx(An,{children:p.jsx(Fe.div,{role:"status",className:N("relative rounded-full",n),animate:{rotate:360},transition:{repeat:1/0,ease:"linear",duration:i},children:p.jsx(Fe.div,{className:"absolute inset-0 rounded-full",style:{boxSizing:"border-box",borderStyle:"solid",borderWidth:2},animate:{clipPath:mh},transition:{repeat:1/0,ease:"linear",duration:r,times:[0,.25,.5,.75,1]}})})})},et={sm:"h-[var(--control-size-sm-height)]",md:"h-[var(--control-size-md-height)]",lg:"h-[var(--control-size-lg-height)]"},hh={sm:"min-h-[var(--control-size-sm-height)]",md:"min-h-[var(--control-size-md-height)]",lg:"min-h-[var(--control-size-lg-height)]"},qe={sm:"text-[length:var(--control-size-sm-font-size)]",md:"text-[length:var(--control-size-md-font-size)]",lg:"text-[length:var(--control-size-lg-font-size)]"},gh={sm:"gap-[var(--control-size-sm-gap)]",md:"gap-[var(--control-size-md-gap)]",lg:"gap-[var(--control-size-lg-gap)]"},vh={sm:"px-[var(--control-size-sm-px)]",md:"px-[var(--control-size-md-px)]",lg:"px-[var(--control-size-lg-px)]"},ut={sm:"pl-[var(--control-size-sm-px)]",md:"pl-[var(--control-size-md-px)]",lg:"pl-[var(--control-size-lg-px)]"},Cr={sm:"pr-[var(--control-size-sm-px)]",md:"pr-[var(--control-size-md-px)]",lg:"pr-[var(--control-size-lg-px)]"},dt={sm:"pr-[calc(var(--control-size-sm-px)+2rem)]",md:"pr-[calc(var(--control-size-md-px)+2rem)]",lg:"pr-[calc(var(--control-size-lg-px)+2rem)]"},_l={sm:"pl-[calc(var(--control-size-sm-icon-offset)+var(--control-size-sm-icon)+0.75rem)]",md:"pl-[calc(var(--control-size-md-icon-offset)+var(--control-size-md-icon)+0.75rem)]",lg:"pl-[calc(var(--control-size-lg-icon-offset)+var(--control-size-lg-icon)+0.75rem)]"},Ll={sm:"left-[var(--control-size-sm-icon-offset)]",md:"left-[var(--control-size-md-icon-offset)]",lg:"left-[var(--control-size-lg-icon-offset)]"},xh={sm:"right-[var(--control-size-sm-px)]",md:"right-[var(--control-size-md-px)]",lg:"right-[var(--control-size-lg-px)]"},pt={sm:"h-[var(--control-size-sm-icon)] w-[var(--control-size-sm-icon)]",md:"h-[var(--control-size-md-icon)] w-[var(--control-size-md-icon)]",lg:"h-[var(--control-size-lg-icon)] w-[var(--control-size-lg-icon)]"},zl={sm:"h-[var(--control-size-sm-height)] w-[var(--control-size-sm-height)]",md:"h-[var(--control-size-md-height)] w-[var(--control-size-md-height)]",lg:"h-[var(--control-size-lg-height)] w-[var(--control-size-lg-height)]"},yh=`
30
+ `),()=>{g.contains(h)&&g.removeChild(h)}},[t]),p.jsx(ff,{isPresent:t,childRef:s,sizeRef:o,children:j.cloneElement(e,{ref:s})})}const hf=({children:e,initial:t,isPresent:n,onExitComplete:i,custom:r,presenceAffectsLayout:s,mode:o,anchorX:a,root:l})=>{const u=Wi(gf),c=S.useId();let d=!0,f=S.useMemo(()=>(d=!1,{id:c,initial:t,isPresent:n,custom:r,onExitComplete:m=>{u.set(m,!0);for(const h of u.values())if(!h)return;i&&i()},register:m=>(u.set(m,!1),()=>u.delete(m))}),[n,u,i]);return s&&d&&(f={...f}),S.useMemo(()=>{u.forEach((m,h)=>u.set(h,!1))},[n]),j.useEffect(()=>{!n&&!u.size&&i&&i()},[n]),o==="popLayout"&&(e=p.jsx(mf,{isPresent:n,anchorX:a,root:l,children:e})),p.jsx(Yn.Provider,{value:f,children:e})};function gf(){return new Map}function Aa(e=!0){const t=S.useContext(Yn);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:i,register:r}=t,s=S.useId();S.useEffect(()=>{if(e)return r(s)},[e]);const o=S.useCallback(()=>e&&i&&i(s),[s,i,e]);return!n&&i?[!1,o]:[!0]}const ni=e=>e.key||"";function Da(e){const t=[];return S.Children.forEach(e,n=>{S.isValidElement(n)&&t.push(n)}),t}const ii=({children:e,custom:t,initial:n=!0,onExitComplete:i,presenceAffectsLayout:r=!0,mode:s="sync",propagate:o=!1,anchorX:a="left",root:l})=>{const[u,c]=Aa(o),d=S.useMemo(()=>Da(e),[e]),f=o&&!u?[]:d.map(ni),m=S.useRef(!0),h=S.useRef(d),g=Wi(()=>new Map),[y,v]=S.useState(d),[T,w]=S.useState(d);ps(()=>{m.current=!1,h.current=d;for(let C=0;C<T.length;C++){const R=ni(T[C]);f.includes(R)?g.delete(R):g.get(R)!==!0&&g.set(R,!1)}},[T,f.length,f.join("-")]);const k=[];if(d!==y){let C=[...d];for(let R=0;R<T.length;R++){const E=T[R],I=ni(E);f.includes(I)||(C.splice(R,0,E),k.push(E))}return s==="wait"&&k.length&&(C=k),w(Da(C)),v(d),null}process.env.NODE_ENV!=="production"&&s==="wait"&&T.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:b}=S.useContext($i);return p.jsx(p.Fragment,{children:T.map(C=>{const R=ni(C),E=o&&!u?!1:d===T||f.includes(R),I=()=>{if(g.has(R))g.set(R,!0);else return;let _=!0;g.forEach(N=>{N||(_=!1)}),_&&(b?.(),w(h.current),o&&c?.(),i&&i())};return p.jsx(hf,{isPresent:E,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:r,mode:s,root:l,onExitComplete:E?void 0:I,anchorX:a,children:C},R)})})},Ra=S.createContext({strict:!1}),Ia={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"]},Kt={};for(const e in Ia)Kt[e]={isEnabled:t=>Ia[e].some(n=>!!t[n])};function vf(e){for(const t in e)Kt[t]={...Kt[t],...e[t]}}const xf=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 ri(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||xf.has(e)}let Oa=e=>!ri(e);function yf(e){typeof e=="function"&&(Oa=t=>t.startsWith("on")?!ri(t):e(t))}try{yf(require("@emotion/is-prop-valid").default)}catch{}function bf(e,t,n){const i={};for(const r in e)r==="values"&&typeof e.values=="object"||(Oa(r)||n===!0&&ri(r)||!t&&!ri(r)||e.draggable&&r.startsWith("onDrag"))&&(i[r]=e[r]);return i}const oi=S.createContext({});function si(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function bn(e){return typeof e=="string"||Array.isArray(e)}const Mr=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Nr=["initial",...Mr];function ai(e){return si(e.animate)||Nr.some(t=>bn(e[t]))}function Ma(e){return!!(ai(e)||e.variants)}function wf(e,t){if(ai(e)){const{initial:n,animate:i}=e;return{initial:n===!1||bn(n)?n:void 0,animate:bn(i)?i:void 0}}return e.inherit!==!1?t:{}}function Tf(e){const{initial:t,animate:n}=wf(e,S.useContext(oi));return S.useMemo(()=>({initial:t,animate:n}),[Na(t),Na(n)])}function Na(e){return Array.isArray(e)?e.join(" "):e}const wn={};function Sf(e){for(const t in e)wn[t]=e[t],Qi(t)&&(wn[t].isCSSVariable=!0)}function Fa(e,{layout:t,layoutId:n}){return Ut.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!wn[e]||e==="opacity")}const kf={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Ef=Wt.length;function jf(e,t,n){let i="",r=!0;for(let s=0;s<Ef;s++){const o=Wt[s],a=e[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const u=ya(a,Pr[o]);if(!l){r=!1;const c=kf[o]||o;i+=`${c}(${u}) `}n&&(t[o]=u)}}return i=i.trim(),n?i=n(t,r?"":i):r&&(i="none"),i}function Fr(e,t,n){const{style:i,vars:r,transformOrigin:s}=e;let o=!1,a=!1;for(const l in t){const u=t[l];if(Ut.has(l)){o=!0;continue}else if(Qi(l)){r[l]=u;continue}else{const c=ya(u,Pr[l]);l.startsWith("origin")?(a=!0,s[l]=c):i[l]=c}}if(t.transform||(o||n?i.transform=jf(t,e.transform,n):i.transform&&(i.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=s;i.transformOrigin=`${l} ${u} ${c}`}}const Vr=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Va(e,t,n){for(const i in t)!Te(t[i])&&!Fa(i,n)&&(e[i]=t[i])}function Cf({transformTemplate:e},t){return S.useMemo(()=>{const n=Vr();return Fr(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Pf(e,t){const n=e.style||{},i={};return Va(i,n,e),Object.assign(i,Cf(e,t)),i}function Af(e,t){const n={},i=Pf(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 Df={offset:"stroke-dashoffset",array:"stroke-dasharray"},Rf={offset:"strokeDashoffset",array:"strokeDasharray"};function If(e,t,n=1,i=0,r=!0){e.pathLength=1;const s=r?Df:Rf;e[s.offset]=ie.transform(-i);const o=ie.transform(t),a=ie.transform(n);e[s.array]=`${o} ${a}`}function La(e,{attrX:t,attrY:n,attrScale:i,pathLength:r,pathSpacing:s=1,pathOffset:o=0,...a},l,u,c){if(Fr(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),r!==void 0&&If(d,r,s,o,!1)}const _a=()=>({...Vr(),attrs:{}}),za=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Of(e,t,n,i){const r=S.useMemo(()=>{const s=_a();return La(s,t,za(i),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Va(s,e.style,e),r.style={...s,...r.style}}return r}const Mf=["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 Lr(e){return typeof e!="string"||e.includes("-")?!1:!!(Mf.indexOf(e)>-1||/[A-Z]/u.test(e))}function Nf(e,t,n,{latestValues:i},r,s=!1){const a=(Lr(e)?Of:Af)(t,i,r,e),l=bf(t,typeof e=="string",s),u=e!==S.Fragment?{...l,...a,ref:n}:{},{children:c}=t,d=S.useMemo(()=>Te(c)?c.get():c,[c]);return S.createElement(e,{...u,children:d})}function Ba(e){const t=[{},{}];return e?.values.forEach((n,i)=>{t[0][i]=n.get(),t[1][i]=n.getVelocity()}),t}function _r(e,t,n,i){if(typeof t=="function"){const[r,s]=Ba(i);t=t(n!==void 0?n:e.custom,r,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[r,s]=Ba(i);t=t(n!==void 0?n:e.custom,r,s)}return t}function li(e){return Te(e)?e.get():e}function Ff({scrapeMotionValuesFromProps:e,createRenderState:t},n,i,r){return{latestValues:Vf(n,i,r,e),renderState:t()}}function Vf(e,t,n,i){const r={},s=i(e,{});for(const f in s)r[f]=li(s[f]);let{initial:o,animate:a}=e;const l=ai(e),u=Ma(e);t&&u&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const d=c?a:o;if(d&&typeof d!="boolean"&&!si(d)){const f=Array.isArray(d)?d:[d];for(let m=0;m<f.length;m++){const h=_r(e,f[m]);if(h){const{transitionEnd:g,transition:y,...v}=h;for(const T in v){let w=v[T];if(Array.isArray(w)){const k=c?w.length-1:0;w=w[k]}w!==null&&(r[T]=w)}for(const T in g)r[T]=g[T]}}}return r}const $a=e=>(t,n)=>{const i=S.useContext(oi),r=S.useContext(Yn),s=()=>Ff(e,t,i,r);return n?s():Wi(s)};function zr(e,t,n){const{style:i}=e,r={};for(const s in i)(Te(i[s])||t.style&&Te(t.style[s])||Fa(s,e)||n?.getValue(s)?.liveStyle!==void 0)&&(r[s]=i[s]);return r}const Lf=$a({scrapeMotionValuesFromProps:zr,createRenderState:Vr});function Wa(e,t,n){const i=zr(e,t,n);for(const r in e)if(Te(e[r])||Te(t[r])){const s=Wt.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;i[s]=e[r]}return i}const _f=$a({scrapeMotionValuesFromProps:Wa,createRenderState:_a}),zf=Symbol.for("motionComponentSymbol");function Ht(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Bf(e,t,n){return S.useCallback(i=>{i&&e.onMount&&e.onMount(i),t&&(i?t.mount(i):t.unmount()),n&&(typeof n=="function"?n(i):Ht(n)&&(n.current=i))},[t])}const Br=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Ua="data-"+Br("framerAppearId"),qa=S.createContext({});function $f(e,t,n,i,r){const{visualElement:s}=S.useContext(oi),o=S.useContext(Ra),a=S.useContext(Yn),l=S.useContext(Or).reducedMotion,u=S.useRef(null);i=i||o.renderer,!u.current&&i&&(u.current=i(e,{visualState:t,parent:s,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const c=u.current,d=S.useContext(qa);c&&!c.projection&&r&&(c.type==="html"||c.type==="svg")&&Wf(u.current,n,r,d);const f=S.useRef(!1);S.useInsertionEffect(()=>{c&&f.current&&c.update(n,a)});const m=n[Ua],h=S.useRef(!!m&&!window.MotionHandoffIsComplete?.(m)&&window.MotionHasOptimisedAnimation?.(m));return ps(()=>{c&&(f.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),h.current&&c.animationState&&c.animationState.animateChanges())}),S.useEffect(()=>{c&&(!h.current&&c.animationState&&c.animationState.animateChanges(),h.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(m)}),h.current=!1),c.enteringChildren=void 0)}),c}function Wf(e,t,n,i){const{layoutId:r,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Ka(e.parent)),e.projection.setOptions({layoutId:r,layout:s,alwaysMeasureLayout:!!o||a&&Ht(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:i,crossfade:c,layoutScroll:l,layoutRoot:u})}function Ka(e){if(e)return e.options.allowProjection!==!1?e.projection:Ka(e.parent)}function $r(e,{forwardMotionProps:t=!1}={},n,i){n&&vf(n);const r=Lr(e)?_f:Lf;function s(a,l){let u;const c={...S.useContext(Or),...a,layoutId:Uf(a)},{isStatic:d}=c,f=Tf(a),m=r(a,d);if(!d&&Ui){qf(c,n);const h=Kf(c);u=h.MeasureLayout,f.visualElement=$f(e,m,c,i,h.ProjectionNode)}return p.jsxs(oi.Provider,{value:f,children:[u&&f.visualElement?p.jsx(u,{visualElement:f.visualElement,...c}):null,Nf(e,a,Bf(m,f.visualElement,l),m,d,t)]})}s.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const o=S.forwardRef(s);return o[zf]=e,o}function Uf({layoutId:e}){const t=S.useContext($i).id;return t&&e!==void 0?t+"-"+e:e}function qf(e,t){const n=S.useContext(Ra).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?Lt(!1,i,"lazy-strict-mode"):Me(!1,i,"lazy-strict-mode")}}function Kf(e){const{drag:t,layout:n}=Kt;if(!t&&!n)return{};const i={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function Hf(e,t){if(typeof Proxy>"u")return $r;const n=new Map,i=(s,o)=>$r(s,o,e,t),r=(s,o)=>(process.env.NODE_ENV!=="production"&&Gi(!1,"motion() is deprecated. Use motion.create() instead."),i(s,o));return new Proxy(r,{get:(s,o)=>o==="create"?i:(n.has(o)||n.set(o,$r(o,void 0,e,t)),n.get(o))})}function Ha({top:e,left:t,right:n,bottom:i}){return{x:{min:t,max:n},y:{min:e,max:i}}}function Yf({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Gf(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 Wr(e){return e===void 0||e===1}function Ur({scale:e,scaleX:t,scaleY:n}){return!Wr(e)||!Wr(t)||!Wr(n)}function Ct(e){return Ur(e)||Ya(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Ya(e){return Ga(e.x)||Ga(e.y)}function Ga(e){return e&&e!=="0%"}function ci(e,t,n){const i=e-n,r=t*i;return n+r}function Xa(e,t,n,i,r){return r!==void 0&&(e=ci(e,r,i)),ci(e,n,i)+t}function qr(e,t=0,n=1,i,r){e.min=Xa(e.min,t,n,i,r),e.max=Xa(e.max,t,n,i,r)}function Za(e,{x:t,y:n}){qr(e.x,t.translate,t.scale,t.originPoint),qr(e.y,n.translate,n.scale,n.originPoint)}const Ja=.999999999999,Qa=1.0000000000001;function Xf(e,t,n,i=!1){const r=n.length;if(!r)return;t.x=t.y=1;let s,o;for(let a=0;a<r;a++){s=n[a],o=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(i&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Gt(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Za(e,o)),i&&Ct(s.latestValues)&&Gt(e,s.latestValues))}t.x<Qa&&t.x>Ja&&(t.x=1),t.y<Qa&&t.y>Ja&&(t.y=1)}function Yt(e,t){e.min=e.min+t,e.max=e.max+t}function el(e,t,n,i,r=.5){const s=fe(e.min,e.max,r);qr(e,t,n,s,i)}function Gt(e,t){el(e.x,t.x,t.scaleX,t.scale,t.originX),el(e.y,t.y,t.scaleY,t.scale,t.originY)}function tl(e,t){return Ha(Gf(e.getBoundingClientRect(),t))}function Zf(e,t,n){const i=tl(e,n),{scroll:r}=t;return r&&(Yt(i.x,r.offset.x),Yt(i.y,r.offset.y)),i}const nl=()=>({translate:0,scale:1,origin:0,originPoint:0}),Xt=()=>({x:nl(),y:nl()}),il=()=>({min:0,max:0}),ge=()=>({x:il(),y:il()}),Kr={current:null},rl={current:!1};function Jf(){if(rl.current=!0,!!Ui)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Kr.current=e.matches;e.addEventListener("change",t),t()}else Kr.current=!1}const Tn=new WeakMap;function Qf(e,t,n){for(const i in t){const r=t[i],s=n[i];if(Te(r))e.addValue(i,r);else if(Te(s))e.addValue(i,qt(r,{owner:e}));else if(s!==r)if(e.hasValue(i)){const o=e.getValue(i);o.liveStyle===!0?o.jump(r):o.hasAnimated||o.set(r)}else{const o=e.getStaticValue(i);e.addValue(i,qt(o!==void 0?o:r,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const ol=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class sl{scrapeMotionValuesFromProps(t,n,i){return{}}constructor({parent:t,props:n,presenceContext:i,reducedMotionConfig:r,blockInitialAnimation:s,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Sr,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=Ae.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,pe.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=ai(n),this.isVariantNode=Ma(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 m=d[f];l[f]!==void 0&&Te(m)&&m.set(l[f])}}mount(t){this.current=t,Tn.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)),rl.current||Jf(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Kr.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(),ct(this.notifyUpdate),ct(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=Ut.has(t);i&&this.onBindTransform&&this.onBindTransform();const r=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&pe.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{r(),s&&s(),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 Kt){const n=Kt[t];if(!n)continue;const{isEnabled:i,Feature:r}=n;if(!this.features[t]&&r&&i(this.props)&&(this.features[t]=new r(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ge()}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<ol.length;i++){const r=ol[i];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const s="on"+r,o=t[s];o&&(this.propEventSubscriptions[r]=this.on(r,o))}this.prevMotionValues=Qf(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=qt(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"&&(fs(i)||hs(i))?i=parseFloat(i):!pf(i)&&dt.test(n)&&(i=va(t,n)),this.setBaseTarget(t,Te(i)?i.get():i)),Te(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 s=_r(this.props,n,this.presenceContext?.custom);s&&(i=s[t])}if(n&&i!==void 0)return i;const r=this.getBaseTargetFromProps(this.props,t);return r!==void 0&&!Te(r)?r:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Yi),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Ar.render(this.render)}}class al extends sl{constructor(){super(...arguments),this.KeyframeResolver=tf}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;Te(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function ll(e,{style:t,vars:n},i,r){const s=e.style;let o;for(o in t)s[o]=t[o];r?.applyProjectionStyles(s,i);for(o in n)s.setProperty(o,n[o])}function em(e){return window.getComputedStyle(e)}class cl extends al{constructor(){super(...arguments),this.type="html",this.renderInstance=ll}readValueFromInstance(t,n){if(Ut.has(n))return this.projection?.isProjecting?xr(n):xp(t,n);{const i=em(t),r=(Qi(n)?i.getPropertyValue(n):i[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(t,{transformPagePoint:n}){return tl(t,n)}build(t,n,i){Fr(t,n,i.transformTemplate)}scrapeMotionValuesFromProps(t,n,i){return zr(t,n,i)}}const ul=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 tm(e,t,n,i){ll(e,t,void 0,i);for(const r in t.attrs)e.setAttribute(ul.has(r)?r:Br(r),t.attrs[r])}class dl extends al{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ge}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ut.has(n)){const i=ga(n);return i&&i.default||0}return n=ul.has(n)?n:Br(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,i){return Wa(t,n,i)}build(t,n,i){La(t,n,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,n,i,r){tm(t,n,i,r)}mount(t){this.isSVGTag=za(t.tagName),super.mount(t)}}const nm=(e,t)=>Lr(e)?new dl(t):new cl(t,{allowProjection:e!==S.Fragment});function Zt(e,t,n){const i=e.getProps();return _r(i,t,n!==void 0?n:i.custom,e)}const Hr=e=>Array.isArray(e);function im(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,qt(n))}function rm(e){return Hr(e)?e[e.length-1]||0:e}function om(e,t){const n=Zt(e,t);let{transitionEnd:i={},transition:r={},...s}=n||{};s={...s,...i};for(const o in s){const a=rm(s[o]);im(e,o,a)}}function sm(e){return!!(Te(e)&&e.add)}function Yr(e,t){const n=e.getValue("willChange");if(sm(n))return n.add(t);if(!n&&st.WillChange){const i=new st.WillChange("auto");e.addValue("willChange",i),i.add(t)}}function pl(e){return e.props[Ua]}const am=e=>e!==null;function lm(e,{repeat:t,repeatType:n="loop"},i){const r=e.filter(am),s=t&&n!=="loop"&&t%2===1?0:r.length-1;return r[s]}const cm={type:"spring",stiffness:500,damping:25,restSpeed:10},um=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),dm={type:"keyframes",duration:.8},pm={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},fm=(e,{keyframes:t})=>t.length>2?dm:Ut.has(e)?e.startsWith("scale")?um(t[1]):cm:pm;function mm({when:e,delay:t,delayChildren:n,staggerChildren:i,staggerDirection:r,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const Gr=(e,t,n,i={},r,s)=>o=>{const a=jr(i,e)||{},l=a.delay||i.delay||0;let{elapsed:u=0}=i;u=u-Fe(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:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:r};mm(a)||Object.assign(c,fm(e,c)),c.duration&&(c.duration=Fe(c.duration)),c.repeatDelay&&(c.repeatDelay=Fe(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(Er(c),c.delay===0&&(d=!0)),(st.instantAnimations||st.skipAnimations)&&(d=!0,Er(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,d&&!s&&t.get()!==void 0){const f=lm(c.keyframes,a);if(f!==void 0){pe.update(()=>{c.onUpdate(f),c.onComplete()});return}}return a.isSync?new hr(c):new Bp(c)};function hm({protectedKeys:e,needsAnimating:t},n){const i=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,i}function Xr(e,t,{delay:n=0,transitionOverride:i,type:r}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:o,...a}=t;i&&(s=i);const l=[],u=r&&e.animationState&&e.animationState.getState()[r];for(const c in a){const d=e.getValue(c,e.latestValues[c]??null),f=a[c];if(f===void 0||u&&hm(u,c))continue;const m={delay:n,...jr(s||{},c)},h=d.get();if(h!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===h&&!m.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const v=pl(e);if(v){const T=window.MotionHandoffAnimation(v,c,pe);T!==null&&(m.startTime=T,g=!0)}}Yr(e,c),d.start(Gr(c,d,f,e.shouldReduceMotion&&da.has(c)?{type:!1}:m,e,g));const y=d.animation;y&&l.push(y)}return o&&Promise.all(l).then(()=>{pe.update(()=>{o&&om(e,o)})}),l}function fl(e,t,n,i=0,r=1){const s=Array.from(e).sort((u,c)=>u.sortNodePosition(c)).indexOf(t),o=e.size,a=(o-1)*i;return typeof n=="function"?n(s,o):r===1?s*i:a-s*i}function Zr(e,t,n={}){const i=Zt(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:r=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(r=n.transitionOverride);const s=i?()=>Promise.all(Xr(e,i,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:c,staggerDirection:d}=r;return gm(e,t,l,u,c,d,n)}:()=>Promise.resolve(),{when:a}=r;if(a){const[l,u]=a==="beforeChildren"?[s,o]:[o,s];return l().then(()=>u())}else return Promise.all([s(),o(n.delay)])}function gm(e,t,n=0,i=0,r=0,s=1,o){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(Zr(l,t,{...o,delay:n+(typeof i=="function"?0:i)+fl(e.variantChildren,l,i,r,s)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function vm(e,t,n={}){e.notify("AnimationStart",t);let i;if(Array.isArray(t)){const r=t.map(s=>Zr(e,s,n));i=Promise.all(r)}else if(typeof t=="string")i=Zr(e,t,n);else{const r=typeof t=="function"?Zt(e,t,n.custom):t;i=Promise.all(Xr(e,r,n))}return i.then(()=>{e.notify("AnimationComplete",t)})}function ml(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 xm=Nr.length;function hl(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?hl(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<xm;n++){const i=Nr[n],r=e.props[i];(bn(r)||r===!1)&&(t[i]=r)}return t}const ym=[...Mr].reverse(),bm=Mr.length;function wm(e){return t=>Promise.all(t.map(({animation:n,options:i})=>vm(e,n,i)))}function Tm(e){let t=wm(e),n=gl(),i=!0;const r=l=>(u,c)=>{const d=Zt(e,c,l==="exit"?e.presenceContext?.custom:void 0);if(d){const{transition:f,transitionEnd:m,...h}=d;u={...u,...h,...m}}return u};function s(l){t=l(e)}function o(l){const{props:u}=e,c=hl(e.parent)||{},d=[],f=new Set;let m={},h=1/0;for(let y=0;y<bm;y++){const v=ym[y],T=n[v],w=u[v]!==void 0?u[v]:c[v],k=bn(w),b=v===l?T.isActive:null;b===!1&&(h=y);let C=w===c[v]&&w!==u[v]&&k;if(C&&i&&e.manuallyAnimateOnMount&&(C=!1),T.protectedKeys={...m},!T.isActive&&b===null||!w&&!T.prevProp||si(w)||typeof w=="boolean")continue;const R=Sm(T.prevProp,w);let E=R||v===l&&T.isActive&&!C&&k||y>h&&k,I=!1;const _=Array.isArray(w)?w:[w];let N=_.reduce(r(v),{});b===!1&&(N={});const{prevResolvedValues:Z={}}=T,H={...Z,...N},W=L=>{E=!0,f.has(L)&&(I=!0,f.delete(L)),T.needsAnimating[L]=!0;const V=e.getValue(L);V&&(V.liveStyle=!1)};for(const L in H){const V=N[L],G=Z[L];if(m.hasOwnProperty(L))continue;let x=!1;Hr(V)&&Hr(G)?x=!ml(V,G):x=V!==G,x?V!=null?W(L):f.add(L):V!==void 0&&f.has(L)?W(L):T.protectedKeys[L]=!0}T.prevProp=w,T.prevResolvedValues=N,T.isActive&&(m={...m,...N}),i&&e.blockInitialAnimation&&(E=!1);const J=C&&R;E&&(!J||I)&&d.push(..._.map(L=>{const V={type:v};if(typeof L=="string"&&i&&!J&&e.manuallyAnimateOnMount&&e.parent){const{parent:G}=e,x=Zt(G,L);if(G.enteringChildren&&x){const{delayChildren:P}=x.transition||{};V.delay=fl(G.enteringChildren,e,P)}}return{animation:L,options:V}}))}if(f.size){const y={};if(typeof u.initial!="boolean"){const v=Zt(e,Array.isArray(u.initial)?u.initial[0]:u.initial);v&&v.transition&&(y.transition=v.transition)}f.forEach(v=>{const T=e.getBaseTarget(v),w=e.getValue(v);w&&(w.liveStyle=!0),y[v]=T??null}),d.push({animation:y})}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=o(l);for(const d in n)n[d].protectedKeys={};return c}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=gl(),i=!0}}}function Sm(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!ml(t,e):!1}function Pt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function gl(){return{animate:Pt(!0),whileInView:Pt(),whileHover:Pt(),whileTap:Pt(),whileDrag:Pt(),whileFocus:Pt(),exit:Pt()}}class pt{constructor(t){this.isMounted=!1,this.node=t}update(){}}class km extends pt{constructor(t){super(t),t.animationState||(t.animationState=Tm(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();si(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 Em=0;class jm extends pt{constructor(){super(...arguments),this.id=Em++}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 r=this.node.animationState.setActive("exit",!t);n&&!t&&r.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 Cm={animation:{Feature:km},exit:{Feature:jm}};function Sn(e,t,n,i={passive:!0}){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n)}function kn(e){return{point:{x:e.pageX,y:e.pageY}}}const Pm=e=>t=>Dr(t)&&e(t,kn(t));function En(e,t,n,i){return Sn(e,t,Pm(n),i)}const vl=1e-4,Am=1-vl,Dm=1+vl,xl=.01,Rm=0-xl,Im=0+xl;function Pe(e){return e.max-e.min}function Om(e,t,n){return Math.abs(e-t)<=n}function yl(e,t,n,i=.5){e.origin=i,e.originPoint=fe(t.min,t.max,e.origin),e.scale=Pe(n)/Pe(t),e.translate=fe(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Am&&e.scale<=Dm||isNaN(e.scale))&&(e.scale=1),(e.translate>=Rm&&e.translate<=Im||isNaN(e.translate))&&(e.translate=0)}function jn(e,t,n,i){yl(e.x,t.x,n.x,i?i.originX:void 0),yl(e.y,t.y,n.y,i?i.originY:void 0)}function bl(e,t,n){e.min=n.min+t.min,e.max=e.min+Pe(t)}function Mm(e,t,n){bl(e.x,t.x,n.x),bl(e.y,t.y,n.y)}function wl(e,t,n){e.min=t.min-n.min,e.max=e.min+Pe(t)}function Cn(e,t,n){wl(e.x,t.x,n.x),wl(e.y,t.y,n.y)}function Ve(e){return[e("x"),e("y")]}const Tl=({current:e})=>e?e.ownerDocument.defaultView:null,Sl=(e,t)=>Math.abs(e-t);function Nm(e,t){const n=Sl(e.x,t.x),i=Sl(e.y,t.y);return Math.sqrt(n**2+i**2)}class kl{constructor(t,n,{transformPagePoint:i,contextWindow:r=window,dragSnapToOrigin:s=!1,distanceThreshold:o=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=Qr(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,h=Nm(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!h)return;const{point:g}=f,{timestamp:y}=Se;this.history.push({...g,timestamp:y});const{onStart:v,onMove:T}=this.handlers;m||(v&&v(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),T&&T(this.lastMoveEvent,f)},this.handlePointerMove=(f,m)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Jr(m,this.transformPagePoint),pe.update(this.updatePoint,!0)},this.handlePointerUp=(f,m)=>{this.end();const{onEnd:h,onSessionEnd:g,resumeAnimation:y}=this.handlers;if(this.dragSnapToOrigin&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Qr(f.type==="pointercancel"?this.lastMoveEventInfo:Jr(m,this.transformPagePoint),this.history);this.startEvent&&h&&h(f,v),g&&g(f,v)},!Dr(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=i,this.distanceThreshold=o,this.contextWindow=r||window;const a=kn(t),l=Jr(a,this.transformPagePoint),{point:u}=l,{timestamp:c}=Se;this.history=[{...u,timestamp:c}];const{onSessionStart:d}=n;d&&d(t,Qr(l,this.history)),this.removeListeners=pn(En(this.contextWindow,"pointermove",this.handlePointerMove),En(this.contextWindow,"pointerup",this.handlePointerUp),En(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ct(this.updatePoint)}}function Jr(e,t){return t?{point:t(e.point)}:e}function El(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Qr({point:e},t){return{point:e,delta:El(e,jl(t)),offset:El(e,Fm(t)),velocity:Vm(t,.1)}}function Fm(e){return e[0]}function jl(e){return e[e.length-1]}function Vm(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,i=null;const r=jl(e);for(;n>=0&&(i=e[n],!(r.timestamp-i.timestamp>Fe(t)));)n--;if(!i)return{x:0,y:0};const s=Xe(r.timestamp-i.timestamp);if(s===0)return{x:0,y:0};const o={x:(r.x-i.x)/s,y:(r.y-i.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Lm(e,{min:t,max:n},i){return t!==void 0&&e<t?e=i?fe(t,e,i.min):Math.max(e,t):n!==void 0&&e>n&&(e=i?fe(n,e,i.max):Math.min(e,n)),e}function Cl(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 _m(e,{top:t,left:n,bottom:i,right:r}){return{x:Cl(e.x,n,r),y:Cl(e.y,t,i)}}function Pl(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 zm(e,t){return{x:Pl(e.x,t.x),y:Pl(e.y,t.y)}}function Bm(e,t){let n=.5;const i=Pe(e),r=Pe(t);return r>i?n=_t(t.min,t.max-i,e.min):i>r&&(n=_t(e.min,e.max-r,t.min)),ot(0,1,n)}function $m(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 eo=.35;function Wm(e=eo){return e===!1?e=0:e===!0&&(e=eo),{x:Al(e,"left","right"),y:Al(e,"top","bottom")}}function Al(e,t,n){return{min:Dl(e,t),max:Dl(e,n)}}function Dl(e,t){return typeof e=="number"?e:e[t]||0}const Um=new WeakMap;class qm{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=ge(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:i}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const s=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(kn(d).point)},o=(d,f)=>{const{drag:m,dragPropagation:h,onDragStart:g}=this.getProps();if(m&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=of(m),!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),Ve(v=>{let T=this.getAxisMotionValue(v).get()||0;if(Ze.test(T)){const{projection:w}=this.visualElement;if(w&&w.layout){const k=w.layout.layoutBox[v];k&&(T=Pe(k)*(parseFloat(T)/100))}}this.originPoint[v]=T}),g&&pe.postRender(()=>g(d,f)),Yr(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},a=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:m,dragDirectionLock:h,onDirectionLock:g,onDrag:y}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:v}=f;if(h&&this.currentDirection===null){this.currentDirection=Km(v),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",f.point,v),this.updateAxis("y",f.point,v),this.visualElement.render(),y&&y(d,f)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>Ve(d=>this.getAnimationState(d)==="paused"&&this.getAxisMotionValue(d).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new kl(t,{onSessionStart:s,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:i,contextWindow:Tl(this.visualElement)})}stop(t,n){const i=t||this.latestPointerEvent,r=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!r||!i)return;const{velocity:o}=r;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&pe.postRender(()=>a(i,r))}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:r}=this.getProps();if(!i||!ui(t,r,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(o=Lm(o,this.constraints[t],this.elastic[t])),s.set(o)}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,r=this.constraints;t&&Ht(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=_m(i.layoutBox,t):this.constraints=!1,this.elastic=Wm(n),r!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Ve(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=$m(i.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Ht(t))return!1;const i=t.current;Me(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:r}=this.visualElement;if(!r||!r.layout)return!1;const s=Zf(i,r.root,this.visualElement.getTransformPagePoint());let o=zm(r.layout.layoutBox,s);if(n){const a=n(Yf(o));this.hasMutatedConstraints=!!a,a&&(o=Ha(a))}return o}startAnimation(t){const{drag:n,dragMomentum:i,dragElastic:r,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=Ve(c=>{if(!ui(c,n,this.currentDirection))return;let d=l&&l[c]||{};o&&(d={min:0,max:0});const f=r?200:1e6,m=r?40:1e7,h={type:"inertia",velocity:i?t[c]:0,bounceStiffness:f,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(c,h)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const i=this.getAxisMotionValue(t);return Yr(this.visualElement,t),i.start(Gr(t,i,0,n,this.visualElement,!1))}stopAnimation(){Ve(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Ve(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(),r=i[n];return r||this.visualElement.getValue(t,(i.initial?i.initial[t]:void 0)||0)}snapToCursor(t){Ve(n=>{const{drag:i}=this.getProps();if(!ui(n,i,this.currentDirection))return;const{projection:r}=this.visualElement,s=this.getAxisMotionValue(n);if(r&&r.layout){const{min:o,max:a}=r.layout.layoutBox[n];s.set(t[n]-fe(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!Ht(n)||!i||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Ve(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();r[o]=Bm({min:l,max:l},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),Ve(o=>{if(!ui(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(fe(l,u,r[o]))})}addListeners(){if(!this.visualElement.current)return;Um.set(this.visualElement,this);const t=this.visualElement.current,n=En(t,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),i=()=>{const{dragConstraints:l}=this.getProps();Ht(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,s=r.addEventListener("measure",i);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),pe.read(i);const o=Sn(window,"resize",()=>this.scalePositionWithinConstraints()),a=r.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(Ve(c=>{const d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=l[c].translate,d.set(d.get()+l[c].translate))}),this.visualElement.render())}));return()=>{o(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:i=!1,dragPropagation:r=!1,dragConstraints:s=!1,dragElastic:o=eo,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:i,dragPropagation:r,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function ui(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Km(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Hm extends pt{constructor(t){super(t),this.removeGroupControls=Ne,this.removeListeners=Ne,this.controls=new qm(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ne}unmount(){this.removeGroupControls(),this.removeListeners()}}const Rl=e=>(t,n)=>{e&&pe.postRender(()=>e(t,n))};class Ym extends pt{constructor(){super(...arguments),this.removePointerDownListener=Ne}onPointerDown(t){this.session=new kl(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Tl(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:i,onPanEnd:r}=this.node.getProps();return{onSessionStart:Rl(t),onStart:Rl(n),onMove:i,onEnd:(s,o)=>{delete this.session,r&&pe.postRender(()=>r(s,o))}}}mount(){this.removePointerDownListener=En(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 di={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Il(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Pn={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ie.test(e))e=parseFloat(e);else return e;const n=Il(e,t.target.x),i=Il(e,t.target.y);return`${n}% ${i}%`}},Gm={correct:(e,{treeScale:t,projectionDelta:n})=>{const i=e,r=dt.parse(e);if(r.length>5)return i;const s=dt.createTransformer(e),o=typeof r[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;r[0+o]/=a,r[1+o]/=l;const u=fe(a,l,.5);return typeof r[2+o]=="number"&&(r[2+o]/=u),typeof r[3+o]=="number"&&(r[3+o]/=u),s(r)}};let to=!1;class Xm extends S.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i,layoutId:r}=this.props,{projection:s}=t;Sf(Zm),s&&(n.group&&n.group.add(s),i&&i.register&&r&&i.register(s),to&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),di.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:i,drag:r,isPresent:s}=this.props,{projection:o}=i;return o&&(o.isPresent=s,to=!0,r||t.layoutDependency!==n||n===void 0||t.isPresent!==s?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||pe.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Ar.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i}=this.props,{projection:r}=t;to=!0,r&&(r.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(r),i&&i.deregister&&i.deregister(r))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Ol(e){const[t,n]=Aa(),i=S.useContext($i);return p.jsx(Xm,{...e,layoutGroup:i,switchLayoutGroup:S.useContext(qa),isPresent:t,safeToRemove:n})}const Zm={borderRadius:{...Pn,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Pn,borderTopRightRadius:Pn,borderBottomLeftRadius:Pn,borderBottomRightRadius:Pn,boxShadow:Gm};function Ml(e,t,n){const i=Te(e)?e:qt(e);return i.start(Gr("",i,t,n)),i.animation}const Jm=(e,t)=>e.depth-t.depth;class Qm{constructor(){this.children=[],this.isDirty=!1}add(t){qi(this.children,t),this.isDirty=!0}remove(t){Gn(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Jm),this.isDirty=!1,this.children.forEach(t)}}function eh(e,t){const n=Ae.now(),i=({timestamp:r})=>{const s=r-n;s>=t&&(ct(i),e(s-t))};return pe.setup(i,!0),()=>ct(i)}const Nl=["TopLeft","TopRight","BottomLeft","BottomRight"],th=Nl.length,Fl=e=>typeof e=="string"?parseFloat(e):e,Vl=e=>typeof e=="number"||ie.test(e);function nh(e,t,n,i,r,s){r?(e.opacity=fe(0,n.opacity??1,ih(i)),e.opacityExit=fe(t.opacity??1,0,rh(i))):s&&(e.opacity=fe(t.opacity??1,n.opacity??1,i));for(let o=0;o<th;o++){const a=`border${Nl[o]}Radius`;let l=Ll(t,a),u=Ll(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||Vl(l)===Vl(u)?(e[a]=Math.max(fe(Fl(l),Fl(u),i),0),(Ze.test(u)||Ze.test(l))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=fe(t.rotate||0,n.rotate||0,i))}function Ll(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const ih=_l(0,.5,ks),rh=_l(.5,.95,Ne);function _l(e,t,n){return i=>i<e?0:i>t?1:n(_t(e,t,i))}function zl(e,t){e.min=t.min,e.max=t.max}function Le(e,t){zl(e.x,t.x),zl(e.y,t.y)}function Bl(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function $l(e,t,n,i,r){return e-=t,e=ci(e,1/n,i),r!==void 0&&(e=ci(e,1/r,i)),e}function oh(e,t=0,n=1,i=.5,r,s=e,o=e){if(Ze.test(t)&&(t=parseFloat(t),t=fe(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=fe(s.min,s.max,i);e===s&&(a-=t),e.min=$l(e.min,t,n,a,r),e.max=$l(e.max,t,n,a,r)}function Wl(e,t,[n,i,r],s,o){oh(e,t[n],t[i],t[r],t.scale,s,o)}const sh=["x","scaleX","originX"],ah=["y","scaleY","originY"];function Ul(e,t,n,i){Wl(e.x,t,sh,n?n.x:void 0,i?i.x:void 0),Wl(e.y,t,ah,n?n.y:void 0,i?i.y:void 0)}function ql(e){return e.translate===0&&e.scale===1}function Kl(e){return ql(e.x)&&ql(e.y)}function Hl(e,t){return e.min===t.min&&e.max===t.max}function lh(e,t){return Hl(e.x,t.x)&&Hl(e.y,t.y)}function Yl(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Gl(e,t){return Yl(e.x,t.x)&&Yl(e.y,t.y)}function Xl(e){return Pe(e.x)/Pe(e.y)}function Zl(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class ch{constructor(){this.members=[]}add(t){qi(this.members,t),t.scheduleRender()}remove(t){if(Gn(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(r=>t===r);if(n===0)return!1;let i;for(let r=n;r>=0;r--){const s=this.members[r];if(s.isPresent!==!1){i=s;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:r}=t.options;r===!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 uh(e,t,n){let i="";const r=e.x.translate/t.x,s=e.y.translate/t.y,o=n?.z||0;if((r||s||o)&&(i=`translate3d(${r}px, ${s}px, ${o}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:m,skewY:h}=n;u&&(i=`perspective(${u}px) ${i}`),c&&(i+=`rotate(${c}deg) `),d&&(i+=`rotateX(${d}deg) `),f&&(i+=`rotateY(${f}deg) `),m&&(i+=`skewX(${m}deg) `),h&&(i+=`skewY(${h}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 no=["","X","Y","Z"],dh=1e3;let ph=0;function io(e,t,n,i){const{latestValues:r}=t;r[e]&&(n[e]=r[e],t.setStaticValue(e,0),i&&(i[e]=0))}function Jl(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=pl(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:r,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",pe,!(r||s))}const{parent:i}=e;i&&!i.hasCheckedOptimisedAppear&&Jl(i)}function Ql({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:i,resetTransform:r}){return class{constructor(o={},a=t?.()){this.id=ph++,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(hh),this.nodes.forEach(yh),this.nodes.forEach(bh),this.nodes.forEach(gh)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Qm)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Yi),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=Ir(o)&&!Pa(o),this.instance=o;const{layoutId:a,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let c,d=0;const f=()=>this.root.updateBlockedByResize=!1;pe.read(()=>{d=window.innerWidth}),e(o,()=>{const m=window.innerWidth;m!==d&&(d=m,this.root.updateBlockedByResize=!0,c&&c(),c=eh(f,250),di.hasAnimatedSinceResize&&(di.hasAnimatedSinceResize=!1,this.nodes.forEach(nc)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const h=this.options.transition||u.getDefaultTransition()||Eh,{onLayoutAnimationStart:g,onLayoutAnimationComplete:y}=u.getProps(),v=!this.targetLayout||!Gl(this.targetLayout,m),T=!d&&f;if(this.options.layoutRoot||this.resumeFrom||T||d&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const w={...jr(h,"layout"),onPlay:g,onComplete:y};(u.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(c,T)}else d||nc(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ct(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(wh),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Jl(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(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(ec);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(tc);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(xh),this.nodes.forEach(fh),this.nodes.forEach(mh)):this.nodes.forEach(tc),this.clearAllSnapshots();const a=Ae.now();Se.delta=ot(0,1e3/60,a-Se.timestamp),Se.timestamp=a,Se.isProcessing=!0,Ji.update.process(Se),Ji.preRender.process(Se),Ji.render.process(Se),Se.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ar.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(vh),this.sharedNodes.forEach(Th)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,pe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){pe.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Pe(this.snapshot.measuredBox.x)&&!Pe(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=ge(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const l=i(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!r)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Kl(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;o&&this.instance&&(a||Ct(this.latestValues)||c)&&(r(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),jh(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:o}=this.options;if(!o)return ge();const a=o.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Ch))){const{scroll:u}=this.root;u&&(Yt(a.x,u.offset.x),Yt(a.y,u.offset.y))}return a}removeElementScroll(o){const a=ge();if(Le(a,o),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&&Le(a,o),Yt(a.x,c.offset.x),Yt(a.y,c.offset.y))}return a}applyTransform(o,a=!1){const l=ge();Le(l,o);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&Gt(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Ct(c.latestValues)&&Gt(l,c.latestValues)}return Ct(this.latestValues)&&Gt(l,this.latestValues),l}removeTransform(o){const a=ge();Le(a,o);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!Ct(u.latestValues))continue;Ur(u.latestValues)&&u.updateSnapshot();const c=ge(),d=u.measurePageBox();Le(c,d),Ul(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return Ct(this.latestValues)&&Ul(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Se.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:d}=this.options;if(!(!this.layout||!(c||d))){if(this.resolvedRelativeTargetAt=Se.timestamp,!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ge(),this.relativeTargetOrigin=ge(),Cn(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),Le(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=ge(),this.targetWithTransforms=ge()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Mm(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Le(this.target,this.layout.layoutBox),Za(this.target,this.targetDelta)):Le(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=ge(),this.relativeTargetOrigin=ge(),Cn(this.relativeTargetOrigin,this.target,f.target),Le(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Ur(this.parent.latestValues)||Ya(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Se.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;Le(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;Xf(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=ge());const{target:m}=o;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Bl(this.prevProjectionDelta.x,this.projectionDelta.x),Bl(this.prevProjectionDelta.y,this.projectionDelta.y)),jn(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!Zl(this.projectionDelta.x,this.prevProjectionDelta.x)||!Zl(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){if(this.options.visualElement?.scheduleRender(),o){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Xt(),this.projectionDelta=Xt(),this.projectionDeltaWithTransform=Xt()}setAnimationOrigin(o,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},d=Xt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=ge(),m=l?l.source:void 0,h=this.layout?this.layout.source:void 0,g=m!==h,y=this.getStack(),v=!y||y.members.length<=1,T=!!(g&&!v&&this.options.crossfade===!0&&!this.path.some(kh));this.animationProgress=0;let w;this.mixTargetDelta=k=>{const b=k/1e3;ic(d.x,o.x,b),ic(d.y,o.y,b),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Cn(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Sh(this.relativeTarget,this.relativeTargetOrigin,f,b),w&&lh(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=ge()),Le(w,this.relativeTarget)),g&&(this.animationValues=c,nh(c,u,this.latestValues,b,T,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=b},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(ct(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=pe.update(()=>{di.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=qt(0)),this.currentAnimation=Ml(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(dh),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&lc(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||ge();const d=Pe(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+d;const f=Pe(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}Le(a,l),Gt(a,c),jn(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new ch),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){const{layoutId:o}=this.options;return o?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:o}=this.options;return o?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&io("z",o,u,this.animationValues);for(let c=0;c<no.length;c++)io(`rotate${no[c]}`,o,u,this.animationValues),io(`skew${no[c]}`,o,u,this.animationValues);o.render();for(const c in u)o.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=li(a?.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=li(a?.pointerEvents)||""),this.hasProjected&&!Ct(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let d=uh(this.projectionDeltaWithTransform,this.treeScale,c);l&&(d=l(c,d)),o.transform=d;const{x:f,y:m}=this.projectionDelta;o.transformOrigin=`${f.origin*100}% ${m.origin*100}% 0`,u.animationValues?o.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:o.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const h in wn){if(c[h]===void 0)continue;const{correct:g,applyTo:y,isCSSVariable:v}=wn[h],T=d==="none"?c[h]:g(c[h],u);if(y){const w=y.length;for(let k=0;k<w;k++)o[y[k]]=T}else v?this.options.visualElement.renderState.vars[h]=T:o[h]=T}this.options.layoutId&&(o.pointerEvents=u===this?li(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>o.currentAnimation?.stop()),this.root.nodes.forEach(ec),this.root.sharedNodes.clear()}}}function fh(e){e.updateLayout()}function mh(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:r}=e.options,s=t.source!==e.layout.source;r==="size"?Ve(c=>{const d=s?t.measuredBox[c]:t.layoutBox[c],f=Pe(d);d.min=n[c].min,d.max=d.min+f}):lc(r,t.layoutBox,n)&&Ve(c=>{const d=s?t.measuredBox[c]:t.layoutBox[c],f=Pe(n[c]);d.max=d.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[c].max=e.relativeTarget[c].min+f)});const o=Xt();jn(o,n,t.layoutBox);const a=Xt();s?jn(a,e.applyTransform(i,!0),t.measuredBox):jn(a,n,t.layoutBox);const l=!Kl(o);let u=!1;if(!e.resumeFrom){const c=e.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:d,layout:f}=c;if(d&&f){const m=ge();Cn(m,t.layoutBox,d.layoutBox);const h=ge();Cn(h,n,f.layoutBox),Gl(m,h)||(u=!0),c.options.layoutRoot&&(e.relativeTarget=h,e.relativeTargetOrigin=m,e.relativeParent=c)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:a,layoutDelta:o,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function hh(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 gh(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function vh(e){e.clearSnapshot()}function ec(e){e.clearMeasurements()}function tc(e){e.isLayoutDirty=!1}function xh(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function nc(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function yh(e){e.resolveTargetDelta()}function bh(e){e.calcProjection()}function wh(e){e.resetSkewAndRotation()}function Th(e){e.removeLeadSnapshot()}function ic(e,t,n){e.translate=fe(t.translate,0,n),e.scale=fe(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function rc(e,t,n,i){e.min=fe(t.min,n.min,i),e.max=fe(t.max,n.max,i)}function Sh(e,t,n,i){rc(e.x,t.x,n.x,i),rc(e.y,t.y,n.y,i)}function kh(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Eh={duration:.45,ease:[.4,0,.1,1]},oc=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),sc=oc("applewebkit/")&&!oc("chrome/")?Math.round:Ne;function ac(e){e.min=sc(e.min),e.max=sc(e.max)}function jh(e){ac(e.x),ac(e.y)}function lc(e,t,n){return e==="position"||e==="preserve-aspect"&&!Om(Xl(t),Xl(n),.2)}function Ch(e){return e!==e.root&&e.scroll?.wasRoot}const Ph=Ql({attachResizeListener:(e,t)=>Sn(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ro={current:void 0},cc=Ql({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ro.current){const e=new Ph({});e.mount(window),e.setOptions({layoutScroll:!0}),ro.current=e}return ro.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Ah={pan:{Feature:Ym},drag:{Feature:Hm,ProjectionNode:cc,MeasureLayout:Ol}};function uc(e,t,n){const{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",n==="Start");const r="onHover"+n,s=i[r];s&&pe.postRender(()=>s(t,kn(t)))}class Dh extends pt{mount(){const{current:t}=this.node;t&&(this.unmount=sf(t,(n,i)=>(uc(this.node,i,"Start"),r=>uc(this.node,r,"End"))))}unmount(){}}class Rh extends pt{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=pn(Sn(this.node.current,"focus",()=>this.onFocus()),Sn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function dc(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 r="onTap"+(n==="End"?"":n),s=i[r];s&&pe.postRender(()=>s(t,kn(t)))}class Ih extends pt{mount(){const{current:t}=this.node;t&&(this.unmount=uf(t,(n,i)=>(dc(this.node,i,"Start"),(r,{success:s})=>dc(this.node,r,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const oo=new WeakMap,so=new WeakMap,Oh=e=>{const t=oo.get(e.target);t&&t(e)},Mh=e=>{e.forEach(Oh)};function Nh({root:e,...t}){const n=e||document;so.has(n)||so.set(n,{});const i=so.get(n),r=JSON.stringify(t);return i[r]||(i[r]=new IntersectionObserver(Mh,{root:e,...t})),i[r]}function Fh(e,t,n){const i=Nh(t);return oo.set(e,n),i.observe(e),()=>{oo.delete(e),i.unobserve(e)}}const Vh={some:0,all:1};class Lh extends pt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:i,amount:r="some",once:s}=t,o={root:n?n.current:void 0,rootMargin:i,threshold:typeof r=="number"?r:Vh[r]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,s&&!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 Fh(this.node.current,o,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 zh={...Cm,...{inView:{Feature:Lh},tap:{Feature:Ih},focus:{Feature:Rh},hover:{Feature:Dh}},...Ah,...{layout:{ProjectionNode:cc,MeasureLayout:Ol}}},Je=Hf(zh,nm);function ao(e){return typeof e=="object"&&!Array.isArray(e)}function pc(e,t,n,i){return typeof e=="string"&&ao(t)?xa(e,n,i):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function Bh(e,t,n){return e*(t+1)}function fc(e,t,n,i){return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:t.startsWith("<")?Math.max(0,n+parseFloat(t.slice(1))):i.get(t)??e}function $h(e,t,n){for(let i=0;i<e.length;i++){const r=e[i];r.at>t&&r.at<n&&(Gn(e,r),i--)}}function Wh(e,t,n,i,r,s){$h(e,r,s);for(let o=0;o<t.length;o++)e.push({value:t[o],at:fe(r,s,i[o]),easing:Ps(n,o)})}function Uh(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function qh(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const Kh="easeInOut",Hh=20;function Yh(e,{defaultTransition:t={},...n}={},i,r){const s=t.duration||.3,o=new Map,a=new Map,l={},u=new Map;let c=0,d=0,f=0;for(let m=0;m<e.length;m++){const h=e[m];if(typeof h=="string"){u.set(h,d);continue}else if(!Array.isArray(h)){u.set(h.name,fc(d,h.at,c,u));continue}let[g,y,v={}]=h;v.at!==void 0&&(d=fc(d,v.at,c,u));let T=0;const w=(k,b,C,R=0,E=0)=>{const I=Gh(k),{delay:_=0,times:N=Xs(I),type:Z="keyframes",repeat:H,repeatType:W,repeatDelay:J=0,...U}=b;let{ease:L=t.ease||"easeOut",duration:V}=b;const G=typeof _=="function"?_(R,E):_,x=I.length,P=kr(Z)?Z:r?.[Z||"keyframes"];if(x<=2&&P){let K=100;if(x===2&&Jh(I)){const F=I[1]-I[0];K=Math.abs(F)}const X={...U};V!==void 0&&(X.duration=Fe(V));const A=Ks(X,K,P);L=A.ease,V=A.duration}V??(V=s);const D=d+G;N.length===1&&N[0]===0&&(N[1]=1);const M=N.length-I.length;if(M>0&&Gs(N,M),I.length===1&&I.unshift(null),H){Me(H<Hh,"Repeat count too high, must be less than 20","repeat-count-high"),V=Bh(V,H);const K=[...I],X=[...N];L=Array.isArray(L)?[...L]:[L];const A=[...L];for(let F=0;F<H;F++){I.push(...K);for(let Q=0;Q<K.length;Q++)N.push(X[Q]+(F+1)),L.push(Q===0?"linear":Ps(A,Q-1))}Uh(N,H)}const z=D+V;Wh(C,I,L,N,D,z),T=Math.max(G+V,T),f=Math.max(z,f)};if(Te(g)){const k=mc(g,a);w(y,v,hc("default",k))}else{const k=pc(g,y,i,l),b=k.length;for(let C=0;C<b;C++){y=y,v=v;const R=k[C],E=mc(R,a);for(const I in y)w(y[I],Xh(v,I),hc(I,E),C,b)}}c=d,d+=T}return a.forEach((m,h)=>{for(const g in m){const y=m[g];y.sort(qh);const v=[],T=[],w=[];for(let b=0;b<y.length;b++){const{at:C,value:R,easing:E}=y[b];v.push(R),T.push(_t(0,f,C)),w.push(E||"easeOut")}T[0]!==0&&(T.unshift(0),v.unshift(v[0]),w.unshift(Kh)),T[T.length-1]!==1&&(T.push(1),v.push(null)),o.has(h)||o.set(h,{keyframes:{},transition:{}});const k=o.get(h);k.keyframes[g]=v,k.transition[g]={...t,duration:f,ease:w,times:T,...n}}}),o}function mc(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function hc(e,t){return t[e]||(t[e]=[]),t[e]}function Gh(e){return Array.isArray(e)?e:[e]}function Xh(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const Zh=e=>typeof e=="number",Jh=e=>e.every(Zh);function Qh(e,t){return e in t}class eg extends sl{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(Qh(n,t)){const i=t[n];if(typeof i=="string"||typeof i=="number")return i}}getBaseTargetFromProps(){}removeValueFromRenderState(t,n){delete n.output[t]}measureInstanceViewportBox(){return ge()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}function tg(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Ir(e)&&!Pa(e)?new dl(t):new cl(t);n.mount(e),Tn.set(e,n)}function ng(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new eg(t);n.mount(e),Tn.set(e,n)}function ig(e,t){return Te(e)||typeof e=="number"||typeof e=="string"&&!ao(t)}function gc(e,t,n,i){const r=[];if(ig(e,t))r.push(Ml(e,ao(t)&&t.default||t,n&&(n.default||n)));else{const s=pc(e,t,i),o=s.length;Me(!!o,"No valid elements provided.","no-valid-elements");for(let a=0;a<o;a++){const l=s[a];Me(l!==null,"You're trying to perform an animation on null. Ensure that selectors are correctly finding elements and refs are correctly hydrated.","animate-null");const u=l instanceof Element?tg:ng;Tn.has(l)||u(l);const c=Tn.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(a,o)),r.push(...Xr(c,{...t,transition:d},{}))}}return r}function rg(e,t,n){const i=[];return Yh(e,t,n,{spring:xn}).forEach(({keyframes:s,transition:o},a)=>{i.push(...gc(a,s,o))}),i}function og(e){return Array.isArray(e)&&e.some(Array.isArray)}function sg(e){function t(n,i,r){let s=[];return og(n)?s=rg(n,i,e):s=gc(n,i,r,e),new Wp(s)}return t}const ag=sg(),lg=["polygon(50% 50%,0 0,0 0,0 0,0 0,0 0)","polygon(50% 50%,0 0,100% 0,100% 0,100% 0,100% 0)","polygon(50% 50%,0 0,100% 0,100% 100%,100% 100%,100% 100%)","polygon(50% 50%,0 0,100% 0,100% 100%,0 100%,0 100%)","polygon(50% 50%,0 0,100% 0,100% 100%,0 100%,0 0)"],Jt=e=>{const{speed:t=1,className:n}=e,i=1/t,r=2/t;return p.jsx(ii,{children:p.jsx(Je.div,{role:"status",className:q("relative rounded-full",n),animate:{rotate:360},transition:{repeat:1/0,ease:"linear",duration:i},children:p.jsx(Je.div,{className:"absolute inset-0 rounded-full",style:{boxSizing:"border-box",borderStyle:"solid",borderWidth:2},animate:{clipPath:lg},transition:{repeat:1/0,ease:"linear",duration:r,times:[0,.25,.5,.75,1]}})})})},at={sm:"h-[var(--control-size-sm-height)]",md:"h-[var(--control-size-md-height)]",lg:"h-[var(--control-size-lg-height)]"},vc={sm:"min-h-[var(--control-size-sm-height)]",md:"min-h-[var(--control-size-md-height)]",lg:"min-h-[var(--control-size-lg-height)]"},Qe={sm:"text-[length:var(--control-size-sm-font-size)]",md:"text-[length:var(--control-size-md-font-size)]",lg:"text-[length:var(--control-size-lg-font-size)]"},cg={sm:"gap-[var(--control-size-sm-gap)]",md:"gap-[var(--control-size-md-gap)]",lg:"gap-[var(--control-size-lg-gap)]"},ug={sm:"px-[var(--control-size-sm-px)]",md:"px-[var(--control-size-md-px)]",lg:"px-[var(--control-size-lg-px)]"},ft={sm:"pl-[var(--control-size-sm-px)]",md:"pl-[var(--control-size-md-px)]",lg:"pl-[var(--control-size-lg-px)]"},lo={sm:"pr-[var(--control-size-sm-px)]",md:"pr-[var(--control-size-md-px)]",lg:"pr-[var(--control-size-lg-px)]"},mt={sm:"pr-[calc(var(--control-size-sm-px)+2rem)]",md:"pr-[calc(var(--control-size-md-px)+2rem)]",lg:"pr-[calc(var(--control-size-lg-px)+2rem)]"},pi={sm:"pr-[calc(var(--control-size-sm-px)+3.75rem)]",md:"pr-[calc(var(--control-size-md-px)+3.75rem)]",lg:"pr-[calc(var(--control-size-lg-px)+3.75rem)]"},xc={sm:"pl-[calc(var(--control-size-sm-icon-offset)+var(--control-size-sm-icon)+0.75rem)]",md:"pl-[calc(var(--control-size-md-icon-offset)+var(--control-size-md-icon)+0.75rem)]",lg:"pl-[calc(var(--control-size-lg-icon-offset)+var(--control-size-lg-icon)+0.75rem)]"},yc={sm:"left-[var(--control-size-sm-icon-offset)]",md:"left-[var(--control-size-md-icon-offset)]",lg:"left-[var(--control-size-lg-icon-offset)]"},dg={sm:"right-[var(--control-size-sm-px)]",md:"right-[var(--control-size-md-px)]",lg:"right-[var(--control-size-lg-px)]"},At={sm:"h-[var(--control-size-sm-icon)] w-[var(--control-size-sm-icon)]",md:"h-[var(--control-size-md-icon)] w-[var(--control-size-md-icon)]",lg:"h-[var(--control-size-lg-icon)] w-[var(--control-size-lg-icon)]"},bc={sm:"h-[var(--control-size-sm-height)] w-[var(--control-size-sm-height)]",md:"h-[var(--control-size-md-height)] w-[var(--control-size-md-height)]",lg:"h-[var(--control-size-lg-height)] w-[var(--control-size-lg-height)]"},pg=`
31
31
  inline-flex flex-row items-center justify-center
32
32
  button-ring font-semibold ring-0 disabled:hover:ring-0 hover:ring-4 active:ring-1
33
33
  rounded-[var(--border-radius-input)]
34
34
  cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-4
35
35
  disabled:cursor-default
36
- `,bh={primary:"border button-primary shadow-sm",secondary:"border button-secondary shadow-sm",tertiary:"border button-tertiary",white:"border button-white shadow-sm",black:"border button-black shadow-sm",transparent:"border button-transparent"},Bl=C.forwardRef((e,t)=>{const{variant:n="white",size:i="md",className:r,children:o,loading:s=!1,Icon:a,...l}=e;return p.jsxs("button",{ref:t,className:N(yh,bh[n],et[i],vh[i],qe[i],gh[i],r),...l,children:[s&&p.jsx(It,{className:N(pt[i])}),!s&&p.jsxs(p.Fragment,{children:[a&&p.jsx(a,{className:N(pt[i],"-ml-1")}),o]})]})}),wh=`
36
+ `,fg={primary:"border button-primary shadow-sm",secondary:"border button-secondary shadow-sm",tertiary:"border button-tertiary",white:"border button-white shadow-sm",black:"border button-black shadow-sm",transparent:"border button-transparent"},wc=j.forwardRef((e,t)=>{const{variant:n="white",size:i="md",className:r,children:s,loading:o=!1,Icon:a,...l}=e;return p.jsxs("button",{ref:t,className:q(pg,fg[n],at[i],ug[i],Qe[i],cg[i],r),...l,children:[o&&p.jsx(Jt,{className:q(At[i])}),!o&&p.jsxs(p.Fragment,{children:[a&&p.jsx(a,{className:q(At[i],"-ml-1")}),s]})]})}),mg=`
37
37
  inline-flex flex-row items-center justify-center
38
38
  button-ring font-semibold ring-0 disabled:hover:ring-0 hover:ring-4 active:ring-1
39
39
  rounded-[var(--border-radius-input)]
40
40
  cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-4
41
41
  disabled:cursor-default
42
- `,Th={primary:"border button-primary shadow-sm",secondary:"border button-secondary shadow-sm",tertiary:"border button-tertiary",white:"border button-white shadow-sm",black:"border button-black shadow-sm",transparent:"border button-transparent"},_n=C.forwardRef((e,t)=>{const{variant:n="white",size:i="md",className:r,Icon:o,...s}=e;return p.jsx("button",{ref:t,className:N(wh,Th[n],zl[i],r),...s,children:p.jsx(o,{className:pt[i]})})}),Sh=`
42
+ `,hg={primary:"border button-primary shadow-sm",secondary:"border button-secondary shadow-sm",tertiary:"border button-tertiary",white:"border button-white shadow-sm",black:"border button-black shadow-sm",transparent:"border button-transparent"},fi=j.forwardRef((e,t)=>{const{variant:n="white",size:i="md",className:r,Icon:s,...o}=e;return p.jsx("button",{ref:t,className:q(mg,hg[n],bc[i],r),...o,children:p.jsx(s,{className:At[i]})})}),gg=`
43
43
  inline-flex flex-row items-center justify-center
44
44
  button-ring font-semibold ring-0 disabled:hover:ring-0 hover:ring-4 active:ring-1 rounded-full cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-4
45
45
  disabled:cursor-default
46
- `,kh={primary:"border button-primary shadow-sm",secondary:"border button-secondary shadow-sm",tertiary:"border button-tertiary",white:"border button-white shadow-sm",black:"border button-black shadow-sm",transparent:"border button-transparent"},Pr=C.forwardRef((e,t)=>{const{variant:n="white",size:i="md",className:r,Icon:o,...s}=e;return p.jsx("button",{ref:t,className:N(Sh,kh[n],zl[i],r),...s,children:p.jsx(o,{className:pt[i]})})});/**
46
+ `,vg={primary:"border button-primary shadow-sm",secondary:"border button-secondary shadow-sm",tertiary:"border button-tertiary",white:"border button-white shadow-sm",black:"border button-black shadow-sm",transparent:"border button-transparent"},co=j.forwardRef((e,t)=>{const{variant:n="white",size:i="md",className:r,Icon:s,...o}=e;return p.jsx("button",{ref:t,className:q(gg,vg[n],bc[i],r),...o,children:p.jsx(s,{className:At[i]})})});/**
47
47
  * @license @tabler/icons-react v3.34.1 - MIT
48
48
  *
49
49
  * This source code is licensed under the MIT license.
50
50
  * See the LICENSE file in the root directory of this source tree.
51
- */var jh={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};/**
51
+ */var xg={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};/**
52
52
  * @license @tabler/icons-react v3.34.1 - MIT
53
53
  *
54
54
  * This source code is licensed under the MIT license.
55
55
  * See the LICENSE file in the root directory of this source tree.
56
- */const fe=(e,t,n,i)=>{const r=S.forwardRef(({color:o="currentColor",size:s=24,stroke:a=2,title:l,className:u,children:c,...d},f)=>S.createElement("svg",{ref:f,...jh[e],width:s,height:s,className:["tabler-icon",`tabler-icon-${t}`,u].join(" "),...e==="filled"?{fill:o}:{strokeWidth:a,stroke:o},...d},[l&&S.createElement("title",{key:"svg-title"},l),...i.map(([m,g])=>S.createElement(m,g)),...Array.isArray(c)?c:[c]]));return r.displayName=`${n}`,r};/**
56
+ */const be=(e,t,n,i)=>{const r=S.forwardRef(({color:s="currentColor",size:o=24,stroke:a=2,title:l,className:u,children:c,...d},f)=>S.createElement("svg",{ref:f,...xg[e],width:o,height:o,className:["tabler-icon",`tabler-icon-${t}`,u].join(" "),...e==="filled"?{fill:s}:{strokeWidth:a,stroke:s},...d},[l&&S.createElement("title",{key:"svg-title"},l),...i.map(([m,h])=>S.createElement(m,h)),...Array.isArray(c)?c:[c]]));return r.displayName=`${n}`,r};/**
57
57
  * @license @tabler/icons-react v3.34.1 - MIT
58
58
  *
59
59
  * This source code is licensed under the MIT license.
60
60
  * See the LICENSE file in the root directory of this source tree.
61
- */const Eh=fe("outline","check","Check",[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]]);/**
61
+ */const yg=be("outline","check","Check",[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]]);/**
62
62
  * @license @tabler/icons-react v3.34.1 - MIT
63
63
  *
64
64
  * This source code is licensed under the MIT license.
65
65
  * See the LICENSE file in the root directory of this source tree.
66
- */const cn=fe("outline","chevron-down","ChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]);/**
66
+ */const Qt=be("outline","chevron-down","ChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]);/**
67
67
  * @license @tabler/icons-react v3.34.1 - MIT
68
68
  *
69
69
  * This source code is licensed under the MIT license.
70
70
  * See the LICENSE file in the root directory of this source tree.
71
- */const Ch=fe("outline","chevron-right","ChevronRight",[["path",{d:"M9 6l6 6l-6 6",key:"svg-0"}]]);/**
71
+ */const bg=be("outline","chevron-right","ChevronRight",[["path",{d:"M9 6l6 6l-6 6",key:"svg-0"}]]);/**
72
72
  * @license @tabler/icons-react v3.34.1 - MIT
73
73
  *
74
74
  * This source code is licensed under the MIT license.
75
75
  * See the LICENSE file in the root directory of this source tree.
76
- */const Ph=fe("outline","chevron-up","ChevronUp",[["path",{d:"M6 15l6 -6l6 6",key:"svg-0"}]]);/**
76
+ */const wg=be("outline","chevron-up","ChevronUp",[["path",{d:"M6 15l6 -6l6 6",key:"svg-0"}]]);/**
77
77
  * @license @tabler/icons-react v3.34.1 - MIT
78
78
  *
79
79
  * This source code is licensed under the MIT license.
80
80
  * See the LICENSE file in the root directory of this source tree.
81
- */const Ah=fe("outline","cloud-upload","CloudUpload",[["path",{d:"M7 18a4.6 4.4 0 0 1 0 -9a5 4.5 0 0 1 11 2h1a3.5 3.5 0 0 1 0 7h-1",key:"svg-0"}],["path",{d:"M9 15l3 -3l3 3",key:"svg-1"}],["path",{d:"M12 12l0 9",key:"svg-2"}]]);/**
81
+ */const Tg=be("outline","cloud-upload","CloudUpload",[["path",{d:"M7 18a4.6 4.4 0 0 1 0 -9a5 4.5 0 0 1 11 2h1a3.5 3.5 0 0 1 0 7h-1",key:"svg-0"}],["path",{d:"M9 15l3 -3l3 3",key:"svg-1"}],["path",{d:"M12 12l0 9",key:"svg-2"}]]);/**
82
82
  * @license @tabler/icons-react v3.34.1 - MIT
83
83
  *
84
84
  * This source code is licensed under the MIT license.
85
85
  * See the LICENSE file in the root directory of this source tree.
86
- */const Dh=fe("outline","eye-off","EyeOff",[["path",{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828",key:"svg-0"}],["path",{d:"M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87",key:"svg-1"}],["path",{d:"M3 3l18 18",key:"svg-2"}]]);/**
86
+ */const Sg=be("outline","eye-off","EyeOff",[["path",{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828",key:"svg-0"}],["path",{d:"M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87",key:"svg-1"}],["path",{d:"M3 3l18 18",key:"svg-2"}]]);/**
87
87
  * @license @tabler/icons-react v3.34.1 - MIT
88
88
  *
89
89
  * This source code is licensed under the MIT license.
90
90
  * See the LICENSE file in the root directory of this source tree.
91
- */const Rh=fe("outline","eye","Eye",[["path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6",key:"svg-1"}]]);/**
91
+ */const kg=be("outline","eye","Eye",[["path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6",key:"svg-1"}]]);/**
92
92
  * @license @tabler/icons-react v3.34.1 - MIT
93
93
  *
94
94
  * This source code is licensed under the MIT license.
95
95
  * See the LICENSE file in the root directory of this source tree.
96
- */const $l=fe("outline","list","List",[["path",{d:"M9 6l11 0",key:"svg-0"}],["path",{d:"M9 12l11 0",key:"svg-1"}],["path",{d:"M9 18l11 0",key:"svg-2"}],["path",{d:"M5 6l0 .01",key:"svg-3"}],["path",{d:"M5 12l0 .01",key:"svg-4"}],["path",{d:"M5 18l0 .01",key:"svg-5"}]]);/**
96
+ */const Tc=be("outline","list","List",[["path",{d:"M9 6l11 0",key:"svg-0"}],["path",{d:"M9 12l11 0",key:"svg-1"}],["path",{d:"M9 18l11 0",key:"svg-2"}],["path",{d:"M5 6l0 .01",key:"svg-3"}],["path",{d:"M5 12l0 .01",key:"svg-4"}],["path",{d:"M5 18l0 .01",key:"svg-5"}]]);/**
97
97
  * @license @tabler/icons-react v3.34.1 - MIT
98
98
  *
99
99
  * This source code is licensed under the MIT license.
100
100
  * See the LICENSE file in the root directory of this source tree.
101
- */const Oh=fe("outline","paperclip","Paperclip",[["path",{d:"M15 7l-6.5 6.5a1.5 1.5 0 0 0 3 3l6.5 -6.5a3 3 0 0 0 -6 -6l-6.5 6.5a4.5 4.5 0 0 0 9 9l6.5 -6.5",key:"svg-0"}]]);/**
101
+ */const Eg=be("outline","paperclip","Paperclip",[["path",{d:"M15 7l-6.5 6.5a1.5 1.5 0 0 0 3 3l6.5 -6.5a3 3 0 0 0 -6 -6l-6.5 6.5a4.5 4.5 0 0 0 9 9l6.5 -6.5",key:"svg-0"}]]);/**
102
102
  * @license @tabler/icons-react v3.34.1 - MIT
103
103
  *
104
104
  * This source code is licensed under the MIT license.
105
105
  * See the LICENSE file in the root directory of this source tree.
106
- */const Wl=fe("outline","plus","Plus",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]]);/**
106
+ */const Sc=be("outline","plus","Plus",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]]);/**
107
107
  * @license @tabler/icons-react v3.34.1 - MIT
108
108
  *
109
109
  * This source code is licensed under the MIT license.
110
110
  * See the LICENSE file in the root directory of this source tree.
111
- */const Ul=fe("outline","search-off","SearchOff",[["path",{d:"M5.039 5.062a7 7 0 0 0 9.91 9.89m1.584 -2.434a7 7 0 0 0 -9.038 -9.057",key:"svg-0"}],["path",{d:"M3 3l18 18",key:"svg-1"}]]);/**
111
+ */const uo=be("outline","search-off","SearchOff",[["path",{d:"M5.039 5.062a7 7 0 0 0 9.91 9.89m1.584 -2.434a7 7 0 0 0 -9.038 -9.057",key:"svg-0"}],["path",{d:"M3 3l18 18",key:"svg-1"}]]);/**
112
112
  * @license @tabler/icons-react v3.34.1 - MIT
113
113
  *
114
114
  * This source code is licensed under the MIT license.
115
115
  * See the LICENSE file in the root directory of this source tree.
116
- */const Ar=fe("outline","search","Search",[["path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M21 21l-6 -6",key:"svg-1"}]]);/**
116
+ */const mi=be("outline","search","Search",[["path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M21 21l-6 -6",key:"svg-1"}]]);/**
117
117
  * @license @tabler/icons-react v3.34.1 - MIT
118
118
  *
119
119
  * This source code is licensed under the MIT license.
120
120
  * See the LICENSE file in the root directory of this source tree.
121
- */const ql=fe("outline","settings","Settings",[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]]);/**
121
+ */const kc=be("outline","settings","Settings",[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]]);/**
122
122
  * @license @tabler/icons-react v3.34.1 - MIT
123
123
  *
124
124
  * This source code is licensed under the MIT license.
125
125
  * See the LICENSE file in the root directory of this source tree.
126
- */const Mh=fe("outline","trash","Trash",[["path",{d:"M4 7l16 0",key:"svg-0"}],["path",{d:"M10 11l0 6",key:"svg-1"}],["path",{d:"M14 11l0 6",key:"svg-2"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-3"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-4"}]]);/**
126
+ */const jg=be("outline","trash","Trash",[["path",{d:"M4 7l16 0",key:"svg-0"}],["path",{d:"M10 11l0 6",key:"svg-1"}],["path",{d:"M14 11l0 6",key:"svg-2"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-3"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-4"}]]);/**
127
127
  * @license @tabler/icons-react v3.34.1 - MIT
128
128
  *
129
129
  * This source code is licensed under the MIT license.
130
130
  * See the LICENSE file in the root directory of this source tree.
131
- */const ft=fe("outline","x","X",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);/**
131
+ */const ht=be("outline","x","X",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);/**
132
132
  * @license @tabler/icons-react v3.34.1 - MIT
133
133
  *
134
134
  * This source code is licensed under the MIT license.
135
135
  * See the LICENSE file in the root directory of this source tree.
136
- */const Ih=fe("filled","alert-triangle-filled","AlertTriangleFilled",[["path",{d:"M12 1.67c.955 0 1.845 .467 2.39 1.247l.105 .16l8.114 13.548a2.914 2.914 0 0 1 -2.307 4.363l-.195 .008h-16.225a2.914 2.914 0 0 1 -2.582 -4.2l.099 -.185l8.11 -13.538a2.914 2.914 0 0 1 2.491 -1.403zm.01 13.33l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm-.01 -7a1 1 0 0 0 -.993 .883l-.007 .117v4l.007 .117a1 1 0 0 0 1.986 0l.007 -.117v-4l-.007 -.117a1 1 0 0 0 -.993 -.883z",key:"svg-0"}]]);/**
136
+ */const Cg=be("filled","alert-triangle-filled","AlertTriangleFilled",[["path",{d:"M12 1.67c.955 0 1.845 .467 2.39 1.247l.105 .16l8.114 13.548a2.914 2.914 0 0 1 -2.307 4.363l-.195 .008h-16.225a2.914 2.914 0 0 1 -2.582 -4.2l.099 -.185l8.11 -13.538a2.914 2.914 0 0 1 2.491 -1.403zm.01 13.33l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm-.01 -7a1 1 0 0 0 -.993 .883l-.007 .117v4l.007 .117a1 1 0 0 0 1.986 0l.007 -.117v-4l-.007 -.117a1 1 0 0 0 -.993 -.883z",key:"svg-0"}]]);/**
137
137
  * @license @tabler/icons-react v3.34.1 - MIT
138
138
  *
139
139
  * This source code is licensed under the MIT license.
140
140
  * See the LICENSE file in the root directory of this source tree.
141
- */const Dr=fe("filled","circle-check-filled","CircleCheckFilled",[["path",{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-1.293 5.953a1 1 0 0 0 -1.32 -.083l-.094 .083l-3.293 3.292l-1.293 -1.292l-.094 -.083a1 1 0 0 0 -1.403 1.403l.083 .094l2 2l.094 .083a1 1 0 0 0 1.226 0l.094 -.083l4 -4l.083 -.094a1 1 0 0 0 -.083 -1.32z",key:"svg-0"}]]);/**
141
+ */const po=be("filled","circle-check-filled","CircleCheckFilled",[["path",{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-1.293 5.953a1 1 0 0 0 -1.32 -.083l-.094 .083l-3.293 3.292l-1.293 -1.292l-.094 -.083a1 1 0 0 0 -1.403 1.403l.083 .094l2 2l.094 .083a1 1 0 0 0 1.226 0l.094 -.083l4 -4l.083 -.094a1 1 0 0 0 -.083 -1.32z",key:"svg-0"}]]);/**
142
142
  * @license @tabler/icons-react v3.34.1 - MIT
143
143
  *
144
144
  * This source code is licensed under the MIT license.
145
145
  * See the LICENSE file in the root directory of this source tree.
146
- */const Rr=fe("filled","exclamation-circle-filled","ExclamationCircleFilled",[["path",{d:"M17 3.34a10 10 0 1 1 -15 8.66l.005 -.324a10 10 0 0 1 14.995 -8.336m-5 11.66a1 1 0 0 0 -1 1v.01a1 1 0 0 0 2 0v-.01a1 1 0 0 0 -1 -1m0 -7a1 1 0 0 0 -1 1v4a1 1 0 0 0 2 0v-4a1 1 0 0 0 -1 -1",key:"svg-0"}]]);/**
146
+ */const fo=be("filled","exclamation-circle-filled","ExclamationCircleFilled",[["path",{d:"M17 3.34a10 10 0 1 1 -15 8.66l.005 -.324a10 10 0 0 1 14.995 -8.336m-5 11.66a1 1 0 0 0 -1 1v.01a1 1 0 0 0 2 0v-.01a1 1 0 0 0 -1 -1m0 -7a1 1 0 0 0 -1 1v4a1 1 0 0 0 2 0v-4a1 1 0 0 0 -1 -1",key:"svg-0"}]]);/**
147
147
  * @license @tabler/icons-react v3.34.1 - MIT
148
148
  *
149
149
  * This source code is licensed under the MIT license.
150
150
  * See the LICENSE file in the root directory of this source tree.
151
- */const Nh=fe("filled","info-circle-filled","InfoCircleFilled",[["path",{d:"M12 2c5.523 0 10 4.477 10 10a10 10 0 0 1 -19.995 .324l-.005 -.324l.004 -.28c.148 -5.393 4.566 -9.72 9.996 -9.72zm0 9h-1l-.117 .007a1 1 0 0 0 0 1.986l.117 .007v3l.007 .117a1 1 0 0 0 .876 .876l.117 .007h1l.117 -.007a1 1 0 0 0 .876 -.876l.007 -.117l-.007 -.117a1 1 0 0 0 -.764 -.857l-.112 -.02l-.117 -.006v-3l-.007 -.117a1 1 0 0 0 -.876 -.876l-.117 -.007zm.01 -3l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z",key:"svg-0"}]]);/**
151
+ */const Pg=be("filled","info-circle-filled","InfoCircleFilled",[["path",{d:"M12 2c5.523 0 10 4.477 10 10a10 10 0 0 1 -19.995 .324l-.005 -.324l.004 -.28c.148 -5.393 4.566 -9.72 9.996 -9.72zm0 9h-1l-.117 .007a1 1 0 0 0 0 1.986l.117 .007v3l.007 .117a1 1 0 0 0 .876 .876l.117 .007h1l.117 -.007a1 1 0 0 0 .876 -.876l.007 -.117l-.007 -.117a1 1 0 0 0 -.764 -.857l-.112 -.02l-.117 -.006v-3l-.007 -.117a1 1 0 0 0 -.876 -.876l-.117 -.007zm.01 -3l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z",key:"svg-0"}]]);/**
152
152
  * @license @tabler/icons-react v3.34.1 - MIT
153
153
  *
154
154
  * This source code is licensed under the MIT license.
155
155
  * See the LICENSE file in the root directory of this source tree.
156
- */const Fh=fe("filled","mail-filled","MailFilled",[["path",{d:"M22 7.535v9.465a3 3 0 0 1 -2.824 2.995l-.176 .005h-14a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-9.465l9.445 6.297l.116 .066a1 1 0 0 0 .878 0l.116 -.066l9.445 -6.297z",key:"svg-0"}],["path",{d:"M19 4c1.08 0 2.027 .57 2.555 1.427l-9.555 6.37l-9.555 -6.37a2.999 2.999 0 0 1 2.354 -1.42l.201 -.007h14z",key:"svg-1"}]]),Ve=e=>{const{children:t}=e;return t?p.jsx("label",{className:"input-label font-medium mb-1",children:t}):null},He=()=>p.jsx("div",{className:"h-5 w-5",children:p.jsx(Rr,{className:"h-5 w-5 input-error-icon"})}),Ke=S.createContext("md"),Vh=()=>S.useContext(Ke),tt=e=>{const{children:t,className:n}=e,i=Vh();return p.jsx("div",{className:N("absolute top-1/2 -translate-y-1/2 flex flex-row items-center gap-1",xh[i],n),children:t})},Se=e=>{const{children:t}=e;return t?p.jsx("div",{className:"input-description text-sm font-medium mt-2",children:t}):null},ke=e=>{const{children:t}=e;return t?p.jsx("div",{className:"input-error-text text-sm font-medium mt-2",children:t}):null},Or=e=>{const{className:t,label:n,description:i,Icon:r,error:o,buttonTray:s,size:a="md",...l}=e,u=!!o||!!s;return p.jsx(Ke.Provider,{value:a,children:p.jsxs("div",{className:N("flex flex-col",t),children:[p.jsx(Ve,{children:n}),p.jsxs("div",{className:"flex flex-col relative",children:[r&&p.jsx(r,{className:N("input-icon absolute top-1/2 -translate-y-1/2",pt[a],Ll[a])}),p.jsx("input",{className:N("border input-base transition-all duration-150 rounded-xl shadow-sm ring-0 focus:ring-4 focus:outline-none",et[a],qe[a],r?_l[a]:ut[a],u?dt[a]:Cr[a],o&&"input-error"),...l}),p.jsxs(tt,{children:[o&&p.jsx(He,{}),s]})]}),p.jsx(Se,{children:i}),p.jsx(ke,{children:o})]})})},_h=e=>{const t=e.match(/^#?([0-9a-fA-F]{6})$/);if(!t)return null;const n=parseInt(t[1],16);return[(n>>16&255)/255,(n>>8&255)/255,(n&255)/255]},Lh=(e,t,n)=>{const i=r=>Math.round(r*255).toString(16).padStart(2,"0").toUpperCase();return"#"+i(e)+i(t)+i(n)},zh=(e,t,n)=>{const i=Math.max(e,t,n),r=Math.min(e,t,n),o=i-r;let s=0;return o!==0&&(i===e?s=((t-n)/o+6)%6:i===t?s=(n-e)/o+2:s=(e-t)/o+4,s*=60),[s,i===0?0:o/i,i]},Bh=(e,t,n)=>{const i=n*t,r=e/60,o=i*(1-Math.abs(r%2-1));let s=0,a=0,l=0;r<1?(s=i,a=o):r<2?(s=o,a=i):r<3?(a=i,l=o):r<4?(a=o,l=i):r<5?(s=o,l=i):(s=i,l=o);const u=n-i;return[s+u,a+u,l+u]},un=(e,t,n)=>{const[i,r,o]=Bh(e,t,n);return Lh(i,r,o)},Hl=e=>{const t=_h(e);return t?zh(t[0],t[1],t[2]):null},$h=e=>{const t=e.trim();if(!t)return null;const n=t.match(/^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/);if(n){let s=n[1];return s.length===3&&(s=s.split("").map(a=>a+a).join("")),"#"+s.toUpperCase()}if(typeof document>"u")return null;const i=document.createElement("div");if(i.style.color=t,!i.style.color)return null;document.body.appendChild(i);const r=getComputedStyle(i).color;document.body.removeChild(i);const o=r.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);return o?"#"+[o[1],o[2],o[3]].map(s=>parseInt(s,10).toString(16).padStart(2,"0")).join("").toUpperCase():null},Mr=e=>{const t=C.useRef(null),[n,i]=C.useState(!1),r=o=>{t.current=null,i(!1),o.currentTarget.releasePointerCapture?.(o.pointerId)};return{isDragging:n,bind:{onPointerDown:o=>{const s=o.currentTarget;t.current=s.getBoundingClientRect(),s.setPointerCapture?.(o.pointerId),i(!0),e(o.clientX,o.clientY,t.current)},onPointerMove:o=>{t.current&&e(o.clientX,o.clientY,t.current)},onPointerUp:r,onPointerCancel:r}}},Wh="flex flex-col dropdown-panel border mt-1 rounded-xl shadow-lg overflow-y-auto relative space-y-1",Uh={sm:"p-2",md:"p-3",lg:"p-4"},mt=e=>{const{className:t,children:n,padding:i="md",...r}=e;return p.jsx("div",{className:N(Wh,Uh[i],t),...r,children:n})};function Ln(){return typeof window<"u"}function Nt(e){return Ir(e)?(e.nodeName||"").toLowerCase():"#document"}function je(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function _e(e){var t;return(t=(Ir(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ir(e){return Ln()?e instanceof Node||e instanceof je(e).Node:!1}function ye(e){return Ln()?e instanceof Element||e instanceof je(e).Element:!1}function Le(e){return Ln()?e instanceof HTMLElement||e instanceof je(e).HTMLElement:!1}function Nr(e){return!Ln()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof je(e).ShadowRoot}const qh=new Set(["inline","contents"]);function dn(e){const{overflow:t,overflowX:n,overflowY:i,display:r}=Me(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&!qh.has(r)}const Hh=new Set(["table","td","th"]);function Kh(e){return Hh.has(Nt(e))}const Yh=[":popover-open",":modal"];function zn(e){return Yh.some(t=>{try{return e.matches(t)}catch{return!1}})}const Gh=["transform","translate","scale","rotate","perspective"],Xh=["transform","translate","scale","rotate","perspective","filter"],Zh=["paint","layout","strict","content"];function Fr(e){const t=Vr(),n=ye(e)?Me(e):e;return Gh.some(i=>n[i]?n[i]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Xh.some(i=>(n.willChange||"").includes(i))||Zh.some(i=>(n.contain||"").includes(i))}function Jh(e){let t=nt(e);for(;Le(t)&&!Ft(t);){if(Fr(t))return t;if(zn(t))return null;t=nt(t)}return null}function Vr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Qh=new Set(["html","body","#document"]);function Ft(e){return Qh.has(Nt(e))}function Me(e){return je(e).getComputedStyle(e)}function Bn(e){return ye(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function nt(e){if(Nt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Nr(e)&&e.host||_e(e);return Nr(t)?t.host:t}function Kl(e){const t=nt(e);return Ft(t)?e.ownerDocument?e.ownerDocument.body:e.body:Le(t)&&dn(t)?t:Kl(t)}function pn(e,t,n){var i;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=Kl(e),o=r===((i=e.ownerDocument)==null?void 0:i.body),s=je(r);if(o){const a=_r(s);return t.concat(s,s.visualViewport||[],dn(r)?r:[],a&&n?pn(a):[])}return t.concat(r,pn(r,[],n))}function _r(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const fn=Math.min,Re=Math.max,$n=Math.round,Wn=Math.floor,ze=e=>({x:e,y:e});function Yl(e,t){return typeof e=="function"?e(t):e}function Lr(e){return e.split("-")[0]}function Gl(e){return e.split("-")[1]}function eg(e){return e==="x"?"y":"x"}function tg(e){return e==="y"?"height":"width"}const ng=new Set(["top","bottom"]);function zr(e){return ng.has(Lr(e))?"y":"x"}function ig(e){return eg(zr(e))}function rg(e){return{top:0,right:0,bottom:0,left:0,...e}}function og(e){return typeof e!="number"?rg(e):{top:e,right:e,bottom:e,left:e}}function Un(e){const{x:t,y:n,width:i,height:r}=e;return{width:i,height:r,top:n,left:t,right:t+i,bottom:n+r,x:t,y:n}}/*!
156
+ */const Ag=be("filled","mail-filled","MailFilled",[["path",{d:"M22 7.535v9.465a3 3 0 0 1 -2.824 2.995l-.176 .005h-14a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-9.465l9.445 6.297l.116 .066a1 1 0 0 0 .878 0l.116 -.066l9.445 -6.297z",key:"svg-0"}],["path",{d:"M19 4c1.08 0 2.027 .57 2.555 1.427l-9.555 6.37l-9.555 -6.37a2.999 2.999 0 0 1 2.354 -1.42l.201 -.007h14z",key:"svg-1"}]]),qe=e=>{const{children:t}=e;return t?p.jsx("label",{className:"input-label font-medium mb-1",children:t}):null},et=()=>p.jsx("div",{className:"h-5 w-5",children:p.jsx(fo,{className:"h-5 w-5 input-error-icon"})}),tt=S.createContext("md"),Dg=()=>S.useContext(tt),lt=j.forwardRef((e,t)=>{const{children:n,className:i}=e,r=Dg();return p.jsx("div",{ref:t,className:q("absolute top-1/2 -translate-y-1/2 flex flex-row items-center gap-1",dg[r],i),children:n})}),De=e=>{const{children:t}=e;return t?p.jsx("div",{className:"input-description text-sm font-medium mt-2",children:t}):null},Re=e=>{const{children:t}=e;return t?p.jsx("div",{className:"input-error-text text-sm font-medium mt-2",children:t}):null},mo=e=>{const{className:t,label:n,description:i,Icon:r,error:s,buttonTray:o,size:a="md",...l}=e,u=!!s||!!o;return p.jsx(tt.Provider,{value:a,children:p.jsxs("div",{className:q("flex flex-col",t),children:[p.jsx(qe,{children:n}),p.jsxs("div",{className:"flex flex-col relative",children:[r&&p.jsx(r,{className:q("input-icon absolute top-1/2 -translate-y-1/2",At[a],yc[a])}),p.jsx("input",{className:q("border input-base transition-all duration-150 rounded-xl shadow-sm ring-0 focus:ring-4 focus:outline-none",at[a],Qe[a],r?xc[a]:ft[a],u?mt[a]:lo[a],s&&"input-error"),...l}),p.jsxs(lt,{children:[s&&p.jsx(et,{}),o]})]}),p.jsx(De,{children:i}),p.jsx(Re,{children:s})]})})},Rg=e=>{const t=e.match(/^#?([0-9a-fA-F]{6})$/);if(!t)return null;const n=parseInt(t[1],16);return[(n>>16&255)/255,(n>>8&255)/255,(n&255)/255]},Ig=(e,t,n)=>{const i=r=>Math.round(r*255).toString(16).padStart(2,"0").toUpperCase();return"#"+i(e)+i(t)+i(n)},Og=(e,t,n)=>{const i=Math.max(e,t,n),r=Math.min(e,t,n),s=i-r;let o=0;return s!==0&&(i===e?o=((t-n)/s+6)%6:i===t?o=(n-e)/s+2:o=(e-t)/s+4,o*=60),[o,i===0?0:s/i,i]},Mg=(e,t,n)=>{const i=n*t,r=e/60,s=i*(1-Math.abs(r%2-1));let o=0,a=0,l=0;r<1?(o=i,a=s):r<2?(o=s,a=i):r<3?(a=i,l=s):r<4?(a=s,l=i):r<5?(o=s,l=i):(o=i,l=s);const u=n-i;return[o+u,a+u,l+u]},An=(e,t,n)=>{const[i,r,s]=Mg(e,t,n);return Ig(i,r,s)},Ec=e=>{const t=Rg(e);return t?Og(t[0],t[1],t[2]):null},Ng=e=>{const t=e.trim();if(!t)return null;const n=t.match(/^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/);if(n){let o=n[1];return o.length===3&&(o=o.split("").map(a=>a+a).join("")),"#"+o.toUpperCase()}if(typeof document>"u")return null;const i=document.createElement("div");if(i.style.color=t,!i.style.color)return null;document.body.appendChild(i);const r=getComputedStyle(i).color;document.body.removeChild(i);const s=r.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);return s?"#"+[s[1],s[2],s[3]].map(o=>parseInt(o,10).toString(16).padStart(2,"0")).join("").toUpperCase():null},ho=e=>{const t=j.useRef(null),[n,i]=j.useState(!1),r=s=>{t.current=null,i(!1),s.currentTarget.releasePointerCapture?.(s.pointerId)};return{isDragging:n,bind:{onPointerDown:s=>{const o=s.currentTarget;t.current=o.getBoundingClientRect(),o.setPointerCapture?.(s.pointerId),i(!0),e(s.clientX,s.clientY,t.current)},onPointerMove:s=>{t.current&&e(s.clientX,s.clientY,t.current)},onPointerUp:r,onPointerCancel:r}}},Fg="flex flex-col dropdown-panel border mt-1 rounded-xl shadow-lg overflow-y-auto relative space-y-1",Vg={sm:"p-2",md:"p-3",lg:"p-4"},gt=e=>{const{className:t,children:n,padding:i="md",...r}=e;return p.jsx("div",{className:q(Fg,Vg[i],t),...r,children:n})};function hi(){return typeof window<"u"}function en(e){return go(e)?(e.nodeName||"").toLowerCase():"#document"}function Oe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function nt(e){var t;return(t=(go(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function go(e){return hi()?e instanceof Node||e instanceof Oe(e).Node:!1}function ke(e){return hi()?e instanceof Element||e instanceof Oe(e).Element:!1}function _e(e){return hi()?e instanceof HTMLElement||e instanceof Oe(e).HTMLElement:!1}function vo(e){return!hi()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Oe(e).ShadowRoot}const Lg=new Set(["inline","contents"]);function Dn(e){const{overflow:t,overflowX:n,overflowY:i,display:r}=Ke(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&!Lg.has(r)}const _g=new Set(["table","td","th"]);function zg(e){return _g.has(en(e))}const Bg=[":popover-open",":modal"];function gi(e){return Bg.some(t=>{try{return e.matches(t)}catch{return!1}})}const $g=["transform","translate","scale","rotate","perspective"],Wg=["transform","translate","scale","rotate","perspective","filter"],Ug=["paint","layout","strict","content"];function xo(e){const t=yo(),n=ke(e)?Ke(e):e;return $g.some(i=>n[i]?n[i]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Wg.some(i=>(n.willChange||"").includes(i))||Ug.some(i=>(n.contain||"").includes(i))}function qg(e){let t=vt(e);for(;_e(t)&&!tn(t);){if(xo(t))return t;if(gi(t))return null;t=vt(t)}return null}function yo(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Kg=new Set(["html","body","#document"]);function tn(e){return Kg.has(en(e))}function Ke(e){return Oe(e).getComputedStyle(e)}function vi(e){return ke(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function vt(e){if(en(e)==="html")return e;const t=e.assignedSlot||e.parentNode||vo(e)&&e.host||nt(e);return vo(t)?t.host:t}function jc(e){const t=vt(e);return tn(t)?e.ownerDocument?e.ownerDocument.body:e.body:_e(t)&&Dn(t)?t:jc(t)}function Rn(e,t,n){var i;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=jc(e),s=r===((i=e.ownerDocument)==null?void 0:i.body),o=Oe(r);if(s){const a=bo(o);return t.concat(o,o.visualViewport||[],Dn(r)?r:[],a&&n?Rn(a):[])}return t.concat(r,Rn(r,[],n))}function bo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const In=Math.min,ze=Math.max,xi=Math.round,nn=Math.floor,it=e=>({x:e,y:e});function Cc(e,t){return typeof e=="function"?e(t):e}function wo(e){return e.split("-")[0]}function Pc(e){return e.split("-")[1]}function Hg(e){return e==="x"?"y":"x"}function Yg(e){return e==="y"?"height":"width"}const Gg=new Set(["top","bottom"]);function To(e){return Gg.has(wo(e))?"y":"x"}function Xg(e){return Hg(To(e))}function Zg(e){return{top:0,right:0,bottom:0,left:0,...e}}function Jg(e){return typeof e!="number"?Zg(e):{top:e,right:e,bottom:e,left:e}}function yi(e){const{x:t,y:n,width:i,height:r}=e;return{width:i,height:r,top:n,left:t,right:t+i,bottom:n+r,x:t,y:n}}/*!
157
157
  * tabbable 6.2.0
158
158
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
159
- */var sg=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Br=sg.join(","),Xl=typeof Element>"u",mn=Xl?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,qn=!Xl&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},Hn=function e(t,n){var i;n===void 0&&(n=!0);var r=t==null||(i=t.getAttribute)===null||i===void 0?void 0:i.call(t,"inert"),o=r===""||r==="true",s=o||n&&t&&e(t.parentNode);return s},ag=function(t){var n,i=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return i===""||i==="true"},lg=function(t,n,i){if(Hn(t))return[];var r=Array.prototype.slice.apply(t.querySelectorAll(Br));return n&&mn.call(t,Br)&&r.unshift(t),r=r.filter(i),r},cg=function e(t,n,i){for(var r=[],o=Array.from(t);o.length;){var s=o.shift();if(!Hn(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,u=e(l,!0,i);i.flatten?r.push.apply(r,u):r.push({scopeParent:s,candidates:u})}else{var c=mn.call(s,Br);c&&i.filter(s)&&(n||!t.includes(s))&&r.push(s);var d=s.shadowRoot||typeof i.getShadowRoot=="function"&&i.getShadowRoot(s),f=!Hn(d,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(s));if(d&&f){var m=e(d===!0?s.children:d.children,!0,i);i.flatten?r.push.apply(r,m):r.push({scopeParent:s,candidates:m})}else o.unshift.apply(o,s.children)}}return r},Zl=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Jl=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||ag(t))&&!Zl(t)?0:t.tabIndex},ug=function(t,n){var i=Jl(t);return i<0&&n&&!Zl(t)?0:i},dg=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Ql=function(t){return t.tagName==="INPUT"},pg=function(t){return Ql(t)&&t.type==="hidden"},fg=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(i){return i.tagName==="SUMMARY"});return n},mg=function(t,n){for(var i=0;i<t.length;i++)if(t[i].checked&&t[i].form===n)return t[i]},hg=function(t){if(!t.name)return!0;var n=t.form||qn(t),i=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},r;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")r=i(window.CSS.escape(t.name));else try{r=i(t.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var o=mg(r,t.form);return!o||o===t},gg=function(t){return Ql(t)&&t.type==="radio"},vg=function(t){return gg(t)&&!hg(t)},xg=function(t){var n,i=t&&qn(t),r=(n=i)===null||n===void 0?void 0:n.host,o=!1;if(i&&i!==t){var s,a,l;for(o=!!((s=r)!==null&&s!==void 0&&(a=s.ownerDocument)!==null&&a!==void 0&&a.contains(r)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!o&&r;){var u,c,d;i=qn(r),r=(u=i)===null||u===void 0?void 0:u.host,o=!!((c=r)!==null&&c!==void 0&&(d=c.ownerDocument)!==null&&d!==void 0&&d.contains(r))}}return o},ec=function(t){var n=t.getBoundingClientRect(),i=n.width,r=n.height;return i===0&&r===0},yg=function(t,n){var i=n.displayCheck,r=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var o=mn.call(t,"details>summary:first-of-type"),s=o?t.parentElement:t;if(mn.call(s,"details:not([open]) *"))return!0;if(!i||i==="full"||i==="legacy-full"){if(typeof r=="function"){for(var a=t;t;){var l=t.parentElement,u=qn(t);if(l&&!l.shadowRoot&&r(l)===!0)return ec(t);t.assignedSlot?t=t.assignedSlot:!l&&u!==t.ownerDocument?t=u.host:t=l}t=a}if(xg(t))return!t.getClientRects().length;if(i!=="legacy-full")return!0}else if(i==="non-zero-area")return ec(t);return!1},bg=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var i=0;i<n.children.length;i++){var r=n.children.item(i);if(r.tagName==="LEGEND")return mn.call(n,"fieldset[disabled] *")?!0:!r.contains(t)}return!0}n=n.parentElement}return!1},wg=function(t,n){return!(n.disabled||Hn(n)||pg(n)||yg(n,t)||fg(n)||bg(n))},tc=function(t,n){return!(vg(n)||Jl(n)<0||!wg(t,n))},Tg=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Sg=function e(t){var n=[],i=[];return t.forEach(function(r,o){var s=!!r.scopeParent,a=s?r.scopeParent:r,l=ug(a,s),u=s?e(r.candidates):a;l===0?s?n.push.apply(n,u):n.push(a):i.push({documentOrder:o,tabIndex:l,item:r,isScope:s,content:u})}),i.sort(dg).reduce(function(r,o){return o.isScope?r.push.apply(r,o.content):r.push(o.content),r},[]).concat(n)},nc=function(t,n){n=n||{};var i;return n.getShadowRoot?i=cg([t],n.includeContainer,{filter:tc.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Tg}):i=lg(t,n.includeContainer,tc.bind(null,n)),Sg(i)};function kg(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function jg(){return/apple/i.test(navigator.vendor)}function Eg(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function Cg(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Nr(n)){let i=t;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function $r(e){return e?.ownerDocument||document}var Pg=typeof document<"u",Ag=function(){},it=Pg?S.useLayoutEffect:Ag;const Dg={...C}.useInsertionEffect||(e=>e());function Rg(e){const t=C.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Dg(()=>{t.current=e}),C.useCallback(function(){for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return t.current==null?void 0:t.current(...i)},[])}const ic=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function rc(e,t){const n=nc(e,ic()),i=n.length;if(i===0)return;const r=Eg($r(e)),o=n.indexOf(r),s=o===-1?t===1?0:i-1:o+t;return n[s]}function Og(e){return rc($r(e).body,1)||e}function Mg(e){return rc($r(e).body,-1)||e}function Wr(e,t){const n=t||e.currentTarget,i=e.relatedTarget;return!i||!Cg(n,i)}function Ig(e){nc(e,ic()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function oc(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const i=n.dataset.tabindex;delete n.dataset.tabindex,i?n.setAttribute("tabindex",i):n.removeAttribute("tabindex")})}function sc(e,t,n){let{reference:i,floating:r}=e;const o=zr(t),s=ig(t),a=tg(s),l=Lr(t),u=o==="y",c=i.x+i.width/2-r.width/2,d=i.y+i.height/2-r.height/2,f=i[a]/2-r[a]/2;let m;switch(l){case"top":m={x:c,y:i.y-r.height};break;case"bottom":m={x:c,y:i.y+i.height};break;case"right":m={x:i.x+i.width,y:d};break;case"left":m={x:i.x-r.width,y:d};break;default:m={x:i.x,y:i.y}}switch(Gl(t)){case"start":m[s]-=f*(n&&u?-1:1);break;case"end":m[s]+=f*(n&&u?-1:1);break}return m}const Ng=async(e,t,n)=>{const{placement:i="bottom",strategy:r="absolute",middleware:o=[],platform:s}=n,a=o.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:r}),{x:c,y:d}=sc(u,i,l),f=i,m={},g=0;for(let v=0;v<a.length;v++){const{name:b,fn:h}=a[v],{x:T,y:w,data:k,reset:y}=await h({x:c,y:d,initialPlacement:i,placement:f,strategy:r,middlewareData:m,rects:u,platform:s,elements:{reference:e,floating:t}});c=T??c,d=w??d,m={...m,[b]:{...m[b],...k}},y&&g<=50&&(g++,typeof y=="object"&&(y.placement&&(f=y.placement),y.rects&&(u=y.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:r}):y.rects),{x:c,y:d}=sc(u,f,l)),v=-1)}return{x:c,y:d,placement:f,strategy:r,middlewareData:m}};async function Fg(e,t){var n;t===void 0&&(t={});const{x:i,y:r,platform:o,rects:s,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:m=0}=Yl(t,e),g=og(m),b=a[f?d==="floating"?"reference":"floating":d],h=Un(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(b)))==null||n?b:b.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),T=d==="floating"?{x:i,y:r,width:s.floating.width,height:s.floating.height}:s.reference,w=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),k=await(o.isElement==null?void 0:o.isElement(w))?await(o.getScale==null?void 0:o.getScale(w))||{x:1,y:1}:{x:1,y:1},y=Un(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:T,offsetParent:w,strategy:l}):T);return{top:(h.top-y.top+g.top)/k.y,bottom:(y.bottom-h.bottom+g.bottom)/k.y,left:(h.left-y.left+g.left)/k.x,right:(y.right-h.right+g.right)/k.x}}const Vg=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,i;const{placement:r,rects:o,platform:s,elements:a}=t,{apply:l=()=>{},...u}=Yl(e,t),c=await Fg(t,u),d=Lr(r),f=Gl(r),m=zr(r)==="y",{width:g,height:v}=o.floating;let b,h;d==="top"||d==="bottom"?(b=d,h=f===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(h=d,b=f==="end"?"top":"bottom");const T=v-c.top-c.bottom,w=g-c.left-c.right,k=fn(v-c[b],T),y=fn(g-c[h],w),P=!t.middlewareData.shift;let E=k,A=y;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(A=w),(i=t.middlewareData.shift)!=null&&i.enabled.y&&(E=T),P&&!f){const W=Re(c.left,0),O=Re(c.right,0),J=Re(c.top,0),Y=Re(c.bottom,0);m?A=g-2*(W!==0||O!==0?W+O:Re(c.left,c.right)):E=v-2*(J!==0||Y!==0?J+Y:Re(c.top,c.bottom))}await l({...t,availableWidth:A,availableHeight:E});const M=await s.getDimensions(a.floating);return g!==M.width||v!==M.height?{reset:{rects:!0}}:{}}}};function ac(e){const t=Me(e);let n=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const r=Le(e),o=r?e.offsetWidth:n,s=r?e.offsetHeight:i,a=$n(n)!==o||$n(i)!==s;return a&&(n=o,i=s),{width:n,height:i,$:a}}function Ur(e){return ye(e)?e:e.contextElement}function Vt(e){const t=Ur(e);if(!Le(t))return ze(1);const n=t.getBoundingClientRect(),{width:i,height:r,$:o}=ac(t);let s=(o?$n(n.width):n.width)/i,a=(o?$n(n.height):n.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const _g=ze(0);function lc(e){const t=je(e);return!Vr()||!t.visualViewport?_g:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Lg(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==je(e)?!1:t}function ht(e,t,n,i){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=Ur(e);let s=ze(1);t&&(i?ye(i)&&(s=Vt(i)):s=Vt(e));const a=Lg(o,n,i)?lc(o):ze(0);let l=(r.left+a.x)/s.x,u=(r.top+a.y)/s.y,c=r.width/s.x,d=r.height/s.y;if(o){const f=je(o),m=i&&ye(i)?je(i):i;let g=f,v=_r(g);for(;v&&i&&m!==g;){const b=Vt(v),h=v.getBoundingClientRect(),T=Me(v),w=h.left+(v.clientLeft+parseFloat(T.paddingLeft))*b.x,k=h.top+(v.clientTop+parseFloat(T.paddingTop))*b.y;l*=b.x,u*=b.y,c*=b.x,d*=b.y,l+=w,u+=k,g=je(v),v=_r(g)}}return Un({width:c,height:d,x:l,y:u})}function Kn(e,t){const n=Bn(e).scrollLeft;return t?t.left+n:ht(_e(e)).left+n}function cc(e,t){const n=e.getBoundingClientRect(),i=n.left+t.scrollLeft-Kn(e,n),r=n.top+t.scrollTop;return{x:i,y:r}}function zg(e){let{elements:t,rect:n,offsetParent:i,strategy:r}=e;const o=r==="fixed",s=_e(i),a=t?zn(t.floating):!1;if(i===s||a&&o)return n;let l={scrollLeft:0,scrollTop:0},u=ze(1);const c=ze(0),d=Le(i);if((d||!d&&!o)&&((Nt(i)!=="body"||dn(s))&&(l=Bn(i)),Le(i))){const m=ht(i);u=Vt(i),c.x=m.x+i.clientLeft,c.y=m.y+i.clientTop}const f=s&&!d&&!o?cc(s,l):ze(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+f.x,y:n.y*u.y-l.scrollTop*u.y+c.y+f.y}}function Bg(e){return Array.from(e.getClientRects())}function $g(e){const t=_e(e),n=Bn(e),i=e.ownerDocument.body,r=Re(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),o=Re(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let s=-n.scrollLeft+Kn(e);const a=-n.scrollTop;return Me(i).direction==="rtl"&&(s+=Re(t.clientWidth,i.clientWidth)-r),{width:r,height:o,x:s,y:a}}const uc=25;function Wg(e,t){const n=je(e),i=_e(e),r=n.visualViewport;let o=i.clientWidth,s=i.clientHeight,a=0,l=0;if(r){o=r.width,s=r.height;const c=Vr();(!c||c&&t==="fixed")&&(a=r.offsetLeft,l=r.offsetTop)}const u=Kn(i);if(u<=0){const c=i.ownerDocument,d=c.body,f=getComputedStyle(d),m=c.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,g=Math.abs(i.clientWidth-d.clientWidth-m);g<=uc&&(o-=g)}else u<=uc&&(o+=u);return{width:o,height:s,x:a,y:l}}const Ug=new Set(["absolute","fixed"]);function qg(e,t){const n=ht(e,!0,t==="fixed"),i=n.top+e.clientTop,r=n.left+e.clientLeft,o=Le(e)?Vt(e):ze(1),s=e.clientWidth*o.x,a=e.clientHeight*o.y,l=r*o.x,u=i*o.y;return{width:s,height:a,x:l,y:u}}function dc(e,t,n){let i;if(t==="viewport")i=Wg(e,n);else if(t==="document")i=$g(_e(e));else if(ye(t))i=qg(t,n);else{const r=lc(e);i={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return Un(i)}function pc(e,t){const n=nt(e);return n===t||!ye(n)||Ft(n)?!1:Me(n).position==="fixed"||pc(n,t)}function Hg(e,t){const n=t.get(e);if(n)return n;let i=pn(e,[],!1).filter(a=>ye(a)&&Nt(a)!=="body"),r=null;const o=Me(e).position==="fixed";let s=o?nt(e):e;for(;ye(s)&&!Ft(s);){const a=Me(s),l=Fr(s);!l&&a.position==="fixed"&&(r=null),(o?!l&&!r:!l&&a.position==="static"&&!!r&&Ug.has(r.position)||dn(s)&&!l&&pc(e,s))?i=i.filter(c=>c!==s):r=a,s=nt(s)}return t.set(e,i),i}function Kg(e){let{element:t,boundary:n,rootBoundary:i,strategy:r}=e;const s=[...n==="clippingAncestors"?zn(t)?[]:Hg(t,this._c):[].concat(n),i],a=s[0],l=s.reduce((u,c)=>{const d=dc(t,c,r);return u.top=Re(d.top,u.top),u.right=fn(d.right,u.right),u.bottom=fn(d.bottom,u.bottom),u.left=Re(d.left,u.left),u},dc(t,a,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Yg(e){const{width:t,height:n}=ac(e);return{width:t,height:n}}function Gg(e,t,n){const i=Le(t),r=_e(t),o=n==="fixed",s=ht(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const l=ze(0);function u(){l.x=Kn(r)}if(i||!i&&!o)if((Nt(t)!=="body"||dn(r))&&(a=Bn(t)),i){const m=ht(t,!0,o,t);l.x=m.x+t.clientLeft,l.y=m.y+t.clientTop}else r&&u();o&&!i&&r&&u();const c=r&&!i&&!o?cc(r,a):ze(0),d=s.left+a.scrollLeft-l.x-c.x,f=s.top+a.scrollTop-l.y-c.y;return{x:d,y:f,width:s.width,height:s.height}}function qr(e){return Me(e).position==="static"}function fc(e,t){if(!Le(e)||Me(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return _e(e)===n&&(n=n.ownerDocument.body),n}function mc(e,t){const n=je(e);if(zn(e))return n;if(!Le(e)){let r=nt(e);for(;r&&!Ft(r);){if(ye(r)&&!qr(r))return r;r=nt(r)}return n}let i=fc(e,t);for(;i&&Kh(i)&&qr(i);)i=fc(i,t);return i&&Ft(i)&&qr(i)&&!Fr(i)?n:i||Jh(e)||n}const Xg=async function(e){const t=this.getOffsetParent||mc,n=this.getDimensions,i=await n(e.floating);return{reference:Gg(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Zg(e){return Me(e).direction==="rtl"}const Jg={convertOffsetParentRelativeRectToViewportRelativeRect:zg,getDocumentElement:_e,getClippingRect:Kg,getOffsetParent:mc,getElementRects:Xg,getClientRects:Bg,getDimensions:Yg,getScale:Vt,isElement:ye,isRTL:Zg};function hc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Qg(e,t){let n=null,i;const r=_e(e);function o(){var a;clearTimeout(i),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),o();const u=e.getBoundingClientRect(),{left:c,top:d,width:f,height:m}=u;if(a||t(),!f||!m)return;const g=Wn(d),v=Wn(r.clientWidth-(c+f)),b=Wn(r.clientHeight-(d+m)),h=Wn(c),w={rootMargin:-g+"px "+-v+"px "+-b+"px "+-h+"px",threshold:Re(0,fn(1,l))||1};let k=!0;function y(P){const E=P[0].intersectionRatio;if(E!==l){if(!k)return s();E?s(!1,E):i=setTimeout(()=>{s(!1,1e-7)},1e3)}E===1&&!hc(u,e.getBoundingClientRect())&&s(),k=!1}try{n=new IntersectionObserver(y,{...w,root:r.ownerDocument})}catch{n=new IntersectionObserver(y,w)}n.observe(e)}return s(!0),o}function ev(e,t,n,i){i===void 0&&(i={});const{ancestorScroll:r=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=i,u=Ur(e),c=r||o?[...u?pn(u):[],...pn(t)]:[];c.forEach(h=>{r&&h.addEventListener("scroll",n,{passive:!0}),o&&h.addEventListener("resize",n)});const d=u&&a?Qg(u,n):null;let f=-1,m=null;s&&(m=new ResizeObserver(h=>{let[T]=h;T&&T.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var w;(w=m)==null||w.observe(t)})),n()}),u&&!l&&m.observe(u),m.observe(t));let g,v=l?ht(e):null;l&&b();function b(){const h=ht(e);v&&!hc(v,h)&&n(),v=h,g=requestAnimationFrame(b)}return n(),()=>{var h;c.forEach(T=>{r&&T.removeEventListener("scroll",n),o&&T.removeEventListener("resize",n)}),d?.(),(h=m)==null||h.disconnect(),m=null,l&&cancelAnimationFrame(g)}}const tv=Vg,nv=(e,t,n)=>{const i=new Map,r={platform:Jg,...n},o={...r.platform,_c:i};return Ng(e,t,{...r,platform:o})};var iv=typeof document<"u",rv=function(){},Yn=iv?S.useLayoutEffect:rv;function Gn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,i,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(i=n;i--!==0;)if(!Gn(e[i],t[i]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(i=n;i--!==0;)if(!{}.hasOwnProperty.call(t,r[i]))return!1;for(i=n;i--!==0;){const o=r[i];if(!(o==="_owner"&&e.$$typeof)&&!Gn(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function gc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function vc(e,t){const n=gc(e);return Math.round(t*n)/n}function Hr(e){const t=C.useRef(e);return Yn(()=>{t.current=e}),t}function ov(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:i=[],platform:r,elements:{reference:o,floating:s}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[c,d]=C.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,m]=C.useState(i);Gn(f,i)||m(i);const[g,v]=C.useState(null),[b,h]=C.useState(null),T=C.useCallback(q=>{q!==P.current&&(P.current=q,v(q))},[]),w=C.useCallback(q=>{q!==E.current&&(E.current=q,h(q))},[]),k=o||g,y=s||b,P=C.useRef(null),E=C.useRef(null),A=C.useRef(c),M=l!=null,W=Hr(l),O=Hr(r),J=Hr(u),Y=C.useCallback(()=>{if(!P.current||!E.current)return;const q={placement:t,strategy:n,middleware:f};O.current&&(q.platform=O.current),nv(P.current,E.current,q).then(Z=>{const x={...Z,isPositioned:J.current!==!1};F.current&&!Gn(A.current,x)&&(A.current=x,Po.flushSync(()=>{d(x)}))})},[f,t,n,O,J]);Yn(()=>{u===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,d(q=>({...q,isPositioned:!1})))},[u]);const F=C.useRef(!1);Yn(()=>(F.current=!0,()=>{F.current=!1}),[]),Yn(()=>{if(k&&(P.current=k),y&&(E.current=y),k&&y){if(W.current)return W.current(k,y,Y);Y()}},[k,y,Y,W,M]);const ee=C.useMemo(()=>({reference:P,floating:E,setReference:T,setFloating:w}),[T,w]),ie=C.useMemo(()=>({reference:k,floating:y}),[k,y]),X=C.useMemo(()=>{const q={position:n,left:0,top:0};if(!ie.floating)return q;const Z=vc(ie.floating,c.x),x=vc(ie.floating,c.y);return a?{...q,transform:"translate("+Z+"px, "+x+"px)",...gc(ie.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:Z,top:x}},[n,a,ie.floating,c.x,c.y]);return C.useMemo(()=>({...c,update:Y,refs:ee,elements:ie,floatingStyles:X}),[c,Y,ee,ie,X])}const sv=(e,t)=>({...tv(e),options:[e,t]}),av={...C};let xc=!1,lv=0;const yc=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+lv++;function cv(){const[e,t]=C.useState(()=>xc?yc():void 0);return it(()=>{e==null&&t(yc())},[]),C.useEffect(()=>{xc=!0},[]),e}const bc=av.useId||cv;let Kr;process.env.NODE_ENV!=="production"&&(Kr=new Set);function uv(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];const r="Floating UI: "+n.join(" ");if(!((e=Kr)!=null&&e.has(r))){var o;(o=Kr)==null||o.add(r),console.error(r)}}function dv(){const e=new Map;return{emit(t,n){var i;(i=e.get(t))==null||i.forEach(r=>r(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var i;(i=e.get(t))==null||i.delete(n)}}}const pv=C.createContext(null),fv=C.createContext(null),mv=()=>{var e;return((e=C.useContext(pv))==null?void 0:e.id)||null},hv=()=>C.useContext(fv);function wc(e){return"data-floating-ui-"+e}const Tc={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},Sc=C.forwardRef(function(t,n){const[i,r]=C.useState();it(()=>{jg()&&r("button")},[]);const o={ref:n,tabIndex:0,role:i,"aria-hidden":i?void 0:!0,[wc("focus-guard")]:"",style:Tc};return p.jsx("span",{...t,...o})}),kc=C.createContext(null),jc=wc("portal");function gv(e){e===void 0&&(e={});const{id:t,root:n}=e,i=bc(),r=vv(),[o,s]=C.useState(null),a=C.useRef(null);return it(()=>()=>{o?.remove(),queueMicrotask(()=>{a.current=null})},[o]),it(()=>{if(!i||a.current)return;const l=t?document.getElementById(t):null;if(!l)return;const u=document.createElement("div");u.id=i,u.setAttribute(jc,""),l.appendChild(u),a.current=u,s(u)},[t,i]),it(()=>{if(n===null||!i||a.current)return;let l=n||r?.portalNode;l&&!Ir(l)&&(l=l.current),l=l||document.body;let u=null;t&&(u=document.createElement("div"),u.id=t,l.appendChild(u));const c=document.createElement("div");c.id=i,c.setAttribute(jc,""),l=u||l,l.appendChild(c),a.current=c,s(c)},[t,n,i,r]),o}function Yr(e){const{children:t,id:n,root:i,preserveTabOrder:r=!0}=e,o=gv({id:n,root:i}),[s,a]=C.useState(null),l=C.useRef(null),u=C.useRef(null),c=C.useRef(null),d=C.useRef(null),f=s?.modal,m=s?.open,g=!!s&&!s.modal&&s.open&&r&&!!(i||o);return C.useEffect(()=>{if(!o||!r||f)return;function v(b){o&&Wr(b)&&(b.type==="focusin"?oc:Ig)(o)}return o.addEventListener("focusin",v,!0),o.addEventListener("focusout",v,!0),()=>{o.removeEventListener("focusin",v,!0),o.removeEventListener("focusout",v,!0)}},[o,r,f]),C.useEffect(()=>{o&&(m||oc(o))},[m,o]),p.jsxs(kc.Provider,{value:C.useMemo(()=>({preserveTabOrder:r,beforeOutsideRef:l,afterOutsideRef:u,beforeInsideRef:c,afterInsideRef:d,portalNode:o,setFocusManagerState:a}),[r,o]),children:[g&&o&&p.jsx(Sc,{"data-type":"outside",ref:l,onFocus:v=>{if(Wr(v,o)){var b;(b=c.current)==null||b.focus()}else{const h=s?s.domReference:null,T=Mg(h);T?.focus()}}}),g&&o&&p.jsx("span",{"aria-owns":o.id,style:Tc}),o&&Po.createPortal(t,o),g&&o&&p.jsx(Sc,{"data-type":"outside",ref:u,onFocus:v=>{if(Wr(v,o)){var b;(b=d.current)==null||b.focus()}else{const h=s?s.domReference:null,T=Og(h);T?.focus(),s?.closeOnFocusOut&&s?.onOpenChange(!1,v.nativeEvent,"focus-out")}}})]})}const vv=()=>C.useContext(kc);let Xn=0;const Ec="--floating-ui-scrollbar-width";function xv(){const e=kg(),t=/iP(hone|ad|od)|iOS/.test(e)||e==="MacIntel"&&navigator.maxTouchPoints>1,n=document.body.style,r=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",o=window.innerWidth-document.documentElement.clientWidth,s=n.left?parseFloat(n.left):window.scrollX,a=n.top?parseFloat(n.top):window.scrollY;if(n.overflow="hidden",n.setProperty(Ec,o+"px"),o&&(n[r]=o+"px"),t){var l,u;const c=((l=window.visualViewport)==null?void 0:l.offsetLeft)||0,d=((u=window.visualViewport)==null?void 0:u.offsetTop)||0;Object.assign(n,{position:"fixed",top:-(a-Math.floor(d))+"px",left:-(s-Math.floor(c))+"px",right:"0"})}return()=>{Object.assign(n,{overflow:"",[r]:""}),n.removeProperty(Ec),t&&(Object.assign(n,{position:"",top:"",left:"",right:""}),window.scrollTo(s,a))}}let Cc=()=>{};const Gr=C.forwardRef(function(t,n){const{lockScroll:i=!1,...r}=t;return it(()=>{if(i)return Xn++,Xn===1&&(Cc=xv()),()=>{Xn--,Xn===0&&Cc()}},[i]),p.jsx("div",{ref:n,...r,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...r.style}})});function yv(e){const{open:t=!1,onOpenChange:n,elements:i}=e,r=bc(),o=C.useRef({}),[s]=C.useState(()=>dv()),a=mv()!=null;if(process.env.NODE_ENV!=="production"){const m=i.reference;m&&!ye(m)&&uv("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,u]=C.useState(i.reference),c=Rg((m,g,v)=>{o.current.openEvent=m?g:void 0,s.emit("openchange",{open:m,event:g,reason:v,nested:a}),n?.(m,g,v)}),d=C.useMemo(()=>({setPositionReference:u}),[]),f=C.useMemo(()=>({reference:l||i.reference||null,floating:i.floating||null,domReference:i.reference}),[l,i.reference,i.floating]);return C.useMemo(()=>({dataRef:o,open:t,onOpenChange:c,elements:f,events:s,floatingId:r,refs:d}),[t,c,f,s,r,d])}function bv(e){e===void 0&&(e={});const{nodeId:t}=e,n=yv({...e,elements:{reference:null,floating:null,...e.elements}}),i=e.rootContext||n,r=i.elements,[o,s]=C.useState(null),[a,l]=C.useState(null),c=r?.domReference||o,d=C.useRef(null),f=hv();it(()=>{c&&(d.current=c)},[c]);const m=ov({...e,elements:{...r,...a&&{reference:a}}}),g=C.useCallback(w=>{const k=ye(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),getClientRects:()=>w.getClientRects(),contextElement:w}:w;l(k),m.refs.setReference(k)},[m.refs]),v=C.useCallback(w=>{(ye(w)||w===null)&&(d.current=w,s(w)),(ye(m.refs.reference.current)||m.refs.reference.current===null||w!==null&&!ye(w))&&m.refs.setReference(w)},[m.refs]),b=C.useMemo(()=>({...m.refs,setReference:v,setPositionReference:g,domReference:d}),[m.refs,v,g]),h=C.useMemo(()=>({...m.elements,domReference:c}),[m.elements,c]),T=C.useMemo(()=>({...m,...i,refs:b,elements:h,nodeId:t}),[m,b,h,t,i]);return it(()=>{i.dataRef.current.floatingContext=T;const w=f?.nodesRef.current.find(k=>k.id===t);w&&(w.context=T)}),C.useMemo(()=>({...m,context:T,refs:b,elements:h}),[m,b,h,T])}const wv={top:"bottom center","top-start":"bottom left","top-end":"bottom right",right:"left center","right-start":"top left","right-end":"bottom left",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"top right","left-end":"bottom right"},Pc=C.memo(({open:e,children:t,className:n,onOutsideClick:i,floatingStyles:r,setFloating:o,placement:s})=>p.jsx(Yr,{children:p.jsx(An,{children:e&&p.jsxs(p.Fragment,{children:[i&&p.jsx(Gr,{onClick:i}),p.jsx("div",{ref:o,style:r,className:"z-50",children:p.jsx(Fe.div,{className:n,style:{transformOrigin:wv[s]},initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.1,ease:"easeInOut"},children:t})})]})})})),gt=e=>{const{placement:t="bottom",onOutsideClick:n,fullWidth:i,minWidth:r,maxWidth:o}=e,s=C.useMemo(()=>[sv({apply({rects:d,elements:f}){i&&(f.floating.style.width=`${d.reference.width}px`),r&&(f.floating.style.minWidth=`${r}px`),o&&(f.floating.style.maxWidth=`${o}px`)}})],[i,o,r]),{refs:a,floatingStyles:l}=bv({placement:t,middleware:s,whileElementsMounted:ev}),u=C.useRef({onOutsideClick:n,floatingStyles:l,setFloating:a.setFloating,placement:t});u.current={onOutsideClick:n,floatingStyles:l,setFloating:a.setFloating,placement:t};const c=C.useMemo(()=>{const d=f=>{const{floatingStyles:m,setFloating:g,onOutsideClick:v,placement:b}=u.current,{className:h,open:T,children:w}=f;return p.jsx(Pc,{open:T,className:h,onOutsideClick:v,floatingStyles:m,setFloating:g,placement:b,children:w})};return C.memo(d)},[]);return{anchorRef:a.setReference,Popover:c}},_t=(e,t)=>{S.useEffect(()=>{if(!e)return;const n=i=>{i.key==="Escape"&&t()};return document.addEventListener("keydown",n),()=>{document.removeEventListener("keydown",n)}},[e,t])},Tv="linear-gradient(to right, #f00 0%, #ff0 16.66%, #0f0 33.33%, #0ff 50%, #00f 66.66%, #f0f 83.33%, #f00 100%)",Sv="linear-gradient(to right, #fff, rgba(255,255,255,0))",kv="linear-gradient(to top, #000, rgba(0,0,0,0))",Xr="0 0 0 1px rgba(0,0,0,0.15)",jv=14,Ev=28,Cv=6,Pv=8,Zr={type:"spring",stiffness:500,damping:18,mass:.6},Lt=e=>{const t=e?Ev:jv,n=t/2;return{width:t,height:t,marginLeft:-n,marginTop:-n,borderRadius:e?Pv:Cv}},Zn=e=>Math.max(0,Math.min(1,e)),Ac=(e,t)=>{Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value")?.set?.call(e,t),e.dispatchEvent(new Event("input",{bubbles:!0}))},Av=({value:e,onChange:t})=>{const[n,i]=S.useState(()=>Hl(e)??[0,0,1]),r=S.useRef(un(n[0],n[1],n[2]));S.useEffect(()=>{if((e||"").toUpperCase()===r.current)return;const v=Hl(e);v&&i(v)},[e]);const o=v=>{i(v);const b=un(v[0],v[1],v[2]);r.current=b,t(b)},[s,a,l]=n,u=un(s,1,1),c=un(s,a,1),d=un(s,a,l),f=Mr((v,b,h)=>{o([s,Zn((v-h.left)/h.width),1-Zn((b-h.top)/h.height)])}),m=Mr((v,b,h)=>{o([Zn((v-h.left)/h.width)*360,a,l])}),g=Mr((v,b,h)=>{o([s,a,Zn((v-h.left)/h.width)])});return p.jsxs("div",{className:"flex flex-col gap-3",style:{width:220,userSelect:"none"},onMouseDown:v=>v.preventDefault(),children:[p.jsxs("div",{className:"relative w-full",style:{height:160,touchAction:"none",cursor:"crosshair"},...f.bind,children:[p.jsxs("div",{className:"absolute inset-0 rounded-md overflow-hidden border color-picker-surface",style:{backgroundColor:u},children:[p.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{background:Sv}}),p.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{background:kv}})]}),p.jsx(Fe.div,{className:"absolute pointer-events-none border-1 border-white",style:{left:`${a*100}%`,top:`${(1-l)*100}%`,boxShadow:Xr,backgroundColor:d},initial:Lt(!1),animate:Lt(f.isDragging),transition:Zr})]}),p.jsx("div",{className:"relative w-full rounded-md",style:{height:12,background:Tv,touchAction:"none",cursor:"ew-resize"},...m.bind,children:p.jsx(Fe.div,{className:"absolute pointer-events-none border-1 border-white",style:{top:"50%",left:`${s/360*100}%`,backgroundColor:u,boxShadow:Xr},initial:Lt(!1),animate:Lt(m.isDragging),transition:Zr})}),p.jsx("div",{className:"relative w-full rounded-md",style:{height:12,background:`linear-gradient(to right, #000, ${c})`,touchAction:"none",cursor:"ew-resize"},...g.bind,children:p.jsx(Fe.div,{className:"absolute pointer-events-none border-1 border-white",style:{top:"50%",left:`${l*100}%`,backgroundColor:d,boxShadow:Xr},initial:Lt(!1),animate:Lt(g.isDragging),transition:Zr})})]})},Dv=e=>{const{className:t,label:n,description:i,error:r,buttonTray:o,size:s="md",value:a,defaultValue:l,onChange:u,onBlur:c,onFocus:d,...f}=e,[m,g]=S.useState(a!=null?String(a):l!=null?String(l):""),[v,b]=S.useState(!1),h=S.useRef(null),T=a!=null?String(a):m,w=T||"white";_t(v,()=>b(!1));const{anchorRef:k,Popover:y}=gt({placement:"bottom-start",onOutsideClick:()=>b(!1)}),P=O=>{g(O.target.value),u?.(O)},E=O=>{b(!0),d?.(O)},A=O=>{const J=O.target.value,Y=$h(J);Y&&Y!==J&&h.current&&Ac(h.current,Y),b(!1),c?.(O)},M=O=>{h.current&&Ac(h.current,O)},W=!!r||!!o;return p.jsx(Ke.Provider,{value:s,children:p.jsxs("div",{className:N("flex flex-col",t),children:[p.jsx(Ve,{children:n}),p.jsxs("div",{className:"flex flex-col relative",ref:k,children:[p.jsx("div",{className:N("absolute top-1/2 -translate-y-1/2 rounded-md border color-swatch",pt[s],Ll[s]),style:{backgroundColor:w}}),p.jsx("input",{ref:h,className:N("border input-base transition-all duration-150 rounded-xl shadow-sm ring-0 focus:ring-4 focus:outline-none",et[s],qe[s],_l[s],W?dt[s]:Cr[s],r&&"input-error"),value:a??m,onChange:P,onFocus:E,onBlur:A,onClick:()=>b(!0),...f}),p.jsxs(tt,{children:[r&&p.jsx(He,{}),o]}),p.jsx(y,{open:v,children:p.jsx(mt,{padding:"md",children:p.jsx(Av,{value:T,onChange:M})})})]}),p.jsx(Se,{children:i}),p.jsx(ke,{children:r})]})})},Ye=e=>{const{onClick:t,Icon:n}=e;return p.jsx("div",{onClick:t,className:N("h-6 w-6 select-none rounded-full p-0.5",t&&"ring-0 transition-all duration-150 input-icon-button-interactive active:ring-2 cursor-pointer hover:ring-4 group"),children:p.jsx(n,{className:N("h-5 w-5 input-icon-button-icon",t&&"group-active:scale-[0.8] transition-transform origin-center")})})},Rv=e=>{const{type:t="password",enableShowPasswordToggle:n=!0,...i}=e,[r,o]=S.useState(!1),s=()=>{o(!r)};return p.jsx(Or,{type:r?"text":t,buttonTray:n?p.jsx(Ye,{Icon:r?Dh:Rh,onClick:s}):void 0,...i})};function Ov(e){return t=>{for(const n of e)Jr(n,t)}}function Mv(e){return t=>{const n=[];for(const i of e){const r=Jr(i,t),o=typeof r=="function";n.push(o?r:()=>Jr(i,null))}return()=>{for(const i of n)i()}}}function Jr(e,t){if(typeof e=="function")return e(t);e&&(e.current=t)}var Iv=parseInt(S.version.split(".")[0],10)>=19?Mv:Ov;const Nv=e=>{const{className:t,label:n,description:i,error:r,size:o="md",autogrow:s=!1,maxRows:a,ref:l,onChange:u,...c}=e,d=C.useRef(null),f=C.useCallback(()=>{const g=d.current;if(!g)return;g.style.height="auto";let v=g.scrollHeight;if(a){const b=window.getComputedStyle(g),h=parseFloat(b.lineHeight),T=parseFloat(b.paddingTop),w=parseFloat(b.paddingBottom),k=parseFloat(b.borderTopWidth),y=parseFloat(b.borderBottomWidth),P=h*a+T+w+k+y;v=Math.min(g.scrollHeight,P)}g.style.height=`${v}px`},[a]);C.useLayoutEffect(()=>{if(!s){d.current&&(d.current.style.height="");return}f()},[s,f,e.value,e.defaultValue,o]);const m=g=>{u?.(g),s&&f()};return p.jsx(Ke.Provider,{value:o,children:p.jsxs("div",{className:N("flex flex-col",t),children:[p.jsx(Ve,{children:n}),p.jsxs("div",{className:"flex flex-col relative",children:[p.jsx("textarea",{ref:l?Iv([l,d]):d,onChange:m,className:N("py-2.5 border input-base transition-all duration-150 rounded-xl shadow-sm ring-0 focus:ring-4 focus:outline-none",hh[o],qe[o],ut[o],r?dt[o]:Cr[o],r&&"input-error",s&&(a?"resize-none overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden":"resize-none overflow-hidden")),...c}),p.jsx(tt,{className:"top-3.5 translate-y-0",children:r&&p.jsx(He,{})})]}),p.jsx(Se,{children:i}),p.jsx(ke,{children:r})]})})},Fv=e=>{const{className:t,label:n,description:i,error:r,...o}=e;return p.jsxs("div",{className:N("flex flex-col",t),children:[p.jsxs("div",{className:"flex flex-row gap-3",children:[p.jsx("input",{type:"radio",className:"h-6 w-6 shrink-0 rounded-full border check-base shadow-sm ring-0 hover:ring-4 focus:ring-4 ring-offset-0 focus:outline-0 transition-all duration-150",...o}),n&&p.jsx("label",{htmlFor:e.id,className:N("input-label font-medium mb-1",e.id&&"cursor-pointer"),children:n})]}),p.jsx(Se,{children:i}),p.jsx(ke,{children:r})]})},Vv=e=>{const{className:t,label:n,description:i,error:r,...o}=e;return p.jsxs("div",{className:N("flex flex-col",t),children:[p.jsxs("div",{className:"flex flex-row gap-3",children:[p.jsxs("div",{className:"relative shrink-0 h-6 w-10",children:[p.jsx("input",{type:"checkbox",className:"appearance-none h-6 w-10 rounded-full checked:bg-transparent border toggle-input ring-0 hover:ring-4 focus:ring-4 ring-offset-0 focus:outline-0 transition-all duration-150",...o}),p.jsx("div",{className:N("rounded-full absolute border inset-0 mt-[2px] pointer-events-none transition-colors duration-150 ",e.checked?"toggle-track-on":"toggle-track-off"),children:p.jsx("div",{className:N("absolute top-1/2 -translate-y-1/2 left-1 h-4 w-4 rounded-full toggle-thumb shadow-md transition-all duration-150",e.checked&&"translate-x-3.5 ")})})]}),n&&p.jsx("label",{htmlFor:e.id,className:N("input-label font-medium mb-1",e.id&&"cursor-pointer"),children:n})]}),p.jsx(Se,{children:i}),p.jsx(ke,{children:r})]})},_v=e=>{const{className:t,label:n,description:i,error:r,...o}=e;return p.jsxs("div",{className:N("flex flex-col",t),children:[p.jsxs("div",{className:"flex flex-row gap-3",children:[p.jsx("input",{type:"checkbox",className:"h-6 w-6 shrink-0 rounded-lg border check-base shadow-sm ring-0 hover:ring-4 focus:ring-4 ring-offset-0 focus:outline-0 transition-all duration-150",...o}),n&&p.jsx("label",{htmlFor:e.id,className:N("input-label font-medium mb-1",e.id&&"cursor-pointer"),children:n})]}),p.jsx(Se,{children:i}),p.jsx(ke,{children:r})]})};var Jn={exports:{}},Qn={exports:{}},te={};/** @license React v16.13.1
159
+ */var Qg=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],So=Qg.join(","),Ac=typeof Element>"u",On=Ac?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,bi=!Ac&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},wi=function e(t,n){var i;n===void 0&&(n=!0);var r=t==null||(i=t.getAttribute)===null||i===void 0?void 0:i.call(t,"inert"),s=r===""||r==="true",o=s||n&&t&&e(t.parentNode);return o},ev=function(t){var n,i=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return i===""||i==="true"},tv=function(t,n,i){if(wi(t))return[];var r=Array.prototype.slice.apply(t.querySelectorAll(So));return n&&On.call(t,So)&&r.unshift(t),r=r.filter(i),r},nv=function e(t,n,i){for(var r=[],s=Array.from(t);s.length;){var o=s.shift();if(!wi(o,!1))if(o.tagName==="SLOT"){var a=o.assignedElements(),l=a.length?a:o.children,u=e(l,!0,i);i.flatten?r.push.apply(r,u):r.push({scopeParent:o,candidates:u})}else{var c=On.call(o,So);c&&i.filter(o)&&(n||!t.includes(o))&&r.push(o);var d=o.shadowRoot||typeof i.getShadowRoot=="function"&&i.getShadowRoot(o),f=!wi(d,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(o));if(d&&f){var m=e(d===!0?o.children:d.children,!0,i);i.flatten?r.push.apply(r,m):r.push({scopeParent:o,candidates:m})}else s.unshift.apply(s,o.children)}}return r},Dc=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Rc=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||ev(t))&&!Dc(t)?0:t.tabIndex},iv=function(t,n){var i=Rc(t);return i<0&&n&&!Dc(t)?0:i},rv=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Ic=function(t){return t.tagName==="INPUT"},ov=function(t){return Ic(t)&&t.type==="hidden"},sv=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(i){return i.tagName==="SUMMARY"});return n},av=function(t,n){for(var i=0;i<t.length;i++)if(t[i].checked&&t[i].form===n)return t[i]},lv=function(t){if(!t.name)return!0;var n=t.form||bi(t),i=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},r;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")r=i(window.CSS.escape(t.name));else try{r=i(t.name)}catch(o){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",o.message),!1}var s=av(r,t.form);return!s||s===t},cv=function(t){return Ic(t)&&t.type==="radio"},uv=function(t){return cv(t)&&!lv(t)},dv=function(t){var n,i=t&&bi(t),r=(n=i)===null||n===void 0?void 0:n.host,s=!1;if(i&&i!==t){var o,a,l;for(s=!!((o=r)!==null&&o!==void 0&&(a=o.ownerDocument)!==null&&a!==void 0&&a.contains(r)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!s&&r;){var u,c,d;i=bi(r),r=(u=i)===null||u===void 0?void 0:u.host,s=!!((c=r)!==null&&c!==void 0&&(d=c.ownerDocument)!==null&&d!==void 0&&d.contains(r))}}return s},Oc=function(t){var n=t.getBoundingClientRect(),i=n.width,r=n.height;return i===0&&r===0},pv=function(t,n){var i=n.displayCheck,r=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var s=On.call(t,"details>summary:first-of-type"),o=s?t.parentElement:t;if(On.call(o,"details:not([open]) *"))return!0;if(!i||i==="full"||i==="legacy-full"){if(typeof r=="function"){for(var a=t;t;){var l=t.parentElement,u=bi(t);if(l&&!l.shadowRoot&&r(l)===!0)return Oc(t);t.assignedSlot?t=t.assignedSlot:!l&&u!==t.ownerDocument?t=u.host:t=l}t=a}if(dv(t))return!t.getClientRects().length;if(i!=="legacy-full")return!0}else if(i==="non-zero-area")return Oc(t);return!1},fv=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var i=0;i<n.children.length;i++){var r=n.children.item(i);if(r.tagName==="LEGEND")return On.call(n,"fieldset[disabled] *")?!0:!r.contains(t)}return!0}n=n.parentElement}return!1},mv=function(t,n){return!(n.disabled||wi(n)||ov(n)||pv(n,t)||sv(n)||fv(n))},Mc=function(t,n){return!(uv(n)||Rc(n)<0||!mv(t,n))},hv=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},gv=function e(t){var n=[],i=[];return t.forEach(function(r,s){var o=!!r.scopeParent,a=o?r.scopeParent:r,l=iv(a,o),u=o?e(r.candidates):a;l===0?o?n.push.apply(n,u):n.push(a):i.push({documentOrder:s,tabIndex:l,item:r,isScope:o,content:u})}),i.sort(rv).reduce(function(r,s){return s.isScope?r.push.apply(r,s.content):r.push(s.content),r},[]).concat(n)},Nc=function(t,n){n=n||{};var i;return n.getShadowRoot?i=nv([t],n.includeContainer,{filter:Mc.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:hv}):i=tv(t,n.includeContainer,Mc.bind(null,n)),gv(i)};function Fc(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Vc(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:i}=t;return n+"/"+i}).join(" "):navigator.userAgent}function vv(){return/apple/i.test(navigator.vendor)}function ko(){const e=/android/i;return e.test(Fc())||e.test(Vc())}function xv(){return Vc().includes("jsdom/")}const Lc="data-floating-ui-focusable",yv="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Eo="ArrowLeft",jo="ArrowRight",bv="ArrowUp",wv="ArrowDown";function Co(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function _c(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&vo(n)){let i=t;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function Ti(e){return e?.ownerDocument||document}function Tv(e){return _e(e)&&e.matches(yv)}function Sv(e){return e?e.getAttribute("role")==="combobox"&&Tv(e):!1}function kv(e){return e?e.hasAttribute(Lc)?e:e.querySelector("["+Lc+"]")||e:null}function zc(e,t,n){return n===void 0&&(n=!0),e.filter(r=>{var s;return r.parentId===t&&(!n||((s=r.context)==null?void 0:s.open))}).flatMap(r=>[r,...zc(e,r.id,n)])}function Ev(e,t){let n,i=-1;function r(s,o){o>i&&(n=s,i=o),zc(e,s).forEach(l=>{r(l.id,o+1)})}return r(t,0),e.find(s=>s.id===n)}function Be(e){e.preventDefault(),e.stopPropagation()}function jv(e){return e.mozInputSource===0&&e.isTrusted?!0:ko()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Cv(e){return xv()?!1:!ko()&&e.width===0&&e.height===0||ko()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}var Pv=typeof document<"u",Av=function(){},Ee=Pv?S.useLayoutEffect:Av;const Dv={...j};function Mn(e){const t=j.useRef(e);return Ee(()=>{t.current=e}),t}const Rv=Dv.useInsertionEffect||(e=>e());function Si(e){const t=j.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Rv(()=>{t.current=e}),j.useCallback(function(){for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return t.current==null?void 0:t.current(...i)},[])}function ki(e,t,n){return Math.floor(e/t)!==n}function Nn(e,t){return t<0||t>=e.current.length}function Po(e,t){return je(e,{disabledIndices:t})}function Bc(e,t){return je(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function je(e,t){let{startingIndex:n=-1,decrement:i=!1,disabledIndices:r,amount:s=1}=t===void 0?{}:t,o=n;do o+=i?-s:s;while(o>=0&&o<=e.current.length-1&&Ei(e,o,r));return o}function Iv(e,t){let{event:n,orientation:i,loop:r,rtl:s,cols:o,disabledIndices:a,minIndex:l,maxIndex:u,prevIndex:c,stopEvent:d=!1}=t,f=c;if(n.key===bv){if(d&&Be(n),c===-1)f=u;else if(f=je(e,{startingIndex:f,amount:o,decrement:!0,disabledIndices:a}),r&&(c-o<l||f<0)){const m=c%o,h=u%o,g=u-(h-m);h===m?f=u:f=h>m?g:g-o}Nn(e,f)&&(f=c)}if(n.key===wv&&(d&&Be(n),c===-1?f=l:(f=je(e,{startingIndex:c,amount:o,disabledIndices:a}),r&&c+o>u&&(f=je(e,{startingIndex:c%o-o,amount:o,disabledIndices:a}))),Nn(e,f)&&(f=c)),i==="both"){const m=nn(c/o);n.key===(s?Eo:jo)&&(d&&Be(n),c%o!==o-1?(f=je(e,{startingIndex:c,disabledIndices:a}),r&&ki(f,o,m)&&(f=je(e,{startingIndex:c-c%o-1,disabledIndices:a}))):r&&(f=je(e,{startingIndex:c-c%o-1,disabledIndices:a})),ki(f,o,m)&&(f=c)),n.key===(s?jo:Eo)&&(d&&Be(n),c%o!==0?(f=je(e,{startingIndex:c,decrement:!0,disabledIndices:a}),r&&ki(f,o,m)&&(f=je(e,{startingIndex:c+(o-c%o),decrement:!0,disabledIndices:a}))):r&&(f=je(e,{startingIndex:c+(o-c%o),decrement:!0,disabledIndices:a})),ki(f,o,m)&&(f=c));const h=nn(u/o)===m;Nn(e,f)&&(r&&h?f=n.key===(s?jo:Eo)?u:je(e,{startingIndex:c-c%o-1,disabledIndices:a}):f=c)}return f}function Ov(e,t,n){const i=[];let r=0;return e.forEach((s,o)=>{let{width:a,height:l}=s;if(a>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+o+" is greater than grid columns");let u=!1;for(n&&(r=0);!u;){const c=[];for(let d=0;d<a;d++)for(let f=0;f<l;f++)c.push(r+d+f*t);r%t+a<=t&&c.every(d=>i[d]==null)?(c.forEach(d=>{i[d]=o}),u=!0):r++}}),[...i]}function Mv(e,t,n,i,r){if(e===-1)return-1;const s=n.indexOf(e),o=t[e];switch(r){case"tl":return s;case"tr":return o?s+o.width-1:s;case"bl":return o?s+(o.height-1)*i:s;case"br":return n.lastIndexOf(e)}}function Nv(e,t){return t.flatMap((n,i)=>e.includes(n)?[i]:[])}function Ei(e,t,n){if(typeof n=="function")return n(t);if(n)return n.includes(t);const i=e.current[t];return i==null||i.hasAttribute("disabled")||i.getAttribute("aria-disabled")==="true"}const $c=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Wc(e,t){const n=Nc(e,$c()),i=n.length;if(i===0)return;const r=Co(Ti(e)),s=n.indexOf(r),o=s===-1?t===1?0:i-1:s+t;return n[o]}function Fv(e){return Wc(Ti(e).body,1)||e}function Vv(e){return Wc(Ti(e).body,-1)||e}function Ao(e,t){const n=t||e.currentTarget,i=e.relatedTarget;return!i||!_c(n,i)}function Lv(e){Nc(e,$c()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Uc(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const i=n.dataset.tabindex;delete n.dataset.tabindex,i?n.setAttribute("tabindex",i):n.removeAttribute("tabindex")})}function qc(e,t,n){let{reference:i,floating:r}=e;const s=To(t),o=Xg(t),a=Yg(o),l=wo(t),u=s==="y",c=i.x+i.width/2-r.width/2,d=i.y+i.height/2-r.height/2,f=i[a]/2-r[a]/2;let m;switch(l){case"top":m={x:c,y:i.y-r.height};break;case"bottom":m={x:c,y:i.y+i.height};break;case"right":m={x:i.x+i.width,y:d};break;case"left":m={x:i.x-r.width,y:d};break;default:m={x:i.x,y:i.y}}switch(Pc(t)){case"start":m[o]-=f*(n&&u?-1:1);break;case"end":m[o]+=f*(n&&u?-1:1);break}return m}const _v=async(e,t,n)=>{const{placement:i="bottom",strategy:r="absolute",middleware:s=[],platform:o}=n,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:r}),{x:c,y:d}=qc(u,i,l),f=i,m={},h=0;for(let g=0;g<a.length;g++){const{name:y,fn:v}=a[g],{x:T,y:w,data:k,reset:b}=await v({x:c,y:d,initialPlacement:i,placement:f,strategy:r,middlewareData:m,rects:u,platform:o,elements:{reference:e,floating:t}});c=T??c,d=w??d,m={...m,[y]:{...m[y],...k}},b&&h<=50&&(h++,typeof b=="object"&&(b.placement&&(f=b.placement),b.rects&&(u=b.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:r}):b.rects),{x:c,y:d}=qc(u,f,l)),g=-1)}return{x:c,y:d,placement:f,strategy:r,middlewareData:m}};async function zv(e,t){var n;t===void 0&&(t={});const{x:i,y:r,platform:s,rects:o,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:m=0}=Cc(t,e),h=Jg(m),y=a[f?d==="floating"?"reference":"floating":d],v=yi(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(y)))==null||n?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),T=d==="floating"?{x:i,y:r,width:o.floating.width,height:o.floating.height}:o.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),k=await(s.isElement==null?void 0:s.isElement(w))?await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1}:{x:1,y:1},b=yi(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:T,offsetParent:w,strategy:l}):T);return{top:(v.top-b.top+h.top)/k.y,bottom:(b.bottom-v.bottom+h.bottom)/k.y,left:(v.left-b.left+h.left)/k.x,right:(b.right-v.right+h.right)/k.x}}const Bv=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,i;const{placement:r,rects:s,platform:o,elements:a}=t,{apply:l=()=>{},...u}=Cc(e,t),c=await zv(t,u),d=wo(r),f=Pc(r),m=To(r)==="y",{width:h,height:g}=s.floating;let y,v;d==="top"||d==="bottom"?(y=d,v=f===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(v=d,y=f==="end"?"top":"bottom");const T=g-c.top-c.bottom,w=h-c.left-c.right,k=In(g-c[y],T),b=In(h-c[v],w),C=!t.middlewareData.shift;let R=k,E=b;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(E=w),(i=t.middlewareData.shift)!=null&&i.enabled.y&&(R=T),C&&!f){const _=ze(c.left,0),N=ze(c.right,0),Z=ze(c.top,0),H=ze(c.bottom,0);m?E=h-2*(_!==0||N!==0?_+N:ze(c.left,c.right)):R=g-2*(Z!==0||H!==0?Z+H:ze(c.top,c.bottom))}await l({...t,availableWidth:E,availableHeight:R});const I=await o.getDimensions(a.floating);return h!==I.width||g!==I.height?{reset:{rects:!0}}:{}}}};function Kc(e){const t=Ke(e);let n=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const r=_e(e),s=r?e.offsetWidth:n,o=r?e.offsetHeight:i,a=xi(n)!==s||xi(i)!==o;return a&&(n=s,i=o),{width:n,height:i,$:a}}function Do(e){return ke(e)?e:e.contextElement}function rn(e){const t=Do(e);if(!_e(t))return it(1);const n=t.getBoundingClientRect(),{width:i,height:r,$:s}=Kc(t);let o=(s?xi(n.width):n.width)/i,a=(s?xi(n.height):n.height)/r;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const $v=it(0);function Hc(e){const t=Oe(e);return!yo()||!t.visualViewport?$v:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Wv(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Oe(e)?!1:t}function Dt(e,t,n,i){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=Do(e);let o=it(1);t&&(i?ke(i)&&(o=rn(i)):o=rn(e));const a=Wv(s,n,i)?Hc(s):it(0);let l=(r.left+a.x)/o.x,u=(r.top+a.y)/o.y,c=r.width/o.x,d=r.height/o.y;if(s){const f=Oe(s),m=i&&ke(i)?Oe(i):i;let h=f,g=bo(h);for(;g&&i&&m!==h;){const y=rn(g),v=g.getBoundingClientRect(),T=Ke(g),w=v.left+(g.clientLeft+parseFloat(T.paddingLeft))*y.x,k=v.top+(g.clientTop+parseFloat(T.paddingTop))*y.y;l*=y.x,u*=y.y,c*=y.x,d*=y.y,l+=w,u+=k,h=Oe(g),g=bo(h)}}return yi({width:c,height:d,x:l,y:u})}function ji(e,t){const n=vi(e).scrollLeft;return t?t.left+n:Dt(nt(e)).left+n}function Yc(e,t){const n=e.getBoundingClientRect(),i=n.left+t.scrollLeft-ji(e,n),r=n.top+t.scrollTop;return{x:i,y:r}}function Uv(e){let{elements:t,rect:n,offsetParent:i,strategy:r}=e;const s=r==="fixed",o=nt(i),a=t?gi(t.floating):!1;if(i===o||a&&s)return n;let l={scrollLeft:0,scrollTop:0},u=it(1);const c=it(0),d=_e(i);if((d||!d&&!s)&&((en(i)!=="body"||Dn(o))&&(l=vi(i)),_e(i))){const m=Dt(i);u=rn(i),c.x=m.x+i.clientLeft,c.y=m.y+i.clientTop}const f=o&&!d&&!s?Yc(o,l):it(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+f.x,y:n.y*u.y-l.scrollTop*u.y+c.y+f.y}}function qv(e){return Array.from(e.getClientRects())}function Kv(e){const t=nt(e),n=vi(e),i=e.ownerDocument.body,r=ze(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),s=ze(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let o=-n.scrollLeft+ji(e);const a=-n.scrollTop;return Ke(i).direction==="rtl"&&(o+=ze(t.clientWidth,i.clientWidth)-r),{width:r,height:s,x:o,y:a}}const Gc=25;function Hv(e,t){const n=Oe(e),i=nt(e),r=n.visualViewport;let s=i.clientWidth,o=i.clientHeight,a=0,l=0;if(r){s=r.width,o=r.height;const c=yo();(!c||c&&t==="fixed")&&(a=r.offsetLeft,l=r.offsetTop)}const u=ji(i);if(u<=0){const c=i.ownerDocument,d=c.body,f=getComputedStyle(d),m=c.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,h=Math.abs(i.clientWidth-d.clientWidth-m);h<=Gc&&(s-=h)}else u<=Gc&&(s+=u);return{width:s,height:o,x:a,y:l}}const Yv=new Set(["absolute","fixed"]);function Gv(e,t){const n=Dt(e,!0,t==="fixed"),i=n.top+e.clientTop,r=n.left+e.clientLeft,s=_e(e)?rn(e):it(1),o=e.clientWidth*s.x,a=e.clientHeight*s.y,l=r*s.x,u=i*s.y;return{width:o,height:a,x:l,y:u}}function Xc(e,t,n){let i;if(t==="viewport")i=Hv(e,n);else if(t==="document")i=Kv(nt(e));else if(ke(t))i=Gv(t,n);else{const r=Hc(e);i={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return yi(i)}function Zc(e,t){const n=vt(e);return n===t||!ke(n)||tn(n)?!1:Ke(n).position==="fixed"||Zc(n,t)}function Xv(e,t){const n=t.get(e);if(n)return n;let i=Rn(e,[],!1).filter(a=>ke(a)&&en(a)!=="body"),r=null;const s=Ke(e).position==="fixed";let o=s?vt(e):e;for(;ke(o)&&!tn(o);){const a=Ke(o),l=xo(o);!l&&a.position==="fixed"&&(r=null),(s?!l&&!r:!l&&a.position==="static"&&!!r&&Yv.has(r.position)||Dn(o)&&!l&&Zc(e,o))?i=i.filter(c=>c!==o):r=a,o=vt(o)}return t.set(e,i),i}function Zv(e){let{element:t,boundary:n,rootBoundary:i,strategy:r}=e;const o=[...n==="clippingAncestors"?gi(t)?[]:Xv(t,this._c):[].concat(n),i],a=o[0],l=o.reduce((u,c)=>{const d=Xc(t,c,r);return u.top=ze(d.top,u.top),u.right=In(d.right,u.right),u.bottom=In(d.bottom,u.bottom),u.left=ze(d.left,u.left),u},Xc(t,a,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Jv(e){const{width:t,height:n}=Kc(e);return{width:t,height:n}}function Qv(e,t,n){const i=_e(t),r=nt(t),s=n==="fixed",o=Dt(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=it(0);function u(){l.x=ji(r)}if(i||!i&&!s)if((en(t)!=="body"||Dn(r))&&(a=vi(t)),i){const m=Dt(t,!0,s,t);l.x=m.x+t.clientLeft,l.y=m.y+t.clientTop}else r&&u();s&&!i&&r&&u();const c=r&&!i&&!s?Yc(r,a):it(0),d=o.left+a.scrollLeft-l.x-c.x,f=o.top+a.scrollTop-l.y-c.y;return{x:d,y:f,width:o.width,height:o.height}}function Ro(e){return Ke(e).position==="static"}function Jc(e,t){if(!_e(e)||Ke(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return nt(e)===n&&(n=n.ownerDocument.body),n}function Qc(e,t){const n=Oe(e);if(gi(e))return n;if(!_e(e)){let r=vt(e);for(;r&&!tn(r);){if(ke(r)&&!Ro(r))return r;r=vt(r)}return n}let i=Jc(e,t);for(;i&&zg(i)&&Ro(i);)i=Jc(i,t);return i&&tn(i)&&Ro(i)&&!xo(i)?n:i||qg(e)||n}const ex=async function(e){const t=this.getOffsetParent||Qc,n=this.getDimensions,i=await n(e.floating);return{reference:Qv(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function tx(e){return Ke(e).direction==="rtl"}const nx={convertOffsetParentRelativeRectToViewportRelativeRect:Uv,getDocumentElement:nt,getClippingRect:Zv,getOffsetParent:Qc,getElementRects:ex,getClientRects:qv,getDimensions:Jv,getScale:rn,isElement:ke,isRTL:tx};function eu(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ix(e,t){let n=null,i;const r=nt(e);function s(){var a;clearTimeout(i),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const u=e.getBoundingClientRect(),{left:c,top:d,width:f,height:m}=u;if(a||t(),!f||!m)return;const h=nn(d),g=nn(r.clientWidth-(c+f)),y=nn(r.clientHeight-(d+m)),v=nn(c),w={rootMargin:-h+"px "+-g+"px "+-y+"px "+-v+"px",threshold:ze(0,In(1,l))||1};let k=!0;function b(C){const R=C[0].intersectionRatio;if(R!==l){if(!k)return o();R?o(!1,R):i=setTimeout(()=>{o(!1,1e-7)},1e3)}R===1&&!eu(u,e.getBoundingClientRect())&&o(),k=!1}try{n=new IntersectionObserver(b,{...w,root:r.ownerDocument})}catch{n=new IntersectionObserver(b,w)}n.observe(e)}return o(!0),s}function tu(e,t,n,i){i===void 0&&(i={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=i,u=Do(e),c=r||s?[...u?Rn(u):[],...Rn(t)]:[];c.forEach(v=>{r&&v.addEventListener("scroll",n,{passive:!0}),s&&v.addEventListener("resize",n)});const d=u&&a?ix(u,n):null;let f=-1,m=null;o&&(m=new ResizeObserver(v=>{let[T]=v;T&&T.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var w;(w=m)==null||w.observe(t)})),n()}),u&&!l&&m.observe(u),m.observe(t));let h,g=l?Dt(e):null;l&&y();function y(){const v=Dt(e);g&&!eu(g,v)&&n(),g=v,h=requestAnimationFrame(y)}return n(),()=>{var v;c.forEach(T=>{r&&T.removeEventListener("scroll",n),s&&T.removeEventListener("resize",n)}),d?.(),(v=m)==null||v.disconnect(),m=null,l&&cancelAnimationFrame(h)}}const rx=Bv,ox=(e,t,n)=>{const i=new Map,r={platform:nx,...n},s={...r.platform,_c:i};return _v(e,t,{...r,platform:s})};var sx=typeof document<"u",ax=function(){},Ci=sx?S.useLayoutEffect:ax;function Pi(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,i,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(i=n;i--!==0;)if(!Pi(e[i],t[i]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(i=n;i--!==0;)if(!{}.hasOwnProperty.call(t,r[i]))return!1;for(i=n;i--!==0;){const s=r[i];if(!(s==="_owner"&&e.$$typeof)&&!Pi(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function nu(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function iu(e,t){const n=nu(e);return Math.round(t*n)/n}function Io(e){const t=j.useRef(e);return Ci(()=>{t.current=e}),t}function lx(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:i=[],platform:r,elements:{reference:s,floating:o}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[c,d]=j.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,m]=j.useState(i);Pi(f,i)||m(i);const[h,g]=j.useState(null),[y,v]=j.useState(null),T=j.useCallback(V=>{V!==C.current&&(C.current=V,g(V))},[]),w=j.useCallback(V=>{V!==R.current&&(R.current=V,v(V))},[]),k=s||h,b=o||y,C=j.useRef(null),R=j.useRef(null),E=j.useRef(c),I=l!=null,_=Io(l),N=Io(r),Z=Io(u),H=j.useCallback(()=>{if(!C.current||!R.current)return;const V={placement:t,strategy:n,middleware:f};N.current&&(V.platform=N.current),ox(C.current,R.current,V).then(G=>{const x={...G,isPositioned:Z.current!==!1};W.current&&!Pi(E.current,x)&&(E.current=x,as.flushSync(()=>{d(x)}))})},[f,t,n,N,Z]);Ci(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,d(V=>({...V,isPositioned:!1})))},[u]);const W=j.useRef(!1);Ci(()=>(W.current=!0,()=>{W.current=!1}),[]),Ci(()=>{if(k&&(C.current=k),b&&(R.current=b),k&&b){if(_.current)return _.current(k,b,H);H()}},[k,b,H,_,I]);const J=j.useMemo(()=>({reference:C,floating:R,setReference:T,setFloating:w}),[T,w]),U=j.useMemo(()=>({reference:k,floating:b}),[k,b]),L=j.useMemo(()=>{const V={position:n,left:0,top:0};if(!U.floating)return V;const G=iu(U.floating,c.x),x=iu(U.floating,c.y);return a?{...V,transform:"translate("+G+"px, "+x+"px)",...nu(U.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:G,top:x}},[n,a,U.floating,c.x,c.y]);return j.useMemo(()=>({...c,update:H,refs:J,elements:U,floatingStyles:L}),[c,H,J,U,L])}const ru=(e,t)=>({...rx(e),options:[e,t]}),cx="data-floating-ui-focusable",ou="active",su="selected",Fn="ArrowLeft",Vn="ArrowRight",au="ArrowUp",Ai="ArrowDown",ux={...j};let lu=!1,dx=0;const cu=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+dx++;function px(){const[e,t]=j.useState(()=>lu?cu():void 0);return Ee(()=>{e==null&&t(cu())},[]),j.useEffect(()=>{lu=!0},[]),e}const uu=ux.useId||px;let Ln;process.env.NODE_ENV!=="production"&&(Ln=new Set);function Oo(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];const r="Floating UI: "+n.join(" ");if(!((e=Ln)!=null&&e.has(r))){var s;(s=Ln)==null||s.add(r),console.warn(r)}}function fx(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];const r="Floating UI: "+n.join(" ");if(!((e=Ln)!=null&&e.has(r))){var s;(s=Ln)==null||s.add(r),console.error(r)}}function mx(){const e=new Map;return{emit(t,n){var i;(i=e.get(t))==null||i.forEach(r=>r(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var i;(i=e.get(t))==null||i.delete(n)}}}const hx=j.createContext(null),gx=j.createContext(null),du=()=>{var e;return((e=j.useContext(hx))==null?void 0:e.id)||null},pu=()=>j.useContext(gx);function fu(e){return"data-floating-ui-"+e}let mu=0;function vx(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:i=!0,sync:r=!1}=t;i&&cancelAnimationFrame(mu);const s=()=>e?.focus({preventScroll:n});r?s():mu=requestAnimationFrame(s)}const hu={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},gu=j.forwardRef(function(t,n){const[i,r]=j.useState();Ee(()=>{vv()&&r("button")},[]);const s={ref:n,tabIndex:0,role:i,"aria-hidden":i?void 0:!0,[fu("focus-guard")]:"",style:hu};return p.jsx("span",{...t,...s})}),vu=j.createContext(null),xu=fu("portal");function xx(e){e===void 0&&(e={});const{id:t,root:n}=e,i=uu(),r=yx(),[s,o]=j.useState(null),a=j.useRef(null);return Ee(()=>()=>{s?.remove(),queueMicrotask(()=>{a.current=null})},[s]),Ee(()=>{if(!i||a.current)return;const l=t?document.getElementById(t):null;if(!l)return;const u=document.createElement("div");u.id=i,u.setAttribute(xu,""),l.appendChild(u),a.current=u,o(u)},[t,i]),Ee(()=>{if(n===null||!i||a.current)return;let l=n||r?.portalNode;l&&!go(l)&&(l=l.current),l=l||document.body;let u=null;t&&(u=document.createElement("div"),u.id=t,l.appendChild(u));const c=document.createElement("div");c.id=i,c.setAttribute(xu,""),l=u||l,l.appendChild(c),a.current=c,o(c)},[t,n,i,r]),s}function Mo(e){const{children:t,id:n,root:i,preserveTabOrder:r=!0}=e,s=xx({id:n,root:i}),[o,a]=j.useState(null),l=j.useRef(null),u=j.useRef(null),c=j.useRef(null),d=j.useRef(null),f=o?.modal,m=o?.open,h=!!o&&!o.modal&&o.open&&r&&!!(i||s);return j.useEffect(()=>{if(!s||!r||f)return;function g(y){s&&Ao(y)&&(y.type==="focusin"?Uc:Lv)(s)}return s.addEventListener("focusin",g,!0),s.addEventListener("focusout",g,!0),()=>{s.removeEventListener("focusin",g,!0),s.removeEventListener("focusout",g,!0)}},[s,r,f]),j.useEffect(()=>{s&&(m||Uc(s))},[m,s]),p.jsxs(vu.Provider,{value:j.useMemo(()=>({preserveTabOrder:r,beforeOutsideRef:l,afterOutsideRef:u,beforeInsideRef:c,afterInsideRef:d,portalNode:s,setFocusManagerState:a}),[r,s]),children:[h&&s&&p.jsx(gu,{"data-type":"outside",ref:l,onFocus:g=>{if(Ao(g,s)){var y;(y=c.current)==null||y.focus()}else{const v=o?o.domReference:null,T=Vv(v);T?.focus()}}}),h&&s&&p.jsx("span",{"aria-owns":s.id,style:hu}),s&&as.createPortal(t,s),h&&s&&p.jsx(gu,{"data-type":"outside",ref:u,onFocus:g=>{if(Ao(g,s)){var y;(y=d.current)==null||y.focus()}else{const v=o?o.domReference:null,T=Fv(v);T?.focus(),o?.closeOnFocusOut&&o?.onOpenChange(!1,g.nativeEvent,"focus-out")}}})]})}const yx=()=>j.useContext(vu);let Di=0;const yu="--floating-ui-scrollbar-width";function bx(){const e=Fc(),t=/iP(hone|ad|od)|iOS/.test(e)||e==="MacIntel"&&navigator.maxTouchPoints>1,n=document.body.style,r=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",s=window.innerWidth-document.documentElement.clientWidth,o=n.left?parseFloat(n.left):window.scrollX,a=n.top?parseFloat(n.top):window.scrollY;if(n.overflow="hidden",n.setProperty(yu,s+"px"),s&&(n[r]=s+"px"),t){var l,u;const c=((l=window.visualViewport)==null?void 0:l.offsetLeft)||0,d=((u=window.visualViewport)==null?void 0:u.offsetTop)||0;Object.assign(n,{position:"fixed",top:-(a-Math.floor(d))+"px",left:-(o-Math.floor(c))+"px",right:"0"})}return()=>{Object.assign(n,{overflow:"",[r]:""}),n.removeProperty(yu),t&&(Object.assign(n,{position:"",top:"",left:"",right:""}),window.scrollTo(o,a))}}let bu=()=>{};const No=j.forwardRef(function(t,n){const{lockScroll:i=!1,...r}=t;return Ee(()=>{if(i)return Di++,Di===1&&(bu=bx()),()=>{Di--,Di===0&&bu()}},[i]),p.jsx("div",{ref:n,...r,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...r.style}})});function wx(e){const{open:t=!1,onOpenChange:n,elements:i}=e,r=uu(),s=j.useRef({}),[o]=j.useState(()=>mx()),a=du()!=null;if(process.env.NODE_ENV!=="production"){const m=i.reference;m&&!ke(m)&&fx("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,u]=j.useState(i.reference),c=Si((m,h,g)=>{s.current.openEvent=m?h:void 0,o.emit("openchange",{open:m,event:h,reason:g,nested:a}),n?.(m,h,g)}),d=j.useMemo(()=>({setPositionReference:u}),[]),f=j.useMemo(()=>({reference:l||i.reference||null,floating:i.floating||null,domReference:i.reference}),[l,i.reference,i.floating]);return j.useMemo(()=>({dataRef:s,open:t,onOpenChange:c,elements:f,events:o,floatingId:r,refs:d}),[t,c,f,o,r,d])}function wu(e){e===void 0&&(e={});const{nodeId:t}=e,n=wx({...e,elements:{reference:null,floating:null,...e.elements}}),i=e.rootContext||n,r=i.elements,[s,o]=j.useState(null),[a,l]=j.useState(null),c=r?.domReference||s,d=j.useRef(null),f=pu();Ee(()=>{c&&(d.current=c)},[c]);const m=lx({...e,elements:{...r,...a&&{reference:a}}}),h=j.useCallback(w=>{const k=ke(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),getClientRects:()=>w.getClientRects(),contextElement:w}:w;l(k),m.refs.setReference(k)},[m.refs]),g=j.useCallback(w=>{(ke(w)||w===null)&&(d.current=w,o(w)),(ke(m.refs.reference.current)||m.refs.reference.current===null||w!==null&&!ke(w))&&m.refs.setReference(w)},[m.refs]),y=j.useMemo(()=>({...m.refs,setReference:g,setPositionReference:h,domReference:d}),[m.refs,g,h]),v=j.useMemo(()=>({...m.elements,domReference:c}),[m.elements,c]),T=j.useMemo(()=>({...m,...i,refs:y,elements:v,nodeId:t}),[m,y,v,t,i]);return Ee(()=>{i.dataRef.current.floatingContext=T;const w=f?.nodesRef.current.find(k=>k.id===t);w&&(w.context=T)}),j.useMemo(()=>({...m,context:T,refs:y,elements:v}),[m,y,v,T])}function Fo(e,t,n){const i=new Map,r=n==="item";let s=e;if(r&&e){const{[ou]:o,[su]:a,...l}=e;s=l}return{...n==="floating"&&{tabIndex:-1,[cx]:""},...s,...t.map(o=>{const a=o?o[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((o,a)=>(a&&Object.entries(a).forEach(l=>{let[u,c]=l;if(!(r&&[ou,su].includes(u)))if(u.indexOf("on")===0){if(i.has(u)||i.set(u,[]),typeof c=="function"){var d;(d=i.get(u))==null||d.push(c),o[u]=function(){for(var f,m=arguments.length,h=new Array(m),g=0;g<m;g++)h[g]=arguments[g];return(f=i.get(u))==null?void 0:f.map(y=>y(...h)).find(y=>y!==void 0)}}}else o[u]=c}),o),{})}}function Tx(e){e===void 0&&(e=[]);const t=e.map(a=>a?.reference),n=e.map(a=>a?.floating),i=e.map(a=>a?.item),r=j.useCallback(a=>Fo(a,e,"reference"),t),s=j.useCallback(a=>Fo(a,e,"floating"),n),o=j.useCallback(a=>Fo(a,e,"item"),i);return j.useMemo(()=>({getReferenceProps:r,getFloatingProps:s,getItemProps:o}),[r,s,o])}const Sx="Escape";function Ri(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Ii(e,t){return Ri(t,e===au||e===Ai,e===Fn||e===Vn)}function Vo(e,t,n){return Ri(t,e===Ai,n?e===Fn:e===Vn)||e==="Enter"||e===" "||e===""}function Tu(e,t,n){return Ri(t,n?e===Fn:e===Vn,e===Ai)}function Su(e,t,n,i){const r=n?e===Vn:e===Fn,s=e===au;return t==="both"||t==="horizontal"&&i&&i>1?e===Sx:Ri(t,r,s)}function kx(e,t){const{open:n,onOpenChange:i,elements:r,floatingId:s}=e,{listRef:o,activeIndex:a,onNavigate:l=()=>{},enabled:u=!0,selectedIndex:c=null,allowEscape:d=!1,loop:f=!1,nested:m=!1,rtl:h=!1,virtual:g=!1,focusItemOnOpen:y="auto",focusItemOnHover:v=!0,openOnArrowKeyDown:T=!0,disabledIndices:w=void 0,orientation:k="vertical",parentOrientation:b,cols:C=1,scrollItemIntoView:R=!0,virtualItemRef:E,itemSizes:I,dense:_=!1}=t;process.env.NODE_ENV!=="production"&&(d&&(f||Oo("`useListNavigation` looping must be enabled to allow escaping."),g||Oo("`useListNavigation` must be virtual to allow escaping.")),k==="vertical"&&C>1&&Oo("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const N=kv(r.floating),Z=Mn(N),H=du(),W=pu();Ee(()=>{e.dataRef.current.orientation=k},[e,k]);const J=Si(()=>{l(V.current===-1?null:V.current)}),U=Sv(r.domReference),L=j.useRef(y),V=j.useRef(c??-1),G=j.useRef(null),x=j.useRef(!0),P=j.useRef(J),D=j.useRef(!!r.floating),M=j.useRef(n),z=j.useRef(!1),K=j.useRef(!1),X=Mn(w),A=Mn(n),F=Mn(R),Q=Mn(c),[ee,he]=j.useState(),[B,we]=j.useState(),Ye=Si(()=>{function ne($){if(g){var re;(re=$.id)!=null&&re.endsWith("-fui-option")&&($.id=s+"-"+Math.random().toString(16).slice(2,10)),he($.id),W?.events.emit("virtualfocus",$),E&&(E.current=$)}else vx($,{sync:z.current,preventScroll:!0})}const ae=o.current[V.current],te=K.current;ae&&ne(ae),(z.current?$=>$():requestAnimationFrame)(()=>{const $=o.current[V.current]||ae;if(!$)return;ae||ne($);const re=F.current;re&&ln&&(te||!x.current)&&($.scrollIntoView==null||$.scrollIntoView(typeof re=="boolean"?{block:"nearest",inline:"nearest"}:re))})});Ee(()=>{u&&(n&&r.floating?L.current&&c!=null&&(K.current=!0,V.current=c,J()):D.current&&(V.current=-1,P.current()))},[u,n,r.floating,c,J]),Ee(()=>{if(u&&n&&r.floating)if(a==null){if(z.current=!1,Q.current!=null)return;if(D.current&&(V.current=-1,Ye()),(!M.current||!D.current)&&L.current&&(G.current!=null||L.current===!0&&G.current==null)){let ne=0;const ae=()=>{o.current[0]==null?(ne<2&&(ne?requestAnimationFrame:queueMicrotask)(ae),ne++):(V.current=G.current==null||Vo(G.current,k,h)||m?Po(o,X.current):Bc(o,X.current),G.current=null,J())};ae()}}else Nn(o,a)||(V.current=a,Ye(),K.current=!1)},[u,n,r.floating,a,Q,m,o,k,h,J,Ye,X]),Ee(()=>{var ne;if(!u||r.floating||!W||g||!D.current)return;const ae=W.nodesRef.current,te=(ne=ae.find(re=>re.id===H))==null||(ne=ne.context)==null?void 0:ne.elements.floating,O=Co(Ti(r.floating)),$=ae.some(re=>re.context&&_c(re.context.elements.floating,O));te&&!$&&x.current&&te.focus({preventScroll:!0})},[u,r.floating,W,H,g]),Ee(()=>{if(!u||!W||!g||H)return;function ne(ae){we(ae.id),E&&(E.current=ae)}return W.events.on("virtualfocus",ne),()=>{W.events.off("virtualfocus",ne)}},[u,W,g,H,E]),Ee(()=>{P.current=J,M.current=n,D.current=!!r.floating}),Ee(()=>{n||(G.current=null,L.current=y)},[n,y]);const xt=a!=null,ln=j.useMemo(()=>{function ne(te){if(!A.current)return;const O=o.current.indexOf(te);O!==-1&&V.current!==O&&(V.current=O,J())}return{onFocus(te){let{currentTarget:O}=te;z.current=!0,ne(O)},onClick:te=>{let{currentTarget:O}=te;return O.focus({preventScroll:!0})},onMouseMove(te){let{currentTarget:O}=te;z.current=!0,K.current=!1,v&&ne(O)},onPointerLeave(te){let{pointerType:O}=te;if(!(!x.current||O==="touch")&&(z.current=!0,!!v&&(V.current=-1,J(),!g))){var $;($=Z.current)==null||$.focus({preventScroll:!0})}}}},[A,Z,v,o,J,g]),Mt=j.useCallback(()=>{var ne;return b??(W==null||(ne=W.nodesRef.current.find(ae=>ae.id===H))==null||(ne=ne.context)==null||(ne=ne.dataRef)==null?void 0:ne.current.orientation)},[H,W,b]),$e=Si(ne=>{if(x.current=!1,z.current=!0,ne.which===229||!A.current&&ne.currentTarget===Z.current)return;if(m&&Su(ne.key,k,h,C)){Ii(ne.key,Mt())||Be(ne),i(!1,ne.nativeEvent,"list-navigation"),_e(r.domReference)&&(g?W?.events.emit("virtualfocus",r.domReference):r.domReference.focus());return}const ae=V.current,te=Po(o,w),O=Bc(o,w);if(U||(ne.key==="Home"&&(Be(ne),V.current=te,J()),ne.key==="End"&&(Be(ne),V.current=O,J())),C>1){const $=I||Array.from({length:o.current.length},()=>({width:1,height:1})),re=Ov($,C,_),ue=re.findIndex(xe=>xe!=null&&!Ei(o,xe,w)),ve=re.reduce((xe,Ge,bt)=>Ge!=null&&!Ei(o,Ge,w)?bt:xe,-1),Ce=re[Iv({current:re.map(xe=>xe!=null?o.current[xe]:null)},{event:ne,orientation:k,loop:f,rtl:h,cols:C,disabledIndices:Nv([...(typeof w!="function"?w:null)||o.current.map((xe,Ge)=>Ei(o,Ge,w)?Ge:void 0),void 0],re),minIndex:ue,maxIndex:ve,prevIndex:Mv(V.current>O?te:V.current,$,re,C,ne.key===Ai?"bl":ne.key===(h?Fn:Vn)?"tr":"tl"),stopEvent:!0})];if(Ce!=null&&(V.current=Ce,J()),k==="both")return}if(Ii(ne.key,k)){if(Be(ne),n&&!g&&Co(ne.currentTarget.ownerDocument)===ne.currentTarget){V.current=Vo(ne.key,k,h)?te:O,J();return}Vo(ne.key,k,h)?f?V.current=ae>=O?d&&ae!==o.current.length?-1:te:je(o,{startingIndex:ae,disabledIndices:w}):V.current=Math.min(O,je(o,{startingIndex:ae,disabledIndices:w})):f?V.current=ae<=te?d&&ae!==-1?o.current.length:O:je(o,{startingIndex:ae,decrement:!0,disabledIndices:w}):V.current=Math.max(te,je(o,{startingIndex:ae,decrement:!0,disabledIndices:w})),Nn(o,V.current)&&(V.current=-1),J()}}),yt=j.useMemo(()=>g&&n&&xt&&{"aria-activedescendant":B||ee},[g,n,xt,B,ee]),Nt=j.useMemo(()=>({"aria-orientation":k==="both"?void 0:k,...U?{}:yt,onKeyDown:$e,onPointerMove(){x.current=!0}}),[yt,$e,k,U]),Ft=j.useMemo(()=>{function ne(te){y==="auto"&&jv(te.nativeEvent)&&(L.current=!0)}function ae(te){L.current=y,y==="auto"&&Cv(te.nativeEvent)&&(L.current=!0)}return{...yt,onKeyDown(te){x.current=!1;const O=te.key.startsWith("Arrow"),$=["Home","End"].includes(te.key),re=O||$,ue=Tu(te.key,k,h),ve=Su(te.key,k,h,C),Ce=Tu(te.key,Mt(),h),xe=Ii(te.key,k),Ge=(m?Ce:xe)||te.key==="Enter"||te.key.trim()==="";if(g&&n){const wt=W?.nodesRef.current.find(Tt=>Tt.parentId==null),We=W&&wt?Ev(W.nodesRef.current,wt.id):null;if(re&&We&&E){const Tt=new KeyboardEvent("keydown",{key:te.key,bubbles:!0});if(ue||ve){var bt,cn;const Kn=((bt=We.context)==null?void 0:bt.elements.domReference)===te.currentTarget,Bi=ve&&!Kn?(cn=We.context)==null?void 0:cn.elements.domReference:ue?o.current.find(hd=>hd?.id===ee):null;Bi&&(Be(te),Bi.dispatchEvent(Tt),we(void 0))}if((xe||$)&&We.context&&We.context.open&&We.parentId&&te.currentTarget!==We.context.elements.domReference){var Vt;Be(te),(Vt=We.context.elements.domReference)==null||Vt.dispatchEvent(Tt);return}}return $e(te)}if(!(!n&&!T&&O)){if(Ge){const wt=Ii(te.key,Mt());G.current=m&&wt?null:te.key}if(m){Ce&&(Be(te),n?(V.current=Po(o,X.current),J()):i(!0,te.nativeEvent,"list-navigation"));return}xe&&(c!=null&&(V.current=c),Be(te),!n&&T?i(!0,te.nativeEvent,"list-navigation"):$e(te),n&&J())}},onFocus(){n&&!g&&(V.current=-1,J())},onPointerDown:ae,onPointerEnter:ae,onMouseDown:ne,onClick:ne}},[ee,yt,C,$e,X,y,o,m,J,i,n,T,k,Mt,h,c,W,g,E]);return j.useMemo(()=>u?{reference:Ft,floating:Nt,item:ln}:{},[u,Ft,Nt,ln])}const Ex={top:"bottom center","top-start":"bottom left","top-end":"bottom right",right:"left center","right-start":"top left","right-end":"bottom left",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"top right","left-end":"bottom right"},Lo=j.memo(({open:e,children:t,className:n,onOutsideClick:i,floatingStyles:r,setFloating:s,placement:o,floatingProps:a})=>p.jsx(Mo,{children:p.jsx(ii,{children:e&&p.jsxs(p.Fragment,{children:[i&&p.jsx(No,{onClick:i}),p.jsx("div",{ref:s,style:r,className:"z-50",...a,children:p.jsx(Je.div,{className:n,style:{transformOrigin:Ex[o]},initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.1,ease:"easeInOut"},children:t})})]})})})),Oi=e=>{const{placement:t="bottom",onOutsideClick:n,fullWidth:i,minWidth:r,maxWidth:s}=e,o=j.useMemo(()=>[ru({apply({rects:d,elements:f}){i&&(f.floating.style.width=`${d.reference.width}px`),r&&(f.floating.style.minWidth=`${r}px`),s&&(f.floating.style.maxWidth=`${s}px`)}})],[i,s,r]),{refs:a,floatingStyles:l}=wu({placement:t,middleware:o,whileElementsMounted:tu}),u=j.useRef({onOutsideClick:n,floatingStyles:l,setFloating:a.setFloating,placement:t});u.current={onOutsideClick:n,floatingStyles:l,setFloating:a.setFloating,placement:t};const c=j.useMemo(()=>{const d=f=>{const{floatingStyles:m,setFloating:h,onOutsideClick:g,placement:y}=u.current,{className:v,open:T,children:w}=f;return p.jsx(Lo,{open:T,className:v,onOutsideClick:g,floatingStyles:m,setFloating:h,placement:y,children:w})};return j.memo(d)},[]);return{anchorRef:a.setReference,Popover:c}},Rt=(e,t)=>{S.useEffect(()=>{if(!e)return;const n=i=>{i.key==="Escape"&&t()};return document.addEventListener("keydown",n),()=>{document.removeEventListener("keydown",n)}},[e,t])},jx="linear-gradient(to right, #f00 0%, #ff0 16.66%, #0f0 33.33%, #0ff 50%, #00f 66.66%, #f0f 83.33%, #f00 100%)",Cx="linear-gradient(to right, #fff, rgba(255,255,255,0))",Px="linear-gradient(to top, #000, rgba(0,0,0,0))",_o="0 0 0 1px rgba(0,0,0,0.15)",Ax=14,Dx=28,Rx=6,Ix=8,zo={type:"spring",stiffness:500,damping:18,mass:.6},on=e=>{const t=e?Dx:Ax,n=t/2;return{width:t,height:t,marginLeft:-n,marginTop:-n,borderRadius:e?Ix:Rx}},Mi=e=>Math.max(0,Math.min(1,e)),ku=(e,t)=>{Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value")?.set?.call(e,t),e.dispatchEvent(new Event("input",{bubbles:!0}))},Ox=({value:e,onChange:t})=>{const[n,i]=S.useState(()=>Ec(e)??[0,0,1]),r=S.useRef(An(n[0],n[1],n[2]));S.useEffect(()=>{if((e||"").toUpperCase()===r.current)return;const g=Ec(e);g&&i(g)},[e]);const s=g=>{i(g);const y=An(g[0],g[1],g[2]);r.current=y,t(y)},[o,a,l]=n,u=An(o,1,1),c=An(o,a,1),d=An(o,a,l),f=ho((g,y,v)=>{s([o,Mi((g-v.left)/v.width),1-Mi((y-v.top)/v.height)])}),m=ho((g,y,v)=>{s([Mi((g-v.left)/v.width)*360,a,l])}),h=ho((g,y,v)=>{s([o,a,Mi((g-v.left)/v.width)])});return p.jsxs("div",{className:"flex flex-col gap-3",style:{width:220,userSelect:"none"},onMouseDown:g=>g.preventDefault(),children:[p.jsxs("div",{className:"relative w-full",style:{height:160,touchAction:"none",cursor:"crosshair"},...f.bind,children:[p.jsxs("div",{className:"absolute inset-0 rounded-md overflow-hidden border color-picker-surface",style:{backgroundColor:u},children:[p.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{background:Cx}}),p.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{background:Px}})]}),p.jsx(Je.div,{className:"absolute pointer-events-none border-1 border-white",style:{left:`${a*100}%`,top:`${(1-l)*100}%`,boxShadow:_o,backgroundColor:d},initial:on(!1),animate:on(f.isDragging),transition:zo})]}),p.jsx("div",{className:"relative w-full rounded-md",style:{height:12,background:jx,touchAction:"none",cursor:"ew-resize"},...m.bind,children:p.jsx(Je.div,{className:"absolute pointer-events-none border-1 border-white",style:{top:"50%",left:`${o/360*100}%`,backgroundColor:u,boxShadow:_o},initial:on(!1),animate:on(m.isDragging),transition:zo})}),p.jsx("div",{className:"relative w-full rounded-md",style:{height:12,background:`linear-gradient(to right, #000, ${c})`,touchAction:"none",cursor:"ew-resize"},...h.bind,children:p.jsx(Je.div,{className:"absolute pointer-events-none border-1 border-white",style:{top:"50%",left:`${l*100}%`,backgroundColor:d,boxShadow:_o},initial:on(!1),animate:on(h.isDragging),transition:zo})})]})},Mx=e=>{const{className:t,label:n,description:i,error:r,buttonTray:s,size:o="md",value:a,defaultValue:l,onChange:u,onBlur:c,onFocus:d,...f}=e,[m,h]=S.useState(a!=null?String(a):l!=null?String(l):""),[g,y]=S.useState(!1),v=S.useRef(null),T=a!=null?String(a):m,w=T||"white";Rt(g,()=>y(!1));const{anchorRef:k,Popover:b}=Oi({placement:"bottom-start",onOutsideClick:()=>y(!1)}),C=N=>{h(N.target.value),u?.(N)},R=N=>{y(!0),d?.(N)},E=N=>{const Z=N.target.value,H=Ng(Z);H&&H!==Z&&v.current&&ku(v.current,H),y(!1),c?.(N)},I=N=>{v.current&&ku(v.current,N)},_=!!r||!!s;return p.jsx(tt.Provider,{value:o,children:p.jsxs("div",{className:q("flex flex-col",t),children:[p.jsx(qe,{children:n}),p.jsxs("div",{className:"flex flex-col relative",ref:k,children:[p.jsx("div",{className:q("absolute top-1/2 -translate-y-1/2 rounded-md border color-swatch",At[o],yc[o]),style:{backgroundColor:w}}),p.jsx("input",{ref:v,className:q("border input-base transition-all duration-150 rounded-xl shadow-sm ring-0 focus:ring-4 focus:outline-none",at[o],Qe[o],xc[o],_?mt[o]:lo[o],r&&"input-error"),value:a??m,onChange:C,onFocus:R,onBlur:E,onClick:()=>y(!0),...f}),p.jsxs(lt,{children:[r&&p.jsx(et,{}),s]}),p.jsx(b,{open:g,children:p.jsx(gt,{padding:"md",children:p.jsx(Ox,{value:T,onChange:I})})})]}),p.jsx(De,{children:i}),p.jsx(Re,{children:r})]})})},He=e=>{const{onClick:t,Icon:n}=e;return p.jsx("div",{onClick:t,className:q("h-6 w-6 select-none rounded-full p-0.5",t&&"ring-0 transition-all duration-150 input-icon-button-interactive active:ring-2 cursor-pointer hover:ring-4 group"),children:p.jsx(n,{className:q("h-5 w-5 input-icon-button-icon",t&&"group-active:scale-[0.8] transition-transform origin-center")})})},Nx=e=>{const{type:t="password",enableShowPasswordToggle:n=!0,...i}=e,[r,s]=S.useState(!1),o=()=>{s(!r)};return p.jsx(mo,{type:r?"text":t,buttonTray:n?p.jsx(He,{Icon:r?Sg:kg,onClick:o}):void 0,...i})};function Fx(e){return t=>{for(const n of e)Bo(n,t)}}function Vx(e){return t=>{const n=[];for(const i of e){const r=Bo(i,t),s=typeof r=="function";n.push(s?r:()=>Bo(i,null))}return()=>{for(const i of n)i()}}}function Bo(e,t){if(typeof e=="function")return e(t);e&&(e.current=t)}var Lx=parseInt(S.version.split(".")[0],10)>=19?Vx:Fx;const _x=e=>{const{className:t,label:n,description:i,error:r,size:s="md",autogrow:o=!1,maxRows:a,ref:l,onChange:u,...c}=e,d=j.useRef(null),f=j.useCallback(()=>{const h=d.current;if(!h)return;h.style.height="auto";let g=h.scrollHeight;if(a){const y=window.getComputedStyle(h),v=parseFloat(y.lineHeight),T=parseFloat(y.paddingTop),w=parseFloat(y.paddingBottom),k=parseFloat(y.borderTopWidth),b=parseFloat(y.borderBottomWidth),C=v*a+T+w+k+b;g=Math.min(h.scrollHeight,C)}h.style.height=`${g}px`},[a]);j.useLayoutEffect(()=>{if(!o){d.current&&(d.current.style.height="");return}f()},[o,f,e.value,e.defaultValue,s]);const m=h=>{u?.(h),o&&f()};return p.jsx(tt.Provider,{value:s,children:p.jsxs("div",{className:q("flex flex-col",t),children:[p.jsx(qe,{children:n}),p.jsxs("div",{className:"flex flex-col relative",children:[p.jsx("textarea",{ref:l?Lx([l,d]):d,onChange:m,className:q("py-2.5 border input-base transition-all duration-150 rounded-xl shadow-sm ring-0 focus:ring-4 focus:outline-none",vc[s],Qe[s],ft[s],r?mt[s]:lo[s],r&&"input-error",o&&(a?"resize-none overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden":"resize-none overflow-hidden")),...c}),p.jsx(lt,{className:"top-3.5 translate-y-0",children:r&&p.jsx(et,{})})]}),p.jsx(De,{children:i}),p.jsx(Re,{children:r})]})})},zx=e=>{const{className:t,label:n,description:i,error:r,...s}=e;return p.jsxs("div",{className:q("flex flex-col",t),children:[p.jsxs("div",{className:"flex flex-row gap-3",children:[p.jsx("input",{type:"radio",className:"h-6 w-6 shrink-0 rounded-full border check-base shadow-sm ring-0 hover:ring-4 focus:ring-4 ring-offset-0 focus:outline-0 transition-all duration-150",...s}),n&&p.jsx("label",{htmlFor:e.id,className:q("input-label font-medium mb-1",e.id&&"cursor-pointer"),children:n})]}),p.jsx(De,{children:i}),p.jsx(Re,{children:r})]})},Bx=e=>{const{className:t,label:n,description:i,error:r,...s}=e;return p.jsxs("div",{className:q("flex flex-col",t),children:[p.jsxs("div",{className:"flex flex-row gap-3",children:[p.jsxs("div",{className:"relative shrink-0 h-6 w-10",children:[p.jsx("input",{type:"checkbox",className:"appearance-none h-6 w-10 rounded-full checked:bg-transparent border toggle-input ring-0 hover:ring-4 focus:ring-4 ring-offset-0 focus:outline-0 transition-all duration-150",...s}),p.jsx("div",{className:q("rounded-full absolute border inset-0 mt-[2px] pointer-events-none transition-colors duration-150 ",e.checked?"toggle-track-on":"toggle-track-off"),children:p.jsx("div",{className:q("absolute top-1/2 -translate-y-1/2 left-1 h-4 w-4 rounded-full toggle-thumb shadow-md transition-all duration-150",e.checked&&"translate-x-3.5 ")})})]}),n&&p.jsx("label",{htmlFor:e.id,className:q("input-label font-medium mb-1",e.id&&"cursor-pointer"),children:n})]}),p.jsx(De,{children:i}),p.jsx(Re,{children:r})]})},$x=e=>{const{className:t,label:n,description:i,error:r,...s}=e;return p.jsxs("div",{className:q("flex flex-col",t),children:[p.jsxs("div",{className:"flex flex-row gap-3",children:[p.jsx("input",{type:"checkbox",className:"h-6 w-6 shrink-0 rounded-lg border check-base shadow-sm ring-0 hover:ring-4 focus:ring-4 ring-offset-0 focus:outline-0 transition-all duration-150",...s}),n&&p.jsx("label",{htmlFor:e.id,className:q("input-label font-medium mb-1",e.id&&"cursor-pointer"),children:n})]}),p.jsx(De,{children:i}),p.jsx(Re,{children:r})]})};var Ni={exports:{}},Fi={exports:{}},oe={};/** @license React v16.13.1
160
160
  * react-is.production.min.js
161
161
  *
162
162
  * Copyright (c) Facebook, Inc. and its affiliates.
163
163
  *
164
164
  * This source code is licensed under the MIT license found in the
165
165
  * LICENSE file in the root directory of this source tree.
166
- */var Dc;function Lv(){if(Dc)return te;Dc=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,h=e?Symbol.for("react.responder"):60118,T=e?Symbol.for("react.scope"):60119;function w(y){if(typeof y=="object"&&y!==null){var P=y.$$typeof;switch(P){case t:switch(y=y.type,y){case l:case u:case i:case o:case r:case d:return y;default:switch(y=y&&y.$$typeof,y){case a:case c:case g:case m:case s:return y;default:return P}}case n:return P}}}function k(y){return w(y)===u}return te.AsyncMode=l,te.ConcurrentMode=u,te.ContextConsumer=a,te.ContextProvider=s,te.Element=t,te.ForwardRef=c,te.Fragment=i,te.Lazy=g,te.Memo=m,te.Portal=n,te.Profiler=o,te.StrictMode=r,te.Suspense=d,te.isAsyncMode=function(y){return k(y)||w(y)===l},te.isConcurrentMode=k,te.isContextConsumer=function(y){return w(y)===a},te.isContextProvider=function(y){return w(y)===s},te.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===t},te.isForwardRef=function(y){return w(y)===c},te.isFragment=function(y){return w(y)===i},te.isLazy=function(y){return w(y)===g},te.isMemo=function(y){return w(y)===m},te.isPortal=function(y){return w(y)===n},te.isProfiler=function(y){return w(y)===o},te.isStrictMode=function(y){return w(y)===r},te.isSuspense=function(y){return w(y)===d},te.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===i||y===u||y===o||y===r||y===d||y===f||typeof y=="object"&&y!==null&&(y.$$typeof===g||y.$$typeof===m||y.$$typeof===s||y.$$typeof===a||y.$$typeof===c||y.$$typeof===b||y.$$typeof===h||y.$$typeof===T||y.$$typeof===v)},te.typeOf=w,te}var ne={};/** @license React v16.13.1
166
+ */var Eu;function Wx(){if(Eu)return oe;Eu=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,T=e?Symbol.for("react.scope"):60119;function w(b){if(typeof b=="object"&&b!==null){var C=b.$$typeof;switch(C){case t:switch(b=b.type,b){case l:case u:case i:case s:case r:case d:return b;default:switch(b=b&&b.$$typeof,b){case a:case c:case h:case m:case o:return b;default:return C}}case n:return C}}}function k(b){return w(b)===u}return oe.AsyncMode=l,oe.ConcurrentMode=u,oe.ContextConsumer=a,oe.ContextProvider=o,oe.Element=t,oe.ForwardRef=c,oe.Fragment=i,oe.Lazy=h,oe.Memo=m,oe.Portal=n,oe.Profiler=s,oe.StrictMode=r,oe.Suspense=d,oe.isAsyncMode=function(b){return k(b)||w(b)===l},oe.isConcurrentMode=k,oe.isContextConsumer=function(b){return w(b)===a},oe.isContextProvider=function(b){return w(b)===o},oe.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===t},oe.isForwardRef=function(b){return w(b)===c},oe.isFragment=function(b){return w(b)===i},oe.isLazy=function(b){return w(b)===h},oe.isMemo=function(b){return w(b)===m},oe.isPortal=function(b){return w(b)===n},oe.isProfiler=function(b){return w(b)===s},oe.isStrictMode=function(b){return w(b)===r},oe.isSuspense=function(b){return w(b)===d},oe.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===i||b===u||b===s||b===r||b===d||b===f||typeof b=="object"&&b!==null&&(b.$$typeof===h||b.$$typeof===m||b.$$typeof===o||b.$$typeof===a||b.$$typeof===c||b.$$typeof===y||b.$$typeof===v||b.$$typeof===T||b.$$typeof===g)},oe.typeOf=w,oe}var se={};/** @license React v16.13.1
167
167
  * react-is.development.js
168
168
  *
169
169
  * Copyright (c) Facebook, Inc. and its affiliates.
170
170
  *
171
171
  * This source code is licensed under the MIT license found in the
172
172
  * LICENSE file in the root directory of this source tree.
173
- */var Rc;function zv(){return Rc||(Rc=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,h=e?Symbol.for("react.responder"):60118,T=e?Symbol.for("react.scope"):60119;function w(D){return typeof D=="string"||typeof D=="function"||D===i||D===u||D===o||D===r||D===d||D===f||typeof D=="object"&&D!==null&&(D.$$typeof===g||D.$$typeof===m||D.$$typeof===s||D.$$typeof===a||D.$$typeof===c||D.$$typeof===b||D.$$typeof===h||D.$$typeof===T||D.$$typeof===v)}function k(D){if(typeof D=="object"&&D!==null){var ve=D.$$typeof;switch(ve){case t:var yt=D.type;switch(yt){case l:case u:case i:case o:case r:case d:return yt;default:var xn=yt&&yt.$$typeof;switch(xn){case a:case c:case g:case m:case s:return xn;default:return ve}}case n:return ve}}}var y=l,P=u,E=a,A=s,M=t,W=c,O=i,J=g,Y=m,F=n,ee=o,ie=r,X=d,q=!1;function Z(D){return q||(q=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),x(D)||k(D)===l}function x(D){return k(D)===u}function j(D){return k(D)===a}function I(D){return k(D)===s}function V(D){return typeof D=="object"&&D!==null&&D.$$typeof===t}function _(D){return k(D)===c}function z(D){return k(D)===i}function H(D){return k(D)===g}function $(D){return k(D)===m}function L(D){return k(D)===n}function G(D){return k(D)===o}function Q(D){return k(D)===r}function de(D){return k(D)===d}ne.AsyncMode=y,ne.ConcurrentMode=P,ne.ContextConsumer=E,ne.ContextProvider=A,ne.Element=M,ne.ForwardRef=W,ne.Fragment=O,ne.Lazy=J,ne.Memo=Y,ne.Portal=F,ne.Profiler=ee,ne.StrictMode=ie,ne.Suspense=X,ne.isAsyncMode=Z,ne.isConcurrentMode=x,ne.isContextConsumer=j,ne.isContextProvider=I,ne.isElement=V,ne.isForwardRef=_,ne.isFragment=z,ne.isLazy=H,ne.isMemo=$,ne.isPortal=L,ne.isProfiler=G,ne.isStrictMode=Q,ne.isSuspense=de,ne.isValidElementType=w,ne.typeOf=k})()),ne}var Oc;function Mc(){return Oc||(Oc=1,process.env.NODE_ENV==="production"?Qn.exports=Lv():Qn.exports=zv()),Qn.exports}/*
173
+ */var ju;function Ux(){return ju||(ju=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,T=e?Symbol.for("react.scope"):60119;function w(B){return typeof B=="string"||typeof B=="function"||B===i||B===u||B===s||B===r||B===d||B===f||typeof B=="object"&&B!==null&&(B.$$typeof===h||B.$$typeof===m||B.$$typeof===o||B.$$typeof===a||B.$$typeof===c||B.$$typeof===y||B.$$typeof===v||B.$$typeof===T||B.$$typeof===g)}function k(B){if(typeof B=="object"&&B!==null){var we=B.$$typeof;switch(we){case t:var Ye=B.type;switch(Ye){case l:case u:case i:case s:case r:case d:return Ye;default:var xt=Ye&&Ye.$$typeof;switch(xt){case a:case c:case h:case m:case o:return xt;default:return we}}case n:return we}}}var b=l,C=u,R=a,E=o,I=t,_=c,N=i,Z=h,H=m,W=n,J=s,U=r,L=d,V=!1;function G(B){return V||(V=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),x(B)||k(B)===l}function x(B){return k(B)===u}function P(B){return k(B)===a}function D(B){return k(B)===o}function M(B){return typeof B=="object"&&B!==null&&B.$$typeof===t}function z(B){return k(B)===c}function K(B){return k(B)===i}function X(B){return k(B)===h}function A(B){return k(B)===m}function F(B){return k(B)===n}function Q(B){return k(B)===s}function ee(B){return k(B)===r}function he(B){return k(B)===d}se.AsyncMode=b,se.ConcurrentMode=C,se.ContextConsumer=R,se.ContextProvider=E,se.Element=I,se.ForwardRef=_,se.Fragment=N,se.Lazy=Z,se.Memo=H,se.Portal=W,se.Profiler=J,se.StrictMode=U,se.Suspense=L,se.isAsyncMode=G,se.isConcurrentMode=x,se.isContextConsumer=P,se.isContextProvider=D,se.isElement=M,se.isForwardRef=z,se.isFragment=K,se.isLazy=X,se.isMemo=A,se.isPortal=F,se.isProfiler=Q,se.isStrictMode=ee,se.isSuspense=he,se.isValidElementType=w,se.typeOf=k})()),se}var Cu;function Pu(){return Cu||(Cu=1,process.env.NODE_ENV==="production"?Fi.exports=Wx():Fi.exports=Ux()),Fi.exports}/*
174
174
  object-assign
175
175
  (c) Sindre Sorhus
176
176
  @license MIT
177
- */var Qr,Ic;function Bv(){if(Ic)return Qr;Ic=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function i(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function r(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var s={},a=0;a<10;a++)s["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(s).map(function(c){return s[c]});if(l.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(c){u[c]=c}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Qr=r()?Object.assign:function(o,s){for(var a,l=i(o),u,c=1;c<arguments.length;c++){a=Object(arguments[c]);for(var d in a)t.call(a,d)&&(l[d]=a[d]);if(e){u=e(a);for(var f=0;f<u.length;f++)n.call(a,u[f])&&(l[u[f]]=a[u[f]])}}return l},Qr}var eo,Nc;function to(){if(Nc)return eo;Nc=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return eo=e,eo}var no,Fc;function Vc(){return Fc||(Fc=1,no=Function.call.bind(Object.prototype.hasOwnProperty)),no}var io,_c;function $v(){if(_c)return io;_c=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=to(),n={},i=Vc();e=function(o){var s="Warning: "+o;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function r(o,s,a,l,u){if(process.env.NODE_ENV!=="production"){for(var c in o)if(i(o,c)){var d;try{if(typeof o[c]!="function"){var f=Error((l||"React class")+": "+a+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}d=o[c](s,c,l,a,null,t)}catch(g){d=g}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+a+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var m=u?u():"";e("Failed "+a+" type: "+d.message+(m??""))}}}}return r.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},io=r,io}var ro,Lc;function Wv(){if(Lc)return ro;Lc=1;var e=Mc(),t=Bv(),n=to(),i=Vc(),r=$v(),o=function(){};process.env.NODE_ENV!=="production"&&(o=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function s(){return null}return ro=function(a,l){var u=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function d(x){var j=x&&(u&&x[u]||x[c]);if(typeof j=="function")return j}var f="<<anonymous>>",m={array:h("array"),bigint:h("bigint"),bool:h("boolean"),func:h("function"),number:h("number"),object:h("object"),string:h("string"),symbol:h("symbol"),any:T(),arrayOf:w,element:k(),elementType:y(),instanceOf:P,node:W(),objectOf:A,oneOf:E,oneOfType:M,shape:J,exact:Y};function g(x,j){return x===j?x!==0||1/x===1/j:x!==x&&j!==j}function v(x,j){this.message=x,this.data=j&&typeof j=="object"?j:{},this.stack=""}v.prototype=Error.prototype;function b(x){if(process.env.NODE_ENV!=="production")var j={},I=0;function V(z,H,$,L,G,Q,de){if(L=L||f,Q=Q||$,de!==n){if(l){var D=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw D.name="Invariant Violation",D}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ve=L+":"+$;!j[ve]&&I<3&&(o("You are manually calling a React.PropTypes validation function for the `"+Q+"` prop on `"+L+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),j[ve]=!0,I++)}}return H[$]==null?z?H[$]===null?new v("The "+G+" `"+Q+"` is marked as required "+("in `"+L+"`, but its value is `null`.")):new v("The "+G+" `"+Q+"` is marked as required in "+("`"+L+"`, but its value is `undefined`.")):null:x(H,$,L,G,Q)}var _=V.bind(null,!1);return _.isRequired=V.bind(null,!0),_}function h(x){function j(I,V,_,z,H,$){var L=I[V],G=ie(L);if(G!==x){var Q=X(L);return new v("Invalid "+z+" `"+H+"` of type "+("`"+Q+"` supplied to `"+_+"`, expected ")+("`"+x+"`."),{expectedType:x})}return null}return b(j)}function T(){return b(s)}function w(x){function j(I,V,_,z,H){if(typeof x!="function")return new v("Property `"+H+"` of component `"+_+"` has invalid PropType notation inside arrayOf.");var $=I[V];if(!Array.isArray($)){var L=ie($);return new v("Invalid "+z+" `"+H+"` of type "+("`"+L+"` supplied to `"+_+"`, expected an array."))}for(var G=0;G<$.length;G++){var Q=x($,G,_,z,H+"["+G+"]",n);if(Q instanceof Error)return Q}return null}return b(j)}function k(){function x(j,I,V,_,z){var H=j[I];if(!a(H)){var $=ie(H);return new v("Invalid "+_+" `"+z+"` of type "+("`"+$+"` supplied to `"+V+"`, expected a single ReactElement."))}return null}return b(x)}function y(){function x(j,I,V,_,z){var H=j[I];if(!e.isValidElementType(H)){var $=ie(H);return new v("Invalid "+_+" `"+z+"` of type "+("`"+$+"` supplied to `"+V+"`, expected a single ReactElement type."))}return null}return b(x)}function P(x){function j(I,V,_,z,H){if(!(I[V]instanceof x)){var $=x.name||f,L=Z(I[V]);return new v("Invalid "+z+" `"+H+"` of type "+("`"+L+"` supplied to `"+_+"`, expected ")+("instance of `"+$+"`."))}return null}return b(j)}function E(x){if(!Array.isArray(x))return process.env.NODE_ENV!=="production"&&(arguments.length>1?o("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):o("Invalid argument supplied to oneOf, expected an array.")),s;function j(I,V,_,z,H){for(var $=I[V],L=0;L<x.length;L++)if(g($,x[L]))return null;var G=JSON.stringify(x,function(de,D){var ve=X(D);return ve==="symbol"?String(D):D});return new v("Invalid "+z+" `"+H+"` of value `"+String($)+"` "+("supplied to `"+_+"`, expected one of "+G+"."))}return b(j)}function A(x){function j(I,V,_,z,H){if(typeof x!="function")return new v("Property `"+H+"` of component `"+_+"` has invalid PropType notation inside objectOf.");var $=I[V],L=ie($);if(L!=="object")return new v("Invalid "+z+" `"+H+"` of type "+("`"+L+"` supplied to `"+_+"`, expected an object."));for(var G in $)if(i($,G)){var Q=x($,G,_,z,H+"."+G,n);if(Q instanceof Error)return Q}return null}return b(j)}function M(x){if(!Array.isArray(x))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var j=0;j<x.length;j++){var I=x[j];if(typeof I!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+q(I)+" at index "+j+"."),s}function V(_,z,H,$,L){for(var G=[],Q=0;Q<x.length;Q++){var de=x[Q],D=de(_,z,H,$,L,n);if(D==null)return null;D.data&&i(D.data,"expectedType")&&G.push(D.data.expectedType)}var ve=G.length>0?", expected one of type ["+G.join(", ")+"]":"";return new v("Invalid "+$+" `"+L+"` supplied to "+("`"+H+"`"+ve+"."))}return b(V)}function W(){function x(j,I,V,_,z){return F(j[I])?null:new v("Invalid "+_+" `"+z+"` supplied to "+("`"+V+"`, expected a ReactNode."))}return b(x)}function O(x,j,I,V,_){return new v((x||"React class")+": "+j+" type `"+I+"."+V+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+_+"`.")}function J(x){function j(I,V,_,z,H){var $=I[V],L=ie($);if(L!=="object")return new v("Invalid "+z+" `"+H+"` of type `"+L+"` "+("supplied to `"+_+"`, expected `object`."));for(var G in x){var Q=x[G];if(typeof Q!="function")return O(_,z,H,G,X(Q));var de=Q($,G,_,z,H+"."+G,n);if(de)return de}return null}return b(j)}function Y(x){function j(I,V,_,z,H){var $=I[V],L=ie($);if(L!=="object")return new v("Invalid "+z+" `"+H+"` of type `"+L+"` "+("supplied to `"+_+"`, expected `object`."));var G=t({},I[V],x);for(var Q in G){var de=x[Q];if(i(x,Q)&&typeof de!="function")return O(_,z,H,Q,X(de));if(!de)return new v("Invalid "+z+" `"+H+"` key `"+Q+"` supplied to `"+_+"`.\nBad object: "+JSON.stringify(I[V],null," ")+`
178
- Valid keys: `+JSON.stringify(Object.keys(x),null," "));var D=de($,Q,_,z,H+"."+Q,n);if(D)return D}return null}return b(j)}function F(x){switch(typeof x){case"number":case"string":case"undefined":return!0;case"boolean":return!x;case"object":if(Array.isArray(x))return x.every(F);if(x===null||a(x))return!0;var j=d(x);if(j){var I=j.call(x),V;if(j!==x.entries){for(;!(V=I.next()).done;)if(!F(V.value))return!1}else for(;!(V=I.next()).done;){var _=V.value;if(_&&!F(_[1]))return!1}}else return!1;return!0;default:return!1}}function ee(x,j){return x==="symbol"?!0:j?j["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&j instanceof Symbol:!1}function ie(x){var j=typeof x;return Array.isArray(x)?"array":x instanceof RegExp?"object":ee(j,x)?"symbol":j}function X(x){if(typeof x>"u"||x===null)return""+x;var j=ie(x);if(j==="object"){if(x instanceof Date)return"date";if(x instanceof RegExp)return"regexp"}return j}function q(x){var j=X(x);switch(j){case"array":case"object":return"an "+j;case"boolean":case"date":case"regexp":return"a "+j;default:return j}}function Z(x){return!x.constructor||!x.constructor.name?f:x.constructor.name}return m.checkPropTypes=r,m.resetWarningCache=r.resetWarningCache,m.PropTypes=m,m},ro}var oo,zc;function Uv(){if(zc)return oo;zc=1;var e=to();function t(){}function n(){}return n.resetWarningCache=t,oo=function(){function i(s,a,l,u,c,d){if(d!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}i.isRequired=i;function r(){return i}var o={array:i,bigint:i,bool:i,func:i,number:i,object:i,string:i,symbol:i,any:i,arrayOf:r,element:i,elementType:i,instanceOf:r,node:i,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o},oo}var Bc;function qv(){if(Bc)return Jn.exports;if(Bc=1,process.env.NODE_ENV!=="production"){var e=Mc(),t=!0;Jn.exports=Wv()(e.isElement,t)}else Jn.exports=Uv()();return Jn.exports}var Hv=qv();const re=Ao(Hv);function vt(e,t,n,i){function r(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(e,t||[])).next())})}typeof SuppressedError=="function"&&SuppressedError;const Kv=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function zt(e,t,n){const i=Yv(e),{webkitRelativePath:r}=e,o=typeof t=="string"?t:typeof r=="string"&&r.length>0?r:`./${e.name}`;return typeof i.path!="string"&&$c(i,"path",o),$c(i,"relativePath",o),i}function Yv(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const i=t.split(".").pop().toLowerCase(),r=Kv.get(i);r&&Object.defineProperty(e,"type",{value:r,writable:!1,configurable:!1,enumerable:!0})}return e}function $c(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const Gv=[".DS_Store","Thumbs.db"];function Xv(e){return vt(this,void 0,void 0,function*(){return ei(e)&&Zv(e.dataTransfer)?tx(e.dataTransfer,e.type):Jv(e)?Qv(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?ex(e):[]})}function Zv(e){return ei(e)}function Jv(e){return ei(e)&&ei(e.target)}function ei(e){return typeof e=="object"&&e!==null}function Qv(e){return so(e.target.files).map(t=>zt(t))}function ex(e){return vt(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>zt(n))})}function tx(e,t){return vt(this,void 0,void 0,function*(){if(e.items){const n=so(e.items).filter(r=>r.kind==="file");if(t!=="drop")return n;const i=yield Promise.all(n.map(nx));return Wc(Uc(i))}return Wc(so(e.files).map(n=>zt(n)))})}function Wc(e){return e.filter(t=>Gv.indexOf(t.name)===-1)}function so(e){if(e===null)return[];const t=[];for(let n=0;n<e.length;n++){const i=e[n];t.push(i)}return t}function nx(e){if(typeof e.webkitGetAsEntry!="function")return qc(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?Hc(t):qc(e,t)}function Uc(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?Uc(n):[n]],[])}function qc(e,t){return vt(this,void 0,void 0,function*(){var n;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const o=yield e.getAsFileSystemHandle();if(o===null)throw new Error(`${e} is not a File`);if(o!==void 0){const s=yield o.getFile();return s.handle=o,zt(s)}}const i=e.getAsFile();if(!i)throw new Error(`${e} is not a File`);return zt(i,(n=t?.fullPath)!==null&&n!==void 0?n:void 0)})}function ix(e){return vt(this,void 0,void 0,function*(){return e.isDirectory?Hc(e):rx(e)})}function Hc(e){const t=e.createReader();return new Promise((n,i)=>{const r=[];function o(){t.readEntries(s=>vt(this,void 0,void 0,function*(){if(s.length){const a=Promise.all(s.map(ix));r.push(a),o()}else try{const a=yield Promise.all(r);n(a)}catch(a){i(a)}}),s=>{i(s)})}o()})}function rx(e){return vt(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(i=>{const r=zt(i,e.fullPath);t(r)},i=>{n(i)})})})}var ti={},Kc;function ox(){return Kc||(Kc=1,ti.__esModule=!0,ti.default=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var i=e.name||"",r=(e.type||"").toLowerCase(),o=r.replace(/\/.*$/,"");return n.some(function(s){var a=s.trim().toLowerCase();return a.charAt(0)==="."?i.toLowerCase().endsWith(a):a.endsWith("/*")?o===a.replace(/\/.*$/,""):r===a})}return!0}),ti}var sx=ox();const ao=Ao(sx);function Yc(e){return cx(e)||lx(e)||Jc(e)||ax()}function ax(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
179
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lx(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function cx(e){if(Array.isArray(e))return lo(e)}function Gc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,i)}return n}function Xc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Gc(Object(n),!0).forEach(function(i){Zc(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gc(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Zc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hn(e,t){return px(e)||dx(e,t)||Jc(e,t)||ux()}function ux(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
180
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jc(e,t){if(e){if(typeof e=="string")return lo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return lo(e,t)}}function lo(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function dx(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i=[],r=!0,o=!1,s,a;try{for(n=n.call(e);!(r=(s=n.next()).done)&&(i.push(s.value),!(t&&i.length===t));r=!0);}catch(l){o=!0,a=l}finally{try{!r&&n.return!=null&&n.return()}finally{if(o)throw a}}return i}}function px(e){if(Array.isArray(e))return e}var fx=typeof ao=="function"?ao:ao.default,mx="file-invalid-type",hx="file-too-large",gx="file-too-small",vx="too-many-files",xx=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=t.split(","),i=n.length>1?"one of ".concat(n.join(", ")):n[0];return{code:mx,message:"File type must be ".concat(i)}},Qc=function(t){return{code:hx,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},eu=function(t){return{code:gx,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},yx={code:vx,message:"Too many files"};function bx(e){return e.type===""&&typeof e.getAsFile=="function"}function tu(e,t){var n=e.type==="application/x-moz-file"||fx(e,t)||bx(e);return[n,n?null:xx(t)]}function nu(e,t,n){if(xt(e.size))if(xt(t)&&xt(n)){if(e.size>n)return[!1,Qc(n)];if(e.size<t)return[!1,eu(t)]}else{if(xt(t)&&e.size<t)return[!1,eu(t)];if(xt(n)&&e.size>n)return[!1,Qc(n)]}return[!0,null]}function xt(e){return e!=null}function wx(e){var t=e.files,n=e.accept,i=e.minSize,r=e.maxSize,o=e.multiple,s=e.maxFiles,a=e.validator;return!o&&t.length>1||o&&s>=1&&t.length>s?!1:t.every(function(l){var u=tu(l,n),c=hn(u,1),d=c[0],f=nu(l,i,r),m=hn(f,1),g=m[0],v=a?a(l):null;return d&&g&&!v})}function ni(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function gn(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function iu(e){e.preventDefault()}function Tx(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function Sx(e){return e.indexOf("Edge/")!==-1}function kx(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return Tx(e)||Sx(e)}function Be(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(i){for(var r=arguments.length,o=new Array(r>1?r-1:0),s=1;s<r;s++)o[s-1]=arguments[s];return t.some(function(a){return!ni(i)&&a&&a.apply(void 0,[i].concat(o)),ni(i)})}}function jx(){return"showOpenFilePicker"in window}function Ex(e){if(xt(e)){var t=Object.entries(e).filter(function(n){var i=hn(n,2),r=i[0],o=i[1],s=!0;return ru(r)||(console.warn('Skipped "'.concat(r,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),s=!1),(!Array.isArray(o)||!o.every(ou))&&(console.warn('Skipped "'.concat(r,'" because an invalid file extension was provided.')),s=!1),s}).reduce(function(n,i){var r=hn(i,2),o=r[0],s=r[1];return Xc(Xc({},n),{},Zc({},o,s))},{});return[{description:"Files",accept:t}]}return e}function Cx(e){if(xt(e))return Object.entries(e).reduce(function(t,n){var i=hn(n,2),r=i[0],o=i[1];return[].concat(Yc(t),[r],Yc(o))},[]).filter(function(t){return ru(t)||ou(t)}).join(",")}function Px(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function Ax(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function ru(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function ou(e){return/^.*\.[\w]+$/.test(e)}var Dx=["children"],Rx=["open"],Ox=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],Mx=["refKey","onChange","onClick"];function su(e){return Fx(e)||Nx(e)||au(e)||Ix()}function Ix(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
181
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nx(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Fx(e){if(Array.isArray(e))return uo(e)}function co(e,t){return Lx(e)||_x(e,t)||au(e,t)||Vx()}function Vx(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
182
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function au(e,t){if(e){if(typeof e=="string")return uo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return uo(e,t)}}function uo(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function _x(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i=[],r=!0,o=!1,s,a;try{for(n=n.call(e);!(r=(s=n.next()).done)&&(i.push(s.value),!(t&&i.length===t));r=!0);}catch(l){o=!0,a=l}finally{try{!r&&n.return!=null&&n.return()}finally{if(o)throw a}}return i}}function Lx(e){if(Array.isArray(e))return e}function lu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,i)}return n}function oe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lu(Object(n),!0).forEach(function(i){po(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lu(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function po(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ii(e,t){if(e==null)return{};var n=zx(e,t),i,r;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)i=o[r],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function zx(e,t){if(e==null)return{};var n={},i=Object.keys(e),r,o;for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}var fo=S.forwardRef(function(e,t){var n=e.children,i=ii(e,Dx),r=ho(i),o=r.open,s=ii(r,Rx);return S.useImperativeHandle(t,function(){return{open:o}},[o]),S.createElement(S.Fragment,null,n(oe(oe({},s),{},{open:o})))});fo.displayName="Dropzone";var cu={disabled:!1,getFilesFromEvent:Xv,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};fo.defaultProps=cu,fo.propTypes={children:re.func,accept:re.objectOf(re.arrayOf(re.string)),multiple:re.bool,preventDropOnDocument:re.bool,noClick:re.bool,noKeyboard:re.bool,noDrag:re.bool,noDragEventsBubbling:re.bool,minSize:re.number,maxSize:re.number,maxFiles:re.number,disabled:re.bool,getFilesFromEvent:re.func,onFileDialogCancel:re.func,onFileDialogOpen:re.func,useFsAccessApi:re.bool,autoFocus:re.bool,onDragEnter:re.func,onDragLeave:re.func,onDragOver:re.func,onDrop:re.func,onDropAccepted:re.func,onDropRejected:re.func,onError:re.func,validator:re.func};var mo={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,isDragGlobal:!1,acceptedFiles:[],fileRejections:[]};function ho(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=oe(oe({},cu),e),n=t.accept,i=t.disabled,r=t.getFilesFromEvent,o=t.maxSize,s=t.minSize,a=t.multiple,l=t.maxFiles,u=t.onDragEnter,c=t.onDragLeave,d=t.onDragOver,f=t.onDrop,m=t.onDropAccepted,g=t.onDropRejected,v=t.onFileDialogCancel,b=t.onFileDialogOpen,h=t.useFsAccessApi,T=t.autoFocus,w=t.preventDropOnDocument,k=t.noClick,y=t.noKeyboard,P=t.noDrag,E=t.noDragEventsBubbling,A=t.onError,M=t.validator,W=S.useMemo(function(){return Cx(n)},[n]),O=S.useMemo(function(){return Ex(n)},[n]),J=S.useMemo(function(){return typeof b=="function"?b:uu},[b]),Y=S.useMemo(function(){return typeof v=="function"?v:uu},[v]),F=S.useRef(null),ee=S.useRef(null),ie=S.useReducer(Bx,mo),X=co(ie,2),q=X[0],Z=X[1],x=q.isFocused,j=q.isFileDialogActive,I=S.useRef(typeof window<"u"&&window.isSecureContext&&h&&jx()),V=function(){!I.current&&j&&setTimeout(function(){if(ee.current){var U=ee.current.files;U.length||(Z({type:"closeDialog"}),Y())}},300)};S.useEffect(function(){return window.addEventListener("focus",V,!1),function(){window.removeEventListener("focus",V,!1)}},[ee,j,Y,I]);var _=S.useRef([]),z=S.useRef([]),H=function(U){F.current&&F.current.contains(U.target)||(U.preventDefault(),_.current=[])};S.useEffect(function(){return w&&(document.addEventListener("dragover",iu,!1),document.addEventListener("drop",H,!1)),function(){w&&(document.removeEventListener("dragover",iu),document.removeEventListener("drop",H))}},[F,w]),S.useEffect(function(){var R=function($e){z.current=[].concat(su(z.current),[$e.target]),gn($e)&&Z({isDragGlobal:!0,type:"setDragGlobal"})},U=function($e){z.current=z.current.filter(function(Ge){return Ge!==$e.target&&Ge!==null}),!(z.current.length>0)&&Z({isDragGlobal:!1,type:"setDragGlobal"})},ce=function(){z.current=[],Z({isDragGlobal:!1,type:"setDragGlobal"})},me=function(){z.current=[],Z({isDragGlobal:!1,type:"setDragGlobal"})};return document.addEventListener("dragenter",R,!1),document.addEventListener("dragleave",U,!1),document.addEventListener("dragend",ce,!1),document.addEventListener("drop",me,!1),function(){document.removeEventListener("dragenter",R),document.removeEventListener("dragleave",U),document.removeEventListener("dragend",ce),document.removeEventListener("drop",me)}},[F]),S.useEffect(function(){return!i&&T&&F.current&&F.current.focus(),function(){}},[F,T,i]);var $=S.useCallback(function(R){A?A(R):console.error(R)},[A]),L=S.useCallback(function(R){R.preventDefault(),R.persist(),oi(R),_.current=[].concat(su(_.current),[R.target]),gn(R)&&Promise.resolve(r(R)).then(function(U){if(!(ni(R)&&!E)){var ce=U.length,me=ce>0&&wx({files:U,accept:W,minSize:s,maxSize:o,multiple:a,maxFiles:l,validator:M}),xe=ce>0&&!me;Z({isDragAccept:me,isDragReject:xe,isDragActive:!0,type:"setDraggedFiles"}),u&&u(R)}}).catch(function(U){return $(U)})},[r,u,$,E,W,s,o,a,l,M]),G=S.useCallback(function(R){R.preventDefault(),R.persist(),oi(R);var U=gn(R);if(U&&R.dataTransfer)try{R.dataTransfer.dropEffect="copy"}catch{}return U&&d&&d(R),!1},[d,E]),Q=S.useCallback(function(R){R.preventDefault(),R.persist(),oi(R);var U=_.current.filter(function(me){return F.current&&F.current.contains(me)}),ce=U.indexOf(R.target);ce!==-1&&U.splice(ce,1),_.current=U,!(U.length>0)&&(Z({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),gn(R)&&c&&c(R))},[F,c,E]),de=S.useCallback(function(R,U){var ce=[],me=[];R.forEach(function(xe){var $e=tu(xe,W),Ge=co($e,2),bo=Ge[0],wo=Ge[1],To=nu(xe,s,o),si=co(To,2),So=si[0],ko=si[1],jo=M?M(xe):null;if(bo&&So&&!jo)ce.push(xe);else{var Eo=[wo,ko];jo&&(Eo=Eo.concat(jo)),me.push({file:xe,errors:Eo.filter(function(Ty){return Ty})})}}),(!a&&ce.length>1||a&&l>=1&&ce.length>l)&&(ce.forEach(function(xe){me.push({file:xe,errors:[yx]})}),ce.splice(0)),Z({acceptedFiles:ce,fileRejections:me,type:"setFiles"}),f&&f(ce,me,U),me.length>0&&g&&g(me,U),ce.length>0&&m&&m(ce,U)},[Z,a,W,s,o,l,f,m,g,M]),D=S.useCallback(function(R){R.preventDefault(),R.persist(),oi(R),_.current=[],gn(R)&&Promise.resolve(r(R)).then(function(U){ni(R)&&!E||de(U,R)}).catch(function(U){return $(U)}),Z({type:"reset"})},[r,de,$,E]),ve=S.useCallback(function(){if(I.current){Z({type:"openDialog"}),J();var R={multiple:a,types:O};window.showOpenFilePicker(R).then(function(U){return r(U)}).then(function(U){de(U,null),Z({type:"closeDialog"})}).catch(function(U){Px(U)?(Y(U),Z({type:"closeDialog"})):Ax(U)?(I.current=!1,ee.current?(ee.current.value=null,ee.current.click()):$(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):$(U)});return}ee.current&&(Z({type:"openDialog"}),J(),ee.current.value=null,ee.current.click())},[Z,J,Y,h,de,$,O,a]),yt=S.useCallback(function(R){!F.current||!F.current.isEqualNode(R.target)||(R.key===" "||R.key==="Enter"||R.keyCode===32||R.keyCode===13)&&(R.preventDefault(),ve())},[F,ve]),xn=S.useCallback(function(){Z({type:"focus"})},[]),bu=S.useCallback(function(){Z({type:"blur"})},[]),wu=S.useCallback(function(){k||(kx()?setTimeout(ve,0):ve())},[k,ve]),$t=function(U){return i?null:U},yo=function(U){return y?null:$t(U)},ri=function(U){return P?null:$t(U)},oi=function(U){E&&U.stopPropagation()},yy=S.useMemo(function(){return function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},U=R.refKey,ce=U===void 0?"ref":U,me=R.role,xe=R.onKeyDown,$e=R.onFocus,Ge=R.onBlur,bo=R.onClick,wo=R.onDragEnter,To=R.onDragOver,si=R.onDragLeave,So=R.onDrop,ko=ii(R,Ox);return oe(oe(po({onKeyDown:yo(Be(xe,yt)),onFocus:yo(Be($e,xn)),onBlur:yo(Be(Ge,bu)),onClick:$t(Be(bo,wu)),onDragEnter:ri(Be(wo,L)),onDragOver:ri(Be(To,G)),onDragLeave:ri(Be(si,Q)),onDrop:ri(Be(So,D)),role:typeof me=="string"&&me!==""?me:"presentation"},ce,F),!i&&!y?{tabIndex:0}:{}),ko)}},[F,yt,xn,bu,wu,L,G,Q,D,y,P,i]),by=S.useCallback(function(R){R.stopPropagation()},[]),wy=S.useMemo(function(){return function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},U=R.refKey,ce=U===void 0?"ref":U,me=R.onChange,xe=R.onClick,$e=ii(R,Mx),Ge=po({accept:W,multiple:a,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:$t(Be(me,D)),onClick:$t(Be(xe,by)),tabIndex:-1},ce,ee);return oe(oe({},Ge),$e)}},[ee,n,a,D,i]);return oe(oe({},q),{},{isFocused:x&&!i,getRootProps:yy,getInputProps:wy,rootRef:F,inputRef:ee,open:$t(ve)})}function Bx(e,t){switch(t.type){case"focus":return oe(oe({},e),{},{isFocused:!0});case"blur":return oe(oe({},e),{},{isFocused:!1});case"openDialog":return oe(oe({},mo),{},{isFileDialogActive:!0});case"closeDialog":return oe(oe({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return oe(oe({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return oe(oe({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:!1});case"setDragGlobal":return oe(oe({},e),{},{isDragGlobal:t.isDragGlobal});case"reset":return oe({},mo);default:return e}}function uu(){}const $x={sm:"h-7",md:"h-8",lg:"h-10"},Wx={sm:"px-2.5",md:"px-3",lg:"px-4"},Ux={sm:"text-xs",md:"text-sm",lg:"text-sm"},qx=e=>{const{label:t,description:n,error:i,placeholder:r="No file chosen",buttonText:o="Choose",Icon:s=Oh,size:a="md",value:l,isUploaded:u=!1,isUploading:c=!1,onChange:d,onDropRejected:f,accept:m,maxSize:g,minSize:v,disabled:b=!1,className:h}=e,T=async M=>{const[W]=M;W&&await d?.(W)},{getRootProps:w,getInputProps:k,open:y,isDragActive:P,isFocused:E}=ho({multiple:!1,accept:m,maxSize:g,minSize:v,disabled:b,onDrop:T,onDropRejected:f}),A=l?.name;return p.jsx(Ke.Provider,{value:a,children:p.jsxs("div",{className:N("flex flex-col",h),children:[p.jsx(Ve,{children:t}),p.jsxs("div",{...w({className:N("flex flex-row items-center","border input-base rounded-xl shadow-sm transition-all duration-150","ring-0 focus:outline-none",(E||P)&&"ring-4",i&&"input-error",b&&"opacity-60 cursor-not-allowed",et[a],ut[a],"gap-3")}),children:[p.jsx("input",{...k()}),p.jsx(s,{className:N("input-icon shrink-0",pt[a])}),p.jsx("span",{className:N("flex-1 truncate",qe[a],!A&&"text-[var(--color-input-placeholder)]"),children:A??r}),i&&p.jsx(He,{}),c&&!i&&p.jsx("div",{className:"h-5 w-5 flex items-center justify-center",children:p.jsx(It,{className:"h-4 w-4 text-[var(--color-input-icon)]"})}),u&&!c&&!i&&p.jsx("div",{className:"h-5 w-5",children:p.jsx(Dr,{className:"h-5 w-5 text-[var(--color-status-success)]"})}),p.jsx("button",{type:"button",disabled:b,onClick:M=>{M.stopPropagation(),y()},className:N("inline-flex flex-row items-center justify-center shrink-0","border button-white shadow-sm rounded-[calc(var(--border-radius-input)-0.25rem)]","font-semibold cursor-pointer select-none transition-all duration-150","button-ring ring-0 hover:ring-4 active:ring-1 focus:outline-none focus:ring-4","disabled:cursor-default","mr-1.5",$x[a],Wx[a],Ux[a]),children:o})]}),p.jsx(Se,{children:n}),p.jsx(ke,{children:i})]})})},Hx=e=>e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:e<1024*1024*1024?`${(e/(1024*1024)).toFixed(1)} MB`:`${(e/(1024*1024*1024)).toFixed(1)} GB`,du=e=>{const{file:t,isUploaded:n=!1,isUploading:i=!1,error:r,onRemove:o,className:s}=e,a=i||n||!!r;return p.jsxs("div",{className:N("flex flex-row items-center gap-3","border input-base rounded-xl shadow-sm","pl-4 pr-1 py-1",r&&"input-error",s),children:[a&&p.jsx("div",{className:"shrink-0 h-5 w-5 flex items-center justify-center",children:r?p.jsx(Rr,{className:"h-5 w-5 input-error-icon"}):i?p.jsx(It,{className:"h-4 w-4 text-[var(--color-input-icon)]"}):p.jsx(Dr,{className:"h-5 w-5 text-[var(--color-status-success)]"})}),p.jsx("div",{className:"flex-1 min-w-0 font-medium truncate",children:t.name}),p.jsx("div",{className:"shrink-0 text-sm text-[var(--color-input-description-text)]",children:Hx(t.size)}),o&&p.jsx(_n,{variant:"transparent",size:"sm",Icon:ft,onClick:o,"aria-label":"Remove file",className:"shrink-0"})]})},Kx=e=>{const{label:t,description:n,error:i,title:r="Drop files here",hint:o,Icon:s=Ah,onUpload:a,onFileRemoved:l,onDropRejected:u,renderFileTile:c,accept:d,maxSize:f,minSize:m,maxFiles:g,disabled:v=!1,className:b}=e,[h,T]=S.useState([]),w=S.useRef(0),k=(O,J)=>{T(Y=>Y.map(F=>F.id===O?{...F,...J}:F))},y=O=>{if(O.length===0)return;const J=O.map(Y=>({id:String(++w.current),file:Y,status:a?"uploading":"idle"}));if(T(Y=>[...Y,...J]),!!a)for(const Y of J)Promise.resolve().then(()=>a(Y.file)).then(()=>k(Y.id,{status:"uploaded"})).catch(F=>{k(Y.id,{status:"error",error:F instanceof Error?F:new Error(String(F))})})},P=O=>{const J=h.find(Y=>Y.id===O);T(Y=>Y.filter(F=>F.id!==O)),J&&l?.(J.file)},{getRootProps:E,getInputProps:A,isDragActive:M,isFocused:W}=ho({multiple:!0,accept:d,maxSize:f,minSize:m,maxFiles:g,disabled:v,onDrop:y,onDropRejected:u});return p.jsxs("div",{className:N("flex flex-col",b),children:[p.jsx(Ve,{children:t}),p.jsxs("div",{...E({className:N("flex flex-col items-center justify-center gap-1","border-2 border-dashed input-base rounded-xl bg-transparent!","py-10 px-6 cursor-pointer transition-all duration-150","ring-0 focus:outline-none",(W||M)&&"ring-4",i&&"input-error",v&&"opacity-60 cursor-not-allowed")}),children:[p.jsx("input",{...A()}),p.jsx("div",{className:"h-14 w-14 rounded-xl flex items-center justify-center bg-[var(--color-input-file-icon-bg)] mb-2",children:p.jsx(s,{className:"h-7 w-7 input-icon"})}),p.jsx("div",{className:"text-base font-semibold",children:r}),o&&p.jsx("div",{className:"text-sm text-[var(--color-input-description-text)] ",children:o})]}),h.length>0&&p.jsx("div",{className:"flex flex-col gap-2 mt-3",children:h.map(O=>{const J={file:O.file,isUploading:O.status==="uploading",isUploaded:O.status==="uploaded",error:O.status==="error"?O.error?.message:void 0,onRemove:()=>P(O.id)};return p.jsx(C.Fragment,{children:c?c(O.file,J):p.jsx(du,{...J})},O.id)})}),p.jsx(Se,{children:n}),p.jsx(ke,{children:i})]})},Yx=e=>{const{className:t,label:n,description:i,options:r,error:o,size:s="md",...a}=e;return p.jsx(Ke.Provider,{value:s,children:p.jsxs("div",{className:N("flex flex-col",t),children:[p.jsx(Ve,{children:n}),p.jsxs("div",{className:"relative flex w-full flex-col",children:[p.jsx("select",{className:N("appearance-none border input-base bg-none transition-all duration-150 rounded-xl shadow-sm ring-0 focus:ring-4 focus:outline-none",et[s],qe[s],ut[s],dt[s]),...a,children:r&&r.map((l,u)=>p.jsx("option",{value:l.value,disabled:l.disabled,children:l.label},u))}),p.jsxs(tt,{children:[o&&p.jsx(He,{}),p.jsx(Ye,{Icon:cn})]})]}),p.jsx(Se,{children:i}),p.jsx(ke,{children:o})]})})},vn=e=>{const{children:t,onClick:n,selected:i,disabled:r=!1}=e;return p.jsxs("div",{onClick:()=>!r&&n&&n(),className:N("option-base px-4 py-2 rounded-xl cursor-pointer transition-all duration-150 select-none flex flex-row gap-3 items-center",i&&!r&&"option-selected",r&&"option-disabled cursor-not-allowed hover:bg-transparent active:bg-transparent"),children:[p.jsx("div",{className:"flex-1",children:t}),i&&!r&&p.jsx("div",{className:"shrink-0",children:p.jsx(Eh,{className:"h-5 w-5"})})]})},pu=e=>{const{className:t,label:n,description:i,options:r,onChange:o,value:s,placeholder:a,maxHeight:l=300,error:u,size:c="md"}=e,[d,f]=S.useState(!1),m=C.useRef(null),g=r?.find(h=>h.value===s);_t(d,()=>f(!1)),S.useEffect(()=>{d&&m.current?.focus({preventScroll:!0})},[d]);const{anchorRef:v,Popover:b}=gt({placement:"bottom",fullWidth:!0,onOutsideClick:()=>f(!1)});return p.jsx(Ke.Provider,{value:c,children:p.jsxs("div",{className:N("flex flex-col",t),children:[p.jsx(Ve,{children:n}),p.jsxs("div",{className:"relative flex w-full flex-col",ref:v,children:[p.jsxs("div",{ref:m,role:"button",tabIndex:0,className:N("flex flex-row items-center border select-trigger transition-all duration-150 rounded-xl shadow-sm ring-0 focus:ring-4 focus:outline-none select-none",et[c],qe[c],ut[c],dt[c],u&&"select-trigger-error",d&&"ring-4"),onKeyDown:h=>h.key===" "&&f(T=>!T),onClick:()=>f(!d),children:[g&&p.jsx("span",{children:g.label}),!g&&a&&p.jsx("span",{className:"select-placeholder",children:a})]}),p.jsxs(tt,{children:[u&&p.jsx(He,{}),!!s&&p.jsx(Ye,{Icon:ft,onClick:()=>o(null)}),p.jsx(Ye,{Icon:cn})]}),p.jsx(b,{open:d,children:p.jsx(mt,{className:"!p-0",style:{maxHeight:l},children:p.jsx("div",{className:"flex flex-col p-2 gap-1",children:r.map(h=>{const T=h.value===s;return p.jsx(vn,{onClick:()=>{!h.disabled&&o&&(o(h.value),f(!1))},selected:T,disabled:h.disabled,children:h.label},String(h.value))})})})})]}),p.jsx(Se,{children:i}),p.jsx(ke,{children:u})]})})},Gx=e=>{const{className:t,label:n,description:i,options:r,onChange:o,onSearch:s,value:a,placeholder:l,maxHeight:u=300,error:c,size:d="md"}=e,[f,m]=S.useState(!1),[g,v]=S.useState(r),[b,h]=S.useState(""),T=C.useRef(null),w=C.useRef(null),k=r?.find(E=>E.value===a);_t(f,()=>m(!1)),S.useEffect(()=>{v(s(b))},[b,r,s]),S.useEffect(()=>{f&&setTimeout(()=>w.current?.focus(),100)},[f]);const{anchorRef:y,Popover:P}=gt({placement:"bottom",fullWidth:!0,onOutsideClick:()=>m(!1)});return p.jsx(Ke.Provider,{value:d,children:p.jsxs("div",{className:N("flex flex-col",t),children:[p.jsx(Ve,{children:n}),p.jsxs("div",{className:"relative flex w-full flex-col",ref:y,children:[p.jsxs("div",{ref:T,role:"button",tabIndex:0,className:N("flex flex-row items-center border select-trigger transition-all duration-150 rounded-xl shadow-sm ring-0 focus:ring-4 focus:outline-none select-none",et[d],qe[d],ut[d],dt[d],c&&"select-trigger-error",f&&"ring-4"),onKeyDown:E=>E.key===" "&&m(A=>!A),onClick:()=>m(!f),children:[k&&p.jsx("span",{children:k.label}),!k&&l&&p.jsx("span",{className:"select-placeholder",children:l})]}),p.jsxs(tt,{children:[c&&p.jsx(He,{}),!!a&&p.jsx(Ye,{Icon:ft,onClick:()=>o(null)}),p.jsx(Ye,{Icon:cn})]}),p.jsx(P,{open:f,children:p.jsxs(mt,{className:"gap-0 !p-0",style:{maxHeight:u},children:[p.jsxs("div",{className:"sticky top-0 border-b select-search-bar py-1 backdrop-blur-sm",children:[p.jsx("input",{ref:w,type:"text",placeholder:"Search",value:b,className:"appearance-none border-none w-full bg-transparent rounded- pl-10 transition-all duration-150 focus:outline-none ring-0 placeholder:text-[var(--color-input-placeholder)]",onChange:E=>h(E.target.value)}),p.jsx(Ar,{className:"absolute select-search-icon left-4 top-4 h-4 w-4"})]}),p.jsxs("div",{className:"flex flex-col gap-1 p-2",children:[b!==""&&p.jsxs(p.Fragment,{children:[g.length===0&&p.jsx("div",{className:"flex flex-col items-center justify-center py-6",children:p.jsx(Ul,{className:"h-6 w-6 text-[var(--color-input-text)]"})}),g.map(E=>{const A=E.value===a;return p.jsx(vn,{onClick:()=>{!E.disabled&&o&&(o(E.value),m(!1))},selected:A,disabled:E.disabled,children:E.label},String(E.value))})]}),b===""&&p.jsx(p.Fragment,{children:r.map(E=>{const A=E.value===a;return p.jsx(vn,{onClick:()=>{!E.disabled&&o&&(o(E.value),m(!1))},selected:A,disabled:E.disabled,children:E.label},String(E.value))})})]})]})})]}),p.jsx(Se,{children:i}),p.jsx(ke,{children:c})]})})},Xx=(e,t)=>{const[n,i]=S.useState(e);return S.useEffect(()=>{const r=setTimeout(()=>{i(e)},t);return()=>{clearTimeout(r)}},[e,t]),n},Zx=e=>{const{className:t,label:n,description:i,onChange:r,fetchOptionsByQuery:o,fetchOptionByValue:s,onSearchDebounceMs:a=300,value:l,placeholder:u,maxHeight:c=300,error:d,size:f="md"}=e,[m,g]=S.useState(!1),v=C.useRef(null),[b,h]=S.useState(""),[T,w]=S.useState([]),[k,y]=S.useState(null),P=C.useRef(null),[E,A]=S.useState(!1),[M,W]=S.useState(!1);_t(m,()=>g(!1));const O=Xx(b,a);S.useEffect(()=>{(async()=>{A(!0);const ee=await o(O);w(ee),A(!1)})()},[O,o]),S.useEffect(()=>{if(l==null){y(null);return}const F=T?.find(ee=>ee.value===l);F?y(F):(async()=>{W(!0);const ie=await s(l);y(ie),W(!1)})()},[s,T,l]),S.useEffect(()=>{m&&setTimeout(()=>P.current?.focus(),100)},[m]);const{anchorRef:J,Popover:Y}=gt({placement:"bottom",fullWidth:!0,onOutsideClick:()=>g(!1)});return p.jsx(Ke.Provider,{value:f,children:p.jsxs("div",{className:N("flex flex-col",t),children:[p.jsx(Ve,{children:n}),p.jsxs("div",{className:"relative flex w-full flex-col",ref:J,children:[p.jsxs("div",{ref:v,role:"button",tabIndex:0,className:N("flex flex-row items-center border select-trigger transition-all duration-150 rounded-xl shadow-sm ring-0 focus:ring-4 focus:outline-none select-none",et[f],qe[f],ut[f],dt[f],d&&"select-trigger-error",m&&"ring-4"),onKeyDown:F=>F.key===" "&&g(ee=>!ee),onClick:()=>g(!m),children:[!M&&k&&p.jsx("span",{children:k.label}),!M&&!k&&u&&p.jsx("span",{className:"select-placeholder",children:u}),M&&p.jsx(It,{className:"h-4 w-4 text-[var(--color-input-text)]"})]}),p.jsxs(tt,{children:[d&&p.jsx(He,{}),!!l&&p.jsx(Ye,{Icon:ft,onClick:()=>r(null)}),p.jsx(Ye,{Icon:cn})]}),p.jsx(Y,{open:m,children:p.jsxs(mt,{className:"gap-0 !p-0",style:{maxHeight:c},children:[p.jsxs("div",{className:"sticky top-0 border-b select-search-bar py-1 backdrop-blur-sm",children:[p.jsx("input",{ref:P,type:"text",placeholder:"Search",value:b,className:"appearance-none border-none w-full bg-transparent rounded- pl-10 transition-all duration-150 focus:outline-none ring-0 placeholder:text-[var(--color-input-placeholder)]",onChange:F=>h(F.target.value)}),p.jsx(Ar,{className:"absolute select-search-icon left-4 top-4 h-4 w-4"})]}),p.jsxs("div",{className:"flex flex-col gap-1 p-2",children:[!E&&T.length===0&&p.jsx("div",{className:"flex flex-col items-center justify-center py-6",children:p.jsx(Ul,{className:"h-6 w-6 text-[var(--color-input-text)]"})}),E&&p.jsx("div",{className:"flex flex-col items-center justify-center py-6",children:p.jsx(It,{className:"h-6 w-6 text-[var(--color-input-text)]"})}),!E&&p.jsx(p.Fragment,{children:T.map(F=>{const ee=F.value===l;return p.jsx(vn,{onClick:()=>{!F.disabled&&r&&(r(F.value),g(!1))},selected:ee,disabled:F.disabled,children:F.label},String(F.value))})})]})]})})]}),p.jsx(Se,{children:i}),p.jsx(ke,{children:d})]})})},Jx=C.forwardRef((e,t)=>{const{className:n,children:i,...r}=e;return p.jsx("div",{ref:t,className:N("flex flex-col gap-6 border panel-base rounded-2xl shadow-sm px-6 py-6",n),...r,children:i})}),Qx=C.forwardRef((e,t)=>{const{className:n,children:i,...r}=e;return p.jsx("div",{ref:t,className:N("flex flex-col gap-1 border panel-base rounded-2xl shadow-sm p-2",n),...r,children:i})}),fu="input-description text-sm font-medium",ey=e=>{const{className:t,label:n,children:i,orientation:r="vertical",...o}=e;return r==="horizontal"?p.jsxs("div",{className:N("flex flex-row items-center gap-3 px-3 py-2",t),...o,children:[p.jsx("div",{className:N(fu,"w-1/2 line-clamp-1 break-all"),children:n}),p.jsx("div",{className:"w-1/2 line-clamp-1 break-all",children:i})]}):p.jsxs("div",{className:N("flex flex-col gap-1 px-3 py-2",t),...o,children:[n&&p.jsx("div",{className:fu,children:n}),p.jsx("div",{children:i})]})},ty={error:Rr,warning:Ih,success:Dr,info:Nh},ny={error:"text-[var(--color-status-error)]",warning:"text-[var(--color-status-warning)]",success:"text-[var(--color-status-success)]",info:"text-[var(--color-status-info)]"},mu="inline-flex flex-row gap-3 items-center justify-between h-10 px-3 font-semibold ring-0 dropdown-item rounded-lg cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-0 border border-transparent bg-transparent",iy=e=>{const{className:t,children:n,Icon:i,status:r,...o}=e,s=r?ty[r]:null,a=p.jsxs(p.Fragment,{children:[p.jsxs("span",{className:"inline-flex flex-row items-center gap-3 min-w-0",children:[i&&p.jsx(i,{className:"h-5 w-5 shrink-0"}),p.jsx("span",{className:"truncate",children:n})]}),p.jsxs("span",{className:"inline-flex flex-row items-center gap-2 shrink-0",children:[s&&r&&p.jsx(s,{className:N("h-5 w-5",ny[r])}),p.jsx(Ch,{className:"h-5 w-5 text-[var(--color-input-icon-button-icon)]"})]})]});if(o.href!==void 0){const{href:l,...u}=o;return p.jsx("a",{href:l,className:N(mu,t),...u,children:a})}return p.jsx("button",{className:N(mu,t),...o,children:a})},ry=e=>{const{className:t,vertical:n=!1,...i}=e;return p.jsx("div",{className:N(n?"w-px h-full bg-[var(--color-divider)]":"w-full h-px bg-[var(--color-divider)]",t),...i})},oy=e=>{const{children:t,content:n,className:i,placement:r="top",minWidth:o=100,maxWidth:s=200}=e,[a,l]=S.useState(!1),{anchorRef:u,Popover:c}=gt({placement:r,minWidth:o,maxWidth:s});return p.jsxs("span",{ref:u,className:i,onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:[t,p.jsx(c,{open:a,children:p.jsx(mt,{children:n})})]})},sy=e=>{const{open:t,onDismiss:n,enableDismissOnOutsideClick:i,enableDismissOnEscKey:r,enableDismissButton:o,className:s,children:a,maxWidth:l=600}=e;return _t(!!r&&t,n||(()=>{})),p.jsx(An,{children:t&&p.jsxs(Yr,{children:[p.jsx(Fe.div,{style:{transformOrigin:"center"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15,ease:"easeInOut"},children:p.jsx(Gr,{className:"modal-overlay backdrop-blur-[1px] z-10",onClick:i?n:void 0,lockScroll:!0})}),p.jsx("div",{className:"fixed inset-0 flex flex-col items-center pointer-events-none p-4 lg:p-12 overflow-y-auto z-20",children:p.jsxs(Fe.div,{className:N("flex flex-col modal-content rounded-2xl shadow-xl p-6 lg:p-12 pointer-events-auto w-full relative",s),style:{transformOrigin:"bottom",maxWidth:l},initial:{opacity:0,scale:.98,translateY:10},animate:{opacity:1,scale:1,translateY:0},exit:{opacity:0,scale:.98,translateY:10},transition:{duration:.15,ease:"easeInOut"},children:[o&&p.jsx(Pr,{Icon:ft,className:"absolute top-4 right-4",variant:"transparent",size:"sm",onClick:n}),a]})})]})})},ay=e=>{const{open:t,onDismiss:n,enableDismissOnOutsideClick:i,enableDismissOnEscKey:r,enableDismissButton:o,className:s,children:a,maxWidth:l=480}=e;return _t(!!r&&t,n||(()=>{})),p.jsx(An,{children:t&&p.jsxs(Yr,{children:[p.jsx(Fe.div,{style:{transformOrigin:"center"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15,ease:"easeInOut"},children:p.jsx(Gr,{className:"modal-overlay backdrop-blur-[1px] z-10",onClick:i?n:void 0,lockScroll:!0})}),p.jsx("div",{className:"fixed inset-0 flex flex-row justify-end pointer-events-none z-20",children:p.jsxs(Fe.div,{className:N("flex flex-col modal-content shadow-xl p-6 lg:p-12 pointer-events-auto h-full w-full overflow-y-auto relative",s),style:{maxWidth:l},initial:{translateX:"100%"},animate:{translateX:0},exit:{translateX:"100%"},transition:{duration:.25,ease:[.32,.72,0,1]},children:[o&&p.jsx(Pr,{Icon:ft,className:"absolute top-4 right-4",variant:"transparent",size:"sm",onClick:n}),a]})})]})})},hu={red:"bg-red-100 text-red-700 ring-red-200 dark:bg-red-950 dark:text-red-300 dark:ring-red-800",orange:"bg-orange-100 text-orange-700 ring-orange-200 dark:bg-orange-950 dark:text-orange-300 dark:ring-orange-800",amber:"bg-amber-100 text-amber-700 ring-amber-200 dark:bg-amber-950 dark:text-amber-300 dark:ring-amber-800",yellow:"bg-yellow-100 text-yellow-700 ring-yellow-200 dark:bg-yellow-950 dark:text-yellow-300 dark:ring-yellow-800",lime:"bg-lime-100 text-lime-700 ring-lime-200 dark:bg-lime-950 dark:text-lime-300 dark:ring-lime-800",green:"bg-green-100 text-green-700 ring-green-200 dark:bg-green-950 dark:text-green-300 dark:ring-green-800",emerald:"bg-emerald-100 text-emerald-700 ring-emerald-200 dark:bg-emerald-950 dark:text-emerald-300 dark:ring-emerald-800",teal:"bg-teal-100 text-teal-700 ring-teal-200 dark:bg-teal-950 dark:text-teal-300 dark:ring-teal-800",cyan:"bg-cyan-100 text-cyan-700 ring-cyan-200 dark:bg-cyan-950 dark:text-cyan-300 dark:ring-cyan-800",sky:"bg-sky-100 text-sky-700 ring-sky-200 dark:bg-sky-950 dark:text-sky-300 dark:ring-sky-800",blue:"bg-blue-100 text-blue-700 ring-blue-200 dark:bg-blue-950 dark:text-blue-300 dark:ring-blue-800",indigo:"bg-indigo-100 text-indigo-700 ring-indigo-200 dark:bg-indigo-950 dark:text-indigo-300 dark:ring-indigo-800",violet:"bg-violet-100 text-violet-700 ring-violet-200 dark:bg-violet-950 dark:text-violet-300 dark:ring-violet-800",purple:"bg-purple-100 text-purple-700 ring-purple-200 dark:bg-purple-950 dark:text-purple-300 dark:ring-purple-800",fuchsia:"bg-fuchsia-100 text-fuchsia-700 ring-fuchsia-200 dark:bg-fuchsia-950 dark:text-fuchsia-300 dark:ring-fuchsia-800",pink:"bg-pink-100 text-pink-700 ring-pink-200 dark:bg-pink-950 dark:text-pink-300 dark:ring-pink-800",rose:"bg-rose-100 text-rose-700 ring-rose-200 dark:bg-rose-950 dark:text-rose-300 dark:ring-rose-800",slate:"bg-slate-100 text-slate-700 ring-slate-200 dark:bg-slate-950 dark:text-slate-300 dark:ring-slate-800",gray:"bg-gray-100 text-gray-700 ring-gray-200 dark:bg-gray-950 dark:text-gray-300 dark:ring-gray-800",zinc:"bg-zinc-100 text-zinc-700 ring-zinc-200 dark:bg-zinc-950 dark:text-zinc-300 dark:ring-zinc-800",neutral:"bg-neutral-100 text-neutral-700 ring-neutral-200 dark:bg-neutral-950 dark:text-neutral-300 dark:ring-neutral-800",stone:"bg-stone-100 text-stone-700 ring-stone-200 dark:bg-stone-950 dark:text-stone-300 dark:ring-stone-800",white:"bg-[var(--color-badge-white-bg)] text-[var(--color-badge-white-text)] ring-[var(--color-badge-white-ring)]",black:"bg-[var(--color-badge-black-bg)] text-[var(--color-badge-black-text)] ring-[var(--color-badge-black-ring)]"},go=C.forwardRef((e,t)=>{const{className:n,children:i,onClick:r,showCloseIcon:o,Icon:s,color:a="gray"}=e,l=N("inline-flex align-top items-center gap-2 px-3 h-7 rounded-lg font-semibold",hu[a],n);return r?p.jsx("div",{ref:t,children:p.jsxs("button",{className:N("cursor-pointer ring-0 hover:ring-4 active:ring-1 transition-all duration-100 select-none focus:outline-none focus:ring-4",l),onClick:r,children:[s&&p.jsx(s,{className:"h-4 w-4 shrink-0"}),p.jsx("div",{className:"break-all line-clamp-1 text-left",children:i}),o&&p.jsx(ft,{className:"h-4 w-4 shrink-0"})]})}):p.jsxs("div",{className:l,ref:t,children:[s&&p.jsx(s,{className:"h-4 w-4 shrink-0"}),p.jsx("div",{className:"break-all line-clamp-1 text-left",children:i})]})}),gu=e=>{const{className:t,tabs:n}=e;return p.jsx("div",{className:N("h-12 tab-container p-1 rounded-xl inline-flex flex-row space-x-1 overflow-x-auto mat-ui-hide-scrollbars",t),children:n.map((i,r)=>{const o=N("shrink-0 px-4 h-full inline-flex flex-row items-center font-semibold rounded-xl cursor-pointer border border-transparent ing-0 tab-button transition-all duration-150 select-none focus:outline-none focus:ring-0",i.active&&"tab-button-active shadow-sm");return i.href?p.jsxs("a",{href:i.href,className:o,children:[i.Icon&&p.jsx(i.Icon,{className:"h-5 w-5 shrink-0 mr-2 -ml-1"}),i.label]},r):p.jsxs("button",{className:o,onClick:i.onClick,children:[i.Icon&&p.jsx(i.Icon,{className:"h-5 w-5 shrink-0 mr-2 -ml-1"}),i.label]},r)})})},ly=e=>{const{duration:t=.3,ease:n="easeInOut",horizontal:i=!1,children:r,className:o,...s}=e,a=C.useRef(null),l=C.useRef(null),u=C.useRef(null);return C.useEffect(()=>{const c=a.current,d=l.current;if(!c||!d)return;let f=!0;const m=()=>{const v=i?c.scrollWidth-c.clientWidth:c.scrollHeight-c.clientHeight,b=i?c.scrollLeft:c.scrollTop;if(!(v<=0||Math.abs(v-b)<1)){if(f){f=!1,i?c.scrollLeft=v:c.scrollTop=v;return}u.current?.stop(),u.current=fh(b,v,{duration:t,ease:n,onUpdate:h=>{i?c.scrollLeft=h:c.scrollTop=h}})}},g=new ResizeObserver(m);return g.observe(d),()=>{g.disconnect(),u.current?.stop()}},[t,n,i]),p.jsx("div",{ref:a,className:N("min-h-0 min-w-0",i?"overflow-x-auto":"overflow-y-auto",o),...s,children:p.jsx("div",{ref:l,children:r})})};function cy(e){const{onDelta:t,onDragStart:n,onDragEnd:i,disabled:r=!1,primaryButtonOnly:o=!0,preventScrollOnMove:s=!0}=e,[a,l]=C.useState(!1),u=C.useRef(!1),c=C.useRef(0),d=C.useRef(0),f=C.useRef(0),m=C.useRef(null),g=C.useRef(null),v=C.useRef({onDelta:t,onDragStart:n,onDragEnd:i,preventScrollOnMove:s});C.useEffect(()=>{v.current={onDelta:t,onDragStart:n,onDragEnd:i,preventScrollOnMove:s}});const b=C.useRef({}),h=C.useCallback(w=>{if(!u.current)return;const k={clientX:w??d.current,startX:c.current,totalDeltaX:f.current,target:m.current};u.current=!1,l(!1);const{move:y,up:P,keydown:E}=b.current;y&&window.removeEventListener("pointermove",y,!0),P&&(window.removeEventListener("pointerup",P,!0),window.removeEventListener("pointercancel",P,!0)),E&&window.removeEventListener("keydown",E,!0),b.current={},g.current!=null&&(cancelAnimationFrame(g.current),g.current=null),v.current.onDragEnd?.(k),m.current=null,f.current=0},[]),T=C.useCallback(w=>{if(r||o&&w.button!==0)return;w.target.setPointerCapture?.(w.pointerId),c.current=w.clientX,d.current=w.clientX,f.current=0,m.current=w.target,u.current=!0,l(!0);const k={clientX:w.clientX,startX:w.clientX,totalDeltaX:0,target:w.target};v.current.onDragStart?.(k);const y=A=>{u.current&&g.current==null&&(g.current=requestAnimationFrame(()=>{g.current=null;const M=A.clientX,W=M-d.current;if(W===0)return;d.current=M,f.current+=W;const O={clientX:M,startX:c.current,totalDeltaX:f.current,target:m.current};v.current.preventScrollOnMove&&A.preventDefault(),v.current.onDelta(W,O)}))},P=A=>{h(A.clientX)},E=A=>{A.key==="Escape"&&(A.preventDefault(),h())};b.current={move:y,up:P,keydown:E},window.addEventListener("pointermove",y,{passive:!s,capture:!0}),window.addEventListener("pointerup",P,{capture:!0}),window.addEventListener("pointercancel",P,{capture:!0}),window.addEventListener("keydown",E,!0)},[h,r,s,o]);return C.useEffect(()=>()=>{u.current&&h()},[h]),{isDragging:a,bind:{onPointerDown:T,role:"separator",style:{touchAction:"none",cursor:"col-resize",userSelect:"none"}}}}const vu=e=>{const{column:t,width:n,height:i,onResize:r,sortDirection:o,onSortClick:s}=e,a=!!t.sortable,{bind:l}=cy({onDelta:u=>r(u)});return p.jsxs("div",{style:{width:n,height:i},className:"flex flex-row items-stretch select-none shrink-0",children:[p.jsxs("div",{className:N("flex-1 min-w-0 px-4 table-header-cell transition-colors duration-100 flex flex-row items-center gap-2",a&&"cursor-pointer"),onClick:a?s:void 0,children:[p.jsx("span",{className:"truncate",children:t.header}),a&&o==="asc"&&p.jsx(Ph,{className:"h-4 w-4 shrink-0"}),a&&o==="desc"&&p.jsx(cn,{className:"h-4 w-4 shrink-0"})]}),p.jsx("div",{...l,className:"cursor-ew-resize group py-4 table-resize-handle w-[8px]",children:p.jsx("div",{className:"w-0.5 h-full mx-auto table-resize-divider table-resize-divider-hover pointer-events-none"})})]})},Bt=200,uy=60,dy=e=>{const t={};for(const n of e)t[n.id]=n.defaultWidth??Bt;return t},xu=e=>{const{columns:t,rows:n,getRowId:i,onRowClick:r,sort:o,onSortChange:s,className:a,rowHeight:l=44,headerHeight:u=44}=e,[c,d]=S.useState(()=>dy(t));S.useEffect(()=>{d(h=>{const T={};let w=Object.keys(h).length!==t.length;for(const k of t)k.id in h?T[k.id]=h[k.id]:(T[k.id]=k.defaultWidth??Bt,w=!0);return w?T:h})},[t]);const f=S.useCallback((h,T,w)=>{d(k=>{const y=k[h]??Bt,P=Math.max(w,y+T);return P===y?k:{...k,[h]:P}})},[]),m=S.useCallback(h=>{if(s){if(!o||o.columnId!==h){s({columnId:h,direction:"asc"});return}if(o.direction==="asc"){s({columnId:h,direction:"desc"});return}s(null)}},[o,s]),g=t.reduce((h,T)=>h+(c[T.id]??T.defaultWidth??Bt),0),v=S.useRef(null),b=h=>{v.current&&(v.current.scrollLeft=h.currentTarget.scrollLeft)};return p.jsxs("div",{className:N("flex flex-col h-full w-full",a),children:[p.jsx("div",{ref:v,className:"overflow-hidden shrink-0 table-header-strip",style:{height:u},children:p.jsx("div",{className:"flex flex-row table-header font-medium",style:{width:g,minWidth:"100%"},children:t.map(h=>p.jsx(vu,{column:h,width:c[h.id]??h.defaultWidth??Bt,height:u,onResize:T=>f(h.id,T,h.minWidth??uy),sortDirection:o?.columnId===h.id?o.direction:null,onSortClick:()=>m(h.id)},h.id))})}),p.jsx("div",{className:"flex-1 overflow-auto",onScroll:b,children:p.jsx("div",{className:"flex flex-col",style:{width:g,minWidth:"100%"},children:n.map((h,T)=>p.jsx("div",{className:N("flex flex-row table-body-row transition-colors duration-100",r&&"cursor-pointer"),onClick:r?()=>r(h,T):void 0,children:t.map(w=>p.jsx("div",{className:"shrink-0 content-center px-4 relative",style:{width:c[w.id]??w.defaultWidth??Bt,height:l},children:p.jsx("div",{className:"break-all line-clamp-1",children:w.renderCell(h,T)})},w.id))},i(h,T)))})})]})},yu=S.createContext(void 0),py=()=>({dismiss:S.useContext(yu)||(()=>{})}),fy="inline-flex flex-row items-center gap-3 h-10 px-3 font-semibold ring-0 dropdown-item rounded-lg cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-0 border border-transparent bg-transparent",Te=C.forwardRef((e,t)=>{const{className:n,children:i,Icon:r,onClick:o,dismissOnClick:s=!0,...a}=e,{dismiss:l}=py(),u=c=>{o&&o(c),s&&l()};return p.jsxs("button",{ref:t,className:N(fy,n),onClick:u,...a,children:[r&&p.jsx(r,{className:"h-5 w-5"}),i]})}),vo=e=>{const{label:t,children:n,className:i}=e;return p.jsxs("div",{className:N("flex flex-col dropdown-button-group",i),children:[t&&p.jsx("div",{className:"mb-2 text-sm dropdown-group-label font-semibold px-3",children:t}),n]})},xo=e=>{const{trigger:t,children:n,placement:i="bottom-end",minWidth:r=200,className:o}=e,[s,a]=S.useState(!1),{Popover:l,anchorRef:u}=gt({placement:i,onOutsideClick:()=>a(!1),minWidth:r});return p.jsxs(p.Fragment,{children:[p.jsx("div",{ref:u,className:o,onClick:()=>a(!s),children:t}),p.jsx(l,{open:s,children:p.jsx(mt,{padding:"sm",children:p.jsx(yu.Provider,{value:()=>a(!1),children:n})})})]})},my=()=>p.jsx("div",{}),hy=[{id:1,email:"sarah.jennings@example.com",firstname:"Sarah",lastname:"Jennings",status:"active"},{id:2,email:"liam.patel@outlook.com",firstname:"Liam",lastname:"Patel",status:"inactive"},{id:3,email:"emily.wong@gmail.com",firstname:"Emily",lastname:"Wong",status:"active"},{id:4,email:"noah.thompson@yahoo.com",firstname:"Noah",lastname:"Thompson",status:"active"},{id:5,email:"isabella.martin@protonmail.com",firstname:"Isabella",lastname:"Martin",status:"active"},{id:6,email:"ethan.ross@company.io",firstname:"Ethan",lastname:"Ross",status:"inactive"},{id:7,email:"olivia.nguyen@example.org",firstname:"Olivia",lastname:"Nguyen",status:"active"},{id:8,email:"lucas.henderson@gmail.com",firstname:"Lucas",lastname:"Henderson",status:"inactive"},{id:9,email:"mia.johnson@workmail.com",firstname:"Mia",lastname:"Johnson",status:"active"},{id:10,email:"jackson.rivera@outlook.com",firstname:"Jackson",lastname:"Rivera",status:"active"},{id:11,email:"ava.sanders@example.com",firstname:"Ava",lastname:"Sanders",status:"active"},{id:12,email:"logan.bennett@company.io",firstname:"Logan",lastname:"Bennett",status:"inactive"}],gy=[{id:"id",header:"ID",renderCell:e=>e.id},{id:"email",header:"Email",renderCell:e=>p.jsx(go,{Icon:Fh,onClick:()=>{},children:e.email})},{id:"firstname",header:"First Name",renderCell:e=>e.firstname},{id:"lastname",header:"Last Name",renderCell:e=>e.lastname},{id:"status",header:"Status",renderCell:()=>p.jsx(xy,{})}],vy=()=>p.jsxs("div",{className:"flex flex-col gap-6",children:[p.jsxs("div",{className:"flex flex-row items-center justify-start gap-3",children:[p.jsx(Or,{Icon:Ar,placeholder:"Search..."}),p.jsx(_n,{Icon:ql}),p.jsx(Bl,{Icon:Wl,children:"New"}),p.jsxs(xo,{trigger:p.jsx(_n,{Icon:ql}),children:[p.jsx(Te,{dismissOnClick:!1,Icon:Wl,children:"Add new"}),p.jsx(Te,{Icon:Mh,children:"Remove"}),p.jsxs(vo,{label:"Test",className:"mt-2",children:[p.jsx(Te,{children:"Item 1"}),p.jsx(Te,{children:"Item 2"}),p.jsx(Te,{children:"Item 3"}),p.jsx(Te,{children:"Item 4"})]}),p.jsxs(vo,{label:"Test",className:"mt-2",children:[p.jsx(Te,{children:"Item 1"}),p.jsx(Te,{children:"Item 2"}),p.jsx(Te,{children:"Item 3"}),p.jsx(Te,{children:"Item 4"})]})]}),p.jsx(gu,{tabs:[{label:"Tab 1",Icon:$l,active:!0,onClick:()=>{}},{label:"Tab 2",active:!1,onClick:()=>{}},{label:"Tab 3",Icon:$l,active:!1,onClick:()=>{}}]})]}),p.jsx(pu,{options:[{label:"Option 1",value:1},{label:"Option 2",value:2},{label:"Option 3",value:3}],value:null,onChange:()=>{}}),p.jsx(xu,{className:"h-[300px] w-[300px]",columns:gy,rows:hy,getRowId:e=>e.id}),p.jsx(my,{})]}),xy=()=>p.jsx(p.Fragment,{children:p.jsxs(xo,{placement:"bottom-end",className:"inline-block",trigger:p.jsx(go,{onClick:()=>{},children:"Test"}),children:[p.jsx(Te,{children:"Option 1"}),p.jsx(Te,{children:"Option 2"}),p.jsx(Te,{children:"Option 3"})]})});B.AutoScroll=ly,B.Badge=go,B.BadgeColor=hu,B.Button=Bl,B.ButtonIconRound=Pr,B.ButtonIconSquare=_n,B.Divider=ry,B.DropdownButton=Te,B.DropdownButtonGroup=vo,B.DropdownMenu=xo,B.DropdownPanel=mt,B.Input=Or,B.InputCheck=_v,B.InputColor=Dv,B.InputDescription=Se,B.InputError=ke,B.InputErrorIcon=He,B.InputFileMultiple=Kx,B.InputFileSingle=qx,B.InputIconButton=Ye,B.InputIconButtonTray=tt,B.InputLabel=Ve,B.InputPassword=Rv,B.InputRadio=Fv,B.InputSelect=pu,B.InputSelectNative=Yx,B.InputSelectOption=vn,B.InputSelectSearchable=Gx,B.InputSelectSearchableAsync=Zx,B.InputTextArea=Nv,B.InputToggle=Vv,B.Modal=sy,B.Panel=Jx,B.PanelField=ey,B.PanelLink=iy,B.PanelStack=Qx,B.PopoverBase=Pc,B.SidebarModal=ay,B.Spinner=It,B.TabButtons=gu,B.Table=xu,B.TableColumnHead=vu,B.Test=vy,B.Tooltip=oy,B.UploadFileTile=du,B.usePopover=gt,Object.defineProperty(B,Symbol.toStringTag,{value:"Module"})}));
177
+ */var $o,Au;function qx(){if(Au)return $o;Au=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function i(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function r(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var o={},a=0;a<10;a++)o["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(o).map(function(c){return o[c]});if(l.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(c){u[c]=c}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return $o=r()?Object.assign:function(s,o){for(var a,l=i(s),u,c=1;c<arguments.length;c++){a=Object(arguments[c]);for(var d in a)t.call(a,d)&&(l[d]=a[d]);if(e){u=e(a);for(var f=0;f<u.length;f++)n.call(a,u[f])&&(l[u[f]]=a[u[f]])}}return l},$o}var Wo,Du;function Uo(){if(Du)return Wo;Du=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Wo=e,Wo}var qo,Ru;function Iu(){return Ru||(Ru=1,qo=Function.call.bind(Object.prototype.hasOwnProperty)),qo}var Ko,Ou;function Kx(){if(Ou)return Ko;Ou=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Uo(),n={},i=Iu();e=function(s){var o="Warning: "+s;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function r(s,o,a,l,u){if(process.env.NODE_ENV!=="production"){for(var c in s)if(i(s,c)){var d;try{if(typeof s[c]!="function"){var f=Error((l||"React class")+": "+a+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}d=s[c](o,c,l,a,null,t)}catch(h){d=h}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+a+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var m=u?u():"";e("Failed "+a+" type: "+d.message+(m??""))}}}}return r.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Ko=r,Ko}var Ho,Mu;function Hx(){if(Mu)return Ho;Mu=1;var e=Pu(),t=qx(),n=Uo(),i=Iu(),r=Kx(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function o(){return null}return Ho=function(a,l){var u=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function d(x){var P=x&&(u&&x[u]||x[c]);if(typeof P=="function")return P}var f="<<anonymous>>",m={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:T(),arrayOf:w,element:k(),elementType:b(),instanceOf:C,node:_(),objectOf:E,oneOf:R,oneOfType:I,shape:Z,exact:H};function h(x,P){return x===P?x!==0||1/x===1/P:x!==x&&P!==P}function g(x,P){this.message=x,this.data=P&&typeof P=="object"?P:{},this.stack=""}g.prototype=Error.prototype;function y(x){if(process.env.NODE_ENV!=="production")var P={},D=0;function M(K,X,A,F,Q,ee,he){if(F=F||f,ee=ee||A,he!==n){if(l){var B=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw B.name="Invariant Violation",B}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var we=F+":"+A;!P[we]&&D<3&&(s("You are manually calling a React.PropTypes validation function for the `"+ee+"` prop on `"+F+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),P[we]=!0,D++)}}return X[A]==null?K?X[A]===null?new g("The "+Q+" `"+ee+"` is marked as required "+("in `"+F+"`, but its value is `null`.")):new g("The "+Q+" `"+ee+"` is marked as required in "+("`"+F+"`, but its value is `undefined`.")):null:x(X,A,F,Q,ee)}var z=M.bind(null,!1);return z.isRequired=M.bind(null,!0),z}function v(x){function P(D,M,z,K,X,A){var F=D[M],Q=U(F);if(Q!==x){var ee=L(F);return new g("Invalid "+K+" `"+X+"` of type "+("`"+ee+"` supplied to `"+z+"`, expected ")+("`"+x+"`."),{expectedType:x})}return null}return y(P)}function T(){return y(o)}function w(x){function P(D,M,z,K,X){if(typeof x!="function")return new g("Property `"+X+"` of component `"+z+"` has invalid PropType notation inside arrayOf.");var A=D[M];if(!Array.isArray(A)){var F=U(A);return new g("Invalid "+K+" `"+X+"` of type "+("`"+F+"` supplied to `"+z+"`, expected an array."))}for(var Q=0;Q<A.length;Q++){var ee=x(A,Q,z,K,X+"["+Q+"]",n);if(ee instanceof Error)return ee}return null}return y(P)}function k(){function x(P,D,M,z,K){var X=P[D];if(!a(X)){var A=U(X);return new g("Invalid "+z+" `"+K+"` of type "+("`"+A+"` supplied to `"+M+"`, expected a single ReactElement."))}return null}return y(x)}function b(){function x(P,D,M,z,K){var X=P[D];if(!e.isValidElementType(X)){var A=U(X);return new g("Invalid "+z+" `"+K+"` of type "+("`"+A+"` supplied to `"+M+"`, expected a single ReactElement type."))}return null}return y(x)}function C(x){function P(D,M,z,K,X){if(!(D[M]instanceof x)){var A=x.name||f,F=G(D[M]);return new g("Invalid "+K+" `"+X+"` of type "+("`"+F+"` supplied to `"+z+"`, expected ")+("instance of `"+A+"`."))}return null}return y(P)}function R(x){if(!Array.isArray(x))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),o;function P(D,M,z,K,X){for(var A=D[M],F=0;F<x.length;F++)if(h(A,x[F]))return null;var Q=JSON.stringify(x,function(he,B){var we=L(B);return we==="symbol"?String(B):B});return new g("Invalid "+K+" `"+X+"` of value `"+String(A)+"` "+("supplied to `"+z+"`, expected one of "+Q+"."))}return y(P)}function E(x){function P(D,M,z,K,X){if(typeof x!="function")return new g("Property `"+X+"` of component `"+z+"` has invalid PropType notation inside objectOf.");var A=D[M],F=U(A);if(F!=="object")return new g("Invalid "+K+" `"+X+"` of type "+("`"+F+"` supplied to `"+z+"`, expected an object."));for(var Q in A)if(i(A,Q)){var ee=x(A,Q,z,K,X+"."+Q,n);if(ee instanceof Error)return ee}return null}return y(P)}function I(x){if(!Array.isArray(x))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var P=0;P<x.length;P++){var D=x[P];if(typeof D!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+V(D)+" at index "+P+"."),o}function M(z,K,X,A,F){for(var Q=[],ee=0;ee<x.length;ee++){var he=x[ee],B=he(z,K,X,A,F,n);if(B==null)return null;B.data&&i(B.data,"expectedType")&&Q.push(B.data.expectedType)}var we=Q.length>0?", expected one of type ["+Q.join(", ")+"]":"";return new g("Invalid "+A+" `"+F+"` supplied to "+("`"+X+"`"+we+"."))}return y(M)}function _(){function x(P,D,M,z,K){return W(P[D])?null:new g("Invalid "+z+" `"+K+"` supplied to "+("`"+M+"`, expected a ReactNode."))}return y(x)}function N(x,P,D,M,z){return new g((x||"React class")+": "+P+" type `"+D+"."+M+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+z+"`.")}function Z(x){function P(D,M,z,K,X){var A=D[M],F=U(A);if(F!=="object")return new g("Invalid "+K+" `"+X+"` of type `"+F+"` "+("supplied to `"+z+"`, expected `object`."));for(var Q in x){var ee=x[Q];if(typeof ee!="function")return N(z,K,X,Q,L(ee));var he=ee(A,Q,z,K,X+"."+Q,n);if(he)return he}return null}return y(P)}function H(x){function P(D,M,z,K,X){var A=D[M],F=U(A);if(F!=="object")return new g("Invalid "+K+" `"+X+"` of type `"+F+"` "+("supplied to `"+z+"`, expected `object`."));var Q=t({},D[M],x);for(var ee in Q){var he=x[ee];if(i(x,ee)&&typeof he!="function")return N(z,K,X,ee,L(he));if(!he)return new g("Invalid "+K+" `"+X+"` key `"+ee+"` supplied to `"+z+"`.\nBad object: "+JSON.stringify(D[M],null," ")+`
178
+ Valid keys: `+JSON.stringify(Object.keys(x),null," "));var B=he(A,ee,z,K,X+"."+ee,n);if(B)return B}return null}return y(P)}function W(x){switch(typeof x){case"number":case"string":case"undefined":return!0;case"boolean":return!x;case"object":if(Array.isArray(x))return x.every(W);if(x===null||a(x))return!0;var P=d(x);if(P){var D=P.call(x),M;if(P!==x.entries){for(;!(M=D.next()).done;)if(!W(M.value))return!1}else for(;!(M=D.next()).done;){var z=M.value;if(z&&!W(z[1]))return!1}}else return!1;return!0;default:return!1}}function J(x,P){return x==="symbol"?!0:P?P["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&P instanceof Symbol:!1}function U(x){var P=typeof x;return Array.isArray(x)?"array":x instanceof RegExp?"object":J(P,x)?"symbol":P}function L(x){if(typeof x>"u"||x===null)return""+x;var P=U(x);if(P==="object"){if(x instanceof Date)return"date";if(x instanceof RegExp)return"regexp"}return P}function V(x){var P=L(x);switch(P){case"array":case"object":return"an "+P;case"boolean":case"date":case"regexp":return"a "+P;default:return P}}function G(x){return!x.constructor||!x.constructor.name?f:x.constructor.name}return m.checkPropTypes=r,m.resetWarningCache=r.resetWarningCache,m.PropTypes=m,m},Ho}var Yo,Nu;function Yx(){if(Nu)return Yo;Nu=1;var e=Uo();function t(){}function n(){}return n.resetWarningCache=t,Yo=function(){function i(o,a,l,u,c,d){if(d!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}i.isRequired=i;function r(){return i}var s={array:i,bigint:i,bool:i,func:i,number:i,object:i,string:i,symbol:i,any:i,arrayOf:r,element:i,elementType:i,instanceOf:r,node:i,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},Yo}var Fu;function Gx(){if(Fu)return Ni.exports;if(Fu=1,process.env.NODE_ENV!=="production"){var e=Pu(),t=!0;Ni.exports=Hx()(e.isElement,t)}else Ni.exports=Yx()();return Ni.exports}var Xx=Gx();const ce=ls(Xx);function It(e,t,n,i){function r(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(c){try{u(i.next(c))}catch(d){o(d)}}function l(c){try{u(i.throw(c))}catch(d){o(d)}}function u(c){c.done?s(c.value):r(c.value).then(a,l)}u((i=i.apply(e,t||[])).next())})}typeof SuppressedError=="function"&&SuppressedError;const Zx=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function sn(e,t,n){const i=Jx(e),{webkitRelativePath:r}=e,s=typeof t=="string"?t:typeof r=="string"&&r.length>0?r:`./${e.name}`;return typeof i.path!="string"&&Vu(i,"path",s),Vu(i,"relativePath",s),i}function Jx(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const i=t.split(".").pop().toLowerCase(),r=Zx.get(i);r&&Object.defineProperty(e,"type",{value:r,writable:!1,configurable:!1,enumerable:!0})}return e}function Vu(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const Qx=[".DS_Store","Thumbs.db"];function ey(e){return It(this,void 0,void 0,function*(){return Vi(e)&&ty(e.dataTransfer)?oy(e.dataTransfer,e.type):ny(e)?iy(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?ry(e):[]})}function ty(e){return Vi(e)}function ny(e){return Vi(e)&&Vi(e.target)}function Vi(e){return typeof e=="object"&&e!==null}function iy(e){return Go(e.target.files).map(t=>sn(t))}function ry(e){return It(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>sn(n))})}function oy(e,t){return It(this,void 0,void 0,function*(){if(e.items){const n=Go(e.items).filter(r=>r.kind==="file");if(t!=="drop")return n;const i=yield Promise.all(n.map(sy));return Lu(_u(i))}return Lu(Go(e.files).map(n=>sn(n)))})}function Lu(e){return e.filter(t=>Qx.indexOf(t.name)===-1)}function Go(e){if(e===null)return[];const t=[];for(let n=0;n<e.length;n++){const i=e[n];t.push(i)}return t}function sy(e){if(typeof e.webkitGetAsEntry!="function")return zu(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?Bu(t):zu(e,t)}function _u(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?_u(n):[n]],[])}function zu(e,t){return It(this,void 0,void 0,function*(){var n;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const s=yield e.getAsFileSystemHandle();if(s===null)throw new Error(`${e} is not a File`);if(s!==void 0){const o=yield s.getFile();return o.handle=s,sn(o)}}const i=e.getAsFile();if(!i)throw new Error(`${e} is not a File`);return sn(i,(n=t?.fullPath)!==null&&n!==void 0?n:void 0)})}function ay(e){return It(this,void 0,void 0,function*(){return e.isDirectory?Bu(e):ly(e)})}function Bu(e){const t=e.createReader();return new Promise((n,i)=>{const r=[];function s(){t.readEntries(o=>It(this,void 0,void 0,function*(){if(o.length){const a=Promise.all(o.map(ay));r.push(a),s()}else try{const a=yield Promise.all(r);n(a)}catch(a){i(a)}}),o=>{i(o)})}s()})}function ly(e){return It(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(i=>{const r=sn(i,e.fullPath);t(r)},i=>{n(i)})})})}var Li={},$u;function cy(){return $u||($u=1,Li.__esModule=!0,Li.default=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var i=e.name||"",r=(e.type||"").toLowerCase(),s=r.replace(/\/.*$/,"");return n.some(function(o){var a=o.trim().toLowerCase();return a.charAt(0)==="."?i.toLowerCase().endsWith(a):a.endsWith("/*")?s===a.replace(/\/.*$/,""):r===a})}return!0}),Li}var uy=cy();const Xo=ls(uy);function Wu(e){return fy(e)||py(e)||Hu(e)||dy()}function dy(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
179
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function py(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function fy(e){if(Array.isArray(e))return Zo(e)}function Uu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,i)}return n}function qu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Uu(Object(n),!0).forEach(function(i){Ku(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Uu(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Ku(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _n(e,t){return gy(e)||hy(e,t)||Hu(e,t)||my()}function my(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
180
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Hu(e,t){if(e){if(typeof e=="string")return Zo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Zo(e,t)}}function Zo(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function hy(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i=[],r=!0,s=!1,o,a;try{for(n=n.call(e);!(r=(o=n.next()).done)&&(i.push(o.value),!(t&&i.length===t));r=!0);}catch(l){s=!0,a=l}finally{try{!r&&n.return!=null&&n.return()}finally{if(s)throw a}}return i}}function gy(e){if(Array.isArray(e))return e}var vy=typeof Xo=="function"?Xo:Xo.default,xy="file-invalid-type",yy="file-too-large",by="file-too-small",wy="too-many-files",Ty=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=t.split(","),i=n.length>1?"one of ".concat(n.join(", ")):n[0];return{code:xy,message:"File type must be ".concat(i)}},Yu=function(t){return{code:yy,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},Gu=function(t){return{code:by,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},Sy={code:wy,message:"Too many files"};function ky(e){return e.type===""&&typeof e.getAsFile=="function"}function Xu(e,t){var n=e.type==="application/x-moz-file"||vy(e,t)||ky(e);return[n,n?null:Ty(t)]}function Zu(e,t,n){if(Ot(e.size))if(Ot(t)&&Ot(n)){if(e.size>n)return[!1,Yu(n)];if(e.size<t)return[!1,Gu(t)]}else{if(Ot(t)&&e.size<t)return[!1,Gu(t)];if(Ot(n)&&e.size>n)return[!1,Yu(n)]}return[!0,null]}function Ot(e){return e!=null}function Ey(e){var t=e.files,n=e.accept,i=e.minSize,r=e.maxSize,s=e.multiple,o=e.maxFiles,a=e.validator;return!s&&t.length>1||s&&o>=1&&t.length>o?!1:t.every(function(l){var u=Xu(l,n),c=_n(u,1),d=c[0],f=Zu(l,i,r),m=_n(f,1),h=m[0],g=a?a(l):null;return d&&h&&!g})}function _i(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function zn(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function Ju(e){e.preventDefault()}function jy(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function Cy(e){return e.indexOf("Edge/")!==-1}function Py(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return jy(e)||Cy(e)}function rt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(i){for(var r=arguments.length,s=new Array(r>1?r-1:0),o=1;o<r;o++)s[o-1]=arguments[o];return t.some(function(a){return!_i(i)&&a&&a.apply(void 0,[i].concat(s)),_i(i)})}}function Ay(){return"showOpenFilePicker"in window}function Dy(e){if(Ot(e)){var t=Object.entries(e).filter(function(n){var i=_n(n,2),r=i[0],s=i[1],o=!0;return Qu(r)||(console.warn('Skipped "'.concat(r,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),o=!1),(!Array.isArray(s)||!s.every(ed))&&(console.warn('Skipped "'.concat(r,'" because an invalid file extension was provided.')),o=!1),o}).reduce(function(n,i){var r=_n(i,2),s=r[0],o=r[1];return qu(qu({},n),{},Ku({},s,o))},{});return[{description:"Files",accept:t}]}return e}function Ry(e){if(Ot(e))return Object.entries(e).reduce(function(t,n){var i=_n(n,2),r=i[0],s=i[1];return[].concat(Wu(t),[r],Wu(s))},[]).filter(function(t){return Qu(t)||ed(t)}).join(",")}function Iy(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function Oy(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function Qu(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function ed(e){return/^.*\.[\w]+$/.test(e)}var My=["children"],Ny=["open"],Fy=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],Vy=["refKey","onChange","onClick"];function td(e){return zy(e)||_y(e)||nd(e)||Ly()}function Ly(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
181
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _y(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function zy(e){if(Array.isArray(e))return Qo(e)}function Jo(e,t){return Wy(e)||$y(e,t)||nd(e,t)||By()}function By(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
182
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nd(e,t){if(e){if(typeof e=="string")return Qo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Qo(e,t)}}function Qo(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function $y(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i=[],r=!0,s=!1,o,a;try{for(n=n.call(e);!(r=(o=n.next()).done)&&(i.push(o.value),!(t&&i.length===t));r=!0);}catch(l){s=!0,a=l}finally{try{!r&&n.return!=null&&n.return()}finally{if(s)throw a}}return i}}function Wy(e){if(Array.isArray(e))return e}function id(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,i)}return n}function de(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?id(Object(n),!0).forEach(function(i){es(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):id(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function es(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zi(e,t){if(e==null)return{};var n=Uy(e,t),i,r;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)i=s[r],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function Uy(e,t){if(e==null)return{};var n={},i=Object.keys(e),r,s;for(s=0;s<i.length;s++)r=i[s],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}var ts=S.forwardRef(function(e,t){var n=e.children,i=zi(e,My),r=is(i),s=r.open,o=zi(r,Ny);return S.useImperativeHandle(t,function(){return{open:s}},[s]),S.createElement(S.Fragment,null,n(de(de({},o),{},{open:s})))});ts.displayName="Dropzone";var rd={disabled:!1,getFilesFromEvent:ey,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};ts.defaultProps=rd,ts.propTypes={children:ce.func,accept:ce.objectOf(ce.arrayOf(ce.string)),multiple:ce.bool,preventDropOnDocument:ce.bool,noClick:ce.bool,noKeyboard:ce.bool,noDrag:ce.bool,noDragEventsBubbling:ce.bool,minSize:ce.number,maxSize:ce.number,maxFiles:ce.number,disabled:ce.bool,getFilesFromEvent:ce.func,onFileDialogCancel:ce.func,onFileDialogOpen:ce.func,useFsAccessApi:ce.bool,autoFocus:ce.bool,onDragEnter:ce.func,onDragLeave:ce.func,onDragOver:ce.func,onDrop:ce.func,onDropAccepted:ce.func,onDropRejected:ce.func,onError:ce.func,validator:ce.func};var ns={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,isDragGlobal:!1,acceptedFiles:[],fileRejections:[]};function is(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=de(de({},rd),e),n=t.accept,i=t.disabled,r=t.getFilesFromEvent,s=t.maxSize,o=t.minSize,a=t.multiple,l=t.maxFiles,u=t.onDragEnter,c=t.onDragLeave,d=t.onDragOver,f=t.onDrop,m=t.onDropAccepted,h=t.onDropRejected,g=t.onFileDialogCancel,y=t.onFileDialogOpen,v=t.useFsAccessApi,T=t.autoFocus,w=t.preventDropOnDocument,k=t.noClick,b=t.noKeyboard,C=t.noDrag,R=t.noDragEventsBubbling,E=t.onError,I=t.validator,_=S.useMemo(function(){return Ry(n)},[n]),N=S.useMemo(function(){return Dy(n)},[n]),Z=S.useMemo(function(){return typeof y=="function"?y:od},[y]),H=S.useMemo(function(){return typeof g=="function"?g:od},[g]),W=S.useRef(null),J=S.useRef(null),U=S.useReducer(qy,ns),L=Jo(U,2),V=L[0],G=L[1],x=V.isFocused,P=V.isFileDialogActive,D=S.useRef(typeof window<"u"&&window.isSecureContext&&v&&Ay()),M=function(){!D.current&&P&&setTimeout(function(){if(J.current){var $=J.current.files;$.length||(G({type:"closeDialog"}),H())}},300)};S.useEffect(function(){return window.addEventListener("focus",M,!1),function(){window.removeEventListener("focus",M,!1)}},[J,P,H,D]);var z=S.useRef([]),K=S.useRef([]),X=function($){W.current&&W.current.contains($.target)||($.preventDefault(),z.current=[])};S.useEffect(function(){return w&&(document.addEventListener("dragover",Ju,!1),document.addEventListener("drop",X,!1)),function(){w&&(document.removeEventListener("dragover",Ju),document.removeEventListener("drop",X))}},[W,w]),S.useEffect(function(){var O=function(Ce){K.current=[].concat(td(K.current),[Ce.target]),zn(Ce)&&G({isDragGlobal:!0,type:"setDragGlobal"})},$=function(Ce){K.current=K.current.filter(function(xe){return xe!==Ce.target&&xe!==null}),!(K.current.length>0)&&G({isDragGlobal:!1,type:"setDragGlobal"})},re=function(){K.current=[],G({isDragGlobal:!1,type:"setDragGlobal"})},ue=function(){K.current=[],G({isDragGlobal:!1,type:"setDragGlobal"})};return document.addEventListener("dragenter",O,!1),document.addEventListener("dragleave",$,!1),document.addEventListener("dragend",re,!1),document.addEventListener("drop",ue,!1),function(){document.removeEventListener("dragenter",O),document.removeEventListener("dragleave",$),document.removeEventListener("dragend",re),document.removeEventListener("drop",ue)}},[W]),S.useEffect(function(){return!i&&T&&W.current&&W.current.focus(),function(){}},[W,T,i]);var A=S.useCallback(function(O){E?E(O):console.error(O)},[E]),F=S.useCallback(function(O){O.preventDefault(),O.persist(),Ft(O),z.current=[].concat(td(z.current),[O.target]),zn(O)&&Promise.resolve(r(O)).then(function($){if(!(_i(O)&&!R)){var re=$.length,ue=re>0&&Ey({files:$,accept:_,minSize:o,maxSize:s,multiple:a,maxFiles:l,validator:I}),ve=re>0&&!ue;G({isDragAccept:ue,isDragReject:ve,isDragActive:!0,type:"setDraggedFiles"}),u&&u(O)}}).catch(function($){return A($)})},[r,u,A,R,_,o,s,a,l,I]),Q=S.useCallback(function(O){O.preventDefault(),O.persist(),Ft(O);var $=zn(O);if($&&O.dataTransfer)try{O.dataTransfer.dropEffect="copy"}catch{}return $&&d&&d(O),!1},[d,R]),ee=S.useCallback(function(O){O.preventDefault(),O.persist(),Ft(O);var $=z.current.filter(function(ue){return W.current&&W.current.contains(ue)}),re=$.indexOf(O.target);re!==-1&&$.splice(re,1),z.current=$,!($.length>0)&&(G({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),zn(O)&&c&&c(O))},[W,c,R]),he=S.useCallback(function(O,$){var re=[],ue=[];O.forEach(function(ve){var Ce=Xu(ve,_),xe=Jo(Ce,2),Ge=xe[0],bt=xe[1],cn=Zu(ve,o,s),Vt=Jo(cn,2),wt=Vt[0],We=Vt[1],Tt=I?I(ve):null;if(Ge&&wt&&!Tt)re.push(ve);else{var Kn=[bt,We];Tt&&(Kn=Kn.concat(Tt)),ue.push({file:ve,errors:Kn.filter(function(Bi){return Bi})})}}),(!a&&re.length>1||a&&l>=1&&re.length>l)&&(re.forEach(function(ve){ue.push({file:ve,errors:[Sy]})}),re.splice(0)),G({acceptedFiles:re,fileRejections:ue,type:"setFiles"}),f&&f(re,ue,$),ue.length>0&&h&&h(ue,$),re.length>0&&m&&m(re,$)},[G,a,_,o,s,l,f,m,h,I]),B=S.useCallback(function(O){O.preventDefault(),O.persist(),Ft(O),z.current=[],zn(O)&&Promise.resolve(r(O)).then(function($){_i(O)&&!R||he($,O)}).catch(function($){return A($)}),G({type:"reset"})},[r,he,A,R]),we=S.useCallback(function(){if(D.current){G({type:"openDialog"}),Z();var O={multiple:a,types:N};window.showOpenFilePicker(O).then(function($){return r($)}).then(function($){he($,null),G({type:"closeDialog"})}).catch(function($){Iy($)?(H($),G({type:"closeDialog"})):Oy($)?(D.current=!1,J.current?(J.current.value=null,J.current.click()):A(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):A($)});return}J.current&&(G({type:"openDialog"}),Z(),J.current.value=null,J.current.click())},[G,Z,H,v,he,A,N,a]),Ye=S.useCallback(function(O){!W.current||!W.current.isEqualNode(O.target)||(O.key===" "||O.key==="Enter"||O.keyCode===32||O.keyCode===13)&&(O.preventDefault(),we())},[W,we]),xt=S.useCallback(function(){G({type:"focus"})},[]),ln=S.useCallback(function(){G({type:"blur"})},[]),Mt=S.useCallback(function(){k||(Py()?setTimeout(we,0):we())},[k,we]),$e=function($){return i?null:$},yt=function($){return b?null:$e($)},Nt=function($){return C?null:$e($)},Ft=function($){R&&$.stopPropagation()},ne=S.useMemo(function(){return function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},$=O.refKey,re=$===void 0?"ref":$,ue=O.role,ve=O.onKeyDown,Ce=O.onFocus,xe=O.onBlur,Ge=O.onClick,bt=O.onDragEnter,cn=O.onDragOver,Vt=O.onDragLeave,wt=O.onDrop,We=zi(O,Fy);return de(de(es({onKeyDown:yt(rt(ve,Ye)),onFocus:yt(rt(Ce,xt)),onBlur:yt(rt(xe,ln)),onClick:$e(rt(Ge,Mt)),onDragEnter:Nt(rt(bt,F)),onDragOver:Nt(rt(cn,Q)),onDragLeave:Nt(rt(Vt,ee)),onDrop:Nt(rt(wt,B)),role:typeof ue=="string"&&ue!==""?ue:"presentation"},re,W),!i&&!b?{tabIndex:0}:{}),We)}},[W,Ye,xt,ln,Mt,F,Q,ee,B,b,C,i]),ae=S.useCallback(function(O){O.stopPropagation()},[]),te=S.useMemo(function(){return function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},$=O.refKey,re=$===void 0?"ref":$,ue=O.onChange,ve=O.onClick,Ce=zi(O,Vy),xe=es({accept:_,multiple:a,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:$e(rt(ue,B)),onClick:$e(rt(ve,ae)),tabIndex:-1},re,J);return de(de({},xe),Ce)}},[J,n,a,B,i]);return de(de({},V),{},{isFocused:x&&!i,getRootProps:ne,getInputProps:te,rootRef:W,inputRef:J,open:$e(we)})}function qy(e,t){switch(t.type){case"focus":return de(de({},e),{},{isFocused:!0});case"blur":return de(de({},e),{},{isFocused:!1});case"openDialog":return de(de({},ns),{},{isFileDialogActive:!0});case"closeDialog":return de(de({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return de(de({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return de(de({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:!1});case"setDragGlobal":return de(de({},e),{},{isDragGlobal:t.isDragGlobal});case"reset":return de({},ns);default:return e}}function od(){}const Ky={sm:"h-7",md:"h-8",lg:"h-10"},Hy={sm:"px-2.5",md:"px-3",lg:"px-4"},Yy={sm:"text-xs",md:"text-sm",lg:"text-sm"},Gy=e=>{const{label:t,description:n,error:i,placeholder:r="No file chosen",buttonText:s="Choose",Icon:o=Eg,size:a="md",value:l,isUploaded:u=!1,isUploading:c=!1,onChange:d,onDropRejected:f,accept:m,maxSize:h,minSize:g,disabled:y=!1,className:v}=e,T=async I=>{const[_]=I;_&&await d?.(_)},{getRootProps:w,getInputProps:k,open:b,isDragActive:C,isFocused:R}=is({multiple:!1,accept:m,maxSize:h,minSize:g,disabled:y,onDrop:T,onDropRejected:f}),E=l?.name;return p.jsx(tt.Provider,{value:a,children:p.jsxs("div",{className:q("flex flex-col",v),children:[p.jsx(qe,{children:t}),p.jsxs("div",{...w({className:q("flex flex-row items-center","border input-base rounded-xl shadow-sm transition-all duration-150","ring-0 focus:outline-none",(R||C)&&"ring-4",i&&"input-error",y&&"opacity-60 cursor-not-allowed",at[a],ft[a],"gap-3")}),children:[p.jsx("input",{...k()}),p.jsx(o,{className:q("input-icon shrink-0",At[a])}),p.jsx("span",{className:q("flex-1 truncate",Qe[a],!E&&"text-[var(--color-input-placeholder)]"),children:E??r}),i&&p.jsx(et,{}),c&&!i&&p.jsx("div",{className:"h-5 w-5 flex items-center justify-center",children:p.jsx(Jt,{className:"h-4 w-4 text-[var(--color-input-icon)]"})}),u&&!c&&!i&&p.jsx("div",{className:"h-5 w-5",children:p.jsx(po,{className:"h-5 w-5 text-[var(--color-status-success)]"})}),p.jsx("button",{type:"button",disabled:y,onClick:I=>{I.stopPropagation(),b()},className:q("inline-flex flex-row items-center justify-center shrink-0","border button-white shadow-sm rounded-[calc(var(--border-radius-input)-0.25rem)]","font-semibold cursor-pointer select-none transition-all duration-150","button-ring ring-0 hover:ring-4 active:ring-1 focus:outline-none focus:ring-4","disabled:cursor-default","mr-1.5",Ky[a],Hy[a],Yy[a]),children:s})]}),p.jsx(De,{children:n}),p.jsx(Re,{children:i})]})})},Xy=e=>e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:e<1024*1024*1024?`${(e/(1024*1024)).toFixed(1)} MB`:`${(e/(1024*1024*1024)).toFixed(1)} GB`,sd=e=>{const{file:t,isUploaded:n=!1,isUploading:i=!1,error:r,onRemove:s,className:o}=e,a=i||n||!!r;return p.jsxs("div",{className:q("flex flex-row items-center gap-3","border input-base rounded-xl shadow-sm","pl-4 pr-1 py-1",r&&"input-error",o),children:[a&&p.jsx("div",{className:"shrink-0 h-5 w-5 flex items-center justify-center",children:r?p.jsx(fo,{className:"h-5 w-5 input-error-icon"}):i?p.jsx(Jt,{className:"h-4 w-4 text-[var(--color-input-icon)]"}):p.jsx(po,{className:"h-5 w-5 text-[var(--color-status-success)]"})}),p.jsx("div",{className:"flex-1 min-w-0 font-medium truncate",children:t.name}),p.jsx("div",{className:"shrink-0 text-sm text-[var(--color-input-description-text)]",children:Xy(t.size)}),s&&p.jsx(fi,{variant:"transparent",size:"sm",Icon:ht,onClick:s,"aria-label":"Remove file",className:"shrink-0"})]})},Zy=e=>{const{label:t,description:n,error:i,title:r="Drop files here",hint:s,Icon:o=Tg,onUpload:a,onFileRemoved:l,onDropRejected:u,renderFileTile:c,accept:d,maxSize:f,minSize:m,maxFiles:h,disabled:g=!1,className:y}=e,[v,T]=S.useState([]),w=S.useRef(0),k=(N,Z)=>{T(H=>H.map(W=>W.id===N?{...W,...Z}:W))},b=N=>{if(N.length===0)return;const Z=N.map(H=>({id:String(++w.current),file:H,status:a?"uploading":"idle"}));if(T(H=>[...H,...Z]),!!a)for(const H of Z)Promise.resolve().then(()=>a(H.file)).then(()=>k(H.id,{status:"uploaded"})).catch(W=>{k(H.id,{status:"error",error:W instanceof Error?W:new Error(String(W))})})},C=N=>{const Z=v.find(H=>H.id===N);T(H=>H.filter(W=>W.id!==N)),Z&&l?.(Z.file)},{getRootProps:R,getInputProps:E,isDragActive:I,isFocused:_}=is({multiple:!0,accept:d,maxSize:f,minSize:m,maxFiles:h,disabled:g,onDrop:b,onDropRejected:u});return p.jsxs("div",{className:q("flex flex-col",y),children:[p.jsx(qe,{children:t}),p.jsxs("div",{...R({className:q("flex flex-col items-center justify-center gap-1","border-2 border-dashed input-base rounded-xl bg-transparent!","py-10 px-6 cursor-pointer transition-all duration-150","ring-0 focus:outline-none",(_||I)&&"ring-4",i&&"input-error",g&&"opacity-60 cursor-not-allowed")}),children:[p.jsx("input",{...E()}),p.jsx("div",{className:"h-14 w-14 rounded-xl flex items-center justify-center bg-[var(--color-input-file-icon-bg)] mb-2",children:p.jsx(o,{className:"h-7 w-7 input-icon"})}),p.jsx("div",{className:"text-base font-semibold",children:r}),s&&p.jsx("div",{className:"text-sm text-[var(--color-input-description-text)] ",children:s})]}),v.length>0&&p.jsx("div",{className:"flex flex-col gap-2 mt-3",children:v.map(N=>{const Z={file:N.file,isUploading:N.status==="uploading",isUploaded:N.status==="uploaded",error:N.status==="error"?N.error?.message:void 0,onRemove:()=>C(N.id)};return p.jsx(j.Fragment,{children:c?c(N.file,Z):p.jsx(sd,{...Z})},N.id)})}),p.jsx(De,{children:n}),p.jsx(Re,{children:i})]})},Jy=e=>{const{className:t,label:n,description:i,options:r,error:s,size:o="md",...a}=e;return p.jsx(tt.Provider,{value:o,children:p.jsxs("div",{className:q("flex flex-col",t),children:[p.jsx(qe,{children:n}),p.jsxs("div",{className:"relative flex w-full flex-col",children:[p.jsx("select",{className:q("appearance-none border input-base bg-none transition-all duration-150 rounded-xl shadow-sm ring-0 focus:ring-4 focus:outline-none",at[o],Qe[o],ft[o],mt[o]),...a,children:r&&r.map((l,u)=>p.jsx("option",{value:l.value,disabled:l.disabled,children:l.label},u))}),p.jsxs(lt,{children:[s&&p.jsx(et,{}),p.jsx(He,{Icon:Qt})]})]}),p.jsx(De,{children:i}),p.jsx(Re,{children:s})]})})},Bn=j.forwardRef((e,t)=>{const{children:n,onClick:i,selected:r,disabled:s=!1,active:o=!1,className:a,...l}=e;return p.jsxs("div",{ref:t,...l,onClick:()=>!s&&i&&i(),className:q("option-base px-4 py-2 rounded-xl cursor-pointer transition-all duration-150 select-none flex flex-row gap-3 items-center",r&&!s&&"option-selected",o&&!s&&"option-active",s&&"option-disabled cursor-not-allowed hover:bg-transparent active:bg-transparent",a),children:[p.jsx("div",{className:"flex-1 min-w-0 break-all line-clamp-1",children:n}),r&&!s&&p.jsx("div",{className:"shrink-0",children:p.jsx(yg,{className:"h-5 w-5"})})]})}),$n=j.forwardRef((e,t)=>{const{children:n,className:i,...r}=e;return p.jsx("div",{ref:t,...r,className:q("option-group-header px-4 pt-3 pb-1 text-xs font-semibold uppercase tracking-wide select-none",i),children:n})}),Wn=j.forwardRef((e,t)=>{const{className:n,...i}=e;return p.jsx("div",{ref:t,...i,className:q("option-divider my-1 h-px",n)})}),le=e=>!("kind"in e),Un=e=>{const{placement:t="bottom",onOutsideClick:n,fullWidth:i,minWidth:r,maxWidth:s,open:o,onOpenChange:a,listRef:l,activeIndex:u,onNavigate:c,loop:d=!0,disabledIndices:f}=e,m=j.useMemo(()=>[ru({apply({rects:R,elements:E}){i&&(E.floating.style.width=`${R.reference.width}px`),r&&(E.floating.style.minWidth=`${r}px`),s&&(E.floating.style.maxWidth=`${s}px`)}})],[i,s,r]),{refs:h,floatingStyles:g,context:y}=wu({placement:t,open:o,onOpenChange:a,middleware:m,whileElementsMounted:tu}),v=kx(y,{listRef:l,activeIndex:u,onNavigate:c,loop:d,virtual:!0,focusItemOnOpen:!1,disabledIndices:f}),{getReferenceProps:T,getFloatingProps:w,getItemProps:k}=Tx([v]),b=j.useRef({onOutsideClick:n,floatingStyles:g,setFloating:h.setFloating,placement:t,getFloatingProps:w});b.current={onOutsideClick:n,floatingStyles:g,setFloating:h.setFloating,placement:t,getFloatingProps:w};const C=j.useMemo(()=>{const R=E=>{const{floatingStyles:I,setFloating:_,onOutsideClick:N,placement:Z,getFloatingProps:H}=b.current,{className:W,open:J,children:U}=E;return p.jsx(Lo,{open:J,className:W,onOutsideClick:N,floatingStyles:I,setFloating:_,placement:Z,floatingProps:H(),children:U})};return j.memo(R)},[]);return{anchorRef:h.setReference,Popover:C,getReferenceProps:T,getItemProps:k}},ad=e=>{const{className:t,label:n,description:i,options:r,onChange:s,value:o,placeholder:a,maxHeight:l=300,error:u,size:c="md"}=e,[d,f]=S.useState(!1),[m,h]=S.useState(null),g=j.useRef(null),y=j.useRef([]),v=r?.find(E=>le(E)&&E.value===o),T=S.useMemo(()=>r.map((E,I)=>!le(E)||E.disabled?I:-1).filter(E=>E!==-1),[r]);Rt(d,()=>f(!1)),S.useEffect(()=>{if(d){g.current?.focus({preventScroll:!0});const E=r.findIndex(I=>le(I)&&I.value===o);if(E>=0)h(E);else{const I=r.findIndex(_=>le(_)&&!_.disabled);h(I>=0?I:null)}}else h(null)},[d]);const{anchorRef:w,Popover:k,getReferenceProps:b,getItemProps:C}=Un({placement:"bottom",fullWidth:!0,onOutsideClick:()=>f(!1),open:d,onOpenChange:f,listRef:y,activeIndex:m,onNavigate:h,disabledIndices:T}),R=E=>{const I=r[E];I&&le(I)&&!I.disabled&&(s(I.value),f(!1))};return p.jsx(tt.Provider,{value:c,children:p.jsxs("div",{className:q("flex flex-col",t),children:[p.jsx(qe,{children:n}),p.jsxs("div",{className:"relative flex w-full flex-col",ref:w,children:[p.jsxs("div",{...b({ref:g,role:"button",tabIndex:0,onClick:()=>f(!d),onKeyDown:E=>{E.key===" "?(E.preventDefault(),f(I=>!I)):E.key==="Enter"&&(E.preventDefault(),d&&m!=null?R(m):f(!0))}}),className:q("flex flex-row items-center border select-trigger transition-all duration-150 rounded-xl shadow-sm ring-0 focus:ring-4 focus:outline-none select-none",at[c],Qe[c],ft[c],o?pi[c]:mt[c],u&&"select-trigger-error",d&&"ring-4"),children:[v&&p.jsx("span",{className:"flex-1 min-w-0 break-all line-clamp-1 text-left",children:v.label}),!v&&a&&p.jsx("span",{className:"flex-1 min-w-0 break-all line-clamp-1 text-left select-placeholder",children:a})]}),p.jsxs(lt,{children:[u&&p.jsx(et,{}),!!o&&p.jsx(He,{Icon:ht,onClick:()=>s(null)}),p.jsx(He,{Icon:Qt})]}),p.jsx(k,{open:d,children:p.jsx(gt,{className:"!p-0",style:{maxHeight:l},children:p.jsx("div",{className:"flex flex-col p-2 gap-1",children:r.map((E,I)=>{if(!le(E))return E.kind==="header"?p.jsx($n,{ref:N=>{y.current[I]=N},children:E.label},`header-${I}`):p.jsx(Wn,{ref:N=>{y.current[I]=N}},`divider-${I}`);const _=E.value===o;return p.jsx(Bn,{...C({ref(N){y.current[I]=N}}),onClick:()=>R(I),selected:_,active:m===I,disabled:E.disabled,children:E.label},String(E.value))})})})})]}),p.jsx(De,{children:i}),p.jsx(Re,{children:u})]})})},Qy=e=>{const{className:t,label:n,description:i,options:r,onChange:s,onSearch:o,value:a,placeholder:l,maxHeight:u=300,error:c,size:d="md"}=e,[f,m]=S.useState(!1),[h,g]=S.useState(r),[y,v]=S.useState(""),[T,w]=S.useState(null),k=j.useRef(null),b=j.useRef(null),C=j.useRef([]),R=r?.find(U=>le(U)&&U.value===a),E=S.useMemo(()=>y!==""?h:r,[y,h,r]),I=S.useMemo(()=>E.map((U,L)=>!le(U)||U.disabled?L:-1).filter(U=>U!==-1),[E]);Rt(f,()=>m(!1)),S.useEffect(()=>{g(o(y))},[y,r,o]),S.useEffect(()=>{if(f){setTimeout(()=>b.current?.focus(),100);const U=r.findIndex(L=>le(L)&&L.value===a);if(U>=0)w(U);else{const L=r.findIndex(V=>le(V)&&!V.disabled);w(L>=0?L:null)}}else w(null),v("")},[f]),S.useEffect(()=>{if(!f)return;const U=E.findIndex(L=>le(L)&&!L.disabled);w(U>=0?U:null)},[y,f,E]);const{anchorRef:_,Popover:N,getReferenceProps:Z,getItemProps:H}=Un({placement:"bottom",fullWidth:!0,onOutsideClick:()=>m(!1),open:f,onOpenChange:m,listRef:C,activeIndex:T,onNavigate:w,disabledIndices:I}),W=U=>{const L=E[U];L&&le(L)&&!L.disabled&&(s(L.value),m(!1))},J=E.some(U=>le(U));return p.jsx(tt.Provider,{value:d,children:p.jsxs("div",{className:q("flex flex-col",t),children:[p.jsx(qe,{children:n}),p.jsxs("div",{className:"relative flex w-full flex-col",ref:_,children:[p.jsxs("div",{...Z({ref:k,role:"button",tabIndex:0,onClick:()=>m(!f),onKeyDown:U=>{U.key===" "?(U.preventDefault(),m(L=>!L)):U.key==="Enter"&&!f&&(U.preventDefault(),m(!0))}}),className:q("flex flex-row items-center border select-trigger transition-all duration-150 rounded-xl shadow-sm ring-0 focus:ring-4 focus:outline-none select-none",at[d],Qe[d],ft[d],a?pi[d]:mt[d],c&&"select-trigger-error",f&&"ring-4"),children:[R&&p.jsx("span",{className:"flex-1 min-w-0 break-all line-clamp-1 text-left",children:R.label}),!R&&l&&p.jsx("span",{className:"flex-1 min-w-0 break-all line-clamp-1 text-left select-placeholder",children:l})]}),p.jsxs(lt,{children:[c&&p.jsx(et,{}),!!a&&p.jsx(He,{Icon:ht,onClick:()=>s(null)}),p.jsx(He,{Icon:Qt})]}),p.jsx(N,{open:f,children:p.jsxs(gt,{className:"gap-0 !p-0",style:{maxHeight:u},children:[p.jsxs("div",{className:"sticky top-0 border-b select-search-bar py-1 backdrop-blur-sm",children:[p.jsx("input",{ref:b,type:"text",placeholder:"Search",value:y,className:"appearance-none border-none w-full bg-transparent rounded- pl-10 transition-all duration-150 focus:outline-none ring-0 placeholder:text-[var(--color-input-placeholder)]",onChange:U=>v(U.target.value),onKeyDown:U=>{U.key==="Enter"&&T!=null&&(U.preventDefault(),W(T))}}),p.jsx(mi,{className:"absolute select-search-icon left-4 top-4 h-4 w-4"})]}),p.jsxs("div",{className:"flex flex-col gap-1 p-2",children:[y!==""&&!J&&p.jsx("div",{className:"flex flex-col items-center justify-center py-6",children:p.jsx(uo,{className:"h-6 w-6 text-[var(--color-input-text)]"})}),E.map((U,L)=>{if(!le(U))return U.kind==="header"?p.jsx($n,{ref:G=>{C.current[L]=G},children:U.label},`header-${L}`):p.jsx(Wn,{ref:G=>{C.current[L]=G}},`divider-${L}`);const V=U.value===a;return p.jsx(Bn,{...H({ref(G){C.current[L]=G}}),onClick:()=>W(L),selected:V,active:T===L,disabled:U.disabled,children:U.label},String(U.value))})]})]})})]}),p.jsx(De,{children:i}),p.jsx(Re,{children:c})]})})},e0=(e,t)=>{const[n,i]=S.useState(e);return S.useEffect(()=>{const r=setTimeout(()=>{i(e)},t);return()=>{clearTimeout(r)}},[e,t]),n},t0=e=>{const{className:t,label:n,description:i,onChange:r,fetchOptionsByQuery:s,fetchOptionByValue:o,onSearchDebounceMs:a=300,value:l,placeholder:u,maxHeight:c=300,error:d,size:f="md"}=e,[m,h]=S.useState(!1),g=j.useRef(null),[y,v]=S.useState(""),[T,w]=S.useState([]),[k,b]=S.useState(null),C=j.useRef(null),[R,E]=S.useState(!1),[I,_]=S.useState(!1),[N,Z]=S.useState(null),H=j.useRef([]),W=S.useMemo(()=>T.map((D,M)=>!le(D)||D.disabled?M:-1).filter(D=>D!==-1),[T]);Rt(m,()=>h(!1));const J=e0(y,a);S.useEffect(()=>{(async()=>{E(!0);const M=await s(J);w(M),E(!1)})()},[J,s]),S.useEffect(()=>{if(l==null){b(null);return}const D=T?.find(M=>le(M)&&M.value===l);D?b(D):(async()=>{_(!0);const z=await o(l);b(z),_(!1)})()},[o,T,l]),S.useEffect(()=>{m?setTimeout(()=>C.current?.focus(),100):(Z(null),v(""))},[m]),S.useEffect(()=>{if(!m)return;const D=T.findIndex(M=>le(M)&&!M.disabled);Z(D>=0?D:null)},[T,m]);const{anchorRef:U,Popover:L,getReferenceProps:V,getItemProps:G}=Un({placement:"bottom",fullWidth:!0,onOutsideClick:()=>h(!1),open:m,onOpenChange:h,listRef:H,activeIndex:N,onNavigate:Z,disabledIndices:W}),x=D=>{const M=T[D];M&&le(M)&&!M.disabled&&(r(M.value),h(!1))},P=T.some(D=>le(D));return p.jsx(tt.Provider,{value:f,children:p.jsxs("div",{className:q("flex flex-col",t),children:[p.jsx(qe,{children:n}),p.jsxs("div",{className:"relative flex w-full flex-col",ref:U,children:[p.jsxs("div",{...V({ref:g,role:"button",tabIndex:0,onClick:()=>h(!m),onKeyDown:D=>{D.key===" "?(D.preventDefault(),h(M=>!M)):D.key==="Enter"&&!m&&(D.preventDefault(),h(!0))}}),className:q("flex flex-row items-center border select-trigger transition-all duration-150 rounded-xl shadow-sm ring-0 focus:ring-4 focus:outline-none select-none",at[f],Qe[f],ft[f],l?pi[f]:mt[f],d&&"select-trigger-error",m&&"ring-4"),children:[!I&&k&&p.jsx("span",{className:"flex-1 min-w-0 break-all line-clamp-1 text-left",children:k.label}),!I&&!k&&u&&p.jsx("span",{className:"flex-1 min-w-0 break-all line-clamp-1 text-left select-placeholder",children:u}),I&&p.jsx(Jt,{className:"h-4 w-4 text-[var(--color-input-text)]"})]}),p.jsxs(lt,{children:[d&&p.jsx(et,{}),!!l&&p.jsx(He,{Icon:ht,onClick:()=>r(null)}),p.jsx(He,{Icon:Qt})]}),p.jsx(L,{open:m,children:p.jsxs(gt,{className:"gap-0 !p-0",style:{maxHeight:c},children:[p.jsxs("div",{className:"sticky top-0 border-b select-search-bar py-1 backdrop-blur-sm",children:[p.jsx("input",{ref:C,type:"text",placeholder:"Search",value:y,className:"appearance-none border-none w-full bg-transparent rounded- pl-10 transition-all duration-150 focus:outline-none ring-0 placeholder:text-[var(--color-input-placeholder)]",onChange:D=>v(D.target.value),onKeyDown:D=>{D.key==="Enter"&&N!=null&&(D.preventDefault(),x(N))}}),p.jsx(mi,{className:"absolute select-search-icon left-4 top-4 h-4 w-4"})]}),p.jsxs("div",{className:"flex flex-col gap-1 p-2",children:[!R&&!P&&p.jsx("div",{className:"flex flex-col items-center justify-center py-6",children:p.jsx(uo,{className:"h-6 w-6 text-[var(--color-input-text)]"})}),R&&p.jsx("div",{className:"flex flex-col items-center justify-center py-6",children:p.jsx(Jt,{className:"h-6 w-6 text-[var(--color-input-text)]"})}),!R&&T.map((D,M)=>{if(!le(D))return D.kind==="header"?p.jsx($n,{ref:K=>{H.current[M]=K},children:D.label},`header-${M}`):p.jsx(Wn,{ref:K=>{H.current[M]=K}},`divider-${M}`);const z=D.value===l;return p.jsx(Bn,{...G({ref(K){H.current[M]=K}}),onClick:()=>x(M),selected:z,active:N===M,disabled:D.disabled,children:D.label},String(D.value))})]})]})})]}),p.jsx(De,{children:i}),p.jsx(Re,{children:d})]})})},ld={red:"bg-red-100 text-red-700 ring-red-200 dark:bg-red-950 dark:text-red-300 dark:ring-red-800",orange:"bg-orange-100 text-orange-700 ring-orange-200 dark:bg-orange-950 dark:text-orange-300 dark:ring-orange-800",amber:"bg-amber-100 text-amber-700 ring-amber-200 dark:bg-amber-950 dark:text-amber-300 dark:ring-amber-800",yellow:"bg-yellow-100 text-yellow-700 ring-yellow-200 dark:bg-yellow-950 dark:text-yellow-300 dark:ring-yellow-800",lime:"bg-lime-100 text-lime-700 ring-lime-200 dark:bg-lime-950 dark:text-lime-300 dark:ring-lime-800",green:"bg-green-100 text-green-700 ring-green-200 dark:bg-green-950 dark:text-green-300 dark:ring-green-800",emerald:"bg-emerald-100 text-emerald-700 ring-emerald-200 dark:bg-emerald-950 dark:text-emerald-300 dark:ring-emerald-800",teal:"bg-teal-100 text-teal-700 ring-teal-200 dark:bg-teal-950 dark:text-teal-300 dark:ring-teal-800",cyan:"bg-cyan-100 text-cyan-700 ring-cyan-200 dark:bg-cyan-950 dark:text-cyan-300 dark:ring-cyan-800",sky:"bg-sky-100 text-sky-700 ring-sky-200 dark:bg-sky-950 dark:text-sky-300 dark:ring-sky-800",blue:"bg-blue-100 text-blue-700 ring-blue-200 dark:bg-blue-950 dark:text-blue-300 dark:ring-blue-800",indigo:"bg-indigo-100 text-indigo-700 ring-indigo-200 dark:bg-indigo-950 dark:text-indigo-300 dark:ring-indigo-800",violet:"bg-violet-100 text-violet-700 ring-violet-200 dark:bg-violet-950 dark:text-violet-300 dark:ring-violet-800",purple:"bg-purple-100 text-purple-700 ring-purple-200 dark:bg-purple-950 dark:text-purple-300 dark:ring-purple-800",fuchsia:"bg-fuchsia-100 text-fuchsia-700 ring-fuchsia-200 dark:bg-fuchsia-950 dark:text-fuchsia-300 dark:ring-fuchsia-800",pink:"bg-pink-100 text-pink-700 ring-pink-200 dark:bg-pink-950 dark:text-pink-300 dark:ring-pink-800",rose:"bg-rose-100 text-rose-700 ring-rose-200 dark:bg-rose-950 dark:text-rose-300 dark:ring-rose-800",slate:"bg-slate-100 text-slate-700 ring-slate-200 dark:bg-slate-950 dark:text-slate-300 dark:ring-slate-800",gray:"bg-gray-100 text-gray-700 ring-gray-200 dark:bg-gray-950 dark:text-gray-300 dark:ring-gray-800",zinc:"bg-zinc-100 text-zinc-700 ring-zinc-200 dark:bg-zinc-950 dark:text-zinc-300 dark:ring-zinc-800",neutral:"bg-neutral-100 text-neutral-700 ring-neutral-200 dark:bg-neutral-950 dark:text-neutral-300 dark:ring-neutral-800",stone:"bg-stone-100 text-stone-700 ring-stone-200 dark:bg-stone-950 dark:text-stone-300 dark:ring-stone-800",white:"bg-[var(--color-badge-white-bg)] text-[var(--color-badge-white-text)] ring-[var(--color-badge-white-ring)]",black:"bg-[var(--color-badge-black-bg)] text-[var(--color-badge-black-text)] ring-[var(--color-badge-black-ring)]"},qn=j.forwardRef((e,t)=>{const{className:n,children:i,onClick:r,showCloseIcon:s,Icon:o,color:a="gray"}=e,l=q("inline-flex align-top items-center gap-2 px-3 h-7 rounded-lg font-semibold",ld[a],n);return r?p.jsx("div",{ref:t,children:p.jsxs("button",{className:q("cursor-pointer ring-0 hover:ring-4 active:ring-1 transition-all duration-100 select-none focus:outline-none focus:ring-4",l),onClick:r,children:[o&&p.jsx(o,{className:"h-4 w-4 shrink-0"}),p.jsx("div",{className:"break-all line-clamp-1 text-left",children:i}),s&&p.jsx(ht,{className:"h-4 w-4 shrink-0"})]})}):p.jsxs("div",{className:l,ref:t,children:[o&&p.jsx(o,{className:"h-4 w-4 shrink-0"}),p.jsx("div",{className:"break-all line-clamp-1 text-left",children:i})]})});function n0(e){const{enabled:t,triggerRef:n,measureRef:i,trayRef:r,itemCount:s,deps:o=[],gap:a=4}=e,[l,u]=S.useState(0);return S.useLayoutEffect(()=>{if(!t)return;const c=n.current,d=i.current;if(!c||!d)return;const f=()=>{if(s===0){u(0);return}if(s===1){u(1);return}const h=window.getComputedStyle(c),g=parseFloat(h.paddingLeft||"0"),y=c.getBoundingClientRect(),v=y.left+g;let T=y.right-parseFloat(h.paddingRight||"0");const w=r?.current;if(w){const _=w.getBoundingClientRect();_.width>0&&(T=Math.min(T,_.left-a))}const k=Math.max(0,T-v),b=Array.from(d.children);if(b.length<s+1)return;let C=0;for(let _=0;_<s;_++)C+=b[_].offsetWidth+(_>0?a:0);if(C<=k){u(s);return}const R=b[s].offsetWidth;let E=0,I=0;for(let _=0;_<s;_++){const N=b[_].offsetWidth,Z=E+N+(_>0?a:0);if(Z+R+a>k)break;E=Z,I++}u(Math.max(1,I))},m=new ResizeObserver(f);return m.observe(c),r?.current&&m.observe(r.current),f(),()=>m.disconnect()},[t,s,...o]),l}const i0=e=>{const{className:t,label:n,description:i,options:r,onChange:s,onSearch:o,value:a,placeholder:l,maxHeight:u=300,error:c,size:d="md",singleLine:f=!1,color:m="blue"}=e,[h,g]=S.useState(!1),[y,v]=S.useState(r),[T,w]=S.useState(""),[k,b]=S.useState(null),C=j.useRef(null),R=j.useRef(null),E=j.useRef([]),I=j.useRef(null),_=j.useRef(null),N=S.useMemo(()=>a.map(A=>r.find(F=>le(F)&&F.value===A)).filter(A=>A!==void 0),[a,r]),Z=A=>{if(A==="")return r;const F=A.toLowerCase();return r.filter(Q=>le(Q)&&typeof Q.label=="string"?Q.label.toLowerCase().includes(F):!0)},H=S.useMemo(()=>T!==""?y:r,[T,y,r]),W=S.useMemo(()=>H.map((A,F)=>!le(A)||A.disabled?F:-1).filter(A=>A!==-1),[H]);Rt(h,()=>g(!1)),S.useEffect(()=>{v((o??Z)(T))},[T,r,o]),S.useEffect(()=>{if(h){setTimeout(()=>R.current?.focus(),100);const A=r.findIndex(F=>le(F)&&!F.disabled);b(A>=0?A:null)}else b(null),w("")},[h]),S.useEffect(()=>{if(!h)return;const A=H.findIndex(F=>le(F)&&!F.disabled);b(A>=0?A:null)},[T,h,H]);const J=n0({enabled:f,triggerRef:C,measureRef:I,trayRef:_,itemCount:N.length,deps:[N,c]}),{anchorRef:U,Popover:L,getReferenceProps:V,getItemProps:G}=Un({placement:"bottom",fullWidth:!0,onOutsideClick:()=>g(!1),open:h,onOpenChange:g,listRef:E,activeIndex:k,onNavigate:b,disabledIndices:W}),x=A=>{a.includes(A)?s(a.filter(F=>F!==A)):s([...a,A])},P=A=>{const F=H[A];F&&le(F)&&!F.disabled&&x(F.value)},D=H.some(A=>le(A)),M=a.length>0,z=f?J:N.length,K=N.slice(0,z),X=N.length-z;return p.jsx(tt.Provider,{value:d,children:p.jsxs("div",{className:q("flex flex-col",t),children:[p.jsx(qe,{children:n}),p.jsxs("div",{className:"relative flex w-full flex-col",ref:U,children:[p.jsxs("div",{...V({ref:C,role:"button",tabIndex:0,onClick:()=>g(!h),onKeyDown:A=>{A.key===" "?(A.preventDefault(),g(F=>!F)):A.key==="Enter"&&!h?(A.preventDefault(),g(!0)):A.key==="Backspace"&&!h&&M&&(A.preventDefault(),s(a.slice(0,-1)))}}),className:q("flex flex-row items-center gap-1 border select-trigger transition-all duration-150 rounded-xl shadow-sm ring-0 focus:ring-4 focus:outline-none select-none",f&&q("flex-nowrap overflow-hidden",at[d]),!f&&q("flex-wrap py-1.5",vc[d]),Qe[d],ft[d],M?pi[d]:mt[d],c&&"select-trigger-error",h&&"ring-4"),children:[M&&K.map(A=>p.jsx(qn,{color:m,className:q(f&&z>1&&"shrink-0",(!f||z===1)&&"max-w-full min-w-0"),children:A.label},String(A.value))),M&&X>0&&p.jsxs("span",{className:"shrink-0 text-sm font-medium select-placeholder px-1",children:["+",X," more"]}),!M&&l&&p.jsx("span",{className:"select-placeholder",children:l})]}),f&&p.jsxs("div",{ref:I,"aria-hidden":!0,className:"absolute top-0 left-0 invisible pointer-events-none flex flex-row flex-nowrap items-center gap-1 w-max",children:[N.map(A=>p.jsx(qn,{color:m,children:A.label},String(A.value))),N.length>0&&p.jsxs("span",{className:"text-sm font-medium px-1",children:["+",N.length," more"]})]}),p.jsxs(lt,{ref:_,children:[c&&p.jsx(et,{}),M&&p.jsx(He,{Icon:ht,onClick:()=>s([])}),p.jsx(He,{Icon:Qt})]}),p.jsx(L,{open:h,children:p.jsxs(gt,{className:"gap-0 !p-0",style:{maxHeight:u},children:[p.jsxs("div",{className:"sticky top-0 border-b select-search-bar py-1 backdrop-blur-sm",children:[p.jsx("input",{ref:R,type:"text",placeholder:"Search",value:T,className:"appearance-none border-none w-full bg-transparent rounded- pl-10 transition-all duration-150 focus:outline-none ring-0 placeholder:text-[var(--color-input-placeholder)]",onChange:A=>w(A.target.value),onKeyDown:A=>{A.key==="Enter"&&k!=null?(A.preventDefault(),P(k)):A.key==="Backspace"&&T===""&&M&&(A.preventDefault(),s(a.slice(0,-1)))}}),p.jsx(mi,{className:"absolute select-search-icon left-4 top-4 h-4 w-4"})]}),p.jsxs("div",{className:"flex flex-col gap-1 p-2",children:[T!==""&&!D&&p.jsx("div",{className:"flex flex-col items-center justify-center py-6",children:p.jsx(uo,{className:"h-6 w-6 text-[var(--color-input-text)]"})}),H.map((A,F)=>{if(!le(A))return A.kind==="header"?p.jsx($n,{ref:ee=>{E.current[F]=ee},children:A.label},`header-${F}`):p.jsx(Wn,{ref:ee=>{E.current[F]=ee}},`divider-${F}`);const Q=a.includes(A.value);return p.jsx(Bn,{...G({ref(ee){E.current[F]=ee}}),onClick:()=>P(F),selected:Q,active:k===F,disabled:A.disabled,children:A.label},String(A.value))})]})]})})]}),p.jsx(De,{children:i}),p.jsx(Re,{children:c})]})})},r0=j.forwardRef((e,t)=>{const{className:n,children:i,...r}=e;return p.jsx("div",{ref:t,className:q("flex flex-col gap-6 border panel-base rounded-2xl shadow-sm px-6 py-6",n),...r,children:i})}),o0=j.forwardRef((e,t)=>{const{className:n,children:i,...r}=e;return p.jsx("div",{ref:t,className:q("flex flex-col gap-1 border panel-base rounded-2xl shadow-sm p-2",n),...r,children:i})}),cd="input-description text-sm font-medium",s0=e=>{const{className:t,label:n,children:i,orientation:r="vertical",...s}=e;return r==="horizontal"?p.jsxs("div",{className:q("flex flex-row items-center gap-3 px-3 py-2",t),...s,children:[p.jsx("div",{className:q(cd,"w-1/2 line-clamp-1 break-all"),children:n}),p.jsx("div",{className:"w-1/2 line-clamp-1 break-all",children:i})]}):p.jsxs("div",{className:q("flex flex-col gap-1 px-3 py-2",t),...s,children:[n&&p.jsx("div",{className:cd,children:n}),p.jsx("div",{children:i})]})},a0={error:fo,warning:Cg,success:po,info:Pg},l0={error:"text-[var(--color-status-error)]",warning:"text-[var(--color-status-warning)]",success:"text-[var(--color-status-success)]",info:"text-[var(--color-status-info)]"},ud="inline-flex flex-row gap-3 items-center justify-between h-10 px-3 font-semibold ring-0 dropdown-item rounded-lg cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-0 border border-transparent bg-transparent",c0=e=>{const{className:t,children:n,Icon:i,status:r,...s}=e,o=r?a0[r]:null,a=p.jsxs(p.Fragment,{children:[p.jsxs("span",{className:"inline-flex flex-row items-center gap-3 min-w-0",children:[i&&p.jsx(i,{className:"h-5 w-5 shrink-0"}),p.jsx("span",{className:"truncate",children:n})]}),p.jsxs("span",{className:"inline-flex flex-row items-center gap-2 shrink-0",children:[o&&r&&p.jsx(o,{className:q("h-5 w-5",l0[r])}),p.jsx(bg,{className:"h-5 w-5 text-[var(--color-input-icon-button-icon)]"})]})]});if(s.href!==void 0){const{href:l,...u}=s;return p.jsx("a",{href:l,className:q(ud,t),...u,children:a})}return p.jsx("button",{className:q(ud,t),...s,children:a})},u0=e=>{const{className:t,vertical:n=!1,...i}=e;return p.jsx("div",{className:q(n?"w-px h-full bg-[var(--color-divider)]":"w-full h-px bg-[var(--color-divider)]",t),...i})},d0=e=>{const{children:t,content:n,className:i,placement:r="top",minWidth:s=100,maxWidth:o=200}=e,[a,l]=S.useState(!1),{anchorRef:u,Popover:c}=Oi({placement:r,minWidth:s,maxWidth:o});return p.jsxs("span",{ref:u,className:i,onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:[t,p.jsx(c,{open:a,children:p.jsx(gt,{children:n})})]})},p0=e=>{const{open:t,onDismiss:n,enableDismissOnOutsideClick:i,enableDismissOnEscKey:r,enableDismissButton:s,className:o,children:a,maxWidth:l=600}=e;return Rt(!!r&&t,n||(()=>{})),p.jsx(ii,{children:t&&p.jsxs(Mo,{children:[p.jsx(Je.div,{style:{transformOrigin:"center"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15,ease:"easeInOut"},children:p.jsx(No,{className:"modal-overlay backdrop-blur-[1px] z-10",onClick:i?n:void 0,lockScroll:!0})}),p.jsx("div",{className:"fixed inset-0 flex flex-col items-center pointer-events-none p-4 lg:p-12 overflow-y-auto z-20",children:p.jsxs(Je.div,{className:q("flex flex-col modal-content rounded-2xl shadow-xl p-6 lg:p-12 pointer-events-auto w-full relative",o),style:{transformOrigin:"bottom",maxWidth:l},initial:{opacity:0,scale:.98,translateY:10},animate:{opacity:1,scale:1,translateY:0},exit:{opacity:0,scale:.98,translateY:10},transition:{duration:.15,ease:"easeInOut"},children:[s&&p.jsx(co,{Icon:ht,className:"absolute top-4 right-4",variant:"transparent",size:"sm",onClick:n}),a]})})]})})},f0=e=>{const{open:t,onDismiss:n,enableDismissOnOutsideClick:i,enableDismissOnEscKey:r,enableDismissButton:s,className:o,children:a,maxWidth:l=480}=e;return Rt(!!r&&t,n||(()=>{})),p.jsx(ii,{children:t&&p.jsxs(Mo,{children:[p.jsx(Je.div,{style:{transformOrigin:"center"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15,ease:"easeInOut"},children:p.jsx(No,{className:"modal-overlay backdrop-blur-[1px] z-10",onClick:i?n:void 0,lockScroll:!0})}),p.jsx("div",{className:"fixed inset-0 flex flex-row justify-end pointer-events-none z-20",children:p.jsxs(Je.div,{className:q("flex flex-col modal-content shadow-xl p-6 lg:p-12 pointer-events-auto h-full w-full overflow-y-auto relative",o),style:{maxWidth:l},initial:{translateX:"100%"},animate:{translateX:0},exit:{translateX:"100%"},transition:{duration:.25,ease:[.32,.72,0,1]},children:[s&&p.jsx(co,{Icon:ht,className:"absolute top-4 right-4",variant:"transparent",size:"sm",onClick:n}),a]})})]})})},dd=e=>{const{className:t,tabs:n}=e;return p.jsx("div",{className:q("h-12 tab-container p-1 rounded-xl inline-flex flex-row space-x-1 overflow-x-auto mat-ui-hide-scrollbars",t),children:n.map((i,r)=>{const s=q("shrink-0 px-4 h-full inline-flex flex-row items-center font-semibold rounded-xl cursor-pointer border border-transparent ing-0 tab-button transition-all duration-150 select-none focus:outline-none focus:ring-0",i.active&&"tab-button-active shadow-sm");return i.href?p.jsxs("a",{href:i.href,className:s,children:[i.Icon&&p.jsx(i.Icon,{className:"h-5 w-5 shrink-0 mr-2 -ml-1"}),i.label]},r):p.jsxs("button",{className:s,onClick:i.onClick,children:[i.Icon&&p.jsx(i.Icon,{className:"h-5 w-5 shrink-0 mr-2 -ml-1"}),i.label]},r)})})},m0=e=>{const{duration:t=.3,ease:n="easeInOut",horizontal:i=!1,children:r,className:s,...o}=e,a=j.useRef(null),l=j.useRef(null),u=j.useRef(null);return j.useEffect(()=>{const c=a.current,d=l.current;if(!c||!d)return;let f=!0;const m=()=>{const g=i?c.scrollWidth-c.clientWidth:c.scrollHeight-c.clientHeight,y=i?c.scrollLeft:c.scrollTop;if(!(g<=0||Math.abs(g-y)<1)){if(f){f=!1,i?c.scrollLeft=g:c.scrollTop=g;return}u.current?.stop(),u.current=ag(y,g,{duration:t,ease:n,onUpdate:v=>{i?c.scrollLeft=v:c.scrollTop=v}})}},h=new ResizeObserver(m);return h.observe(d),()=>{h.disconnect(),u.current?.stop()}},[t,n,i]),p.jsx("div",{ref:a,className:q("min-h-0 min-w-0",i?"overflow-x-auto":"overflow-y-auto",s),...o,children:p.jsx("div",{ref:l,children:r})})};function h0(e){const{onDelta:t,onDragStart:n,onDragEnd:i,disabled:r=!1,primaryButtonOnly:s=!0,preventScrollOnMove:o=!0}=e,[a,l]=j.useState(!1),u=j.useRef(!1),c=j.useRef(0),d=j.useRef(0),f=j.useRef(0),m=j.useRef(null),h=j.useRef(null),g=j.useRef({onDelta:t,onDragStart:n,onDragEnd:i,preventScrollOnMove:o});j.useEffect(()=>{g.current={onDelta:t,onDragStart:n,onDragEnd:i,preventScrollOnMove:o}});const y=j.useRef({}),v=j.useCallback(w=>{if(!u.current)return;const k={clientX:w??d.current,startX:c.current,totalDeltaX:f.current,target:m.current};u.current=!1,l(!1);const{move:b,up:C,keydown:R}=y.current;b&&window.removeEventListener("pointermove",b,!0),C&&(window.removeEventListener("pointerup",C,!0),window.removeEventListener("pointercancel",C,!0)),R&&window.removeEventListener("keydown",R,!0),y.current={},h.current!=null&&(cancelAnimationFrame(h.current),h.current=null),g.current.onDragEnd?.(k),m.current=null,f.current=0},[]),T=j.useCallback(w=>{if(r||s&&w.button!==0)return;w.target.setPointerCapture?.(w.pointerId),c.current=w.clientX,d.current=w.clientX,f.current=0,m.current=w.target,u.current=!0,l(!0);const k={clientX:w.clientX,startX:w.clientX,totalDeltaX:0,target:w.target};g.current.onDragStart?.(k);const b=E=>{u.current&&h.current==null&&(h.current=requestAnimationFrame(()=>{h.current=null;const I=E.clientX,_=I-d.current;if(_===0)return;d.current=I,f.current+=_;const N={clientX:I,startX:c.current,totalDeltaX:f.current,target:m.current};g.current.preventScrollOnMove&&E.preventDefault(),g.current.onDelta(_,N)}))},C=E=>{v(E.clientX)},R=E=>{E.key==="Escape"&&(E.preventDefault(),v())};y.current={move:b,up:C,keydown:R},window.addEventListener("pointermove",b,{passive:!o,capture:!0}),window.addEventListener("pointerup",C,{capture:!0}),window.addEventListener("pointercancel",C,{capture:!0}),window.addEventListener("keydown",R,!0)},[v,r,o,s]);return j.useEffect(()=>()=>{u.current&&v()},[v]),{isDragging:a,bind:{onPointerDown:T,role:"separator",style:{touchAction:"none",cursor:"col-resize",userSelect:"none"}}}}const pd=e=>{const{column:t,width:n,height:i,onResize:r,sortDirection:s,onSortClick:o}=e,a=!!t.sortable,{bind:l}=h0({onDelta:u=>r(u)});return p.jsxs("div",{style:{width:n,height:i},className:"flex flex-row items-stretch select-none shrink-0",children:[p.jsxs("div",{className:q("flex-1 min-w-0 px-4 table-header-cell transition-colors duration-100 flex flex-row items-center gap-2",a&&"cursor-pointer"),onClick:a?o:void 0,children:[p.jsx("span",{className:"truncate",children:t.header}),a&&s==="asc"&&p.jsx(wg,{className:"h-4 w-4 shrink-0"}),a&&s==="desc"&&p.jsx(Qt,{className:"h-4 w-4 shrink-0"})]}),p.jsx("div",{...l,className:"cursor-ew-resize group py-4 table-resize-handle w-[8px]",children:p.jsx("div",{className:"w-0.5 h-full mx-auto table-resize-divider table-resize-divider-hover pointer-events-none"})})]})},an=200,g0=60,v0=e=>{const t={};for(const n of e)t[n.id]=n.defaultWidth??an;return t},fd=e=>{const{columns:t,rows:n,getRowId:i,onRowClick:r,sort:s,onSortChange:o,className:a,rowHeight:l=44,headerHeight:u=44}=e,[c,d]=S.useState(()=>v0(t));S.useEffect(()=>{d(v=>{const T={};let w=Object.keys(v).length!==t.length;for(const k of t)k.id in v?T[k.id]=v[k.id]:(T[k.id]=k.defaultWidth??an,w=!0);return w?T:v})},[t]);const f=S.useCallback((v,T,w)=>{d(k=>{const b=k[v]??an,C=Math.max(w,b+T);return C===b?k:{...k,[v]:C}})},[]),m=S.useCallback(v=>{if(o){if(!s||s.columnId!==v){o({columnId:v,direction:"asc"});return}if(s.direction==="asc"){o({columnId:v,direction:"desc"});return}o(null)}},[s,o]),h=t.reduce((v,T)=>v+(c[T.id]??T.defaultWidth??an),0),g=S.useRef(null),y=v=>{g.current&&(g.current.scrollLeft=v.currentTarget.scrollLeft)};return p.jsxs("div",{className:q("flex flex-col h-full w-full",a),children:[p.jsx("div",{ref:g,className:"overflow-hidden shrink-0 table-header-strip",style:{height:u},children:p.jsx("div",{className:"flex flex-row table-header font-medium",style:{width:h,minWidth:"100%"},children:t.map(v=>p.jsx(pd,{column:v,width:c[v.id]??v.defaultWidth??an,height:u,onResize:T=>f(v.id,T,v.minWidth??g0),sortDirection:s?.columnId===v.id?s.direction:null,onSortClick:()=>m(v.id)},v.id))})}),p.jsx("div",{className:"flex-1 overflow-auto",onScroll:y,children:p.jsx("div",{className:"flex flex-col",style:{width:h,minWidth:"100%"},children:n.map((v,T)=>p.jsx("div",{className:q("flex flex-row table-body-row transition-colors duration-100",r&&"cursor-pointer"),onClick:r?()=>r(v,T):void 0,children:t.map(w=>p.jsx("div",{className:"shrink-0 content-center px-4 relative",style:{width:c[w.id]??w.defaultWidth??an,height:l},children:p.jsx("div",{className:"break-all line-clamp-1",children:w.renderCell(v,T)})},w.id))},i(v,T)))})})]})},md=S.createContext(void 0),x0=()=>({dismiss:S.useContext(md)||(()=>{})}),y0="inline-flex flex-row items-center gap-3 h-10 px-3 font-semibold ring-0 dropdown-item rounded-lg cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-0 border border-transparent bg-transparent",Ie=j.forwardRef((e,t)=>{const{className:n,children:i,Icon:r,onClick:s,dismissOnClick:o=!0,...a}=e,{dismiss:l}=x0(),u=c=>{s&&s(c),o&&l()};return p.jsxs("button",{ref:t,className:q(y0,n),onClick:u,...a,children:[r&&p.jsx(r,{className:"h-5 w-5"}),i]})}),rs=e=>{const{label:t,children:n,className:i}=e;return p.jsxs("div",{className:q("flex flex-col dropdown-button-group",i),children:[t&&p.jsx("div",{className:"mb-2 text-sm dropdown-group-label font-semibold px-3",children:t}),n]})},os=e=>{const{trigger:t,children:n,placement:i="bottom-end",minWidth:r=200,className:s}=e,[o,a]=S.useState(!1),{Popover:l,anchorRef:u}=Oi({placement:i,onOutsideClick:()=>a(!1),minWidth:r});return p.jsxs(p.Fragment,{children:[p.jsx("div",{ref:u,className:s,onClick:()=>a(!o),children:t}),p.jsx(l,{open:o,children:p.jsx(gt,{padding:"sm",children:p.jsx(md.Provider,{value:()=>a(!1),children:n})})})]})},b0=()=>p.jsx("div",{}),w0=[{id:1,email:"sarah.jennings@example.com",firstname:"Sarah",lastname:"Jennings",status:"active"},{id:2,email:"liam.patel@outlook.com",firstname:"Liam",lastname:"Patel",status:"inactive"},{id:3,email:"emily.wong@gmail.com",firstname:"Emily",lastname:"Wong",status:"active"},{id:4,email:"noah.thompson@yahoo.com",firstname:"Noah",lastname:"Thompson",status:"active"},{id:5,email:"isabella.martin@protonmail.com",firstname:"Isabella",lastname:"Martin",status:"active"},{id:6,email:"ethan.ross@company.io",firstname:"Ethan",lastname:"Ross",status:"inactive"},{id:7,email:"olivia.nguyen@example.org",firstname:"Olivia",lastname:"Nguyen",status:"active"},{id:8,email:"lucas.henderson@gmail.com",firstname:"Lucas",lastname:"Henderson",status:"inactive"},{id:9,email:"mia.johnson@workmail.com",firstname:"Mia",lastname:"Johnson",status:"active"},{id:10,email:"jackson.rivera@outlook.com",firstname:"Jackson",lastname:"Rivera",status:"active"},{id:11,email:"ava.sanders@example.com",firstname:"Ava",lastname:"Sanders",status:"active"},{id:12,email:"logan.bennett@company.io",firstname:"Logan",lastname:"Bennett",status:"inactive"}],T0=[{id:"id",header:"ID",renderCell:e=>e.id},{id:"email",header:"Email",renderCell:e=>p.jsx(qn,{Icon:Ag,onClick:()=>{},children:e.email})},{id:"firstname",header:"First Name",renderCell:e=>e.firstname},{id:"lastname",header:"Last Name",renderCell:e=>e.lastname},{id:"status",header:"Status",renderCell:()=>p.jsx(k0,{})}],S0=()=>p.jsxs("div",{className:"flex flex-col gap-6",children:[p.jsxs("div",{className:"flex flex-row items-center justify-start gap-3",children:[p.jsx(mo,{Icon:mi,placeholder:"Search..."}),p.jsx(fi,{Icon:kc}),p.jsx(wc,{Icon:Sc,children:"New"}),p.jsxs(os,{trigger:p.jsx(fi,{Icon:kc}),children:[p.jsx(Ie,{dismissOnClick:!1,Icon:Sc,children:"Add new"}),p.jsx(Ie,{Icon:jg,children:"Remove"}),p.jsxs(rs,{label:"Test",className:"mt-2",children:[p.jsx(Ie,{children:"Item 1"}),p.jsx(Ie,{children:"Item 2"}),p.jsx(Ie,{children:"Item 3"}),p.jsx(Ie,{children:"Item 4"})]}),p.jsxs(rs,{label:"Test",className:"mt-2",children:[p.jsx(Ie,{children:"Item 1"}),p.jsx(Ie,{children:"Item 2"}),p.jsx(Ie,{children:"Item 3"}),p.jsx(Ie,{children:"Item 4"})]})]}),p.jsx(dd,{tabs:[{label:"Tab 1",Icon:Tc,active:!0,onClick:()=>{}},{label:"Tab 2",active:!1,onClick:()=>{}},{label:"Tab 3",Icon:Tc,active:!1,onClick:()=>{}}]})]}),p.jsx(ad,{options:[{label:"Option 1",value:1},{label:"Option 2",value:2},{label:"Option 3",value:3}],value:null,onChange:()=>{}}),p.jsx(fd,{className:"h-[300px] w-[300px]",columns:T0,rows:w0,getRowId:e=>e.id}),p.jsx(b0,{})]}),k0=()=>p.jsx(p.Fragment,{children:p.jsxs(os,{placement:"bottom-end",className:"inline-block",trigger:p.jsx(qn,{onClick:()=>{},children:"Test"}),children:[p.jsx(Ie,{children:"Option 1"}),p.jsx(Ie,{children:"Option 2"}),p.jsx(Ie,{children:"Option 3"})]})});Y.AutoScroll=m0,Y.Badge=qn,Y.BadgeColor=ld,Y.Button=wc,Y.ButtonIconRound=co,Y.ButtonIconSquare=fi,Y.Divider=u0,Y.DropdownButton=Ie,Y.DropdownButtonGroup=rs,Y.DropdownMenu=os,Y.DropdownPanel=gt,Y.Input=mo,Y.InputCheck=$x,Y.InputColor=Mx,Y.InputDescription=De,Y.InputError=Re,Y.InputErrorIcon=et,Y.InputFileMultiple=Zy,Y.InputFileSingle=Gy,Y.InputIconButton=He,Y.InputIconButtonTray=lt,Y.InputLabel=qe,Y.InputPassword=Nx,Y.InputRadio=zx,Y.InputSelect=ad,Y.InputSelectDivider=Wn,Y.InputSelectGroupHeader=$n,Y.InputSelectMultiple=i0,Y.InputSelectNative=Jy,Y.InputSelectOption=Bn,Y.InputSelectSearchable=Qy,Y.InputSelectSearchableAsync=t0,Y.InputTextArea=_x,Y.InputToggle=Bx,Y.Modal=p0,Y.Panel=r0,Y.PanelField=s0,Y.PanelLink=c0,Y.PanelStack=o0,Y.PopoverBase=Lo,Y.SidebarModal=f0,Y.Spinner=Jt,Y.TabButtons=dd,Y.Table=fd,Y.TableColumnHead=pd,Y.Test=S0,Y.Tooltip=d0,Y.UploadFileTile=sd,Y.isSelectOption=le,Y.usePopover=Oi,Y.useSelectPopover=Un,Object.defineProperty(Y,Symbol.toStringTag,{value:"Module"})}));
183
183
  //# sourceMappingURL=index.umd.cjs.map