@matthiaskrijgsman/mat-ui 0.0.3 → 0.0.5

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(U,S){typeof exports=="object"&&typeof module<"u"?S(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],S):(U=typeof globalThis<"u"?globalThis:U||self,S(U.MatUI={},U.React,U.ReactDOM))})(this,(function(U,S,Ea){"use strict";function Bs(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,s.get?s:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const P=Bs(S),_s=Bs(Ea);var be={exports:{}},Jt={};/**
1
+ (function(M,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):(M=typeof globalThis<"u"?globalThis:M||self,T(M.MatUI={},M.React,M.ReactDOM))})(this,(function(M,T,La){"use strict";function qs(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,s.get?s:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const P=qs(T),Zs=qs(La);var De={exports:{}},oe={};/**
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 $s;function Ra(){if($s)return Jt;$s=1;var t=Symbol.for("react.transitional.element"),e=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:t,type:s,key:r,ref:i!==void 0?i:null,props:o}}return Jt.Fragment=e,Jt.jsx=n,Jt.jsxs=n,Jt}var Qt={};/**
9
+ */var Js;function Fa(){if(Js)return oe;Js=1;var t=Symbol.for("react.transitional.element"),e=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:t,type:s,key:r,ref:i!==void 0?i:null,props:o}}return oe.Fragment=e,oe.jsx=n,oe.jsxs=n,oe}var ae={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,84 +14,96 @@
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 Ws;function Ma(){return Ws||(Ws=1,process.env.NODE_ENV!=="production"&&(function(){function t(b){if(b==null)return null;if(typeof b=="function")return b.$$typeof===O?null:b.displayName||b.name||null;if(typeof b=="string")return b;switch(b){case g:return"Fragment";case y:return"Profiler";case v:return"StrictMode";case T:return"Suspense";case R:return"SuspenseList";case j:return"Activity"}if(typeof b=="object")switch(typeof b.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),b.$$typeof){case m:return"Portal";case x:return(b.displayName||"Context")+".Provider";case w:return(b._context.displayName||"Context")+".Consumer";case C:var D=b.render;return b=b.displayName,b||(b=D.displayName||D.name||"",b=b!==""?"ForwardRef("+b+")":"ForwardRef"),b;case E:return D=b.displayName||null,D!==null?D:t(b.type)||"Memo";case A:D=b._payload,b=b._init;try{return t(b(D))}catch{}}return null}function e(b){return""+b}function n(b){try{e(b);var D=!1}catch{D=!0}if(D){D=console;var F=D.error,H=typeof Symbol=="function"&&Symbol.toStringTag&&b[Symbol.toStringTag]||b.constructor.name||"Object";return F.call(D,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",H),e(b)}}function s(b){if(b===g)return"<>";if(typeof b=="object"&&b!==null&&b.$$typeof===A)return"<...>";try{var D=t(b);return D?"<"+D+">":"<...>"}catch{return"<...>"}}function i(){var b=W.A;return b===null?null:b.getOwner()}function o(){return Error("react-stack-top-frame")}function r(b){if(at.call(b,"key")){var D=Object.getOwnPropertyDescriptor(b,"key").get;if(D&&D.isReactWarning)return!1}return b.key!==void 0}function a(b,D){function F(){Ct||(Ct=!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))}F.isReactWarning=!0,Object.defineProperty(b,"key",{get:F,configurable:!0})}function l(){var b=t(this.type);return lt[b]||(lt[b]=!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.")),b=this.props.ref,b!==void 0?b:null}function u(b,D,F,H,At,pt,Is,Ls){return F=pt.ref,b={$$typeof:h,type:b,key:D,props:pt,_owner:At},(F!==void 0?F:null)!==null?Object.defineProperty(b,"ref",{enumerable:!1,get:l}):Object.defineProperty(b,"ref",{enumerable:!1,value:null}),b._store={},Object.defineProperty(b._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(b,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(b,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Is}),Object.defineProperty(b,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Ls}),Object.freeze&&(Object.freeze(b.props),Object.freeze(b)),b}function c(b,D,F,H,At,pt,Is,Ls){var G=D.children;if(G!==void 0)if(H)if(st(G)){for(H=0;H<G.length;H++)f(G[H]);Object.freeze&&Object.freeze(G)}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(G);if(at.call(D,"key")){G=t(b);var Zt=Object.keys(D).filter(function(xm){return xm!=="key"});H=0<Zt.length?"{key: someKey, "+Zt.join(": ..., ")+": ...}":"{key: someKey}",q[G+H]||(Zt=0<Zt.length?"{"+Zt.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
17
+ */var Qs;function Ba(){return Qs||(Qs=1,process.env.NODE_ENV!=="production"&&(function(){function t(b){if(b==null)return null;if(typeof b=="function")return b.$$typeof===O?null:b.displayName||b.name||null;if(typeof b=="string")return b;switch(b){case g:return"Fragment";case y:return"Profiler";case x:return"StrictMode";case S:return"Suspense";case C:return"SuspenseList";case N:return"Activity"}if(typeof b=="object")switch(typeof b.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),b.$$typeof){case p:return"Portal";case v:return(b.displayName||"Context")+".Provider";case w:return(b._context.displayName||"Context")+".Consumer";case E:var D=b.render;return b=b.displayName,b||(b=D.displayName||D.name||"",b=b!==""?"ForwardRef("+b+")":"ForwardRef"),b;case A:return D=b.displayName||null,D!==null?D:t(b.type)||"Memo";case R:D=b._payload,b=b._init;try{return t(b(D))}catch{}}return null}function e(b){return""+b}function n(b){try{e(b);var D=!1}catch{D=!0}if(D){D=console;var $=D.error,X=typeof Symbol=="function"&&Symbol.toStringTag&&b[Symbol.toStringTag]||b.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.",X),e(b)}}function s(b){if(b===g)return"<>";if(typeof b=="object"&&b!==null&&b.$$typeof===R)return"<...>";try{var D=t(b);return D?"<"+D+">":"<...>"}catch{return"<...>"}}function i(){var b=U.A;return b===null?null:b.getOwner()}function o(){return Error("react-stack-top-frame")}function r(b){if(et.call(b,"key")){var D=Object.getOwnPropertyDescriptor(b,"key").get;if(D&&D.isReactWarning)return!1}return b.key!==void 0}function a(b,D){function $(){vt||(vt=!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(b,"key",{get:$,configurable:!0})}function l(){var b=t(this.type);return ct[b]||(ct[b]=!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.")),b=this.props.ref,b!==void 0?b:null}function u(b,D,$,X,Mt,xt,Hs,Gs){return $=xt.ref,b={$$typeof:m,type:b,key:D,props:xt,_owner:Mt},($!==void 0?$:null)!==null?Object.defineProperty(b,"ref",{enumerable:!1,get:l}):Object.defineProperty(b,"ref",{enumerable:!1,value:null}),b._store={},Object.defineProperty(b._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(b,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(b,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Hs}),Object.defineProperty(b,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Gs}),Object.freeze&&(Object.freeze(b.props),Object.freeze(b)),b}function c(b,D,$,X,Mt,xt,Hs,Gs){var q=D.children;if(q!==void 0)if(X)if(I(q)){for(X=0;X<q.length;X++)f(q[X]);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(et.call(D,"key")){q=t(b);var re=Object.keys(D).filter(function(Vm){return Vm!=="key"});X=0<re.length?"{key: someKey, "+re.join(": ..., ")+": ...}":"{key: someKey}",J[q+X]||(re=0<re.length?"{"+re.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} />`,H,G,Zt,G),q[G+H]=!0)}if(G=null,F!==void 0&&(n(F),G=""+F),r(D)&&(n(D.key),G=""+D.key),"key"in D){F={};for(var Fs in D)Fs!=="key"&&(F[Fs]=D[Fs])}else F=D;return G&&a(F,typeof b=="function"?b.displayName||b.name||"Unknown":b),u(b,G,pt,At,i(),F,Is,Ls)}function f(b){typeof b=="object"&&b!==null&&b.$$typeof===h&&b._store&&(b._store.validated=1)}var d=S,h=Symbol.for("react.transitional.element"),m=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),w=Symbol.for("react.consumer"),x=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),j=Symbol.for("react.activity"),O=Symbol.for("react.client.reference"),W=d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,at=Object.prototype.hasOwnProperty,st=Array.isArray,mt=console.createTask?console.createTask:function(){return null};d={react_stack_bottom_frame:function(b){return b()}};var Ct,lt={},L=d.react_stack_bottom_frame.bind(d,o)(),V=mt(s(o)),q={};Qt.Fragment=g,Qt.jsx=function(b,D,F,H,At){var pt=1e4>W.recentlyCreatedOwnerStacks++;return c(b,D,F,!1,H,At,pt?Error("react-stack-top-frame"):L,pt?mt(s(b)):V)},Qt.jsxs=function(b,D,F,H,At){var pt=1e4>W.recentlyCreatedOwnerStacks++;return c(b,D,F,!0,H,At,pt?Error("react-stack-top-frame"):L,pt?mt(s(b)):V)}})()),Qt}var Us;function Da(){return Us||(Us=1,process.env.NODE_ENV==="production"?be.exports=Ra():be.exports=Ma()),be.exports}var p=Da();const B=(...t)=>t.filter(Boolean).join(" "),Je=S.createContext({});function Qe(t){const e=S.useRef(null);return e.current===null&&(e.current=t()),e.current}const tn=typeof window<"u",zs=tn?S.useLayoutEffect:S.useEffect,we=S.createContext(null);function en(t,e){t.indexOf(e)===-1&&t.push(e)}function nn(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const gt=(t,e,n)=>n>e?e:n<t?t:n;function sn(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}let Nt=()=>{},yt=()=>{};process.env.NODE_ENV!=="production"&&(Nt=(t,e,n)=>{!t&&typeof console<"u"&&console.warn(sn(e,n))},yt=(t,e,n)=>{if(!t)throw new Error(sn(e,n))});const vt={},Ks=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function Ys(t){return typeof t=="object"&&t!==null}const Hs=t=>/^0[^.\s]+$/u.test(t);function rn(t){let e;return()=>(e===void 0&&(e=t()),e)}const Q=t=>t,Va=(t,e)=>n=>e(t(n)),te=(...t)=>t.reduce(Va),ee=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s};class on{constructor(){this.subscriptions=[]}add(e){return en(this.subscriptions,e),()=>nn(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let o=0;o<i;o++){const r=this.subscriptions[o];r&&r(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const it=t=>t*1e3,ct=t=>t/1e3;function Gs(t,e){return e?t*(1e3/e):0}const Xs=new Set;function an(t,e,n){t||Xs.has(e)||(console.warn(sn(e,n)),Xs.add(e))}const qs=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,ja=1e-7,ka=12;function Oa(t,e,n,s,i){let o,r,a=0;do r=e+(n-e)/2,o=qs(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>ja&&++a<ka);return r}function ne(t,e,n,s){if(t===e&&n===s)return Q;const i=o=>Oa(o,0,1,t,n);return o=>o===0||o===1?o:qs(i(o),e,s)}const Zs=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Js=t=>e=>1-t(1-e),Qs=ne(.33,1.53,.69,.99),ln=Js(Qs),ti=Zs(ln),ei=t=>(t*=2)<1?.5*ln(t):.5*(2-Math.pow(2,-10*(t-1))),cn=t=>1-Math.sin(Math.acos(t)),ni=Js(cn),si=Zs(cn),Na=ne(.42,0,1,1),Ia=ne(0,0,.58,1),ii=ne(.42,0,.58,1),La=t=>Array.isArray(t)&&typeof t[0]!="number",ri=t=>Array.isArray(t)&&typeof t[0]=="number",oi={linear:Q,easeIn:Na,easeInOut:ii,easeOut:Ia,circIn:cn,circInOut:si,circOut:ni,backIn:ln,backInOut:ti,backOut:Qs,anticipate:ei},Fa=t=>typeof t=="string",ai=t=>{if(ri(t)){yt(t.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,n,s,i]=t;return ne(e,n,s,i)}else if(Fa(t))return yt(oi[t]!==void 0,`Invalid easing type '${t}'`,"invalid-easing-type"),oi[t];return t},Te=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Ba(t,e){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),t()),c(a)}const u={schedule:(c,f=!1,d=!1)=>{const m=d&&i?n:s;return f&&r.add(c),m.has(c)||m.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 _a=40;function li(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=Te.reduce((x,C)=>(x[C]=Ba(o),x),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:f,preRender:d,render:h,postRender:m}=r,g=()=>{const x=vt.useManualTiming?i.timestamp:performance.now();n=!1,vt.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(x-i.timestamp,_a),1)),i.timestamp=x,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),f.process(i),d.process(i),h.process(i),m.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(g))},v=()=>{n=!0,s=!0,i.isProcessing||t(g)};return{schedule:Te.reduce((x,C)=>{const T=r[C];return x[C]=(R,E=!1,A=!1)=>(n||v(),T.schedule(R,E,A)),x},{}),cancel:x=>{for(let C=0;C<Te.length;C++)r[Te[C]].cancel(x)},state:i,steps:r}}const{schedule:k,cancel:xt,state:z,steps:un}=li(typeof requestAnimationFrame<"u"?requestAnimationFrame:Q,!0);let Se;function $a(){Se=void 0}const Z={now:()=>(Se===void 0&&Z.set(z.isProcessing||vt.useManualTiming?z.timestamp:performance.now()),Se),set:t=>{Se=t,queueMicrotask($a)}},ci=t=>e=>typeof e=="string"&&e.startsWith(t),fn=ci("--"),Wa=ci("var(--"),dn=t=>Wa(t)?Ua.test(t.split("/*")[0].trim()):!1,Ua=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,It={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},se={...It,transform:t=>gt(0,1,t)},Pe={...It,default:1},ie=t=>Math.round(t*1e5)/1e5,hn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function za(t){return t==null}const Ka=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,mn=(t,e)=>n=>!!(typeof n=="string"&&Ka.test(n)&&n.startsWith(t)||e&&!za(n)&&Object.prototype.hasOwnProperty.call(n,e)),ui=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,o,r,a]=s.match(hn);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},Ya=t=>gt(0,255,t),pn={...It,transform:t=>Math.round(Ya(t))},Et={test:mn("rgb","red"),parse:ui("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+pn.transform(t)+", "+pn.transform(e)+", "+pn.transform(n)+", "+ie(se.transform(s))+")"};function Ha(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const gn={test:mn("#"),parse:Ha,transform:Et.transform},re=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),bt=re("deg"),ut=re("%"),M=re("px"),Ga=re("vh"),Xa=re("vw"),fi={...ut,parse:t=>ut.parse(t)/100,transform:t=>ut.transform(t*100)},Lt={test:mn("hsl","hue"),parse:ui("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+ut.transform(ie(e))+", "+ut.transform(ie(n))+", "+ie(se.transform(s))+")"},$={test:t=>Et.test(t)||gn.test(t)||Lt.test(t),parse:t=>Et.test(t)?Et.parse(t):Lt.test(t)?Lt.parse(t):gn.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?Et.transform(t):Lt.transform(t),getAnimatableNone:t=>{const e=$.parse(t);return e.alpha=0,$.transform(e)}},qa=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Za(t){return isNaN(t)&&typeof t=="string"&&(t.match(hn)?.length||0)+(t.match(qa)?.length||0)>0}const di="number",hi="color",Ja="var",Qa="var(",mi="${}",tl=/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 oe(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(tl,l=>($.test(l)?(s.color.push(o),i.push(hi),n.push($.parse(l))):l.startsWith(Qa)?(s.var.push(o),i.push(Ja),n.push(l)):(s.number.push(o),i.push(di),n.push(parseFloat(l))),++o,mi)).split(mi);return{values:n,split:a,indexes:s,types:i}}function pi(t){return oe(t).values}function gi(t){const{split:e,types:n}=oe(t),s=e.length;return i=>{let o="";for(let r=0;r<s;r++)if(o+=e[r],i[r]!==void 0){const a=n[r];a===di?o+=ie(i[r]):a===hi?o+=$.transform(i[r]):o+=i[r]}return o}}const el=t=>typeof t=="number"?0:$.test(t)?$.getAnimatableNone(t):t;function nl(t){const e=pi(t);return gi(t)(e.map(el))}const wt={test:Za,parse:pi,createTransformer:gi,getAnimatableNone:nl};function yn(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function sl({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,o=0,r=0;if(!e)i=o=r=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=yn(l,a,t+1/3),o=yn(l,a,t),r=yn(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}function Ce(t,e){return n=>n>0?e:t}const N=(t,e,n)=>t+(e-t)*n,vn=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},il=[gn,Et,Lt],rl=t=>il.find(e=>e.test(t));function yi(t){const e=rl(t);if(Nt(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return!1;let n=e.parse(t);return e===Lt&&(n=sl(n)),n}const vi=(t,e)=>{const n=yi(t),s=yi(e);if(!n||!s)return Ce(t,e);const i={...n};return o=>(i.red=vn(n.red,s.red,o),i.green=vn(n.green,s.green,o),i.blue=vn(n.blue,s.blue,o),i.alpha=N(n.alpha,s.alpha,o),Et.transform(i))},xn=new Set(["none","hidden"]);function ol(t,e){return xn.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function al(t,e){return n=>N(t,e,n)}function bn(t){return typeof t=="number"?al:typeof t=="string"?dn(t)?Ce:$.test(t)?vi:ul:Array.isArray(t)?xi:typeof t=="object"?$.test(t)?vi:ll:Ce}function xi(t,e){const n=[...t],s=n.length,i=t.map((o,r)=>bn(o)(o,e[r]));return o=>{for(let r=0;r<s;r++)n[r]=i[r](o);return n}}function ll(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=bn(t[i])(t[i],e[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}}function cl(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const o=e.types[i],r=t.indexes[o][s[o]],a=t.values[r]??0;n[i]=a,s[o]++}return n}const ul=(t,e)=>{const n=wt.createTransformer(e),s=oe(t),i=oe(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?xn.has(t)&&!i.values.length||xn.has(e)&&!s.values.length?ol(t,e):te(xi(cl(s,i),i.values),n):(Nt(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Ce(t,e))};function bi(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?N(t,e,n):bn(t)(t,e)}const fl=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>k.update(e,n),stop:()=>xt(e),now:()=>z.isProcessing?z.timestamp:Z.now()}},wi=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let o=0;o<i;o++)s+=Math.round(t(o/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},Ae=2e4;function wn(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<Ae;)e+=n,s=t.next(e);return e>=Ae?1/0:e}function dl(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(wn(s),Ae);return{type:"keyframes",ease:o=>s.next(i*o).value/e,duration:ct(i)}}const hl=5;function Ti(t,e,n){const s=Math.max(e-hl,0);return Gs(n-t(s),e-s)}const I={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Tn=.001;function ml({duration:t=I.duration,bounce:e=I.bounce,velocity:n=I.velocity,mass:s=I.mass}){let i,o;Nt(t<=it(I.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let r=1-e;r=gt(I.minDamping,I.maxDamping,r),t=gt(I.minDuration,I.maxDuration,ct(t)),r<1?(i=u=>{const c=u*r,f=c*t,d=c-n,h=Sn(u,r),m=Math.exp(-f);return Tn-d/h*m},o=u=>{const f=u*r*t,d=f*n+n,h=Math.pow(r,2)*Math.pow(u,2)*t,m=Math.exp(-f),g=Sn(Math.pow(u,2),r);return(-i(u)+Tn>0?-1:1)*((d-h)*m)/g}):(i=u=>{const c=Math.exp(-u*t),f=(u-n)*t+1;return-Tn+c*f},o=u=>{const c=Math.exp(-u*t),f=(n-u)*(t*t);return c*f});const a=5/t,l=gl(i,o,a);if(t=it(t),isNaN(l))return{stiffness:I.stiffness,damping:I.damping,duration:t};{const u=Math.pow(l,2)*s;return{stiffness:u,damping:r*2*Math.sqrt(s*u),duration:t}}}const pl=12;function gl(t,e,n){let s=n;for(let i=1;i<pl;i++)s=s-t(s)/e(s);return s}function Sn(t,e){return t*Math.sqrt(1-e*e)}const yl=["duration","bounce"],vl=["stiffness","damping","mass"];function Si(t,e){return e.some(n=>t[n]!==void 0)}function xl(t){let e={velocity:I.velocity,stiffness:I.stiffness,damping:I.damping,mass:I.mass,isResolvedFromDuration:!1,...t};if(!Si(t,vl)&&Si(t,yl))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,o=2*gt(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:I.mass,stiffness:i,damping:o}}else{const n=ml(t);e={...e,...n,mass:I.mass},e.isResolvedFromDuration=!0}return e}function Ee(t=I.visualDuration,e=I.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const 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:d,isResolvedFromDuration:h}=xl({...n,velocity:-ct(n.velocity||0)}),m=d||0,g=u/(2*Math.sqrt(l*c)),v=r-o,y=ct(Math.sqrt(l/c)),w=Math.abs(v)<5;s||(s=w?I.restSpeed.granular:I.restSpeed.default),i||(i=w?I.restDelta.granular:I.restDelta.default);let x;if(g<1){const T=Sn(y,g);x=R=>{const E=Math.exp(-g*y*R);return r-E*((m+g*y*v)/T*Math.sin(T*R)+v*Math.cos(T*R))}}else if(g===1)x=T=>r-Math.exp(-y*T)*(v+(m+y*v)*T);else{const T=y*Math.sqrt(g*g-1);x=R=>{const E=Math.exp(-g*y*R),A=Math.min(T*R,300);return r-E*((m+g*y*v)*Math.sinh(A)+T*v*Math.cosh(A))/T}}const C={calculatedDuration:h&&f||null,next:T=>{const R=x(T);if(h)a.done=T>=f;else{let E=T===0?m:0;g<1&&(E=T===0?it(m):Ti(x,T,R));const A=Math.abs(E)<=s,j=Math.abs(r-R)<=i;a.done=A&&j}return a.value=a.done?r:R,a},toString:()=>{const T=Math.min(wn(C),Ae),R=wi(E=>C.next(T*E).value,T,30);return T+"ms "+R},toTransition:()=>{}};return C}Ee.applyToOptions=t=>{const e=dl(t,100,Ee);return t.ease=e.ease,t.duration=it(e.duration),t.type="keyframes",t};function Pn({keyframes:t,velocity:e=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=t[0],d={done:!1,value:f},h=A=>a!==void 0&&A<a||l!==void 0&&A>l,m=A=>a===void 0?l:l===void 0||Math.abs(a-A)<Math.abs(l-A)?a:l;let g=n*e;const v=f+g,y=r===void 0?v:r(v);y!==v&&(g=y-f);const w=A=>-g*Math.exp(-A/s),x=A=>y+w(A),C=A=>{const j=w(A),O=x(A);d.done=Math.abs(j)<=u,d.value=d.done?y:O};let T,R;const E=A=>{h(d.value)&&(T=A,R=Ee({keyframes:[d.value,m(d.value)],velocity:Ti(x,A,d.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return E(0),{calculatedDuration:null,next:A=>{let j=!1;return!R&&T===void 0&&(j=!0,C(A),E(A)),T!==void 0&&A>=T?R.next(A-T):(!j&&C(A),d)}}}function bl(t,e,n){const s=[],i=n||vt.mix||bi,o=t.length-1;for(let r=0;r<o;r++){let a=i(t[r],t[r+1]);if(e){const l=Array.isArray(e)?e[r]||Q:e;a=te(l,a)}s.push(a)}return s}function wl(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;if(yt(o===e.length,"Both input and output ranges must be the same length","range-length"),o===1)return()=>e[0];if(o===2&&e[0]===e[1])return()=>e[1];const r=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=bl(e,s,i),l=a.length,u=c=>{if(r&&c<t[0])return e[0];let f=0;if(l>1)for(;f<t.length-2&&!(c<t[f+1]);f++);const d=ee(t[f],t[f+1],c);return a[f](d)};return n?c=>u(gt(t[0],t[o-1],c)):u}function Tl(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=ee(0,e,s);t.push(N(n,1,i))}}function Sl(t){const e=[0];return Tl(e,t.length-1),e}function Pl(t,e){return t.map(n=>n*e)}function Cl(t,e){return t.map(()=>e||ii).splice(0,t.length-1)}function Ft({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=La(s)?s.map(ai):ai(s),o={done:!1,value:e[0]},r=Pl(n&&n.length===e.length?n:Sl(e),t),a=wl(r,e,{ease:Array.isArray(i)?i:Cl(e,i)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}const Al=t=>t!==null;function Cn(t,{repeat:e,repeatType:n="loop"},s,i=1){const o=t.filter(Al),a=i<0||e&&n!=="loop"&&e%2===1?0:o.length-1;return!a||s===void 0?o[a]:s}const El={decay:Pn,inertia:Pn,tween:Ft,keyframes:Ft,spring:Ee};function Pi(t){typeof t.type=="string"&&(t.type=El[t.type])}class An{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const Rl=t=>t/100;class En extends An{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==Z.now()&&this.tick(Z.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;Pi(e);const{type:n=Ft,repeat:s=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=e;let{keyframes:a}=e;const l=n||Ft;process.env.NODE_ENV!=="production"&&l!==Ft&&yt(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==Ft&&typeof a[0]!="number"&&(this.mixKeyframes=te(Rl,bi(a[0],a[1])),a=[0,100]);const u=l({...e,keyframes:a});o==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-r})),u.calculatedDuration===null&&(u.calculatedDuration=wn(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=u}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:s,totalDuration:i,mixKeyframes: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:d,repeatDelay:h,type:m,onUpdate:g,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const y=this.currentTime-u*(this.playbackSpeed>=0?1:-1),w=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let x=this.currentTime,C=s;if(f){const A=Math.min(this.currentTime,i)/a;let j=Math.floor(A),O=A%1;!O&&A>=1&&(O=1),O===1&&j--,j=Math.min(j,f+1),!!(j%2)&&(d==="reverse"?(O=1-O,h&&(O-=h/a)):d==="mirror"&&(C=r)),x=gt(0,1,O)*a}const T=w?{done:!1,value:c[0]}:C.next(x);o&&(T.value=o(T.value));let{done:R}=T;!w&&l!==null&&(R=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&R);return E&&m!==Pn&&(T.value=Cn(c,this.options,v,this.speed)),g&&g(T.value),E&&this.finish(),T}then(e,n){return this.finished.then(e,n)}get duration(){return ct(this.calculatedDuration)}get time(){return ct(this.currentTime)}set time(e){e=it(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(Z.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=ct(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=fl,startTime:n}=this.options;this.driver||(this.driver=e(i=>this.tick(i))),this.options.onPlay?.();const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Z.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}function Ml(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Rt=t=>t*180/Math.PI,Rn=t=>{const e=Rt(Math.atan2(t[1],t[0]));return Mn(e)},Dl={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Rn,rotateZ:Rn,skewX:t=>Rt(Math.atan(t[1])),skewY:t=>Rt(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Mn=t=>(t=t%360,t<0&&(t+=360),t),Ci=Rn,Ai=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Ei=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Vl={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ai,scaleY:Ei,scale:t=>(Ai(t)+Ei(t))/2,rotateX:t=>Mn(Rt(Math.atan2(t[6],t[5]))),rotateY:t=>Mn(Rt(Math.atan2(-t[2],t[0]))),rotateZ:Ci,rotate:Ci,skewX:t=>Rt(Math.atan(t[4])),skewY:t=>Rt(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Dn(t){return t.includes("scale")?1:0}function Vn(t,e){if(!t||t==="none")return Dn(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Vl,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Dl,i=a}if(!i)return Dn(e);const o=s[e],r=i[1].split(",").map(kl);return typeof o=="function"?o(r):r[o]}const jl=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Vn(n,e)};function kl(t){return parseFloat(t.trim())}const Bt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],_t=new Set(Bt),Ri=t=>t===It||t===M,Ol=new Set(["x","y","z"]),Nl=Bt.filter(t=>!Ol.has(t));function Il(t){const e=[];return Nl.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const Mt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>Vn(e,"x"),y:(t,{transform:e})=>Vn(e,"y")};Mt.translateX=Mt.x,Mt.translateY=Mt.y;const Dt=new Set;let jn=!1,kn=!1,On=!1;function Mi(){if(kn){const t=Array.from(Dt).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=Il(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([o,r])=>{s.getValue(o)?.set(r)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}kn=!1,jn=!1,Dt.forEach(t=>t.complete(On)),Dt.clear()}function Di(){Dt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(kn=!0)})}function Ll(){On=!0,Di(),Mi(),On=!1}class Nn{constructor(e,n,s,i,o,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=o,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(Dt.add(this),jn||(jn=!0,k.read(Di),k.resolveKeyframes(Mi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const o=i?.get(),r=e[e.length-1];if(o!==void 0)e[0]=o;else if(s&&n){const a=s.readValue(n,r);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=r),i&&o===void 0&&i.set(e[0])}Ml(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Dt.delete(this)}cancel(){this.state==="scheduled"&&(Dt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Fl=t=>t.startsWith("--");function Bl(t,e,n){Fl(e)?t.style.setProperty(e,n):t.style[e]=n}const _l=rn(()=>window.ScrollTimeline!==void 0),$l={};function Wl(t,e){const n=rn(t);return()=>$l[e]??n()}const Vi=Wl(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ae=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,ji={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ae([0,.65,.55,1]),circOut:ae([.55,0,1,.45]),backIn:ae([.31,.01,.66,-.59]),backOut:ae([.33,1.53,.69,.99])};function ki(t,e){if(t)return typeof t=="function"?Vi()?wi(t,e):"ease-out":ri(t)?ae(t):Array.isArray(t)?t.map(n=>ki(n,e)||ji.easeOut):ji[t]}function Ul(t,e,n,{delay:s=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[e]:n};l&&(c.offset=l);const f=ki(a,i);Array.isArray(f)&&(c.easing=f);const d={delay:s,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"};return u&&(d.pseudoElement=u),t.animate(c,d)}function Oi(t){return typeof t=="function"&&"applyToOptions"in t}function zl({type:t,...e}){return Oi(t)&&Vi()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Kl extends An{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!o,this.allowFlatten=r,this.options=e,yt(typeof e.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=zl(e);this.animation=Ul(n,s,i,u,o),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const c=Cn(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):Bl(n,s,c),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return ct(Number(e))}get time(){return ct(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=it(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&_l()?(this.animation.timeline=e,Q):n(this)}}const Ni={anticipate:ei,backInOut:ti,circInOut:si};function Yl(t){return t in Ni}function Hl(t){typeof t.ease=="string"&&Yl(t.ease)&&(t.ease=Ni[t.ease])}const Ii=10;class Gl extends Kl{constructor(e){Hl(e),Pi(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:s,onComplete:i,element:o,...r}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new En({...r,autoplay:!1}),l=it(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-Ii).value,a.sample(l).value,Ii),a.stop()}}const Li=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(wt.test(t)||t==="0")&&!t.startsWith("url("));function Xl(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function ql(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const o=t[t.length-1],r=Li(i,e),a=Li(o,e);return Nt(r===a,`You are trying to animate ${e} from "${i}" to "${o}". "${r?o:i}" is not an animatable value.`,"value-not-animatable"),!r||!a?!1:Xl(t)||(n==="spring"||Oi(n))&&s}function In(t){t.duration=0,t.type}const Zl=new Set(["opacity","clipPath","filter","transform"]),Jl=rn(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Ql(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:o,type:r}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=e.owner.getProps();return Jl()&&n&&Zl.has(n)&&(n!=="transform"||!u)&&!l&&!s&&i!=="mirror"&&o!==0&&r!=="inertia"}const tc=40;class ec extends An{constructor({autoplay:e=!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=Z.now();const d={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:o,repeatType:r,name:l,motionValue:u,element:c,...f},h=c?.KeyframeResolver||Nn;this.keyframeResolver=new h(a,(m,g,v)=>this.onKeyframesResolved(m,g,d,!v),l,u,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,s,i){this.keyframeResolver=void 0;const{name:o,type:r,velocity:a,delay:l,isHandoff:u,onUpdate:c}=s;this.resolvedAt=Z.now(),ql(e,o,r,a)||((vt.instantAnimations||!l)&&c?.(Cn(e,s,n)),e[0]=e[e.length-1],In(s),s.repeat=0);const d={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>tc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},h=!u&&Ql(d)?new Gl({...d,element:d.motionValue.owner.current}):new En(d);h.finished.then(()=>this.notifyFinished()).catch(Q),this.pendingTimeline&&(this.stopTimeline=h.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=h}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Ll()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const nc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function sc(t){const e=nc.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}const ic=4;function Fi(t,e,n=1){yt(n<=ic,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,i]=sc(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const r=o.trim();return Ks(r)?parseFloat(r):r}return dn(i)?Fi(i,e,n+1):i}function Ln(t,e){return t?.[e]??t?.default??t}const Bi=new Set(["width","height","top","left","right","bottom",...Bt]),rc={test:t=>t==="auto",parse:t=>t},_i=t=>e=>e.test(t),$i=[It,M,ut,bt,Xa,Ga,rc],Wi=t=>$i.find(_i(t));function oc(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Hs(t):!0}const ac=new Set(["brightness","contrast","saturate","opacity"]);function lc(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(hn)||[];if(!s)return t;const i=n.replace(s,"");let o=ac.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const cc=/\b([a-z-]*)\(.*?\)/gu,Fn={...wt,getAnimatableNone:t=>{const e=t.match(cc);return e?e.map(lc).join(" "):t}},Ui={...It,transform:Math.round},Bn={borderWidth:M,borderTopWidth:M,borderRightWidth:M,borderBottomWidth:M,borderLeftWidth:M,borderRadius:M,radius:M,borderTopLeftRadius:M,borderTopRightRadius:M,borderBottomRightRadius:M,borderBottomLeftRadius:M,width:M,maxWidth:M,height:M,maxHeight:M,top:M,right:M,bottom:M,left:M,padding:M,paddingTop:M,paddingRight:M,paddingBottom:M,paddingLeft:M,margin:M,marginTop:M,marginRight:M,marginBottom:M,marginLeft:M,backgroundPositionX:M,backgroundPositionY:M,...{rotate:bt,rotateX:bt,rotateY:bt,rotateZ:bt,scale:Pe,scaleX:Pe,scaleY:Pe,scaleZ:Pe,skew:bt,skewX:bt,skewY:bt,distance:M,translateX:M,translateY:M,translateZ:M,x:M,y:M,z:M,perspective:M,transformPerspective:M,opacity:se,originX:fi,originY:fi,originZ:M},zIndex:Ui,fillOpacity:se,strokeOpacity:se,numOctaves:Ui},uc={...Bn,color:$,backgroundColor:$,outlineColor:$,fill:$,stroke:$,borderColor:$,borderTopColor:$,borderRightColor:$,borderBottomColor:$,borderLeftColor:$,filter:Fn,WebkitFilter:Fn},zi=t=>uc[t];function Ki(t,e){let n=zi(t);return n!==Fn&&(n=wt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const fc=new Set(["auto","none","0"]);function dc(t,e,n){let s=0,i;for(;s<t.length&&!i;){const o=t[s];typeof o=="string"&&!fc.has(o)&&oe(o).values.length&&(i=t[s]),s++}if(i&&n)for(const o of e)t[o]=Ki(n,i)}class hc extends Nn{constructor(e,n,s,i,o){super(e,n,s,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let u=e[l];if(typeof u=="string"&&(u=u.trim(),dn(u))){const c=Fi(u,n.current);c!==void 0&&(e[l]=c),l===e.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Bi.has(s)||e.length!==2)return;const[i,o]=e,r=Wi(i),a=Wi(o);if(r!==a)if(Ri(r)&&Ri(a))for(let l=0;l<e.length;l++){const u=e[l];typeof u=="string"&&(e[l]=parseFloat(u))}else Mt[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||oc(e[i]))&&s.push(i);s.length&&dc(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e||!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Mt[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=s.length-1,r=s[o];s[o]=Mt[n](e.measureViewportBox(),window.getComputedStyle(e.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,l])=>{e.getValue(a).set(l)}),this.resolveNoneKeyframes()}}function mc(t,e,n){if(t instanceof EventTarget)return[t];if(typeof t=="string"){let s=document;const i=n?.[t]??s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}const Yi=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function Hi(t){return Ys(t)&&"offsetHeight"in t}const Gi=30,pc=t=>!isNaN(parseFloat(t));class gc{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=Z.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(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=Z.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=pc(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!=="production"&&an(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new on);const s=this.events[e].add(n);return e==="change"?()=>{s(),k.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=Z.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Gi)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Gi);return Gs(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function $t(t,e){return new gc(t,e)}const{schedule:_n}=li(queueMicrotask,!1),rt={x:!1,y:!1};function Xi(){return rt.x||rt.y}function yc(t){return t==="x"||t==="y"?rt[t]?null:(rt[t]=!0,()=>{rt[t]=!1}):rt.x||rt.y?null:(rt.x=rt.y=!0,()=>{rt.x=rt.y=!1})}function qi(t,e){const n=mc(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function Zi(t){return!(t.pointerType==="touch"||Xi())}function vc(t,e,n={}){const[s,i,o]=qi(t,n),r=a=>{if(!Zi(a))return;const{target:l}=a,u=e(l,a);if(typeof u!="function"||!l)return;const c=f=>{Zi(f)&&(u(f),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,i)};return s.forEach(a=>{a.addEventListener("pointerenter",r,i)}),o}const Ji=(t,e)=>e?t===e?!0:Ji(t,e.parentElement):!1,$n=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,xc=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function bc(t){return xc.has(t.tagName)||t.tabIndex!==-1}const Re=new WeakSet;function Qi(t){return e=>{e.key==="Enter"&&t(e)}}function Wn(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const wc=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=Qi(()=>{if(Re.has(n))return;Wn(n,"down");const i=Qi(()=>{Wn(n,"up")}),o=()=>Wn(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",o,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function tr(t){return $n(t)&&!Xi()}function Tc(t,e,n={}){const[s,i,o]=qi(t,n),r=a=>{const l=a.currentTarget;if(!tr(a))return;Re.add(l);const u=e(l,a),c=(h,m)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",d),Re.has(l)&&Re.delete(l),tr(h)&&typeof u=="function"&&u(h,{success:m})},f=h=>{c(h,l===window||l===document||n.useGlobalTarget||Ji(l,h.target))},d=h=>{c(h,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",d,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,i),Hi(a)&&(a.addEventListener("focus",u=>wc(u,i)),!bc(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function er(t){return Ys(t)&&"ownerSVGElement"in t}function Sc(t){return er(t)&&t.tagName==="svg"}const K=t=>!!(t&&t.getVelocity),Pc=[...$i,$,wt],Cc=t=>Pc.find(_i(t)),Un=S.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});class Ac extends P.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const s=n.offsetParent,i=Hi(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 Ec({children:t,isPresent:e,anchorX:n,root:s}){const i=S.useId(),o=S.useRef(null),r=S.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=S.useContext(Un);return S.useInsertionEffect(()=>{const{width:l,height:u,top:c,left:f,right:d}=r.current;if(e||!o.current||!l||!u)return;const h=n==="left"?`left: ${f}`:`right: ${d}`;o.current.dataset.motionPopId=i;const m=document.createElement("style");a&&(m.nonce=a);const g=s??document.head;return g.appendChild(m),m.sheet&&m.sheet.insertRule(`
22
+ <%s key={someKey} {...props} />`,X,q,re,q),J[q+X]=!0)}if(q=null,$!==void 0&&(n($),q=""+$),r(D)&&(n(D.key),q=""+D.key),"key"in D){$={};for(var Xs in D)Xs!=="key"&&($[Xs]=D[Xs])}else $=D;return q&&a($,typeof b=="function"?b.displayName||b.name||"Unknown":b),u(b,q,xt,Mt,i(),$,Hs,Gs)}function f(b){typeof b=="object"&&b!==null&&b.$$typeof===m&&b._store&&(b._store.validated=1)}var d=T,m=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),w=Symbol.for("react.consumer"),v=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),O=Symbol.for("react.client.reference"),U=d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,et=Object.prototype.hasOwnProperty,I=Array.isArray,K=console.createTask?console.createTask:function(){return null};d={react_stack_bottom_frame:function(b){return b()}};var vt,ct={},_=d.react_stack_bottom_frame.bind(d,o)(),k=K(s(o)),J={};ae.Fragment=g,ae.jsx=function(b,D,$,X,Mt){var xt=1e4>U.recentlyCreatedOwnerStacks++;return c(b,D,$,!1,X,Mt,xt?Error("react-stack-top-frame"):_,xt?K(s(b)):k)},ae.jsxs=function(b,D,$,X,Mt){var xt=1e4>U.recentlyCreatedOwnerStacks++;return c(b,D,$,!0,X,Mt,xt?Error("react-stack-top-frame"):_,xt?K(s(b)):k)}})()),ae}var ti;function _a(){return ti||(ti=1,process.env.NODE_ENV==="production"?De.exports=Fa():De.exports=Ba()),De.exports}var h=_a();const V=(...t)=>t.filter(Boolean).join(" "),dn=T.createContext({});function hn(t){const e=T.useRef(null);return e.current===null&&(e.current=t()),e.current}const mn=typeof window<"u",ei=mn?T.useLayoutEffect:T.useEffect,Ve=T.createContext(null);function pn(t,e){t.indexOf(e)===-1&&t.push(e)}function gn(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const bt=(t,e,n)=>n>e?e:n<t?t:n;function yn(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}let $t=()=>{},wt=()=>{};process.env.NODE_ENV!=="production"&&($t=(t,e,n)=>{!t&&typeof console<"u"&&console.warn(yn(e,n))},wt=(t,e,n)=>{if(!t)throw new Error(yn(e,n))});const Tt={},ni=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function si(t){return typeof t=="object"&&t!==null}const ii=t=>/^0[^.\s]+$/u.test(t);function vn(t){let e;return()=>(e===void 0&&(e=t()),e)}const nt=t=>t,$a=(t,e)=>n=>e(t(n)),le=(...t)=>t.reduce($a),ce=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s};class xn{constructor(){this.subscriptions=[]}add(e){return pn(this.subscriptions,e),()=>gn(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let o=0;o<i;o++){const r=this.subscriptions[o];r&&r(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const ot=t=>t*1e3,ut=t=>t/1e3;function ri(t,e){return e?t*(1e3/e):0}const oi=new Set;function bn(t,e,n){t||oi.has(e)||(console.warn(yn(e,n)),oi.add(e))}const ai=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Wa=1e-7,Ua=12;function za(t,e,n,s,i){let o,r,a=0;do r=e+(n-e)/2,o=ai(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>Wa&&++a<Ua);return r}function ue(t,e,n,s){if(t===e&&n===s)return nt;const i=o=>za(o,0,1,t,n);return o=>o===0||o===1?o:ai(i(o),e,s)}const li=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,ci=t=>e=>1-t(1-e),ui=ue(.33,1.53,.69,.99),wn=ci(ui),fi=li(wn),di=t=>(t*=2)<1?.5*wn(t):.5*(2-Math.pow(2,-10*(t-1))),Tn=t=>1-Math.sin(Math.acos(t)),hi=ci(Tn),mi=li(Tn),Ka=ue(.42,0,1,1),Ya=ue(0,0,.58,1),pi=ue(.42,0,.58,1),Ha=t=>Array.isArray(t)&&typeof t[0]!="number",gi=t=>Array.isArray(t)&&typeof t[0]=="number",yi={linear:nt,easeIn:Ka,easeInOut:pi,easeOut:Ya,circIn:Tn,circInOut:mi,circOut:hi,backIn:wn,backInOut:fi,backOut:ui,anticipate:di},Ga=t=>typeof t=="string",vi=t=>{if(gi(t)){wt(t.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,n,s,i]=t;return ue(e,n,s,i)}else if(Ga(t))return wt(yi[t]!==void 0,`Invalid easing type '${t}'`,"invalid-easing-type"),yi[t];return t},ke=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Xa(t,e){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),t()),c(a)}const u={schedule:(c,f=!1,d=!1)=>{const p=d&&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 qa=40;function xi(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=ke.reduce((v,E)=>(v[E]=Xa(o),v),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:f,preRender:d,render:m,postRender:p}=r,g=()=>{const v=Tt.useManualTiming?i.timestamp:performance.now();n=!1,Tt.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(v-i.timestamp,qa),1)),i.timestamp=v,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),f.process(i),d.process(i),m.process(i),p.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(g))},x=()=>{n=!0,s=!0,i.isProcessing||t(g)};return{schedule:ke.reduce((v,E)=>{const S=r[E];return v[E]=(C,A=!1,R=!1)=>(n||x(),S.schedule(C,A,R)),v},{}),cancel:v=>{for(let E=0;E<ke.length;E++)r[ke[E]].cancel(v)},state:i,steps:r}}const{schedule:L,cancel:Pt,state:Y,steps:Sn}=xi(typeof requestAnimationFrame<"u"?requestAnimationFrame:nt,!0);let Ne;function Za(){Ne=void 0}const Q={now:()=>(Ne===void 0&&Q.set(Y.isProcessing||Tt.useManualTiming?Y.timestamp:performance.now()),Ne),set:t=>{Ne=t,queueMicrotask(Za)}},bi=t=>e=>typeof e=="string"&&e.startsWith(t),Pn=bi("--"),Ja=bi("var(--"),Cn=t=>Ja(t)?Qa.test(t.split("/*")[0].trim()):!1,Qa=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Wt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},fe={...Wt,transform:t=>bt(0,1,t)},Oe={...Wt,default:1},de=t=>Math.round(t*1e5)/1e5,En=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function tl(t){return t==null}const el=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,An=(t,e)=>n=>!!(typeof n=="string"&&el.test(n)&&n.startsWith(t)||e&&!tl(n)&&Object.prototype.hasOwnProperty.call(n,e)),wi=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,o,r,a]=s.match(En);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},nl=t=>bt(0,255,t),Rn={...Wt,transform:t=>Math.round(nl(t))},Dt={test:An("rgb","red"),parse:wi("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+Rn.transform(t)+", "+Rn.transform(e)+", "+Rn.transform(n)+", "+de(fe.transform(s))+")"};function sl(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const jn={test:An("#"),parse:sl,transform:Dt.transform},he=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Ct=he("deg"),ft=he("%"),j=he("px"),il=he("vh"),rl=he("vw"),Ti={...ft,parse:t=>ft.parse(t)/100,transform:t=>ft.transform(t*100)},Ut={test:An("hsl","hue"),parse:wi("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+ft.transform(de(e))+", "+ft.transform(de(n))+", "+de(fe.transform(s))+")"},z={test:t=>Dt.test(t)||jn.test(t)||Ut.test(t),parse:t=>Dt.test(t)?Dt.parse(t):Ut.test(t)?Ut.parse(t):jn.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?Dt.transform(t):Ut.transform(t),getAnimatableNone:t=>{const e=z.parse(t);return e.alpha=0,z.transform(e)}},ol=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function al(t){return isNaN(t)&&typeof t=="string"&&(t.match(En)?.length||0)+(t.match(ol)?.length||0)>0}const Si="number",Pi="color",ll="var",cl="var(",Ci="${}",ul=/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 me(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(ul,l=>(z.test(l)?(s.color.push(o),i.push(Pi),n.push(z.parse(l))):l.startsWith(cl)?(s.var.push(o),i.push(ll),n.push(l)):(s.number.push(o),i.push(Si),n.push(parseFloat(l))),++o,Ci)).split(Ci);return{values:n,split:a,indexes:s,types:i}}function Ei(t){return me(t).values}function Ai(t){const{split:e,types:n}=me(t),s=e.length;return i=>{let o="";for(let r=0;r<s;r++)if(o+=e[r],i[r]!==void 0){const a=n[r];a===Si?o+=de(i[r]):a===Pi?o+=z.transform(i[r]):o+=i[r]}return o}}const fl=t=>typeof t=="number"?0:z.test(t)?z.getAnimatableNone(t):t;function dl(t){const e=Ei(t);return Ai(t)(e.map(fl))}const Et={test:al,parse:Ei,createTransformer:Ai,getAnimatableNone:dl};function Mn(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function hl({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,o=0,r=0;if(!e)i=o=r=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=Mn(l,a,t+1/3),o=Mn(l,a,t),r=Mn(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}function Ie(t,e){return n=>n>0?e:t}const F=(t,e,n)=>t+(e-t)*n,Dn=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},ml=[jn,Dt,Ut],pl=t=>ml.find(e=>e.test(t));function Ri(t){const e=pl(t);if($t(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return!1;let n=e.parse(t);return e===Ut&&(n=hl(n)),n}const ji=(t,e)=>{const n=Ri(t),s=Ri(e);if(!n||!s)return Ie(t,e);const i={...n};return o=>(i.red=Dn(n.red,s.red,o),i.green=Dn(n.green,s.green,o),i.blue=Dn(n.blue,s.blue,o),i.alpha=F(n.alpha,s.alpha,o),Dt.transform(i))},Vn=new Set(["none","hidden"]);function gl(t,e){return Vn.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function yl(t,e){return n=>F(t,e,n)}function kn(t){return typeof t=="number"?yl:typeof t=="string"?Cn(t)?Ie:z.test(t)?ji:bl:Array.isArray(t)?Mi:typeof t=="object"?z.test(t)?ji:vl:Ie}function Mi(t,e){const n=[...t],s=n.length,i=t.map((o,r)=>kn(o)(o,e[r]));return o=>{for(let r=0;r<s;r++)n[r]=i[r](o);return n}}function vl(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=kn(t[i])(t[i],e[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}}function xl(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const o=e.types[i],r=t.indexes[o][s[o]],a=t.values[r]??0;n[i]=a,s[o]++}return n}const bl=(t,e)=>{const n=Et.createTransformer(e),s=me(t),i=me(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?Vn.has(t)&&!i.values.length||Vn.has(e)&&!s.values.length?gl(t,e):le(Mi(xl(s,i),i.values),n):($t(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Ie(t,e))};function Di(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?F(t,e,n):kn(t)(t,e)}const wl=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>L.update(e,n),stop:()=>Pt(e),now:()=>Y.isProcessing?Y.timestamp:Q.now()}},Vi=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let o=0;o<i;o++)s+=Math.round(t(o/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},Le=2e4;function Nn(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<Le;)e+=n,s=t.next(e);return e>=Le?1/0:e}function Tl(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(Nn(s),Le);return{type:"keyframes",ease:o=>s.next(i*o).value/e,duration:ut(i)}}const Sl=5;function ki(t,e,n){const s=Math.max(e-Sl,0);return ri(n-t(s),e-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 Pl({duration:t=B.duration,bounce:e=B.bounce,velocity:n=B.velocity,mass:s=B.mass}){let i,o;$t(t<=ot(B.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let r=1-e;r=bt(B.minDamping,B.maxDamping,r),t=bt(B.minDuration,B.maxDuration,ut(t)),r<1?(i=u=>{const c=u*r,f=c*t,d=c-n,m=In(u,r),p=Math.exp(-f);return On-d/m*p},o=u=>{const f=u*r*t,d=f*n+n,m=Math.pow(r,2)*Math.pow(u,2)*t,p=Math.exp(-f),g=In(Math.pow(u,2),r);return(-i(u)+On>0?-1:1)*((d-m)*p)/g}):(i=u=>{const c=Math.exp(-u*t),f=(u-n)*t+1;return-On+c*f},o=u=>{const c=Math.exp(-u*t),f=(n-u)*(t*t);return c*f});const a=5/t,l=El(i,o,a);if(t=ot(t),isNaN(l))return{stiffness:B.stiffness,damping:B.damping,duration:t};{const u=Math.pow(l,2)*s;return{stiffness:u,damping:r*2*Math.sqrt(s*u),duration:t}}}const Cl=12;function El(t,e,n){let s=n;for(let i=1;i<Cl;i++)s=s-t(s)/e(s);return s}function In(t,e){return t*Math.sqrt(1-e*e)}const Al=["duration","bounce"],Rl=["stiffness","damping","mass"];function Ni(t,e){return e.some(n=>t[n]!==void 0)}function jl(t){let e={velocity:B.velocity,stiffness:B.stiffness,damping:B.damping,mass:B.mass,isResolvedFromDuration:!1,...t};if(!Ni(t,Rl)&&Ni(t,Al))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,o=2*bt(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:B.mass,stiffness:i,damping:o}}else{const n=Pl(t);e={...e,...n,mass:B.mass},e.isResolvedFromDuration=!0}return e}function Fe(t=B.visualDuration,e=B.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;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:d,isResolvedFromDuration:m}=jl({...n,velocity:-ut(n.velocity||0)}),p=d||0,g=u/(2*Math.sqrt(l*c)),x=r-o,y=ut(Math.sqrt(l/c)),w=Math.abs(x)<5;s||(s=w?B.restSpeed.granular:B.restSpeed.default),i||(i=w?B.restDelta.granular:B.restDelta.default);let v;if(g<1){const S=In(y,g);v=C=>{const A=Math.exp(-g*y*C);return r-A*((p+g*y*x)/S*Math.sin(S*C)+x*Math.cos(S*C))}}else if(g===1)v=S=>r-Math.exp(-y*S)*(x+(p+y*x)*S);else{const S=y*Math.sqrt(g*g-1);v=C=>{const A=Math.exp(-g*y*C),R=Math.min(S*C,300);return r-A*((p+g*y*x)*Math.sinh(R)+S*x*Math.cosh(R))/S}}const E={calculatedDuration:m&&f||null,next:S=>{const C=v(S);if(m)a.done=S>=f;else{let A=S===0?p:0;g<1&&(A=S===0?ot(p):ki(v,S,C));const R=Math.abs(A)<=s,N=Math.abs(r-C)<=i;a.done=R&&N}return a.value=a.done?r:C,a},toString:()=>{const S=Math.min(Nn(E),Le),C=Vi(A=>E.next(S*A).value,S,30);return S+"ms "+C},toTransition:()=>{}};return E}Fe.applyToOptions=t=>{const e=Tl(t,100,Fe);return t.ease=e.ease,t.duration=ot(e.duration),t.type="keyframes",t};function Ln({keyframes:t,velocity:e=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=t[0],d={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 g=n*e;const x=f+g,y=r===void 0?x:r(x);y!==x&&(g=y-f);const w=R=>-g*Math.exp(-R/s),v=R=>y+w(R),E=R=>{const N=w(R),O=v(R);d.done=Math.abs(N)<=u,d.value=d.done?y:O};let S,C;const A=R=>{m(d.value)&&(S=R,C=Fe({keyframes:[d.value,p(d.value)],velocity:ki(v,R,d.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return A(0),{calculatedDuration:null,next:R=>{let N=!1;return!C&&S===void 0&&(N=!0,E(R),A(R)),S!==void 0&&R>=S?C.next(R-S):(!N&&E(R),d)}}}function Ml(t,e,n){const s=[],i=n||Tt.mix||Di,o=t.length-1;for(let r=0;r<o;r++){let a=i(t[r],t[r+1]);if(e){const l=Array.isArray(e)?e[r]||nt:e;a=le(l,a)}s.push(a)}return s}function Dl(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;if(wt(o===e.length,"Both input and output ranges must be the same length","range-length"),o===1)return()=>e[0];if(o===2&&e[0]===e[1])return()=>e[1];const r=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=Ml(e,s,i),l=a.length,u=c=>{if(r&&c<t[0])return e[0];let f=0;if(l>1)for(;f<t.length-2&&!(c<t[f+1]);f++);const d=ce(t[f],t[f+1],c);return a[f](d)};return n?c=>u(bt(t[0],t[o-1],c)):u}function Vl(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=ce(0,e,s);t.push(F(n,1,i))}}function kl(t){const e=[0];return Vl(e,t.length-1),e}function Nl(t,e){return t.map(n=>n*e)}function Ol(t,e){return t.map(()=>e||pi).splice(0,t.length-1)}function zt({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Ha(s)?s.map(vi):vi(s),o={done:!1,value:e[0]},r=Nl(n&&n.length===e.length?n:kl(e),t),a=Dl(r,e,{ease:Array.isArray(i)?i:Ol(e,i)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}const Il=t=>t!==null;function Fn(t,{repeat:e,repeatType:n="loop"},s,i=1){const o=t.filter(Il),a=i<0||e&&n!=="loop"&&e%2===1?0:o.length-1;return!a||s===void 0?o[a]:s}const Ll={decay:Ln,inertia:Ln,tween:zt,keyframes:zt,spring:Fe};function Oi(t){typeof t.type=="string"&&(t.type=Ll[t.type])}class Bn{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const Fl=t=>t/100;class _n extends Bn{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==Q.now()&&this.tick(Q.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;Oi(e);const{type:n=zt,repeat:s=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=e;let{keyframes:a}=e;const l=n||zt;process.env.NODE_ENV!=="production"&&l!==zt&&wt(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==zt&&typeof a[0]!="number"&&(this.mixKeyframes=le(Fl,Di(a[0],a[1])),a=[0,100]);const u=l({...e,keyframes:a});o==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-r})),u.calculatedDuration===null&&(u.calculatedDuration=Nn(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=u}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:s,totalDuration:i,mixKeyframes: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:d,repeatDelay:m,type:p,onUpdate:g,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const y=this.currentTime-u*(this.playbackSpeed>=0?1:-1),w=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let v=this.currentTime,E=s;if(f){const R=Math.min(this.currentTime,i)/a;let N=Math.floor(R),O=R%1;!O&&R>=1&&(O=1),O===1&&N--,N=Math.min(N,f+1),!!(N%2)&&(d==="reverse"?(O=1-O,m&&(O-=m/a)):d==="mirror"&&(E=r)),v=bt(0,1,O)*a}const S=w?{done:!1,value:c[0]}:E.next(v);o&&(S.value=o(S.value));let{done:C}=S;!w&&l!==null&&(C=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const A=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return A&&p!==Ln&&(S.value=Fn(c,this.options,x,this.speed)),g&&g(S.value),A&&this.finish(),S}then(e,n){return this.finished.then(e,n)}get duration(){return ut(this.calculatedDuration)}get time(){return ut(this.currentTime)}set time(e){e=ot(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(Q.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=ut(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=wl,startTime:n}=this.options;this.driver||(this.driver=e(i=>this.tick(i))),this.options.onPlay?.();const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(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(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}function Bl(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Vt=t=>t*180/Math.PI,$n=t=>{const e=Vt(Math.atan2(t[1],t[0]));return Wn(e)},_l={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:$n,rotateZ:$n,skewX:t=>Vt(Math.atan(t[1])),skewY:t=>Vt(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Wn=t=>(t=t%360,t<0&&(t+=360),t),Ii=$n,Li=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Fi=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),$l={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Li,scaleY:Fi,scale:t=>(Li(t)+Fi(t))/2,rotateX:t=>Wn(Vt(Math.atan2(t[6],t[5]))),rotateY:t=>Wn(Vt(Math.atan2(-t[2],t[0]))),rotateZ:Ii,rotate:Ii,skewX:t=>Vt(Math.atan(t[4])),skewY:t=>Vt(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Un(t){return t.includes("scale")?1:0}function zn(t,e){if(!t||t==="none")return Un(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=$l,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=_l,i=a}if(!i)return Un(e);const o=s[e],r=i[1].split(",").map(Ul);return typeof o=="function"?o(r):r[o]}const Wl=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return zn(n,e)};function Ul(t){return parseFloat(t.trim())}const Kt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Yt=new Set(Kt),Bi=t=>t===Wt||t===j,zl=new Set(["x","y","z"]),Kl=Kt.filter(t=>!zl.has(t));function Yl(t){const e=[];return Kl.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const kt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>zn(e,"x"),y:(t,{transform:e})=>zn(e,"y")};kt.translateX=kt.x,kt.translateY=kt.y;const Nt=new Set;let Kn=!1,Yn=!1,Hn=!1;function _i(){if(Yn){const t=Array.from(Nt).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=Yl(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([o,r])=>{s.getValue(o)?.set(r)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Yn=!1,Kn=!1,Nt.forEach(t=>t.complete(Hn)),Nt.clear()}function $i(){Nt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Yn=!0)})}function Hl(){Hn=!0,$i(),_i(),Hn=!1}class Gn{constructor(e,n,s,i,o,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=o,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(Nt.add(this),Kn||(Kn=!0,L.read($i),L.resolveKeyframes(_i))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const o=i?.get(),r=e[e.length-1];if(o!==void 0)e[0]=o;else if(s&&n){const a=s.readValue(n,r);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=r),i&&o===void 0&&i.set(e[0])}Bl(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Nt.delete(this)}cancel(){this.state==="scheduled"&&(Nt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Gl=t=>t.startsWith("--");function Xl(t,e,n){Gl(e)?t.style.setProperty(e,n):t.style[e]=n}const ql=vn(()=>window.ScrollTimeline!==void 0),Zl={};function Jl(t,e){const n=vn(t);return()=>Zl[e]??n()}const Wi=Jl(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),pe=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Ui={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:pe([0,.65,.55,1]),circOut:pe([.55,0,1,.45]),backIn:pe([.31,.01,.66,-.59]),backOut:pe([.33,1.53,.69,.99])};function zi(t,e){if(t)return typeof t=="function"?Wi()?Vi(t,e):"ease-out":gi(t)?pe(t):Array.isArray(t)?t.map(n=>zi(n,e)||Ui.easeOut):Ui[t]}function Ql(t,e,n,{delay:s=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[e]:n};l&&(c.offset=l);const f=zi(a,i);Array.isArray(f)&&(c.easing=f);const d={delay:s,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"};return u&&(d.pseudoElement=u),t.animate(c,d)}function Ki(t){return typeof t=="function"&&"applyToOptions"in t}function tc({type:t,...e}){return Ki(t)&&Wi()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class ec extends Bn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!o,this.allowFlatten=r,this.options=e,wt(typeof e.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=tc(e);this.animation=Ql(n,s,i,u,o),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const c=Fn(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):Xl(n,s,c),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return ut(Number(e))}get time(){return ut(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=ot(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&ql()?(this.animation.timeline=e,nt):n(this)}}const Yi={anticipate:di,backInOut:fi,circInOut:mi};function nc(t){return t in Yi}function sc(t){typeof t.ease=="string"&&nc(t.ease)&&(t.ease=Yi[t.ease])}const Hi=10;class ic extends ec{constructor(e){sc(e),Oi(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:s,onComplete:i,element:o,...r}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new _n({...r,autoplay:!1}),l=ot(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-Hi).value,a.sample(l).value,Hi),a.stop()}}const Gi=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Et.test(t)||t==="0")&&!t.startsWith("url("));function rc(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function oc(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const o=t[t.length-1],r=Gi(i,e),a=Gi(o,e);return $t(r===a,`You are trying to animate ${e} from "${i}" to "${o}". "${r?o:i}" is not an animatable value.`,"value-not-animatable"),!r||!a?!1:rc(t)||(n==="spring"||Ki(n))&&s}function Xn(t){t.duration=0,t.type}const ac=new Set(["opacity","clipPath","filter","transform"]),lc=vn(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function cc(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:o,type:r}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=e.owner.getProps();return lc()&&n&&ac.has(n)&&(n!=="transform"||!u)&&!l&&!s&&i!=="mirror"&&o!==0&&r!=="inertia"}const uc=40;class fc extends Bn{constructor({autoplay:e=!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 d={autoplay:e,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,g,x)=>this.onKeyframesResolved(p,g,d,!x),l,u,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,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(),oc(e,o,r,a)||((Tt.instantAnimations||!l)&&c?.(Fn(e,s,n)),e[0]=e[e.length-1],Xn(s),s.repeat=0);const d={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>uc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},m=!u&&cc(d)?new ic({...d,element:d.motionValue.owner.current}):new _n(d);m.finished.then(()=>this.notifyFinished()).catch(nt),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(e,n){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Hl()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const dc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function hc(t){const e=dc.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}const mc=4;function Xi(t,e,n=1){wt(n<=mc,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,i]=hc(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const r=o.trim();return ni(r)?parseFloat(r):r}return Cn(i)?Xi(i,e,n+1):i}function qn(t,e){return t?.[e]??t?.default??t}const qi=new Set(["width","height","top","left","right","bottom",...Kt]),pc={test:t=>t==="auto",parse:t=>t},Zi=t=>e=>e.test(t),Ji=[Wt,j,ft,Ct,rl,il,pc],Qi=t=>Ji.find(Zi(t));function gc(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||ii(t):!0}const yc=new Set(["brightness","contrast","saturate","opacity"]);function vc(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(En)||[];if(!s)return t;const i=n.replace(s,"");let o=yc.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const xc=/\b([a-z-]*)\(.*?\)/gu,Zn={...Et,getAnimatableNone:t=>{const e=t.match(xc);return e?e.map(vc).join(" "):t}},tr={...Wt,transform:Math.round},Jn={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:Ct,rotateX:Ct,rotateY:Ct,rotateZ:Ct,scale:Oe,scaleX:Oe,scaleY:Oe,scaleZ:Oe,skew:Ct,skewX:Ct,skewY:Ct,distance:j,translateX:j,translateY:j,translateZ:j,x:j,y:j,z:j,perspective:j,transformPerspective:j,opacity:fe,originX:Ti,originY:Ti,originZ:j},zIndex:tr,fillOpacity:fe,strokeOpacity:fe,numOctaves:tr},bc={...Jn,color:z,backgroundColor:z,outlineColor:z,fill:z,stroke:z,borderColor:z,borderTopColor:z,borderRightColor:z,borderBottomColor:z,borderLeftColor:z,filter:Zn,WebkitFilter:Zn},er=t=>bc[t];function nr(t,e){let n=er(t);return n!==Zn&&(n=Et),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const wc=new Set(["auto","none","0"]);function Tc(t,e,n){let s=0,i;for(;s<t.length&&!i;){const o=t[s];typeof o=="string"&&!wc.has(o)&&me(o).values.length&&(i=t[s]),s++}if(i&&n)for(const o of e)t[o]=nr(n,i)}class Sc extends Gn{constructor(e,n,s,i,o){super(e,n,s,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let u=e[l];if(typeof u=="string"&&(u=u.trim(),Cn(u))){const c=Xi(u,n.current);c!==void 0&&(e[l]=c),l===e.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!qi.has(s)||e.length!==2)return;const[i,o]=e,r=Qi(i),a=Qi(o);if(r!==a)if(Bi(r)&&Bi(a))for(let l=0;l<e.length;l++){const u=e[l];typeof u=="string"&&(e[l]=parseFloat(u))}else kt[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||gc(e[i]))&&s.push(i);s.length&&Tc(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e||!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=kt[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=s.length-1,r=s[o];s[o]=kt[n](e.measureViewportBox(),window.getComputedStyle(e.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,l])=>{e.getValue(a).set(l)}),this.resolveNoneKeyframes()}}function Pc(t,e,n){if(t instanceof EventTarget)return[t];if(typeof t=="string"){let s=document;const i=n?.[t]??s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}const sr=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function ir(t){return si(t)&&"offsetHeight"in t}const rr=30,Cc=t=>!isNaN(parseFloat(t));class Ec{constructor(e,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(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=Q.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Cc(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!=="production"&&bn(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new xn);const s=this.events[e].add(n);return e==="change"?()=>{s(),L.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=Q.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>rr)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,rr);return ri(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ht(t,e){return new Ec(t,e)}const{schedule:Qn}=xi(queueMicrotask,!1),at={x:!1,y:!1};function or(){return at.x||at.y}function Ac(t){return t==="x"||t==="y"?at[t]?null:(at[t]=!0,()=>{at[t]=!1}):at.x||at.y?null:(at.x=at.y=!0,()=>{at.x=at.y=!1})}function ar(t,e){const n=Pc(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function lr(t){return!(t.pointerType==="touch"||or())}function Rc(t,e,n={}){const[s,i,o]=ar(t,n),r=a=>{if(!lr(a))return;const{target:l}=a,u=e(l,a);if(typeof u!="function"||!l)return;const c=f=>{lr(f)&&(u(f),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,i)};return s.forEach(a=>{a.addEventListener("pointerenter",r,i)}),o}const cr=(t,e)=>e?t===e?!0:cr(t,e.parentElement):!1,ts=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,jc=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Mc(t){return jc.has(t.tagName)||t.tabIndex!==-1}const Be=new WeakSet;function ur(t){return e=>{e.key==="Enter"&&t(e)}}function es(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Dc=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=ur(()=>{if(Be.has(n))return;es(n,"down");const i=ur(()=>{es(n,"up")}),o=()=>es(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",o,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function fr(t){return ts(t)&&!or()}function Vc(t,e,n={}){const[s,i,o]=ar(t,n),r=a=>{const l=a.currentTarget;if(!fr(a))return;Be.add(l);const u=e(l,a),c=(m,p)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",d),Be.has(l)&&Be.delete(l),fr(m)&&typeof u=="function"&&u(m,{success:p})},f=m=>{c(m,l===window||l===document||n.useGlobalTarget||cr(l,m.target))},d=m=>{c(m,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",d,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,i),ir(a)&&(a.addEventListener("focus",u=>Dc(u,i)),!Mc(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function dr(t){return si(t)&&"ownerSVGElement"in t}function kc(t){return dr(t)&&t.tagName==="svg"}const H=t=>!!(t&&t.getVelocity),Nc=[...Ji,z,Et],Oc=t=>Nc.find(Zi(t)),ns=T.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});class Ic extends P.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const s=n.offsetParent,i=ir(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 Lc({children:t,isPresent:e,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(ns);return T.useInsertionEffect(()=>{const{width:l,height:u,top:c,left:f,right:d}=r.current;if(e||!o.current||!l||!u)return;const m=n==="left"?`left: ${f}`:`right: ${d}`;o.current.dataset.motionPopId=i;const p=document.createElement("style");a&&(p.nonce=a);const g=s??document.head;return g.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;
26
26
  height: ${u}px !important;
27
- ${h}px !important;
27
+ ${m}px !important;
28
28
  top: ${c}px !important;
29
29
  }
30
- `),()=>{g.contains(m)&&g.removeChild(m)}},[e]),p.jsx(Ac,{isPresent:e,childRef:o,sizeRef:r,children:P.cloneElement(t,{ref:o})})}const Rc=({children:t,initial:e,isPresent:n,onExitComplete:s,custom:i,presenceAffectsLayout:o,mode:r,anchorX:a,root:l})=>{const u=Qe(Mc),c=S.useId();let f=!0,d=S.useMemo(()=>(f=!1,{id:c,initial:e,isPresent:n,custom:i,onExitComplete:h=>{u.set(h,!0);for(const m of u.values())if(!m)return;s&&s()},register:h=>(u.set(h,!1),()=>u.delete(h))}),[n,u,s]);return o&&f&&(d={...d}),S.useMemo(()=>{u.forEach((h,m)=>u.set(m,!1))},[n]),P.useEffect(()=>{!n&&!u.size&&s&&s()},[n]),r==="popLayout"&&(t=p.jsx(Ec,{isPresent:n,anchorX:a,root:l,children:t})),p.jsx(we.Provider,{value:d,children:t})};function Mc(){return new Map}function nr(t=!0){const e=S.useContext(we);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,o=S.useId();S.useEffect(()=>{if(t)return i(o)},[t]);const r=S.useCallback(()=>t&&s&&s(o),[o,s,t]);return!n&&s?[!1,r]:[!0]}const Me=t=>t.key||"";function sr(t){const e=[];return S.Children.forEach(t,n=>{S.isValidElement(n)&&e.push(n)}),e}const ir=({children:t,custom:e,initial:n=!0,onExitComplete:s,presenceAffectsLayout:i=!0,mode:o="sync",propagate:r=!1,anchorX:a="left",root:l})=>{const[u,c]=nr(r),f=S.useMemo(()=>sr(t),[t]),d=r&&!u?[]:f.map(Me),h=S.useRef(!0),m=S.useRef(f),g=Qe(()=>new Map),[v,y]=S.useState(f),[w,x]=S.useState(f);zs(()=>{h.current=!1,m.current=f;for(let R=0;R<w.length;R++){const E=Me(w[R]);d.includes(E)?g.delete(E):g.get(E)!==!0&&g.set(E,!1)}},[w,d.length,d.join("-")]);const C=[];if(f!==v){let R=[...f];for(let E=0;E<w.length;E++){const A=w[E],j=Me(A);d.includes(j)||(R.splice(E,0,A),C.push(A))}return o==="wait"&&C.length&&(R=C),x(sr(R)),y(f),null}process.env.NODE_ENV!=="production"&&o==="wait"&&w.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:T}=S.useContext(Je);return p.jsx(p.Fragment,{children:w.map(R=>{const E=Me(R),A=r&&!u?!1:f===w||d.includes(E),j=()=>{if(g.has(E))g.set(E,!0);else return;let O=!0;g.forEach(W=>{W||(O=!1)}),O&&(T?.(),x(m.current),r&&c?.(),s&&s())};return p.jsx(Rc,{isPresent:A,initial:!h.current||n?void 0:!1,custom:e,presenceAffectsLayout:i,mode:o,root:l,onExitComplete:A?void 0:j,anchorX:a,children:R},E)})})},rr=S.createContext({strict:!1}),or={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"]},Wt={};for(const t in or)Wt[t]={isEnabled:e=>or[t].some(n=>!!e[n])};function Dc(t){for(const e in t)Wt[e]={...Wt[e],...t[e]}}const Vc=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 De(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Vc.has(t)}let ar=t=>!De(t);function jc(t){typeof t=="function"&&(ar=e=>e.startsWith("on")?!De(e):t(e))}try{jc(require("@emotion/is-prop-valid").default)}catch{}function kc(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(ar(i)||n===!0&&De(i)||!e&&!De(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const Ve=S.createContext({});function je(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function le(t){return typeof t=="string"||Array.isArray(t)}const zn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Kn=["initial",...zn];function ke(t){return je(t.animate)||Kn.some(e=>le(t[e]))}function lr(t){return!!(ke(t)||t.variants)}function Oc(t,e){if(ke(t)){const{initial:n,animate:s}=t;return{initial:n===!1||le(n)?n:void 0,animate:le(s)?s:void 0}}return t.inherit!==!1?e:{}}function Nc(t){const{initial:e,animate:n}=Oc(t,S.useContext(Ve));return S.useMemo(()=>({initial:e,animate:n}),[cr(e),cr(n)])}function cr(t){return Array.isArray(t)?t.join(" "):t}const ce={};function Ic(t){for(const e in t)ce[e]=t[e],fn(e)&&(ce[e].isCSSVariable=!0)}function ur(t,{layout:e,layoutId:n}){return _t.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!ce[t]||t==="opacity")}const Lc={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Fc=Bt.length;function Bc(t,e,n){let s="",i=!0;for(let o=0;o<Fc;o++){const r=Bt[o],a=t[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=Yi(a,Bn[r]);if(!l){i=!1;const c=Lc[r]||r;s+=`${c}(${u}) `}n&&(e[r]=u)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function Yn(t,e,n){const{style:s,vars:i,transformOrigin:o}=t;let r=!1,a=!1;for(const l in e){const u=e[l];if(_t.has(l)){r=!0;continue}else if(fn(l)){i[l]=u;continue}else{const c=Yi(u,Bn[l]);l.startsWith("origin")?(a=!0,o[l]=c):s[l]=c}}if(e.transform||(r||n?s.transform=Bc(e,t.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 Hn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function fr(t,e,n){for(const s in e)!K(e[s])&&!ur(s,n)&&(t[s]=e[s])}function _c({transformTemplate:t},e){return S.useMemo(()=>{const n=Hn();return Yn(n,e,t),Object.assign({},n.vars,n.style)},[e])}function $c(t,e){const n=t.style||{},s={};return fr(s,n,t),Object.assign(s,_c(t,e)),s}function Wc(t,e){const n={},s=$c(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=s,n}const Uc={offset:"stroke-dashoffset",array:"stroke-dasharray"},zc={offset:"strokeDashoffset",array:"strokeDasharray"};function Kc(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?Uc:zc;t[o.offset]=M.transform(-s);const r=M.transform(e),a=M.transform(n);t[o.array]=`${r} ${a}`}function dr(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:o=1,pathOffset:r=0,...a},l,u,c){if(Yn(t,a,u),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:f,style:d}=t;f.transform&&(d.transform=f.transform,delete f.transform),(d.transform||f.transformOrigin)&&(d.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),d.transform&&(d.transformBox=c?.transformBox??"fill-box",delete f.transformBox),e!==void 0&&(f.x=e),n!==void 0&&(f.y=n),s!==void 0&&(f.scale=s),i!==void 0&&Kc(f,i,o,r,!1)}const hr=()=>({...Hn(),attrs:{}}),mr=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Yc(t,e,n,s){const i=S.useMemo(()=>{const o=hr();return dr(o,e,mr(s),t.transformTemplate,t.style),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};fr(o,t.style,t),i.style={...o,...i.style}}return i}const Hc=["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 Gn(t){return typeof t!="string"||t.includes("-")?!1:!!(Hc.indexOf(t)>-1||/[A-Z]/u.test(t))}function Gc(t,e,n,{latestValues:s},i,o=!1){const a=(Gn(t)?Yc:Wc)(e,s,i,t),l=kc(e,typeof t=="string",o),u=t!==S.Fragment?{...l,...a,ref:n}:{},{children:c}=e,f=S.useMemo(()=>K(c)?c.get():c,[c]);return S.createElement(t,{...u,children:f})}function pr(t){const e=[{},{}];return t?.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function Xn(t,e,n,s){if(typeof e=="function"){const[i,o]=pr(s);e=e(n!==void 0?n:t.custom,i,o)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,o]=pr(s);e=e(n!==void 0?n:t.custom,i,o)}return e}function Oe(t){return K(t)?t.get():t}function Xc({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:qc(n,s,i,t),renderState:e()}}function qc(t,e,n,s){const i={},o=s(t,{});for(const d in o)i[d]=Oe(o[d]);let{initial:r,animate:a}=t;const l=ke(t),u=lr(t);e&&u&&!l&&t.inherit!==!1&&(r===void 0&&(r=e.initial),a===void 0&&(a=e.animate));let c=n?n.initial===!1:!1;c=c||r===!1;const f=c?a:r;if(f&&typeof f!="boolean"&&!je(f)){const d=Array.isArray(f)?f:[f];for(let h=0;h<d.length;h++){const m=Xn(t,d[h]);if(m){const{transitionEnd:g,transition:v,...y}=m;for(const w in y){let x=y[w];if(Array.isArray(x)){const C=c?x.length-1:0;x=x[C]}x!==null&&(i[w]=x)}for(const w in g)i[w]=g[w]}}}return i}const gr=t=>(e,n)=>{const s=S.useContext(Ve),i=S.useContext(we),o=()=>Xc(t,e,s,i);return n?o():Qe(o)};function qn(t,e,n){const{style:s}=t,i={};for(const o in s)(K(s[o])||e.style&&K(e.style[o])||ur(o,t)||n?.getValue(o)?.liveStyle!==void 0)&&(i[o]=s[o]);return i}const Zc=gr({scrapeMotionValuesFromProps:qn,createRenderState:Hn});function yr(t,e,n){const s=qn(t,e,n);for(const i in t)if(K(t[i])||K(e[i])){const o=Bt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[o]=t[i]}return s}const Jc=gr({scrapeMotionValuesFromProps:yr,createRenderState:hr}),Qc=Symbol.for("motionComponentSymbol");function Ut(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function tu(t,e,n){return S.useCallback(s=>{s&&t.onMount&&t.onMount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):Ut(n)&&(n.current=s))},[e])}const Zn=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),vr="data-"+Zn("framerAppearId"),xr=S.createContext({});function eu(t,e,n,s,i){const{visualElement:o}=S.useContext(Ve),r=S.useContext(rr),a=S.useContext(we),l=S.useContext(Un).reducedMotion,u=S.useRef(null);s=s||r.renderer,!u.current&&s&&(u.current=s(t,{visualState:e,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const c=u.current,f=S.useContext(xr);c&&!c.projection&&i&&(c.type==="html"||c.type==="svg")&&nu(u.current,n,i,f);const d=S.useRef(!1);S.useInsertionEffect(()=>{c&&d.current&&c.update(n,a)});const h=n[vr],m=S.useRef(!!h&&!window.MotionHandoffIsComplete?.(h)&&window.MotionHasOptimisedAnimation?.(h));return zs(()=>{c&&(d.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),m.current&&c.animationState&&c.animationState.animateChanges())}),S.useEffect(()=>{c&&(!m.current&&c.animationState&&c.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(h)}),m.current=!1),c.enteringChildren=void 0)}),c}function nu(t,e,n,s){const{layoutId:i,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:br(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!r||a&&Ut(a),visualElement:t,animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,crossfade:c,layoutScroll:l,layoutRoot:u})}function br(t){if(t)return t.options.allowProjection!==!1?t.projection:br(t.parent)}function Jn(t,{forwardMotionProps:e=!1}={},n,s){n&&Dc(n);const i=Gn(t)?Jc:Zc;function o(a,l){let u;const c={...S.useContext(Un),...a,layoutId:su(a)},{isStatic:f}=c,d=Nc(a),h=i(a,f);if(!f&&tn){iu(c,n);const m=ru(c);u=m.MeasureLayout,d.visualElement=eu(t,h,c,s,m.ProjectionNode)}return p.jsxs(Ve.Provider,{value:d,children:[u&&d.visualElement?p.jsx(u,{visualElement:d.visualElement,...c}):null,Gc(t,a,tu(h,d.visualElement,l),h,f,e)]})}o.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const r=S.forwardRef(o);return r[Qc]=t,r}function su({layoutId:t}){const e=S.useContext(Je).id;return e&&t!==void 0?e+"-"+t:t}function iu(t,e){const n=S.useContext(rr).strict;if(process.env.NODE_ENV!=="production"&&e&&n){const s="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?Nt(!1,s,"lazy-strict-mode"):yt(!1,s,"lazy-strict-mode")}}function ru(t){const{drag:e,layout:n}=Wt;if(!e&&!n)return{};const s={...e,...n};return{MeasureLayout:e?.isEnabled(t)||n?.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function ou(t,e){if(typeof Proxy>"u")return Jn;const n=new Map,s=(o,r)=>Jn(o,r,t,e),i=(o,r)=>(process.env.NODE_ENV!=="production"&&an(!1,"motion() is deprecated. Use motion.create() instead."),s(o,r));return new Proxy(i,{get:(o,r)=>r==="create"?s:(n.has(r)||n.set(r,Jn(r,void 0,t,e)),n.get(r))})}function wr({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function au({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function lu(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function Qn(t){return t===void 0||t===1}function ts({scale:t,scaleX:e,scaleY:n}){return!Qn(t)||!Qn(e)||!Qn(n)}function Vt(t){return ts(t)||Tr(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Tr(t){return Sr(t.x)||Sr(t.y)}function Sr(t){return t&&t!=="0%"}function Ne(t,e,n){const s=t-n,i=e*s;return n+i}function Pr(t,e,n,s,i){return i!==void 0&&(t=Ne(t,i,s)),Ne(t,n,s)+e}function es(t,e=0,n=1,s,i){t.min=Pr(t.min,e,n,s,i),t.max=Pr(t.max,e,n,s,i)}function Cr(t,{x:e,y:n}){es(t.x,e.translate,e.scale,e.originPoint),es(t.y,n.translate,n.scale,n.originPoint)}const Ar=.999999999999,Er=1.0000000000001;function cu(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.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&&Kt(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Cr(t,r)),s&&Vt(o.latestValues)&&Kt(t,o.latestValues))}e.x<Er&&e.x>Ar&&(e.x=1),e.y<Er&&e.y>Ar&&(e.y=1)}function zt(t,e){t.min=t.min+e,t.max=t.max+e}function Rr(t,e,n,s,i=.5){const o=N(t.min,t.max,i);es(t,e,n,o,s)}function Kt(t,e){Rr(t.x,e.x,e.scaleX,e.scale,e.originX),Rr(t.y,e.y,e.scaleY,e.scale,e.originY)}function Mr(t,e){return wr(lu(t.getBoundingClientRect(),e))}function uu(t,e,n){const s=Mr(t,n),{scroll:i}=e;return i&&(zt(s.x,i.offset.x),zt(s.y,i.offset.y)),s}const Dr=()=>({translate:0,scale:1,origin:0,originPoint:0}),Yt=()=>({x:Dr(),y:Dr()}),Vr=()=>({min:0,max:0}),_=()=>({x:Vr(),y:Vr()}),ns={current:null},jr={current:!1};function fu(){if(jr.current=!0,!!tn)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>ns.current=t.matches;t.addEventListener("change",e),e()}else ns.current=!1}const du=new WeakMap;function hu(t,e,n){for(const s in e){const i=e[s],o=n[s];if(K(i))t.addValue(s,i);else if(K(o))t.addValue(s,$t(i,{owner:t}));else if(o!==i)if(t.hasValue(s)){const r=t.getValue(s);r.liveStyle===!0?r.jump(i):r.hasAnimated||r.set(i)}else{const r=t.getStaticValue(s);t.addValue(s,$t(r!==void 0?r:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const kr=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class mu{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,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=Nn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const d=Z.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,k.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=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=ke(n),this.isVariantNode=lr(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:c,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const h=f[d];l[d]!==void 0&&K(h)&&h.set(l[d])}}mount(e){this.current=e,du.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),jr.current||fu(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ns.current,process.env.NODE_ENV!=="production"&&an(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),xt(this.notifyUpdate),xt(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const s=_t.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",r=>{this.latestValues[e]=r,this.props.onUpdate&&k.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),o&&o(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Wt){const n=Wt[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const o=this.features[e];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):_()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<kr.length;s++){const i=kr[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,r=e[o];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=hu(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=$t(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(Ks(s)||Hs(s))?s=parseFloat(s):!Cc(s)&&wt.test(n)&&(s=Ki(e,n)),this.setBaseTarget(e,K(s)?s.get():s)),K(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const o=Xn(this.props,n,this.presenceContext?.custom);o&&(s=o[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!K(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new on),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){_n.render(this.render)}}class Or extends mu{constructor(){super(...arguments),this.KeyframeResolver=hc}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;K(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Nr(t,{style:e,vars:n},s,i){const o=t.style;let r;for(r in e)o[r]=e[r];i?.applyProjectionStyles(o,s);for(r in n)o.setProperty(r,n[r])}function pu(t){return window.getComputedStyle(t)}class gu extends Or{constructor(){super(...arguments),this.type="html",this.renderInstance=Nr}readValueFromInstance(e,n){if(_t.has(n))return this.projection?.isProjecting?Dn(n):jl(e,n);{const s=pu(e),i=(fn(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Mr(e,n)}build(e,n,s){Yn(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return qn(e,n,s)}}const Ir=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 yu(t,e,n,s){Nr(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Ir.has(i)?i:Zn(i),e.attrs[i])}class vu extends Or{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=_}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(_t.has(n)){const s=zi(n);return s&&s.default||0}return n=Ir.has(n)?n:Zn(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return yr(e,n,s)}build(e,n,s){dr(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){yu(e,n,s,i)}mount(e){this.isSVGTag=mr(e.tagName),super.mount(e)}}const xu=(t,e)=>Gn(t)?new vu(e):new gu(e,{allowProjection:t!==S.Fragment});function Ht(t,e,n){const s=t.getProps();return Xn(s,e,n!==void 0?n:s.custom,t)}const ss=t=>Array.isArray(t);function bu(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,$t(n))}function wu(t){return ss(t)?t[t.length-1]||0:t}function Tu(t,e){const n=Ht(t,e);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const r in o){const a=wu(o[r]);bu(t,r,a)}}function Su(t){return!!(K(t)&&t.add)}function is(t,e){const n=t.getValue("willChange");if(Su(n))return n.add(e);if(!n&&vt.WillChange){const s=new vt.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function Lr(t){return t.props[vr]}const Pu=t=>t!==null;function Cu(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(Pu),o=e&&n!=="loop"&&e%2===1?0:i.length-1;return i[o]}const Au={type:"spring",stiffness:500,damping:25,restSpeed:10},Eu=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Ru={type:"keyframes",duration:.8},Mu={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Du=(t,{keyframes:e})=>e.length>2?Ru:_t.has(t)?t.startsWith("scale")?Eu(e[1]):Au:Mu;function Vu({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const rs=(t,e,n,s={},i,o)=>r=>{const a=Ln(s,t)||{},l=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-it(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:d=>{e.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:i};Vu(a)||Object.assign(c,Du(t,c)),c.duration&&(c.duration=it(c.duration)),c.repeatDelay&&(c.repeatDelay=it(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let f=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(In(c),c.delay===0&&(f=!0)),(vt.instantAnimations||vt.skipAnimations)&&(f=!0,In(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,f&&!o&&e.get()!==void 0){const d=Cu(c.keyframes,a);if(d!==void 0){k.update(()=>{c.onUpdate(d),c.onComplete()});return}}return a.isSync?new En(c):new ec(c)};function ju({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Fr(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=e;s&&(o=s);const l=[],u=i&&t.animationState&&t.animationState.getState()[i];for(const c in a){const f=t.getValue(c,t.latestValues[c]??null),d=a[c];if(d===void 0||u&&ju(u,c))continue;const h={delay:n,...Ln(o||{},c)},m=f.get();if(m!==void 0&&!f.isAnimating&&!Array.isArray(d)&&d===m&&!h.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const y=Lr(t);if(y){const w=window.MotionHandoffAnimation(y,c,k);w!==null&&(h.startTime=w,g=!0)}}is(t,c),f.start(rs(c,f,d,t.shouldReduceMotion&&Bi.has(c)?{type:!1}:h,t,g));const v=f.animation;v&&l.push(v)}return r&&Promise.all(l).then(()=>{k.update(()=>{r&&Tu(t,r)})}),l}function Br(t,e,n,s=0,i=1){const o=Array.from(t).sort((u,c)=>u.sortNodePosition(c)).indexOf(e),r=t.size,a=(r-1)*s;return typeof n=="function"?n(o,r):i===1?o*s:a-o*s}function os(t,e,n={}){const s=Ht(t,e,n.type==="exit"?t.presenceContext?.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(Fr(t,s,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:c,staggerDirection:f}=i;return ku(t,e,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 ku(t,e,n=0,s=0,i=0,o=1,r){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(os(l,e,{...r,delay:n+(typeof s=="function"?0:s)+Br(t.variantChildren,l,s,i,o)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function Ou(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>os(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=os(t,e,n);else{const i=typeof e=="function"?Ht(t,e,n.custom):e;s=Promise.all(Fr(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}function _r(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}const Nu=Kn.length;function $r(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?$r(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<Nu;n++){const s=Kn[n],i=t.props[s];(le(i)||i===!1)&&(e[s]=i)}return e}const Iu=[...zn].reverse(),Lu=zn.length;function Fu(t){return e=>Promise.all(e.map(({animation:n,options:s})=>Ou(t,n,s)))}function Bu(t){let e=Fu(t),n=Wr(),s=!0;const i=l=>(u,c)=>{const f=Ht(t,c,l==="exit"?t.presenceContext?.custom:void 0);if(f){const{transition:d,transitionEnd:h,...m}=f;u={...u,...m,...h}}return u};function o(l){e=l(t)}function r(l){const{props:u}=t,c=$r(t.parent)||{},f=[],d=new Set;let h={},m=1/0;for(let v=0;v<Lu;v++){const y=Iu[v],w=n[y],x=u[y]!==void 0?u[y]:c[y],C=le(x),T=y===l?w.isActive:null;T===!1&&(m=v);let R=x===c[y]&&x!==u[y]&&C;if(R&&s&&t.manuallyAnimateOnMount&&(R=!1),w.protectedKeys={...h},!w.isActive&&T===null||!x&&!w.prevProp||je(x)||typeof x=="boolean")continue;const E=_u(w.prevProp,x);let A=E||y===l&&w.isActive&&!R&&C||v>m&&C,j=!1;const O=Array.isArray(x)?x:[x];let W=O.reduce(i(y),{});T===!1&&(W={});const{prevResolvedValues:at={}}=w,st={...at,...W},mt=L=>{A=!0,d.has(L)&&(j=!0,d.delete(L)),w.needsAnimating[L]=!0;const V=t.getValue(L);V&&(V.liveStyle=!1)};for(const L in st){const V=W[L],q=at[L];if(h.hasOwnProperty(L))continue;let b=!1;ss(V)&&ss(q)?b=!_r(V,q):b=V!==q,b?V!=null?mt(L):d.add(L):V!==void 0&&d.has(L)?mt(L):w.protectedKeys[L]=!0}w.prevProp=x,w.prevResolvedValues=W,w.isActive&&(h={...h,...W}),s&&t.blockInitialAnimation&&(A=!1);const Ct=R&&E;A&&(!Ct||j)&&f.push(...O.map(L=>{const V={type:y};if(typeof L=="string"&&s&&!Ct&&t.manuallyAnimateOnMount&&t.parent){const{parent:q}=t,b=Ht(q,L);if(q.enteringChildren&&b){const{delayChildren:D}=b.transition||{};V.delay=Br(q.enteringChildren,t,D)}}return{animation:L,options:V}}))}if(d.size){const v={};if(typeof u.initial!="boolean"){const y=Ht(t,Array.isArray(u.initial)?u.initial[0]:u.initial);y&&y.transition&&(v.transition=y.transition)}d.forEach(y=>{const w=t.getBaseTarget(y),x=t.getValue(y);x&&(x.liveStyle=!0),v[y]=w??null}),f.push({animation:v})}let g=!!f.length;return s&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(g=!1),s=!1,g?e(f):Promise.resolve()}function a(l,u){if(n[l].isActive===u)return Promise.resolve();t.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=Wr(),s=!0}}}function _u(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!_r(e,t):!1}function jt(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Wr(){return{animate:jt(!0),whileInView:jt(),whileHover:jt(),whileTap:jt(),whileDrag:jt(),whileFocus:jt(),exit:jt()}}class Tt{constructor(e){this.isMounted=!1,this.node=e}update(){}}class $u extends Tt{constructor(e){super(e),e.animationState||(e.animationState=Bu(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();je(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let Wu=0;class Uu extends Tt{constructor(){super(...arguments),this.id=Wu++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>{n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const zu={animation:{Feature:$u},exit:{Feature:Uu}};function ue(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function fe(t){return{point:{x:t.pageX,y:t.pageY}}}const Ku=t=>e=>$n(e)&&t(e,fe(e));function de(t,e,n,s){return ue(t,e,Ku(n),s)}const Ur=1e-4,Yu=1-Ur,Hu=1+Ur,zr=.01,Gu=0-zr,Xu=0+zr;function X(t){return t.max-t.min}function qu(t,e,n){return Math.abs(t-e)<=n}function Kr(t,e,n,s=.5){t.origin=s,t.originPoint=N(e.min,e.max,t.origin),t.scale=X(n)/X(e),t.translate=N(n.min,n.max,t.origin)-t.originPoint,(t.scale>=Yu&&t.scale<=Hu||isNaN(t.scale))&&(t.scale=1),(t.translate>=Gu&&t.translate<=Xu||isNaN(t.translate))&&(t.translate=0)}function he(t,e,n,s){Kr(t.x,e.x,n.x,s?s.originX:void 0),Kr(t.y,e.y,n.y,s?s.originY:void 0)}function Yr(t,e,n){t.min=n.min+e.min,t.max=t.min+X(e)}function Zu(t,e,n){Yr(t.x,e.x,n.x),Yr(t.y,e.y,n.y)}function Hr(t,e,n){t.min=e.min-n.min,t.max=t.min+X(e)}function me(t,e,n){Hr(t.x,e.x,n.x),Hr(t.y,e.y,n.y)}function tt(t){return[t("x"),t("y")]}const Gr=({current:t})=>t?t.ownerDocument.defaultView:null,Xr=(t,e)=>Math.abs(t-e);function Ju(t,e){const n=Xr(t.x,e.x),s=Xr(t.y,e.y);return Math.sqrt(n**2+s**2)}class qr{constructor(e,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 d=ls(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,m=Ju(d.offset,{x:0,y:0})>=this.distanceThreshold;if(!h&&!m)return;const{point:g}=d,{timestamp:v}=z;this.history.push({...g,timestamp:v});const{onStart:y,onMove:w}=this.handlers;h||(y&&y(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,d)},this.handlePointerMove=(d,h)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=as(h,this.transformPagePoint),k.update(this.updatePoint,!0)},this.handlePointerUp=(d,h)=>{this.end();const{onEnd:m,onSessionEnd:g,resumeAnimation:v}=this.handlers;if(this.dragSnapToOrigin&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=ls(d.type==="pointercancel"?this.lastMoveEventInfo:as(h,this.transformPagePoint),this.history);this.startEvent&&m&&m(d,y),g&&g(d,y)},!$n(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=r,this.contextWindow=i||window;const a=fe(e),l=as(a,this.transformPagePoint),{point:u}=l,{timestamp:c}=z;this.history=[{...u,timestamp:c}];const{onSessionStart:f}=n;f&&f(e,ls(l,this.history)),this.removeListeners=te(de(this.contextWindow,"pointermove",this.handlePointerMove),de(this.contextWindow,"pointerup",this.handlePointerUp),de(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),xt(this.updatePoint)}}function as(t,e){return e?{point:e(t.point)}:t}function Zr(t,e){return{x:t.x-e.x,y:t.y-e.y}}function ls({point:t},e){return{point:t,delta:Zr(t,Jr(e)),offset:Zr(t,Qu(e)),velocity:tf(e,.1)}}function Qu(t){return t[0]}function Jr(t){return t[t.length-1]}function tf(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=Jr(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>it(e)));)n--;if(!s)return{x:0,y:0};const o=ct(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 ef(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?N(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?N(n,t,s.max):Math.min(t,n)),t}function Qr(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function nf(t,{top:e,left:n,bottom:s,right:i}){return{x:Qr(t.x,n,i),y:Qr(t.y,e,s)}}function to(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}function sf(t,e){return{x:to(t.x,e.x),y:to(t.y,e.y)}}function rf(t,e){let n=.5;const s=X(t),i=X(e);return i>s?n=ee(e.min,e.max-s,t.min):s>i&&(n=ee(t.min,t.max-i,e.min)),gt(0,1,n)}function of(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const cs=.35;function af(t=cs){return t===!1?t=0:t===!0&&(t=cs),{x:eo(t,"left","right"),y:eo(t,"top","bottom")}}function eo(t,e,n){return{min:no(t,e),max:no(t,n)}}function no(t,e){return typeof t=="number"?t:t[e]||0}const lf=new WeakMap;class cf{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=_(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:s}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const o=f=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(fe(f).point)},r=(f,d)=>{const{drag:h,dragPropagation:m,onDragStart:g}=this.getProps();if(h&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=yc(h),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=d,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),tt(y=>{let w=this.getAxisMotionValue(y).get()||0;if(ut.test(w)){const{projection:x}=this.visualElement;if(x&&x.layout){const C=x.layout.layoutBox[y];C&&(w=X(C)*(parseFloat(w)/100))}}this.originPoint[y]=w}),g&&k.postRender(()=>g(f,d)),is(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},a=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d;const{dragPropagation:h,dragDirectionLock:m,onDirectionLock:g,onDrag:v}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:y}=d;if(m&&this.currentDirection===null){this.currentDirection=uf(y),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",d.point,y),this.updateAxis("y",d.point,y),this.visualElement.render(),v&&v(f,d)},l=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d,this.stop(f,d),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>tt(f=>this.getAnimationState(f)==="paused"&&this.getAxisMotionValue(f).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new qr(e,{onSessionStart:o,onStart:r,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:s,contextWindow:Gr(this.visualElement)})}stop(e,n){const s=e||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&&k.postRender(()=>a(s,i))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!Ie(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(r=ef(r,this.constraints[e],this.elastic[e])),o.set(r)}resolveConstraints(){const{dragConstraints:e,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;e&&Ut(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=nf(s.layoutBox,e):this.constraints=!1,this.elastic=af(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&tt(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=of(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!Ut(e))return!1;const s=e.current;yt(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=uu(s,i.root,this.visualElement.getTransformPagePoint());let r=sf(i.layout.layoutBox,o);if(n){const a=n(au(r));this.hasMutatedConstraints=!!a,a&&(r=wr(a))}return r}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=tt(c=>{if(!Ie(c,n,this.currentDirection))return;let f=l&&l[c]||{};r&&(f={min:0,max:0});const d=i?200:1e6,h=i?40:1e7,m={type:"inertia",velocity:s?e[c]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(c,m)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return is(this.visualElement,e),s.start(rs(e,s,0,n,this.visualElement,!1))}stopAnimation(){tt(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){tt(e=>this.getAxisMotionValue(e).animation?.pause())}getAnimationState(e){return this.getAxisMotionValue(e).animation?.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){tt(n=>{const{drag:s}=this.getProps();if(!Ie(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(e[n]-N(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!Ut(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};tt(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();i[r]=rf({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(),tt(r=>{if(!Ie(r,e,null))return;const a=this.getAxisMotionValue(r),{min:l,max:u}=this.constraints[r];a.set(N(l,u,i[r]))})}addListeners(){if(!this.visualElement.current)return;lf.set(this.visualElement,this);const e=this.visualElement.current,n=de(e,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();Ut(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()),k.read(s);const r=ue(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(tt(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 e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=cs,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function Ie(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function uf(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class ff extends Tt{constructor(e){super(e),this.removeGroupControls=Q,this.removeListeners=Q,this.controls=new cf(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Q}unmount(){this.removeGroupControls(),this.removeListeners()}}const so=t=>(e,n)=>{t&&k.postRender(()=>t(e,n))};class df extends Tt{constructor(){super(...arguments),this.removePointerDownListener=Q}onPointerDown(e){this.session=new qr(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Gr(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:so(e),onStart:so(n),onMove:s,onEnd:(o,r)=>{delete this.session,i&&k.postRender(()=>i(o,r))}}}mount(){this.removePointerDownListener=de(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Le={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function io(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const pe={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(M.test(t))t=parseFloat(t);else return t;const n=io(t,e.target.x),s=io(t,e.target.y);return`${n}% ${s}%`}},hf={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=wt.parse(t);if(i.length>5)return s;const o=wt.createTransformer(t),r=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+r]/=a,i[1+r]/=l;const u=N(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 us=!1;class mf extends S.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=e;Ic(pf),o&&(n.group&&n.group.add(o),s&&s.register&&i&&s.register(o),us&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Le.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,{projection:r}=s;return r&&(r.isPresent=o,us=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==o?r.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?r.promote():r.relegate()||k.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),_n.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;us=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function ro(t){const[e,n]=nr(),s=S.useContext(Je);return p.jsx(mf,{...t,layoutGroup:s,switchLayoutGroup:S.useContext(xr),isPresent:e,safeToRemove:n})}const pf={borderRadius:{...pe,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:pe,borderTopRightRadius:pe,borderBottomLeftRadius:pe,borderBottomRightRadius:pe,boxShadow:hf};function gf(t,e,n){const s=K(t)?t:$t(t);return s.start(rs("",s,e,n)),s.animation}const yf=(t,e)=>t.depth-e.depth;class vf{constructor(){this.children=[],this.isDirty=!1}add(e){en(this.children,e),this.isDirty=!0}remove(e){nn(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(yf),this.isDirty=!1,this.children.forEach(e)}}function xf(t,e){const n=Z.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(xt(s),t(o-e))};return k.setup(s,!0),()=>xt(s)}const oo=["TopLeft","TopRight","BottomLeft","BottomRight"],bf=oo.length,ao=t=>typeof t=="string"?parseFloat(t):t,lo=t=>typeof t=="number"||M.test(t);function wf(t,e,n,s,i,o){i?(t.opacity=N(0,n.opacity??1,Tf(s)),t.opacityExit=N(e.opacity??1,0,Sf(s))):o&&(t.opacity=N(e.opacity??1,n.opacity??1,s));for(let r=0;r<bf;r++){const a=`border${oo[r]}Radius`;let l=co(e,a),u=co(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||lo(l)===lo(u)?(t[a]=Math.max(N(ao(l),ao(u),s),0),(ut.test(u)||ut.test(l))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=N(e.rotate||0,n.rotate||0,s))}function co(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Tf=uo(0,.5,ni),Sf=uo(.5,.95,Q);function uo(t,e,n){return s=>s<t?0:s>e?1:n(ee(t,e,s))}function fo(t,e){t.min=e.min,t.max=e.max}function et(t,e){fo(t.x,e.x),fo(t.y,e.y)}function ho(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function mo(t,e,n,s,i){return t-=e,t=Ne(t,1/n,s),i!==void 0&&(t=Ne(t,1/i,s)),t}function Pf(t,e=0,n=1,s=.5,i,o=t,r=t){if(ut.test(e)&&(e=parseFloat(e),e=N(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=N(o.min,o.max,s);t===o&&(a-=e),t.min=mo(t.min,e,n,a,i),t.max=mo(t.max,e,n,a,i)}function po(t,e,[n,s,i],o,r){Pf(t,e[n],e[s],e[i],e.scale,o,r)}const Cf=["x","scaleX","originX"],Af=["y","scaleY","originY"];function go(t,e,n,s){po(t.x,e,Cf,n?n.x:void 0,s?s.x:void 0),po(t.y,e,Af,n?n.y:void 0,s?s.y:void 0)}function yo(t){return t.translate===0&&t.scale===1}function vo(t){return yo(t.x)&&yo(t.y)}function xo(t,e){return t.min===e.min&&t.max===e.max}function Ef(t,e){return xo(t.x,e.x)&&xo(t.y,e.y)}function bo(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function wo(t,e){return bo(t.x,e.x)&&bo(t.y,e.y)}function To(t){return X(t.x)/X(t.y)}function So(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Rf{constructor(){this.members=[]}add(e){en(this.members,e),e.scheduleRender()}remove(e){if(nn(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){s=o;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Mf(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;if((i||o||r)&&(s=`translate3d(${i}px, ${o}px, ${r}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:f,rotateY:d,skewX:h,skewY:m}=n;u&&(s=`perspective(${u}px) ${s}`),c&&(s+=`rotate(${c}deg) `),f&&(s+=`rotateX(${f}deg) `),d&&(s+=`rotateY(${d}deg) `),h&&(s+=`skewX(${h}deg) `),m&&(s+=`skewY(${m}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const fs=["","X","Y","Z"],Df=1e3;let Vf=0;function ds(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function Po(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Lr(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",k,!(i||o))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&Po(s)}function Co({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},a=e?.()){this.id=Vf++,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(Of),this.nodes.forEach(Ff),this.nodes.forEach(Bf),this.nodes.forEach(Nf)},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 vf)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new on),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=er(r)&&!Sc(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),t){let c,f=0;const d=()=>this.root.updateBlockedByResize=!1;k.read(()=>{f=window.innerWidth}),t(r,()=>{const h=window.innerWidth;h!==f&&(f=h,this.root.updateBlockedByResize=!0,c&&c(),c=xf(d,250),Le.hasAnimatedSinceResize&&(Le.hasAnimatedSinceResize=!1,this.nodes.forEach(Ro)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:f,hasRelativeLayoutChanged:d,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||zf,{onLayoutAnimationStart:g,onLayoutAnimationComplete:v}=u.getProps(),y=!this.targetLayout||!wo(this.targetLayout,h),w=!f&&d;if(this.options.layoutRoot||this.resumeFrom||w||f&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...Ln(m,"layout"),onPlay:g,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(c,w)}else f||Ro(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),xt(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(_f),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&&Po(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(Ao);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Eo);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Lf),this.nodes.forEach(jf),this.nodes.forEach(kf)):this.nodes.forEach(Eo),this.clearAllSnapshots();const a=Z.now();z.delta=gt(0,1e3/60,a-z.timestamp),z.timestamp=a,z.isProcessing=!0,un.update.process(z),un.preRender.process(z),un.render.process(z),z.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,_n.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(If),this.sharedNodes.forEach($f)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,k.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){k.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!X(this.snapshot.measuredBox.x)&&!X(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutCorrected=_(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,r?r.layoutBox:void 0)}updateScroll(r="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(a=!1),a&&this.instance){const l=s(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!vo(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;r&&this.instance&&(a||Vt(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)),Kf(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return _();const a=r.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Yf))){const{scroll:u}=this.root;u&&(zt(a.x,u.offset.x),zt(a.y,u.offset.y))}return a}removeElementScroll(r){const a=_();if(et(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&&et(a,r),zt(a.x,c.offset.x),zt(a.y,c.offset.y))}return a}applyTransform(r,a=!1){const l=_();et(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&&Kt(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Vt(c.latestValues)&&Kt(l,c.latestValues)}return Vt(this.latestValues)&&Kt(l,this.latestValues),l}removeTransform(r){const a=_();et(a,r);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!Vt(u.latestValues))continue;ts(u.latestValues)&&u.updateSnapshot();const c=_(),f=u.measurePageBox();et(c,f),go(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return Vt(this.latestValues)&&go(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!==z.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=z.timestamp,!this.targetDelta&&!this.relativeTarget){const d=this.getClosestProjectingParent();d&&d.layout&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=_(),this.relativeTargetOrigin=_(),me(this.relativeTargetOrigin,this.layout.layoutBox,d.layout.layoutBox),et(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=_(),this.targetWithTransforms=_()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Zu(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):et(this.target,this.layout.layoutBox),Cr(this.target,this.targetDelta)):et(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const d=this.getClosestProjectingParent();d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=_(),this.relativeTargetOrigin=_(),me(this.relativeTargetOrigin,this.target,d.target),et(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||ts(this.parent.latestValues)||Tr(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===z.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;et(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,d=this.treeScale.y;cu(this.layoutCorrected,this.treeScale,this.path,a),r.layout&&!r.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(r.target=r.layout.layoutBox,r.targetWithTransforms=_());const{target:h}=r;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(ho(this.prevProjectionDelta.x,this.projectionDelta.x),ho(this.prevProjectionDelta.y,this.projectionDelta.y)),he(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==d||!So(this.projectionDelta.x,this.prevProjectionDelta.x)||!So(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){if(this.options.visualElement?.scheduleRender(),r){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Yt(),this.projectionDelta=Yt(),this.projectionDeltaWithTransform=Yt()}setAnimationOrigin(r,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},f=Yt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=_(),h=l?l.source:void 0,m=this.layout?this.layout.source:void 0,g=h!==m,v=this.getStack(),y=!v||v.members.length<=1,w=!!(g&&!y&&this.options.crossfade===!0&&!this.path.some(Uf));this.animationProgress=0;let x;this.mixTargetDelta=C=>{const T=C/1e3;Mo(f.x,r.x,T),Mo(f.y,r.y,T),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(me(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Wf(this.relativeTarget,this.relativeTargetOrigin,d,T),x&&Ef(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=_()),et(x,this.relativeTarget)),g&&(this.animationValues=c,wf(c,u,this.latestValues,T,w,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(xt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=k.update(()=>{Le.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=$t(0)),this.currentAnimation=gf(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(Df),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&&Oo(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||_();const f=X(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+f;const d=X(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+d}et(a,l),Kt(a,c),he(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Rf),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&&ds("z",r,u,this.animationValues);for(let c=0;c<fs.length;c++)ds(`rotate${fs[c]}`,r,u,this.animationValues),ds(`skew${fs[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=Oe(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=Oe(a?.pointerEvents)||""),this.hasProjected&&!Vt(this.latestValues)&&(r.transform=l?l({},""):"none",this.hasProjected=!1);return}r.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let f=Mf(this.projectionDeltaWithTransform,this.treeScale,c);l&&(f=l(c,f)),r.transform=f;const{x:d,y:h}=this.projectionDelta;r.transformOrigin=`${d.origin*100}% ${h.origin*100}% 0`,u.animationValues?r.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:r.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const m in ce){if(c[m]===void 0)continue;const{correct:g,applyTo:v,isCSSVariable:y}=ce[m],w=f==="none"?c[m]:g(c[m],u);if(v){const x=v.length;for(let C=0;C<x;C++)r[v[C]]=w}else y?this.options.visualElement.renderState.vars[m]=w:r[m]=w}this.options.layoutId&&(r.pointerEvents=u===this?Oe(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>r.currentAnimation?.stop()),this.root.nodes.forEach(Ao),this.root.sharedNodes.clear()}}}function jf(t){t.updateLayout()}function kf(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=t.layout,{animationType:i}=t.options,o=e.source!==t.layout.source;i==="size"?tt(c=>{const f=o?e.measuredBox[c]:e.layoutBox[c],d=X(f);f.min=n[c].min,f.max=f.min+d}):Oo(i,e.layoutBox,n)&&tt(c=>{const f=o?e.measuredBox[c]:e.layoutBox[c],d=X(n[c]);f.max=f.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[c].max=t.relativeTarget[c].min+d)});const r=Yt();he(r,n,e.layoutBox);const a=Yt();o?he(a,t.applyTransform(s,!0),e.measuredBox):he(a,n,e.layoutBox);const l=!vo(r);let u=!1;if(!t.resumeFrom){const c=t.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:f,layout:d}=c;if(f&&d){const h=_();me(h,e.layoutBox,f.layoutBox);const m=_();me(m,n,d.layoutBox),wo(h,m)||(u=!0),c.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=h,t.relativeParent=c)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function Of(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Nf(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function If(t){t.clearSnapshot()}function Ao(t){t.clearMeasurements()}function Eo(t){t.isLayoutDirty=!1}function Lf(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Ro(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Ff(t){t.resolveTargetDelta()}function Bf(t){t.calcProjection()}function _f(t){t.resetSkewAndRotation()}function $f(t){t.removeLeadSnapshot()}function Mo(t,e,n){t.translate=N(e.translate,0,n),t.scale=N(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Do(t,e,n,s){t.min=N(e.min,n.min,s),t.max=N(e.max,n.max,s)}function Wf(t,e,n,s){Do(t.x,e.x,n.x,s),Do(t.y,e.y,n.y,s)}function Uf(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const zf={duration:.45,ease:[.4,0,.1,1]},Vo=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),jo=Vo("applewebkit/")&&!Vo("chrome/")?Math.round:Q;function ko(t){t.min=jo(t.min),t.max=jo(t.max)}function Kf(t){ko(t.x),ko(t.y)}function Oo(t,e,n){return t==="position"||t==="preserve-aspect"&&!qu(To(e),To(n),.2)}function Yf(t){return t!==t.root&&t.scroll?.wasRoot}const Hf=Co({attachResizeListener:(t,e)=>ue(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),hs={current:void 0},No=Co({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!hs.current){const t=new Hf({});t.mount(window),t.setOptions({layoutScroll:!0}),hs.current=t}return hs.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Gf={pan:{Feature:df},drag:{Feature:ff,ProjectionNode:No,MeasureLayout:ro}};function Io(t,e,n){const{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=s[i];o&&k.postRender(()=>o(e,fe(e)))}class Xf extends Tt{mount(){const{current:e}=this.node;e&&(this.unmount=vc(e,(n,s)=>(Io(this.node,s,"Start"),i=>Io(this.node,i,"End"))))}unmount(){}}class qf extends Tt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=te(ue(this.node.current,"focus",()=>this.onFocus()),ue(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Lo(t,e,n){const{props:s}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&s.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),o=s[i];o&&k.postRender(()=>o(e,fe(e)))}class Zf extends Tt{mount(){const{current:e}=this.node;e&&(this.unmount=Tc(e,(n,s)=>(Lo(this.node,s,"Start"),(i,{success:o})=>Lo(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const ms=new WeakMap,ps=new WeakMap,Jf=t=>{const e=ms.get(t.target);e&&e(t)},Qf=t=>{t.forEach(Jf)};function td({root:t,...e}){const n=t||document;ps.has(n)||ps.set(n,{});const s=ps.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(Qf,{root:t,...e})),s[i]}function ed(t,e,n){const s=td(e);return ms.set(t,n),s.observe(t),()=>{ms.delete(t),s.unobserve(t)}}const nd={some:0,all:1};class sd extends Tt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:o}=e,r={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:nd[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(),d=u?c:f;d&&d(l)};return ed(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(id(e,n))&&this.startObserver()}unmount(){}}function id({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const rd={...zu,...{inView:{Feature:sd},tap:{Feature:Zf},focus:{Feature:qf},hover:{Feature:Xf}},...Gf,...{layout:{ProjectionNode:No,MeasureLayout:ro}}},gs=ou(rd,xu),od=["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)"],ad=t=>{const{speed:e=1,className:n}=t,s=1/e,i=2/e;return p.jsx(ir,{children:p.jsx(gs.div,{role:"status",className:B("relative rounded-full",n),animate:{rotate:360},transition:{repeat:1/0,ease:"linear",duration:s},children:p.jsx(gs.div,{className:"absolute inset-0 rounded-full",style:{boxSizing:"border-box",borderStyle:"solid",borderWidth:2},animate:{clipPath:od},transition:{repeat:1/0,ease:"linear",duration:i,times:[0,.25,.5,.75,1]}})})})},ld=`
30
+ `),()=>{g.contains(p)&&g.removeChild(p)}},[e]),h.jsx(Ic,{isPresent:e,childRef:o,sizeRef:r,children:P.cloneElement(t,{ref:o})})}const Fc=({children:t,initial:e,isPresent:n,onExitComplete:s,custom:i,presenceAffectsLayout:o,mode:r,anchorX:a,root:l})=>{const u=hn(Bc),c=T.useId();let f=!0,d=T.useMemo(()=>(f=!1,{id:c,initial:e,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&&(d={...d}),T.useMemo(()=>{u.forEach((m,p)=>u.set(p,!1))},[n]),P.useEffect(()=>{!n&&!u.size&&s&&s()},[n]),r==="popLayout"&&(t=h.jsx(Lc,{isPresent:n,anchorX:a,root:l,children:t})),h.jsx(Ve.Provider,{value:d,children:t})};function Bc(){return new Map}function hr(t=!0){const e=T.useContext(Ve);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,o=T.useId();T.useEffect(()=>{if(t)return i(o)},[t]);const r=T.useCallback(()=>t&&s&&s(o),[o,s,t]);return!n&&s?[!1,r]:[!0]}const _e=t=>t.key||"";function mr(t){const e=[];return T.Children.forEach(t,n=>{T.isValidElement(n)&&e.push(n)}),e}const ss=({children:t,custom:e,initial:n=!0,onExitComplete:s,presenceAffectsLayout:i=!0,mode:o="sync",propagate:r=!1,anchorX:a="left",root:l})=>{const[u,c]=hr(r),f=T.useMemo(()=>mr(t),[t]),d=r&&!u?[]:f.map(_e),m=T.useRef(!0),p=T.useRef(f),g=hn(()=>new Map),[x,y]=T.useState(f),[w,v]=T.useState(f);ei(()=>{m.current=!1,p.current=f;for(let C=0;C<w.length;C++){const A=_e(w[C]);d.includes(A)?g.delete(A):g.get(A)!==!0&&g.set(A,!1)}},[w,d.length,d.join("-")]);const E=[];if(f!==x){let C=[...f];for(let A=0;A<w.length;A++){const R=w[A],N=_e(R);d.includes(N)||(C.splice(A,0,R),E.push(R))}return o==="wait"&&E.length&&(C=E),v(mr(C)),y(f),null}process.env.NODE_ENV!=="production"&&o==="wait"&&w.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:S}=T.useContext(dn);return h.jsx(h.Fragment,{children:w.map(C=>{const A=_e(C),R=r&&!u?!1:f===w||d.includes(A),N=()=>{if(g.has(A))g.set(A,!0);else return;let O=!0;g.forEach(U=>{U||(O=!1)}),O&&(S?.(),v(p.current),r&&c?.(),s&&s())};return h.jsx(Fc,{isPresent:R,initial:!m.current||n?void 0:!1,custom:e,presenceAffectsLayout:i,mode:o,root:l,onExitComplete:R?void 0:N,anchorX:a,children:C},A)})})},pr=T.createContext({strict:!1}),gr={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"]},Gt={};for(const t in gr)Gt[t]={isEnabled:e=>gr[t].some(n=>!!e[n])};function _c(t){for(const e in t)Gt[e]={...Gt[e],...t[e]}}const $c=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 $e(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||$c.has(t)}let yr=t=>!$e(t);function Wc(t){typeof t=="function"&&(yr=e=>e.startsWith("on")?!$e(e):t(e))}try{Wc(require("@emotion/is-prop-valid").default)}catch{}function Uc(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(yr(i)||n===!0&&$e(i)||!e&&!$e(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const We=T.createContext({});function Ue(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function ge(t){return typeof t=="string"||Array.isArray(t)}const is=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],rs=["initial",...is];function ze(t){return Ue(t.animate)||rs.some(e=>ge(t[e]))}function vr(t){return!!(ze(t)||t.variants)}function zc(t,e){if(ze(t)){const{initial:n,animate:s}=t;return{initial:n===!1||ge(n)?n:void 0,animate:ge(s)?s:void 0}}return t.inherit!==!1?e:{}}function Kc(t){const{initial:e,animate:n}=zc(t,T.useContext(We));return T.useMemo(()=>({initial:e,animate:n}),[xr(e),xr(n)])}function xr(t){return Array.isArray(t)?t.join(" "):t}const ye={};function Yc(t){for(const e in t)ye[e]=t[e],Pn(e)&&(ye[e].isCSSVariable=!0)}function br(t,{layout:e,layoutId:n}){return Yt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!ye[t]||t==="opacity")}const Hc={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Gc=Kt.length;function Xc(t,e,n){let s="",i=!0;for(let o=0;o<Gc;o++){const r=Kt[o],a=t[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=sr(a,Jn[r]);if(!l){i=!1;const c=Hc[r]||r;s+=`${c}(${u}) `}n&&(e[r]=u)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function os(t,e,n){const{style:s,vars:i,transformOrigin:o}=t;let r=!1,a=!1;for(const l in e){const u=e[l];if(Yt.has(l)){r=!0;continue}else if(Pn(l)){i[l]=u;continue}else{const c=sr(u,Jn[l]);l.startsWith("origin")?(a=!0,o[l]=c):s[l]=c}}if(e.transform||(r||n?s.transform=Xc(e,t.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 wr(t,e,n){for(const s in e)!H(e[s])&&!br(s,n)&&(t[s]=e[s])}function qc({transformTemplate:t},e){return T.useMemo(()=>{const n=as();return os(n,e,t),Object.assign({},n.vars,n.style)},[e])}function Zc(t,e){const n=t.style||{},s={};return wr(s,n,t),Object.assign(s,qc(t,e)),s}function Jc(t,e){const n={},s=Zc(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=s,n}const Qc={offset:"stroke-dashoffset",array:"stroke-dasharray"},tu={offset:"strokeDashoffset",array:"strokeDasharray"};function eu(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?Qc:tu;t[o.offset]=j.transform(-s);const r=j.transform(e),a=j.transform(n);t[o.array]=`${r} ${a}`}function Tr(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:o=1,pathOffset:r=0,...a},l,u,c){if(os(t,a,u),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:f,style:d}=t;f.transform&&(d.transform=f.transform,delete f.transform),(d.transform||f.transformOrigin)&&(d.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),d.transform&&(d.transformBox=c?.transformBox??"fill-box",delete f.transformBox),e!==void 0&&(f.x=e),n!==void 0&&(f.y=n),s!==void 0&&(f.scale=s),i!==void 0&&eu(f,i,o,r,!1)}const Sr=()=>({...as(),attrs:{}}),Pr=t=>typeof t=="string"&&t.toLowerCase()==="svg";function nu(t,e,n,s){const i=T.useMemo(()=>{const o=Sr();return Tr(o,e,Pr(s),t.transformTemplate,t.style),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};wr(o,t.style,t),i.style={...o,...i.style}}return i}const su=["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(t){return typeof t!="string"||t.includes("-")?!1:!!(su.indexOf(t)>-1||/[A-Z]/u.test(t))}function iu(t,e,n,{latestValues:s},i,o=!1){const a=(ls(t)?nu:Jc)(e,s,i,t),l=Uc(e,typeof t=="string",o),u=t!==T.Fragment?{...l,...a,ref:n}:{},{children:c}=e,f=T.useMemo(()=>H(c)?c.get():c,[c]);return T.createElement(t,{...u,children:f})}function Cr(t){const e=[{},{}];return t?.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function cs(t,e,n,s){if(typeof e=="function"){const[i,o]=Cr(s);e=e(n!==void 0?n:t.custom,i,o)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,o]=Cr(s);e=e(n!==void 0?n:t.custom,i,o)}return e}function Ke(t){return H(t)?t.get():t}function ru({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:ou(n,s,i,t),renderState:e()}}function ou(t,e,n,s){const i={},o=s(t,{});for(const d in o)i[d]=Ke(o[d]);let{initial:r,animate:a}=t;const l=ze(t),u=vr(t);e&&u&&!l&&t.inherit!==!1&&(r===void 0&&(r=e.initial),a===void 0&&(a=e.animate));let c=n?n.initial===!1:!1;c=c||r===!1;const f=c?a:r;if(f&&typeof f!="boolean"&&!Ue(f)){const d=Array.isArray(f)?f:[f];for(let m=0;m<d.length;m++){const p=cs(t,d[m]);if(p){const{transitionEnd:g,transition:x,...y}=p;for(const w in y){let v=y[w];if(Array.isArray(v)){const E=c?v.length-1:0;v=v[E]}v!==null&&(i[w]=v)}for(const w in g)i[w]=g[w]}}}return i}const Er=t=>(e,n)=>{const s=T.useContext(We),i=T.useContext(Ve),o=()=>ru(t,e,s,i);return n?o():hn(o)};function us(t,e,n){const{style:s}=t,i={};for(const o in s)(H(s[o])||e.style&&H(e.style[o])||br(o,t)||n?.getValue(o)?.liveStyle!==void 0)&&(i[o]=s[o]);return i}const au=Er({scrapeMotionValuesFromProps:us,createRenderState:as});function Ar(t,e,n){const s=us(t,e,n);for(const i in t)if(H(t[i])||H(e[i])){const o=Kt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[o]=t[i]}return s}const lu=Er({scrapeMotionValuesFromProps:Ar,createRenderState:Sr}),cu=Symbol.for("motionComponentSymbol");function Xt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function uu(t,e,n){return T.useCallback(s=>{s&&t.onMount&&t.onMount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):Xt(n)&&(n.current=s))},[e])}const fs=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Rr="data-"+fs("framerAppearId"),jr=T.createContext({});function fu(t,e,n,s,i){const{visualElement:o}=T.useContext(We),r=T.useContext(pr),a=T.useContext(Ve),l=T.useContext(ns).reducedMotion,u=T.useRef(null);s=s||r.renderer,!u.current&&s&&(u.current=s(t,{visualState:e,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const c=u.current,f=T.useContext(jr);c&&!c.projection&&i&&(c.type==="html"||c.type==="svg")&&du(u.current,n,i,f);const d=T.useRef(!1);T.useInsertionEffect(()=>{c&&d.current&&c.update(n,a)});const m=n[Rr],p=T.useRef(!!m&&!window.MotionHandoffIsComplete?.(m)&&window.MotionHasOptimisedAnimation?.(m));return ei(()=>{c&&(d.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 du(t,e,n,s){const{layoutId:i,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Mr(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!r||a&&Xt(a),visualElement:t,animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,crossfade:c,layoutScroll:l,layoutRoot:u})}function Mr(t){if(t)return t.options.allowProjection!==!1?t.projection:Mr(t.parent)}function ds(t,{forwardMotionProps:e=!1}={},n,s){n&&_c(n);const i=ls(t)?lu:au;function o(a,l){let u;const c={...T.useContext(ns),...a,layoutId:hu(a)},{isStatic:f}=c,d=Kc(a),m=i(a,f);if(!f&&mn){mu(c,n);const p=pu(c);u=p.MeasureLayout,d.visualElement=fu(t,m,c,s,p.ProjectionNode)}return h.jsxs(We.Provider,{value:d,children:[u&&d.visualElement?h.jsx(u,{visualElement:d.visualElement,...c}):null,iu(t,a,uu(m,d.visualElement,l),m,f,e)]})}o.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const r=T.forwardRef(o);return r[cu]=t,r}function hu({layoutId:t}){const e=T.useContext(dn).id;return e&&t!==void 0?e+"-"+t:t}function mu(t,e){const n=T.useContext(pr).strict;if(process.env.NODE_ENV!=="production"&&e&&n){const s="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?$t(!1,s,"lazy-strict-mode"):wt(!1,s,"lazy-strict-mode")}}function pu(t){const{drag:e,layout:n}=Gt;if(!e&&!n)return{};const s={...e,...n};return{MeasureLayout:e?.isEnabled(t)||n?.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function gu(t,e){if(typeof Proxy>"u")return ds;const n=new Map,s=(o,r)=>ds(o,r,t,e),i=(o,r)=>(process.env.NODE_ENV!=="production"&&bn(!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,ds(r,void 0,t,e)),n.get(r))})}function Dr({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function yu({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function vu(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function hs(t){return t===void 0||t===1}function ms({scale:t,scaleX:e,scaleY:n}){return!hs(t)||!hs(e)||!hs(n)}function Ot(t){return ms(t)||Vr(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Vr(t){return kr(t.x)||kr(t.y)}function kr(t){return t&&t!=="0%"}function Ye(t,e,n){const s=t-n,i=e*s;return n+i}function Nr(t,e,n,s,i){return i!==void 0&&(t=Ye(t,i,s)),Ye(t,n,s)+e}function ps(t,e=0,n=1,s,i){t.min=Nr(t.min,e,n,s,i),t.max=Nr(t.max,e,n,s,i)}function Or(t,{x:e,y:n}){ps(t.x,e.translate,e.scale,e.originPoint),ps(t.y,n.translate,n.scale,n.originPoint)}const Ir=.999999999999,Lr=1.0000000000001;function xu(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.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&&Zt(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Or(t,r)),s&&Ot(o.latestValues)&&Zt(t,o.latestValues))}e.x<Lr&&e.x>Ir&&(e.x=1),e.y<Lr&&e.y>Ir&&(e.y=1)}function qt(t,e){t.min=t.min+e,t.max=t.max+e}function Fr(t,e,n,s,i=.5){const o=F(t.min,t.max,i);ps(t,e,n,o,s)}function Zt(t,e){Fr(t.x,e.x,e.scaleX,e.scale,e.originX),Fr(t.y,e.y,e.scaleY,e.scale,e.originY)}function Br(t,e){return Dr(vu(t.getBoundingClientRect(),e))}function bu(t,e,n){const s=Br(t,n),{scroll:i}=e;return i&&(qt(s.x,i.offset.x),qt(s.y,i.offset.y)),s}const _r=()=>({translate:0,scale:1,origin:0,originPoint:0}),Jt=()=>({x:_r(),y:_r()}),$r=()=>({min:0,max:0}),W=()=>({x:$r(),y:$r()}),gs={current:null},Wr={current:!1};function wu(){if(Wr.current=!0,!!mn)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>gs.current=t.matches;t.addEventListener("change",e),e()}else gs.current=!1}const Tu=new WeakMap;function Su(t,e,n){for(const s in e){const i=e[s],o=n[s];if(H(i))t.addValue(s,i);else if(H(o))t.addValue(s,Ht(i,{owner:t}));else if(o!==i)if(t.hasValue(s)){const r=t.getValue(s);r.liveStyle===!0?r.jump(i):r.hasAnimated||r.set(i)}else{const r=t.getStaticValue(s);t.addValue(s,Ht(r!==void 0?r:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const Ur=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Pu{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,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 d=Q.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,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=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=ze(n),this.isVariantNode=vr(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:c,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const m=f[d];l[d]!==void 0&&H(m)&&m.set(l[d])}}mount(e){this.current=e,Tu.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),Wr.current||wu(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:gs.current,process.env.NODE_ENV!=="production"&&bn(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(),Pt(this.notifyUpdate),Pt(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const s=Yt.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",r=>{this.latestValues[e]=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,e,n)),this.valueSubscriptions.set(e,()=>{i(),o&&o(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Gt){const n=Gt[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const o=this.features[e];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(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<Ur.length;s++){const i=Ur[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,r=e[o];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=Su(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=Ht(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(ni(s)||ii(s))?s=parseFloat(s):!Oc(s)&&Et.test(n)&&(s=nr(e,n)),this.setBaseTarget(e,H(s)?s.get():s)),H(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const o=cs(this.props,n,this.presenceContext?.custom);o&&(s=o[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!H(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new xn),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){Qn.render(this.render)}}class zr extends Pu{constructor(){super(...arguments),this.KeyframeResolver=Sc}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;H(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Kr(t,{style:e,vars:n},s,i){const o=t.style;let r;for(r in e)o[r]=e[r];i?.applyProjectionStyles(o,s);for(r in n)o.setProperty(r,n[r])}function Cu(t){return window.getComputedStyle(t)}class Eu extends zr{constructor(){super(...arguments),this.type="html",this.renderInstance=Kr}readValueFromInstance(e,n){if(Yt.has(n))return this.projection?.isProjecting?Un(n):Wl(e,n);{const s=Cu(e),i=(Pn(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Br(e,n)}build(e,n,s){os(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return us(e,n,s)}}const Yr=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 Au(t,e,n,s){Kr(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Yr.has(i)?i:fs(i),e.attrs[i])}class Ru extends zr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=W}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Yt.has(n)){const s=er(n);return s&&s.default||0}return n=Yr.has(n)?n:fs(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return Ar(e,n,s)}build(e,n,s){Tr(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){Au(e,n,s,i)}mount(e){this.isSVGTag=Pr(e.tagName),super.mount(e)}}const ju=(t,e)=>ls(t)?new Ru(e):new Eu(e,{allowProjection:t!==T.Fragment});function Qt(t,e,n){const s=t.getProps();return cs(s,e,n!==void 0?n:s.custom,t)}const ys=t=>Array.isArray(t);function Mu(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Ht(n))}function Du(t){return ys(t)?t[t.length-1]||0:t}function Vu(t,e){const n=Qt(t,e);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const r in o){const a=Du(o[r]);Mu(t,r,a)}}function ku(t){return!!(H(t)&&t.add)}function vs(t,e){const n=t.getValue("willChange");if(ku(n))return n.add(e);if(!n&&Tt.WillChange){const s=new Tt.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function Hr(t){return t.props[Rr]}const Nu=t=>t!==null;function Ou(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(Nu),o=e&&n!=="loop"&&e%2===1?0:i.length-1;return i[o]}const Iu={type:"spring",stiffness:500,damping:25,restSpeed:10},Lu=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Fu={type:"keyframes",duration:.8},Bu={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},_u=(t,{keyframes:e})=>e.length>2?Fu:Yt.has(t)?t.startsWith("scale")?Lu(e[1]):Iu:Bu;function $u({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const xs=(t,e,n,s={},i,o)=>r=>{const a=qn(s,t)||{},l=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-ot(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:d=>{e.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:i};$u(a)||Object.assign(c,_u(t,c)),c.duration&&(c.duration=ot(c.duration)),c.repeatDelay&&(c.repeatDelay=ot(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let f=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(Xn(c),c.delay===0&&(f=!0)),(Tt.instantAnimations||Tt.skipAnimations)&&(f=!0,Xn(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,f&&!o&&e.get()!==void 0){const d=Ou(c.keyframes,a);if(d!==void 0){L.update(()=>{c.onUpdate(d),c.onComplete()});return}}return a.isSync?new _n(c):new fc(c)};function Wu({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Gr(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=e;s&&(o=s);const l=[],u=i&&t.animationState&&t.animationState.getState()[i];for(const c in a){const f=t.getValue(c,t.latestValues[c]??null),d=a[c];if(d===void 0||u&&Wu(u,c))continue;const m={delay:n,...qn(o||{},c)},p=f.get();if(p!==void 0&&!f.isAnimating&&!Array.isArray(d)&&d===p&&!m.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const y=Hr(t);if(y){const w=window.MotionHandoffAnimation(y,c,L);w!==null&&(m.startTime=w,g=!0)}}vs(t,c),f.start(xs(c,f,d,t.shouldReduceMotion&&qi.has(c)?{type:!1}:m,t,g));const x=f.animation;x&&l.push(x)}return r&&Promise.all(l).then(()=>{L.update(()=>{r&&Vu(t,r)})}),l}function Xr(t,e,n,s=0,i=1){const o=Array.from(t).sort((u,c)=>u.sortNodePosition(c)).indexOf(e),r=t.size,a=(r-1)*s;return typeof n=="function"?n(o,r):i===1?o*s:a-o*s}function bs(t,e,n={}){const s=Qt(t,e,n.type==="exit"?t.presenceContext?.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(Gr(t,s,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:c,staggerDirection:f}=i;return Uu(t,e,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 Uu(t,e,n=0,s=0,i=0,o=1,r){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(bs(l,e,{...r,delay:n+(typeof s=="function"?0:s)+Xr(t.variantChildren,l,s,i,o)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function zu(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>bs(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=bs(t,e,n);else{const i=typeof e=="function"?Qt(t,e,n.custom):e;s=Promise.all(Gr(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}function qr(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}const Ku=rs.length;function Zr(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?Zr(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<Ku;n++){const s=rs[n],i=t.props[s];(ge(i)||i===!1)&&(e[s]=i)}return e}const Yu=[...is].reverse(),Hu=is.length;function Gu(t){return e=>Promise.all(e.map(({animation:n,options:s})=>zu(t,n,s)))}function Xu(t){let e=Gu(t),n=Jr(),s=!0;const i=l=>(u,c)=>{const f=Qt(t,c,l==="exit"?t.presenceContext?.custom:void 0);if(f){const{transition:d,transitionEnd:m,...p}=f;u={...u,...p,...m}}return u};function o(l){e=l(t)}function r(l){const{props:u}=t,c=Zr(t.parent)||{},f=[],d=new Set;let m={},p=1/0;for(let x=0;x<Hu;x++){const y=Yu[x],w=n[y],v=u[y]!==void 0?u[y]:c[y],E=ge(v),S=y===l?w.isActive:null;S===!1&&(p=x);let C=v===c[y]&&v!==u[y]&&E;if(C&&s&&t.manuallyAnimateOnMount&&(C=!1),w.protectedKeys={...m},!w.isActive&&S===null||!v&&!w.prevProp||Ue(v)||typeof v=="boolean")continue;const A=qu(w.prevProp,v);let R=A||y===l&&w.isActive&&!C&&E||x>p&&E,N=!1;const O=Array.isArray(v)?v:[v];let U=O.reduce(i(y),{});S===!1&&(U={});const{prevResolvedValues:et={}}=w,I={...et,...U},K=_=>{R=!0,d.has(_)&&(N=!0,d.delete(_)),w.needsAnimating[_]=!0;const k=t.getValue(_);k&&(k.liveStyle=!1)};for(const _ in I){const k=U[_],J=et[_];if(m.hasOwnProperty(_))continue;let b=!1;ys(k)&&ys(J)?b=!qr(k,J):b=k!==J,b?k!=null?K(_):d.add(_):k!==void 0&&d.has(_)?K(_):w.protectedKeys[_]=!0}w.prevProp=v,w.prevResolvedValues=U,w.isActive&&(m={...m,...U}),s&&t.blockInitialAnimation&&(R=!1);const vt=C&&A;R&&(!vt||N)&&f.push(...O.map(_=>{const k={type:y};if(typeof _=="string"&&s&&!vt&&t.manuallyAnimateOnMount&&t.parent){const{parent:J}=t,b=Qt(J,_);if(J.enteringChildren&&b){const{delayChildren:D}=b.transition||{};k.delay=Xr(J.enteringChildren,t,D)}}return{animation:_,options:k}}))}if(d.size){const x={};if(typeof u.initial!="boolean"){const y=Qt(t,Array.isArray(u.initial)?u.initial[0]:u.initial);y&&y.transition&&(x.transition=y.transition)}d.forEach(y=>{const w=t.getBaseTarget(y),v=t.getValue(y);v&&(v.liveStyle=!0),x[y]=w??null}),f.push({animation:x})}let g=!!f.length;return s&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(g=!1),s=!1,g?e(f):Promise.resolve()}function a(l,u){if(n[l].isActive===u)return Promise.resolve();t.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=Jr(),s=!0}}}function qu(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!qr(e,t):!1}function It(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Jr(){return{animate:It(!0),whileInView:It(),whileHover:It(),whileTap:It(),whileDrag:It(),whileFocus:It(),exit:It()}}class At{constructor(e){this.isMounted=!1,this.node=e}update(){}}class Zu extends At{constructor(e){super(e),e.animationState||(e.animationState=Xu(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Ue(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let Ju=0;class Qu extends At{constructor(){super(...arguments),this.id=Ju++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>{n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const tf={animation:{Feature:Zu},exit:{Feature:Qu}};function ve(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function xe(t){return{point:{x:t.pageX,y:t.pageY}}}const ef=t=>e=>ts(e)&&t(e,xe(e));function be(t,e,n,s){return ve(t,e,ef(n),s)}const Qr=1e-4,nf=1-Qr,sf=1+Qr,to=.01,rf=0-to,of=0+to;function Z(t){return t.max-t.min}function af(t,e,n){return Math.abs(t-e)<=n}function eo(t,e,n,s=.5){t.origin=s,t.originPoint=F(e.min,e.max,t.origin),t.scale=Z(n)/Z(e),t.translate=F(n.min,n.max,t.origin)-t.originPoint,(t.scale>=nf&&t.scale<=sf||isNaN(t.scale))&&(t.scale=1),(t.translate>=rf&&t.translate<=of||isNaN(t.translate))&&(t.translate=0)}function we(t,e,n,s){eo(t.x,e.x,n.x,s?s.originX:void 0),eo(t.y,e.y,n.y,s?s.originY:void 0)}function no(t,e,n){t.min=n.min+e.min,t.max=t.min+Z(e)}function lf(t,e,n){no(t.x,e.x,n.x),no(t.y,e.y,n.y)}function so(t,e,n){t.min=e.min-n.min,t.max=t.min+Z(e)}function Te(t,e,n){so(t.x,e.x,n.x),so(t.y,e.y,n.y)}function st(t){return[t("x"),t("y")]}const io=({current:t})=>t?t.ownerDocument.defaultView:null,ro=(t,e)=>Math.abs(t-e);function cf(t,e){const n=ro(t.x,e.x),s=ro(t.y,e.y);return Math.sqrt(n**2+s**2)}class oo{constructor(e,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 d=Ts(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,p=cf(d.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!p)return;const{point:g}=d,{timestamp:x}=Y;this.history.push({...g,timestamp:x});const{onStart:y,onMove:w}=this.handlers;m||(y&&y(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,d)},this.handlePointerMove=(d,m)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=ws(m,this.transformPagePoint),L.update(this.updatePoint,!0)},this.handlePointerUp=(d,m)=>{this.end();const{onEnd:p,onSessionEnd:g,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=Ts(d.type==="pointercancel"?this.lastMoveEventInfo:ws(m,this.transformPagePoint),this.history);this.startEvent&&p&&p(d,y),g&&g(d,y)},!ts(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=r,this.contextWindow=i||window;const a=xe(e),l=ws(a,this.transformPagePoint),{point:u}=l,{timestamp:c}=Y;this.history=[{...u,timestamp:c}];const{onSessionStart:f}=n;f&&f(e,Ts(l,this.history)),this.removeListeners=le(be(this.contextWindow,"pointermove",this.handlePointerMove),be(this.contextWindow,"pointerup",this.handlePointerUp),be(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Pt(this.updatePoint)}}function ws(t,e){return e?{point:e(t.point)}:t}function ao(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Ts({point:t},e){return{point:t,delta:ao(t,lo(e)),offset:ao(t,uf(e)),velocity:ff(e,.1)}}function uf(t){return t[0]}function lo(t){return t[t.length-1]}function ff(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=lo(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>ot(e)));)n--;if(!s)return{x:0,y:0};const o=ut(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 df(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?F(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?F(n,t,s.max):Math.min(t,n)),t}function co(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function hf(t,{top:e,left:n,bottom:s,right:i}){return{x:co(t.x,n,i),y:co(t.y,e,s)}}function uo(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}function mf(t,e){return{x:uo(t.x,e.x),y:uo(t.y,e.y)}}function pf(t,e){let n=.5;const s=Z(t),i=Z(e);return i>s?n=ce(e.min,e.max-s,t.min):s>i&&(n=ce(t.min,t.max-i,e.min)),bt(0,1,n)}function gf(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Ss=.35;function yf(t=Ss){return t===!1?t=0:t===!0&&(t=Ss),{x:fo(t,"left","right"),y:fo(t,"top","bottom")}}function fo(t,e,n){return{min:ho(t,e),max:ho(t,n)}}function ho(t,e){return typeof t=="number"?t:t[e]||0}const vf=new WeakMap;class xf{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=W(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:s}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const o=f=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(xe(f).point)},r=(f,d)=>{const{drag:m,dragPropagation:p,onDragStart:g}=this.getProps();if(m&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Ac(m),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=d,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),st(y=>{let w=this.getAxisMotionValue(y).get()||0;if(ft.test(w)){const{projection:v}=this.visualElement;if(v&&v.layout){const E=v.layout.layoutBox[y];E&&(w=Z(E)*(parseFloat(w)/100))}}this.originPoint[y]=w}),g&&L.postRender(()=>g(f,d)),vs(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},a=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d;const{dragPropagation:m,dragDirectionLock:p,onDirectionLock:g,onDrag:x}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:y}=d;if(p&&this.currentDirection===null){this.currentDirection=bf(y),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",d.point,y),this.updateAxis("y",d.point,y),this.visualElement.render(),x&&x(f,d)},l=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d,this.stop(f,d),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>st(f=>this.getAnimationState(f)==="paused"&&this.getAxisMotionValue(f).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new oo(e,{onSessionStart:o,onStart:r,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:s,contextWindow:io(this.visualElement)})}stop(e,n){const s=e||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:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!He(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(r=df(r,this.constraints[e],this.elastic[e])),o.set(r)}resolveConstraints(){const{dragConstraints:e,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;e&&Xt(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=hf(s.layoutBox,e):this.constraints=!1,this.elastic=yf(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&st(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=gf(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!Xt(e))return!1;const s=e.current;wt(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=bu(s,i.root,this.visualElement.getTransformPagePoint());let r=mf(i.layout.layoutBox,o);if(n){const a=n(yu(r));this.hasMutatedConstraints=!!a,a&&(r=Dr(a))}return r}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=st(c=>{if(!He(c,n,this.currentDirection))return;let f=l&&l[c]||{};r&&(f={min:0,max:0});const d=i?200:1e6,m=i?40:1e7,p={type:"inertia",velocity:s?e[c]:0,bounceStiffness:d,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(c,p)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return vs(this.visualElement,e),s.start(xs(e,s,0,n,this.visualElement,!1))}stopAnimation(){st(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){st(e=>this.getAxisMotionValue(e).animation?.pause())}getAnimationState(e){return this.getAxisMotionValue(e).animation?.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){st(n=>{const{drag:s}=this.getProps();if(!He(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(e[n]-F(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!Xt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};st(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();i[r]=pf({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(),st(r=>{if(!He(r,e,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;vf.set(this.visualElement,this);const e=this.visualElement.current,n=be(e,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();Xt(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=ve(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(st(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 e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=Ss,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function He(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function bf(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class wf extends At{constructor(e){super(e),this.removeGroupControls=nt,this.removeListeners=nt,this.controls=new xf(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||nt}unmount(){this.removeGroupControls(),this.removeListeners()}}const mo=t=>(e,n)=>{t&&L.postRender(()=>t(e,n))};class Tf extends At{constructor(){super(...arguments),this.removePointerDownListener=nt}onPointerDown(e){this.session=new oo(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:io(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:mo(e),onStart:mo(n),onMove:s,onEnd:(o,r)=>{delete this.session,i&&L.postRender(()=>i(o,r))}}}mount(){this.removePointerDownListener=be(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Ge={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function po(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Se={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(j.test(t))t=parseFloat(t);else return t;const n=po(t,e.target.x),s=po(t,e.target.y);return`${n}% ${s}%`}},Sf={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=Et.parse(t);if(i.length>5)return s;const o=Et.createTransformer(t),r=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.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 Pf extends T.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=e;Yc(Cf),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()})),Ge.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,{projection:r}=s;return r&&(r.isPresent=o,Ps=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==o?r.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?r.promote():r.relegate()||L.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Qn.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;Ps=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function go(t){const[e,n]=hr(),s=T.useContext(dn);return h.jsx(Pf,{...t,layoutGroup:s,switchLayoutGroup:T.useContext(jr),isPresent:e,safeToRemove:n})}const Cf={borderRadius:{...Se,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Se,borderTopRightRadius:Se,borderBottomLeftRadius:Se,borderBottomRightRadius:Se,boxShadow:Sf};function Ef(t,e,n){const s=H(t)?t:Ht(t);return s.start(xs("",s,e,n)),s.animation}const Af=(t,e)=>t.depth-e.depth;class Rf{constructor(){this.children=[],this.isDirty=!1}add(e){pn(this.children,e),this.isDirty=!0}remove(e){gn(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Af),this.isDirty=!1,this.children.forEach(e)}}function jf(t,e){const n=Q.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(Pt(s),t(o-e))};return L.setup(s,!0),()=>Pt(s)}const yo=["TopLeft","TopRight","BottomLeft","BottomRight"],Mf=yo.length,vo=t=>typeof t=="string"?parseFloat(t):t,xo=t=>typeof t=="number"||j.test(t);function Df(t,e,n,s,i,o){i?(t.opacity=F(0,n.opacity??1,Vf(s)),t.opacityExit=F(e.opacity??1,0,kf(s))):o&&(t.opacity=F(e.opacity??1,n.opacity??1,s));for(let r=0;r<Mf;r++){const a=`border${yo[r]}Radius`;let l=bo(e,a),u=bo(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||xo(l)===xo(u)?(t[a]=Math.max(F(vo(l),vo(u),s),0),(ft.test(u)||ft.test(l))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=F(e.rotate||0,n.rotate||0,s))}function bo(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Vf=wo(0,.5,hi),kf=wo(.5,.95,nt);function wo(t,e,n){return s=>s<t?0:s>e?1:n(ce(t,e,s))}function To(t,e){t.min=e.min,t.max=e.max}function it(t,e){To(t.x,e.x),To(t.y,e.y)}function So(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Po(t,e,n,s,i){return t-=e,t=Ye(t,1/n,s),i!==void 0&&(t=Ye(t,1/i,s)),t}function Nf(t,e=0,n=1,s=.5,i,o=t,r=t){if(ft.test(e)&&(e=parseFloat(e),e=F(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=F(o.min,o.max,s);t===o&&(a-=e),t.min=Po(t.min,e,n,a,i),t.max=Po(t.max,e,n,a,i)}function Co(t,e,[n,s,i],o,r){Nf(t,e[n],e[s],e[i],e.scale,o,r)}const Of=["x","scaleX","originX"],If=["y","scaleY","originY"];function Eo(t,e,n,s){Co(t.x,e,Of,n?n.x:void 0,s?s.x:void 0),Co(t.y,e,If,n?n.y:void 0,s?s.y:void 0)}function Ao(t){return t.translate===0&&t.scale===1}function Ro(t){return Ao(t.x)&&Ao(t.y)}function jo(t,e){return t.min===e.min&&t.max===e.max}function Lf(t,e){return jo(t.x,e.x)&&jo(t.y,e.y)}function Mo(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Do(t,e){return Mo(t.x,e.x)&&Mo(t.y,e.y)}function Vo(t){return Z(t.x)/Z(t.y)}function ko(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Ff{constructor(){this.members=[]}add(e){pn(this.members,e),e.scheduleRender()}remove(e){if(gn(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){s=o;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Bf(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;if((i||o||r)&&(s=`translate3d(${i}px, ${o}px, ${r}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:f,rotateY:d,skewX:m,skewY:p}=n;u&&(s=`perspective(${u}px) ${s}`),c&&(s+=`rotate(${c}deg) `),f&&(s+=`rotateX(${f}deg) `),d&&(s+=`rotateY(${d}deg) `),m&&(s+=`skewX(${m}deg) `),p&&(s+=`skewY(${p}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const Cs=["","X","Y","Z"],_f=1e3;let $f=0;function Es(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function No(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Hr(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",L,!(i||o))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&No(s)}function Oo({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},a=e?.()){this.id=$f++,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(zf),this.nodes.forEach(Gf),this.nodes.forEach(Xf),this.nodes.forEach(Kf)},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 Rf)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new xn),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=dr(r)&&!kc(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),t){let c,f=0;const d=()=>this.root.updateBlockedByResize=!1;L.read(()=>{f=window.innerWidth}),t(r,()=>{const m=window.innerWidth;m!==f&&(f=m,this.root.updateBlockedByResize=!0,c&&c(),c=jf(d,250),Ge.hasAnimatedSinceResize&&(Ge.hasAnimatedSinceResize=!1,this.nodes.forEach(Fo)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:f,hasRelativeLayoutChanged:d,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||u.getDefaultTransition()||td,{onLayoutAnimationStart:g,onLayoutAnimationComplete:x}=u.getProps(),y=!this.targetLayout||!Do(this.targetLayout,m),w=!f&&d;if(this.options.layoutRoot||this.resumeFrom||w||f&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...qn(p,"layout"),onPlay:g,onComplete:x};(u.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(c,w)}else f||Fo(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(),Pt(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(qf),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&&No(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(Io);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Lo);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Hf),this.nodes.forEach(Wf),this.nodes.forEach(Uf)):this.nodes.forEach(Lo),this.clearAllSnapshots();const a=Q.now();Y.delta=bt(0,1e3/60,a-Y.timestamp),Y.timestamp=a,Y.isProcessing=!0,Sn.update.process(Y),Sn.preRender.process(Y),Sn.render.process(Y),Y.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Qn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Yf),this.sharedNodes.forEach(Zf)}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&&!Ro(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;r&&this.instance&&(a||Ot(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)),ed(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(nd))){const{scroll:u}=this.root;u&&(qt(a.x,u.offset.x),qt(a.y,u.offset.y))}return a}removeElementScroll(r){const a=W();if(it(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&&it(a,r),qt(a.x,c.offset.x),qt(a.y,c.offset.y))}return a}applyTransform(r,a=!1){const l=W();it(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&&Zt(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Ot(c.latestValues)&&Zt(l,c.latestValues)}return Ot(this.latestValues)&&Zt(l,this.latestValues),l}removeTransform(r){const a=W();it(a,r);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!Ot(u.latestValues))continue;ms(u.latestValues)&&u.updateSnapshot();const c=W(),f=u.measurePageBox();it(c,f),Eo(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return Ot(this.latestValues)&&Eo(a,this.latestValues),a}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Y.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=Y.timestamp,!this.targetDelta&&!this.relativeTarget){const d=this.getClosestProjectingParent();d&&d.layout&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=W(),this.relativeTargetOrigin=W(),Te(this.relativeTargetOrigin,this.layout.layoutBox,d.layout.layoutBox),it(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(),lf(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):it(this.target,this.layout.layoutBox),Or(this.target,this.targetDelta)):it(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const d=this.getClosestProjectingParent();d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=W(),this.relativeTargetOrigin=W(),Te(this.relativeTargetOrigin,this.target,d.target),it(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||ms(this.parent.latestValues)||Vr(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===Y.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;it(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,d=this.treeScale.y;xu(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():(So(this.prevProjectionDelta.x,this.projectionDelta.x),So(this.prevProjectionDelta.y,this.projectionDelta.y)),we(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==d||!ko(this.projectionDelta.x,this.prevProjectionDelta.x)||!ko(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=Jt(),this.projectionDelta=Jt(),this.projectionDeltaWithTransform=Jt()}setAnimationOrigin(r,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},f=Jt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=W(),m=l?l.source:void 0,p=this.layout?this.layout.source:void 0,g=m!==p,x=this.getStack(),y=!x||x.members.length<=1,w=!!(g&&!y&&this.options.crossfade===!0&&!this.path.some(Qf));this.animationProgress=0;let v;this.mixTargetDelta=E=>{const S=E/1e3;Bo(f.x,r.x,S),Bo(f.y,r.y,S),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Te(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Jf(this.relativeTarget,this.relativeTargetOrigin,d,S),v&&Lf(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=W()),it(v,this.relativeTarget)),g&&(this.animationValues=c,Df(c,u,this.latestValues,S,w,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Pt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=L.update(()=>{Ge.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ht(0)),this.currentAnimation=Ef(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),r.onUpdate&&r.onUpdate(a)},onStop:()=>{},onComplete:()=>{r.onComplete&&r.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(_f),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&&zo(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 d=Z(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+d}it(a,l),Zt(a,c),we(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Ff),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<Cs.length;c++)Es(`rotate${Cs[c]}`,r,u,this.animationValues),Es(`skew${Cs[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=Ke(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=Ke(a?.pointerEvents)||""),this.hasProjected&&!Ot(this.latestValues)&&(r.transform=l?l({},""):"none",this.hasProjected=!1);return}r.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let f=Bf(this.projectionDeltaWithTransform,this.treeScale,c);l&&(f=l(c,f)),r.transform=f;const{x:d,y:m}=this.projectionDelta;r.transformOrigin=`${d.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 ye){if(c[p]===void 0)continue;const{correct:g,applyTo:x,isCSSVariable:y}=ye[p],w=f==="none"?c[p]:g(c[p],u);if(x){const v=x.length;for(let E=0;E<v;E++)r[x[E]]=w}else y?this.options.visualElement.renderState.vars[p]=w:r[p]=w}this.options.layoutId&&(r.pointerEvents=u===this?Ke(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>r.currentAnimation?.stop()),this.root.nodes.forEach(Io),this.root.sharedNodes.clear()}}}function Wf(t){t.updateLayout()}function Uf(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=t.layout,{animationType:i}=t.options,o=e.source!==t.layout.source;i==="size"?st(c=>{const f=o?e.measuredBox[c]:e.layoutBox[c],d=Z(f);f.min=n[c].min,f.max=f.min+d}):zo(i,e.layoutBox,n)&&st(c=>{const f=o?e.measuredBox[c]:e.layoutBox[c],d=Z(n[c]);f.max=f.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[c].max=t.relativeTarget[c].min+d)});const r=Jt();we(r,n,e.layoutBox);const a=Jt();o?we(a,t.applyTransform(s,!0),e.measuredBox):we(a,n,e.layoutBox);const l=!Ro(r);let u=!1;if(!t.resumeFrom){const c=t.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:f,layout:d}=c;if(f&&d){const m=W();Te(m,e.layoutBox,f.layoutBox);const p=W();Te(p,n,d.layoutBox),Do(m,p)||(u=!0),c.options.layoutRoot&&(t.relativeTarget=p,t.relativeTargetOrigin=m,t.relativeParent=c)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function zf(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Kf(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Yf(t){t.clearSnapshot()}function Io(t){t.clearMeasurements()}function Lo(t){t.isLayoutDirty=!1}function Hf(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Fo(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Gf(t){t.resolveTargetDelta()}function Xf(t){t.calcProjection()}function qf(t){t.resetSkewAndRotation()}function Zf(t){t.removeLeadSnapshot()}function Bo(t,e,n){t.translate=F(e.translate,0,n),t.scale=F(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function _o(t,e,n,s){t.min=F(e.min,n.min,s),t.max=F(e.max,n.max,s)}function Jf(t,e,n,s){_o(t.x,e.x,n.x,s),_o(t.y,e.y,n.y,s)}function Qf(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const td={duration:.45,ease:[.4,0,.1,1]},$o=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Wo=$o("applewebkit/")&&!$o("chrome/")?Math.round:nt;function Uo(t){t.min=Wo(t.min),t.max=Wo(t.max)}function ed(t){Uo(t.x),Uo(t.y)}function zo(t,e,n){return t==="position"||t==="preserve-aspect"&&!af(Vo(e),Vo(n),.2)}function nd(t){return t!==t.root&&t.scroll?.wasRoot}const sd=Oo({attachResizeListener:(t,e)=>ve(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),As={current:void 0},Ko=Oo({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!As.current){const t=new sd({});t.mount(window),t.setOptions({layoutScroll:!0}),As.current=t}return As.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),id={pan:{Feature:Tf},drag:{Feature:wf,ProjectionNode:Ko,MeasureLayout:go}};function Yo(t,e,n){const{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=s[i];o&&L.postRender(()=>o(e,xe(e)))}class rd extends At{mount(){const{current:e}=this.node;e&&(this.unmount=Rc(e,(n,s)=>(Yo(this.node,s,"Start"),i=>Yo(this.node,i,"End"))))}unmount(){}}class od extends At{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=le(ve(this.node.current,"focus",()=>this.onFocus()),ve(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Ho(t,e,n){const{props:s}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&s.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),o=s[i];o&&L.postRender(()=>o(e,xe(e)))}class ad extends At{mount(){const{current:e}=this.node;e&&(this.unmount=Vc(e,(n,s)=>(Ho(this.node,s,"Start"),(i,{success:o})=>Ho(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Rs=new WeakMap,js=new WeakMap,ld=t=>{const e=Rs.get(t.target);e&&e(t)},cd=t=>{t.forEach(ld)};function ud({root:t,...e}){const n=t||document;js.has(n)||js.set(n,{});const s=js.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(cd,{root:t,...e})),s[i]}function fd(t,e,n){const s=ud(e);return Rs.set(t,n),s.observe(t),()=>{Rs.delete(t),s.unobserve(t)}}const dd={some:0,all:1};class hd extends At{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:o}=e,r={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:dd[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(),d=u?c:f;d&&d(l)};return fd(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(md(e,n))&&this.startObserver()}unmount(){}}function md({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const pd={...tf,...{inView:{Feature:hd},tap:{Feature:ad},focus:{Feature:od},hover:{Feature:rd}},...id,...{layout:{ProjectionNode:Ko,MeasureLayout:go}}},Pe=gu(pd,ju),gd=["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)"],Xe=t=>{const{speed:e=1,className:n}=t,s=1/e,i=2/e;return h.jsx(ss,{children:h.jsx(Pe.div,{role:"status",className:V("relative rounded-full",n),animate:{rotate:360},transition:{repeat:1/0,ease:"linear",duration:s},children:h.jsx(Pe.div,{className:"absolute inset-0 rounded-full",style:{boxSizing:"border-box",borderStyle:"solid",borderWidth:2},animate:{clipPath:gd},transition:{repeat:1/0,ease:"linear",duration:i,times:[0,.25,.5,.75,1]}})})})},yd=`
31
31
  inline-flex flex-row items-center justify-center
32
32
  button-ring font-semibold ring-0 disabled:hover:ring-0 hover:ring-4 active:ring-1
33
33
  rounded-[var(--border-radius-input)]
34
34
  cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-4
35
35
  disabled:cursor-default
36
- `,cd={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"},ud={sm:"h-10 px-4",md:"h-12 px-6",lg:"h-14 px-8"},fd=P.forwardRef((t,e)=>{const{variant:n="white",size:s="md",className:i,children:o,loading:r=!1,...a}=t;return p.jsxs("button",{ref:e,className:B(ld,cd[n],ud[s],i),...a,children:[r&&p.jsx(ad,{className:"h-5 w-5"}),!r&&p.jsx(p.Fragment,{children:o})]})}),dd=`
36
+ `,vd={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"},xd={sm:"h-10 px-4",md:"h-12 px-6",lg:"h-14 px-8"},bd=P.forwardRef((t,e)=>{const{variant:n="white",size:s="md",className:i,children:o,loading:r=!1,...a}=t;return h.jsxs("button",{ref:e,className:V(yd,vd[n],xd[s],i),...a,children:[r&&h.jsx(Xe,{className:"h-5 w-5"}),!r&&h.jsx(h.Fragment,{children:o})]})}),wd=`
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
- `,hd={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"},Fo=P.forwardRef((t,e)=>{const{variant:n="white",size:s="md",className:i,Icon:o,...r}=t;return p.jsx("button",{ref:e,className:B(dd,hd[n],md[s],i),...r,children:p.jsx(o,{className:"h-5 w-5"})})}),pd=`
42
+ `,Td={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"},Sd={sm:"h-10 w-10",md:"h-12 w-12",lg:"h-14 w-14"},Go=P.forwardRef((t,e)=>{const{variant:n="white",size:s="md",className:i,Icon:o,...r}=t;return h.jsx("button",{ref:e,className:V(wd,Td[n],Sd[s],i),...r,children:h.jsx(o,{className:"h-5 w-5"})})}),Pd=`
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
- `,gd={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"},yd={sm:"h-10 w-10",md:"h-12 w-12",lg:"h-14 w-14"},vd=P.forwardRef((t,e)=>{const{variant:n="white",size:s="md",className:i,Icon:o,...r}=t;return p.jsx("button",{ref:e,className:B(pd,gd[n],yd[s],i),...r,children:p.jsx(o,{className:"h-5 w-5"})})});/**
46
+ `,Cd={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"},Ed={sm:"h-10 w-10",md:"h-12 w-12",lg:"h-14 w-14"},Xo=P.forwardRef((t,e)=>{const{variant:n="white",size:s="md",className:i,Icon:o,...r}=t;return h.jsx("button",{ref:e,className:V(Pd,Cd[n],Ed[s],i),...r,children:h.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 xd={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 Ad={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 kt=(t,e,n,s)=>{const i=S.forwardRef(({color:o="currentColor",size:r=24,stroke:a=2,title:l,className:u,children:c,...f},d)=>S.createElement("svg",{ref:d,...xd[t],width:r,height:r,className:["tabler-icon",`tabler-icon-${e}`,u].join(" "),...t==="filled"?{fill:o}:{strokeWidth:a,stroke:o},...f},[l&&S.createElement("title",{key:"svg-title"},l),...s.map(([h,m])=>S.createElement(h,m)),...Array.isArray(c)?c:[c]]));return i.displayName=`${n}`,i};/**
56
+ */const dt=(t,e,n,s)=>{const i=T.forwardRef(({color:o="currentColor",size:r=24,stroke:a=2,title:l,className:u,children:c,...f},d)=>T.createElement("svg",{ref:d,...Ad[t],width:r,height:r,className:["tabler-icon",`tabler-icon-${e}`,u].join(" "),...t==="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};/**
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 bd=kt("outline","check","Check",[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]]);/**
61
+ */const Rd=dt("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 Bo=kt("outline","chevron-down","ChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]);/**
66
+ */const qe=dt("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 wd=kt("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"}]]);/**
71
+ */const jd=dt("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 Td=kt("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"}]]);/**
76
+ */const Md=dt("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 _o=kt("outline","x","X",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);/**
81
+ */const qo=dt("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"}]]);/**
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 Sd=kt("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"}]]);/**
86
+ */const Ms=dt("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"}]]);/**
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 Pd=kt("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"}]]),ys=t=>{const{children:e}=t;return e?p.jsx("label",{className:"text-gray-900 font-medium mb-1",children:e}):null},vs=()=>p.jsx("div",{className:"h-5 w-5",children:p.jsx(Sd,{className:"h-5 w-5 text-red-600"})}),xs=t=>{const{children:e,className:n}=t;return p.jsx("div",{className:B("absolute top-1/2 -translate-y-1/2 right-3.5 flex flex-row items-center gap-1",n),children:e})},Fe=t=>{const{children:e}=t;return e?p.jsx("div",{className:"text-gray-500 text-sm font-medium mt-2",children:e}):null},Be=t=>{const{children:e}=t;return e?p.jsx("div",{className:"text-red-600 text-sm font-medium mt-2",children:e}):null},$o=t=>{const{className:e,label:n,description:s,Icon:i,error:o,buttonTray:r,...a}=t;return p.jsxs("div",{className:B("flex flex-col",e),children:[p.jsx(ys,{children:n}),p.jsxs("div",{className:"flex flex-col relative",children:[i&&p.jsx(i,{className:"h-5 w-5 text-gray-900/60 absolute left-4 top-1/2 -translate-y-1/2"}),p.jsx("input",{className:B("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}),p.jsxs(xs,{children:[o&&p.jsx(vs,{}),r]})]}),p.jsx(Fe,{children:s}),p.jsx(Be,{children:o})]})},Cd=t=>{const{className:e,label:n,description:s,error:i,...o}=t;return p.jsxs("div",{className:B("flex flex-col",e),children:[p.jsxs("div",{className:"flex flex-row gap-3",children:[p.jsx("input",{type:"checkbox",className:"h-6 w-6 shrink-0 rounded-lg border 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&&p.jsx("label",{htmlFor:t.id,className:B("text-gray-900 font-medium mb-1",t.id&&"cursor-pointer"),children:n})]}),p.jsx(Fe,{children:s}),p.jsx(Be,{children:i})]})},Ad=t=>{const{children:e,onClick:n,selected:s,disabled:i=!1}=t;return p.jsxs("div",{onClick:()=>!i&&n&&n(),className:B("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:[p.jsx("div",{className:"flex-1",children:e}),s&&!i&&p.jsx("div",{className:"shrink-0",children:p.jsx(bd,{className:"h-5 w-5"})})]})};function _e(){return typeof window<"u"}function Gt(t){return bs(t)?(t.nodeName||"").toLowerCase():"#document"}function J(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function ft(t){var e;return(e=(bs(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function bs(t){return _e()?t instanceof Node||t instanceof J(t).Node:!1}function Y(t){return _e()?t instanceof Element||t instanceof J(t).Element:!1}function dt(t){return _e()?t instanceof HTMLElement||t instanceof J(t).HTMLElement:!1}function ws(t){return!_e()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof J(t).ShadowRoot}const Ed=new Set(["inline","contents"]);function ge(t){const{overflow:e,overflowX:n,overflowY:s,display:i}=ot(t);return/auto|scroll|overlay|hidden|clip/.test(e+s+n)&&!Ed.has(i)}const Rd=new Set(["table","td","th"]);function Md(t){return Rd.has(Gt(t))}const Dd=[":popover-open",":modal"];function $e(t){return Dd.some(e=>{try{return t.matches(e)}catch{return!1}})}const Vd=["transform","translate","scale","rotate","perspective"],jd=["transform","translate","scale","rotate","perspective","filter"],kd=["paint","layout","strict","content"];function Ts(t){const e=Ss(),n=Y(t)?ot(t):t;return Vd.some(s=>n[s]?n[s]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||jd.some(s=>(n.willChange||"").includes(s))||kd.some(s=>(n.contain||"").includes(s))}function Od(t){let e=St(t);for(;dt(e)&&!Xt(e);){if(Ts(e))return e;if($e(e))return null;e=St(e)}return null}function Ss(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Nd=new Set(["html","body","#document"]);function Xt(t){return Nd.has(Gt(t))}function ot(t){return J(t).getComputedStyle(t)}function We(t){return Y(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function St(t){if(Gt(t)==="html")return t;const e=t.assignedSlot||t.parentNode||ws(t)&&t.host||ft(t);return ws(e)?e.host:e}function Wo(t){const e=St(t);return Xt(e)?t.ownerDocument?t.ownerDocument.body:t.body:dt(e)&&ge(e)?e:Wo(e)}function ye(t,e,n){var s;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=Wo(t),o=i===((s=t.ownerDocument)==null?void 0:s.body),r=J(i);if(o){const a=Ps(r);return e.concat(r,r.visualViewport||[],ge(i)?i:[],a&&n?ye(a):[])}return e.concat(i,ye(i,[],n))}function Ps(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}const ve=Math.min,nt=Math.max,Ue=Math.round,ze=Math.floor,ht=t=>({x:t,y:t});function Uo(t,e){return typeof t=="function"?t(e):t}function Cs(t){return t.split("-")[0]}function zo(t){return t.split("-")[1]}function Id(t){return t==="x"?"y":"x"}function Ld(t){return t==="y"?"height":"width"}const Fd=new Set(["top","bottom"]);function As(t){return Fd.has(Cs(t))?"y":"x"}function Bd(t){return Id(As(t))}function _d(t){return{top:0,right:0,bottom:0,left:0,...t}}function $d(t){return typeof t!="number"?_d(t):{top:t,right:t,bottom:t,left:t}}function Ke(t){const{x:e,y:n,width:s,height:i}=t;return{width:s,height:i,top:n,left:e,right:e+s,bottom:n+i,x:e,y:n}}/*!
92
- * tabbable 6.2.0
93
- * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
94
- */var Wd=["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])"],Es=Wd.join(","),Ko=typeof Element>"u",xe=Ko?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ye=!Ko&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t?.ownerDocument},He=function t(e,n){var s;n===void 0&&(n=!0);var i=e==null||(s=e.getAttribute)===null||s===void 0?void 0:s.call(e,"inert"),o=i===""||i==="true",r=o||n&&e&&t(e.parentNode);return r},Ud=function(e){var n,s=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"contenteditable");return s===""||s==="true"},zd=function(e,n,s){if(He(e))return[];var i=Array.prototype.slice.apply(e.querySelectorAll(Es));return n&&xe.call(e,Es)&&i.unshift(e),i=i.filter(s),i},Kd=function t(e,n,s){for(var i=[],o=Array.from(e);o.length;){var r=o.shift();if(!He(r,!1))if(r.tagName==="SLOT"){var a=r.assignedElements(),l=a.length?a:r.children,u=t(l,!0,s);s.flatten?i.push.apply(i,u):i.push({scopeParent:r,candidates:u})}else{var c=xe.call(r,Es);c&&s.filter(r)&&(n||!e.includes(r))&&i.push(r);var f=r.shadowRoot||typeof s.getShadowRoot=="function"&&s.getShadowRoot(r),d=!He(f,!1)&&(!s.shadowRootFilter||s.shadowRootFilter(r));if(f&&d){var h=t(f===!0?r.children:f.children,!0,s);s.flatten?i.push.apply(i,h):i.push({scopeParent:r,candidates:h})}else o.unshift.apply(o,r.children)}}return i},Yo=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Ho=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Ud(e))&&!Yo(e)?0:e.tabIndex},Yd=function(e,n){var s=Ho(e);return s<0&&n&&!Yo(e)?0:s},Hd=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},Go=function(e){return e.tagName==="INPUT"},Gd=function(e){return Go(e)&&e.type==="hidden"},Xd=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(s){return s.tagName==="SUMMARY"});return n},qd=function(e,n){for(var s=0;s<e.length;s++)if(e[s].checked&&e[s].form===n)return e[s]},Zd=function(e){if(!e.name)return!0;var n=e.form||Ye(e),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(e.name));else try{i=s(e.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=qd(i,e.form);return!o||o===e},Jd=function(e){return Go(e)&&e.type==="radio"},Qd=function(e){return Jd(e)&&!Zd(e)},th=function(e){var n,s=e&&Ye(e),i=(n=s)===null||n===void 0?void 0:n.host,o=!1;if(s&&s!==e){var r,a,l;for(o=!!((r=i)!==null&&r!==void 0&&(a=r.ownerDocument)!==null&&a!==void 0&&a.contains(i)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!o&&i;){var u,c,f;s=Ye(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},Xo=function(e){var n=e.getBoundingClientRect(),s=n.width,i=n.height;return s===0&&i===0},eh=function(e,n){var s=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var o=xe.call(e,"details>summary:first-of-type"),r=o?e.parentElement:e;if(xe.call(r,"details:not([open]) *"))return!0;if(!s||s==="full"||s==="legacy-full"){if(typeof i=="function"){for(var a=e;e;){var l=e.parentElement,u=Ye(e);if(l&&!l.shadowRoot&&i(l)===!0)return Xo(e);e.assignedSlot?e=e.assignedSlot:!l&&u!==e.ownerDocument?e=u.host:e=l}e=a}if(th(e))return!e.getClientRects().length;if(s!=="legacy-full")return!0}else if(s==="non-zero-area")return Xo(e);return!1},nh=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var n=e.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 xe.call(n,"fieldset[disabled] *")?!0:!i.contains(e)}return!0}n=n.parentElement}return!1},sh=function(e,n){return!(n.disabled||He(n)||Gd(n)||eh(n,e)||Xd(n)||nh(n))},qo=function(e,n){return!(Qd(n)||Ho(n)<0||!sh(e,n))},ih=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},rh=function t(e){var n=[],s=[];return e.forEach(function(i,o){var r=!!i.scopeParent,a=r?i.scopeParent:i,l=Yd(a,r),u=r?t(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(Hd).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(n)},Zo=function(e,n){n=n||{};var s;return n.getShadowRoot?s=Kd([e],n.includeContainer,{filter:qo.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:ih}):s=zd(e,n.includeContainer,qo.bind(null,n)),rh(s)};function oh(){const t=navigator.userAgentData;return t!=null&&t.platform?t.platform:navigator.platform}function ah(){return/apple/i.test(navigator.vendor)}function lh(t){let e=t.activeElement;for(;((n=e)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;e=e.shadowRoot.activeElement}return e}function ch(t,e){if(!t||!e)return!1;const n=e.getRootNode==null?void 0:e.getRootNode();if(t.contains(e))return!0;if(n&&ws(n)){let s=e;for(;s;){if(t===s)return!0;s=s.parentNode||s.host}}return!1}function Rs(t){return t?.ownerDocument||document}var uh=typeof document<"u",fh=function(){},Pt=uh?S.useLayoutEffect:fh;const dh={...P}.useInsertionEffect||(t=>t());function hh(t){const e=P.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return dh(()=>{e.current=t}),P.useCallback(function(){for(var n=arguments.length,s=new Array(n),i=0;i<n;i++)s[i]=arguments[i];return e.current==null?void 0:e.current(...s)},[])}const Jo=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Qo(t,e){const n=Zo(t,Jo()),s=n.length;if(s===0)return;const i=lh(Rs(t)),o=n.indexOf(i),r=o===-1?e===1?0:s-1:o+e;return n[r]}function mh(t){return Qo(Rs(t).body,1)||t}function ph(t){return Qo(Rs(t).body,-1)||t}function Ms(t,e){const n=e||t.currentTarget,s=t.relatedTarget;return!s||!ch(n,s)}function gh(t){Zo(t,Jo()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function ta(t){t.querySelectorAll("[data-tabindex]").forEach(n=>{const s=n.dataset.tabindex;delete n.dataset.tabindex,s?n.setAttribute("tabindex",s):n.removeAttribute("tabindex")})}function ea(t,e,n){let{reference:s,floating:i}=t;const o=As(e),r=Bd(e),a=Ld(r),l=Cs(e),u=o==="y",c=s.x+s.width/2-i.width/2,f=s.y+s.height/2-i.height/2,d=s[a]/2-i[a]/2;let h;switch(l){case"top":h={x:c,y:s.y-i.height};break;case"bottom":h={x:c,y:s.y+s.height};break;case"right":h={x:s.x+s.width,y:f};break;case"left":h={x:s.x-i.width,y:f};break;default:h={x:s.x,y:s.y}}switch(zo(e)){case"start":h[r]-=d*(n&&u?-1:1);break;case"end":h[r]+=d*(n&&u?-1:1);break}return h}const yh=async(t,e,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(e));let u=await r.getElementRects({reference:t,floating:e,strategy:i}),{x:c,y:f}=ea(u,s,l),d=s,h={},m=0;for(let g=0;g<a.length;g++){const{name:v,fn:y}=a[g],{x:w,y:x,data:C,reset:T}=await y({x:c,y:f,initialPlacement:s,placement:d,strategy:i,middlewareData:h,rects:u,platform:r,elements:{reference:t,floating:e}});c=w??c,f=x??f,h={...h,[v]:{...h[v],...C}},T&&m<=50&&(m++,typeof T=="object"&&(T.placement&&(d=T.placement),T.rects&&(u=T.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:i}):T.rects),{x:c,y:f}=ea(u,d,l)),g=-1)}return{x:c,y:f,placement:d,strategy:i,middlewareData:h}};async function vh(t,e){var n;e===void 0&&(e={});const{x:s,y:i,platform:o,rects:r,elements:a,strategy:l}=t,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:d=!1,padding:h=0}=Uo(e,t),m=$d(h),v=a[d?f==="floating"?"reference":"floating":f],y=Ke(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(v)))==null||n?v:v.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),w=f==="floating"?{x:s,y:i,width:r.floating.width,height:r.floating.height}:r.reference,x=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),C=await(o.isElement==null?void 0:o.isElement(x))?await(o.getScale==null?void 0:o.getScale(x))||{x:1,y:1}:{x:1,y:1},T=Ke(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:x,strategy:l}):w);return{top:(y.top-T.top+m.top)/C.y,bottom:(T.bottom-y.bottom+m.bottom)/C.y,left:(y.left-T.left+m.left)/C.x,right:(T.right-y.right+m.right)/C.x}}const xh=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,s;const{placement:i,rects:o,platform:r,elements:a}=e,{apply:l=()=>{},...u}=Uo(t,e),c=await vh(e,u),f=Cs(i),d=zo(i),h=As(i)==="y",{width:m,height:g}=o.floating;let v,y;f==="top"||f==="bottom"?(v=f,y=d===(await(r.isRTL==null?void 0:r.isRTL(a.floating))?"start":"end")?"left":"right"):(y=f,v=d==="end"?"top":"bottom");const w=g-c.top-c.bottom,x=m-c.left-c.right,C=ve(g-c[v],w),T=ve(m-c[y],x),R=!e.middlewareData.shift;let E=C,A=T;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(A=x),(s=e.middlewareData.shift)!=null&&s.enabled.y&&(E=w),R&&!d){const O=nt(c.left,0),W=nt(c.right,0),at=nt(c.top,0),st=nt(c.bottom,0);h?A=m-2*(O!==0||W!==0?O+W:nt(c.left,c.right)):E=g-2*(at!==0||st!==0?at+st:nt(c.top,c.bottom))}await l({...e,availableWidth:A,availableHeight:E});const j=await r.getDimensions(a.floating);return m!==j.width||g!==j.height?{reset:{rects:!0}}:{}}}};function na(t){const e=ot(t);let n=parseFloat(e.width)||0,s=parseFloat(e.height)||0;const i=dt(t),o=i?t.offsetWidth:n,r=i?t.offsetHeight:s,a=Ue(n)!==o||Ue(s)!==r;return a&&(n=o,s=r),{width:n,height:s,$:a}}function Ds(t){return Y(t)?t:t.contextElement}function qt(t){const e=Ds(t);if(!dt(e))return ht(1);const n=e.getBoundingClientRect(),{width:s,height:i,$:o}=na(e);let r=(o?Ue(n.width):n.width)/s,a=(o?Ue(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}const bh=ht(0);function sa(t){const e=J(t);return!Ss()||!e.visualViewport?bh:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function wh(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==J(t)?!1:e}function Ot(t,e,n,s){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),o=Ds(t);let r=ht(1);e&&(s?Y(s)&&(r=qt(s)):r=qt(t));const a=wh(o,n,s)?sa(o):ht(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 d=J(o),h=s&&Y(s)?J(s):s;let m=d,g=Ps(m);for(;g&&s&&h!==m;){const v=qt(g),y=g.getBoundingClientRect(),w=ot(g),x=y.left+(g.clientLeft+parseFloat(w.paddingLeft))*v.x,C=y.top+(g.clientTop+parseFloat(w.paddingTop))*v.y;l*=v.x,u*=v.y,c*=v.x,f*=v.y,l+=x,u+=C,m=J(g),g=Ps(m)}}return Ke({width:c,height:f,x:l,y:u})}function Ge(t,e){const n=We(t).scrollLeft;return e?e.left+n:Ot(ft(t)).left+n}function ia(t,e){const n=t.getBoundingClientRect(),s=n.left+e.scrollLeft-Ge(t,n),i=n.top+e.scrollTop;return{x:s,y:i}}function Th(t){let{elements:e,rect:n,offsetParent:s,strategy:i}=t;const o=i==="fixed",r=ft(s),a=e?$e(e.floating):!1;if(s===r||a&&o)return n;let l={scrollLeft:0,scrollTop:0},u=ht(1);const c=ht(0),f=dt(s);if((f||!f&&!o)&&((Gt(s)!=="body"||ge(r))&&(l=We(s)),dt(s))){const h=Ot(s);u=qt(s),c.x=h.x+s.clientLeft,c.y=h.y+s.clientTop}const d=r&&!f&&!o?ia(r,l):ht(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+d.x,y:n.y*u.y-l.scrollTop*u.y+c.y+d.y}}function Sh(t){return Array.from(t.getClientRects())}function Ph(t){const e=ft(t),n=We(t),s=t.ownerDocument.body,i=nt(e.scrollWidth,e.clientWidth,s.scrollWidth,s.clientWidth),o=nt(e.scrollHeight,e.clientHeight,s.scrollHeight,s.clientHeight);let r=-n.scrollLeft+Ge(t);const a=-n.scrollTop;return ot(s).direction==="rtl"&&(r+=nt(e.clientWidth,s.clientWidth)-i),{width:i,height:o,x:r,y:a}}const ra=25;function Ch(t,e){const n=J(t),s=ft(t),i=n.visualViewport;let o=s.clientWidth,r=s.clientHeight,a=0,l=0;if(i){o=i.width,r=i.height;const c=Ss();(!c||c&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}const u=Ge(s);if(u<=0){const c=s.ownerDocument,f=c.body,d=getComputedStyle(f),h=c.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,m=Math.abs(s.clientWidth-f.clientWidth-h);m<=ra&&(o-=m)}else u<=ra&&(o+=u);return{width:o,height:r,x:a,y:l}}const Ah=new Set(["absolute","fixed"]);function Eh(t,e){const n=Ot(t,!0,e==="fixed"),s=n.top+t.clientTop,i=n.left+t.clientLeft,o=dt(t)?qt(t):ht(1),r=t.clientWidth*o.x,a=t.clientHeight*o.y,l=i*o.x,u=s*o.y;return{width:r,height:a,x:l,y:u}}function oa(t,e,n){let s;if(e==="viewport")s=Ch(t,n);else if(e==="document")s=Ph(ft(t));else if(Y(e))s=Eh(e,n);else{const i=sa(t);s={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return Ke(s)}function aa(t,e){const n=St(t);return n===e||!Y(n)||Xt(n)?!1:ot(n).position==="fixed"||aa(n,e)}function Rh(t,e){const n=e.get(t);if(n)return n;let s=ye(t,[],!1).filter(a=>Y(a)&&Gt(a)!=="body"),i=null;const o=ot(t).position==="fixed";let r=o?St(t):t;for(;Y(r)&&!Xt(r);){const a=ot(r),l=Ts(r);!l&&a.position==="fixed"&&(i=null),(o?!l&&!i:!l&&a.position==="static"&&!!i&&Ah.has(i.position)||ge(r)&&!l&&aa(t,r))?s=s.filter(c=>c!==r):i=a,r=St(r)}return e.set(t,s),s}function Mh(t){let{element:e,boundary:n,rootBoundary:s,strategy:i}=t;const r=[...n==="clippingAncestors"?$e(e)?[]:Rh(e,this._c):[].concat(n),s],a=r[0],l=r.reduce((u,c)=>{const f=oa(e,c,i);return u.top=nt(f.top,u.top),u.right=ve(f.right,u.right),u.bottom=ve(f.bottom,u.bottom),u.left=nt(f.left,u.left),u},oa(e,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Dh(t){const{width:e,height:n}=na(t);return{width:e,height:n}}function Vh(t,e,n){const s=dt(e),i=ft(e),o=n==="fixed",r=Ot(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const l=ht(0);function u(){l.x=Ge(i)}if(s||!s&&!o)if((Gt(e)!=="body"||ge(i))&&(a=We(e)),s){const h=Ot(e,!0,o,e);l.x=h.x+e.clientLeft,l.y=h.y+e.clientTop}else i&&u();o&&!s&&i&&u();const c=i&&!s&&!o?ia(i,a):ht(0),f=r.left+a.scrollLeft-l.x-c.x,d=r.top+a.scrollTop-l.y-c.y;return{x:f,y:d,width:r.width,height:r.height}}function Vs(t){return ot(t).position==="static"}function la(t,e){if(!dt(t)||ot(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return ft(t)===n&&(n=n.ownerDocument.body),n}function ca(t,e){const n=J(t);if($e(t))return n;if(!dt(t)){let i=St(t);for(;i&&!Xt(i);){if(Y(i)&&!Vs(i))return i;i=St(i)}return n}let s=la(t,e);for(;s&&Md(s)&&Vs(s);)s=la(s,e);return s&&Xt(s)&&Vs(s)&&!Ts(s)?n:s||Od(t)||n}const jh=async function(t){const e=this.getOffsetParent||ca,n=this.getDimensions,s=await n(t.floating);return{reference:Vh(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function kh(t){return ot(t).direction==="rtl"}const Oh={convertOffsetParentRelativeRectToViewportRelativeRect:Th,getDocumentElement:ft,getClippingRect:Mh,getOffsetParent:ca,getElementRects:jh,getClientRects:Sh,getDimensions:Dh,getScale:qt,isElement:Y,isRTL:kh};function ua(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Nh(t,e){let n=null,s;const i=ft(t);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=t.getBoundingClientRect(),{left:c,top:f,width:d,height:h}=u;if(a||e(),!d||!h)return;const m=ze(f),g=ze(i.clientWidth-(c+d)),v=ze(i.clientHeight-(f+h)),y=ze(c),x={rootMargin:-m+"px "+-g+"px "+-v+"px "+-y+"px",threshold:nt(0,ve(1,l))||1};let C=!0;function T(R){const E=R[0].intersectionRatio;if(E!==l){if(!C)return r();E?r(!1,E):s=setTimeout(()=>{r(!1,1e-7)},1e3)}E===1&&!ua(u,t.getBoundingClientRect())&&r(),C=!1}try{n=new IntersectionObserver(T,{...x,root:i.ownerDocument})}catch{n=new IntersectionObserver(T,x)}n.observe(t)}return r(!0),o}function Ih(t,e,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=Ds(t),c=i||o?[...u?ye(u):[],...ye(e)]:[];c.forEach(y=>{i&&y.addEventListener("scroll",n,{passive:!0}),o&&y.addEventListener("resize",n)});const f=u&&a?Nh(u,n):null;let d=-1,h=null;r&&(h=new ResizeObserver(y=>{let[w]=y;w&&w.target===u&&h&&(h.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var x;(x=h)==null||x.observe(e)})),n()}),u&&!l&&h.observe(u),h.observe(e));let m,g=l?Ot(t):null;l&&v();function v(){const y=Ot(t);g&&!ua(g,y)&&n(),g=y,m=requestAnimationFrame(v)}return n(),()=>{var y;c.forEach(w=>{i&&w.removeEventListener("scroll",n),o&&w.removeEventListener("resize",n)}),f?.(),(y=h)==null||y.disconnect(),h=null,l&&cancelAnimationFrame(m)}}const Lh=xh,Fh=(t,e,n)=>{const s=new Map,i={platform:Oh,...n},o={...i.platform,_c:s};return yh(t,e,{...i,platform:o})};var Bh=typeof document<"u",_h=function(){},Xe=Bh?S.useLayoutEffect:_h;function qe(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,s,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(s=n;s--!==0;)if(!qe(t[s],e[s]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(s=n;s--!==0;)if(!{}.hasOwnProperty.call(e,i[s]))return!1;for(s=n;s--!==0;){const o=i[s];if(!(o==="_owner"&&t.$$typeof)&&!qe(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}function fa(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function da(t,e){const n=fa(t);return Math.round(e*n)/n}function js(t){const e=P.useRef(t);return Xe(()=>{e.current=t}),e}function $h(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:s=[],platform:i,elements:{reference:o,floating:r}={},transform:a=!0,whileElementsMounted:l,open:u}=t,[c,f]=P.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[d,h]=P.useState(s);qe(d,s)||h(s);const[m,g]=P.useState(null),[v,y]=P.useState(null),w=P.useCallback(V=>{V!==R.current&&(R.current=V,g(V))},[]),x=P.useCallback(V=>{V!==E.current&&(E.current=V,y(V))},[]),C=o||m,T=r||v,R=P.useRef(null),E=P.useRef(null),A=P.useRef(c),j=l!=null,O=js(l),W=js(i),at=js(u),st=P.useCallback(()=>{if(!R.current||!E.current)return;const V={placement:e,strategy:n,middleware:d};W.current&&(V.platform=W.current),Fh(R.current,E.current,V).then(q=>{const b={...q,isPositioned:at.current!==!1};mt.current&&!qe(A.current,b)&&(A.current=b,_s.flushSync(()=>{f(b)}))})},[d,e,n,W,at]);Xe(()=>{u===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,f(V=>({...V,isPositioned:!1})))},[u]);const mt=P.useRef(!1);Xe(()=>(mt.current=!0,()=>{mt.current=!1}),[]),Xe(()=>{if(C&&(R.current=C),T&&(E.current=T),C&&T){if(O.current)return O.current(C,T,st);st()}},[C,T,st,O,j]);const Ct=P.useMemo(()=>({reference:R,floating:E,setReference:w,setFloating:x}),[w,x]),lt=P.useMemo(()=>({reference:C,floating:T}),[C,T]),L=P.useMemo(()=>{const V={position:n,left:0,top:0};if(!lt.floating)return V;const q=da(lt.floating,c.x),b=da(lt.floating,c.y);return a?{...V,transform:"translate("+q+"px, "+b+"px)",...fa(lt.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:q,top:b}},[n,a,lt.floating,c.x,c.y]);return P.useMemo(()=>({...c,update:st,refs:Ct,elements:lt,floatingStyles:L}),[c,st,Ct,lt,L])}const Wh=(t,e)=>({...Lh(t),options:[t,e]}),Uh={...P};let ha=!1,zh=0;const ma=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+zh++;function Kh(){const[t,e]=P.useState(()=>ha?ma():void 0);return Pt(()=>{t==null&&e(ma())},[]),P.useEffect(()=>{ha=!0},[]),t}const pa=Uh.useId||Kh;let ks;process.env.NODE_ENV!=="production"&&(ks=new Set);function Yh(){for(var t,e=arguments.length,n=new Array(e),s=0;s<e;s++)n[s]=arguments[s];const i="Floating UI: "+n.join(" ");if(!((t=ks)!=null&&t.has(i))){var o;(o=ks)==null||o.add(i),console.error(i)}}function Hh(){const t=new Map;return{emit(e,n){var s;(s=t.get(e))==null||s.forEach(i=>i(n))},on(e,n){t.has(e)||t.set(e,new Set),t.get(e).add(n)},off(e,n){var s;(s=t.get(e))==null||s.delete(n)}}}const Gh=P.createContext(null),Xh=P.createContext(null),qh=()=>{var t;return((t=P.useContext(Gh))==null?void 0:t.id)||null},Zh=()=>P.useContext(Xh);function ga(t){return"data-floating-ui-"+t}const ya={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=P.forwardRef(function(e,n){const[s,i]=P.useState();Pt(()=>{ah()&&i("button")},[]);const o={ref:n,tabIndex:0,role:s,"aria-hidden":s?void 0:!0,[ga("focus-guard")]:"",style:ya};return p.jsx("span",{...e,...o})}),xa=P.createContext(null),ba=ga("portal");function Jh(t){t===void 0&&(t={});const{id:e,root:n}=t,s=pa(),i=tm(),[o,r]=P.useState(null),a=P.useRef(null);return Pt(()=>()=>{o?.remove(),queueMicrotask(()=>{a.current=null})},[o]),Pt(()=>{if(!s||a.current)return;const l=e?document.getElementById(e):null;if(!l)return;const u=document.createElement("div");u.id=s,u.setAttribute(ba,""),l.appendChild(u),a.current=u,r(u)},[e,s]),Pt(()=>{if(n===null||!s||a.current)return;let l=n||i?.portalNode;l&&!bs(l)&&(l=l.current),l=l||document.body;let u=null;e&&(u=document.createElement("div"),u.id=e,l.appendChild(u));const c=document.createElement("div");c.id=s,c.setAttribute(ba,""),l=u||l,l.appendChild(c),a.current=c,r(c)},[e,n,s,i]),o}function Qh(t){const{children:e,id:n,root:s,preserveTabOrder:i=!0}=t,o=Jh({id:n,root:s}),[r,a]=P.useState(null),l=P.useRef(null),u=P.useRef(null),c=P.useRef(null),f=P.useRef(null),d=r?.modal,h=r?.open,m=!!r&&!r.modal&&r.open&&i&&!!(s||o);return P.useEffect(()=>{if(!o||!i||d)return;function g(v){o&&Ms(v)&&(v.type==="focusin"?ta:gh)(o)}return o.addEventListener("focusin",g,!0),o.addEventListener("focusout",g,!0),()=>{o.removeEventListener("focusin",g,!0),o.removeEventListener("focusout",g,!0)}},[o,i,d]),P.useEffect(()=>{o&&(h||ta(o))},[h,o]),p.jsxs(xa.Provider,{value:P.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:l,afterOutsideRef:u,beforeInsideRef:c,afterInsideRef:f,portalNode:o,setFocusManagerState:a}),[i,o]),children:[m&&o&&p.jsx(va,{"data-type":"outside",ref:l,onFocus:g=>{if(Ms(g,o)){var v;(v=c.current)==null||v.focus()}else{const y=r?r.domReference:null,w=ph(y);w?.focus()}}}),m&&o&&p.jsx("span",{"aria-owns":o.id,style:ya}),o&&_s.createPortal(e,o),m&&o&&p.jsx(va,{"data-type":"outside",ref:u,onFocus:g=>{if(Ms(g,o)){var v;(v=f.current)==null||v.focus()}else{const y=r?r.domReference:null,w=mh(y);w?.focus(),r?.closeOnFocusOut&&r?.onOpenChange(!1,g.nativeEvent,"focus-out")}}})]})}const tm=()=>P.useContext(xa);let Ze=0;const wa="--floating-ui-scrollbar-width";function em(){const t=oh(),e=/iP(hone|ad|od)|iOS/.test(t)||t==="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(wa,o+"px"),o&&(n[i]=o+"px"),e){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(wa),e&&(Object.assign(n,{position:"",top:"",left:"",right:""}),window.scrollTo(r,a))}}let Ta=()=>{};const nm=P.forwardRef(function(e,n){const{lockScroll:s=!1,...i}=e;return Pt(()=>{if(s)return Ze++,Ze===1&&(Ta=em()),()=>{Ze--,Ze===0&&Ta()}},[s]),p.jsx("div",{ref:n,...i,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...i.style}})});function sm(t){const{open:e=!1,onOpenChange:n,elements:s}=t,i=pa(),o=P.useRef({}),[r]=P.useState(()=>Hh()),a=qh()!=null;if(process.env.NODE_ENV!=="production"){const h=s.reference;h&&!Y(h)&&Yh("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]=P.useState(s.reference),c=hh((h,m,g)=>{o.current.openEvent=h?m:void 0,r.emit("openchange",{open:h,event:m,reason:g,nested:a}),n?.(h,m,g)}),f=P.useMemo(()=>({setPositionReference:u}),[]),d=P.useMemo(()=>({reference:l||s.reference||null,floating:s.floating||null,domReference:s.reference}),[l,s.reference,s.floating]);return P.useMemo(()=>({dataRef:o,open:e,onOpenChange:c,elements:d,events:r,floatingId:i,refs:f}),[e,c,d,r,i,f])}function im(t){t===void 0&&(t={});const{nodeId:e}=t,n=sm({...t,elements:{reference:null,floating:null,...t.elements}}),s=t.rootContext||n,i=s.elements,[o,r]=P.useState(null),[a,l]=P.useState(null),c=i?.domReference||o,f=P.useRef(null),d=Zh();Pt(()=>{c&&(f.current=c)},[c]);const h=$h({...t,elements:{...i,...a&&{reference:a}}}),m=P.useCallback(x=>{const C=Y(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),getClientRects:()=>x.getClientRects(),contextElement:x}:x;l(C),h.refs.setReference(C)},[h.refs]),g=P.useCallback(x=>{(Y(x)||x===null)&&(f.current=x,r(x)),(Y(h.refs.reference.current)||h.refs.reference.current===null||x!==null&&!Y(x))&&h.refs.setReference(x)},[h.refs]),v=P.useMemo(()=>({...h.refs,setReference:g,setPositionReference:m,domReference:f}),[h.refs,g,m]),y=P.useMemo(()=>({...h.elements,domReference:c}),[h.elements,c]),w=P.useMemo(()=>({...h,...s,refs:v,elements:y,nodeId:e}),[h,v,y,e,s]);return Pt(()=>{s.dataRef.current.floatingContext=w;const x=d?.nodesRef.current.find(C=>C.id===e);x&&(x.context=w)}),P.useMemo(()=>({...h,context:w,refs:v,elements:y}),[h,v,y,w])}const rm={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"},om=P.memo(({open:t,children:e,className:n,onOutsideClick:s,floatingStyles:i,setFloating:o,placement:r})=>p.jsx(Qh,{children:p.jsx(ir,{children:t&&p.jsxs(p.Fragment,{children:[s&&p.jsx(nm,{onClick:s}),p.jsx("div",{ref:o,style:i,className:"z-10",children:p.jsx(gs.div,{className:n,style:{transformOrigin:rm[r]},initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.1,ease:"easeInOut"},children:e})})]})})})),Sa=t=>{const{placement:e="bottom",onOutsideClick:n,fullWidth:s,minWidth:i,maxWidth:o}=t,r=P.useMemo(()=>[Wh({apply({rects:f,elements:d}){s&&(d.floating.style.width=`${f.reference.width}px`),i&&(d.floating.style.minWidth=`${i}px`),o&&(d.floating.style.maxWidth=`${o}px`)}})],[s,o,i]),{refs:a,floatingStyles:l}=im({placement:e,middleware:r,whileElementsMounted:Ih}),u=P.useRef({onOutsideClick:n,floatingStyles:l,setFloating:a.setFloating,placement:e});u.current={onOutsideClick:n,floatingStyles:l,setFloating:a.setFloating,placement:e};const c=P.useMemo(()=>{const f=d=>{const{floatingStyles:h,setFloating:m,onOutsideClick:g,placement:v}=u.current,{className:y,open:w,children:x}=d;return p.jsx(om,{open:w,className:y,onOutsideClick:g,floatingStyles:h,setFloating:m,placement:v,children:x})};return P.memo(f)},[]);return{anchorRef:a.setReference,Popover:c}},am="flex flex-col bg-white border mt-1 border-gray-200 rounded-xl shadow-lg p-3 overflow-y-auto relative",Pa=t=>{const{className:e,children:n,...s}=t;return p.jsx("div",{className:B(am,e),...s,children:n})},Os=t=>{const{onClick:e,Icon:n}=t;return p.jsx("div",{onClick:e,className:B("h-6 w-6 select-none rounded-full p-0.5",e&&"ring-0 transition-all duration-150 ring-gray-200 active:ring-2 cursor-pointer hover:ring-4 group"),children:p.jsx(n,{className:B("h-5 w-5 text-gray-500",e&&"group-active:scale-[0.8] transition-transform origin-center")})})},lm=(t,e)=>{S.useEffect(()=>{if(!t)return;const n=s=>{s.key==="Escape"&&e()};return document.addEventListener("keydown",n),()=>{document.removeEventListener("keydown",n)}},[t,e])},Ca=t=>{const{className:e,label:n,description:s,options:i,onChange:o,value:r,placeholder:a,maxHeight:l=300,error:u}=t,[c,f]=S.useState(!1),d=P.useRef(null),h=i?.find(v=>v.value===r);lm(c,()=>f(!1)),S.useEffect(()=>{c&&d.current?.focus({preventScroll:!0})},[c]);const{anchorRef:m,Popover:g}=Sa({placement:"bottom",fullWidth:!0,onOutsideClick:()=>f(!1)});return p.jsxs("div",{className:B("flex flex-col",e),children:[p.jsx(ys,{children:n}),p.jsxs("div",{className:"relative flex w-full flex-col",ref:m,children:[p.jsxs("div",{ref:d,role:"button",tabIndex:0,className:B("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:v=>v.key===" "&&f(y=>!y),onClick:()=>f(!c),children:[h&&p.jsx("span",{children:h.label}),!h&&a&&p.jsx("span",{className:"text-gray-500",children:a})]}),p.jsxs(xs,{children:[u&&p.jsx(vs,{}),!!r&&p.jsx(Os,{Icon:_o,onClick:()=>o(null)}),p.jsx(Os,{Icon:Bo})]}),p.jsx(g,{open:c,children:p.jsx(Pa,{className:"!p-0",style:{maxHeight:l},children:p.jsx("div",{className:"flex flex-col p-2 gap-1",children:i.map(v=>{const y=v.value===r;return p.jsx(Ad,{onClick:()=>{!v.disabled&&o&&(o(v.value),f(!1))},selected:y,disabled:v.disabled,children:v.label},String(v.value))})})})})]}),p.jsx(Fe,{children:s}),p.jsx(Be,{children:u})]})},cm=t=>{const{className:e,label:n,description:s,options:i,error:o,...r}=t;return p.jsxs("div",{className:B("flex flex-col",e),children:[p.jsx(ys,{children:n}),p.jsxs("div",{className:"relative flex w-full flex-col",children:[p.jsx("select",{className:`
91
+ */const Dd=dt("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"}]]);/**
92
+ * @license @tabler/icons-react v3.34.1 - MIT
93
+ *
94
+ * This source code is licensed under the MIT license.
95
+ * See the LICENSE file in the root directory of this source tree.
96
+ */const Ce=dt("outline","x","X",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);/**
97
+ * @license @tabler/icons-react v3.34.1 - MIT
98
+ *
99
+ * This source code is licensed under the MIT license.
100
+ * See the LICENSE file in the root directory of this source tree.
101
+ */const Vd=dt("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"}]]);/**
102
+ * @license @tabler/icons-react v3.34.1 - MIT
103
+ *
104
+ * This source code is licensed under the MIT license.
105
+ * See the LICENSE file in the root directory of this source tree.
106
+ */const kd=dt("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"}]]),Lt=t=>{const{children:e}=t;return e?h.jsx("label",{className:"text-gray-900 font-medium mb-1",children:e}):null},Ft=()=>h.jsx("div",{className:"h-5 w-5",children:h.jsx(Vd,{className:"h-5 w-5 text-red-600"})}),Bt=t=>{const{children:e,className:n}=t;return h.jsx("div",{className:V("absolute top-1/2 -translate-y-1/2 right-3.5 flex flex-row items-center gap-1",n),children:e})},ht=t=>{const{children:e}=t;return e?h.jsx("div",{className:"text-gray-500 text-sm font-medium mt-2",children:e}):null},mt=t=>{const{children:e}=t;return e?h.jsx("div",{className:"text-red-600 text-sm font-medium mt-2",children:e}):null},Ds=t=>{const{className:e,label:n,description:s,Icon:i,error:o,buttonTray:r,...a}=t;return h.jsxs("div",{className:V("flex flex-col",e),children:[h.jsx(Lt,{children:n}),h.jsxs("div",{className:"flex flex-col relative",children:[i&&h.jsx(i,{className:"h-5 w-5 text-gray-900/60 absolute left-4 top-1/2 -translate-y-1/2"}),h.jsx("input",{className:V("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}),h.jsxs(Bt,{children:[o&&h.jsx(Ft,{}),r]})]}),h.jsx(ht,{children:s}),h.jsx(mt,{children:o})]})},St=t=>{const{onClick:e,Icon:n}=t;return h.jsx("div",{onClick:e,className:V("h-6 w-6 select-none rounded-full p-0.5",e&&"ring-0 transition-all duration-150 ring-gray-200 active:ring-2 cursor-pointer hover:ring-4 group"),children:h.jsx(n,{className:V("h-5 w-5 text-gray-500",e&&"group-active:scale-[0.8] transition-transform origin-center")})})},Nd=t=>{const{type:e="password",enableShowPasswordToggle:n=!0,...s}=t,[i,o]=T.useState(!1),r=()=>{o(!i)};return h.jsx(Ds,{type:i?"text":e,buttonTray:n?h.jsx(St,{Icon:i?jd:Md,onClick:r}):void 0,...s})},Od=t=>{const{className:e,label:n,description:s,error:i,...o}=t;return h.jsxs("div",{className:V("flex flex-col",e),children:[h.jsx(Lt,{children:n}),h.jsxs("div",{className:"flex flex-col relative",children:[h.jsx("textarea",{className:V("px-4 py-2.5 min-h-12 border border-gray-200 text-gray-900 placeholder:text-gray-400 bg-white transition-colors 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}),h.jsx(Bt,{className:"top-3.5 translate-y-0",children:i&&h.jsx(Ft,{})})]}),h.jsx(ht,{children:s}),h.jsx(mt,{children:i})]})},Id=t=>{const{className:e,label:n,description:s,error:i,...o}=t;return h.jsxs("div",{className:V("flex flex-col",e),children:[h.jsxs("div",{className:"flex flex-row gap-3",children:[h.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&&h.jsx("label",{htmlFor:t.id,className:V("text-gray-900 font-medium mb-1",t.id&&"cursor-pointer"),children:n})]}),h.jsx(ht,{children:s}),h.jsx(mt,{children:i})]})},Ld=t=>{const{className:e,label:n,description:s,error:i,...o}=t;return h.jsxs("div",{className:V("flex flex-col",e),children:[h.jsxs("div",{className:"flex flex-row gap-3",children:[h.jsxs("div",{className:"relative shrink-0 h-6 w-10",children:[h.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}),h.jsx("div",{className:V("rounded-full absolute border inset-0 mt-[2px] pointer-events-none transition-colors duration-150 ",t.checked?"bg-blue-600 border-blue-600":"bg-gray-300 border-gray-300"),children:h.jsx("div",{className:V("absolute top-1/2 -translate-y-1/2 left-1 h-4 w-4 rounded-full bg-white shadow-md transition-all duration-150",t.checked&&"translate-x-3.5 ")})})]}),n&&h.jsx("label",{htmlFor:t.id,className:V("text-gray-900 font-medium mb-1",t.id&&"cursor-pointer"),children:n})]}),h.jsx(ht,{children:s}),h.jsx(mt,{children:i})]})},Fd=t=>{const{className:e,label:n,description:s,error:i,...o}=t;return h.jsxs("div",{className:V("flex flex-col",e),children:[h.jsxs("div",{className:"flex flex-row gap-3",children:[h.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&&h.jsx("label",{htmlFor:t.id,className:V("text-gray-900 font-medium mb-1",t.id&&"cursor-pointer"),children:n})]}),h.jsx(ht,{children:s}),h.jsx(mt,{children:i})]})},Bd=t=>{const{className:e,label:n,description:s,options:i,error:o,...r}=t;return h.jsxs("div",{className:V("flex flex-col",e),children:[h.jsx(Lt,{children:n}),h.jsxs("div",{className:"relative flex w-full flex-col",children:[h.jsx("select",{className:`
95
107
  appearance-none
96
108
  h-12
97
109
  pl-4
@@ -110,5 +122,8 @@ React keys must be passed directly to JSX without using spread:
110
122
  ring-gray-900/10
111
123
  focus:ring-4
112
124
  focus:outline-none
113
- `,...r,children:i&&i.map((a,l)=>p.jsx("option",{value:a.value,disabled:a.disabled,children:a.label},l))}),p.jsxs(xs,{children:[o&&p.jsx(vs,{}),p.jsx(Os,{Icon:Bo})]})]}),p.jsx(Fe,{children:s}),p.jsx(Be,{children:o})]})},um=P.forwardRef((t,e)=>{const{className:n,children:s,...i}=t;return p.jsx("div",{ref:e,className:B("flex flex-col gap-6 border border-gray-200 rounded-xl bg-white shadow-sm px-6 py-6",n),...i,children:s})}),fm=t=>{const{className:e,vertical:n=!1,...s}=t;return p.jsx("div",{className:B(n?"w-px h-full bg-gray-200":"w-full h-px bg-gray-200",e),...s})},dm=t=>{const{columns:e,rows:n}=t;return p.jsx("div",{className:"border border-gray-200 rounded-xl shadow-sm overflow-hidden",children:p.jsxs("table",{className:"table-fixed",children:[p.jsx("colgroup",{children:e.map(s=>p.jsx("col",{width:250},s.id))}),p.jsx("thead",{children:p.jsx("tr",{className:"divide-gray-200 divide-x text-left bg-gray-50 text-gray-400 border-b border-b-gray-200",children:e.map(s=>p.jsx("th",{className:"font-medium h-[3rem] relative hover:bg-gray-100 cursor-pointer active:bg-gray-200 transition-colors duration-150",children:p.jsx("div",{className:"absolute inset-0",children:p.jsx("div",{className:"flex items-center h-full w-full px-4",children:s.header})})},s.id))})}),p.jsx("tbody",{className:"divide-y divide-gray-200",children:n.map((s,i)=>p.jsx("tr",{className:"divide-gray-200 divide-x",children:e.map(o=>p.jsx("td",{className:"h-[3rem] relative",children:p.jsx("div",{className:"absolute inset-0 ",children:p.jsx("div",{className:"flex items-center h-full w-full px-4",children:o.renderCell(s)})})},o.id))},i))})]})})},hm={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"},Aa=P.forwardRef((t,e)=>{const{className:n,children:s,onClick:i,showCloseIcon:o,Icon:r,color:a="gray"}=t,l=B("inline-flex align-top items-center gap-2 px-3 h-7 rounded-lg font-semibold",hm[a],n);return i?p.jsx("div",{ref:e,children:p.jsxs("button",{className:B("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&&p.jsx(r,{className:"h-4 w-4 shrink-0"}),p.jsx("div",{className:"break-all line-clamp-1 text-left",children:s}),o&&p.jsx(_o,{className:"h-4 w-4 shrink-0"})]})}):p.jsxs("div",{className:l,ref:e,children:[r&&p.jsx(r,{className:"h-4 w-4 shrink-0"}),p.jsx("div",{className:"break-all line-clamp-1 text-left",children:s})]})}),mm="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",Ns=P.forwardRef((t,e)=>{const{className:n,children:s,Icon:i,...o}=t;return p.jsxs("button",{ref:e,className:B(mm,n),...o,children:[i&&p.jsx(i,{className:"h-5 w-5"}),s]})}),pm=[{id:1,email:"matthiaskrijgsman@gmail.com",firstname:"Matthias",lastname:"Krijgsman",status:"active"},{id:2,email:"dennis@snijder.io",firstname:"Dennis",lastname:"Snijder",status:"inactive"},{id:3,email:"arcokrijgsman@gmail.com",firstname:"Arco",lastname:"Krijgsman",status:"active"}],gm=[{id:"id",header:"ID",renderCell:t=>t.id},{id:"email",header:"Email",renderCell:t=>p.jsx(Aa,{Icon:Pd,onClick:()=>{},children:t.email})},{id:"firstname",header:"First Name",renderCell:t=>t.firstname},{id:"lastname",header:"Last Name",renderCell:t=>t.lastname},{id:"status",header:"Status",renderCell:()=>p.jsx(vm,{})}],ym=()=>p.jsxs("div",{className:"flex flex-col gap-6",children:[p.jsxs("div",{className:"flex flex-row items-center justify-start gap-3",children:[p.jsx($o,{Icon:wd,placeholder:"Search..."}),p.jsx(Fo,{Icon:Td})]}),p.jsx(dm,{columns:gm,rows:pm}),p.jsx(Ca,{options:[{label:"Option 1",value:1},{label:"Option 2",value:2},{label:"Option 3",value:3}],value:null,onChange:()=>{}})]}),vm=()=>{const[t,e]=S.useState(!1),{Popover:n,anchorRef:s}=Sa({fullWidth:!0,onOutsideClick:()=>e(!1),minWidth:150});return p.jsxs(p.Fragment,{children:[p.jsx(Aa,{onClick:()=>e(!0),ref:s,children:"Test"}),p.jsx(n,{open:t,children:p.jsxs(Pa,{children:[p.jsx(Ns,{children:"Option 1"}),p.jsx(Ns,{children:"Option 2"}),p.jsx(Ns,{children:"Option 3"})]})})]})};U.Button=fd,U.ButtonIconRound=vd,U.ButtonIconSquare=Fo,U.Divider=fm,U.Input=$o,U.InputCheck=Cd,U.InputSelect=Ca,U.InputSelectNative=cm,U.Panel=um,U.Test=ym,Object.defineProperty(U,Symbol.toStringTag,{value:"Module"})}));
125
+ `,...r,children:i&&i.map((a,l)=>h.jsx("option",{value:a.value,disabled:a.disabled,children:a.label},l))}),h.jsxs(Bt,{children:[o&&h.jsx(Ft,{}),h.jsx(St,{Icon:qe})]})]}),h.jsx(ht,{children:s}),h.jsx(mt,{children:o})]})},Ee=t=>{const{children:e,onClick:n,selected:s,disabled:i=!1}=t;return h.jsxs("div",{onClick:()=>!i&&n&&n(),className:V("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:[h.jsx("div",{className:"flex-1",children:e}),s&&!i&&h.jsx("div",{className:"shrink-0",children:h.jsx(Rd,{className:"h-5 w-5"})})]})};function Ze(){return typeof window<"u"}function te(t){return Vs(t)?(t.nodeName||"").toLowerCase():"#document"}function tt(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function pt(t){var e;return(e=(Vs(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Vs(t){return Ze()?t instanceof Node||t instanceof tt(t).Node:!1}function G(t){return Ze()?t instanceof Element||t instanceof tt(t).Element:!1}function gt(t){return Ze()?t instanceof HTMLElement||t instanceof tt(t).HTMLElement:!1}function ks(t){return!Ze()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof tt(t).ShadowRoot}const _d=new Set(["inline","contents"]);function Ae(t){const{overflow:e,overflowX:n,overflowY:s,display:i}=lt(t);return/auto|scroll|overlay|hidden|clip/.test(e+s+n)&&!_d.has(i)}const $d=new Set(["table","td","th"]);function Wd(t){return $d.has(te(t))}const Ud=[":popover-open",":modal"];function Je(t){return Ud.some(e=>{try{return t.matches(e)}catch{return!1}})}const zd=["transform","translate","scale","rotate","perspective"],Kd=["transform","translate","scale","rotate","perspective","filter"],Yd=["paint","layout","strict","content"];function Ns(t){const e=Os(),n=G(t)?lt(t):t;return zd.some(s=>n[s]?n[s]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||Kd.some(s=>(n.willChange||"").includes(s))||Yd.some(s=>(n.contain||"").includes(s))}function Hd(t){let e=Rt(t);for(;gt(e)&&!ee(e);){if(Ns(e))return e;if(Je(e))return null;e=Rt(e)}return null}function Os(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Gd=new Set(["html","body","#document"]);function ee(t){return Gd.has(te(t))}function lt(t){return tt(t).getComputedStyle(t)}function Qe(t){return G(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Rt(t){if(te(t)==="html")return t;const e=t.assignedSlot||t.parentNode||ks(t)&&t.host||pt(t);return ks(e)?e.host:e}function Zo(t){const e=Rt(t);return ee(e)?t.ownerDocument?t.ownerDocument.body:t.body:gt(e)&&Ae(e)?e:Zo(e)}function Re(t,e,n){var s;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=Zo(t),o=i===((s=t.ownerDocument)==null?void 0:s.body),r=tt(i);if(o){const a=Is(r);return e.concat(r,r.visualViewport||[],Ae(i)?i:[],a&&n?Re(a):[])}return e.concat(i,Re(i,[],n))}function Is(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}const je=Math.min,rt=Math.max,tn=Math.round,en=Math.floor,yt=t=>({x:t,y:t});function Jo(t,e){return typeof t=="function"?t(e):t}function Ls(t){return t.split("-")[0]}function Qo(t){return t.split("-")[1]}function Xd(t){return t==="x"?"y":"x"}function qd(t){return t==="y"?"height":"width"}const Zd=new Set(["top","bottom"]);function Fs(t){return Zd.has(Ls(t))?"y":"x"}function Jd(t){return Xd(Fs(t))}function Qd(t){return{top:0,right:0,bottom:0,left:0,...t}}function th(t){return typeof t!="number"?Qd(t):{top:t,right:t,bottom:t,left:t}}function nn(t){const{x:e,y:n,width:s,height:i}=t;return{width:s,height:i,top:n,left:e,right:e+s,bottom:n+i,x:e,y:n}}/*!
126
+ * tabbable 6.2.0
127
+ * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
128
+ */var eh=["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])"],Bs=eh.join(","),ta=typeof Element>"u",Me=ta?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,sn=!ta&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t?.ownerDocument},rn=function t(e,n){var s;n===void 0&&(n=!0);var i=e==null||(s=e.getAttribute)===null||s===void 0?void 0:s.call(e,"inert"),o=i===""||i==="true",r=o||n&&e&&t(e.parentNode);return r},nh=function(e){var n,s=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"contenteditable");return s===""||s==="true"},sh=function(e,n,s){if(rn(e))return[];var i=Array.prototype.slice.apply(e.querySelectorAll(Bs));return n&&Me.call(e,Bs)&&i.unshift(e),i=i.filter(s),i},ih=function t(e,n,s){for(var i=[],o=Array.from(e);o.length;){var r=o.shift();if(!rn(r,!1))if(r.tagName==="SLOT"){var a=r.assignedElements(),l=a.length?a:r.children,u=t(l,!0,s);s.flatten?i.push.apply(i,u):i.push({scopeParent:r,candidates:u})}else{var c=Me.call(r,Bs);c&&s.filter(r)&&(n||!e.includes(r))&&i.push(r);var f=r.shadowRoot||typeof s.getShadowRoot=="function"&&s.getShadowRoot(r),d=!rn(f,!1)&&(!s.shadowRootFilter||s.shadowRootFilter(r));if(f&&d){var m=t(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},ea=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},na=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||nh(e))&&!ea(e)?0:e.tabIndex},rh=function(e,n){var s=na(e);return s<0&&n&&!ea(e)?0:s},oh=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},sa=function(e){return e.tagName==="INPUT"},ah=function(e){return sa(e)&&e.type==="hidden"},lh=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(s){return s.tagName==="SUMMARY"});return n},ch=function(e,n){for(var s=0;s<e.length;s++)if(e[s].checked&&e[s].form===n)return e[s]},uh=function(e){if(!e.name)return!0;var n=e.form||sn(e),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(e.name));else try{i=s(e.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=ch(i,e.form);return!o||o===e},fh=function(e){return sa(e)&&e.type==="radio"},dh=function(e){return fh(e)&&!uh(e)},hh=function(e){var n,s=e&&sn(e),i=(n=s)===null||n===void 0?void 0:n.host,o=!1;if(s&&s!==e){var r,a,l;for(o=!!((r=i)!==null&&r!==void 0&&(a=r.ownerDocument)!==null&&a!==void 0&&a.contains(i)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!o&&i;){var u,c,f;s=sn(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},ia=function(e){var n=e.getBoundingClientRect(),s=n.width,i=n.height;return s===0&&i===0},mh=function(e,n){var s=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var o=Me.call(e,"details>summary:first-of-type"),r=o?e.parentElement:e;if(Me.call(r,"details:not([open]) *"))return!0;if(!s||s==="full"||s==="legacy-full"){if(typeof i=="function"){for(var a=e;e;){var l=e.parentElement,u=sn(e);if(l&&!l.shadowRoot&&i(l)===!0)return ia(e);e.assignedSlot?e=e.assignedSlot:!l&&u!==e.ownerDocument?e=u.host:e=l}e=a}if(hh(e))return!e.getClientRects().length;if(s!=="legacy-full")return!0}else if(s==="non-zero-area")return ia(e);return!1},ph=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var n=e.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 Me.call(n,"fieldset[disabled] *")?!0:!i.contains(e)}return!0}n=n.parentElement}return!1},gh=function(e,n){return!(n.disabled||rn(n)||ah(n)||mh(n,e)||lh(n)||ph(n))},ra=function(e,n){return!(dh(n)||na(n)<0||!gh(e,n))},yh=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},vh=function t(e){var n=[],s=[];return e.forEach(function(i,o){var r=!!i.scopeParent,a=r?i.scopeParent:i,l=rh(a,r),u=r?t(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(oh).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(n)},oa=function(e,n){n=n||{};var s;return n.getShadowRoot?s=ih([e],n.includeContainer,{filter:ra.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:yh}):s=sh(e,n.includeContainer,ra.bind(null,n)),vh(s)};function xh(){const t=navigator.userAgentData;return t!=null&&t.platform?t.platform:navigator.platform}function bh(){return/apple/i.test(navigator.vendor)}function wh(t){let e=t.activeElement;for(;((n=e)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;e=e.shadowRoot.activeElement}return e}function Th(t,e){if(!t||!e)return!1;const n=e.getRootNode==null?void 0:e.getRootNode();if(t.contains(e))return!0;if(n&&ks(n)){let s=e;for(;s;){if(t===s)return!0;s=s.parentNode||s.host}}return!1}function _s(t){return t?.ownerDocument||document}var Sh=typeof document<"u",Ph=function(){},jt=Sh?T.useLayoutEffect:Ph;const Ch={...P}.useInsertionEffect||(t=>t());function Eh(t){const e=P.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Ch(()=>{e.current=t}),P.useCallback(function(){for(var n=arguments.length,s=new Array(n),i=0;i<n;i++)s[i]=arguments[i];return e.current==null?void 0:e.current(...s)},[])}const aa=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function la(t,e){const n=oa(t,aa()),s=n.length;if(s===0)return;const i=wh(_s(t)),o=n.indexOf(i),r=o===-1?e===1?0:s-1:o+e;return n[r]}function Ah(t){return la(_s(t).body,1)||t}function Rh(t){return la(_s(t).body,-1)||t}function $s(t,e){const n=e||t.currentTarget,s=t.relatedTarget;return!s||!Th(n,s)}function jh(t){oa(t,aa()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function ca(t){t.querySelectorAll("[data-tabindex]").forEach(n=>{const s=n.dataset.tabindex;delete n.dataset.tabindex,s?n.setAttribute("tabindex",s):n.removeAttribute("tabindex")})}function ua(t,e,n){let{reference:s,floating:i}=t;const o=Fs(e),r=Jd(e),a=qd(r),l=Ls(e),u=o==="y",c=s.x+s.width/2-i.width/2,f=s.y+s.height/2-i.height/2,d=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(Qo(e)){case"start":m[r]-=d*(n&&u?-1:1);break;case"end":m[r]+=d*(n&&u?-1:1);break}return m}const Mh=async(t,e,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(e));let u=await r.getElementRects({reference:t,floating:e,strategy:i}),{x:c,y:f}=ua(u,s,l),d=s,m={},p=0;for(let g=0;g<a.length;g++){const{name:x,fn:y}=a[g],{x:w,y:v,data:E,reset:S}=await y({x:c,y:f,initialPlacement:s,placement:d,strategy:i,middlewareData:m,rects:u,platform:r,elements:{reference:t,floating:e}});c=w??c,f=v??f,m={...m,[x]:{...m[x],...E}},S&&p<=50&&(p++,typeof S=="object"&&(S.placement&&(d=S.placement),S.rects&&(u=S.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:i}):S.rects),{x:c,y:f}=ua(u,d,l)),g=-1)}return{x:c,y:f,placement:d,strategy:i,middlewareData:m}};async function Dh(t,e){var n;e===void 0&&(e={});const{x:s,y:i,platform:o,rects:r,elements:a,strategy:l}=t,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:d=!1,padding:m=0}=Jo(e,t),p=th(m),x=a[d?f==="floating"?"reference":"floating":f],y=nn(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})),w=f==="floating"?{x:s,y:i,width:r.floating.width,height:r.floating.height}:r.reference,v=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),E=await(o.isElement==null?void 0:o.isElement(v))?await(o.getScale==null?void 0:o.getScale(v))||{x:1,y:1}:{x:1,y:1},S=nn(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:v,strategy:l}):w);return{top:(y.top-S.top+p.top)/E.y,bottom:(S.bottom-y.bottom+p.bottom)/E.y,left:(y.left-S.left+p.left)/E.x,right:(S.right-y.right+p.right)/E.x}}const Vh=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,s;const{placement:i,rects:o,platform:r,elements:a}=e,{apply:l=()=>{},...u}=Jo(t,e),c=await Dh(e,u),f=Ls(i),d=Qo(i),m=Fs(i)==="y",{width:p,height:g}=o.floating;let x,y;f==="top"||f==="bottom"?(x=f,y=d===(await(r.isRTL==null?void 0:r.isRTL(a.floating))?"start":"end")?"left":"right"):(y=f,x=d==="end"?"top":"bottom");const w=g-c.top-c.bottom,v=p-c.left-c.right,E=je(g-c[x],w),S=je(p-c[y],v),C=!e.middlewareData.shift;let A=E,R=S;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(R=v),(s=e.middlewareData.shift)!=null&&s.enabled.y&&(A=w),C&&!d){const O=rt(c.left,0),U=rt(c.right,0),et=rt(c.top,0),I=rt(c.bottom,0);m?R=p-2*(O!==0||U!==0?O+U:rt(c.left,c.right)):A=g-2*(et!==0||I!==0?et+I:rt(c.top,c.bottom))}await l({...e,availableWidth:R,availableHeight:A});const N=await r.getDimensions(a.floating);return p!==N.width||g!==N.height?{reset:{rects:!0}}:{}}}};function fa(t){const e=lt(t);let n=parseFloat(e.width)||0,s=parseFloat(e.height)||0;const i=gt(t),o=i?t.offsetWidth:n,r=i?t.offsetHeight:s,a=tn(n)!==o||tn(s)!==r;return a&&(n=o,s=r),{width:n,height:s,$:a}}function Ws(t){return G(t)?t:t.contextElement}function ne(t){const e=Ws(t);if(!gt(e))return yt(1);const n=e.getBoundingClientRect(),{width:s,height:i,$:o}=fa(e);let r=(o?tn(n.width):n.width)/s,a=(o?tn(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}const kh=yt(0);function da(t){const e=tt(t);return!Os()||!e.visualViewport?kh:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Nh(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==tt(t)?!1:e}function _t(t,e,n,s){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),o=Ws(t);let r=yt(1);e&&(s?G(s)&&(r=ne(s)):r=ne(t));const a=Nh(o,n,s)?da(o):yt(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 d=tt(o),m=s&&G(s)?tt(s):s;let p=d,g=Is(p);for(;g&&s&&m!==p;){const x=ne(g),y=g.getBoundingClientRect(),w=lt(g),v=y.left+(g.clientLeft+parseFloat(w.paddingLeft))*x.x,E=y.top+(g.clientTop+parseFloat(w.paddingTop))*x.y;l*=x.x,u*=x.y,c*=x.x,f*=x.y,l+=v,u+=E,p=tt(g),g=Is(p)}}return nn({width:c,height:f,x:l,y:u})}function on(t,e){const n=Qe(t).scrollLeft;return e?e.left+n:_t(pt(t)).left+n}function ha(t,e){const n=t.getBoundingClientRect(),s=n.left+e.scrollLeft-on(t,n),i=n.top+e.scrollTop;return{x:s,y:i}}function Oh(t){let{elements:e,rect:n,offsetParent:s,strategy:i}=t;const o=i==="fixed",r=pt(s),a=e?Je(e.floating):!1;if(s===r||a&&o)return n;let l={scrollLeft:0,scrollTop:0},u=yt(1);const c=yt(0),f=gt(s);if((f||!f&&!o)&&((te(s)!=="body"||Ae(r))&&(l=Qe(s)),gt(s))){const m=_t(s);u=ne(s),c.x=m.x+s.clientLeft,c.y=m.y+s.clientTop}const d=r&&!f&&!o?ha(r,l):yt(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+d.x,y:n.y*u.y-l.scrollTop*u.y+c.y+d.y}}function Ih(t){return Array.from(t.getClientRects())}function Lh(t){const e=pt(t),n=Qe(t),s=t.ownerDocument.body,i=rt(e.scrollWidth,e.clientWidth,s.scrollWidth,s.clientWidth),o=rt(e.scrollHeight,e.clientHeight,s.scrollHeight,s.clientHeight);let r=-n.scrollLeft+on(t);const a=-n.scrollTop;return lt(s).direction==="rtl"&&(r+=rt(e.clientWidth,s.clientWidth)-i),{width:i,height:o,x:r,y:a}}const ma=25;function Fh(t,e){const n=tt(t),s=pt(t),i=n.visualViewport;let o=s.clientWidth,r=s.clientHeight,a=0,l=0;if(i){o=i.width,r=i.height;const c=Os();(!c||c&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}const u=on(s);if(u<=0){const c=s.ownerDocument,f=c.body,d=getComputedStyle(f),m=c.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,p=Math.abs(s.clientWidth-f.clientWidth-m);p<=ma&&(o-=p)}else u<=ma&&(o+=u);return{width:o,height:r,x:a,y:l}}const Bh=new Set(["absolute","fixed"]);function _h(t,e){const n=_t(t,!0,e==="fixed"),s=n.top+t.clientTop,i=n.left+t.clientLeft,o=gt(t)?ne(t):yt(1),r=t.clientWidth*o.x,a=t.clientHeight*o.y,l=i*o.x,u=s*o.y;return{width:r,height:a,x:l,y:u}}function pa(t,e,n){let s;if(e==="viewport")s=Fh(t,n);else if(e==="document")s=Lh(pt(t));else if(G(e))s=_h(e,n);else{const i=da(t);s={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return nn(s)}function ga(t,e){const n=Rt(t);return n===e||!G(n)||ee(n)?!1:lt(n).position==="fixed"||ga(n,e)}function $h(t,e){const n=e.get(t);if(n)return n;let s=Re(t,[],!1).filter(a=>G(a)&&te(a)!=="body"),i=null;const o=lt(t).position==="fixed";let r=o?Rt(t):t;for(;G(r)&&!ee(r);){const a=lt(r),l=Ns(r);!l&&a.position==="fixed"&&(i=null),(o?!l&&!i:!l&&a.position==="static"&&!!i&&Bh.has(i.position)||Ae(r)&&!l&&ga(t,r))?s=s.filter(c=>c!==r):i=a,r=Rt(r)}return e.set(t,s),s}function Wh(t){let{element:e,boundary:n,rootBoundary:s,strategy:i}=t;const r=[...n==="clippingAncestors"?Je(e)?[]:$h(e,this._c):[].concat(n),s],a=r[0],l=r.reduce((u,c)=>{const f=pa(e,c,i);return u.top=rt(f.top,u.top),u.right=je(f.right,u.right),u.bottom=je(f.bottom,u.bottom),u.left=rt(f.left,u.left),u},pa(e,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Uh(t){const{width:e,height:n}=fa(t);return{width:e,height:n}}function zh(t,e,n){const s=gt(e),i=pt(e),o=n==="fixed",r=_t(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const l=yt(0);function u(){l.x=on(i)}if(s||!s&&!o)if((te(e)!=="body"||Ae(i))&&(a=Qe(e)),s){const m=_t(e,!0,o,e);l.x=m.x+e.clientLeft,l.y=m.y+e.clientTop}else i&&u();o&&!s&&i&&u();const c=i&&!s&&!o?ha(i,a):yt(0),f=r.left+a.scrollLeft-l.x-c.x,d=r.top+a.scrollTop-l.y-c.y;return{x:f,y:d,width:r.width,height:r.height}}function Us(t){return lt(t).position==="static"}function ya(t,e){if(!gt(t)||lt(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return pt(t)===n&&(n=n.ownerDocument.body),n}function va(t,e){const n=tt(t);if(Je(t))return n;if(!gt(t)){let i=Rt(t);for(;i&&!ee(i);){if(G(i)&&!Us(i))return i;i=Rt(i)}return n}let s=ya(t,e);for(;s&&Wd(s)&&Us(s);)s=ya(s,e);return s&&ee(s)&&Us(s)&&!Ns(s)?n:s||Hd(t)||n}const Kh=async function(t){const e=this.getOffsetParent||va,n=this.getDimensions,s=await n(t.floating);return{reference:zh(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function Yh(t){return lt(t).direction==="rtl"}const Hh={convertOffsetParentRelativeRectToViewportRelativeRect:Oh,getDocumentElement:pt,getClippingRect:Wh,getOffsetParent:va,getElementRects:Kh,getClientRects:Ih,getDimensions:Uh,getScale:ne,isElement:G,isRTL:Yh};function xa(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Gh(t,e){let n=null,s;const i=pt(t);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=t.getBoundingClientRect(),{left:c,top:f,width:d,height:m}=u;if(a||e(),!d||!m)return;const p=en(f),g=en(i.clientWidth-(c+d)),x=en(i.clientHeight-(f+m)),y=en(c),v={rootMargin:-p+"px "+-g+"px "+-x+"px "+-y+"px",threshold:rt(0,je(1,l))||1};let E=!0;function S(C){const A=C[0].intersectionRatio;if(A!==l){if(!E)return r();A?r(!1,A):s=setTimeout(()=>{r(!1,1e-7)},1e3)}A===1&&!xa(u,t.getBoundingClientRect())&&r(),E=!1}try{n=new IntersectionObserver(S,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(S,v)}n.observe(t)}return r(!0),o}function Xh(t,e,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=Ws(t),c=i||o?[...u?Re(u):[],...Re(e)]:[];c.forEach(y=>{i&&y.addEventListener("scroll",n,{passive:!0}),o&&y.addEventListener("resize",n)});const f=u&&a?Gh(u,n):null;let d=-1,m=null;r&&(m=new ResizeObserver(y=>{let[w]=y;w&&w.target===u&&m&&(m.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var v;(v=m)==null||v.observe(e)})),n()}),u&&!l&&m.observe(u),m.observe(e));let p,g=l?_t(t):null;l&&x();function x(){const y=_t(t);g&&!xa(g,y)&&n(),g=y,p=requestAnimationFrame(x)}return n(),()=>{var y;c.forEach(w=>{i&&w.removeEventListener("scroll",n),o&&w.removeEventListener("resize",n)}),f?.(),(y=m)==null||y.disconnect(),m=null,l&&cancelAnimationFrame(p)}}const qh=Vh,Zh=(t,e,n)=>{const s=new Map,i={platform:Hh,...n},o={...i.platform,_c:s};return Mh(t,e,{...i,platform:o})};var Jh=typeof document<"u",Qh=function(){},an=Jh?T.useLayoutEffect:Qh;function ln(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,s,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(s=n;s--!==0;)if(!ln(t[s],e[s]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(s=n;s--!==0;)if(!{}.hasOwnProperty.call(e,i[s]))return!1;for(s=n;s--!==0;){const o=i[s];if(!(o==="_owner"&&t.$$typeof)&&!ln(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}function ba(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function wa(t,e){const n=ba(t);return Math.round(e*n)/n}function zs(t){const e=P.useRef(t);return an(()=>{e.current=t}),e}function tm(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:s=[],platform:i,elements:{reference:o,floating:r}={},transform:a=!0,whileElementsMounted:l,open:u}=t,[c,f]=P.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[d,m]=P.useState(s);ln(d,s)||m(s);const[p,g]=P.useState(null),[x,y]=P.useState(null),w=P.useCallback(k=>{k!==C.current&&(C.current=k,g(k))},[]),v=P.useCallback(k=>{k!==A.current&&(A.current=k,y(k))},[]),E=o||p,S=r||x,C=P.useRef(null),A=P.useRef(null),R=P.useRef(c),N=l!=null,O=zs(l),U=zs(i),et=zs(u),I=P.useCallback(()=>{if(!C.current||!A.current)return;const k={placement:e,strategy:n,middleware:d};U.current&&(k.platform=U.current),Zh(C.current,A.current,k).then(J=>{const b={...J,isPositioned:et.current!==!1};K.current&&!ln(R.current,b)&&(R.current=b,Zs.flushSync(()=>{f(b)}))})},[d,e,n,U,et]);an(()=>{u===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,f(k=>({...k,isPositioned:!1})))},[u]);const K=P.useRef(!1);an(()=>(K.current=!0,()=>{K.current=!1}),[]),an(()=>{if(E&&(C.current=E),S&&(A.current=S),E&&S){if(O.current)return O.current(E,S,I);I()}},[E,S,I,O,N]);const vt=P.useMemo(()=>({reference:C,floating:A,setReference:w,setFloating:v}),[w,v]),ct=P.useMemo(()=>({reference:E,floating:S}),[E,S]),_=P.useMemo(()=>{const k={position:n,left:0,top:0};if(!ct.floating)return k;const J=wa(ct.floating,c.x),b=wa(ct.floating,c.y);return a?{...k,transform:"translate("+J+"px, "+b+"px)",...ba(ct.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:J,top:b}},[n,a,ct.floating,c.x,c.y]);return P.useMemo(()=>({...c,update:I,refs:vt,elements:ct,floatingStyles:_}),[c,I,vt,ct,_])}const em=(t,e)=>({...qh(t),options:[t,e]}),nm={...P};let Ta=!1,sm=0;const Sa=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+sm++;function im(){const[t,e]=P.useState(()=>Ta?Sa():void 0);return jt(()=>{t==null&&e(Sa())},[]),P.useEffect(()=>{Ta=!0},[]),t}const Pa=nm.useId||im;let Ks;process.env.NODE_ENV!=="production"&&(Ks=new Set);function rm(){for(var t,e=arguments.length,n=new Array(e),s=0;s<e;s++)n[s]=arguments[s];const i="Floating UI: "+n.join(" ");if(!((t=Ks)!=null&&t.has(i))){var o;(o=Ks)==null||o.add(i),console.error(i)}}function om(){const t=new Map;return{emit(e,n){var s;(s=t.get(e))==null||s.forEach(i=>i(n))},on(e,n){t.has(e)||t.set(e,new Set),t.get(e).add(n)},off(e,n){var s;(s=t.get(e))==null||s.delete(n)}}}const am=P.createContext(null),lm=P.createContext(null),cm=()=>{var t;return((t=P.useContext(am))==null?void 0:t.id)||null},um=()=>P.useContext(lm);function Ca(t){return"data-floating-ui-"+t}const Ea={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},Aa=P.forwardRef(function(e,n){const[s,i]=P.useState();jt(()=>{bh()&&i("button")},[]);const o={ref:n,tabIndex:0,role:s,"aria-hidden":s?void 0:!0,[Ca("focus-guard")]:"",style:Ea};return h.jsx("span",{...e,...o})}),Ra=P.createContext(null),ja=Ca("portal");function fm(t){t===void 0&&(t={});const{id:e,root:n}=t,s=Pa(),i=dm(),[o,r]=P.useState(null),a=P.useRef(null);return jt(()=>()=>{o?.remove(),queueMicrotask(()=>{a.current=null})},[o]),jt(()=>{if(!s||a.current)return;const l=e?document.getElementById(e):null;if(!l)return;const u=document.createElement("div");u.id=s,u.setAttribute(ja,""),l.appendChild(u),a.current=u,r(u)},[e,s]),jt(()=>{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;e&&(u=document.createElement("div"),u.id=e,l.appendChild(u));const c=document.createElement("div");c.id=s,c.setAttribute(ja,""),l=u||l,l.appendChild(c),a.current=c,r(c)},[e,n,s,i]),o}function Ma(t){const{children:e,id:n,root:s,preserveTabOrder:i=!0}=t,o=fm({id:n,root:s}),[r,a]=P.useState(null),l=P.useRef(null),u=P.useRef(null),c=P.useRef(null),f=P.useRef(null),d=r?.modal,m=r?.open,p=!!r&&!r.modal&&r.open&&i&&!!(s||o);return P.useEffect(()=>{if(!o||!i||d)return;function g(x){o&&$s(x)&&(x.type==="focusin"?ca:jh)(o)}return o.addEventListener("focusin",g,!0),o.addEventListener("focusout",g,!0),()=>{o.removeEventListener("focusin",g,!0),o.removeEventListener("focusout",g,!0)}},[o,i,d]),P.useEffect(()=>{o&&(m||ca(o))},[m,o]),h.jsxs(Ra.Provider,{value:P.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:l,afterOutsideRef:u,beforeInsideRef:c,afterInsideRef:f,portalNode:o,setFocusManagerState:a}),[i,o]),children:[p&&o&&h.jsx(Aa,{"data-type":"outside",ref:l,onFocus:g=>{if($s(g,o)){var x;(x=c.current)==null||x.focus()}else{const y=r?r.domReference:null,w=Rh(y);w?.focus()}}}),p&&o&&h.jsx("span",{"aria-owns":o.id,style:Ea}),o&&Zs.createPortal(e,o),p&&o&&h.jsx(Aa,{"data-type":"outside",ref:u,onFocus:g=>{if($s(g,o)){var x;(x=f.current)==null||x.focus()}else{const y=r?r.domReference:null,w=Ah(y);w?.focus(),r?.closeOnFocusOut&&r?.onOpenChange(!1,g.nativeEvent,"focus-out")}}})]})}const dm=()=>P.useContext(Ra);let cn=0;const Da="--floating-ui-scrollbar-width";function hm(){const t=xh(),e=/iP(hone|ad|od)|iOS/.test(t)||t==="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(Da,o+"px"),o&&(n[i]=o+"px"),e){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(Da),e&&(Object.assign(n,{position:"",top:"",left:"",right:""}),window.scrollTo(r,a))}}let Va=()=>{};const ka=P.forwardRef(function(e,n){const{lockScroll:s=!1,...i}=e;return jt(()=>{if(s)return cn++,cn===1&&(Va=hm()),()=>{cn--,cn===0&&Va()}},[s]),h.jsx("div",{ref:n,...i,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...i.style}})});function mm(t){const{open:e=!1,onOpenChange:n,elements:s}=t,i=Pa(),o=P.useRef({}),[r]=P.useState(()=>om()),a=cm()!=null;if(process.env.NODE_ENV!=="production"){const m=s.reference;m&&!G(m)&&rm("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]=P.useState(s.reference),c=Eh((m,p,g)=>{o.current.openEvent=m?p:void 0,r.emit("openchange",{open:m,event:p,reason:g,nested:a}),n?.(m,p,g)}),f=P.useMemo(()=>({setPositionReference:u}),[]),d=P.useMemo(()=>({reference:l||s.reference||null,floating:s.floating||null,domReference:s.reference}),[l,s.reference,s.floating]);return P.useMemo(()=>({dataRef:o,open:e,onOpenChange:c,elements:d,events:r,floatingId:i,refs:f}),[e,c,d,r,i,f])}function pm(t){t===void 0&&(t={});const{nodeId:e}=t,n=mm({...t,elements:{reference:null,floating:null,...t.elements}}),s=t.rootContext||n,i=s.elements,[o,r]=P.useState(null),[a,l]=P.useState(null),c=i?.domReference||o,f=P.useRef(null),d=um();jt(()=>{c&&(f.current=c)},[c]);const m=tm({...t,elements:{...i,...a&&{reference:a}}}),p=P.useCallback(v=>{const E=G(v)?{getBoundingClientRect:()=>v.getBoundingClientRect(),getClientRects:()=>v.getClientRects(),contextElement:v}:v;l(E),m.refs.setReference(E)},[m.refs]),g=P.useCallback(v=>{(G(v)||v===null)&&(f.current=v,r(v)),(G(m.refs.reference.current)||m.refs.reference.current===null||v!==null&&!G(v))&&m.refs.setReference(v)},[m.refs]),x=P.useMemo(()=>({...m.refs,setReference:g,setPositionReference:p,domReference:f}),[m.refs,g,p]),y=P.useMemo(()=>({...m.elements,domReference:c}),[m.elements,c]),w=P.useMemo(()=>({...m,...s,refs:x,elements:y,nodeId:e}),[m,x,y,e,s]);return jt(()=>{s.dataRef.current.floatingContext=w;const v=d?.nodesRef.current.find(E=>E.id===e);v&&(v.context=w)}),P.useMemo(()=>({...m,context:w,refs:x,elements:y}),[m,x,y,w])}const gm={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"},Na=P.memo(({open:t,children:e,className:n,onOutsideClick:s,floatingStyles:i,setFloating:o,placement:r})=>h.jsx(Ma,{children:h.jsx(ss,{children:t&&h.jsxs(h.Fragment,{children:[s&&h.jsx(ka,{onClick:s}),h.jsx("div",{ref:o,style:i,className:"z-10",children:h.jsx(Pe.div,{className:n,style:{transformOrigin:gm[r]},initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.1,ease:"easeInOut"},children:e})})]})})})),se=t=>{const{placement:e="bottom",onOutsideClick:n,fullWidth:s,minWidth:i,maxWidth:o}=t,r=P.useMemo(()=>[em({apply({rects:f,elements:d}){s&&(d.floating.style.width=`${f.reference.width}px`),i&&(d.floating.style.minWidth=`${i}px`),o&&(d.floating.style.maxWidth=`${o}px`)}})],[s,o,i]),{refs:a,floatingStyles:l}=pm({placement:e,middleware:r,whileElementsMounted:Xh}),u=P.useRef({onOutsideClick:n,floatingStyles:l,setFloating:a.setFloating,placement:e});u.current={onOutsideClick:n,floatingStyles:l,setFloating:a.setFloating,placement:e};const c=P.useMemo(()=>{const f=d=>{const{floatingStyles:m,setFloating:p,onOutsideClick:g,placement:x}=u.current,{className:y,open:w,children:v}=d;return h.jsx(Na,{open:w,className:y,onOutsideClick:g,floatingStyles:m,setFloating:p,placement:x,children:v})};return P.memo(f)},[]);return{anchorRef:a.setReference,Popover:c}},ym="flex flex-col bg-white border mt-1 border-gray-200 rounded-xl shadow-lg p-3 overflow-y-auto relative",ie=t=>{const{className:e,children:n,...s}=t;return h.jsx("div",{className:V(ym,e),...s,children:n})},un=(t,e)=>{T.useEffect(()=>{if(!t)return;const n=s=>{s.key==="Escape"&&e()};return document.addEventListener("keydown",n),()=>{document.removeEventListener("keydown",n)}},[t,e])},Oa=t=>{const{className:e,label:n,description:s,options:i,onChange:o,value:r,placeholder:a,maxHeight:l=300,error:u}=t,[c,f]=T.useState(!1),d=P.useRef(null),m=i?.find(x=>x.value===r);un(c,()=>f(!1)),T.useEffect(()=>{c&&d.current?.focus({preventScroll:!0})},[c]);const{anchorRef:p,Popover:g}=se({placement:"bottom",fullWidth:!0,onOutsideClick:()=>f(!1)});return h.jsxs("div",{className:V("flex flex-col",e),children:[h.jsx(Lt,{children:n}),h.jsxs("div",{className:"relative flex w-full flex-col",ref:p,children:[h.jsxs("div",{ref:d,role:"button",tabIndex:0,className:V("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(y=>!y),onClick:()=>f(!c),children:[m&&h.jsx("span",{children:m.label}),!m&&a&&h.jsx("span",{className:"text-gray-500",children:a})]}),h.jsxs(Bt,{children:[u&&h.jsx(Ft,{}),!!r&&h.jsx(St,{Icon:Ce,onClick:()=>o(null)}),h.jsx(St,{Icon:qe})]}),h.jsx(g,{open:c,children:h.jsx(ie,{className:"!p-0",style:{maxHeight:l},children:h.jsx("div",{className:"flex flex-col p-2 gap-1",children:i.map(x=>{const y=x.value===r;return h.jsx(Ee,{onClick:()=>{!x.disabled&&o&&(o(x.value),f(!1))},selected:y,disabled:x.disabled,children:x.label},String(x.value))})})})})]}),h.jsx(ht,{children:s}),h.jsx(mt,{children:u})]})},vm=t=>{const{className:e,label:n,description:s,options:i,onChange:o,onSearch:r,value:a,placeholder:l,maxHeight:u=300,error:c}=t,[f,d]=T.useState(!1),[m,p]=T.useState(i),[g,x]=T.useState(""),y=P.useRef(null),w=P.useRef(null),v=i?.find(C=>C.value===a);un(f,()=>d(!1)),T.useEffect(()=>{p(r(g))},[g,i,r]),T.useEffect(()=>{f&&w.current?.focus()},[f]);const{anchorRef:E,Popover:S}=se({placement:"bottom",fullWidth:!0,onOutsideClick:()=>d(!1)});return h.jsxs("div",{className:V("flex flex-col",e),children:[h.jsx(Lt,{children:n}),h.jsxs("div",{className:"relative flex w-full flex-col",ref:E,children:[h.jsxs("div",{ref:y,role:"button",tabIndex:0,className:V("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:C=>C.key===" "&&d(A=>!A),onClick:()=>d(!f),children:[v&&h.jsx("span",{children:v.label}),!v&&l&&h.jsx("span",{className:"text-gray-500",children:l})]}),h.jsxs(Bt,{children:[c&&h.jsx(Ft,{}),!!a&&h.jsx(St,{Icon:Ce,onClick:()=>o(null)}),h.jsx(St,{Icon:qe})]}),h.jsx(S,{open:f,children:h.jsxs(ie,{className:"gap-0 !p-0",style:{maxHeight:u},children:[h.jsxs("div",{className:"sticky top-0 border-b border-b-gray-200 py-1 bg-white/50 backdrop-blur-sm",children:[h.jsx("input",{ref:w,type:"text",placeholder:"Search",value:g,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:C=>x(C.target.value)}),h.jsx(Ms,{className:"absolute text-gray-500 left-4 top-4 h-4 w-4"})]}),h.jsxs("div",{className:"flex flex-col gap-1 p-2",children:[g!==""&&h.jsxs(h.Fragment,{children:[m.length===0&&h.jsx("div",{className:"flex flex-col items-center justify-center py-6",children:h.jsx(qo,{className:"h-6 w-6 text-gray-900"})}),m.map(C=>{const A=C.value===a;return h.jsx(Ee,{onClick:()=>{!C.disabled&&o&&(o(C.value),d(!1))},selected:A,disabled:C.disabled,children:C.label},String(C.value))})]}),g===""&&h.jsx(h.Fragment,{children:i.map(C=>{const A=C.value===a;return h.jsx(Ee,{onClick:()=>{!C.disabled&&o&&(o(C.value),d(!1))},selected:A,disabled:C.disabled,children:C.label},String(C.value))})})]})]})})]}),h.jsx(ht,{children:s}),h.jsx(mt,{children:c})]})},xm=(t,e)=>{const[n,s]=T.useState(t);return T.useEffect(()=>{const i=setTimeout(()=>{s(t)},e);return()=>{clearTimeout(i)}},[t,e]),n},bm=t=>{const{className:e,label:n,description:s,onChange:i,fetchOptionsByQuery:o,fetchOptionByValue:r,onSearchDebounceMs:a=300,value:l,placeholder:u,maxHeight:c=300,error:f}=t,[d,m]=T.useState(!1),p=P.useRef(null),[g,x]=T.useState(""),[y,w]=T.useState([]),[v,E]=T.useState(null),S=P.useRef(null),[C,A]=T.useState(!1),[R,N]=T.useState(!1);un(d,()=>m(!1));const O=xm(g,a);T.useEffect(()=>{(async()=>{A(!0);const K=await o(O);w(K),A(!1)})()},[O,o]),T.useEffect(()=>{if(l==null){E(null);return}const I=y?.find(K=>K.value===l);I?E(I):(async()=>{N(!0);const vt=await r(l);E(vt),N(!1)})()},[r,y,l]),T.useEffect(()=>{d&&S.current?.focus()},[d]);const{anchorRef:U,Popover:et}=se({placement:"bottom",fullWidth:!0,onOutsideClick:()=>m(!1)});return h.jsxs("div",{className:V("flex flex-col",e),children:[h.jsx(Lt,{children:n}),h.jsxs("div",{className:"relative flex w-full flex-col",ref:U,children:[h.jsxs("div",{ref:p,role:"button",tabIndex:0,className:V("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",d&&"ring-4"),onKeyDown:I=>I.key===" "&&m(K=>!K),onClick:()=>m(!d),children:[!R&&v&&h.jsx("span",{children:v.label}),!R&&!v&&u&&h.jsx("span",{children:u}),R&&h.jsx(Xe,{className:"h-4 w-4 text-gray-600"})]}),h.jsxs(Bt,{children:[f&&h.jsx(Ft,{}),!!l&&h.jsx(St,{Icon:Ce,onClick:()=>i(null)}),h.jsx(St,{Icon:qe})]}),h.jsx(et,{open:d,children:h.jsxs(ie,{className:"gap-0 !p-0",style:{maxHeight:c},children:[h.jsxs("div",{className:"sticky top-0 border-b border-b-gray-200 py-1 bg-white/50 backdrop-blur-sm",children:[h.jsx("input",{ref:S,type:"text",placeholder:"Search",value:g,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:I=>x(I.target.value)}),h.jsx(Ms,{className:"absolute text-gray-500 left-4 top-4 h-4 w-4"})]}),h.jsxs("div",{className:"flex flex-col gap-1 p-2",children:[!C&&y.length===0&&h.jsx("div",{className:"flex flex-col items-center justify-center py-6",children:h.jsx(qo,{className:"h-6 w-6 text-gray-900"})}),C&&h.jsx("div",{className:"flex flex-col items-center justify-center py-6",children:h.jsx(Xe,{className:"h-6 w-6 text-gray-900"})}),!C&&h.jsx(h.Fragment,{children:y.map(I=>{const K=I.value===l;return h.jsx(Ee,{onClick:()=>{!I.disabled&&i&&(i(I.value),m(!1))},selected:K,disabled:I.disabled,children:I.label},String(I.value))})})]})]})})]}),h.jsx(ht,{children:s}),h.jsx(mt,{children:f})]})},wm=P.forwardRef((t,e)=>{const{className:n,children:s,...i}=t;return h.jsx("div",{ref:e,className:V("flex flex-col gap-6 border border-gray-200 rounded-xl bg-white shadow-sm px-6 py-6",n),...i,children:s})}),Tm=t=>{const{className:e,vertical:n=!1,...s}=t;return h.jsx("div",{className:V(n?"w-px h-full bg-gray-200":"w-full h-px bg-gray-200",e),...s})},Sm=t=>{const{children:e,content:n,className:s,placement:i="top",minWidth:o=100,maxWidth:r=200}=t,[a,l]=T.useState(!1),{anchorRef:u,Popover:c}=se({placement:i,minWidth:o,maxWidth:r});return h.jsxs("span",{ref:u,className:s,onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:[e,h.jsx(c,{open:a,children:h.jsx(ie,{children:n})})]})},Pm=t=>{const{open:e,onDismiss:n,enableDismissOnOutsideClick:s,enableDismissOnEscKey:i,enableDismissButton:o,className:r,children:a,maxWidth:l=600}=t;return un(!!i&&e,n||(()=>{})),h.jsx(ss,{children:e&&h.jsxs(Ma,{children:[h.jsx(Pe.div,{style:{transformOrigin:"center"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15,ease:"easeInOut"},children:h.jsx(ka,{className:"bg-gray-400/30 backdrop-blur-[1px] z-10",onClick:s?n:void 0,lockScroll:!0})}),h.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:h.jsxs(Pe.div,{className:V("flex flex-col bg-white rounded-xl 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&&h.jsx(Xo,{Icon:Ce,className:"absolute top-4 right-4",variant:"transparent",size:"sm",onClick:n}),a]})})]})})},Ia={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=P.forwardRef((t,e)=>{const{className:n,children:s,onClick:i,showCloseIcon:o,Icon:r,color:a="gray"}=t,l=V("inline-flex align-top items-center gap-2 px-3 h-7 rounded-lg font-semibold",Ia[a],n);return i?h.jsx("div",{ref:e,children:h.jsxs("button",{className:V("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&&h.jsx(r,{className:"h-4 w-4 shrink-0"}),h.jsx("div",{className:"break-all line-clamp-1 text-left",children:s}),o&&h.jsx(Ce,{className:"h-4 w-4 shrink-0"})]})}):h.jsxs("div",{className:l,ref:e,children:[r&&h.jsx(r,{className:"h-4 w-4 shrink-0"}),h.jsx("div",{className:"break-all line-clamp-1 text-left",children:s})]})}),Cm=t=>{const{className:e,tabs:n}=t;return h.jsx("div",{className:V("h-12 bg-gray-100 p-1 rounded-xl inline-flex flex-row space-x-1 overflow-x-auto",e),children:n.map((s,i)=>{const o=V("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?h.jsx("a",{href:s.href,className:o,children:s.label},i):h.jsx("button",{className:o,onClick:s.onClick,children:s.label},i)})})},Em="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",fn=P.forwardRef((t,e)=>{const{className:n,children:s,Icon:i,...o}=t;return h.jsxs("button",{ref:e,className:V(Em,n),...o,children:[i&&h.jsx(i,{className:"h-5 w-5"}),s]})}),Am=t=>{const{columns:e,rows:n}=t;return h.jsx("div",{className:"border border-gray-200 rounded-xl shadow-sm overflow-hidden",children:h.jsxs("table",{className:"table-fixed",children:[h.jsx("colgroup",{children:e.map(s=>h.jsx("col",{width:250},s.id))}),h.jsx("thead",{children:h.jsx("tr",{className:"divide-gray-200 divide-x text-left bg-gray-50 text-gray-400 border-b border-b-gray-200",children:e.map(s=>h.jsx("th",{className:"font-medium h-[3rem] relative hover:bg-gray-100 cursor-pointer active:bg-gray-200 transition-colors duration-150",children:h.jsx("div",{className:"absolute inset-0",children:h.jsx("div",{className:"flex items-center h-full w-full px-4",children:s.header})})},s.id))})}),h.jsx("tbody",{className:"divide-y divide-gray-200",children:n.map((s,i)=>h.jsx("tr",{className:"divide-gray-200 divide-x",children:e.map(o=>h.jsx("td",{className:"h-[3rem] relative",children:h.jsx("div",{className:"absolute inset-0 ",children:h.jsx("div",{className:"flex items-center h-full w-full px-4",children:o.renderCell(s)})})},o.id))},i))})]})})},Rm=[{id:1,email:"matthiaskrijgsman@gmail.com",firstname:"Matthias",lastname:"Krijgsman",status:"active"},{id:2,email:"dennis@snijder.io",firstname:"Dennis",lastname:"Snijder",status:"inactive"},{id:3,email:"arcokrijgsman@gmail.com",firstname:"Arco",lastname:"Krijgsman",status:"active"}],jm=[{id:"id",header:"ID",renderCell:t=>t.id},{id:"email",header:"Email",renderCell:t=>h.jsx(Ys,{Icon:kd,onClick:()=>{},children:t.email})},{id:"firstname",header:"First Name",renderCell:t=>t.firstname},{id:"lastname",header:"Last Name",renderCell:t=>t.lastname},{id:"status",header:"Status",renderCell:()=>h.jsx(Dm,{})}],Mm=()=>h.jsxs("div",{className:"flex flex-col gap-6",children:[h.jsxs("div",{className:"flex flex-row items-center justify-start gap-3",children:[h.jsx(Ds,{Icon:Ms,placeholder:"Search..."}),h.jsx(Go,{Icon:Dd})]}),h.jsx(Am,{columns:jm,rows:Rm}),h.jsx(Oa,{options:[{label:"Option 1",value:1},{label:"Option 2",value:2},{label:"Option 3",value:3}],value:null,onChange:()=>{}})]}),Dm=()=>{const[t,e]=T.useState(!1),{Popover:n,anchorRef:s}=se({fullWidth:!0,onOutsideClick:()=>e(!1),minWidth:150});return h.jsxs(h.Fragment,{children:[h.jsx(Ys,{onClick:()=>e(!0),ref:s,children:"Test"}),h.jsx(n,{open:t,children:h.jsxs(ie,{children:[h.jsx(fn,{children:"Option 1"}),h.jsx(fn,{children:"Option 2"}),h.jsx(fn,{children:"Option 3"})]})})]})};M.Badge=Ys,M.BadgeColor=Ia,M.Button=bd,M.ButtonIconRound=Xo,M.ButtonIconSquare=Go,M.Divider=Tm,M.Input=Ds,M.InputCheck=Fd,M.InputDescription=ht,M.InputError=mt,M.InputErrorIcon=Ft,M.InputIconButton=St,M.InputIconButtonTray=Bt,M.InputLabel=Lt,M.InputPassword=Nd,M.InputRadio=Id,M.InputSelect=Oa,M.InputSelectNative=Bd,M.InputSelectOption=Ee,M.InputSelectSearchable=vm,M.InputSelectSearchableAsync=bm,M.InputTextArea=Od,M.InputToggle=Ld,M.Modal=Pm,M.Panel=wm,M.PopoverBase=Na,M.PopoverButton=fn,M.PopoverPanel=ie,M.Spinner=Xe,M.TabButtons=Cm,M.Test=Mm,M.Tooltip=Sm,M.usePopover=se,Object.defineProperty(M,Symbol.toStringTag,{value:"Module"})}));
114
129
  //# sourceMappingURL=index.umd.cjs.map