@snowbomb1/nova-ui 1.0.9 → 1.0.11

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.
Files changed (38) hide show
  1. package/dist/index.d.ts +307 -13
  2. package/dist/index.js +32 -7
  3. package/dist/nova-ui.css +1 -2
  4. package/dist/styles.d.ts +2 -0
  5. package/package.json +2 -2
  6. package/dist/Box.d.ts +0 -2
  7. package/dist/chunks/Box-ByLjqYJZ.js +0 -4670
  8. package/dist/chunks/Box-vMWmmOuo.js +0 -6
  9. package/dist/components/Box/Box.d.ts +0 -6
  10. package/dist/components/Box/index.d.ts +0 -1
  11. package/dist/components/Box/index.js +0 -1
  12. package/dist/components/Button/Button.d.ts +0 -11
  13. package/dist/components/Button/index.d.ts +0 -1
  14. package/dist/components/FormField/FormField.d.ts +0 -7
  15. package/dist/components/FormField/index.d.ts +0 -1
  16. package/dist/components/Header/Header.d.ts +0 -6
  17. package/dist/components/Header/index.d.ts +0 -1
  18. package/dist/components/Input/Input.d.ts +0 -8
  19. package/dist/components/Input/index.d.ts +0 -1
  20. package/dist/components/Modal/Modal.d.ts +0 -9
  21. package/dist/components/Modal/index.d.ts +0 -1
  22. package/dist/components/Select/Select.d.ts +0 -15
  23. package/dist/components/Select/index.d.ts +0 -1
  24. package/dist/components/Toggle/Toggle.d.ts +0 -7
  25. package/dist/components/Toggle/index.d.ts +0 -1
  26. package/dist/components/Tooltip/Tooltip.d.ts +0 -7
  27. package/dist/components/Tooltip/index.d.ts +0 -1
  28. package/dist/components/TopNav/ThemeToggler.d.ts +0 -1
  29. package/dist/components/TopNav/TopNav.d.ts +0 -7
  30. package/dist/components/TopNav/index.d.ts +0 -1
  31. package/dist/components/Viewer/Viewer.d.ts +0 -15
  32. package/dist/components/Viewer/ViewerLoader.d.ts +0 -6
  33. package/dist/components/Viewer/index.d.ts +0 -1
  34. package/dist/hooks/useKeyboardShortcuts.d.ts +0 -7
  35. package/dist/hooks/useMediaLoader.d.ts +0 -11
  36. package/dist/hooks/useTheme.d.ts +0 -6
  37. package/dist/icons/close.d.ts +0 -6
  38. package/dist/icons/hamburger.d.ts +0 -6
package/dist/index.js CHANGED
@@ -1,9 +1,34 @@
1
- const e=require(`./chunks/Box-vMWmmOuo.js`);let t=require(`react`);t=e.f(t);let n=require(`react-dom`);function r(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function i(...e){return t=>{let n=!1,i=e.map(e=>{let i=r(e,t);return!n&&typeof i==`function`&&(n=!0),i});if(n)return()=>{for(let t=0;t<i.length;t++){let n=i[t];typeof n==`function`?n():r(e[t],null)}}}}function a(...e){return t.useCallback(i(...e),e)}var o=e.u(),s=class extends t.Component{getSnapshotBeforeUpdate(t){let n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let t=n.offsetParent,r=e.a(t)&&t.offsetWidth||0,i=e.a(t)&&t.offsetHeight||0,a=this.props.sizeRef.current;a.height=n.offsetHeight||0,a.width=n.offsetWidth||0,a.top=n.offsetTop,a.left=n.offsetLeft,a.right=r-a.width-a.left,a.bottom=i-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}};function c({children:n,isPresent:r,anchorX:i,anchorY:c,root:l,pop:u}){let d=(0,t.useId)(),f=(0,t.useRef)(null),p=(0,t.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:m}=(0,t.useContext)(e.i),h=a(f,n.props?.ref??n?.ref);return(0,t.useInsertionEffect)(()=>{let{width:e,height:t,top:n,left:a,right:o,bottom:s}=p.current;if(r||u===!1||!f.current||!e||!t)return;let h=i===`left`?`left: ${a}`:`right: ${o}`,g=c===`bottom`?`bottom: ${s}`:`top: ${n}`;f.current.dataset.motionPopId=d;let _=document.createElement(`style`);m&&(_.nonce=m);let v=l??document.head;return v.appendChild(_),_.sheet&&_.sheet.insertRule(`
2
- [data-motion-pop-id="${d}"] {
1
+ (function(L,g){typeof exports=="object"&&typeof module<"u"?g(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],g):(L=typeof globalThis<"u"?globalThis:L||self,g(L.NovaUI={},L.React,L.ReactDOM))})(this,(function(L,g,Dr){"use strict";var jr;function Lr(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const E=Lr(g);var pt={exports:{}},Ze={};/**
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 fs;function Rr(){if(fs)return Ze;fs=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(s,i,r){var o=null;if(r!==void 0&&(o=""+r),i.key!==void 0&&(o=""+i.key),"key"in i){r={};for(var a in i)a!=="key"&&(r[a]=i[a])}else r=i;return i=r.ref,{$$typeof:e,type:s,key:o,ref:i!==void 0?i:null,props:r}}return Ze.Fragment=t,Ze.jsx=n,Ze.jsxs=n,Ze}var qe={};/**
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 ms;function Ir(){return ms||(ms=1,process.env.NODE_ENV!=="production"&&(function(){function e(v){if(v==null)return null;if(typeof v=="function")return v.$$typeof===ee?null:v.displayName||v.name||null;if(typeof v=="string")return v;switch(v){case _:return"Fragment";case b:return"Profiler";case y:return"StrictMode";case M:return"Suspense";case j:return"SuspenseList";case B:return"Activity"}if(typeof v=="object")switch(typeof v.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),v.$$typeof){case x:return"Portal";case P:return v.displayName||"Context";case w:return(v._context.displayName||"Context")+".Consumer";case T:var V=v.render;return v=v.displayName,v||(v=V.displayName||V.name||"",v=v!==""?"ForwardRef("+v+")":"ForwardRef"),v;case C:return V=v.displayName||null,V!==null?V:e(v.type)||"Memo";case k:V=v._payload,v=v._init;try{return e(v(V))}catch{}}return null}function t(v){return""+v}function n(v){try{t(v);var V=!1}catch{V=!0}if(V){V=console;var O=V.error,z=typeof Symbol=="function"&&Symbol.toStringTag&&v[Symbol.toStringTag]||v.constructor.name||"Object";return O.call(V,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",z),t(v)}}function s(v){if(v===_)return"<>";if(typeof v=="object"&&v!==null&&v.$$typeof===k)return"<...>";try{var V=e(v);return V?"<"+V+">":"<...>"}catch{return"<...>"}}function i(){var v=ae.A;return v===null?null:v.getOwner()}function r(){return Error("react-stack-top-frame")}function o(v){if(A.call(v,"key")){var V=Object.getOwnPropertyDescriptor(v,"key").get;if(V&&V.isReactWarning)return!1}return v.key!==void 0}function a(v,V){function O(){te||(te=!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)",V))}O.isReactWarning=!0,Object.defineProperty(v,"key",{get:O,configurable:!0})}function l(){var v=e(this.type);return D[v]||(D[v]=!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.")),v=this.props.ref,v!==void 0?v:null}function u(v,V,O,z,Wt,ds){var K=O.ref;return v={$$typeof:p,type:v,key:V,props:O,_owner:z},(K!==void 0?K:null)!==null?Object.defineProperty(v,"ref",{enumerable:!1,get:l}):Object.defineProperty(v,"ref",{enumerable:!1,value:null}),v._store={},Object.defineProperty(v._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(v,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(v,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Wt}),Object.defineProperty(v,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ds}),Object.freeze&&(Object.freeze(v.props),Object.freeze(v)),v}function c(v,V,O,z,Wt,ds){var K=V.children;if(K!==void 0)if(z)if(U(K)){for(z=0;z<K.length;z++)d(K[z]);Object.freeze&&Object.freeze(K)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else d(K);if(A.call(V,"key")){K=e(v);var Xe=Object.keys(V).filter(function(fh){return fh!=="key"});z=0<Xe.length?"{key: someKey, "+Xe.join(": ..., ")+": ...}":"{key: someKey}",ve[K+z]||(Xe=0<Xe.length?"{"+Xe.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} />`,z,K,Xe,K),ve[K+z]=!0)}if(K=null,O!==void 0&&(n(O),K=""+O),o(V)&&(n(V.key),K=""+V.key),"key"in V){O={};for(var hs in V)hs!=="key"&&(O[hs]=V[hs])}else O=V;return K&&a(O,typeof v=="function"?v.displayName||v.name||"Unknown":v),u(v,K,O,i(),Wt,ds)}function d(v){h(v)?v._store&&(v._store.validated=1):typeof v=="object"&&v!==null&&v.$$typeof===k&&(v._payload.status==="fulfilled"?h(v._payload.value)&&v._payload.value._store&&(v._payload.value._store.validated=1):v._store&&(v._store.validated=1))}function h(v){return typeof v=="object"&&v!==null&&v.$$typeof===p}var m=g,p=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),w=Symbol.for("react.consumer"),P=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),j=Symbol.for("react.suspense_list"),C=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),B=Symbol.for("react.activity"),ee=Symbol.for("react.client.reference"),ae=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,A=Object.prototype.hasOwnProperty,U=Array.isArray,H=console.createTask?console.createTask:function(){return null};m={react_stack_bottom_frame:function(v){return v()}};var te,D={},G=m.react_stack_bottom_frame.bind(m,r)(),ne=H(s(r)),ve={};qe.Fragment=_,qe.jsx=function(v,V,O){var z=1e4>ae.recentlyCreatedOwnerStacks++;return c(v,V,O,!1,z?Error("react-stack-top-frame"):G,z?H(s(v)):ne)},qe.jsxs=function(v,V,O){var z=1e4>ae.recentlyCreatedOwnerStacks++;return c(v,V,O,!0,z?Error("react-stack-top-frame"):G,z?H(s(v)):ne)}})()),qe}var ps;function Nr(){return ps||(ps=1,process.env.NODE_ENV==="production"?pt.exports=Rr():pt.exports=Ir()),pt.exports}var f=Nr();const Le={container:"accordion-module__container___M1a4P",accordion:"accordion-module__accordion___C0eUc",header:"accordion-module__header___NFLuh",icon:"accordion-module__icon___Mjff1",content:"accordion-module__content___18iAN",open:"accordion-module__open___acchR"};function $r({title:e,titleId:t,...n},s){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?E.createElement("title",{id:t},e):null,E.createElement("path",{fillRule:"evenodd",d:"M3 6.75A.75.75 0 0 1 3.75 6h16.5a.75.75 0 0 1 0 1.5H3.75A.75.75 0 0 1 3 6.75ZM3 12a.75.75 0 0 1 .75-.75h16.5a.75.75 0 0 1 0 1.5H3.75A.75.75 0 0 1 3 12Zm0 5.25a.75.75 0 0 1 .75-.75h16.5a.75.75 0 0 1 0 1.5H3.75a.75.75 0 0 1-.75-.75Z",clipRule:"evenodd"}))}const gs=E.forwardRef($r);function Br({title:e,titleId:t,...n},s){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?E.createElement("title",{id:t},e):null,E.createElement("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z",clipRule:"evenodd"}))}const ys=E.forwardRef(Br);function Or({title:e,titleId:t,...n},s){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?E.createElement("title",{id:t},e):null,E.createElement("path",{fillRule:"evenodd",d:"M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z",clipRule:"evenodd"}))}const Fr=E.forwardRef(Or);function Wr({title:e,titleId:t,...n},s){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?E.createElement("title",{id:t},e):null,E.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003ZM12 8.25a.75.75 0 0 1 .75.75v3.75a.75.75 0 0 1-1.5 0V9a.75.75 0 0 1 .75-.75Zm0 8.25a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z",clipRule:"evenodd"}))}const vs=E.forwardRef(Wr);function Ur({title:e,titleId:t,...n},s){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?E.createElement("title",{id:t},e):null,E.createElement("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm8.706-1.442c1.146-.573 2.437.463 2.126 1.706l-.709 2.836.042-.02a.75.75 0 0 1 .67 1.34l-.04.022c-1.147.573-2.438-.463-2.127-1.706l.71-2.836-.042.02a.75.75 0 1 1-.671-1.34l.041-.022ZM12 9a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z",clipRule:"evenodd"}))}const _s=E.forwardRef(Ur);function Hr({title:e,titleId:t,...n},s){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?E.createElement("title",{id:t},e):null,E.createElement("path",{fillRule:"evenodd",d:"M4.25 12a.75.75 0 0 1 .75-.75h14a.75.75 0 0 1 0 1.5H5a.75.75 0 0 1-.75-.75Z",clipRule:"evenodd"}))}const xs=E.forwardRef(Hr);function zr({title:e,titleId:t,...n},s){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?E.createElement("title",{id:t},e):null,E.createElement("path",{fillRule:"evenodd",d:"M12 3.75a.75.75 0 0 1 .75.75v6.75h6.75a.75.75 0 0 1 0 1.5h-6.75v6.75a.75.75 0 0 1-1.5 0v-6.75H4.5a.75.75 0 0 1 0-1.5h6.75V4.5a.75.75 0 0 1 .75-.75Z",clipRule:"evenodd"}))}const bs=E.forwardRef(zr);function Kr({title:e,titleId:t,...n},s){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?E.createElement("title",{id:t},e):null,E.createElement("path",{fillRule:"evenodd",d:"M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm-1.72 6.97a.75.75 0 1 0-1.06 1.06L10.94 12l-1.72 1.72a.75.75 0 1 0 1.06 1.06L12 13.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L13.06 12l1.72-1.72a.75.75 0 1 0-1.06-1.06L12 10.94l-1.72-1.72Z",clipRule:"evenodd"}))}const Ut=E.forwardRef(Kr);function Yr({title:e,titleId:t,...n},s){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?E.createElement("title",{id:t},e):null,E.createElement("path",{fillRule:"evenodd",d:"M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const Ht=E.forwardRef(Yr),Gr=({title:e,children:t,defaultOpen:n=!1})=>{const[s,i]=g.useState(n),r=g.useId();return g.useLayoutEffect(()=>{i(n)},[n]),f.jsxs("div",{className:Le.container,children:[f.jsxs("button",{id:r,onClick:()=>i(!s),className:Le.accordion,"aria-expanded":s,children:[f.jsx("span",{className:Le.header,children:e}),f.jsx("span",{className:Le.icon,children:s?f.jsx(xs,{width:"24"}):f.jsx(bs,{width:"24"})})]}),f.jsx("div",{role:"region","aria-labelledby":r,className:`${Le.content} ${s?Le.open:void 0}`,children:t})]})},zt=g.createContext({});function gt(e){const t=g.useRef(null);return t.current===null&&(t.current=e()),t.current}const ws=typeof window<"u",Ts=ws?g.useLayoutEffect:g.useEffect,yt=g.createContext(null);function Kt(e,t){e.indexOf(t)===-1&&e.push(t)}function vt(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const de=(e,t,n)=>n>t?t:n<e?e:n;function Yt(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Re=()=>{},pe=()=>{};typeof process<"u"&&((jr=process.env)==null?void 0:jr.NODE_ENV)!=="production"&&(Re=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(Yt(t,n))},pe=(e,t,n)=>{if(!e)throw new Error(Yt(t,n))});const ge={},Ss=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Es(e){return typeof e=="object"&&e!==null}const Ps=e=>/^0[^.\s]+$/u.test(e);function Gt(e){let t;return()=>(t===void 0&&(t=e()),t)}const ie=e=>e,Xr=(e,t)=>n=>t(e(n)),Je=(...e)=>e.reduce(Xr),Qe=(e,t,n)=>{const s=t-e;return s===0?1:(n-e)/s};class Xt{constructor(){this.subscriptions=[]}add(t){return Kt(this.subscriptions,t),()=>vt(this.subscriptions,t)}notify(t,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,s);else for(let r=0;r<i;r++){const o=this.subscriptions[r];o&&o(t,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const oe=e=>e*1e3,re=e=>e/1e3;function Cs(e,t){return t?e*(1e3/t):0}const As=new Set;function Zt(e,t,n){e||As.has(t)||(console.warn(Yt(t,n)),As.add(t))}const Ms=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Zr=1e-7,qr=12;function Jr(e,t,n,s,i){let r,o,a=0;do o=t+(n-t)/2,r=Ms(o,s,i)-e,r>0?n=o:t=o;while(Math.abs(r)>Zr&&++a<qr);return o}function et(e,t,n,s){if(e===t&&n===s)return ie;const i=r=>Jr(r,0,1,e,n);return r=>r===0||r===1?r:Ms(i(r),t,s)}const ks=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Vs=e=>t=>1-e(1-t),js=et(.33,1.53,.69,.99),qt=Vs(js),Ds=ks(qt),Ls=e=>(e*=2)<1?.5*qt(e):.5*(2-Math.pow(2,-10*(e-1))),Jt=e=>1-Math.sin(Math.acos(e)),Rs=Vs(Jt),Is=ks(Jt),Qr=et(.42,0,1,1),ea=et(0,0,.58,1),Ns=et(.42,0,.58,1),ta=e=>Array.isArray(e)&&typeof e[0]!="number",$s=e=>Array.isArray(e)&&typeof e[0]=="number",Bs={linear:ie,easeIn:Qr,easeInOut:Ns,easeOut:ea,circIn:Jt,circInOut:Is,circOut:Rs,backIn:qt,backInOut:Ds,backOut:js,anticipate:Ls},na=e=>typeof e=="string",Os=e=>{if($s(e)){pe(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,s,i]=e;return et(t,n,s,i)}else if(na(e))return pe(Bs[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Bs[e];return e},_t=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function sa(e,t){let n=new Set,s=new Set,i=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){o.has(c)&&(u.schedule(c),e()),c(a)}const u={schedule:(c,d=!1,h=!1)=>{const p=h&&i?n:s;return d&&o.add(c),p.has(c)||p.add(c),c},cancel:c=>{s.delete(c),o.delete(c)},process:c=>{if(a=c,i){r=!0;return}i=!0,[n,s]=[s,n],n.forEach(l),n.clear(),i=!1,r&&(r=!1,u.process(c))}};return u}const ia=40;function Fs(e,t){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=_t.reduce((w,P)=>(w[P]=sa(r),w),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:h,render:m,postRender:p}=o,x=()=>{const w=ge.useManualTiming?i.timestamp:performance.now();n=!1,ge.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(w-i.timestamp,ia),1)),i.timestamp=w,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),d.process(i),h.process(i),m.process(i),p.process(i),i.isProcessing=!1,n&&t&&(s=!1,e(x))},_=()=>{n=!0,s=!0,i.isProcessing||e(x)};return{schedule:_t.reduce((w,P)=>{const T=o[P];return w[P]=(M,j=!1,C=!1)=>(n||_(),T.schedule(M,j,C)),w},{}),cancel:w=>{for(let P=0;P<_t.length;P++)o[_t[P]].cancel(w)},state:i,steps:o}}const{schedule:I,cancel:_e,state:Y,steps:Qt}=Fs(typeof requestAnimationFrame<"u"?requestAnimationFrame:ie,!0);let xt;function oa(){xt=void 0}const q={now:()=>(xt===void 0&&q.set(Y.isProcessing||ge.useManualTiming?Y.timestamp:performance.now()),xt),set:e=>{xt=e,queueMicrotask(oa)}},Ws=e=>t=>typeof t=="string"&&t.startsWith(e),Us=Ws("--"),ra=Ws("var(--"),en=e=>ra(e)?aa.test(e.split("/*")[0].trim()):!1,aa=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Hs(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Ie={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},tt={...Ie,transform:e=>de(0,1,e)},bt={...Ie,default:1},nt=e=>Math.round(e*1e5)/1e5,tn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function la(e){return e==null}const ca=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,nn=(e,t)=>n=>!!(typeof n=="string"&&ca.test(n)&&n.startsWith(e)||t&&!la(n)&&Object.prototype.hasOwnProperty.call(n,t)),zs=(e,t,n)=>s=>{if(typeof s!="string")return s;const[i,r,o,a]=s.match(tn);return{[e]:parseFloat(i),[t]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},ua=e=>de(0,255,e),sn={...Ie,transform:e=>Math.round(ua(e))},Pe={test:nn("rgb","red"),parse:zs("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:s=1})=>"rgba("+sn.transform(e)+", "+sn.transform(t)+", "+sn.transform(n)+", "+nt(tt.transform(s))+")"};function da(e){let t="",n="",s="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),s=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),s=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,s+=s,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const on={test:nn("#"),parse:da,transform:Pe.transform},st=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),xe=st("deg"),he=st("%"),S=st("px"),ha=st("vh"),fa=st("vw"),Ks={...he,parse:e=>he.parse(e)/100,transform:e=>he.transform(e*100)},Ne={test:nn("hsl","hue"),parse:zs("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:s=1})=>"hsla("+Math.round(e)+", "+he.transform(nt(t))+", "+he.transform(nt(n))+", "+nt(tt.transform(s))+")"},F={test:e=>Pe.test(e)||on.test(e)||Ne.test(e),parse:e=>Pe.test(e)?Pe.parse(e):Ne.test(e)?Ne.parse(e):on.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Pe.transform(e):Ne.transform(e),getAnimatableNone:e=>{const t=F.parse(e);return t.alpha=0,F.transform(t)}},ma=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function pa(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(tn))==null?void 0:t.length)||0)+(((n=e.match(ma))==null?void 0:n.length)||0)>0}const Ys="number",Gs="color",ga="var",ya="var(",Xs="${}",va=/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 it(e){const t=e.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const a=t.replace(va,l=>(F.test(l)?(s.color.push(r),i.push(Gs),n.push(F.parse(l))):l.startsWith(ya)?(s.var.push(r),i.push(ga),n.push(l)):(s.number.push(r),i.push(Ys),n.push(parseFloat(l))),++r,Xs)).split(Xs);return{values:n,split:a,indexes:s,types:i}}function Zs(e){return it(e).values}function qs(e){const{split:t,types:n}=it(e),s=t.length;return i=>{let r="";for(let o=0;o<s;o++)if(r+=t[o],i[o]!==void 0){const a=n[o];a===Ys?r+=nt(i[o]):a===Gs?r+=F.transform(i[o]):r+=i[o]}return r}}const _a=e=>typeof e=="number"?0:F.test(e)?F.getAnimatableNone(e):e;function xa(e){const t=Zs(e);return qs(e)(t.map(_a))}const be={test:pa,parse:Zs,createTransformer:qs,getAnimatableNone:xa};function rn(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function ba({hue:e,saturation:t,lightness:n,alpha:s}){e/=360,t/=100,n/=100;let i=0,r=0,o=0;if(!t)i=r=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;i=rn(l,a,e+1/3),r=rn(l,a,e),o=rn(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}function wt(e,t){return n=>n>0?t:e}const N=(e,t,n)=>e+(t-e)*n,an=(e,t,n)=>{const s=e*e,i=n*(t*t-s)+s;return i<0?0:Math.sqrt(i)},wa=[on,Pe,Ne],Ta=e=>wa.find(t=>t.test(e));function Js(e){const t=Ta(e);if(Re(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===Ne&&(n=ba(n)),n}const Qs=(e,t)=>{const n=Js(e),s=Js(t);if(!n||!s)return wt(e,t);const i={...n};return r=>(i.red=an(n.red,s.red,r),i.green=an(n.green,s.green,r),i.blue=an(n.blue,s.blue,r),i.alpha=N(n.alpha,s.alpha,r),Pe.transform(i))},ln=new Set(["none","hidden"]);function Sa(e,t){return ln.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Ea(e,t){return n=>N(e,t,n)}function cn(e){return typeof e=="number"?Ea:typeof e=="string"?en(e)?wt:F.test(e)?Qs:Aa:Array.isArray(e)?ei:typeof e=="object"?F.test(e)?Qs:Pa:wt}function ei(e,t){const n=[...e],s=n.length,i=e.map((r,o)=>cn(r)(r,t[o]));return r=>{for(let o=0;o<s;o++)n[o]=i[o](r);return n}}function Pa(e,t){const n={...e,...t},s={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(s[i]=cn(e[i])(e[i],t[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}}function Ca(e,t){const n=[],s={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const r=t.types[i],o=e.indexes[r][s[r]],a=e.values[o]??0;n[i]=a,s[r]++}return n}const Aa=(e,t)=>{const n=be.createTransformer(t),s=it(e),i=it(t);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?ln.has(e)&&!i.values.length||ln.has(t)&&!s.values.length?Sa(e,t):Je(ei(Ca(s,i),i.values),n):(Re(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),wt(e,t))};function ti(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?N(e,t,n):cn(e)(e,t)}const Ma=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>I.update(t,n),stop:()=>_e(t),now:()=>Y.isProcessing?Y.timestamp:q.now()}},ni=(e,t,n=10)=>{let s="";const i=Math.max(Math.round(t/n),2);for(let r=0;r<i;r++)s+=Math.round(e(r/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},Tt=2e4;function un(e){let t=0;const n=50;let s=e.next(t);for(;!s.done&&t<Tt;)t+=n,s=e.next(t);return t>=Tt?1/0:t}function ka(e,t=100,n){const s=n({...e,keyframes:[0,t]}),i=Math.min(un(s),Tt);return{type:"keyframes",ease:r=>s.next(i*r).value/t,duration:re(i)}}const Va=5;function si(e,t,n){const s=Math.max(t-Va,0);return Cs(n-e(s),t-s)}const $={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},dn=.001;function ja({duration:e=$.duration,bounce:t=$.bounce,velocity:n=$.velocity,mass:s=$.mass}){let i,r;Re(e<=oe($.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=de($.minDamping,$.maxDamping,o),e=de($.minDuration,$.maxDuration,re(e)),o<1?(i=u=>{const c=u*o,d=c*e,h=c-n,m=hn(u,o),p=Math.exp(-d);return dn-h/m*p},r=u=>{const d=u*o*e,h=d*n+n,m=Math.pow(o,2)*Math.pow(u,2)*e,p=Math.exp(-d),x=hn(Math.pow(u,2),o);return(-i(u)+dn>0?-1:1)*((h-m)*p)/x}):(i=u=>{const c=Math.exp(-u*e),d=(u-n)*e+1;return-dn+c*d},r=u=>{const c=Math.exp(-u*e),d=(n-u)*(e*e);return c*d});const a=5/e,l=La(i,r,a);if(e=oe(e),isNaN(l))return{stiffness:$.stiffness,damping:$.damping,duration:e};{const u=Math.pow(l,2)*s;return{stiffness:u,damping:o*2*Math.sqrt(s*u),duration:e}}}const Da=12;function La(e,t,n){let s=n;for(let i=1;i<Da;i++)s=s-e(s)/t(s);return s}function hn(e,t){return e*Math.sqrt(1-t*t)}const Ra=["duration","bounce"],Ia=["stiffness","damping","mass"];function ii(e,t){return t.some(n=>e[n]!==void 0)}function Na(e){let t={velocity:$.velocity,stiffness:$.stiffness,damping:$.damping,mass:$.mass,isResolvedFromDuration:!1,...e};if(!ii(e,Ia)&&ii(e,Ra))if(e.visualDuration){const n=e.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,r=2*de(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:$.mass,stiffness:i,damping:r}}else{const n=ja(e);t={...t,...n,mass:$.mass},t.isResolvedFromDuration=!0}return t}function St(e=$.visualDuration,t=$.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:s,restDelta:i}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:l,damping:u,mass:c,duration:d,velocity:h,isResolvedFromDuration:m}=Na({...n,velocity:-re(n.velocity||0)}),p=h||0,x=u/(2*Math.sqrt(l*c)),_=o-r,y=re(Math.sqrt(l/c)),b=Math.abs(_)<5;s||(s=b?$.restSpeed.granular:$.restSpeed.default),i||(i=b?$.restDelta.granular:$.restDelta.default);let w;if(x<1){const T=hn(y,x);w=M=>{const j=Math.exp(-x*y*M);return o-j*((p+x*y*_)/T*Math.sin(T*M)+_*Math.cos(T*M))}}else if(x===1)w=T=>o-Math.exp(-y*T)*(_+(p+y*_)*T);else{const T=y*Math.sqrt(x*x-1);w=M=>{const j=Math.exp(-x*y*M),C=Math.min(T*M,300);return o-j*((p+x*y*_)*Math.sinh(C)+T*_*Math.cosh(C))/T}}const P={calculatedDuration:m&&d||null,next:T=>{const M=w(T);if(m)a.done=T>=d;else{let j=T===0?p:0;x<1&&(j=T===0?oe(p):si(w,T,M));const C=Math.abs(j)<=s,k=Math.abs(o-M)<=i;a.done=C&&k}return a.value=a.done?o:M,a},toString:()=>{const T=Math.min(un(P),Tt),M=ni(j=>P.next(T*j).value,T,30);return T+"ms "+M},toTransition:()=>{}};return P}St.applyToOptions=e=>{const t=ka(e,100,St);return e.ease=t.ease,e.duration=oe(t.duration),e.type="keyframes",e};function fn({keyframes:e,velocity:t=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],h={done:!1,value:d},m=C=>a!==void 0&&C<a||l!==void 0&&C>l,p=C=>a===void 0?l:l===void 0||Math.abs(a-C)<Math.abs(l-C)?a:l;let x=n*t;const _=d+x,y=o===void 0?_:o(_);y!==_&&(x=y-d);const b=C=>-x*Math.exp(-C/s),w=C=>y+b(C),P=C=>{const k=b(C),B=w(C);h.done=Math.abs(k)<=u,h.value=h.done?y:B};let T,M;const j=C=>{m(h.value)&&(T=C,M=St({keyframes:[h.value,p(h.value)],velocity:si(w,C,h.value),damping:i,stiffness:r,restDelta:u,restSpeed:c}))};return j(0),{calculatedDuration:null,next:C=>{let k=!1;return!M&&T===void 0&&(k=!0,P(C),j(C)),T!==void 0&&C>=T?M.next(C-T):(!k&&P(C),h)}}}function $a(e,t,n){const s=[],i=n||ge.mix||ti,r=e.length-1;for(let o=0;o<r;o++){let a=i(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||ie:t;a=Je(l,a)}s.push(a)}return s}function Ba(e,t,{clamp:n=!0,ease:s,mixer:i}={}){const r=e.length;if(pe(r===t.length,"Both input and output ranges must be the same length","range-length"),r===1)return()=>t[0];if(r===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[r-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=$a(t,s,i),l=a.length,u=c=>{if(o&&c<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(c<e[d+1]);d++);const h=Qe(e[d],e[d+1],c);return a[d](h)};return n?c=>u(de(e[0],e[r-1],c)):u}function Oa(e,t){const n=e[e.length-1];for(let s=1;s<=t;s++){const i=Qe(0,t,s);e.push(N(n,1,i))}}function Fa(e){const t=[0];return Oa(t,e.length-1),t}function Wa(e,t){return e.map(n=>n*t)}function Ua(e,t){return e.map(()=>t||Ns).splice(0,e.length-1)}function $e({duration:e=300,keyframes:t,times:n,ease:s="easeInOut"}){const i=ta(s)?s.map(Os):Os(s),r={done:!1,value:t[0]},o=Wa(n&&n.length===t.length?n:Fa(t),e),a=Ba(o,t,{ease:Array.isArray(i)?i:Ua(t,i)});return{calculatedDuration:e,next:l=>(r.value=a(l),r.done=l>=e,r)}}const Ha=e=>e!==null;function mn(e,{repeat:t,repeatType:n="loop"},s,i=1){const r=e.filter(Ha),a=i<0||t&&n!=="loop"&&t%2===1?0:r.length-1;return!a||s===void 0?r[a]:s}const za={decay:fn,inertia:fn,tween:$e,keyframes:$e,spring:St};function oi(e){typeof e.type=="string"&&(e.type=za[e.type])}class pn{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const Ka=e=>e/100;class gn extends pn{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var s,i;const{motionValue:n}=this.options;n&&n.updatedAt!==q.now()&&this.tick(q.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(s=this.options).onStop)==null||i.call(s))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;oi(t);const{type:n=$e,repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=t;let{keyframes:a}=t;const l=n||$e;process.env.NODE_ENV!=="production"&&l!==$e&&pe(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==$e&&typeof a[0]!="number"&&(this.mixKeyframes=Je(Ka,ti(a[0],a[1])),a=[0,100]);const u=l({...t,keyframes:a});r==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=un(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:s,totalDuration:i,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return s.next(0);const{delay:u=0,keyframes:c,repeat:d,repeatType:h,repeatDelay:m,type:p,onUpdate:x,finalKeyframe:_}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const y=this.currentTime-u*(this.playbackSpeed>=0?1:-1),b=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let w=this.currentTime,P=s;if(d){const C=Math.min(this.currentTime,i)/a;let k=Math.floor(C),B=C%1;!B&&C>=1&&(B=1),B===1&&k--,k=Math.min(k,d+1),!!(k%2)&&(h==="reverse"?(B=1-B,m&&(B-=m/a)):h==="mirror"&&(P=o)),w=de(0,1,B)*a}const T=b?{done:!1,value:c[0]}:P.next(w);r&&(T.value=r(T.value));let{done:M}=T;!b&&l!==null&&(M=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const j=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&M);return j&&p!==fn&&(T.value=mn(c,this.options,_,this.speed)),x&&x(T.value),j&&this.finish(),T}then(t,n){return this.finished.then(t,n)}get duration(){return re(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+re(t)}get time(){return re(this.currentTime)}set time(t){var n;t=oe(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(q.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=re(this.currentTime))}play(){var i,r;if(this.isStopped)return;const{driver:t=Ma,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),(r=(i=this.options).onPlay)==null||r.call(i);const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(q.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function Ya(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Ce=e=>e*180/Math.PI,yn=e=>{const t=Ce(Math.atan2(e[1],e[0]));return vn(t)},Ga={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:yn,rotateZ:yn,skewX:e=>Ce(Math.atan(e[1])),skewY:e=>Ce(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},vn=e=>(e=e%360,e<0&&(e+=360),e),ri=yn,ai=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),li=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Xa={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ai,scaleY:li,scale:e=>(ai(e)+li(e))/2,rotateX:e=>vn(Ce(Math.atan2(e[6],e[5]))),rotateY:e=>vn(Ce(Math.atan2(-e[2],e[0]))),rotateZ:ri,rotate:ri,skewX:e=>Ce(Math.atan(e[4])),skewY:e=>Ce(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function _n(e){return e.includes("scale")?1:0}function xn(e,t){if(!e||e==="none")return _n(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Xa,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Ga,i=a}if(!i)return _n(t);const r=s[t],o=i[1].split(",").map(qa);return typeof r=="function"?r(o):o[r]}const Za=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return xn(n,t)};function qa(e){return parseFloat(e.trim())}const Be=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Oe=new Set(Be),ci=e=>e===Ie||e===S,Ja=new Set(["x","y","z"]),Qa=Be.filter(e=>!Ja.has(e));function el(e){const t=[];return Qa.forEach(n=>{const s=e.getValue(n);s!==void 0&&(t.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),t}const we={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>xn(t,"x"),y:(e,{transform:t})=>xn(t,"y")};we.translateX=we.x,we.translateY=we.y;const Ae=new Set;let bn=!1,wn=!1,Tn=!1;function ui(){if(wn){const e=Array.from(Ae).filter(s=>s.needsMeasurement),t=new Set(e.map(s=>s.element)),n=new Map;t.forEach(s=>{const i=el(s);i.length&&(n.set(s,i),s.render())}),e.forEach(s=>s.measureInitialState()),t.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([r,o])=>{var a;(a=s.getValue(r))==null||a.set(o)})}),e.forEach(s=>s.measureEndState()),e.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}wn=!1,bn=!1,Ae.forEach(e=>e.complete(Tn)),Ae.clear()}function di(){Ae.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(wn=!0)})}function tl(){Tn=!0,di(),ui(),Tn=!1}class Sn{constructor(t,n,s,i,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=s,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Ae.add(this),bn||(bn=!0,I.read(di),I.resolveKeyframes(ui))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:s,motionValue:i}=this;if(t[0]===null){const r=i==null?void 0:i.get(),o=t[t.length-1];if(r!==void 0)t[0]=r;else if(s&&n){const a=s.readValue(n,o);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=o),i&&r===void 0&&i.set(t[0])}Ya(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Ae.delete(this)}cancel(){this.state==="scheduled"&&(Ae.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const nl=e=>e.startsWith("--");function sl(e,t,n){nl(t)?e.style.setProperty(t,n):e.style[t]=n}const il=Gt(()=>window.ScrollTimeline!==void 0),ol={};function rl(e,t){const n=Gt(e);return()=>ol[t]??n()}const hi=rl(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ot=([e,t,n,s])=>`cubic-bezier(${e}, ${t}, ${n}, ${s})`,fi={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ot([0,.65,.55,1]),circOut:ot([.55,0,1,.45]),backIn:ot([.31,.01,.66,-.59]),backOut:ot([.33,1.53,.69,.99])};function mi(e,t){if(e)return typeof e=="function"?hi()?ni(e,t):"ease-out":$s(e)?ot(e):Array.isArray(e)?e.map(n=>mi(n,t)||fi.easeOut):fi[e]}function al(e,t,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[t]:n};l&&(c.offset=l);const d=mi(a,i);Array.isArray(d)&&(c.easing=d);const h={delay:s,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"};return u&&(h.pseudoElement=u),e.animate(c,h)}function pi(e){return typeof e=="function"&&"applyToOptions"in e}function ll({type:e,...t}){return pi(e)&&hi()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class gi extends pn{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:s,keyframes:i,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=t,pe(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=ll(t);this.animation=al(n,s,i,u,r),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const c=mn(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):sl(n,s,c),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,s,i;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((i=(s=this.animation).commitStyles)==null||i.call(s))}get duration(){var n,s;const t=((s=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:s.call(n).duration)||0;return re(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+re(t)}get time(){return re(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=oe(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var s;return this.allowFlatten&&((s=this.animation.effect)==null||s.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&il()?(this.animation.timeline=t,ie):n(this)}}const yi={anticipate:Ls,backInOut:Ds,circInOut:Is};function cl(e){return e in yi}function ul(e){typeof e.ease=="string"&&cl(e.ease)&&(e.ease=yi[e.ease])}const En=10;class dl extends gi{constructor(t){ul(t),oi(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:s,onComplete:i,element:r,...o}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new gn({...o,autoplay:!1}),l=Math.max(En,q.now()-this.startTime),u=de(0,En,l-En);n.setWithVelocity(a.sample(Math.max(0,l-u)).value,a.sample(l).value,u),a.stop()}}const vi=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(be.test(e)||e==="0")&&!e.startsWith("url("));function hl(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function fl(e,t,n,s){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const r=e[e.length-1],o=vi(i,t),a=vi(r,t);return Re(o===a,`You are trying to animate ${t} from "${i}" to "${r}". "${o?r:i}" is not an animatable value.`,"value-not-animatable"),!o||!a?!1:hl(e)||(n==="spring"||pi(n))&&s}function Pn(e){e.duration=0,e.type="keyframes"}const ml=new Set(["opacity","clipPath","filter","transform"]),pl=Gt(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function gl(e){var c;const{motionValue:t,name:n,repeatDelay:s,repeatType:i,damping:r,type:o}=e;if(!(((c=t==null?void 0:t.owner)==null?void 0:c.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=t.owner.getProps();return pl()&&n&&ml.has(n)&&(n!=="transform"||!u)&&!l&&!s&&i!=="mirror"&&r!==0&&o!=="inertia"}const yl=40;class vl extends pn{constructor({autoplay:t=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:l,motionValue:u,element:c,...d}){var p;super(),this.stop=()=>{var x,_;this._animation&&(this._animation.stop(),(x=this.stopTimeline)==null||x.call(this)),(_=this.keyframeResolver)==null||_.cancel()},this.createdAt=q.now();const h={autoplay:t,delay:n,type:s,repeat:i,repeatDelay:r,repeatType:o,name:l,motionValue:u,element:c,...d},m=(c==null?void 0:c.KeyframeResolver)||Sn;this.keyframeResolver=new m(a,(x,_,y)=>this.onKeyframesResolved(x,_,h,!y),l,u,c),(p=this.keyframeResolver)==null||p.scheduleResolve()}onKeyframesResolved(t,n,s,i){var _,y;this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:l,isHandoff:u,onUpdate:c}=s;this.resolvedAt=q.now(),fl(t,r,o,a)||((ge.instantAnimations||!l)&&(c==null||c(mn(t,s,n))),t[0]=t[t.length-1],Pn(s),s.repeat=0);const h={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>yl?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:t},m=!u&&gl(h),p=(y=(_=h.motionValue)==null?void 0:_.owner)==null?void 0:y.current,x=m?new dl({...h,element:p}):new gn(h);x.finished.then(()=>{this.notifyFinished()}).catch(ie),this.pendingTimeline&&(this.stopTimeline=x.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=x}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),tl()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function _i(e,t,n,s=0,i=1){const r=Array.from(e).sort((u,c)=>u.sortNodePosition(c)).indexOf(t),o=e.size,a=(o-1)*s;return typeof n=="function"?n(r,o):i===1?r*s:a-r*s}const _l=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function xl(e){const t=_l.exec(e);if(!t)return[,];const[,n,s,i]=t;return[`--${n??s}`,i]}const bl=4;function xi(e,t,n=1){pe(n<=bl,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,i]=xl(e);if(!s)return;const r=window.getComputedStyle(t).getPropertyValue(s);if(r){const o=r.trim();return Ss(o)?parseFloat(o):o}return en(i)?xi(i,t,n+1):i}const wl={type:"spring",stiffness:500,damping:25,restSpeed:10},Tl=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Sl={type:"keyframes",duration:.8},El={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Pl=(e,{keyframes:t})=>t.length>2?Sl:Oe.has(e)?e.startsWith("scale")?Tl(t[1]):wl:El,Cl=e=>e!==null;function Al(e,{repeat:t,repeatType:n="loop"},s){const i=e.filter(Cl),r=t&&n!=="loop"&&t%2===1?0:i.length-1;return i[r]}function bi(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...s}=e;return{...t,...s}}return e}function Cn(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?bi(n,e):n}function Ml({when:e,delay:t,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:r,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const An=(e,t,n,s={},i,r)=>o=>{const a=Cn(s,e)||{},l=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-oe(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:h=>{t.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:r?void 0:i};Ml(a)||Object.assign(c,Pl(e,c)),c.duration&&(c.duration=oe(c.duration)),c.repeatDelay&&(c.repeatDelay=oe(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(Pn(c),c.delay===0&&(d=!0)),(ge.instantAnimations||ge.skipAnimations||i!=null&&i.shouldSkipAnimations)&&(d=!0,Pn(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,d&&!r&&t.get()!==void 0){const h=Al(c.keyframes,a);if(h!==void 0){I.update(()=>{c.onUpdate(h),c.onComplete()});return}}return a.isSync?new gn(c):new vl(c)};function wi(e){const t=[{},{}];return e==null||e.values.forEach((n,s)=>{t[0][s]=n.get(),t[1][s]=n.getVelocity()}),t}function Mn(e,t,n,s){if(typeof t=="function"){const[i,r]=wi(s);t=t(n!==void 0?n:e.custom,i,r)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,r]=wi(s);t=t(n!==void 0?n:e.custom,i,r)}return t}function Fe(e,t,n){const s=e.getProps();return Mn(s,t,n!==void 0?n:s.custom,e)}const Ti=new Set(["width","height","top","left","right","bottom",...Be]),Si=30,kl=e=>!isNaN(parseFloat(e));class Vl{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{var r;const i=q.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&((r=this.events.change)==null||r.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=q.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=kl(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Zt(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Xt);const s=this.events[t].add(n);return t==="change"?()=>{s(),I.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=q.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Si)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Si);return Cs(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Me(e,t){return new Vl(e,t)}const kn=e=>Array.isArray(e);function jl(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Me(n))}function Dl(e){return kn(e)?e[e.length-1]||0:e}function Ll(e,t){const n=Fe(e,t);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const o in r){const a=Dl(r[o]);jl(e,o,a)}}const X=e=>!!(e&&e.getVelocity);function Rl(e){return!!(X(e)&&e.add)}function Vn(e,t){const n=e.getValue("willChange");if(Rl(n))return n.add(t);if(!n&&ge.WillChange){const s=new ge.WillChange("auto");e.addValue("willChange",s),s.add(t)}}function jn(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Ei="data-"+jn("framerAppearId");function Pi(e){return e.props[Ei]}function Il({protectedKeys:e,needsAnimating:t},n){const s=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,s}function Ci(e,t,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:r,transitionEnd:o,...a}=t;const l=e.getDefaultTransition();r=r?bi(r,l):l;const u=r==null?void 0:r.reduceMotion;s&&(r=s);const c=[],d=i&&e.animationState&&e.animationState.getState()[i];for(const h in a){const m=e.getValue(h,e.latestValues[h]??null),p=a[h];if(p===void 0||d&&Il(d,h))continue;const x={delay:n,...Cn(r||{},h)},_=m.get();if(_!==void 0&&!m.isAnimating&&!Array.isArray(p)&&p===_&&!x.velocity)continue;let y=!1;if(window.MotionHandoffAnimation){const P=Pi(e);if(P){const T=window.MotionHandoffAnimation(P,h,I);T!==null&&(x.startTime=T,y=!0)}}Vn(e,h);const b=u??e.shouldReduceMotion;m.start(An(h,m,p,b&&Ti.has(h)?{type:!1}:x,e,y));const w=m.animation;w&&c.push(w)}if(o){const h=()=>I.update(()=>{o&&Ll(e,o)});c.length?Promise.all(c).then(h):h()}return c}function Dn(e,t,n={}){var l;const s=Fe(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const r=s?()=>Promise.all(Ci(e,s,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:h}=i;return Nl(e,t,u,c,d,h,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[u,c]=a==="beforeChildren"?[r,o]:[o,r];return u().then(()=>c())}else return Promise.all([r(),o(n.delay)])}function Nl(e,t,n=0,s=0,i=0,r=1,o){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(Dn(l,t,{...o,delay:n+(typeof s=="function"?0:s)+_i(e.variantChildren,l,s,i,r)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function $l(e,t,n={}){e.notify("AnimationStart",t);let s;if(Array.isArray(t)){const i=t.map(r=>Dn(e,r,n));s=Promise.all(i)}else if(typeof t=="string")s=Dn(e,t,n);else{const i=typeof t=="function"?Fe(e,t,n.custom):t;s=Promise.all(Ci(e,i,n))}return s.then(()=>{e.notify("AnimationComplete",t)})}const Bl={test:e=>e==="auto",parse:e=>e},Ai=e=>t=>t.test(e),Mi=[Ie,S,he,xe,fa,ha,Bl],ki=e=>Mi.find(Ai(e));function Ol(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Ps(e):!0}const Fl=new Set(["brightness","contrast","saturate","opacity"]);function Wl(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[s]=n.match(tn)||[];if(!s)return e;const i=n.replace(s,"");let r=Fl.has(t)?1:0;return s!==n&&(r*=100),t+"("+r+i+")"}const Ul=/\b([a-z-]*)\(.*?\)/gu,Ln={...be,getAnimatableNone:e=>{const t=e.match(Ul);return t?t.map(Wl).join(" "):e}},Vi={...Ie,transform:Math.round},Rn={borderWidth:S,borderTopWidth:S,borderRightWidth:S,borderBottomWidth:S,borderLeftWidth:S,borderRadius:S,borderTopLeftRadius:S,borderTopRightRadius:S,borderBottomRightRadius:S,borderBottomLeftRadius:S,width:S,maxWidth:S,height:S,maxHeight:S,top:S,right:S,bottom:S,left:S,inset:S,insetBlock:S,insetBlockStart:S,insetBlockEnd:S,insetInline:S,insetInlineStart:S,insetInlineEnd:S,padding:S,paddingTop:S,paddingRight:S,paddingBottom:S,paddingLeft:S,paddingBlock:S,paddingBlockStart:S,paddingBlockEnd:S,paddingInline:S,paddingInlineStart:S,paddingInlineEnd:S,margin:S,marginTop:S,marginRight:S,marginBottom:S,marginLeft:S,marginBlock:S,marginBlockStart:S,marginBlockEnd:S,marginInline:S,marginInlineStart:S,marginInlineEnd:S,fontSize:S,backgroundPositionX:S,backgroundPositionY:S,...{rotate:xe,rotateX:xe,rotateY:xe,rotateZ:xe,scale:bt,scaleX:bt,scaleY:bt,scaleZ:bt,skew:xe,skewX:xe,skewY:xe,distance:S,translateX:S,translateY:S,translateZ:S,x:S,y:S,z:S,perspective:S,transformPerspective:S,opacity:tt,originX:Ks,originY:Ks,originZ:S},zIndex:Vi,fillOpacity:tt,strokeOpacity:tt,numOctaves:Vi},Hl={...Rn,color:F,backgroundColor:F,outlineColor:F,fill:F,stroke:F,borderColor:F,borderTopColor:F,borderRightColor:F,borderBottomColor:F,borderLeftColor:F,filter:Ln,WebkitFilter:Ln},ji=e=>Hl[e];function Di(e,t){let n=ji(e);return n!==Ln&&(n=be),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const zl=new Set(["auto","none","0"]);function Kl(e,t,n){let s=0,i;for(;s<e.length&&!i;){const r=e[s];typeof r=="string"&&!zl.has(r)&&it(r).values.length&&(i=e[s]),s++}if(i&&n)for(const r of t)e[r]=Di(n,i)}class Yl extends Sn{constructor(t,n,s,i,r){super(t,n,s,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let d=t[c];if(typeof d=="string"&&(d=d.trim(),en(d))){const h=xi(d,n.current);h!==void 0&&(t[c]=h),c===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!Ti.has(s)||t.length!==2)return;const[i,r]=t,o=ki(i),a=ki(r),l=Hs(i),u=Hs(r);if(l!==u&&we[s]){this.needsMeasurement=!0;return}if(o!==a)if(ci(o)&&ci(a))for(let c=0;c<t.length;c++){const d=t[c];typeof d=="string"&&(t[c]=parseFloat(d))}else we[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,s=[];for(let i=0;i<t.length;i++)(t[i]===null||Ol(t[i]))&&s.push(i);s.length&&Kl(t,s,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:s}=this;if(!t||!t.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=we[s](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(s,i).jump(i,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:s}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const r=s.length-1,o=s[r];s[r]=we[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,u])=>{t.getValue(l).set(u)}),this.resolveNoneKeyframes()}}const Gl=new Set(["opacity","clipPath","filter","transform"]);function Li(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let s=document;const i=(n==null?void 0:n[e])??s.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(s=>s!=null)}const Ri=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function In(e){return Es(e)&&"offsetHeight"in e}const{schedule:Nn}=Fs(queueMicrotask,!1),le={x:!1,y:!1};function Ii(){return le.x||le.y}function Xl(e){return e==="x"||e==="y"?le[e]?null:(le[e]=!0,()=>{le[e]=!1}):le.x||le.y?null:(le.x=le.y=!0,()=>{le.x=le.y=!1})}function Ni(e,t){const n=Li(e),s=new AbortController,i={passive:!0,...t,signal:s.signal};return[n,i,()=>s.abort()]}function Zl(e){return!(e.pointerType==="touch"||Ii())}function ql(e,t,n={}){const[s,i,r]=Ni(e,n);return s.forEach(o=>{let a=!1,l=!1,u;const c=()=>{o.removeEventListener("pointerleave",p)},d=_=>{u&&(u(_),u=void 0),c()},h=_=>{a=!1,window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h),l&&(l=!1,d(_))},m=()=>{a=!0,window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",h,i)},p=_=>{if(_.pointerType!=="touch"){if(a){l=!0;return}d(_)}},x=_=>{if(!Zl(_))return;l=!1;const y=t(o,_);typeof y=="function"&&(u=y,o.addEventListener("pointerleave",p,i))};o.addEventListener("pointerenter",x,i),o.addEventListener("pointerdown",m,i)}),r}const $i=(e,t)=>t?e===t?!0:$i(e,t.parentElement):!1,$n=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Jl=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Ql(e){return Jl.has(e.tagName)||e.isContentEditable===!0}const ec=new Set(["INPUT","SELECT","TEXTAREA"]);function tc(e){return ec.has(e.tagName)||e.isContentEditable===!0}const Et=new WeakSet;function Bi(e){return t=>{t.key==="Enter"&&e(t)}}function Bn(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const nc=(e,t)=>{const n=e.currentTarget;if(!n)return;const s=Bi(()=>{if(Et.has(n))return;Bn(n,"down");const i=Bi(()=>{Bn(n,"up")}),r=()=>Bn(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",r,t)});n.addEventListener("keydown",s,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),t)};function Oi(e){return $n(e)&&!Ii()}const Fi=new WeakSet;function sc(e,t,n={}){const[s,i,r]=Ni(e,n),o=a=>{const l=a.currentTarget;if(!Oi(a)||Fi.has(a))return;Et.add(l),n.stopPropagation&&Fi.add(a);const u=t(l,a),c=(m,p)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",h),Et.has(l)&&Et.delete(l),Oi(m)&&typeof u=="function"&&u(m,{success:p})},d=m=>{c(m,l===window||l===document||n.useGlobalTarget||$i(l,m.target))},h=m=>{c(m,!1)};window.addEventListener("pointerup",d,i),window.addEventListener("pointercancel",h,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),In(a)&&(a.addEventListener("focus",u=>nc(u,i)),!Ql(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}function On(e){return Es(e)&&"ownerSVGElement"in e}const Pt=new WeakMap;let Te;const Wi=(e,t,n)=>(s,i)=>i&&i[0]?i[0][e+"Size"]:On(s)&&"getBBox"in s?s.getBBox()[t]:s[n],ic=Wi("inline","width","offsetWidth"),oc=Wi("block","height","offsetHeight");function rc({target:e,borderBoxSize:t}){var n;(n=Pt.get(e))==null||n.forEach(s=>{s(e,{get width(){return ic(e,t)},get height(){return oc(e,t)}})})}function ac(e){e.forEach(rc)}function lc(){typeof ResizeObserver>"u"||(Te=new ResizeObserver(ac))}function cc(e,t){Te||lc();const n=Li(e);return n.forEach(s=>{let i=Pt.get(s);i||(i=new Set,Pt.set(s,i)),i.add(t),Te==null||Te.observe(s)}),()=>{n.forEach(s=>{const i=Pt.get(s);i==null||i.delete(t),i!=null&&i.size||Te==null||Te.unobserve(s)})}}const Ct=new Set;let We;function uc(){We=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Ct.forEach(t=>t(e))},window.addEventListener("resize",We)}function dc(e){return Ct.add(e),We||uc(),()=>{Ct.delete(e),!Ct.size&&typeof We=="function"&&(window.removeEventListener("resize",We),We=void 0)}}function Ui(e,t){return typeof e=="function"?dc(e):cc(e,t)}function hc(e){return On(e)&&e.tagName==="svg"}const fc=[...Mi,F,be],mc=e=>fc.find(Ai(e)),Hi=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ue=()=>({x:Hi(),y:Hi()}),zi=()=>({min:0,max:0}),W=()=>({x:zi(),y:zi()}),pc=new WeakMap;function At(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function rt(e){return typeof e=="string"||Array.isArray(e)}const Fn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Wn=["initial",...Fn];function Mt(e){return At(e.animate)||Wn.some(t=>rt(e[t]))}function Ki(e){return!!(Mt(e)||e.variants)}function gc(e,t,n){for(const s in t){const i=t[s],r=n[s];if(X(i))e.addValue(s,i);else if(X(r))e.addValue(s,Me(i,{owner:e}));else if(r!==i)if(e.hasValue(s)){const o=e.getValue(s);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(s);e.addValue(s,Me(o!==void 0?o:i,{owner:e}))}}for(const s in n)t[s]===void 0&&e.removeValue(s);return t}const Un={current:null},Yi={current:!1},yc=typeof window<"u";function vc(){if(Yi.current=!0,!!yc)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Un.current=e.matches;e.addEventListener("change",t),t()}else Un.current=!1}const Gi=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let kt={};function Xi(e){kt=e}function _c(){return kt}class xc{scrapeMotionValuesFromProps(t,n,s){return{}}constructor({parent:t,props:n,presenceContext:s,reducedMotionConfig:i,skipAnimations:r,blockInitialAnimation:o,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Sn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,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 m=q.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,I.render(this.render,!1,!0))};const{latestValues:u,renderState:c}=a;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=s,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=r,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=Mt(n),this.isVariantNode=Ki(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in h){const p=h[m];u[m]!==void 0&&X(p)&&p.set(u[m])}}mount(t){var n,s;if(this.hasBeenMounted)for(const i in this.initialValues)(n=this.values.get(i))==null||n.jump(this.initialValues[i]),this.latestValues[i]=this.initialValues[i];this.current=t,pc.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((i,r)=>this.bindToMotionValue(r,i)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Yi.current||vc(),this.shouldReduceMotion=Un.current),process.env.NODE_ENV!=="production"&&Zt(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(s=this.parent)==null||s.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),_e(this.notifyUpdate),_e(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const s=this.features[n];s&&(s.unmount(),s.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&Gl.has(t)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:l,ease:u,duration:c}=n.accelerate,d=new gi({element:this.current,name:t,keyframes:a,times:l,ease:u,duration:oe(c)}),h=o(d);this.valueSubscriptions.set(t,()=>{h(),d.cancel()});return}const s=Oe.has(t);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&I.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;typeof window<"u"&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),r&&r(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in kt){const n=kt[t];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[t]&&i&&s(this.props)&&(this.features[t]=new i(this)),this.features[t]){const r=this.features[t];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):W()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<Gi.length;s++){const i=Gi[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r="on"+i,o=t[r];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=gc(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const s=this.values.get(t);n!==s&&(s&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let s=this.values.get(t);return s===void 0&&n!==void 0&&(s=Me(n===null?void 0:n,{owner:this}),this.addValue(t,s)),s}readValue(t,n){let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(Ss(s)||Ps(s))?s=parseFloat(s):!mc(s)&&be.test(n)&&(s=Di(t,n)),this.setBaseTarget(t,X(s)?s.get():s)),X(s)?s.get():s}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var r;const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const o=Mn(this.props,n,(r=this.presenceContext)==null?void 0:r.custom);o&&(s=o[t])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!X(i)?i:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Xt),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Nn.render(this.render)}}class Zi extends xc{constructor(){super(...arguments),this.KeyframeResolver=Yl}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const s=t.style;return s?s[n]:void 0}removeValueFromRenderState(t,{vars:n,style:s}){delete n[t],delete s[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;X(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Se{constructor(t){this.isMounted=!1,this.node=t}update(){}}function qi({top:e,left:t,right:n,bottom:s}){return{x:{min:t,max:n},y:{min:e,max:s}}}function bc({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function wc(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),s=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function Hn(e){return e===void 0||e===1}function zn({scale:e,scaleX:t,scaleY:n}){return!Hn(e)||!Hn(t)||!Hn(n)}function ke(e){return zn(e)||Ji(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Ji(e){return Qi(e.x)||Qi(e.y)}function Qi(e){return e&&e!=="0%"}function Vt(e,t,n){const s=e-n,i=t*s;return n+i}function eo(e,t,n,s,i){return i!==void 0&&(e=Vt(e,i,s)),Vt(e,n,s)+t}function Kn(e,t=0,n=1,s,i){e.min=eo(e.min,t,n,s,i),e.max=eo(e.max,t,n,s,i)}function to(e,{x:t,y:n}){Kn(e.x,t.translate,t.scale,t.originPoint),Kn(e.y,n.translate,n.scale,n.originPoint)}const no=.999999999999,so=1.0000000000001;function Tc(e,t,n,s=!1){const i=n.length;if(!i)return;t.x=t.y=1;let r,o;for(let a=0;a<i;a++){r=n[a],o=r.projectionDelta;const{visualElement:l}=r.options;l&&l.props.style&&l.props.style.display==="contents"||(s&&r.options.layoutScroll&&r.scroll&&r!==r.root&&ze(e,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,to(e,o)),s&&ke(r.latestValues)&&ze(e,r.latestValues))}t.x<so&&t.x>no&&(t.x=1),t.y<so&&t.y>no&&(t.y=1)}function He(e,t){e.min=e.min+t,e.max=e.max+t}function io(e,t,n,s,i=.5){const r=N(e.min,e.max,i);Kn(e,t,n,r,s)}function ze(e,t){io(e.x,t.x,t.scaleX,t.scale,t.originX),io(e.y,t.y,t.scaleY,t.scale,t.originY)}function oo(e,t){return qi(wc(e.getBoundingClientRect(),t))}function Sc(e,t,n){const s=oo(e,n),{scroll:i}=t;return i&&(He(s.x,i.offset.x),He(s.y,i.offset.y)),s}const Ec={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Pc=Be.length;function Cc(e,t,n){let s="",i=!0;for(let r=0;r<Pc;r++){const o=Be[r],a=e[o];if(a===void 0)continue;let l=!0;if(typeof a=="number")l=a===(o.startsWith("scale")?1:0);else{const u=parseFloat(a);l=o.startsWith("scale")?u===1:u===0}if(!l||n){const u=Ri(a,Rn[o]);if(!l){i=!1;const c=Ec[o]||o;s+=`${c}(${u}) `}n&&(t[o]=u)}}return s=s.trim(),n?s=n(t,i?"":s):i&&(s="none"),s}function Yn(e,t,n){const{style:s,vars:i,transformOrigin:r}=e;let o=!1,a=!1;for(const l in t){const u=t[l];if(Oe.has(l)){o=!0;continue}else if(Us(l)){i[l]=u;continue}else{const c=Ri(u,Rn[l]);l.startsWith("origin")?(a=!0,r[l]=c):s[l]=c}}if(t.transform||(o||n?s.transform=Cc(t,e.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=r;s.transformOrigin=`${l} ${u} ${c}`}}function ro(e,{style:t,vars:n},s,i){const r=e.style;let o;for(o in t)r[o]=t[o];i==null||i.applyProjectionStyles(r,s);for(o in n)r.setProperty(o,n[o])}function ao(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const at={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(S.test(e))e=parseFloat(e);else return e;const n=ao(e,t.target.x),s=ao(e,t.target.y);return`${n}% ${s}%`}},Ac={correct:(e,{treeScale:t,projectionDelta:n})=>{const s=e,i=be.parse(e);if(i.length>5)return s;const r=be.createTransformer(e),o=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+o]/=a,i[1+o]/=l;const u=N(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),r(i)}},Gn={borderRadius:{...at,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:at,borderTopRightRadius:at,borderBottomLeftRadius:at,borderBottomRightRadius:at,boxShadow:Ac};function lo(e,{layout:t,layoutId:n}){return Oe.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Gn[e]||e==="opacity")}function Xn(e,t,n){var o;const s=e.style,i=t==null?void 0:t.style,r={};if(!s)return r;for(const a in s)(X(s[a])||i&&X(i[a])||lo(a,e)||((o=n==null?void 0:n.getValue(a))==null?void 0:o.liveStyle)!==void 0)&&(r[a]=s[a]);return r}function Mc(e){return window.getComputedStyle(e)}class kc extends Zi{constructor(){super(...arguments),this.type="html",this.renderInstance=ro}readValueFromInstance(t,n){var s;if(Oe.has(n))return(s=this.projection)!=null&&s.isProjecting?_n(n):Za(t,n);{const i=Mc(t),r=(Us(n)?i.getPropertyValue(n):i[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(t,{transformPagePoint:n}){return oo(t,n)}build(t,n,s){Yn(t,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,n,s){return Xn(t,n,s)}}const Vc={offset:"stroke-dashoffset",array:"stroke-dasharray"},jc={offset:"strokeDashoffset",array:"strokeDasharray"};function Dc(e,t,n=1,s=0,i=!0){e.pathLength=1;const r=i?Vc:jc;e[r.offset]=`${-s}`,e[r.array]=`${t} ${n}`}const Lc=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function co(e,{attrX:t,attrY:n,attrScale:s,pathLength:i,pathSpacing:r=1,pathOffset:o=0,...a},l,u,c){if(Yn(e,a,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:h}=e;d.transform&&(h.transform=d.transform,delete d.transform),(h.transform||d.transformOrigin)&&(h.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),h.transform&&(h.transformBox=(c==null?void 0:c.transformBox)??"fill-box",delete d.transformBox);for(const m of Lc)d[m]!==void 0&&(h[m]=d[m],delete d[m]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),s!==void 0&&(d.scale=s),i!==void 0&&Dc(d,i,r,o,!1)}const uo=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"]),ho=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Rc(e,t,n,s){ro(e,t,void 0,s);for(const i in t.attrs)e.setAttribute(uo.has(i)?i:jn(i),t.attrs[i])}function fo(e,t,n){const s=Xn(e,t,n);for(const i in e)if(X(e[i])||X(t[i])){const r=Be.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=e[i]}return s}class Ic extends Zi{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=W}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Oe.has(n)){const s=ji(n);return s&&s.default||0}return n=uo.has(n)?n:jn(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,s){return fo(t,n,s)}build(t,n,s){co(t,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(t,n,s,i){Rc(t,n,s,i)}mount(t){this.isSVGTag=ho(t.tagName),super.mount(t)}}const Nc=Wn.length;function mo(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?mo(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Nc;n++){const s=Wn[n],i=e.props[s];(rt(i)||i===!1)&&(t[s]=i)}return t}function po(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let s=0;s<n;s++)if(t[s]!==e[s])return!1;return!0}const $c=[...Fn].reverse(),Bc=Fn.length;function Oc(e){return t=>Promise.all(t.map(({animation:n,options:s})=>$l(e,n,s)))}function Fc(e){let t=Oc(e),n=go(),s=!0;const i=l=>(u,c)=>{var h;const d=Fe(e,c,l==="exit"?(h=e.presenceContext)==null?void 0:h.custom:void 0);if(d){const{transition:m,transitionEnd:p,...x}=d;u={...u,...x,...p}}return u};function r(l){t=l(e)}function o(l){const{props:u}=e,c=mo(e.parent)||{},d=[],h=new Set;let m={},p=1/0;for(let _=0;_<Bc;_++){const y=$c[_],b=n[y],w=u[y]!==void 0?u[y]:c[y],P=rt(w),T=y===l?b.isActive:null;T===!1&&(p=_);let M=w===c[y]&&w!==u[y]&&P;if(M&&s&&e.manuallyAnimateOnMount&&(M=!1),b.protectedKeys={...m},!b.isActive&&T===null||!w&&!b.prevProp||At(w)||typeof w=="boolean")continue;if(y==="exit"&&b.isActive&&T!==!0){b.prevResolvedValues&&(m={...m,...b.prevResolvedValues});continue}const j=Wc(b.prevProp,w);let C=j||y===l&&b.isActive&&!M&&P||_>p&&P,k=!1;const B=Array.isArray(w)?w:[w];let ee=B.reduce(i(y),{});T===!1&&(ee={});const{prevResolvedValues:ae={}}=b,A={...ae,...ee},U=D=>{C=!0,h.has(D)&&(k=!0,h.delete(D)),b.needsAnimating[D]=!0;const G=e.getValue(D);G&&(G.liveStyle=!1)};for(const D in A){const G=ee[D],ne=ae[D];if(m.hasOwnProperty(D))continue;let ve=!1;kn(G)&&kn(ne)?ve=!po(G,ne):ve=G!==ne,ve?G!=null?U(D):h.add(D):G!==void 0&&h.has(D)?U(D):b.protectedKeys[D]=!0}b.prevProp=w,b.prevResolvedValues=ee,b.isActive&&(m={...m,...ee}),s&&e.blockInitialAnimation&&(C=!1);const H=M&&j;C&&(!H||k)&&d.push(...B.map(D=>{const G={type:y};if(typeof D=="string"&&s&&!H&&e.manuallyAnimateOnMount&&e.parent){const{parent:ne}=e,ve=Fe(ne,D);if(ne.enteringChildren&&ve){const{delayChildren:v}=ve.transition||{};G.delay=_i(ne.enteringChildren,e,v)}}return{animation:D,options:G}}))}if(h.size){const _={};if(typeof u.initial!="boolean"){const y=Fe(e,Array.isArray(u.initial)?u.initial[0]:u.initial);y&&y.transition&&(_.transition=y.transition)}h.forEach(y=>{const b=e.getBaseTarget(y),w=e.getValue(y);w&&(w.liveStyle=!0),_[y]=b??null}),d.push({animation:_})}let x=!!d.length;return s&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(x=!1),s=!1,x?t(d):Promise.resolve()}function a(l,u){var d;if(n[l].isActive===u)return Promise.resolve();(d=e.variantChildren)==null||d.forEach(h=>{var m;return(m=h.animationState)==null?void 0:m.setActive(l,u)}),n[l].isActive=u;const c=o(l);for(const h in n)n[h].protectedKeys={};return c}return{animateChanges:o,setActive:a,setAnimateFunction:r,getState:()=>n,reset:()=>{n=go()}}}function Wc(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!po(t,e):!1}function Ve(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function go(){return{animate:Ve(!0),whileInView:Ve(),whileHover:Ve(),whileTap:Ve(),whileDrag:Ve(),whileFocus:Ve(),exit:Ve()}}function yo(e,t){e.min=t.min,e.max=t.max}function ce(e,t){yo(e.x,t.x),yo(e.y,t.y)}function vo(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const _o=1e-4,Uc=1-_o,Hc=1+_o,xo=.01,zc=0-xo,Kc=0+xo;function J(e){return e.max-e.min}function Yc(e,t,n){return Math.abs(e-t)<=n}function bo(e,t,n,s=.5){e.origin=s,e.originPoint=N(t.min,t.max,e.origin),e.scale=J(n)/J(t),e.translate=N(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Uc&&e.scale<=Hc||isNaN(e.scale))&&(e.scale=1),(e.translate>=zc&&e.translate<=Kc||isNaN(e.translate))&&(e.translate=0)}function lt(e,t,n,s){bo(e.x,t.x,n.x,s?s.originX:void 0),bo(e.y,t.y,n.y,s?s.originY:void 0)}function wo(e,t,n){e.min=n.min+t.min,e.max=e.min+J(t)}function Gc(e,t,n){wo(e.x,t.x,n.x),wo(e.y,t.y,n.y)}function To(e,t,n){e.min=t.min-n.min,e.max=e.min+J(t)}function jt(e,t,n){To(e.x,t.x,n.x),To(e.y,t.y,n.y)}function So(e,t,n,s,i){return e-=t,e=Vt(e,1/n,s),i!==void 0&&(e=Vt(e,1/i,s)),e}function Xc(e,t=0,n=1,s=.5,i,r=e,o=e){if(he.test(t)&&(t=parseFloat(t),t=N(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=N(r.min,r.max,s);e===r&&(a-=t),e.min=So(e.min,t,n,a,i),e.max=So(e.max,t,n,a,i)}function Eo(e,t,[n,s,i],r,o){Xc(e,t[n],t[s],t[i],t.scale,r,o)}const Zc=["x","scaleX","originX"],qc=["y","scaleY","originY"];function Po(e,t,n,s){Eo(e.x,t,Zc,n?n.x:void 0,s?s.x:void 0),Eo(e.y,t,qc,n?n.y:void 0,s?s.y:void 0)}function Co(e){return e.translate===0&&e.scale===1}function Ao(e){return Co(e.x)&&Co(e.y)}function Mo(e,t){return e.min===t.min&&e.max===t.max}function Jc(e,t){return Mo(e.x,t.x)&&Mo(e.y,t.y)}function ko(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Vo(e,t){return ko(e.x,t.x)&&ko(e.y,t.y)}function jo(e){return J(e.x)/J(e.y)}function Do(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function fe(e){return[e("x"),e("y")]}function Qc(e,t,n){let s="";const i=e.x.translate/t.x,r=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||r||o)&&(s=`translate3d(${i}px, ${r}px, ${o}px) `),(t.x!==1||t.y!==1)&&(s+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:d,rotateY:h,skewX:m,skewY:p}=n;u&&(s=`perspective(${u}px) ${s}`),c&&(s+=`rotate(${c}deg) `),d&&(s+=`rotateX(${d}deg) `),h&&(s+=`rotateY(${h}deg) `),m&&(s+=`skewX(${m}deg) `),p&&(s+=`skewY(${p}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const Lo=["TopLeft","TopRight","BottomLeft","BottomRight"],eu=Lo.length,Ro=e=>typeof e=="string"?parseFloat(e):e,Io=e=>typeof e=="number"||S.test(e);function tu(e,t,n,s,i,r){i?(e.opacity=N(0,n.opacity??1,nu(s)),e.opacityExit=N(t.opacity??1,0,su(s))):r&&(e.opacity=N(t.opacity??1,n.opacity??1,s));for(let o=0;o<eu;o++){const a=`border${Lo[o]}Radius`;let l=No(t,a),u=No(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||Io(l)===Io(u)?(e[a]=Math.max(N(Ro(l),Ro(u),s),0),(he.test(u)||he.test(l))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=N(t.rotate||0,n.rotate||0,s))}function No(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const nu=$o(0,.5,Rs),su=$o(.5,.95,ie);function $o(e,t,n){return s=>s<e?0:s>t?1:n(Qe(e,t,s))}function iu(e,t,n){const s=X(e)?e:Me(e);return s.start(An("",s,t,n)),s.animation}function ct(e,t,n,s={passive:!0}){return e.addEventListener(t,n,s),()=>e.removeEventListener(t,n)}const ou=(e,t)=>e.depth-t.depth;class ru{constructor(){this.children=[],this.isDirty=!1}add(t){Kt(this.children,t),this.isDirty=!0}remove(t){vt(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(ou),this.isDirty=!1,this.children.forEach(t)}}function au(e,t){const n=q.now(),s=({timestamp:i})=>{const r=i-n;r>=t&&(_e(s),e(r-t))};return I.setup(s,!0),()=>_e(s)}function Dt(e){return X(e)?e.get():e}class lu{constructor(){this.members=[]}add(t){Kt(this.members,t);for(let n=this.members.length-1;n>=0;n--){const s=this.members[n];if(s===t||s===this.lead||s===this.prevLead)continue;const i=s.instance;i&&i.isConnected===!1&&s.isPresent!==!1&&!s.snapshot&&vt(this.members,s)}t.scheduleRender()}remove(t){if(vt(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const r=this.members[i],o=r.instance;if(r.isPresent!==!1&&(!o||o.isConnected!==!1)){s=r;break}}return s?(this.promote(s),!0):!1}promote(t,n){const s=this.lead;if(t!==s&&(this.prevLead=s,this.lead=t,t.show(),s)){s.instance&&s.scheduleRender(),t.scheduleRender();const i=s.options.layoutDependency,r=t.options.layoutDependency;if(!(i!==void 0&&r!==void 0&&i===r)){const l=s.instance;l&&l.isConnected===!1&&!s.snapshot||(t.resumeFrom=s,n&&(t.resumeFrom.preserveOpacity=!0),s.snapshot&&(t.snapshot=s.snapshot,t.snapshot.latestValues=s.animationValues||s.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0))}const{crossfade:a}=t.options;a===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:s}=t;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Lt={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Zn=["","X","Y","Z"],cu=1e3;let uu=0;function qn(e,t,n,s){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),s&&(s[e]=0))}function Bo(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Pi(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",I,!(i||r))}const{parent:s}=e;s&&!s.hasCheckedOptimisedAppear&&Bo(s)}function Oo({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=uu++,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.layoutVersion=0,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(fu),this.nodes.forEach(yu),this.nodes.forEach(vu),this.nodes.forEach(mu)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new ru)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Xt),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=On(o)&&!hc(o),this.instance=o;const{layoutId:a,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let c,d=0;const h=()=>this.root.updateBlockedByResize=!1;I.read(()=>{d=window.innerWidth}),e(o,()=>{const m=window.innerWidth;m!==d&&(d=m,this.root.updateBlockedByResize=!0,c&&c(),c=au(h,250),Lt.hasAnimatedSinceResize&&(Lt.hasAnimatedSinceResize=!1,this.nodes.forEach(Uo)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:h,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||u.getDefaultTransition()||Tu,{onLayoutAnimationStart:x,onLayoutAnimationComplete:_}=u.getProps(),y=!this.targetLayout||!Vo(this.targetLayout,m),b=!d&&h;if(this.options.layoutRoot||this.resumeFrom||b||d&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const w={...Cn(p,"layout"),onPlay:x,onComplete:_};(u.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(c,b)}else d||Uo(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),_e(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(_u),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Bo(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const d=this.path[c];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Fo);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Wo);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(gu),this.nodes.forEach(du),this.nodes.forEach(hu)):this.nodes.forEach(Wo),this.clearAllSnapshots();const a=q.now();Y.delta=de(0,1e3/60,a-Y.timestamp),Y.timestamp=a,Y.isProcessing=!0,Qt.update.process(Y),Qt.preRender.process(Y),Qt.render.process(Y),Y.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Nn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(pu),this.sharedNodes.forEach(xu)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,I.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){I.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!J(this.snapshot.measuredBox.x)&&!J(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=W(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const l=s(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Ao(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;o&&this.instance&&(a||ke(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),Su(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return W();const a=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(Eu))){const{scroll:c}=this.root;c&&(He(a.x,c.offset.x),He(a.y,c.offset.y))}return a}removeElementScroll(o){var l;const a=W();if(ce(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let u=0;u<this.path.length;u++){const c=this.path[u],{scroll:d,options:h}=c;c!==this.root&&d&&h.layoutScroll&&(d.wasRoot&&ce(a,o),He(a.x,d.offset.x),He(a.y,d.offset.y))}return a}applyTransform(o,a=!1){const l=W();ce(l,o);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&ze(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),ke(c.latestValues)&&ze(l,c.latestValues)}return ke(this.latestValues)&&ze(l,this.latestValues),l}removeTransform(o){const a=W();ce(a,o);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!ke(u.latestValues))continue;zn(u.latestValues)&&u.updateSnapshot();const c=W(),d=u.measurePageBox();ce(c,d),Po(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return ke(this.latestValues)&&Po(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Y.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var m;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:d}=this.options;if(!this.layout||!(c||d))return;this.resolvedRelativeTargetAt=Y.timestamp;const h=this.getClosestProjectingParent();h&&this.linkedParentVersion!==h.layoutVersion&&!h.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(h&&h.layout?this.createRelativeTarget(h,this.layout.layoutBox,h.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=W(),this.targetWithTransforms=W()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Gc(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ce(this.target,this.layout.layoutBox),to(this.target,this.targetDelta)):ce(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?this.createRelativeTarget(h,this.target,h.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||zn(this.parent.latestValues)||Ji(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,l){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=W(),this.relativeTargetOrigin=W(),jt(this.relativeTargetOrigin,a,l),ce(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var p;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Y.timestamp&&(l=!1),l)return;const{layout:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;ce(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,h=this.treeScale.y;Tc(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=W());const{target:m}=o;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(vo(this.prevProjectionDelta.x,this.projectionDelta.x),vo(this.prevProjectionDelta.y,this.projectionDelta.y)),lt(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==h||!Do(this.projectionDelta.x,this.prevProjectionDelta.x)||!Do(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ue(),this.projectionDelta=Ue(),this.projectionDeltaWithTransform=Ue()}setAnimationOrigin(o,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},d=Ue();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=W(),m=l?l.source:void 0,p=this.layout?this.layout.source:void 0,x=m!==p,_=this.getStack(),y=!_||_.members.length<=1,b=!!(x&&!y&&this.options.crossfade===!0&&!this.path.some(wu));this.animationProgress=0;let w;this.mixTargetDelta=P=>{const T=P/1e3;Ho(d.x,o.x,T),Ho(d.y,o.y,T),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(jt(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),bu(this.relativeTarget,this.relativeTargetOrigin,h,T),w&&Jc(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=W()),ce(w,this.relativeTarget)),x&&(this.animationValues=c,tu(c,u,this.latestValues,T,b,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,u;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(u=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||u.stop(),this.pendingAnimation&&(_e(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=I.update(()=>{Lt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Me(0)),this.currentAnimation=iu(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),o.onUpdate&&o.onUpdate(c)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(cu),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&Xo(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||W();const d=J(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+d;const h=J(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+h}ce(a,l),ze(a,c),lt(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new lu),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&qn("z",o,u,this.animationValues);for(let c=0;c<Zn.length;c++)qn(`rotate${Zn[c]}`,o,u,this.animationValues),qn(`skew${Zn[c]}`,o,u,this.animationValues);o.render();for(const c in u)o.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=Dt(a==null?void 0:a.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=Dt(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!ke(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let d=Qc(this.projectionDeltaWithTransform,this.treeScale,c);l&&(d=l(c,d)),o.transform=d;const{x:h,y:m}=this.projectionDelta;o.transformOrigin=`${h.origin*100}% ${m.origin*100}% 0`,u.animationValues?o.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:o.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const p in Gn){if(c[p]===void 0)continue;const{correct:x,applyTo:_,isCSSVariable:y}=Gn[p],b=d==="none"?c[p]:x(c[p],u);if(_){const w=_.length;for(let P=0;P<w;P++)o[_[P]]=b}else y?this.options.visualElement.renderState.vars[p]=b:o[p]=b}this.options.layoutId&&(o.pointerEvents=u===this?Dt(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(Fo),this.root.sharedNodes.clear()}}}function du(e){e.updateLayout()}function hu(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=e.layout,{animationType:r}=e.options,o=t.source!==e.layout.source;r==="size"?fe(d=>{const h=o?t.measuredBox[d]:t.layoutBox[d],m=J(h);h.min=s[d].min,h.max=h.min+m}):Xo(r,t.layoutBox,s)&&fe(d=>{const h=o?t.measuredBox[d]:t.layoutBox[d],m=J(s[d]);h.max=h.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+m)});const a=Ue();lt(a,s,t.layoutBox);const l=Ue();o?lt(l,e.applyTransform(i,!0),t.measuredBox):lt(l,s,t.layoutBox);const u=!Ao(a);let c=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:h,layout:m}=d;if(h&&m){const p=W();jt(p,t.layoutBox,h.layoutBox);const x=W();jt(x,s,m.layoutBox),Vo(p,x)||(c=!0),d.options.layoutRoot&&(e.relativeTarget=x,e.relativeTargetOrigin=p,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:s,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:s}=e.options;s&&s()}e.options.transition=void 0}function fu(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function mu(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function pu(e){e.clearSnapshot()}function Fo(e){e.clearMeasurements()}function Wo(e){e.isLayoutDirty=!1}function gu(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Uo(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function yu(e){e.resolveTargetDelta()}function vu(e){e.calcProjection()}function _u(e){e.resetSkewAndRotation()}function xu(e){e.removeLeadSnapshot()}function Ho(e,t,n){e.translate=N(t.translate,0,n),e.scale=N(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function zo(e,t,n,s){e.min=N(t.min,n.min,s),e.max=N(t.max,n.max,s)}function bu(e,t,n,s){zo(e.x,t.x,n.x,s),zo(e.y,t.y,n.y,s)}function wu(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Tu={duration:.45,ease:[.4,0,.1,1]},Ko=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Yo=Ko("applewebkit/")&&!Ko("chrome/")?Math.round:ie;function Go(e){e.min=Yo(e.min),e.max=Yo(e.max)}function Su(e){Go(e.x),Go(e.y)}function Xo(e,t,n){return e==="position"||e==="preserve-aspect"&&!Yc(jo(t),jo(n),.2)}function Eu(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const Pu=Oo({attachResizeListener:(e,t)=>ct(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),Jn={current:void 0},Zo=Oo({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Jn.current){const e=new Pu({});e.mount(window),e.setOptions({layoutScroll:!0}),Jn.current=e}return Jn.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Rt=g.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function qo(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Cu(...e){return t=>{let n=!1;const s=e.map(i=>{const r=qo(i,t);return!n&&typeof r=="function"&&(n=!0),r});if(n)return()=>{for(let i=0;i<s.length;i++){const r=s[i];typeof r=="function"?r():qo(e[i],null)}}}}function Au(...e){return E.useCallback(Cu(...e),e)}class Mu extends E.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const s=n.offsetParent,i=In(s)&&s.offsetWidth||0,r=In(s)&&s.offsetHeight||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,o.bottom=r-o.height-o.top}return null}componentDidUpdate(){}render(){return this.props.children}}function ku({children:e,isPresent:t,anchorX:n,anchorY:s,root:i,pop:r}){var h;const o=g.useId(),a=g.useRef(null),l=g.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:u}=g.useContext(Rt),c=((h=e.props)==null?void 0:h.ref)??(e==null?void 0:e.ref),d=Au(a,c);return g.useInsertionEffect(()=>{const{width:m,height:p,top:x,left:_,right:y,bottom:b}=l.current;if(t||r===!1||!a.current||!m||!p)return;const w=n==="left"?`left: ${_}`:`right: ${y}`,P=s==="bottom"?`bottom: ${b}`:`top: ${x}`;a.current.dataset.motionPopId=o;const T=document.createElement("style");u&&(T.nonce=u);const M=i??document.head;return M.appendChild(T),T.sheet&&T.sheet.insertRule(`
23
+ [data-motion-pop-id="${o}"] {
3
24
  position: absolute !important;
4
- width: ${e}px !important;
5
- height: ${t}px !important;
6
- ${h}px !important;
7
- ${g}px !important;
25
+ width: ${m}px !important;
26
+ height: ${p}px !important;
27
+ ${w}px !important;
28
+ ${P}px !important;
8
29
  }
9
- `),()=>{v.contains(_)&&v.removeChild(_)}},[r]),(0,o.jsx)(s,{isPresent:r,childRef:f,sizeRef:p,pop:u,children:u===!1?n:t.cloneElement(n,{ref:h})})}var l=({children:n,initial:r,isPresent:i,onExitComplete:a,custom:s,presenceAffectsLayout:l,mode:d,anchorX:f,anchorY:p,root:m})=>{let h=e.c(u),g=(0,t.useId)(),_=!0,v=(0,t.useMemo)(()=>(_=!1,{id:g,initial:r,isPresent:i,custom:s,onExitComplete:e=>{h.set(e,!0);for(let e of h.values())if(!e)return;a&&a()},register:e=>(h.set(e,!1),()=>h.delete(e))}),[i,h,a]);return l&&_&&(v={...v}),(0,t.useMemo)(()=>{h.forEach((e,t)=>h.set(t,!1))},[i]),t.useEffect(()=>{!i&&!h.size&&a&&a()},[i]),n=(0,o.jsx)(c,{pop:d===`popLayout`,isPresent:i,anchorX:f,anchorY:p,root:m,children:n}),(0,o.jsx)(e.o.Provider,{value:v,children:n})};function u(){return new Map}var d=e=>e.key||``;function f(e){let n=[];return t.Children.forEach(e,e=>{(0,t.isValidElement)(e)&&n.push(e)}),n}var p=({children:n,custom:r,initial:i=!0,onExitComplete:a,presenceAffectsLayout:s=!0,mode:c=`sync`,propagate:u=!1,anchorX:p=`left`,anchorY:m=`top`,root:h})=>{let[g,_]=e.r(u),v=(0,t.useMemo)(()=>f(n),[n]),y=u&&!g?[]:v.map(d),b=(0,t.useRef)(!0),x=(0,t.useRef)(v),S=e.c(()=>new Map),C=(0,t.useRef)(new Set),[w,T]=(0,t.useState)(v),[E,D]=(0,t.useState)(v);e.s(()=>{b.current=!1,x.current=v;for(let e=0;e<E.length;e++){let t=d(E[e]);y.includes(t)?(S.delete(t),C.current.delete(t)):S.get(t)!==!0&&S.set(t,!1)}},[E,y.length,y.join(`-`)]);let O=[];if(v!==w){let e=[...v];for(let t=0;t<E.length;t++){let n=E[t],r=d(n);y.includes(r)||(e.splice(t,0,n),O.push(n))}return c===`wait`&&O.length&&(e=O),D(f(e)),T(v),null}process.env.NODE_ENV!==`production`&&c===`wait`&&E.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.`);let{forceRender:k}=(0,t.useContext)(e.l);return(0,o.jsx)(o.Fragment,{children:E.map(e=>{let t=d(e),n=u&&!g?!1:v===E||y.includes(t);return(0,o.jsx)(l,{isPresent:n,initial:!b.current||i?void 0:!1,custom:r,presenceAffectsLayout:s,mode:c,root:h,onExitComplete:n?void 0:()=>{if(C.current.has(t))return;if(C.current.add(t),S.has(t))S.set(t,!0);else return;let e=!0;S.forEach(t=>{t||(e=!1)}),e&&(k?.(),D(x.current),u&&_?.(),a&&a())},anchorX:p,anchorY:m,children:e},t)})})};const m=`tooltip-module__triggerWrapper___mvvzS`,h=`tooltip-module__tooltip___mEmui`,g=`tooltip-module__arrow___Kjrs-`;var _={triggerWrapper:`tooltip-module__triggerWrapper___mvvzS`,tooltip:`tooltip-module__tooltip___mEmui`,arrow:`tooltip-module__arrow___Kjrs-`};const v=({children:r,message:i=void 0,position:a=`top`})=>{let[s,c]=(0,t.useState)(!1),l=(0,t.useRef)(null),u=(0,t.useRef)(null);return(0,t.useLayoutEffect)(()=>{if(!s)return;let e=l.current?.getBoundingClientRect(),t=u.current;if(e&&t){let n=t.offsetWidth,r=t.offsetHeight,{x:i,y:o}={top:{x:e.left+e.width/2-n/2,y:e.top-r-10},bottom:{x:e.left+e.width/2-n/2,y:e.bottom+10},left:{x:e.left-n-10,y:e.top+e.height/2-r/2},right:{x:e.right+10,y:e.top+e.height/2-r/2}}[a];u.current&&(u.current.style.setProperty(`--tooltip-x`,`${i+window.scrollX}px`),u.current.style.setProperty(`--tooltip-y`,`${o+window.scrollY}px`))}},[s,a]),i?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(`div`,{ref:l,className:_.triggerWrapper,onMouseEnter:()=>{i&&c(!0)},onMouseLeave:()=>{c(!1)},children:r}),(0,n.createPortal)((0,o.jsx)(p,{children:s&&(0,o.jsxs)(e.n.div,{ref:u,"data-position":a,initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.5},transition:{duration:.2},className:_.tooltip,children:[i,(0,o.jsx)(`div`,{className:_.arrow})]})}),document.body)]}):(0,o.jsx)(o.Fragment,{children:r})},y=`button-module__button___JyfZW`,b=`button-module__buttonPrimary___5NTVu`,x=`button-module__buttonSecondary___0ZJB0`,S=`button-module__buttonIcon___-Ki--`;var C={button:`button-module__button___JyfZW`,buttonPrimary:`button-module__buttonPrimary___5NTVu`,buttonSecondary:`button-module__buttonSecondary___0ZJB0`,buttonIcon:`button-module__buttonIcon___-Ki--`};const w=({children:t,onClick:n,variant:r=`primary`,disabled:i=!1,disabledMessage:a,tooltipPosition:s=`top`,...c})=>(0,o.jsx)(v,{message:i?a:void 0,position:s,children:(0,o.jsx)(e.n.button,{className:`${C.button} ${C[{primary:`buttonPrimary`,secondary:`buttonSecondary`,icon:`buttonIcon`}[r]]}`,disabled:i,onClick:n,whileHover:i?void 0:{scale:1.05},whileTap:i?void 0:{scale:.95},...c,children:t})}),T=`styles-module__container___4N5ol`,E=`styles-module__label___MGMnw`,D=`styles-module__description___rbSQU`;var O={container:`styles-module__container___4N5ol`,label:`styles-module__label___MGMnw`,description:`styles-module__description___rbSQU`};const k=({label:t,description:n,children:r})=>(0,o.jsxs)(`div`,{className:O.container,children:[(0,o.jsx)(e.n.label,{className:O.label,children:t}),(0,o.jsx)(e.n.span,{whileHover:{scale:1.5,translateX:50},className:O.description,children:n}),r]}),ee=`styles-module__header___XLj-v`;var A={header:`styles-module__header___XLj-v`};const te=({children:e,variant:t=`h1`})=>(0,o.jsx)(t,{className:A.header,children:e}),ne=`svg-module__icon___-1aKL`;var j={icon:`svg-module__icon___-1aKL`};const M=({width:t,onClick:n})=>(0,o.jsx)(e.n.svg,{className:j.icon,viewBox:`0 0 24 24`,fill:`none`,width:t,initial:{scale:1},whileHover:{scale:1.1,rotate:90},whileTap:{scale:.9},transition:{type:`spring`,stiffness:200},onClick:n,children:(0,o.jsx)(`path`,{d:`M18 6L6 18M6 6L18 18`,stroke:`currentColor`,strokeWidth:`3`,strokeLinecap:`round`})}),re=`styles-module__inputContainer___FmEPG`,ie=`styles-module__input___-yNSk`,ae=`styles-module__clearButton___wbql6`,oe=`styles-module__suggestionsList___UbA7i`,se=`styles-module__suggestionItem___HjYcr`;var N={inputContainer:`styles-module__inputContainer___FmEPG`,input:`styles-module__input___-yNSk`,clearButton:`styles-module__clearButton___wbql6`,suggestionsList:`styles-module__suggestionsList___UbA7i`,suggestionItem:`styles-module__suggestionItem___HjYcr`};const P=({value:n,onChange:r,autoComplete:i=`off`,disabled:a=!1,suggestions:s=[],placeholder:c,...l})=>{let[u,d]=(0,t.useState)(!1),f=(0,t.useMemo)(()=>i===`off`||s.length===0||!n?[]:s.filter(e=>e.toLowerCase().includes(n.toLowerCase())),[i,s,n]);return(0,o.jsxs)(`div`,{className:N.inputContainer,children:[(0,o.jsx)(e.n.input,{id:`input`,className:N.input,whileFocus:{scale:1.02},value:n,disabled:a,onChange:({target:e})=>r(e.value),placeholder:c,onFocus:()=>d(!0),onBlur:()=>setTimeout(()=>d(!1),150),...l}),(0,o.jsx)(`div`,{className:N.clearButton,children:n&&(0,o.jsx)(M,{width:`20`,onClick:()=>r(``)})}),(0,o.jsx)(p,{children:u&&f.length>0&&(0,o.jsx)(e.n.ul,{className:N.suggestionsList,initial:{opacity:0,y:-10,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-10,scale:.95},transition:{duration:.2},children:f.map(e=>(0,o.jsx)(`li`,{className:N.suggestionItem,onClick:()=>{r(e),d(!1)},children:e},e))})})]})},ce=`modal-module__overlay___z2GxJ`,le=`modal-module__modal___RJmct`,ue=`modal-module__header___KlpKY`,de=`modal-module__close___ELArH`,fe=`modal-module__content___OMS8T`,pe=`modal-module__footer___rF7ly`;var F={overlay:`modal-module__overlay___z2GxJ`,modal:`modal-module__modal___RJmct`,header:`modal-module__header___KlpKY`,close:`modal-module__close___ELArH`,content:`modal-module__content___OMS8T`,footer:`modal-module__footer___rF7ly`};const I=({isVisible:t,onClose:n,size:r=`m`,header:i,footer:a,children:s})=>(0,o.jsx)(p,{children:t&&(0,o.jsx)(e.n.div,{id:`overlay`,className:F.overlay,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:n,children:(0,o.jsxs)(e.n.div,{id:`modal`,className:F.modal,"data-size":r,initial:{opacity:0,scale:0},animate:{opacity:1,scale:1},transition:{duration:.3},exit:{opacity:0,scale:0},children:[(0,o.jsxs)(e.n.div,{id:`header`,className:F.header,onClick:e=>e.stopPropagation(),children:[i,(0,o.jsx)(`div`,{className:F.close,children:(0,o.jsx)(M,{width:`30`,onClick:n})})]}),(0,o.jsx)(e.n.div,{id:`content`,className:F.content,onClick:e=>e.stopPropagation(),children:s}),a&&(0,o.jsx)(e.n.div,{id:`footer`,className:F.footer,onClick:e=>e.stopPropagation(),children:a})]})})}),me=`select-module__container___U4BrV`,he=`select-module__hiddenSelect___qRfKA`,ge=`select-module__control___qogxN`,_e=`select-module__disabled___kYpJI`,ve=`select-module__value___sRnlS`,ye=`select-module__placeholder___qhzG5`,be=`select-module__arrow___LWj9s`,xe=`select-module__menu___MHmhv`,Se=`select-module__searchWrapper___gI2ic`,Ce=`select-module__list___XICSu`,we=`select-module__item___XHREC`,Te=`select-module__selected___iSbaR`,Ee=`select-module__checkbox___dD2H5`,De=`select-module__empty___i6OgM`;var L={container:`select-module__container___U4BrV`,hiddenSelect:`select-module__hiddenSelect___qRfKA`,control:`select-module__control___qogxN`,disabled:`select-module__disabled___kYpJI`,value:`select-module__value___sRnlS`,placeholder:`select-module__placeholder___qhzG5`,arrow:`select-module__arrow___LWj9s`,menu:`select-module__menu___MHmhv`,searchWrapper:`select-module__searchWrapper___gI2ic`,list:`select-module__list___XICSu`,item:`select-module__item___XHREC`,selected:`select-module__selected___iSbaR`,checkbox:`select-module__checkbox___dD2H5`,empty:`select-module__empty___i6OgM`};const R=({selectedOption:n,selectType:r=`single`,autoFilter:i=!1,options:a,onChange:s,placeholder:c=`Select...`,disabled:l=!1,className:u=``,name:d,id:f,required:m,...h})=>{let[g,_]=(0,t.useState)(!1),[v,y]=(0,t.useState)(``),b=e=>{if(!l){if(r===`multi`){let t=Array.isArray(n)?n:[];s(t.find(t=>t.value===e.value)?t.filter(t=>t.value!==e.value):[...t,e])}else s(e),_(!1);y(``)}},x=()=>{l||_(!g)},S=(0,t.useMemo)(()=>a.filter(e=>e.label.toLowerCase().includes(v.toLowerCase())),[a,v]),C=(0,t.useMemo)(()=>r===`multi`&&Array.isArray(n)?n.length>0?n.map(e=>e.label).join(`, `):c:n?.label||c,[n,r,c]),w=e=>r===`multi`&&Array.isArray(n)?n.some(t=>t.value===e.value):n?.value===e.value;return(0,o.jsxs)(`div`,{className:`${L.container} ${u}`,children:[(0,o.jsx)(`select`,{name:d,id:f,required:m,disabled:l,value:r===`single`&&n?n.value:void 0,className:L.hiddenSelect,tabIndex:-1,"aria-hidden":`true`,...h,children:a.map(e=>(0,o.jsx)(`option`,{value:e.value,children:e.label},e.value))}),(0,o.jsxs)(e.n.div,{className:`${L.control} ${l?L.disabled:``}`,onClick:x,whileHover:l?{}:{borderColor:`var(--color-primary)`},transition:{duration:.2},role:`button`,"aria-haspopup":`listbox`,"aria-expanded":g,tabIndex:l?-1:0,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),x())},children:[(0,o.jsx)(`span`,{className:`${L.value} ${n?``:L.placeholder}`,children:C}),(0,o.jsx)(e.n.span,{className:L.arrow,animate:{rotate:g?180:0},transition:{duration:.2},children:`▼`})]}),(0,o.jsx)(p,{children:g&&(0,o.jsxs)(e.n.div,{className:L.menu,initial:{opacity:0,y:-4,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-4,scale:.95},transition:{duration:.15},role:`listbox`,children:[i&&(0,o.jsx)(`div`,{className:L.searchWrapper,children:(0,o.jsx)(P,{value:v,onChange:y,placeholder:`Search...`,autoFocus:!0})}),(0,o.jsx)(`div`,{className:L.list,children:S.length>0?S.map(t=>(0,o.jsxs)(e.n.div,{className:`${L.item} ${w(t)?L.selected:``}`,onClick:()=>b(t),whileHover:{backgroundColor:`var(--color-primary)`,color:`white`},transition:{duration:.15},role:`option`,"aria-selected":w(t),children:[r===`multi`&&(0,o.jsx)(`span`,{className:L.checkbox,children:w(t)?`✓`:`○`}),t.label]},t.value)):(0,o.jsx)(`div`,{className:L.empty,children:`No options found`})})]})})]})},Oe=`toggle-module__wrapper___xb91q`,ke=`toggle-module__label___8-AlI`,Ae=`toggle-module__enabled___3jPo5`,je=`toggle-module__handle___fiWwj`;var z={wrapper:`toggle-module__wrapper___xb91q`,label:`toggle-module__label___8-AlI`,switch:`toggle-module__switch___9e0np`,enabled:`toggle-module__enabled___3jPo5`,handle:`toggle-module__handle___fiWwj`};const B=({label:n,state:r,onChange:i,disabled:a=!1})=>{let s=(0,t.useRef)(null);return(0,t.useLayoutEffect)(()=>{s.current&&(r?s.current.style.setProperty(`--toggle-direction`,`flex-end`):s.current.style.setProperty(`--toggle-direction`,`flex-start`))},[r]),(0,o.jsxs)(`div`,{className:z.wrapper,children:[(0,o.jsx)(`span`,{className:z.label,children:n}),(0,o.jsx)(e.n.button,{ref:s,className:`${z.switch} ${r?z.enabled:``}`,onClick:()=>i(!r),disabled:a,...!a&&{whileHover:{scale:1.1}},children:(0,o.jsx)(e.n.div,{layout:!0,className:z.handle,initial:{opacity:0},animate:{opacity:1},transition:{type:`spring`,stiffness:300,damping:15}})})]})},V=()=>{let[e,n]=(0,t.useState)(),[r,i]=(0,t.useState)(!1);return(0,t.useLayoutEffect)(()=>{let e=window.matchMedia(`(prefers-color-scheme: dark)`).matches,t=document.documentElement.classList.contains(`dark`);n(e&&t),e&&t?(document.documentElement.classList.remove(`light`),document.documentElement.classList.add(`dark`)):(document.documentElement.classList.remove(`dark`),document.documentElement.classList.add(`light`))},[]),{isDark:e,isTransitioning:r,toggleTheme:(0,t.useCallback)(e=>{if(r)return;let t=e.clientX,a=e.clientY;document.documentElement.style.setProperty(`--x`,`${t}px`),document.documentElement.style.setProperty(`--y`,`${a}px`);let o=document.documentElement.classList.contains(`dark`);if(n(!o),!document.startViewTransition){o?(document.documentElement.classList.remove(`dark`),document.documentElement.classList.add(`light`)):(document.documentElement.classList.remove(`light`),document.documentElement.classList.add(`dark`));return}i(!0),document.startViewTransition(()=>{o?(document.documentElement.classList.remove(`dark`),document.documentElement.classList.add(`light`)):(document.documentElement.classList.remove(`light`),document.documentElement.classList.add(`dark`))}).finished.finally(()=>{i(!1)})},[r])}};var H={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},U=t.default.createContext&&t.default.createContext(H),W=[`attr`,`size`,`title`];function G(e,t){if(e==null)return{};var n=Me(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Me(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function K(){return K=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},K.apply(this,arguments)}function q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function J(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?q(Object(n),!0).forEach(function(t){Ne(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ne(e,t,n){return t=Pe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pe(e){var t=Fe(e,`string`);return typeof t==`symbol`?t:t+``}function Fe(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Y(e){return e&&e.map((e,n)=>t.default.createElement(e.tag,J({key:n},e.attr),Y(e.child)))}function X(e){return n=>t.default.createElement(Ie,K({attr:J({},e.attr)},n),Y(e.child))}function Ie(e){var n=n=>{var{attr:r,size:i,title:a}=e,o=G(e,W),s=i||n.size||`1em`,c;return n.className&&(c=n.className),e.className&&(c=(c?c+` `:``)+e.className),t.default.createElement(`svg`,K({stroke:`currentColor`,fill:`currentColor`,strokeWidth:`0`},n.attr,r,o,{className:c,style:J(J({color:e.color||n.color},n.style),e.style),height:s,width:s,xmlns:`http://www.w3.org/2000/svg`}),a&&t.default.createElement(`title`,null,a),e.children)};return U===void 0?n(H):t.default.createElement(U.Consumer,null,e=>n(e))}function Le(e){return X({tag:`svg`,attr:{viewBox:`0 0 512 512`},child:[{tag:`path`,attr:{d:`M283.211 512c78.962 0 151.079-35.925 198.857-94.792 7.068-8.708-.639-21.43-11.562-19.35-124.203 23.654-238.262-71.576-238.262-196.954 0-72.222 38.662-138.635 101.498-174.394 9.686-5.512 7.25-20.197-3.756-22.23A258.156 258.156 0 0 0 283.211 0c-141.309 0-256 114.511-256 256 0 141.309 114.511 256 256 256z`},child:[]}]})(e)}function Re(e){return X({tag:`svg`,attr:{viewBox:`0 0 512 512`},child:[{tag:`path`,attr:{d:`M256 160c-52.9 0-96 43.1-96 96s43.1 96 96 96 96-43.1 96-96-43.1-96-96-96zm246.4 80.5l-94.7-47.3 33.5-100.4c4.5-13.6-8.4-26.5-21.9-21.9l-100.4 33.5-47.4-94.8c-6.4-12.8-24.6-12.8-31 0l-47.3 94.7L92.7 70.8c-13.6-4.5-26.5 8.4-21.9 21.9l33.5 100.4-94.7 47.4c-12.8 6.4-12.8 24.6 0 31l94.7 47.3-33.5 100.5c-4.5 13.6 8.4 26.5 21.9 21.9l100.4-33.5 47.3 94.7c6.4 12.8 24.6 12.8 31 0l47.3-94.7 100.4 33.5c13.6 4.5 26.5-8.4 21.9-21.9l-33.5-100.4 94.7-47.3c13-6.5 13-24.7.2-31.1zm-155.9 106c-49.9 49.9-131.1 49.9-181 0-49.9-49.9-49.9-131.1 0-181 49.9-49.9 131.1-49.9 181 0 49.9 49.9 49.9 131.1 0 181z`},child:[]}]})(e)}const ze=()=>{let{isDark:e,isTransitioning:t,toggleTheme:n}=V();return(0,o.jsx)(w,{variant:`icon`,onClick:n,disabled:t,"aria-label":e?`Switch to light mode`:`Switch to dark mode`,children:e?(0,o.jsx)(Re,{size:`20`}):(0,o.jsx)(Le,{size:`20`})})},Be=`topnav-module__topnavContainer___TXXB4`,Ve=`topnav-module__topRow___s-Ohm`,He=`topnav-module__header___r3Y52`,Ue=`topnav-module__collapsibleContent___oulCx`,We=`topnav-module__searchWrapper___Rdox0`,Ge=`topnav-module__themeWrapper___gx0Yd`;var Z={topnavContainer:`topnav-module__topnavContainer___TXXB4`,topRow:`topnav-module__topRow___s-Ohm`,header:`topnav-module__header___r3Y52`,collapsibleContent:`topnav-module__collapsibleContent___oulCx`,searchWrapper:`topnav-module__searchWrapper___Rdox0`,themeWrapper:`topnav-module__themeWrapper___gx0Yd`};const Ke=({width:t,onClick:n})=>(0,o.jsxs)(e.n.svg,{className:j.icon,viewBox:`0 0 100 80`,width:t,onClick:n,initial:{scale:1},whileHover:{scale:1.1},children:[(0,o.jsx)(`rect`,{fill:`currentColor`,width:`100`,height:`12`,rx:`8`}),(0,o.jsx)(`rect`,{fill:`currentColor`,y:`30`,width:`100`,height:`12`,rx:`8`}),(0,o.jsx)(`rect`,{fill:`currentColor`,y:`60`,width:`100`,height:`12`,rx:`8`})]}),qe=({header:n,logo:r,logoClick:i,search:a})=>{let[s,c]=(0,t.useState)(!1),[l,u]=(0,t.useState)(!0);return(0,t.useLayoutEffect)(()=>{let e=()=>{window.innerWidth<=768?(u(!1),c(!0)):c(!1)};return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),(0,o.jsxs)(e.n.nav,{className:Z.topnavContainer,children:[(0,o.jsxs)(`div`,{className:Z.topRow,children:[(0,o.jsx)(`div`,{className:Z.header,children:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(`div`,{onClick:i,children:r}),n]})}),s&&(0,o.jsx)(w,{variant:`icon`,onClick:()=>u(!l),children:l?(0,o.jsx)(M,{width:`20`}):(0,o.jsx)(Ke,{width:`20`})})]}),(0,o.jsx)(p,{children:(l||!s)&&(0,o.jsxs)(e.n.div,{className:Z.collapsibleContent,initial:s?{height:0,opacity:0}:!1,animate:{height:`auto`,opacity:1},exit:{height:0,opacity:0},children:[(0,o.jsx)(`div`,{className:Z.searchWrapper,children:a}),(0,o.jsx)(`div`,{className:Z.themeWrapper,children:(0,o.jsx)(ze,{})})]})})]})},Je=`styles-module__thumbnailWrapper___u23u7`,Ye=`styles-module__thumbnail___jCAOs`,Xe=`styles-module__hoverOverlay___t7-nK`,Ze=`styles-module__expandIcon___JjIG9`,Qe=`styles-module__skeleton___4jcLE`,$e=`styles-module__shimmer___l75mH`,et=`styles-module__errorState___SFu-H`,tt=`styles-module__errorIcon___zr-Sh`,nt=`styles-module__errorText___QIZao`,rt=`styles-module__retryButton___BZWVN`,it=`styles-module__lightboxOverlay___6NULt`,at=`styles-module__closeButton___Obq8-`,ot=`styles-module__lightboxContent___GmtCV`,st=`styles-module__lightboxMedia___FUqX2`;var Q={thumbnailWrapper:`styles-module__thumbnailWrapper___u23u7`,thumbnail:`styles-module__thumbnail___jCAOs`,hoverOverlay:`styles-module__hoverOverlay___t7-nK`,expandIcon:`styles-module__expandIcon___JjIG9`,skeleton:`styles-module__skeleton___4jcLE`,shimmer:`styles-module__shimmer___l75mH`,errorState:`styles-module__errorState___SFu-H`,errorIcon:`styles-module__errorIcon___zr-Sh`,errorText:`styles-module__errorText___QIZao`,retryButton:`styles-module__retryButton___BZWVN`,lightboxOverlay:`styles-module__lightboxOverlay___6NULt`,closeButton:`styles-module__closeButton___Obq8-`,lightboxContent:`styles-module__lightboxContent___GmtCV`,lightboxMedia:`styles-module__lightboxMedia___FUqX2`};const ct=({divRef:t})=>(0,o.jsx)(e.n.div,{ref:t,className:`${Q.thumbnail} ${Q.skeleton}`,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},"aria-busy":!0,"aria-label":`Loading image`}),$=({src:e,onError:n})=>{let[r,i]=(0,t.useState)(!0),[a,o]=(0,t.useState)(!1),[s,c]=(0,t.useState)(!1),[l,u]=(0,t.useState)(0),d=(0,t.useCallback)(()=>{u(e=>e+1)},[]);return(0,t.useEffect)(()=>{if(!e.length)return;i(!0),o(!1);let t=setTimeout(()=>{let t=Error(`Media loading timed out: ${e}`);o(!0),i(!1),n?.(t)},1e4),r=e.endsWith(`.mp4`)||e.endsWith(`.webm`)||e.endsWith(`.ogg`);c(r);let a=r?document.createElement(`video`):new Image;return a.src=e,a.onerror=()=>{let t=Error(`Failed to load media: ${e}`);o(!0),n?.(t)},r?(a.onloadeddata=()=>i(!1),clearTimeout(t)):(a.onload=()=>i(!1),clearTimeout(t)),()=>{a.onload=null,a.onloadeddata=null,a.onerror=null,clearInterval(t)}},[e,l]),{isLoading:r,hasError:a,isVideo:s,reload:d}},lt=({src:n,alt:r,video:i={controls:!0,loop:!0,autoPlay:!0,muted:!0},thumbnailWidth:a=`300px`,onError:s})=>{let{isLoading:c,hasError:l,isVideo:u,reload:d}=$({src:n,onError:s}),[f,m]=(0,t.useState)(!1),h=(0,t.useRef)(null);return(0,t.useLayoutEffect)(()=>{h.current?.style.setProperty(`--thumbnail-size`,a)},[a]),(0,t.useLayoutEffect)(()=>{let e=e=>{e.key===`Escape`&&m(!1)};return f&&(document.addEventListener(`keydown`,e),document.body.style.overflow=`hidden`),()=>{document.removeEventListener(`keydown`,e),document.body.style.overflow=`unset`}},[f]),c?(0,o.jsx)(ct,{divRef:h}):l?(0,o.jsxs)(`div`,{ref:h,className:Q.errorState,role:`alert`,children:[(0,o.jsx)(`span`,{className:Q.errorIcon,children:`⚠️`}),(0,o.jsx)(`p`,{className:Q.errorText,children:`Failed to load media`}),(0,o.jsx)(`button`,{onClick:d,className:Q.retryButton,children:`Retry`})]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(e.n.div,{ref:h,className:Q.thumbnailWrapper,whileHover:{scale:1.02},whileTap:{scale:.98},children:[u?(0,o.jsx)(e.n.video,{className:Q.thumbnail,src:n,muted:!0,autoPlay:i.autoPlay,loop:i.loop,disablePictureInPicture:!0,initial:{opacity:0},animate:{opacity:1},onClick:()=>m(!0)}):(0,o.jsx)(e.n.img,{className:Q.thumbnail,loading:`lazy`,src:n,alt:r,initial:{opacity:0},animate:{opacity:1},onClick:()=>m(!0)}),(0,o.jsx)(e.n.div,{className:Q.hoverOverlay,initial:{opacity:0},whileHover:{opacity:1},children:(0,o.jsx)(`span`,{className:Q.expandIcon,children:`🔍`})})]}),(0,o.jsx)(p,{children:f&&(0,o.jsxs)(e.n.div,{className:Q.lightboxOverlay,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},onClick:()=>m(!1),children:[(0,o.jsx)(e.n.button,{className:Q.closeButton,onClick:()=>m(!1),whileHover:{scale:1.1,rotate:90},transition:{duration:.2},"aria-label":`Close lightbox`,children:`✕`}),(0,o.jsx)(e.n.div,{className:Q.lightboxContent,onClick:e=>e.stopPropagation(),initial:{scale:.8,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.8,opacity:0},transition:{duration:.3,ease:[.4,0,.2,1]},children:u?(0,o.jsx)(`video`,{className:Q.lightboxMedia,src:n,controls:i.controls,loop:i.loop,autoPlay:i.autoPlay,muted:i.muted}):(0,o.jsx)(`img`,{className:Q.lightboxMedia,src:n,alt:r})})]})})]})};exports.Box=e.t,exports.Button=w,exports.FormField=k,exports.Header=te,exports.Input=P,exports.Modal=I,exports.Select=R,exports.Toggle=B,exports.Tooltip=v,exports.TopNav=qe,exports.Viewer=lt,exports.useMediaLoader=$,exports.useTheme=V;
30
+ `),()=>{M.contains(T)&&M.removeChild(T)}},[t]),f.jsx(Mu,{isPresent:t,childRef:a,sizeRef:l,pop:r,children:r===!1?e:E.cloneElement(e,{ref:d})})}const Vu=({children:e,initial:t,isPresent:n,onExitComplete:s,custom:i,presenceAffectsLayout:r,mode:o,anchorX:a,anchorY:l,root:u})=>{const c=gt(ju),d=g.useId();let h=!0,m=g.useMemo(()=>(h=!1,{id:d,initial:t,isPresent:n,custom:i,onExitComplete:p=>{c.set(p,!0);for(const x of c.values())if(!x)return;s&&s()},register:p=>(c.set(p,!1),()=>c.delete(p))}),[n,c,s]);return r&&h&&(m={...m}),g.useMemo(()=>{c.forEach((p,x)=>c.set(x,!1))},[n]),E.useEffect(()=>{!n&&!c.size&&s&&s()},[n]),e=f.jsx(ku,{pop:o==="popLayout",isPresent:n,anchorX:a,anchorY:l,root:u,children:e}),f.jsx(yt.Provider,{value:m,children:e})};function ju(){return new Map}function Jo(e=!0){const t=g.useContext(yt);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=t,r=g.useId();g.useEffect(()=>{if(e)return i(r)},[e]);const o=g.useCallback(()=>e&&s&&s(r),[r,s,e]);return!n&&s?[!1,o]:[!0]}const It=e=>e.key||"";function Qo(e){const t=[];return g.Children.forEach(e,n=>{g.isValidElement(n)&&t.push(n)}),t}const je=({children:e,custom:t,initial:n=!0,onExitComplete:s,presenceAffectsLayout:i=!0,mode:r="sync",propagate:o=!1,anchorX:a="left",anchorY:l="top",root:u})=>{const[c,d]=Jo(o),h=g.useMemo(()=>Qo(e),[e]),m=o&&!c?[]:h.map(It),p=g.useRef(!0),x=g.useRef(h),_=gt(()=>new Map),y=g.useRef(new Set),[b,w]=g.useState(h),[P,T]=g.useState(h);Ts(()=>{p.current=!1,x.current=h;for(let C=0;C<P.length;C++){const k=It(P[C]);m.includes(k)?(_.delete(k),y.current.delete(k)):_.get(k)!==!0&&_.set(k,!1)}},[P,m.length,m.join("-")]);const M=[];if(h!==b){let C=[...h];for(let k=0;k<P.length;k++){const B=P[k],ee=It(B);m.includes(ee)||(C.splice(k,0,B),M.push(B))}return r==="wait"&&M.length&&(C=M),T(Qo(C)),w(h),null}process.env.NODE_ENV!=="production"&&r==="wait"&&P.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:j}=g.useContext(zt);return f.jsx(f.Fragment,{children:P.map(C=>{const k=It(C),B=o&&!c?!1:h===P||m.includes(k),ee=()=>{if(y.current.has(k))return;if(y.current.add(k),_.has(k))_.set(k,!0);else return;let ae=!0;_.forEach(A=>{A||(ae=!1)}),ae&&(j==null||j(),T(x.current),o&&(d==null||d()),s&&s())};return f.jsx(Vu,{isPresent:B,initial:!p.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:r,root:u,onExitComplete:B?void 0:ee,anchorX:a,anchorY:l,children:C},k)})})},er=g.createContext({strict:!1}),tr={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let nr=!1;function Du(){if(nr)return;const e={};for(const t in tr)e[t]={isEnabled:n=>tr[t].some(s=>!!n[s])};Xi(e),nr=!0}function sr(){return Du(),_c()}function Lu(e){const t=sr();for(const n in e)t[n]={...t[n],...e[n]};Xi(t)}const Ru=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","propagate","ignoreStrict","viewport"]);function Nt(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Ru.has(e)}let ir=e=>!Nt(e);function Iu(e){typeof e=="function"&&(ir=t=>t.startsWith("on")?!Nt(t):e(t))}try{Iu(require("@emotion/is-prop-valid").default)}catch{}function Nu(e,t,n){const s={};for(const i in e)i==="values"&&typeof e.values=="object"||(ir(i)||n===!0&&Nt(i)||!t&&!Nt(i)||e.draggable&&i.startsWith("onDrag"))&&(s[i]=e[i]);return s}const $t=g.createContext({});function $u(e,t){if(Mt(e)){const{initial:n,animate:s}=e;return{initial:n===!1||rt(n)?n:void 0,animate:rt(s)?s:void 0}}return e.inherit!==!1?t:{}}function Bu(e){const{initial:t,animate:n}=$u(e,g.useContext($t));return g.useMemo(()=>({initial:t,animate:n}),[or(t),or(n)])}function or(e){return Array.isArray(e)?e.join(" "):e}const Qn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function rr(e,t,n){for(const s in t)!X(t[s])&&!lo(s,n)&&(e[s]=t[s])}function Ou({transformTemplate:e},t){return g.useMemo(()=>{const n=Qn();return Yn(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Fu(e,t){const n=e.style||{},s={};return rr(s,n,e),Object.assign(s,Ou(e,t)),s}function Wu(e,t){const n={},s=Fu(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=s,n}const ar=()=>({...Qn(),attrs:{}});function Uu(e,t,n,s){const i=g.useMemo(()=>{const r=ar();return co(r,t,ho(s),e.transformTemplate,e.style),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};rr(r,e.style,e),i.style={...r,...i.style}}return i}const Hu=["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 es(e){return typeof e!="string"||e.includes("-")?!1:!!(Hu.indexOf(e)>-1||/[A-Z]/u.test(e))}function zu(e,t,n,{latestValues:s},i,r=!1,o){const l=(o??es(e)?Uu:Wu)(t,s,i,e),u=Nu(t,typeof e=="string",r),c=e!==g.Fragment?{...u,...l,ref:n}:{},{children:d}=t,h=g.useMemo(()=>X(d)?d.get():d,[d]);return g.createElement(e,{...c,children:h})}function Ku({scrapeMotionValuesFromProps:e,createRenderState:t},n,s,i){return{latestValues:Yu(n,s,i,e),renderState:t()}}function Yu(e,t,n,s){const i={},r=s(e,{});for(const h in r)i[h]=Dt(r[h]);let{initial:o,animate:a}=e;const l=Mt(e),u=Ki(e);t&&u&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const d=c?a:o;if(d&&typeof d!="boolean"&&!At(d)){const h=Array.isArray(d)?d:[d];for(let m=0;m<h.length;m++){const p=Mn(e,h[m]);if(p){const{transitionEnd:x,transition:_,...y}=p;for(const b in y){let w=y[b];if(Array.isArray(w)){const P=c?w.length-1:0;w=w[P]}w!==null&&(i[b]=w)}for(const b in x)i[b]=x[b]}}}return i}const lr=e=>(t,n)=>{const s=g.useContext($t),i=g.useContext(yt),r=()=>Ku(e,t,s,i);return n?r():gt(r)},Gu=lr({scrapeMotionValuesFromProps:Xn,createRenderState:Qn}),Xu=lr({scrapeMotionValuesFromProps:fo,createRenderState:ar}),Zu=Symbol.for("motionComponentSymbol");function qu(e,t,n){const s=g.useRef(n);g.useInsertionEffect(()=>{s.current=n});const i=g.useRef(null);return g.useCallback(r=>{var a;r&&((a=e.onMount)==null||a.call(e,r)),t&&(r?t.mount(r):t.unmount());const o=s.current;if(typeof o=="function")if(r){const l=o(r);typeof l=="function"&&(i.current=l)}else i.current?(i.current(),i.current=null):o(r);else o&&(o.current=r)},[t])}const cr=g.createContext({});function Ke(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Ju(e,t,n,s,i,r){var w,P;const{visualElement:o}=g.useContext($t),a=g.useContext(er),l=g.useContext(yt),u=g.useContext(Rt),c=u.reducedMotion,d=u.skipAnimations,h=g.useRef(null),m=g.useRef(!1);s=s||a.renderer,!h.current&&s&&(h.current=s(e,{visualState:t,parent:o,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c,skipAnimations:d,isSVG:r}),m.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const p=h.current,x=g.useContext(cr);p&&!p.projection&&i&&(p.type==="html"||p.type==="svg")&&Qu(h.current,n,i,x);const _=g.useRef(!1);g.useInsertionEffect(()=>{p&&_.current&&p.update(n,l)});const y=n[Ei],b=g.useRef(!!y&&!((w=window.MotionHandoffIsComplete)!=null&&w.call(window,y))&&((P=window.MotionHasOptimisedAnimation)==null?void 0:P.call(window,y)));return Ts(()=>{m.current=!0,p&&(_.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),p.scheduleRenderMicrotask(),b.current&&p.animationState&&p.animationState.animateChanges())}),g.useEffect(()=>{p&&(!b.current&&p.animationState&&p.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{var T;(T=window.MotionHandoffMarkAsComplete)==null||T.call(window,y)}),b.current=!1),p.enteringChildren=void 0)}),p}function Qu(e,t,n,s){const{layoutId:i,layout:r,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:ur(e.parent)),e.projection.setOptions({layoutId:i,layout:r,alwaysMeasureLayout:!!o||a&&Ke(a),visualElement:e,animationType:typeof r=="string"?r:"both",initialPromotionConfig:s,crossfade:c,layoutScroll:l,layoutRoot:u})}function ur(e){if(e)return e.options.allowProjection!==!1?e.projection:ur(e.parent)}function ts(e,{forwardMotionProps:t=!1,type:n}={},s,i){s&&Lu(s);const r=n?n==="svg":es(e),o=r?Xu:Gu;function a(u,c){let d;const h={...g.useContext(Rt),...u,layoutId:ed(u)},{isStatic:m}=h,p=Bu(u),x=o(u,m);if(!m&&ws){td(h,s);const _=nd(h);d=_.MeasureLayout,p.visualElement=Ju(e,x,h,i,_.ProjectionNode,r)}return f.jsxs($t.Provider,{value:p,children:[d&&p.visualElement?f.jsx(d,{visualElement:p.visualElement,...h}):null,zu(e,u,qu(x,p.visualElement,c),x,m,t,r)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=g.forwardRef(a);return l[Zu]=e,l}function ed({layoutId:e}){const t=g.useContext(zt).id;return t&&e!==void 0?t+"-"+e:e}function td(e,t){const n=g.useContext(er).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const s="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Re(!1,s,"lazy-strict-mode"):pe(!1,s,"lazy-strict-mode")}}function nd(e){const t=sr(),{drag:n,layout:s}=t;if(!n&&!s)return{};const i={...n,...s};return{MeasureLayout:n!=null&&n.isEnabled(e)||s!=null&&s.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function sd(e,t){if(typeof Proxy>"u")return ts;const n=new Map,s=(r,o)=>ts(r,o,e,t),i=(r,o)=>(process.env.NODE_ENV!=="production"&&Zt(!1,"motion() is deprecated. Use motion.create() instead."),s(r,o));return new Proxy(i,{get:(r,o)=>o==="create"?s:(n.has(o)||n.set(o,ts(o,void 0,e,t)),n.get(o))})}const id=(e,t)=>t.isSVG??es(e)?new Ic(t):new kc(t,{allowProjection:e!==g.Fragment});class od extends Se{constructor(t){super(t),t.animationState||(t.animationState=Fc(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();At(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let rd=0;class ad extends Se{constructor(){super(...arguments),this.id=rd++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const ld={animation:{Feature:od},exit:{Feature:ad}};function ut(e){return{point:{x:e.pageX,y:e.pageY}}}const cd=e=>t=>$n(t)&&e(t,ut(t));function dt(e,t,n,s){return ct(e,t,cd(n),s)}const dr=({current:e})=>e?e.ownerDocument.defaultView:null,hr=(e,t)=>Math.abs(e-t);function ud(e,t){const n=hr(e.x,t.x),s=hr(e.y,t.y);return Math.sqrt(n**2+s**2)}const fr=new Set(["auto","scroll"]);class mr{constructor(t,n,{transformPagePoint:s,contextWindow:i=window,dragSnapToOrigin:r=!1,distanceThreshold:o=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=m=>{this.handleScroll(m.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=ss(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,x=ud(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!p&&!x)return;const{point:_}=m,{timestamp:y}=Y;this.history.push({..._,timestamp:y});const{onStart:b,onMove:w}=this.handlers;p||(b&&b(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,m)},this.handlePointerMove=(m,p)=>{this.lastMoveEvent=m,this.lastMoveEventInfo=ns(p,this.transformPagePoint),I.update(this.updatePoint,!0)},this.handlePointerUp=(m,p)=>{this.end();const{onEnd:x,onSessionEnd:_,resumeAnimation:y}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=ss(m.type==="pointercancel"?this.lastMoveEventInfo:ns(p,this.transformPagePoint),this.history);this.startEvent&&x&&x(m,b),_&&_(m,b)},!$n(t))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=o,this.contextWindow=i||window;const l=ut(t),u=ns(l,this.transformPagePoint),{point:c}=u,{timestamp:d}=Y;this.history=[{...c,timestamp:d}];const{onSessionStart:h}=n;h&&h(t,ss(u,this.history)),this.removeListeners=Je(dt(this.contextWindow,"pointermove",this.handlePointerMove),dt(this.contextWindow,"pointerup",this.handlePointerUp),dt(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const s=getComputedStyle(n);(fr.has(s.overflowX)||fr.has(s.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const s=t===window,i=s?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},r={x:i.x-n.x,y:i.y-n.y};r.x===0&&r.y===0||(s?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=r.x,this.lastMoveEventInfo.point.y+=r.y):this.history.length>0&&(this.history[0].x-=r.x,this.history[0].y-=r.y),this.scrollPositions.set(t,i),I.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),_e(this.updatePoint)}}function ns(e,t){return t?{point:t(e.point)}:e}function pr(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ss({point:e},t){return{point:e,delta:pr(e,gr(t)),offset:pr(e,dd(t)),velocity:hd(t,.1)}}function dd(e){return e[0]}function gr(e){return e[e.length-1]}function hd(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,s=null;const i=gr(e);for(;n>=0&&(s=e[n],!(i.timestamp-s.timestamp>oe(t)));)n--;if(!s)return{x:0,y:0};s===e[0]&&e.length>2&&i.timestamp-s.timestamp>oe(t)*2&&(s=e[1]);const r=re(i.timestamp-s.timestamp);if(r===0)return{x:0,y:0};const o={x:(i.x-s.x)/r,y:(i.y-s.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function fd(e,{min:t,max:n},s){return t!==void 0&&e<t?e=s?N(t,e,s.min):Math.max(e,t):n!==void 0&&e>n&&(e=s?N(n,e,s.max):Math.min(e,n)),e}function yr(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function md(e,{top:t,left:n,bottom:s,right:i}){return{x:yr(e.x,n,i),y:yr(e.y,t,s)}}function vr(e,t){let n=t.min-e.min,s=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,s]=[s,n]),{min:n,max:s}}function pd(e,t){return{x:vr(e.x,t.x),y:vr(e.y,t.y)}}function gd(e,t){let n=.5;const s=J(e),i=J(t);return i>s?n=Qe(t.min,t.max-s,e.min):s>i&&(n=Qe(e.min,e.max-i,t.min)),de(0,1,n)}function yd(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const is=.35;function vd(e=is){return e===!1?e=0:e===!0&&(e=is),{x:_r(e,"left","right"),y:_r(e,"top","bottom")}}function _r(e,t,n){return{min:xr(e,t),max:xr(e,n)}}function xr(e,t){return typeof e=="number"?e:e[t]||0}const _d=new WeakMap;class xd{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=W(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:s}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const r=d=>{n&&this.snapToCursor(ut(d).point),this.stopAnimation()},o=(d,h)=>{const{drag:m,dragPropagation:p,onDragStart:x}=this.getProps();if(m&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Xl(m),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=h,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),fe(y=>{let b=this.getAxisMotionValue(y).get()||0;if(he.test(b)){const{projection:w}=this.visualElement;if(w&&w.layout){const P=w.layout.layoutBox[y];P&&(b=J(P)*(parseFloat(b)/100))}}this.originPoint[y]=b}),x&&I.update(()=>x(d,h),!1,!0),Vn(this.visualElement,"transform");const{animationState:_}=this.visualElement;_&&_.setActive("whileDrag",!0)},a=(d,h)=>{this.latestPointerEvent=d,this.latestPanInfo=h;const{dragPropagation:m,dragDirectionLock:p,onDirectionLock:x,onDrag:_}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:y}=h;if(p&&this.currentDirection===null){this.currentDirection=wd(y),this.currentDirection!==null&&x&&x(this.currentDirection);return}this.updateAxis("x",h.point,y),this.updateAxis("y",h.point,y),this.visualElement.render(),_&&I.update(()=>_(d,h),!1,!0)},l=(d,h)=>{this.latestPointerEvent=d,this.latestPanInfo=h,this.stop(d,h),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>{const{dragSnapToOrigin:d}=this.getProps();(d||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:c}=this.getProps();this.panSession=new mr(t,{onSessionStart:r,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:s,contextWindow:dr(this.visualElement),element:this.visualElement.current})}stop(t,n){const s=t||this.latestPointerEvent,i=n||this.latestPanInfo,r=this.isDragging;if(this.cancel(),!r||!i||!s)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&I.postRender(()=>a(s,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,s){const{drag:i}=this.getProps();if(!s||!Bt(t,i,this.currentDirection))return;const r=this.getAxisMotionValue(t);let o=this.originPoint[t]+s[t];this.constraints&&this.constraints[t]&&(o=fd(o,this.constraints[t],this.elastic[t])),r.set(o)}resolveConstraints(){var r;const{dragConstraints:t,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(r=this.visualElement.projection)==null?void 0:r.layout,i=this.constraints;t&&Ke(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&s?this.constraints=md(s.layoutBox,t):this.constraints=!1,this.elastic=vd(n),i!==this.constraints&&!Ke(t)&&s&&this.constraints&&!this.hasMutatedConstraints&&fe(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=yd(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Ke(t))return!1;const s=t.current;pe(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 r=Sc(s,i.root,this.visualElement.getTransformPagePoint());let o=pd(i.layout.layoutBox,r);if(n){const a=n(bc(o));this.hasMutatedConstraints=!!a,a&&(o=qi(a))}return o}startAnimation(t){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=fe(c=>{if(!Bt(c,n,this.currentDirection))return;let d=l&&l[c]||{};o&&(d={min:0,max:0});const h=i?200:1e6,m=i?40:1e7,p={type:"inertia",velocity:s?t[c]:0,bounceStiffness:h,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...r,...d};return this.startAxisValueAnimation(c,p)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const s=this.getAxisMotionValue(t);return Vn(this.visualElement,t),s.start(An(t,s,0,n,this.visualElement,!1))}stopAnimation(){fe(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(t,(s.initial?s.initial[t]:void 0)||0)}snapToCursor(t){fe(n=>{const{drag:s}=this.getProps();if(!Bt(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n],l=r.get()||0;r.set(t[n]-N(o,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!Ke(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};fe(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=gd({min:l,max:l},this.constraints[o])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.constraints=!1,this.resolveConstraints(),fe(o=>{if(!Bt(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(N(l,u,i[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;_d.set(this.visualElement,this);const t=this.visualElement.current,n=dt(t,"pointerdown",u=>{const{drag:c,dragListener:d=!0}=this.getProps(),h=u.target,m=h!==t&&tc(h);c&&d&&!m&&this.start(u)});let s;const i=()=>{const{dragConstraints:u}=this.getProps();Ke(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),s||(s=bd(t,u.current,()=>this.scalePositionWithinConstraints())))},{projection:r}=this.visualElement,o=r.addEventListener("measure",i);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),I.read(i);const a=ct(window,"resize",()=>this.scalePositionWithinConstraints()),l=r.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:c})=>{this.isDragging&&c&&(fe(d=>{const h=this.getAxisMotionValue(d);h&&(this.originPoint[d]+=u[d].translate,h.set(h.get()+u[d].translate))}),this.visualElement.render())}));return()=>{a(),n(),o(),l&&l(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:o=is,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:a}}}function br(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function bd(e,t,n){const s=Ui(e,br(n)),i=Ui(t,br(n));return()=>{s(),i()}}function Bt(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function wd(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Td extends Se{constructor(t){super(t),this.removeGroupControls=ie,this.removeListeners=ie,this.controls=new xd(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ie}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const os=e=>(t,n)=>{e&&I.update(()=>e(t,n),!1,!0)};class Sd extends Se{constructor(){super(...arguments),this.removePointerDownListener=ie}onPointerDown(t){this.session=new mr(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:dr(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:os(t),onStart:os(n),onMove:os(s),onEnd:(r,o)=>{delete this.session,i&&I.postRender(()=>i(r,o))}}}mount(){this.removePointerDownListener=dt(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let rs=!1;class Ed extends g.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:r}=t;r&&(n.group&&n.group.add(r),s&&s.register&&i&&s.register(r),rs&&r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Lt.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:s,drag:i,isPresent:r}=this.props,{projection:o}=s;return o&&(o.isPresent=r,t.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),rs=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==r?o.willUpdate():this.safeToRemove(),t.isPresent!==r&&(r?o.promote():o.relegate()||I.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Nn.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=t;rs=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function wr(e){const[t,n]=Jo(),s=g.useContext(zt);return f.jsx(Ed,{...e,layoutGroup:s,switchLayoutGroup:g.useContext(cr),isPresent:t,safeToRemove:n})}const Pd={pan:{Feature:Sd},drag:{Feature:Td,ProjectionNode:Zo,MeasureLayout:wr}};function Tr(e,t,n){const{props:s}=e;e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,r=s[i];r&&I.postRender(()=>r(t,ut(t)))}class Cd extends Se{mount(){const{current:t}=this.node;t&&(this.unmount=ql(t,(n,s)=>(Tr(this.node,s,"Start"),i=>Tr(this.node,i,"End"))))}unmount(){}}class Ad extends Se{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Je(ct(this.node.current,"focus",()=>this.onFocus()),ct(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Sr(e,t,n){const{props:s}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&s.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),r=s[i];r&&I.postRender(()=>r(t,ut(t)))}class Md extends Se{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:s}=this.node.props;this.unmount=sc(t,(i,r)=>(Sr(this.node,r,"Start"),(o,{success:a})=>Sr(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(s==null?void 0:s.tap)===!1})}unmount(){}}const as=new WeakMap,ls=new WeakMap,kd=e=>{const t=as.get(e.target);t&&t(e)},Vd=e=>{e.forEach(kd)};function jd({root:e,...t}){const n=e||document;ls.has(n)||ls.set(n,{});const s=ls.get(n),i=JSON.stringify(t);return s[i]||(s[i]=new IntersectionObserver(Vd,{root:e,...t})),s[i]}function Dd(e,t,n){const s=jd(t);return as.set(e,n),s.observe(e),()=>{as.delete(e),s.unobserve(e)}}const Ld={some:0,all:1};class Rd extends Se{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:r}=t,o={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:Ld[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,r&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),h=u?c:d;h&&h(l)};return Dd(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(Id(t,n))&&this.startObserver()}unmount(){}}function Id({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Nd={...ld,...{inView:{Feature:Rd},tap:{Feature:Md},focus:{Feature:Ad},hover:{Feature:Cd}},...Pd,...{layout:{ProjectionNode:Zo,MeasureLayout:wr}}},R=sd(Nd,id);function $d(e){const t=gt(()=>Me(e)),{isStatic:n}=g.useContext(Rt);if(n){const[,s]=g.useState(e);g.useEffect(()=>t.on("change",s),[])}return t}const se={backdrop:"action-sheet-module__backdrop___E-oM5",sheet:"action-sheet-module__sheet___zFFdl",handle:"action-sheet-module__handle___1dYRp",handleBar:"action-sheet-module__handleBar___3lmQ1",header:"action-sheet-module__header___oMW-U",title:"action-sheet-module__title___k5RM2",message:"action-sheet-module__message___jsCQT",actions:"action-sheet-module__actions___vgr-N",action:"action-sheet-module__action___kV71S",destructive:"action-sheet-module__destructive___N5M9i",actionIcon:"action-sheet-module__actionIcon___MXc9U",actionLabel:"action-sheet-module__actionLabel___dPWqE",cancel:"action-sheet-module__cancel___Oncun"},Er=({isOpen:e,onClose:t,title:n,message:s,actions:i})=>{const r=$d(0),o=(l,u)=>{(u.offset.y>250||u.velocity.y>500)&&a()},a=()=>{t()};return f.jsx(je,{children:e&&f.jsxs(f.Fragment,{children:[f.jsx("div",{className:se.backdrop,onClick:a}),f.jsxs(R.div,{className:se.sheet,role:"dialog","aria-modal":"true","aria-labelledby":n?"action-sheet-title":void 0,style:{y:r},drag:"y",dragConstraints:{top:0,bottom:0},dragElastic:{top:0,bottom:.5},onDragEnd:o,initial:{y:"100%"},animate:{y:0},exit:{y:"100%"},transition:{type:"spring",damping:30,stiffness:300},children:[f.jsx("div",{className:se.handle,children:f.jsx("div",{className:se.handleBar})}),(n||s)&&f.jsxs("div",{className:se.header,children:[n&&f.jsx("h3",{className:se.title,children:n}),s&&f.jsx("p",{className:se.message,children:s})]}),f.jsx("div",{className:se.actions,children:i.map((l,u)=>f.jsxs("button",{className:`${se.action} ${l.destructive?se.destructive:""}`,onClick:()=>{l.onClick(),a()},disabled:l.disabled,children:[l.icon&&f.jsx("span",{className:se.actionIcon,children:l.icon}),f.jsx("span",{className:se.actionLabel,children:l.label})]},u))}),f.jsx("button",{className:se.cancel,onClick:a,children:"Cancel"})]})]})})},ht={alert:"alert-module__alert___phXsH",iconWrapper:"alert-module__iconWrapper___5mthT",statusIcon:"alert-module__statusIcon___Tyvx3",content:"alert-module__content___IvPaU",success:"alert-module__success___lM3GI",warning:"alert-module__warning___DfOAf",error:"alert-module__error___9GnhN",info:"alert-module__info___SotSQ",container:"alert-module__container___SGTJP"},Bd=({type:e="info",children:t})=>{const n={success:f.jsx(ys,{width:"20"}),warning:f.jsx(vs,{width:"20"}),error:f.jsx(Ut,{width:"20"}),info:f.jsx(_s,{width:"20"})};return f.jsxs("div",{className:`${ht.alert} ${ht[e]}`,role:e==="error"?"alert":"status","aria-live":e==="error"?"assertive":"polite","aria-atomic":"true",children:[f.jsx("div",{className:ht.iconWrapper,children:f.jsx("span",{className:ht.statusIcon,children:n[e]})}),f.jsx("div",{className:ht.content,children:t})]})},cs={layout:"applayout-module__layout___d2c6J",mainArea:"applayout-module__mainArea___Q4Yhu",content:"applayout-module__content___lok2L"},Od=({topNav:e,sideNav:t,sideNavOpen:n=!1,sideNavExpandedWidth:s="280px",sideNavCollapsedWidth:i="50px",children:r})=>{const[o,a]=g.useState(!1);return g.useLayoutEffect(()=>{const l=()=>a(window.innerWidth<=768);return l(),window.addEventListener("resize",l),()=>window.removeEventListener("resize",l)},[]),f.jsxs("div",{className:cs.layout,children:[t,f.jsxs(R.div,{className:cs.mainArea,animate:{marginLeft:o?"0px":n?s:i},transition:{type:"spring",damping:25,stiffness:200},children:[e,f.jsx("main",{className:cs.content,children:r})]})]})},Fd={box:"box-module__box___FP5Js"},Wd=({children:e,position:t="center",direction:n="vertical"})=>f.jsx(R.div,{className:Fd.box,"data-position":t,"data-direction":n,children:e}),us={triggerWrapper:"tooltip-module__triggerWrapper___mvvzS",tooltip:"tooltip-module__tooltip___mEmui",arrow:"tooltip-module__arrow___Kjrs-"},Pr=({children:e,message:t=void 0,position:n="top"})=>{const[s,i]=g.useState(!1),r=g.useRef(null),o=g.useRef(null),a=()=>window.matchMedia("(hover: none)").matches;g.useLayoutEffect(()=>{var m;if(!s)return;const d=(m=r.current)==null?void 0:m.getBoundingClientRect(),h=o.current;if(d&&h){const p=h.offsetWidth,x=h.offsetHeight,_=10,y={top:{x:d.left+d.width/2-p/2,y:d.top-x-_},bottom:{x:d.left+d.width/2-p/2,y:d.bottom+_},left:{x:d.left-p-_,y:d.top+d.height/2-x/2},right:{x:d.right+_,y:d.top+d.height/2-x/2}},{x:b,y:w}=y[n];o.current&&(o.current.style.setProperty("--tooltip-x",`${b+window.scrollX}px`),o.current.style.setProperty("--tooltip-y",`${w+window.scrollY}px`))}},[s,n]);const l=()=>{a()||t&&i(!0)},u=()=>{a()||i(!1)},c=d=>{a()&&(d.stopPropagation(),i(h=>!h))};return g.useEffect(()=>{if(!s)return;const d=h=>{r.current&&!r.current.contains(h.target)&&i(!1)};return document.addEventListener("click",d),()=>document.removeEventListener("click",d)},[s]),t?f.jsxs(f.Fragment,{children:[f.jsx("div",{ref:r,className:us.triggerWrapper,onClick:c,onMouseEnter:l,onMouseLeave:u,children:e}),Dr.createPortal(f.jsx(je,{children:s&&f.jsxs(R.div,{ref:o,"data-position":n,initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.5},transition:{duration:.2},className:us.tooltip,children:[t,f.jsx("div",{className:us.arrow})]})}),document.body)]}):f.jsx(f.Fragment,{children:e})},Cr={button:"button-module__button___JyfZW",primary:"button-module__primary___ggjlO",secondary:"button-module__secondary___Q4I1z",icon:"button-module__icon___zcUnX"},Ar=({children:e,onClick:t,variant:n="primary",disabled:s=!1,disabledMessage:i,tooltipPosition:r="top",...o})=>f.jsx(Pr,{message:s?i:void 0,position:r,children:f.jsx("button",{className:`${Cr.button} ${Cr[n]}`,disabled:s,onClick:t,...o,children:e})}),De={container:"checkbox-module__container___26-ah",hiddenInput:"checkbox-module__hiddenInput___X-HH-",label:"checkbox-module__label___dV34E",box:"checkbox-module__box___UQZjc",checked:"checkbox-module__checked___mqwdo",labelText:"checkbox-module__labelText___ORrnL",disabled:"checkbox-module__disabled___E2BaQ"},Ud=({checked:e,onChange:t,label:n,disabled:s=!1,indeterminate:i=!1})=>{const r=g.useId();return f.jsxs("div",{className:`${De.container} ${s?De.disabled:""}`,children:[f.jsx("input",{id:r,type:"checkbox",checked:e,onChange:({target:o})=>t(o.checked),disabled:s,className:De.hiddenInput,"aria-checked":i?"mixed":e}),f.jsxs("label",{htmlFor:r,className:De.label,onClick:o=>o.stopPropagation(),children:[f.jsxs("div",{className:`${De.box} ${e||i?De.checked:""}`,children:[e&&!i&&f.jsx(Fr,{width:"20"}),i&&f.jsx(xs,{width:"20"})]}),n&&f.jsx("span",{onClick:o=>o.stopPropagation(),className:De.labelText,children:n})]})]})},ye={container:"container-module__container___g2I0w",fullWidth:"container-module__fullWidth___C7E9O",default:"container-module__default___VLaR3",outlined:"container-module__outlined___V7eh0",elevated:"container-module__elevated___TdnlI",flat:"container-module__flat___VVl-e",header:"container-module__header___EUrkl",headerContent:"container-module__headerContent___E9O0H",headerActions:"container-module__headerActions___PZYbZ",content:"container-module__content___U-qAz",footer:"container-module__footer___TrwGJ",paddingNone:"container-module__padding-none___eH2bc",paddingSm:"container-module__padding-sm___mUJyq",paddingMd:"container-module__padding-md___tOs5h",paddingLg:"container-module__padding-lg___-J-K1"},Hd=({children:e,header:t,headerActions:n,footer:s,variant:i="default",padding:r="md",fullWidth:o=!1})=>{const a=t||n,l=g.useId();return f.jsxs("div",{className:`${ye.container} ${ye[i]} ${ye[`padding-${r}`]} ${o?ye.fullWidth:void 0}`,role:t?"region":void 0,"aria-labelledby":t?l:void 0,children:[a&&f.jsxs("div",{className:ye.header,children:[f.jsx("div",{className:ye.headerContent,children:t}),n&&f.jsx("div",{className:ye.headerActions,children:n})]}),f.jsx("div",{className:ye.content,children:e}),s&&f.jsx("div",{className:ye.footer,children:s})]})},zd={floatingButton:"floating-menu-button-module__floatingButton___aAEgo"},Kd=({onClick:e,variant:t,ariaLabel:n})=>f.jsx("button",{className:zd.floatingButton,onClick:e,"aria-label":n,children:t==="action"?f.jsx(bs,{width:"24"}):f.jsx(gs,{width:"24"})}),me={wrapper:"styles-module__wrapper___-K643",container:"styles-module__container___rhMhO",containerNoLabel:"styles-module__containerNoLabel___BoOt6",border:"styles-module__border___Jsi91",label:"styles-module__label___gBE41",borderError:"styles-module__borderError___WH34m",borderDisabled:"styles-module__borderDisabled___wc6lw",labelError:"styles-module__labelError___m0PRR",helperText:"styles-module__helperText___cA3Se",errorText:"styles-module__errorText___QZJ5F"},Ot=({label:e,helperText:t,error:n,required:s,disabled:i,children:r})=>{const o=g.useId();return f.jsxs("div",{className:`${me.wrapper}`,children:[f.jsxs("div",{className:`${me.container} ${e?"":me.containerNoLabel}`,children:[e&&f.jsxs("label",{htmlFor:o,className:`${me.label} ${n?me.labelError:""}`,children:[e,s&&f.jsx("span",{children:"*"})]}),f.jsx("div",{className:`
31
+ ${me.border}
32
+ ${n?me.borderError:""}
33
+ ${i?me.borderDisabled:""}
34
+ `,children:r})]}),t&&f.jsx("span",{className:me.helperText,children:t}),n&&f.jsx("p",{className:me.errorText,role:"alert",children:n})]})},Yd={header:"styles-module__header___XLj-v"},Gd=({children:e,variant:t="h1"})=>{const n=t;return f.jsx(n,{className:Yd.header,children:e})},ft={inputContainer:"input-module__inputContainer___ulqhQ",input:"input-module__input___tBoBs",clearButton:"input-module__clearButton___GmMYO",suggestionsList:"input-module__suggestionsList___ym2TV",suggestionItem:"input-module__suggestionItem___xtYWE"},Mr=({value:e,onChange:t,disabled:n=!1,suggestions:s=[],placeholder:i,hideClear:r=!1,label:o,error:a,required:l=!1,helperText:u,...c})=>{const d=g.useId(),[h,m]=g.useState(!1),{onBlur:p,...x}=c,_=g.useMemo(()=>s.length===0||!e?[]:s.filter(y=>y.toLowerCase().includes(e.toLowerCase())),[s,e]);return f.jsx(Ot,{label:o,required:l,disabled:n,helperText:u,error:a,children:f.jsxs("div",{className:ft.inputContainer,children:[f.jsx(R.input,{id:d,className:ft.input,value:e,disabled:n,onChange:({target:y})=>t==null?void 0:t(y.value),placeholder:i,required:l,"aria-invalid":a?"true":"false","aria-describedby":a?`${d}-error`:u?`${d}-helper`:void 0,onFocus:()=>m(!0),onBlur:y=>{setTimeout(()=>m(!1),150),p==null||p(y)},...x}),!r&&e&&f.jsx("button",{className:ft.clearButton,onClick:()=>t==null?void 0:t(""),"aria-label":"Clear input",type:"button",children:f.jsx(Ht,{width:"20",strokeWidth:2.5})}),f.jsx(je,{children:h&&_.length>0&&f.jsx(R.ul,{className:ft.suggestionsList,role:"listbox","aria-label":"Suggestions",initial:{opacity:0,y:-10,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-10,scale:.95},transition:{duration:.2},children:_.map(y=>f.jsx("li",{role:"option","aria-selected":e===y,className:ft.suggestionItem,onClick:()=>{t==null||t(y),m(!1)},children:y},y))})})]})})},Ye={overlay:"modal-module__overlay___z2GxJ",modal:"modal-module__modal___RJmct",header:"modal-module__header___KlpKY",close:"modal-module__close___ELArH",content:"modal-module__content___OMS8T",footer:"modal-module__footer___rF7ly"},Xd=({isVisible:e,onClose:t,size:n="m",header:s,footer:i,children:r})=>{const o=g.useRef(null);return g.useLayoutEffect(()=>{if(!e)return;const a=o.current;if(!a)return;const l=a.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),u=l[0],c=l[l.length-1],d=h=>{h.key==="Tab"&&(h.shiftKey?document.activeElement===u&&(h.preventDefault(),c==null||c.focus()):document.activeElement===c&&(h.preventDefault(),u==null||u.focus()))};return u==null||u.focus(),document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[e]),g.useLayoutEffect(()=>{if(!e)return;const a=l=>{l.key==="Escape"&&t()};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[e,t]),f.jsx(je,{children:e&&f.jsx(R.div,{id:"overlay",className:Ye.overlay,role:"dialog","aria-modal":"true","aria-labelledby":"modal-header",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:t,children:f.jsxs(R.div,{id:"modal",ref:o,className:Ye.modal,onClick:a=>a.stopPropagation(),"data-size":n,initial:{opacity:0,scale:0},animate:{opacity:1,scale:1},transition:{duration:.3},exit:{opacity:0,scale:0},children:[f.jsxs(R.div,{id:"header",className:Ye.header,onClick:a=>a.stopPropagation(),children:[s,f.jsx(R.button,{className:Ye.close,initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{duration:.2},onClick:t,"aria-label":"Close Modal",type:"button",children:f.jsx(Ht,{width:"24"})})]}),f.jsx(R.div,{id:"content",className:Ye.content,onClick:a=>a.stopPropagation(),children:r}),i&&f.jsx(R.div,{id:"footer",className:Ye.footer,onClick:a=>a.stopPropagation(),children:i})]})})})},Q={container:"select-module__container___U4BrV",hiddenSelect:"select-module__hiddenSelect___qRfKA",control:"select-module__control___qogxN",disabled:"select-module__disabled___kYpJI",value:"select-module__value___sRnlS",placeholder:"select-module__placeholder___qhzG5",arrow:"select-module__arrow___LWj9s",menu:"select-module__menu___MHmhv",searchWrapper:"select-module__searchWrapper___gI2ic",list:"select-module__list___XICSu",item:"select-module__item___XHREC",selected:"select-module__selected___iSbaR",highlighted:"select-module__highlighted___OhCJO",checkbox:"select-module__checkbox___dD2H5",empty:"select-module__empty___i6OgM"},Zd=e=>{var ae;const{selectedOption:t,selectType:n="single",autoFilter:s=!1,options:i,onChange:r,placeholder:o="Select...",disabled:a=!1,name:l,required:u,label:c,helperText:d,error:h}=e,m=g.useId(),[p,x]=g.useState(!1),[_,y]=g.useState(""),[b,w]=g.useState(null),P=g.useRef(null),T=g.useRef(null),M=g.useCallback(A=>{var U,H;if(!a){if(n==="multi"){const te=Array.isArray(t)?t:[],G=te.find(ne=>ne.value===A.value)?te.filter(ne=>ne.value!==A.value):[...te,A];r(G),(U=T.current)==null||U.focus()}else r(A),x(!1),(H=T.current)==null||H.blur();y("")}},[a,n,t,r]),j=g.useMemo(()=>i.filter(A=>A.label.toLowerCase().includes(_.toLowerCase())),[i,_]);g.useEffect(()=>{if(!p){w(null);return}const A=U=>{var H;switch(U.key){case"ArrowDown":U.preventDefault(),w(te=>{const D=te??-1;return D<j.length-1?D+1:0});break;case"ArrowUp":U.preventDefault(),w(te=>{const D=te??0;return D>0?D-1:j.length-1});break;case"Enter":U.preventDefault(),b!==null&&j[b]&&M(j[b]);break;case"Escape":U.preventDefault(),x(!1),(H=T.current)==null||H.blur();break}};return document.addEventListener("keydown",A),()=>document.removeEventListener("keydown",A)},[p,j,b,M]),g.useEffect(()=>{if(!p)return;const A=U=>{var H;P.current&&!P.current.contains(U.target)&&(x(!1),(H=T.current)==null||H.blur())};return document.addEventListener("mousedown",A),()=>document.removeEventListener("mousedown",A)},[p]);const C=()=>{a||x(A=>!A)},k=g.useMemo(()=>n==="multi"&&Array.isArray(t)?t.length>0?t.map(A=>A.label).join(", "):o:(t==null?void 0:t.label)||o,[t,n,o]),B=n==="multi"?!Array.isArray(t)||t.length===0:!t,ee=A=>n==="multi"&&Array.isArray(t)?t.some(U=>U.value===A.value):(t==null?void 0:t.value)===A.value;return f.jsx(Ot,{label:c,required:u,disabled:a,helperText:d,error:h,children:f.jsxs("div",{ref:P,className:Q.container,children:[f.jsx("select",{name:l,id:m,required:u,disabled:a,multiple:n==="multi",value:n==="multi"?t==null?void 0:t.map(A=>String(A.value)):((ae=t==null?void 0:t.value)==null?void 0:ae.toString())||"",className:Q.hiddenSelect,tabIndex:-1,"aria-hidden":"true",onChange:()=>{},children:i.map(A=>f.jsx("option",{value:A.value,children:A.label},A.value))}),f.jsxs("div",{ref:T,className:`${Q.control} ${a?Q.disabled:""}`,onClick:C,role:"combobox","aria-haspopup":"listbox","aria-expanded":p,"aria-controls":`${m}-listbox`,tabIndex:a?-1:0,onKeyDown:A=>{(A.key==="Enter"||A.key===" ")&&(A.preventDefault(),p||C())},children:[f.jsx("span",{className:`${Q.value} ${B?Q.placeholder:""}`,children:k}),f.jsx(R.span,{className:Q.arrow,animate:{rotate:p?180:0},transition:{duration:.2},children:"▼"})]}),f.jsx(je,{children:p&&f.jsxs(R.div,{id:`${m}-listbox`,className:Q.menu,initial:{opacity:0,y:-4,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-4,scale:.95},transition:{duration:.15},role:"listbox","aria-label":c||"Select an option","aria-multiselectable":n==="multi",children:[s&&f.jsx("div",{className:Q.searchWrapper,children:f.jsx(Mr,{value:_,onChange:y,placeholder:"Search...",hideClear:!0})}),f.jsx("div",{className:Q.list,children:j.length>0?j.map((A,U)=>{const H=ee(A),te=U===b;return f.jsxs("div",{className:`${Q.item} ${H?Q.selected:""} ${te?Q.highlighted:""}`,onClick:D=>{D.stopPropagation(),M(A)},tabIndex:te?0:-1,onKeyDown:D=>{(D.key==="Enter"||D.key===" ")&&(D.preventDefault(),M(A))},role:"option","aria-selected":H,children:[n==="multi"&&f.jsx("span",{className:Q.checkbox,"aria-hidden":!0,children:H?"✓":"○"}),A.label]},A.value)}):f.jsx("div",{className:Q.empty,children:"No options found"})})]})})]})})},ue={overlay:"sidenav-module__overlay___QDdKo",sidenav:"sidenav-module__sidenav___CnZmU",left:"sidenav-module__left___Qa1xG",right:"sidenav-module__right___4BYR2",collapsed:"sidenav-module__collapsed___jltGX",header:"sidenav-module__header___f3Sc9",item:"sidenav-module__item___5B09S",toggleButton:"sidenav-module__toggleButton___8Z7kQ",items:"sidenav-module__items___Az0kh",active:"sidenav-module__active___Lo-AM",itemIcon:"sidenav-module__itemIcon___i6GWq"},qd=({isOpen:e,items:t,onToggle:n,expandedWidth:s="280px",collapsedWidth:i="50px",position:r="left"})=>{const[o,a]=g.useState(()=>window.location.pathname.slice(1)||""),[l,u]=g.useState(!1);return g.useLayoutEffect(()=>{const c=()=>u(window.innerWidth<=768);return c(),window.addEventListener("resize",c),()=>window.removeEventListener("resize",c)},[]),g.useLayoutEffect(()=>{const c=d=>{d.key==="Escape"&&e&&n()};return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[e,n]),l?f.jsx(Er,{isOpen:e,onClose:n,title:"Menu",actions:t.map(c=>({label:c.label,icon:c.icon,onClick:c.onClick}))}):f.jsxs(f.Fragment,{children:[e&&f.jsx("div",{className:ue.overlay,onClick:n,onKeyDown:c=>{c.key==="Enter"&&n()}}),f.jsxs(R.nav,{className:`${ue.sidenav} ${ue[r]} ${e?"":ue.collapsed}`,initial:!1,animate:{width:e?s:i},transition:{type:"spring",damping:25,stiffness:200},children:[f.jsx("div",{className:ue.header,children:f.jsx(R.button,{className:ue.toggleButton,onClick:n,whileHover:{scale:1.05},whileTap:{scale:.95},"aria-label":e?"Close menu":"Open menu",children:e?f.jsx(Ht,{width:"24"}):f.jsx(gs,{width:"24"})})}),f.jsx("div",{className:ue.items,children:t.filter(c=>e||c.icon).map(c=>f.jsxs("button",{className:`${ue.item} ${c.label.toLowerCase()===o?ue.active:""}`,"aria-current":c.label===o?"page":void 0,onClick:()=>{a(c.label.toLowerCase()),c.onClick(),e&&n()},title:e?void 0:c.label,children:[c.icon&&f.jsx("span",{className:ue.itemIcon,children:c.icon}),e&&f.jsx("span",{className:ue.itemLabel,children:c.label})]},c.label))})]})]})};function Jd({title:e,titleId:t,...n},s){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?E.createElement("title",{id:t},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 12h14"}))}const Qd=E.forwardRef(Jd);function eh({title:e,titleId:t,...n},s){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?E.createElement("title",{id:t},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.752 15.002A9.72 9.72 0 0 1 18 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 0 0 3 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 0 0 9.002-5.998Z"}))}const th=E.forwardRef(eh);function nh({title:e,titleId:t,...n},s){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?E.createElement("title",{id:t},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"}))}const sh=E.forwardRef(nh);function ih({title:e,titleId:t,...n},s){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?E.createElement("title",{id:t},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3v2.25m6.364.386-1.591 1.591M21 12h-2.25m-.386 6.364-1.591-1.591M12 18.75V21m-4.773-4.227-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z"}))}const oh=E.forwardRef(ih),Ft={container:"stepper-module__container___GYIxN",stepper:"stepper-module__stepper___44JDp",input:"stepper-module__input___9ZI6O"},rh=({label:e,helperText:t,error:n,required:s,value:i,onChange:r,min:o=0,max:a,step:l=1,disabled:u=!1})=>{const[c,d]=g.useState(i.toString()),h=u||i<=o,m=u||a!==void 0&&i>=a,p=()=>{if(h)return;const b=Math.max(o,i-l);r(b),d(b.toString())},x=()=>{if(m)return;const b=i+l,w=a!==void 0?Math.min(a,b):b;r(w),d(w.toString())},_=b=>{d(b)},y=()=>{const b=parseInt(c);if(isNaN(b)){d(i.toString());return}const w=a!==void 0?Math.min(a,Math.max(o,b)):Math.max(o,b);r(w),d(w.toString())};return f.jsx(Ot,{label:e,required:s,disabled:u,helperText:t,error:n,children:f.jsxs("div",{className:`${Ft.container}`,children:[f.jsx("button",{className:Ft.stepper,disabled:h,onClick:p,"aria-label":"Decrease value",type:"button",children:f.jsx(Qd,{width:"20",strokeWidth:2.5})}),f.jsx("input",{className:Ft.input,value:c,onChange:b=>_(b.target.value),onBlur:y,disabled:u,type:"text",inputMode:"numeric",pattern:"[0-9]*","aria-label":"Value"}),f.jsx("button",{className:Ft.stepper,disabled:m,onClick:x,"aria-label":"Increase value",type:"button",children:f.jsx(sh,{width:"20",strokeWidth:2.5})})]})})},Ee={container:"toast-module__container___7m6vr",top:"toast-module__top___iVpue",bottom:"toast-module__bottom___Bt3N0",toast:"toast-module__toast___SOSDh",iconWrapper:"toast-module__iconWrapper___F-4yg",statusIcon:"toast-module__statusIcon___KjJ56",content:"toast-module__content___9ufP5",closeButton:"toast-module__closeButton___eMXm-",success:"toast-module__success___FYQI3",warning:"toast-module__warning___2XrO1",error:"toast-module__error___v44fd",info:"toast-module__info___tOY3D"},ah=({visible:e,onDismiss:t,timeout:n=5e3,position:s="top",status:i="info",children:r,dismissible:o=!0})=>{g.useEffect(()=>{if(!e||!n)return;const l=setTimeout(()=>{t()},n);return()=>clearTimeout(l)},[e,n,t]);const a={success:f.jsx(ys,{width:"20"}),warning:f.jsx(vs,{width:"20"}),error:f.jsx(Ut,{width:"20"}),info:f.jsx(_s,{width:"20"})};return f.jsx("div",{className:`${Ee.container} ${Ee[s]}`,children:f.jsx(je,{children:e&&f.jsxs(R.div,{layout:!0,initial:{opacity:0,y:s==="top"?-50:50,scale:.8},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.8,x:100},transition:{duration:.3,ease:[.4,0,.2,1]},className:`${Ee.toast} ${Ee[i]}`,role:i==="error"?"alert":"status","aria-live":i==="error"?"assertive":"polite","aria-atomic":"true",children:[f.jsx("div",{className:Ee.iconWrapper,children:f.jsx("span",{className:Ee.statusIcon,children:a[i]})}),f.jsx("div",{className:Ee.content,children:r}),o&&f.jsx(R.button,{className:Ee.closeButton,onClick:t,whileHover:{scale:1.1},whileTap:{scale:.9},"aria-label":"Dismiss",children:f.jsx(Ut,{width:"20"})})]})})})},mt={wrapper:"toggle-module__wrapper___xb91q",label:"toggle-module__label___8-AlI",switch:"toggle-module__switch___9e0np",enabled:"toggle-module__enabled___3jPo5",handle:"toggle-module__handle___fiWwj"},lh=({label:e,value:t,onChange:n,disabled:s=!1})=>{const i=g.useRef(null),r=g.useId();return g.useLayoutEffect(()=>{i.current&&(t?i.current.style.setProperty("--toggle-direction","flex-end"):i.current.style.setProperty("--toggle-direction","flex-start"))},[t]),f.jsxs("div",{className:mt.wrapper,children:[f.jsx("span",{className:mt.label,children:e}),f.jsx(R.button,{ref:i,role:"switch","aria-checked":t,"aria-labelledby":r,className:`${mt.switch} ${t?mt.enabled:""}`,onClick:()=>n(!t),disabled:s,onKeyDown:o=>{(o.key===" "||o.key==="Enter")&&(o.preventDefault(),n(!t))},...!s&&{whileHover:{scale:1.1}},children:f.jsx(R.div,{layout:!0,className:mt.handle,initial:{opacity:0},animate:{opacity:1},transition:{type:"spring",stiffness:300,damping:15}})})]})},kr=()=>{const[e,t]=g.useState(!1),[n,s]=g.useState(()=>{const r=localStorage.getItem("nova-ui-theme");return r||(window.matchMedia("(prefers-color-scheme: dark)").media?"dark":"light")});g.useLayoutEffect(()=>{document.documentElement.classList.remove("light","dark"),document.documentElement.classList.add(n),localStorage.setItem("nova-ui-theme",n)},[n]);const i=g.useCallback(r=>{if(e)return;const o=r.clientX,a=r.clientY;document.documentElement.style.setProperty("--x",`${o}px`),document.documentElement.style.setProperty("--y",`${a}px`);const l=()=>{s(c=>c==="dark"?"light":"dark")};if(!document.startViewTransition){l();return}t(!0),document.startViewTransition(l).finished.finally(()=>{t(!1)})},[e]);return{theme:n,isTransitioning:e,toggleTheme:i}},ch=()=>{const{theme:e,isTransitioning:t,toggleTheme:n}=kr();return f.jsx(Ar,{variant:"icon",onClick:n,disabled:t,"aria-label":e==="dark"?"Switch to light mode":"Switch to dark mode",children:e==="dark"?f.jsx(oh,{width:"24"}):f.jsx(th,{width:"24"})})},Ge={topnavContainer:"topnav-module__topnavContainer___TXXB4",topRow:"topnav-module__topRow___s-Ohm",header:"topnav-module__header___r3Y52",collapsibleContent:"topnav-module__collapsibleContent___oulCx",searchWrapper:"topnav-module__searchWrapper___Rdox0",themeWrapper:"topnav-module__themeWrapper___gx0Yd"},uh=({header:e,logo:t,logoClick:n,search:s})=>f.jsxs("nav",{className:Ge.topnavContainer,"aria-label":"Main navigation",children:[f.jsx("div",{className:Ge.topRow,children:f.jsxs("div",{className:Ge.header,children:[f.jsx("div",{onClick:n,style:{cursor:n?"pointer":"default"},children:t}),e]})}),f.jsxs("div",{className:Ge.collapsibleContent,children:[f.jsx("div",{className:Ge.searchWrapper,children:s}),f.jsx("div",{className:Ge.themeWrapper,children:f.jsx(ch,{})})]})]}),Z={thumbnailWrapper:"viewer-module__thumbnailWrapper___iV-AM",thumbnail:"viewer-module__thumbnail___pk9Jf",hoverOverlay:"viewer-module__hoverOverlay___k04ev",expandIcon:"viewer-module__expandIcon___xm6pk",skeleton:"viewer-module__skeleton___h3Hzv",errorState:"viewer-module__errorState___gXQxU",errorIcon:"viewer-module__errorIcon___-qPTV",errorText:"viewer-module__errorText___UT4dg",retryButton:"viewer-module__retryButton___L-B3U",lightboxOverlay:"viewer-module__lightboxOverlay___jP4rl",closeButton:"viewer-module__closeButton___0rBK1",lightboxContent:"viewer-module__lightboxContent___i-2FK",lightboxMedia:"viewer-module__lightboxMedia___ZBgR-"},dh=({divRef:e,width:t,aspectRatio:n})=>f.jsx("div",{ref:e,className:Z.thumbnailWrapper,style:{width:t,aspectRatio:n.toString()},children:f.jsx("div",{className:Z.skeleton,"aria-busy":"true","aria-label":"Loading media"})}),Vr=({src:e,onError:t})=>{const[n,s]=g.useState(!0),[i,r]=g.useState(!1),[o,a]=g.useState(!1),[l,u]=g.useState(0),c=g.useCallback(()=>{u(d=>d+1)},[]);return g.useEffect(()=>{if(!e.length)return;s(!0),r(!1);const d=setTimeout(()=>{const p=new Error(`Media loading timed out: ${e}`);r(!0),s(!1),t==null||t(p)},1e4),h=e.endsWith(".mp4")||e.endsWith(".webm")||e.endsWith(".ogg");a(h);const m=h?document.createElement("video"):new Image;return m.src=e,m.onerror=()=>{const p=new Error(`Failed to load media: ${e}`);r(!0),t==null||t(p)},h?m.onloadeddata=()=>{clearTimeout(d),s(!1)}:m.onload=()=>{clearTimeout(d),s(!1)},()=>{m.onload=null,m.onloadeddata=null,m.onerror=null,clearTimeout(d)}},[e,l]),{isLoading:n,hasError:i,isVideo:o,reload:c}},hh=({src:e,alt:t,video:n={controls:!0,loop:!0,autoPlay:!0,muted:!0},thumbnailWidth:s="300px",onError:i,aspectRatio:r="9/16"})=>{const{isLoading:o,hasError:a,isVideo:l,reload:u}=Vr({src:e,onError:i}),[c,d]=g.useState(!1),h=g.useRef(null);return g.useLayoutEffect(()=>{var m;(m=h.current)==null||m.style.setProperty("--thumbnail-size",s)},[s]),g.useLayoutEffect(()=>{const m=p=>{p.key==="Escape"&&d(!1)};return c&&document.addEventListener("keydown",m),()=>{document.removeEventListener("keydown",m)}},[c]),o?f.jsx(dh,{divRef:h,aspectRatio:r,width:s}):a?f.jsxs("div",{ref:h,className:Z.errorState,role:"alert",children:[f.jsx("span",{className:Z.errorIcon,children:"⚠️"}),f.jsx("p",{className:Z.errorText,children:"Failed to load media"}),f.jsx("button",{onClick:u,className:Z.retryButton,children:"Retry"})]}):f.jsxs(f.Fragment,{children:[f.jsxs(R.div,{ref:h,className:Z.thumbnailWrapper,whileHover:{scale:1.02},whileTap:{scale:.98},children:[l?f.jsx(R.video,{className:Z.thumbnail,src:e,muted:!0,preload:"none",autoPlay:n.autoPlay,loop:n.loop,disablePictureInPicture:!0,initial:{opacity:0},animate:{opacity:1},onClick:()=>d(!0)}):f.jsx(R.img,{className:Z.thumbnail,loading:"lazy",src:e,alt:t,initial:{opacity:0},animate:{opacity:1},onClick:()=>d(!0)}),f.jsx(R.div,{className:Z.hoverOverlay,initial:{opacity:0},whileHover:{opacity:1},children:f.jsx("span",{className:Z.expandIcon,children:"🔍"})})]}),f.jsx(je,{children:c&&f.jsxs(R.div,{className:Z.lightboxOverlay,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},onClick:()=>d(!1),children:[f.jsx(R.button,{className:Z.closeButton,onClick:()=>d(!1),whileHover:{scale:1.1,rotate:90},transition:{duration:.2},"aria-label":"Close lightbox",children:"✕"}),f.jsx(R.div,{className:Z.lightboxContent,onClick:m=>m.stopPropagation(),initial:{scale:.8,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.8,opacity:0},transition:{duration:.3,ease:[.4,0,.2,1]},children:l?f.jsx("video",{preload:"none",className:Z.lightboxMedia,src:e,controls:n.controls,loop:n.loop,autoPlay:n.autoPlay,muted:n.muted,children:f.jsx("track",{kind:"captions"})}):f.jsx("img",{className:Z.lightboxMedia,src:e,alt:t})})]})})]})};L.Accordion=Gr,L.ActionSheet=Er,L.Alert=Bd,L.AppLayout=Od,L.Box=Wd,L.Button=Ar,L.Checkbox=Ud,L.Container=Hd,L.FloatingButton=Kd,L.FormField=Ot,L.Header=Gd,L.Input=Mr,L.Modal=Xd,L.Select=Zd,L.SideNav=qd,L.Stepper=rh,L.Toast=ah,L.Toggle=lh,L.Tooltip=Pr,L.TopNav=uh,L.Viewer=hh,L.useMediaLoader=Vr,L.useTheme=kr,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})}));