@matthiaskrijgsman/mat-ui 0.0.0
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.
- package/README.md +69 -0
- package/dist/Badge.d.ts +12 -0
- package/dist/BadgeColors.d.ts +27 -0
- package/dist/Button.d.ts +15 -0
- package/dist/ButtonIconRound.d.ts +16 -0
- package/dist/ButtonIconSquare.d.ts +16 -0
- package/dist/Divider.d.ts +5 -0
- package/dist/Input.d.ts +10 -0
- package/dist/InputCheck.d.ts +8 -0
- package/dist/InputDescription.d.ts +5 -0
- package/dist/InputError.d.ts +5 -0
- package/dist/InputErrorIcon.d.ts +1 -0
- package/dist/InputIconButton.d.ts +6 -0
- package/dist/InputIconButtonTray.d.ts +6 -0
- package/dist/InputLabel.d.ts +5 -0
- package/dist/InputPassword.d.ts +5 -0
- package/dist/InputRadio.d.ts +8 -0
- package/dist/InputSelect.d.ts +20 -0
- package/dist/InputSelectNative.d.ts +13 -0
- package/dist/InputSelectOption.d.ts +9 -0
- package/dist/InputSelectSearchable.d.ts +21 -0
- package/dist/InputSelectSearchableAsync.d.ts +22 -0
- package/dist/InputTextArea.d.ts +7 -0
- package/dist/InputToggle.d.ts +7 -0
- package/dist/Modal.d.ts +10 -0
- package/dist/Panel.d.ts +7 -0
- package/dist/ScrollArea.d.ts +5 -0
- package/dist/TabButtons.d.ts +14 -0
- package/dist/Test.d.ts +1 -0
- package/dist/Tooltip.d.ts +11 -0
- package/dist/hooks/use-debounce.d.ts +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/mat-ui.js +6700 -0
- package/dist/mat-ui.js.map +1 -0
- package/dist/mat-ui.umd.cjs +80 -0
- package/dist/mat-ui.umd.cjs.map +1 -0
- package/dist/popover/PopoverBase.d.ts +4 -0
- package/dist/popover/PopoverButton.d.ts +12 -0
- package/dist/popover/PopoverPanel.d.ts +6 -0
- package/dist/popover/use-popover.d.ts +25 -0
- package/dist/spinner/Spinner.d.ts +5 -0
- package/dist/table/Table.d.ts +11 -0
- package/dist/util/classnames.util.d.ts +1 -0
- package/package.json +73 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
(function(W,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):(W=typeof globalThis<"u"?globalThis:W||self,S(W.MatUI={},W.React,W.ReactDOM))})(this,(function(W,S,Yo){"use strict";function As(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 C=As(S),Xo=As(Yo);var pe={exports:{}},Gt={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Es;function Go(){if(Es)return Gt;Es=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 Gt.Fragment=e,Gt.jsx=n,Gt.jsxs=n,Gt}var qt={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.development.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Vs;function qo(){return Vs||(Vs=1,process.env.NODE_ENV!=="production"&&(function(){function t(p){if(p==null)return null;if(typeof p=="function")return p.$$typeof===L?null:p.displayName||p.name||null;if(typeof p=="string")return p;switch(p){case y:return"Fragment";case v:return"Profiler";case x:return"StrictMode";case T:return"Suspense";case V:return"SuspenseList";case k:return"Activity"}if(typeof p=="object")switch(typeof p.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),p.$$typeof){case m:return"Portal";case g:return(p.displayName||"Context")+".Provider";case w:return(p._context.displayName||"Context")+".Consumer";case P:var M=p.render;return p=p.displayName,p||(p=M.displayName||M.name||"",p=p!==""?"ForwardRef("+p+")":"ForwardRef"),p;case R:return M=p.displayName||null,M!==null?M:t(p.type)||"Memo";case A:M=p._payload,p=p._init;try{return t(p(M))}catch{}}return null}function e(p){return""+p}function n(p){try{e(p);var M=!1}catch{M=!0}if(M){M=console;var F=M.error,Y=typeof Symbol=="function"&&Symbol.toStringTag&&p[Symbol.toStringTag]||p.constructor.name||"Object";return F.call(M,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",Y),e(p)}}function s(p){if(p===y)return"<>";if(typeof p=="object"&&p!==null&&p.$$typeof===A)return"<...>";try{var M=t(p);return M?"<"+M+">":"<...>"}catch{return"<...>"}}function i(){var p=$.A;return p===null?null:p.getOwner()}function o(){return Error("react-stack-top-frame")}function r(p){if(at.call(p,"key")){var M=Object.getOwnPropertyDescriptor(p,"key").get;if(M&&M.isReactWarning)return!1}return p.key!==void 0}function a(p,M){function F(){Pt||(Pt=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",M))}F.isReactWarning=!0,Object.defineProperty(p,"key",{get:F,configurable:!0})}function l(){var p=t(this.type);return lt[p]||(lt[p]=!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.")),p=this.props.ref,p!==void 0?p:null}function u(p,M,F,Y,Ct,mt,Ss,Ps){return F=mt.ref,p={$$typeof:d,type:p,key:M,props:mt,_owner:Ct},(F!==void 0?F:null)!==null?Object.defineProperty(p,"ref",{enumerable:!1,get:l}):Object.defineProperty(p,"ref",{enumerable:!1,value:null}),p._store={},Object.defineProperty(p._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(p,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(p,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Ss}),Object.defineProperty(p,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Ps}),Object.freeze&&(Object.freeze(p.props),Object.freeze(p)),p}function c(p,M,F,Y,Ct,mt,Ss,Ps){var X=M.children;if(X!==void 0)if(Y)if(nt(X)){for(Y=0;Y<X.length;Y++)f(X[Y]);Object.freeze&&Object.freeze(X)}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(X);if(at.call(M,"key")){X=t(p);var Xt=Object.keys(M).filter(function(ud){return ud!=="key"});Y=0<Xt.length?"{key: someKey, "+Xt.join(": ..., ")+": ...}":"{key: someKey}",q[X+Y]||(Xt=0<Xt.length?"{"+Xt.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
|
+
let props = %s;
|
|
19
|
+
<%s {...props} />
|
|
20
|
+
React keys must be passed directly to JSX without using spread:
|
|
21
|
+
let props = %s;
|
|
22
|
+
<%s key={someKey} {...props} />`,Y,X,Xt,X),q[X+Y]=!0)}if(X=null,F!==void 0&&(n(F),X=""+F),r(M)&&(n(M.key),X=""+M.key),"key"in M){F={};for(var Cs in M)Cs!=="key"&&(F[Cs]=M[Cs])}else F=M;return X&&a(F,typeof p=="function"?p.displayName||p.name||"Unknown":p),u(p,X,mt,Ct,i(),F,Ss,Ps)}function f(p){typeof p=="object"&&p!==null&&p.$$typeof===d&&p._store&&(p._store.validated=1)}var h=S,d=Symbol.for("react.transitional.element"),m=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),w=Symbol.for("react.consumer"),g=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),V=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),k=Symbol.for("react.activity"),L=Symbol.for("react.client.reference"),$=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,at=Object.prototype.hasOwnProperty,nt=Array.isArray,dt=console.createTask?console.createTask:function(){return null};h={react_stack_bottom_frame:function(p){return p()}};var Pt,lt={},N=h.react_stack_bottom_frame.bind(h,o)(),D=dt(s(o)),q={};qt.Fragment=y,qt.jsx=function(p,M,F,Y,Ct){var mt=1e4>$.recentlyCreatedOwnerStacks++;return c(p,M,F,!1,Y,Ct,mt?Error("react-stack-top-frame"):N,mt?dt(s(p)):D)},qt.jsxs=function(p,M,F,Y,Ct){var mt=1e4>$.recentlyCreatedOwnerStacks++;return c(p,M,F,!0,Y,Ct,mt?Error("react-stack-top-frame"):N,mt?dt(s(p)):D)}})()),qt}var Rs;function Zo(){return Rs||(Rs=1,process.env.NODE_ENV==="production"?pe.exports=Go():pe.exports=qo()),pe.exports}var b=Zo();const U=(...t)=>t.filter(Boolean).join(" "),Jo="inline-flex flex-row items-center justify-center font-semibold ring-0 hover:ring-4 active:ring-1 rounded-xl cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-4",Qo={primary:"border border-blue-600 text-white bg-blue-600 active:bg-blue-700 active:border-blue-700 ring-blue-600/10 shadow-sm",white:"border border-gray-200 text-gray-900 bg-white active:bg-gray-50 ring-gray-900/10 shadow-sm",black:"border border-gray-950 text-white bg-gray-950 active:bg-gray-800 active:border-gray-800 ring-gray-900/20 shadow-sm",transparent:"border border-transparent text-gray-900 bg-transparent ring-gray-900/10"},ta={sm:"h-10 px-4",md:"h-12 px-6",lg:"h-14 px-8"},ea=C.forwardRef((t,e)=>{const{variant:n="white",size:s="md",className:i,children:o,...r}=t;return b.jsx("button",{ref:e,className:U(Jo,Qo[n],ta[s],i),...r,children:o})}),na="inline-flex flex-row items-center justify-center font-semibold ring-0 hover:ring-4 active:ring-1 rounded-xl cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-4 aspect-square",sa={primary:"border border-blue-600 text-white/90 bg-blue-600 active:bg-blue-700 active:border-blue-700 ring-blue-600/10 shadow-sm",white:"border border-gray-200 text-gray-900/70 bg-white active:bg-gray-50 ring-gray-900/10 shadow-sm",black:"border border-gray-950 text-white/90 bg-gray-950 active:bg-gray-800 active:border-gray-800 ring-gray-900/20 shadow-sm",transparent:"border border-transparent text-gray-900/70 bg-transparent ring-gray-900/10"},ia={sm:"h-10 w-10",md:"h-12 w-12",lg:"h-14 w-14"},ra=C.forwardRef((t,e)=>{const{variant:n="white",size:s="md",className:i,Icon:o,...r}=t;return b.jsx("button",{ref:e,className:U(na,sa[n],ia[s],i),...r,children:b.jsx(o,{className:"h-5 w-5"})})}),oa="inline-flex flex-row items-center justify-center font-semibold ring-0 hover:ring-4 active:ring-1 rounded-full cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-4 aspect-square",aa={primary:"border border-blue-600 text-white/90 bg-blue-600 active:bg-blue-700 active:border-blue-700 ring-blue-600/10 shadow-sm",white:"border border-gray-200 text-gray-900/70 bg-white active:bg-gray-50 ring-gray-900/10 shadow-sm",black:"border border-gray-950 text-white/90 bg-gray-950 active:bg-gray-800 active:border-gray-800 ring-gray-900/20 shadow-sm",transparent:"border border-transparent text-gray-900/70 bg-transparent ring-gray-900/10"},la={sm:"h-10 w-10",md:"h-12 w-12",lg:"h-14 w-14"},ca=C.forwardRef((t,e)=>{const{variant:n="white",size:s="md",className:i,Icon:o,...r}=t;return b.jsx("button",{ref:e,className:U(oa,aa[n],la[s],i),...r,children:b.jsx(o,{className:"h-5 w-5"})})});/**
|
|
23
|
+
* @license @tabler/icons-react v3.34.1 - MIT
|
|
24
|
+
*
|
|
25
|
+
* This source code is licensed under the MIT license.
|
|
26
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
27
|
+
*/var ua={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"}};/**
|
|
28
|
+
* @license @tabler/icons-react v3.34.1 - MIT
|
|
29
|
+
*
|
|
30
|
+
* This source code is licensed under the MIT license.
|
|
31
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
32
|
+
*/const ge=(t,e,n,s)=>{const i=S.forwardRef(({color:o="currentColor",size:r=24,stroke:a=2,title:l,className:u,children:c,...f},h)=>S.createElement("svg",{ref:h,...ua[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(([d,m])=>S.createElement(d,m)),...Array.isArray(c)?c:[c]]));return i.displayName=`${n}`,i};/**
|
|
33
|
+
* @license @tabler/icons-react v3.34.1 - MIT
|
|
34
|
+
*
|
|
35
|
+
* This source code is licensed under the MIT license.
|
|
36
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
37
|
+
*/const fa=ge("outline","check","Check",[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]]);/**
|
|
38
|
+
* @license @tabler/icons-react v3.34.1 - MIT
|
|
39
|
+
*
|
|
40
|
+
* This source code is licensed under the MIT license.
|
|
41
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
42
|
+
*/const Ms=ge("outline","chevron-down","ChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]);/**
|
|
43
|
+
* @license @tabler/icons-react v3.34.1 - MIT
|
|
44
|
+
*
|
|
45
|
+
* This source code is licensed under the MIT license.
|
|
46
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
47
|
+
*/const ha=ge("outline","x","X",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);/**
|
|
48
|
+
* @license @tabler/icons-react v3.34.1 - MIT
|
|
49
|
+
*
|
|
50
|
+
* This source code is licensed under the MIT license.
|
|
51
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
52
|
+
*/const da=ge("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"}]]),Ye=t=>{const{children:e}=t;return e?b.jsx("label",{className:"text-gray-900 font-medium mb-1",children:e}):null},Xe=()=>b.jsx("div",{className:"h-5 w-5",children:b.jsx(da,{className:"h-5 w-5 text-red-600"})}),Ge=t=>{const{children:e,className:n}=t;return b.jsx("div",{className:U("absolute top-1/2 -translate-y-1/2 right-3.5 flex flex-row items-center gap-1",n),children:e})},ye=t=>{const{children:e}=t;return e?b.jsx("div",{className:"text-gray-500 text-sm font-medium mt-2",children:e}):null},ve=t=>{const{children:e}=t;return e?b.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 b.jsxs("div",{className:U("flex flex-col",e),children:[b.jsx(Ye,{children:n}),b.jsxs("div",{className:"flex flex-col relative",children:[i&&b.jsx(i,{className:"h-4 w-4 text-gray-900/70 absolute left-4 top-1/2 -translate-y-1/2"}),b.jsx("input",{className:U("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-10 pr-4":"px-4",o&&"border-red-600 focus:ring-red-600/20 !pr-10"),...a}),b.jsxs(Ge,{children:[o&&b.jsx(Xe,{}),r]})]}),b.jsx(ye,{children:s}),b.jsx(ve,{children:o})]})},ma=t=>{const{className:e,label:n,description:s,error:i,...o}=t;return b.jsxs("div",{className:U("flex flex-col",e),children:[b.jsxs("div",{className:"flex flex-row gap-3",children:[b.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&&b.jsx("label",{htmlFor:t.id,className:U("text-gray-900 font-medium mb-1",t.id&&"cursor-pointer"),children:n})]}),b.jsx(ye,{children:s}),b.jsx(ve,{children:i})]})},pa=t=>{const{children:e,onClick:n,selected:s,disabled:i=!1}=t;return b.jsxs("div",{onClick:()=>!i&&n&&n(),className:U("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:[b.jsx("div",{className:"flex-1",children:e}),s&&!i&&b.jsx("div",{className:"shrink-0",children:b.jsx(fa,{className:"h-5 w-5"})})]})};function xe(){return typeof window<"u"}function kt(t){return ks(t)?(t.nodeName||"").toLowerCase():"#document"}function J(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function pt(t){var e;return(e=(ks(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function ks(t){return xe()?t instanceof Node||t instanceof J(t).Node:!1}function z(t){return xe()?t instanceof Element||t instanceof J(t).Element:!1}function ct(t){return xe()?t instanceof HTMLElement||t instanceof J(t).HTMLElement:!1}function js(t){return!xe()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof J(t).ShadowRoot}const ga=new Set(["inline","contents"]);function Zt(t){const{overflow:e,overflowX:n,overflowY:s,display:i}=st(t);return/auto|scroll|overlay|hidden|clip/.test(e+s+n)&&!ga.has(i)}const ya=new Set(["table","td","th"]);function va(t){return ya.has(kt(t))}const xa=[":popover-open",":modal"];function be(t){return xa.some(e=>{try{return t.matches(e)}catch{return!1}})}const ba=["transform","translate","scale","rotate","perspective"],wa=["transform","translate","scale","rotate","perspective","filter"],Ta=["paint","layout","strict","content"];function qe(t){const e=Ze(),n=z(t)?st(t):t;return ba.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)||wa.some(s=>(n.willChange||"").includes(s))||Ta.some(s=>(n.contain||"").includes(s))}function Sa(t){let e=xt(t);for(;ct(e)&&!jt(e);){if(qe(e))return e;if(be(e))return null;e=xt(e)}return null}function Ze(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Pa=new Set(["html","body","#document"]);function jt(t){return Pa.has(kt(t))}function st(t){return J(t).getComputedStyle(t)}function we(t){return z(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function xt(t){if(kt(t)==="html")return t;const e=t.assignedSlot||t.parentNode||js(t)&&t.host||pt(t);return js(e)?e.host:e}function Ls(t){const e=xt(t);return jt(e)?t.ownerDocument?t.ownerDocument.body:t.body:ct(e)&&Zt(e)?e:Ls(e)}function Os(t,e,n){var s;e===void 0&&(e=[]);const i=Ls(t),o=i===((s=t.ownerDocument)==null?void 0:s.body),r=J(i);return o?(Je(r),e.concat(r,r.visualViewport||[],Zt(i)?i:[],[])):e.concat(i,Os(i,[]))}function Je(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}const Te=Math.min,it=Math.max,Se=Math.round,ut=t=>({x:t,y:t});function Is(t,e){return typeof t=="function"?t(e):t}function Qe(t){return t.split("-")[0]}function Ns(t){return t.split("-")[1]}function Ca(t){return t==="x"?"y":"x"}function Aa(t){return t==="y"?"height":"width"}const Ea=new Set(["top","bottom"]);function tn(t){return Ea.has(Qe(t))?"y":"x"}function Va(t){return Ca(tn(t))}function Ra(t){return{top:0,right:0,bottom:0,left:0,...t}}function Ma(t){return typeof t!="number"?Ra(t):{top:t,right:t,bottom:t,left:t}}function Pe(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}}function Da(){const t=navigator.userAgentData;return t!=null&&t.platform?t.platform:navigator.platform}var ka=typeof document<"u",ja=function(){},Ce=ka?S.useLayoutEffect:ja;const La={...C}.useInsertionEffect||(t=>t());function Oa(t){const e=C.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return La(()=>{e.current=t}),C.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)},[])}function Fs(t,e,n){let{reference:s,floating:i}=t;const o=tn(e),r=Va(e),a=Aa(r),l=Qe(e),u=o==="y",c=s.x+s.width/2-i.width/2,f=s.y+s.height/2-i.height/2,h=s[a]/2-i[a]/2;let d;switch(l){case"top":d={x:c,y:s.y-i.height};break;case"bottom":d={x:c,y:s.y+s.height};break;case"right":d={x:s.x+s.width,y:f};break;case"left":d={x:s.x-i.width,y:f};break;default:d={x:s.x,y:s.y}}switch(Ns(e)){case"start":d[r]-=h*(n&&u?-1:1);break;case"end":d[r]+=h*(n&&u?-1:1);break}return d}const Ia=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}=Fs(u,s,l),h=s,d={},m=0;for(let y=0;y<a.length;y++){const{name:x,fn:v}=a[y],{x:w,y:g,data:P,reset:T}=await v({x:c,y:f,initialPlacement:s,placement:h,strategy:i,middlewareData:d,rects:u,platform:r,elements:{reference:t,floating:e}});c=w??c,f=g??f,d={...d,[x]:{...d[x],...P}},T&&m<=50&&(m++,typeof T=="object"&&(T.placement&&(h=T.placement),T.rects&&(u=T.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:i}):T.rects),{x:c,y:f}=Fs(u,h,l)),y=-1)}return{x:c,y:f,placement:h,strategy:i,middlewareData:d}};async function Na(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:h=!1,padding:d=0}=Is(e,t),m=Ma(d),x=a[h?f==="floating"?"reference":"floating":f],v=Pe(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,g=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),P=await(o.isElement==null?void 0:o.isElement(g))?await(o.getScale==null?void 0:o.getScale(g))||{x:1,y:1}:{x:1,y:1},T=Pe(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:g,strategy:l}):w);return{top:(v.top-T.top+m.top)/P.y,bottom:(T.bottom-v.bottom+m.bottom)/P.y,left:(v.left-T.left+m.left)/P.x,right:(T.right-v.right+m.right)/P.x}}const Fa=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}=Is(t,e),c=await Na(e,u),f=Qe(i),h=Ns(i),d=tn(i)==="y",{width:m,height:y}=o.floating;let x,v;f==="top"||f==="bottom"?(x=f,v=h===(await(r.isRTL==null?void 0:r.isRTL(a.floating))?"start":"end")?"left":"right"):(v=f,x=h==="end"?"top":"bottom");const w=y-c.top-c.bottom,g=m-c.left-c.right,P=Te(y-c[x],w),T=Te(m-c[v],g),V=!e.middlewareData.shift;let R=P,A=T;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(A=g),(s=e.middlewareData.shift)!=null&&s.enabled.y&&(R=w),V&&!h){const L=it(c.left,0),$=it(c.right,0),at=it(c.top,0),nt=it(c.bottom,0);d?A=m-2*(L!==0||$!==0?L+$:it(c.left,c.right)):R=y-2*(at!==0||nt!==0?at+nt:it(c.top,c.bottom))}await l({...e,availableWidth:A,availableHeight:R});const k=await r.getDimensions(a.floating);return m!==k.width||y!==k.height?{reset:{rects:!0}}:{}}}};function Bs(t){const e=st(t);let n=parseFloat(e.width)||0,s=parseFloat(e.height)||0;const i=ct(t),o=i?t.offsetWidth:n,r=i?t.offsetHeight:s,a=Se(n)!==o||Se(s)!==r;return a&&(n=o,s=r),{width:n,height:s,$:a}}function _s(t){return z(t)?t:t.contextElement}function Lt(t){const e=_s(t);if(!ct(e))return ut(1);const n=e.getBoundingClientRect(),{width:s,height:i,$:o}=Bs(e);let r=(o?Se(n.width):n.width)/s,a=(o?Se(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}const Ba=ut(0);function $s(t){const e=J(t);return!Ze()||!e.visualViewport?Ba:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function _a(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==J(t)?!1:e}function Jt(t,e,n,s){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),o=_s(t);let r=ut(1);e&&(s?z(s)&&(r=Lt(s)):r=Lt(t));const a=_a(o,n,s)?$s(o):ut(0);let l=(i.left+a.x)/r.x,u=(i.top+a.y)/r.y,c=i.width/r.x,f=i.height/r.y;if(o){const h=J(o),d=s&&z(s)?J(s):s;let m=h,y=Je(m);for(;y&&s&&d!==m;){const x=Lt(y),v=y.getBoundingClientRect(),w=st(y),g=v.left+(y.clientLeft+parseFloat(w.paddingLeft))*x.x,P=v.top+(y.clientTop+parseFloat(w.paddingTop))*x.y;l*=x.x,u*=x.y,c*=x.x,f*=x.y,l+=g,u+=P,m=J(y),y=Je(m)}}return Pe({width:c,height:f,x:l,y:u})}function Ae(t,e){const n=we(t).scrollLeft;return e?e.left+n:Jt(pt(t)).left+n}function Ws(t,e){const n=t.getBoundingClientRect(),s=n.left+e.scrollLeft-Ae(t,n),i=n.top+e.scrollTop;return{x:s,y:i}}function $a(t){let{elements:e,rect:n,offsetParent:s,strategy:i}=t;const o=i==="fixed",r=pt(s),a=e?be(e.floating):!1;if(s===r||a&&o)return n;let l={scrollLeft:0,scrollTop:0},u=ut(1);const c=ut(0),f=ct(s);if((f||!f&&!o)&&((kt(s)!=="body"||Zt(r))&&(l=we(s)),ct(s))){const d=Jt(s);u=Lt(s),c.x=d.x+s.clientLeft,c.y=d.y+s.clientTop}const h=r&&!f&&!o?Ws(r,l):ut(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+h.x,y:n.y*u.y-l.scrollTop*u.y+c.y+h.y}}function Wa(t){return Array.from(t.getClientRects())}function Ua(t){const e=pt(t),n=we(t),s=t.ownerDocument.body,i=it(e.scrollWidth,e.clientWidth,s.scrollWidth,s.clientWidth),o=it(e.scrollHeight,e.clientHeight,s.scrollHeight,s.clientHeight);let r=-n.scrollLeft+Ae(t);const a=-n.scrollTop;return st(s).direction==="rtl"&&(r+=it(e.clientWidth,s.clientWidth)-i),{width:i,height:o,x:r,y:a}}const Us=25;function Ka(t,e){const n=J(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=Ze();(!c||c&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}const u=Ae(s);if(u<=0){const c=s.ownerDocument,f=c.body,h=getComputedStyle(f),d=c.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,m=Math.abs(s.clientWidth-f.clientWidth-d);m<=Us&&(o-=m)}else u<=Us&&(o+=u);return{width:o,height:r,x:a,y:l}}const za=new Set(["absolute","fixed"]);function Ha(t,e){const n=Jt(t,!0,e==="fixed"),s=n.top+t.clientTop,i=n.left+t.clientLeft,o=ct(t)?Lt(t):ut(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 Ks(t,e,n){let s;if(e==="viewport")s=Ka(t,n);else if(e==="document")s=Ua(pt(t));else if(z(e))s=Ha(e,n);else{const i=$s(t);s={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return Pe(s)}function zs(t,e){const n=xt(t);return n===e||!z(n)||jt(n)?!1:st(n).position==="fixed"||zs(n,e)}function Ya(t,e){const n=e.get(t);if(n)return n;let s=Os(t,[]).filter(a=>z(a)&&kt(a)!=="body"),i=null;const o=st(t).position==="fixed";let r=o?xt(t):t;for(;z(r)&&!jt(r);){const a=st(r),l=qe(r);!l&&a.position==="fixed"&&(i=null),(o?!l&&!i:!l&&a.position==="static"&&!!i&&za.has(i.position)||Zt(r)&&!l&&zs(t,r))?s=s.filter(c=>c!==r):i=a,r=xt(r)}return e.set(t,s),s}function Xa(t){let{element:e,boundary:n,rootBoundary:s,strategy:i}=t;const r=[...n==="clippingAncestors"?be(e)?[]:Ya(e,this._c):[].concat(n),s],a=r[0],l=r.reduce((u,c)=>{const f=Ks(e,c,i);return u.top=it(f.top,u.top),u.right=Te(f.right,u.right),u.bottom=Te(f.bottom,u.bottom),u.left=it(f.left,u.left),u},Ks(e,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Ga(t){const{width:e,height:n}=Bs(t);return{width:e,height:n}}function qa(t,e,n){const s=ct(e),i=pt(e),o=n==="fixed",r=Jt(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const l=ut(0);function u(){l.x=Ae(i)}if(s||!s&&!o)if((kt(e)!=="body"||Zt(i))&&(a=we(e)),s){const d=Jt(e,!0,o,e);l.x=d.x+e.clientLeft,l.y=d.y+e.clientTop}else i&&u();o&&!s&&i&&u();const c=i&&!s&&!o?Ws(i,a):ut(0),f=r.left+a.scrollLeft-l.x-c.x,h=r.top+a.scrollTop-l.y-c.y;return{x:f,y:h,width:r.width,height:r.height}}function en(t){return st(t).position==="static"}function Hs(t,e){if(!ct(t)||st(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return pt(t)===n&&(n=n.ownerDocument.body),n}function Ys(t,e){const n=J(t);if(be(t))return n;if(!ct(t)){let i=xt(t);for(;i&&!jt(i);){if(z(i)&&!en(i))return i;i=xt(i)}return n}let s=Hs(t,e);for(;s&&va(s)&&en(s);)s=Hs(s,e);return s&&jt(s)&&en(s)&&!qe(s)?n:s||Sa(t)||n}const Za=async function(t){const e=this.getOffsetParent||Ys,n=this.getDimensions,s=await n(t.floating);return{reference:qa(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function Ja(t){return st(t).direction==="rtl"}const Qa={convertOffsetParentRelativeRectToViewportRelativeRect:$a,getDocumentElement:pt,getClippingRect:Xa,getOffsetParent:Ys,getElementRects:Za,getClientRects:Wa,getDimensions:Ga,getScale:Lt,isElement:z,isRTL:Ja},tl=Fa,el=(t,e,n)=>{const s=new Map,i={platform:Qa,...n},o={...i.platform,_c:s};return Ia(t,e,{...i,platform:o})};var nl=typeof document<"u",sl=function(){},Ee=nl?S.useLayoutEffect:sl;function Ve(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(!Ve(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)&&!Ve(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}function Xs(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Gs(t,e){const n=Xs(t);return Math.round(e*n)/n}function nn(t){const e=C.useRef(t);return Ee(()=>{e.current=t}),e}function il(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]=C.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[h,d]=C.useState(s);Ve(h,s)||d(s);const[m,y]=C.useState(null),[x,v]=C.useState(null),w=C.useCallback(D=>{D!==V.current&&(V.current=D,y(D))},[]),g=C.useCallback(D=>{D!==R.current&&(R.current=D,v(D))},[]),P=o||m,T=r||x,V=C.useRef(null),R=C.useRef(null),A=C.useRef(c),k=l!=null,L=nn(l),$=nn(i),at=nn(u),nt=C.useCallback(()=>{if(!V.current||!R.current)return;const D={placement:e,strategy:n,middleware:h};$.current&&(D.platform=$.current),el(V.current,R.current,D).then(q=>{const p={...q,isPositioned:at.current!==!1};dt.current&&!Ve(A.current,p)&&(A.current=p,Xo.flushSync(()=>{f(p)}))})},[h,e,n,$,at]);Ee(()=>{u===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,f(D=>({...D,isPositioned:!1})))},[u]);const dt=C.useRef(!1);Ee(()=>(dt.current=!0,()=>{dt.current=!1}),[]),Ee(()=>{if(P&&(V.current=P),T&&(R.current=T),P&&T){if(L.current)return L.current(P,T,nt);nt()}},[P,T,nt,L,k]);const Pt=C.useMemo(()=>({reference:V,floating:R,setReference:w,setFloating:g}),[w,g]),lt=C.useMemo(()=>({reference:P,floating:T}),[P,T]),N=C.useMemo(()=>{const D={position:n,left:0,top:0};if(!lt.floating)return D;const q=Gs(lt.floating,c.x),p=Gs(lt.floating,c.y);return a?{...D,transform:"translate("+q+"px, "+p+"px)",...Xs(lt.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:q,top:p}},[n,a,lt.floating,c.x,c.y]);return C.useMemo(()=>({...c,update:nt,refs:Pt,elements:lt,floatingStyles:N}),[c,nt,Pt,lt,N])}const rl=(t,e)=>({...tl(t),options:[t,e]}),ol={...C};let qs=!1,al=0;const Zs=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+al++;function ll(){const[t,e]=C.useState(()=>qs?Zs():void 0);return Ce(()=>{t==null&&e(Zs())},[]),C.useEffect(()=>{qs=!0},[]),t}const cl=ol.useId||ll;let sn;process.env.NODE_ENV!=="production"&&(sn=new Set);function ul(){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=sn)!=null&&t.has(i))){var o;(o=sn)==null||o.add(i),console.error(i)}}function fl(){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 hl=C.createContext(null),dl=C.createContext(null),ml=()=>{var t;return((t=C.useContext(hl))==null?void 0:t.id)||null},pl=()=>C.useContext(dl);let Re=0;const Js="--floating-ui-scrollbar-width";function gl(){const t=Da(),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(Js,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(Js),e&&(Object.assign(n,{position:"",top:"",left:"",right:""}),window.scrollTo(r,a))}}let Qs=()=>{};const yl=C.forwardRef(function(e,n){const{lockScroll:s=!1,...i}=e;return Ce(()=>{if(s)return Re++,Re===1&&(Qs=gl()),()=>{Re--,Re===0&&Qs()}},[s]),b.jsx("div",{ref:n,...i,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...i.style}})});function vl(t){const{open:e=!1,onOpenChange:n,elements:s}=t,i=cl(),o=C.useRef({}),[r]=C.useState(()=>fl()),a=ml()!=null;if(process.env.NODE_ENV!=="production"){const d=s.reference;d&&!z(d)&&ul("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,u]=C.useState(s.reference),c=Oa((d,m,y)=>{o.current.openEvent=d?m:void 0,r.emit("openchange",{open:d,event:m,reason:y,nested:a}),n?.(d,m,y)}),f=C.useMemo(()=>({setPositionReference:u}),[]),h=C.useMemo(()=>({reference:l||s.reference||null,floating:s.floating||null,domReference:s.reference}),[l,s.reference,s.floating]);return C.useMemo(()=>({dataRef:o,open:e,onOpenChange:c,elements:h,events:r,floatingId:i,refs:f}),[e,c,h,r,i,f])}function xl(t){t===void 0&&(t={});const{nodeId:e}=t,n=vl({...t,elements:{reference:null,floating:null,...t.elements}}),s=t.rootContext||n,i=s.elements,[o,r]=C.useState(null),[a,l]=C.useState(null),c=i?.domReference||o,f=C.useRef(null),h=pl();Ce(()=>{c&&(f.current=c)},[c]);const d=il({...t,elements:{...i,...a&&{reference:a}}}),m=C.useCallback(g=>{const P=z(g)?{getBoundingClientRect:()=>g.getBoundingClientRect(),getClientRects:()=>g.getClientRects(),contextElement:g}:g;l(P),d.refs.setReference(P)},[d.refs]),y=C.useCallback(g=>{(z(g)||g===null)&&(f.current=g,r(g)),(z(d.refs.reference.current)||d.refs.reference.current===null||g!==null&&!z(g))&&d.refs.setReference(g)},[d.refs]),x=C.useMemo(()=>({...d.refs,setReference:y,setPositionReference:m,domReference:f}),[d.refs,y,m]),v=C.useMemo(()=>({...d.elements,domReference:c}),[d.elements,c]),w=C.useMemo(()=>({...d,...s,refs:x,elements:v,nodeId:e}),[d,x,v,e,s]);return Ce(()=>{s.dataRef.current.floatingContext=w;const g=h?.nodesRef.current.find(P=>P.id===e);g&&(g.context=w)}),C.useMemo(()=>({...d,context:w,refs:x,elements:v}),[d,x,v,w])}const rn=S.createContext({});function on(t){const e=S.useRef(null);return e.current===null&&(e.current=t()),e.current}const an=typeof window<"u",ti=an?S.useLayoutEffect:S.useEffect,Me=S.createContext(null);function ln(t,e){t.indexOf(e)===-1&&t.push(e)}function cn(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 un(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}let Ot=()=>{},yt=()=>{};process.env.NODE_ENV!=="production"&&(Ot=(t,e,n)=>{!t&&typeof console<"u"&&console.warn(un(e,n))},yt=(t,e,n)=>{if(!t)throw new Error(un(e,n))});const vt={},ei=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function ni(t){return typeof t=="object"&&t!==null}const si=t=>/^0[^.\s]+$/u.test(t);function fn(t){let e;return()=>(e===void 0&&(e=t()),e)}const Q=t=>t,bl=(t,e)=>n=>e(t(n)),Qt=(...t)=>t.reduce(bl),te=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s};class hn{constructor(){this.subscriptions=[]}add(e){return ln(this.subscriptions,e),()=>cn(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 rt=t=>t*1e3,ft=t=>t/1e3;function ii(t,e){return e?t*(1e3/e):0}const ri=new Set;function dn(t,e,n){t||ri.has(e)||(console.warn(un(e,n)),ri.add(e))}const oi=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,wl=1e-7,Tl=12;function Sl(t,e,n,s,i){let o,r,a=0;do r=e+(n-e)/2,o=oi(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>wl&&++a<Tl);return r}function ee(t,e,n,s){if(t===e&&n===s)return Q;const i=o=>Sl(o,0,1,t,n);return o=>o===0||o===1?o:oi(i(o),e,s)}const ai=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,li=t=>e=>1-t(1-e),ci=ee(.33,1.53,.69,.99),mn=li(ci),ui=ai(mn),fi=t=>(t*=2)<1?.5*mn(t):.5*(2-Math.pow(2,-10*(t-1))),pn=t=>1-Math.sin(Math.acos(t)),hi=li(pn),di=ai(pn),Pl=ee(.42,0,1,1),Cl=ee(0,0,.58,1),mi=ee(.42,0,.58,1),Al=t=>Array.isArray(t)&&typeof t[0]!="number",pi=t=>Array.isArray(t)&&typeof t[0]=="number",gi={linear:Q,easeIn:Pl,easeInOut:mi,easeOut:Cl,circIn:pn,circInOut:di,circOut:hi,backIn:mn,backInOut:ui,backOut:ci,anticipate:fi},El=t=>typeof t=="string",yi=t=>{if(pi(t)){yt(t.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,n,s,i]=t;return ee(e,n,s,i)}else if(El(t))return yt(gi[t]!==void 0,`Invalid easing type '${t}'`,"invalid-easing-type"),gi[t];return t},De=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Vl(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,h=!1)=>{const m=h&&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 Rl=40;function vi(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=De.reduce((g,P)=>(g[P]=Vl(o),g),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:f,preRender:h,render:d,postRender:m}=r,y=()=>{const g=vt.useManualTiming?i.timestamp:performance.now();n=!1,vt.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(g-i.timestamp,Rl),1)),i.timestamp=g,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),f.process(i),h.process(i),d.process(i),m.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(y))},x=()=>{n=!0,s=!0,i.isProcessing||t(y)};return{schedule:De.reduce((g,P)=>{const T=r[P];return g[P]=(V,R=!1,A=!1)=>(n||x(),T.schedule(V,R,A)),g},{}),cancel:g=>{for(let P=0;P<De.length;P++)r[De[P]].cancel(g)},state:i,steps:r}}const{schedule:j,cancel:bt,state:K,steps:gn}=vi(typeof requestAnimationFrame<"u"?requestAnimationFrame:Q,!0);let ke;function Ml(){ke=void 0}const Z={now:()=>(ke===void 0&&Z.set(K.isProcessing||vt.useManualTiming?K.timestamp:performance.now()),ke),set:t=>{ke=t,queueMicrotask(Ml)}},xi=t=>e=>typeof e=="string"&&e.startsWith(t),yn=xi("--"),Dl=xi("var(--"),vn=t=>Dl(t)?kl.test(t.split("/*")[0].trim()):!1,kl=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,It={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},ne={...It,transform:t=>gt(0,1,t)},je={...It,default:1},se=t=>Math.round(t*1e5)/1e5,xn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function jl(t){return t==null}const Ll=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,bn=(t,e)=>n=>!!(typeof n=="string"&&Ll.test(n)&&n.startsWith(t)||e&&!jl(n)&&Object.prototype.hasOwnProperty.call(n,e)),bi=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,o,r,a]=s.match(xn);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},Ol=t=>gt(0,255,t),wn={...It,transform:t=>Math.round(Ol(t))},At={test:bn("rgb","red"),parse:bi("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+wn.transform(t)+", "+wn.transform(e)+", "+wn.transform(n)+", "+se(ne.transform(s))+")"};function Il(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 Tn={test:bn("#"),parse:Il,transform:At.transform},ie=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),wt=ie("deg"),ht=ie("%"),E=ie("px"),Nl=ie("vh"),Fl=ie("vw"),wi={...ht,parse:t=>ht.parse(t)/100,transform:t=>ht.transform(t*100)},Nt={test:bn("hsl","hue"),parse:bi("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+ht.transform(se(e))+", "+ht.transform(se(n))+", "+se(ne.transform(s))+")"},_={test:t=>At.test(t)||Tn.test(t)||Nt.test(t),parse:t=>At.test(t)?At.parse(t):Nt.test(t)?Nt.parse(t):Tn.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?At.transform(t):Nt.transform(t),getAnimatableNone:t=>{const e=_.parse(t);return e.alpha=0,_.transform(e)}},Bl=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function _l(t){return isNaN(t)&&typeof t=="string"&&(t.match(xn)?.length||0)+(t.match(Bl)?.length||0)>0}const Ti="number",Si="color",$l="var",Wl="var(",Pi="${}",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 re(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(Ul,l=>(_.test(l)?(s.color.push(o),i.push(Si),n.push(_.parse(l))):l.startsWith(Wl)?(s.var.push(o),i.push($l),n.push(l)):(s.number.push(o),i.push(Ti),n.push(parseFloat(l))),++o,Pi)).split(Pi);return{values:n,split:a,indexes:s,types:i}}function Ci(t){return re(t).values}function Ai(t){const{split:e,types:n}=re(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===Ti?o+=se(i[r]):a===Si?o+=_.transform(i[r]):o+=i[r]}return o}}const Kl=t=>typeof t=="number"?0:_.test(t)?_.getAnimatableNone(t):t;function zl(t){const e=Ci(t);return Ai(t)(e.map(Kl))}const Tt={test:_l,parse:Ci,createTransformer:Ai,getAnimatableNone:zl};function Sn(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=Sn(l,a,t+1/3),o=Sn(l,a,t),r=Sn(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}function Le(t,e){return n=>n>0?e:t}const O=(t,e,n)=>t+(e-t)*n,Pn=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},Yl=[Tn,At,Nt],Xl=t=>Yl.find(e=>e.test(t));function Ei(t){const e=Xl(t);if(Ot(!!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===Nt&&(n=Hl(n)),n}const Vi=(t,e)=>{const n=Ei(t),s=Ei(e);if(!n||!s)return Le(t,e);const i={...n};return o=>(i.red=Pn(n.red,s.red,o),i.green=Pn(n.green,s.green,o),i.blue=Pn(n.blue,s.blue,o),i.alpha=O(n.alpha,s.alpha,o),At.transform(i))},Cn=new Set(["none","hidden"]);function Gl(t,e){return Cn.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function ql(t,e){return n=>O(t,e,n)}function An(t){return typeof t=="number"?ql:typeof t=="string"?vn(t)?Le:_.test(t)?Vi:Ql:Array.isArray(t)?Ri:typeof t=="object"?_.test(t)?Vi:Zl:Le}function Ri(t,e){const n=[...t],s=n.length,i=t.map((o,r)=>An(o)(o,e[r]));return o=>{for(let r=0;r<s;r++)n[r]=i[r](o);return n}}function Zl(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=An(t[i])(t[i],e[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}}function Jl(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 Ql=(t,e)=>{const n=Tt.createTransformer(e),s=re(t),i=re(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?Cn.has(t)&&!i.values.length||Cn.has(e)&&!s.values.length?Gl(t,e):Qt(Ri(Jl(s,i),i.values),n):(Ot(!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"),Le(t,e))};function Mi(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?O(t,e,n):An(t)(t,e)}const tc=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>j.update(e,n),stop:()=>bt(e),now:()=>K.isProcessing?K.timestamp:Z.now()}},Di=(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)})`},Oe=2e4;function En(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<Oe;)e+=n,s=t.next(e);return e>=Oe?1/0:e}function ec(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(En(s),Oe);return{type:"keyframes",ease:o=>s.next(i*o).value/e,duration:ft(i)}}const nc=5;function ki(t,e,n){const s=Math.max(e-nc,0);return ii(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},Vn=.001;function sc({duration:t=I.duration,bounce:e=I.bounce,velocity:n=I.velocity,mass:s=I.mass}){let i,o;Ot(t<=rt(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,ft(t)),r<1?(i=u=>{const c=u*r,f=c*t,h=c-n,d=Rn(u,r),m=Math.exp(-f);return Vn-h/d*m},o=u=>{const f=u*r*t,h=f*n+n,d=Math.pow(r,2)*Math.pow(u,2)*t,m=Math.exp(-f),y=Rn(Math.pow(u,2),r);return(-i(u)+Vn>0?-1:1)*((h-d)*m)/y}):(i=u=>{const c=Math.exp(-u*t),f=(u-n)*t+1;return-Vn+c*f},o=u=>{const c=Math.exp(-u*t),f=(n-u)*(t*t);return c*f});const a=5/t,l=rc(i,o,a);if(t=rt(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 ic=12;function rc(t,e,n){let s=n;for(let i=1;i<ic;i++)s=s-t(s)/e(s);return s}function Rn(t,e){return t*Math.sqrt(1-e*e)}const oc=["duration","bounce"],ac=["stiffness","damping","mass"];function ji(t,e){return e.some(n=>t[n]!==void 0)}function lc(t){let e={velocity:I.velocity,stiffness:I.stiffness,damping:I.damping,mass:I.mass,isResolvedFromDuration:!1,...t};if(!ji(t,ac)&&ji(t,oc))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=sc(t);e={...e,...n,mass:I.mass},e.isResolvedFromDuration=!0}return e}function Ie(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:h,isResolvedFromDuration:d}=lc({...n,velocity:-ft(n.velocity||0)}),m=h||0,y=u/(2*Math.sqrt(l*c)),x=r-o,v=ft(Math.sqrt(l/c)),w=Math.abs(x)<5;s||(s=w?I.restSpeed.granular:I.restSpeed.default),i||(i=w?I.restDelta.granular:I.restDelta.default);let g;if(y<1){const T=Rn(v,y);g=V=>{const R=Math.exp(-y*v*V);return r-R*((m+y*v*x)/T*Math.sin(T*V)+x*Math.cos(T*V))}}else if(y===1)g=T=>r-Math.exp(-v*T)*(x+(m+v*x)*T);else{const T=v*Math.sqrt(y*y-1);g=V=>{const R=Math.exp(-y*v*V),A=Math.min(T*V,300);return r-R*((m+y*v*x)*Math.sinh(A)+T*x*Math.cosh(A))/T}}const P={calculatedDuration:d&&f||null,next:T=>{const V=g(T);if(d)a.done=T>=f;else{let R=T===0?m:0;y<1&&(R=T===0?rt(m):ki(g,T,V));const A=Math.abs(R)<=s,k=Math.abs(r-V)<=i;a.done=A&&k}return a.value=a.done?r:V,a},toString:()=>{const T=Math.min(En(P),Oe),V=Di(R=>P.next(T*R).value,T,30);return T+"ms "+V},toTransition:()=>{}};return P}Ie.applyToOptions=t=>{const e=ec(t,100,Ie);return t.ease=e.ease,t.duration=rt(e.duration),t.type="keyframes",t};function Mn({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],h={done:!1,value:f},d=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 y=n*e;const x=f+y,v=r===void 0?x:r(x);v!==x&&(y=v-f);const w=A=>-y*Math.exp(-A/s),g=A=>v+w(A),P=A=>{const k=w(A),L=g(A);h.done=Math.abs(k)<=u,h.value=h.done?v:L};let T,V;const R=A=>{d(h.value)&&(T=A,V=Ie({keyframes:[h.value,m(h.value)],velocity:ki(g,A,h.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return R(0),{calculatedDuration:null,next:A=>{let k=!1;return!V&&T===void 0&&(k=!0,P(A),R(A)),T!==void 0&&A>=T?V.next(A-T):(!k&&P(A),h)}}}function cc(t,e,n){const s=[],i=n||vt.mix||Mi,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=Qt(l,a)}s.push(a)}return s}function uc(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=cc(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 h=te(t[f],t[f+1],c);return a[f](h)};return n?c=>u(gt(t[0],t[o-1],c)):u}function fc(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=te(0,e,s);t.push(O(n,1,i))}}function hc(t){const e=[0];return fc(e,t.length-1),e}function dc(t,e){return t.map(n=>n*e)}function mc(t,e){return t.map(()=>e||mi).splice(0,t.length-1)}function Ft({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Al(s)?s.map(yi):yi(s),o={done:!1,value:e[0]},r=dc(n&&n.length===e.length?n:hc(e),t),a=uc(r,e,{ease:Array.isArray(i)?i:mc(e,i)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}const pc=t=>t!==null;function Dn(t,{repeat:e,repeatType:n="loop"},s,i=1){const o=t.filter(pc),a=i<0||e&&n!=="loop"&&e%2===1?0:o.length-1;return!a||s===void 0?o[a]:s}const gc={decay:Mn,inertia:Mn,tween:Ft,keyframes:Ft,spring:Ie};function Li(t){typeof t.type=="string"&&(t.type=gc[t.type])}class kn{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 yc=t=>t/100;class jn extends kn{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;Li(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=Qt(yc,Mi(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=En(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:h,repeatDelay:d,type:m,onUpdate:y,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 v=this.currentTime-u*(this.playbackSpeed>=0?1:-1),w=this.playbackSpeed>=0?v<0:v>i;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let g=this.currentTime,P=s;if(f){const A=Math.min(this.currentTime,i)/a;let k=Math.floor(A),L=A%1;!L&&A>=1&&(L=1),L===1&&k--,k=Math.min(k,f+1),!!(k%2)&&(h==="reverse"?(L=1-L,d&&(L-=d/a)):h==="mirror"&&(P=r)),g=gt(0,1,L)*a}const T=w?{done:!1,value:c[0]}:P.next(g);o&&(T.value=o(T.value));let{done:V}=T;!w&&l!==null&&(V=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const R=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&V);return R&&m!==Mn&&(T.value=Dn(c,this.options,x,this.speed)),y&&y(T.value),R&&this.finish(),T}then(e,n){return this.finished.then(e,n)}get duration(){return ft(this.calculatedDuration)}get time(){return ft(this.currentTime)}set time(e){e=rt(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=ft(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=tc,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 vc(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Et=t=>t*180/Math.PI,Ln=t=>{const e=Et(Math.atan2(t[1],t[0]));return On(e)},xc={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Ln,rotateZ:Ln,skewX:t=>Et(Math.atan(t[1])),skewY:t=>Et(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},On=t=>(t=t%360,t<0&&(t+=360),t),Oi=Ln,Ii=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Ni=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),bc={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ii,scaleY:Ni,scale:t=>(Ii(t)+Ni(t))/2,rotateX:t=>On(Et(Math.atan2(t[6],t[5]))),rotateY:t=>On(Et(Math.atan2(-t[2],t[0]))),rotateZ:Oi,rotate:Oi,skewX:t=>Et(Math.atan(t[4])),skewY:t=>Et(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function In(t){return t.includes("scale")?1:0}function Nn(t,e){if(!t||t==="none")return In(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=bc,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=xc,i=a}if(!i)return In(e);const o=s[e],r=i[1].split(",").map(Tc);return typeof o=="function"?o(r):r[o]}const wc=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Nn(n,e)};function Tc(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),Fi=t=>t===It||t===E,Sc=new Set(["x","y","z"]),Pc=Bt.filter(t=>!Sc.has(t));function Cc(t){const e=[];return Pc.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const Vt={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})=>Nn(e,"x"),y:(t,{transform:e})=>Nn(e,"y")};Vt.translateX=Vt.x,Vt.translateY=Vt.y;const Rt=new Set;let Fn=!1,Bn=!1,_n=!1;function Bi(){if(Bn){const t=Array.from(Rt).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=Cc(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)})}Bn=!1,Fn=!1,Rt.forEach(t=>t.complete(_n)),Rt.clear()}function _i(){Rt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Bn=!0)})}function Ac(){_n=!0,_i(),Bi(),_n=!1}class $n{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?(Rt.add(this),Fn||(Fn=!0,j.read(_i),j.resolveKeyframes(Bi))):(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])}vc(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Rt.delete(this)}cancel(){this.state==="scheduled"&&(Rt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Ec=t=>t.startsWith("--");function Vc(t,e,n){Ec(e)?t.style.setProperty(e,n):t.style[e]=n}const Rc=fn(()=>window.ScrollTimeline!==void 0),Mc={};function Dc(t,e){const n=fn(t);return()=>Mc[e]??n()}const $i=Dc(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),oe=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Wi={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:oe([0,.65,.55,1]),circOut:oe([.55,0,1,.45]),backIn:oe([.31,.01,.66,-.59]),backOut:oe([.33,1.53,.69,.99])};function Ui(t,e){if(t)return typeof t=="function"?$i()?Di(t,e):"ease-out":pi(t)?oe(t):Array.isArray(t)?t.map(n=>Ui(n,e)||Wi.easeOut):Wi[t]}function kc(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=Ui(a,i);Array.isArray(f)&&(c.easing=f);const h={delay:s,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"};return u&&(h.pseudoElement=u),t.animate(c,h)}function Ki(t){return typeof t=="function"&&"applyToOptions"in t}function jc({type:t,...e}){return Ki(t)&&$i()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Lc extends kn{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=jc(e);this.animation=kc(n,s,i,u,o),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const c=Dn(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):Vc(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 ft(Number(e))}get time(){return ft(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=rt(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&&Rc()?(this.animation.timeline=e,Q):n(this)}}const zi={anticipate:fi,backInOut:ui,circInOut:di};function Oc(t){return t in zi}function Ic(t){typeof t.ease=="string"&&Oc(t.ease)&&(t.ease=zi[t.ease])}const Hi=10;class Nc extends Lc{constructor(e){Ic(e),Li(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 jn({...r,autoplay:!1}),l=rt(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-Hi).value,a.sample(l).value,Hi),a.stop()}}const Yi=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Tt.test(t)||t==="0")&&!t.startsWith("url("));function Fc(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 Bc(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=Yi(i,e),a=Yi(o,e);return Ot(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:Fc(t)||(n==="spring"||Ki(n))&&s}function Wn(t){t.duration=0,t.type}const _c=new Set(["opacity","clipPath","filter","transform"]),$c=fn(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Wc(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 $c()&&n&&_c.has(n)&&(n!=="transform"||!u)&&!l&&!s&&i!=="mirror"&&o!==0&&r!=="inertia"}const Uc=40;class Kc extends kn{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 h={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:o,repeatType:r,name:l,motionValue:u,element:c,...f},d=c?.KeyframeResolver||$n;this.keyframeResolver=new d(a,(m,y,x)=>this.onKeyframesResolved(m,y,h,!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=Z.now(),Bc(e,o,r,a)||((vt.instantAnimations||!l)&&c?.(Dn(e,s,n)),e[0]=e[e.length-1],Wn(s),s.repeat=0);const h={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Uc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},d=!u&&Wc(h)?new Nc({...h,element:h.motionValue.owner.current}):new jn(h);d.finished.then(()=>this.notifyFinished()).catch(Q),this.pendingTimeline&&(this.stopTimeline=d.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=d}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(),Ac()),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 zc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Hc(t){const e=zc.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}const Yc=4;function Xi(t,e,n=1){yt(n<=Yc,`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 ei(r)?parseFloat(r):r}return vn(i)?Xi(i,e,n+1):i}function Un(t,e){return t?.[e]??t?.default??t}const Gi=new Set(["width","height","top","left","right","bottom",...Bt]),Xc={test:t=>t==="auto",parse:t=>t},qi=t=>e=>e.test(t),Zi=[It,E,ht,wt,Fl,Nl,Xc],Ji=t=>Zi.find(qi(t));function Gc(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||si(t):!0}const qc=new Set(["brightness","contrast","saturate","opacity"]);function Zc(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(xn)||[];if(!s)return t;const i=n.replace(s,"");let o=qc.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const Jc=/\b([a-z-]*)\(.*?\)/gu,Kn={...Tt,getAnimatableNone:t=>{const e=t.match(Jc);return e?e.map(Zc).join(" "):t}},Qi={...It,transform:Math.round},zn={borderWidth:E,borderTopWidth:E,borderRightWidth:E,borderBottomWidth:E,borderLeftWidth:E,borderRadius:E,radius:E,borderTopLeftRadius:E,borderTopRightRadius:E,borderBottomRightRadius:E,borderBottomLeftRadius:E,width:E,maxWidth:E,height:E,maxHeight:E,top:E,right:E,bottom:E,left:E,padding:E,paddingTop:E,paddingRight:E,paddingBottom:E,paddingLeft:E,margin:E,marginTop:E,marginRight:E,marginBottom:E,marginLeft:E,backgroundPositionX:E,backgroundPositionY:E,...{rotate:wt,rotateX:wt,rotateY:wt,rotateZ:wt,scale:je,scaleX:je,scaleY:je,scaleZ:je,skew:wt,skewX:wt,skewY:wt,distance:E,translateX:E,translateY:E,translateZ:E,x:E,y:E,z:E,perspective:E,transformPerspective:E,opacity:ne,originX:wi,originY:wi,originZ:E},zIndex:Qi,fillOpacity:ne,strokeOpacity:ne,numOctaves:Qi},Qc={...zn,color:_,backgroundColor:_,outlineColor:_,fill:_,stroke:_,borderColor:_,borderTopColor:_,borderRightColor:_,borderBottomColor:_,borderLeftColor:_,filter:Kn,WebkitFilter:Kn},tr=t=>Qc[t];function er(t,e){let n=tr(t);return n!==Kn&&(n=Tt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const tu=new Set(["auto","none","0"]);function eu(t,e,n){let s=0,i;for(;s<t.length&&!i;){const o=t[s];typeof o=="string"&&!tu.has(o)&&re(o).values.length&&(i=t[s]),s++}if(i&&n)for(const o of e)t[o]=er(n,i)}class nu extends $n{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(),vn(u))){const c=Xi(u,n.current);c!==void 0&&(e[l]=c),l===e.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Gi.has(s)||e.length!==2)return;const[i,o]=e,r=Ji(i),a=Ji(o);if(r!==a)if(Fi(r)&&Fi(a))for(let l=0;l<e.length;l++){const u=e[l];typeof u=="string"&&(e[l]=parseFloat(u))}else Vt[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&&eu(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=Vt[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]=Vt[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 su(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 nr=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function sr(t){return ni(t)&&"offsetHeight"in t}const ir=30,iu=t=>!isNaN(parseFloat(t));class ru{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=iu(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!=="production"&&dn(!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 hn);const s=this.events[e].add(n);return e==="change"?()=>{s(),j.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>ir)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,ir);return ii(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 ru(t,e)}const{schedule:Hn}=vi(queueMicrotask,!1),ot={x:!1,y:!1};function rr(){return ot.x||ot.y}function ou(t){return t==="x"||t==="y"?ot[t]?null:(ot[t]=!0,()=>{ot[t]=!1}):ot.x||ot.y?null:(ot.x=ot.y=!0,()=>{ot.x=ot.y=!1})}function or(t,e){const n=su(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function ar(t){return!(t.pointerType==="touch"||rr())}function au(t,e,n={}){const[s,i,o]=or(t,n),r=a=>{if(!ar(a))return;const{target:l}=a,u=e(l,a);if(typeof u!="function"||!l)return;const c=f=>{ar(f)&&(u(f),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,i)};return s.forEach(a=>{a.addEventListener("pointerenter",r,i)}),o}const lr=(t,e)=>e?t===e?!0:lr(t,e.parentElement):!1,Yn=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,lu=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function cu(t){return lu.has(t.tagName)||t.tabIndex!==-1}const Ne=new WeakSet;function cr(t){return e=>{e.key==="Enter"&&t(e)}}function Xn(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const uu=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=cr(()=>{if(Ne.has(n))return;Xn(n,"down");const i=cr(()=>{Xn(n,"up")}),o=()=>Xn(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 ur(t){return Yn(t)&&!rr()}function fu(t,e,n={}){const[s,i,o]=or(t,n),r=a=>{const l=a.currentTarget;if(!ur(a))return;Ne.add(l);const u=e(l,a),c=(d,m)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",h),Ne.has(l)&&Ne.delete(l),ur(d)&&typeof u=="function"&&u(d,{success:m})},f=d=>{c(d,l===window||l===document||n.useGlobalTarget||lr(l,d.target))},h=d=>{c(d,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",h,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,i),sr(a)&&(a.addEventListener("focus",u=>uu(u,i)),!cu(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function fr(t){return ni(t)&&"ownerSVGElement"in t}function hu(t){return fr(t)&&t.tagName==="svg"}const H=t=>!!(t&&t.getVelocity),du=[...Zi,_,Tt],mu=t=>du.find(qi(t)),Gn=S.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});class pu extends C.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const s=n.offsetParent,i=sr(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 gu({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(Gn);return S.useInsertionEffect(()=>{const{width:l,height:u,top:c,left:f,right:h}=r.current;if(e||!o.current||!l||!u)return;const d=n==="left"?`left: ${f}`:`right: ${h}`;o.current.dataset.motionPopId=i;const m=document.createElement("style");a&&(m.nonce=a);const y=s??document.head;return y.appendChild(m),m.sheet&&m.sheet.insertRule(`
|
|
53
|
+
[data-motion-pop-id="${i}"] {
|
|
54
|
+
position: absolute !important;
|
|
55
|
+
width: ${l}px !important;
|
|
56
|
+
height: ${u}px !important;
|
|
57
|
+
${d}px !important;
|
|
58
|
+
top: ${c}px !important;
|
|
59
|
+
}
|
|
60
|
+
`),()=>{y.contains(m)&&y.removeChild(m)}},[e]),b.jsx(pu,{isPresent:e,childRef:o,sizeRef:r,children:C.cloneElement(t,{ref:o})})}const yu=({children:t,initial:e,isPresent:n,onExitComplete:s,custom:i,presenceAffectsLayout:o,mode:r,anchorX:a,root:l})=>{const u=on(vu),c=S.useId();let f=!0,h=S.useMemo(()=>(f=!1,{id:c,initial:e,isPresent:n,custom:i,onExitComplete:d=>{u.set(d,!0);for(const m of u.values())if(!m)return;s&&s()},register:d=>(u.set(d,!1),()=>u.delete(d))}),[n,u,s]);return o&&f&&(h={...h}),S.useMemo(()=>{u.forEach((d,m)=>u.set(m,!1))},[n]),C.useEffect(()=>{!n&&!u.size&&s&&s()},[n]),r==="popLayout"&&(t=b.jsx(gu,{isPresent:n,anchorX:a,root:l,children:t})),b.jsx(Me.Provider,{value:h,children:t})};function vu(){return new Map}function hr(t=!0){const e=S.useContext(Me);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 Fe=t=>t.key||"";function dr(t){const e=[];return S.Children.forEach(t,n=>{S.isValidElement(n)&&e.push(n)}),e}const xu=({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=S.useMemo(()=>dr(t),[t]),h=r&&!u?[]:f.map(Fe),d=S.useRef(!0),m=S.useRef(f),y=on(()=>new Map),[x,v]=S.useState(f),[w,g]=S.useState(f);ti(()=>{d.current=!1,m.current=f;for(let V=0;V<w.length;V++){const R=Fe(w[V]);h.includes(R)?y.delete(R):y.get(R)!==!0&&y.set(R,!1)}},[w,h.length,h.join("-")]);const P=[];if(f!==x){let V=[...f];for(let R=0;R<w.length;R++){const A=w[R],k=Fe(A);h.includes(k)||(V.splice(R,0,A),P.push(A))}return o==="wait"&&P.length&&(V=P),g(dr(V)),v(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(rn);return b.jsx(b.Fragment,{children:w.map(V=>{const R=Fe(V),A=r&&!u?!1:f===w||h.includes(R),k=()=>{if(y.has(R))y.set(R,!0);else return;let L=!0;y.forEach($=>{$||(L=!1)}),L&&(T?.(),g(m.current),r&&c?.(),s&&s())};return b.jsx(yu,{isPresent:A,initial:!d.current||n?void 0:!1,custom:e,presenceAffectsLayout:i,mode:o,root:l,onExitComplete:A?void 0:k,anchorX:a,children:V},R)})})},mr=S.createContext({strict:!1}),pr={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 pr)Wt[t]={isEnabled:e=>pr[t].some(n=>!!e[n])};function bu(t){for(const e in t)Wt[e]={...Wt[e],...t[e]}}const wu=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 Be(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||wu.has(t)}let gr=t=>!Be(t);function Tu(t){typeof t=="function"&&(gr=e=>e.startsWith("on")?!Be(e):t(e))}try{Tu(require("@emotion/is-prop-valid").default)}catch{}function Su(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(gr(i)||n===!0&&Be(i)||!e&&!Be(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const _e=S.createContext({});function $e(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function ae(t){return typeof t=="string"||Array.isArray(t)}const qn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Zn=["initial",...qn];function We(t){return $e(t.animate)||Zn.some(e=>ae(t[e]))}function yr(t){return!!(We(t)||t.variants)}function Pu(t,e){if(We(t)){const{initial:n,animate:s}=t;return{initial:n===!1||ae(n)?n:void 0,animate:ae(s)?s:void 0}}return t.inherit!==!1?e:{}}function Cu(t){const{initial:e,animate:n}=Pu(t,S.useContext(_e));return S.useMemo(()=>({initial:e,animate:n}),[vr(e),vr(n)])}function vr(t){return Array.isArray(t)?t.join(" "):t}const le={};function Au(t){for(const e in t)le[e]=t[e],yn(e)&&(le[e].isCSSVariable=!0)}function xr(t,{layout:e,layoutId:n}){return _t.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!le[t]||t==="opacity")}const Eu={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Vu=Bt.length;function Ru(t,e,n){let s="",i=!0;for(let o=0;o<Vu;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=nr(a,zn[r]);if(!l){i=!1;const c=Eu[r]||r;s+=`${c}(${u}) `}n&&(e[r]=u)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function Jn(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(yn(l)){i[l]=u;continue}else{const c=nr(u,zn[l]);l.startsWith("origin")?(a=!0,o[l]=c):s[l]=c}}if(e.transform||(r||n?s.transform=Ru(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 Qn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function br(t,e,n){for(const s in e)!H(e[s])&&!xr(s,n)&&(t[s]=e[s])}function Mu({transformTemplate:t},e){return S.useMemo(()=>{const n=Qn();return Jn(n,e,t),Object.assign({},n.vars,n.style)},[e])}function Du(t,e){const n=t.style||{},s={};return br(s,n,t),Object.assign(s,Mu(t,e)),s}function ku(t,e){const n={},s=Du(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 ju={offset:"stroke-dashoffset",array:"stroke-dasharray"},Lu={offset:"strokeDashoffset",array:"strokeDasharray"};function Ou(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?ju:Lu;t[o.offset]=E.transform(-s);const r=E.transform(e),a=E.transform(n);t[o.array]=`${r} ${a}`}function wr(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:o=1,pathOffset:r=0,...a},l,u,c){if(Jn(t,a,u),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:f,style:h}=t;f.transform&&(h.transform=f.transform,delete f.transform),(h.transform||f.transformOrigin)&&(h.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),h.transform&&(h.transformBox=c?.transformBox??"fill-box",delete f.transformBox),e!==void 0&&(f.x=e),n!==void 0&&(f.y=n),s!==void 0&&(f.scale=s),i!==void 0&&Ou(f,i,o,r,!1)}const Tr=()=>({...Qn(),attrs:{}}),Sr=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Iu(t,e,n,s){const i=S.useMemo(()=>{const o=Tr();return wr(o,e,Sr(s),t.transformTemplate,t.style),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};br(o,t.style,t),i.style={...o,...i.style}}return i}const Nu=["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 ts(t){return typeof t!="string"||t.includes("-")?!1:!!(Nu.indexOf(t)>-1||/[A-Z]/u.test(t))}function Fu(t,e,n,{latestValues:s},i,o=!1){const a=(ts(t)?Iu:ku)(e,s,i,t),l=Su(e,typeof t=="string",o),u=t!==S.Fragment?{...l,...a,ref:n}:{},{children:c}=e,f=S.useMemo(()=>H(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 es(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 Ue(t){return H(t)?t.get():t}function Bu({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:_u(n,s,i,t),renderState:e()}}function _u(t,e,n,s){const i={},o=s(t,{});for(const h in o)i[h]=Ue(o[h]);let{initial:r,animate:a}=t;const l=We(t),u=yr(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"&&!$e(f)){const h=Array.isArray(f)?f:[f];for(let d=0;d<h.length;d++){const m=es(t,h[d]);if(m){const{transitionEnd:y,transition:x,...v}=m;for(const w in v){let g=v[w];if(Array.isArray(g)){const P=c?g.length-1:0;g=g[P]}g!==null&&(i[w]=g)}for(const w in y)i[w]=y[w]}}}return i}const Cr=t=>(e,n)=>{const s=S.useContext(_e),i=S.useContext(Me),o=()=>Bu(t,e,s,i);return n?o():on(o)};function ns(t,e,n){const{style:s}=t,i={};for(const o in s)(H(s[o])||e.style&&H(e.style[o])||xr(o,t)||n?.getValue(o)?.liveStyle!==void 0)&&(i[o]=s[o]);return i}const $u=Cr({scrapeMotionValuesFromProps:ns,createRenderState:Qn});function Ar(t,e,n){const s=ns(t,e,n);for(const i in t)if(H(t[i])||H(e[i])){const o=Bt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[o]=t[i]}return s}const Wu=Cr({scrapeMotionValuesFromProps:Ar,createRenderState:Tr}),Uu=Symbol.for("motionComponentSymbol");function Ut(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Ku(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 ss=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Er="data-"+ss("framerAppearId"),Vr=S.createContext({});function zu(t,e,n,s,i){const{visualElement:o}=S.useContext(_e),r=S.useContext(mr),a=S.useContext(Me),l=S.useContext(Gn).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(Vr);c&&!c.projection&&i&&(c.type==="html"||c.type==="svg")&&Hu(u.current,n,i,f);const h=S.useRef(!1);S.useInsertionEffect(()=>{c&&h.current&&c.update(n,a)});const d=n[Er],m=S.useRef(!!d&&!window.MotionHandoffIsComplete?.(d)&&window.MotionHasOptimisedAnimation?.(d));return ti(()=>{c&&(h.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?.(d)}),m.current=!1),c.enteringChildren=void 0)}),c}function Hu(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:Rr(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 Rr(t){if(t)return t.options.allowProjection!==!1?t.projection:Rr(t.parent)}function is(t,{forwardMotionProps:e=!1}={},n,s){n&&bu(n);const i=ts(t)?Wu:$u;function o(a,l){let u;const c={...S.useContext(Gn),...a,layoutId:Yu(a)},{isStatic:f}=c,h=Cu(a),d=i(a,f);if(!f&&an){Xu(c,n);const m=Gu(c);u=m.MeasureLayout,h.visualElement=zu(t,d,c,s,m.ProjectionNode)}return b.jsxs(_e.Provider,{value:h,children:[u&&h.visualElement?b.jsx(u,{visualElement:h.visualElement,...c}):null,Fu(t,a,Ku(d,h.visualElement,l),d,f,e)]})}o.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const r=S.forwardRef(o);return r[Uu]=t,r}function Yu({layoutId:t}){const e=S.useContext(rn).id;return e&&t!==void 0?e+"-"+t:t}function Xu(t,e){const n=S.useContext(mr).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?Ot(!1,s,"lazy-strict-mode"):yt(!1,s,"lazy-strict-mode")}}function Gu(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 qu(t,e){if(typeof Proxy>"u")return is;const n=new Map,s=(o,r)=>is(o,r,t,e),i=(o,r)=>(process.env.NODE_ENV!=="production"&&dn(!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,is(r,void 0,t,e)),n.get(r))})}function Mr({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function Zu({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Ju(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 rs(t){return t===void 0||t===1}function os({scale:t,scaleX:e,scaleY:n}){return!rs(t)||!rs(e)||!rs(n)}function Mt(t){return os(t)||Dr(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Dr(t){return kr(t.x)||kr(t.y)}function kr(t){return t&&t!=="0%"}function Ke(t,e,n){const s=t-n,i=e*s;return n+i}function jr(t,e,n,s,i){return i!==void 0&&(t=Ke(t,i,s)),Ke(t,n,s)+e}function as(t,e=0,n=1,s,i){t.min=jr(t.min,e,n,s,i),t.max=jr(t.max,e,n,s,i)}function Lr(t,{x:e,y:n}){as(t.x,e.translate,e.scale,e.originPoint),as(t.y,n.translate,n.scale,n.originPoint)}const Or=.999999999999,Ir=1.0000000000001;function Qu(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,Lr(t,r)),s&&Mt(o.latestValues)&&zt(t,o.latestValues))}e.x<Ir&&e.x>Or&&(e.x=1),e.y<Ir&&e.y>Or&&(e.y=1)}function Kt(t,e){t.min=t.min+e,t.max=t.max+e}function Nr(t,e,n,s,i=.5){const o=O(t.min,t.max,i);as(t,e,n,o,s)}function zt(t,e){Nr(t.x,e.x,e.scaleX,e.scale,e.originX),Nr(t.y,e.y,e.scaleY,e.scale,e.originY)}function Fr(t,e){return Mr(Ju(t.getBoundingClientRect(),e))}function tf(t,e,n){const s=Fr(t,n),{scroll:i}=e;return i&&(Kt(s.x,i.offset.x),Kt(s.y,i.offset.y)),s}const Br=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ht=()=>({x:Br(),y:Br()}),_r=()=>({min:0,max:0}),B=()=>({x:_r(),y:_r()}),ls={current:null},$r={current:!1};function ef(){if($r.current=!0,!!an)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>ls.current=t.matches;t.addEventListener("change",e),e()}else ls.current=!1}const nf=new WeakMap;function sf(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,$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 Wr=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class rf{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=$n,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=Z.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,j.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=We(n),this.isVariantNode=yr(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:c,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in f){const d=f[h];l[h]!==void 0&&H(d)&&d.set(l[h])}}mount(e){this.current=e,nf.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)),$r.current||ef(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ls.current,process.env.NODE_ENV!=="production"&&dn(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(),bt(this.notifyUpdate),bt(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&&j.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):B()}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<Wr.length;s++){const i=Wr[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=sf(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"&&(ei(s)||si(s))?s=parseFloat(s):!mu(s)&&Tt.test(n)&&(s=er(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=es(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 hn),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){Hn.render(this.render)}}class Ur extends rf{constructor(){super(...arguments),this.KeyframeResolver=nu}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 of(t){return window.getComputedStyle(t)}class af extends Ur{constructor(){super(...arguments),this.type="html",this.renderInstance=Kr}readValueFromInstance(e,n){if(_t.has(n))return this.projection?.isProjecting?In(n):wc(e,n);{const s=of(e),i=(yn(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Fr(e,n)}build(e,n,s){Jn(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return ns(e,n,s)}}const zr=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 lf(t,e,n,s){Kr(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(zr.has(i)?i:ss(i),e.attrs[i])}class cf extends Ur{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=B}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(_t.has(n)){const s=tr(n);return s&&s.default||0}return n=zr.has(n)?n:ss(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return Ar(e,n,s)}build(e,n,s){wr(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){lf(e,n,s,i)}mount(e){this.isSVGTag=Sr(e.tagName),super.mount(e)}}const uf=(t,e)=>ts(t)?new cf(e):new af(e,{allowProjection:t!==S.Fragment});function Yt(t,e,n){const s=t.getProps();return es(s,e,n!==void 0?n:s.custom,t)}const cs=t=>Array.isArray(t);function ff(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,$t(n))}function hf(t){return cs(t)?t[t.length-1]||0:t}function df(t,e){const n=Yt(t,e);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const r in o){const a=hf(o[r]);ff(t,r,a)}}function mf(t){return!!(H(t)&&t.add)}function us(t,e){const n=t.getValue("willChange");if(mf(n))return n.add(e);if(!n&&vt.WillChange){const s=new vt.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function Hr(t){return t.props[Er]}const pf=t=>t!==null;function gf(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(pf),o=e&&n!=="loop"&&e%2===1?0:i.length-1;return i[o]}const yf={type:"spring",stiffness:500,damping:25,restSpeed:10},vf=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),xf={type:"keyframes",duration:.8},bf={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},wf=(t,{keyframes:e})=>e.length>2?xf:_t.has(t)?t.startsWith("scale")?vf(e[1]):yf:bf;function Tf({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 fs=(t,e,n,s={},i,o)=>r=>{const a=Un(s,t)||{},l=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-rt(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:h=>{e.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:i};Tf(a)||Object.assign(c,wf(t,c)),c.duration&&(c.duration=rt(c.duration)),c.repeatDelay&&(c.repeatDelay=rt(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let f=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(Wn(c),c.delay===0&&(f=!0)),(vt.instantAnimations||vt.skipAnimations)&&(f=!0,Wn(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,f&&!o&&e.get()!==void 0){const h=gf(c.keyframes,a);if(h!==void 0){j.update(()=>{c.onUpdate(h),c.onComplete()});return}}return a.isSync?new jn(c):new Kc(c)};function Sf({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Yr(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),h=a[c];if(h===void 0||u&&Sf(u,c))continue;const d={delay:n,...Un(o||{},c)},m=f.get();if(m!==void 0&&!f.isAnimating&&!Array.isArray(h)&&h===m&&!d.velocity)continue;let y=!1;if(window.MotionHandoffAnimation){const v=Hr(t);if(v){const w=window.MotionHandoffAnimation(v,c,j);w!==null&&(d.startTime=w,y=!0)}}us(t,c),f.start(fs(c,f,h,t.shouldReduceMotion&&Gi.has(c)?{type:!1}:d,t,y));const x=f.animation;x&&l.push(x)}return r&&Promise.all(l).then(()=>{j.update(()=>{r&&df(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 hs(t,e,n={}){const s=Yt(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(Yr(t,s,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:c,staggerDirection:f}=i;return Pf(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 Pf(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(hs(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 Cf(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>hs(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=hs(t,e,n);else{const i=typeof e=="function"?Yt(t,e,n.custom):e;s=Promise.all(Yr(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}function Gr(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 Af=Zn.length;function qr(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?qr(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<Af;n++){const s=Zn[n],i=t.props[s];(ae(i)||i===!1)&&(e[s]=i)}return e}const Ef=[...qn].reverse(),Vf=qn.length;function Rf(t){return e=>Promise.all(e.map(({animation:n,options:s})=>Cf(t,n,s)))}function Mf(t){let e=Rf(t),n=Zr(),s=!0;const i=l=>(u,c)=>{const f=Yt(t,c,l==="exit"?t.presenceContext?.custom:void 0);if(f){const{transition:h,transitionEnd:d,...m}=f;u={...u,...m,...d}}return u};function o(l){e=l(t)}function r(l){const{props:u}=t,c=qr(t.parent)||{},f=[],h=new Set;let d={},m=1/0;for(let x=0;x<Vf;x++){const v=Ef[x],w=n[v],g=u[v]!==void 0?u[v]:c[v],P=ae(g),T=v===l?w.isActive:null;T===!1&&(m=x);let V=g===c[v]&&g!==u[v]&&P;if(V&&s&&t.manuallyAnimateOnMount&&(V=!1),w.protectedKeys={...d},!w.isActive&&T===null||!g&&!w.prevProp||$e(g)||typeof g=="boolean")continue;const R=Df(w.prevProp,g);let A=R||v===l&&w.isActive&&!V&&P||x>m&&P,k=!1;const L=Array.isArray(g)?g:[g];let $=L.reduce(i(v),{});T===!1&&($={});const{prevResolvedValues:at={}}=w,nt={...at,...$},dt=N=>{A=!0,h.has(N)&&(k=!0,h.delete(N)),w.needsAnimating[N]=!0;const D=t.getValue(N);D&&(D.liveStyle=!1)};for(const N in nt){const D=$[N],q=at[N];if(d.hasOwnProperty(N))continue;let p=!1;cs(D)&&cs(q)?p=!Gr(D,q):p=D!==q,p?D!=null?dt(N):h.add(N):D!==void 0&&h.has(N)?dt(N):w.protectedKeys[N]=!0}w.prevProp=g,w.prevResolvedValues=$,w.isActive&&(d={...d,...$}),s&&t.blockInitialAnimation&&(A=!1);const Pt=V&&R;A&&(!Pt||k)&&f.push(...L.map(N=>{const D={type:v};if(typeof N=="string"&&s&&!Pt&&t.manuallyAnimateOnMount&&t.parent){const{parent:q}=t,p=Yt(q,N);if(q.enteringChildren&&p){const{delayChildren:M}=p.transition||{};D.delay=Xr(q.enteringChildren,t,M)}}return{animation:N,options:D}}))}if(h.size){const x={};if(typeof u.initial!="boolean"){const v=Yt(t,Array.isArray(u.initial)?u.initial[0]:u.initial);v&&v.transition&&(x.transition=v.transition)}h.forEach(v=>{const w=t.getBaseTarget(v),g=t.getValue(v);g&&(g.liveStyle=!0),x[v]=w??null}),f.push({animation:x})}let y=!!f.length;return s&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(y=!1),s=!1,y?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=Zr(),s=!0}}}function Df(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Gr(e,t):!1}function Dt(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Zr(){return{animate:Dt(!0),whileInView:Dt(),whileHover:Dt(),whileTap:Dt(),whileDrag:Dt(),whileFocus:Dt(),exit:Dt()}}class St{constructor(e){this.isMounted=!1,this.node=e}update(){}}class kf extends St{constructor(e){super(e),e.animationState||(e.animationState=Mf(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();$e(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 jf=0;class Lf extends St{constructor(){super(...arguments),this.id=jf++}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 Of={animation:{Feature:kf},exit:{Feature:Lf}};function ce(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function ue(t){return{point:{x:t.pageX,y:t.pageY}}}const If=t=>e=>Yn(e)&&t(e,ue(e));function fe(t,e,n,s){return ce(t,e,If(n),s)}const Jr=1e-4,Nf=1-Jr,Ff=1+Jr,Qr=.01,Bf=0-Qr,_f=0+Qr;function G(t){return t.max-t.min}function $f(t,e,n){return Math.abs(t-e)<=n}function to(t,e,n,s=.5){t.origin=s,t.originPoint=O(e.min,e.max,t.origin),t.scale=G(n)/G(e),t.translate=O(n.min,n.max,t.origin)-t.originPoint,(t.scale>=Nf&&t.scale<=Ff||isNaN(t.scale))&&(t.scale=1),(t.translate>=Bf&&t.translate<=_f||isNaN(t.translate))&&(t.translate=0)}function he(t,e,n,s){to(t.x,e.x,n.x,s?s.originX:void 0),to(t.y,e.y,n.y,s?s.originY:void 0)}function eo(t,e,n){t.min=n.min+e.min,t.max=t.min+G(e)}function Wf(t,e,n){eo(t.x,e.x,n.x),eo(t.y,e.y,n.y)}function no(t,e,n){t.min=e.min-n.min,t.max=t.min+G(e)}function de(t,e,n){no(t.x,e.x,n.x),no(t.y,e.y,n.y)}function tt(t){return[t("x"),t("y")]}const so=({current:t})=>t?t.ownerDocument.defaultView:null,io=(t,e)=>Math.abs(t-e);function Uf(t,e){const n=io(t.x,e.x),s=io(t.y,e.y);return Math.sqrt(n**2+s**2)}class ro{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 h=ms(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,m=Uf(h.offset,{x:0,y:0})>=this.distanceThreshold;if(!d&&!m)return;const{point:y}=h,{timestamp:x}=K;this.history.push({...y,timestamp:x});const{onStart:v,onMove:w}=this.handlers;d||(v&&v(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,h)},this.handlePointerMove=(h,d)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=ds(d,this.transformPagePoint),j.update(this.updatePoint,!0)},this.handlePointerUp=(h,d)=>{this.end();const{onEnd:m,onSessionEnd:y,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=ms(h.type==="pointercancel"?this.lastMoveEventInfo:ds(d,this.transformPagePoint),this.history);this.startEvent&&m&&m(h,v),y&&y(h,v)},!Yn(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=r,this.contextWindow=i||window;const a=ue(e),l=ds(a,this.transformPagePoint),{point:u}=l,{timestamp:c}=K;this.history=[{...u,timestamp:c}];const{onSessionStart:f}=n;f&&f(e,ms(l,this.history)),this.removeListeners=Qt(fe(this.contextWindow,"pointermove",this.handlePointerMove),fe(this.contextWindow,"pointerup",this.handlePointerUp),fe(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),bt(this.updatePoint)}}function ds(t,e){return e?{point:e(t.point)}:t}function oo(t,e){return{x:t.x-e.x,y:t.y-e.y}}function ms({point:t},e){return{point:t,delta:oo(t,ao(e)),offset:oo(t,Kf(e)),velocity:zf(e,.1)}}function Kf(t){return t[0]}function ao(t){return t[t.length-1]}function zf(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=ao(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>rt(e)));)n--;if(!s)return{x:0,y:0};const o=ft(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 Hf(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?O(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?O(n,t,s.max):Math.min(t,n)),t}function lo(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 Yf(t,{top:e,left:n,bottom:s,right:i}){return{x:lo(t.x,n,i),y:lo(t.y,e,s)}}function co(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 Xf(t,e){return{x:co(t.x,e.x),y:co(t.y,e.y)}}function Gf(t,e){let n=.5;const s=G(t),i=G(e);return i>s?n=te(e.min,e.max-s,t.min):s>i&&(n=te(t.min,t.max-i,e.min)),gt(0,1,n)}function qf(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 ps=.35;function Zf(t=ps){return t===!1?t=0:t===!0&&(t=ps),{x:uo(t,"left","right"),y:uo(t,"top","bottom")}}function uo(t,e,n){return{min:fo(t,e),max:fo(t,n)}}function fo(t,e){return typeof t=="number"?t:t[e]||0}const Jf=new WeakMap;class Qf{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=B(),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:h}=this.getProps();h?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(ue(f).point)},r=(f,h)=>{const{drag:d,dragPropagation:m,onDragStart:y}=this.getProps();if(d&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=ou(d),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=h,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),tt(v=>{let w=this.getAxisMotionValue(v).get()||0;if(ht.test(w)){const{projection:g}=this.visualElement;if(g&&g.layout){const P=g.layout.layoutBox[v];P&&(w=G(P)*(parseFloat(w)/100))}}this.originPoint[v]=w}),y&&j.postRender(()=>y(f,h)),us(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},a=(f,h)=>{this.latestPointerEvent=f,this.latestPanInfo=h;const{dragPropagation:d,dragDirectionLock:m,onDirectionLock:y,onDrag:x}=this.getProps();if(!d&&!this.openDragLock)return;const{offset:v}=h;if(m&&this.currentDirection===null){this.currentDirection=th(v),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",h.point,v),this.updateAxis("y",h.point,v),this.visualElement.render(),x&&x(f,h)},l=(f,h)=>{this.latestPointerEvent=f,this.latestPanInfo=h,this.stop(f,h),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>tt(f=>this.getAnimationState(f)==="paused"&&this.getAxisMotionValue(f).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new ro(e,{onSessionStart:o,onStart:r,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:s,contextWindow:so(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&&j.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||!ze(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(r=Hf(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=Yf(s.layoutBox,e):this.constraints=!1,this.elastic=Zf(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&tt(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=qf(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=tf(s,i.root,this.visualElement.getTransformPagePoint());let r=Xf(i.layout.layoutBox,o);if(n){const a=n(Zu(r));this.hasMutatedConstraints=!!a,a&&(r=Mr(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(!ze(c,n,this.currentDirection))return;let f=l&&l[c]||{};r&&(f={min:0,max:0});const h=i?200:1e6,d=i?40:1e7,m={type:"inertia",velocity:s?e[c]:0,bounceStiffness:h,bounceDamping:d,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 us(this.visualElement,e),s.start(fs(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(!ze(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]-O(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]=Gf({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(!ze(r,e,null))return;const a=this.getAxisMotionValue(r),{min:l,max:u}=this.constraints[r];a.set(O(l,u,i[r]))})}addListeners(){if(!this.visualElement.current)return;Jf.set(this.visualElement,this);const e=this.visualElement.current,n=fe(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()),j.read(s);const r=ce(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=ps,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function ze(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function th(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class eh extends St{constructor(e){super(e),this.removeGroupControls=Q,this.removeListeners=Q,this.controls=new Qf(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 ho=t=>(e,n)=>{t&&j.postRender(()=>t(e,n))};class nh extends St{constructor(){super(...arguments),this.removePointerDownListener=Q}onPointerDown(e){this.session=new ro(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:so(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:ho(e),onStart:ho(n),onMove:s,onEnd:(o,r)=>{delete this.session,i&&j.postRender(()=>i(o,r))}}}mount(){this.removePointerDownListener=fe(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 He={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function mo(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const me={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(E.test(t))t=parseFloat(t);else return t;const n=mo(t,e.target.x),s=mo(t,e.target.y);return`${n}% ${s}%`}},sh={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=Tt.parse(t);if(i.length>5)return s;const o=Tt.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=O(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 gs=!1;class ih extends S.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=e;Au(rh),o&&(n.group&&n.group.add(o),s&&s.register&&i&&s.register(o),gs&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),He.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,{projection:r}=s;return r&&(r.isPresent=o,gs=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==o?r.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?r.promote():r.relegate()||j.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Hn.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;gs=!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 po(t){const[e,n]=hr(),s=S.useContext(rn);return b.jsx(ih,{...t,layoutGroup:s,switchLayoutGroup:S.useContext(Vr),isPresent:e,safeToRemove:n})}const rh={borderRadius:{...me,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:me,borderTopRightRadius:me,borderBottomLeftRadius:me,borderBottomRightRadius:me,boxShadow:sh};function oh(t,e,n){const s=H(t)?t:$t(t);return s.start(fs("",s,e,n)),s.animation}const ah=(t,e)=>t.depth-e.depth;class lh{constructor(){this.children=[],this.isDirty=!1}add(e){ln(this.children,e),this.isDirty=!0}remove(e){cn(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(ah),this.isDirty=!1,this.children.forEach(e)}}function ch(t,e){const n=Z.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(bt(s),t(o-e))};return j.setup(s,!0),()=>bt(s)}const go=["TopLeft","TopRight","BottomLeft","BottomRight"],uh=go.length,yo=t=>typeof t=="string"?parseFloat(t):t,vo=t=>typeof t=="number"||E.test(t);function fh(t,e,n,s,i,o){i?(t.opacity=O(0,n.opacity??1,hh(s)),t.opacityExit=O(e.opacity??1,0,dh(s))):o&&(t.opacity=O(e.opacity??1,n.opacity??1,s));for(let r=0;r<uh;r++){const a=`border${go[r]}Radius`;let l=xo(e,a),u=xo(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||vo(l)===vo(u)?(t[a]=Math.max(O(yo(l),yo(u),s),0),(ht.test(u)||ht.test(l))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=O(e.rotate||0,n.rotate||0,s))}function xo(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const hh=bo(0,.5,hi),dh=bo(.5,.95,Q);function bo(t,e,n){return s=>s<t?0:s>e?1:n(te(t,e,s))}function wo(t,e){t.min=e.min,t.max=e.max}function et(t,e){wo(t.x,e.x),wo(t.y,e.y)}function To(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function So(t,e,n,s,i){return t-=e,t=Ke(t,1/n,s),i!==void 0&&(t=Ke(t,1/i,s)),t}function mh(t,e=0,n=1,s=.5,i,o=t,r=t){if(ht.test(e)&&(e=parseFloat(e),e=O(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=O(o.min,o.max,s);t===o&&(a-=e),t.min=So(t.min,e,n,a,i),t.max=So(t.max,e,n,a,i)}function Po(t,e,[n,s,i],o,r){mh(t,e[n],e[s],e[i],e.scale,o,r)}const ph=["x","scaleX","originX"],gh=["y","scaleY","originY"];function Co(t,e,n,s){Po(t.x,e,ph,n?n.x:void 0,s?s.x:void 0),Po(t.y,e,gh,n?n.y:void 0,s?s.y:void 0)}function Ao(t){return t.translate===0&&t.scale===1}function Eo(t){return Ao(t.x)&&Ao(t.y)}function Vo(t,e){return t.min===e.min&&t.max===e.max}function yh(t,e){return Vo(t.x,e.x)&&Vo(t.y,e.y)}function Ro(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Mo(t,e){return Ro(t.x,e.x)&&Ro(t.y,e.y)}function Do(t){return G(t.x)/G(t.y)}function ko(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class vh{constructor(){this.members=[]}add(e){ln(this.members,e),e.scheduleRender()}remove(e){if(cn(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 xh(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:h,skewX:d,skewY:m}=n;u&&(s=`perspective(${u}px) ${s}`),c&&(s+=`rotate(${c}deg) `),f&&(s+=`rotateX(${f}deg) `),h&&(s+=`rotateY(${h}deg) `),d&&(s+=`skewX(${d}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 ys=["","X","Y","Z"],bh=1e3;let wh=0;function vs(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function jo(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",j,!(i||o))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&jo(s)}function Lo({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},a=e?.()){this.id=wh++,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(Ph),this.nodes.forEach(Vh),this.nodes.forEach(Rh),this.nodes.forEach(Ch)},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 lh)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new hn),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=fr(r)&&!hu(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 h=()=>this.root.updateBlockedByResize=!1;j.read(()=>{f=window.innerWidth}),t(r,()=>{const d=window.innerWidth;d!==f&&(f=d,this.root.updateBlockedByResize=!0,c&&c(),c=ch(h,250),He.hasAnimatedSinceResize&&(He.hasAnimatedSinceResize=!1,this.nodes.forEach(No)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:f,hasRelativeLayoutChanged:h,layout:d})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||Lh,{onLayoutAnimationStart:y,onLayoutAnimationComplete:x}=u.getProps(),v=!this.targetLayout||!Mo(this.targetLayout,d),w=!f&&h;if(this.options.layoutRoot||this.resumeFrom||w||f&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const g={...Un(m,"layout"),onPlay:y,onComplete:x};(u.shouldReduceMotion||this.options.layoutRoot)&&(g.delay=0,g.type=!1),this.startAnimation(g),this.setAnimationOrigin(c,w)}else f||No(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=d})}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(),bt(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(Mh),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&&jo(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(Oo);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Io);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Eh),this.nodes.forEach(Th),this.nodes.forEach(Sh)):this.nodes.forEach(Io),this.clearAllSnapshots();const a=Z.now();K.delta=gt(0,1e3/60,a-K.timestamp),K.timestamp=a,K.isProcessing=!0,gn.update.process(K),gn.preRender.process(K),gn.render.process(K),K.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Hn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Ah),this.sharedNodes.forEach(Dh)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,j.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){j.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!G(this.snapshot.measuredBox.x)&&!G(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=B(),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&&!Eo(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;r&&this.instance&&(a||Mt(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)),Oh(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return B();const a=r.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Ih))){const{scroll:u}=this.root;u&&(Kt(a.x,u.offset.x),Kt(a.y,u.offset.y))}return a}removeElementScroll(r){const a=B();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),Kt(a.x,c.offset.x),Kt(a.y,c.offset.y))}return a}applyTransform(r,a=!1){const l=B();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&&zt(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Mt(c.latestValues)&&zt(l,c.latestValues)}return Mt(this.latestValues)&&zt(l,this.latestValues),l}removeTransform(r){const a=B();et(a,r);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!Mt(u.latestValues))continue;os(u.latestValues)&&u.updateSnapshot();const c=B(),f=u.measurePageBox();et(c,f),Co(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return Mt(this.latestValues)&&Co(a,this.latestValues),a}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==K.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(r||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:f}=this.options;if(!(!this.layout||!(c||f))){if(this.resolvedRelativeTargetAt=K.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=B(),this.relativeTargetOrigin=B(),de(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),et(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=B(),this.targetWithTransforms=B()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Wf(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):et(this.target,this.layout.layoutBox),Lr(this.target,this.targetDelta)):et(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=B(),this.relativeTargetOrigin=B(),de(this.relativeTargetOrigin,this.target,h.target),et(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||os(this.parent.latestValues)||Dr(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const r=this.getLead(),a=!!this.resumingFrom||this!==r;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===K.timestamp&&(l=!1),l)return;const{layout:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;et(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;Qu(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=B());const{target:d}=r;if(!d){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(To(this.prevProjectionDelta.x,this.projectionDelta.x),To(this.prevProjectionDelta.y,this.projectionDelta.y)),he(this.projectionDelta,this.layoutCorrected,d,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!ko(this.projectionDelta.x,this.prevProjectionDelta.x)||!ko(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d))}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=Ht(),this.projectionDelta=Ht(),this.projectionDeltaWithTransform=Ht()}setAnimationOrigin(r,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},f=Ht();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=B(),d=l?l.source:void 0,m=this.layout?this.layout.source:void 0,y=d!==m,x=this.getStack(),v=!x||x.members.length<=1,w=!!(y&&!v&&this.options.crossfade===!0&&!this.path.some(jh));this.animationProgress=0;let g;this.mixTargetDelta=P=>{const T=P/1e3;Fo(f.x,r.x,T),Fo(f.y,r.y,T),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(de(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),kh(this.relativeTarget,this.relativeTargetOrigin,h,T),g&&yh(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=B()),et(g,this.relativeTarget)),y&&(this.animationValues=c,fh(c,u,this.latestValues,T,w,v)),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&&(bt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=j.update(()=>{He.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=$t(0)),this.currentAnimation=oh(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(bh),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&&Uo(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||B();const f=G(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+f;const h=G(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+h}et(a,l),zt(a,c),he(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new vh),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&&vs("z",r,u,this.animationValues);for(let c=0;c<ys.length;c++)vs(`rotate${ys[c]}`,r,u,this.animationValues),vs(`skew${ys[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=Ue(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=Ue(a?.pointerEvents)||""),this.hasProjected&&!Mt(this.latestValues)&&(r.transform=l?l({},""):"none",this.hasProjected=!1);return}r.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let f=xh(this.projectionDeltaWithTransform,this.treeScale,c);l&&(f=l(c,f)),r.transform=f;const{x:h,y:d}=this.projectionDelta;r.transformOrigin=`${h.origin*100}% ${d.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 le){if(c[m]===void 0)continue;const{correct:y,applyTo:x,isCSSVariable:v}=le[m],w=f==="none"?c[m]:y(c[m],u);if(x){const g=x.length;for(let P=0;P<g;P++)r[x[P]]=w}else v?this.options.visualElement.renderState.vars[m]=w:r[m]=w}this.options.layoutId&&(r.pointerEvents=u===this?Ue(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>r.currentAnimation?.stop()),this.root.nodes.forEach(Oo),this.root.sharedNodes.clear()}}}function Th(t){t.updateLayout()}function Sh(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],h=G(f);f.min=n[c].min,f.max=f.min+h}):Uo(i,e.layoutBox,n)&&tt(c=>{const f=o?e.measuredBox[c]:e.layoutBox[c],h=G(n[c]);f.max=f.min+h,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[c].max=t.relativeTarget[c].min+h)});const r=Ht();he(r,n,e.layoutBox);const a=Ht();o?he(a,t.applyTransform(s,!0),e.measuredBox):he(a,n,e.layoutBox);const l=!Eo(r);let u=!1;if(!t.resumeFrom){const c=t.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:f,layout:h}=c;if(f&&h){const d=B();de(d,e.layoutBox,f.layoutBox);const m=B();de(m,n,h.layoutBox),Mo(d,m)||(u=!0),c.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=d,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 Ph(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 Ch(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Ah(t){t.clearSnapshot()}function Oo(t){t.clearMeasurements()}function Io(t){t.isLayoutDirty=!1}function Eh(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function No(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Vh(t){t.resolveTargetDelta()}function Rh(t){t.calcProjection()}function Mh(t){t.resetSkewAndRotation()}function Dh(t){t.removeLeadSnapshot()}function Fo(t,e,n){t.translate=O(e.translate,0,n),t.scale=O(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Bo(t,e,n,s){t.min=O(e.min,n.min,s),t.max=O(e.max,n.max,s)}function kh(t,e,n,s){Bo(t.x,e.x,n.x,s),Bo(t.y,e.y,n.y,s)}function jh(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Lh={duration:.45,ease:[.4,0,.1,1]},_o=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),$o=_o("applewebkit/")&&!_o("chrome/")?Math.round:Q;function Wo(t){t.min=$o(t.min),t.max=$o(t.max)}function Oh(t){Wo(t.x),Wo(t.y)}function Uo(t,e,n){return t==="position"||t==="preserve-aspect"&&!$f(Do(e),Do(n),.2)}function Ih(t){return t!==t.root&&t.scroll?.wasRoot}const Nh=Lo({attachResizeListener:(t,e)=>ce(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),xs={current:void 0},Ko=Lo({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!xs.current){const t=new Nh({});t.mount(window),t.setOptions({layoutScroll:!0}),xs.current=t}return xs.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Fh={pan:{Feature:nh},drag:{Feature:eh,ProjectionNode:Ko,MeasureLayout:po}};function zo(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&&j.postRender(()=>o(e,ue(e)))}class Bh extends St{mount(){const{current:e}=this.node;e&&(this.unmount=au(e,(n,s)=>(zo(this.node,s,"Start"),i=>zo(this.node,i,"End"))))}unmount(){}}class _h extends St{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=Qt(ce(this.node.current,"focus",()=>this.onFocus()),ce(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&&j.postRender(()=>o(e,ue(e)))}class $h extends St{mount(){const{current:e}=this.node;e&&(this.unmount=fu(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 bs=new WeakMap,ws=new WeakMap,Wh=t=>{const e=bs.get(t.target);e&&e(t)},Uh=t=>{t.forEach(Wh)};function Kh({root:t,...e}){const n=t||document;ws.has(n)||ws.set(n,{});const s=ws.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(Uh,{root:t,...e})),s[i]}function zh(t,e,n){const s=Kh(e);return bs.set(t,n),s.observe(t),()=>{bs.delete(t),s.unobserve(t)}}const Hh={some:0,all:1};class Yh extends St{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:Hh[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:f}=this.node.getProps(),h=u?c:f;h&&h(l)};return zh(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(Xh(e,n))&&this.startObserver()}unmount(){}}function Xh({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Gh={...Of,...{inView:{Feature:Yh},tap:{Feature:$h},focus:{Feature:_h},hover:{Feature:Bh}},...Fh,...{layout:{ProjectionNode:Ko,MeasureLayout:po}}},qh=qu(Gh,uf),Zh={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"},Jh=C.memo(({open:t,children:e,className:n,onOutsideClick:s,floatingStyles:i,setFloating:o,placement:r})=>b.jsx(xu,{children:t&&b.jsxs(b.Fragment,{children:[s&&b.jsx(yl,{onClick:s}),b.jsx("div",{ref:o,style:i,className:"z-10",children:b.jsx(qh.div,{className:n,style:{transformOrigin:Zh[r]},initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.1,ease:"easeInOut"},children:e})})]})})),Qh=t=>{const{placement:e="bottom",onOutsideClick:n,fullWidth:s,minWidth:i,maxWidth:o}=t,r=C.useMemo(()=>[rl({apply({rects:f,elements:h}){s&&(h.floating.style.width=`${f.reference.width}px`),i&&(h.floating.style.minWidth=`${i}px`),o&&(h.floating.style.maxWidth=`${o}px`)}})],[s,i]),{refs:a,floatingStyles:l}=xl({placement:e,middleware:r}),u=C.useRef({onOutsideClick:n,floatingStyles:l,setFloating:a.setFloating,placement:e});u.current={onOutsideClick:n,floatingStyles:l,setFloating:a.setFloating,placement:e};const c=C.useMemo(()=>{const f=h=>{const{floatingStyles:d,setFloating:m,onOutsideClick:y,placement:x}=u.current,{className:v,open:w,children:g}=h;return b.jsx(Jh,{open:w,className:v,onOutsideClick:y,floatingStyles:d,setFloating:m,placement:x,children:g})};return C.memo(f)},[]);return{anchorRef:a.setReference,Popover:c}},td="flex flex-col bg-white border mt-1 border-gray-200 rounded-xl shadow-lg p-3 overflow-y-auto relative",ed=t=>{const{className:e,children:n,...s}=t;return b.jsx("div",{className:U(td,e),...s,children:n})},Ts=t=>{const{onClick:e,Icon:n}=t;return b.jsx("div",{onClick:e,className:U("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:b.jsx(n,{className:U("h-5 w-5 text-gray-500",e&&"group-active:scale-[0.8] transition-transform origin-center")})})},nd=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),h=C.useRef(null),d=i?.find(x=>x.value===r);S.useEffect(()=>{c&&h.current?.focus({preventScroll:!0})},[c]);const{anchorRef:m,Popover:y}=Qh({placement:"bottom",fullWidth:!0,onOutsideClick:()=>f(!1)});return b.jsxs("div",{className:U("flex flex-col",e),children:[b.jsx(Ye,{children:n}),b.jsxs("div",{className:"relative flex w-full flex-col",ref:m,children:[b.jsxs("div",{ref:h,role:"button",tabIndex:0,className:U("flex flex-row items-center h-12 pl-4 pr-10 border border-gray-200 text-gray-900 placeholder:text-gray-400 bg-white transition-all duration-150 rounded-xl shadow-sm ring-0 ring-gray-900/10 focus:ring-4 focus:outline-none select-none",u&&"border-red-600 ring-red-600/20 !pr-10",c&&"ring-4"),onKeyDown:x=>x.key===" "&&f(v=>!v),onClick:()=>f(!c),children:[d&&b.jsx("span",{children:d.label}),!d&&a&&b.jsx("span",{children:a})]}),b.jsxs(Ge,{children:[u&&b.jsx(Xe,{}),!!r&&b.jsx(Ts,{Icon:ha,onClick:()=>o(null)}),b.jsx(Ts,{Icon:Ms})]}),b.jsx(y,{open:c,children:b.jsx(ed,{className:"!p-0",style:{maxHeight:l},children:b.jsx("div",{className:"flex flex-col p-2 gap-1",children:i.map(x=>{const v=x.value===r;return b.jsx(pa,{onClick:()=>{!x.disabled&&o&&(o(x.value),f(!1))},selected:v,disabled:x.disabled,children:x.label},String(x.value))})})})})]}),b.jsx(ye,{children:s}),b.jsx(ve,{children:u})]})},sd=t=>{const{className:e,label:n,description:s,options:i,error:o,...r}=t;return b.jsxs("div",{className:U("flex flex-col",e),children:[b.jsx(Ye,{children:n}),b.jsxs("div",{className:"relative flex w-full flex-col",children:[b.jsx("select",{className:`
|
|
61
|
+
appearance-none
|
|
62
|
+
h-12
|
|
63
|
+
pl-4
|
|
64
|
+
pr-10
|
|
65
|
+
border
|
|
66
|
+
border-gray-200
|
|
67
|
+
text-gray-900
|
|
68
|
+
placeholder:text-gray-400
|
|
69
|
+
bg-white
|
|
70
|
+
bg-none
|
|
71
|
+
transition-all
|
|
72
|
+
duration-150
|
|
73
|
+
rounded-xl
|
|
74
|
+
shadow-sm
|
|
75
|
+
ring-0
|
|
76
|
+
ring-gray-900/10
|
|
77
|
+
focus:ring-4
|
|
78
|
+
focus:outline-none
|
|
79
|
+
`,...r,children:i&&i.map((a,l)=>b.jsx("option",{value:a.value,disabled:a.disabled,children:a.label},l))}),b.jsxs(Ge,{children:[o&&b.jsx(Xe,{}),b.jsx(Ts,{Icon:Ms})]})]}),b.jsx(ye,{children:s}),b.jsx(ve,{children:o})]})},id=C.forwardRef((t,e)=>{const{className:n,children:s,...i}=t;return b.jsx("div",{ref:e,className:U("flex flex-col gap-6 border border-gray-200 rounded-xl bg-white shadow-sm px-6 py-6",n),...i,children:s})}),rd=t=>{const{className:e,vertical:n=!1,...s}=t;return b.jsx("div",{className:U(n?"w-px h-full bg-gray-200":"w-full h-px bg-gray-200",e),...s})},od=t=>{const{columns:e,rows:n}=t;return b.jsxs("table",{children:[b.jsx("thead",{children:b.jsx("tr",{className:"text-left",children:e.map(s=>b.jsx("th",{children:s.header},s.id))})}),b.jsx("tbody",{children:n.map((s,i)=>b.jsx("tr",{children:e.map(o=>b.jsx("td",{children:o.renderCell(s)},o.id))},i))})]})},ad=[{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"}],ld=[{id:"id",header:"ID",renderCell:t=>t.id},{id:"email",header:"Email",renderCell:t=>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:t=>t.status}],cd=()=>b.jsxs("div",{className:"flex flex-col gap-12",children:[b.jsx(Ds,{type:"text",label:"Label",description:"Description",placeholder:"Enter something"}),b.jsx(od,{columns:ld,rows:ad})]});W.Button=ea,W.ButtonIconRound=ca,W.ButtonIconSquare=ra,W.Divider=rd,W.Input=Ds,W.InputCheck=ma,W.InputSelect=nd,W.InputSelectNative=sd,W.Panel=id,W.Test=cd,Object.defineProperty(W,Symbol.toStringTag,{value:"Module"})}));
|
|
80
|
+
//# sourceMappingURL=mat-ui.umd.cjs.map
|