@matthiaskrijgsman/mat-ui 0.0.11 → 0.0.13

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(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,Xa){"use strict";function ei(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=ei(T),ti=ei(Xa);var Nt={exports:{}},lt={};/**
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={};/**
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 ni;function Ha(){if(ni)return lt;ni=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 lt.Fragment=t,lt.jsx=n,lt.jsxs=n,lt}var ct={};/**
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={};/**
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 si;function Ya(){return si||(si=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 M=w.render;return w=w.displayName,w||(w=M.displayName||M.name||"",w=w!==""?"ForwardRef("+w+")":"ForwardRef"),w;case A:return M=w.displayName||null,M!==null?M:e(w.type)||"Memo";case R: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 $=M.error,G=typeof Symbol=="function"&&Symbol.toStringTag&&w[Symbol.toStringTag]||w.constructor.name||"Object";return $.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===y)return"<>";if(typeof w=="object"&&w!==null&&w.$$typeof===R)return"<...>";try{var M=e(w);return M?"<"+M+">":"<...>"}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 M=Object.getOwnPropertyDescriptor(w,"key").get;if(M&&M.isReactWarning)return!1}return w.key!==void 0}function a(w,M){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)",M))}$.isReactWarning=!0,Object.defineProperty(w,"key",{get:$,configurable:!0})}function l(){var w=e(this.type);return fe[w]||(fe[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,$,G,ke,be,Zs,Js){return $=be.ref,w={$$typeof:m,type:w,key:M,props:be,_owner:ke},($!==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:Zs}),Object.defineProperty(w,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Js}),Object.freeze&&(Object.freeze(w.props),Object.freeze(w)),w}function c(w,M,$,G,ke,be,Zs,Js){var q=M.children;if(q!==void 0)if(G)if(O(q)){for(G=0;G<q.length;G++)f(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 f(q);if(se.call(M,"key")){q=e(w);var at=Object.keys(M).filter(function(Um){return Um!=="key"});G=0<at.length?"{key: someKey, "+at.join(": ..., ")+": ...}":"{key: someKey}",J[q+G]||(at=0<at.length?"{"+at.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
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:
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,at,q),J[q+G]=!0)}if(q=null,$!==void 0&&(n($),q=""+$),r(M)&&(n(M.key),q=""+M.key),"key"in M){$={};for(var Qs in M)Qs!=="key"&&($[Qs]=M[Qs])}else $=M;return q&&a($,typeof w=="function"?w.displayName||w.name||"Unknown":w),u(w,q,be,ke,i(),$,Zs,Js)}function f(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"),A=Symbol.for("react.memo"),R=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,fe={},_=h.react_stack_bottom_frame.bind(h,o)(),N=K(s(o)),J={};ct.Fragment=y,ct.jsx=function(w,M,$,G,ke){var be=1e4>U.recentlyCreatedOwnerStacks++;return c(w,M,$,!1,G,ke,be?Error("react-stack-top-frame"):_,be?K(s(w)):N)},ct.jsxs=function(w,M,$,G,ke){var be=1e4>U.recentlyCreatedOwnerStacks++;return c(w,M,$,!0,G,ke,be?Error("react-stack-top-frame"):_,be?K(s(w)):N)}})()),ct}var ii;function Ga(){return ii||(ii=1,process.env.NODE_ENV==="production"?Nt.exports=Ha():Nt.exports=Ya()),Nt.exports}var d=Ga();const k=(...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",ri=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={},oi=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function ai(e){return typeof e=="object"&&e!==null}const li=e=>/^0[^.\s]+$/u.test(e);function xn(e){let t;return()=>(t===void 0&&(t=e()),t)}const ie=e=>e,qa=(e,t)=>n=>t(e(n)),ut=(...e)=>e.reduce(qa),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,de=e=>e/1e3;function ci(e,t){return t?e*(1e3/t):0}const ui=new Set;function wn(e,t,n){e||ui.has(t)||(console.warn(vn(t,n)),ui.add(t))}const fi=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Za=1e-7,Ja=12;function Qa(e,t,n,s,i){let o,r,a=0;do r=t+(n-t)/2,o=fi(r,s,i)-e,o>0?n=r:t=r;while(Math.abs(o)>Za&&++a<Ja);return r}function dt(e,t,n,s){if(e===t&&n===s)return ie;const i=o=>Qa(o,0,1,e,n);return o=>o===0||o===1?o:fi(i(o),t,s)}const di=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,hi=e=>t=>1-e(1-t),mi=dt(.33,1.53,.69,.99),Tn=hi(mi),pi=di(Tn),gi=e=>(e*=2)<1?.5*Tn(e):.5*(2-Math.pow(2,-10*(e-1))),Sn=e=>1-Math.sin(Math.acos(e)),yi=hi(Sn),vi=di(Sn),el=dt(.42,0,1,1),tl=dt(0,0,.58,1),xi=dt(.42,0,.58,1),nl=e=>Array.isArray(e)&&typeof e[0]!="number",bi=e=>Array.isArray(e)&&typeof e[0]=="number",wi={linear:ie,easeIn:el,easeInOut:xi,easeOut:tl,circIn:Sn,circInOut:vi,circOut:yi,backIn:Tn,backInOut:pi,backOut:mi,anticipate:gi},sl=e=>typeof e=="string",Ti=e=>{if(bi(e)){Te(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,s,i]=e;return dt(t,n,s,i)}else if(sl(e))return Te(wi[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),wi[e];return e},It=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function il(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,f=!1,h=!1)=>{const p=h&&i?n:s;return f&&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 rl=40;function Si(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]=il(o),g),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:f,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,rl),1)),i.timestamp=g,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),f.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,A=!1,R=!1)=>(n||x(),C.schedule(P,A,R)),g},{}),cancel:g=>{for(let E=0;E<It.length;E++)r[It[E]].cancel(g)},state:i,steps:r}}const{schedule:L,cancel:Ee,state:X,steps:Cn}=Si(typeof requestAnimationFrame<"u"?requestAnimationFrame:ie,!0);let Ot;function ol(){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(ol)}},Ci=e=>t=>typeof t=="string"&&t.startsWith(e),Pn=Ci("--"),al=Ci("var(--"),En=e=>al(e)?ll.test(e.split("/*")[0].trim()):!1,ll=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,ze={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ht={...ze,transform:e=>we(0,1,e)},Lt={...ze,default:1},mt=e=>Math.round(e*1e5)/1e5,An=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function cl(e){return e==null}const ul=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Rn=(e,t)=>n=>!!(typeof n=="string"&&ul.test(n)&&n.startsWith(e)||t&&!cl(n)&&Object.prototype.hasOwnProperty.call(n,t)),Pi=(e,t,n)=>s=>{if(typeof s!="string")return s;const[i,o,r,a]=s.match(An);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},fl=e=>we(0,255,e),jn={...ze,transform:e=>Math.round(fl(e))},Ne={test:Rn("rgb","red"),parse:Pi("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:s=1})=>"rgba("+jn.transform(e)+", "+jn.transform(t)+", "+jn.transform(n)+", "+mt(ht.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 Dn={test:Rn("#"),parse:dl,transform:Ne.transform},pt=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ae=pt("deg"),he=pt("%"),j=pt("px"),hl=pt("vh"),ml=pt("vw"),Ei={...he,parse:e=>he.parse(e)/100,transform:e=>he.transform(e*100)},Ke={test:Rn("hsl","hue"),parse:Pi("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:s=1})=>"hsla("+Math.round(e)+", "+he.transform(mt(t))+", "+he.transform(mt(n))+", "+mt(ht.transform(s))+")"},z={test:e=>Ne.test(e)||Dn.test(e)||Ke.test(e),parse:e=>Ne.test(e)?Ne.parse(e):Ke.test(e)?Ke.parse(e):Dn.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ne.transform(e):Ke.transform(e),getAnimatableNone:e=>{const t=z.parse(e);return t.alpha=0,z.transform(t)}},pl=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function gl(e){return isNaN(e)&&typeof e=="string"&&(e.match(An)?.length||0)+(e.match(pl)?.length||0)>0}const Ai="number",Ri="color",yl="var",vl="var(",ji="${}",xl=/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 gt(e){const t=e.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const a=t.replace(xl,l=>(z.test(l)?(s.color.push(o),i.push(Ri),n.push(z.parse(l))):l.startsWith(vl)?(s.var.push(o),i.push(yl),n.push(l)):(s.number.push(o),i.push(Ai),n.push(parseFloat(l))),++o,ji)).split(ji);return{values:n,split:a,indexes:s,types:i}}function Di(e){return gt(e).values}function Mi(e){const{split:t,types:n}=gt(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===Ai?o+=mt(i[r]):a===Ri?o+=z.transform(i[r]):o+=i[r]}return o}}const bl=e=>typeof e=="number"?0:z.test(e)?z.getAnimatableNone(e):e;function wl(e){const t=Di(e);return Mi(e)(t.map(bl))}const Re={test:gl,parse:Di,createTransformer:Mi,getAnimatableNone:wl};function Mn(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 Tl({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=Mn(l,a,e+1/3),o=Mn(l,a,e),r=Mn(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,kn=(e,t,n)=>{const s=e*e,i=n*(t*t-s)+s;return i<0?0:Math.sqrt(i)},Sl=[Dn,Ne,Ke],Cl=e=>Sl.find(t=>t.test(e));function ki(e){const t=Cl(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=Tl(n)),n}const Ni=(e,t)=>{const n=ki(e),s=ki(t);if(!n||!s)return Ft(e,t);const i={...n};return o=>(i.red=kn(n.red,s.red,o),i.green=kn(n.green,s.green,o),i.blue=kn(n.blue,s.blue,o),i.alpha=F(n.alpha,s.alpha,o),Ne.transform(i))},Nn=new Set(["none","hidden"]);function Pl(e,t){return Nn.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function El(e,t){return n=>F(e,t,n)}function Vn(e){return typeof e=="number"?El:typeof e=="string"?En(e)?Ft:z.test(e)?Ni:jl:Array.isArray(e)?Vi:typeof e=="object"?z.test(e)?Ni:Al:Ft}function Vi(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 Al(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 Rl(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 jl=(e,t)=>{const n=Re.createTransformer(t),s=gt(e),i=gt(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?Pl(e,t):ut(Vi(Rl(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 Ii(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?F(e,t,n):Vn(e)(e,t)}const Dl=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>L.update(t,n),stop:()=>Ee(t),now:()=>X.isProcessing?X.timestamp:Q.now()}},Oi=(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 Ml(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:de(i)}}const kl=5;function Li(e,t,n){const s=Math.max(t-kl,0);return ci(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 Nl({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,de(e)),r<1?(i=u=>{const c=u*r,f=c*e,h=c-n,m=Ln(u,r),p=Math.exp(-f);return On-h/m*p},o=u=>{const f=u*r*e,h=f*n+n,m=Math.pow(r,2)*Math.pow(u,2)*e,p=Math.exp(-f),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),f=(u-n)*e+1;return-On+c*f},o=u=>{const c=Math.exp(-u*e),f=(n-u)*(e*e);return c*f});const a=5/e,l=Il(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 Vl=12;function Il(e,t,n){let s=n;for(let i=1;i<Vl;i++)s=s-e(s)/t(s);return s}function Ln(e,t){return e*Math.sqrt(1-t*t)}const Ol=["duration","bounce"],Ll=["stiffness","damping","mass"];function Fi(e,t){return t.some(n=>e[n]!==void 0)}function Fl(e){let t={velocity:B.velocity,stiffness:B.stiffness,damping:B.damping,mass:B.mass,isResolvedFromDuration:!1,...e};if(!Fi(e,Ll)&&Fi(e,Ol))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=Nl(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:f,velocity:h,isResolvedFromDuration:m}=Fl({...n,velocity:-de(n.velocity||0)}),p=h||0,y=u/(2*Math.sqrt(l*c)),x=r-o,v=de(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 A=Math.exp(-y*v*P);return r-A*((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 A=Math.exp(-y*v*P),R=Math.min(C*P,300);return r-A*((p+y*v*x)*Math.sinh(R)+C*x*Math.cosh(R))/C}}const E={calculatedDuration:m&&f||null,next:C=>{const P=g(C);if(m)a.done=C>=f;else{let A=C===0?p:0;y<1&&(A=C===0?le(p):Li(g,C,P));const R=Math.abs(A)<=s,V=Math.abs(r-P)<=i;a.done=R&&V}return a.value=a.done?r:P,a},toString:()=>{const C=Math.min(In(E),Bt),P=Oi(A=>E.next(C*A).value,C,30);return C+"ms "+P},toTransition:()=>{}};return E}_t.applyToOptions=e=>{const t=Ml(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 f=e[0],h={done:!1,value:f},m=R=>a!==void 0&&R<a||l!==void 0&&R>l,p=R=>a===void 0?l:l===void 0||Math.abs(a-R)<Math.abs(l-R)?a:l;let y=n*t;const x=f+y,v=r===void 0?x:r(x);v!==x&&(y=v-f);const b=R=>-y*Math.exp(-R/s),g=R=>v+b(R),E=R=>{const V=b(R),I=g(R);h.done=Math.abs(V)<=u,h.value=h.done?v:I};let C,P;const A=R=>{m(h.value)&&(C=R,P=_t({keyframes:[h.value,p(h.value)],velocity:Li(g,R,h.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return A(0),{calculatedDuration:null,next:R=>{let V=!1;return!P&&C===void 0&&(V=!0,E(R),A(R)),C!==void 0&&R>=C?P.next(R-C):(!V&&E(R),h)}}}function Bl(e,t,n){const s=[],i=n||Se.mix||Ii,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=ut(l,a)}s.push(a)}return s}function _l(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=Bl(t,s,i),l=a.length,u=c=>{if(r&&c<e[0])return t[0];let f=0;if(l>1)for(;f<e.length-2&&!(c<e[f+1]);f++);const h=ft(e[f],e[f+1],c);return a[f](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 Wl(e){const t=[0];return $l(t,e.length-1),t}function Ul(e,t){return e.map(n=>n*t)}function zl(e,t){return e.map(()=>t||xi).splice(0,e.length-1)}function Xe({duration:e=300,keyframes:t,times:n,ease:s="easeInOut"}){const i=nl(s)?s.map(Ti):Ti(s),o={done:!1,value:t[0]},r=Ul(n&&n.length===t.length?n:Wl(t),e),a=_l(r,t,{ease:Array.isArray(i)?i:zl(t,i)});return{calculatedDuration:e,next:l=>(o.value=a(l),o.done=l>=e,o)}}const Kl=e=>e!==null;function Bn(e,{repeat:t,repeatType:n="loop"},s,i=1){const o=e.filter(Kl),a=i<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!a||s===void 0?o[a]:s}const Xl={decay:Fn,inertia:Fn,tween:Xe,keyframes:Xe,spring:_t};function Bi(e){typeof e.type=="string"&&(e.type=Xl[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 Hl=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;Bi(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=ut(Hl,Ii(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:f,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(f){const R=Math.min(this.currentTime,i)/a;let V=Math.floor(R),I=R%1;!I&&R>=1&&(I=1),I===1&&V--,V=Math.min(V,f+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 A=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&P);return A&&p!==Fn&&(C.value=Bn(c,this.options,x,this.speed)),y&&y(C.value),A&&this.finish(),C}then(t,n){return this.finished.then(t,n)}get duration(){return de(this.calculatedDuration)}get time(){return de(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=de(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Dl,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 Ve=e=>e*180/Math.PI,Wn=e=>{const t=Ve(Math.atan2(e[1],e[0]));return Un(t)},Gl={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=>Ve(Math.atan(e[1])),skewY:e=>Ve(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),_i=Wn,$i=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Wi=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),ql={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:$i,scaleY:Wi,scale:e=>($i(e)+Wi(e))/2,rotateX:e=>Un(Ve(Math.atan2(e[6],e[5]))),rotateY:e=>Un(Ve(Math.atan2(-e[2],e[0]))),rotateZ:_i,rotate:_i,skewX:e=>Ve(Math.atan(e[4])),skewY:e=>Ve(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=ql,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Gl,i=a}if(!i)return zn(t);const o=s[t],r=i[1].split(",").map(Jl);return typeof o=="function"?o(r):r[o]}const Zl=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Kn(n,t)};function Jl(e){return parseFloat(e.trim())}const He=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ye=new Set(He),Ui=e=>e===ze||e===j,Ql=new Set(["x","y","z"]),ec=He.filter(e=>!Ql.has(e));function tc(e){const t=[];return ec.forEach(n=>{const s=e.getValue(n);s!==void 0&&(t.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),t}const Ie={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")};Ie.translateX=Ie.x,Ie.translateY=Ie.y;const Oe=new Set;let Xn=!1,Hn=!1,Yn=!1;function zi(){if(Hn){const e=Array.from(Oe).filter(s=>s.needsMeasurement),t=new Set(e.map(s=>s.element)),n=new Map;t.forEach(s=>{const i=tc(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)})}Hn=!1,Xn=!1,Oe.forEach(e=>e.complete(Yn)),Oe.clear()}function Ki(){Oe.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Hn=!0)})}function nc(){Yn=!0,Ki(),zi(),Yn=!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?(Oe.add(this),Xn||(Xn=!0,L.read(Ki),L.resolveKeyframes(zi))):(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),Oe.delete(this)}cancel(){this.state==="scheduled"&&(Oe.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const sc=e=>e.startsWith("--");function ic(e,t,n){sc(t)?e.style.setProperty(t,n):e.style[t]=n}const rc=xn(()=>window.ScrollTimeline!==void 0),oc={};function ac(e,t){const n=xn(e);return()=>oc[t]??n()}const Xi=ac(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),yt=([e,t,n,s])=>`cubic-bezier(${e}, ${t}, ${n}, ${s})`,Hi={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:yt([0,.65,.55,1]),circOut:yt([.55,0,1,.45]),backIn:yt([.31,.01,.66,-.59]),backOut:yt([.33,1.53,.69,.99])};function Yi(e,t){if(e)return typeof e=="function"?Xi()?Oi(e,t):"ease-out":bi(e)?yt(e):Array.isArray(e)?e.map(n=>Yi(n,t)||Hi.easeOut):Hi[e]}function lc(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 f=Yi(a,i);Array.isArray(f)&&(c.easing=f);const h={delay:s,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"};return u&&(h.pseudoElement=u),e.animate(c,h)}function Gi(e){return typeof e=="function"&&"applyToOptions"in e}function cc({type:e,...t}){return Gi(e)&&Xi()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class uc 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=cc(t);this.animation=lc(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):ic(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 de(Number(t))}get time(){return de(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&&rc()?(this.animation.timeline=t,ie):n(this)}}const qi={anticipate:gi,backInOut:pi,circInOut:vi};function fc(e){return e in qi}function dc(e){typeof e.ease=="string"&&fc(e.ease)&&(e.ease=qi[e.ease])}const Zi=10;class hc extends uc{constructor(t){dc(t),Bi(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-Zi).value,a.sample(l).value,Zi),a.stop()}}const Ji=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Re.test(e)||e==="0")&&!e.startsWith("url("));function mc(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 pc(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=Ji(i,t),a=Ji(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:mc(e)||(n==="spring"||Gi(n))&&s}function qn(e){e.duration=0,e.type}const gc=new Set(["opacity","clipPath","filter","transform"]),yc=xn(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function vc(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 yc()&&n&&gc.has(n)&&(n!=="transform"||!u)&&!l&&!s&&i!=="mirror"&&o!==0&&r!=="inertia"}const xc=40;class bc 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,...f}){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,...f},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(),pc(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>xc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:t},m=!u&&vc(h)?new hc({...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(),nc()),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 wc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Tc(e){const t=wc.exec(e);if(!t)return[,];const[,n,s,i]=t;return[`--${n??s}`,i]}const Sc=4;function Qi(e,t,n=1){Te(n<=Sc,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,i]=Tc(e);if(!s)return;const o=window.getComputedStyle(t).getPropertyValue(s);if(o){const r=o.trim();return oi(r)?parseFloat(r):r}return En(i)?Qi(i,t,n+1):i}function Zn(e,t){return e?.[t]??e?.default??e}const er=new Set(["width","height","top","left","right","bottom",...He]),Cc={test:e=>e==="auto",parse:e=>e},tr=e=>t=>t.test(e),nr=[ze,j,he,Ae,ml,hl,Cc],sr=e=>nr.find(tr(e));function Pc(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||li(e):!0}const Ec=new Set(["brightness","contrast","saturate","opacity"]);function Ac(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[s]=n.match(An)||[];if(!s)return e;const i=n.replace(s,"");let o=Ec.has(t)?1:0;return s!==n&&(o*=100),t+"("+o+i+")"}const Rc=/\b([a-z-]*)\(.*?\)/gu,Jn={...Re,getAnimatableNone:e=>{const t=e.match(Rc);return t?t.map(Ac).join(" "):e}},ir={...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:Ae,rotateX:Ae,rotateY:Ae,rotateZ:Ae,scale:Lt,scaleX:Lt,scaleY:Lt,scaleZ:Lt,skew:Ae,skewX:Ae,skewY:Ae,distance:j,translateX:j,translateY:j,translateZ:j,x:j,y:j,z:j,perspective:j,transformPerspective:j,opacity:ht,originX:Ei,originY:Ei,originZ:j},zIndex:ir,fillOpacity:ht,strokeOpacity:ht,numOctaves:ir},jc={...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},rr=e=>jc[e];function or(e,t){let n=rr(e);return n!==Jn&&(n=Re),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Dc=new Set(["auto","none","0"]);function Mc(e,t,n){let s=0,i;for(;s<e.length&&!i;){const o=e[s];typeof o=="string"&&!Dc.has(o)&&gt(o).values.length&&(i=e[s]),s++}if(i&&n)for(const o of t)e[o]=or(n,i)}class kc 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=Qi(u,n.current);c!==void 0&&(t[l]=c),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!er.has(s)||t.length!==2)return;const[i,o]=t,r=sr(i),a=sr(o);if(r!==a)if(Ui(r)&&Ui(a))for(let l=0;l<t.length;l++){const u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else Ie[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,s=[];for(let i=0;i<t.length;i++)(t[i]===null||Pc(t[i]))&&s.push(i);s.length&&Mc(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=Ie[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]=Ie[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 Nc(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 ar=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function lr(e){return ai(e)&&"offsetHeight"in e}const cr=30,Vc=e=>!isNaN(parseFloat(e));class Ic{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=Vc(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>cr)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,cr);return ci(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 Ic(e,t)}const{schedule:es}=Si(queueMicrotask,!1),ce={x:!1,y:!1};function ur(){return ce.x||ce.y}function Oc(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 fr(e,t){const n=Nc(e),s=new AbortController,i={passive:!0,...t,signal:s.signal};return[n,i,()=>s.abort()]}function dr(e){return!(e.pointerType==="touch"||ur())}function Lc(e,t,n={}){const[s,i,o]=fr(e,n),r=a=>{if(!dr(a))return;const{target:l}=a,u=t(l,a);if(typeof u!="function"||!l)return;const c=f=>{dr(f)&&(u(f),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,i)};return s.forEach(a=>{a.addEventListener("pointerenter",r,i)}),o}const hr=(e,t)=>t?e===t?!0:hr(e,t.parentElement):!1,ts=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Fc=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Bc(e){return Fc.has(e.tagName)||e.tabIndex!==-1}const $t=new WeakSet;function mr(e){return t=>{t.key==="Enter"&&e(t)}}function ns(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const _c=(e,t)=>{const n=e.currentTarget;if(!n)return;const s=mr(()=>{if($t.has(n))return;ns(n,"down");const i=mr(()=>{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 pr(e){return ts(e)&&!ur()}function $c(e,t,n={}){const[s,i,o]=fr(e,n),r=a=>{const l=a.currentTarget;if(!pr(a))return;$t.add(l);const u=t(l,a),c=(m,p)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",h),$t.has(l)&&$t.delete(l),pr(m)&&typeof u=="function"&&u(m,{success:p})},f=m=>{c(m,l===window||l===document||n.useGlobalTarget||hr(l,m.target))},h=m=>{c(m,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",h,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,i),lr(a)&&(a.addEventListener("focus",u=>_c(u,i)),!Bc(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function gr(e){return ai(e)&&"ownerSVGElement"in e}function Wc(e){return gr(e)&&e.tagName==="svg"}const H=e=>!!(e&&e.getVelocity),Uc=[...nr,z,Re],zc=e=>Uc.find(tr(e)),ss=T.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class Kc extends S.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const s=n.offsetParent,i=lr(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 Xc({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:f,right:h}=r.current;if(t||!o.current||!l||!u)return;const m=n==="left"?`left: ${f}`:`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,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(`
23
23
  [data-motion-pop-id="${i}"] {
24
24
  position: absolute !important;
25
25
  width: ${l}px !important;
@@ -27,118 +27,115 @@ 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]),d.jsx(Kc,{isPresent:t,childRef:o,sizeRef:r,children:S.cloneElement(e,{ref:o})})}const Hc=({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 f=!0,h=T.useMemo(()=>(f=!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&&f&&(h={...h}),T.useMemo(()=>{u.forEach((m,p)=>u.set(p,!1))},[n]),S.useEffect(()=>{!n&&!u.size&&s&&s()},[n]),r==="popLayout"&&(e=d.jsx(Xc,{isPresent:n,anchorX:a,root:l,children:e})),d.jsx(Vt.Provider,{value:h,children:e})};function Yc(){return new Map}function yr(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 vr(e){const t=[];return T.Children.forEach(e,n=>{T.isValidElement(n)&&t.push(n)}),t}const is=({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]=yr(r),f=T.useMemo(()=>vr(e),[e]),h=r&&!u?[]:f.map(Wt),m=T.useRef(!0),p=T.useRef(f),y=mn(()=>new Map),[x,v]=T.useState(f),[b,g]=T.useState(f);ri(()=>{m.current=!1,p.current=f;for(let P=0;P<b.length;P++){const A=Wt(b[P]);h.includes(A)?y.delete(A):y.get(A)!==!0&&y.set(A,!1)}},[b,h.length,h.join("-")]);const E=[];if(f!==x){let P=[...f];for(let A=0;A<b.length;A++){const R=b[A],V=Wt(R);h.includes(V)||(P.splice(A,0,R),E.push(R))}return o==="wait"&&E.length&&(P=E),g(vr(P)),v(f),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 d.jsx(d.Fragment,{children:b.map(P=>{const A=Wt(P),R=r&&!u?!1:f===b||h.includes(A),V=()=>{if(y.has(A))y.set(A,!0);else return;let I=!0;y.forEach(U=>{U||(I=!1)}),I&&(C?.(),g(p.current),r&&c?.(),s&&s())};return d.jsx(Hc,{isPresent:R,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:o,root:l,onExitComplete:R?void 0:V,anchorX:a,children:P},A)})})},xr=T.createContext({strict:!1}),br={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 br)qe[e]={isEnabled:t=>br[e].some(n=>!!t[n])};function Gc(e){for(const t in e)qe[t]={...qe[t],...e[t]}}const qc=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Ut(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||qc.has(e)}let wr=e=>!Ut(e);function Zc(e){typeof e=="function"&&(wr=t=>t.startsWith("on")?!Ut(t):e(t))}try{Zc(require("@emotion/is-prop-valid").default)}catch{}function Jc(e,t,n){const s={};for(const i in e)i==="values"&&typeof e.values=="object"||(wr(i)||n===!0&&Ut(i)||!t&&!Ut(i)||e.draggable&&i.startsWith("onDrag"))&&(s[i]=e[i]);return s}const zt=T.createContext({});function Kt(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function vt(e){return typeof e=="string"||Array.isArray(e)}const rs=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],os=["initial",...rs];function Xt(e){return Kt(e.animate)||os.some(t=>vt(e[t]))}function Tr(e){return!!(Xt(e)||e.variants)}function Qc(e,t){if(Xt(e)){const{initial:n,animate:s}=e;return{initial:n===!1||vt(n)?n:void 0,animate:vt(s)?s:void 0}}return e.inherit!==!1?t:{}}function eu(e){const{initial:t,animate:n}=Qc(e,T.useContext(zt));return T.useMemo(()=>({initial:t,animate:n}),[Sr(t),Sr(n)])}function Sr(e){return Array.isArray(e)?e.join(" "):e}const xt={};function tu(e){for(const t in e)xt[t]=e[t],Pn(t)&&(xt[t].isCSSVariable=!0)}function Cr(e,{layout:t,layoutId:n}){return Ye.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!xt[e]||e==="opacity")}const nu={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},su=He.length;function iu(e,t,n){let s="",i=!0;for(let o=0;o<su;o++){const r=He[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=ar(a,Qn[r]);if(!l){i=!1;const c=nu[r]||r;s+=`${c}(${u}) `}n&&(t[r]=u)}}return s=s.trim(),n?s=n(t,i?"":s):i&&(s="none"),s}function as(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(Ye.has(l)){r=!0;continue}else if(Pn(l)){i[l]=u;continue}else{const c=ar(u,Qn[l]);l.startsWith("origin")?(a=!0,o[l]=c):s[l]=c}}if(t.transform||(r||n?s.transform=iu(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 ls=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Pr(e,t,n){for(const s in t)!H(t[s])&&!Cr(s,n)&&(e[s]=t[s])}function ru({transformTemplate:e},t){return T.useMemo(()=>{const n=ls();return as(n,t,e),Object.assign({},n.vars,n.style)},[t])}function ou(e,t){const n=e.style||{},s={};return Pr(s,n,e),Object.assign(s,ru(e,t)),s}function au(e,t){const n={},s=ou(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 lu={offset:"stroke-dashoffset",array:"stroke-dasharray"},cu={offset:"strokeDashoffset",array:"strokeDasharray"};function uu(e,t,n=1,s=0,i=!0){e.pathLength=1;const o=i?lu:cu;e[o.offset]=j.transform(-s);const r=j.transform(t),a=j.transform(n);e[o.array]=`${r} ${a}`}function Er(e,{attrX:t,attrY:n,attrScale:s,pathLength:i,pathSpacing:o=1,pathOffset:r=0,...a},l,u,c){if(as(e,a,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:h}=e;f.transform&&(h.transform=f.transform,delete f.transform),(h.transform||f.transformOrigin)&&(h.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),h.transform&&(h.transformBox=c?.transformBox??"fill-box",delete f.transformBox),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),s!==void 0&&(f.scale=s),i!==void 0&&uu(f,i,o,r,!1)}const Ar=()=>({...ls(),attrs:{}}),Rr=e=>typeof e=="string"&&e.toLowerCase()==="svg";function fu(e,t,n,s){const i=T.useMemo(()=>{const o=Ar();return Er(o,t,Rr(s),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};Pr(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 cs(e){return typeof e!="string"||e.includes("-")?!1:!!(du.indexOf(e)>-1||/[A-Z]/u.test(e))}function hu(e,t,n,{latestValues:s},i,o=!1){const a=(cs(e)?fu:au)(t,s,i,e),l=Jc(t,typeof e=="string",o),u=e!==T.Fragment?{...l,...a,ref:n}:{},{children:c}=t,f=T.useMemo(()=>H(c)?c.get():c,[c]);return T.createElement(e,{...u,children:f})}function jr(e){const t=[{},{}];return e?.values.forEach((n,s)=>{t[0][s]=n.get(),t[1][s]=n.getVelocity()}),t}function us(e,t,n,s){if(typeof t=="function"){const[i,o]=jr(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]=jr(s);t=t(n!==void 0?n:e.custom,i,o)}return t}function Ht(e){return H(e)?e.get():e}function mu({scrapeMotionValuesFromProps:e,createRenderState:t},n,s,i){return{latestValues:pu(n,s,i,e),renderState:t()}}function pu(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=Xt(e),u=Tr(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 f=c?a:r;if(f&&typeof f!="boolean"&&!Kt(f)){const h=Array.isArray(f)?f:[f];for(let m=0;m<h.length;m++){const p=us(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 Dr=e=>(t,n)=>{const s=T.useContext(zt),i=T.useContext(Vt),o=()=>mu(e,t,s,i);return n?o():mn(o)};function fs(e,t,n){const{style:s}=e,i={};for(const o in s)(H(s[o])||t.style&&H(t.style[o])||Cr(o,e)||n?.getValue(o)?.liveStyle!==void 0)&&(i[o]=s[o]);return i}const gu=Dr({scrapeMotionValuesFromProps:fs,createRenderState:ls});function Mr(e,t,n){const s=fs(e,t,n);for(const i in e)if(H(e[i])||H(t[i])){const o=He.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[o]=e[i]}return s}const yu=Dr({scrapeMotionValuesFromProps:Mr,createRenderState:Ar}),vu=Symbol.for("motionComponentSymbol");function Ze(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function xu(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(),kr="data-"+ds("framerAppearId"),Nr=T.createContext({});function bu(e,t,n,s,i){const{visualElement:o}=T.useContext(zt),r=T.useContext(xr),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,f=T.useContext(Nr);c&&!c.projection&&i&&(c.type==="html"||c.type==="svg")&&wu(u.current,n,i,f);const h=T.useRef(!1);T.useInsertionEffect(()=>{c&&h.current&&c.update(n,a)});const m=n[kr],p=T.useRef(!!m&&!window.MotionHandoffIsComplete?.(m)&&window.MotionHasOptimisedAnimation?.(m));return ri(()=>{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 wu(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:Vr(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 Vr(e){if(e)return e.options.allowProjection!==!1?e.projection:Vr(e.parent)}function hs(e,{forwardMotionProps:t=!1}={},n,s){n&&Gc(n);const i=cs(e)?yu:gu;function o(a,l){let u;const c={...T.useContext(ss),...a,layoutId:Tu(a)},{isStatic:f}=c,h=eu(a),m=i(a,f);if(!f&&pn){Su(c,n);const p=Cu(c);u=p.MeasureLayout,h.visualElement=bu(e,m,c,s,p.ProjectionNode)}return d.jsxs(zt.Provider,{value:h,children:[u&&h.visualElement?d.jsx(u,{visualElement:h.visualElement,...c}):null,hu(e,a,xu(m,h.visualElement,l),m,f,t)]})}o.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const r=T.forwardRef(o);return r[vu]=e,r}function Tu({layoutId:e}){const t=T.useContext(hn).id;return t&&e!==void 0?t+"-"+e:e}function Su(e,t){const n=T.useContext(xr).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 Cu(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 Pu(e,t){if(typeof Proxy>"u")return hs;const n=new Map,s=(o,r)=>hs(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,hs(r,void 0,e,t)),n.get(r))})}function Ir({top:e,left:t,right:n,bottom:s}){return{x:{min:t,max:n},y:{min:e,max:s}}}function Eu({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Au(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 ms(e){return e===void 0||e===1}function ps({scale:e,scaleX:t,scaleY:n}){return!ms(e)||!ms(t)||!ms(n)}function Le(e){return ps(e)||Or(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Or(e){return Lr(e.x)||Lr(e.y)}function Lr(e){return e&&e!=="0%"}function Yt(e,t,n){const s=e-n,i=t*s;return n+i}function Fr(e,t,n,s,i){return i!==void 0&&(e=Yt(e,i,s)),Yt(e,n,s)+t}function gs(e,t=0,n=1,s,i){e.min=Fr(e.min,t,n,s,i),e.max=Fr(e.max,t,n,s,i)}function Br(e,{x:t,y:n}){gs(e.x,t.translate,t.scale,t.originPoint),gs(e.y,n.translate,n.scale,n.originPoint)}const _r=.999999999999,$r=1.0000000000001;function Ru(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,Br(e,r)),s&&Le(o.latestValues)&&Qe(e,o.latestValues))}t.x<$r&&t.x>_r&&(t.x=1),t.y<$r&&t.y>_r&&(t.y=1)}function Je(e,t){e.min=e.min+t,e.max=e.max+t}function Wr(e,t,n,s,i=.5){const o=F(e.min,e.max,i);gs(e,t,n,o,s)}function Qe(e,t){Wr(e.x,t.x,t.scaleX,t.scale,t.originX),Wr(e.y,t.y,t.scaleY,t.scale,t.originY)}function Ur(e,t){return Ir(Au(e.getBoundingClientRect(),t))}function ju(e,t,n){const s=Ur(e,n),{scroll:i}=t;return i&&(Je(s.x,i.offset.x),Je(s.y,i.offset.y)),s}const zr=()=>({translate:0,scale:1,origin:0,originPoint:0}),et=()=>({x:zr(),y:zr()}),Kr=()=>({min:0,max:0}),W=()=>({x:Kr(),y:Kr()}),ys={current:null},Xr={current:!1};function Du(){if(Xr.current=!0,!!pn)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ys.current=e.matches;e.addEventListener("change",t),t()}else ys.current=!1}const Mu=new WeakMap;function ku(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,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 Hr=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Nu{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=Xt(n),this.isVariantNode=Tr(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in f){const m=f[h];l[h]!==void 0&&H(m)&&m.set(l[h])}}mount(t){this.current=t,Mu.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)),Xr.current||Du(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ys.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(),Ee(this.notifyUpdate),Ee(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=Ye.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<Hr.length;s++){const i=Hr[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=ku(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"&&(oi(s)||li(s))?s=parseFloat(s):!zc(s)&&Re.test(n)&&(s=or(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=us(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 bn),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){es.render(this.render)}}class Yr extends Nu{constructor(){super(...arguments),this.KeyframeResolver=kc}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 Gr(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 Vu(e){return window.getComputedStyle(e)}class Iu extends Yr{constructor(){super(...arguments),this.type="html",this.renderInstance=Gr}readValueFromInstance(t,n){if(Ye.has(n))return this.projection?.isProjecting?zn(n):Zl(t,n);{const s=Vu(t),i=(Pn(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Ur(t,n)}build(t,n,s){as(t,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,n,s){return fs(t,n,s)}}const qr=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 Ou(e,t,n,s){Gr(e,t,void 0,s);for(const i in t.attrs)e.setAttribute(qr.has(i)?i:ds(i),t.attrs[i])}class Lu extends Yr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=W}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ye.has(n)){const s=rr(n);return s&&s.default||0}return n=qr.has(n)?n:ds(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,s){return Mr(t,n,s)}build(t,n,s){Er(t,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(t,n,s,i){Ou(t,n,s,i)}mount(t){this.isSVGTag=Rr(t.tagName),super.mount(t)}}const Fu=(e,t)=>cs(e)?new Lu(t):new Iu(t,{allowProjection:e!==T.Fragment});function tt(e,t,n){const s=e.getProps();return us(s,t,n!==void 0?n:s.custom,e)}const vs=e=>Array.isArray(e);function Bu(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ge(n))}function _u(e){return vs(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=_u(o[r]);Bu(e,r,a)}}function Wu(e){return!!(H(e)&&e.add)}function xs(e,t){const n=e.getValue("willChange");if(Wu(n))return n.add(t);if(!n&&Se.WillChange){const s=new Se.WillChange("auto");e.addValue("willChange",s),s.add(t)}}function Zr(e){return e.props[kr]}const Uu=e=>e!==null;function zu(e,{repeat:t,repeatType:n="loop"},s){const i=e.filter(Uu),o=t&&n!=="loop"&&t%2===1?0:i.length-1;return i[o]}const Ku={type:"spring",stiffness:500,damping:25,restSpeed:10},Xu=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Hu={type:"keyframes",duration:.8},Yu={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Gu=(e,{keyframes:t})=>t.length>2?Hu:Ye.has(e)?e.startsWith("scale")?Xu(t[1]):Ku:Yu;function qu({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 bs=(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};qu(a)||Object.assign(c,Gu(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 f=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(qn(c),c.delay===0&&(f=!0)),(Se.instantAnimations||Se.skipAnimations)&&(f=!0,qn(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,f&&!o&&t.get()!==void 0){const h=zu(c.keyframes,a);if(h!==void 0){L.update(()=>{c.onUpdate(h),c.onComplete()});return}}return a.isSync?new $n(c):new bc(c)};function Zu({protectedKeys:e,needsAnimating:t},n){const s=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,s}function Jr(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 f=e.getValue(c,e.latestValues[c]??null),h=a[c];if(h===void 0||u&&Zu(u,c))continue;const m={delay:n,...Zn(o||{},c)},p=f.get();if(p!==void 0&&!f.isAnimating&&!Array.isArray(h)&&h===p&&!m.velocity)continue;let y=!1;if(window.MotionHandoffAnimation){const v=Zr(e);if(v){const b=window.MotionHandoffAnimation(v,c,L);b!==null&&(m.startTime=b,y=!0)}}xs(e,c),f.start(bs(c,f,h,e.shouldReduceMotion&&er.has(c)?{type:!1}:m,e,y));const x=f.animation;x&&l.push(x)}return r&&Promise.all(l).then(()=>{L.update(()=>{r&&$u(e,r)})}),l}function Qr(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 ws(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(Jr(e,s,n)):()=>Promise.resolve(),r=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:c,staggerDirection:f}=i;return Ju(e,t,l,u,c,f,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 Ju(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(ws(l,t,{...r,delay:n+(typeof s=="function"?0:s)+Qr(e.variantChildren,l,s,i,o)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function Qu(e,t,n={}){e.notify("AnimationStart",t);let s;if(Array.isArray(t)){const i=t.map(o=>ws(e,o,n));s=Promise.all(i)}else if(typeof t=="string")s=ws(e,t,n);else{const i=typeof t=="function"?tt(e,t,n.custom):t;s=Promise.all(Jr(e,i,n))}return s.then(()=>{e.notify("AnimationComplete",t)})}function eo(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 ef=os.length;function to(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?to(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<ef;n++){const s=os[n],i=e.props[s];(vt(i)||i===!1)&&(t[s]=i)}return t}const tf=[...rs].reverse(),nf=rs.length;function sf(e){return t=>Promise.all(t.map(({animation:n,options:s})=>Qu(e,n,s)))}function rf(e){let t=sf(e),n=no(),s=!0;const i=l=>(u,c)=>{const f=tt(e,c,l==="exit"?e.presenceContext?.custom:void 0);if(f){const{transition:h,transitionEnd:m,...p}=f;u={...u,...p,...m}}return u};function o(l){t=l(e)}function r(l){const{props:u}=e,c=to(e.parent)||{},f=[],h=new Set;let m={},p=1/0;for(let x=0;x<nf;x++){const v=tf[x],b=n[v],g=u[v]!==void 0?u[v]:c[v],E=vt(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||Kt(g)||typeof g=="boolean")continue;const A=of(b.prevProp,g);let R=A||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=_=>{R=!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;vs(N)&&vs(J)?w=!eo(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&&(R=!1);const xe=P&&A;R&&(!xe||V)&&f.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:M}=w.transition||{};N.delay=Qr(J.enteringChildren,e,M)}}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}),f.push({animation:x})}let y=!!f.length;return s&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(y=!1),s=!1,y?t(f):Promise.resolve()}function a(l,u){if(n[l].isActive===u)return Promise.resolve();e.variantChildren?.forEach(f=>f.animationState?.setActive(l,u)),n[l].isActive=u;const c=r(l);for(const f in n)n[f].protectedKeys={};return c}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=no(),s=!0}}}function of(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!eo(t,e):!1}function Fe(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function no(){return{animate:Fe(!0),whileInView:Fe(),whileHover:Fe(),whileTap:Fe(),whileDrag:Fe(),whileFocus:Fe(),exit:Fe()}}class je{constructor(t){this.isMounted=!1,this.node=t}update(){}}class af extends je{constructor(t){super(t),t.animationState||(t.animationState=rf(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Kt(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let lf=0;class cf extends je{constructor(){super(...arguments),this.id=lf++}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 uf={animation:{Feature:af},exit:{Feature:cf}};function bt(e,t,n,s={passive:!0}){return e.addEventListener(t,n,s),()=>e.removeEventListener(t,n)}function wt(e){return{point:{x:e.pageX,y:e.pageY}}}const ff=e=>t=>ts(t)&&e(t,wt(t));function Tt(e,t,n,s){return bt(e,t,ff(n),s)}const so=1e-4,df=1-so,hf=1+so,io=.01,mf=0-io,pf=0+io;function Z(e){return e.max-e.min}function gf(e,t,n){return Math.abs(e-t)<=n}function ro(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>=df&&e.scale<=hf||isNaN(e.scale))&&(e.scale=1),(e.translate>=mf&&e.translate<=pf||isNaN(e.translate))&&(e.translate=0)}function St(e,t,n,s){ro(e.x,t.x,n.x,s?s.originX:void 0),ro(e.y,t.y,n.y,s?s.originY:void 0)}function oo(e,t,n){e.min=n.min+t.min,e.max=e.min+Z(t)}function yf(e,t,n){oo(e.x,t.x,n.x),oo(e.y,t.y,n.y)}function ao(e,t,n){e.min=t.min-n.min,e.max=e.min+Z(t)}function Ct(e,t,n){ao(e.x,t.x,n.x),ao(e.y,t.y,n.y)}function re(e){return[e("x"),e("y")]}const lo=({current:e})=>e?e.ownerDocument.defaultView:null,co=(e,t)=>Math.abs(e-t);function vf(e,t){const n=co(e.x,t.x),s=co(e.y,t.y);return Math.sqrt(n**2+s**2)}class uo{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=Ss(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,p=vf(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=Ts(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=Ss(h.type==="pointercancel"?this.lastMoveEventInfo:Ts(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=wt(t),l=Ts(a,this.transformPagePoint),{point:u}=l,{timestamp:c}=X;this.history=[{...u,timestamp:c}];const{onSessionStart:f}=n;f&&f(t,Ss(l,this.history)),this.removeListeners=ut(Tt(this.contextWindow,"pointermove",this.handlePointerMove),Tt(this.contextWindow,"pointerup",this.handlePointerUp),Tt(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ee(this.updatePoint)}}function Ts(e,t){return t?{point:t(e.point)}:e}function fo(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ss({point:e},t){return{point:e,delta:fo(e,ho(t)),offset:fo(e,xf(t)),velocity:bf(t,.1)}}function xf(e){return e[0]}function ho(e){return e[e.length-1]}function bf(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,s=null;const i=ho(e);for(;n>=0&&(s=e[n],!(i.timestamp-s.timestamp>le(t)));)n--;if(!s)return{x:0,y:0};const o=de(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 wf(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 mo(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 Tf(e,{top:t,left:n,bottom:s,right:i}){return{x:mo(e.x,n,i),y:mo(e.y,t,s)}}function po(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 Sf(e,t){return{x:po(e.x,t.x),y:po(e.y,t.y)}}function Cf(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 Pf(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 Cs=.35;function Ef(e=Cs){return e===!1?e=0:e===!0&&(e=Cs),{x:go(e,"left","right"),y:go(e,"top","bottom")}}function go(e,t,n){return{min:yo(e,t),max:yo(e,n)}}function yo(e,t){return typeof e=="number"?e:e[t]||0}const Af=new WeakMap;class Rf{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=f=>{const{dragSnapToOrigin:h}=this.getProps();h?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(wt(f).point)},r=(f,h)=>{const{drag:m,dragPropagation:p,onDragStart:y}=this.getProps();if(m&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Oc(m),!this.openDragLock))return;this.latestPointerEvent=f,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(f,h)),xs(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},a=(f,h)=>{this.latestPointerEvent=f,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=jf(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(f,h)},l=(f,h)=>{this.latestPointerEvent=f,this.latestPanInfo=h,this.stop(f,h),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>re(f=>this.getAnimationState(f)==="paused"&&this.getAxisMotionValue(f).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new uo(t,{onSessionStart:o,onStart:r,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:s,contextWindow:lo(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||!Gt(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let r=this.originPoint[t]+s[t];this.constraints&&this.constraints[t]&&(r=wf(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=Tf(s.layoutBox,t):this.constraints=!1,this.elastic=Ef(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&re(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Pf(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=ju(s,i.root,this.visualElement.getTransformPagePoint());let r=Sf(i.layout.layoutBox,o);if(n){const a=n(Eu(r));this.hasMutatedConstraints=!!a,a&&(r=Ir(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(!Gt(c,n,this.currentDirection))return;let f=l&&l[c]||{};r&&(f={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,...f};return this.startAxisValueAnimation(c,p)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const s=this.getAxisMotionValue(t);return xs(this.visualElement,t),s.start(bs(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(!Gt(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]=Cf({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(!Gt(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;Af.set(this.visualElement,this);const t=this.visualElement.current,n=Tt(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=bt(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(re(c=>{const f=this.getAxisMotionValue(c);f&&(this.originPoint[c]+=l[c].translate,f.set(f.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=Cs,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function Gt(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function jf(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Df extends je{constructor(t){super(t),this.removeGroupControls=ie,this.removeListeners=ie,this.controls=new Rf(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 vo=e=>(t,n)=>{e&&L.postRender(()=>e(t,n))};class Mf extends je{constructor(){super(...arguments),this.removePointerDownListener=ie}onPointerDown(t){this.session=new uo(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:lo(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:vo(t),onStart:vo(n),onMove:s,onEnd:(o,r)=>{delete this.session,i&&L.postRender(()=>i(o,r))}}}mount(){this.removePointerDownListener=Tt(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 qt={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function xo(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Pt={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(j.test(e))e=parseFloat(e);else return e;const n=xo(e,t.target.x),s=xo(e,t.target.y);return`${n}% ${s}%`}},kf={correct:(e,{treeScale:t,projectionDelta:n})=>{const s=e,i=Re.parse(e);if(i.length>5)return s;const o=Re.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 Ps=!1;class Nf extends T.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=t;tu(Vf),o&&(n.group&&n.group.add(o),s&&s.register&&i&&s.register(o),Ps&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),qt.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,{projection:r}=s;return r&&(r.isPresent=o,Ps=!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;Ps=!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 bo(e){const[t,n]=yr(),s=T.useContext(hn);return d.jsx(Nf,{...e,layoutGroup:s,switchLayoutGroup:T.useContext(Nr),isPresent:t,safeToRemove:n})}const Vf={borderRadius:{...Pt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Pt,borderTopRightRadius:Pt,borderBottomLeftRadius:Pt,borderBottomRightRadius:Pt,boxShadow:kf};function If(e,t,n){const s=H(e)?e:Ge(e);return s.start(bs("",s,t,n)),s.animation}const Of=(e,t)=>e.depth-t.depth;class Lf{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(Of),this.isDirty=!1,this.children.forEach(t)}}function Ff(e,t){const n=Q.now(),s=({timestamp:i})=>{const o=i-n;o>=t&&(Ee(s),e(o-t))};return L.setup(s,!0),()=>Ee(s)}const wo=["TopLeft","TopRight","BottomLeft","BottomRight"],Bf=wo.length,To=e=>typeof e=="string"?parseFloat(e):e,So=e=>typeof e=="number"||j.test(e);function _f(e,t,n,s,i,o){i?(e.opacity=F(0,n.opacity??1,$f(s)),e.opacityExit=F(t.opacity??1,0,Wf(s))):o&&(e.opacity=F(t.opacity??1,n.opacity??1,s));for(let r=0;r<Bf;r++){const a=`border${wo[r]}Radius`;let l=Co(t,a),u=Co(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||So(l)===So(u)?(e[a]=Math.max(F(To(l),To(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 Co(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const $f=Po(0,.5,yi),Wf=Po(.5,.95,ie);function Po(e,t,n){return s=>s<e?0:s>t?1:n(ft(e,t,s))}function Eo(e,t){e.min=t.min,e.max=t.max}function oe(e,t){Eo(e.x,t.x),Eo(e.y,t.y)}function Ao(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=Yt(e,1/n,s),i!==void 0&&(e=Yt(e,1/i,s)),e}function Uf(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 jo(e,t,[n,s,i],o,r){Uf(e,t[n],t[s],t[i],t.scale,o,r)}const zf=["x","scaleX","originX"],Kf=["y","scaleY","originY"];function Do(e,t,n,s){jo(e.x,t,zf,n?n.x:void 0,s?s.x:void 0),jo(e.y,t,Kf,n?n.y:void 0,s?s.y:void 0)}function Mo(e){return e.translate===0&&e.scale===1}function ko(e){return Mo(e.x)&&Mo(e.y)}function No(e,t){return e.min===t.min&&e.max===t.max}function Xf(e,t){return No(e.x,t.x)&&No(e.y,t.y)}function Vo(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Io(e,t){return Vo(e.x,t.x)&&Vo(e.y,t.y)}function Oo(e){return Z(e.x)/Z(e.y)}function Lo(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Hf{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 Yf(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:f,rotateY:h,skewX:m,skewY:p}=n;u&&(s=`perspective(${u}px) ${s}`),c&&(s+=`rotate(${c}deg) `),f&&(s+=`rotateX(${f}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 Es=["","X","Y","Z"],Gf=1e3;let qf=0;function As(e,t,n,s){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),s&&(s[e]=0))}function Fo(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Zr(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&&Fo(s)}function Bo({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},a=t?.()){this.id=qf++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Qf),this.nodes.forEach(sd),this.nodes.forEach(id),this.nodes.forEach(ed)},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 Lf)}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=gr(r)&&!Wc(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,f=0;const h=()=>this.root.updateBlockedByResize=!1;L.read(()=>{f=window.innerWidth}),e(r,()=>{const m=window.innerWidth;m!==f&&(f=m,this.root.updateBlockedByResize=!0,c&&c(),c=Ff(h,250),qt.hasAnimatedSinceResize&&(qt.hasAnimatedSinceResize=!1,this.nodes.forEach(Wo)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:f,hasRelativeLayoutChanged:h,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||u.getDefaultTransition()||cd,{onLayoutAnimationStart:y,onLayoutAnimationComplete:x}=u.getProps(),v=!this.targetLayout||!Io(this.targetLayout,m),b=!f&&h;if(this.options.layoutRoot||this.resumeFrom||b||f&&(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 f||Wo(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(),Ee(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(rd),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&&Fo(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const f=this.path[c];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.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(_o);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach($o);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(nd),this.nodes.forEach(Zf),this.nodes.forEach(Jf)):this.nodes.forEach($o),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(td),this.sharedNodes.forEach(od)}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&&!ko(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;r&&this.instance&&(a||Le(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)),ud(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(fd))){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:f}=u;u!==this.root&&c&&f.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}),Le(c.latestValues)&&Qe(l,c.latestValues)}return Le(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||!Le(u.latestValues))continue;ps(u.latestValues)&&u.updateSnapshot();const c=W(),f=u.measurePageBox();oe(c,f),Do(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return Le(this.latestValues)&&Do(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:f}=this.options;if(!(!this.layout||!(c||f))){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(),Ct(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(),yf(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):oe(this.target,this.layout.layoutBox),Br(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(),Ct(this.relativeTargetOrigin,this.target,h.target),oe(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||ps(this.parent.latestValues)||Or(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 f=this.treeScale.x,h=this.treeScale.y;Ru(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():(Ao(this.prevProjectionDelta.x,this.projectionDelta.x),Ao(this.prevProjectionDelta.y,this.projectionDelta.y)),St(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!Lo(this.projectionDelta.x,this.prevProjectionDelta.x)||!Lo(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},f=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(ld));this.animationProgress=0;let g;this.mixTargetDelta=E=>{const C=E/1e3;Uo(f.x,r.x,C),Uo(f.y,r.y,C),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ct(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),ad(this.relativeTarget,this.relativeTargetOrigin,h,C),g&&Xf(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=W()),oe(g,this.relativeTarget)),y&&(this.animationValues=c,_f(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&&(Ee(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=L.update(()=>{qt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ge(0)),this.currentAnimation=If(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),r.onUpdate&&r.onUpdate(a)},onStop:()=>{},onComplete:()=>{r.onComplete&&r.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Gf),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&&Yo(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||W();const f=Z(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+f;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),St(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Hf),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&&As("z",r,u,this.animationValues);for(let c=0;c<Es.length;c++)As(`rotate${Es[c]}`,r,u,this.animationValues),As(`skew${Es[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&&!Le(this.latestValues)&&(r.transform=l?l({},""):"none",this.hasProjected=!1);return}r.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let f=Yf(this.projectionDeltaWithTransform,this.treeScale,c);l&&(f=l(c,f)),r.transform=f;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 xt){if(c[p]===void 0)continue;const{correct:y,applyTo:x,isCSSVariable:v}=xt[p],b=f==="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(_o),this.root.sharedNodes.clear()}}}function Zf(e){e.updateLayout()}function Jf(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=e.layout,{animationType:i}=e.options,o=t.source!==e.layout.source;i==="size"?re(c=>{const f=o?t.measuredBox[c]:t.layoutBox[c],h=Z(f);f.min=n[c].min,f.max=f.min+h}):Yo(i,t.layoutBox,n)&&re(c=>{const f=o?t.measuredBox[c]:t.layoutBox[c],h=Z(n[c]);f.max=f.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[c].max=e.relativeTarget[c].min+h)});const r=et();St(r,n,t.layoutBox);const a=et();o?St(a,e.applyTransform(s,!0),t.measuredBox):St(a,n,t.layoutBox);const l=!ko(r);let u=!1;if(!e.resumeFrom){const c=e.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:f,layout:h}=c;if(f&&h){const m=W();Ct(m,t.layoutBox,f.layoutBox);const p=W();Ct(p,n,h.layoutBox),Io(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 Qf(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function ed(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function td(e){e.clearSnapshot()}function _o(e){e.clearMeasurements()}function $o(e){e.isLayoutDirty=!1}function nd(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Wo(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function sd(e){e.resolveTargetDelta()}function id(e){e.calcProjection()}function rd(e){e.resetSkewAndRotation()}function od(e){e.removeLeadSnapshot()}function Uo(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 zo(e,t,n,s){e.min=F(t.min,n.min,s),e.max=F(t.max,n.max,s)}function ad(e,t,n,s){zo(e.x,t.x,n.x,s),zo(e.y,t.y,n.y,s)}function ld(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const cd={duration:.45,ease:[.4,0,.1,1]},Ko=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Xo=Ko("applewebkit/")&&!Ko("chrome/")?Math.round:ie;function Ho(e){e.min=Xo(e.min),e.max=Xo(e.max)}function ud(e){Ho(e.x),Ho(e.y)}function Yo(e,t,n){return e==="position"||e==="preserve-aspect"&&!gf(Oo(t),Oo(n),.2)}function fd(e){return e!==e.root&&e.scroll?.wasRoot}const dd=Bo({attachResizeListener:(e,t)=>bt(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Rs={current:void 0},Go=Bo({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Rs.current){const e=new dd({});e.mount(window),e.setOptions({layoutScroll:!0}),Rs.current=e}return Rs.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),hd={pan:{Feature:Mf},drag:{Feature:Df,ProjectionNode:Go,MeasureLayout:bo}};function qo(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,wt(t)))}class md extends je{mount(){const{current:t}=this.node;t&&(this.unmount=Lc(t,(n,s)=>(qo(this.node,s,"Start"),i=>qo(this.node,i,"End"))))}unmount(){}}class pd extends je{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=ut(bt(this.node.current,"focus",()=>this.onFocus()),bt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Zo(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,wt(t)))}class gd extends je{mount(){const{current:t}=this.node;t&&(this.unmount=$c(t,(n,s)=>(Zo(this.node,s,"Start"),(i,{success:o})=>Zo(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const js=new WeakMap,Ds=new WeakMap,yd=e=>{const t=js.get(e.target);t&&t(e)},vd=e=>{e.forEach(yd)};function xd({root:e,...t}){const n=e||document;Ds.has(n)||Ds.set(n,{});const s=Ds.get(n),i=JSON.stringify(t);return s[i]||(s[i]=new IntersectionObserver(vd,{root:e,...t})),s[i]}function bd(e,t,n){const s=xd(t);return js.set(e,n),s.observe(e),()=>{js.delete(e),s.unobserve(e)}}const wd={some:0,all:1};class Td extends je{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:wd[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:f}=this.node.getProps(),h=u?c:f;h&&h(l)};return bd(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(Sd(t,n))&&this.startObserver()}unmount(){}}function Sd({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Cd={...uf,...{inView:{Feature:Td},tap:{Feature:gd},focus:{Feature:pd},hover:{Feature:md}},...hd,...{layout:{ProjectionNode:Go,MeasureLayout:bo}}},Et=Pu(Cd,Fu),Pd=["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)"],Zt=e=>{const{speed:t=1,className:n}=e,s=1/t,i=2/t;return d.jsx(is,{children:d.jsx(Et.div,{role:"status",className:k("relative rounded-full",n),animate:{rotate:360},transition:{repeat:1/0,ease:"linear",duration:s},children:d.jsx(Et.div,{className:"absolute inset-0 rounded-full",style:{boxSizing:"border-box",borderStyle:"solid",borderWidth:2},animate:{clipPath:Pd},transition:{repeat:1/0,ease:"linear",duration:i,times:[0,.25,.5,.75,1]}})})})},Ed=`
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
31
  inline-flex flex-row items-center justify-center gap-2
32
32
  button-ring font-semibold ring-0 disabled:hover:ring-0 hover:ring-4 active:ring-1
33
33
  rounded-[var(--border-radius-input)]
34
34
  cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-4
35
35
  disabled:cursor-default
36
- `,Ad={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"},Rd={sm:"h-10 px-4",md:"h-12 px-6",lg:"h-14 px-8"},Jo=S.forwardRef((e,t)=>{const{variant:n="white",size:s="md",className:i,children:o,loading:r=!1,Icon:a,...l}=e;return d.jsxs("button",{ref:t,className:k(Ed,Ad[n],Rd[s],i),...l,children:[r&&d.jsx(Zt,{className:"h-5 w-5"}),!r&&d.jsxs(d.Fragment,{children:[a&&d.jsx(a,{className:"h-5 w-5 -ml-2"}),o]})]})}),jd=`
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
37
  inline-flex flex-row items-center justify-center aspect-square
38
38
  button-ring font-semibold ring-0 disabled:hover:ring-0 hover:ring-4 active:ring-1
39
39
  rounded-[var(--border-radius-input)]
40
40
  cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-4
41
41
  disabled:cursor-default
42
- `,Dd={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"},Md={sm:"h-10 w-10",md:"h-12 w-12",lg:"h-14 w-14"},Ms=S.forwardRef((e,t)=>{const{variant:n="white",size:s="md",className:i,Icon:o,...r}=e;return d.jsx("button",{ref:t,className:k(jd,Dd[n],Md[s],i),...r,children:d.jsx(o,{className:"h-5 w-5"})})}),kd=`
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
43
  inline-flex flex-row items-center justify-center aspect-square
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
- `,Nd={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"},Vd={sm:"h-10 w-10",md:"h-12 w-12",lg:"h-14 w-14"},Qo=S.forwardRef((e,t)=>{const{variant:n="white",size:s="md",className:i,Icon:o,...r}=e;return d.jsx("button",{ref:t,className:k(kd,Nd[n],Vd[s],i),...r,children:d.jsx(o,{className:"h-5 w-5"})})});/**
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"})})});/**
47
47
  * @license @tabler/icons-react v3.34.1 - MIT
48
48
  *
49
49
  * This source code is licensed under the MIT license.
50
50
  * See the LICENSE file in the root directory of this source tree.
51
- */var Id={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};/**
51
+ */var 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"}};/**
52
52
  * @license @tabler/icons-react v3.34.1 - MIT
53
53
  *
54
54
  * This source code is licensed under the MIT license.
55
55
  * See the LICENSE file in the root directory of this source tree.
56
- */const te=(e,t,n,s)=>{const i=T.forwardRef(({color:o="currentColor",size:r=24,stroke:a=2,title:l,className:u,children:c,...f},h)=>T.createElement("svg",{ref:h,...Id[e],width:r,height:r,className:["tabler-icon",`tabler-icon-${t}`,u].join(" "),...e==="filled"?{fill:o}:{strokeWidth:a,stroke:o},...f},[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};/**
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};/**
57
57
  * @license @tabler/icons-react v3.34.1 - MIT
58
58
  *
59
59
  * This source code is licensed under the MIT license.
60
60
  * See the LICENSE file in the root directory of this source tree.
61
- */const Od=te("outline","check","Check",[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]]);/**
61
+ */const If=te("outline","check","Check",[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]]);/**
62
62
  * @license @tabler/icons-react v3.34.1 - MIT
63
63
  *
64
64
  * This source code is licensed under the MIT license.
65
65
  * See the LICENSE file in the root directory of this source tree.
66
- */const Jt=te("outline","chevron-down","ChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]);/**
66
+ */const Qt=te("outline","chevron-down","ChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]);/**
67
67
  * @license @tabler/icons-react v3.34.1 - MIT
68
68
  *
69
69
  * This source code is licensed under the MIT license.
70
70
  * See the LICENSE file in the root directory of this source tree.
71
- */const Ld=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"}]]);/**
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"}]]);/**
72
72
  * @license @tabler/icons-react v3.34.1 - MIT
73
73
  *
74
74
  * This source code is licensed under the MIT license.
75
75
  * See the LICENSE file in the root directory of this source tree.
76
- */const Fd=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"}]]);/**
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"}]]);/**
77
77
  * @license @tabler/icons-react v3.34.1 - MIT
78
78
  *
79
79
  * This source code is licensed under the MIT license.
80
80
  * See the LICENSE file in the root directory of this source tree.
81
- */const ea=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"}]]);/**
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"}]]);/**
82
82
  * @license @tabler/icons-react v3.34.1 - MIT
83
83
  *
84
84
  * This source code is licensed under the MIT license.
85
85
  * See the LICENSE file in the root directory of this source tree.
86
- */const ta=te("outline","plus","Plus",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]]);/**
86
+ */const na=te("outline","plus","Plus",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]]);/**
87
87
  * @license @tabler/icons-react v3.34.1 - MIT
88
88
  *
89
89
  * This source code is licensed under the MIT license.
90
90
  * See the LICENSE file in the root directory of this source tree.
91
- */const na=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"}]]);/**
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"}]]);/**
92
92
  * @license @tabler/icons-react v3.34.1 - MIT
93
93
  *
94
94
  * This source code is licensed under the MIT license.
95
95
  * See the LICENSE file in the root directory of this source tree.
96
- */const ks=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"}]]);/**
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"}]]);/**
97
97
  * @license @tabler/icons-react v3.34.1 - MIT
98
98
  *
99
99
  * This source code is licensed under the MIT license.
100
100
  * See the LICENSE file in the root directory of this source tree.
101
- */const sa=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"}]]);/**
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"}]]);/**
102
102
  * @license @tabler/icons-react v3.34.1 - MIT
103
103
  *
104
104
  * This source code is licensed under the MIT license.
105
105
  * See the LICENSE file in the root directory of this source tree.
106
- */const Ce=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"}]]);/**
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"}]]);/**
107
107
  * @license @tabler/icons-react v3.34.1 - MIT
108
108
  *
109
109
  * This source code is licensed under the MIT license.
110
110
  * See the LICENSE file in the root directory of this source tree.
111
- */const At=te("outline","x","X",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);/**
111
+ */const nt=te("outline","x","X",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);/**
112
112
  * @license @tabler/icons-react v3.34.1 - MIT
113
113
  *
114
114
  * This source code is licensed under the MIT license.
115
115
  * See the LICENSE file in the root directory of this source tree.
116
- */const Bd=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"}]]);/**
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"}]]);/**
117
117
  * @license @tabler/icons-react v3.34.1 - MIT
118
118
  *
119
119
  * This source code is licensed under the MIT license.
120
120
  * See the LICENSE file in the root directory of this source tree.
121
- */const _d=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?d.jsx("label",{className:"text-gray-900 font-medium mb-1",children:t}):null},_e=()=>d.jsx("div",{className:"h-5 w-5",children:d.jsx(Bd,{className:"h-5 w-5 text-red-600"})}),$e=e=>{const{children:t,className:n}=e;return d.jsx("div",{className:k("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?d.jsx("div",{className:"text-gray-500 text-sm font-medium mt-2",children:t}):null},pe=e=>{const{children:t}=e;return t?d.jsx("div",{className:"text-red-600 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 d.jsxs("div",{className:k("flex flex-col",t),children:[d.jsx(Be,{children:n}),d.jsxs("div",{className:"flex flex-col relative",children:[i&&d.jsx(i,{className:"h-5 w-5 text-gray-900/60 absolute left-4 top-1/2 -translate-y-1/2"}),d.jsx("input",{className:k("h-12 border border-gray-200 text-gray-900 placeholder:text-gray-400 bg-white transition-all duration-150 rounded-xl shadow-sm ring-0 ring-gray-900/10 focus:ring-4 focus:outline-none",i?"pl-12 pr-4":"px-4",o&&"border-red-600 focus:ring-red-600/20 !pr-10"),...a}),d.jsxs($e,{children:[o&&d.jsx(_e,{}),r]})]}),d.jsx(me,{children:s}),d.jsx(pe,{children:o})]})},Pe=e=>{const{onClick:t,Icon:n}=e;return d.jsx("div",{onClick:t,className:k("h-6 w-6 select-none rounded-full p-0.5",t&&"ring-0 transition-all duration-150 ring-gray-200 active:ring-2 cursor-pointer hover:ring-4 group"),children:d.jsx(n,{className:k("h-5 w-5 text-gray-500",t&&"group-active:scale-[0.8] transition-transform origin-center")})})},$d=e=>{const{type:t="password",enableShowPasswordToggle:n=!0,...s}=e,[i,o]=T.useState(!1),r=()=>{o(!i)};return d.jsx(Ns,{type:i?"text":t,buttonTray:n?d.jsx(Pe,{Icon:i?Ld:Fd,onClick:r}):void 0,...s})},Wd=e=>{const{className:t,label:n,description:s,error:i,...o}=e;return d.jsxs("div",{className:k("flex flex-col",t),children:[d.jsx(Be,{children:n}),d.jsxs("div",{className:"flex flex-col relative",children:[d.jsx("textarea",{className:k("px-4 py-2.5 min-h-12 border border-gray-200 text-gray-900 placeholder:text-gray-400 bg-white transition-all duration-150 rounded-xl shadow-sm ring-0 ring-gray-900/10 focus:ring-4 focus:outline-none",i&&"border-red-600 focus:ring-red-600/20 !pr-10"),...o}),d.jsx($e,{className:"top-3.5 translate-y-0",children:i&&d.jsx(_e,{})})]}),d.jsx(me,{children:s}),d.jsx(pe,{children:i})]})},Ud=e=>{const{className:t,label:n,description:s,error:i,...o}=e;return d.jsxs("div",{className:k("flex flex-col",t),children:[d.jsxs("div",{className:"flex flex-row gap-3",children:[d.jsx("input",{type:"radio",className:"h-6 w-6 shrink-0 rounded-full border border-gray-300 shadow-sm ring-0 hover:ring-4 focus:ring-4 ring-gray-900/10 ring-offset-0 focus:outline-0 transition-all duration-150",...o}),n&&d.jsx("label",{htmlFor:e.id,className:k("text-gray-900 font-medium mb-1",e.id&&"cursor-pointer"),children:n})]}),d.jsx(me,{children:s}),d.jsx(pe,{children:i})]})},zd=e=>{const{className:t,label:n,description:s,error:i,...o}=e;return d.jsxs("div",{className:k("flex flex-col",t),children:[d.jsxs("div",{className:"flex flex-row gap-3",children:[d.jsxs("div",{className:"relative shrink-0 h-6 w-10",children:[d.jsx("input",{type:"checkbox",className:"appearance-none h-6 w-10 rounded-full checked:bg-transparent border border-gray-300 ring-0 hover:ring-4 focus:ring-4 ring-gray-900/10 ring-offset-0 focus:outline-0 transition-all duration-150",...o}),d.jsx("div",{className:k("rounded-full absolute border inset-0 mt-[2px] pointer-events-none transition-colors duration-150 ",e.checked?"bg-blue-600 border-blue-600":"bg-gray-300 border-gray-300"),children:d.jsx("div",{className:k("absolute top-1/2 -translate-y-1/2 left-1 h-4 w-4 rounded-full bg-white shadow-md transition-all duration-150",e.checked&&"translate-x-3.5 ")})})]}),n&&d.jsx("label",{htmlFor:e.id,className:k("text-gray-900 font-medium mb-1",e.id&&"cursor-pointer"),children:n})]}),d.jsx(me,{children:s}),d.jsx(pe,{children:i})]})},Kd=e=>{const{className:t,label:n,description:s,error:i,...o}=e;return d.jsxs("div",{className:k("flex flex-col",t),children:[d.jsxs("div",{className:"flex flex-row gap-3",children:[d.jsx("input",{type:"checkbox",className:"h-6 w-6 shrink-0 rounded-lg border border-gray-300 shadow-sm ring-0 hover:ring-4 focus:ring-4 ring-gray-900/10 ring-offset-0 focus:outline-0 transition-all duration-150",...o}),n&&d.jsx("label",{htmlFor:e.id,className:k("text-gray-900 font-medium mb-1",e.id&&"cursor-pointer"),children:n})]}),d.jsx(me,{children:s}),d.jsx(pe,{children:i})]})},Xd=e=>{const{className:t,label:n,description:s,options:i,error:o,...r}=e;return d.jsxs("div",{className:k("flex flex-col",t),children:[d.jsx(Be,{children:n}),d.jsxs("div",{className:"relative flex w-full flex-col",children:[d.jsx("select",{className:`
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
+
122
123
  appearance-none
123
- h-12
124
+ h-12
124
125
  pl-4
125
126
  pr-10
126
- border
127
- border-gray-200
128
- text-gray-900
129
- placeholder:text-gray-400
130
- bg-white
127
+ border
128
+ input-base
131
129
  bg-none
132
- transition-all
130
+ transition-all
133
131
  duration-150
134
132
  rounded-xl
135
- shadow-sm
133
+ shadow-sm
136
134
  ring-0
137
- ring-gray-900/10
138
135
  focus:ring-4
139
136
  focus:outline-none
140
- `,...r,children:i&&i.map((a,l)=>d.jsx("option",{value:a.value,disabled:a.disabled,children:a.label},l))}),d.jsxs($e,{children:[o&&d.jsx(_e,{}),d.jsx(Pe,{Icon:Jt})]})]}),d.jsx(me,{children:s}),d.jsx(pe,{children:o})]})},Rt=e=>{const{children:t,onClick:n,selected:s,disabled:i=!1}=e;return d.jsxs("div",{onClick:()=>!i&&n&&n(),className:k("hover:bg-gray-100 active:bg-gray-200 px-4 py-2 rounded-xl cursor-pointer transition-all duration-150 select-none flex flex-row gap-3 items-center",s&&!i&&"bg-blue-50 hover:bg-blue-100 active:bg-blue-100",i&&"text-gray-400 cursor-not-allowed hover:bg-transparent active:bg-transparent"),children:[d.jsx("div",{className:"flex-1",children:t}),s&&!i&&d.jsx("div",{className:"shrink-0",children:d.jsx(Od,{className:"h-5 w-5"})})]})};function Qt(){return typeof window<"u"}function nt(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 Qt()?e instanceof Node||e instanceof ne(e).Node:!1}function Y(e){return Qt()?e instanceof Element||e instanceof ne(e).Element:!1}function ye(e){return Qt()?e instanceof HTMLElement||e instanceof ne(e).HTMLElement:!1}function Is(e){return!Qt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ne(e).ShadowRoot}const Hd=new Set(["inline","contents"]);function jt(e){const{overflow:t,overflowX:n,overflowY:s,display:i}=ue(e);return/auto|scroll|overlay|hidden|clip/.test(t+s+n)&&!Hd.has(i)}const Yd=new Set(["table","td","th"]);function Gd(e){return Yd.has(nt(e))}const qd=[":popover-open",":modal"];function en(e){return qd.some(t=>{try{return e.matches(t)}catch{return!1}})}const Zd=["transform","translate","scale","rotate","perspective"],Jd=["transform","translate","scale","rotate","perspective","filter"],Qd=["paint","layout","strict","content"];function Os(e){const t=Ls(),n=Y(e)?ue(e):e;return Zd.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)||Jd.some(s=>(n.willChange||"").includes(s))||Qd.some(s=>(n.contain||"").includes(s))}function eh(e){let t=De(e);for(;ye(t)&&!st(t);){if(Os(t))return t;if(en(t))return null;t=De(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 st(e){return th.has(nt(e))}function ue(e){return ne(e).getComputedStyle(e)}function tn(e){return Y(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function De(e){if(nt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Is(e)&&e.host||ge(e);return Is(t)?t.host:t}function ia(e){const t=De(e);return st(t)?e.ownerDocument?e.ownerDocument.body:e.body:ye(t)&&jt(t)?t:ia(t)}function Dt(e,t,n){var s;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=ia(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||[],jt(i)?i:[],a&&n?Dt(a):[])}return t.concat(i,Dt(i,[],n))}function Fs(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Mt=Math.min,ae=Math.max,nn=Math.round,sn=Math.floor,ve=e=>({x:e,y:e});function ra(e,t){return typeof e=="function"?e(t):e}function Bs(e){return e.split("-")[0]}function oa(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 rn(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}}/*!
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}}/*!
141
138
  * tabbable 6.2.0
142
139
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
143
- */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(","),aa=typeof Element>"u",kt=aa?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,on=!aa&&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},an=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(an(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll($s));return n&&kt.call(t,$s)&&i.unshift(t),i=i.filter(s),i},fh=function e(t,n,s){for(var i=[],o=Array.from(t);o.length;){var r=o.shift();if(!an(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=kt.call(r,$s);c&&s.filter(r)&&(n||!t.includes(r))&&i.push(r);var f=r.shadowRoot||typeof s.getShadowRoot=="function"&&s.getShadowRoot(r),h=!an(f,!1)&&(!s.shadowRootFilter||s.shadowRootFilter(r));if(f&&h){var m=e(f===!0?r.children:f.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},la=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},ca=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||ch(t))&&!la(t)?0:t.tabIndex},dh=function(t,n){var s=ca(t);return s<0&&n&&!la(t)?0:s},hh=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},ua=function(t){return t.tagName==="INPUT"},mh=function(t){return ua(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||on(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 ua(t)&&t.type==="radio"},xh=function(t){return vh(t)&&!yh(t)},bh=function(t){var n,s=t&&on(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,f;s=on(i),i=(u=s)===null||u===void 0?void 0:u.host,o=!!((c=i)!==null&&c!==void 0&&(f=c.ownerDocument)!==null&&f!==void 0&&f.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=kt.call(t,"details>summary:first-of-type"),r=o?t.parentElement:t;if(kt.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=on(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 kt.call(n,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}n=n.parentElement}return!1},Sh=function(t,n){return!(n.disabled||an(n)||mh(n)||wh(n,t)||ph(n)||Th(n))},da=function(t,n){return!(xh(n)||ca(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=dh(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)},ha=function(t,n){n=n||{};var s;return n.getShadowRoot?s=fh([t],n.includeContainer,{filter:da.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Ch}):s=uh(t,n.includeContainer,da.bind(null,n)),Ph(s)};function Eh(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Ah(){return/apple/i.test(navigator.vendor)}function Rh(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 Dh=typeof document<"u",Mh=function(){},Me=Dh?T.useLayoutEffect:Mh;const kh={...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 kh(()=>{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 ma=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function pa(e,t){const n=ha(e,ma()),s=n.length;if(s===0)return;const i=Rh(Ws(e)),o=n.indexOf(i),r=o===-1?t===1?0:s-1:o+t;return n[r]}function Vh(e){return pa(Ws(e).body,1)||e}function Ih(e){return pa(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){ha(e,ma()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function ga(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 ya(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,f=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:f};break;case"left":m={x:s.x-i.width,y:f};break;default:m={x:s.x,y:s.y}}switch(oa(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:f}=ya(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:f,initialPlacement:s,placement:h,strategy:i,middlewareData:m,rects:u,platform:r,elements:{reference:e,floating:t}});c=b??c,f=g??f,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:f}=ya(u,h,l)),y=-1)}return{x:c,y:f,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:f="floating",altBoundary:h=!1,padding:m=0}=ra(t,e),p=ah(m),x=a[h?f==="floating"?"reference":"floating":f],v=rn(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=f==="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=rn(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}=ra(e,t),c=await Fh(t,u),f=Bs(i),h=oa(i),m=_s(i)==="y",{width:p,height:y}=o.floating;let x,v;f==="top"||f==="bottom"?(x=f,v=h===(await(r.isRTL==null?void 0:r.isRTL(a.floating))?"start":"end")?"left":"right"):(v=f,x=h==="end"?"top":"bottom");const b=y-c.top-c.bottom,g=p-c.left-c.right,E=Mt(y-c[x],b),C=Mt(p-c[v],g),P=!t.middlewareData.shift;let A=E,R=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(R=g),(s=t.middlewareData.shift)!=null&&s.enabled.y&&(A=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?R=p-2*(I!==0||U!==0?I+U:ae(c.left,c.right)):A=y-2*(se!==0||O!==0?se+O:ae(c.top,c.bottom))}await l({...t,availableWidth:R,availableHeight:A});const V=await r.getDimensions(a.floating);return p!==V.width||y!==V.height?{reset:{rects:!0}}:{}}}};function va(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=nn(n)!==o||nn(s)!==r;return a&&(n=o,s=r),{width:n,height:s,$:a}}function zs(e){return Y(e)?e:e.contextElement}function it(e){const t=zs(e);if(!ye(t))return ve(1);const n=t.getBoundingClientRect(),{width:s,height:i,$:o}=va(t);let r=(o?nn(n.width):n.width)/s,a=(o?nn(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 xa(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?Y(s)&&(r=it(s)):r=it(e));const a=$h(o,n,s)?xa(o):ve(0);let l=(i.left+a.x)/r.x,u=(i.top+a.y)/r.y,c=i.width/r.x,f=i.height/r.y;if(o){const h=ne(o),m=s&&Y(s)?ne(s):s;let p=h,y=Fs(p);for(;y&&s&&m!==p;){const x=it(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,f*=x.y,l+=g,u+=E,p=ne(y),y=Fs(p)}}return rn({width:c,height:f,x:l,y:u})}function ln(e,t){const n=tn(e).scrollLeft;return t?t.left+n:We(ge(e)).left+n}function ba(e,t){const n=e.getBoundingClientRect(),s=n.left+t.scrollLeft-ln(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?en(t.floating):!1;if(s===r||a&&o)return n;let l={scrollLeft:0,scrollTop:0},u=ve(1);const c=ve(0),f=ye(s);if((f||!f&&!o)&&((nt(s)!=="body"||jt(r))&&(l=tn(s)),ye(s))){const m=We(s);u=it(s),c.x=m.x+s.clientLeft,c.y=m.y+s.clientTop}const h=r&&!f&&!o?ba(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=tn(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+ln(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 wa=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=ln(s);if(u<=0){const c=s.ownerDocument,f=c.body,h=getComputedStyle(f),m=c.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,p=Math.abs(s.clientWidth-f.clientWidth-m);p<=wa&&(o-=p)}else u<=wa&&(o+=u);return{width:o,height:r,x:a,y:l}}const Xh=new Set(["absolute","fixed"]);function Hh(e,t){const n=We(e,!0,t==="fixed"),s=n.top+e.clientTop,i=n.left+e.clientLeft,o=ye(e)?it(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 Ta(e,t,n){let s;if(t==="viewport")s=Kh(e,n);else if(t==="document")s=zh(ge(e));else if(Y(t))s=Hh(t,n);else{const i=xa(e);s={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return rn(s)}function Sa(e,t){const n=De(e);return n===t||!Y(n)||st(n)?!1:ue(n).position==="fixed"||Sa(n,t)}function Yh(e,t){const n=t.get(e);if(n)return n;let s=Dt(e,[],!1).filter(a=>Y(a)&&nt(a)!=="body"),i=null;const o=ue(e).position==="fixed";let r=o?De(e):e;for(;Y(r)&&!st(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)||jt(r)&&!l&&Sa(e,r))?s=s.filter(c=>c!==r):i=a,r=De(r)}return t.set(e,s),s}function Gh(e){let{element:t,boundary:n,rootBoundary:s,strategy:i}=e;const r=[...n==="clippingAncestors"?en(t)?[]:Yh(t,this._c):[].concat(n),s],a=r[0],l=r.reduce((u,c)=>{const f=Ta(t,c,i);return u.top=ae(f.top,u.top),u.right=Mt(f.right,u.right),u.bottom=Mt(f.bottom,u.bottom),u.left=ae(f.left,u.left),u},Ta(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}=va(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=ln(i)}if(s||!s&&!o)if((nt(t)!=="body"||jt(i))&&(a=tn(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?ba(i,a):ve(0),f=r.left+a.scrollLeft-l.x-c.x,h=r.top+a.scrollTop-l.y-c.y;return{x:f,y:h,width:r.width,height:r.height}}function Ks(e){return ue(e).position==="static"}function Ca(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 Pa(e,t){const n=ne(e);if(en(e))return n;if(!ye(e)){let i=De(e);for(;i&&!st(i);){if(Y(i)&&!Ks(i))return i;i=De(i)}return n}let s=Ca(e,t);for(;s&&Gd(s)&&Ks(s);)s=Ca(s,t);return s&&st(s)&&Ks(s)&&!Os(s)?n:s||eh(e)||n}const Jh=async function(e){const t=this.getOffsetParent||Pa,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:Pa,getElementRects:Jh,getClientRects:Uh,getDimensions:qh,getScale:it,isElement:Y,isRTL:Qh};function Ea(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:f,width:h,height:m}=u;if(a||t(),!h||!m)return;const p=sn(f),y=sn(i.clientWidth-(c+h)),x=sn(i.clientHeight-(f+m)),v=sn(c),g={rootMargin:-p+"px "+-y+"px "+-x+"px "+-v+"px",threshold:ae(0,Mt(1,l))||1};let E=!0;function C(P){const A=P[0].intersectionRatio;if(A!==l){if(!E)return r();A?r(!1,A):s=setTimeout(()=>{r(!1,1e-7)},1e3)}A===1&&!Ea(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?Dt(u):[],...Dt(t)]:[];c.forEach(v=>{i&&v.addEventListener("scroll",n,{passive:!0}),o&&v.addEventListener("resize",n)});const f=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&&!Ea(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)}),f?.(),(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(){},cn=rm?T.useLayoutEffect:om;function un(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(!un(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)&&!un(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 Ra(e,t){const n=Aa(e);return Math.round(t*n)/n}function Xs(e){const t=S.useRef(e);return cn(()=>{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,f]=S.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=S.useState(s);un(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!==A.current&&(A.current=N,v(N))},[]),E=o||p,C=r||x,P=S.useRef(null),A=S.useRef(null),R=S.useRef(c),V=l!=null,I=Xs(l),U=Xs(i),se=Xs(u),O=S.useCallback(()=>{if(!P.current||!A.current)return;const N={placement:t,strategy:n,middleware:h};U.current&&(N.platform=U.current),im(P.current,A.current,N).then(J=>{const w={...J,isPositioned:se.current!==!1};K.current&&!un(R.current,w)&&(R.current=w,ti.flushSync(()=>{f(w)}))})},[h,t,n,U,se]);cn(()=>{u===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,f(N=>({...N,isPositioned:!1})))},[u]);const K=S.useRef(!1);cn(()=>(K.current=!0,()=>{K.current=!1}),[]),cn(()=>{if(E&&(P.current=E),C&&(A.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:A,setReference:b,setFloating:g}),[b,g]),fe=S.useMemo(()=>({reference:E,floating:C}),[E,C]),_=S.useMemo(()=>{const N={position:n,left:0,top:0};if(!fe.floating)return N;const J=Ra(fe.floating,c.x),w=Ra(fe.floating,c.y);return a?{...N,transform:"translate("+J+"px, "+w+"px)",...Aa(fe.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:J,top:w}},[n,a,fe.floating,c.x,c.y]);return S.useMemo(()=>({...c,update:O,refs:xe,elements:fe,floatingStyles:_}),[c,O,xe,fe,_])}const lm=(e,t)=>({...sm(e),options:[e,t]}),cm={...S};let ja=!1,um=0;const Da=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+um++;function fm(){const[e,t]=S.useState(()=>ja?Da():void 0);return Me(()=>{e==null&&t(Da())},[]),S.useEffect(()=>{ja=!0},[]),e}const Ma=cm.useId||fm;let Hs;process.env.NODE_ENV!=="production"&&(Hs=new Set);function dm(){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=Hs)!=null&&e.has(i))){var o;(o=Hs)==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 ka(e){return"data-floating-ui-"+e}const Na={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},Va=S.forwardRef(function(t,n){const[s,i]=S.useState();Me(()=>{Ah()&&i("button")},[]);const o={ref:n,tabIndex:0,role:s,"aria-hidden":s?void 0:!0,[ka("focus-guard")]:"",style:Na};return d.jsx("span",{...t,...o})}),Ia=S.createContext(null),Oa=ka("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 Me(()=>()=>{o?.remove(),queueMicrotask(()=>{a.current=null})},[o]),Me(()=>{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(Oa,""),l.appendChild(u),a.current=u,r(u)},[t,s]),Me(()=>{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(Oa,""),l=u||l,l.appendChild(c),a.current=c,r(c)},[t,n,s,i]),o}function La(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),f=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"?ga: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||ga(o))},[m,o]),d.jsxs(Ia.Provider,{value:S.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:l,afterOutsideRef:u,beforeInsideRef:c,afterInsideRef:f,portalNode:o,setFocusManagerState:a}),[i,o]),children:[p&&o&&d.jsx(Va,{"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&&d.jsx("span",{"aria-owns":o.id,style:Na}),o&&ti.createPortal(t,o),p&&o&&d.jsx(Va,{"data-type":"outside",ref:u,onFocus:y=>{if(Us(y,o)){var x;(x=f.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(Ia);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,f=((u=window.visualViewport)==null?void 0:u.offsetTop)||0;Object.assign(n,{position:"fixed",top:-(a-Math.floor(f))+"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 _a=S.forwardRef(function(t,n){const{lockScroll:s=!1,...i}=t;return Me(()=>{if(s)return fn++,fn===1&&(Ba=bm()),()=>{fn--,fn===0&&Ba()}},[s]),d.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&&!Y(m)&&dm("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)}),f=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:f}),[t,c,h,r,i,f])}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,f=S.useRef(null),h=ym();Me(()=>{c&&(f.current=c)},[c]);const m=am({...e,elements:{...i,...a&&{reference:a}}}),p=S.useCallback(g=>{const E=Y(g)?{getBoundingClientRect:()=>g.getBoundingClientRect(),getClientRects:()=>g.getClientRects(),contextElement:g}:g;l(E),m.refs.setReference(E)},[m.refs]),y=S.useCallback(g=>{(Y(g)||g===null)&&(f.current=g,r(g)),(Y(m.refs.reference.current)||m.refs.reference.current===null||g!==null&&!Y(g))&&m.refs.setReference(g)},[m.refs]),x=S.useMemo(()=>({...m.refs,setReference:y,setPositionReference:p,domReference:f}),[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 Me(()=>{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})=>d.jsx(La,{children:d.jsx(is,{children:e&&d.jsxs(d.Fragment,{children:[s&&d.jsx(_a,{onClick:s}),d.jsx("div",{ref:o,style:i,className:"z-50",children:d.jsx(Et.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})})]})})})),rt=e=>{const{placement:t="bottom",onOutsideClick:n,fullWidth:s,minWidth:i,maxWidth:o}=e,r=S.useMemo(()=>[lm({apply({rects:f,elements:h}){s&&(h.floating.style.width=`${f.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 f=h=>{const{floatingStyles:m,setFloating:p,onOutsideClick:y,placement:x}=u.current,{className:v,open:b,children:g}=h;return d.jsx($a,{open:b,className:v,onOutsideClick:y,floatingStyles:m,setFloating:p,placement:x,children:g})};return S.memo(f)},[]);return{anchorRef:a.setReference,Popover:c}},Cm="flex flex-col bg-white border mt-1 border-gray-200 rounded-xl shadow-lg overflow-y-auto relative space-y-1",Pm={sm:"p-2",md:"p-3",lg:"p-4"},ot=e=>{const{className:t,children:n,padding:s="md",...i}=e;return d.jsx("div",{className:k(Cm,Pm[s],t),...i,children:n})},dn=(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])},Wa=e=>{const{className:t,label:n,description:s,options:i,onChange:o,value:r,placeholder:a,maxHeight:l=300,error:u}=e,[c,f]=T.useState(!1),h=S.useRef(null),m=i?.find(x=>x.value===r);dn(c,()=>f(!1)),T.useEffect(()=>{c&&h.current?.focus({preventScroll:!0})},[c]);const{anchorRef:p,Popover:y}=rt({placement:"bottom",fullWidth:!0,onOutsideClick:()=>f(!1)});return d.jsxs("div",{className:k("flex flex-col",t),children:[d.jsx(Be,{children:n}),d.jsxs("div",{className:"relative flex w-full flex-col",ref:p,children:[d.jsxs("div",{ref:h,role:"button",tabIndex:0,className:k("flex flex-row items-center h-12 pl-4 pr-10 border border-gray-200 text-gray-900 placeholder:text-gray-400 bg-white transition-all duration-150 rounded-xl shadow-sm ring-0 ring-gray-900/10 focus:ring-4 focus:outline-none select-none",u&&"border-red-600 ring-red-600/20 !pr-10",c&&"ring-4"),onKeyDown:x=>x.key===" "&&f(v=>!v),onClick:()=>f(!c),children:[m&&d.jsx("span",{children:m.label}),!m&&a&&d.jsx("span",{className:"text-gray-500",children:a})]}),d.jsxs($e,{children:[u&&d.jsx(_e,{}),!!r&&d.jsx(Pe,{Icon:At,onClick:()=>o(null)}),d.jsx(Pe,{Icon:Jt})]}),d.jsx(y,{open:c,children:d.jsx(ot,{className:"!p-0",style:{maxHeight:l},children:d.jsx("div",{className:"flex flex-col p-2 gap-1",children:i.map(x=>{const v=x.value===r;return d.jsx(Rt,{onClick:()=>{!x.disabled&&o&&(o(x.value),f(!1))},selected:v,disabled:x.disabled,children:x.label},String(x.value))})})})})]}),d.jsx(me,{children:s}),d.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,[f,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);dn(f,()=>h(!1)),T.useEffect(()=>{p(r(y))},[y,i,r]),T.useEffect(()=>{f&&b.current?.focus()},[f]);const{anchorRef:E,Popover:C}=rt({placement:"bottom",fullWidth:!0,onOutsideClick:()=>h(!1)});return d.jsxs("div",{className:k("flex flex-col",t),children:[d.jsx(Be,{children:n}),d.jsxs("div",{className:"relative flex w-full flex-col",ref:E,children:[d.jsxs("div",{ref:v,role:"button",tabIndex:0,className:k("flex flex-row items-center h-12 pl-4 pr-10 border border-gray-200 text-gray-900 placeholder:text-gray-400 bg-white transition-all duration-150 rounded-xl shadow-sm ring-0 ring-gray-900/10 focus:ring-4 focus:outline-none select-none",c&&"border-red-600 ring-red-600/20 !pr-10",f&&"ring-4"),onKeyDown:P=>P.key===" "&&h(A=>!A),onClick:()=>h(!f),children:[g&&d.jsx("span",{children:g.label}),!g&&l&&d.jsx("span",{className:"text-gray-500",children:l})]}),d.jsxs($e,{children:[c&&d.jsx(_e,{}),!!a&&d.jsx(Pe,{Icon:At,onClick:()=>o(null)}),d.jsx(Pe,{Icon:Jt})]}),d.jsx(C,{open:f,children:d.jsxs(ot,{className:"gap-0 !p-0",style:{maxHeight:u},children:[d.jsxs("div",{className:"sticky top-0 border-b border-b-gray-200 py-1 bg-white/50 backdrop-blur-sm",children:[d.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-gray-400",onChange:P=>x(P.target.value)}),d.jsx(ks,{className:"absolute text-gray-500 left-4 top-4 h-4 w-4"})]}),d.jsxs("div",{className:"flex flex-col gap-1 p-2",children:[y!==""&&d.jsxs(d.Fragment,{children:[m.length===0&&d.jsx("div",{className:"flex flex-col items-center justify-center py-6",children:d.jsx(na,{className:"h-6 w-6 text-gray-900"})}),m.map(P=>{const A=P.value===a;return d.jsx(Rt,{onClick:()=>{!P.disabled&&o&&(o(P.value),h(!1))},selected:A,disabled:P.disabled,children:P.label},String(P.value))})]}),y===""&&d.jsx(d.Fragment,{children:i.map(P=>{const A=P.value===a;return d.jsx(Rt,{onClick:()=>{!P.disabled&&o&&(o(P.value),h(!1))},selected:A,disabled:P.disabled,children:P.label},String(P.value))})})]})]})})]}),d.jsx(me,{children:s}),d.jsx(pe,{children:c})]})},Am=(e,t)=>{const[n,s]=T.useState(e);return T.useEffect(()=>{const i=setTimeout(()=>{s(e)},t);return()=>{clearTimeout(i)}},[e,t]),n},Rm=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:f}=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,A]=T.useState(!1),[R,V]=T.useState(!1);dn(h,()=>m(!1));const I=Am(y,a);T.useEffect(()=>{(async()=>{A(!0);const K=await o(I);b(K),A(!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&&C.current?.focus()},[h]);const{anchorRef:U,Popover:se}=rt({placement:"bottom",fullWidth:!0,onOutsideClick:()=>m(!1)});return d.jsxs("div",{className:k("flex flex-col",t),children:[d.jsx(Be,{children:n}),d.jsxs("div",{className:"relative flex w-full flex-col",ref:U,children:[d.jsxs("div",{ref:p,role:"button",tabIndex:0,className:k("flex flex-row items-center h-12 pl-4 pr-10 border border-gray-200 text-gray-900 placeholder:text-gray-400 bg-white transition-all duration-150 rounded-xl shadow-sm ring-0 ring-gray-900/10 focus:ring-4 focus:outline-none select-none",f&&"border-red-600 ring-red-600/20 !pr-10",h&&"ring-4"),onKeyDown:O=>O.key===" "&&m(K=>!K),onClick:()=>m(!h),children:[!R&&g&&d.jsx("span",{children:g.label}),!R&&!g&&u&&d.jsx("span",{children:u}),R&&d.jsx(Zt,{className:"h-4 w-4 text-gray-600"})]}),d.jsxs($e,{children:[f&&d.jsx(_e,{}),!!l&&d.jsx(Pe,{Icon:At,onClick:()=>i(null)}),d.jsx(Pe,{Icon:Jt})]}),d.jsx(se,{open:h,children:d.jsxs(ot,{className:"gap-0 !p-0",style:{maxHeight:c},children:[d.jsxs("div",{className:"sticky top-0 border-b border-b-gray-200 py-1 bg-white/50 backdrop-blur-sm",children:[d.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-gray-400",onChange:O=>x(O.target.value)}),d.jsx(ks,{className:"absolute text-gray-500 left-4 top-4 h-4 w-4"})]}),d.jsxs("div",{className:"flex flex-col gap-1 p-2",children:[!P&&v.length===0&&d.jsx("div",{className:"flex flex-col items-center justify-center py-6",children:d.jsx(na,{className:"h-6 w-6 text-gray-900"})}),P&&d.jsx("div",{className:"flex flex-col items-center justify-center py-6",children:d.jsx(Zt,{className:"h-6 w-6 text-gray-900"})}),!P&&d.jsx(d.Fragment,{children:v.map(O=>{const K=O.value===l;return d.jsx(Rt,{onClick:()=>{!O.disabled&&i&&(i(O.value),m(!1))},selected:K,disabled:O.disabled,children:O.label},String(O.value))})})]})]})})]}),d.jsx(me,{children:s}),d.jsx(pe,{children:f})]})},jm=S.forwardRef((e,t)=>{const{className:n,children:s,...i}=e;return d.jsx("div",{ref:t,className:k("flex flex-col gap-6 border border-gray-200 rounded-2xl bg-white shadow-sm px-6 py-6",n),...i,children:s})}),Dm=e=>{const{className:t,vertical:n=!1,...s}=e;return d.jsx("div",{className:k(n?"w-px h-full bg-gray-200":"w-full h-px bg-gray-200",t),...s})},Mm=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}=rt({placement:i,minWidth:o,maxWidth:r});return d.jsxs("span",{ref:u,className:s,onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:[t,d.jsx(c,{open:a,children:d.jsx(ot,{children:n})})]})},km=e=>{const{open:t,onDismiss:n,enableDismissOnOutsideClick:s,enableDismissOnEscKey:i,enableDismissButton:o,className:r,children:a,maxWidth:l=600}=e;return dn(!!i&&t,n||(()=>{})),d.jsx(is,{children:t&&d.jsxs(La,{children:[d.jsx(Et.div,{style:{transformOrigin:"center"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15,ease:"easeInOut"},children:d.jsx(_a,{className:"bg-gray-400/30 backdrop-blur-[1px] z-10",onClick:s?n:void 0,lockScroll:!0})}),d.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:d.jsxs(Et.div,{className:k("flex flex-col bg-white 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&&d.jsx(Qo,{Icon:At,className:"absolute top-4 right-4",variant:"transparent",size:"sm",onClick:n}),a]})})]})})},Ua={red:"bg-red-100 text-red-700 ring-red-200",orange:"bg-orange-100 text-orange-700 ring-orange-200",amber:"bg-amber-100 text-amber-700 ring-amber-200",yellow:"bg-yellow-100 text-yellow-700 ring-yellow-200",lime:"bg-lime-100 text-lime-700 ring-lime-200",green:"bg-green-100 text-green-700 ring-green-200",emerald:"bg-emerald-100 text-emerald-700 ring-emerald-200",teal:"bg-teal-100 text-teal-700 ring-teal-200",cyan:"bg-cyan-100 text-cyan-700 ring-cyan-200",sky:"bg-sky-100 text-sky-700 ring-sky-200",blue:"bg-blue-100 text-blue-700 ring-blue-200",indigo:"bg-indigo-100 text-indigo-700 ring-indigo-200",violet:"bg-violet-100 text-violet-700 ring-violet-200",purple:"bg-purple-100 text-purple-700 ring-purple-200",fuchsia:"bg-fuchsia-100 text-fuchsia-700 ring-fuchsia-200",pink:"bg-pink-100 text-pink-700 ring-pink-200",rose:"bg-rose-100 text-rose-700 ring-rose-200",slate:"bg-slate-100 text-slate-700 ring-slate-200",gray:"bg-gray-100 text-gray-700 ring-gray-200",zinc:"bg-zinc-100 text-zinc-700 ring-zinc-200",neutral:"bg-neutral-100 text-neutral-700 ring-neutral-200",stone:"bg-stone-100 text-stone-700 ring-stone-200",white:"bg-white text-gray-900 ring-stone-200",black:"bg-black text-white ring-stone-200"},Ys=S.forwardRef((e,t)=>{const{className:n,children:s,onClick:i,showCloseIcon:o,Icon:r,color:a="gray"}=e,l=k("inline-flex align-top items-center gap-2 px-3 h-7 rounded-lg font-semibold",Ua[a],n);return i?d.jsx("div",{ref:t,children:d.jsxs("button",{className:k("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&&d.jsx(r,{className:"h-4 w-4 shrink-0"}),d.jsx("div",{className:"break-all line-clamp-1 text-left",children:s}),o&&d.jsx(At,{className:"h-4 w-4 shrink-0"})]})}):d.jsxs("div",{className:l,ref:t,children:[r&&d.jsx(r,{className:"h-4 w-4 shrink-0"}),d.jsx("div",{className:"break-all line-clamp-1 text-left",children:s})]})}),za=e=>{const{className:t,tabs:n}=e;return d.jsx("div",{className:k("h-12 bg-gray-100 p-1 rounded-xl inline-flex flex-row space-x-1 overflow-x-auto",t),children:n.map((s,i)=>{const o=k("shrink-0 px-4 h-full inline-flex flex-row items-center font-semibold rounded-xl cursor-pointer border border-transparent ing-0 hover:bg-gray-200 active:bg-gray-300/80 transition-all duration-150 select-none focus:outline-none focus:ring-0",s.active&&"bg-white shadow-sm !border-gray-300");return s.href?d.jsxs("a",{href:s.href,className:o,children:[s.Icon&&d.jsx(s.Icon,{className:"h-5 w-5 shrink-0 mr-2 -ml-1"}),s.label]},i):d.jsxs("button",{className:o,onClick:s.onClick,children:[s.Icon&&d.jsx(s.Icon,{className:"h-5 w-5 shrink-0 mr-2 -ml-1"}),s.label]},i)})})},Ka=T.createContext(void 0),Nm=()=>({dismiss:T.useContext(Ka)||(()=>{})}),Vm="inline-flex flex-row items-center gap-3 h-10 px-3 font-semibold ring-0 hover:bg-gray-100 active:bg-gray-200 rounded-lg cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-0 border border-transparent text-gray-900 bg-transparent ring-gray-900/10",ee=S.forwardRef((e,t)=>{const{className:n,children:s,Icon:i,onClick:o,dismissOnClick:r=!0,...a}=e,{dismiss:l}=Nm(),u=c=>{o&&o(c),r&&l()};return d.jsxs("button",{ref:t,className:k(Vm,n),onClick:u,...a,children:[i&&d.jsx(i,{className:"h-5 w-5"}),s]})}),Gs=e=>{const{label:t,children:n,className:s}=e;return d.jsxs("div",{className:k("flex flex-col dropdown-button-group",s),children:[t&&d.jsx("div",{className:"mb-2 text-sm text-gray-500 font-semibold px-3",children:t}),n]})},qs=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}=rt({placement:s,onOutsideClick:()=>a(!1),minWidth:i});return d.jsxs(d.Fragment,{children:[d.jsx("div",{ref:u,className:o,onClick:()=>a(!r),children:t}),d.jsx(l,{open:r,children:d.jsx(ot,{padding:"sm",children:d.jsx(Ka.Provider,{value:()=>a(!1),children:n})})})]})};function Im(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),f=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:f.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,f.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,f.current+=P;const A={clientX:C,startX:u.current,totalDeltaX:f.current,target:h.current};r&&g.preventDefault(),t(P,A)}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,f.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 Om=e=>{const{column:t}=e,n=t?.defaultWidth??250,{bind:s}=Im({onDelta:i=>console.log(i),onDragStart:()=>{},onDragEnd:()=>{}});return d.jsxs("div",{style:{width:n,height:44},className:"flex flex-row items-stretch select-none",children:[d.jsx("div",{className:"flex-1 content-center px-4 relative cursor-pointer bg-gray-50 hover:bg-gray-100 active:bg-gray-200 transition-colors duration-100",children:t.header}),d.jsx("div",{...s,className:"cursor-ew-resize group py-4 bg-gray-50 w-[8px]",children:d.jsx("div",{className:"w-0.5 h-full mx-auto bg-gray-200 group-hover:bg-gray-300 group-active:bg-blue-600 pointer-events-none"})})]})},Lm=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 d.jsxs("div",{className:s,children:[d.jsx("div",{className:"relative h-[45px] w-full overflow-hidden",ref:i,children:d.jsx("div",{className:"absolute",children:d.jsx("div",{className:"font-medium text-gray-800 flex flex-row border-b border-b-gray-200",children:t.map(r=>d.jsx(Om,{column:r},r.id))})})}),d.jsx("div",{className:"relative overflow-scroll min-w-full min-h-full",onScroll:o,children:d.jsx("div",{className:"absolute",children:d.jsx("div",{className:"flex flex-col",children:n.map(r=>d.jsx("div",{className:"flex flex-row border-b border-b-gray-200 hover:bg-gray-50 bg-white transition-all duration-100",children:t.map(a=>d.jsx("div",{className:"flex-1 content-center px-4",style:{height:44,width:250},children:a.renderCell(r)},a.id))},JSON.stringify(r)))})})})]})},Fm=()=>d.jsx("div",{}),Bm=[{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=>d.jsx(Ys,{Icon:_d,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:()=>d.jsx(Wm,{})}],$m=()=>d.jsxs("div",{className:"flex flex-col gap-6",children:[d.jsxs("div",{className:"flex flex-row items-center justify-start gap-3",children:[d.jsx(Ns,{Icon:ks,placeholder:"Search..."}),d.jsx(Ms,{Icon:sa}),d.jsx(Jo,{Icon:ta,children:"New"}),d.jsxs(qs,{trigger:d.jsx(Ms,{Icon:sa}),children:[d.jsx(ee,{dismissOnClick:!1,Icon:ta,children:"Add new"}),d.jsx(ee,{Icon:Ce,children:"Remove"}),d.jsxs(Gs,{label:"Test",className:"mt-2",children:[d.jsx(ee,{Icon:Ce,children:"Utrechtse Horeca Groep / Restaurant Dengh"}),d.jsx(ee,{Icon:Ce,children:"Utrechtse Horeca Groep / Restaurant Dengh"}),d.jsx(ee,{Icon:Ce,children:"Remove"}),d.jsx(ee,{Icon:Ce,children:"Remove"})]}),d.jsxs(Gs,{label:"Test",className:"mt-2",children:[d.jsx(ee,{Icon:Ce,children:"Remove"}),d.jsx(ee,{Icon:Ce,children:"Remove"}),d.jsx(ee,{Icon:Ce,children:"Remove"}),d.jsx(ee,{Icon:Ce,children:"Remove"})]})]}),d.jsx(za,{tabs:[{label:"Tab 1",Icon:ea,active:!0,onClick:()=>{}},{label:"Tab 2",active:!1,onClick:()=>{}},{label:"Tab 3",Icon:ea,active:!1,onClick:()=>{}}]})]}),d.jsx(Wa,{options:[{label:"Option 1",value:1},{label:"Option 2",value:2},{label:"Option 3",value:3}],value:null,onChange:()=>{}}),d.jsx(Lm,{className:"h-[300px] w-[300px]",columns:_m,rows:Bm}),d.jsx(Fm,{})]}),Wm=()=>d.jsx(d.Fragment,{children:d.jsxs(qs,{placement:"bottom-end",className:"inline-block",trigger:d.jsx(Ys,{onClick:()=>{},children:"Test"}),children:[d.jsx(ee,{children:"Option 1"}),d.jsx(ee,{children:"Option 2"}),d.jsx(ee,{children:"Option 3"})]})});D.Badge=Ys,D.BadgeColor=Ua,D.Button=Jo,D.ButtonIconRound=Qo,D.ButtonIconSquare=Ms,D.Divider=Dm,D.DropdownButton=ee,D.DropdownButtonGroup=Gs,D.DropdownMenu=qs,D.DropdownPanel=ot,D.Input=Ns,D.InputCheck=Kd,D.InputDescription=me,D.InputError=pe,D.InputErrorIcon=_e,D.InputIconButton=Pe,D.InputIconButtonTray=$e,D.InputLabel=Be,D.InputPassword=$d,D.InputRadio=Ud,D.InputSelect=Wa,D.InputSelectNative=Xd,D.InputSelectOption=Rt,D.InputSelectSearchable=Em,D.InputSelectSearchableAsync=Rm,D.InputTextArea=Wd,D.InputToggle=zd,D.Modal=km,D.Panel=jm,D.PopoverBase=$a,D.Spinner=Zt,D.TabButtons=za,D.Test=$m,D.Tooltip=Mm,D.usePopover=rt,Object.defineProperty(D,Symbol.toStringTag,{value:"Module"})}));
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",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"})}));
144
141
  //# sourceMappingURL=index.umd.cjs.map