@matthiaskrijgsman/mat-ui 0.0.16 → 0.0.18

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(R,T){typeof exports=="object"&&typeof module<"u"?T(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],T):(R=typeof globalThis<"u"?globalThis:R||self,T(R.MatUI={},R.React,R.ReactDOM))})(this,(function(R,T,Ka){"use strict";function ni(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const S=ni(T),si=ni(Ka);var Nt={exports:{}},ct={};/**
1
+ (function(D,T){typeof exports=="object"&&typeof module<"u"?T(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],T):(D=typeof globalThis<"u"?globalThis:D||self,T(D.MatUI={},D.React,D.ReactDOM))})(this,(function(D,T,el){"use strict";function ci(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const C=ci(T),ui=ci(el);var zt={exports:{}},pt={};/**
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 ii;function Xa(){if(ii)return ct;ii=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(s,i,o){var r=null;if(o!==void 0&&(r=""+o),i.key!==void 0&&(r=""+i.key),"key"in i){o={};for(var a in i)a!=="key"&&(o[a]=i[a])}else o=i;return i=o.ref,{$$typeof:e,type:s,key:r,ref:i!==void 0?i:null,props:o}}return ct.Fragment=t,ct.jsx=n,ct.jsxs=n,ct}var ut={};/**
9
+ */var di;function tl(){if(di)return pt;di=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(s,i,o){var r=null;if(o!==void 0&&(r=""+o),i.key!==void 0&&(r=""+i.key),"key"in i){o={};for(var a in i)a!=="key"&&(o[a]=i[a])}else o=i;return i=o.ref,{$$typeof:e,type:s,key:r,ref:i!==void 0?i:null,props:o}}return pt.Fragment=t,pt.jsx=n,pt.jsxs=n,pt}var gt={};/**
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 ri;function Ya(){return ri||(ri=1,process.env.NODE_ENV!=="production"&&(function(){function e(w){if(w==null)return null;if(typeof w=="function")return w.$$typeof===I?null:w.displayName||w.name||null;if(typeof w=="string")return w;switch(w){case y:return"Fragment";case v:return"Profiler";case x:return"StrictMode";case C:return"Suspense";case P:return"SuspenseList";case V:return"Activity"}if(typeof w=="object")switch(typeof w.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),w.$$typeof){case p:return"Portal";case g:return(w.displayName||"Context")+".Provider";case b:return(w._context.displayName||"Context")+".Consumer";case E:var D=w.render;return w=w.displayName,w||(w=D.displayName||D.name||"",w=w!==""?"ForwardRef("+w+")":"ForwardRef"),w;case k:return D=w.displayName||null,D!==null?D:e(w.type)||"Memo";case A:D=w._payload,w=w._init;try{return e(w(D))}catch{}}return null}function t(w){return""+w}function n(w){try{t(w);var D=!1}catch{D=!0}if(D){D=console;var $=D.error,G=typeof Symbol=="function"&&Symbol.toStringTag&&w[Symbol.toStringTag]||w.constructor.name||"Object";return $.call(D,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",G),t(w)}}function s(w){if(w===y)return"<>";if(typeof w=="object"&&w!==null&&w.$$typeof===A)return"<...>";try{var D=e(w);return D?"<"+D+">":"<...>"}catch{return"<...>"}}function i(){var w=U.A;return w===null?null:w.getOwner()}function o(){return Error("react-stack-top-frame")}function r(w){if(se.call(w,"key")){var D=Object.getOwnPropertyDescriptor(w,"key").get;if(D&&D.isReactWarning)return!1}return w.key!==void 0}function a(w,D){function $(){xe||(xe=!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)",D))}$.isReactWarning=!0,Object.defineProperty(w,"key",{get:$,configurable:!0})}function l(){var w=e(this.type);return de[w]||(de[w]=!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.")),w=this.props.ref,w!==void 0?w:null}function u(w,D,$,G,De,be,Qs,ei){return $=be.ref,w={$$typeof:m,type:w,key:D,props:be,_owner:De},($!==void 0?$:null)!==null?Object.defineProperty(w,"ref",{enumerable:!1,get:l}):Object.defineProperty(w,"ref",{enumerable:!1,value:null}),w._store={},Object.defineProperty(w._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(w,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(w,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Qs}),Object.defineProperty(w,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ei}),Object.freeze&&(Object.freeze(w.props),Object.freeze(w)),w}function c(w,D,$,G,De,be,Qs,ei){var q=D.children;if(q!==void 0)if(G)if(O(q)){for(G=0;G<q.length;G++)d(q[G]);Object.freeze&&Object.freeze(q)}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(q);if(se.call(D,"key")){q=e(w);var lt=Object.keys(D).filter(function(zm){return zm!=="key"});G=0<lt.length?"{key: someKey, "+lt.join(": ..., ")+": ...}":"{key: someKey}",J[q+G]||(lt=0<lt.length?"{"+lt.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
17
+ */var fi;function nl(){return fi||(fi=1,process.env.NODE_ENV!=="production"&&(function(){function e(w){if(w==null)return null;if(typeof w=="function")return w.$$typeof===V?null:w.displayName||w.name||null;if(typeof w=="string")return w;switch(w){case v:return"Fragment";case p:return"Profiler";case b:return"StrictMode";case S:return"Suspense";case A:return"SuspenseList";case N:return"Activity"}if(typeof w=="object")switch(typeof w.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),w.$$typeof){case g:return"Portal";case y:return(w.displayName||"Context")+".Provider";case x:return(w._context.displayName||"Context")+".Consumer";case P:var M=w.render;return w=w.displayName,w||(w=M.displayName||M.name||"",w=w!==""?"ForwardRef("+w+")":"ForwardRef"),w;case k:return M=w.displayName||null,M!==null?M:e(w.type)||"Memo";case E:M=w._payload,w=w._init;try{return e(w(M))}catch{}}return null}function t(w){return""+w}function n(w){try{t(w);var M=!1}catch{M=!0}if(M){M=console;var W=M.error,G=typeof Symbol=="function"&&Symbol.toStringTag&&w[Symbol.toStringTag]||w.constructor.name||"Object";return W.call(M,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",G),t(w)}}function s(w){if(w===v)return"<>";if(typeof w=="object"&&w!==null&&w.$$typeof===E)return"<...>";try{var M=e(w);return M?"<"+M+">":"<...>"}catch{return"<...>"}}function i(){var w=F.A;return w===null?null:w.getOwner()}function o(){return Error("react-stack-top-frame")}function r(w){if(ie.call(w,"key")){var M=Object.getOwnPropertyDescriptor(w,"key").get;if(M&&M.isReactWarning)return!1}return w.key!==void 0}function a(w,M){function W(){X||(X=!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)",M))}W.isReactWarning=!0,Object.defineProperty(w,"key",{get:W,configurable:!0})}function l(){var w=e(this.type);return re[w]||(re[w]=!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.")),w=this.props.ref,w!==void 0?w:null}function u(w,M,W,G,De,be,oi,ai){return W=be.ref,w={$$typeof:m,type:w,key:M,props:be,_owner:De},(W!==void 0?W:null)!==null?Object.defineProperty(w,"ref",{enumerable:!1,get:l}):Object.defineProperty(w,"ref",{enumerable:!1,value:null}),w._store={},Object.defineProperty(w._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(w,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(w,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:oi}),Object.defineProperty(w,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ai}),Object.freeze&&(Object.freeze(w.props),Object.freeze(w)),w}function c(w,M,W,G,De,be,oi,ai){var q=M.children;if(q!==void 0)if(G)if(ne(q)){for(G=0;G<q.length;G++)d(q[G]);Object.freeze&&Object.freeze(q)}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(q);if(ie.call(M,"key")){q=e(w);var mt=Object.keys(M).filter(function(op){return op!=="key"});G=0<mt.length?"{key: someKey, "+mt.join(": ..., ")+": ...}":"{key: someKey}",J[q+G]||(mt=0<mt.length?"{"+mt.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} />`,G,q,lt,q),J[q+G]=!0)}if(q=null,$!==void 0&&(n($),q=""+$),r(D)&&(n(D.key),q=""+D.key),"key"in D){$={};for(var ti in D)ti!=="key"&&($[ti]=D[ti])}else $=D;return q&&a($,typeof w=="function"?w.displayName||w.name||"Unknown":w),u(w,q,be,De,i(),$,Qs,ei)}function d(w){typeof w=="object"&&w!==null&&w.$$typeof===m&&w._store&&(w._store.validated=1)}var h=T,m=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),b=Symbol.for("react.consumer"),g=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),V=Symbol.for("react.activity"),I=Symbol.for("react.client.reference"),U=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se=Object.prototype.hasOwnProperty,O=Array.isArray,K=console.createTask?console.createTask:function(){return null};h={react_stack_bottom_frame:function(w){return w()}};var xe,de={},_=h.react_stack_bottom_frame.bind(h,o)(),N=K(s(o)),J={};ut.Fragment=y,ut.jsx=function(w,D,$,G,De){var be=1e4>U.recentlyCreatedOwnerStacks++;return c(w,D,$,!1,G,De,be?Error("react-stack-top-frame"):_,be?K(s(w)):N)},ut.jsxs=function(w,D,$,G,De){var be=1e4>U.recentlyCreatedOwnerStacks++;return c(w,D,$,!0,G,De,be?Error("react-stack-top-frame"):_,be?K(s(w)):N)}})()),ut}var oi;function Ha(){return oi||(oi=1,process.env.NODE_ENV==="production"?Nt.exports=Xa():Nt.exports=Ya()),Nt.exports}var f=Ha();const M=(...e)=>e.filter(Boolean).join(" "),hn=T.createContext({});function mn(e){const t=T.useRef(null);return t.current===null&&(t.current=e()),t.current}const pn=typeof window<"u",ai=pn?T.useLayoutEffect:T.useEffect,Vt=T.createContext(null);function gn(e,t){e.indexOf(t)===-1&&e.push(t)}function yn(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 vn(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Ue=()=>{},Te=()=>{};process.env.NODE_ENV!=="production"&&(Ue=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(vn(t,n))},Te=(e,t,n)=>{if(!e)throw new Error(vn(t,n))});const Se={},li=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function ci(e){return typeof e=="object"&&e!==null}const ui=e=>/^0[^.\s]+$/u.test(e);function xn(e){let t;return()=>(t===void 0&&(t=e()),t)}const ie=e=>e,Ga=(e,t)=>n=>t(e(n)),dt=(...e)=>e.reduce(Ga),ft=(e,t,n)=>{const s=t-e;return s===0?1:(n-e)/s};class bn{constructor(){this.subscriptions=[]}add(t){return gn(this.subscriptions,t),()=>yn(this.subscriptions,t)}notify(t,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,s);else for(let o=0;o<i;o++){const r=this.subscriptions[o];r&&r(t,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const le=e=>e*1e3,fe=e=>e/1e3;function di(e,t){return t?e*(1e3/t):0}const fi=new Set;function wn(e,t,n){e||fi.has(t)||(console.warn(vn(t,n)),fi.add(t))}const hi=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,qa=1e-7,Za=12;function Ja(e,t,n,s,i){let o,r,a=0;do r=t+(n-t)/2,o=hi(r,s,i)-e,o>0?n=r:t=r;while(Math.abs(o)>qa&&++a<Za);return r}function ht(e,t,n,s){if(e===t&&n===s)return ie;const i=o=>Ja(o,0,1,e,n);return o=>o===0||o===1?o:hi(i(o),t,s)}const mi=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,pi=e=>t=>1-e(1-t),gi=ht(.33,1.53,.69,.99),Tn=pi(gi),yi=mi(Tn),vi=e=>(e*=2)<1?.5*Tn(e):.5*(2-Math.pow(2,-10*(e-1))),Sn=e=>1-Math.sin(Math.acos(e)),xi=pi(Sn),bi=mi(Sn),Qa=ht(.42,0,1,1),el=ht(0,0,.58,1),wi=ht(.42,0,.58,1),tl=e=>Array.isArray(e)&&typeof e[0]!="number",Ti=e=>Array.isArray(e)&&typeof e[0]=="number",Si={linear:ie,easeIn:Qa,easeInOut:wi,easeOut:el,circIn:Sn,circInOut:bi,circOut:xi,backIn:Tn,backInOut:yi,backOut:gi,anticipate:vi},nl=e=>typeof e=="string",Ci=e=>{if(Ti(e)){Te(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,s,i]=e;return ht(t,n,s,i)}else if(nl(e))return Te(Si[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Si[e];return e},It=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function sl(e,t){let n=new Set,s=new Set,i=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){r.has(c)&&(u.schedule(c),e()),c(a)}const u={schedule:(c,d=!1,h=!1)=>{const p=h&&i?n:s;return d&&r.add(c),p.has(c)||p.add(c),c},cancel:c=>{s.delete(c),r.delete(c)},process:c=>{if(a=c,i){o=!0;return}i=!0,[n,s]=[s,n],n.forEach(l),n.clear(),i=!1,o&&(o=!1,u.process(c))}};return u}const il=40;function Pi(e,t){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=It.reduce((g,E)=>(g[E]=sl(o),g),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:h,render:m,postRender:p}=r,y=()=>{const g=Se.useManualTiming?i.timestamp:performance.now();n=!1,Se.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(g-i.timestamp,il),1)),i.timestamp=g,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),d.process(i),h.process(i),m.process(i),p.process(i),i.isProcessing=!1,n&&t&&(s=!1,e(y))},x=()=>{n=!0,s=!0,i.isProcessing||e(y)};return{schedule:It.reduce((g,E)=>{const C=r[E];return g[E]=(P,k=!1,A=!1)=>(n||x(),C.schedule(P,k,A)),g},{}),cancel:g=>{for(let E=0;E<It.length;E++)r[It[E]].cancel(g)},state:i,steps:r}}const{schedule:L,cancel:Pe,state:X,steps:Cn}=Pi(typeof requestAnimationFrame<"u"?requestAnimationFrame:ie,!0);let Ot;function rl(){Ot=void 0}const Q={now:()=>(Ot===void 0&&Q.set(X.isProcessing||Se.useManualTiming?X.timestamp:performance.now()),Ot),set:e=>{Ot=e,queueMicrotask(rl)}},Ei=e=>t=>typeof t=="string"&&t.startsWith(e),Pn=Ei("--"),ol=Ei("var(--"),En=e=>ol(e)?al.test(e.split("/*")[0].trim()):!1,al=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,ze={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},mt={...ze,transform:e=>we(0,1,e)},Lt={...ze,default:1},pt=e=>Math.round(e*1e5)/1e5,kn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function ll(e){return e==null}const cl=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,An=(e,t)=>n=>!!(typeof n=="string"&&cl.test(n)&&n.startsWith(e)||t&&!ll(n)&&Object.prototype.hasOwnProperty.call(n,t)),ki=(e,t,n)=>s=>{if(typeof s!="string")return s;const[i,o,r,a]=s.match(kn);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},ul=e=>we(0,255,e),jn={...ze,transform:e=>Math.round(ul(e))},Me={test:An("rgb","red"),parse:ki("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:s=1})=>"rgba("+jn.transform(e)+", "+jn.transform(t)+", "+jn.transform(n)+", "+pt(mt.transform(s))+")"};function dl(e){let t="",n="",s="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),s=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),s=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,s+=s,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const Rn={test:An("#"),parse:dl,transform:Me.transform},gt=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ee=gt("deg"),he=gt("%"),j=gt("px"),fl=gt("vh"),hl=gt("vw"),Ai={...he,parse:e=>he.parse(e)/100,transform:e=>he.transform(e*100)},Ke={test:An("hsl","hue"),parse:ki("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:s=1})=>"hsla("+Math.round(e)+", "+he.transform(pt(t))+", "+he.transform(pt(n))+", "+pt(mt.transform(s))+")"},z={test:e=>Me.test(e)||Rn.test(e)||Ke.test(e),parse:e=>Me.test(e)?Me.parse(e):Ke.test(e)?Ke.parse(e):Rn.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Me.transform(e):Ke.transform(e),getAnimatableNone:e=>{const t=z.parse(e);return t.alpha=0,z.transform(t)}},ml=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function pl(e){return isNaN(e)&&typeof e=="string"&&(e.match(kn)?.length||0)+(e.match(ml)?.length||0)>0}const ji="number",Ri="color",gl="var",yl="var(",Di="${}",vl=/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 yt(e){const t=e.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const a=t.replace(vl,l=>(z.test(l)?(s.color.push(o),i.push(Ri),n.push(z.parse(l))):l.startsWith(yl)?(s.var.push(o),i.push(gl),n.push(l)):(s.number.push(o),i.push(ji),n.push(parseFloat(l))),++o,Di)).split(Di);return{values:n,split:a,indexes:s,types:i}}function Mi(e){return yt(e).values}function Ni(e){const{split:t,types:n}=yt(e),s=t.length;return i=>{let o="";for(let r=0;r<s;r++)if(o+=t[r],i[r]!==void 0){const a=n[r];a===ji?o+=pt(i[r]):a===Ri?o+=z.transform(i[r]):o+=i[r]}return o}}const xl=e=>typeof e=="number"?0:z.test(e)?z.getAnimatableNone(e):e;function bl(e){const t=Mi(e);return Ni(e)(t.map(xl))}const ke={test:pl,parse:Mi,createTransformer:Ni,getAnimatableNone:bl};function Dn(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 wl({hue:e,saturation:t,lightness:n,alpha:s}){e/=360,t/=100,n/=100;let i=0,o=0,r=0;if(!t)i=o=r=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;i=Dn(l,a,e+1/3),o=Dn(l,a,e),r=Dn(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}function Ft(e,t){return n=>n>0?t:e}const F=(e,t,n)=>e+(t-e)*n,Mn=(e,t,n)=>{const s=e*e,i=n*(t*t-s)+s;return i<0?0:Math.sqrt(i)},Tl=[Rn,Me,Ke],Sl=e=>Tl.find(t=>t.test(e));function Vi(e){const t=Sl(e);if(Ue(!!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===Ke&&(n=wl(n)),n}const Ii=(e,t)=>{const n=Vi(e),s=Vi(t);if(!n||!s)return Ft(e,t);const i={...n};return o=>(i.red=Mn(n.red,s.red,o),i.green=Mn(n.green,s.green,o),i.blue=Mn(n.blue,s.blue,o),i.alpha=F(n.alpha,s.alpha,o),Me.transform(i))},Nn=new Set(["none","hidden"]);function Cl(e,t){return Nn.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Pl(e,t){return n=>F(e,t,n)}function Vn(e){return typeof e=="number"?Pl:typeof e=="string"?En(e)?Ft:z.test(e)?Ii:Al:Array.isArray(e)?Oi:typeof e=="object"?z.test(e)?Ii:El:Ft}function Oi(e,t){const n=[...e],s=n.length,i=e.map((o,r)=>Vn(o)(o,t[r]));return o=>{for(let r=0;r<s;r++)n[r]=i[r](o);return n}}function El(e,t){const n={...e,...t},s={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(s[i]=Vn(e[i])(e[i],t[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}}function kl(e,t){const n=[],s={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const o=t.types[i],r=e.indexes[o][s[o]],a=e.values[r]??0;n[i]=a,s[o]++}return n}const Al=(e,t)=>{const n=ke.createTransformer(t),s=yt(e),i=yt(t);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?Nn.has(e)&&!i.values.length||Nn.has(t)&&!s.values.length?Cl(e,t):dt(Oi(kl(s,i),i.values),n):(Ue(!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"),Ft(e,t))};function Li(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?F(e,t,n):Vn(e)(e,t)}const jl=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>L.update(t,n),stop:()=>Pe(t),now:()=>X.isProcessing?X.timestamp:Q.now()}},Fi=(e,t,n=10)=>{let s="";const i=Math.max(Math.round(t/n),2);for(let o=0;o<i;o++)s+=Math.round(e(o/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},Bt=2e4;function In(e){let t=0;const n=50;let s=e.next(t);for(;!s.done&&t<Bt;)t+=n,s=e.next(t);return t>=Bt?1/0:t}function Rl(e,t=100,n){const s=n({...e,keyframes:[0,t]}),i=Math.min(In(s),Bt);return{type:"keyframes",ease:o=>s.next(i*o).value/t,duration:fe(i)}}const Dl=5;function Bi(e,t,n){const s=Math.max(t-Dl,0);return di(n-e(s),t-s)}const B={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},On=.001;function Ml({duration:e=B.duration,bounce:t=B.bounce,velocity:n=B.velocity,mass:s=B.mass}){let i,o;Ue(e<=le(B.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let r=1-t;r=we(B.minDamping,B.maxDamping,r),e=we(B.minDuration,B.maxDuration,fe(e)),r<1?(i=u=>{const c=u*r,d=c*e,h=c-n,m=Ln(u,r),p=Math.exp(-d);return On-h/m*p},o=u=>{const d=u*r*e,h=d*n+n,m=Math.pow(r,2)*Math.pow(u,2)*e,p=Math.exp(-d),y=Ln(Math.pow(u,2),r);return(-i(u)+On>0?-1:1)*((h-m)*p)/y}):(i=u=>{const c=Math.exp(-u*e),d=(u-n)*e+1;return-On+c*d},o=u=>{const c=Math.exp(-u*e),d=(n-u)*(e*e);return c*d});const a=5/e,l=Vl(i,o,a);if(e=le(e),isNaN(l))return{stiffness:B.stiffness,damping:B.damping,duration:e};{const u=Math.pow(l,2)*s;return{stiffness:u,damping:r*2*Math.sqrt(s*u),duration:e}}}const Nl=12;function Vl(e,t,n){let s=n;for(let i=1;i<Nl;i++)s=s-e(s)/t(s);return s}function Ln(e,t){return e*Math.sqrt(1-t*t)}const Il=["duration","bounce"],Ol=["stiffness","damping","mass"];function _i(e,t){return t.some(n=>e[n]!==void 0)}function Ll(e){let t={velocity:B.velocity,stiffness:B.stiffness,damping:B.damping,mass:B.mass,isResolvedFromDuration:!1,...e};if(!_i(e,Ol)&&_i(e,Il))if(e.visualDuration){const n=e.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,o=2*we(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:B.mass,stiffness:i,damping:o}}else{const n=Ml(e);t={...t,...n,mass:B.mass},t.isResolvedFromDuration=!0}return t}function _t(e=B.visualDuration,t=B.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:s,restDelta:i}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:u,mass:c,duration:d,velocity:h,isResolvedFromDuration:m}=Ll({...n,velocity:-fe(n.velocity||0)}),p=h||0,y=u/(2*Math.sqrt(l*c)),x=r-o,v=fe(Math.sqrt(l/c)),b=Math.abs(x)<5;s||(s=b?B.restSpeed.granular:B.restSpeed.default),i||(i=b?B.restDelta.granular:B.restDelta.default);let g;if(y<1){const C=Ln(v,y);g=P=>{const k=Math.exp(-y*v*P);return r-k*((p+y*v*x)/C*Math.sin(C*P)+x*Math.cos(C*P))}}else if(y===1)g=C=>r-Math.exp(-v*C)*(x+(p+v*x)*C);else{const C=v*Math.sqrt(y*y-1);g=P=>{const k=Math.exp(-y*v*P),A=Math.min(C*P,300);return r-k*((p+y*v*x)*Math.sinh(A)+C*x*Math.cosh(A))/C}}const E={calculatedDuration:m&&d||null,next:C=>{const P=g(C);if(m)a.done=C>=d;else{let k=C===0?p:0;y<1&&(k=C===0?le(p):Bi(g,C,P));const A=Math.abs(k)<=s,V=Math.abs(r-P)<=i;a.done=A&&V}return a.value=a.done?r:P,a},toString:()=>{const C=Math.min(In(E),Bt),P=Fi(k=>E.next(C*k).value,C,30);return C+"ms "+P},toTransition:()=>{}};return E}_t.applyToOptions=e=>{const t=Rl(e,100,_t);return e.ease=t.ease,e.duration=le(t.duration),e.type="keyframes",e};function Fn({keyframes:e,velocity:t=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],h={done:!1,value:d},m=A=>a!==void 0&&A<a||l!==void 0&&A>l,p=A=>a===void 0?l:l===void 0||Math.abs(a-A)<Math.abs(l-A)?a:l;let y=n*t;const x=d+y,v=r===void 0?x:r(x);v!==x&&(y=v-d);const b=A=>-y*Math.exp(-A/s),g=A=>v+b(A),E=A=>{const V=b(A),I=g(A);h.done=Math.abs(V)<=u,h.value=h.done?v:I};let C,P;const k=A=>{m(h.value)&&(C=A,P=_t({keyframes:[h.value,p(h.value)],velocity:Bi(g,A,h.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return k(0),{calculatedDuration:null,next:A=>{let V=!1;return!P&&C===void 0&&(V=!0,E(A),k(A)),C!==void 0&&A>=C?P.next(A-C):(!V&&E(A),h)}}}function Fl(e,t,n){const s=[],i=n||Se.mix||Li,o=e.length-1;for(let r=0;r<o;r++){let a=i(e[r],e[r+1]);if(t){const l=Array.isArray(t)?t[r]||ie:t;a=dt(l,a)}s.push(a)}return s}function Bl(e,t,{clamp:n=!0,ease:s,mixer:i}={}){const o=e.length;if(Te(o===t.length,"Both input and output ranges must be the same length","range-length"),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const r=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=Fl(t,s,i),l=a.length,u=c=>{if(r&&c<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(c<e[d+1]);d++);const h=ft(e[d],e[d+1],c);return a[d](h)};return n?c=>u(we(e[0],e[o-1],c)):u}function _l(e,t){const n=e[e.length-1];for(let s=1;s<=t;s++){const i=ft(0,t,s);e.push(F(n,1,i))}}function $l(e){const t=[0];return _l(t,e.length-1),t}function Wl(e,t){return e.map(n=>n*t)}function Ul(e,t){return e.map(()=>t||wi).splice(0,e.length-1)}function Xe({duration:e=300,keyframes:t,times:n,ease:s="easeInOut"}){const i=tl(s)?s.map(Ci):Ci(s),o={done:!1,value:t[0]},r=Wl(n&&n.length===t.length?n:$l(t),e),a=Bl(r,t,{ease:Array.isArray(i)?i:Ul(t,i)});return{calculatedDuration:e,next:l=>(o.value=a(l),o.done=l>=e,o)}}const zl=e=>e!==null;function Bn(e,{repeat:t,repeatType:n="loop"},s,i=1){const o=e.filter(zl),a=i<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!a||s===void 0?o[a]:s}const Kl={decay:Fn,inertia:Fn,tween:Xe,keyframes:Xe,spring:_t};function $i(e){typeof e.type=="string"&&(e.type=Kl[e.type])}class _n{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 Xl=e=>e/100;class $n extends _n{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!==Q.now()&&this.tick(Q.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;$i(t);const{type:n=Xe,repeat:s=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=t;let{keyframes:a}=t;const l=n||Xe;process.env.NODE_ENV!=="production"&&l!==Xe&&Te(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==Xe&&typeof a[0]!="number"&&(this.mixKeyframes=dt(Xl,Li(a[0],a[1])),a=[0,100]);const u=l({...t,keyframes:a});o==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-r})),u.calculatedDuration===null&&(u.calculatedDuration=In(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(s+1)-i,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:s,totalDuration:i,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return s.next(0);const{delay:u=0,keyframes:c,repeat:d,repeatType:h,repeatDelay:m,type:p,onUpdate:y,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const v=this.currentTime-u*(this.playbackSpeed>=0?1:-1),b=this.playbackSpeed>=0?v<0:v>i;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let g=this.currentTime,E=s;if(d){const A=Math.min(this.currentTime,i)/a;let V=Math.floor(A),I=A%1;!I&&A>=1&&(I=1),I===1&&V--,V=Math.min(V,d+1),!!(V%2)&&(h==="reverse"?(I=1-I,m&&(I-=m/a)):h==="mirror"&&(E=r)),g=we(0,1,I)*a}const C=b?{done:!1,value:c[0]}:E.next(g);o&&(C.value=o(C.value));let{done:P}=C;!b&&l!==null&&(P=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const k=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&P);return k&&p!==Fn&&(C.value=Bn(c,this.options,x,this.speed)),y&&y(C.value),k&&this.finish(),C}then(t,n){return this.finished.then(t,n)}get duration(){return fe(this.calculatedDuration)}get time(){return fe(this.currentTime)}set time(t){t=le(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(Q.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=fe(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=jl,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),this.options.onPlay?.();const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Q.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 Yl(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Ne=e=>e*180/Math.PI,Wn=e=>{const t=Ne(Math.atan2(e[1],e[0]));return Un(t)},Hl={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Wn,rotateZ:Wn,skewX:e=>Ne(Math.atan(e[1])),skewY:e=>Ne(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Un=e=>(e=e%360,e<0&&(e+=360),e),Wi=Wn,Ui=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),zi=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Gl={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ui,scaleY:zi,scale:e=>(Ui(e)+zi(e))/2,rotateX:e=>Un(Ne(Math.atan2(e[6],e[5]))),rotateY:e=>Un(Ne(Math.atan2(-e[2],e[0]))),rotateZ:Wi,rotate:Wi,skewX:e=>Ne(Math.atan(e[4])),skewY:e=>Ne(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function zn(e){return e.includes("scale")?1:0}function Kn(e,t){if(!e||e==="none")return zn(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Gl,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Hl,i=a}if(!i)return zn(t);const o=s[t],r=i[1].split(",").map(Zl);return typeof o=="function"?o(r):r[o]}const ql=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Kn(n,t)};function Zl(e){return parseFloat(e.trim())}const Ye=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],He=new Set(Ye),Ki=e=>e===ze||e===j,Jl=new Set(["x","y","z"]),Ql=Ye.filter(e=>!Jl.has(e));function ec(e){const t=[];return Ql.forEach(n=>{const s=e.getValue(n);s!==void 0&&(t.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),t}const Ve={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})=>Kn(t,"x"),y:(e,{transform:t})=>Kn(t,"y")};Ve.translateX=Ve.x,Ve.translateY=Ve.y;const Ie=new Set;let Xn=!1,Yn=!1,Hn=!1;function Xi(){if(Yn){const e=Array.from(Ie).filter(s=>s.needsMeasurement),t=new Set(e.map(s=>s.element)),n=new Map;t.forEach(s=>{const i=ec(s);i.length&&(n.set(s,i),s.render())}),e.forEach(s=>s.measureInitialState()),t.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([o,r])=>{s.getValue(o)?.set(r)})}),e.forEach(s=>s.measureEndState()),e.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Yn=!1,Xn=!1,Ie.forEach(e=>e.complete(Hn)),Ie.clear()}function Yi(){Ie.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Yn=!0)})}function tc(){Hn=!0,Yi(),Xi(),Hn=!1}class Gn{constructor(t,n,s,i,o,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=s,this.motionValue=i,this.element=o,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(Ie.add(this),Xn||(Xn=!0,L.read(Yi),L.resolveKeyframes(Xi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:s,motionValue:i}=this;if(t[0]===null){const o=i?.get(),r=t[t.length-1];if(o!==void 0)t[0]=o;else if(s&&n){const a=s.readValue(n,r);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=r),i&&o===void 0&&i.set(t[0])}Yl(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Ie.delete(this)}cancel(){this.state==="scheduled"&&(Ie.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const nc=e=>e.startsWith("--");function sc(e,t,n){nc(t)?e.style.setProperty(t,n):e.style[t]=n}const ic=xn(()=>window.ScrollTimeline!==void 0),rc={};function oc(e,t){const n=xn(e);return()=>rc[t]??n()}const Hi=oc(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),vt=([e,t,n,s])=>`cubic-bezier(${e}, ${t}, ${n}, ${s})`,Gi={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:vt([0,.65,.55,1]),circOut:vt([.55,0,1,.45]),backIn:vt([.31,.01,.66,-.59]),backOut:vt([.33,1.53,.69,.99])};function qi(e,t){if(e)return typeof e=="function"?Hi()?Fi(e,t):"ease-out":Ti(e)?vt(e):Array.isArray(e)?e.map(n=>qi(n,t)||Gi.easeOut):Gi[e]}function ac(e,t,n,{delay:s=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[t]:n};l&&(c.offset=l);const d=qi(a,i);Array.isArray(d)&&(c.easing=d);const h={delay:s,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"};return u&&(h.pseudoElement=u),e.animate(c,h)}function Zi(e){return typeof e=="function"&&"applyToOptions"in e}function lc({type:e,...t}){return Zi(e)&&Hi()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class cc extends _n{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:s,keyframes:i,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!o,this.allowFlatten=r,this.options=t,Te(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=lc(t);this.animation=ac(n,s,i,u,o),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const c=Bn(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):sc(n,s,c),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state: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 fe(Number(t))}get time(){return fe(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=le(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&&ic()?(this.animation.timeline=t,ie):n(this)}}const Ji={anticipate:vi,backInOut:yi,circInOut:bi};function uc(e){return e in Ji}function dc(e){typeof e.ease=="string"&&uc(e.ease)&&(e.ease=Ji[e.ease])}const Qi=10;class fc extends cc{constructor(t){dc(t),$i(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:s,onComplete:i,element:o,...r}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new $n({...r,autoplay:!1}),l=le(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-Qi).value,a.sample(l).value,Qi),a.stop()}}const er=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ke.test(e)||e==="0")&&!e.startsWith("url("));function hc(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 mc(e,t,n,s){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],r=er(i,t),a=er(o,t);return Ue(r===a,`You are trying to animate ${t} from "${i}" to "${o}". "${r?o:i}" is not an animatable value.`,"value-not-animatable"),!r||!a?!1:hc(e)||(n==="spring"||Zi(n))&&s}function qn(e){e.duration=0,e.type}const pc=new Set(["opacity","clipPath","filter","transform"]),gc=xn(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function yc(e){const{motionValue:t,name:n,repeatDelay:s,repeatType:i,damping:o,type:r}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=t.owner.getProps();return gc()&&n&&pc.has(n)&&(n!=="transform"||!u)&&!l&&!s&&i!=="mirror"&&o!==0&&r!=="inertia"}const vc=40;class xc extends _n{constructor({autoplay:t=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:r="loop",keyframes:a,name:l,motionValue:u,element:c,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Q.now();const h={autoplay:t,delay:n,type:s,repeat:i,repeatDelay:o,repeatType:r,name:l,motionValue:u,element:c,...d},m=c?.KeyframeResolver||Gn;this.keyframeResolver=new m(a,(p,y,x)=>this.onKeyframesResolved(p,y,h,!x),l,u,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,s,i){this.keyframeResolver=void 0;const{name:o,type:r,velocity:a,delay:l,isHandoff:u,onUpdate:c}=s;this.resolvedAt=Q.now(),mc(t,o,r,a)||((Se.instantAnimations||!l)&&c?.(Bn(t,s,n)),t[0]=t[t.length-1],qn(s),s.repeat=0);const h={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>vc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:t},m=!u&&yc(h)?new fc({...h,element:h.motionValue.owner.current}):new $n(h);m.finished.then(()=>this.notifyFinished()).catch(ie),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(),tc()),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()}}const bc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function wc(e){const t=bc.exec(e);if(!t)return[,];const[,n,s,i]=t;return[`--${n??s}`,i]}const Tc=4;function tr(e,t,n=1){Te(n<=Tc,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,i]=wc(e);if(!s)return;const o=window.getComputedStyle(t).getPropertyValue(s);if(o){const r=o.trim();return li(r)?parseFloat(r):r}return En(i)?tr(i,t,n+1):i}function Zn(e,t){return e?.[t]??e?.default??e}const nr=new Set(["width","height","top","left","right","bottom",...Ye]),Sc={test:e=>e==="auto",parse:e=>e},sr=e=>t=>t.test(e),ir=[ze,j,he,Ee,hl,fl,Sc],rr=e=>ir.find(sr(e));function Cc(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||ui(e):!0}const Pc=new Set(["brightness","contrast","saturate","opacity"]);function Ec(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[s]=n.match(kn)||[];if(!s)return e;const i=n.replace(s,"");let o=Pc.has(t)?1:0;return s!==n&&(o*=100),t+"("+o+i+")"}const kc=/\b([a-z-]*)\(.*?\)/gu,Jn={...ke,getAnimatableNone:e=>{const t=e.match(kc);return t?t.map(Ec).join(" "):e}},or={...ze,transform:Math.round},Qn={borderWidth:j,borderTopWidth:j,borderRightWidth:j,borderBottomWidth:j,borderLeftWidth:j,borderRadius:j,radius:j,borderTopLeftRadius:j,borderTopRightRadius:j,borderBottomRightRadius:j,borderBottomLeftRadius:j,width:j,maxWidth:j,height:j,maxHeight:j,top:j,right:j,bottom:j,left:j,padding:j,paddingTop:j,paddingRight:j,paddingBottom:j,paddingLeft:j,margin:j,marginTop:j,marginRight:j,marginBottom:j,marginLeft:j,backgroundPositionX:j,backgroundPositionY:j,...{rotate:Ee,rotateX:Ee,rotateY:Ee,rotateZ:Ee,scale:Lt,scaleX:Lt,scaleY:Lt,scaleZ:Lt,skew:Ee,skewX:Ee,skewY:Ee,distance:j,translateX:j,translateY:j,translateZ:j,x:j,y:j,z:j,perspective:j,transformPerspective:j,opacity:mt,originX:Ai,originY:Ai,originZ:j},zIndex:or,fillOpacity:mt,strokeOpacity:mt,numOctaves:or},Ac={...Qn,color:z,backgroundColor:z,outlineColor:z,fill:z,stroke:z,borderColor:z,borderTopColor:z,borderRightColor:z,borderBottomColor:z,borderLeftColor:z,filter:Jn,WebkitFilter:Jn},ar=e=>Ac[e];function lr(e,t){let n=ar(e);return n!==Jn&&(n=ke),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const jc=new Set(["auto","none","0"]);function Rc(e,t,n){let s=0,i;for(;s<e.length&&!i;){const o=e[s];typeof o=="string"&&!jc.has(o)&&yt(o).values.length&&(i=e[s]),s++}if(i&&n)for(const o of t)e[o]=lr(n,i)}class Dc extends Gn{constructor(t,n,s,i,o){super(t,n,s,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:s}=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(),En(u))){const c=tr(u,n.current);c!==void 0&&(t[l]=c),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!nr.has(s)||t.length!==2)return;const[i,o]=t,r=rr(i),a=rr(o);if(r!==a)if(Ki(r)&&Ki(a))for(let l=0;l<t.length;l++){const u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else Ve[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,s=[];for(let i=0;i<t.length;i++)(t[i]===null||Cc(t[i]))&&s.push(i);s.length&&Rc(t,s,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:s}=this;if(!t||!t.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ve[s](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(s,i).jump(i,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:s}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=s.length-1,r=s[o];s[o]=Ve[n](t.measureViewportBox(),window.getComputedStyle(t.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,l])=>{t.getValue(a).set(l)}),this.resolveNoneKeyframes()}}function Mc(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let s=document;const i=n?.[e]??s.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}const cr=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function ur(e){return ci(e)&&"offsetHeight"in e}const dr=30,Nc=e=>!isNaN(parseFloat(e));class Vc{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=Q.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Q.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Nc(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&wn(!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 bn);const s=this.events[t].add(n);return t==="change"?()=>{s(),L.read(()=>{this.events.change.getSize()||this.stop()})}:s}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,s){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}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=Q.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>dr)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,dr);return di(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 Ge(e,t){return new Vc(e,t)}const{schedule:es}=Pi(queueMicrotask,!1),ce={x:!1,y:!1};function fr(){return ce.x||ce.y}function Ic(e){return e==="x"||e==="y"?ce[e]?null:(ce[e]=!0,()=>{ce[e]=!1}):ce.x||ce.y?null:(ce.x=ce.y=!0,()=>{ce.x=ce.y=!1})}function hr(e,t){const n=Mc(e),s=new AbortController,i={passive:!0,...t,signal:s.signal};return[n,i,()=>s.abort()]}function mr(e){return!(e.pointerType==="touch"||fr())}function Oc(e,t,n={}){const[s,i,o]=hr(e,n),r=a=>{if(!mr(a))return;const{target:l}=a,u=t(l,a);if(typeof u!="function"||!l)return;const c=d=>{mr(d)&&(u(d),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,i)};return s.forEach(a=>{a.addEventListener("pointerenter",r,i)}),o}const pr=(e,t)=>t?e===t?!0:pr(e,t.parentElement):!1,ts=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Lc=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Fc(e){return Lc.has(e.tagName)||e.tabIndex!==-1}const $t=new WeakSet;function gr(e){return t=>{t.key==="Enter"&&e(t)}}function ns(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Bc=(e,t)=>{const n=e.currentTarget;if(!n)return;const s=gr(()=>{if($t.has(n))return;ns(n,"down");const i=gr(()=>{ns(n,"up")}),o=()=>ns(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",s,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),t)};function yr(e){return ts(e)&&!fr()}function _c(e,t,n={}){const[s,i,o]=hr(e,n),r=a=>{const l=a.currentTarget;if(!yr(a))return;$t.add(l);const u=t(l,a),c=(m,p)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",h),$t.has(l)&&$t.delete(l),yr(m)&&typeof u=="function"&&u(m,{success:p})},d=m=>{c(m,l===window||l===document||n.useGlobalTarget||pr(l,m.target))},h=m=>{c(m,!1)};window.addEventListener("pointerup",d,i),window.addEventListener("pointercancel",h,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,i),ur(a)&&(a.addEventListener("focus",u=>Bc(u,i)),!Fc(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function vr(e){return ci(e)&&"ownerSVGElement"in e}function $c(e){return vr(e)&&e.tagName==="svg"}const Y=e=>!!(e&&e.getVelocity),Wc=[...ir,z,ke],Uc=e=>Wc.find(sr(e)),ss=T.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class zc extends S.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const s=n.offsetParent,i=ur(s)&&s.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=i-o.width-o.left}return null}componentDidUpdate(){}render(){return this.props.children}}function Kc({children:e,isPresent:t,anchorX:n,root:s}){const i=T.useId(),o=T.useRef(null),r=T.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=T.useContext(ss);return T.useInsertionEffect(()=>{const{width:l,height:u,top:c,left:d,right:h}=r.current;if(t||!o.current||!l||!u)return;const m=n==="left"?`left: ${d}`:`right: ${h}`;o.current.dataset.motionPopId=i;const p=document.createElement("style");a&&(p.nonce=a);const y=s??document.head;return y.appendChild(p),p.sheet&&p.sheet.insertRule(`
22
+ <%s key={someKey} {...props} />`,G,q,mt,q),J[q+G]=!0)}if(q=null,W!==void 0&&(n(W),q=""+W),r(M)&&(n(M.key),q=""+M.key),"key"in M){W={};for(var li in M)li!=="key"&&(W[li]=M[li])}else W=M;return q&&a(W,typeof w=="function"?w.displayName||w.name||"Unknown":w),u(w,q,be,De,i(),W,oi,ai)}function d(w){typeof w=="object"&&w!==null&&w.$$typeof===m&&w._store&&(w._store.validated=1)}var h=T,m=Symbol.for("react.transitional.element"),g=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),p=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),y=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),V=Symbol.for("react.client.reference"),F=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ie=Object.prototype.hasOwnProperty,ne=Array.isArray,O=console.createTask?console.createTask:function(){return null};h={react_stack_bottom_frame:function(w){return w()}};var X,re={},z=h.react_stack_bottom_frame.bind(h,o)(),I=O(s(o)),J={};gt.Fragment=v,gt.jsx=function(w,M,W,G,De){var be=1e4>F.recentlyCreatedOwnerStacks++;return c(w,M,W,!1,G,De,be?Error("react-stack-top-frame"):z,be?O(s(w)):I)},gt.jsxs=function(w,M,W,G,De){var be=1e4>F.recentlyCreatedOwnerStacks++;return c(w,M,W,!0,G,De,be?Error("react-stack-top-frame"):z,be?O(s(w)):I)}})()),gt}var hi;function sl(){return hi||(hi=1,process.env.NODE_ENV==="production"?zt.exports=tl():zt.exports=nl()),zt.exports}var f=sl();const R=(...e)=>e.filter(Boolean).join(" "),bn=T.createContext({});function wn(e){const t=T.useRef(null);return t.current===null&&(t.current=e()),t.current}const Tn=typeof window<"u",mi=Tn?T.useLayoutEffect:T.useEffect,Wt=T.createContext(null);function Sn(e,t){e.indexOf(t)===-1&&e.push(t)}function Cn(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 Pn(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Ke=()=>{},Te=()=>{};process.env.NODE_ENV!=="production"&&(Ke=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(Pn(t,n))},Te=(e,t,n)=>{if(!e)throw new Error(Pn(t,n))});const Se={},pi=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function gi(e){return typeof e=="object"&&e!==null}const yi=e=>/^0[^.\s]+$/u.test(e);function kn(e){let t;return()=>(t===void 0&&(t=e()),t)}const oe=e=>e,il=(e,t)=>n=>t(e(n)),yt=(...e)=>e.reduce(il),vt=(e,t,n)=>{const s=t-e;return s===0?1:(n-e)/s};class En{constructor(){this.subscriptions=[]}add(t){return Sn(this.subscriptions,t),()=>Cn(this.subscriptions,t)}notify(t,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,s);else for(let o=0;o<i;o++){const r=this.subscriptions[o];r&&r(t,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const ue=e=>e*1e3,he=e=>e/1e3;function vi(e,t){return t?e*(1e3/t):0}const xi=new Set;function An(e,t,n){e||xi.has(t)||(console.warn(Pn(t,n)),xi.add(t))}const bi=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,rl=1e-7,ol=12;function al(e,t,n,s,i){let o,r,a=0;do r=t+(n-t)/2,o=bi(r,s,i)-e,o>0?n=r:t=r;while(Math.abs(o)>rl&&++a<ol);return r}function xt(e,t,n,s){if(e===t&&n===s)return oe;const i=o=>al(o,0,1,e,n);return o=>o===0||o===1?o:bi(i(o),t,s)}const wi=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Ti=e=>t=>1-e(1-t),Si=xt(.33,1.53,.69,.99),jn=Ti(Si),Ci=wi(jn),Pi=e=>(e*=2)<1?.5*jn(e):.5*(2-Math.pow(2,-10*(e-1))),Rn=e=>1-Math.sin(Math.acos(e)),ki=Ti(Rn),Ei=wi(Rn),ll=xt(.42,0,1,1),cl=xt(0,0,.58,1),Ai=xt(.42,0,.58,1),ul=e=>Array.isArray(e)&&typeof e[0]!="number",ji=e=>Array.isArray(e)&&typeof e[0]=="number",Ri={linear:oe,easeIn:ll,easeInOut:Ai,easeOut:cl,circIn:Rn,circInOut:Ei,circOut:ki,backIn:jn,backInOut:Ci,backOut:Si,anticipate:Pi},dl=e=>typeof e=="string",Di=e=>{if(ji(e)){Te(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,s,i]=e;return xt(t,n,s,i)}else if(dl(e))return Te(Ri[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Ri[e];return e},$t=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function fl(e,t){let n=new Set,s=new Set,i=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){r.has(c)&&(u.schedule(c),e()),c(a)}const u={schedule:(c,d=!1,h=!1)=>{const g=h&&i?n:s;return d&&r.add(c),g.has(c)||g.add(c),c},cancel:c=>{s.delete(c),r.delete(c)},process:c=>{if(a=c,i){o=!0;return}i=!0,[n,s]=[s,n],n.forEach(l),n.clear(),i=!1,o&&(o=!1,u.process(c))}};return u}const hl=40;function Mi(e,t){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=$t.reduce((y,P)=>(y[P]=fl(o),y),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:h,render:m,postRender:g}=r,v=()=>{const y=Se.useManualTiming?i.timestamp:performance.now();n=!1,Se.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(y-i.timestamp,hl),1)),i.timestamp=y,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),d.process(i),h.process(i),m.process(i),g.process(i),i.isProcessing=!1,n&&t&&(s=!1,e(v))},b=()=>{n=!0,s=!0,i.isProcessing||e(v)};return{schedule:$t.reduce((y,P)=>{const S=r[P];return y[P]=(A,k=!1,E=!1)=>(n||b(),S.schedule(A,k,E)),y},{}),cancel:y=>{for(let P=0;P<$t.length;P++)r[$t[P]].cancel(y)},state:i,steps:r}}const{schedule:L,cancel:Pe,state:K,steps:Dn}=Mi(typeof requestAnimationFrame<"u"?requestAnimationFrame:oe,!0);let Ut;function ml(){Ut=void 0}const Q={now:()=>(Ut===void 0&&Q.set(K.isProcessing||Se.useManualTiming?K.timestamp:performance.now()),Ut),set:e=>{Ut=e,queueMicrotask(ml)}},Ni=e=>t=>typeof t=="string"&&t.startsWith(e),Mn=Ni("--"),pl=Ni("var(--"),Nn=e=>pl(e)?gl.test(e.split("/*")[0].trim()):!1,gl=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Xe={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},bt={...Xe,transform:e=>we(0,1,e)},Kt={...Xe,default:1},wt=e=>Math.round(e*1e5)/1e5,Vn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function yl(e){return e==null}const vl=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,In=(e,t)=>n=>!!(typeof n=="string"&&vl.test(n)&&n.startsWith(e)||t&&!yl(n)&&Object.prototype.hasOwnProperty.call(n,t)),Vi=(e,t,n)=>s=>{if(typeof s!="string")return s;const[i,o,r,a]=s.match(Vn);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},xl=e=>we(0,255,e),On={...Xe,transform:e=>Math.round(xl(e))},Me={test:In("rgb","red"),parse:Vi("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:s=1})=>"rgba("+On.transform(e)+", "+On.transform(t)+", "+On.transform(n)+", "+wt(bt.transform(s))+")"};function bl(e){let t="",n="",s="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),s=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),s=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,s+=s,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const Ln={test:In("#"),parse:bl,transform:Me.transform},Tt=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ke=Tt("deg"),me=Tt("%"),j=Tt("px"),wl=Tt("vh"),Tl=Tt("vw"),Ii={...me,parse:e=>me.parse(e)/100,transform:e=>me.transform(e*100)},He={test:In("hsl","hue"),parse:Vi("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:s=1})=>"hsla("+Math.round(e)+", "+me.transform(wt(t))+", "+me.transform(wt(n))+", "+wt(bt.transform(s))+")"},U={test:e=>Me.test(e)||Ln.test(e)||He.test(e),parse:e=>Me.test(e)?Me.parse(e):He.test(e)?He.parse(e):Ln.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Me.transform(e):He.transform(e),getAnimatableNone:e=>{const t=U.parse(e);return t.alpha=0,U.transform(t)}},Sl=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Cl(e){return isNaN(e)&&typeof e=="string"&&(e.match(Vn)?.length||0)+(e.match(Sl)?.length||0)>0}const Oi="number",Li="color",Pl="var",kl="var(",Fi="${}",El=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function St(e){const t=e.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const a=t.replace(El,l=>(U.test(l)?(s.color.push(o),i.push(Li),n.push(U.parse(l))):l.startsWith(kl)?(s.var.push(o),i.push(Pl),n.push(l)):(s.number.push(o),i.push(Oi),n.push(parseFloat(l))),++o,Fi)).split(Fi);return{values:n,split:a,indexes:s,types:i}}function Bi(e){return St(e).values}function _i(e){const{split:t,types:n}=St(e),s=t.length;return i=>{let o="";for(let r=0;r<s;r++)if(o+=t[r],i[r]!==void 0){const a=n[r];a===Oi?o+=wt(i[r]):a===Li?o+=U.transform(i[r]):o+=i[r]}return o}}const Al=e=>typeof e=="number"?0:U.test(e)?U.getAnimatableNone(e):e;function jl(e){const t=Bi(e);return _i(e)(t.map(Al))}const Ee={test:Cl,parse:Bi,createTransformer:_i,getAnimatableNone:jl};function Fn(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 Rl({hue:e,saturation:t,lightness:n,alpha:s}){e/=360,t/=100,n/=100;let i=0,o=0,r=0;if(!t)i=o=r=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;i=Fn(l,a,e+1/3),o=Fn(l,a,e),r=Fn(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}function Xt(e,t){return n=>n>0?t:e}const B=(e,t,n)=>e+(t-e)*n,Bn=(e,t,n)=>{const s=e*e,i=n*(t*t-s)+s;return i<0?0:Math.sqrt(i)},Dl=[Ln,Me,He],Ml=e=>Dl.find(t=>t.test(e));function zi(e){const t=Ml(e);if(Ke(!!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===He&&(n=Rl(n)),n}const Wi=(e,t)=>{const n=zi(e),s=zi(t);if(!n||!s)return Xt(e,t);const i={...n};return o=>(i.red=Bn(n.red,s.red,o),i.green=Bn(n.green,s.green,o),i.blue=Bn(n.blue,s.blue,o),i.alpha=B(n.alpha,s.alpha,o),Me.transform(i))},_n=new Set(["none","hidden"]);function Nl(e,t){return _n.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Vl(e,t){return n=>B(e,t,n)}function zn(e){return typeof e=="number"?Vl:typeof e=="string"?Nn(e)?Xt:U.test(e)?Wi:Ll:Array.isArray(e)?$i:typeof e=="object"?U.test(e)?Wi:Il:Xt}function $i(e,t){const n=[...e],s=n.length,i=e.map((o,r)=>zn(o)(o,t[r]));return o=>{for(let r=0;r<s;r++)n[r]=i[r](o);return n}}function Il(e,t){const n={...e,...t},s={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(s[i]=zn(e[i])(e[i],t[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}}function Ol(e,t){const n=[],s={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const o=t.types[i],r=e.indexes[o][s[o]],a=e.values[r]??0;n[i]=a,s[o]++}return n}const Ll=(e,t)=>{const n=Ee.createTransformer(t),s=St(e),i=St(t);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?_n.has(e)&&!i.values.length||_n.has(t)&&!s.values.length?Nl(e,t):yt($i(Ol(s,i),i.values),n):(Ke(!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"),Xt(e,t))};function Ui(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?B(e,t,n):zn(e)(e,t)}const Fl=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>L.update(t,n),stop:()=>Pe(t),now:()=>K.isProcessing?K.timestamp:Q.now()}},Ki=(e,t,n=10)=>{let s="";const i=Math.max(Math.round(t/n),2);for(let o=0;o<i;o++)s+=Math.round(e(o/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},Ht=2e4;function Wn(e){let t=0;const n=50;let s=e.next(t);for(;!s.done&&t<Ht;)t+=n,s=e.next(t);return t>=Ht?1/0:t}function Bl(e,t=100,n){const s=n({...e,keyframes:[0,t]}),i=Math.min(Wn(s),Ht);return{type:"keyframes",ease:o=>s.next(i*o).value/t,duration:he(i)}}const _l=5;function Xi(e,t,n){const s=Math.max(t-_l,0);return vi(n-e(s),t-s)}const _={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},$n=.001;function zl({duration:e=_.duration,bounce:t=_.bounce,velocity:n=_.velocity,mass:s=_.mass}){let i,o;Ke(e<=ue(_.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let r=1-t;r=we(_.minDamping,_.maxDamping,r),e=we(_.minDuration,_.maxDuration,he(e)),r<1?(i=u=>{const c=u*r,d=c*e,h=c-n,m=Un(u,r),g=Math.exp(-d);return $n-h/m*g},o=u=>{const d=u*r*e,h=d*n+n,m=Math.pow(r,2)*Math.pow(u,2)*e,g=Math.exp(-d),v=Un(Math.pow(u,2),r);return(-i(u)+$n>0?-1:1)*((h-m)*g)/v}):(i=u=>{const c=Math.exp(-u*e),d=(u-n)*e+1;return-$n+c*d},o=u=>{const c=Math.exp(-u*e),d=(n-u)*(e*e);return c*d});const a=5/e,l=$l(i,o,a);if(e=ue(e),isNaN(l))return{stiffness:_.stiffness,damping:_.damping,duration:e};{const u=Math.pow(l,2)*s;return{stiffness:u,damping:r*2*Math.sqrt(s*u),duration:e}}}const Wl=12;function $l(e,t,n){let s=n;for(let i=1;i<Wl;i++)s=s-e(s)/t(s);return s}function Un(e,t){return e*Math.sqrt(1-t*t)}const Ul=["duration","bounce"],Kl=["stiffness","damping","mass"];function Hi(e,t){return t.some(n=>e[n]!==void 0)}function Xl(e){let t={velocity:_.velocity,stiffness:_.stiffness,damping:_.damping,mass:_.mass,isResolvedFromDuration:!1,...e};if(!Hi(e,Kl)&&Hi(e,Ul))if(e.visualDuration){const n=e.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,o=2*we(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:_.mass,stiffness:i,damping:o}}else{const n=zl(e);t={...t,...n,mass:_.mass},t.isResolvedFromDuration=!0}return t}function Yt(e=_.visualDuration,t=_.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:s,restDelta:i}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:u,mass:c,duration:d,velocity:h,isResolvedFromDuration:m}=Xl({...n,velocity:-he(n.velocity||0)}),g=h||0,v=u/(2*Math.sqrt(l*c)),b=r-o,p=he(Math.sqrt(l/c)),x=Math.abs(b)<5;s||(s=x?_.restSpeed.granular:_.restSpeed.default),i||(i=x?_.restDelta.granular:_.restDelta.default);let y;if(v<1){const S=Un(p,v);y=A=>{const k=Math.exp(-v*p*A);return r-k*((g+v*p*b)/S*Math.sin(S*A)+b*Math.cos(S*A))}}else if(v===1)y=S=>r-Math.exp(-p*S)*(b+(g+p*b)*S);else{const S=p*Math.sqrt(v*v-1);y=A=>{const k=Math.exp(-v*p*A),E=Math.min(S*A,300);return r-k*((g+v*p*b)*Math.sinh(E)+S*b*Math.cosh(E))/S}}const P={calculatedDuration:m&&d||null,next:S=>{const A=y(S);if(m)a.done=S>=d;else{let k=S===0?g:0;v<1&&(k=S===0?ue(g):Xi(y,S,A));const E=Math.abs(k)<=s,N=Math.abs(r-A)<=i;a.done=E&&N}return a.value=a.done?r:A,a},toString:()=>{const S=Math.min(Wn(P),Ht),A=Ki(k=>P.next(S*k).value,S,30);return S+"ms "+A},toTransition:()=>{}};return P}Yt.applyToOptions=e=>{const t=Bl(e,100,Yt);return e.ease=t.ease,e.duration=ue(t.duration),e.type="keyframes",e};function Kn({keyframes:e,velocity:t=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],h={done:!1,value:d},m=E=>a!==void 0&&E<a||l!==void 0&&E>l,g=E=>a===void 0?l:l===void 0||Math.abs(a-E)<Math.abs(l-E)?a:l;let v=n*t;const b=d+v,p=r===void 0?b:r(b);p!==b&&(v=p-d);const x=E=>-v*Math.exp(-E/s),y=E=>p+x(E),P=E=>{const N=x(E),V=y(E);h.done=Math.abs(N)<=u,h.value=h.done?p:V};let S,A;const k=E=>{m(h.value)&&(S=E,A=Yt({keyframes:[h.value,g(h.value)],velocity:Xi(y,E,h.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return k(0),{calculatedDuration:null,next:E=>{let N=!1;return!A&&S===void 0&&(N=!0,P(E),k(E)),S!==void 0&&E>=S?A.next(E-S):(!N&&P(E),h)}}}function Hl(e,t,n){const s=[],i=n||Se.mix||Ui,o=e.length-1;for(let r=0;r<o;r++){let a=i(e[r],e[r+1]);if(t){const l=Array.isArray(t)?t[r]||oe:t;a=yt(l,a)}s.push(a)}return s}function Yl(e,t,{clamp:n=!0,ease:s,mixer:i}={}){const o=e.length;if(Te(o===t.length,"Both input and output ranges must be the same length","range-length"),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const r=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=Hl(t,s,i),l=a.length,u=c=>{if(r&&c<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(c<e[d+1]);d++);const h=vt(e[d],e[d+1],c);return a[d](h)};return n?c=>u(we(e[0],e[o-1],c)):u}function Gl(e,t){const n=e[e.length-1];for(let s=1;s<=t;s++){const i=vt(0,t,s);e.push(B(n,1,i))}}function ql(e){const t=[0];return Gl(t,e.length-1),t}function Zl(e,t){return e.map(n=>n*t)}function Jl(e,t){return e.map(()=>t||Ai).splice(0,e.length-1)}function Ye({duration:e=300,keyframes:t,times:n,ease:s="easeInOut"}){const i=ul(s)?s.map(Di):Di(s),o={done:!1,value:t[0]},r=Zl(n&&n.length===t.length?n:ql(t),e),a=Yl(r,t,{ease:Array.isArray(i)?i:Jl(t,i)});return{calculatedDuration:e,next:l=>(o.value=a(l),o.done=l>=e,o)}}const Ql=e=>e!==null;function Xn(e,{repeat:t,repeatType:n="loop"},s,i=1){const o=e.filter(Ql),a=i<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!a||s===void 0?o[a]:s}const ec={decay:Kn,inertia:Kn,tween:Ye,keyframes:Ye,spring:Yt};function Yi(e){typeof e.type=="string"&&(e.type=ec[e.type])}class Hn{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 tc=e=>e/100;class Yn extends Hn{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!==Q.now()&&this.tick(Q.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;Yi(t);const{type:n=Ye,repeat:s=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=t;let{keyframes:a}=t;const l=n||Ye;process.env.NODE_ENV!=="production"&&l!==Ye&&Te(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==Ye&&typeof a[0]!="number"&&(this.mixKeyframes=yt(tc,Ui(a[0],a[1])),a=[0,100]);const u=l({...t,keyframes:a});o==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-r})),u.calculatedDuration===null&&(u.calculatedDuration=Wn(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(s+1)-i,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:s,totalDuration:i,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return s.next(0);const{delay:u=0,keyframes:c,repeat:d,repeatType:h,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-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const p=this.currentTime-u*(this.playbackSpeed>=0?1:-1),x=this.playbackSpeed>=0?p<0:p>i;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let y=this.currentTime,P=s;if(d){const E=Math.min(this.currentTime,i)/a;let N=Math.floor(E),V=E%1;!V&&E>=1&&(V=1),V===1&&N--,N=Math.min(N,d+1),!!(N%2)&&(h==="reverse"?(V=1-V,m&&(V-=m/a)):h==="mirror"&&(P=r)),y=we(0,1,V)*a}const S=x?{done:!1,value:c[0]}:P.next(y);o&&(S.value=o(S.value));let{done:A}=S;!x&&l!==null&&(A=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const k=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&A);return k&&g!==Kn&&(S.value=Xn(c,this.options,b,this.speed)),v&&v(S.value),k&&this.finish(),S}then(t,n){return this.finished.then(t,n)}get duration(){return he(this.calculatedDuration)}get time(){return he(this.currentTime)}set time(t){t=ue(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(Q.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=he(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Fl,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),this.options.onPlay?.();const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Q.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 nc(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Ne=e=>e*180/Math.PI,Gn=e=>{const t=Ne(Math.atan2(e[1],e[0]));return qn(t)},sc={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Gn,rotateZ:Gn,skewX:e=>Ne(Math.atan(e[1])),skewY:e=>Ne(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},qn=e=>(e=e%360,e<0&&(e+=360),e),Gi=Gn,qi=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Zi=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),ic={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:qi,scaleY:Zi,scale:e=>(qi(e)+Zi(e))/2,rotateX:e=>qn(Ne(Math.atan2(e[6],e[5]))),rotateY:e=>qn(Ne(Math.atan2(-e[2],e[0]))),rotateZ:Gi,rotate:Gi,skewX:e=>Ne(Math.atan(e[4])),skewY:e=>Ne(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Zn(e){return e.includes("scale")?1:0}function Jn(e,t){if(!e||e==="none")return Zn(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=ic,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=sc,i=a}if(!i)return Zn(t);const o=s[t],r=i[1].split(",").map(oc);return typeof o=="function"?o(r):r[o]}const rc=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Jn(n,t)};function oc(e){return parseFloat(e.trim())}const Ge=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],qe=new Set(Ge),Ji=e=>e===Xe||e===j,ac=new Set(["x","y","z"]),lc=Ge.filter(e=>!ac.has(e));function cc(e){const t=[];return lc.forEach(n=>{const s=e.getValue(n);s!==void 0&&(t.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),t}const Ve={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})=>Jn(t,"x"),y:(e,{transform:t})=>Jn(t,"y")};Ve.translateX=Ve.x,Ve.translateY=Ve.y;const Ie=new Set;let Qn=!1,es=!1,ts=!1;function Qi(){if(es){const e=Array.from(Ie).filter(s=>s.needsMeasurement),t=new Set(e.map(s=>s.element)),n=new Map;t.forEach(s=>{const i=cc(s);i.length&&(n.set(s,i),s.render())}),e.forEach(s=>s.measureInitialState()),t.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([o,r])=>{s.getValue(o)?.set(r)})}),e.forEach(s=>s.measureEndState()),e.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}es=!1,Qn=!1,Ie.forEach(e=>e.complete(ts)),Ie.clear()}function er(){Ie.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(es=!0)})}function uc(){ts=!0,er(),Qi(),ts=!1}class ns{constructor(t,n,s,i,o,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=s,this.motionValue=i,this.element=o,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(Ie.add(this),Qn||(Qn=!0,L.read(er),L.resolveKeyframes(Qi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:s,motionValue:i}=this;if(t[0]===null){const o=i?.get(),r=t[t.length-1];if(o!==void 0)t[0]=o;else if(s&&n){const a=s.readValue(n,r);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=r),i&&o===void 0&&i.set(t[0])}nc(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Ie.delete(this)}cancel(){this.state==="scheduled"&&(Ie.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const dc=e=>e.startsWith("--");function fc(e,t,n){dc(t)?e.style.setProperty(t,n):e.style[t]=n}const hc=kn(()=>window.ScrollTimeline!==void 0),mc={};function pc(e,t){const n=kn(e);return()=>mc[t]??n()}const tr=pc(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Ct=([e,t,n,s])=>`cubic-bezier(${e}, ${t}, ${n}, ${s})`,nr={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ct([0,.65,.55,1]),circOut:Ct([.55,0,1,.45]),backIn:Ct([.31,.01,.66,-.59]),backOut:Ct([.33,1.53,.69,.99])};function sr(e,t){if(e)return typeof e=="function"?tr()?Ki(e,t):"ease-out":ji(e)?Ct(e):Array.isArray(e)?e.map(n=>sr(n,t)||nr.easeOut):nr[e]}function gc(e,t,n,{delay:s=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[t]:n};l&&(c.offset=l);const d=sr(a,i);Array.isArray(d)&&(c.easing=d);const h={delay:s,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"};return u&&(h.pseudoElement=u),e.animate(c,h)}function ir(e){return typeof e=="function"&&"applyToOptions"in e}function yc({type:e,...t}){return ir(e)&&tr()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class vc extends Hn{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:s,keyframes:i,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!o,this.allowFlatten=r,this.options=t,Te(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=yc(t);this.animation=gc(n,s,i,u,o),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const c=Xn(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):fc(n,s,c),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state: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 he(Number(t))}get time(){return he(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=ue(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&&hc()?(this.animation.timeline=t,oe):n(this)}}const rr={anticipate:Pi,backInOut:Ci,circInOut:Ei};function xc(e){return e in rr}function bc(e){typeof e.ease=="string"&&xc(e.ease)&&(e.ease=rr[e.ease])}const or=10;class wc extends vc{constructor(t){bc(t),Yi(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:s,onComplete:i,element:o,...r}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new Yn({...r,autoplay:!1}),l=ue(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-or).value,a.sample(l).value,or),a.stop()}}const ar=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ee.test(e)||e==="0")&&!e.startsWith("url("));function Tc(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 Sc(e,t,n,s){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],r=ar(i,t),a=ar(o,t);return Ke(r===a,`You are trying to animate ${t} from "${i}" to "${o}". "${r?o:i}" is not an animatable value.`,"value-not-animatable"),!r||!a?!1:Tc(e)||(n==="spring"||ir(n))&&s}function ss(e){e.duration=0,e.type}const Cc=new Set(["opacity","clipPath","filter","transform"]),Pc=kn(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function kc(e){const{motionValue:t,name:n,repeatDelay:s,repeatType:i,damping:o,type:r}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=t.owner.getProps();return Pc()&&n&&Cc.has(n)&&(n!=="transform"||!u)&&!l&&!s&&i!=="mirror"&&o!==0&&r!=="inertia"}const Ec=40;class Ac extends Hn{constructor({autoplay:t=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:r="loop",keyframes:a,name:l,motionValue:u,element:c,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Q.now();const h={autoplay:t,delay:n,type:s,repeat:i,repeatDelay:o,repeatType:r,name:l,motionValue:u,element:c,...d},m=c?.KeyframeResolver||ns;this.keyframeResolver=new m(a,(g,v,b)=>this.onKeyframesResolved(g,v,h,!b),l,u,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,s,i){this.keyframeResolver=void 0;const{name:o,type:r,velocity:a,delay:l,isHandoff:u,onUpdate:c}=s;this.resolvedAt=Q.now(),Sc(t,o,r,a)||((Se.instantAnimations||!l)&&c?.(Xn(t,s,n)),t[0]=t[t.length-1],ss(s),s.repeat=0);const h={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Ec?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:t},m=!u&&kc(h)?new wc({...h,element:h.motionValue.owner.current}):new Yn(h);m.finished.then(()=>this.notifyFinished()).catch(oe),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(),uc()),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()}}const jc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Rc(e){const t=jc.exec(e);if(!t)return[,];const[,n,s,i]=t;return[`--${n??s}`,i]}const Dc=4;function lr(e,t,n=1){Te(n<=Dc,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,i]=Rc(e);if(!s)return;const o=window.getComputedStyle(t).getPropertyValue(s);if(o){const r=o.trim();return pi(r)?parseFloat(r):r}return Nn(i)?lr(i,t,n+1):i}function is(e,t){return e?.[t]??e?.default??e}const cr=new Set(["width","height","top","left","right","bottom",...Ge]),Mc={test:e=>e==="auto",parse:e=>e},ur=e=>t=>t.test(e),dr=[Xe,j,me,ke,Tl,wl,Mc],fr=e=>dr.find(ur(e));function Nc(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||yi(e):!0}const Vc=new Set(["brightness","contrast","saturate","opacity"]);function Ic(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[s]=n.match(Vn)||[];if(!s)return e;const i=n.replace(s,"");let o=Vc.has(t)?1:0;return s!==n&&(o*=100),t+"("+o+i+")"}const Oc=/\b([a-z-]*)\(.*?\)/gu,rs={...Ee,getAnimatableNone:e=>{const t=e.match(Oc);return t?t.map(Ic).join(" "):e}},hr={...Xe,transform:Math.round},os={borderWidth:j,borderTopWidth:j,borderRightWidth:j,borderBottomWidth:j,borderLeftWidth:j,borderRadius:j,radius:j,borderTopLeftRadius:j,borderTopRightRadius:j,borderBottomRightRadius:j,borderBottomLeftRadius:j,width:j,maxWidth:j,height:j,maxHeight:j,top:j,right:j,bottom:j,left:j,padding:j,paddingTop:j,paddingRight:j,paddingBottom:j,paddingLeft:j,margin:j,marginTop:j,marginRight:j,marginBottom:j,marginLeft:j,backgroundPositionX:j,backgroundPositionY:j,...{rotate:ke,rotateX:ke,rotateY:ke,rotateZ:ke,scale:Kt,scaleX:Kt,scaleY:Kt,scaleZ:Kt,skew:ke,skewX:ke,skewY:ke,distance:j,translateX:j,translateY:j,translateZ:j,x:j,y:j,z:j,perspective:j,transformPerspective:j,opacity:bt,originX:Ii,originY:Ii,originZ:j},zIndex:hr,fillOpacity:bt,strokeOpacity:bt,numOctaves:hr},Lc={...os,color:U,backgroundColor:U,outlineColor:U,fill:U,stroke:U,borderColor:U,borderTopColor:U,borderRightColor:U,borderBottomColor:U,borderLeftColor:U,filter:rs,WebkitFilter:rs},mr=e=>Lc[e];function pr(e,t){let n=mr(e);return n!==rs&&(n=Ee),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Fc=new Set(["auto","none","0"]);function Bc(e,t,n){let s=0,i;for(;s<e.length&&!i;){const o=e[s];typeof o=="string"&&!Fc.has(o)&&St(o).values.length&&(i=e[s]),s++}if(i&&n)for(const o of t)e[o]=pr(n,i)}class _c extends ns{constructor(t,n,s,i,o){super(t,n,s,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:s}=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(),Nn(u))){const c=lr(u,n.current);c!==void 0&&(t[l]=c),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!cr.has(s)||t.length!==2)return;const[i,o]=t,r=fr(i),a=fr(o);if(r!==a)if(Ji(r)&&Ji(a))for(let l=0;l<t.length;l++){const u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else Ve[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,s=[];for(let i=0;i<t.length;i++)(t[i]===null||Nc(t[i]))&&s.push(i);s.length&&Bc(t,s,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:s}=this;if(!t||!t.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ve[s](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(s,i).jump(i,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:s}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=s.length-1,r=s[o];s[o]=Ve[n](t.measureViewportBox(),window.getComputedStyle(t.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,l])=>{t.getValue(a).set(l)}),this.resolveNoneKeyframes()}}function zc(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let s=document;const i=n?.[e]??s.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}const gr=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function yr(e){return gi(e)&&"offsetHeight"in e}const vr=30,Wc=e=>!isNaN(parseFloat(e));class $c{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=Q.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Q.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Wc(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&An(!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 En);const s=this.events[t].add(n);return t==="change"?()=>{s(),L.read(()=>{this.events.change.getSize()||this.stop()})}:s}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,s){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}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=Q.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>vr)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,vr);return vi(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 Ze(e,t){return new $c(e,t)}const{schedule:as}=Mi(queueMicrotask,!1),de={x:!1,y:!1};function xr(){return de.x||de.y}function Uc(e){return e==="x"||e==="y"?de[e]?null:(de[e]=!0,()=>{de[e]=!1}):de.x||de.y?null:(de.x=de.y=!0,()=>{de.x=de.y=!1})}function br(e,t){const n=zc(e),s=new AbortController,i={passive:!0,...t,signal:s.signal};return[n,i,()=>s.abort()]}function wr(e){return!(e.pointerType==="touch"||xr())}function Kc(e,t,n={}){const[s,i,o]=br(e,n),r=a=>{if(!wr(a))return;const{target:l}=a,u=t(l,a);if(typeof u!="function"||!l)return;const c=d=>{wr(d)&&(u(d),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,i)};return s.forEach(a=>{a.addEventListener("pointerenter",r,i)}),o}const Tr=(e,t)=>t?e===t?!0:Tr(e,t.parentElement):!1,ls=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Xc=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Hc(e){return Xc.has(e.tagName)||e.tabIndex!==-1}const Gt=new WeakSet;function Sr(e){return t=>{t.key==="Enter"&&e(t)}}function cs(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Yc=(e,t)=>{const n=e.currentTarget;if(!n)return;const s=Sr(()=>{if(Gt.has(n))return;cs(n,"down");const i=Sr(()=>{cs(n,"up")}),o=()=>cs(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",s,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),t)};function Cr(e){return ls(e)&&!xr()}function Gc(e,t,n={}){const[s,i,o]=br(e,n),r=a=>{const l=a.currentTarget;if(!Cr(a))return;Gt.add(l);const u=t(l,a),c=(m,g)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",h),Gt.has(l)&&Gt.delete(l),Cr(m)&&typeof u=="function"&&u(m,{success:g})},d=m=>{c(m,l===window||l===document||n.useGlobalTarget||Tr(l,m.target))},h=m=>{c(m,!1)};window.addEventListener("pointerup",d,i),window.addEventListener("pointercancel",h,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,i),yr(a)&&(a.addEventListener("focus",u=>Yc(u,i)),!Hc(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function Pr(e){return gi(e)&&"ownerSVGElement"in e}function qc(e){return Pr(e)&&e.tagName==="svg"}const H=e=>!!(e&&e.getVelocity),Zc=[...dr,U,Ee],Jc=e=>Zc.find(ur(e)),us=T.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class Qc extends C.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const s=n.offsetParent,i=yr(s)&&s.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=i-o.width-o.left}return null}componentDidUpdate(){}render(){return this.props.children}}function eu({children:e,isPresent:t,anchorX:n,root:s}){const i=T.useId(),o=T.useRef(null),r=T.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=T.useContext(us);return T.useInsertionEffect(()=>{const{width:l,height:u,top:c,left:d,right:h}=r.current;if(t||!o.current||!l||!u)return;const m=n==="left"?`left: ${d}`:`right: ${h}`;o.current.dataset.motionPopId=i;const g=document.createElement("style");a&&(g.nonce=a);const v=s??document.head;return v.appendChild(g),g.sheet&&g.sheet.insertRule(`
23
23
  [data-motion-pop-id="${i}"] {
24
24
  position: absolute !important;
25
25
  width: ${l}px !important;
@@ -27,115 +27,104 @@ 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
- `),()=>{y.contains(p)&&y.removeChild(p)}},[t]),f.jsx(zc,{isPresent:t,childRef:o,sizeRef:r,children:S.cloneElement(e,{ref:o})})}const Xc=({children:e,initial:t,isPresent:n,onExitComplete:s,custom:i,presenceAffectsLayout:o,mode:r,anchorX:a,root:l})=>{const u=mn(Yc),c=T.useId();let d=!0,h=T.useMemo(()=>(d=!1,{id:c,initial:t,isPresent:n,custom:i,onExitComplete:m=>{u.set(m,!0);for(const p of u.values())if(!p)return;s&&s()},register:m=>(u.set(m,!1),()=>u.delete(m))}),[n,u,s]);return o&&d&&(h={...h}),T.useMemo(()=>{u.forEach((m,p)=>u.set(p,!1))},[n]),S.useEffect(()=>{!n&&!u.size&&s&&s()},[n]),r==="popLayout"&&(e=f.jsx(Kc,{isPresent:n,anchorX:a,root:l,children:e})),f.jsx(Vt.Provider,{value:h,children:e})};function Yc(){return new Map}function xr(e=!0){const t=T.useContext(Vt);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=t,o=T.useId();T.useEffect(()=>{if(e)return i(o)},[e]);const r=T.useCallback(()=>e&&s&&s(o),[o,s,e]);return!n&&s?[!1,r]:[!0]}const Wt=e=>e.key||"";function br(e){const t=[];return T.Children.forEach(e,n=>{T.isValidElement(n)&&t.push(n)}),t}const Ut=({children:e,custom:t,initial:n=!0,onExitComplete:s,presenceAffectsLayout:i=!0,mode:o="sync",propagate:r=!1,anchorX:a="left",root:l})=>{const[u,c]=xr(r),d=T.useMemo(()=>br(e),[e]),h=r&&!u?[]:d.map(Wt),m=T.useRef(!0),p=T.useRef(d),y=mn(()=>new Map),[x,v]=T.useState(d),[b,g]=T.useState(d);ai(()=>{m.current=!1,p.current=d;for(let P=0;P<b.length;P++){const k=Wt(b[P]);h.includes(k)?y.delete(k):y.get(k)!==!0&&y.set(k,!1)}},[b,h.length,h.join("-")]);const E=[];if(d!==x){let P=[...d];for(let k=0;k<b.length;k++){const A=b[k],V=Wt(A);h.includes(V)||(P.splice(k,0,A),E.push(A))}return o==="wait"&&E.length&&(P=E),g(br(P)),v(d),null}process.env.NODE_ENV!=="production"&&o==="wait"&&b.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:C}=T.useContext(hn);return f.jsx(f.Fragment,{children:b.map(P=>{const k=Wt(P),A=r&&!u?!1:d===b||h.includes(k),V=()=>{if(y.has(k))y.set(k,!0);else return;let I=!0;y.forEach(U=>{U||(I=!1)}),I&&(C?.(),g(p.current),r&&c?.(),s&&s())};return f.jsx(Xc,{isPresent:A,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:o,root:l,onExitComplete:A?void 0:V,anchorX:a,children:P},k)})})},wr=T.createContext({strict:!1}),Tr={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"]},qe={};for(const e in Tr)qe[e]={isEnabled:t=>Tr[e].some(n=>!!t[n])};function Hc(e){for(const t in e)qe[t]={...qe[t],...e[t]}}const Gc=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 zt(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Gc.has(e)}let Sr=e=>!zt(e);function qc(e){typeof e=="function"&&(Sr=t=>t.startsWith("on")?!zt(t):e(t))}try{qc(require("@emotion/is-prop-valid").default)}catch{}function Zc(e,t,n){const s={};for(const i in e)i==="values"&&typeof e.values=="object"||(Sr(i)||n===!0&&zt(i)||!t&&!zt(i)||e.draggable&&i.startsWith("onDrag"))&&(s[i]=e[i]);return s}const Kt=T.createContext({});function Xt(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function xt(e){return typeof e=="string"||Array.isArray(e)}const is=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],rs=["initial",...is];function Yt(e){return Xt(e.animate)||rs.some(t=>xt(e[t]))}function Cr(e){return!!(Yt(e)||e.variants)}function Jc(e,t){if(Yt(e)){const{initial:n,animate:s}=e;return{initial:n===!1||xt(n)?n:void 0,animate:xt(s)?s:void 0}}return e.inherit!==!1?t:{}}function Qc(e){const{initial:t,animate:n}=Jc(e,T.useContext(Kt));return T.useMemo(()=>({initial:t,animate:n}),[Pr(t),Pr(n)])}function Pr(e){return Array.isArray(e)?e.join(" "):e}const bt={};function eu(e){for(const t in e)bt[t]=e[t],Pn(t)&&(bt[t].isCSSVariable=!0)}function Er(e,{layout:t,layoutId:n}){return He.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!bt[e]||e==="opacity")}const tu={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},nu=Ye.length;function su(e,t,n){let s="",i=!0;for(let o=0;o<nu;o++){const r=Ye[o],a=e[r];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(r.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const u=cr(a,Qn[r]);if(!l){i=!1;const c=tu[r]||r;s+=`${c}(${u}) `}n&&(t[r]=u)}}return s=s.trim(),n?s=n(t,i?"":s):i&&(s="none"),s}function os(e,t,n){const{style:s,vars:i,transformOrigin:o}=e;let r=!1,a=!1;for(const l in t){const u=t[l];if(He.has(l)){r=!0;continue}else if(Pn(l)){i[l]=u;continue}else{const c=cr(u,Qn[l]);l.startsWith("origin")?(a=!0,o[l]=c):s[l]=c}}if(t.transform||(r||n?s.transform=su(t,e.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=o;s.transformOrigin=`${l} ${u} ${c}`}}const as=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function kr(e,t,n){for(const s in t)!Y(t[s])&&!Er(s,n)&&(e[s]=t[s])}function iu({transformTemplate:e},t){return T.useMemo(()=>{const n=as();return os(n,t,e),Object.assign({},n.vars,n.style)},[t])}function ru(e,t){const n=e.style||{},s={};return kr(s,n,e),Object.assign(s,iu(e,t)),s}function ou(e,t){const n={},s=ru(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.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=s,n}const au={offset:"stroke-dashoffset",array:"stroke-dasharray"},lu={offset:"strokeDashoffset",array:"strokeDasharray"};function cu(e,t,n=1,s=0,i=!0){e.pathLength=1;const o=i?au:lu;e[o.offset]=j.transform(-s);const r=j.transform(t),a=j.transform(n);e[o.array]=`${r} ${a}`}function Ar(e,{attrX:t,attrY:n,attrScale:s,pathLength:i,pathSpacing:o=1,pathOffset:r=0,...a},l,u,c){if(os(e,a,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:h}=e;d.transform&&(h.transform=d.transform,delete d.transform),(h.transform||d.transformOrigin)&&(h.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),h.transform&&(h.transformBox=c?.transformBox??"fill-box",delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),s!==void 0&&(d.scale=s),i!==void 0&&cu(d,i,o,r,!1)}const jr=()=>({...as(),attrs:{}}),Rr=e=>typeof e=="string"&&e.toLowerCase()==="svg";function uu(e,t,n,s){const i=T.useMemo(()=>{const o=jr();return Ar(o,t,Rr(s),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};kr(o,e.style,e),i.style={...o,...i.style}}return i}const du=["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 ls(e){return typeof e!="string"||e.includes("-")?!1:!!(du.indexOf(e)>-1||/[A-Z]/u.test(e))}function fu(e,t,n,{latestValues:s},i,o=!1){const a=(ls(e)?uu:ou)(t,s,i,e),l=Zc(t,typeof e=="string",o),u=e!==T.Fragment?{...l,...a,ref:n}:{},{children:c}=t,d=T.useMemo(()=>Y(c)?c.get():c,[c]);return T.createElement(e,{...u,children:d})}function Dr(e){const t=[{},{}];return e?.values.forEach((n,s)=>{t[0][s]=n.get(),t[1][s]=n.getVelocity()}),t}function cs(e,t,n,s){if(typeof t=="function"){const[i,o]=Dr(s);t=t(n!==void 0?n:e.custom,i,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,o]=Dr(s);t=t(n!==void 0?n:e.custom,i,o)}return t}function Ht(e){return Y(e)?e.get():e}function hu({scrapeMotionValuesFromProps:e,createRenderState:t},n,s,i){return{latestValues:mu(n,s,i,e),renderState:t()}}function mu(e,t,n,s){const i={},o=s(e,{});for(const h in o)i[h]=Ht(o[h]);let{initial:r,animate:a}=e;const l=Yt(e),u=Cr(e);t&&u&&!l&&e.inherit!==!1&&(r===void 0&&(r=t.initial),a===void 0&&(a=t.animate));let c=n?n.initial===!1:!1;c=c||r===!1;const d=c?a:r;if(d&&typeof d!="boolean"&&!Xt(d)){const h=Array.isArray(d)?d:[d];for(let m=0;m<h.length;m++){const p=cs(e,h[m]);if(p){const{transitionEnd:y,transition:x,...v}=p;for(const b in v){let g=v[b];if(Array.isArray(g)){const E=c?g.length-1:0;g=g[E]}g!==null&&(i[b]=g)}for(const b in y)i[b]=y[b]}}}return i}const Mr=e=>(t,n)=>{const s=T.useContext(Kt),i=T.useContext(Vt),o=()=>hu(e,t,s,i);return n?o():mn(o)};function us(e,t,n){const{style:s}=e,i={};for(const o in s)(Y(s[o])||t.style&&Y(t.style[o])||Er(o,e)||n?.getValue(o)?.liveStyle!==void 0)&&(i[o]=s[o]);return i}const pu=Mr({scrapeMotionValuesFromProps:us,createRenderState:as});function Nr(e,t,n){const s=us(e,t,n);for(const i in e)if(Y(e[i])||Y(t[i])){const o=Ye.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[o]=e[i]}return s}const gu=Mr({scrapeMotionValuesFromProps:Nr,createRenderState:jr}),yu=Symbol.for("motionComponentSymbol");function Ze(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function vu(e,t,n){return T.useCallback(s=>{s&&e.onMount&&e.onMount(s),t&&(s?t.mount(s):t.unmount()),n&&(typeof n=="function"?n(s):Ze(n)&&(n.current=s))},[t])}const ds=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Vr="data-"+ds("framerAppearId"),Ir=T.createContext({});function xu(e,t,n,s,i){const{visualElement:o}=T.useContext(Kt),r=T.useContext(wr),a=T.useContext(Vt),l=T.useContext(ss).reducedMotion,u=T.useRef(null);s=s||r.renderer,!u.current&&s&&(u.current=s(e,{visualState:t,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const c=u.current,d=T.useContext(Ir);c&&!c.projection&&i&&(c.type==="html"||c.type==="svg")&&bu(u.current,n,i,d);const h=T.useRef(!1);T.useInsertionEffect(()=>{c&&h.current&&c.update(n,a)});const m=n[Vr],p=T.useRef(!!m&&!window.MotionHandoffIsComplete?.(m)&&window.MotionHasOptimisedAnimation?.(m));return ai(()=>{c&&(h.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),p.current&&c.animationState&&c.animationState.animateChanges())}),T.useEffect(()=>{c&&(!p.current&&c.animationState&&c.animationState.animateChanges(),p.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(m)}),p.current=!1),c.enteringChildren=void 0)}),c}function bu(e,t,n,s){const{layoutId:i,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Or(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!r||a&&Ze(a),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,crossfade:c,layoutScroll:l,layoutRoot:u})}function Or(e){if(e)return e.options.allowProjection!==!1?e.projection:Or(e.parent)}function fs(e,{forwardMotionProps:t=!1}={},n,s){n&&Hc(n);const i=ls(e)?gu:pu;function o(a,l){let u;const c={...T.useContext(ss),...a,layoutId:wu(a)},{isStatic:d}=c,h=Qc(a),m=i(a,d);if(!d&&pn){Tu(c,n);const p=Su(c);u=p.MeasureLayout,h.visualElement=xu(e,m,c,s,p.ProjectionNode)}return f.jsxs(Kt.Provider,{value:h,children:[u&&h.visualElement?f.jsx(u,{visualElement:h.visualElement,...c}):null,fu(e,a,vu(m,h.visualElement,l),m,d,t)]})}o.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const r=T.forwardRef(o);return r[yu]=e,r}function wu({layoutId:e}){const t=T.useContext(hn).id;return t&&e!==void 0?t+"-"+e:e}function Tu(e,t){const n=T.useContext(wr).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const s="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Ue(!1,s,"lazy-strict-mode"):Te(!1,s,"lazy-strict-mode")}}function Su(e){const{drag:t,layout:n}=qe;if(!t&&!n)return{};const s={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function Cu(e,t){if(typeof Proxy>"u")return fs;const n=new Map,s=(o,r)=>fs(o,r,e,t),i=(o,r)=>(process.env.NODE_ENV!=="production"&&wn(!1,"motion() is deprecated. Use motion.create() instead."),s(o,r));return new Proxy(i,{get:(o,r)=>r==="create"?s:(n.has(r)||n.set(r,fs(r,void 0,e,t)),n.get(r))})}function Lr({top:e,left:t,right:n,bottom:s}){return{x:{min:t,max:n},y:{min:e,max:s}}}function Pu({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Eu(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),s=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function hs(e){return e===void 0||e===1}function ms({scale:e,scaleX:t,scaleY:n}){return!hs(e)||!hs(t)||!hs(n)}function Oe(e){return ms(e)||Fr(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Fr(e){return Br(e.x)||Br(e.y)}function Br(e){return e&&e!=="0%"}function Gt(e,t,n){const s=e-n,i=t*s;return n+i}function _r(e,t,n,s,i){return i!==void 0&&(e=Gt(e,i,s)),Gt(e,n,s)+t}function ps(e,t=0,n=1,s,i){e.min=_r(e.min,t,n,s,i),e.max=_r(e.max,t,n,s,i)}function $r(e,{x:t,y:n}){ps(e.x,t.translate,t.scale,t.originPoint),ps(e.y,n.translate,n.scale,n.originPoint)}const Wr=.999999999999,Ur=1.0000000000001;function ku(e,t,n,s=!1){const i=n.length;if(!i)return;t.x=t.y=1;let o,r;for(let a=0;a<i;a++){o=n[a],r=o.projectionDelta;const{visualElement:l}=o.options;l&&l.props.style&&l.props.style.display==="contents"||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Qe(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(t.x*=r.x.scale,t.y*=r.y.scale,$r(e,r)),s&&Oe(o.latestValues)&&Qe(e,o.latestValues))}t.x<Ur&&t.x>Wr&&(t.x=1),t.y<Ur&&t.y>Wr&&(t.y=1)}function Je(e,t){e.min=e.min+t,e.max=e.max+t}function zr(e,t,n,s,i=.5){const o=F(e.min,e.max,i);ps(e,t,n,o,s)}function Qe(e,t){zr(e.x,t.x,t.scaleX,t.scale,t.originX),zr(e.y,t.y,t.scaleY,t.scale,t.originY)}function Kr(e,t){return Lr(Eu(e.getBoundingClientRect(),t))}function Au(e,t,n){const s=Kr(e,n),{scroll:i}=t;return i&&(Je(s.x,i.offset.x),Je(s.y,i.offset.y)),s}const Xr=()=>({translate:0,scale:1,origin:0,originPoint:0}),et=()=>({x:Xr(),y:Xr()}),Yr=()=>({min:0,max:0}),W=()=>({x:Yr(),y:Yr()}),gs={current:null},Hr={current:!1};function ju(){if(Hr.current=!0,!!pn)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>gs.current=e.matches;e.addEventListener("change",t),t()}else gs.current=!1}const Ru=new WeakMap;function Du(e,t,n){for(const s in t){const i=t[s],o=n[s];if(Y(i))e.addValue(s,i);else if(Y(o))e.addValue(s,Ge(i,{owner:e}));else if(o!==i)if(e.hasValue(s)){const r=e.getValue(s);r.liveStyle===!0?r.jump(i):r.hasAnimated||r.set(i)}else{const r=e.getStaticValue(s);e.addValue(s,Ge(r!==void 0?r:i,{owner:e}))}}for(const s in n)t[s]===void 0&&e.removeValue(s);return t}const Gr=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Mu{scrapeMotionValuesFromProps(t,n,s){return{}}constructor({parent:t,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:o,visualState:r},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Gn,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 h=Q.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,L.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=s,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=Yt(n),this.isVariantNode=Cr(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in d){const m=d[h];l[h]!==void 0&&Y(m)&&m.set(l[h])}}mount(t){this.current=t,Ru.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,s)=>this.bindToMotionValue(s,n)),Hr.current||ju(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:gs.current,process.env.NODE_ENV!=="production"&&wn(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(),Pe(this.notifyUpdate),Pe(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 s=He.has(t);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",r=>{this.latestValues[t]=r,this.props.onUpdate&&L.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),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 qe){const n=qe[t];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[t]&&i&&s(this.props)&&(this.features[t]=new i(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):W()}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 s=0;s<Gr.length;s++){const i=Gr[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,r=t[o];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=Du(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 s=this.values.get(t);n!==s&&(s&&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 s=this.values.get(t);return s===void 0&&n!==void 0&&(s=Ge(n===null?void 0:n,{owner:this}),this.addValue(t,s)),s}readValue(t,n){let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(li(s)||ui(s))?s=parseFloat(s):!Uc(s)&&ke.test(n)&&(s=lr(t,n)),this.setBaseTarget(t,Y(s)?s.get():s)),Y(s)?s.get():s}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const o=cs(this.props,n,this.presenceContext?.custom);o&&(s=o[t])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!Y(i)?i:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new bn),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){es.render(this.render)}}class qr extends Mu{constructor(){super(...arguments),this.KeyframeResolver=Dc}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:s}){delete n[t],delete s[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Y(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Zr(e,{style:t,vars:n},s,i){const o=e.style;let r;for(r in t)o[r]=t[r];i?.applyProjectionStyles(o,s);for(r in n)o.setProperty(r,n[r])}function Nu(e){return window.getComputedStyle(e)}class Vu extends qr{constructor(){super(...arguments),this.type="html",this.renderInstance=Zr}readValueFromInstance(t,n){if(He.has(n))return this.projection?.isProjecting?zn(n):ql(t,n);{const s=Nu(t),i=(Pn(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Kr(t,n)}build(t,n,s){os(t,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,n,s){return us(t,n,s)}}const Jr=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 Iu(e,t,n,s){Zr(e,t,void 0,s);for(const i in t.attrs)e.setAttribute(Jr.has(i)?i:ds(i),t.attrs[i])}class Ou extends qr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=W}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(He.has(n)){const s=ar(n);return s&&s.default||0}return n=Jr.has(n)?n:ds(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,s){return Nr(t,n,s)}build(t,n,s){Ar(t,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(t,n,s,i){Iu(t,n,s,i)}mount(t){this.isSVGTag=Rr(t.tagName),super.mount(t)}}const Lu=(e,t)=>ls(e)?new Ou(t):new Vu(t,{allowProjection:e!==T.Fragment});function tt(e,t,n){const s=e.getProps();return cs(s,t,n!==void 0?n:s.custom,e)}const ys=e=>Array.isArray(e);function Fu(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ge(n))}function Bu(e){return ys(e)?e[e.length-1]||0:e}function _u(e,t){const n=tt(e,t);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const r in o){const a=Bu(o[r]);Fu(e,r,a)}}function $u(e){return!!(Y(e)&&e.add)}function vs(e,t){const n=e.getValue("willChange");if($u(n))return n.add(t);if(!n&&Se.WillChange){const s=new Se.WillChange("auto");e.addValue("willChange",s),s.add(t)}}function Qr(e){return e.props[Vr]}const Wu=e=>e!==null;function Uu(e,{repeat:t,repeatType:n="loop"},s){const i=e.filter(Wu),o=t&&n!=="loop"&&t%2===1?0:i.length-1;return i[o]}const zu={type:"spring",stiffness:500,damping:25,restSpeed:10},Ku=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Xu={type:"keyframes",duration:.8},Yu={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Hu=(e,{keyframes:t})=>t.length>2?Xu:He.has(e)?e.startsWith("scale")?Ku(t[1]):zu:Yu;function Gu({when:e,delay:t,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const xs=(e,t,n,s={},i,o)=>r=>{const a=Zn(s,e)||{},l=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-le(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:h=>{t.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:o?void 0:i};Gu(a)||Object.assign(c,Hu(e,c)),c.duration&&(c.duration=le(c.duration)),c.repeatDelay&&(c.repeatDelay=le(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(qn(c),c.delay===0&&(d=!0)),(Se.instantAnimations||Se.skipAnimations)&&(d=!0,qn(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,d&&!o&&t.get()!==void 0){const h=Uu(c.keyframes,a);if(h!==void 0){L.update(()=>{c.onUpdate(h),c.onComplete()});return}}return a.isSync?new $n(c):new xc(c)};function qu({protectedKeys:e,needsAnimating:t},n){const s=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,s}function eo(e,t,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:r,...a}=t;s&&(o=s);const l=[],u=i&&e.animationState&&e.animationState.getState()[i];for(const c in a){const d=e.getValue(c,e.latestValues[c]??null),h=a[c];if(h===void 0||u&&qu(u,c))continue;const m={delay:n,...Zn(o||{},c)},p=d.get();if(p!==void 0&&!d.isAnimating&&!Array.isArray(h)&&h===p&&!m.velocity)continue;let y=!1;if(window.MotionHandoffAnimation){const v=Qr(e);if(v){const b=window.MotionHandoffAnimation(v,c,L);b!==null&&(m.startTime=b,y=!0)}}vs(e,c),d.start(xs(c,d,h,e.shouldReduceMotion&&nr.has(c)?{type:!1}:m,e,y));const x=d.animation;x&&l.push(x)}return r&&Promise.all(l).then(()=>{L.update(()=>{r&&_u(e,r)})}),l}function to(e,t,n,s=0,i=1){const o=Array.from(e).sort((u,c)=>u.sortNodePosition(c)).indexOf(t),r=e.size,a=(r-1)*s;return typeof n=="function"?n(o,r):i===1?o*s:a-o*s}function bs(e,t,n={}){const s=tt(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(eo(e,s,n)):()=>Promise.resolve(),r=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:c,staggerDirection:d}=i;return Zu(e,t,l,u,c,d,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[l,u]=a==="beforeChildren"?[o,r]:[r,o];return l().then(()=>u())}else return Promise.all([o(),r(n.delay)])}function Zu(e,t,n=0,s=0,i=0,o=1,r){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(bs(l,t,{...r,delay:n+(typeof s=="function"?0:s)+to(e.variantChildren,l,s,i,o)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function Ju(e,t,n={}){e.notify("AnimationStart",t);let s;if(Array.isArray(t)){const i=t.map(o=>bs(e,o,n));s=Promise.all(i)}else if(typeof t=="string")s=bs(e,t,n);else{const i=typeof t=="function"?tt(e,t,n.custom):t;s=Promise.all(eo(e,i,n))}return s.then(()=>{e.notify("AnimationComplete",t)})}function no(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let s=0;s<n;s++)if(t[s]!==e[s])return!1;return!0}const Qu=rs.length;function so(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?so(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Qu;n++){const s=rs[n],i=e.props[s];(xt(i)||i===!1)&&(t[s]=i)}return t}const ed=[...is].reverse(),td=is.length;function nd(e){return t=>Promise.all(t.map(({animation:n,options:s})=>Ju(e,n,s)))}function sd(e){let t=nd(e),n=io(),s=!0;const i=l=>(u,c)=>{const d=tt(e,c,l==="exit"?e.presenceContext?.custom:void 0);if(d){const{transition:h,transitionEnd:m,...p}=d;u={...u,...p,...m}}return u};function o(l){t=l(e)}function r(l){const{props:u}=e,c=so(e.parent)||{},d=[],h=new Set;let m={},p=1/0;for(let x=0;x<td;x++){const v=ed[x],b=n[v],g=u[v]!==void 0?u[v]:c[v],E=xt(g),C=v===l?b.isActive:null;C===!1&&(p=x);let P=g===c[v]&&g!==u[v]&&E;if(P&&s&&e.manuallyAnimateOnMount&&(P=!1),b.protectedKeys={...m},!b.isActive&&C===null||!g&&!b.prevProp||Xt(g)||typeof g=="boolean")continue;const k=id(b.prevProp,g);let A=k||v===l&&b.isActive&&!P&&E||x>p&&E,V=!1;const I=Array.isArray(g)?g:[g];let U=I.reduce(i(v),{});C===!1&&(U={});const{prevResolvedValues:se={}}=b,O={...se,...U},K=_=>{A=!0,h.has(_)&&(V=!0,h.delete(_)),b.needsAnimating[_]=!0;const N=e.getValue(_);N&&(N.liveStyle=!1)};for(const _ in O){const N=U[_],J=se[_];if(m.hasOwnProperty(_))continue;let w=!1;ys(N)&&ys(J)?w=!no(N,J):w=N!==J,w?N!=null?K(_):h.add(_):N!==void 0&&h.has(_)?K(_):b.protectedKeys[_]=!0}b.prevProp=g,b.prevResolvedValues=U,b.isActive&&(m={...m,...U}),s&&e.blockInitialAnimation&&(A=!1);const xe=P&&k;A&&(!xe||V)&&d.push(...I.map(_=>{const N={type:v};if(typeof _=="string"&&s&&!xe&&e.manuallyAnimateOnMount&&e.parent){const{parent:J}=e,w=tt(J,_);if(J.enteringChildren&&w){const{delayChildren:D}=w.transition||{};N.delay=to(J.enteringChildren,e,D)}}return{animation:_,options:N}}))}if(h.size){const x={};if(typeof u.initial!="boolean"){const v=tt(e,Array.isArray(u.initial)?u.initial[0]:u.initial);v&&v.transition&&(x.transition=v.transition)}h.forEach(v=>{const b=e.getBaseTarget(v),g=e.getValue(v);g&&(g.liveStyle=!0),x[v]=b??null}),d.push({animation:x})}let y=!!d.length;return s&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(y=!1),s=!1,y?t(d):Promise.resolve()}function a(l,u){if(n[l].isActive===u)return Promise.resolve();e.variantChildren?.forEach(d=>d.animationState?.setActive(l,u)),n[l].isActive=u;const c=r(l);for(const d in n)n[d].protectedKeys={};return c}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=io(),s=!0}}}function id(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!no(t,e):!1}function Le(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function io(){return{animate:Le(!0),whileInView:Le(),whileHover:Le(),whileTap:Le(),whileDrag:Le(),whileFocus:Le(),exit:Le()}}class Ae{constructor(t){this.isMounted=!1,this.node=t}update(){}}class rd extends Ae{constructor(t){super(t),t.animationState||(t.animationState=sd(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Xt(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 od=0;class ad extends Ae{constructor(){super(...arguments),this.id=od++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.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 ld={animation:{Feature:rd},exit:{Feature:ad}};function wt(e,t,n,s={passive:!0}){return e.addEventListener(t,n,s),()=>e.removeEventListener(t,n)}function Tt(e){return{point:{x:e.pageX,y:e.pageY}}}const cd=e=>t=>ts(t)&&e(t,Tt(t));function St(e,t,n,s){return wt(e,t,cd(n),s)}const ro=1e-4,ud=1-ro,dd=1+ro,oo=.01,fd=0-oo,hd=0+oo;function Z(e){return e.max-e.min}function md(e,t,n){return Math.abs(e-t)<=n}function ao(e,t,n,s=.5){e.origin=s,e.originPoint=F(t.min,t.max,e.origin),e.scale=Z(n)/Z(t),e.translate=F(n.min,n.max,e.origin)-e.originPoint,(e.scale>=ud&&e.scale<=dd||isNaN(e.scale))&&(e.scale=1),(e.translate>=fd&&e.translate<=hd||isNaN(e.translate))&&(e.translate=0)}function Ct(e,t,n,s){ao(e.x,t.x,n.x,s?s.originX:void 0),ao(e.y,t.y,n.y,s?s.originY:void 0)}function lo(e,t,n){e.min=n.min+t.min,e.max=e.min+Z(t)}function pd(e,t,n){lo(e.x,t.x,n.x),lo(e.y,t.y,n.y)}function co(e,t,n){e.min=t.min-n.min,e.max=e.min+Z(t)}function Pt(e,t,n){co(e.x,t.x,n.x),co(e.y,t.y,n.y)}function re(e){return[e("x"),e("y")]}const uo=({current:e})=>e?e.ownerDocument.defaultView:null,fo=(e,t)=>Math.abs(e-t);function gd(e,t){const n=fo(e.x,t.x),s=fo(e.y,t.y);return Math.sqrt(n**2+s**2)}class ho{constructor(t,n,{transformPagePoint:s,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:r=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=Ts(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,p=gd(h.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!p)return;const{point:y}=h,{timestamp:x}=X;this.history.push({...y,timestamp:x});const{onStart:v,onMove:b}=this.handlers;m||(v&&v(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),b&&b(this.lastMoveEvent,h)},this.handlePointerMove=(h,m)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=ws(m,this.transformPagePoint),L.update(this.updatePoint,!0)},this.handlePointerUp=(h,m)=>{this.end();const{onEnd:p,onSessionEnd:y,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Ts(h.type==="pointercancel"?this.lastMoveEventInfo:ws(m,this.transformPagePoint),this.history);this.startEvent&&p&&p(h,v),y&&y(h,v)},!ts(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=r,this.contextWindow=i||window;const a=Tt(t),l=ws(a,this.transformPagePoint),{point:u}=l,{timestamp:c}=X;this.history=[{...u,timestamp:c}];const{onSessionStart:d}=n;d&&d(t,Ts(l,this.history)),this.removeListeners=dt(St(this.contextWindow,"pointermove",this.handlePointerMove),St(this.contextWindow,"pointerup",this.handlePointerUp),St(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Pe(this.updatePoint)}}function ws(e,t){return t?{point:t(e.point)}:e}function mo(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ts({point:e},t){return{point:e,delta:mo(e,po(t)),offset:mo(e,yd(t)),velocity:vd(t,.1)}}function yd(e){return e[0]}function po(e){return e[e.length-1]}function vd(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,s=null;const i=po(e);for(;n>=0&&(s=e[n],!(i.timestamp-s.timestamp>le(t)));)n--;if(!s)return{x:0,y:0};const o=fe(i.timestamp-s.timestamp);if(o===0)return{x:0,y:0};const r={x:(i.x-s.x)/o,y:(i.y-s.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function xd(e,{min:t,max:n},s){return t!==void 0&&e<t?e=s?F(t,e,s.min):Math.max(e,t):n!==void 0&&e>n&&(e=s?F(n,e,s.max):Math.min(e,n)),e}function go(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function bd(e,{top:t,left:n,bottom:s,right:i}){return{x:go(e.x,n,i),y:go(e.y,t,s)}}function yo(e,t){let n=t.min-e.min,s=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,s]=[s,n]),{min:n,max:s}}function wd(e,t){return{x:yo(e.x,t.x),y:yo(e.y,t.y)}}function Td(e,t){let n=.5;const s=Z(e),i=Z(t);return i>s?n=ft(t.min,t.max-s,e.min):s>i&&(n=ft(e.min,e.max-i,t.min)),we(0,1,n)}function Sd(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 Ss=.35;function Cd(e=Ss){return e===!1?e=0:e===!0&&(e=Ss),{x:vo(e,"left","right"),y:vo(e,"top","bottom")}}function vo(e,t,n){return{min:xo(e,t),max:xo(e,n)}}function xo(e,t){return typeof e=="number"?e:e[t]||0}const Pd=new WeakMap;class Ed{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=W(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:s}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const o=d=>{const{dragSnapToOrigin:h}=this.getProps();h?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Tt(d).point)},r=(d,h)=>{const{drag:m,dragPropagation:p,onDragStart:y}=this.getProps();if(m&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Ic(m),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=h,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),re(v=>{let b=this.getAxisMotionValue(v).get()||0;if(he.test(b)){const{projection:g}=this.visualElement;if(g&&g.layout){const E=g.layout.layoutBox[v];E&&(b=Z(E)*(parseFloat(b)/100))}}this.originPoint[v]=b}),y&&L.postRender(()=>y(d,h)),vs(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},a=(d,h)=>{this.latestPointerEvent=d,this.latestPanInfo=h;const{dragPropagation:m,dragDirectionLock:p,onDirectionLock:y,onDrag:x}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:v}=h;if(p&&this.currentDirection===null){this.currentDirection=kd(v),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",h.point,v),this.updateAxis("y",h.point,v),this.visualElement.render(),x&&x(d,h)},l=(d,h)=>{this.latestPointerEvent=d,this.latestPanInfo=h,this.stop(d,h),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>re(d=>this.getAnimationState(d)==="paused"&&this.getAxisMotionValue(d).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new ho(t,{onSessionStart:o,onStart:r,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:s,contextWindow:uo(this.visualElement)})}stop(t,n){const s=t||this.latestPointerEvent,i=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!i||!s)return;const{velocity:r}=i;this.startAnimation(r);const{onDragEnd:a}=this.getProps();a&&L.postRender(()=>a(s,i))}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:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,s){const{drag:i}=this.getProps();if(!s||!qt(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let r=this.originPoint[t]+s[t];this.constraints&&this.constraints[t]&&(r=xd(r,this.constraints[t],this.elastic[t])),o.set(r)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;t&&Ze(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&s?this.constraints=bd(s.layoutBox,t):this.constraints=!1,this.elastic=Cd(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&re(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Sd(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Ze(t))return!1;const s=t.current;Te(s!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=Au(s,i.root,this.visualElement.getTransformPagePoint());let r=wd(i.layout.layoutBox,o);if(n){const a=n(Pu(r));this.hasMutatedConstraints=!!a,a&&(r=Lr(a))}return r}startAnimation(t){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=re(c=>{if(!qt(c,n,this.currentDirection))return;let d=l&&l[c]||{};r&&(d={min:0,max:0});const h=i?200:1e6,m=i?40:1e7,p={type:"inertia",velocity:s?t[c]:0,bounceStiffness:h,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...o,...d};return this.startAxisValueAnimation(c,p)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const s=this.getAxisMotionValue(t);return vs(this.visualElement,t),s.start(xs(t,s,0,n,this.visualElement,!1))}stopAnimation(){re(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){re(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(t,(s.initial?s.initial[t]:void 0)||0)}snapToCursor(t){re(n=>{const{drag:s}=this.getProps();if(!qt(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:r,max:a}=i.layout.layoutBox[n];o.set(t[n]-F(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!Ze(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};re(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();i[r]=Td({min:l,max:l},this.constraints[r])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),re(r=>{if(!qt(r,t,null))return;const a=this.getAxisMotionValue(r),{min:l,max:u}=this.constraints[r];a.set(F(l,u,i[r]))})}addListeners(){if(!this.visualElement.current)return;Pd.set(this.visualElement,this);const t=this.visualElement.current,n=St(t,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();Ze(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),L.read(s);const r=wt(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(re(c=>{const d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=l[c].translate,d.set(d.get()+l[c].translate))}),this.visualElement.render())}));return()=>{r(),n(),o(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=Ss,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function qt(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function kd(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Ad extends Ae{constructor(t){super(t),this.removeGroupControls=ie,this.removeListeners=ie,this.controls=new Ed(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ie}unmount(){this.removeGroupControls(),this.removeListeners()}}const bo=e=>(t,n)=>{e&&L.postRender(()=>e(t,n))};class jd extends Ae{constructor(){super(...arguments),this.removePointerDownListener=ie}onPointerDown(t){this.session=new ho(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:uo(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:bo(t),onStart:bo(n),onMove:s,onEnd:(o,r)=>{delete this.session,i&&L.postRender(()=>i(o,r))}}}mount(){this.removePointerDownListener=St(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 Zt={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function wo(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Et={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(j.test(e))e=parseFloat(e);else return e;const n=wo(e,t.target.x),s=wo(e,t.target.y);return`${n}% ${s}%`}},Rd={correct:(e,{treeScale:t,projectionDelta:n})=>{const s=e,i=ke.parse(e);if(i.length>5)return s;const o=ke.createTransformer(e),r=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+r]/=a,i[1+r]/=l;const u=F(a,l,.5);return typeof i[2+r]=="number"&&(i[2+r]/=u),typeof i[3+r]=="number"&&(i[3+r]/=u),o(i)}};let Cs=!1;class Dd extends T.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=t;eu(Md),o&&(n.group&&n.group.add(o),s&&s.register&&i&&s.register(o),Cs&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Zt.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,{projection:r}=s;return r&&(r.isPresent=o,Cs=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==o?r.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?r.promote():r.relegate()||L.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),es.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=t;Cs=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function To(e){const[t,n]=xr(),s=T.useContext(hn);return f.jsx(Dd,{...e,layoutGroup:s,switchLayoutGroup:T.useContext(Ir),isPresent:t,safeToRemove:n})}const Md={borderRadius:{...Et,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Et,borderTopRightRadius:Et,borderBottomLeftRadius:Et,borderBottomRightRadius:Et,boxShadow:Rd};function Nd(e,t,n){const s=Y(e)?e:Ge(e);return s.start(xs("",s,t,n)),s.animation}const Vd=(e,t)=>e.depth-t.depth;class Id{constructor(){this.children=[],this.isDirty=!1}add(t){gn(this.children,t),this.isDirty=!0}remove(t){yn(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Vd),this.isDirty=!1,this.children.forEach(t)}}function Od(e,t){const n=Q.now(),s=({timestamp:i})=>{const o=i-n;o>=t&&(Pe(s),e(o-t))};return L.setup(s,!0),()=>Pe(s)}const So=["TopLeft","TopRight","BottomLeft","BottomRight"],Ld=So.length,Co=e=>typeof e=="string"?parseFloat(e):e,Po=e=>typeof e=="number"||j.test(e);function Fd(e,t,n,s,i,o){i?(e.opacity=F(0,n.opacity??1,Bd(s)),e.opacityExit=F(t.opacity??1,0,_d(s))):o&&(e.opacity=F(t.opacity??1,n.opacity??1,s));for(let r=0;r<Ld;r++){const a=`border${So[r]}Radius`;let l=Eo(t,a),u=Eo(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||Po(l)===Po(u)?(e[a]=Math.max(F(Co(l),Co(u),s),0),(he.test(u)||he.test(l))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=F(t.rotate||0,n.rotate||0,s))}function Eo(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Bd=ko(0,.5,xi),_d=ko(.5,.95,ie);function ko(e,t,n){return s=>s<e?0:s>t?1:n(ft(e,t,s))}function Ao(e,t){e.min=t.min,e.max=t.max}function oe(e,t){Ao(e.x,t.x),Ao(e.y,t.y)}function jo(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Ro(e,t,n,s,i){return e-=t,e=Gt(e,1/n,s),i!==void 0&&(e=Gt(e,1/i,s)),e}function $d(e,t=0,n=1,s=.5,i,o=e,r=e){if(he.test(t)&&(t=parseFloat(t),t=F(r.min,r.max,t/100)-r.min),typeof t!="number")return;let a=F(o.min,o.max,s);e===o&&(a-=t),e.min=Ro(e.min,t,n,a,i),e.max=Ro(e.max,t,n,a,i)}function Do(e,t,[n,s,i],o,r){$d(e,t[n],t[s],t[i],t.scale,o,r)}const Wd=["x","scaleX","originX"],Ud=["y","scaleY","originY"];function Mo(e,t,n,s){Do(e.x,t,Wd,n?n.x:void 0,s?s.x:void 0),Do(e.y,t,Ud,n?n.y:void 0,s?s.y:void 0)}function No(e){return e.translate===0&&e.scale===1}function Vo(e){return No(e.x)&&No(e.y)}function Io(e,t){return e.min===t.min&&e.max===t.max}function zd(e,t){return Io(e.x,t.x)&&Io(e.y,t.y)}function Oo(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Lo(e,t){return Oo(e.x,t.x)&&Oo(e.y,t.y)}function Fo(e){return Z(e.x)/Z(e.y)}function Bo(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Kd{constructor(){this.members=[]}add(t){gn(this.members,t),t.scheduleRender()}remove(t){if(yn(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(i=>t===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){s=o;break}}return s?(this.promote(s),!0):!1}promote(t,n){const s=this.lead;if(t!==s&&(this.prevLead=s,this.lead=t,t.show(),s)){s.instance&&s.scheduleRender(),t.scheduleRender(),t.resumeFrom=s,n&&(t.resumeFrom.preserveOpacity=!0),s.snapshot&&(t.snapshot=s.snapshot,t.snapshot.latestValues=s.animationValues||s.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:s}=t;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Xd(e,t,n){let s="";const i=e.x.translate/t.x,o=e.y.translate/t.y,r=n?.z||0;if((i||o||r)&&(s=`translate3d(${i}px, ${o}px, ${r}px) `),(t.x!==1||t.y!==1)&&(s+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:d,rotateY:h,skewX:m,skewY:p}=n;u&&(s=`perspective(${u}px) ${s}`),c&&(s+=`rotate(${c}deg) `),d&&(s+=`rotateX(${d}deg) `),h&&(s+=`rotateY(${h}deg) `),m&&(s+=`skewX(${m}deg) `),p&&(s+=`skewY(${p}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const Ps=["","X","Y","Z"],Yd=1e3;let Hd=0;function Es(e,t,n,s){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),s&&(s[e]=0))}function _o(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Qr(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",L,!(i||o))}const{parent:s}=e;s&&!s.hasCheckedOptimisedAppear&&_o(s)}function $o({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},a=t?.()){this.id=Hd++,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(Zd),this.nodes.forEach(tf),this.nodes.forEach(nf),this.nodes.forEach(Jd)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Id)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new bn),this.eventHandlers.get(r).add(a)}notifyListeners(r,...a){const l=this.eventHandlers.get(r);l&&l.notify(...a)}hasListeners(r){return this.eventHandlers.has(r)}mount(r){if(this.instance)return;this.isSVG=vr(r)&&!$c(r),this.instance=r;const{layoutId:a,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let c,d=0;const h=()=>this.root.updateBlockedByResize=!1;L.read(()=>{d=window.innerWidth}),e(r,()=>{const m=window.innerWidth;m!==d&&(d=m,this.root.updateBlockedByResize=!0,c&&c(),c=Od(h,250),Zt.hasAnimatedSinceResize&&(Zt.hasAnimatedSinceResize=!1,this.nodes.forEach(zo)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:h,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||u.getDefaultTransition()||lf,{onLayoutAnimationStart:y,onLayoutAnimationComplete:x}=u.getProps(),v=!this.targetLayout||!Lo(this.targetLayout,m),b=!d&&h;if(this.options.layoutRoot||this.resumeFrom||b||d&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const g={...Zn(p,"layout"),onPlay:y,onComplete:x};(u.shouldReduceMotion||this.options.layoutRoot)&&(g.delay=0,g.type=!1),this.startAnimation(g),this.setAnimationOrigin(c,b)}else d||zo(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Pe(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(sf),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&_o(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const d=this.path[c];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Wo);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Uo);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(ef),this.nodes.forEach(Gd),this.nodes.forEach(qd)):this.nodes.forEach(Uo),this.clearAllSnapshots();const a=Q.now();X.delta=we(0,1e3/60,a-X.timestamp),X.timestamp=a,X.isProcessing=!0,Cn.update.process(X),Cn.preRender.process(X),Cn.render.process(X),X.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,es.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Qd),this.sharedNodes.forEach(rf)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,L.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){L.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Z(this.snapshot.measuredBox.x)&&!Z(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutCorrected=W(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,r?r.layoutBox:void 0)}updateScroll(r="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(a=!1),a&&this.instance){const l=s(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Vo(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;r&&this.instance&&(a||Oe(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return r&&(l=this.removeTransform(l)),cf(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return W();const a=r.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(uf))){const{scroll:u}=this.root;u&&(Je(a.x,u.offset.x),Je(a.y,u.offset.y))}return a}removeElementScroll(r){const a=W();if(oe(a,r),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:c,options:d}=u;u!==this.root&&c&&d.layoutScroll&&(c.wasRoot&&oe(a,r),Je(a.x,c.offset.x),Je(a.y,c.offset.y))}return a}applyTransform(r,a=!1){const l=W();oe(l,r);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&Qe(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Oe(c.latestValues)&&Qe(l,c.latestValues)}return Oe(this.latestValues)&&Qe(l,this.latestValues),l}removeTransform(r){const a=W();oe(a,r);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!Oe(u.latestValues))continue;ms(u.latestValues)&&u.updateSnapshot();const c=W(),d=u.measurePageBox();oe(c,d),Mo(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return Oe(this.latestValues)&&Mo(a,this.latestValues),a}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==X.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(r||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:d}=this.options;if(!(!this.layout||!(c||d))){if(this.resolvedRelativeTargetAt=X.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=W(),this.relativeTargetOrigin=W(),Pt(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),oe(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=W(),this.targetWithTransforms=W()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),pd(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):oe(this.target,this.layout.layoutBox),$r(this.target,this.targetDelta)):oe(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=W(),this.relativeTargetOrigin=W(),Pt(this.relativeTargetOrigin,this.target,h.target),oe(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||ms(this.parent.latestValues)||Fr(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const r=this.getLead(),a=!!this.resumingFrom||this!==r;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===X.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;oe(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,h=this.treeScale.y;ku(this.layoutCorrected,this.treeScale,this.path,a),r.layout&&!r.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(r.target=r.layout.layoutBox,r.targetWithTransforms=W());const{target:m}=r;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(jo(this.prevProjectionDelta.x,this.projectionDelta.x),jo(this.prevProjectionDelta.y,this.projectionDelta.y)),Ct(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==h||!Bo(this.projectionDelta.x,this.prevProjectionDelta.x)||!Bo(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){if(this.options.visualElement?.scheduleRender(),r){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=et(),this.projectionDelta=et(),this.projectionDeltaWithTransform=et()}setAnimationOrigin(r,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},d=et();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=W(),m=l?l.source:void 0,p=this.layout?this.layout.source:void 0,y=m!==p,x=this.getStack(),v=!x||x.members.length<=1,b=!!(y&&!v&&this.options.crossfade===!0&&!this.path.some(af));this.animationProgress=0;let g;this.mixTargetDelta=E=>{const C=E/1e3;Ko(d.x,r.x,C),Ko(d.y,r.y,C),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Pt(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),of(this.relativeTarget,this.relativeTargetOrigin,h,C),g&&zd(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=W()),oe(g,this.relativeTarget)),y&&(this.animationValues=c,Fd(c,u,this.latestValues,C,b,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Pe(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=L.update(()=>{Zt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ge(0)),this.currentAnimation=Nd(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),r.onUpdate&&r.onUpdate(a)},onStop:()=>{},onComplete:()=>{r.onComplete&&r.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Yd),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=r;if(!(!a||!l||!u)){if(this!==r&&this.layout&&u&&qo(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||W();const d=Z(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+d;const h=Z(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+h}oe(a,l),Qe(a,c),Ct(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Kd),this.sharedNodes.get(r).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){const{layoutId:r}=this.options;return r?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:r}=this.options;return r?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:l}=r;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&Es("z",r,u,this.animationValues);for(let c=0;c<Ps.length;c++)Es(`rotate${Ps[c]}`,r,u,this.animationValues),Es(`skew${Ps[c]}`,r,u,this.animationValues);r.render();for(const c in u)r.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);r.scheduleRender()}applyProjectionStyles(r,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){r.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,r.visibility="",r.opacity="",r.pointerEvents=Ht(a?.pointerEvents)||"",r.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(r.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,r.pointerEvents=Ht(a?.pointerEvents)||""),this.hasProjected&&!Oe(this.latestValues)&&(r.transform=l?l({},""):"none",this.hasProjected=!1);return}r.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let d=Xd(this.projectionDeltaWithTransform,this.treeScale,c);l&&(d=l(c,d)),r.transform=d;const{x:h,y:m}=this.projectionDelta;r.transformOrigin=`${h.origin*100}% ${m.origin*100}% 0`,u.animationValues?r.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:r.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const p in bt){if(c[p]===void 0)continue;const{correct:y,applyTo:x,isCSSVariable:v}=bt[p],b=d==="none"?c[p]:y(c[p],u);if(x){const g=x.length;for(let E=0;E<g;E++)r[x[E]]=b}else v?this.options.visualElement.renderState.vars[p]=b:r[p]=b}this.options.layoutId&&(r.pointerEvents=u===this?Ht(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>r.currentAnimation?.stop()),this.root.nodes.forEach(Wo),this.root.sharedNodes.clear()}}}function Gd(e){e.updateLayout()}function qd(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=e.layout,{animationType:i}=e.options,o=t.source!==e.layout.source;i==="size"?re(c=>{const d=o?t.measuredBox[c]:t.layoutBox[c],h=Z(d);d.min=n[c].min,d.max=d.min+h}):qo(i,t.layoutBox,n)&&re(c=>{const d=o?t.measuredBox[c]:t.layoutBox[c],h=Z(n[c]);d.max=d.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[c].max=e.relativeTarget[c].min+h)});const r=et();Ct(r,n,t.layoutBox);const a=et();o?Ct(a,e.applyTransform(s,!0),t.measuredBox):Ct(a,n,t.layoutBox);const l=!Vo(r);let u=!1;if(!e.resumeFrom){const c=e.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:d,layout:h}=c;if(d&&h){const m=W();Pt(m,t.layoutBox,d.layoutBox);const p=W();Pt(p,n,h.layoutBox),Lo(m,p)||(u=!0),c.options.layoutRoot&&(e.relativeTarget=p,e.relativeTargetOrigin=m,e.relativeParent=c)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function Zd(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 Jd(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Qd(e){e.clearSnapshot()}function Wo(e){e.clearMeasurements()}function Uo(e){e.isLayoutDirty=!1}function ef(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function zo(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function tf(e){e.resolveTargetDelta()}function nf(e){e.calcProjection()}function sf(e){e.resetSkewAndRotation()}function rf(e){e.removeLeadSnapshot()}function Ko(e,t,n){e.translate=F(t.translate,0,n),e.scale=F(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Xo(e,t,n,s){e.min=F(t.min,n.min,s),e.max=F(t.max,n.max,s)}function of(e,t,n,s){Xo(e.x,t.x,n.x,s),Xo(e.y,t.y,n.y,s)}function af(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const lf={duration:.45,ease:[.4,0,.1,1]},Yo=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Ho=Yo("applewebkit/")&&!Yo("chrome/")?Math.round:ie;function Go(e){e.min=Ho(e.min),e.max=Ho(e.max)}function cf(e){Go(e.x),Go(e.y)}function qo(e,t,n){return e==="position"||e==="preserve-aspect"&&!md(Fo(t),Fo(n),.2)}function uf(e){return e!==e.root&&e.scroll?.wasRoot}const df=$o({attachResizeListener:(e,t)=>wt(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ks={current:void 0},Zo=$o({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ks.current){const e=new df({});e.mount(window),e.setOptions({layoutScroll:!0}),ks.current=e}return ks.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),ff={pan:{Feature:jd},drag:{Feature:Ad,ProjectionNode:Zo,MeasureLayout:To}};function Jo(e,t,n){const{props:s}=e;e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=s[i];o&&L.postRender(()=>o(t,Tt(t)))}class hf extends Ae{mount(){const{current:t}=this.node;t&&(this.unmount=Oc(t,(n,s)=>(Jo(this.node,s,"Start"),i=>Jo(this.node,i,"End"))))}unmount(){}}class mf extends Ae{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=dt(wt(this.node.current,"focus",()=>this.onFocus()),wt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Qo(e,t,n){const{props:s}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&s.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),o=s[i];o&&L.postRender(()=>o(t,Tt(t)))}class pf extends Ae{mount(){const{current:t}=this.node;t&&(this.unmount=_c(t,(n,s)=>(Qo(this.node,s,"Start"),(i,{success:o})=>Qo(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const As=new WeakMap,js=new WeakMap,gf=e=>{const t=As.get(e.target);t&&t(e)},yf=e=>{e.forEach(gf)};function vf({root:e,...t}){const n=e||document;js.has(n)||js.set(n,{});const s=js.get(n),i=JSON.stringify(t);return s[i]||(s[i]=new IntersectionObserver(yf,{root:e,...t})),s[i]}function xf(e,t,n){const s=vf(t);return As.set(e,n),s.observe(e),()=>{As.delete(e),s.unobserve(e)}}const bf={some:0,all:1};class wf extends Ae{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:o}=t,r={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:bf[i]},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(),h=u?c:d;h&&h(l)};return xf(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(Tf(t,n))&&this.startObserver()}unmount(){}}function Tf({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Sf={...ld,...{inView:{Feature:wf},tap:{Feature:pf},focus:{Feature:mf},hover:{Feature:hf}},...ff,...{layout:{ProjectionNode:Zo,MeasureLayout:To}}},Fe=Cu(Sf,Lu),Cf=["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,s=1/t,i=2/t;return f.jsx(Ut,{children:f.jsx(Fe.div,{role:"status",className:M("relative rounded-full",n),animate:{rotate:360},transition:{repeat:1/0,ease:"linear",duration:s},children:f.jsx(Fe.div,{className:"absolute inset-0 rounded-full",style:{boxSizing:"border-box",borderStyle:"solid",borderWidth:2},animate:{clipPath:Cf},transition:{repeat:1/0,ease:"linear",duration:i,times:[0,.25,.5,.75,1]}})})})},Pf=`
31
- inline-flex flex-row items-center justify-center gap-2
30
+ `),()=>{v.contains(g)&&v.removeChild(g)}},[t]),f.jsx(Qc,{isPresent:t,childRef:o,sizeRef:r,children:C.cloneElement(e,{ref:o})})}const tu=({children:e,initial:t,isPresent:n,onExitComplete:s,custom:i,presenceAffectsLayout:o,mode:r,anchorX:a,root:l})=>{const u=wn(nu),c=T.useId();let d=!0,h=T.useMemo(()=>(d=!1,{id:c,initial:t,isPresent:n,custom:i,onExitComplete:m=>{u.set(m,!0);for(const g of u.values())if(!g)return;s&&s()},register:m=>(u.set(m,!1),()=>u.delete(m))}),[n,u,s]);return o&&d&&(h={...h}),T.useMemo(()=>{u.forEach((m,g)=>u.set(g,!1))},[n]),C.useEffect(()=>{!n&&!u.size&&s&&s()},[n]),r==="popLayout"&&(e=f.jsx(eu,{isPresent:n,anchorX:a,root:l,children:e})),f.jsx(Wt.Provider,{value:h,children:e})};function nu(){return new Map}function kr(e=!0){const t=T.useContext(Wt);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=t,o=T.useId();T.useEffect(()=>{if(e)return i(o)},[e]);const r=T.useCallback(()=>e&&s&&s(o),[o,s,e]);return!n&&s?[!1,r]:[!0]}const qt=e=>e.key||"";function Er(e){const t=[];return T.Children.forEach(e,n=>{T.isValidElement(n)&&t.push(n)}),t}const Zt=({children:e,custom:t,initial:n=!0,onExitComplete:s,presenceAffectsLayout:i=!0,mode:o="sync",propagate:r=!1,anchorX:a="left",root:l})=>{const[u,c]=kr(r),d=T.useMemo(()=>Er(e),[e]),h=r&&!u?[]:d.map(qt),m=T.useRef(!0),g=T.useRef(d),v=wn(()=>new Map),[b,p]=T.useState(d),[x,y]=T.useState(d);mi(()=>{m.current=!1,g.current=d;for(let A=0;A<x.length;A++){const k=qt(x[A]);h.includes(k)?v.delete(k):v.get(k)!==!0&&v.set(k,!1)}},[x,h.length,h.join("-")]);const P=[];if(d!==b){let A=[...d];for(let k=0;k<x.length;k++){const E=x[k],N=qt(E);h.includes(N)||(A.splice(k,0,E),P.push(E))}return o==="wait"&&P.length&&(A=P),y(Er(A)),p(d),null}process.env.NODE_ENV!=="production"&&o==="wait"&&x.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:S}=T.useContext(bn);return f.jsx(f.Fragment,{children:x.map(A=>{const k=qt(A),E=r&&!u?!1:d===x||h.includes(k),N=()=>{if(v.has(k))v.set(k,!0);else return;let V=!0;v.forEach(F=>{F||(V=!1)}),V&&(S?.(),y(g.current),r&&c?.(),s&&s())};return f.jsx(tu,{isPresent:E,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:o,root:l,onExitComplete:E?void 0:N,anchorX:a,children:A},k)})})},Ar=T.createContext({strict:!1}),jr={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"]},Je={};for(const e in jr)Je[e]={isEnabled:t=>jr[e].some(n=>!!t[n])};function su(e){for(const t in e)Je[t]={...Je[t],...e[t]}}const iu=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 Jt(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||iu.has(e)}let Rr=e=>!Jt(e);function ru(e){typeof e=="function"&&(Rr=t=>t.startsWith("on")?!Jt(t):e(t))}try{ru(require("@emotion/is-prop-valid").default)}catch{}function ou(e,t,n){const s={};for(const i in e)i==="values"&&typeof e.values=="object"||(Rr(i)||n===!0&&Jt(i)||!t&&!Jt(i)||e.draggable&&i.startsWith("onDrag"))&&(s[i]=e[i]);return s}const Qt=T.createContext({});function en(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Pt(e){return typeof e=="string"||Array.isArray(e)}const ds=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],fs=["initial",...ds];function tn(e){return en(e.animate)||fs.some(t=>Pt(e[t]))}function Dr(e){return!!(tn(e)||e.variants)}function au(e,t){if(tn(e)){const{initial:n,animate:s}=e;return{initial:n===!1||Pt(n)?n:void 0,animate:Pt(s)?s:void 0}}return e.inherit!==!1?t:{}}function lu(e){const{initial:t,animate:n}=au(e,T.useContext(Qt));return T.useMemo(()=>({initial:t,animate:n}),[Mr(t),Mr(n)])}function Mr(e){return Array.isArray(e)?e.join(" "):e}const kt={};function cu(e){for(const t in e)kt[t]=e[t],Mn(t)&&(kt[t].isCSSVariable=!0)}function Nr(e,{layout:t,layoutId:n}){return qe.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!kt[e]||e==="opacity")}const uu={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},du=Ge.length;function fu(e,t,n){let s="",i=!0;for(let o=0;o<du;o++){const r=Ge[o],a=e[r];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(r.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const u=gr(a,os[r]);if(!l){i=!1;const c=uu[r]||r;s+=`${c}(${u}) `}n&&(t[r]=u)}}return s=s.trim(),n?s=n(t,i?"":s):i&&(s="none"),s}function hs(e,t,n){const{style:s,vars:i,transformOrigin:o}=e;let r=!1,a=!1;for(const l in t){const u=t[l];if(qe.has(l)){r=!0;continue}else if(Mn(l)){i[l]=u;continue}else{const c=gr(u,os[l]);l.startsWith("origin")?(a=!0,o[l]=c):s[l]=c}}if(t.transform||(r||n?s.transform=fu(t,e.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=o;s.transformOrigin=`${l} ${u} ${c}`}}const ms=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Vr(e,t,n){for(const s in t)!H(t[s])&&!Nr(s,n)&&(e[s]=t[s])}function hu({transformTemplate:e},t){return T.useMemo(()=>{const n=ms();return hs(n,t,e),Object.assign({},n.vars,n.style)},[t])}function mu(e,t){const n=e.style||{},s={};return Vr(s,n,e),Object.assign(s,hu(e,t)),s}function pu(e,t){const n={},s=mu(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.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=s,n}const gu={offset:"stroke-dashoffset",array:"stroke-dasharray"},yu={offset:"strokeDashoffset",array:"strokeDasharray"};function vu(e,t,n=1,s=0,i=!0){e.pathLength=1;const o=i?gu:yu;e[o.offset]=j.transform(-s);const r=j.transform(t),a=j.transform(n);e[o.array]=`${r} ${a}`}function Ir(e,{attrX:t,attrY:n,attrScale:s,pathLength:i,pathSpacing:o=1,pathOffset:r=0,...a},l,u,c){if(hs(e,a,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:h}=e;d.transform&&(h.transform=d.transform,delete d.transform),(h.transform||d.transformOrigin)&&(h.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),h.transform&&(h.transformBox=c?.transformBox??"fill-box",delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),s!==void 0&&(d.scale=s),i!==void 0&&vu(d,i,o,r,!1)}const Or=()=>({...ms(),attrs:{}}),Lr=e=>typeof e=="string"&&e.toLowerCase()==="svg";function xu(e,t,n,s){const i=T.useMemo(()=>{const o=Or();return Ir(o,t,Lr(s),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};Vr(o,e.style,e),i.style={...o,...i.style}}return i}const bu=["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 ps(e){return typeof e!="string"||e.includes("-")?!1:!!(bu.indexOf(e)>-1||/[A-Z]/u.test(e))}function wu(e,t,n,{latestValues:s},i,o=!1){const a=(ps(e)?xu:pu)(t,s,i,e),l=ou(t,typeof e=="string",o),u=e!==T.Fragment?{...l,...a,ref:n}:{},{children:c}=t,d=T.useMemo(()=>H(c)?c.get():c,[c]);return T.createElement(e,{...u,children:d})}function Fr(e){const t=[{},{}];return e?.values.forEach((n,s)=>{t[0][s]=n.get(),t[1][s]=n.getVelocity()}),t}function gs(e,t,n,s){if(typeof t=="function"){const[i,o]=Fr(s);t=t(n!==void 0?n:e.custom,i,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,o]=Fr(s);t=t(n!==void 0?n:e.custom,i,o)}return t}function nn(e){return H(e)?e.get():e}function Tu({scrapeMotionValuesFromProps:e,createRenderState:t},n,s,i){return{latestValues:Su(n,s,i,e),renderState:t()}}function Su(e,t,n,s){const i={},o=s(e,{});for(const h in o)i[h]=nn(o[h]);let{initial:r,animate:a}=e;const l=tn(e),u=Dr(e);t&&u&&!l&&e.inherit!==!1&&(r===void 0&&(r=t.initial),a===void 0&&(a=t.animate));let c=n?n.initial===!1:!1;c=c||r===!1;const d=c?a:r;if(d&&typeof d!="boolean"&&!en(d)){const h=Array.isArray(d)?d:[d];for(let m=0;m<h.length;m++){const g=gs(e,h[m]);if(g){const{transitionEnd:v,transition:b,...p}=g;for(const x in p){let y=p[x];if(Array.isArray(y)){const P=c?y.length-1:0;y=y[P]}y!==null&&(i[x]=y)}for(const x in v)i[x]=v[x]}}}return i}const Br=e=>(t,n)=>{const s=T.useContext(Qt),i=T.useContext(Wt),o=()=>Tu(e,t,s,i);return n?o():wn(o)};function ys(e,t,n){const{style:s}=e,i={};for(const o in s)(H(s[o])||t.style&&H(t.style[o])||Nr(o,e)||n?.getValue(o)?.liveStyle!==void 0)&&(i[o]=s[o]);return i}const Cu=Br({scrapeMotionValuesFromProps:ys,createRenderState:ms});function _r(e,t,n){const s=ys(e,t,n);for(const i in e)if(H(e[i])||H(t[i])){const o=Ge.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[o]=e[i]}return s}const Pu=Br({scrapeMotionValuesFromProps:_r,createRenderState:Or}),ku=Symbol.for("motionComponentSymbol");function Qe(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Eu(e,t,n){return T.useCallback(s=>{s&&e.onMount&&e.onMount(s),t&&(s?t.mount(s):t.unmount()),n&&(typeof n=="function"?n(s):Qe(n)&&(n.current=s))},[t])}const vs=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),zr="data-"+vs("framerAppearId"),Wr=T.createContext({});function Au(e,t,n,s,i){const{visualElement:o}=T.useContext(Qt),r=T.useContext(Ar),a=T.useContext(Wt),l=T.useContext(us).reducedMotion,u=T.useRef(null);s=s||r.renderer,!u.current&&s&&(u.current=s(e,{visualState:t,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const c=u.current,d=T.useContext(Wr);c&&!c.projection&&i&&(c.type==="html"||c.type==="svg")&&ju(u.current,n,i,d);const h=T.useRef(!1);T.useInsertionEffect(()=>{c&&h.current&&c.update(n,a)});const m=n[zr],g=T.useRef(!!m&&!window.MotionHandoffIsComplete?.(m)&&window.MotionHasOptimisedAnimation?.(m));return mi(()=>{c&&(h.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),g.current&&c.animationState&&c.animationState.animateChanges())}),T.useEffect(()=>{c&&(!g.current&&c.animationState&&c.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(m)}),g.current=!1),c.enteringChildren=void 0)}),c}function ju(e,t,n,s){const{layoutId:i,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:$r(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!r||a&&Qe(a),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,crossfade:c,layoutScroll:l,layoutRoot:u})}function $r(e){if(e)return e.options.allowProjection!==!1?e.projection:$r(e.parent)}function xs(e,{forwardMotionProps:t=!1}={},n,s){n&&su(n);const i=ps(e)?Pu:Cu;function o(a,l){let u;const c={...T.useContext(us),...a,layoutId:Ru(a)},{isStatic:d}=c,h=lu(a),m=i(a,d);if(!d&&Tn){Du(c,n);const g=Mu(c);u=g.MeasureLayout,h.visualElement=Au(e,m,c,s,g.ProjectionNode)}return f.jsxs(Qt.Provider,{value:h,children:[u&&h.visualElement?f.jsx(u,{visualElement:h.visualElement,...c}):null,wu(e,a,Eu(m,h.visualElement,l),m,d,t)]})}o.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const r=T.forwardRef(o);return r[ku]=e,r}function Ru({layoutId:e}){const t=T.useContext(bn).id;return t&&e!==void 0?t+"-"+e:e}function Du(e,t){const n=T.useContext(Ar).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const s="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Ke(!1,s,"lazy-strict-mode"):Te(!1,s,"lazy-strict-mode")}}function Mu(e){const{drag:t,layout:n}=Je;if(!t&&!n)return{};const s={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function Nu(e,t){if(typeof Proxy>"u")return xs;const n=new Map,s=(o,r)=>xs(o,r,e,t),i=(o,r)=>(process.env.NODE_ENV!=="production"&&An(!1,"motion() is deprecated. Use motion.create() instead."),s(o,r));return new Proxy(i,{get:(o,r)=>r==="create"?s:(n.has(r)||n.set(r,xs(r,void 0,e,t)),n.get(r))})}function Ur({top:e,left:t,right:n,bottom:s}){return{x:{min:t,max:n},y:{min:e,max:s}}}function Vu({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Iu(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),s=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function bs(e){return e===void 0||e===1}function ws({scale:e,scaleX:t,scaleY:n}){return!bs(e)||!bs(t)||!bs(n)}function Oe(e){return ws(e)||Kr(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Kr(e){return Xr(e.x)||Xr(e.y)}function Xr(e){return e&&e!=="0%"}function sn(e,t,n){const s=e-n,i=t*s;return n+i}function Hr(e,t,n,s,i){return i!==void 0&&(e=sn(e,i,s)),sn(e,n,s)+t}function Ts(e,t=0,n=1,s,i){e.min=Hr(e.min,t,n,s,i),e.max=Hr(e.max,t,n,s,i)}function Yr(e,{x:t,y:n}){Ts(e.x,t.translate,t.scale,t.originPoint),Ts(e.y,n.translate,n.scale,n.originPoint)}const Gr=.999999999999,qr=1.0000000000001;function Ou(e,t,n,s=!1){const i=n.length;if(!i)return;t.x=t.y=1;let o,r;for(let a=0;a<i;a++){o=n[a],r=o.projectionDelta;const{visualElement:l}=o.options;l&&l.props.style&&l.props.style.display==="contents"||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&&tt(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(t.x*=r.x.scale,t.y*=r.y.scale,Yr(e,r)),s&&Oe(o.latestValues)&&tt(e,o.latestValues))}t.x<qr&&t.x>Gr&&(t.x=1),t.y<qr&&t.y>Gr&&(t.y=1)}function et(e,t){e.min=e.min+t,e.max=e.max+t}function Zr(e,t,n,s,i=.5){const o=B(e.min,e.max,i);Ts(e,t,n,o,s)}function tt(e,t){Zr(e.x,t.x,t.scaleX,t.scale,t.originX),Zr(e.y,t.y,t.scaleY,t.scale,t.originY)}function Jr(e,t){return Ur(Iu(e.getBoundingClientRect(),t))}function Lu(e,t,n){const s=Jr(e,n),{scroll:i}=t;return i&&(et(s.x,i.offset.x),et(s.y,i.offset.y)),s}const Qr=()=>({translate:0,scale:1,origin:0,originPoint:0}),nt=()=>({x:Qr(),y:Qr()}),eo=()=>({min:0,max:0}),$=()=>({x:eo(),y:eo()}),Ss={current:null},to={current:!1};function Fu(){if(to.current=!0,!!Tn)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ss.current=e.matches;e.addEventListener("change",t),t()}else Ss.current=!1}const Bu=new WeakMap;function _u(e,t,n){for(const s in t){const i=t[s],o=n[s];if(H(i))e.addValue(s,i);else if(H(o))e.addValue(s,Ze(i,{owner:e}));else if(o!==i)if(e.hasValue(s)){const r=e.getValue(s);r.liveStyle===!0?r.jump(i):r.hasAnimated||r.set(i)}else{const r=e.getStaticValue(s);e.addValue(s,Ze(r!==void 0?r:i,{owner:e}))}}for(const s in n)t[s]===void 0&&e.removeValue(s);return t}const no=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class zu{scrapeMotionValuesFromProps(t,n,s){return{}}constructor({parent:t,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:o,visualState:r},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ns,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 h=Q.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,L.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=s,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=tn(n),this.isVariantNode=Dr(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in d){const m=d[h];l[h]!==void 0&&H(m)&&m.set(l[h])}}mount(t){this.current=t,Bu.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,s)=>this.bindToMotionValue(s,n)),to.current||Fu(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ss.current,process.env.NODE_ENV!=="production"&&An(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(),Pe(this.notifyUpdate),Pe(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 s=qe.has(t);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",r=>{this.latestValues[t]=r,this.props.onUpdate&&L.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),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 Je){const n=Je[t];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[t]&&i&&s(this.props)&&(this.features[t]=new i(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):$()}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 s=0;s<no.length;s++){const i=no[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,r=t[o];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=_u(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 s=this.values.get(t);n!==s&&(s&&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 s=this.values.get(t);return s===void 0&&n!==void 0&&(s=Ze(n===null?void 0:n,{owner:this}),this.addValue(t,s)),s}readValue(t,n){let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(pi(s)||yi(s))?s=parseFloat(s):!Jc(s)&&Ee.test(n)&&(s=pr(t,n)),this.setBaseTarget(t,H(s)?s.get():s)),H(s)?s.get():s}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const o=gs(this.props,n,this.presenceContext?.custom);o&&(s=o[t])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!H(i)?i:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new En),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){as.render(this.render)}}class so extends zu{constructor(){super(...arguments),this.KeyframeResolver=_c}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:s}){delete n[t],delete s[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;H(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function io(e,{style:t,vars:n},s,i){const o=e.style;let r;for(r in t)o[r]=t[r];i?.applyProjectionStyles(o,s);for(r in n)o.setProperty(r,n[r])}function Wu(e){return window.getComputedStyle(e)}class $u extends so{constructor(){super(...arguments),this.type="html",this.renderInstance=io}readValueFromInstance(t,n){if(qe.has(n))return this.projection?.isProjecting?Zn(n):rc(t,n);{const s=Wu(t),i=(Mn(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Jr(t,n)}build(t,n,s){hs(t,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,n,s){return ys(t,n,s)}}const ro=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 Uu(e,t,n,s){io(e,t,void 0,s);for(const i in t.attrs)e.setAttribute(ro.has(i)?i:vs(i),t.attrs[i])}class Ku extends so{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=$}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(qe.has(n)){const s=mr(n);return s&&s.default||0}return n=ro.has(n)?n:vs(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,s){return _r(t,n,s)}build(t,n,s){Ir(t,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(t,n,s,i){Uu(t,n,s,i)}mount(t){this.isSVGTag=Lr(t.tagName),super.mount(t)}}const Xu=(e,t)=>ps(e)?new Ku(t):new $u(t,{allowProjection:e!==T.Fragment});function st(e,t,n){const s=e.getProps();return gs(s,t,n!==void 0?n:s.custom,e)}const Cs=e=>Array.isArray(e);function Hu(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ze(n))}function Yu(e){return Cs(e)?e[e.length-1]||0:e}function Gu(e,t){const n=st(e,t);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const r in o){const a=Yu(o[r]);Hu(e,r,a)}}function qu(e){return!!(H(e)&&e.add)}function Ps(e,t){const n=e.getValue("willChange");if(qu(n))return n.add(t);if(!n&&Se.WillChange){const s=new Se.WillChange("auto");e.addValue("willChange",s),s.add(t)}}function oo(e){return e.props[zr]}const Zu=e=>e!==null;function Ju(e,{repeat:t,repeatType:n="loop"},s){const i=e.filter(Zu),o=t&&n!=="loop"&&t%2===1?0:i.length-1;return i[o]}const Qu={type:"spring",stiffness:500,damping:25,restSpeed:10},ed=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),td={type:"keyframes",duration:.8},nd={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},sd=(e,{keyframes:t})=>t.length>2?td:qe.has(e)?e.startsWith("scale")?ed(t[1]):Qu:nd;function id({when:e,delay:t,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const ks=(e,t,n,s={},i,o)=>r=>{const a=is(s,e)||{},l=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-ue(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:h=>{t.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:o?void 0:i};id(a)||Object.assign(c,sd(e,c)),c.duration&&(c.duration=ue(c.duration)),c.repeatDelay&&(c.repeatDelay=ue(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(ss(c),c.delay===0&&(d=!0)),(Se.instantAnimations||Se.skipAnimations)&&(d=!0,ss(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,d&&!o&&t.get()!==void 0){const h=Ju(c.keyframes,a);if(h!==void 0){L.update(()=>{c.onUpdate(h),c.onComplete()});return}}return a.isSync?new Yn(c):new Ac(c)};function rd({protectedKeys:e,needsAnimating:t},n){const s=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,s}function ao(e,t,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:r,...a}=t;s&&(o=s);const l=[],u=i&&e.animationState&&e.animationState.getState()[i];for(const c in a){const d=e.getValue(c,e.latestValues[c]??null),h=a[c];if(h===void 0||u&&rd(u,c))continue;const m={delay:n,...is(o||{},c)},g=d.get();if(g!==void 0&&!d.isAnimating&&!Array.isArray(h)&&h===g&&!m.velocity)continue;let v=!1;if(window.MotionHandoffAnimation){const p=oo(e);if(p){const x=window.MotionHandoffAnimation(p,c,L);x!==null&&(m.startTime=x,v=!0)}}Ps(e,c),d.start(ks(c,d,h,e.shouldReduceMotion&&cr.has(c)?{type:!1}:m,e,v));const b=d.animation;b&&l.push(b)}return r&&Promise.all(l).then(()=>{L.update(()=>{r&&Gu(e,r)})}),l}function lo(e,t,n,s=0,i=1){const o=Array.from(e).sort((u,c)=>u.sortNodePosition(c)).indexOf(t),r=e.size,a=(r-1)*s;return typeof n=="function"?n(o,r):i===1?o*s:a-o*s}function Es(e,t,n={}){const s=st(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(ao(e,s,n)):()=>Promise.resolve(),r=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:c,staggerDirection:d}=i;return od(e,t,l,u,c,d,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[l,u]=a==="beforeChildren"?[o,r]:[r,o];return l().then(()=>u())}else return Promise.all([o(),r(n.delay)])}function od(e,t,n=0,s=0,i=0,o=1,r){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(Es(l,t,{...r,delay:n+(typeof s=="function"?0:s)+lo(e.variantChildren,l,s,i,o)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function ad(e,t,n={}){e.notify("AnimationStart",t);let s;if(Array.isArray(t)){const i=t.map(o=>Es(e,o,n));s=Promise.all(i)}else if(typeof t=="string")s=Es(e,t,n);else{const i=typeof t=="function"?st(e,t,n.custom):t;s=Promise.all(ao(e,i,n))}return s.then(()=>{e.notify("AnimationComplete",t)})}function co(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let s=0;s<n;s++)if(t[s]!==e[s])return!1;return!0}const ld=fs.length;function uo(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?uo(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<ld;n++){const s=fs[n],i=e.props[s];(Pt(i)||i===!1)&&(t[s]=i)}return t}const cd=[...ds].reverse(),ud=ds.length;function dd(e){return t=>Promise.all(t.map(({animation:n,options:s})=>ad(e,n,s)))}function fd(e){let t=dd(e),n=fo(),s=!0;const i=l=>(u,c)=>{const d=st(e,c,l==="exit"?e.presenceContext?.custom:void 0);if(d){const{transition:h,transitionEnd:m,...g}=d;u={...u,...g,...m}}return u};function o(l){t=l(e)}function r(l){const{props:u}=e,c=uo(e.parent)||{},d=[],h=new Set;let m={},g=1/0;for(let b=0;b<ud;b++){const p=cd[b],x=n[p],y=u[p]!==void 0?u[p]:c[p],P=Pt(y),S=p===l?x.isActive:null;S===!1&&(g=b);let A=y===c[p]&&y!==u[p]&&P;if(A&&s&&e.manuallyAnimateOnMount&&(A=!1),x.protectedKeys={...m},!x.isActive&&S===null||!y&&!x.prevProp||en(y)||typeof y=="boolean")continue;const k=hd(x.prevProp,y);let E=k||p===l&&x.isActive&&!A&&P||b>g&&P,N=!1;const V=Array.isArray(y)?y:[y];let F=V.reduce(i(p),{});S===!1&&(F={});const{prevResolvedValues:ie={}}=x,ne={...ie,...F},O=z=>{E=!0,h.has(z)&&(N=!0,h.delete(z)),x.needsAnimating[z]=!0;const I=e.getValue(z);I&&(I.liveStyle=!1)};for(const z in ne){const I=F[z],J=ie[z];if(m.hasOwnProperty(z))continue;let w=!1;Cs(I)&&Cs(J)?w=!co(I,J):w=I!==J,w?I!=null?O(z):h.add(z):I!==void 0&&h.has(z)?O(z):x.protectedKeys[z]=!0}x.prevProp=y,x.prevResolvedValues=F,x.isActive&&(m={...m,...F}),s&&e.blockInitialAnimation&&(E=!1);const X=A&&k;E&&(!X||N)&&d.push(...V.map(z=>{const I={type:p};if(typeof z=="string"&&s&&!X&&e.manuallyAnimateOnMount&&e.parent){const{parent:J}=e,w=st(J,z);if(J.enteringChildren&&w){const{delayChildren:M}=w.transition||{};I.delay=lo(J.enteringChildren,e,M)}}return{animation:z,options:I}}))}if(h.size){const b={};if(typeof u.initial!="boolean"){const p=st(e,Array.isArray(u.initial)?u.initial[0]:u.initial);p&&p.transition&&(b.transition=p.transition)}h.forEach(p=>{const x=e.getBaseTarget(p),y=e.getValue(p);y&&(y.liveStyle=!0),b[p]=x??null}),d.push({animation:b})}let v=!!d.length;return s&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(v=!1),s=!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=r(l);for(const d in n)n[d].protectedKeys={};return c}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=fo(),s=!0}}}function hd(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!co(t,e):!1}function Le(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function fo(){return{animate:Le(!0),whileInView:Le(),whileHover:Le(),whileTap:Le(),whileDrag:Le(),whileFocus:Le(),exit:Le()}}class Ae{constructor(t){this.isMounted=!1,this.node=t}update(){}}class md extends Ae{constructor(t){super(t),t.animationState||(t.animationState=fd(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();en(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let pd=0;class gd extends Ae{constructor(){super(...arguments),this.id=pd++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.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 yd={animation:{Feature:md},exit:{Feature:gd}};function Et(e,t,n,s={passive:!0}){return e.addEventListener(t,n,s),()=>e.removeEventListener(t,n)}function At(e){return{point:{x:e.pageX,y:e.pageY}}}const vd=e=>t=>ls(t)&&e(t,At(t));function jt(e,t,n,s){return Et(e,t,vd(n),s)}const ho=1e-4,xd=1-ho,bd=1+ho,mo=.01,wd=0-mo,Td=0+mo;function Z(e){return e.max-e.min}function Sd(e,t,n){return Math.abs(e-t)<=n}function po(e,t,n,s=.5){e.origin=s,e.originPoint=B(t.min,t.max,e.origin),e.scale=Z(n)/Z(t),e.translate=B(n.min,n.max,e.origin)-e.originPoint,(e.scale>=xd&&e.scale<=bd||isNaN(e.scale))&&(e.scale=1),(e.translate>=wd&&e.translate<=Td||isNaN(e.translate))&&(e.translate=0)}function Rt(e,t,n,s){po(e.x,t.x,n.x,s?s.originX:void 0),po(e.y,t.y,n.y,s?s.originY:void 0)}function go(e,t,n){e.min=n.min+t.min,e.max=e.min+Z(t)}function Cd(e,t,n){go(e.x,t.x,n.x),go(e.y,t.y,n.y)}function yo(e,t,n){e.min=t.min-n.min,e.max=e.min+Z(t)}function Dt(e,t,n){yo(e.x,t.x,n.x),yo(e.y,t.y,n.y)}function ae(e){return[e("x"),e("y")]}const vo=({current:e})=>e?e.ownerDocument.defaultView:null,xo=(e,t)=>Math.abs(e-t);function Pd(e,t){const n=xo(e.x,t.x),s=xo(e.y,t.y);return Math.sqrt(n**2+s**2)}class bo{constructor(t,n,{transformPagePoint:s,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:r=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=js(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,g=Pd(h.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!g)return;const{point:v}=h,{timestamp:b}=K;this.history.push({...v,timestamp:b});const{onStart:p,onMove:x}=this.handlers;m||(p&&p(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,h)},this.handlePointerMove=(h,m)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=As(m,this.transformPagePoint),L.update(this.updatePoint,!0)},this.handlePointerUp=(h,m)=>{this.end();const{onEnd:g,onSessionEnd:v,resumeAnimation:b}=this.handlers;if(this.dragSnapToOrigin&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=js(h.type==="pointercancel"?this.lastMoveEventInfo:As(m,this.transformPagePoint),this.history);this.startEvent&&g&&g(h,p),v&&v(h,p)},!ls(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=r,this.contextWindow=i||window;const a=At(t),l=As(a,this.transformPagePoint),{point:u}=l,{timestamp:c}=K;this.history=[{...u,timestamp:c}];const{onSessionStart:d}=n;d&&d(t,js(l,this.history)),this.removeListeners=yt(jt(this.contextWindow,"pointermove",this.handlePointerMove),jt(this.contextWindow,"pointerup",this.handlePointerUp),jt(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Pe(this.updatePoint)}}function As(e,t){return t?{point:t(e.point)}:e}function wo(e,t){return{x:e.x-t.x,y:e.y-t.y}}function js({point:e},t){return{point:e,delta:wo(e,To(t)),offset:wo(e,kd(t)),velocity:Ed(t,.1)}}function kd(e){return e[0]}function To(e){return e[e.length-1]}function Ed(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,s=null;const i=To(e);for(;n>=0&&(s=e[n],!(i.timestamp-s.timestamp>ue(t)));)n--;if(!s)return{x:0,y:0};const o=he(i.timestamp-s.timestamp);if(o===0)return{x:0,y:0};const r={x:(i.x-s.x)/o,y:(i.y-s.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function Ad(e,{min:t,max:n},s){return t!==void 0&&e<t?e=s?B(t,e,s.min):Math.max(e,t):n!==void 0&&e>n&&(e=s?B(n,e,s.max):Math.min(e,n)),e}function So(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 jd(e,{top:t,left:n,bottom:s,right:i}){return{x:So(e.x,n,i),y:So(e.y,t,s)}}function Co(e,t){let n=t.min-e.min,s=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,s]=[s,n]),{min:n,max:s}}function Rd(e,t){return{x:Co(e.x,t.x),y:Co(e.y,t.y)}}function Dd(e,t){let n=.5;const s=Z(e),i=Z(t);return i>s?n=vt(t.min,t.max-s,e.min):s>i&&(n=vt(e.min,e.max-i,t.min)),we(0,1,n)}function Md(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 Rs=.35;function Nd(e=Rs){return e===!1?e=0:e===!0&&(e=Rs),{x:Po(e,"left","right"),y:Po(e,"top","bottom")}}function Po(e,t,n){return{min:ko(e,t),max:ko(e,n)}}function ko(e,t){return typeof e=="number"?e:e[t]||0}const Vd=new WeakMap;class Id{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=$(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:s}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const o=d=>{const{dragSnapToOrigin:h}=this.getProps();h?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(At(d).point)},r=(d,h)=>{const{drag:m,dragPropagation:g,onDragStart:v}=this.getProps();if(m&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Uc(m),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=h,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ae(p=>{let x=this.getAxisMotionValue(p).get()||0;if(me.test(x)){const{projection:y}=this.visualElement;if(y&&y.layout){const P=y.layout.layoutBox[p];P&&(x=Z(P)*(parseFloat(x)/100))}}this.originPoint[p]=x}),v&&L.postRender(()=>v(d,h)),Ps(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},a=(d,h)=>{this.latestPointerEvent=d,this.latestPanInfo=h;const{dragPropagation:m,dragDirectionLock:g,onDirectionLock:v,onDrag:b}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:p}=h;if(g&&this.currentDirection===null){this.currentDirection=Od(p),this.currentDirection!==null&&v&&v(this.currentDirection);return}this.updateAxis("x",h.point,p),this.updateAxis("y",h.point,p),this.visualElement.render(),b&&b(d,h)},l=(d,h)=>{this.latestPointerEvent=d,this.latestPanInfo=h,this.stop(d,h),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 bo(t,{onSessionStart:o,onStart:r,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:s,contextWindow:vo(this.visualElement)})}stop(t,n){const s=t||this.latestPointerEvent,i=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!i||!s)return;const{velocity:r}=i;this.startAnimation(r);const{onDragEnd:a}=this.getProps();a&&L.postRender(()=>a(s,i))}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:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,s){const{drag:i}=this.getProps();if(!s||!rn(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let r=this.originPoint[t]+s[t];this.constraints&&this.constraints[t]&&(r=Ad(r,this.constraints[t],this.elastic[t])),o.set(r)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;t&&Qe(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&s?this.constraints=jd(s.layoutBox,t):this.constraints=!1,this.elastic=Nd(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&ae(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Md(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Qe(t))return!1;const s=t.current;Te(s!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=Lu(s,i.root,this.visualElement.getTransformPagePoint());let r=Rd(i.layout.layoutBox,o);if(n){const a=n(Vu(r));this.hasMutatedConstraints=!!a,a&&(r=Ur(a))}return r}startAnimation(t){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=ae(c=>{if(!rn(c,n,this.currentDirection))return;let d=l&&l[c]||{};r&&(d={min:0,max:0});const h=i?200:1e6,m=i?40:1e7,g={type:"inertia",velocity:s?t[c]:0,bounceStiffness:h,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 s=this.getAxisMotionValue(t);return Ps(this.visualElement,t),s.start(ks(t,s,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()}`,s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(t,(s.initial?s.initial[t]:void 0)||0)}snapToCursor(t){ae(n=>{const{drag:s}=this.getProps();if(!rn(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:r,max:a}=i.layout.layoutBox[n];o.set(t[n]-B(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!Qe(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};ae(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();i[r]=Dd({min:l,max:l},this.constraints[r])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),ae(r=>{if(!rn(r,t,null))return;const a=this.getAxisMotionValue(r),{min:l,max:u}=this.constraints[r];a.set(B(l,u,i[r]))})}addListeners(){if(!this.visualElement.current)return;Vd.set(this.visualElement,this);const t=this.visualElement.current,n=jt(t,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();Qe(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),L.read(s);const r=Et(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.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()=>{r(),n(),o(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=Rs,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function rn(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Od(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Ld extends Ae{constructor(t){super(t),this.removeGroupControls=oe,this.removeListeners=oe,this.controls=new Id(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||oe}unmount(){this.removeGroupControls(),this.removeListeners()}}const Eo=e=>(t,n)=>{e&&L.postRender(()=>e(t,n))};class Fd extends Ae{constructor(){super(...arguments),this.removePointerDownListener=oe}onPointerDown(t){this.session=new bo(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:vo(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:Eo(t),onStart:Eo(n),onMove:s,onEnd:(o,r)=>{delete this.session,i&&L.postRender(()=>i(o,r))}}}mount(){this.removePointerDownListener=jt(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 on={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Ao(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Mt={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(j.test(e))e=parseFloat(e);else return e;const n=Ao(e,t.target.x),s=Ao(e,t.target.y);return`${n}% ${s}%`}},Bd={correct:(e,{treeScale:t,projectionDelta:n})=>{const s=e,i=Ee.parse(e);if(i.length>5)return s;const o=Ee.createTransformer(e),r=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+r]/=a,i[1+r]/=l;const u=B(a,l,.5);return typeof i[2+r]=="number"&&(i[2+r]/=u),typeof i[3+r]=="number"&&(i[3+r]/=u),o(i)}};let Ds=!1;class _d extends T.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=t;cu(zd),o&&(n.group&&n.group.add(o),s&&s.register&&i&&s.register(o),Ds&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),on.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,{projection:r}=s;return r&&(r.isPresent=o,Ds=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==o?r.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?r.promote():r.relegate()||L.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),as.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=t;Ds=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function jo(e){const[t,n]=kr(),s=T.useContext(bn);return f.jsx(_d,{...e,layoutGroup:s,switchLayoutGroup:T.useContext(Wr),isPresent:t,safeToRemove:n})}const zd={borderRadius:{...Mt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Mt,borderTopRightRadius:Mt,borderBottomLeftRadius:Mt,borderBottomRightRadius:Mt,boxShadow:Bd};function Wd(e,t,n){const s=H(e)?e:Ze(e);return s.start(ks("",s,t,n)),s.animation}const $d=(e,t)=>e.depth-t.depth;class Ud{constructor(){this.children=[],this.isDirty=!1}add(t){Sn(this.children,t),this.isDirty=!0}remove(t){Cn(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort($d),this.isDirty=!1,this.children.forEach(t)}}function Kd(e,t){const n=Q.now(),s=({timestamp:i})=>{const o=i-n;o>=t&&(Pe(s),e(o-t))};return L.setup(s,!0),()=>Pe(s)}const Ro=["TopLeft","TopRight","BottomLeft","BottomRight"],Xd=Ro.length,Do=e=>typeof e=="string"?parseFloat(e):e,Mo=e=>typeof e=="number"||j.test(e);function Hd(e,t,n,s,i,o){i?(e.opacity=B(0,n.opacity??1,Yd(s)),e.opacityExit=B(t.opacity??1,0,Gd(s))):o&&(e.opacity=B(t.opacity??1,n.opacity??1,s));for(let r=0;r<Xd;r++){const a=`border${Ro[r]}Radius`;let l=No(t,a),u=No(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||Mo(l)===Mo(u)?(e[a]=Math.max(B(Do(l),Do(u),s),0),(me.test(u)||me.test(l))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=B(t.rotate||0,n.rotate||0,s))}function No(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Yd=Vo(0,.5,ki),Gd=Vo(.5,.95,oe);function Vo(e,t,n){return s=>s<e?0:s>t?1:n(vt(e,t,s))}function Io(e,t){e.min=t.min,e.max=t.max}function le(e,t){Io(e.x,t.x),Io(e.y,t.y)}function Oo(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Lo(e,t,n,s,i){return e-=t,e=sn(e,1/n,s),i!==void 0&&(e=sn(e,1/i,s)),e}function qd(e,t=0,n=1,s=.5,i,o=e,r=e){if(me.test(t)&&(t=parseFloat(t),t=B(r.min,r.max,t/100)-r.min),typeof t!="number")return;let a=B(o.min,o.max,s);e===o&&(a-=t),e.min=Lo(e.min,t,n,a,i),e.max=Lo(e.max,t,n,a,i)}function Fo(e,t,[n,s,i],o,r){qd(e,t[n],t[s],t[i],t.scale,o,r)}const Zd=["x","scaleX","originX"],Jd=["y","scaleY","originY"];function Bo(e,t,n,s){Fo(e.x,t,Zd,n?n.x:void 0,s?s.x:void 0),Fo(e.y,t,Jd,n?n.y:void 0,s?s.y:void 0)}function _o(e){return e.translate===0&&e.scale===1}function zo(e){return _o(e.x)&&_o(e.y)}function Wo(e,t){return e.min===t.min&&e.max===t.max}function Qd(e,t){return Wo(e.x,t.x)&&Wo(e.y,t.y)}function $o(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Uo(e,t){return $o(e.x,t.x)&&$o(e.y,t.y)}function Ko(e){return Z(e.x)/Z(e.y)}function Xo(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class ef{constructor(){this.members=[]}add(t){Sn(this.members,t),t.scheduleRender()}remove(t){if(Cn(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(i=>t===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){s=o;break}}return s?(this.promote(s),!0):!1}promote(t,n){const s=this.lead;if(t!==s&&(this.prevLead=s,this.lead=t,t.show(),s)){s.instance&&s.scheduleRender(),t.scheduleRender(),t.resumeFrom=s,n&&(t.resumeFrom.preserveOpacity=!0),s.snapshot&&(t.snapshot=s.snapshot,t.snapshot.latestValues=s.animationValues||s.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:s}=t;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function tf(e,t,n){let s="";const i=e.x.translate/t.x,o=e.y.translate/t.y,r=n?.z||0;if((i||o||r)&&(s=`translate3d(${i}px, ${o}px, ${r}px) `),(t.x!==1||t.y!==1)&&(s+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:d,rotateY:h,skewX:m,skewY:g}=n;u&&(s=`perspective(${u}px) ${s}`),c&&(s+=`rotate(${c}deg) `),d&&(s+=`rotateX(${d}deg) `),h&&(s+=`rotateY(${h}deg) `),m&&(s+=`skewX(${m}deg) `),g&&(s+=`skewY(${g}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const Ms=["","X","Y","Z"],nf=1e3;let sf=0;function Ns(e,t,n,s){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),s&&(s[e]=0))}function Ho(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=oo(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",L,!(i||o))}const{parent:s}=e;s&&!s.hasCheckedOptimisedAppear&&Ho(s)}function Yo({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},a=t?.()){this.id=sf++,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(af),this.nodes.forEach(df),this.nodes.forEach(ff),this.nodes.forEach(lf)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Ud)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new En),this.eventHandlers.get(r).add(a)}notifyListeners(r,...a){const l=this.eventHandlers.get(r);l&&l.notify(...a)}hasListeners(r){return this.eventHandlers.has(r)}mount(r){if(this.instance)return;this.isSVG=Pr(r)&&!qc(r),this.instance=r;const{layoutId:a,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let c,d=0;const h=()=>this.root.updateBlockedByResize=!1;L.read(()=>{d=window.innerWidth}),e(r,()=>{const m=window.innerWidth;m!==d&&(d=m,this.root.updateBlockedByResize=!0,c&&c(),c=Kd(h,250),on.hasAnimatedSinceResize&&(on.hasAnimatedSinceResize=!1,this.nodes.forEach(Zo)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:h,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||u.getDefaultTransition()||yf,{onLayoutAnimationStart:v,onLayoutAnimationComplete:b}=u.getProps(),p=!this.targetLayout||!Uo(this.targetLayout,m),x=!d&&h;if(this.options.layoutRoot||this.resumeFrom||x||d&&(p||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const y={...is(g,"layout"),onPlay:v,onComplete:b};(u.shouldReduceMotion||this.options.layoutRoot)&&(y.delay=0,y.type=!1),this.startAnimation(y),this.setAnimationOrigin(c,x)}else d||Zo(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Pe(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(hf),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ho(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const d=this.path[c];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Go);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(qo);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(uf),this.nodes.forEach(rf),this.nodes.forEach(of)):this.nodes.forEach(qo),this.clearAllSnapshots();const a=Q.now();K.delta=we(0,1e3/60,a-K.timestamp),K.timestamp=a,K.isProcessing=!0,Dn.update.process(K),Dn.preRender.process(K),Dn.render.process(K),K.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,as.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(cf),this.sharedNodes.forEach(mf)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,L.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){L.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Z(this.snapshot.measuredBox.x)&&!Z(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutCorrected=$(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,r?r.layoutBox:void 0)}updateScroll(r="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(a=!1),a&&this.instance){const l=s(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!zo(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;r&&this.instance&&(a||Oe(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return r&&(l=this.removeTransform(l)),vf(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return $();const a=r.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(xf))){const{scroll:u}=this.root;u&&(et(a.x,u.offset.x),et(a.y,u.offset.y))}return a}removeElementScroll(r){const a=$();if(le(a,r),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:c,options:d}=u;u!==this.root&&c&&d.layoutScroll&&(c.wasRoot&&le(a,r),et(a.x,c.offset.x),et(a.y,c.offset.y))}return a}applyTransform(r,a=!1){const l=$();le(l,r);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&tt(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Oe(c.latestValues)&&tt(l,c.latestValues)}return Oe(this.latestValues)&&tt(l,this.latestValues),l}removeTransform(r){const a=$();le(a,r);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!Oe(u.latestValues))continue;ws(u.latestValues)&&u.updateSnapshot();const c=$(),d=u.measurePageBox();le(c,d),Bo(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return Oe(this.latestValues)&&Bo(a,this.latestValues),a}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==K.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(r||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:d}=this.options;if(!(!this.layout||!(c||d))){if(this.resolvedRelativeTargetAt=K.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=$(),this.relativeTargetOrigin=$(),Dt(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),le(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=$(),this.targetWithTransforms=$()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Cd(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):le(this.target,this.layout.layoutBox),Yr(this.target,this.targetDelta)):le(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=$(),this.relativeTargetOrigin=$(),Dt(this.relativeTargetOrigin,this.target,h.target),le(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||ws(this.parent.latestValues)||Kr(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const r=this.getLead(),a=!!this.resumingFrom||this!==r;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===K.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,h=this.treeScale.y;Ou(this.layoutCorrected,this.treeScale,this.path,a),r.layout&&!r.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(r.target=r.layout.layoutBox,r.targetWithTransforms=$());const{target:m}=r;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Oo(this.prevProjectionDelta.x,this.projectionDelta.x),Oo(this.prevProjectionDelta.y,this.projectionDelta.y)),Rt(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==h||!Xo(this.projectionDelta.x,this.prevProjectionDelta.x)||!Xo(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){if(this.options.visualElement?.scheduleRender(),r){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=nt(),this.projectionDelta=nt(),this.projectionDeltaWithTransform=nt()}setAnimationOrigin(r,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},d=nt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=$(),m=l?l.source:void 0,g=this.layout?this.layout.source:void 0,v=m!==g,b=this.getStack(),p=!b||b.members.length<=1,x=!!(v&&!p&&this.options.crossfade===!0&&!this.path.some(gf));this.animationProgress=0;let y;this.mixTargetDelta=P=>{const S=P/1e3;Jo(d.x,r.x,S),Jo(d.y,r.y,S),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Dt(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),pf(this.relativeTarget,this.relativeTargetOrigin,h,S),y&&Qd(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=$()),le(y,this.relativeTarget)),v&&(this.animationValues=c,Hd(c,u,this.latestValues,S,x,p)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Pe(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=L.update(()=>{on.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ze(0)),this.currentAnimation=Wd(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),r.onUpdate&&r.onUpdate(a)},onStop:()=>{},onComplete:()=>{r.onComplete&&r.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(nf),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=r;if(!(!a||!l||!u)){if(this!==r&&this.layout&&u&&sa(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||$();const d=Z(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+d;const h=Z(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+h}le(a,l),tt(a,c),Rt(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new ef),this.sharedNodes.get(r).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){const{layoutId:r}=this.options;return r?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:r}=this.options;return r?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:l}=r;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&Ns("z",r,u,this.animationValues);for(let c=0;c<Ms.length;c++)Ns(`rotate${Ms[c]}`,r,u,this.animationValues),Ns(`skew${Ms[c]}`,r,u,this.animationValues);r.render();for(const c in u)r.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);r.scheduleRender()}applyProjectionStyles(r,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){r.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,r.visibility="",r.opacity="",r.pointerEvents=nn(a?.pointerEvents)||"",r.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(r.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,r.pointerEvents=nn(a?.pointerEvents)||""),this.hasProjected&&!Oe(this.latestValues)&&(r.transform=l?l({},""):"none",this.hasProjected=!1);return}r.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let d=tf(this.projectionDeltaWithTransform,this.treeScale,c);l&&(d=l(c,d)),r.transform=d;const{x:h,y:m}=this.projectionDelta;r.transformOrigin=`${h.origin*100}% ${m.origin*100}% 0`,u.animationValues?r.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:r.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const g in kt){if(c[g]===void 0)continue;const{correct:v,applyTo:b,isCSSVariable:p}=kt[g],x=d==="none"?c[g]:v(c[g],u);if(b){const y=b.length;for(let P=0;P<y;P++)r[b[P]]=x}else p?this.options.visualElement.renderState.vars[g]=x:r[g]=x}this.options.layoutId&&(r.pointerEvents=u===this?nn(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>r.currentAnimation?.stop()),this.root.nodes.forEach(Go),this.root.sharedNodes.clear()}}}function rf(e){e.updateLayout()}function of(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=e.layout,{animationType:i}=e.options,o=t.source!==e.layout.source;i==="size"?ae(c=>{const d=o?t.measuredBox[c]:t.layoutBox[c],h=Z(d);d.min=n[c].min,d.max=d.min+h}):sa(i,t.layoutBox,n)&&ae(c=>{const d=o?t.measuredBox[c]:t.layoutBox[c],h=Z(n[c]);d.max=d.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[c].max=e.relativeTarget[c].min+h)});const r=nt();Rt(r,n,t.layoutBox);const a=nt();o?Rt(a,e.applyTransform(s,!0),t.measuredBox):Rt(a,n,t.layoutBox);const l=!zo(r);let u=!1;if(!e.resumeFrom){const c=e.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:d,layout:h}=c;if(d&&h){const m=$();Dt(m,t.layoutBox,d.layoutBox);const g=$();Dt(g,n,h.layoutBox),Uo(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:r,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function af(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 lf(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function cf(e){e.clearSnapshot()}function Go(e){e.clearMeasurements()}function qo(e){e.isLayoutDirty=!1}function uf(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Zo(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function df(e){e.resolveTargetDelta()}function ff(e){e.calcProjection()}function hf(e){e.resetSkewAndRotation()}function mf(e){e.removeLeadSnapshot()}function Jo(e,t,n){e.translate=B(t.translate,0,n),e.scale=B(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Qo(e,t,n,s){e.min=B(t.min,n.min,s),e.max=B(t.max,n.max,s)}function pf(e,t,n,s){Qo(e.x,t.x,n.x,s),Qo(e.y,t.y,n.y,s)}function gf(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const yf={duration:.45,ease:[.4,0,.1,1]},ea=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ta=ea("applewebkit/")&&!ea("chrome/")?Math.round:oe;function na(e){e.min=ta(e.min),e.max=ta(e.max)}function vf(e){na(e.x),na(e.y)}function sa(e,t,n){return e==="position"||e==="preserve-aspect"&&!Sd(Ko(t),Ko(n),.2)}function xf(e){return e!==e.root&&e.scroll?.wasRoot}const bf=Yo({attachResizeListener:(e,t)=>Et(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Vs={current:void 0},ia=Yo({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Vs.current){const e=new bf({});e.mount(window),e.setOptions({layoutScroll:!0}),Vs.current=e}return Vs.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),wf={pan:{Feature:Fd},drag:{Feature:Ld,ProjectionNode:ia,MeasureLayout:jo}};function ra(e,t,n){const{props:s}=e;e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=s[i];o&&L.postRender(()=>o(t,At(t)))}class Tf extends Ae{mount(){const{current:t}=this.node;t&&(this.unmount=Kc(t,(n,s)=>(ra(this.node,s,"Start"),i=>ra(this.node,i,"End"))))}unmount(){}}class Sf extends Ae{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=yt(Et(this.node.current,"focus",()=>this.onFocus()),Et(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function oa(e,t,n){const{props:s}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&s.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),o=s[i];o&&L.postRender(()=>o(t,At(t)))}class Cf extends Ae{mount(){const{current:t}=this.node;t&&(this.unmount=Gc(t,(n,s)=>(oa(this.node,s,"Start"),(i,{success:o})=>oa(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Is=new WeakMap,Os=new WeakMap,Pf=e=>{const t=Is.get(e.target);t&&t(e)},kf=e=>{e.forEach(Pf)};function Ef({root:e,...t}){const n=e||document;Os.has(n)||Os.set(n,{});const s=Os.get(n),i=JSON.stringify(t);return s[i]||(s[i]=new IntersectionObserver(kf,{root:e,...t})),s[i]}function Af(e,t,n){const s=Ef(t);return Is.set(e,n),s.observe(e),()=>{Is.delete(e),s.unobserve(e)}}const jf={some:0,all:1};class Rf extends Ae{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:o}=t,r={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:jf[i]},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(),h=u?c:d;h&&h(l)};return Af(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(Df(t,n))&&this.startObserver()}unmount(){}}function Df({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Mf={...yd,...{inView:{Feature:Rf},tap:{Feature:Cf},focus:{Feature:Sf},hover:{Feature:Tf}},...wf,...{layout:{ProjectionNode:ia,MeasureLayout:jo}}},Fe=Nu(Mf,Xu),Nf=["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)"],an=e=>{const{speed:t=1,className:n}=e,s=1/t,i=2/t;return f.jsx(Zt,{children:f.jsx(Fe.div,{role:"status",className:R("relative rounded-full",n),animate:{rotate:360},transition:{repeat:1/0,ease:"linear",duration:s},children:f.jsx(Fe.div,{className:"absolute inset-0 rounded-full",style:{boxSizing:"border-box",borderStyle:"solid",borderWidth:2},animate:{clipPath:Nf},transition:{repeat:1/0,ease:"linear",duration:i,times:[0,.25,.5,.75,1]}})})})},it={sm:"h-[var(--control-size-sm-height)]",md:"h-[var(--control-size-md-height)]",lg:"h-[var(--control-size-lg-height)]"},Vf={sm:"min-h-[var(--control-size-sm-height)]",md:"min-h-[var(--control-size-md-height)]",lg:"min-h-[var(--control-size-lg-height)]"},Be={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)]"},If={sm:"gap-[var(--control-size-sm-gap)]",md:"gap-[var(--control-size-md-gap)]",lg:"gap-[var(--control-size-lg-gap)]"},Of={sm:"px-[var(--control-size-sm-px)]",md:"px-[var(--control-size-md-px)]",lg:"px-[var(--control-size-lg-px)]"},rt={sm:"pl-[var(--control-size-sm-px)]",md:"pl-[var(--control-size-md-px)]",lg:"pl-[var(--control-size-lg-px)]"},aa={sm:"pr-[var(--control-size-sm-px)]",md:"pr-[var(--control-size-md-px)]",lg:"pr-[var(--control-size-lg-px)]"},ot={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)]"},Lf={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)]"},Ff={sm:"left-[var(--control-size-sm-icon-offset)]",md:"left-[var(--control-size-md-icon-offset)]",lg:"left-[var(--control-size-lg-icon-offset)]"},Bf={sm:"right-[var(--control-size-sm-px)]",md:"right-[var(--control-size-md-px)]",lg:"right-[var(--control-size-lg-px)]"},Nt={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)]"},la={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)]"},_f=`
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
- rounded-[var(--border-radius-input)]
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
- `,Ef={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"},kf={sm:"h-10 px-4",md:"h-12 px-6",lg:"h-14 px-8"},ea=S.forwardRef((e,t)=>{const{variant:n="white",size:s="md",className:i,children:o,loading:r=!1,Icon:a,...l}=e;return f.jsxs("button",{ref:t,className:M(Pf,Ef[n],kf[s],i),...l,children:[r&&f.jsx(Jt,{className:"h-5 w-5"}),!r&&f.jsxs(f.Fragment,{children:[a&&f.jsx(a,{className:"h-5 w-5 -ml-2"}),o]})]})}),Af=`
37
- inline-flex flex-row items-center justify-center aspect-square
38
- button-ring font-semibold ring-0 disabled:hover:ring-0 hover:ring-4 active:ring-1
36
+ `,zf={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"},ca=C.forwardRef((e,t)=>{const{variant:n="white",size:s="md",className:i,children:o,loading:r=!1,Icon:a,...l}=e;return f.jsxs("button",{ref:t,className:R(_f,zf[n],it[s],Of[s],Be[s],If[s],i),...l,children:[r&&f.jsx(an,{className:R(Nt[s])}),!r&&f.jsxs(f.Fragment,{children:[a&&f.jsx(a,{className:R(Nt[s],"-ml-1")}),o]})]})}),Wf=`
37
+ inline-flex flex-row items-center justify-center
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
- `,jf={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"},Rf={sm:"h-10 w-10",md:"h-12 w-12",lg:"h-14 w-14"},Rs=S.forwardRef((e,t)=>{const{variant:n="white",size:s="md",className:i,Icon:o,...r}=e;return f.jsx("button",{ref:t,className:M(Af,jf[n],Rf[s],i),...r,children:f.jsx(o,{className:"h-5 w-5"})})}),Df=`
43
- inline-flex flex-row items-center justify-center aspect-square
42
+ `,$f={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"},Ls=C.forwardRef((e,t)=>{const{variant:n="white",size:s="md",className:i,Icon:o,...r}=e;return f.jsx("button",{ref:t,className:R(Wf,$f[n],la[s],i),...r,children:f.jsx(o,{className:Nt[s]})})}),Uf=`
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
- `,Mf={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"},Nf={sm:"h-10 w-10",md:"h-12 w-12",lg:"h-14 w-14"},Ds=S.forwardRef((e,t)=>{const{variant:n="white",size:s="md",className:i,Icon:o,...r}=e;return f.jsx("button",{ref:t,className:M(Df,Mf[n],Nf[s],i),...r,children:f.jsx(o,{className:"h-5 w-5"})})});/**
46
+ `,Kf={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"},Fs=C.forwardRef((e,t)=>{const{variant:n="white",size:s="md",className:i,Icon:o,...r}=e;return f.jsx("button",{ref:t,className:R(Uf,Kf[n],la[s],i),...r,children:f.jsx(o,{className:Nt[s]})})});/**
47
+ * @license @tabler/icons-react v3.34.1 - MIT
48
+ *
49
+ * This source code is licensed under the MIT license.
50
+ * See the LICENSE file in the root directory of this source tree.
51
+ */var Xf={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"}};/**
47
52
  * @license @tabler/icons-react v3.34.1 - MIT
48
53
  *
49
54
  * This source code is licensed under the MIT license.
50
55
  * See the LICENSE file in the root directory of this source tree.
51
- */var Vf={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"}};/**
56
+ */const ee=(e,t,n,s)=>{const i=T.forwardRef(({color:o="currentColor",size:r=24,stroke:a=2,title:l,className:u,children:c,...d},h)=>T.createElement("svg",{ref:h,...Xf[e],width:r,height:r,className:["tabler-icon",`tabler-icon-${t}`,u].join(" "),...e==="filled"?{fill:o}:{strokeWidth:a,stroke:o},...d},[l&&T.createElement("title",{key:"svg-title"},l),...s.map(([m,g])=>T.createElement(m,g)),...Array.isArray(c)?c:[c]]));return i.displayName=`${n}`,i};/**
52
57
  * @license @tabler/icons-react v3.34.1 - MIT
53
58
  *
54
59
  * This source code is licensed under the MIT license.
55
60
  * See the LICENSE file in the root directory of this source tree.
56
- */const te=(e,t,n,s)=>{const i=T.forwardRef(({color:o="currentColor",size:r=24,stroke:a=2,title:l,className:u,children:c,...d},h)=>T.createElement("svg",{ref:h,...Vf[e],width:r,height:r,className:["tabler-icon",`tabler-icon-${t}`,u].join(" "),...e==="filled"?{fill:o}:{strokeWidth:a,stroke:o},...d},[l&&T.createElement("title",{key:"svg-title"},l),...s.map(([m,p])=>T.createElement(m,p)),...Array.isArray(c)?c:[c]]));return i.displayName=`${n}`,i};/**
61
+ */const Hf=ee("outline","check","Check",[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]]);/**
57
62
  * @license @tabler/icons-react v3.34.1 - MIT
58
63
  *
59
64
  * This source code is licensed under the MIT license.
60
65
  * See the LICENSE file in the root directory of this source tree.
61
- */const If=te("outline","check","Check",[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]]);/**
66
+ */const Vt=ee("outline","chevron-down","ChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]);/**
62
67
  * @license @tabler/icons-react v3.34.1 - MIT
63
68
  *
64
69
  * This source code is licensed under the MIT license.
65
70
  * See the LICENSE file in the root directory of this source tree.
66
- */const Qt=te("outline","chevron-down","ChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]);/**
71
+ */const Yf=ee("outline","chevron-up","ChevronUp",[["path",{d:"M6 15l6 -6l6 6",key:"svg-0"}]]);/**
67
72
  * @license @tabler/icons-react v3.34.1 - MIT
68
73
  *
69
74
  * This source code is licensed under the MIT license.
70
75
  * See the LICENSE file in the root directory of this source tree.
71
- */const Of=te("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"}]]);/**
76
+ */const Gf=ee("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"}]]);/**
72
77
  * @license @tabler/icons-react v3.34.1 - MIT
73
78
  *
74
79
  * This source code is licensed under the MIT license.
75
80
  * See the LICENSE file in the root directory of this source tree.
76
- */const Lf=te("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"}]]);/**
81
+ */const qf=ee("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"}]]);/**
77
82
  * @license @tabler/icons-react v3.34.1 - MIT
78
83
  *
79
84
  * This source code is licensed under the MIT license.
80
85
  * See the LICENSE file in the root directory of this source tree.
81
- */const ta=te("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"}]]);/**
86
+ */const ua=ee("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"}]]);/**
82
87
  * @license @tabler/icons-react v3.34.1 - MIT
83
88
  *
84
89
  * This source code is licensed under the MIT license.
85
90
  * See the LICENSE file in the root directory of this source tree.
86
- */const na=te("outline","plus","Plus",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]]);/**
91
+ */const da=ee("outline","plus","Plus",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]]);/**
87
92
  * @license @tabler/icons-react v3.34.1 - MIT
88
93
  *
89
94
  * This source code is licensed under the MIT license.
90
95
  * See the LICENSE file in the root directory of this source tree.
91
- */const sa=te("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"}]]);/**
96
+ */const fa=ee("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"}]]);/**
92
97
  * @license @tabler/icons-react v3.34.1 - MIT
93
98
  *
94
99
  * This source code is licensed under the MIT license.
95
100
  * See the LICENSE file in the root directory of this source tree.
96
- */const Ms=te("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"}]]);/**
101
+ */const Bs=ee("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"}]]);/**
97
102
  * @license @tabler/icons-react v3.34.1 - MIT
98
103
  *
99
104
  * This source code is licensed under the MIT license.
100
105
  * See the LICENSE file in the root directory of this source tree.
101
- */const ia=te("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"}]]);/**
106
+ */const ha=ee("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"}]]);/**
102
107
  * @license @tabler/icons-react v3.34.1 - MIT
103
108
  *
104
109
  * This source code is licensed under the MIT license.
105
110
  * See the LICENSE file in the root directory of this source tree.
106
- */const Ff=te("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"}]]);/**
111
+ */const Zf=ee("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"}]]);/**
107
112
  * @license @tabler/icons-react v3.34.1 - MIT
108
113
  *
109
114
  * This source code is licensed under the MIT license.
110
115
  * See the LICENSE file in the root directory of this source tree.
111
- */const nt=te("outline","x","X",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);/**
116
+ */const at=ee("outline","x","X",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);/**
112
117
  * @license @tabler/icons-react v3.34.1 - MIT
113
118
  *
114
119
  * This source code is licensed under the MIT license.
115
120
  * See the LICENSE file in the root directory of this source tree.
116
- */const Bf=te("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"}]]);/**
121
+ */const Jf=ee("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"}]]);/**
117
122
  * @license @tabler/icons-react v3.34.1 - MIT
118
123
  *
119
124
  * This source code is licensed under the MIT license.
120
125
  * See the LICENSE file in the root directory of this source tree.
121
- */const _f=te("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"}]]),Be=e=>{const{children:t}=e;return t?f.jsx("label",{className:"input-label font-medium mb-1",children:t}):null},_e=()=>f.jsx("div",{className:"h-5 w-5",children:f.jsx(Bf,{className:"h-5 w-5 input-error-icon"})}),$e=e=>{const{children:t,className:n}=e;return f.jsx("div",{className:M("absolute top-1/2 -translate-y-1/2 right-3.5 flex flex-row items-center gap-1",n),children:t})},me=e=>{const{children:t}=e;return t?f.jsx("div",{className:"input-description text-sm font-medium mt-2",children:t}):null},pe=e=>{const{children:t}=e;return t?f.jsx("div",{className:"input-error-text text-sm font-medium mt-2",children:t}):null},Ns=e=>{const{className:t,label:n,description:s,Icon:i,error:o,buttonTray:r,...a}=e;return f.jsxs("div",{className:M("flex flex-col",t),children:[f.jsx(Be,{children:n}),f.jsxs("div",{className:"flex flex-col relative",children:[i&&f.jsx(i,{className:"h-5 w-5 input-icon absolute left-4 top-1/2 -translate-y-1/2"}),f.jsx("input",{className:M("h-12 border input-base transition-all duration-150 rounded-xl shadow-sm ring-0 focus:ring-4 focus:outline-none",i?"pl-12 pr-4":"px-4",o&&"input-error !pr-10"),...a}),f.jsxs($e,{children:[o&&f.jsx(_e,{}),r]})]}),f.jsx(me,{children:s}),f.jsx(pe,{children:o})]})},Ce=e=>{const{onClick:t,Icon:n}=e;return f.jsx("div",{onClick:t,className:M("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:f.jsx(n,{className:M("h-5 w-5 input-icon-button-icon",t&&"group-active:scale-[0.8] transition-transform origin-center")})})},$f=e=>{const{type:t="password",enableShowPasswordToggle:n=!0,...s}=e,[i,o]=T.useState(!1),r=()=>{o(!i)};return f.jsx(Ns,{type:i?"text":t,buttonTray:n?f.jsx(Ce,{Icon:i?Of:Lf,onClick:r}):void 0,...s})},Wf=e=>{const{className:t,label:n,description:s,error:i,...o}=e;return f.jsxs("div",{className:M("flex flex-col",t),children:[f.jsx(Be,{children:n}),f.jsxs("div",{className:"flex flex-col relative",children:[f.jsx("textarea",{className:M("px-4 py-2.5 min-h-12 border input-base transition-all duration-150 rounded-xl shadow-sm ring-0 focus:ring-4 focus:outline-none",i&&"input-error !pr-10"),...o}),f.jsx($e,{className:"top-3.5 translate-y-0",children:i&&f.jsx(_e,{})})]}),f.jsx(me,{children:s}),f.jsx(pe,{children:i})]})},Uf=e=>{const{className:t,label:n,description:s,error:i,...o}=e;return f.jsxs("div",{className:M("flex flex-col",t),children:[f.jsxs("div",{className:"flex flex-row gap-3",children:[f.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&&f.jsx("label",{htmlFor:e.id,className:M("input-label font-medium mb-1",e.id&&"cursor-pointer"),children:n})]}),f.jsx(me,{children:s}),f.jsx(pe,{children:i})]})},zf=e=>{const{className:t,label:n,description:s,error:i,...o}=e;return f.jsxs("div",{className:M("flex flex-col",t),children:[f.jsxs("div",{className:"flex flex-row gap-3",children:[f.jsxs("div",{className:"relative shrink-0 h-6 w-10",children:[f.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}),f.jsx("div",{className:M("rounded-full absolute border inset-0 mt-[2px] pointer-events-none transition-colors duration-150 ",e.checked?"toggle-track-on":"toggle-track-off"),children:f.jsx("div",{className:M("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&&f.jsx("label",{htmlFor:e.id,className:M("input-label font-medium mb-1",e.id&&"cursor-pointer"),children:n})]}),f.jsx(me,{children:s}),f.jsx(pe,{children:i})]})},Kf=e=>{const{className:t,label:n,description:s,error:i,...o}=e;return f.jsxs("div",{className:M("flex flex-col",t),children:[f.jsxs("div",{className:"flex flex-row gap-3",children:[f.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&&f.jsx("label",{htmlFor:e.id,className:M("input-label font-medium mb-1",e.id&&"cursor-pointer"),children:n})]}),f.jsx(me,{children:s}),f.jsx(pe,{children:i})]})},Xf=e=>{const{className:t,label:n,description:s,options:i,error:o,...r}=e;return f.jsxs("div",{className:M("flex flex-col",t),children:[f.jsx(Be,{children:n}),f.jsxs("div",{className:"relative flex w-full flex-col",children:[f.jsx("select",{className:`
122
-
123
- appearance-none
124
- h-12
125
- pl-4
126
- pr-10
127
- border
128
- input-base
129
- bg-none
130
- transition-all
131
- duration-150
132
- rounded-xl
133
- shadow-sm
134
- ring-0
135
- focus:ring-4
136
- focus:outline-none
137
- `,...r,children:i&&i.map((a,l)=>f.jsx("option",{value:a.value,disabled:a.disabled,children:a.label},l))}),f.jsxs($e,{children:[o&&f.jsx(_e,{}),f.jsx(Ce,{Icon:Qt})]})]}),f.jsx(me,{children:s}),f.jsx(pe,{children:o})]})},kt=e=>{const{children:t,onClick:n,selected:s,disabled:i=!1}=e;return f.jsxs("div",{onClick:()=>!i&&n&&n(),className:M("option-base px-4 py-2 rounded-xl cursor-pointer transition-all duration-150 select-none flex flex-row gap-3 items-center",s&&!i&&"option-selected",i&&"option-disabled cursor-not-allowed hover:bg-transparent active:bg-transparent"),children:[f.jsx("div",{className:"flex-1",children:t}),s&&!i&&f.jsx("div",{className:"shrink-0",children:f.jsx(If,{className:"h-5 w-5"})})]})};function en(){return typeof window<"u"}function st(e){return Vs(e)?(e.nodeName||"").toLowerCase():"#document"}function ne(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ge(e){var t;return(t=(Vs(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Vs(e){return en()?e instanceof Node||e instanceof ne(e).Node:!1}function H(e){return en()?e instanceof Element||e instanceof ne(e).Element:!1}function ye(e){return en()?e instanceof HTMLElement||e instanceof ne(e).HTMLElement:!1}function Is(e){return!en()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ne(e).ShadowRoot}const Yf=new Set(["inline","contents"]);function At(e){const{overflow:t,overflowX:n,overflowY:s,display:i}=ue(e);return/auto|scroll|overlay|hidden|clip/.test(t+s+n)&&!Yf.has(i)}const Hf=new Set(["table","td","th"]);function Gf(e){return Hf.has(st(e))}const qf=[":popover-open",":modal"];function tn(e){return qf.some(t=>{try{return e.matches(t)}catch{return!1}})}const Zf=["transform","translate","scale","rotate","perspective"],Jf=["transform","translate","scale","rotate","perspective","filter"],Qf=["paint","layout","strict","content"];function Os(e){const t=Ls(),n=H(e)?ue(e):e;return Zf.some(s=>n[s]?n[s]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Jf.some(s=>(n.willChange||"").includes(s))||Qf.some(s=>(n.contain||"").includes(s))}function eh(e){let t=je(e);for(;ye(t)&&!it(t);){if(Os(t))return t;if(tn(t))return null;t=je(t)}return null}function Ls(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const th=new Set(["html","body","#document"]);function it(e){return th.has(st(e))}function ue(e){return ne(e).getComputedStyle(e)}function nn(e){return H(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function je(e){if(st(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Is(e)&&e.host||ge(e);return Is(t)?t.host:t}function ra(e){const t=je(e);return it(t)?e.ownerDocument?e.ownerDocument.body:e.body:ye(t)&&At(t)?t:ra(t)}function jt(e,t,n){var s;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=ra(e),o=i===((s=e.ownerDocument)==null?void 0:s.body),r=ne(i);if(o){const a=Fs(r);return t.concat(r,r.visualViewport||[],At(i)?i:[],a&&n?jt(a):[])}return t.concat(i,jt(i,[],n))}function Fs(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Rt=Math.min,ae=Math.max,sn=Math.round,rn=Math.floor,ve=e=>({x:e,y:e});function oa(e,t){return typeof e=="function"?e(t):e}function Bs(e){return e.split("-")[0]}function aa(e){return e.split("-")[1]}function nh(e){return e==="x"?"y":"x"}function sh(e){return e==="y"?"height":"width"}const ih=new Set(["top","bottom"]);function _s(e){return ih.has(Bs(e))?"y":"x"}function rh(e){return nh(_s(e))}function oh(e){return{top:0,right:0,bottom:0,left:0,...e}}function ah(e){return typeof e!="number"?oh(e):{top:e,right:e,bottom:e,left:e}}function on(e){const{x:t,y:n,width:s,height:i}=e;return{width:s,height:i,top:n,left:t,right:t+s,bottom:n+i,x:t,y:n}}/*!
126
+ */const Qf=ee("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"}]]),_e=e=>{const{children:t}=e;return t?f.jsx("label",{className:"input-label font-medium mb-1",children:t}):null},ze=()=>f.jsx("div",{className:"h-5 w-5",children:f.jsx(Jf,{className:"h-5 w-5 input-error-icon"})}),We=T.createContext("md"),eh=()=>T.useContext(We),$e=e=>{const{children:t,className:n}=e,s=eh();return f.jsx("div",{className:R("absolute top-1/2 -translate-y-1/2 flex flex-row items-center gap-1",Bf[s],n),children:t})},pe=e=>{const{children:t}=e;return t?f.jsx("div",{className:"input-description text-sm font-medium mt-2",children:t}):null},ge=e=>{const{children:t}=e;return t?f.jsx("div",{className:"input-error-text text-sm font-medium mt-2",children:t}):null},_s=e=>{const{className:t,label:n,description:s,Icon:i,error:o,buttonTray:r,size:a="md",...l}=e,u=!!o||!!r;return f.jsx(We.Provider,{value:a,children:f.jsxs("div",{className:R("flex flex-col",t),children:[f.jsx(_e,{children:n}),f.jsxs("div",{className:"flex flex-col relative",children:[i&&f.jsx(i,{className:R("input-icon absolute top-1/2 -translate-y-1/2",Nt[a],Ff[a])}),f.jsx("input",{className:R("border input-base transition-all duration-150 rounded-xl shadow-sm ring-0 focus:ring-4 focus:outline-none",it[a],Be[a],i?Lf[a]:rt[a],u?ot[a]:aa[a],o&&"input-error"),...l}),f.jsxs($e,{children:[o&&f.jsx(ze,{}),r]})]}),f.jsx(pe,{children:s}),f.jsx(ge,{children:o})]})})},Ce=e=>{const{onClick:t,Icon:n}=e;return f.jsx("div",{onClick:t,className:R("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:f.jsx(n,{className:R("h-5 w-5 input-icon-button-icon",t&&"group-active:scale-[0.8] transition-transform origin-center")})})},th=e=>{const{type:t="password",enableShowPasswordToggle:n=!0,...s}=e,[i,o]=T.useState(!1),r=()=>{o(!i)};return f.jsx(_s,{type:i?"text":t,buttonTray:n?f.jsx(Ce,{Icon:i?Gf:qf,onClick:r}):void 0,...s})},nh=e=>{const{className:t,label:n,description:s,error:i,size:o="md",...r}=e;return f.jsx(We.Provider,{value:o,children:f.jsxs("div",{className:R("flex flex-col",t),children:[f.jsx(_e,{children:n}),f.jsxs("div",{className:"flex flex-col relative",children:[f.jsx("textarea",{className:R("py-2.5 border input-base transition-all duration-150 rounded-xl shadow-sm ring-0 focus:ring-4 focus:outline-none",Vf[o],Be[o],rt[o],i?ot[o]:aa[o],i&&"input-error"),...r}),f.jsx($e,{className:"top-3.5 translate-y-0",children:i&&f.jsx(ze,{})})]}),f.jsx(pe,{children:s}),f.jsx(ge,{children:i})]})})},sh=e=>{const{className:t,label:n,description:s,error:i,...o}=e;return f.jsxs("div",{className:R("flex flex-col",t),children:[f.jsxs("div",{className:"flex flex-row gap-3",children:[f.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&&f.jsx("label",{htmlFor:e.id,className:R("input-label font-medium mb-1",e.id&&"cursor-pointer"),children:n})]}),f.jsx(pe,{children:s}),f.jsx(ge,{children:i})]})},ih=e=>{const{className:t,label:n,description:s,error:i,...o}=e;return f.jsxs("div",{className:R("flex flex-col",t),children:[f.jsxs("div",{className:"flex flex-row gap-3",children:[f.jsxs("div",{className:"relative shrink-0 h-6 w-10",children:[f.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}),f.jsx("div",{className:R("rounded-full absolute border inset-0 mt-[2px] pointer-events-none transition-colors duration-150 ",e.checked?"toggle-track-on":"toggle-track-off"),children:f.jsx("div",{className:R("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&&f.jsx("label",{htmlFor:e.id,className:R("input-label font-medium mb-1",e.id&&"cursor-pointer"),children:n})]}),f.jsx(pe,{children:s}),f.jsx(ge,{children:i})]})},rh=e=>{const{className:t,label:n,description:s,error:i,...o}=e;return f.jsxs("div",{className:R("flex flex-col",t),children:[f.jsxs("div",{className:"flex flex-row gap-3",children:[f.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&&f.jsx("label",{htmlFor:e.id,className:R("input-label font-medium mb-1",e.id&&"cursor-pointer"),children:n})]}),f.jsx(pe,{children:s}),f.jsx(ge,{children:i})]})},oh=e=>{const{className:t,label:n,description:s,options:i,error:o,size:r="md",...a}=e;return f.jsx(We.Provider,{value:r,children:f.jsxs("div",{className:R("flex flex-col",t),children:[f.jsx(_e,{children:n}),f.jsxs("div",{className:"relative flex w-full flex-col",children:[f.jsx("select",{className:R("appearance-none border input-base bg-none transition-all duration-150 rounded-xl shadow-sm ring-0 focus:ring-4 focus:outline-none",it[r],Be[r],rt[r],ot[r]),...a,children:i&&i.map((l,u)=>f.jsx("option",{value:l.value,disabled:l.disabled,children:l.label},u))}),f.jsxs($e,{children:[o&&f.jsx(ze,{}),f.jsx(Ce,{Icon:Vt})]})]}),f.jsx(pe,{children:s}),f.jsx(ge,{children:o})]})})},It=e=>{const{children:t,onClick:n,selected:s,disabled:i=!1}=e;return f.jsxs("div",{onClick:()=>!i&&n&&n(),className:R("option-base px-4 py-2 rounded-xl cursor-pointer transition-all duration-150 select-none flex flex-row gap-3 items-center",s&&!i&&"option-selected",i&&"option-disabled cursor-not-allowed hover:bg-transparent active:bg-transparent"),children:[f.jsx("div",{className:"flex-1",children:t}),s&&!i&&f.jsx("div",{className:"shrink-0",children:f.jsx(Hf,{className:"h-5 w-5"})})]})};function ln(){return typeof window<"u"}function lt(e){return zs(e)?(e.nodeName||"").toLowerCase():"#document"}function se(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ye(e){var t;return(t=(zs(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function zs(e){return ln()?e instanceof Node||e instanceof se(e).Node:!1}function Y(e){return ln()?e instanceof Element||e instanceof se(e).Element:!1}function ve(e){return ln()?e instanceof HTMLElement||e instanceof se(e).HTMLElement:!1}function Ws(e){return!ln()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof se(e).ShadowRoot}const ah=new Set(["inline","contents"]);function Ot(e){const{overflow:t,overflowX:n,overflowY:s,display:i}=fe(e);return/auto|scroll|overlay|hidden|clip/.test(t+s+n)&&!ah.has(i)}const lh=new Set(["table","td","th"]);function ch(e){return lh.has(lt(e))}const uh=[":popover-open",":modal"];function cn(e){return uh.some(t=>{try{return e.matches(t)}catch{return!1}})}const dh=["transform","translate","scale","rotate","perspective"],fh=["transform","translate","scale","rotate","perspective","filter"],hh=["paint","layout","strict","content"];function $s(e){const t=Us(),n=Y(e)?fe(e):e;return dh.some(s=>n[s]?n[s]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||fh.some(s=>(n.willChange||"").includes(s))||hh.some(s=>(n.contain||"").includes(s))}function mh(e){let t=je(e);for(;ve(t)&&!ct(t);){if($s(t))return t;if(cn(t))return null;t=je(t)}return null}function Us(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const ph=new Set(["html","body","#document"]);function ct(e){return ph.has(lt(e))}function fe(e){return se(e).getComputedStyle(e)}function un(e){return Y(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function je(e){if(lt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ws(e)&&e.host||ye(e);return Ws(t)?t.host:t}function ma(e){const t=je(e);return ct(t)?e.ownerDocument?e.ownerDocument.body:e.body:ve(t)&&Ot(t)?t:ma(t)}function Lt(e,t,n){var s;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=ma(e),o=i===((s=e.ownerDocument)==null?void 0:s.body),r=se(i);if(o){const a=Ks(r);return t.concat(r,r.visualViewport||[],Ot(i)?i:[],a&&n?Lt(a):[])}return t.concat(i,Lt(i,[],n))}function Ks(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Ft=Math.min,ce=Math.max,dn=Math.round,fn=Math.floor,xe=e=>({x:e,y:e});function pa(e,t){return typeof e=="function"?e(t):e}function Xs(e){return e.split("-")[0]}function ga(e){return e.split("-")[1]}function gh(e){return e==="x"?"y":"x"}function yh(e){return e==="y"?"height":"width"}const vh=new Set(["top","bottom"]);function Hs(e){return vh.has(Xs(e))?"y":"x"}function xh(e){return gh(Hs(e))}function bh(e){return{top:0,right:0,bottom:0,left:0,...e}}function wh(e){return typeof e!="number"?bh(e):{top:e,right:e,bottom:e,left:e}}function hn(e){const{x:t,y:n,width:s,height:i}=e;return{width:s,height:i,top:n,left:t,right:t+s,bottom:n+i,x:t,y:n}}/*!
138
127
  * tabbable 6.2.0
139
128
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
140
- */var lh=["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])"],$s=lh.join(","),la=typeof Element>"u",Dt=la?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,an=!la&&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},ln=function e(t,n){var s;n===void 0&&(n=!0);var i=t==null||(s=t.getAttribute)===null||s===void 0?void 0:s.call(t,"inert"),o=i===""||i==="true",r=o||n&&t&&e(t.parentNode);return r},ch=function(t){var n,s=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return s===""||s==="true"},uh=function(t,n,s){if(ln(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll($s));return n&&Dt.call(t,$s)&&i.unshift(t),i=i.filter(s),i},dh=function e(t,n,s){for(var i=[],o=Array.from(t);o.length;){var r=o.shift();if(!ln(r,!1))if(r.tagName==="SLOT"){var a=r.assignedElements(),l=a.length?a:r.children,u=e(l,!0,s);s.flatten?i.push.apply(i,u):i.push({scopeParent:r,candidates:u})}else{var c=Dt.call(r,$s);c&&s.filter(r)&&(n||!t.includes(r))&&i.push(r);var d=r.shadowRoot||typeof s.getShadowRoot=="function"&&s.getShadowRoot(r),h=!ln(d,!1)&&(!s.shadowRootFilter||s.shadowRootFilter(r));if(d&&h){var m=e(d===!0?r.children:d.children,!0,s);s.flatten?i.push.apply(i,m):i.push({scopeParent:r,candidates:m})}else o.unshift.apply(o,r.children)}}return i},ca=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},ua=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||ch(t))&&!ca(t)?0:t.tabIndex},fh=function(t,n){var s=ua(t);return s<0&&n&&!ca(t)?0:s},hh=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},da=function(t){return t.tagName==="INPUT"},mh=function(t){return da(t)&&t.type==="hidden"},ph=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(s){return s.tagName==="SUMMARY"});return n},gh=function(t,n){for(var s=0;s<t.length;s++)if(t[s].checked&&t[s].form===n)return t[s]},yh=function(t){if(!t.name)return!0;var n=t.form||an(t),s=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=s(window.CSS.escape(t.name));else try{i=s(t.name)}catch(r){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",r.message),!1}var o=gh(i,t.form);return!o||o===t},vh=function(t){return da(t)&&t.type==="radio"},xh=function(t){return vh(t)&&!yh(t)},bh=function(t){var n,s=t&&an(t),i=(n=s)===null||n===void 0?void 0:n.host,o=!1;if(s&&s!==t){var r,a,l;for(o=!!((r=i)!==null&&r!==void 0&&(a=r.ownerDocument)!==null&&a!==void 0&&a.contains(i)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!o&&i;){var u,c,d;s=an(i),i=(u=s)===null||u===void 0?void 0:u.host,o=!!((c=i)!==null&&c!==void 0&&(d=c.ownerDocument)!==null&&d!==void 0&&d.contains(i))}}return o},fa=function(t){var n=t.getBoundingClientRect(),s=n.width,i=n.height;return s===0&&i===0},wh=function(t,n){var s=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var o=Dt.call(t,"details>summary:first-of-type"),r=o?t.parentElement:t;if(Dt.call(r,"details:not([open]) *"))return!0;if(!s||s==="full"||s==="legacy-full"){if(typeof i=="function"){for(var a=t;t;){var l=t.parentElement,u=an(t);if(l&&!l.shadowRoot&&i(l)===!0)return fa(t);t.assignedSlot?t=t.assignedSlot:!l&&u!==t.ownerDocument?t=u.host:t=l}t=a}if(bh(t))return!t.getClientRects().length;if(s!=="legacy-full")return!0}else if(s==="non-zero-area")return fa(t);return!1},Th=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var s=0;s<n.children.length;s++){var i=n.children.item(s);if(i.tagName==="LEGEND")return Dt.call(n,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}n=n.parentElement}return!1},Sh=function(t,n){return!(n.disabled||ln(n)||mh(n)||wh(n,t)||ph(n)||Th(n))},ha=function(t,n){return!(xh(n)||ua(n)<0||!Sh(t,n))},Ch=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Ph=function e(t){var n=[],s=[];return t.forEach(function(i,o){var r=!!i.scopeParent,a=r?i.scopeParent:i,l=fh(a,r),u=r?e(i.candidates):a;l===0?r?n.push.apply(n,u):n.push(a):s.push({documentOrder:o,tabIndex:l,item:i,isScope:r,content:u})}),s.sort(hh).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(n)},ma=function(t,n){n=n||{};var s;return n.getShadowRoot?s=dh([t],n.includeContainer,{filter:ha.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Ch}):s=uh(t,n.includeContainer,ha.bind(null,n)),Ph(s)};function Eh(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function kh(){return/apple/i.test(navigator.vendor)}function Ah(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 jh(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Is(n)){let s=t;for(;s;){if(e===s)return!0;s=s.parentNode||s.host}}return!1}function Ws(e){return e?.ownerDocument||document}var Rh=typeof document<"u",Dh=function(){},Re=Rh?T.useLayoutEffect:Dh;const Mh={...S}.useInsertionEffect||(e=>e());function Nh(e){const t=S.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Mh(()=>{t.current=e}),S.useCallback(function(){for(var n=arguments.length,s=new Array(n),i=0;i<n;i++)s[i]=arguments[i];return t.current==null?void 0:t.current(...s)},[])}const pa=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function ga(e,t){const n=ma(e,pa()),s=n.length;if(s===0)return;const i=Ah(Ws(e)),o=n.indexOf(i),r=o===-1?t===1?0:s-1:o+t;return n[r]}function Vh(e){return ga(Ws(e).body,1)||e}function Ih(e){return ga(Ws(e).body,-1)||e}function Us(e,t){const n=t||e.currentTarget,s=e.relatedTarget;return!s||!jh(n,s)}function Oh(e){ma(e,pa()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function ya(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const s=n.dataset.tabindex;delete n.dataset.tabindex,s?n.setAttribute("tabindex",s):n.removeAttribute("tabindex")})}function va(e,t,n){let{reference:s,floating:i}=e;const o=_s(t),r=rh(t),a=sh(r),l=Bs(t),u=o==="y",c=s.x+s.width/2-i.width/2,d=s.y+s.height/2-i.height/2,h=s[a]/2-i[a]/2;let m;switch(l){case"top":m={x:c,y:s.y-i.height};break;case"bottom":m={x:c,y:s.y+s.height};break;case"right":m={x:s.x+s.width,y:d};break;case"left":m={x:s.x-i.width,y:d};break;default:m={x:s.x,y:s.y}}switch(aa(t)){case"start":m[r]-=h*(n&&u?-1:1);break;case"end":m[r]+=h*(n&&u?-1:1);break}return m}const Lh=async(e,t,n)=>{const{placement:s="bottom",strategy:i="absolute",middleware:o=[],platform:r}=n,a=o.filter(Boolean),l=await(r.isRTL==null?void 0:r.isRTL(t));let u=await r.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=va(u,s,l),h=s,m={},p=0;for(let y=0;y<a.length;y++){const{name:x,fn:v}=a[y],{x:b,y:g,data:E,reset:C}=await v({x:c,y:d,initialPlacement:s,placement:h,strategy:i,middlewareData:m,rects:u,platform:r,elements:{reference:e,floating:t}});c=b??c,d=g??d,m={...m,[x]:{...m[x],...E}},C&&p<=50&&(p++,typeof C=="object"&&(C.placement&&(h=C.placement),C.rects&&(u=C.rects===!0?await r.getElementRects({reference:e,floating:t,strategy:i}):C.rects),{x:c,y:d}=va(u,h,l)),y=-1)}return{x:c,y:d,placement:h,strategy:i,middlewareData:m}};async function Fh(e,t){var n;t===void 0&&(t={});const{x:s,y:i,platform:o,rects:r,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:h=!1,padding:m=0}=oa(t,e),p=ah(m),x=a[h?d==="floating"?"reference":"floating":d],v=on(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(x)))==null||n?x:x.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),b=d==="floating"?{x:s,y:i,width:r.floating.width,height:r.floating.height}:r.reference,g=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),E=await(o.isElement==null?void 0:o.isElement(g))?await(o.getScale==null?void 0:o.getScale(g))||{x:1,y:1}:{x:1,y:1},C=on(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:g,strategy:l}):b);return{top:(v.top-C.top+p.top)/E.y,bottom:(C.bottom-v.bottom+p.bottom)/E.y,left:(v.left-C.left+p.left)/E.x,right:(C.right-v.right+p.right)/E.x}}const Bh=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,s;const{placement:i,rects:o,platform:r,elements:a}=t,{apply:l=()=>{},...u}=oa(e,t),c=await Fh(t,u),d=Bs(i),h=aa(i),m=_s(i)==="y",{width:p,height:y}=o.floating;let x,v;d==="top"||d==="bottom"?(x=d,v=h===(await(r.isRTL==null?void 0:r.isRTL(a.floating))?"start":"end")?"left":"right"):(v=d,x=h==="end"?"top":"bottom");const b=y-c.top-c.bottom,g=p-c.left-c.right,E=Rt(y-c[x],b),C=Rt(p-c[v],g),P=!t.middlewareData.shift;let k=E,A=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(A=g),(s=t.middlewareData.shift)!=null&&s.enabled.y&&(k=b),P&&!h){const I=ae(c.left,0),U=ae(c.right,0),se=ae(c.top,0),O=ae(c.bottom,0);m?A=p-2*(I!==0||U!==0?I+U:ae(c.left,c.right)):k=y-2*(se!==0||O!==0?se+O:ae(c.top,c.bottom))}await l({...t,availableWidth:A,availableHeight:k});const V=await r.getDimensions(a.floating);return p!==V.width||y!==V.height?{reset:{rects:!0}}:{}}}};function xa(e){const t=ue(e);let n=parseFloat(t.width)||0,s=parseFloat(t.height)||0;const i=ye(e),o=i?e.offsetWidth:n,r=i?e.offsetHeight:s,a=sn(n)!==o||sn(s)!==r;return a&&(n=o,s=r),{width:n,height:s,$:a}}function zs(e){return H(e)?e:e.contextElement}function rt(e){const t=zs(e);if(!ye(t))return ve(1);const n=t.getBoundingClientRect(),{width:s,height:i,$:o}=xa(t);let r=(o?sn(n.width):n.width)/s,a=(o?sn(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}const _h=ve(0);function ba(e){const t=ne(e);return!Ls()||!t.visualViewport?_h:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function $h(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ne(e)?!1:t}function We(e,t,n,s){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=zs(e);let r=ve(1);t&&(s?H(s)&&(r=rt(s)):r=rt(e));const a=$h(o,n,s)?ba(o):ve(0);let l=(i.left+a.x)/r.x,u=(i.top+a.y)/r.y,c=i.width/r.x,d=i.height/r.y;if(o){const h=ne(o),m=s&&H(s)?ne(s):s;let p=h,y=Fs(p);for(;y&&s&&m!==p;){const x=rt(y),v=y.getBoundingClientRect(),b=ue(y),g=v.left+(y.clientLeft+parseFloat(b.paddingLeft))*x.x,E=v.top+(y.clientTop+parseFloat(b.paddingTop))*x.y;l*=x.x,u*=x.y,c*=x.x,d*=x.y,l+=g,u+=E,p=ne(y),y=Fs(p)}}return on({width:c,height:d,x:l,y:u})}function cn(e,t){const n=nn(e).scrollLeft;return t?t.left+n:We(ge(e)).left+n}function wa(e,t){const n=e.getBoundingClientRect(),s=n.left+t.scrollLeft-cn(e,n),i=n.top+t.scrollTop;return{x:s,y:i}}function Wh(e){let{elements:t,rect:n,offsetParent:s,strategy:i}=e;const o=i==="fixed",r=ge(s),a=t?tn(t.floating):!1;if(s===r||a&&o)return n;let l={scrollLeft:0,scrollTop:0},u=ve(1);const c=ve(0),d=ye(s);if((d||!d&&!o)&&((st(s)!=="body"||At(r))&&(l=nn(s)),ye(s))){const m=We(s);u=rt(s),c.x=m.x+s.clientLeft,c.y=m.y+s.clientTop}const h=r&&!d&&!o?wa(r,l):ve(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+h.x,y:n.y*u.y-l.scrollTop*u.y+c.y+h.y}}function Uh(e){return Array.from(e.getClientRects())}function zh(e){const t=ge(e),n=nn(e),s=e.ownerDocument.body,i=ae(t.scrollWidth,t.clientWidth,s.scrollWidth,s.clientWidth),o=ae(t.scrollHeight,t.clientHeight,s.scrollHeight,s.clientHeight);let r=-n.scrollLeft+cn(e);const a=-n.scrollTop;return ue(s).direction==="rtl"&&(r+=ae(t.clientWidth,s.clientWidth)-i),{width:i,height:o,x:r,y:a}}const Ta=25;function Kh(e,t){const n=ne(e),s=ge(e),i=n.visualViewport;let o=s.clientWidth,r=s.clientHeight,a=0,l=0;if(i){o=i.width,r=i.height;const c=Ls();(!c||c&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}const u=cn(s);if(u<=0){const c=s.ownerDocument,d=c.body,h=getComputedStyle(d),m=c.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,p=Math.abs(s.clientWidth-d.clientWidth-m);p<=Ta&&(o-=p)}else u<=Ta&&(o+=u);return{width:o,height:r,x:a,y:l}}const Xh=new Set(["absolute","fixed"]);function Yh(e,t){const n=We(e,!0,t==="fixed"),s=n.top+e.clientTop,i=n.left+e.clientLeft,o=ye(e)?rt(e):ve(1),r=e.clientWidth*o.x,a=e.clientHeight*o.y,l=i*o.x,u=s*o.y;return{width:r,height:a,x:l,y:u}}function Sa(e,t,n){let s;if(t==="viewport")s=Kh(e,n);else if(t==="document")s=zh(ge(e));else if(H(t))s=Yh(t,n);else{const i=ba(e);s={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return on(s)}function Ca(e,t){const n=je(e);return n===t||!H(n)||it(n)?!1:ue(n).position==="fixed"||Ca(n,t)}function Hh(e,t){const n=t.get(e);if(n)return n;let s=jt(e,[],!1).filter(a=>H(a)&&st(a)!=="body"),i=null;const o=ue(e).position==="fixed";let r=o?je(e):e;for(;H(r)&&!it(r);){const a=ue(r),l=Os(r);!l&&a.position==="fixed"&&(i=null),(o?!l&&!i:!l&&a.position==="static"&&!!i&&Xh.has(i.position)||At(r)&&!l&&Ca(e,r))?s=s.filter(c=>c!==r):i=a,r=je(r)}return t.set(e,s),s}function Gh(e){let{element:t,boundary:n,rootBoundary:s,strategy:i}=e;const r=[...n==="clippingAncestors"?tn(t)?[]:Hh(t,this._c):[].concat(n),s],a=r[0],l=r.reduce((u,c)=>{const d=Sa(t,c,i);return u.top=ae(d.top,u.top),u.right=Rt(d.right,u.right),u.bottom=Rt(d.bottom,u.bottom),u.left=ae(d.left,u.left),u},Sa(t,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function qh(e){const{width:t,height:n}=xa(e);return{width:t,height:n}}function Zh(e,t,n){const s=ye(t),i=ge(t),o=n==="fixed",r=We(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const l=ve(0);function u(){l.x=cn(i)}if(s||!s&&!o)if((st(t)!=="body"||At(i))&&(a=nn(t)),s){const m=We(t,!0,o,t);l.x=m.x+t.clientLeft,l.y=m.y+t.clientTop}else i&&u();o&&!s&&i&&u();const c=i&&!s&&!o?wa(i,a):ve(0),d=r.left+a.scrollLeft-l.x-c.x,h=r.top+a.scrollTop-l.y-c.y;return{x:d,y:h,width:r.width,height:r.height}}function Ks(e){return ue(e).position==="static"}function Pa(e,t){if(!ye(e)||ue(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ge(e)===n&&(n=n.ownerDocument.body),n}function Ea(e,t){const n=ne(e);if(tn(e))return n;if(!ye(e)){let i=je(e);for(;i&&!it(i);){if(H(i)&&!Ks(i))return i;i=je(i)}return n}let s=Pa(e,t);for(;s&&Gf(s)&&Ks(s);)s=Pa(s,t);return s&&it(s)&&Ks(s)&&!Os(s)?n:s||eh(e)||n}const Jh=async function(e){const t=this.getOffsetParent||Ea,n=this.getDimensions,s=await n(e.floating);return{reference:Zh(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function Qh(e){return ue(e).direction==="rtl"}const em={convertOffsetParentRelativeRectToViewportRelativeRect:Wh,getDocumentElement:ge,getClippingRect:Gh,getOffsetParent:Ea,getElementRects:Jh,getClientRects:Uh,getDimensions:qh,getScale:rt,isElement:H,isRTL:Qh};function ka(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function tm(e,t){let n=null,s;const i=ge(e);function o(){var a;clearTimeout(s),(a=n)==null||a.disconnect(),n=null}function r(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),o();const u=e.getBoundingClientRect(),{left:c,top:d,width:h,height:m}=u;if(a||t(),!h||!m)return;const p=rn(d),y=rn(i.clientWidth-(c+h)),x=rn(i.clientHeight-(d+m)),v=rn(c),g={rootMargin:-p+"px "+-y+"px "+-x+"px "+-v+"px",threshold:ae(0,Rt(1,l))||1};let E=!0;function C(P){const k=P[0].intersectionRatio;if(k!==l){if(!E)return r();k?r(!1,k):s=setTimeout(()=>{r(!1,1e-7)},1e3)}k===1&&!ka(u,e.getBoundingClientRect())&&r(),E=!1}try{n=new IntersectionObserver(C,{...g,root:i.ownerDocument})}catch{n=new IntersectionObserver(C,g)}n.observe(e)}return r(!0),o}function nm(e,t,n,s){s===void 0&&(s={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=s,u=zs(e),c=i||o?[...u?jt(u):[],...jt(t)]:[];c.forEach(v=>{i&&v.addEventListener("scroll",n,{passive:!0}),o&&v.addEventListener("resize",n)});const d=u&&a?tm(u,n):null;let h=-1,m=null;r&&(m=new ResizeObserver(v=>{let[b]=v;b&&b.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var g;(g=m)==null||g.observe(t)})),n()}),u&&!l&&m.observe(u),m.observe(t));let p,y=l?We(e):null;l&&x();function x(){const v=We(e);y&&!ka(y,v)&&n(),y=v,p=requestAnimationFrame(x)}return n(),()=>{var v;c.forEach(b=>{i&&b.removeEventListener("scroll",n),o&&b.removeEventListener("resize",n)}),d?.(),(v=m)==null||v.disconnect(),m=null,l&&cancelAnimationFrame(p)}}const sm=Bh,im=(e,t,n)=>{const s=new Map,i={platform:em,...n},o={...i.platform,_c:s};return Lh(e,t,{...i,platform:o})};var rm=typeof document<"u",om=function(){},un=rm?T.useLayoutEffect:om;function dn(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,s,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(s=n;s--!==0;)if(!dn(e[s],t[s]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(s=n;s--!==0;)if(!{}.hasOwnProperty.call(t,i[s]))return!1;for(s=n;s--!==0;){const o=i[s];if(!(o==="_owner"&&e.$$typeof)&&!dn(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Aa(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ja(e,t){const n=Aa(e);return Math.round(t*n)/n}function Xs(e){const t=S.useRef(e);return un(()=>{t.current=e}),t}function am(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:s=[],platform:i,elements:{reference:o,floating:r}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[c,d]=S.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=S.useState(s);dn(h,s)||m(s);const[p,y]=S.useState(null),[x,v]=S.useState(null),b=S.useCallback(N=>{N!==P.current&&(P.current=N,y(N))},[]),g=S.useCallback(N=>{N!==k.current&&(k.current=N,v(N))},[]),E=o||p,C=r||x,P=S.useRef(null),k=S.useRef(null),A=S.useRef(c),V=l!=null,I=Xs(l),U=Xs(i),se=Xs(u),O=S.useCallback(()=>{if(!P.current||!k.current)return;const N={placement:t,strategy:n,middleware:h};U.current&&(N.platform=U.current),im(P.current,k.current,N).then(J=>{const w={...J,isPositioned:se.current!==!1};K.current&&!dn(A.current,w)&&(A.current=w,si.flushSync(()=>{d(w)}))})},[h,t,n,U,se]);un(()=>{u===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,d(N=>({...N,isPositioned:!1})))},[u]);const K=S.useRef(!1);un(()=>(K.current=!0,()=>{K.current=!1}),[]),un(()=>{if(E&&(P.current=E),C&&(k.current=C),E&&C){if(I.current)return I.current(E,C,O);O()}},[E,C,O,I,V]);const xe=S.useMemo(()=>({reference:P,floating:k,setReference:b,setFloating:g}),[b,g]),de=S.useMemo(()=>({reference:E,floating:C}),[E,C]),_=S.useMemo(()=>{const N={position:n,left:0,top:0};if(!de.floating)return N;const J=ja(de.floating,c.x),w=ja(de.floating,c.y);return a?{...N,transform:"translate("+J+"px, "+w+"px)",...Aa(de.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:J,top:w}},[n,a,de.floating,c.x,c.y]);return S.useMemo(()=>({...c,update:O,refs:xe,elements:de,floatingStyles:_}),[c,O,xe,de,_])}const lm=(e,t)=>({...sm(e),options:[e,t]}),cm={...S};let Ra=!1,um=0;const Da=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+um++;function dm(){const[e,t]=S.useState(()=>Ra?Da():void 0);return Re(()=>{e==null&&t(Da())},[]),S.useEffect(()=>{Ra=!0},[]),e}const Ma=cm.useId||dm;let Ys;process.env.NODE_ENV!=="production"&&(Ys=new Set);function fm(){for(var e,t=arguments.length,n=new Array(t),s=0;s<t;s++)n[s]=arguments[s];const i="Floating UI: "+n.join(" ");if(!((e=Ys)!=null&&e.has(i))){var o;(o=Ys)==null||o.add(i),console.error(i)}}function hm(){const e=new Map;return{emit(t,n){var s;(s=e.get(t))==null||s.forEach(i=>i(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var s;(s=e.get(t))==null||s.delete(n)}}}const mm=S.createContext(null),pm=S.createContext(null),gm=()=>{var e;return((e=S.useContext(mm))==null?void 0:e.id)||null},ym=()=>S.useContext(pm);function Na(e){return"data-floating-ui-"+e}const Va={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},Ia=S.forwardRef(function(t,n){const[s,i]=S.useState();Re(()=>{kh()&&i("button")},[]);const o={ref:n,tabIndex:0,role:s,"aria-hidden":s?void 0:!0,[Na("focus-guard")]:"",style:Va};return f.jsx("span",{...t,...o})}),Oa=S.createContext(null),La=Na("portal");function vm(e){e===void 0&&(e={});const{id:t,root:n}=e,s=Ma(),i=xm(),[o,r]=S.useState(null),a=S.useRef(null);return Re(()=>()=>{o?.remove(),queueMicrotask(()=>{a.current=null})},[o]),Re(()=>{if(!s||a.current)return;const l=t?document.getElementById(t):null;if(!l)return;const u=document.createElement("div");u.id=s,u.setAttribute(La,""),l.appendChild(u),a.current=u,r(u)},[t,s]),Re(()=>{if(n===null||!s||a.current)return;let l=n||i?.portalNode;l&&!Vs(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=s,c.setAttribute(La,""),l=u||l,l.appendChild(c),a.current=c,r(c)},[t,n,s,i]),o}function Hs(e){const{children:t,id:n,root:s,preserveTabOrder:i=!0}=e,o=vm({id:n,root:s}),[r,a]=S.useState(null),l=S.useRef(null),u=S.useRef(null),c=S.useRef(null),d=S.useRef(null),h=r?.modal,m=r?.open,p=!!r&&!r.modal&&r.open&&i&&!!(s||o);return S.useEffect(()=>{if(!o||!i||h)return;function y(x){o&&Us(x)&&(x.type==="focusin"?ya:Oh)(o)}return o.addEventListener("focusin",y,!0),o.addEventListener("focusout",y,!0),()=>{o.removeEventListener("focusin",y,!0),o.removeEventListener("focusout",y,!0)}},[o,i,h]),S.useEffect(()=>{o&&(m||ya(o))},[m,o]),f.jsxs(Oa.Provider,{value:S.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:l,afterOutsideRef:u,beforeInsideRef:c,afterInsideRef:d,portalNode:o,setFocusManagerState:a}),[i,o]),children:[p&&o&&f.jsx(Ia,{"data-type":"outside",ref:l,onFocus:y=>{if(Us(y,o)){var x;(x=c.current)==null||x.focus()}else{const v=r?r.domReference:null,b=Ih(v);b?.focus()}}}),p&&o&&f.jsx("span",{"aria-owns":o.id,style:Va}),o&&si.createPortal(t,o),p&&o&&f.jsx(Ia,{"data-type":"outside",ref:u,onFocus:y=>{if(Us(y,o)){var x;(x=d.current)==null||x.focus()}else{const v=r?r.domReference:null,b=Vh(v);b?.focus(),r?.closeOnFocusOut&&r?.onOpenChange(!1,y.nativeEvent,"focus-out")}}})]})}const xm=()=>S.useContext(Oa);let fn=0;const Fa="--floating-ui-scrollbar-width";function bm(){const e=Eh(),t=/iP(hone|ad|od)|iOS/.test(e)||e==="MacIntel"&&navigator.maxTouchPoints>1,n=document.body.style,i=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",o=window.innerWidth-document.documentElement.clientWidth,r=n.left?parseFloat(n.left):window.scrollX,a=n.top?parseFloat(n.top):window.scrollY;if(n.overflow="hidden",n.setProperty(Fa,o+"px"),o&&(n[i]=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:-(r-Math.floor(c))+"px",right:"0"})}return()=>{Object.assign(n,{overflow:"",[i]:""}),n.removeProperty(Fa),t&&(Object.assign(n,{position:"",top:"",left:"",right:""}),window.scrollTo(r,a))}}let Ba=()=>{};const Gs=S.forwardRef(function(t,n){const{lockScroll:s=!1,...i}=t;return Re(()=>{if(s)return fn++,fn===1&&(Ba=bm()),()=>{fn--,fn===0&&Ba()}},[s]),f.jsx("div",{ref:n,...i,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...i.style}})});function wm(e){const{open:t=!1,onOpenChange:n,elements:s}=e,i=Ma(),o=S.useRef({}),[r]=S.useState(()=>hm()),a=gm()!=null;if(process.env.NODE_ENV!=="production"){const m=s.reference;m&&!H(m)&&fm("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]=S.useState(s.reference),c=Nh((m,p,y)=>{o.current.openEvent=m?p:void 0,r.emit("openchange",{open:m,event:p,reason:y,nested:a}),n?.(m,p,y)}),d=S.useMemo(()=>({setPositionReference:u}),[]),h=S.useMemo(()=>({reference:l||s.reference||null,floating:s.floating||null,domReference:s.reference}),[l,s.reference,s.floating]);return S.useMemo(()=>({dataRef:o,open:t,onOpenChange:c,elements:h,events:r,floatingId:i,refs:d}),[t,c,h,r,i,d])}function Tm(e){e===void 0&&(e={});const{nodeId:t}=e,n=wm({...e,elements:{reference:null,floating:null,...e.elements}}),s=e.rootContext||n,i=s.elements,[o,r]=S.useState(null),[a,l]=S.useState(null),c=i?.domReference||o,d=S.useRef(null),h=ym();Re(()=>{c&&(d.current=c)},[c]);const m=am({...e,elements:{...i,...a&&{reference:a}}}),p=S.useCallback(g=>{const E=H(g)?{getBoundingClientRect:()=>g.getBoundingClientRect(),getClientRects:()=>g.getClientRects(),contextElement:g}:g;l(E),m.refs.setReference(E)},[m.refs]),y=S.useCallback(g=>{(H(g)||g===null)&&(d.current=g,r(g)),(H(m.refs.reference.current)||m.refs.reference.current===null||g!==null&&!H(g))&&m.refs.setReference(g)},[m.refs]),x=S.useMemo(()=>({...m.refs,setReference:y,setPositionReference:p,domReference:d}),[m.refs,y,p]),v=S.useMemo(()=>({...m.elements,domReference:c}),[m.elements,c]),b=S.useMemo(()=>({...m,...s,refs:x,elements:v,nodeId:t}),[m,x,v,t,s]);return Re(()=>{s.dataRef.current.floatingContext=b;const g=h?.nodesRef.current.find(E=>E.id===t);g&&(g.context=b)}),S.useMemo(()=>({...m,context:b,refs:x,elements:v}),[m,x,v,b])}const Sm={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"},_a=S.memo(({open:e,children:t,className:n,onOutsideClick:s,floatingStyles:i,setFloating:o,placement:r})=>f.jsx(Hs,{children:f.jsx(Ut,{children:e&&f.jsxs(f.Fragment,{children:[s&&f.jsx(Gs,{onClick:s}),f.jsx("div",{ref:o,style:i,className:"z-50",children:f.jsx(Fe.div,{className:n,style:{transformOrigin:Sm[r]},initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.1,ease:"easeInOut"},children:t})})]})})})),ot=e=>{const{placement:t="bottom",onOutsideClick:n,fullWidth:s,minWidth:i,maxWidth:o}=e,r=S.useMemo(()=>[lm({apply({rects:d,elements:h}){s&&(h.floating.style.width=`${d.reference.width}px`),i&&(h.floating.style.minWidth=`${i}px`),o&&(h.floating.style.maxWidth=`${o}px`)}})],[s,o,i]),{refs:a,floatingStyles:l}=Tm({placement:t,middleware:r,whileElementsMounted:nm}),u=S.useRef({onOutsideClick:n,floatingStyles:l,setFloating:a.setFloating,placement:t});u.current={onOutsideClick:n,floatingStyles:l,setFloating:a.setFloating,placement:t};const c=S.useMemo(()=>{const d=h=>{const{floatingStyles:m,setFloating:p,onOutsideClick:y,placement:x}=u.current,{className:v,open:b,children:g}=h;return f.jsx(_a,{open:b,className:v,onOutsideClick:y,floatingStyles:m,setFloating:p,placement:x,children:g})};return S.memo(d)},[]);return{anchorRef:a.setReference,Popover:c}},Cm="flex flex-col dropdown-panel border mt-1 rounded-xl shadow-lg overflow-y-auto relative space-y-1",Pm={sm:"p-2",md:"p-3",lg:"p-4"},at=e=>{const{className:t,children:n,padding:s="md",...i}=e;return f.jsx("div",{className:M(Cm,Pm[s],t),...i,children:n})},Mt=(e,t)=>{T.useEffect(()=>{if(!e)return;const n=s=>{s.key==="Escape"&&t()};return document.addEventListener("keydown",n),()=>{document.removeEventListener("keydown",n)}},[e,t])},$a=e=>{const{className:t,label:n,description:s,options:i,onChange:o,value:r,placeholder:a,maxHeight:l=300,error:u}=e,[c,d]=T.useState(!1),h=S.useRef(null),m=i?.find(x=>x.value===r);Mt(c,()=>d(!1)),T.useEffect(()=>{c&&h.current?.focus({preventScroll:!0})},[c]);const{anchorRef:p,Popover:y}=ot({placement:"bottom",fullWidth:!0,onOutsideClick:()=>d(!1)});return f.jsxs("div",{className:M("flex flex-col",t),children:[f.jsx(Be,{children:n}),f.jsxs("div",{className:"relative flex w-full flex-col",ref:p,children:[f.jsxs("div",{ref:h,role:"button",tabIndex:0,className:M("flex flex-row items-center h-12 pl-4 pr-10 border select-trigger transition-all duration-150 rounded-xl shadow-sm ring-0 focus:ring-4 focus:outline-none select-none",u&&"select-trigger-error !pr-10",c&&"ring-4"),onKeyDown:x=>x.key===" "&&d(v=>!v),onClick:()=>d(!c),children:[m&&f.jsx("span",{children:m.label}),!m&&a&&f.jsx("span",{className:"select-placeholder",children:a})]}),f.jsxs($e,{children:[u&&f.jsx(_e,{}),!!r&&f.jsx(Ce,{Icon:nt,onClick:()=>o(null)}),f.jsx(Ce,{Icon:Qt})]}),f.jsx(y,{open:c,children:f.jsx(at,{className:"!p-0",style:{maxHeight:l},children:f.jsx("div",{className:"flex flex-col p-2 gap-1",children:i.map(x=>{const v=x.value===r;return f.jsx(kt,{onClick:()=>{!x.disabled&&o&&(o(x.value),d(!1))},selected:v,disabled:x.disabled,children:x.label},String(x.value))})})})})]}),f.jsx(me,{children:s}),f.jsx(pe,{children:u})]})},Em=e=>{const{className:t,label:n,description:s,options:i,onChange:o,onSearch:r,value:a,placeholder:l,maxHeight:u=300,error:c}=e,[d,h]=T.useState(!1),[m,p]=T.useState(i),[y,x]=T.useState(""),v=S.useRef(null),b=S.useRef(null),g=i?.find(P=>P.value===a);Mt(d,()=>h(!1)),T.useEffect(()=>{p(r(y))},[y,i,r]),T.useEffect(()=>{d&&setTimeout(()=>b.current?.focus(),100)},[d]);const{anchorRef:E,Popover:C}=ot({placement:"bottom",fullWidth:!0,onOutsideClick:()=>h(!1)});return f.jsxs("div",{className:M("flex flex-col",t),children:[f.jsx(Be,{children:n}),f.jsxs("div",{className:"relative flex w-full flex-col",ref:E,children:[f.jsxs("div",{ref:v,role:"button",tabIndex:0,className:M("flex flex-row items-center h-12 pl-4 pr-10 border select-trigger transition-all duration-150 rounded-xl shadow-sm ring-0 focus:ring-4 focus:outline-none select-none",c&&"select-trigger-error !pr-10",d&&"ring-4"),onKeyDown:P=>P.key===" "&&h(k=>!k),onClick:()=>h(!d),children:[g&&f.jsx("span",{children:g.label}),!g&&l&&f.jsx("span",{className:"select-placeholder",children:l})]}),f.jsxs($e,{children:[c&&f.jsx(_e,{}),!!a&&f.jsx(Ce,{Icon:nt,onClick:()=>o(null)}),f.jsx(Ce,{Icon:Qt})]}),f.jsx(C,{open:d,children:f.jsxs(at,{className:"gap-0 !p-0",style:{maxHeight:u},children:[f.jsxs("div",{className:"sticky top-0 border-b select-search-bar py-1 backdrop-blur-sm",children:[f.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:P=>x(P.target.value)}),f.jsx(Ms,{className:"absolute select-search-icon left-4 top-4 h-4 w-4"})]}),f.jsxs("div",{className:"flex flex-col gap-1 p-2",children:[y!==""&&f.jsxs(f.Fragment,{children:[m.length===0&&f.jsx("div",{className:"flex flex-col items-center justify-center py-6",children:f.jsx(sa,{className:"h-6 w-6 text-[var(--color-input-text)]"})}),m.map(P=>{const k=P.value===a;return f.jsx(kt,{onClick:()=>{!P.disabled&&o&&(o(P.value),h(!1))},selected:k,disabled:P.disabled,children:P.label},String(P.value))})]}),y===""&&f.jsx(f.Fragment,{children:i.map(P=>{const k=P.value===a;return f.jsx(kt,{onClick:()=>{!P.disabled&&o&&(o(P.value),h(!1))},selected:k,disabled:P.disabled,children:P.label},String(P.value))})})]})]})})]}),f.jsx(me,{children:s}),f.jsx(pe,{children:c})]})},km=(e,t)=>{const[n,s]=T.useState(e);return T.useEffect(()=>{const i=setTimeout(()=>{s(e)},t);return()=>{clearTimeout(i)}},[e,t]),n},Am=e=>{const{className:t,label:n,description:s,onChange:i,fetchOptionsByQuery:o,fetchOptionByValue:r,onSearchDebounceMs:a=300,value:l,placeholder:u,maxHeight:c=300,error:d}=e,[h,m]=T.useState(!1),p=S.useRef(null),[y,x]=T.useState(""),[v,b]=T.useState([]),[g,E]=T.useState(null),C=S.useRef(null),[P,k]=T.useState(!1),[A,V]=T.useState(!1);Mt(h,()=>m(!1));const I=km(y,a);T.useEffect(()=>{(async()=>{k(!0);const K=await o(I);b(K),k(!1)})()},[I,o]),T.useEffect(()=>{if(l==null){E(null);return}const O=v?.find(K=>K.value===l);O?E(O):(async()=>{V(!0);const xe=await r(l);E(xe),V(!1)})()},[r,v,l]),T.useEffect(()=>{h&&setTimeout(()=>C.current?.focus(),100)},[h]);const{anchorRef:U,Popover:se}=ot({placement:"bottom",fullWidth:!0,onOutsideClick:()=>m(!1)});return f.jsxs("div",{className:M("flex flex-col",t),children:[f.jsx(Be,{children:n}),f.jsxs("div",{className:"relative flex w-full flex-col",ref:U,children:[f.jsxs("div",{ref:p,role:"button",tabIndex:0,className:M("flex flex-row items-center h-12 pl-4 pr-10 border select-trigger transition-all duration-150 rounded-xl shadow-sm ring-0 focus:ring-4 focus:outline-none select-none",d&&"select-trigger-error !pr-10",h&&"ring-4"),onKeyDown:O=>O.key===" "&&m(K=>!K),onClick:()=>m(!h),children:[!A&&g&&f.jsx("span",{children:g.label}),!A&&!g&&u&&f.jsx("span",{className:"select-placeholder",children:u}),A&&f.jsx(Jt,{className:"h-4 w-4 text-[var(--color-input-text)]"})]}),f.jsxs($e,{children:[d&&f.jsx(_e,{}),!!l&&f.jsx(Ce,{Icon:nt,onClick:()=>i(null)}),f.jsx(Ce,{Icon:Qt})]}),f.jsx(se,{open:h,children:f.jsxs(at,{className:"gap-0 !p-0",style:{maxHeight:c},children:[f.jsxs("div",{className:"sticky top-0 border-b select-search-bar py-1 backdrop-blur-sm",children:[f.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:O=>x(O.target.value)}),f.jsx(Ms,{className:"absolute select-search-icon left-4 top-4 h-4 w-4"})]}),f.jsxs("div",{className:"flex flex-col gap-1 p-2",children:[!P&&v.length===0&&f.jsx("div",{className:"flex flex-col items-center justify-center py-6",children:f.jsx(sa,{className:"h-6 w-6 text-[var(--color-input-text)]"})}),P&&f.jsx("div",{className:"flex flex-col items-center justify-center py-6",children:f.jsx(Jt,{className:"h-6 w-6 text-[var(--color-input-text)]"})}),!P&&f.jsx(f.Fragment,{children:v.map(O=>{const K=O.value===l;return f.jsx(kt,{onClick:()=>{!O.disabled&&i&&(i(O.value),m(!1))},selected:K,disabled:O.disabled,children:O.label},String(O.value))})})]})]})})]}),f.jsx(me,{children:s}),f.jsx(pe,{children:d})]})},jm=S.forwardRef((e,t)=>{const{className:n,children:s,...i}=e;return f.jsx("div",{ref:t,className:M("flex flex-col gap-6 border panel-base rounded-2xl shadow-sm px-6 py-6",n),...i,children:s})}),Rm=e=>{const{className:t,vertical:n=!1,...s}=e;return f.jsx("div",{className:M(n?"w-px h-full bg-[var(--color-divider)]":"w-full h-px bg-[var(--color-divider)]",t),...s})},Dm=e=>{const{children:t,content:n,className:s,placement:i="top",minWidth:o=100,maxWidth:r=200}=e,[a,l]=T.useState(!1),{anchorRef:u,Popover:c}=ot({placement:i,minWidth:o,maxWidth:r});return f.jsxs("span",{ref:u,className:s,onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:[t,f.jsx(c,{open:a,children:f.jsx(at,{children:n})})]})},Mm=e=>{const{open:t,onDismiss:n,enableDismissOnOutsideClick:s,enableDismissOnEscKey:i,enableDismissButton:o,className:r,children:a,maxWidth:l=600}=e;return Mt(!!i&&t,n||(()=>{})),f.jsx(Ut,{children:t&&f.jsxs(Hs,{children:[f.jsx(Fe.div,{style:{transformOrigin:"center"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15,ease:"easeInOut"},children:f.jsx(Gs,{className:"modal-overlay backdrop-blur-[1px] z-10",onClick:s?n:void 0,lockScroll:!0})}),f.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:f.jsxs(Fe.div,{className:M("flex flex-col modal-content rounded-2xl shadow-xl p-6 lg:p-12 pointer-events-auto w-full relative",r),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&&f.jsx(Ds,{Icon:nt,className:"absolute top-4 right-4",variant:"transparent",size:"sm",onClick:n}),a]})})]})})},Nm=e=>{const{open:t,onDismiss:n,enableDismissOnOutsideClick:s,enableDismissOnEscKey:i,enableDismissButton:o,className:r,children:a,maxWidth:l=480}=e;return Mt(!!i&&t,n||(()=>{})),f.jsx(Ut,{children:t&&f.jsxs(Hs,{children:[f.jsx(Fe.div,{style:{transformOrigin:"center"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15,ease:"easeInOut"},children:f.jsx(Gs,{className:"modal-overlay backdrop-blur-[1px] z-10",onClick:s?n:void 0,lockScroll:!0})}),f.jsx("div",{className:"fixed inset-0 flex flex-row justify-end pointer-events-none z-20",children:f.jsxs(Fe.div,{className:M("flex flex-col modal-content shadow-xl p-6 lg:p-12 pointer-events-auto h-full w-full overflow-y-auto relative",r),style:{maxWidth:l},initial:{translateX:"100%"},animate:{translateX:0},exit:{translateX:"100%"},transition:{duration:.25,ease:[.32,.72,0,1]},children:[o&&f.jsx(Ds,{Icon:nt,className:"absolute top-4 right-4",variant:"transparent",size:"sm",onClick:n}),a]})})]})})},Wa={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)]"},qs=S.forwardRef((e,t)=>{const{className:n,children:s,onClick:i,showCloseIcon:o,Icon:r,color:a="gray"}=e,l=M("inline-flex align-top items-center gap-2 px-3 h-7 rounded-lg font-semibold",Wa[a],n);return i?f.jsx("div",{ref:t,children:f.jsxs("button",{className:M("cursor-pointer ring-0 hover:ring-4 active:ring-1 transition-all duration-100 select-none focus:outline-none focus:ring-4",l),onClick:i,children:[r&&f.jsx(r,{className:"h-4 w-4 shrink-0"}),f.jsx("div",{className:"break-all line-clamp-1 text-left",children:s}),o&&f.jsx(nt,{className:"h-4 w-4 shrink-0"})]})}):f.jsxs("div",{className:l,ref:t,children:[r&&f.jsx(r,{className:"h-4 w-4 shrink-0"}),f.jsx("div",{className:"break-all line-clamp-1 text-left",children:s})]})}),Ua=e=>{const{className:t,tabs:n}=e;return f.jsx("div",{className:M("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((s,i)=>{const o=M("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",s.active&&"tab-button-active shadow-sm");return s.href?f.jsxs("a",{href:s.href,className:o,children:[s.Icon&&f.jsx(s.Icon,{className:"h-5 w-5 shrink-0 mr-2 -ml-1"}),s.label]},i):f.jsxs("button",{className:o,onClick:s.onClick,children:[s.Icon&&f.jsx(s.Icon,{className:"h-5 w-5 shrink-0 mr-2 -ml-1"}),s.label]},i)})})},za=T.createContext(void 0),Vm=()=>({dismiss:T.useContext(za)||(()=>{})}),Im="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",ee=S.forwardRef((e,t)=>{const{className:n,children:s,Icon:i,onClick:o,dismissOnClick:r=!0,...a}=e,{dismiss:l}=Vm(),u=c=>{o&&o(c),r&&l()};return f.jsxs("button",{ref:t,className:M(Im,n),onClick:u,...a,children:[i&&f.jsx(i,{className:"h-5 w-5"}),s]})}),Zs=e=>{const{label:t,children:n,className:s}=e;return f.jsxs("div",{className:M("flex flex-col dropdown-button-group",s),children:[t&&f.jsx("div",{className:"mb-2 text-sm dropdown-group-label font-semibold px-3",children:t}),n]})},Js=e=>{const{trigger:t,children:n,placement:s="bottom-end",minWidth:i=200,className:o}=e,[r,a]=T.useState(!1),{Popover:l,anchorRef:u}=ot({placement:s,onOutsideClick:()=>a(!1),minWidth:i});return f.jsxs(f.Fragment,{children:[f.jsx("div",{ref:u,className:o,onClick:()=>a(!r),children:t}),f.jsx(l,{open:r,children:f.jsx(at,{padding:"sm",children:f.jsx(za.Provider,{value:()=>a(!1),children:n})})})]})};function Om(e){const{onDelta:t,onDragStart:n,onDragEnd:s,disabled:i=!1,primaryButtonOnly:o=!0,preventScrollOnMove:r=!0}=e,[a,l]=S.useState(!1),u=S.useRef(0),c=S.useRef(0),d=S.useRef(0),h=S.useRef(null),m=S.useRef(null),p=S.useCallback(g=>{if(!a)return;const E={clientX:g??c.current,startX:u.current,totalDeltaX:d.current,target:h.current};l(!1),window.removeEventListener("pointermove",x,{capture:!0}),window.removeEventListener("pointerup",v,{capture:!0}),window.removeEventListener("pointercancel",v,{capture:!0}),window.removeEventListener("keydown",y,!0),m.current!=null&&(cancelAnimationFrame(m.current),m.current=null),s?.(E),h.current=null,d.current=0},[a,s]),y=S.useCallback(g=>{g.key==="Escape"&&(g.preventDefault(),p())},[p]),x=S.useCallback(g=>{if(!a)return;const E=()=>{const C=g.clientX,P=C-c.current;if(P!==0){c.current=C,d.current+=P;const k={clientX:C,startX:u.current,totalDeltaX:d.current,target:h.current};r&&g.preventDefault(),t(P,k)}m.current=null};m.current==null&&(m.current=requestAnimationFrame(E))},[a,t,r]),v=S.useCallback(g=>{p(g.clientX)},[p]),b=S.useCallback(g=>{if(i||o&&g.button!==0)return;g.target.setPointerCapture?.(g.pointerId),u.current=g.clientX,c.current=g.clientX,d.current=0,h.current=g.target,l(!0);const E={clientX:g.clientX,startX:g.clientX,totalDeltaX:0,target:g.target};n?.(E),window.addEventListener("pointermove",x,{passive:!r,capture:!0}),window.addEventListener("pointerup",v,{capture:!0}),window.addEventListener("pointercancel",v,{capture:!0}),window.addEventListener("keydown",y,!0)},[i,n,y,x,v,o,r]);return S.useEffect(()=>()=>{a&&p()},[a]),{isDragging:a,bind:{onPointerDown:b,role:"separator",style:{touchAction:"none",cursor:"col-resize",userSelect:"none"}}}}const Lm=e=>{const{column:t}=e,n=t?.defaultWidth??250,{bind:s}=Om({onDelta:i=>console.log(i),onDragStart:()=>{},onDragEnd:()=>{}});return f.jsxs("div",{style:{width:n,height:44},className:"flex flex-row items-stretch select-none",children:[f.jsx("div",{className:"flex-1 content-center px-4 relative cursor-pointer table-header-cell transition-colors duration-100",children:t.header}),f.jsx("div",{...s,className:"cursor-ew-resize group py-4 table-resize-handle w-[8px]",children:f.jsx("div",{className:"w-0.5 h-full mx-auto table-resize-divider table-resize-divider-hover pointer-events-none"})})]})},Fm=e=>{const{columns:t,rows:n,className:s}=e,i=S.useRef(null),o=r=>{i.current&&i.current.scrollTo({left:r.currentTarget.scrollLeft})};return f.jsxs("div",{className:s,children:[f.jsx("div",{className:"relative h-[45px] w-full overflow-hidden",ref:i,children:f.jsx("div",{className:"absolute",children:f.jsx("div",{className:"font-medium flex flex-row table-header",children:t.map(r=>f.jsx(Lm,{column:r},r.id))})})}),f.jsx("div",{className:"relative overflow-scroll min-w-full min-h-full",onScroll:o,children:f.jsx("div",{className:"absolute",children:f.jsx("div",{className:"flex flex-col",children:n.map(r=>f.jsx("div",{className:"flex flex-row table-row transition-all duration-100",children:t.map(a=>f.jsx("div",{className:"flex-1 content-center px-4",style:{height:44,width:250},children:a.renderCell(r)},a.id))},JSON.stringify(r)))})})})]})},Bm=()=>f.jsx("div",{}),_m=[{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"}],$m=[{id:"id",header:"ID",renderCell:e=>e.id},{id:"email",header:"Email",renderCell:e=>f.jsx(qs,{Icon:_f,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:()=>f.jsx(Um,{})}],Wm=()=>f.jsxs("div",{className:"flex flex-col gap-6",children:[f.jsxs("div",{className:"flex flex-row items-center justify-start gap-3",children:[f.jsx(Ns,{Icon:Ms,placeholder:"Search..."}),f.jsx(Rs,{Icon:ia}),f.jsx(ea,{Icon:na,children:"New"}),f.jsxs(Js,{trigger:f.jsx(Rs,{Icon:ia}),children:[f.jsx(ee,{dismissOnClick:!1,Icon:na,children:"Add new"}),f.jsx(ee,{Icon:Ff,children:"Remove"}),f.jsxs(Zs,{label:"Test",className:"mt-2",children:[f.jsx(ee,{children:"Item 1"}),f.jsx(ee,{children:"Item 2"}),f.jsx(ee,{children:"Item 3"}),f.jsx(ee,{children:"Item 4"})]}),f.jsxs(Zs,{label:"Test",className:"mt-2",children:[f.jsx(ee,{children:"Item 1"}),f.jsx(ee,{children:"Item 2"}),f.jsx(ee,{children:"Item 3"}),f.jsx(ee,{children:"Item 4"})]})]}),f.jsx(Ua,{tabs:[{label:"Tab 1",Icon:ta,active:!0,onClick:()=>{}},{label:"Tab 2",active:!1,onClick:()=>{}},{label:"Tab 3",Icon:ta,active:!1,onClick:()=>{}}]})]}),f.jsx($a,{options:[{label:"Option 1",value:1},{label:"Option 2",value:2},{label:"Option 3",value:3}],value:null,onChange:()=>{}}),f.jsx(Fm,{className:"h-[300px] w-[300px]",columns:$m,rows:_m}),f.jsx(Bm,{})]}),Um=()=>f.jsx(f.Fragment,{children:f.jsxs(Js,{placement:"bottom-end",className:"inline-block",trigger:f.jsx(qs,{onClick:()=>{},children:"Test"}),children:[f.jsx(ee,{children:"Option 1"}),f.jsx(ee,{children:"Option 2"}),f.jsx(ee,{children:"Option 3"})]})});R.Badge=qs,R.BadgeColor=Wa,R.Button=ea,R.ButtonIconRound=Ds,R.ButtonIconSquare=Rs,R.Divider=Rm,R.DropdownButton=ee,R.DropdownButtonGroup=Zs,R.DropdownMenu=Js,R.DropdownPanel=at,R.Input=Ns,R.InputCheck=Kf,R.InputDescription=me,R.InputError=pe,R.InputErrorIcon=_e,R.InputIconButton=Ce,R.InputIconButtonTray=$e,R.InputLabel=Be,R.InputPassword=$f,R.InputRadio=Uf,R.InputSelect=$a,R.InputSelectNative=Xf,R.InputSelectOption=kt,R.InputSelectSearchable=Em,R.InputSelectSearchableAsync=Am,R.InputTextArea=Wf,R.InputToggle=zf,R.Modal=Mm,R.Panel=jm,R.PopoverBase=_a,R.SidebarModal=Nm,R.Spinner=Jt,R.TabButtons=Ua,R.Test=Wm,R.Tooltip=Dm,R.usePopover=ot,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})}));
129
+ */var Th=["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])"],Ys=Th.join(","),ya=typeof Element>"u",Bt=ya?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,mn=!ya&&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},pn=function e(t,n){var s;n===void 0&&(n=!0);var i=t==null||(s=t.getAttribute)===null||s===void 0?void 0:s.call(t,"inert"),o=i===""||i==="true",r=o||n&&t&&e(t.parentNode);return r},Sh=function(t){var n,s=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return s===""||s==="true"},Ch=function(t,n,s){if(pn(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(Ys));return n&&Bt.call(t,Ys)&&i.unshift(t),i=i.filter(s),i},Ph=function e(t,n,s){for(var i=[],o=Array.from(t);o.length;){var r=o.shift();if(!pn(r,!1))if(r.tagName==="SLOT"){var a=r.assignedElements(),l=a.length?a:r.children,u=e(l,!0,s);s.flatten?i.push.apply(i,u):i.push({scopeParent:r,candidates:u})}else{var c=Bt.call(r,Ys);c&&s.filter(r)&&(n||!t.includes(r))&&i.push(r);var d=r.shadowRoot||typeof s.getShadowRoot=="function"&&s.getShadowRoot(r),h=!pn(d,!1)&&(!s.shadowRootFilter||s.shadowRootFilter(r));if(d&&h){var m=e(d===!0?r.children:d.children,!0,s);s.flatten?i.push.apply(i,m):i.push({scopeParent:r,candidates:m})}else o.unshift.apply(o,r.children)}}return i},va=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},xa=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||Sh(t))&&!va(t)?0:t.tabIndex},kh=function(t,n){var s=xa(t);return s<0&&n&&!va(t)?0:s},Eh=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},ba=function(t){return t.tagName==="INPUT"},Ah=function(t){return ba(t)&&t.type==="hidden"},jh=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(s){return s.tagName==="SUMMARY"});return n},Rh=function(t,n){for(var s=0;s<t.length;s++)if(t[s].checked&&t[s].form===n)return t[s]},Dh=function(t){if(!t.name)return!0;var n=t.form||mn(t),s=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=s(window.CSS.escape(t.name));else try{i=s(t.name)}catch(r){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",r.message),!1}var o=Rh(i,t.form);return!o||o===t},Mh=function(t){return ba(t)&&t.type==="radio"},Nh=function(t){return Mh(t)&&!Dh(t)},Vh=function(t){var n,s=t&&mn(t),i=(n=s)===null||n===void 0?void 0:n.host,o=!1;if(s&&s!==t){var r,a,l;for(o=!!((r=i)!==null&&r!==void 0&&(a=r.ownerDocument)!==null&&a!==void 0&&a.contains(i)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!o&&i;){var u,c,d;s=mn(i),i=(u=s)===null||u===void 0?void 0:u.host,o=!!((c=i)!==null&&c!==void 0&&(d=c.ownerDocument)!==null&&d!==void 0&&d.contains(i))}}return o},wa=function(t){var n=t.getBoundingClientRect(),s=n.width,i=n.height;return s===0&&i===0},Ih=function(t,n){var s=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var o=Bt.call(t,"details>summary:first-of-type"),r=o?t.parentElement:t;if(Bt.call(r,"details:not([open]) *"))return!0;if(!s||s==="full"||s==="legacy-full"){if(typeof i=="function"){for(var a=t;t;){var l=t.parentElement,u=mn(t);if(l&&!l.shadowRoot&&i(l)===!0)return wa(t);t.assignedSlot?t=t.assignedSlot:!l&&u!==t.ownerDocument?t=u.host:t=l}t=a}if(Vh(t))return!t.getClientRects().length;if(s!=="legacy-full")return!0}else if(s==="non-zero-area")return wa(t);return!1},Oh=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var s=0;s<n.children.length;s++){var i=n.children.item(s);if(i.tagName==="LEGEND")return Bt.call(n,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}n=n.parentElement}return!1},Lh=function(t,n){return!(n.disabled||pn(n)||Ah(n)||Ih(n,t)||jh(n)||Oh(n))},Ta=function(t,n){return!(Nh(n)||xa(n)<0||!Lh(t,n))},Fh=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Bh=function e(t){var n=[],s=[];return t.forEach(function(i,o){var r=!!i.scopeParent,a=r?i.scopeParent:i,l=kh(a,r),u=r?e(i.candidates):a;l===0?r?n.push.apply(n,u):n.push(a):s.push({documentOrder:o,tabIndex:l,item:i,isScope:r,content:u})}),s.sort(Eh).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(n)},Sa=function(t,n){n=n||{};var s;return n.getShadowRoot?s=Ph([t],n.includeContainer,{filter:Ta.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Fh}):s=Ch(t,n.includeContainer,Ta.bind(null,n)),Bh(s)};function _h(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function zh(){return/apple/i.test(navigator.vendor)}function Wh(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 $h(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Ws(n)){let s=t;for(;s;){if(e===s)return!0;s=s.parentNode||s.host}}return!1}function Gs(e){return e?.ownerDocument||document}var Uh=typeof document<"u",Kh=function(){},Re=Uh?T.useLayoutEffect:Kh;const Xh={...C}.useInsertionEffect||(e=>e());function Hh(e){const t=C.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Xh(()=>{t.current=e}),C.useCallback(function(){for(var n=arguments.length,s=new Array(n),i=0;i<n;i++)s[i]=arguments[i];return t.current==null?void 0:t.current(...s)},[])}const Ca=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Pa(e,t){const n=Sa(e,Ca()),s=n.length;if(s===0)return;const i=Wh(Gs(e)),o=n.indexOf(i),r=o===-1?t===1?0:s-1:o+t;return n[r]}function Yh(e){return Pa(Gs(e).body,1)||e}function Gh(e){return Pa(Gs(e).body,-1)||e}function qs(e,t){const n=t||e.currentTarget,s=e.relatedTarget;return!s||!$h(n,s)}function qh(e){Sa(e,Ca()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function ka(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const s=n.dataset.tabindex;delete n.dataset.tabindex,s?n.setAttribute("tabindex",s):n.removeAttribute("tabindex")})}function Ea(e,t,n){let{reference:s,floating:i}=e;const o=Hs(t),r=xh(t),a=yh(r),l=Xs(t),u=o==="y",c=s.x+s.width/2-i.width/2,d=s.y+s.height/2-i.height/2,h=s[a]/2-i[a]/2;let m;switch(l){case"top":m={x:c,y:s.y-i.height};break;case"bottom":m={x:c,y:s.y+s.height};break;case"right":m={x:s.x+s.width,y:d};break;case"left":m={x:s.x-i.width,y:d};break;default:m={x:s.x,y:s.y}}switch(ga(t)){case"start":m[r]-=h*(n&&u?-1:1);break;case"end":m[r]+=h*(n&&u?-1:1);break}return m}const Zh=async(e,t,n)=>{const{placement:s="bottom",strategy:i="absolute",middleware:o=[],platform:r}=n,a=o.filter(Boolean),l=await(r.isRTL==null?void 0:r.isRTL(t));let u=await r.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=Ea(u,s,l),h=s,m={},g=0;for(let v=0;v<a.length;v++){const{name:b,fn:p}=a[v],{x,y,data:P,reset:S}=await p({x:c,y:d,initialPlacement:s,placement:h,strategy:i,middlewareData:m,rects:u,platform:r,elements:{reference:e,floating:t}});c=x??c,d=y??d,m={...m,[b]:{...m[b],...P}},S&&g<=50&&(g++,typeof S=="object"&&(S.placement&&(h=S.placement),S.rects&&(u=S.rects===!0?await r.getElementRects({reference:e,floating:t,strategy:i}):S.rects),{x:c,y:d}=Ea(u,h,l)),v=-1)}return{x:c,y:d,placement:h,strategy:i,middlewareData:m}};async function Jh(e,t){var n;t===void 0&&(t={});const{x:s,y:i,platform:o,rects:r,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:h=!1,padding:m=0}=pa(t,e),g=wh(m),b=a[h?d==="floating"?"reference":"floating":d],p=hn(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})),x=d==="floating"?{x:s,y:i,width:r.floating.width,height:r.floating.height}:r.reference,y=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),P=await(o.isElement==null?void 0:o.isElement(y))?await(o.getScale==null?void 0:o.getScale(y))||{x:1,y:1}:{x:1,y:1},S=hn(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:x,offsetParent:y,strategy:l}):x);return{top:(p.top-S.top+g.top)/P.y,bottom:(S.bottom-p.bottom+g.bottom)/P.y,left:(p.left-S.left+g.left)/P.x,right:(S.right-p.right+g.right)/P.x}}const Qh=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,s;const{placement:i,rects:o,platform:r,elements:a}=t,{apply:l=()=>{},...u}=pa(e,t),c=await Jh(t,u),d=Xs(i),h=ga(i),m=Hs(i)==="y",{width:g,height:v}=o.floating;let b,p;d==="top"||d==="bottom"?(b=d,p=h===(await(r.isRTL==null?void 0:r.isRTL(a.floating))?"start":"end")?"left":"right"):(p=d,b=h==="end"?"top":"bottom");const x=v-c.top-c.bottom,y=g-c.left-c.right,P=Ft(v-c[b],x),S=Ft(g-c[p],y),A=!t.middlewareData.shift;let k=P,E=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(E=y),(s=t.middlewareData.shift)!=null&&s.enabled.y&&(k=x),A&&!h){const V=ce(c.left,0),F=ce(c.right,0),ie=ce(c.top,0),ne=ce(c.bottom,0);m?E=g-2*(V!==0||F!==0?V+F:ce(c.left,c.right)):k=v-2*(ie!==0||ne!==0?ie+ne:ce(c.top,c.bottom))}await l({...t,availableWidth:E,availableHeight:k});const N=await r.getDimensions(a.floating);return g!==N.width||v!==N.height?{reset:{rects:!0}}:{}}}};function Aa(e){const t=fe(e);let n=parseFloat(t.width)||0,s=parseFloat(t.height)||0;const i=ve(e),o=i?e.offsetWidth:n,r=i?e.offsetHeight:s,a=dn(n)!==o||dn(s)!==r;return a&&(n=o,s=r),{width:n,height:s,$:a}}function Zs(e){return Y(e)?e:e.contextElement}function ut(e){const t=Zs(e);if(!ve(t))return xe(1);const n=t.getBoundingClientRect(),{width:s,height:i,$:o}=Aa(t);let r=(o?dn(n.width):n.width)/s,a=(o?dn(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}const em=xe(0);function ja(e){const t=se(e);return!Us()||!t.visualViewport?em:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function tm(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==se(e)?!1:t}function Ue(e,t,n,s){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=Zs(e);let r=xe(1);t&&(s?Y(s)&&(r=ut(s)):r=ut(e));const a=tm(o,n,s)?ja(o):xe(0);let l=(i.left+a.x)/r.x,u=(i.top+a.y)/r.y,c=i.width/r.x,d=i.height/r.y;if(o){const h=se(o),m=s&&Y(s)?se(s):s;let g=h,v=Ks(g);for(;v&&s&&m!==g;){const b=ut(v),p=v.getBoundingClientRect(),x=fe(v),y=p.left+(v.clientLeft+parseFloat(x.paddingLeft))*b.x,P=p.top+(v.clientTop+parseFloat(x.paddingTop))*b.y;l*=b.x,u*=b.y,c*=b.x,d*=b.y,l+=y,u+=P,g=se(v),v=Ks(g)}}return hn({width:c,height:d,x:l,y:u})}function gn(e,t){const n=un(e).scrollLeft;return t?t.left+n:Ue(ye(e)).left+n}function Ra(e,t){const n=e.getBoundingClientRect(),s=n.left+t.scrollLeft-gn(e,n),i=n.top+t.scrollTop;return{x:s,y:i}}function nm(e){let{elements:t,rect:n,offsetParent:s,strategy:i}=e;const o=i==="fixed",r=ye(s),a=t?cn(t.floating):!1;if(s===r||a&&o)return n;let l={scrollLeft:0,scrollTop:0},u=xe(1);const c=xe(0),d=ve(s);if((d||!d&&!o)&&((lt(s)!=="body"||Ot(r))&&(l=un(s)),ve(s))){const m=Ue(s);u=ut(s),c.x=m.x+s.clientLeft,c.y=m.y+s.clientTop}const h=r&&!d&&!o?Ra(r,l):xe(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+h.x,y:n.y*u.y-l.scrollTop*u.y+c.y+h.y}}function sm(e){return Array.from(e.getClientRects())}function im(e){const t=ye(e),n=un(e),s=e.ownerDocument.body,i=ce(t.scrollWidth,t.clientWidth,s.scrollWidth,s.clientWidth),o=ce(t.scrollHeight,t.clientHeight,s.scrollHeight,s.clientHeight);let r=-n.scrollLeft+gn(e);const a=-n.scrollTop;return fe(s).direction==="rtl"&&(r+=ce(t.clientWidth,s.clientWidth)-i),{width:i,height:o,x:r,y:a}}const Da=25;function rm(e,t){const n=se(e),s=ye(e),i=n.visualViewport;let o=s.clientWidth,r=s.clientHeight,a=0,l=0;if(i){o=i.width,r=i.height;const c=Us();(!c||c&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}const u=gn(s);if(u<=0){const c=s.ownerDocument,d=c.body,h=getComputedStyle(d),m=c.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,g=Math.abs(s.clientWidth-d.clientWidth-m);g<=Da&&(o-=g)}else u<=Da&&(o+=u);return{width:o,height:r,x:a,y:l}}const om=new Set(["absolute","fixed"]);function am(e,t){const n=Ue(e,!0,t==="fixed"),s=n.top+e.clientTop,i=n.left+e.clientLeft,o=ve(e)?ut(e):xe(1),r=e.clientWidth*o.x,a=e.clientHeight*o.y,l=i*o.x,u=s*o.y;return{width:r,height:a,x:l,y:u}}function Ma(e,t,n){let s;if(t==="viewport")s=rm(e,n);else if(t==="document")s=im(ye(e));else if(Y(t))s=am(t,n);else{const i=ja(e);s={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return hn(s)}function Na(e,t){const n=je(e);return n===t||!Y(n)||ct(n)?!1:fe(n).position==="fixed"||Na(n,t)}function lm(e,t){const n=t.get(e);if(n)return n;let s=Lt(e,[],!1).filter(a=>Y(a)&&lt(a)!=="body"),i=null;const o=fe(e).position==="fixed";let r=o?je(e):e;for(;Y(r)&&!ct(r);){const a=fe(r),l=$s(r);!l&&a.position==="fixed"&&(i=null),(o?!l&&!i:!l&&a.position==="static"&&!!i&&om.has(i.position)||Ot(r)&&!l&&Na(e,r))?s=s.filter(c=>c!==r):i=a,r=je(r)}return t.set(e,s),s}function cm(e){let{element:t,boundary:n,rootBoundary:s,strategy:i}=e;const r=[...n==="clippingAncestors"?cn(t)?[]:lm(t,this._c):[].concat(n),s],a=r[0],l=r.reduce((u,c)=>{const d=Ma(t,c,i);return u.top=ce(d.top,u.top),u.right=Ft(d.right,u.right),u.bottom=Ft(d.bottom,u.bottom),u.left=ce(d.left,u.left),u},Ma(t,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function um(e){const{width:t,height:n}=Aa(e);return{width:t,height:n}}function dm(e,t,n){const s=ve(t),i=ye(t),o=n==="fixed",r=Ue(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const l=xe(0);function u(){l.x=gn(i)}if(s||!s&&!o)if((lt(t)!=="body"||Ot(i))&&(a=un(t)),s){const m=Ue(t,!0,o,t);l.x=m.x+t.clientLeft,l.y=m.y+t.clientTop}else i&&u();o&&!s&&i&&u();const c=i&&!s&&!o?Ra(i,a):xe(0),d=r.left+a.scrollLeft-l.x-c.x,h=r.top+a.scrollTop-l.y-c.y;return{x:d,y:h,width:r.width,height:r.height}}function Js(e){return fe(e).position==="static"}function Va(e,t){if(!ve(e)||fe(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ye(e)===n&&(n=n.ownerDocument.body),n}function Ia(e,t){const n=se(e);if(cn(e))return n;if(!ve(e)){let i=je(e);for(;i&&!ct(i);){if(Y(i)&&!Js(i))return i;i=je(i)}return n}let s=Va(e,t);for(;s&&ch(s)&&Js(s);)s=Va(s,t);return s&&ct(s)&&Js(s)&&!$s(s)?n:s||mh(e)||n}const fm=async function(e){const t=this.getOffsetParent||Ia,n=this.getDimensions,s=await n(e.floating);return{reference:dm(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function hm(e){return fe(e).direction==="rtl"}const mm={convertOffsetParentRelativeRectToViewportRelativeRect:nm,getDocumentElement:ye,getClippingRect:cm,getOffsetParent:Ia,getElementRects:fm,getClientRects:sm,getDimensions:um,getScale:ut,isElement:Y,isRTL:hm};function Oa(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function pm(e,t){let n=null,s;const i=ye(e);function o(){var a;clearTimeout(s),(a=n)==null||a.disconnect(),n=null}function r(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),o();const u=e.getBoundingClientRect(),{left:c,top:d,width:h,height:m}=u;if(a||t(),!h||!m)return;const g=fn(d),v=fn(i.clientWidth-(c+h)),b=fn(i.clientHeight-(d+m)),p=fn(c),y={rootMargin:-g+"px "+-v+"px "+-b+"px "+-p+"px",threshold:ce(0,Ft(1,l))||1};let P=!0;function S(A){const k=A[0].intersectionRatio;if(k!==l){if(!P)return r();k?r(!1,k):s=setTimeout(()=>{r(!1,1e-7)},1e3)}k===1&&!Oa(u,e.getBoundingClientRect())&&r(),P=!1}try{n=new IntersectionObserver(S,{...y,root:i.ownerDocument})}catch{n=new IntersectionObserver(S,y)}n.observe(e)}return r(!0),o}function gm(e,t,n,s){s===void 0&&(s={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=s,u=Zs(e),c=i||o?[...u?Lt(u):[],...Lt(t)]:[];c.forEach(p=>{i&&p.addEventListener("scroll",n,{passive:!0}),o&&p.addEventListener("resize",n)});const d=u&&a?pm(u,n):null;let h=-1,m=null;r&&(m=new ResizeObserver(p=>{let[x]=p;x&&x.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var y;(y=m)==null||y.observe(t)})),n()}),u&&!l&&m.observe(u),m.observe(t));let g,v=l?Ue(e):null;l&&b();function b(){const p=Ue(e);v&&!Oa(v,p)&&n(),v=p,g=requestAnimationFrame(b)}return n(),()=>{var p;c.forEach(x=>{i&&x.removeEventListener("scroll",n),o&&x.removeEventListener("resize",n)}),d?.(),(p=m)==null||p.disconnect(),m=null,l&&cancelAnimationFrame(g)}}const ym=Qh,vm=(e,t,n)=>{const s=new Map,i={platform:mm,...n},o={...i.platform,_c:s};return Zh(e,t,{...i,platform:o})};var xm=typeof document<"u",bm=function(){},yn=xm?T.useLayoutEffect:bm;function vn(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,s,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(s=n;s--!==0;)if(!vn(e[s],t[s]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(s=n;s--!==0;)if(!{}.hasOwnProperty.call(t,i[s]))return!1;for(s=n;s--!==0;){const o=i[s];if(!(o==="_owner"&&e.$$typeof)&&!vn(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function La(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Fa(e,t){const n=La(e);return Math.round(t*n)/n}function Qs(e){const t=C.useRef(e);return yn(()=>{t.current=e}),t}function wm(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:s=[],platform:i,elements:{reference:o,floating:r}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[c,d]=C.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=C.useState(s);vn(h,s)||m(s);const[g,v]=C.useState(null),[b,p]=C.useState(null),x=C.useCallback(I=>{I!==A.current&&(A.current=I,v(I))},[]),y=C.useCallback(I=>{I!==k.current&&(k.current=I,p(I))},[]),P=o||g,S=r||b,A=C.useRef(null),k=C.useRef(null),E=C.useRef(c),N=l!=null,V=Qs(l),F=Qs(i),ie=Qs(u),ne=C.useCallback(()=>{if(!A.current||!k.current)return;const I={placement:t,strategy:n,middleware:h};F.current&&(I.platform=F.current),vm(A.current,k.current,I).then(J=>{const w={...J,isPositioned:ie.current!==!1};O.current&&!vn(E.current,w)&&(E.current=w,ui.flushSync(()=>{d(w)}))})},[h,t,n,F,ie]);yn(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,d(I=>({...I,isPositioned:!1})))},[u]);const O=C.useRef(!1);yn(()=>(O.current=!0,()=>{O.current=!1}),[]),yn(()=>{if(P&&(A.current=P),S&&(k.current=S),P&&S){if(V.current)return V.current(P,S,ne);ne()}},[P,S,ne,V,N]);const X=C.useMemo(()=>({reference:A,floating:k,setReference:x,setFloating:y}),[x,y]),re=C.useMemo(()=>({reference:P,floating:S}),[P,S]),z=C.useMemo(()=>{const I={position:n,left:0,top:0};if(!re.floating)return I;const J=Fa(re.floating,c.x),w=Fa(re.floating,c.y);return a?{...I,transform:"translate("+J+"px, "+w+"px)",...La(re.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:J,top:w}},[n,a,re.floating,c.x,c.y]);return C.useMemo(()=>({...c,update:ne,refs:X,elements:re,floatingStyles:z}),[c,ne,X,re,z])}const Tm=(e,t)=>({...ym(e),options:[e,t]}),Sm={...C};let Ba=!1,Cm=0;const _a=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Cm++;function Pm(){const[e,t]=C.useState(()=>Ba?_a():void 0);return Re(()=>{e==null&&t(_a())},[]),C.useEffect(()=>{Ba=!0},[]),e}const za=Sm.useId||Pm;let ei;process.env.NODE_ENV!=="production"&&(ei=new Set);function km(){for(var e,t=arguments.length,n=new Array(t),s=0;s<t;s++)n[s]=arguments[s];const i="Floating UI: "+n.join(" ");if(!((e=ei)!=null&&e.has(i))){var o;(o=ei)==null||o.add(i),console.error(i)}}function Em(){const e=new Map;return{emit(t,n){var s;(s=e.get(t))==null||s.forEach(i=>i(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var s;(s=e.get(t))==null||s.delete(n)}}}const Am=C.createContext(null),jm=C.createContext(null),Rm=()=>{var e;return((e=C.useContext(Am))==null?void 0:e.id)||null},Dm=()=>C.useContext(jm);function Wa(e){return"data-floating-ui-"+e}const $a={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},Ua=C.forwardRef(function(t,n){const[s,i]=C.useState();Re(()=>{zh()&&i("button")},[]);const o={ref:n,tabIndex:0,role:s,"aria-hidden":s?void 0:!0,[Wa("focus-guard")]:"",style:$a};return f.jsx("span",{...t,...o})}),Ka=C.createContext(null),Xa=Wa("portal");function Mm(e){e===void 0&&(e={});const{id:t,root:n}=e,s=za(),i=Nm(),[o,r]=C.useState(null),a=C.useRef(null);return Re(()=>()=>{o?.remove(),queueMicrotask(()=>{a.current=null})},[o]),Re(()=>{if(!s||a.current)return;const l=t?document.getElementById(t):null;if(!l)return;const u=document.createElement("div");u.id=s,u.setAttribute(Xa,""),l.appendChild(u),a.current=u,r(u)},[t,s]),Re(()=>{if(n===null||!s||a.current)return;let l=n||i?.portalNode;l&&!zs(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=s,c.setAttribute(Xa,""),l=u||l,l.appendChild(c),a.current=c,r(c)},[t,n,s,i]),o}function ti(e){const{children:t,id:n,root:s,preserveTabOrder:i=!0}=e,o=Mm({id:n,root:s}),[r,a]=C.useState(null),l=C.useRef(null),u=C.useRef(null),c=C.useRef(null),d=C.useRef(null),h=r?.modal,m=r?.open,g=!!r&&!r.modal&&r.open&&i&&!!(s||o);return C.useEffect(()=>{if(!o||!i||h)return;function v(b){o&&qs(b)&&(b.type==="focusin"?ka:qh)(o)}return o.addEventListener("focusin",v,!0),o.addEventListener("focusout",v,!0),()=>{o.removeEventListener("focusin",v,!0),o.removeEventListener("focusout",v,!0)}},[o,i,h]),C.useEffect(()=>{o&&(m||ka(o))},[m,o]),f.jsxs(Ka.Provider,{value:C.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:l,afterOutsideRef:u,beforeInsideRef:c,afterInsideRef:d,portalNode:o,setFocusManagerState:a}),[i,o]),children:[g&&o&&f.jsx(Ua,{"data-type":"outside",ref:l,onFocus:v=>{if(qs(v,o)){var b;(b=c.current)==null||b.focus()}else{const p=r?r.domReference:null,x=Gh(p);x?.focus()}}}),g&&o&&f.jsx("span",{"aria-owns":o.id,style:$a}),o&&ui.createPortal(t,o),g&&o&&f.jsx(Ua,{"data-type":"outside",ref:u,onFocus:v=>{if(qs(v,o)){var b;(b=d.current)==null||b.focus()}else{const p=r?r.domReference:null,x=Yh(p);x?.focus(),r?.closeOnFocusOut&&r?.onOpenChange(!1,v.nativeEvent,"focus-out")}}})]})}const Nm=()=>C.useContext(Ka);let xn=0;const Ha="--floating-ui-scrollbar-width";function Vm(){const e=_h(),t=/iP(hone|ad|od)|iOS/.test(e)||e==="MacIntel"&&navigator.maxTouchPoints>1,n=document.body.style,i=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",o=window.innerWidth-document.documentElement.clientWidth,r=n.left?parseFloat(n.left):window.scrollX,a=n.top?parseFloat(n.top):window.scrollY;if(n.overflow="hidden",n.setProperty(Ha,o+"px"),o&&(n[i]=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:-(r-Math.floor(c))+"px",right:"0"})}return()=>{Object.assign(n,{overflow:"",[i]:""}),n.removeProperty(Ha),t&&(Object.assign(n,{position:"",top:"",left:"",right:""}),window.scrollTo(r,a))}}let Ya=()=>{};const ni=C.forwardRef(function(t,n){const{lockScroll:s=!1,...i}=t;return Re(()=>{if(s)return xn++,xn===1&&(Ya=Vm()),()=>{xn--,xn===0&&Ya()}},[s]),f.jsx("div",{ref:n,...i,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...i.style}})});function Im(e){const{open:t=!1,onOpenChange:n,elements:s}=e,i=za(),o=C.useRef({}),[r]=C.useState(()=>Em()),a=Rm()!=null;if(process.env.NODE_ENV!=="production"){const m=s.reference;m&&!Y(m)&&km("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(s.reference),c=Hh((m,g,v)=>{o.current.openEvent=m?g:void 0,r.emit("openchange",{open:m,event:g,reason:v,nested:a}),n?.(m,g,v)}),d=C.useMemo(()=>({setPositionReference:u}),[]),h=C.useMemo(()=>({reference:l||s.reference||null,floating:s.floating||null,domReference:s.reference}),[l,s.reference,s.floating]);return C.useMemo(()=>({dataRef:o,open:t,onOpenChange:c,elements:h,events:r,floatingId:i,refs:d}),[t,c,h,r,i,d])}function Om(e){e===void 0&&(e={});const{nodeId:t}=e,n=Im({...e,elements:{reference:null,floating:null,...e.elements}}),s=e.rootContext||n,i=s.elements,[o,r]=C.useState(null),[a,l]=C.useState(null),c=i?.domReference||o,d=C.useRef(null),h=Dm();Re(()=>{c&&(d.current=c)},[c]);const m=wm({...e,elements:{...i,...a&&{reference:a}}}),g=C.useCallback(y=>{const P=Y(y)?{getBoundingClientRect:()=>y.getBoundingClientRect(),getClientRects:()=>y.getClientRects(),contextElement:y}:y;l(P),m.refs.setReference(P)},[m.refs]),v=C.useCallback(y=>{(Y(y)||y===null)&&(d.current=y,r(y)),(Y(m.refs.reference.current)||m.refs.reference.current===null||y!==null&&!Y(y))&&m.refs.setReference(y)},[m.refs]),b=C.useMemo(()=>({...m.refs,setReference:v,setPositionReference:g,domReference:d}),[m.refs,v,g]),p=C.useMemo(()=>({...m.elements,domReference:c}),[m.elements,c]),x=C.useMemo(()=>({...m,...s,refs:b,elements:p,nodeId:t}),[m,b,p,t,s]);return Re(()=>{s.dataRef.current.floatingContext=x;const y=h?.nodesRef.current.find(P=>P.id===t);y&&(y.context=x)}),C.useMemo(()=>({...m,context:x,refs:b,elements:p}),[m,b,p,x])}const Lm={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"},Ga=C.memo(({open:e,children:t,className:n,onOutsideClick:s,floatingStyles:i,setFloating:o,placement:r})=>f.jsx(ti,{children:f.jsx(Zt,{children:e&&f.jsxs(f.Fragment,{children:[s&&f.jsx(ni,{onClick:s}),f.jsx("div",{ref:o,style:i,className:"z-50",children:f.jsx(Fe.div,{className:n,style:{transformOrigin:Lm[r]},initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.1,ease:"easeInOut"},children:t})})]})})})),dt=e=>{const{placement:t="bottom",onOutsideClick:n,fullWidth:s,minWidth:i,maxWidth:o}=e,r=C.useMemo(()=>[Tm({apply({rects:d,elements:h}){s&&(h.floating.style.width=`${d.reference.width}px`),i&&(h.floating.style.minWidth=`${i}px`),o&&(h.floating.style.maxWidth=`${o}px`)}})],[s,o,i]),{refs:a,floatingStyles:l}=Om({placement:t,middleware:r,whileElementsMounted:gm}),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=h=>{const{floatingStyles:m,setFloating:g,onOutsideClick:v,placement:b}=u.current,{className:p,open:x,children:y}=h;return f.jsx(Ga,{open:x,className:p,onOutsideClick:v,floatingStyles:m,setFloating:g,placement:b,children:y})};return C.memo(d)},[]);return{anchorRef:a.setReference,Popover:c}},Fm="flex flex-col dropdown-panel border mt-1 rounded-xl shadow-lg overflow-y-auto relative space-y-1",Bm={sm:"p-2",md:"p-3",lg:"p-4"},ft=e=>{const{className:t,children:n,padding:s="md",...i}=e;return f.jsx("div",{className:R(Fm,Bm[s],t),...i,children:n})},_t=(e,t)=>{T.useEffect(()=>{if(!e)return;const n=s=>{s.key==="Escape"&&t()};return document.addEventListener("keydown",n),()=>{document.removeEventListener("keydown",n)}},[e,t])},qa=e=>{const{className:t,label:n,description:s,options:i,onChange:o,value:r,placeholder:a,maxHeight:l=300,error:u,size:c="md"}=e,[d,h]=T.useState(!1),m=C.useRef(null),g=i?.find(p=>p.value===r);_t(d,()=>h(!1)),T.useEffect(()=>{d&&m.current?.focus({preventScroll:!0})},[d]);const{anchorRef:v,Popover:b}=dt({placement:"bottom",fullWidth:!0,onOutsideClick:()=>h(!1)});return f.jsx(We.Provider,{value:c,children:f.jsxs("div",{className:R("flex flex-col",t),children:[f.jsx(_e,{children:n}),f.jsxs("div",{className:"relative flex w-full flex-col",ref:v,children:[f.jsxs("div",{ref:m,role:"button",tabIndex:0,className:R("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",it[c],Be[c],rt[c],ot[c],u&&"select-trigger-error",d&&"ring-4"),onKeyDown:p=>p.key===" "&&h(x=>!x),onClick:()=>h(!d),children:[g&&f.jsx("span",{children:g.label}),!g&&a&&f.jsx("span",{className:"select-placeholder",children:a})]}),f.jsxs($e,{children:[u&&f.jsx(ze,{}),!!r&&f.jsx(Ce,{Icon:at,onClick:()=>o(null)}),f.jsx(Ce,{Icon:Vt})]}),f.jsx(b,{open:d,children:f.jsx(ft,{className:"!p-0",style:{maxHeight:l},children:f.jsx("div",{className:"flex flex-col p-2 gap-1",children:i.map(p=>{const x=p.value===r;return f.jsx(It,{onClick:()=>{!p.disabled&&o&&(o(p.value),h(!1))},selected:x,disabled:p.disabled,children:p.label},String(p.value))})})})})]}),f.jsx(pe,{children:s}),f.jsx(ge,{children:u})]})})},_m=e=>{const{className:t,label:n,description:s,options:i,onChange:o,onSearch:r,value:a,placeholder:l,maxHeight:u=300,error:c,size:d="md"}=e,[h,m]=T.useState(!1),[g,v]=T.useState(i),[b,p]=T.useState(""),x=C.useRef(null),y=C.useRef(null),P=i?.find(k=>k.value===a);_t(h,()=>m(!1)),T.useEffect(()=>{v(r(b))},[b,i,r]),T.useEffect(()=>{h&&setTimeout(()=>y.current?.focus(),100)},[h]);const{anchorRef:S,Popover:A}=dt({placement:"bottom",fullWidth:!0,onOutsideClick:()=>m(!1)});return f.jsx(We.Provider,{value:d,children:f.jsxs("div",{className:R("flex flex-col",t),children:[f.jsx(_e,{children:n}),f.jsxs("div",{className:"relative flex w-full flex-col",ref:S,children:[f.jsxs("div",{ref:x,role:"button",tabIndex:0,className:R("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",it[d],Be[d],rt[d],ot[d],c&&"select-trigger-error",h&&"ring-4"),onKeyDown:k=>k.key===" "&&m(E=>!E),onClick:()=>m(!h),children:[P&&f.jsx("span",{children:P.label}),!P&&l&&f.jsx("span",{className:"select-placeholder",children:l})]}),f.jsxs($e,{children:[c&&f.jsx(ze,{}),!!a&&f.jsx(Ce,{Icon:at,onClick:()=>o(null)}),f.jsx(Ce,{Icon:Vt})]}),f.jsx(A,{open:h,children:f.jsxs(ft,{className:"gap-0 !p-0",style:{maxHeight:u},children:[f.jsxs("div",{className:"sticky top-0 border-b select-search-bar py-1 backdrop-blur-sm",children:[f.jsx("input",{ref:y,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:k=>p(k.target.value)}),f.jsx(Bs,{className:"absolute select-search-icon left-4 top-4 h-4 w-4"})]}),f.jsxs("div",{className:"flex flex-col gap-1 p-2",children:[b!==""&&f.jsxs(f.Fragment,{children:[g.length===0&&f.jsx("div",{className:"flex flex-col items-center justify-center py-6",children:f.jsx(fa,{className:"h-6 w-6 text-[var(--color-input-text)]"})}),g.map(k=>{const E=k.value===a;return f.jsx(It,{onClick:()=>{!k.disabled&&o&&(o(k.value),m(!1))},selected:E,disabled:k.disabled,children:k.label},String(k.value))})]}),b===""&&f.jsx(f.Fragment,{children:i.map(k=>{const E=k.value===a;return f.jsx(It,{onClick:()=>{!k.disabled&&o&&(o(k.value),m(!1))},selected:E,disabled:k.disabled,children:k.label},String(k.value))})})]})]})})]}),f.jsx(pe,{children:s}),f.jsx(ge,{children:c})]})})},zm=(e,t)=>{const[n,s]=T.useState(e);return T.useEffect(()=>{const i=setTimeout(()=>{s(e)},t);return()=>{clearTimeout(i)}},[e,t]),n},Wm=e=>{const{className:t,label:n,description:s,onChange:i,fetchOptionsByQuery:o,fetchOptionByValue:r,onSearchDebounceMs:a=300,value:l,placeholder:u,maxHeight:c=300,error:d,size:h="md"}=e,[m,g]=T.useState(!1),v=C.useRef(null),[b,p]=T.useState(""),[x,y]=T.useState([]),[P,S]=T.useState(null),A=C.useRef(null),[k,E]=T.useState(!1),[N,V]=T.useState(!1);_t(m,()=>g(!1));const F=zm(b,a);T.useEffect(()=>{(async()=>{E(!0);const X=await o(F);y(X),E(!1)})()},[F,o]),T.useEffect(()=>{if(l==null){S(null);return}const O=x?.find(X=>X.value===l);O?S(O):(async()=>{V(!0);const re=await r(l);S(re),V(!1)})()},[r,x,l]),T.useEffect(()=>{m&&setTimeout(()=>A.current?.focus(),100)},[m]);const{anchorRef:ie,Popover:ne}=dt({placement:"bottom",fullWidth:!0,onOutsideClick:()=>g(!1)});return f.jsx(We.Provider,{value:h,children:f.jsxs("div",{className:R("flex flex-col",t),children:[f.jsx(_e,{children:n}),f.jsxs("div",{className:"relative flex w-full flex-col",ref:ie,children:[f.jsxs("div",{ref:v,role:"button",tabIndex:0,className:R("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",it[h],Be[h],rt[h],ot[h],d&&"select-trigger-error",m&&"ring-4"),onKeyDown:O=>O.key===" "&&g(X=>!X),onClick:()=>g(!m),children:[!N&&P&&f.jsx("span",{children:P.label}),!N&&!P&&u&&f.jsx("span",{className:"select-placeholder",children:u}),N&&f.jsx(an,{className:"h-4 w-4 text-[var(--color-input-text)]"})]}),f.jsxs($e,{children:[d&&f.jsx(ze,{}),!!l&&f.jsx(Ce,{Icon:at,onClick:()=>i(null)}),f.jsx(Ce,{Icon:Vt})]}),f.jsx(ne,{open:m,children:f.jsxs(ft,{className:"gap-0 !p-0",style:{maxHeight:c},children:[f.jsxs("div",{className:"sticky top-0 border-b select-search-bar py-1 backdrop-blur-sm",children:[f.jsx("input",{ref:A,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:O=>p(O.target.value)}),f.jsx(Bs,{className:"absolute select-search-icon left-4 top-4 h-4 w-4"})]}),f.jsxs("div",{className:"flex flex-col gap-1 p-2",children:[!k&&x.length===0&&f.jsx("div",{className:"flex flex-col items-center justify-center py-6",children:f.jsx(fa,{className:"h-6 w-6 text-[var(--color-input-text)]"})}),k&&f.jsx("div",{className:"flex flex-col items-center justify-center py-6",children:f.jsx(an,{className:"h-6 w-6 text-[var(--color-input-text)]"})}),!k&&f.jsx(f.Fragment,{children:x.map(O=>{const X=O.value===l;return f.jsx(It,{onClick:()=>{!O.disabled&&i&&(i(O.value),g(!1))},selected:X,disabled:O.disabled,children:O.label},String(O.value))})})]})]})})]}),f.jsx(pe,{children:s}),f.jsx(ge,{children:d})]})})},$m=C.forwardRef((e,t)=>{const{className:n,children:s,...i}=e;return f.jsx("div",{ref:t,className:R("flex flex-col gap-6 border panel-base rounded-2xl shadow-sm px-6 py-6",n),...i,children:s})}),Um=e=>{const{className:t,vertical:n=!1,...s}=e;return f.jsx("div",{className:R(n?"w-px h-full bg-[var(--color-divider)]":"w-full h-px bg-[var(--color-divider)]",t),...s})},Km=e=>{const{children:t,content:n,className:s,placement:i="top",minWidth:o=100,maxWidth:r=200}=e,[a,l]=T.useState(!1),{anchorRef:u,Popover:c}=dt({placement:i,minWidth:o,maxWidth:r});return f.jsxs("span",{ref:u,className:s,onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:[t,f.jsx(c,{open:a,children:f.jsx(ft,{children:n})})]})},Xm=e=>{const{open:t,onDismiss:n,enableDismissOnOutsideClick:s,enableDismissOnEscKey:i,enableDismissButton:o,className:r,children:a,maxWidth:l=600}=e;return _t(!!i&&t,n||(()=>{})),f.jsx(Zt,{children:t&&f.jsxs(ti,{children:[f.jsx(Fe.div,{style:{transformOrigin:"center"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15,ease:"easeInOut"},children:f.jsx(ni,{className:"modal-overlay backdrop-blur-[1px] z-10",onClick:s?n:void 0,lockScroll:!0})}),f.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:f.jsxs(Fe.div,{className:R("flex flex-col modal-content rounded-2xl shadow-xl p-6 lg:p-12 pointer-events-auto w-full relative",r),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&&f.jsx(Fs,{Icon:at,className:"absolute top-4 right-4",variant:"transparent",size:"sm",onClick:n}),a]})})]})})},Hm=e=>{const{open:t,onDismiss:n,enableDismissOnOutsideClick:s,enableDismissOnEscKey:i,enableDismissButton:o,className:r,children:a,maxWidth:l=480}=e;return _t(!!i&&t,n||(()=>{})),f.jsx(Zt,{children:t&&f.jsxs(ti,{children:[f.jsx(Fe.div,{style:{transformOrigin:"center"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15,ease:"easeInOut"},children:f.jsx(ni,{className:"modal-overlay backdrop-blur-[1px] z-10",onClick:s?n:void 0,lockScroll:!0})}),f.jsx("div",{className:"fixed inset-0 flex flex-row justify-end pointer-events-none z-20",children:f.jsxs(Fe.div,{className:R("flex flex-col modal-content shadow-xl p-6 lg:p-12 pointer-events-auto h-full w-full overflow-y-auto relative",r),style:{maxWidth:l},initial:{translateX:"100%"},animate:{translateX:0},exit:{translateX:"100%"},transition:{duration:.25,ease:[.32,.72,0,1]},children:[o&&f.jsx(Fs,{Icon:at,className:"absolute top-4 right-4",variant:"transparent",size:"sm",onClick:n}),a]})})]})})},Za={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)]"},si=C.forwardRef((e,t)=>{const{className:n,children:s,onClick:i,showCloseIcon:o,Icon:r,color:a="gray"}=e,l=R("inline-flex align-top items-center gap-2 px-3 h-7 rounded-lg font-semibold",Za[a],n);return i?f.jsx("div",{ref:t,children:f.jsxs("button",{className:R("cursor-pointer ring-0 hover:ring-4 active:ring-1 transition-all duration-100 select-none focus:outline-none focus:ring-4",l),onClick:i,children:[r&&f.jsx(r,{className:"h-4 w-4 shrink-0"}),f.jsx("div",{className:"break-all line-clamp-1 text-left",children:s}),o&&f.jsx(at,{className:"h-4 w-4 shrink-0"})]})}):f.jsxs("div",{className:l,ref:t,children:[r&&f.jsx(r,{className:"h-4 w-4 shrink-0"}),f.jsx("div",{className:"break-all line-clamp-1 text-left",children:s})]})}),Ja=e=>{const{className:t,tabs:n}=e;return f.jsx("div",{className:R("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((s,i)=>{const o=R("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",s.active&&"tab-button-active shadow-sm");return s.href?f.jsxs("a",{href:s.href,className:o,children:[s.Icon&&f.jsx(s.Icon,{className:"h-5 w-5 shrink-0 mr-2 -ml-1"}),s.label]},i):f.jsxs("button",{className:o,onClick:s.onClick,children:[s.Icon&&f.jsx(s.Icon,{className:"h-5 w-5 shrink-0 mr-2 -ml-1"}),s.label]},i)})})},Qa=T.createContext(void 0),Ym=()=>({dismiss:T.useContext(Qa)||(()=>{})}),Gm="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:s,Icon:i,onClick:o,dismissOnClick:r=!0,...a}=e,{dismiss:l}=Ym(),u=c=>{o&&o(c),r&&l()};return f.jsxs("button",{ref:t,className:R(Gm,n),onClick:u,...a,children:[i&&f.jsx(i,{className:"h-5 w-5"}),s]})}),ii=e=>{const{label:t,children:n,className:s}=e;return f.jsxs("div",{className:R("flex flex-col dropdown-button-group",s),children:[t&&f.jsx("div",{className:"mb-2 text-sm dropdown-group-label font-semibold px-3",children:t}),n]})},ri=e=>{const{trigger:t,children:n,placement:s="bottom-end",minWidth:i=200,className:o}=e,[r,a]=T.useState(!1),{Popover:l,anchorRef:u}=dt({placement:s,onOutsideClick:()=>a(!1),minWidth:i});return f.jsxs(f.Fragment,{children:[f.jsx("div",{ref:u,className:o,onClick:()=>a(!r),children:t}),f.jsx(l,{open:r,children:f.jsx(ft,{padding:"sm",children:f.jsx(Qa.Provider,{value:()=>a(!1),children:n})})})]})};function qm(e){const{onDelta:t,onDragStart:n,onDragEnd:s,disabled:i=!1,primaryButtonOnly:o=!0,preventScrollOnMove:r=!0}=e,[a,l]=C.useState(!1),u=C.useRef(!1),c=C.useRef(0),d=C.useRef(0),h=C.useRef(0),m=C.useRef(null),g=C.useRef(null),v=C.useRef({onDelta:t,onDragStart:n,onDragEnd:s,preventScrollOnMove:r});C.useEffect(()=>{v.current={onDelta:t,onDragStart:n,onDragEnd:s,preventScrollOnMove:r}});const b=C.useRef({}),p=C.useCallback(y=>{if(!u.current)return;const P={clientX:y??d.current,startX:c.current,totalDeltaX:h.current,target:m.current};u.current=!1,l(!1);const{move:S,up:A,keydown:k}=b.current;S&&window.removeEventListener("pointermove",S,!0),A&&(window.removeEventListener("pointerup",A,!0),window.removeEventListener("pointercancel",A,!0)),k&&window.removeEventListener("keydown",k,!0),b.current={},g.current!=null&&(cancelAnimationFrame(g.current),g.current=null),v.current.onDragEnd?.(P),m.current=null,h.current=0},[]),x=C.useCallback(y=>{if(i||o&&y.button!==0)return;y.target.setPointerCapture?.(y.pointerId),c.current=y.clientX,d.current=y.clientX,h.current=0,m.current=y.target,u.current=!0,l(!0);const P={clientX:y.clientX,startX:y.clientX,totalDeltaX:0,target:y.target};v.current.onDragStart?.(P);const S=E=>{u.current&&g.current==null&&(g.current=requestAnimationFrame(()=>{g.current=null;const N=E.clientX,V=N-d.current;if(V===0)return;d.current=N,h.current+=V;const F={clientX:N,startX:c.current,totalDeltaX:h.current,target:m.current};v.current.preventScrollOnMove&&E.preventDefault(),v.current.onDelta(V,F)}))},A=E=>{p(E.clientX)},k=E=>{E.key==="Escape"&&(E.preventDefault(),p())};b.current={move:S,up:A,keydown:k},window.addEventListener("pointermove",S,{passive:!r,capture:!0}),window.addEventListener("pointerup",A,{capture:!0}),window.addEventListener("pointercancel",A,{capture:!0}),window.addEventListener("keydown",k,!0)},[p,i,r,o]);return C.useEffect(()=>()=>{u.current&&p()},[p]),{isDragging:a,bind:{onPointerDown:x,role:"separator",style:{touchAction:"none",cursor:"col-resize",userSelect:"none"}}}}const Zm=e=>{const{column:t,width:n,height:s,onResize:i,sortDirection:o,onSortClick:r}=e,a=!!t.sortable,{bind:l}=qm({onDelta:u=>i(u)});return f.jsxs("div",{style:{width:n,height:s},className:"flex flex-row items-stretch select-none shrink-0",children:[f.jsxs("div",{className:R("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?r:void 0,children:[f.jsx("span",{className:"truncate",children:t.header}),a&&o==="asc"&&f.jsx(Yf,{className:"h-4 w-4 shrink-0"}),a&&o==="desc"&&f.jsx(Vt,{className:"h-4 w-4 shrink-0"})]}),f.jsx("div",{...l,className:"cursor-ew-resize group py-2 table-resize-handle w-[8px]",children:f.jsx("div",{className:"w-0.5 h-full mx-auto table-resize-divider table-resize-divider-hover pointer-events-none"})})]})},ht=200,Jm=60,Qm=e=>{const t={};for(const n of e)t[n.id]=n.defaultWidth??ht;return t},ep=e=>{const{columns:t,rows:n,getRowId:s,onRowClick:i,sort:o,onSortChange:r,className:a,rowHeight:l=44,headerHeight:u=44}=e,[c,d]=T.useState(()=>Qm(t));T.useEffect(()=>{d(p=>{const x={};let y=Object.keys(p).length!==t.length;for(const P of t)P.id in p?x[P.id]=p[P.id]:(x[P.id]=P.defaultWidth??ht,y=!0);return y?x:p})},[t]);const h=T.useCallback((p,x,y)=>{d(P=>{const S=P[p]??ht,A=Math.max(y,S+x);return A===S?P:{...P,[p]:A}})},[]),m=T.useCallback(p=>{if(r){if(!o||o.columnId!==p){r({columnId:p,direction:"asc"});return}if(o.direction==="asc"){r({columnId:p,direction:"desc"});return}r(null)}},[o,r]),g=t.reduce((p,x)=>p+(c[x.id]??x.defaultWidth??ht),0),v=T.useRef(null),b=p=>{v.current&&(v.current.scrollLeft=p.currentTarget.scrollLeft)};return f.jsxs("div",{className:R("flex flex-col h-full w-full",a),children:[f.jsx("div",{ref:v,className:"overflow-hidden shrink-0",style:{height:u},children:f.jsx("div",{className:"flex flex-row table-header font-medium",style:{width:g,minWidth:"100%"},children:t.map(p=>f.jsx(Zm,{column:p,width:c[p.id]??p.defaultWidth??ht,height:u,onResize:x=>h(p.id,x,p.minWidth??Jm),sortDirection:o?.columnId===p.id?o.direction:null,onSortClick:()=>m(p.id)},p.id))})}),f.jsx("div",{className:"flex-1 overflow-auto",onScroll:b,children:f.jsx("div",{className:"flex flex-col",style:{width:g,minWidth:"100%"},children:n.map((p,x)=>f.jsx("div",{className:R("flex flex-row table-body-row transition-colors duration-100",i&&"cursor-pointer"),onClick:i?()=>i(p,x):void 0,children:t.map(y=>f.jsx("div",{className:"shrink-0 content-center px-4 relative",style:{width:c[y.id]??y.defaultWidth??ht,height:l},children:f.jsx("div",{className:"break-all line-clamp-1",children:y.renderCell(p,x)})},y.id))},s(p,x)))})})]})},tp=()=>f.jsx("div",{}),np=[{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"}],sp=[{id:"id",header:"ID",renderCell:e=>e.id},{id:"email",header:"Email",renderCell:e=>f.jsx(si,{Icon:Qf,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:()=>f.jsx(rp,{})}],ip=()=>f.jsxs("div",{className:"flex flex-col gap-6",children:[f.jsxs("div",{className:"flex flex-row items-center justify-start gap-3",children:[f.jsx(_s,{Icon:Bs,placeholder:"Search..."}),f.jsx(Ls,{Icon:ha}),f.jsx(ca,{Icon:da,children:"New"}),f.jsxs(ri,{trigger:f.jsx(Ls,{Icon:ha}),children:[f.jsx(te,{dismissOnClick:!1,Icon:da,children:"Add new"}),f.jsx(te,{Icon:Zf,children:"Remove"}),f.jsxs(ii,{label:"Test",className:"mt-2",children:[f.jsx(te,{children:"Item 1"}),f.jsx(te,{children:"Item 2"}),f.jsx(te,{children:"Item 3"}),f.jsx(te,{children:"Item 4"})]}),f.jsxs(ii,{label:"Test",className:"mt-2",children:[f.jsx(te,{children:"Item 1"}),f.jsx(te,{children:"Item 2"}),f.jsx(te,{children:"Item 3"}),f.jsx(te,{children:"Item 4"})]})]}),f.jsx(Ja,{tabs:[{label:"Tab 1",Icon:ua,active:!0,onClick:()=>{}},{label:"Tab 2",active:!1,onClick:()=>{}},{label:"Tab 3",Icon:ua,active:!1,onClick:()=>{}}]})]}),f.jsx(qa,{options:[{label:"Option 1",value:1},{label:"Option 2",value:2},{label:"Option 3",value:3}],value:null,onChange:()=>{}}),f.jsx(ep,{className:"h-[300px] w-[300px]",columns:sp,rows:np,getRowId:e=>e.id}),f.jsx(tp,{})]}),rp=()=>f.jsx(f.Fragment,{children:f.jsxs(ri,{placement:"bottom-end",className:"inline-block",trigger:f.jsx(si,{onClick:()=>{},children:"Test"}),children:[f.jsx(te,{children:"Option 1"}),f.jsx(te,{children:"Option 2"}),f.jsx(te,{children:"Option 3"})]})});D.Badge=si,D.BadgeColor=Za,D.Button=ca,D.ButtonIconRound=Fs,D.ButtonIconSquare=Ls,D.Divider=Um,D.DropdownButton=te,D.DropdownButtonGroup=ii,D.DropdownMenu=ri,D.DropdownPanel=ft,D.Input=_s,D.InputCheck=rh,D.InputDescription=pe,D.InputError=ge,D.InputErrorIcon=ze,D.InputIconButton=Ce,D.InputIconButtonTray=$e,D.InputLabel=_e,D.InputPassword=th,D.InputRadio=sh,D.InputSelect=qa,D.InputSelectNative=oh,D.InputSelectOption=It,D.InputSelectSearchable=_m,D.InputSelectSearchableAsync=Wm,D.InputTextArea=nh,D.InputToggle=ih,D.Modal=Xm,D.Panel=$m,D.PopoverBase=Ga,D.SidebarModal=Hm,D.Spinner=an,D.TabButtons=Ja,D.Test=ip,D.Tooltip=Km,D.usePopover=dt,Object.defineProperty(D,Symbol.toStringTag,{value:"Module"})}));
141
130
  //# sourceMappingURL=index.umd.cjs.map