@abhishekzambare/react-grid-dnd 0.0.2 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +156 -60
- package/dist/react-grid-dnd.js +1665 -1854
- package/package.json +1 -1
- package/dist/react-grid-dnd.umd.cjs +0 -10
package/package.json
CHANGED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`react`)):typeof define==`function`&&define.amd?define([`exports`,`react`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.ReactGridDnD={},e.React))})(this,function(e,t){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var n=Object.create,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,c=(e,t)=>()=>(e&&(t=e(e=0)),t),l=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),u=(e,t)=>{let n={};for(var i in e)r(n,i,{get:e[i],enumerable:!0});return t||r(n,Symbol.toStringTag,{value:`Module`}),n},d=(e,t,n,o)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=a(t),l=0,u=c.length,d;l<u;l++)d=c[l],!s.call(e,d)&&d!==n&&r(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(o=i(t,d))||o.enumerable});return e},f=(e,t,i)=>(i=e==null?{}:n(o(e)),d(t||!e||!e.__esModule?r(i,`default`,{value:e,enumerable:!0}):i,e)),p=e=>s.call(e,`module.exports`)?e[`module.exports`]:d(r({},`__esModule`,{value:!0}),e);t=f(t,1);var m=l((e=>{var t=require(`react`).__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;e.c=function(e){return t.H.useMemoCache(e)}})),h=l((e=>{process.env.NODE_ENV!==`production`&&(function(){var t=require(`react`).__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;e.c=function(e){var n=t.H;return n===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
2
|
-
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
3
|
-
2. You might be breaking the Rules of Hooks
|
|
4
|
-
3. You might have more than one copy of React in the same app
|
|
5
|
-
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),n.useMemoCache(e)}})()})),g=l(((e,t)=>{process.env.NODE_ENV===`production`?t.exports=m():t.exports=h()}))();function _(e,{boxesPerRow:t,rowHeight:n,columnWidth:r},i){let a=typeof i==`number`&&e>=i?e+1:e;return{xy:[a%t*r,Math.floor(a/t)*n]}}function v(e,t,n,r,i){let{xy:[a,o]}=_(e,t);return{xy:[a+n+(i?t.columnWidth/2:0),o+r+(i?t.rowHeight/2:0)]}}function y(e,t,{rowHeight:n,boxesPerRow:r,columnWidth:i},a){let o=Math.floor(t/n)*r+Math.floor(e/i);return o>=a?a:o}function b(e,t,n,r,i){let{xy:[a,o]}=v(e,t,r,i,!0);return y(a,o,t,n)}var x=l((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),S=l((e=>{process.env.NODE_ENV!==`production`&&(function(){function t(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===O?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case _:return`Fragment`;case y:return`Profiler`;case v:return`StrictMode`;case C:return`Suspense`;case w:return`SuspenseList`;case D:return`Activity`}if(typeof e==`object`)switch(typeof e.tag==`number`&&console.error(`Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.`),e.$$typeof){case g:return`Portal`;case x:return e.displayName||`Context`;case b:return(e._context.displayName||`Context`)+`.Consumer`;case S:var n=e.render;return e=e.displayName,e||=(e=n.displayName||n.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case T:return n=e.displayName||null,n===null?t(e.type)||`Memo`:n;case E:n=e._payload,e=e._init;try{return t(e(n))}catch{}}return null}function n(e){return``+e}function r(e){try{n(e);var t=!1}catch{t=!0}if(t){t=console;var r=t.error,i=typeof Symbol==`function`&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||`Object`;return r.call(t,`The provided key is an unsupported type %s. This value must be coerced to a string before using it here.`,i),n(e)}}function i(e){if(e===_)return`<>`;if(typeof e==`object`&&e&&e.$$typeof===E)return`<...>`;try{var n=t(e);return n?`<`+n+`>`:`<...>`}catch{return`<...>`}}function a(){var e=k.A;return e===null?null:e.getOwner()}function o(){return Error(`react-stack-top-frame`)}function s(e){if(A.call(e,`key`)){var t=Object.getOwnPropertyDescriptor(e,`key`).get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function c(e,t){function n(){N||(N=!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)",t))}n.isReactWarning=!0,Object.defineProperty(e,`key`,{get:n,configurable:!0})}function l(){var e=t(this.type);return P[e]||(P[e]=!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.`)),e=this.props.ref,e===void 0?null:e}function u(e,t,n,r,i,a){var o=n.ref;return e={$$typeof:h,type:e,key:t,props:n,_owner:r},(o===void 0?null:o)===null?Object.defineProperty(e,`ref`,{enumerable:!1,value:null}):Object.defineProperty(e,`ref`,{enumerable:!1,get:l}),e._store={},Object.defineProperty(e._store,`validated`,{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,`_debugInfo`,{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,`_debugStack`,{configurable:!1,enumerable:!1,writable:!0,value:i}),Object.defineProperty(e,`_debugTask`,{configurable:!1,enumerable:!1,writable:!0,value:a}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function d(e,n,i,o,l,d){var p=n.children;if(p!==void 0)if(o)if(j(p)){for(o=0;o<p.length;o++)f(p[o]);Object.freeze&&Object.freeze(p)}else console.error(`React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.`);else f(p);if(A.call(n,`key`)){p=t(e);var m=Object.keys(n).filter(function(e){return e!==`key`});o=0<m.length?`{key: someKey, `+m.join(`: ..., `)+`: ...}`:`{key: someKey}`,L[p+o]||(m=0<m.length?`{`+m.join(`: ..., `)+`: ...}`:`{}`,console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
6
|
-
let props = %s;
|
|
7
|
-
<%s {...props} />
|
|
8
|
-
React keys must be passed directly to JSX without using spread:
|
|
9
|
-
let props = %s;
|
|
10
|
-
<%s key={someKey} {...props} />`,o,p,m,p),L[p+o]=!0)}if(p=null,i!==void 0&&(r(i),p=``+i),s(n)&&(r(n.key),p=``+n.key),`key`in n)for(var h in i={},n)h!==`key`&&(i[h]=n[h]);else i=n;return p&&c(i,typeof e==`function`?e.displayName||e.name||`Unknown`:e),u(e,p,i,a(),l,d)}function f(e){p(e)?e._store&&(e._store.validated=1):typeof e==`object`&&e&&e.$$typeof===E&&(e._payload.status===`fulfilled`?p(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function p(e){return typeof e==`object`&&!!e&&e.$$typeof===h}var m=require(`react`),h=Symbol.for(`react.transitional.element`),g=Symbol.for(`react.portal`),_=Symbol.for(`react.fragment`),v=Symbol.for(`react.strict_mode`),y=Symbol.for(`react.profiler`),b=Symbol.for(`react.consumer`),x=Symbol.for(`react.context`),S=Symbol.for(`react.forward_ref`),C=Symbol.for(`react.suspense`),w=Symbol.for(`react.suspense_list`),T=Symbol.for(`react.memo`),E=Symbol.for(`react.lazy`),D=Symbol.for(`react.activity`),O=Symbol.for(`react.client.reference`),k=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,A=Object.prototype.hasOwnProperty,j=Array.isArray,M=console.createTask?console.createTask:function(){return null};m={react_stack_bottom_frame:function(e){return e()}};var N,P={},F=m.react_stack_bottom_frame.bind(m,o)(),I=M(i(o)),L={};e.Fragment=_,e.jsx=function(e,t,n){var r=1e4>k.recentlyCreatedOwnerStacks++;return d(e,t,n,!1,r?Error(`react-stack-top-frame`):F,r?M(i(e)):I)},e.jsxs=function(e,t,n){var r=1e4>k.recentlyCreatedOwnerStacks++;return d(e,t,n,!0,r?Error(`react-stack-top-frame`):F,r?M(i(e)):I)}})()})),C=l(((e,t)=>{process.env.NODE_ENV===`production`?t.exports=x():t.exports=S()}))(),w=()=>{throw Error(`Make sure that you have wrapped your drop zones with GridContext`)},T=(0,t.createContext)({register:w,remove:w,getActiveDropId:w,startTraverse:w,measureAll:w,traverse:null,endTraverse:w,onChange:w});function E(e){let n=(0,g.c)(21),{children:r,onChange:i}=e,[a,o]=(0,t.useState)(null),s;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(s=new Map,n[0]=s):s=n[0];let c=(0,t.useRef)(s),l;n[1]===Symbol.for(`react.memo_cache_sentinel`)?(l=function(e,t){c.current.set(e,t)},n[1]=l):l=n[1];let u=l,d;n[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=function(e){c.current.delete(e)},n[2]=d):d=n[2];let f=d,p;n[3]===Symbol.for(`react.memo_cache_sentinel`)?(p=function(e,t,n){let r=c.current.get(e);if(!r)return{x:t,y:n};let{left:i,top:a}=r;return{x:i+t,y:a+n}},n[3]=p):p=n[3];let m=p,h;n[4]===Symbol.for(`react.memo_cache_sentinel`)?(h=function(e,t,n){let r=c.current.get(e);if(r!=null){let{left:e,top:i}=r;return{x:t-e,y:n-i}}else return{x:t,y:n}},n[4]=h):h=n[4];let v=h,b;n[5]===Symbol.for(`react.memo_cache_sentinel`)?(b=function(e,t){let n=c.current.get(e),r=c.current.get(t);return n!=null&&r!=null?{x:r.left-n.left,y:r.top-n.top}:{x:0,y:0}},n[5]=b):b=n[5];let x=b,S;n[6]===Symbol.for(`react.memo_cache_sentinel`)?(S=function(e,t,n){let{x:r,y:i}=m(e,t,n);for(let[e,t]of c.current.entries())if(!t.disableDrop&&r>t.left&&r<t.right&&i>t.top&&i<t.bottom)return e;return null},n[6]=S):S=n[6];let w=S,E;n[7]===a?E=n[8]:(E=function(e,t,n,r,i){let{x:s,y:l}=m(e,n,r),{x:u,y:d}=v(t,s,l),f=c.current.get(t);if(f!=null){let{grid:n,count:r}=f,s=y(u+n.columnWidth/2,d+n.rowHeight/2,n,r),{xy:c}=_(s,n),[l,p]=c,{x:m,y:h}=x(e,t);(!a||!(a&&a.targetIndex!==s&&a.targetId!==t))&&o({rx:l+m,ry:p+h,tx:u,ty:d,sourceId:e,targetId:t,sourceIndex:i,targetIndex:s})}},n[7]=a,n[8]=E);let O=E,k;n[9]===Symbol.for(`react.memo_cache_sentinel`)?(k=function(){o(null)},n[9]=k):k=n[9];let A=k,j;n[10]!==i||n[11]!==a?(j=function(e,t,n,r){a!=null&&o({...a,execute:!0}),i(e,t,n,r)},n[10]=i,n[11]=a,n[12]=j):j=n[12];let M=j,N;n[13]===Symbol.for(`react.memo_cache_sentinel`)?(N=function(){c.current.forEach(D)},n[13]=N):N=n[13];let P=N,F;n[14]!==M||n[15]!==O||n[16]!==a?(F={register:u,remove:f,getActiveDropId:w,startTraverse:O,traverse:a,measureAll:P,endTraverse:A,onChange:M},n[14]=M,n[15]=O,n[16]=a,n[17]=F):F=n[17];let I;return n[18]!==r||n[19]!==F?(I=(0,C.jsx)(T,{value:F,children:r}),n[18]=r,n[19]=F,n[20]=I):I=n[20],I}function D(e){e.remeasure()}var O=(function(){if(typeof Map<`u`)return Map;function e(e,t){var n=-1;return e.some(function(e,r){return e[0]===t?(n=r,!0):!1}),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,`size`,{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){t===void 0&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];e.call(t,i[1],i[0])}},t}()})(),k=typeof window<`u`&&typeof document<`u`&&window.document===document,A=(function(){return typeof global<`u`&&global.Math===Math?global:typeof self<`u`&&self.Math===Math?self:typeof window<`u`&&window.Math===Math?window:Function(`return this`)()})(),j=(function(){return typeof requestAnimationFrame==`function`?requestAnimationFrame.bind(A):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}})(),M=2;function N(e,t){var n=!1,r=!1,i=0;function a(){n&&(n=!1,e()),r&&s()}function o(){j(a)}function s(){var e=Date.now();if(n){if(e-i<M)return;r=!0}else n=!0,r=!1,setTimeout(o,t);i=e}return s}var P=20,F=[`top`,`right`,`bottom`,`left`,`width`,`height`,`size`,`weight`],I=typeof MutationObserver<`u`,L=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=N(this.refresh.bind(this),P)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter(function(e){return e.gatherActive(),e.hasActive()});return e.forEach(function(e){return e.broadcastActive()}),e.length>0},e.prototype.connect_=function(){!k||this.connected_||(document.addEventListener(`transitionend`,this.onTransitionEnd_),window.addEventListener(`resize`,this.refresh),I?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener(`DOMSubtreeModified`,this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!k||!this.connected_||(document.removeEventListener(`transitionend`,this.onTransitionEnd_),window.removeEventListener(`resize`,this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener(`DOMSubtreeModified`,this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=t===void 0?``:t;F.some(function(e){return!!~n.indexOf(e)})&&this.refresh()},e.getInstance=function(){return this.instance_||=new e,this.instance_},e.instance_=null,e}(),R=(function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e}),z=(function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||A}),ee=le(0,0,0,0);function B(e){return parseFloat(e)||0}function te(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(t,n){var r=e[`border-`+n+`-width`];return t+B(r)},0)}function ne(e){for(var t=[`top`,`right`,`bottom`,`left`],n={},r=0,i=t;r<i.length;r++){var a=i[r],o=e[`padding-`+a];n[a]=B(o)}return n}function re(e){var t=e.getBBox();return le(0,0,t.width,t.height)}function ie(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return ee;var r=z(e).getComputedStyle(e),i=ne(r),a=i.left+i.right,o=i.top+i.bottom,s=B(r.width),c=B(r.height);if(r.boxSizing===`border-box`&&(Math.round(s+a)!==t&&(s-=te(r,`left`,`right`)+a),Math.round(c+o)!==n&&(c-=te(r,`top`,`bottom`)+o)),!oe(e)){var l=Math.round(s+a)-t,u=Math.round(c+o)-n;Math.abs(l)!==1&&(s-=l),Math.abs(u)!==1&&(c-=u)}return le(i.left,i.top,s,c)}var ae=(function(){return typeof SVGGraphicsElement<`u`?function(e){return e instanceof z(e).SVGGraphicsElement}:function(e){return e instanceof z(e).SVGElement&&typeof e.getBBox==`function`}})();function oe(e){return e===z(e).document.documentElement}function se(e){return k?ae(e)?re(e):ie(e):ee}function ce(e){var t=e.x,n=e.y,r=e.width,i=e.height,a=Object.create((typeof DOMRectReadOnly<`u`?DOMRectReadOnly:Object).prototype);return R(a,{x:t,y:n,width:r,height:i,top:n,right:t+r,bottom:i+n,left:t}),a}function le(e,t,n,r){return{x:e,y:t,width:n,height:r}}var ue=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=le(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=se(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),de=function(){function e(e,t){var n=ce(t);R(this,{target:e,contentRect:n})}return e}(),fe=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new O,typeof e!=`function`)throw TypeError(`The callback provided as parameter 1 is not a function.`);this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw TypeError(`1 argument required, but only 0 present.`);if(!(typeof Element>`u`||!(Element instanceof Object))){if(!(e instanceof z(e).Element))throw TypeError(`parameter 1 is not of type "Element".`);var t=this.observations_;t.has(e)||(t.set(e,new ue(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw TypeError(`1 argument required, but only 0 present.`);if(!(typeof Element>`u`||!(Element instanceof Object))){if(!(e instanceof z(e).Element))throw TypeError(`parameter 1 is not of type "Element".`);var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(t){t.isActive()&&e.activeObservations_.push(t)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map(function(e){return new de(e.target,e.broadcastRect())});this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),pe=typeof WeakMap<`u`?new WeakMap:new O,me=function(){function e(t){if(!(this instanceof e))throw TypeError(`Cannot call a class as a function.`);if(!arguments.length)throw TypeError(`1 argument required, but only 0 present.`);var n=new fe(t,L.getInstance(),this);pe.set(this,n)}return e}();[`observe`,`unobserve`,`disconnect`].forEach(function(e){me.prototype[e]=function(){var t;return(t=pe.get(this))[e].apply(t,arguments)}});var he=(function(){return A.ResizeObserver===void 0?me:A.ResizeObserver})();function ge(e){let n=(0,g.c)(11),r;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={left:0,top:0,width:0,height:0,right:0,bottom:0},n[0]=r):r=n[0];let[i,a]=t.useState(r),o;n[1]===Symbol.for(`react.memo_cache_sentinel`)?(o=()=>new he(e=>{let[t]=e;a(t.target.getBoundingClientRect())}),n[1]=o):o=n[1];let[s]=t.useState(o),c,l;n[2]!==s||n[3]!==e?(c=()=>(e.current&&s.observe(e.current),()=>s.disconnect()),l=[e,s],n[2]=s,n[3]=e,n[4]=c,n[5]=l):(c=n[4],l=n[5]),t.useLayoutEffect(c,l);let u;n[6]===e?u=n[7]:(u=function(){e.current&&a(e.current.getBoundingClientRect())},n[6]=e,n[7]=u);let d=u,f;return n[8]!==i||n[9]!==d?(f={bounds:i,remeasure:d},n[8]=i,n[9]=d,n[10]=f):f=n[10],f}function _e(e,t,n){let r=e[t],{length:i}=e,a=t-n;if(a>0)return[...e.slice(0,n),r,...e.slice(n,t),...e.slice(t+1,i)];if(a<0){let a=n+1;return[...e.slice(0,t),...e.slice(t+1,a),r,...e.slice(a,i)]}return e}var ve=t.createContext(null);function ye(e){let n=(0,g.c)(58),r,i,a,o,s,c,l,u;n[0]===e?(r=n[1],i=n[2],a=n[3],o=n[4],s=n[5],c=n[6],l=n[7],u=n[8]):({id:a,boxesPerRow:r,children:i,style:c,disableDrag:l,disableDrop:u,rowHeight:s,...o}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a,n[4]=o,n[5]=s,n[6]=c,n[7]=l,n[8]=u);let d=l===void 0?!1:l,f=u===void 0?!1:u,{traverse:p,startTraverse:m,endTraverse:h,register:v,measureAll:y,onChange:x,remove:S,getActiveDropId:w}=t.useContext(T),E=t.useRef(null),{bounds:D,remeasure:O}=ge(E),[k,A]=t.useState(null),[j,M]=t.useState(null),N=p&&!p.execute&&p.targetId===a?p.targetIndex:null,P=D.width/r,F;n[9]!==r||n[10]!==s||n[11]!==P?(F={columnWidth:P,boxesPerRow:r,rowHeight:s},n[9]=r,n[10]=s,n[11]=P,n[12]=F):F=n[12];let I=F,L;n[13]===i?L=n[14]:(L=t.Children.count(i),n[13]=i,n[14]=L);let R=L,z;n[15]!==D.bottom||n[16]!==D.height||n[17]!==D.left||n[18]!==D.right||n[19]!==D.top||n[20]!==D.width||n[21]!==R||n[22]!==f||n[23]!==I||n[24]!==a||n[25]!==v||n[26]!==O?(z=()=>{v(a,{top:D.top,bottom:D.bottom,left:D.left,right:D.right,width:D.width,height:D.height,count:R,grid:I,disableDrop:f,remeasure:O})},n[15]=D.bottom,n[16]=D.height,n[17]=D.left,n[18]=D.right,n[19]=D.top,n[20]=D.width,n[21]=R,n[22]=f,n[23]=I,n[24]=a,n[25]=v,n[26]=O,n[27]=z):z=n[27];let ee;n[28]!==D||n[29]!==R||n[30]!==f||n[31]!==I||n[32]!==a?(ee=[R,f,D,a,I],n[28]=D,n[29]=R,n[30]=f,n[31]=I,n[32]=a,n[33]=ee):ee=n[33],t.useEffect(z,ee);let B;n[34]!==a||n[35]!==S?(B=()=>()=>S(a),n[34]=a,n[35]=S,n[36]=B):B=n[36];let te;n[37]===a?te=n[38]:(te=[a],n[37]=a,n[38]=te),t.useEffect(B,te);let ne;if(n[39]!==R||n[40]!==i||n[41]!==d||n[42]!==k||n[43]!==h||n[44]!==w||n[45]!==I||n[46]!==a||n[47]!==y||n[48]!==x||n[49]!==o||n[50]!==j||n[51]!==m||n[52]!==c||n[53]!==p||n[54]!==N){let e=t.Children.map(i,be),r;n[56]===c?r=n[57]:(r={position:`relative`,...c},n[56]=c,n[57]=r),ne=(0,C.jsx)(`div`,{ref:E,style:r,...o,children:I.columnWidth===0?null:t.Children.map(i,(t,n)=>{let r=p?.targetId===a&&p.targetIndex===n,i=_((j?_e(e&&e?.length>0?e:[],j.startIndex,j.targetIndex):e&&e?.length>0?e:[]).indexOf(n),I,N);return(0,C.jsx)(ve,{value:{top:i.xy[1],disableDrag:d,endTraverse:h,mountWithTraverseTarget:r?[p.tx,p.ty]:void 0,left:i.xy[0],i:n,onMove:function(e,t,r){if(!E.current)return;k!==n&&A(n);let i=w(a,t+I.columnWidth/2,r+I.rowHeight/2);i&&i!==a?m(a,i,t,r,n):h();let o=i===a?b(n,I,R,e.delta[0],e.delta[1]):R;o===n?j&&M(null):(j&&j.targetIndex!==o||!j)&&M({targetIndex:o,startIndex:n})},onEnd:function(e,t,r){let i=w(a,t+I.columnWidth/2,r+I.rowHeight/2)===a?b(n,I,R,e.delta[0],e.delta[1]):R;p?x(p.sourceId,p.sourceIndex,p.targetIndex,p.targetId):x(a,n,i),M(null),A(null)},onStart:function(){y()},grid:I,dragging:n===k},children:t})})}),n[39]=R,n[40]=i,n[41]=d,n[42]=k,n[43]=h,n[44]=w,n[45]=I,n[46]=a,n[47]=y,n[48]=x,n[49]=o,n[50]=j,n[51]=m,n[52]=c,n[53]=p,n[54]=N,n[55]=ne}else ne=n[55];return ne}function be(e,t){return t}function xe(e,t,n,r){let i=Array.from(e),a=Array.from(t),[o]=i.splice(n,1);return a.splice(r,0,o),[i,a]}var Se=(0,t.createContext)({});function Ce(e){let n=(0,t.useRef)(null);return n.current===null&&(n.current=e()),n.current}var we=typeof window<`u`?t.useLayoutEffect:t.useEffect,Te=(0,t.createContext)(null);function Ee(e,t){e.indexOf(t)===-1&&e.push(t)}function De(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var Oe=(e,t,n)=>n>t?t:n<e?e:n;function ke(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}var Ae=()=>{},je=()=>{};typeof process<`u`&&process.env.NODE_ENV!==`production`&&(Ae=(e,t,n)=>{!e&&typeof console<`u`&&console.warn(ke(t,n))},je=(e,t,n)=>{if(!e)throw Error(ke(t,n))});var Me={},Ne=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Pe(e){return typeof e==`object`&&!!e}var Fe=e=>/^0[^.\s]+$/u.test(e);function Ie(e){let t;return()=>(t===void 0&&(t=e()),t)}var V=e=>e,Le=(e,t)=>n=>t(e(n)),Re=(...e)=>e.reduce(Le),ze=(e,t,n)=>{let r=t-e;return r===0?1:(n-e)/r},Be=class{constructor(){this.subscriptions=[]}add(e){return Ee(this.subscriptions,e),()=>De(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},H=e=>e*1e3,Ve=e=>e/1e3;function He(e,t){return t?1e3/t*e:0}var Ue=new Set;function We(e,t,n){e||Ue.has(t)||(console.warn(ke(t,n)),Ue.add(t))}var Ge=(e,t,n)=>{let r=t-e;return((n-e)%r+r)%r+e},Ke=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,qe=1e-7,Je=12;function Ye(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=Ke(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>qe&&++s<Je);return o}function Xe(e,t,n,r){if(e===t&&n===r)return V;let i=t=>Ye(t,0,1,e,n);return e=>e===0||e===1?e:Ke(i(e),t,r)}var Ze=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Qe=e=>t=>1-e(1-t),$e=Xe(.33,1.53,.69,.99),et=Qe($e),tt=Ze(et),nt=e=>e>=1?1:(e*=2)<1?.5*et(e):.5*(2-2**(-10*(e-1))),rt=e=>1-Math.sin(Math.acos(e)),it=Qe(rt),at=Ze(rt),ot=Xe(.42,0,1,1),st=Xe(0,0,.58,1),ct=Xe(.42,0,.58,1),lt=e=>Array.isArray(e)&&typeof e[0]!=`number`;function ut(e,t){return lt(e)?e[Ge(0,e.length,t)]:e}var dt=e=>Array.isArray(e)&&typeof e[0]==`number`,ft={linear:V,easeIn:ot,easeInOut:ct,easeOut:st,circIn:rt,circInOut:at,circOut:it,backIn:et,backInOut:tt,backOut:$e,anticipate:nt},pt=e=>typeof e==`string`,mt=e=>{if(dt(e)){je(e.length===4,`Cubic bezier arrays must contain four numerical values.`,`cubic-bezier-length`);let[t,n,r,i]=e;return Xe(t,n,r,i)}else if(pt(e))return je(ft[e]!==void 0,`Invalid easing type '${e}'`,`invalid-easing-type`),ft[e];return e},ht=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`],gt={value:null,addProjectionMetrics:null};function _t(e,t){let n=new Set,r=new Set,i=!1,a=!1,o=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},c=0;function l(t){o.has(t)&&(u.schedule(t),e()),c++,t(s)}let u={schedule:(e,t=!1,a=!1)=>{let s=a&&i?n:r;return t&&o.add(e),s.add(e),e},cancel:e=>{r.delete(e),o.delete(e)},process:e=>{if(s=e,i){a=!0;return}i=!0;let o=n;n=r,r=o,n.forEach(l),t&>.value&>.value.frameloop[t].push(c),c=0,n.clear(),i=!1,a&&(a=!1,u.process(e))}};return u}var vt=40;function yt(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=ht.reduce((e,n)=>(e[n]=_t(a,t?n:void 0),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=Me.useManualTiming,o=a?i.timestamp:performance.now();n=!1,a||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,vt),1)),i.timestamp=o,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},g=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:ht.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||g(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<ht.length;t++)o[ht[t]].cancel(e)},state:i,steps:o}}var{schedule:U,cancel:bt,state:W,steps:xt}=yt(typeof requestAnimationFrame<`u`?requestAnimationFrame:V,!0),St;function Ct(){St=void 0}var G={now:()=>(St===void 0&&G.set(W.isProcessing||Me.useManualTiming?W.timestamp:performance.now()),St),set:e=>{St=e,queueMicrotask(Ct)}},wt={layout:0,mainThread:0,waapi:0},Tt=e=>t=>typeof t==`string`&&t.startsWith(e),Et=Tt(`--`),Dt=Tt(`var(--`),Ot=e=>Dt(e)?kt.test(e.split(`/*`)[0].trim()):!1,kt=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function At(e){return typeof e==`string`?e.split(`/*`)[0].includes(`var(--`):!1}var jt={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},Mt={...jt,transform:e=>Oe(0,1,e)},Nt={...jt,default:1},Pt=e=>Math.round(e*1e5)/1e5,Ft=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function It(e){return e==null}var Lt=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Rt=(e,t)=>n=>!!(typeof n==`string`&&Lt.test(n)&&n.startsWith(e)||t&&!It(n)&&Object.prototype.hasOwnProperty.call(n,t)),zt=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(Ft);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},Bt=e=>Oe(0,255,e),Vt={...jt,transform:e=>Math.round(Bt(e))},Ht={test:Rt(`rgb`,`red`),parse:zt(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+Vt.transform(e)+`, `+Vt.transform(t)+`, `+Vt.transform(n)+`, `+Pt(Mt.transform(r))+`)`};function Ut(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var Wt={test:Rt(`#`),parse:Ut,transform:Ht.transform},Gt=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Kt=Gt(`deg`),qt=Gt(`%`),K=Gt(`px`),Jt=Gt(`vh`),Yt=Gt(`vw`),Xt={...qt,parse:e=>qt.parse(e)/100,transform:e=>qt.transform(e*100)},Zt={test:Rt(`hsl`,`hue`),parse:zt(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+qt.transform(Pt(t))+`, `+qt.transform(Pt(n))+`, `+Pt(Mt.transform(r))+`)`},q={test:e=>Ht.test(e)||Wt.test(e)||Zt.test(e),parse:e=>Ht.test(e)?Ht.parse(e):Zt.test(e)?Zt.parse(e):Wt.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?Ht.transform(e):Zt.transform(e),getAnimatableNone:e=>{let t=q.parse(e);return t.alpha=0,q.transform(t)}},Qt=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function $t(e){return isNaN(e)&&typeof e==`string`&&(e.match(Ft)?.length||0)+(e.match(Qt)?.length||0)>0}var en=`number`,tn=`color`,nn=`var`,rn=`var(`,an="${}",on=/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 sn(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(on,e=>(q.test(e)?(r.color.push(a),i.push(tn),n.push(q.parse(e))):e.startsWith(rn)?(r.var.push(a),i.push(nn),n.push(e)):(r.number.push(a),i.push(en),n.push(parseFloat(e))),++a,an)).split(an),indexes:r,types:i}}function cn(e){return sn(e).values}function ln({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];e===en?i+=Pt(r[a]):e===tn?i+=q.transform(r[a]):i+=r[a]}return i}}function un(e){return ln(sn(e))}var dn=e=>typeof e==`number`?0:q.test(e)?q.getAnimatableNone(e):e,fn=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:dn(e);function pn(e){let t=sn(e);return ln(t)(t.values.map((e,n)=>fn(e,t.split[n])))}var mn={test:$t,parse:cn,createTransformer:un,getAnimatableNone:pn};function hn(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function gn({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=hn(s,r,e+1/3),a=hn(s,r,e),o=hn(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function _n(e,t){return n=>n>0?t:e}var J=(e,t,n)=>e+(t-e)*n,vn=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},yn=[Wt,Ht,Zt],bn=e=>yn.find(t=>t.test(e));function xn(e){let t=bn(e);if(Ae(!!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===Zt&&(n=gn(n)),n}var Sn=(e,t)=>{let n=xn(e),r=xn(t);if(!n||!r)return _n(e,t);let i={...n};return e=>(i.red=vn(n.red,r.red,e),i.green=vn(n.green,r.green,e),i.blue=vn(n.blue,r.blue,e),i.alpha=J(n.alpha,r.alpha,e),Ht.transform(i))},Cn=new Set([`none`,`hidden`]);function wn(e,t){return Cn.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Tn(e,t){return n=>J(e,t,n)}function En(e){return typeof e==`number`?Tn:typeof e==`string`?Ot(e)?_n:q.test(e)?Sn:An:Array.isArray(e)?Dn:typeof e==`object`?q.test(e)?Sn:On:_n}function Dn(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>En(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function On(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=En(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function kn(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]];n[i]=e.values[o]??0,r[a]++}return n}var An=(e,t)=>{let n=mn.createTransformer(t),r=sn(e),i=sn(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Cn.has(e)&&!i.values.length||Cn.has(t)&&!r.values.length?wn(e,t):Re(Dn(kn(r,i),i.values),n):(Ae(!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`),_n(e,t))};function jn(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?J(e,t,n):En(e)(e,t)}var Mn=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>U.update(t,e),stop:()=>bt(t),now:()=>W.isProcessing?W.timestamp:G.now()}},Nn=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},Pn=2e4;function Fn(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}function In(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(Fn(r),Pn);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:Ve(i)}}var Y={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};function Ln(e,t){return e*Math.sqrt(1-t*t)}var Rn=12;function zn(e,t,n){let r=n;for(let n=1;n<Rn;n++)r-=e(r)/t(r);return r}var Bn=.001;function Vn({duration:e=Y.duration,bounce:t=Y.bounce,velocity:n=Y.velocity,mass:r=Y.mass}){let i,a;Ae(e<=H(Y.maxDuration),`Spring duration must be 10 seconds or less`,`spring-duration-limit`);let o=1-t;o=Oe(Y.minDamping,Y.maxDamping,o),e=Oe(Y.minDuration,Y.maxDuration,Ve(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=Ln(t,o),c=Math.exp(-i);return Bn-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o**2*t**2*e,c=Math.exp(-r),l=Ln(t**2,o);return(-i(t)+Bn>0?-1:1)*((a-s)*c)/l}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return-Bn+r*i},a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=zn(i,a,s);if(e=H(e),isNaN(c))return{stiffness:Y.stiffness,damping:Y.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var Hn=[`duration`,`bounce`],Un=[`stiffness`,`damping`,`mass`];function Wn(e,t){return t.some(t=>e[t]!==void 0)}function Gn(e){let t={velocity:Y.velocity,stiffness:Y.stiffness,damping:Y.damping,mass:Y.mass,isResolvedFromDuration:!1,...e};if(!Wn(e,Un)&&Wn(e,Hn))if(t.velocity=0,e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*Oe(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Y.mass,stiffness:i,damping:a}}else{let n=Vn({...e,velocity:0});t={...t,...n,mass:Y.mass},t.isResolvedFromDuration=!0}return t}function Kn(e=Y.visualDuration,t=Y.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=Gn({...n,velocity:-Ve(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=Ve(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?Y.restSpeed.granular:Y.restSpeed.default,i||=v?Y.restDelta.granular:Y.restDelta.default;let y,b,x,S,C,w;if(h<1)x=Ln(_,h),S=(m+h*_*g)/x,y=e=>o-Math.exp(-h*_*e)*(S*Math.sin(x*e)+g*Math.cos(x*e)),C=h*_*S+g*x,w=h*_*g-S*x,b=e=>Math.exp(-h*_*e)*(C*Math.sin(x*e)+w*Math.cos(x*e));else if(h===1){y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);let e=m+_*g;b=t=>Math.exp(-_*t)*(_*e*t-m)}else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e};let t=(m+h*_*g)/e,n=h*_*t-g*e,r=h*_*g-t*e;b=t=>{let i=Math.exp(-h*_*t),a=Math.min(e*t,300);return i*(n*Math.sinh(a)+r*Math.cosh(a))}}let T={calculatedDuration:p&&d||null,velocity:e=>H(b(e)),next:e=>{if(!p&&h<1){let t=Math.exp(-h*_*e),n=Math.sin(x*e),a=Math.cos(x*e),c=o-t*(S*n+g*a),l=H(t*(C*n+w*a));return s.done=Math.abs(l)<=r&&Math.abs(o-c)<=i,s.value=s.done?o:c,s}let t=y(e);if(p)s.done=e>=d;else{let n=H(b(e));s.done=Math.abs(n)<=r&&Math.abs(o-t)<=i}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(Fn(T),Pn),t=Nn(t=>T.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return T}Kn.applyToOptions=e=>{let t=In(e,100,Kn);return e.ease=t.ease,e.duration=H(t.duration),e.type=`keyframes`,e};var qn=5;function Jn(e,t,n){let r=Math.max(t-qn,0);return He(n-e(r),t-r)}function Yn({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>s!==void 0&&e<s||c!==void 0&&e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>_+v(e),b=e=>{let t=v(e),n=y(e);f.done=Math.abs(t)<=l,f.value=f.done?_:n},x,S,C=e=>{p(f.value)&&(x=e,S=Kn({keyframes:[f.value,m(f.value)],velocity:Jn(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}function Xn(e,t,n){let r=[],i=n||Me.mix||jn,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=Re(Array.isArray(t)?t[n]||V:t,a)),r.push(a)}return r}function Zn(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(je(a===t.length,`Both input and output ranges must be the same length`,`range-length`),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=Xn(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=ze(e[r],e[r+1],n);return s[r](i)};return n?t=>l(Oe(e[0],e[a-1],t)):l}function Qn(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=ze(0,t,r);e.push(J(n,1,i))}}function $n(e){let t=[0];return Qn(t,e.length-1),t}function er(e,t){return e.map(e=>e*t)}function tr(e,t){return e.map(()=>t||ct).splice(0,e.length-1)}function nr({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=lt(r)?r.map(mt):mt(r),a={done:!1,value:t[0]},o=Zn(er(n&&n.length===t.length?n:$n(t),e),t,{ease:Array.isArray(i)?i:tr(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var rr=e=>e!==null;function ir(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(rr),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var ar={decay:Yn,inertia:Yn,tween:nr,keyframes:nr,spring:Kn};function or(e){typeof e.type==`string`&&(e.type=ar[e.type])}var sr=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},cr=e=>e/100,lr=class extends sr{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==G.now()&&this.tick(G.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},wt.mainThread++,this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;or(e);let{type:t=nr,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||nr;process.env.NODE_ENV!==`production`&&s!==nr&&je(o.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`,`spring-two-frames`),s!==nr&&typeof o[0]!=`number`&&(this.mixKeyframes=Re(cr,jn(o[0],o[1])),o=[0,100]);let c=s({...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=Fn(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime===null?this.currentTime=t:this.currentTime=this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,y=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(y=a)),v=Oe(0,1,n)*o}let b;_?(this.delayState.value=l[0],b=this.delayState):b=y.next(v),i&&!_&&(b.value=i(b.value));let{done:x}=b;!_&&s!==null&&(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&p!==Yn&&(b.value=ir(l,this.options,h,this.speed)),m&&m(b.value),S&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return Ve(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+Ve(e)}get time(){return Ve(this.currentTime)}set time(e){e=H(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return Jn(e=>this.generator.next(e).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(G.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=Ve(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=Mn,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,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(G.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null,wt.mainThread--}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}};function ur(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var dr=e=>e*180/Math.PI,fr=e=>mr(dr(Math.atan2(e[1],e[0]))),pr={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:fr,rotateZ:fr,skewX:e=>dr(Math.atan(e[1])),skewY:e=>dr(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},mr=e=>(e%=360,e<0&&(e+=360),e),hr=fr,gr=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),_r=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),vr={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:gr,scaleY:_r,scale:e=>(gr(e)+_r(e))/2,rotateX:e=>mr(dr(Math.atan2(e[6],e[5]))),rotateY:e=>mr(dr(Math.atan2(-e[2],e[0]))),rotateZ:hr,rotate:hr,skewX:e=>dr(Math.atan(e[4])),skewY:e=>dr(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function yr(e){return+!!e.includes(`scale`)}function br(e,t){if(!e||e===`none`)return yr(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=vr,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=pr,i=t}if(!i)return yr(t);let a=r[t],o=i[1].split(`,`).map(Sr);return typeof a==`function`?a(o):o[a]}var xr=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return br(n,t)};function Sr(e){return parseFloat(e.trim())}var Cr=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],wr=new Set(Cr),Tr=e=>e===jt||e===K,Er=new Set([`x`,`y`,`z`]),Dr=Cr.filter(e=>!Er.has(e));function Or(e){let t=[];return Dr.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(+!!n.startsWith(`scale`)))}),t}var kr={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-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})=>br(t,`x`),y:(e,{transform:t})=>br(t,`y`)};kr.translateX=kr.x,kr.translateY=kr.y;var Ar=new Set,jr=!1,Mr=!1,Nr=!1;function Pr(){if(Mr){let e=Array.from(Ar).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=Or(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}Mr=!1,jr=!1,Ar.forEach(e=>e.complete(Nr)),Ar.clear()}function Fr(){Ar.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Mr=!0)})}function Ir(){Nr=!0,Fr(),Pr(),Nr=!1}var Lr=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(Ar.add(this),jr||(jr=!0,U.read(Fr),U.resolveKeyframes(Pr))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}ur(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Ar.delete(this)}cancel(){this.state===`scheduled`&&(Ar.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},Rr=e=>e.startsWith(`--`);function zr(e,t,n){Rr(t)?e.style.setProperty(t,n):e.style[t]=n}var Br={};function Vr(e,t){let n=Ie(e);return()=>Br[t]??n()}var Hr=Vr(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),Ur=Vr(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),Wr=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Gr={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:Wr([0,.65,.55,1]),circOut:Wr([.55,0,1,.45]),backIn:Wr([.31,.01,.66,-.59]),backOut:Wr([.33,1.53,.69,.99])};function Kr(e,t){if(e)return typeof e==`function`?Ur()?Nn(e,t):`ease-out`:dt(e)?Wr(e):Array.isArray(e)?e.map(e=>Kr(e,t)||Gr.easeOut):Gr[e]}function qr(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=Kr(s,i);Array.isArray(d)&&(u.easing=d),gt.value&&wt.waapi++;let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};l&&(f.pseudoElement=l);let p=e.animate(u,f);return gt.value&&p.finished.finally(()=>{wt.waapi--}),p}function Jr(e){return typeof e==`function`&&`applyToOptions`in e}function Yr({type:e,...t}){return Jr(e)&&Ur()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var Xr=class extends sr{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,je(typeof e.type!=`string`,`Mini animate() doesn't support "type" as a string.`,`mini-spring`);let c=Yr(e);this.animation=qr(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=ir(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),zr(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e===`idle`||e===`finished`||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return Ve(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+Ve(e)}get time(){return Ve(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=H(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&Hr()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),V):r(this)}},Zr={anticipate:nt,backInOut:tt,circInOut:at};function Qr(e){return e in Zr}function $r(e){typeof e.ease==`string`&&Qr(e.ease)&&(e.ease=Zr[e.ease])}var ei=10,ti=class extends Xr{constructor(e){$r(e),or(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new lr({...a,autoplay:!1}),s=Math.max(ei,G.now()-this.startTime),c=Oe(0,ei,s-ei),l=o.sample(s).value,{name:u}=this.options;i&&u&&zr(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},ni=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(mn.test(e)||e===`0`)&&!e.startsWith(`url(`));function ri(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function ii(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=ni(i,t),s=ni(a,t);return Ae(o===s,`You are trying to animate ${t} from "${i}" to "${a}". "${o?a:i}" is not an animatable value.`,`value-not-animatable`),!o||!s?!1:ri(e)||(n===`spring`||Jr(n))&&r}function ai(e){e.duration=0,e.type=`keyframes`}var oi=new Set([`opacity`,`clipPath`,`filter`,`transform`]),si=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function ci(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&si.test(e[t]))return!0;return!1}var li=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),ui=Ie(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function di(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:c,transformTemplate:l}=t.owner.getProps();return ui()&&n&&(oi.has(n)||li.has(n)&&ci(s))&&(n!==`transform`||!l)&&!c&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var fi=40,pi=class extends sr{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,keyframes:o,name:s,motionValue:c,element:l,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=G.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u},f=l?.KeyframeResolver||Lr;this.keyframeResolver=new f(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=G.now();let u=!0;ii(e,i,a,o)||(u=!1,(Me.instantAnimations||!s)&&l?.(ir(e,n,t)),e[0]=e[e.length-1],ai(n),n.repeat=0);let d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>fi?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!c&&di(d),p=d.motionValue?.owner?.current,m;if(f)try{m=new ti({...d,element:p})}catch{m=new lr(d)}else m=new lr(d);m.finished.then(()=>{this.notifyFinished()}).catch(V),this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Ir()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}},mi=class{constructor(e){this.stop=()=>this.runAll(`stop`),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e){let t=this.animations.map(t=>t.attachTimeline(e));return()=>{t.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll(`time`)}set time(e){this.setAll(`time`,e)}get speed(){return this.getAll(`speed`)}set speed(e){this.setAll(`speed`,e)}get state(){return this.getAll(`state`)}get startTime(){return this.getAll(`startTime`)}get duration(){return hi(this.animations,`duration`)}get iterationDuration(){return hi(this.animations,`iterationDuration`)}runAll(e){this.animations.forEach(t=>t[e]())}play(){this.runAll(`play`)}pause(){this.runAll(`pause`)}cancel(){this.runAll(`cancel`)}complete(){this.runAll(`complete`)}};function hi(e,t){let n=0;for(let r=0;r<e.length;r++){let i=e[r][t];i!==null&&i>n&&(n=i)}return n}var gi=class extends mi{then(e,t){return this.finished.finally(e).then(()=>{})}};function _i(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}var vi=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function yi(e){let t=vi.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}var bi=4;function xi(e,t,n=1){je(n<=bi,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,`max-css-var-depth`);let[r,i]=yi(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return Ne(e)?parseFloat(e):e}return Ot(i)?xi(i,t,n+1):i}var Si={type:`spring`,stiffness:500,damping:25,restSpeed:10},Ci=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),wi={type:`keyframes`,duration:.8},Ti={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},Ei=(e,{keyframes:t})=>t.length>2?wi:wr.has(e)?e.startsWith(`scale`)?Ci(t[1]):Si:Ti;function Di(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function Oi(e,t){let n=e?.[t]??e?.default??e;return n===e?n:Di(n,e)}var ki=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function Ai(e){for(let t in e)if(!ki.has(t))return!0;return!1}var ji=(e,t,n,r={},i,a)=>o=>{let s=Oi(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=H(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};Ai(s)||Object.assign(u,Ei(e,u)),u.duration&&=H(u.duration),u.repeatDelay&&=H(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(ai(u),u.delay===0&&(d=!0)),(Me.instantAnimations||Me.skipAnimations||i?.shouldSkipAnimations)&&(d=!0,ai(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=ir(u.keyframes,s);if(e!==void 0){U.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new lr(u):new pi(u)};function Mi(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Ni(e,t,n,r){if(typeof t==`function`){let[i,a]=Mi(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=Mi(r);t=t(n===void 0?e.custom:n,i,a)}return t}function Pi(e,t,n){let r=e.getProps();return Ni(r,t,n===void 0?r.custom:n,e)}var Fi=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...Cr]),Ii=30,Li=e=>!isNaN(parseFloat(e)),Ri={current:void 0},zi=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=G.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=G.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Li(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!==`production`&&We(!1,`value.onChange(callback) is deprecated. Switch to value.on("change", callback).`),this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new Be);let n=this.events[e].add(t);return e===`change`?()=>{n(),U.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return Ri.current&&Ri.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=G.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Ii)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,Ii);return He(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function Bi(e,t){return new zi(e,t)}var Vi=e=>Array.isArray(e);function Hi(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Bi(n))}function Ui(e){return Vi(e)?e[e.length-1]||0:e}function Wi(e,t){let{transitionEnd:n={},transition:r={},...i}=Pi(e,t)||{};i={...i,...n};for(let t in i)Hi(e,t,Ui(i[t]))}var X=e=>!!(e&&e.getVelocity);function Gi(e){return!!(X(e)&&e.add)}function Ki(e,t){let n=e.getValue(`willChange`);if(Gi(n))return n.add(t);if(!n&&Me.WillChange){let n=new Me.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function qi(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var Ji=`data-`+qi(`framerAppearId`);function Yi(e){return e.props[Ji]}function Xi({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Zi(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?Di(a,c):c;let l=a?.reduceMotion;r&&(a=r);let u=[],d=i&&e.animationState&&e.animationState.getState()[i];for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||d&&Xi(d,t))continue;let o={delay:n,...Oi(a||{},t)},c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){U.update(()=>r.set(i));continue}let f=!1;if(window.MotionHandoffAnimation){let n=Yi(e);if(n){let e=window.MotionHandoffAnimation(n,t,U);e!==null&&(o.startTime=e,f=!0)}}Ki(e,t);let p=l??e.shouldReduceMotion;r.start(ji(t,r,i,p&&Fi.has(t)?{type:!1}:o,e,f));let m=r.animation;m&&u.push(m)}if(o){let t=()=>U.update(()=>{o&&Wi(e,o)});u.length?Promise.all(u).then(t):t()}return u}function Qi(e,t,n={}){let r=Pi(e,t,n.type===`exit`?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let a=r?()=>Promise.all(Zi(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return $i(e,t,r,a,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(()=>t())}else return Promise.all([a(),o(n.delay)])}function $i(e,t,n=0,r=0,i=0,a=1,o){let s=[];for(let c of e.variantChildren)c.notify(`AnimationStart`,t),s.push(Qi(c,t,{...o,delay:n+(typeof r==`function`?0:r)+_i(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function ea(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>Qi(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=Qi(e,t,n);else{let i=typeof t==`function`?Pi(e,t,n.custom):t;r=Promise.all(Zi(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}var ta={test:e=>e===`auto`,parse:e=>e},na=e=>t=>t.test(e),ra=[jt,K,qt,Kt,Yt,Jt,ta],ia=e=>ra.find(na(e));function aa(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||Fe(e)}var oa=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function sa(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(Ft)||[];if(!r)return e;let i=n.replace(r,``),a=+!!oa.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var ca=/\b([a-z-]*)\(.*?\)/gu,la={...mn,getAnimatableNone:e=>{let t=e.match(ca);return t?t.map(sa).join(` `):e}},ua={...mn,getAnimatableNone:e=>{let t=mn.parse(e);return mn.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},da={...jt,transform:Math.round},fa={borderWidth:K,borderTopWidth:K,borderRightWidth:K,borderBottomWidth:K,borderLeftWidth:K,borderRadius:K,borderTopLeftRadius:K,borderTopRightRadius:K,borderBottomRightRadius:K,borderBottomLeftRadius:K,width:K,maxWidth:K,height:K,maxHeight:K,top:K,right:K,bottom:K,left:K,inset:K,insetBlock:K,insetBlockStart:K,insetBlockEnd:K,insetInline:K,insetInlineStart:K,insetInlineEnd:K,padding:K,paddingTop:K,paddingRight:K,paddingBottom:K,paddingLeft:K,paddingBlock:K,paddingBlockStart:K,paddingBlockEnd:K,paddingInline:K,paddingInlineStart:K,paddingInlineEnd:K,margin:K,marginTop:K,marginRight:K,marginBottom:K,marginLeft:K,marginBlock:K,marginBlockStart:K,marginBlockEnd:K,marginInline:K,marginInlineStart:K,marginInlineEnd:K,fontSize:K,backgroundPositionX:K,backgroundPositionY:K,rotate:Kt,rotateX:Kt,rotateY:Kt,rotateZ:Kt,scale:Nt,scaleX:Nt,scaleY:Nt,scaleZ:Nt,skew:Kt,skewX:Kt,skewY:Kt,distance:K,translateX:K,translateY:K,translateZ:K,x:K,y:K,z:K,perspective:K,transformPerspective:K,opacity:Mt,originX:Xt,originY:Xt,originZ:K,zIndex:da,fillOpacity:Mt,strokeOpacity:Mt,numOctaves:da},pa={...fa,color:q,backgroundColor:q,outlineColor:q,fill:q,stroke:q,borderColor:q,borderTopColor:q,borderRightColor:q,borderBottomColor:q,borderLeftColor:q,filter:la,WebkitFilter:la,mask:ua,WebkitMask:ua},ma=e=>pa[e],ha=new Set([la,ua]);function ga(e,t){let n=ma(e);return ha.has(n)||(n=mn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var _a=new Set([`auto`,`none`,`0`]);function va(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!_a.has(t)&&sn(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=ga(n,i)}var ya=class extends Lr{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),Ot(r))){let i=xi(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!Fi.has(n)||e.length!==2)return;let[r,i]=e,a=ia(r),o=ia(i);if(At(r)!==At(i)&&kr[n]){this.needsMeasurement=!0;return}if(a!==o)if(Tr(a)&&Tr(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else kr[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||aa(e[t]))&&n.push(t);n.length&&va(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=kr[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,a=n[i];n[i]=kr[t](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}};function ba(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}var xa=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function Sa(e){return Pe(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}var{schedule:Ca,cancel:wa}=yt(queueMicrotask,!1),Ta={x:!1,y:!1};function Ea(){return Ta.x||Ta.y}function Da(e){return e===`x`||e===`y`?Ta[e]?null:(Ta[e]=!0,()=>{Ta[e]=!1}):Ta.x||Ta.y?null:(Ta.x=Ta.y=!0,()=>{Ta.x=Ta.y=!1})}function Oa(e,t){let n=ba(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function ka(e){return!(e.pointerType===`touch`||Ea())}function Aa(e,t,n={}){let[r,i,a]=Oa(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{if(e.pointerType!==`touch`){if(n){r=!0;return}s(e)}};e.addEventListener(`pointerenter`,n=>{if(!ka(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var ja=(e,t)=>t?e===t?!0:ja(e,t.parentElement):!1,Ma=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,Na=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function Pa(e){return Na.has(e.tagName)||e.isContentEditable===!0}var Fa=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function Ia(e){return Fa.has(e.tagName)||e.isContentEditable===!0}var La=new WeakSet;function Ra(e){return t=>{t.key===`Enter`&&e(t)}}function za(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var Ba=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=Ra(()=>{if(La.has(n))return;za(n,`down`);let e=Ra(()=>{za(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>za(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function Va(e){return Ma(e)&&!Ea()}var Ha=new WeakSet;function Ua(e,t,n={}){let[r,i,a]=Oa(e,n),o=e=>{let r=e.currentTarget;if(!Va(e)||Ha.has(e))return;La.add(r),n.stopPropagation&&Ha.add(e);let a=t(r,e),o=(e,t)=>{window.removeEventListener(`pointerup`,s),window.removeEventListener(`pointercancel`,c),La.has(r)&&La.delete(r),Va(e)&&typeof a==`function`&&a(e,{success:t})},s=e=>{o(e,r===window||r===document||n.useGlobalTarget||ja(r,e.target))},c=e=>{o(e,!1)};window.addEventListener(`pointerup`,s,i),window.addEventListener(`pointercancel`,c,i)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),Sa(e)&&(e.addEventListener(`focus`,e=>Ba(e,i)),!Pa(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function Wa(e){return Pe(e)&&`ownerSVGElement`in e}var Ga=new WeakMap,Ka,qa=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:Wa(r)&&`getBBox`in r?r.getBBox()[t]:r[n],Ja=qa(`inline`,`width`,`offsetWidth`),Ya=qa(`block`,`height`,`offsetHeight`);function Xa({target:e,borderBoxSize:t}){Ga.get(e)?.forEach(n=>{n(e,{get width(){return Ja(e,t)},get height(){return Ya(e,t)}})})}function Za(e){e.forEach(Xa)}function Qa(){typeof ResizeObserver>`u`||(Ka=new ResizeObserver(Za))}function $a(e,t){Ka||Qa();let n=ba(e);return n.forEach(e=>{let n=Ga.get(e);n||(n=new Set,Ga.set(e,n)),n.add(t),Ka?.observe(e)}),()=>{n.forEach(e=>{let n=Ga.get(e);n?.delete(t),n?.size||Ka?.unobserve(e)})}}var eo=new Set,to;function no(){to=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};eo.forEach(t=>t(e))},window.addEventListener(`resize`,to)}function ro(e){return eo.add(e),to||no(),()=>{eo.delete(e),!eo.size&&typeof to==`function`&&(window.removeEventListener(`resize`,to),to=void 0)}}function io(e,t){return typeof e==`function`?ro(e):$a(e,t)}function ao(e){return Wa(e)&&e.tagName===`svg`}var oo=[...ra,q,mn],so=e=>oo.find(na(e)),co=()=>({translate:0,scale:1,origin:0,originPoint:0}),lo=()=>({x:co(),y:co()}),uo=()=>({min:0,max:0}),Z=()=>({x:uo(),y:uo()}),fo=new WeakMap;function po(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function mo(e){return typeof e==`string`||Array.isArray(e)}var ho=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],go=[`initial`,...ho];function _o(e){return po(e.animate)||go.some(t=>mo(e[t]))}function vo(e){return!!(_o(e)||e.variants)}function yo(e,t,n){for(let r in t){let i=t[r],a=n[r];if(X(i))e.addValue(r,i);else if(X(a))e.addValue(r,Bi(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,Bi(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var bo={current:null},xo={current:!1},So=typeof window<`u`;function Co(){if(xo.current=!0,So)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>bo.current=e.matches;e.addEventListener(`change`,t),t()}else bo.current=!1}var wo=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],To={};function Eo(e){To=e}function Do(){return To}var Oo=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){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=Lr,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=()=>{let e=G.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,U.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=_o(t),this.isVariantNode=vo(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&X(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,fo.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(xo.current||Co(),this.shouldReduceMotion=bo.current),process.env.NODE_ENV!==`production`&&We(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,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),bt(this.notifyUpdate),bt(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&oi.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new Xr({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:H(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=wr.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&U.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i(),t.owner&&t.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in To){let t=To[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Z()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<wo.length;t++){let n=wo[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=yo(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=Bi(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(Ne(n)||Fe(n))?n=parseFloat(n):!so(n)&&mn.test(t)&&(n=ga(e,t)),this.setBaseTarget(e,X(n)?n.get():n)),X(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=Ni(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!X(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new Be),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){Ca.render(this.render)}},ko=class extends Oo{constructor(){super(...arguments),this.KeyframeResolver=ya}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;X(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},Ao=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function jo({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Mo({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function No(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Po(e){return e===void 0||e===1}function Fo({scale:e,scaleX:t,scaleY:n}){return!Po(e)||!Po(t)||!Po(n)}function Io(e){return Fo(e)||Lo(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Lo(e){return Ro(e.x)||Ro(e.y)}function Ro(e){return e&&e!==`0%`}function zo(e,t,n){return n+t*(e-n)}function Bo(e,t,n,r,i){return i!==void 0&&(e=zo(e,i,r)),zo(e,n,r)+t}function Vo(e,t=0,n=1,r,i){e.min=Bo(e.min,t,n,r,i),e.max=Bo(e.max,t,n,r,i)}function Ho(e,{x:t,y:n}){Vo(e.x,t.translate,t.scale,t.originPoint),Vo(e.y,n.translate,n.scale,n.originPoint)}var Uo=.999999999999,Wo=1.0000000000001;function Go(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(Ko(e.x,-a.scroll.offset.x),Ko(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Ho(e,o)),r&&Io(a.latestValues)&&Yo(e,a.latestValues,a.layout?.layoutBox))}t.x<Wo&&t.x>Uo&&(t.x=1),t.y<Wo&&t.y>Uo&&(t.y=1)}function Ko(e,t){e.min+=t,e.max+=t}function qo(e,t,n,r,i=.5){Vo(e,t,n,J(e.min,e.max,i),r)}function Jo(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function Yo(e,t,n){let r=n??e;qo(e.x,Jo(t.x,r.x),t.scaleX,t.scale,t.originX),qo(e.y,Jo(t.y,r.y),t.scaleY,t.scale,t.originY)}function Xo(e,t){return jo(No(e.getBoundingClientRect(),t))}function Zo(e,t,n){let r=Xo(e,n),{scroll:i}=t;return i&&(Ko(r.x,i.offset.x),Ko(r.y,i.offset.y)),r}var Qo={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},$o=Cr.length;function es(e,t,n){let r=``,i=!0;for(let a=0;a<$o;a++){let o=Cr[a],s=e[o];if(s===void 0)continue;let c=!0;if(typeof s==`number`)c=s===+!!o.startsWith(`scale`);else{let e=parseFloat(s);c=o.startsWith(`scale`)?e===1:e===0}if(!c||n){let e=xa(s,fa[o]);if(!c){i=!1;let t=Qo[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}return r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function ts(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(wr.has(e)){o=!0;continue}else if(Et(e)){i[e]=n;continue}else{let t=xa(n,fa[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=es(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}function ns(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function rs(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var is={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(K.test(e))e=parseFloat(e);else return e;return`${rs(e,t.target.x)}% ${rs(e,t.target.y)}%`}},as={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=mn.parse(e);if(i.length>5)return r;let a=mn.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=J(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},os={borderRadius:{...is,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:is,borderTopRightRadius:is,borderBottomLeftRadius:is,borderBottomRightRadius:is,boxShadow:as};function ss(e,{layout:t,layoutId:n}){return wr.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!os[e]||e===`opacity`)}function cs(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(X(r[t])||i&&X(i[t])||ss(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function ls(e){return window.getComputedStyle(e)}var us=class extends ko{constructor(){super(...arguments),this.type=`html`,this.renderInstance=ns}readValueFromInstance(e,t){if(wr.has(t))return this.projection?.isProjecting?yr(t):xr(e,t);{let n=ls(e),r=(Et(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return Xo(e,t)}build(e,t,n){ts(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return cs(e,t,n)}};function ds(e,t){return e in t}var fs=class extends Oo{constructor(){super(...arguments),this.type=`object`}readValueFromInstance(e,t){if(ds(t,e)){let n=e[t];if(typeof n==`string`||typeof n==`number`)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(e,t){delete t.output[e]}measureInstanceViewportBox(){return Z()}build(e,t){Object.assign(e.output,t)}renderInstance(e,{output:t}){Object.assign(e,t)}sortInstanceNodePosition(){return 0}},ps={offset:`stroke-dashoffset`,array:`stroke-dasharray`},ms={offset:`strokeDashoffset`,array:`strokeDasharray`};function hs(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?ps:ms;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var gs=[`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function _s(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(ts(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox);for(let e of gs)d[e]!==void 0&&(f[e]=d[e],delete d[e]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&hs(d,i,a,o,!1)}var vs=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`]),ys=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function bs(e,t,n,r){ns(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(vs.has(n)?n:qi(n),t.attrs[n])}function xs(e,t,n){let r=cs(e,t,n);for(let n in e)if(X(e[n])||X(t[n])){let t=Cr.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var Ss=class extends ko{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=Z}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(wr.has(t)){let e=ma(t);return e&&e.default||0}return t=vs.has(t)?t:qi(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return xs(e,t,n)}build(e,t,n){_s(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){bs(e,t,n,r)}mount(e){this.isSVGTag=ys(e.tagName),super.mount(e)}},Cs=go.length;function ws(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&ws(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<Cs;n++){let r=go[n],i=e.props[r];(mo(i)||i===!1)&&(t[r]=i)}return t}function Ts(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var Es=[...ho].reverse(),Ds=ho.length;function Os(e){return t=>Promise.all(t.map(({animation:t,options:n})=>ea(e,t,n)))}function ks(e){let t=Os(e),n=Ms(),r=!0,i=!1,a=t=>(n,r)=>{let i=Pi(e,r,t===`exit`?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function o(n){t=n(e)}function s(o){let{props:s}=e,c=ws(e.parent)||{},l=[],u=new Set,d={},f=1/0;for(let t=0;t<Ds;t++){let p=Es[t],m=n[p],h=s[p]===void 0?c[p]:s[p],g=mo(h),_=p===o?m.isActive:null;_===!1&&(f=t);let v=h===c[p]&&h!==s[p]&&g;if(v&&(r||i)&&e.manuallyAnimateOnMount&&(v=!1),m.protectedKeys={...d},!m.isActive&&_===null||!h&&!m.prevProp||po(h)||typeof h==`boolean`)continue;if(p===`exit`&&m.isActive&&_!==!0){m.prevResolvedValues&&(d={...d,...m.prevResolvedValues});continue}let y=As(m.prevProp,h),b=y||p===o&&m.isActive&&!v&&g||t>f&&g,x=!1,S=Array.isArray(h)?h:[h],C=S.reduce(a(p),{});_===!1&&(C={});let{prevResolvedValues:w={}}=m,T={...w,...C},E=t=>{b=!0,u.has(t)&&(x=!0,u.delete(t)),m.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in T){let t=C[e],n=w[e];if(d.hasOwnProperty(e))continue;let r=!1;r=Vi(t)&&Vi(n)?!Ts(t,n):t!==n,r?t==null?u.add(e):E(e):t!==void 0&&u.has(e)?E(e):m.protectedKeys[e]=!0}m.prevProp=h,m.prevResolvedValues=C,m.isActive&&(d={...d,...C}),(r||i)&&e.blockInitialAnimation&&(b=!1);let D=v&&y;b&&(!D||x)&&l.push(...S.map(t=>{let n={type:p};if(typeof t==`string`&&(r||i)&&!D&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=Pi(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=_i(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){let t={};if(typeof s.initial!=`boolean`){let n=Pi(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}u.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),l.push({animation:t})}let p=!!l.length;return r&&(s.initial===!1||s.initial===s.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,i=!1,p?t(l):Promise.resolve()}function c(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=s(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:s,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Ms(),i=!0}}}function As(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!Ts(t,e):!1}function js(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ms(){return{animate:js(!0),whileInView:js(),whileHover:js(),whileTap:js(),whileDrag:js(),whileFocus:js(),exit:js()}}function Ns(e,t){e.min=t.min,e.max=t.max}function Ps(e,t){Ns(e.x,t.x),Ns(e.y,t.y)}function Fs(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var Is=1e-4,Ls=1-Is,Rs=1+Is,zs=.01,Bs=0-zs,Vs=0+zs;function Q(e){return e.max-e.min}function Hs(e,t,n){return Math.abs(e-t)<=n}function Us(e,t,n,r=.5){e.origin=r,e.originPoint=J(t.min,t.max,e.origin),e.scale=Q(n)/Q(t),e.translate=J(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Ls&&e.scale<=Rs||isNaN(e.scale))&&(e.scale=1),(e.translate>=Bs&&e.translate<=Vs||isNaN(e.translate))&&(e.translate=0)}function Ws(e,t,n,r){Us(e.x,t.x,n.x,r?r.originX:void 0),Us(e.y,t.y,n.y,r?r.originY:void 0)}function Gs(e,t,n,r=0){e.min=(r?J(n.min,n.max,r):n.min)+t.min,e.max=e.min+Q(t)}function Ks(e,t,n,r){Gs(e.x,t.x,n.x,r?.x),Gs(e.y,t.y,n.y,r?.y)}function qs(e,t,n,r=0){let i=r?J(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+Q(t)}function Js(e,t,n,r){qs(e.x,t.x,n.x,r?.x),qs(e.y,t.y,n.y,r?.y)}function Ys(e,t,n,r,i){return e-=t,e=zo(e,1/n,r),i!==void 0&&(e=zo(e,1/i,r)),e}function Xs(e,t=0,n=1,r=.5,i,a=e,o=e){if(qt.test(t)&&(t=parseFloat(t),t=J(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=J(a.min,a.max,r);e===a&&(s-=t),e.min=Ys(e.min,t,n,s,i),e.max=Ys(e.max,t,n,s,i)}function Zs(e,t,[n,r,i],a,o){Xs(e,t[n],t[r],t[i],t.scale,a,o)}var Qs=[`x`,`scaleX`,`originX`],$s=[`y`,`scaleY`,`originY`];function ec(e,t,n,r){Zs(e.x,t,Qs,n?n.x:void 0,r?r.x:void 0),Zs(e.y,t,$s,n?n.y:void 0,r?r.y:void 0)}function tc(e){return e.translate===0&&e.scale===1}function nc(e){return tc(e.x)&&tc(e.y)}function rc(e,t){return e.min===t.min&&e.max===t.max}function ic(e,t){return rc(e.x,t.x)&&rc(e.y,t.y)}function ac(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function oc(e,t){return ac(e.x,t.x)&&ac(e.y,t.y)}function sc(e){return Q(e.x)/Q(e.y)}function cc(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function lc(e){return[e(`x`),e(`y`)]}function uc(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,rotateX:i,rotateY:a,skewX:o,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotateX(${i}deg) `),a&&(r+=`rotateY(${a}deg) `),o&&(r+=`skewX(${o}deg) `),s&&(r+=`skewY(${s}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}var dc=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`],fc=dc.length,pc=e=>typeof e==`string`?parseFloat(e):e,mc=e=>typeof e==`number`||K.test(e);function hc(e,t,n,r,i,a){i?(e.opacity=J(0,n.opacity??1,_c(r)),e.opacityExit=J(t.opacity??1,0,vc(r))):a&&(e.opacity=J(t.opacity??1,n.opacity??1,r));for(let i=0;i<fc;i++){let a=dc[i],o=gc(t,a),s=gc(n,a);o===void 0&&s===void 0||(o||=0,s||=0,o===0||s===0||mc(o)===mc(s)?(e[a]=Math.max(J(pc(o),pc(s),r),0),(qt.test(s)||qt.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=J(t.rotate||0,n.rotate||0,r))}function gc(e,t){return e[t]===void 0?e.borderRadius:e[t]}var _c=yc(0,.5,it),vc=yc(.5,.95,V);function yc(e,t,n){return r=>r<e?0:r>t?1:n(ze(e,t,r))}function bc(e,t,n){let r=X(e)?e:Bi(e);return r.start(ji(``,r,t,n)),r.animation}function xc(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}var Sc=(e,t)=>e.depth-t.depth,Cc=class{constructor(){this.children=[],this.isDirty=!1}add(e){Ee(this.children,e),this.isDirty=!0}remove(e){De(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Sc),this.isDirty=!1,this.children.forEach(e)}};function wc(e,t){let n=G.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(bt(r),e(a-t))};return U.setup(r,!0),()=>bt(r)}function Tc(e){return X(e)?e.get():e}var Ec=class{constructor(){this.members=[]}add(e){Ee(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;(!r||r.isConnected===!1)&&!n.snapshot&&(De(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(De(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}},Dc={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Oc={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},kc=[``,`X`,`Y`,`Z`],Ac=1e3,jc=0;function Mc(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Nc(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=Yi(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,U,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Nc(r)}function Pc({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=jc++,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,gt.value&&(Oc.nodes=Oc.calculatedTargetDeltas=Oc.calculatedProjections=0),this.nodes.forEach(Lc),this.nodes.forEach(Kc),this.nodes.forEach(qc),this.nodes.forEach(Rc),gt.addProjectionMetrics&>.addProjectionMetrics(Oc)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new Cc)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new Be),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=Wa(t)&&!ao(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;U.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=wc(i,250),Dc.hasAnimatedSinceResize&&(Dc.hasAnimatedSinceResize=!1,this.nodes.forEach(Gc)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||el,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!oc(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...Oi(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l)}else t||Gc(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),bt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Jc),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Nc(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(Vc),this.nodes.forEach(Bc);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Hc);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Uc),this.nodes.forEach(Wc),this.nodes.forEach(Fc),this.nodes.forEach(Ic)):this.nodes.forEach(Hc),this.clearAllSnapshots();let e=G.now();W.delta=Oe(0,1e3/60,e-W.timestamp),W.timestamp=e,W.isProcessing=!0,xt.update.process(W),xt.preRender.process(W),xt.render.process(W),W.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ca.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(zc),this.sharedNodes.forEach(Yc)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,U.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){U.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Q(this.snapshot.measuredBox.x)&&!Q(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 e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||=Z(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!nc(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||Io(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),il(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return Z();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(ol))){let{scroll:e}=this.root;e&&(Ko(t.x,e.offset.x),Ko(t.y,e.offset.y))}return t}removeElementScroll(e){let t=Z();if(Ps(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&Ps(t,e),Ko(t.x,i.offset.x),Ko(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||Z();Ps(r,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(Ko(r.x,-n.scroll.offset.x),Ko(r.y,-n.scroll.offset.y)),Io(n.latestValues)&&Yo(r,n.latestValues,n.layout?.layoutBox)}return Io(this.latestValues)&&Yo(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=Z();Ps(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!Io(n.latestValues))continue;let r;n.instance&&(Fo(n.latestValues)&&n.updateSnapshot(),r=Z(),Ps(r,n.measurePageBox())),ec(t,n.latestValues,n.snapshot?.layoutBox,r)}return Io(this.latestValues)&&ec(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0?!0:e.crossfade}}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!==W.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=W.timestamp;let a=this.getClosestProjectingParent();a&&this.linkedParentVersion!==a.layoutVersion&&!a.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Z(),this.targetWithTransforms=Z()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Ks(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):Ps(this.target,this.layout.layoutBox),Ho(this.target,this.targetDelta)):Ps(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),gt.value&&Oc.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||Fo(this.parent.latestValues)||Lo(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Z(),this.relativeTargetOrigin=Z(),Js(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),Ps(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===W.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;Ps(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;Go(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=Z());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Fs(this.prevProjectionDelta.x,this.projectionDelta.x),Fs(this.prevProjectionDelta.y,this.projectionDelta.y)),Ws(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!cc(this.projectionDelta.x,this.prevProjectionDelta.x)||!cc(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),gt.value&&Oc.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=lo(),this.projectionDelta=lo(),this.projectionDeltaWithTransform=lo()}setAnimationOrigin(e,t=!1){let n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},a=lo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let o=Z(),s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),l=!c||c.members.length<=1,u=!!(s&&!l&&this.options.crossfade===!0&&!this.path.some($c));this.animationProgress=0;let d;this.mixTargetDelta=t=>{let n=t/1e3;Xc(a.x,e.x,n),Xc(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Js(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Qc(this.relativeTarget,this.relativeTargetOrigin,o,n),d&&ic(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||=Z(),Ps(d,this.relativeTarget)),s&&(this.animationValues=i,hc(i,r,this.latestValues,n,u,l)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(bt(this.pendingAnimation),void 0),this.pendingAnimation=U.update(()=>{Dc.hasAnimatedSinceResize=!0,wt.layout++,this.motionValue||=Bi(0),this.motionValue.jump(0,!1),this.currentAnimation=bc(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{wt.layout--},onComplete:()=>{wt.layout--,e.onComplete&&e.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);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Ac),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(!(!t||!n||!r)){if(this!==e&&this.layout&&r&&al(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||Z();let t=Q(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=Q(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}Ps(t,n),Yo(t,i),Ws(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Ec),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return e?e.lead===this:!0}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&Mc(`z`,e,r,this.animationValues);for(let t=0;t<kc.length;t++)Mc(`rotate${kc[t]}`,e,r,this.animationValues),Mc(`skew${kc[t]}`,e,r,this.animationValues);e.render();for(let t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=Tc(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=Tc(t?.pointerEvents)||``),this.hasProjected&&!Io(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=uc(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,r.animationValues?e.opacity=r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:e.opacity=r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in os){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=os[t],c=a===`none`?i[t]:n(i[t],r);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=r===this?Tc(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(Bc),this.root.sharedNodes.clear()}}}function Fc(e){e.updateLayout()}function Ic(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;if(i===`size`)lc(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=Q(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;Ns(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else al(i,t.layoutBox,n)&&lc(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=Q(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=lo();Ws(o,n,t.layoutBox);let s=lo();a?Ws(s,e.applyTransform(r,!0),t.measuredBox):Ws(s,n,t.layoutBox);let c=!nc(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=e.options.layoutAnchor||void 0,s=Z();Js(s,t.layoutBox,i.layoutBox,o);let c=Z();Js(c,n,a.layoutBox,o),oc(s,c)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=c,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Lc(e){gt.value&&Oc.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function Rc(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function zc(e){e.clearSnapshot()}function Bc(e){e.clearMeasurements()}function Vc(e){e.isLayoutDirty=!0,e.updateLayout()}function Hc(e){e.isLayoutDirty=!1}function Uc(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function Wc(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function Gc(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Kc(e){e.resolveTargetDelta()}function qc(e){e.calcProjection()}function Jc(e){e.resetSkewAndRotation()}function Yc(e){e.removeLeadSnapshot()}function Xc(e,t,n){e.translate=J(t.translate,0,n),e.scale=J(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Zc(e,t,n,r){e.min=J(t.min,n.min,r),e.max=J(t.max,n.max,r)}function Qc(e,t,n,r){Zc(e.x,t.x,n.x,r),Zc(e.y,t.y,n.y,r)}function $c(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var el={duration:.45,ease:[.4,0,.1,1]},tl=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),nl=tl(`applewebkit/`)&&!tl(`chrome/`)?Math.round:V;function rl(e){e.min=nl(e.min),e.max=nl(e.max)}function il(e){rl(e.x),rl(e.y)}function al(e,t,n){return e===`position`||e===`preserve-aspect`&&!Hs(sc(t),sc(n),.2)}function ol(e){return e!==e.root&&e.scroll?.wasRoot}var sl=Pc({attachResizeListener:(e,t)=>xc(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),cl={current:void 0},ll=Pc({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!cl.current){let e=new sl({});e.mount(window),e.setOptions({layoutScroll:!0}),cl.current=e}return cl.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),ul=(0,t.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function dl(e=!0){let n=(0,t.useContext)(Te);if(n===null)return[!0,null];let{isPresent:r,onExitComplete:i,register:a}=n,o=(0,t.useId)();(0,t.useEffect)(()=>{if(e)return a(o)},[e]);let s=(0,t.useCallback)(()=>e&&i&&i(o),[o,i,e]);return!r&&i?[!1,s]:[!0]}var fl=(0,t.createContext)({strict:!1}),pl={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`]},ml=!1;function hl(){if(ml)return;let e={};for(let t in pl)e[t]={isEnabled:e=>pl[t].some(t=>!!e[t])};Eo(e),ml=!0}function gl(){return hl(),Do()}function _l(e){let t=gl();for(let n in e)t[n]={...t[n],...e[n]};Eo(t)}var vl=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`.split(`.`));function yl(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||vl.has(e)}var bl=u({default:()=>xl}),xl,Sl=c((()=>{throw xl={},Error(`Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?`)})),Cl=e=>!yl(e);function wl(e){typeof e==`function`&&(Cl=t=>t.startsWith(`on`)?!yl(t):e(t))}try{wl((Sl(),p(bl)).default)}catch{}function Tl(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||X(e[i])||(Cl(i)||n===!0&&yl(i)||!t&&!yl(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}var El=(0,t.createContext)({});function Dl(e,t){if(_o(e)){let{initial:t,animate:n}=e;return{initial:t===!1||mo(t)?t:void 0,animate:mo(n)?n:void 0}}return e.inherit===!1?{}:t}function Ol(e){let{initial:n,animate:r}=Dl(e,(0,t.useContext)(El));return(0,t.useMemo)(()=>({initial:n,animate:r}),[kl(n),kl(r)])}function kl(e){return Array.isArray(e)?e.join(` `):e}var Al=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function jl(e,t,n){for(let r in t)!X(t[r])&&!ss(r,n)&&(e[r]=t[r])}function Ml({transformTemplate:e},n){return(0,t.useMemo)(()=>{let t=Al();return ts(t,n,e),Object.assign({},t.vars,t.style)},[n])}function Nl(e,t){let n=e.style||{},r={};return jl(r,n,e),Object.assign(r,Ml(e,t)),r}function Pl(e,t){let n={},r=Nl(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.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=r,n}var Fl=()=>({...Al(),attrs:{}});function Il(e,n,r,i){let a=(0,t.useMemo)(()=>{let t=Fl();return _s(t,n,ys(i),e.transformTemplate,e.style),{...t.attrs,style:{...t.style}}},[n]);if(e.style){let t={};jl(t,e.style,e),a.style={...t,...a.style}}return a}var Ll=[`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 Rl(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(Ll.indexOf(e)>-1||/[A-Z]/u.test(e))}function zl(e,n,r,{latestValues:i},a,o=!1,s){let c=(s??Rl(e)?Il:Pl)(n,i,a,e),l=Tl(n,typeof e==`string`,o),u=e===t.Fragment?{}:{...l,...c,ref:r},{children:d}=n,f=(0,t.useMemo)(()=>X(d)?d.get():d,[d]);return(0,t.createElement)(e,{...u,children:f})}function Bl({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:Vl(n,r,i,e),renderState:t()}}function Vl(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=Tc(a[e]);let{initial:o,animate:s}=e,c=_o(e),l=vo(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!po(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=Ni(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var Hl=e=>(n,r)=>{let i=(0,t.useContext)(El),a=(0,t.useContext)(Te),o=()=>Bl(e,n,i,a);return r?o():Ce(o)},Ul=Hl({scrapeMotionValuesFromProps:cs,createRenderState:Al}),Wl=Hl({scrapeMotionValuesFromProps:xs,createRenderState:Fl}),Gl=Symbol.for(`motionComponentSymbol`);function Kl(e,n,r){let i=(0,t.useRef)(r);(0,t.useInsertionEffect)(()=>{i.current=r});let a=(0,t.useRef)(null);return(0,t.useCallback)(t=>{t&&e.onMount?.(t);let r=i.current;if(typeof r==`function`)if(t){let e=r(t);typeof e==`function`&&(a.current=e)}else a.current?(a.current(),a.current=null):r(t);else r&&(r.current=t);n&&(t?n.mount(t):n.unmount())},[n])}var ql=(0,t.createContext)({});function Jl(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function Yl(e,n,r,i,a,o){let{visualElement:s}=(0,t.useContext)(El),c=(0,t.useContext)(fl),l=(0,t.useContext)(Te),u=(0,t.useContext)(ul),d=u.reducedMotion,f=u.skipAnimations,p=(0,t.useRef)(null),m=(0,t.useRef)(!1);i||=c.renderer,!p.current&&i&&(p.current=i(e,{visualState:n,parent:s,props:r,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:d,skipAnimations:f,isSVG:o}),m.current&&p.current&&(p.current.manuallyAnimateOnMount=!0));let h=p.current,g=(0,t.useContext)(ql);h&&!h.projection&&a&&(h.type===`html`||h.type===`svg`)&&Xl(p.current,r,a,g);let _=(0,t.useRef)(!1);(0,t.useInsertionEffect)(()=>{h&&_.current&&h.update(r,l)});let v=r[Ji],y=(0,t.useRef)(!!v&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return we(()=>{m.current=!0,h&&(_.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),h.scheduleRenderMicrotask(),y.current&&h.animationState&&h.animationState.animateChanges())}),(0,t.useEffect)(()=>{h&&(!y.current&&h.animationState&&h.animationState.animateChanges(),y.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),!1),h.enteringChildren=void 0)}),h}function Xl(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:Zl(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&Jl(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function Zl(e){if(e)return e.options.allowProjection===!1?Zl(e.parent):e.projection}function Ql(e,{forwardMotionProps:n=!1,type:r}={},i,a){i&&_l(i);let o=r?r===`svg`:Rl(e),s=o?Wl:Ul;function c(r,c){let l,u={...(0,t.useContext)(ul),...r,layoutId:$l(r)},{isStatic:d}=u,f=Ol(r),p=s(r,d);if(!d&&typeof window<`u`){eu(u,i);let t=tu(u);l=t.MeasureLayout,f.visualElement=Yl(e,p,u,a,t.ProjectionNode,o)}return(0,C.jsxs)(El.Provider,{value:f,children:[l&&f.visualElement?(0,C.jsx)(l,{visualElement:f.visualElement,...u}):null,zl(e,r,Kl(p,f.visualElement,c),p,d,n,o)]})}c.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let l=(0,t.forwardRef)(c);return l[Gl]=e,l}function $l({layoutId:e}){let n=(0,t.useContext)(Se).id;return n&&e!==void 0?n+`-`+e:e}function eu(e,n){let r=(0,t.useContext)(fl).strict;if(process.env.NODE_ENV!==`production`&&n&&r){let t="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Ae(!1,t,`lazy-strict-mode`):je(!1,t,`lazy-strict-mode`)}}function tu(e){let{drag:t,layout:n}=gl();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function nu(e,t){if(typeof Proxy>`u`)return Ql;let n=new Map,r=(n,r)=>Ql(n,r,e,t);return new Proxy((e,t)=>(process.env.NODE_ENV!==`production`&&We(!1,`motion() is deprecated. Use motion.create() instead.`),r(e,t)),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,Ql(a,void 0,e,t)),n.get(a))})}var ru=(e,n)=>n.isSVG??Rl(e)?new Ss(n):new us(n,{allowProjection:e!==t.Fragment}),iu=class extends Ao{constructor(e){super(e),e.animationState||=ks(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();po(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},au=0,ou={animation:{Feature:iu},exit:{Feature:class extends Ao{constructor(){super(...arguments),this.id=au++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&n===!1){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if(typeof e==`string`){let n=Pi(this.node,e,t);if(n){let{transition:e,transitionEnd:t,...r}=n;for(let e in r)this.node.getValue(e)?.jump(r[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive(`exit`,!1);this.isExitComplete=!1;return}let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function su(e){return{point:{x:e.pageX,y:e.pageY}}}var cu=e=>t=>Ma(t)&&e(t,su(t));function lu(e,t,n,r){return xc(e,t,cu(n),r)}var uu=({current:e})=>e?e.ownerDocument.defaultView:null,du=(e,t)=>Math.abs(e-t);function fu(e,t){let n=du(e.x,t.x),r=du(e.y,t.y);return Math.sqrt(n**2+r**2)}var pu=new Set([`auto`,`scroll`]),mu=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=hu(this.lastRawMoveEventInfo,this.transformPagePoint));let e=_u(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=fu(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=W;this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=hu(t,this.transformPagePoint),U.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=_u(e.type===`pointercancel`?this.lastMoveEventInfo:hu(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!Ma(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=hu(su(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=W;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,_u(s,this.history)),this.removeListeners=Re(lu(this.contextWindow,`pointermove`,this.handlePointerMove),lu(this.contextWindow,`pointerup`,this.handlePointerUp),lu(this.contextWindow,`pointercancel`,this.handlePointerUp)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(pu.has(e.overflowX)||pu.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.addEventListener(`scroll`,this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.removeEventListener(`scroll`,this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};i.x===0&&i.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),U.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),bt(this.updatePoint)}};function hu(e,t){return t?{point:t(e.point)}:e}function gu(e,t){return{x:e.x-t.x,y:e.y-t.y}}function _u({point:e},t){return{point:e,delta:gu(e,yu(t)),offset:gu(e,vu(t)),velocity:bu(t,.1)}}function vu(e){return e[0]}function yu(e){return e[e.length-1]}function bu(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=yu(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>H(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>H(t)*2&&(r=e[1]);let a=Ve(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function xu(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?J(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?J(n,e,r.max):Math.min(e,n)),e}function Su(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function Cu(e,{top:t,left:n,bottom:r,right:i}){return{x:Su(e.x,n,i),y:Su(e.y,t,r)}}function wu(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function Tu(e,t){return{x:wu(e.x,t.x),y:wu(e.y,t.y)}}function Eu(e,t){let n=.5,r=Q(e),i=Q(t);return i>r?n=ze(t.min,t.max-r,e.min):r>i&&(n=ze(e.min,e.max-i,t.min)),Oe(0,1,n)}function Du(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var Ou=.35;function ku(e=Ou){return e===!1?e=0:e===!0&&(e=Ou),{x:Au(e,`left`,`right`),y:Au(e,`top`,`bottom`)}}function Au(e,t,n){return{min:ju(e,t),max:ju(e,n)}}function ju(e,t){return typeof e==`number`?e:e[t]||0}var Mu=new WeakMap,Nu=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Z(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{t&&this.snapToCursor(su(e).point),this.stopAnimation()},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Da(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),lc(e=>{let t=this.getAxisMotionValue(e).get()||0;if(qt.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=Q(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&U.update(()=>i(e,t),!1,!0),Ki(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=Lu(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&U.update(()=>a(e,t),!1,!0)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new mu(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:uu(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&U.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!Iu(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=xu(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&Jl(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=Cu(n.layoutBox,e):this.constraints=!1,this.elastic=ku(t),r!==this.constraints&&!Jl(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&lc(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=Du(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Jl(e))return!1;let n=e.current;je(n!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.",`drag-constraints-ref`);let{projection:r}=this.visualElement;if(!r||!r.layout)return!1;let i=Zo(n,r.root,this.visualElement.getTransformPagePoint()),a=Tu(r.layout.layoutBox,i);if(t){let e=t(Mo(a));this.hasMutatedConstraints=!!e,e&&(a=jo(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=lc(o=>{if(!Iu(o,t,this.currentDirection))return;let c=s&&s[o]||{};(a===!0||a===o)&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return Ki(this.visualElement,e),n.start(ji(e,n,0,t,this.visualElement,!1))}stopAnimation(){lc(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){lc(t=>{let{drag:n}=this.getProps();if(!Iu(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t],o=i.get()||0;i.set(e[t]-J(n,a,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Jl(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};lc(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=Eu({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),lc(t=>{if(!Iu(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(J(i,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Mu.set(this.visualElement,this);let e=this.visualElement.current,t=lu(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&Ia(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();Jl(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=Fu(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),U.read(r);let o=xc(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(lc(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{o(),t(),a(),s&&s(),n&&n()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=Ou,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function Pu(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function Fu(e,t,n){let r=io(e,Pu(n)),i=io(t,Pu(n));return()=>{r(),i()}}function Iu(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Lu(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var Ru=class extends Ao{constructor(e){super(e),this.removeGroupControls=V,this.removeListeners=V,this.controls=new Nu(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||V}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},zu=e=>(t,n)=>{e&&U.update(()=>e(t,n),!1,!0)},Bu=class extends Ao{constructor(){super(...arguments),this.removePointerDownListener=V}onPointerDown(e){this.session=new mu(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:uu(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:zu(e),onStart:zu(t),onMove:zu(n),onEnd:(e,t)=>{delete this.session,r&&U.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=lu(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},Vu=!1,Hu=class extends t.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),Vu&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Dc.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),Vu=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||U.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),Ca.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Vu=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function Uu(e){let[n,r]=dl(),i=(0,t.useContext)(Se);return(0,C.jsx)(Hu,{...e,layoutGroup:i,switchLayoutGroup:(0,t.useContext)(ql),isPresent:n,safeToRemove:r})}var Wu={pan:{Feature:Bu},drag:{Feature:Ru,ProjectionNode:ll,MeasureLayout:Uu}};function Gu(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&U.postRender(()=>i(t,su(t)))}var Ku=class extends Ao{mount(){let{current:e}=this.node;e&&(this.unmount=Aa(e,(e,t)=>(Gu(this.node,t,`Start`),e=>Gu(this.node,e,`End`))))}unmount(){}},qu=class extends Ao{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=Re(xc(this.node.current,`focus`,()=>this.onFocus()),xc(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function Ju(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&U.postRender(()=>i(t,su(t)))}var Yu=class extends Ao{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=Ua(e,(e,t)=>(Ju(this.node,t,`Start`),(e,{success:t})=>Ju(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},Xu=new WeakMap,Zu=new WeakMap,Qu=e=>{let t=Xu.get(e.target);t&&t(e)},$u=e=>{e.forEach(Qu)};function ed({root:e,...t}){let n=e||document;Zu.has(n)||Zu.set(n,{});let r=Zu.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver($u,{root:e,...t})),r[i]}function td(e,t,n){let r=ed(t);return Xu.set(e,n),r.observe(e),()=>{Xu.delete(e),r.unobserve(e)}}var nd={some:0,all:1},rd=class extends Ao{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:nd[r]},o=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};this.stopObserver=td(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(id(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function id({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var ad={inView:{Feature:rd},tap:{Feature:Yu},focus:{Feature:qu},hover:{Feature:Ku}},od={layout:{ProjectionNode:ll,MeasureLayout:Uu}},sd=nu({...ou,...ad,...Wu,...od},ru);function cd(e){let n=Ce(()=>Bi(e)),{isStatic:r}=(0,t.useContext)(ul);if(r){let[,r]=(0,t.useState)(e);(0,t.useEffect)(()=>n.on(`change`,r),[])}return n}function ld(e){return typeof e==`object`&&!Array.isArray(e)}function ud(e,t,n,r){return e==null?[]:typeof e==`string`&&ld(t)?ba(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(e=>e!=null):[e]}function dd(e,t,n){return e*(t+1)}function fd(e,t,n,r){return typeof t==`number`?t:t.startsWith(`-`)||t.startsWith(`+`)?Math.max(0,e+parseFloat(t)):t===`<`?n:t.startsWith(`<`)?Math.max(0,n+parseFloat(t.slice(1))):r.get(t)??e}function pd(e,t,n){for(let r=0;r<e.length;r++){let i=e[r];i.at>t&&i.at<n&&(De(e,i),r--)}}function md(e,t,n,r,i,a){pd(e,i,a);for(let o=0;o<t.length;o++)e.push({value:t[o],at:J(i,a,r[o]),easing:ut(n,o)})}function hd(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function gd(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}var _d=`easeInOut`,vd=20;function yd(e,{defaultTransition:t={},...n}={},r,i){let a=t.duration||.3,o=new Map,s=new Map,c={},l=new Map,u=0,d=0,f=0;for(let n=0;n<e.length;n++){let o=e[n];if(typeof o==`string`){l.set(o,d);continue}else if(!Array.isArray(o)){l.set(o.name,fd(d,o.at,u,l));continue}let[p,m,h={}]=o;h.at!==void 0&&(d=fd(d,h.at,u,l));let g=0,_=(e,n,r,o=0,s=0)=>{let c=Sd(e),{delay:l=0,times:u=$n(c),type:p=t.type||`keyframes`,repeat:m,repeatType:h,repeatDelay:_=0,...v}=n,{ease:y=t.ease||`easeOut`,duration:b}=n,x=typeof l==`function`?l(o,s):l,S=c.length,C=Jr(p)?p:i?.[p||`keyframes`];if(S<=2&&C){let e=100;if(S===2&&Td(c)){let t=c[1]-c[0];e=Math.abs(t)}let n={...t,...v};b!==void 0&&(n.duration=H(b));let r=In(n,e,C);y=r.ease,b=r.duration}b??=a;let w=d+x;u.length===1&&u[0]===0&&(u[1]=1);let T=u.length-c.length;if(T>0&&Qn(u,T),c.length===1&&c.unshift(null),m){je(m<vd,`Repeat count too high, must be less than 20`,`repeat-count-high`),b=dd(b,m);let e=[...c],t=[...u];y=Array.isArray(y)?[...y]:[y];let n=[...y];for(let r=0;r<m;r++){c.push(...e);for(let i=0;i<e.length;i++)u.push(t[i]+(r+1)),y.push(i===0?`linear`:ut(n,i-1))}hd(u,m)}let E=w+b;md(r,c,y,u,w,E),g=Math.max(x+b,g),f=Math.max(E,f)};if(X(p)){let e=bd(p,s);_(m,h,xd(`default`,e))}else{let e=ud(p,m,r,c),t=e.length;for(let n=0;n<t;n++){m=m,h=h;let r=e[n],i=bd(r,s);for(let e in m)_(m[e],Cd(h,e),xd(e,i),n,t)}}u=d,d+=g}return s.forEach((e,r)=>{for(let i in e){let a=e[i];a.sort(gd);let s=[],c=[],l=[];for(let e=0;e<a.length;e++){let{at:t,value:n,easing:r}=a[e];s.push(n),c.push(ze(0,f,t)),l.push(r||`easeOut`)}c[0]!==0&&(c.unshift(0),s.unshift(s[0]),l.unshift(_d)),c[c.length-1]!==1&&(c.push(1),s.push(null)),o.has(r)||o.set(r,{keyframes:{},transition:{}});let u=o.get(r);u.keyframes[i]=s;let{type:d,...p}=t;u.transition[i]={...p,duration:f,ease:l,times:c,...n}}}),o}function bd(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function xd(e,t){return t[e]||(t[e]=[]),t[e]}function Sd(e){return Array.isArray(e)?e:[e]}function Cd(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}var wd=e=>typeof e==`number`,Td=e=>e.every(wd);function Ed(e){let t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Wa(e)&&!ao(e)?new Ss(t):new us(t);n.mount(e),fo.set(e,n)}function Dd(e){let t=new fs({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});t.mount(e),fo.set(e,t)}function Od(e,t){return X(e)||typeof e==`number`||typeof e==`string`&&!ld(t)}function kd(e,t,n,r){let i=[];if(Od(e,t))i.push(bc(e,ld(t)&&t.default||t,n&&(n.default||n)));else{if(e==null)return i;let a=ud(e,t,r),o=a.length;je(!!o,`No valid elements provided.`,`no-valid-elements`);for(let e=0;e<o;e++){let r=a[e],s=r instanceof Element?Ed:Dd;fo.has(r)||s(r);let c=fo.get(r),l={...n};`delay`in l&&typeof l.delay==`function`&&(l.delay=l.delay(e,o)),i.push(...Zi(c,{...t,transition:l},{}))}}return i}function Ad(e,t,n){let r=[];return yd(e.map(e=>{if(Array.isArray(e)&&typeof e[0]==`function`){let t=e[0],n=Bi(0);return n.on(`change`,t),e.length===1?[n,[0,1]]:e.length===2?[n,[0,1],e[1]]:[n,e[1],e[2]]}return e}),t,n,{spring:Kn}).forEach(({keyframes:e,transition:t},n)=>{r.push(...kd(n,e,t))}),r}function jd(e){return Array.isArray(e)&&e.some(Array.isArray)}function Md(e={}){let{scope:t,reduceMotion:n}=e;function r(e,r,i){let a=[],o;if(jd(e)){let{onComplete:i,...s}=r||{};typeof i==`function`&&(o=i),a=Ad(e,n===void 0?s:{reduceMotion:n,...s},t)}else{let{onComplete:s,...c}=i||{};typeof s==`function`&&(o=s),a=kd(e,r,n===void 0?c:{reduceMotion:n,...c},t)}let s=new gi(a);return o&&s.finished.then(o),t&&(t.animations.push(s),s.finished.then(()=>{De(t.animations,s)})),s}return r}var Nd=Md(),$=[];for(let e=0;e<256;++e)$.push((e+256).toString(16).slice(1));function Pd(e,t=0){return($[e[t+0]]+$[e[t+1]]+$[e[t+2]]+$[e[t+3]]+`-`+$[e[t+4]]+$[e[t+5]]+`-`+$[e[t+6]]+$[e[t+7]]+`-`+$[e[t+8]]+$[e[t+9]]+`-`+$[e[t+10]]+$[e[t+11]]+$[e[t+12]]+$[e[t+13]]+$[e[t+14]]+$[e[t+15]]).toLowerCase()}var Fd=new Uint8Array(16);function Id(){return crypto.getRandomValues(Fd)}function Ld(e,t,n){return!t&&!e&&crypto.randomUUID?crypto.randomUUID():Rd(e,t,n)}function Rd(e,t,n){e||={};let r=e.random??e.rng?.()??Id();if(r.length<16)throw Error(`Random bytes length must be >= 16`);if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(n||=0,n<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return Pd(r)}var zd={time:Date.now(),xy:[0,0],delta:[0,0],initial:[0,0],previous:[0,0],direction:[0,0],initialDirection:[0,0],local:[0,0],lastLocal:[0,0],velocity:0,distance:0},Bd={enableMouse:!0};function Vd(e={},n={}){let r=(0,t.useRef)(zd),{uid:i,enableMouse:a}={...Bd,...n},o=null,s=Ld(),c=(0,t.useRef)(i||s),l=(0,t.useRef)(!1),u=(0,t.useRef)(e);(0,t.useEffect)(()=>{u.current=e},[e]);function d(e){o&&=(o.onTerminationRequest(e),o.onTerminate(e),null),f(e)}function f(e){o||(o={id:c.current,onTerminate:j,onTerminationRequest:A},T(e))}function p(){window.addEventListener(`mousemove`,M,!1),window.addEventListener(`mousemove`,N,!0),window.addEventListener(`mouseup`,P)}function m(){window.removeEventListener(`mousemove`,M,!1),window.removeEventListener(`mousemove`,N,!0),window.removeEventListener(`mouseup`,P)}function h(e){E(e),l.current=!0,S(e)&&f(e)}function g(e){E(e),l.current=!0,p(),x(e)&&f(e)}function _(){return o?.id===c.current}function v(e){l.current=!1,m(),_()&&(o=null,k(e))}function y(e){D(e),!_()&&w(e)&&d(e)}function b(e){if(_()){O(e);return}C(e)&&d(e)}function x(e){return u.current.onStartShouldSet?u.current.onStartShouldSet(r.current,e):!1}function S(e){return u.current.onStartShouldSetCapture?u.current.onStartShouldSetCapture(r.current,e):!1}function C(e){return u.current.onMoveShouldSet?u.current.onMoveShouldSet(r.current,e):!1}function w(e){return u.current.onMoveShouldSetCapture?u.current.onMoveShouldSetCapture(r.current,e):!1}function T(e){u.current.onGrant&&u.current.onGrant(r.current,e)}function E(e){let{pageX:t,pageY:n}=e.touches?.[0]?e.touches[0]:e,i=r.current;r.current={...zd,lastLocal:i.lastLocal||zd.lastLocal,xy:[t,n],initial:[t,n],previous:[t,n],time:Date.now()}}function D(e){let{pageX:t,pageY:n}=e.touches?.[0]?e.touches[0]:e,i=r.current,a=Date.now(),o=t-i.xy[0],s=n-i.xy[1],c=t-i.initial[0],l=n-i.initial[1],u=Math.sqrt(c*c+l*l),d=Math.sqrt(o*o+s*s),f=1/(d||1),p=d/(a-i.time),m=i.initialDirection[0]!==0||i.initialDirection[1]!==0?i.initialDirection:[c*f,l*f];r.current={...r.current,time:a,xy:[t,n],initialDirection:m,delta:[c,l],local:[i.lastLocal[0]+t-i.initial[0],i.lastLocal[1]+n-i.initial[1]],velocity:a-i.time===0?i.velocity:p,distance:u,direction:[o*f,s*f],previous:i.xy}}function O(e){l.current&&u.current.onMove&&u.current.onMove(r.current,e)}function k(e){let t=r.current;r.current={...r.current,lastLocal:t.local},u.current.onRelease&&u.current.onRelease(r.current,e),o=null}function A(e){return u.current.onTerminationRequest?u.current.onTerminationRequest(r.current,e):!0}function j(e){let t=r.current;r.current={...r.current,lastLocal:t.local},u.current.onTerminate&&u.current.onTerminate(r.current,e)}function M(e){Jd()&&b(e)}function N(e){Jd()&&y(e)}function P(e){Jd()&&v(e)}(0,t.useEffect)(()=>m,[]);function F(){o&&=(o.onTerminate(),null)}function I(){return o}let L={onTouchStart:g,onTouchEnd:v,onTouchMove:b,onTouchStartCapture:h,onTouchMoveCapture:y},R=a?{onMouseDown:e=>{Jd()&&g(e)},onMouseDownCapture:e=>{Jd()&&h(e)}}:{};return{bind:{...L,...R},terminateCurrentResponder:F,getCurrentResponder:I}}var Hd=!!(typeof window<`u`&&document?.createElement(`div`)),Ud=!1,Wd=1e3,Gd=0;function Kd(){Ud||Date.now()-Gd<Wd||(Ud=!0)}function qd(){Gd=Date.now(),Ud&&=!1}Hd&&(document.addEventListener(`touchstart`,qd,!0),document.addEventListener(`touchmove`,qd,!0),document.addEventListener(`mousemove`,Kd,!0));function Jd(){return Ud}function Yd(e){let n=(0,g.c)(70),r,i,a,o;n[0]===e?(r=n[1],i=n[2],a=n[3],o=n[4]):({children:r,style:o,className:i,...a}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a,n[4]=o);let s=(0,t.useContext)(ve);if(!s)throw Error(`Unable to find GridItem context. Please ensure that GridItem is used as a child of GridDropZone`);let{top:c,disableDrag:l,endTraverse:u,onStart:d,mountWithTraverseTarget:f,left:p,onMove:m,onEnd:h,grid:_,dragging:v}=s,{columnWidth:y,rowHeight:b}=_,x=(0,t.useRef)(!1),S;n[5]!==p||n[6]!==c?(S=[p,c],n[5]=p,n[6]=c,n[7]=S):S=n[7];let w=(0,t.useRef)(S),T=cd(p),E=cd(c),D=cd(1),O=cd(1),k=cd(0),A;n[8]!==u||n[9]!==p||n[10]!==f||n[11]!==O||n[12]!==D||n[13]!==c||n[14]!==T||n[15]!==E||n[16]!==k?(A=()=>{if(f){let e=f;u(),T.set(e[0]),E.set(e[1]),D.set(1.1),O.set(.8),k.set(1)}else T.set(p),E.set(c),D.set(1),O.set(1),k.set(0)},n[8]=u,n[9]=p,n[10]=f,n[11]=O,n[12]=D,n[13]=c,n[14]=T,n[15]=E,n[16]=k,n[17]=A):A=n[17];let j;n[18]===Symbol.for(`react.memo_cache_sentinel`)?(j=[],n[18]=j):j=n[18],(0,t.useEffect)(A,j);let M;n[19]!==m||n[20]!==O||n[21]!==D||n[22]!==T||n[23]!==E||n[24]!==k?(M=function(e){let t=w.current[0]+e.delta[0],n=w.current[1]+e.delta[1];T.set(t),E.set(n),D.set(1.1),O.set(.8),k.set(1),m(e,t,n)},n[19]=m,n[20]=O,n[21]=D,n[22]=T,n[23]=E,n[24]=k,n[25]=M):M=n[25];let N=M,P;n[26]===h?P=n[27]:(P=function(e){let t=w.current[0]+e.delta[0],n=w.current[1]+e.delta[1];x.current=!1,h(e,t,n)},n[26]=h,n[27]=P);let F=P,I;n[28]!==l||n[29]!==p||n[30]!==d||n[31]!==c?(I=()=>l?!1:(d(),w.current=[p,c],x.current=!0,!0),n[28]=l,n[29]=p,n[30]=d,n[31]=c,n[32]=I):I=n[32];let L;n[33]===Symbol.for(`react.memo_cache_sentinel`)?(L=()=>!x.current,n[33]=L):L=n[33];let R;n[34]!==F||n[35]!==N||n[36]!==I?(R={onMoveShouldSet:I,onMove:N,onTerminationRequest:L,onTerminate:F,onRelease:F},n[34]=F,n[35]=N,n[36]=I,n[37]=R):R=n[37];let z;n[38]===Symbol.for(`react.memo_cache_sentinel`)?(z={enableMouse:!0},n[38]=z):z=n[38];let{bind:ee}=Vd(R,z),B;n[39]!==p||n[40]!==O||n[41]!==D||n[42]!==c||n[43]!==T||n[44]!==E||n[45]!==k?(B=()=>{x.current||(Nd(T,p,{duration:.25}),Nd(E,c,{duration:.25}),Nd(D,1,{duration:.25}),Nd(O,1,{duration:.25}),k.set(0))},n[39]=p,n[40]=O,n[41]=D,n[42]=c,n[43]=T,n[44]=E,n[45]=k,n[46]=B):B=n[46];let te;n[47]!==p||n[48]!==c?(te=[p,c],n[47]=p,n[48]=c,n[49]=te):te=n[49],(0,t.useEffect)(B,te);let ne=`GridItem`+(v?` dragging`:``)+(l?` disabled`:``)+(i?` ${i}`:``),re=l?`grab`:void 0,ie=`${y}px`,ae=`${b}px`,oe;n[50]!==O||n[51]!==D||n[52]!==o||n[53]!==re||n[54]!==ie||n[55]!==ae||n[56]!==T||n[57]!==E||n[58]!==k?(oe={cursor:re,position:`absolute`,width:ie,height:ae,boxSizing:`border-box`,zIndex:k,opacity:O,x:T,y:E,scale:D,...o},n[50]=O,n[51]=D,n[52]=o,n[53]=re,n[54]=ie,n[55]=ae,n[56]=T,n[57]=E,n[58]=k,n[59]=oe):oe=n[59];let se;n[60]!==ee||n[61]!==a||n[62]!==ne||n[63]!==oe?(se={className:ne,...ee,style:oe,...a},n[60]=ee,n[61]=a,n[62]=ne,n[63]=oe,n[64]=se):se=n[64];let ce=se,le;n[65]===r?le=n[66]:(le=typeof r==`function`?r():r,n[65]=r,n[66]=le);let ue;return n[67]!==ce||n[68]!==le?(ue=(0,C.jsx)(sd.div,{...ce,children:le}),n[67]=ce,n[68]=le,n[69]=ue):ue=n[69],ue}e.GridContext=T,e.GridContextProvider=E,e.GridDropZone=ye,e.GridItem=Yd,e.move=xe,e.swap=_e});
|