animated-charts
Version:
Animated chart web components for all frameworks (React, Angular, Vue, HTML)
11 lines • 186 kB
JavaScript
import{r as t,j as n}from"./p-CEKB1LyR.js";import"./animated-bar-chart.entry.esm.js";import"./animated-line-chart.entry.esm.js";import"./animated-donut-chart.entry.esm.js";import"./animated-area-chart.entry.esm.js";import"./p-58QfBuzl.js";var e={exports:{}};var s={};
/**
* @license React
* react.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var i;function o(){if(i)return s;i=1;var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),e=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),u=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),l=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),d=Symbol.iterator;function p(t){if(null===t||"object"!==typeof t)return null;t=d&&t[d]||t["@@iterator"];return"function"===typeof t?t:null}var m={isMounted:function(){return false},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y=Object.assign,g={};function w(t,n,e){this.props=t;this.context=n;this.refs=g;this.updater=e||m}w.prototype.isReactComponent={};w.prototype.setState=function(t,n){if("object"!==typeof t&&"function"!==typeof t&&null!=t)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,n,"setState")};w.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function v(){}v.prototype=w.prototype;function b(t,n,e){this.props=t;this.context=n;this.refs=g;this.updater=e||m}var x=b.prototype=new v;x.constructor=b;y(x,w.prototype);x.isPureReactComponent=true;var S=Array.isArray,M={H:null,A:null,T:null,S:null,V:null},k=Object.prototype.hasOwnProperty;function T(n,e,s,i,o,r){s=r.ref;return{$$typeof:t,type:n,key:e,ref:void 0!==s?s:null,props:r}}function P(t,n){return T(t.type,n,void 0,void 0,void 0,t.props)}function $(n){return"object"===typeof n&&null!==n&&n.$$typeof===t}function A(t){var n={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,(function(t){return n[t]}))}var j=/\/+/g;function R(t,n){return"object"===typeof t&&null!==t&&null!=t.key?A(""+t.key):n.toString(36)}function C(){}function E(t){switch(t.status){case"fulfilled":return t.value;case"rejected":throw t.reason;default:switch("string"===typeof t.status?t.then(C,C):(t.status="pending",t.then((function(n){"pending"===t.status&&(t.status="fulfilled",t.value=n)}),(function(n){"pending"===t.status&&(t.status="rejected",t.reason=n)}))),t.status){case"fulfilled":return t.value;case"rejected":throw t.reason}}throw t}function O(e,s,i,o,r){var c=typeof e;if("undefined"===c||"boolean"===c)e=null;var u=false;if(null===e)u=true;else switch(c){case"bigint":case"string":case"number":u=true;break;case"object":switch(e.$$typeof){case t:case n:u=true;break;case h:return u=e._init,O(u(e._payload),s,i,o,r)}}if(u)return r=r(e),u=""===o?"."+R(e,0):o,S(r)?(i="",null!=u&&(i=u.replace(j,"$&/")+"/"),O(r,s,i,"",(function(t){return t}))):null!=r&&($(r)&&(r=P(r,i+(null==r.key||e&&e.key===r.key?"":(""+r.key).replace(j,"$&/")+"/")+u)),s.push(r)),1;u=0;var a=""===o?".":o+":";if(S(e))for(var f=0;f<e.length;f++)o=e[f],c=a+R(o,f),u+=O(o,s,i,c,r);else if(f=p(e),"function"===typeof f)for(e=f.call(e),f=0;!(o=e.next()).done;)o=o.value,c=a+R(o,f++),u+=O(o,s,i,c,r);else if("object"===c){if("function"===typeof e.then)return O(E(e),s,i,o,r);s=String(e);throw Error("Objects are not valid as a React child (found: "+("[object Object]"===s?"object with keys {"+Object.keys(e).join(", ")+"}":s)+"). If you meant to render a collection of children, use an array instead.")}return u}function B(t,n,e){if(null==t)return t;var s=[],i=0;O(t,s,"","",(function(t){return n.call(e,t,i++)}));return s}function L(t){if(-1===t._status){var n=t._result;n=n();n.then((function(n){if(0===t._status||-1===t._status)t._status=1,t._result=n}),(function(n){if(0===t._status||-1===t._status)t._status=2,t._result=n}));-1===t._status&&(t._status=0,t._result=n)}if(1===t._status)return t._result.default;throw t._result}var F="function"===typeof reportError?reportError:function(t){if("object"===typeof window&&"function"===typeof window.ErrorEvent){var n=new window.ErrorEvent("error",{bubbles:true,cancelable:true,message:"object"===typeof t&&null!==t&&"string"===typeof t.message?String(t.message):String(t),error:t});if(!window.dispatchEvent(n))return}else if("object"===typeof process&&"function"===typeof process.emit){process.emit("uncaughtException",t);return}console.error(t)};function I(){}s.Children={map:B,forEach:function(t,n,e){B(t,(function(){n.apply(this,arguments)}),e)},count:function(t){var n=0;B(t,(function(){n++}));return n},toArray:function(t){return B(t,(function(t){return t}))||[]},only:function(t){if(!$(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};s.Component=w;s.Fragment=e;s.Profiler=r;s.PureComponent=b;s.StrictMode=o;s.Suspense=f;s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M;s.__COMPILER_RUNTIME={__proto__:null,c:function(t){return M.H.useMemoCache(t)}};s.cache=function(t){return function(){return t.apply(null,arguments)}};s.cloneElement=function(t,n,e){if(null===t||void 0===t)throw Error("The argument must be a React element, but you passed "+t+".");var s=y({},t.props),i=t.key,o=void 0;if(null!=n)for(r in void 0!==n.ref&&(o=void 0),void 0!==n.key&&(i=""+n.key),n)!k.call(n,r)||"key"===r||"__self"===r||"__source"===r||"ref"===r&&void 0===n.ref||(s[r]=n[r]);var r=arguments.length-2;if(1===r)s.children=e;else if(1<r){for(var c=Array(r),u=0;u<r;u++)c[u]=arguments[u+2];s.children=c}return T(t.type,i,void 0,void 0,o,s)};s.createContext=function(t){t={$$typeof:u,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null};t.Provider=t;t.Consumer={$$typeof:c,_context:t};return t};s.createElement=function(t,n,e){var s,i={},o=null;if(null!=n)for(s in void 0!==n.key&&(o=""+n.key),n)k.call(n,s)&&"key"!==s&&"__self"!==s&&"__source"!==s&&(i[s]=n[s]);var r=arguments.length-2;if(1===r)i.children=e;else if(1<r){for(var c=Array(r),u=0;u<r;u++)c[u]=arguments[u+2];i.children=c}if(t&&t.defaultProps)for(s in r=t.defaultProps,r)void 0===i[s]&&(i[s]=r[s]);return T(t,o,void 0,void 0,null,i)};s.createRef=function(){return{current:null}};s.forwardRef=function(t){return{$$typeof:a,render:t}};s.isValidElement=$;s.lazy=function(t){return{$$typeof:h,_payload:{_status:-1,_result:t},_init:L}};s.memo=function(t,n){return{$$typeof:l,type:t,compare:void 0===n?null:n}};s.startTransition=function(t){var n=M.T,e={};M.T=e;try{var s=t(),i=M.S;null!==i&&i(e,s);"object"===typeof s&&null!==s&&"function"===typeof s.then&&s.then(I,F)}catch(t){F(t)}finally{M.T=n}};s.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()};s.use=function(t){return M.H.use(t)};s.useActionState=function(t,n,e){return M.H.useActionState(t,n,e)};s.useCallback=function(t,n){return M.H.useCallback(t,n)};s.useContext=function(t){return M.H.useContext(t)};s.useDebugValue=function(){};s.useDeferredValue=function(t,n){return M.H.useDeferredValue(t,n)};s.useEffect=function(t,n,e){var s=M.H;if("function"===typeof e)throw Error("useEffect CRUD overload is not enabled in this build of React.");return s.useEffect(t,n)};s.useId=function(){return M.H.useId()};s.useImperativeHandle=function(t,n,e){return M.H.useImperativeHandle(t,n,e)};s.useInsertionEffect=function(t,n){return M.H.useInsertionEffect(t,n)};s.useLayoutEffect=function(t,n){return M.H.useLayoutEffect(t,n)};s.useMemo=function(t,n){return M.H.useMemo(t,n)};s.useOptimistic=function(t,n){return M.H.useOptimistic(t,n)};s.useReducer=function(t,n,e){return M.H.useReducer(t,n,e)};s.useRef=function(t){return M.H.useRef(t)};s.useState=function(t){return M.H.useState(t)};s.useSyncExternalStore=function(t,n,e){return M.H.useSyncExternalStore(t,n,e)};s.useTransition=function(){return M.H.useTransition()};s.version="19.1.0";return s}var r;function c(){if(r)return e.exports;r=1;{e.exports=o()}return e.exports}var u={};var a={};var f={};var l={};var h;function d(){if(h)return l;h=1;(function(t){Object.defineProperty(t,"__esModule",{value:true});function n(t,n){if(t.indexOf(n)===-1)t.push(n)}function e(t,n){const e=t.indexOf(n);if(e>-1)t.splice(e,1)}function s([...t],n,e){const s=n<0?t.length+n:n;if(s>=0&&s<t.length){const s=e<0?t.length+e:e;const[i]=t.splice(n,1);t.splice(s,0,i)}return t}const i=(t,n,e)=>{if(e>n)return n;if(e<t)return t;return e};function o(t,n){return n?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${n}`:t}t.warning=()=>{};t.invariant=()=>{};const r={};const c=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function u(t){return typeof t==="object"&&t!==null}const a=t=>/^0[^.\s]+$/u.test(t);function f(t){let n;return()=>{if(n===undefined)n=t();return n}}const l=t=>t;const h=(t,n)=>e=>n(t(e));const d=(...t)=>t.reduce(h);const p=(t,n,e)=>{const s=n-t;return s===0?1:(e-t)/s};class m{constructor(){this.subscriptions=[]}add(t){n(this.subscriptions,t);return()=>e(this.subscriptions,t)}notify(t,n,e){const s=this.subscriptions.length;if(!s)return;if(s===1){this.subscriptions[0](t,n,e)}else{for(let i=0;i<s;i++){const s=this.subscriptions[i];s&&s(t,n,e)}}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const y=t=>t*1e3;const g=t=>t/1e3;function w(t,n){return n?t*(1e3/n):0}const v=new Set;function b(t){return v.has(t)}function x(t,n,e){if(t||v.has(n))return;console.warn(o(n,e));v.add(n)}const S=(t,n,e)=>{const s=n-t;return((e-t)%s+s)%s+t};const M=(t,n,e)=>(((1-3*e+3*n)*t+(3*e-6*n))*t+3*n)*t;const k=1e-7;const T=12;function P(t,n,e,s,i){let o;let r;let c=0;do{r=n+(e-n)/2;o=M(r,s,i)-t;if(o>0){e=r}else{n=r}}while(Math.abs(o)>k&&++c<T);return r}function $(t,n,e,s){if(t===n&&e===s)return l;const i=n=>P(n,0,1,t,e);return t=>t===0||t===1?t:M(i(t),n,s)}const A=t=>n=>n<=.5?t(2*n)/2:(2-t(2*(1-n)))/2;const j=t=>n=>1-t(1-n);const R=$(.33,1.53,.69,.99);const C=j(R);const E=A(C);const O=t=>(t*=2)<1?.5*C(t):.5*(2-Math.pow(2,-10*(t-1)));const B=t=>1-Math.sin(Math.acos(t));const L=j(B);const F=A(B);const I=$(.42,0,1,1);const D=$(0,0,.58,1);const V=$(.42,0,.58,1);function N(t,n="end"){return e=>{e=n==="end"?Math.min(e,.999):Math.max(e,.001);const s=e*t;const o=n==="end"?Math.floor(s):Math.ceil(s);return i(0,1,o/t)}}const U=t=>Array.isArray(t)&&typeof t[0]!=="number";function X(t,n){return U(t)?t[S(0,t.length,n)]:t}const W=t=>Array.isArray(t)&&typeof t[0]==="number";const Y={linear:l,easeIn:I,easeInOut:V,easeOut:D,circIn:B,circInOut:F,circOut:L,backIn:C,backInOut:E,backOut:R,anticipate:O};const z=t=>typeof t==="string";const _=n=>{if(W(n)){t.invariant(n.length===4,`Cubic bezier arrays must contain four numerical values.`,"cubic-bezier-length");const[e,s,i,o]=n;return $(e,s,i,o)}else if(z(n)){t.invariant(Y[n]!==undefined,`Invalid easing type '${n}'`,"invalid-easing-type");return Y[n]}return n};t.MotionGlobalConfig=r;t.SubscriptionManager=m;t.addUniqueItem=n;t.anticipate=O;t.backIn=C;t.backInOut=E;t.backOut=R;t.circIn=B;t.circInOut=F;t.circOut=L;t.clamp=i;t.cubicBezier=$;t.easeIn=I;t.easeInOut=V;t.easeOut=D;t.easingDefinitionToFunction=_;t.getEasingForSegment=X;t.hasWarned=b;t.isBezierDefinition=W;t.isEasingArray=U;t.isNumericalString=c;t.isObject=u;t.isZeroValueString=a;t.memo=f;t.millisecondsToSeconds=g;t.mirrorEasing=A;t.moveItem=s;t.noop=l;t.pipe=d;t.progress=p;t.removeItem=e;t.reverseEasing=j;t.secondsToMilliseconds=y;t.steps=N;t.velocityPerSecond=w;t.warnOnce=x;t.wrap=S})(l);return l}var p;function m(){if(p)return f;p=1;Object.defineProperty(f,"__esModule",{value:true});var t=d();const n=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];const e={value:null,addProjectionMetrics:null};function s(t,n){let s=new Set;let i=new Set;let o=false;let r=false;const c=new WeakSet;let u={delta:0,timestamp:0,isProcessing:false};let a=0;function f(n){if(c.has(n)){l.schedule(n);t()}a++;n(u)}const l={schedule:(t,n=false,e=false)=>{const r=e&&o;const u=r?s:i;if(n)c.add(t);if(!u.has(t))u.add(t);return t},cancel:t=>{i.delete(t);c.delete(t)},process:t=>{u=t;if(o){r=true;return}o=true;[s,i]=[i,s];s.forEach(f);if(n&&e.value){e.value.frameloop[n].push(a)}a=0;s.clear();o=false;if(r){r=false;l.process(t)}}};return l}const i=40;function o(e,o){let r=false;let c=true;const u={delta:0,timestamp:0,isProcessing:false};const a=()=>r=true;const f=n.reduce(((t,n)=>{t[n]=s(a,o?n:undefined);return t}),{});const{setup:l,read:h,resolveKeyframes:d,preUpdate:p,update:m,preRender:y,render:g,postRender:w}=f;const v=()=>{const n=t.MotionGlobalConfig.useManualTiming?u.timestamp:performance.now();r=false;if(!t.MotionGlobalConfig.useManualTiming){u.delta=c?1e3/60:Math.max(Math.min(n-u.timestamp,i),1)}u.timestamp=n;u.isProcessing=true;l.process(u);h.process(u);d.process(u);p.process(u);m.process(u);y.process(u);g.process(u);w.process(u);u.isProcessing=false;if(r&&o){c=false;e(v)}};const b=()=>{r=true;c=true;if(!u.isProcessing){e(v)}};const x=n.reduce(((t,n)=>{const e=f[n];t[n]=(t,n=false,s=false)=>{if(!r)b();return e.schedule(t,n,s)};return t}),{});const S=t=>{for(let e=0;e<n.length;e++){f[n[e]].cancel(t)}};return{schedule:x,cancel:S,state:u,steps:f}}const{schedule:r,cancel:c,state:u,steps:a}=o(typeof requestAnimationFrame!=="undefined"?requestAnimationFrame:t.noop,true);let l;function h(){l=undefined}const m={now:()=>{if(l===undefined){m.set(u.isProcessing||t.MotionGlobalConfig.useManualTiming?u.timestamp:performance.now())}return l},set:t=>{l=t;queueMicrotask(h)}};const y={layout:0,mainThread:0,waapi:0};const g=t=>n=>typeof n==="string"&&n.startsWith(t);const w=g("--");const v=g("var(--");const b=t=>{const n=v(t);if(!n)return false;return x.test(t.split("/*")[0].trim())};const x=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;const S={test:t=>typeof t==="number",parse:parseFloat,transform:t=>t};const M={...S,transform:n=>t.clamp(0,1,n)};const k={...S,default:1};const T=t=>Math.round(t*1e5)/1e5;const P=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function $(t){return t==null}const A=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;const j=(t,n)=>e=>Boolean(typeof e==="string"&&A.test(e)&&e.startsWith(t)||n&&!$(e)&&Object.prototype.hasOwnProperty.call(e,n));const R=(t,n,e)=>s=>{if(typeof s!=="string")return s;const[i,o,r,c]=s.match(P);return{[t]:parseFloat(i),[n]:parseFloat(o),[e]:parseFloat(r),alpha:c!==undefined?parseFloat(c):1}};const C=n=>t.clamp(0,255,n);const E={...S,transform:t=>Math.round(C(t))};const O={test:j("rgb","red"),parse:R("red","green","blue"),transform:({red:t,green:n,blue:e,alpha:s=1})=>"rgba("+E.transform(t)+", "+E.transform(n)+", "+E.transform(e)+", "+T(M.transform(s))+")"};function B(t){let n="";let e="";let s="";let i="";if(t.length>5){n=t.substring(1,3);e=t.substring(3,5);s=t.substring(5,7);i=t.substring(7,9)}else{n=t.substring(1,2);e=t.substring(2,3);s=t.substring(3,4);i=t.substring(4,5);n+=n;e+=e;s+=s;i+=i}return{red:parseInt(n,16),green:parseInt(e,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const L={test:j("#"),parse:B,transform:O.transform};const F=t=>({test:n=>typeof n==="string"&&n.endsWith(t)&&n.split(" ").length===1,parse:parseFloat,transform:n=>`${n}${t}`});const I=F("deg");const D=F("%");const V=F("px");const N=F("vh");const U=F("vw");const X=(()=>({...D,parse:t=>D.parse(t)/100,transform:t=>D.transform(t*100)}))();const W={test:j("hsl","hue"),parse:R("hue","saturation","lightness"),transform:({hue:t,saturation:n,lightness:e,alpha:s=1})=>"hsla("+Math.round(t)+", "+D.transform(T(n))+", "+D.transform(T(e))+", "+T(M.transform(s))+")"};const Y={test:t=>O.test(t)||L.test(t)||W.test(t),parse:t=>{if(O.test(t)){return O.parse(t)}else if(W.test(t)){return W.parse(t)}else{return L.parse(t)}},transform:t=>typeof t==="string"?t:t.hasOwnProperty("red")?O.transform(t):W.transform(t),getAnimatableNone:t=>{const n=Y.parse(t);n.alpha=0;return Y.transform(n)}};const z=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function _(t){return isNaN(t)&&typeof t==="string"&&(t.match(P)?.length||0)+(t.match(z)?.length||0)>0}const K="number";const H="color";const Z="var";const G="var(";const q="${}";const J=/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 Q(t){const n=t.toString();const e=[];const s={color:[],number:[],var:[]};const i=[];let o=0;const r=n.replace(J,(t=>{if(Y.test(t)){s.color.push(o);i.push(H);e.push(Y.parse(t))}else if(t.startsWith(G)){s.var.push(o);i.push(Z);e.push(t)}else{s.number.push(o);i.push(K);e.push(parseFloat(t))}++o;return q}));const c=r.split(q);return{values:e,split:c,indexes:s,types:i}}function tt(t){return Q(t).values}function nt(t){const{split:n,types:e}=Q(t);const s=n.length;return t=>{let i="";for(let o=0;o<s;o++){i+=n[o];if(t[o]!==undefined){const n=e[o];if(n===K){i+=T(t[o])}else if(n===H){i+=Y.transform(t[o])}else{i+=t[o]}}}return i}}const et=t=>typeof t==="number"?0:Y.test(t)?Y.getAnimatableNone(t):t;function st(t){const n=tt(t);const e=nt(t);return e(n.map(et))}const it={test:_,parse:tt,createTransformer:nt,getAnimatableNone:st};function ot(t,n,e){if(e<0)e+=1;if(e>1)e-=1;if(e<1/6)return t+(n-t)*6*e;if(e<1/2)return n;if(e<2/3)return t+(n-t)*(2/3-e)*6;return t}function rt({hue:t,saturation:n,lightness:e,alpha:s}){t/=360;n/=100;e/=100;let i=0;let o=0;let r=0;if(!n){i=o=r=e}else{const s=e<.5?e*(1+n):e+n-e*n;const c=2*e-s;i=ot(c,s,t+1/3);o=ot(c,s,t);r=ot(c,s,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}function ct(t,n){return e=>e>0?n:t}const ut=(t,n,e)=>t+(n-t)*e;const at=(t,n,e)=>{const s=t*t;const i=e*(n*n-s)+s;return i<0?0:Math.sqrt(i)};const ft=[L,O,W];const lt=t=>ft.find((n=>n.test(t)));function ht(n){const e=lt(n);t.warning(Boolean(e),`'${n}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable");if(!Boolean(e))return false;let s=e.parse(n);if(e===W){s=rt(s)}return s}const dt=(t,n)=>{const e=ht(t);const s=ht(n);if(!e||!s){return ct(t,n)}const i={...e};return t=>{i.red=at(e.red,s.red,t);i.green=at(e.green,s.green,t);i.blue=at(e.blue,s.blue,t);i.alpha=ut(e.alpha,s.alpha,t);return O.transform(i)}};const pt=new Set(["none","hidden"]);function mt(t,n){if(pt.has(t)){return e=>e<=0?t:n}else{return e=>e>=1?n:t}}function yt(t,n){return e=>ut(t,n,e)}function gt(t){if(typeof t==="number"){return yt}else if(typeof t==="string"){return b(t)?ct:Y.test(t)?dt:xt}else if(Array.isArray(t)){return wt}else if(typeof t==="object"){return Y.test(t)?dt:vt}return ct}function wt(t,n){const e=[...t];const s=e.length;const i=t.map(((t,e)=>gt(t)(t,n[e])));return t=>{for(let n=0;n<s;n++){e[n]=i[n](t)}return e}}function vt(t,n){const e={...t,...n};const s={};for(const i in e){if(t[i]!==undefined&&n[i]!==undefined){s[i]=gt(t[i])(t[i],n[i])}}return t=>{for(const n in s){e[n]=s[n](t)}return e}}function bt(t,n){const e=[];const s={color:0,var:0,number:0};for(let i=0;i<n.values.length;i++){const o=n.types[i];const r=t.indexes[o][s[o]];const c=t.values[r]??0;e[i]=c;s[o]++}return e}const xt=(n,e)=>{const s=it.createTransformer(e);const i=Q(n);const o=Q(e);const r=i.indexes.var.length===o.indexes.var.length&&i.indexes.color.length===o.indexes.color.length&&i.indexes.number.length>=o.indexes.number.length;if(r){if(pt.has(n)&&!o.values.length||pt.has(e)&&!i.values.length){return mt(n,e)}return t.pipe(wt(bt(i,o),o.values),s)}else{t.warning(true,`Complex values '${n}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different");return ct(n,e)}};function St(t,n,e){if(typeof t==="number"&&typeof n==="number"&&typeof e==="number"){return ut(t,n,e)}const s=gt(t);return s(t,n)}const Mt=t=>{const n=({timestamp:n})=>t(n);return{start:(t=true)=>r.update(n,t),stop:()=>c(n),now:()=>u.isProcessing?u.timestamp:m.now()}};const kt=(t,n,e=10)=>{let s="";const i=Math.max(Math.round(n/e),2);for(let n=0;n<i;n++){s+=Math.round(t(n/(i-1))*1e4)/1e4+", "}return`linear(${s.substring(0,s.length-2)})`};const Tt=2e4;function Pt(t){let n=0;const e=50;let s=t.next(n);while(!s.done&&n<Tt){n+=e;s=t.next(n)}return n>=Tt?Infinity:n}function $t(n,e=100,s){const i=s({...n,keyframes:[0,e]});const o=Math.min(Pt(i),Tt);return{type:"keyframes",ease:t=>i.next(o*t).value/e,duration:t.millisecondsToSeconds(o)}}const At=5;function jt(n,e,s){const i=Math.max(e-At,0);return t.velocityPerSecond(s-n(i),e-i)}const Rt={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};const Ct=.001;function Et({duration:n=Rt.duration,bounce:e=Rt.bounce,velocity:s=Rt.velocity,mass:i=Rt.mass}){let o;let r;t.warning(n<=t.secondsToMilliseconds(Rt.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let c=1-e;c=t.clamp(Rt.minDamping,Rt.maxDamping,c);n=t.clamp(Rt.minDuration,Rt.maxDuration,t.millisecondsToSeconds(n));if(c<1){o=t=>{const e=t*c;const i=e*n;const o=e-s;const r=Lt(t,c);const u=Math.exp(-i);return Ct-o/r*u};r=t=>{const e=t*c;const i=e*n;const r=i*s+s;const u=Math.pow(c,2)*Math.pow(t,2)*n;const a=Math.exp(-i);const f=Lt(Math.pow(t,2),c);const l=-o(t)+Ct>0?-1:1;return l*((r-u)*a)/f}}else{o=t=>{const e=Math.exp(-t*n);const i=(t-s)*n+1;return-.001+e*i};r=t=>{const e=Math.exp(-t*n);const i=(s-t)*(n*n);return e*i}}const u=5/n;const a=Bt(o,r,u);n=t.secondsToMilliseconds(n);if(isNaN(a)){return{stiffness:Rt.stiffness,damping:Rt.damping,duration:n}}else{const t=Math.pow(a,2)*i;return{stiffness:t,damping:c*2*Math.sqrt(i*t),duration:n}}}const Ot=12;function Bt(t,n,e){let s=e;for(let e=1;e<Ot;e++){s=s-t(s)/n(s)}return s}function Lt(t,n){return t*Math.sqrt(1-n*n)}const Ft=["duration","bounce"];const It=["stiffness","damping","mass"];function Dt(t,n){return n.some((n=>t[n]!==undefined))}function Vt(n){let e={velocity:Rt.velocity,stiffness:Rt.stiffness,damping:Rt.damping,mass:Rt.mass,isResolvedFromDuration:false,...n};if(!Dt(n,It)&&Dt(n,Ft)){if(n.visualDuration){const s=n.visualDuration;const i=2*Math.PI/(s*1.2);const o=i*i;const r=2*t.clamp(.05,1,1-(n.bounce||0))*Math.sqrt(o);e={...e,mass:Rt.mass,stiffness:o,damping:r}}else{const t=Et(n);e={...e,...t,mass:Rt.mass};e.isResolvedFromDuration=true}}return e}function Nt(n=Rt.visualDuration,e=Rt.bounce){const s=typeof n!=="object"?{visualDuration:n,keyframes:[0,1],bounce:e}:n;let{restSpeed:i,restDelta:o}=s;const r=s.keyframes[0];const c=s.keyframes[s.keyframes.length-1];const u={done:false,value:r};const{stiffness:a,damping:f,mass:l,duration:h,velocity:d,isResolvedFromDuration:p}=Vt({...s,velocity:-t.millisecondsToSeconds(s.velocity||0)});const m=d||0;const y=f/(2*Math.sqrt(a*l));const g=c-r;const w=t.millisecondsToSeconds(Math.sqrt(a/l));const v=Math.abs(g)<5;i||(i=v?Rt.restSpeed.granular:Rt.restSpeed.default);o||(o=v?Rt.restDelta.granular:Rt.restDelta.default);let b;if(y<1){const t=Lt(w,y);b=n=>{const e=Math.exp(-y*w*n);return c-e*((m+y*w*g)/t*Math.sin(t*n)+g*Math.cos(t*n))}}else if(y===1){b=t=>c-Math.exp(-w*t)*(g+(m+w*g)*t)}else{const t=w*Math.sqrt(y*y-1);b=n=>{const e=Math.exp(-y*w*n);const s=Math.min(t*n,300);return c-e*((m+y*w*g)*Math.sinh(s)+t*g*Math.cosh(s))/t}}const x={calculatedDuration:p?h||null:null,next:n=>{const e=b(n);if(!p){let s=n===0?m:0;if(y<1){s=n===0?t.secondsToMilliseconds(m):jt(b,n,e)}const r=Math.abs(s)<=i;const a=Math.abs(c-e)<=o;u.done=r&&a}else{u.done=n>=h}u.value=u.done?c:e;return u},toString:()=>{const t=Math.min(Pt(x),Tt);const n=kt((n=>x.next(t*n).value),t,30);return t+"ms "+n},toTransition:()=>{}};return x}Nt.applyToOptions=n=>{const e=$t(n,100,Nt);n.ease=e.ease;n.duration=t.secondsToMilliseconds(e.duration);n.type="keyframes";return n};function Ut({keyframes:t,velocity:n=0,power:e=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:c,max:u,restDelta:a=.5,restSpeed:f}){const l=t[0];const h={done:false,value:l};const d=t=>c!==undefined&&t<c||u!==undefined&&t>u;const p=t=>{if(c===undefined)return u;if(u===undefined)return c;return Math.abs(c-t)<Math.abs(u-t)?c:u};let m=e*n;const y=l+m;const g=r===undefined?y:r(y);if(g!==y)m=g-l;const w=t=>-m*Math.exp(-t/s);const v=t=>g+w(t);const b=t=>{const n=w(t);const e=v(t);h.done=Math.abs(n)<=a;h.value=h.done?g:e};let x;let S;const M=t=>{if(!d(h.value))return;x=t;S=Nt({keyframes:[h.value,p(h.value)],velocity:jt(v,t,h.value),damping:i,stiffness:o,restDelta:a,restSpeed:f})};M(0);return{calculatedDuration:null,next:t=>{let n=false;if(!S&&x===undefined){n=true;b(t);M(t)}if(x!==undefined&&t>=x){return S.next(t-x)}else{!n&&b(t);return h}}}}function Xt(n,e,s){const i=[];const o=s||t.MotionGlobalConfig.mix||St;const r=n.length-1;for(let s=0;s<r;s++){let r=o(n[s],n[s+1]);if(e){const n=Array.isArray(e)?e[s]||t.noop:e;r=t.pipe(n,r)}i.push(r)}return i}function Wt(n,e,{clamp:s=true,ease:i,mixer:o}={}){const r=n.length;t.invariant(r===e.length,"Both input and output ranges must be the same length","range-length");if(r===1)return()=>e[0];if(r===2&&e[0]===e[1])return()=>e[1];const c=n[0]===n[1];if(n[0]>n[r-1]){n=[...n].reverse();e=[...e].reverse()}const u=Xt(e,i,o);const a=u.length;const f=s=>{if(c&&s<n[0])return e[0];let i=0;if(a>1){for(;i<n.length-2;i++){if(s<n[i+1])break}}const o=t.progress(n[i],n[i+1],s);return u[i](o)};return s?e=>f(t.clamp(n[0],n[r-1],e)):f}function Yt(n,e){const s=n[n.length-1];for(let i=1;i<=e;i++){const o=t.progress(0,e,i);n.push(ut(s,1,o))}}function zt(t){const n=[0];Yt(n,t.length-1);return n}function _t(t,n){return t.map((t=>t*n))}function Kt(n,e){return n.map((()=>e||t.easeInOut)).splice(0,n.length-1)}function Ht({duration:n=300,keyframes:e,times:s,ease:i="easeInOut"}){const o=t.isEasingArray(i)?i.map(t.easingDefinitionToFunction):t.easingDefinitionToFunction(i);const r={done:false,value:e[0]};const c=_t(s&&s.length===e.length?s:zt(e),n);const u=Wt(c,e,{ease:Array.isArray(o)?o:Kt(e,o)});return{calculatedDuration:n,next:t=>{r.value=u(t);r.done=t>=n;return r}}}const Zt=t=>t!==null;function Gt(t,{repeat:n,repeatType:e="loop"},s,i=1){const o=t.filter(Zt);const r=i<0||n&&e!=="loop"&&n%2===1;const c=r?0:o.length-1;return!c||s===undefined?o[c]:s}const qt={decay:Ut,inertia:Ut,tween:Ht,keyframes:Ht,spring:Nt};function Jt(t){if(typeof t.type==="string"){t.type=qt[t.type]}}class Qt{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise((t=>{this.resolve=t}))}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const tn=t=>t/100;class nn extends Qt{constructor(t){super();this.state="idle";this.startTime=null;this.isStopped=false;this.currentTime=0;this.holdTime=null;this.playbackSpeed=1;this.stop=()=>{const{motionValue:t}=this.options;if(t&&t.updatedAt!==m.now()){this.tick(m.now())}this.isStopped=true;if(this.state==="idle")return;this.teardown();this.options.onStop?.()};y.mainThread++;this.options=t;this.initAnimation();this.play();if(t.autoplay===false)this.pause()}initAnimation(){const{options:n}=this;Jt(n);const{type:e=Ht,repeat:s=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=n;let{keyframes:c}=n;const u=e||Ht;if(u!==Ht&&typeof c[0]!=="number"){this.mixKeyframes=t.pipe(tn,St(c[0],c[1]));c=[0,100]}const a=u({...n,keyframes:c});if(o==="mirror"){this.mirroredGenerator=u({...n,keyframes:[...c].reverse(),velocity:-r})}if(a.calculatedDuration===null){a.calculatedDuration=Pt(a)}const{calculatedDuration:f}=a;this.calculatedDuration=f;this.resolvedDuration=f+i;this.totalDuration=this.resolvedDuration*(s+1)-i;this.generator=a}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;if(this.holdTime!==null){this.currentTime=this.holdTime}else{this.currentTime=n}}tick(n,e=false){const{generator:s,totalDuration:i,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:c,calculatedDuration:u}=this;if(this.startTime===null)return s.next(0);const{delay:a=0,keyframes:f,repeat:l,repeatType:h,repeatDelay:d,type:p,onUpdate:m,finalKeyframe:y}=this.options;if(this.speed>0){this.startTime=Math.min(this.startTime,n)}else if(this.speed<0){this.startTime=Math.min(n-i/this.speed,this.startTime)}if(e){this.currentTime=n}else{this.updateTime(n)}const g=this.currentTime-a*(this.playbackSpeed>=0?1:-1);const w=this.playbackSpeed>=0?g<0:g>i;this.currentTime=Math.max(g,0);if(this.state==="finished"&&this.holdTime===null){this.currentTime=i}let v=this.currentTime;let b=s;if(l){const n=Math.min(this.currentTime,i)/c;let e=Math.floor(n);let s=n%1;if(!s&&n>=1){s=1}s===1&&e--;e=Math.min(e,l+1);const o=Boolean(e%2);if(o){if(h==="reverse"){s=1-s;if(d){s-=d/c}}else if(h==="mirror"){b=r}}v=t.clamp(0,1,s)*c}const x=w?{done:false,value:f[0]}:b.next(v);if(o){x.value=o(x.value)}let{done:S}=x;if(!w&&u!==null){S=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0}const M=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&S);if(M&&p!==Ut){x.value=Gt(f,this.options,y,this.speed)}if(m){m(x.value)}if(M){this.finish()}return x}then(t,n){return this.finished.then(t,n)}get duration(){return t.millisecondsToSeconds(this.calculatedDuration)}get time(){return t.millisecondsToSeconds(this.currentTime)}set time(n){n=t.secondsToMilliseconds(n);this.currentTime=n;if(this.startTime===null||this.holdTime!==null||this.playbackSpeed===0){this.holdTime=n}else if(this.driver){this.startTime=this.driver.now()-n/this.playbackSpeed}this.driver?.start(false)}get speed(){return this.playbackSpeed}set speed(n){this.updateTime(m.now());const e=this.playbackSpeed!==n;this.playbackSpeed=n;if(e){this.time=t.millisecondsToSeconds(this.currentTime)}}play(){if(this.isStopped)return;const{driver:t=Mt,startTime:n}=this.options;if(!this.driver){this.driver=t((t=>this.tick(t)))}this.options.onPlay?.();const e=this.driver.now();if(this.state==="finished"){this.updateFinished();this.startTime=e}else if(this.holdTime!==null){this.startTime=e-this.holdTime}else if(!this.startTime){this.startTime=n??e}if(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(m.now());this.holdTime=this.currentTime}complete(){if(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;y.mainThread--}stopDriver(){if(!this.driver)return;this.driver.stop();this.driver=undefined}sample(t){this.startTime=0;return this.tick(t,true)}attachTimeline(t){if(this.options.allowFlatten){this.options.type="keyframes";this.options.ease="linear";this.initAnimation()}this.driver?.stop();return t.observe(this)}}function en(t){return new nn(t)}function sn(t){for(let n=1;n<t.length;n++){t[n]??(t[n]=t[n-1])}}const on=t=>t*180/Math.PI;const rn=t=>{const n=on(Math.atan2(t[1],t[0]));return un(n)};const cn={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:rn,rotateZ:rn,skewX:t=>on(Math.atan(t[1])),skewY:t=>on(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2};const un=t=>{t=t%360;if(t<0)t+=360;return t};const an=rn;const fn=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]);const ln=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]);const hn={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:fn,scaleY:ln,scale:t=>(fn(t)+ln(t))/2,rotateX:t=>un(on(Math.atan2(t[6],t[5]))),rotateY:t=>un(on(Math.atan2(-t[2],t[0]))),rotateZ:an,rotate:an,skewX:t=>on(Math.atan(t[4])),skewY:t=>on(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function dn(t){return t.includes("scale")?1:0}function pn(t,n){if(!t||t==="none"){return dn(n)}const e=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s;let i;if(e){s=hn;i=e}else{const n=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=cn;i=n}if(!i){return dn(n)}const o=s[n];const r=i[1].split(",").map(yn);return typeof o==="function"?o(r):r[o]}const mn=(t,n)=>{const{transform:e="none"}=getComputedStyle(t);return pn(e,n)};function yn(t){return parseFloat(t.trim())}const gn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"];const wn=(()=>new Set(gn))();const vn=t=>t===S||t===V;const bn=new Set(["x","y","z"]);const xn=gn.filter((t=>!bn.has(t)));function Sn(t){const n=[];xn.forEach((e=>{const s=t.getValue(e);if(s!==undefined){n.push([e,s.get()]);s.set(e.startsWith("scale")?1:0)}}));return n}const Mn={width:({x:t},{paddingLeft:n="0",paddingRight:e="0"})=>t.max-t.min-parseFloat(n)-parseFloat(e),height:({y:t},{paddingTop:n="0",paddingBottom:e="0"})=>t.max-t.min-parseFloat(n)-parseFloat(e),top:(t,{top:n})=>parseFloat(n),left:(t,{left:n})=>parseFloat(n),bottom:({y:t},{top:n})=>parseFloat(n)+(t.max-t.min),right:({x:t},{left:n})=>parseFloat(n)+(t.max-t.min),x:(t,{transform:n})=>pn(n,"x"),y:(t,{transform:n})=>pn(n,"y")};Mn.translateX=Mn.x;Mn.translateY=Mn.y;const kn=new Set;let Tn=false;let Pn=false;let $n=false;function An(){if(Pn){const t=Array.from(kn).filter((t=>t.needsMeasurement));const n=new Set(t.map((t=>t.element)));const e=new Map;n.forEach((t=>{const n=Sn(t);if(!n.length)return;e.set(t,n);t.render()}));t.forEach((t=>t.measureInitialState()));n.forEach((t=>{t.render();const n=e.get(t);if(n){n.forEach((([n,e])=>{t.getValue(n)?.set(e)}))}}));t.forEach((t=>t.measureEndState()));t.forEach((t=>{if(t.suspendedScrollY!==undefined){window.scrollTo(0,t.suspendedScrollY)}}))}Pn=false;Tn=false;kn.forEach((t=>t.complete($n)));kn.clear()}function jn(){kn.forEach((t=>{t.readKeyframes();if(t.needsMeasurement){Pn=true}}))}function Rn(){$n=true;jn();An();$n=false}class Cn{constructor(t,n,e,s,i,o=false){this.state="pending";this.isAsync=false;this.needsMeasurement=false;this.unresolvedKeyframes=[...t];this.onComplete=n;this.name=e;this.motionValue=s;this.element=i;this.isAsync=o}scheduleResolve(){this.state="scheduled";if(this.isAsync){kn.add(this);if(!Tn){Tn=true;r.read(jn);r.resolveKeyframes(An)}}else{this.readKeyframes();this.complete()}}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:e,motionValue:s}=this;if(t[0]===null){const i=s?.get();const o=t[t.length-1];if(i!==undefined){t[0]=i}else if(e&&n){const s=e.readValue(n,o);if(s!==undefined&&s!==null){t[0]=s}}if(t[0]===undefined){t[0]=o}if(s&&i===undefined){s.set(t[0])}}sn(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=false){this.state="complete";this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t);kn.delete(this)}cancel(){if(this.state==="scheduled"){kn.delete(this);this.state="pending"}}resume(){if(this.state==="pending")this.scheduleResolve()}}const En=t=>t.startsWith("--");function On(t,n,e){En(n)?t.style.setProperty(n,e):t.style[n]=e}const Bn=t.memo((()=>window.ScrollTimeline!==undefined));const Ln={};function Fn(n,e){const s=t.memo(n);return()=>Ln[e]??s()}const In=Fn((()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return false}return true}),"linearEasing");const Dn=([t,n,e,s])=>`cubic-bezier(${t}, ${n}, ${e}, ${s})`;const Vn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Dn([0,.65,.55,1]),circOut:Dn([.55,0,1,.45]),backIn:Dn([.31,.01,.66,-.59]),backOut:Dn([.33,1.53,.69,.99])};function Nn(n,e){if(!n){return undefined}else if(typeof n==="function"){return In()?kt(n,e):"ease-out"}else if(t.isBezierDefinition(n)){return Dn(n)}else if(Array.isArray(n)){return n.map((t=>Nn(t,e)||Vn.easeOut))}else{return Vn[n]}}function Un(t,n,s,{delay:i=0,duration:o=300,repeat:r=0,repeatType:c="loop",ease:u="easeOut",times:a}={},f=undefined){const l={[n]:s};if(a)l.offset=a;const h=Nn(u,o);if(Array.isArray(h))l.easing=h;if(e.value){y.waapi++}const d={delay:i,duration:o,easing:!Array.isArray(h)?h:"linear",fill:"both",iterations:r+1,direction:c==="reverse"?"alternate":"normal"};if(f)d.pseudoElement=f;const p=t.animate(l,d);if(e.value){p.finished.finally((()=>{y.waapi--}))}return p}function Xn(t){return typeof t==="function"&&"applyToOptions"in t}function Wn({type:t,...n}){if(Xn(t)&&In()){return t.applyToOptions(n)}else{n.duration??(n.duration=300);n.ease??(n.ease="easeOut")}return n}class Yn extends Qt{constructor(n){super();this.finishedTime=null;this.isStopped=false;if(!n)return;const{element:e,name:s,keyframes:i,pseudoElement:o,allowFlatten:r=false,finalKeyframe:c,onComplete:u}=n;this.isPseudoElement=Boolean(o);this.allowFlatten=r;this.options=n;t.invariant(typeof n.type!=="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const a=Wn(n);this.animation=Un(e,s,i,a,o);if(a.autoplay===false){this.animation.pause()}this.animation.onfinish=()=>{this.finishedTime=this.time;if(!o){const t=Gt(i,this.options,c,this.speed);if(this.updateMotionValue){this.updateMotionValue(t)}else{On(e,s,t)}this.animation.cancel()}u?.();this.notifyFinished()}}play(){if(this.isStopped)return;this.animation.play();if(this.state==="finished"){this.updateFinished()}}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=true;const{state:t}=this;if(t==="idle"||t==="finished"){return}if(this.updateMotionValue){this.updateMotionValue()}else{this.commitStyles()}if(!this.isPseudoElement)this.cancel()}commitStyles(){if(!this.isPseudoElement){this.animation.commitStyles?.()}}get duration(){const n=this.animation.effect?.getComputedTiming?.().duration||0;return t.millisecondsToSeconds(Number(n))}get time(){return t.millisecondsToSeconds(Number(this.animation.currentTime)||0)}set time(n){this.finishedTime=null;this.animation.currentTime=t.secondsToMilliseconds(n)}get speed(){return this.animation.playbackRate}set speed(t){if(t<0)this.finishedTime=null;this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:n,observe:e}){if(this.allowFlatten){this.animation.effect?.updateTiming({easing:"linear"})}this.animation.onfinish=null;if(n&&Bn()){this.animation.timeline=n;return t.noop}else{return e(this)}}}const zn={anticipate:t.anticipate,backInOut:t.backInOut,circInOut:t.circInOut};function _n(t){return t in zn}function Kn(t){if(typeof t.ease==="string"&&_n(t.ease)){t.ease=zn[t.ease]}}const Hn=10;class Zn extends Yn{constructor(t){Kn(t);Jt(t);super(t);if(t.startTime){this.startTime=t.startTime}this.options=t}updateMotionValue(n){const{motionValue:e,onUpdate:s,onComplete:i,element:o,...r}=this.options;if(!e)return;if(n!==undefined){e.set(n);return}const c=new nn({...r,autoplay:false});const u=t.secondsToMilliseconds(this.finishedTime??this.time);e.setWithVelocity(c.sample(u-Hn).value,c.sample(u).value,Hn);c.stop()}}const Gn=(t,n)=>{if(n==="zIndex")return false;if(typeof t==="number"||Array.isArray(t))return true;if(typeof t==="string"&&(it.test(t)||t==="0")&&!t.startsWith("url(")){return true}return false};function qn(t){const n=t[0];if(t.length===1)return true;for(let e=0;e<t.length;e++){if(t[e]!==n)return true}}function Jn(n,e,s,i){const o=n[0];if(o===null)return false;if(e==="display"||e==="visibility")return true;const r=n[n.length-1];const c=Gn(o,e);const u=Gn(r,e);t.warning(c===u,`You are trying to animate ${e} from "${o}" to "${r}". "${c?r:o}" is not an animatable value.`,"value-not-animatable");if(!c||!u){return false}return qn(n)||(s==="spring"||Xn(s))&&i}const Qn=new Set(["opacity","clipPath","filter","transform"]);const te=t.memo((()=>Object.hasOwnProperty.call(Element.prototype,"animate")));function ne(t){const{motionValue:n,name:e,repeatDelay:s,repeatType:i,damping:o,type:r}=t;const c=n?.owner?.current;if(!(c instanceof HTMLElement)){return false}const{onUpdate:u,transformTemplate:a}=n.owner.getProps();return te()&&e&&Qn.has(e)&&(e!=="transform"||!a)&&!u&&!s&&i!=="mirror"&&o!==0&&r!=="inertia"}const ee=40;class se extends Qt{constructor({autoplay:t=true,delay:n=0,type:e="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:o="loop",keyframes:r,name:c,motionValue:u,element:a,...f}){super();this.stop=()=>{if(this._animation){this._animation.stop();this.stopTimeline?.()}this.keyframeResolver?.cancel()};this.createdAt=m.now();const l={autoplay:t,delay:n,type:e,repeat:s,repeatDelay:i,repeatType:o,name:c,motionValue:u,element:a,...f};const h=a?.KeyframeResolver||Cn;this.keyframeResolver=new h(r,((t,n,e)=>this.onKeyframesResolved(t,n,l,!e)),c,u,a);this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(n,e,s,i){this.keyframeResolver=undefined;const{name:o,type:r,velocity:c,delay:u,isHandoff:a,onUpdate:f}=s;this.resolvedAt=m.now();if(!Jn(n,o,r,c)){if(t.MotionGlobalConfig.instantAnimations||!u){f?.(Gt(n,s,e))}n[0]=n[n.length-1];s.duration=0;s.repeat=0}const l=i?!this.resolvedAt?this.createdAt:this.resolvedAt-this.createdAt>ee?this.resolvedAt:this.createdAt:undefined;const h={startTime:l,finalKeyframe:e,...s,keyframes:n};const d=!a&&ne(h)?new Zn({...h,element:h.motionValue.owner.current}):new nn(h);d.finished.then((()=>this.notifyFinished())).catch(t.noop);if(this.pendingTimeline){this.stopTimeline=d.attachTimeline(this.pendingTimeline);this.pendingTimeline=undefined}this._animation=d}get finished(){if(!this._animation){return this._finished}else{return this.animation.finished}}then(t,n){return this.finished.finally(t).then((()=>{}))}get animation(){if(!this._animation){this.keyframeResolver?.resume();Rn()}return this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){if(this._animation){this.stopTimeline=this.animation.attachTimeline(t)}else{this.pendingTimeline=t}return()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){if(this._animation){this.animation.cancel()}this.keyframeResolver?.cancel()}}class ie{constructor(t){this.stop=()=>this.runAll("stop");this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map((t=>t.finished)))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let e=0;e<this.animations.length;e++){this.animations[e][t]=n}}attachTimeline(t){const n=this.animations.map((n=>n.attachTimeline(t)));return()=>{n.forEach(((t,n)=>{t&&t();this.animations[n].stop()}))}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++){t=Math.max(t,this.animations[n].duration)}return t}runAll(t){this.animations.forEach((n=>n[t]()))}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class oe extends ie{then(t,n){return this.finished.finally(t).then((()=>{}))}}class re extends Yn{constructor(t){super();this.animation=t;t.onfinish=()=>{this.finishedTime=this.time;this.notifyFinished()}}}const ce=new WeakMap;const ue=(t,n="")=>`${t}:${n}`;function ae(t){const n=ce.get(t)||new Map;ce.set(t,n);return n}const fe=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function le(t){const n=fe.exec(t);if(!n)return[,];const[,e,s,i]=n;return[`--${e??s}`,i]}const he=4;function de(n,e,s=1){t.invariant(s<=he,`Max CSS variable fallback depth detected in property "${n}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[i,o]=le(n);if(!i)return;const r=window.getComputedStyle(e).getPropertyValue(i);if(r){const n=r.trim();return t.isNumericalString(n)?parseFloat(n):n}return b(o)?de(o,e,s+1):o}function pe(t,n){return t?.[n]??t?.["default"]??t}const me=new Set(["width","height","top","left","right","bottom",...gn]);const ye={test:t=>t==="auto",parse:t=>t};const ge=t=>n=>n.test(t);const we=[S,V,D,I,U,N,ye];const ve=t=>we.find(ge(t));function be(n){if(typeof n==="number"){return n===0}else if(n!==null){return n==="none"||n==="0"||t.isZeroValueString(n)}else{return true}}const xe=new Set(["brightness","contrast","saturate","opacity"]);function Se(t){const[n,e]=t.slice(0,-1).split("(");if(n==="drop-shadow")return t;const[s]=e.match(P)||[];if(!s)return t;const i=e.replace(s,"");let o=xe.has(n)?1:0;if(s!==e)o*=100;return n+"("+o+i+")"}const Me=/\b([a-z-]*)\(.*?\)/gu;const ke={...it,getAnimatableNone:t=>{const n=t.match(Me);return n?n.map(Se).join(" "):t}};const Te={...S,transform:Math.round};const Pe={rotate:I,rotateX:I,rotateY:I,rotateZ:I,scale:k,scaleX:k,scaleY:k,scaleZ:k,skew:I,skewX:I,skewY:I,distance:V,translateX:V,translateY:V,translateZ:V,x:V,y:V,z:V,perspective:V,transformPerspective:V,opacity:M,originX:X,originY:X,originZ:V};const $e={borderWidth:V,borderTopWidth:V,borderRightWidth:V,borderBottomWidth:V,borderLeftWidth:V,borderRadius:V,radius:V,borderTopLeftRadius:V,borderTopRightRadius:V,borderBottomRightRadius:V,borderBottomLeftRadius:V,width:V,maxWidth:V,height:V,maxHeight:V,top:V,right:V,bottom:V,left:V,padding:V,paddingTop:V,paddingRight:V,paddingBottom:V,paddingLeft:V,margin:V,marginTop:V,marginRight:V,marginBottom:V,marginLeft:V,backgroundPositionX:V,backgroundPositionY:V,...Pe,zIndex:Te,fillOpacity:M,strokeOpacity:M,numOctaves:Te};const Ae={...$e,color:Y,backgroundColor:Y,outlineColor:Y,fill:Y,stroke:Y,borderColor:Y,borderTopColor:Y,borderRightColor:Y,borderBottomColor:Y,borderLeftColor:Y,filter:ke,WebkitFilter:ke};const je=t=>Ae[t];function Re(t,n){let e=je(t);if(e!==ke)e=it;return e.getAnimatableNone?e.getAnimatableNone(n):undefined}const Ce=new Set(["auto","none","0"]);function Ee(t,n,e){let s=0;let i=undefined;while(s<t.length&&!i){const n=t[s];if(typeof n==="string"&&!Ce.has(n)&&Q(n).values.length){i=t[s]}s++}if(i&&e){for(const s of n){t[s]=Re(e,i)}}}class Oe extends Cn{constructor(t,n,e,s,i){super(t,n,e,s,i,true)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:e}=this;if(!n||!n.current)return;super.readKeyframes();for(let e=0;e<t.length;e++){let s=t[e];if(typeof s==="string"){s=s.trim();if(b(s)){const i=de(s,n.current);if(i!==undefined){t[e]=i}if(e===t.length-1){this.finalKeyframe=s}}}}this.resolveNoneKeyframes();if(!me.has(e)||t.length!==2){return}const[s,i]=t;const o=ve(s);const r=ve(i);if(o===r)return;if(vn(o)&&vn(r)){for(let n=0;n<t.length;n++){const e=t[n];if(typeof e==="string"){t[n]=parseFloat(e)}}}else if(Mn[e]){this.needsMeasurement=true}}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this;const e=[];for(let n=0;n<t.length;n++){if(t[n]===null||be(t[n])){e.push(n)}}if(e.length){Ee(t,e,n)}}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:e}=this;if(!t||!t.current)return;if(e==="height"){this.suspendedScrollY=window.pageYOffset}this.measuredOrigin=Mn[e](t.measureViewportBox(),window.getComputedStyle(t.current));n[0]=this.measuredOrigin;const s=n[n.length-1];if(s!==undefined){t.getValue(e,s).jump(s,false)}}measureEndState(){const{element:t,name:n,unresolvedKeyframes:e}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,false);const i=e.length-1;const o=e[i];e[i]=Mn[n](t.measureViewportBox(),window.getComputedStyle(t.current));if(o!==null&&this.finalKeyframe===undefined){this.finalKeyframe=o}if(this.removedTransforms?.length){this.removedTransforms.forEach((([n,e])=>{t.getValue(n).set(e)}))}this.resolveNoneKeyframes()}}const Be=new Set(["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","radius","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","width","maxWidth","height","maxHeight","top","right","bottom","left","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","margin","marginTop","marginRight","marginBottom","marginLeft","backgroundPositionX","backgroundPositionY"]);function Le(t,n){for(let e=0;e<t.length;e++){if(typeof t[e]==="number"&&Be.has(n)){t[e]=t[e]+"px"}}}function Fe(n){return Boolean(typeof n==="function"&&In()||!n||typeof n==="string"&&(n in Vn||In())||t.isBezierDefinition(n)||Array.isArray(n)&&n.every(Fe))}const Ie=t.memo((()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return false}return true}));const De=new Set(["opacity","clipPath","filter","transform"]);function Ve(t){return t.replace(/([A-Z])/g,(t=>`-${t.toLowerCase()}`))}function Ne(t,n,e){if(t instanceof EventTarget){return[t]}else if(typeof t==="string"){let s=document;if(n){s=n.current}const i=e?.[t]??s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}function Ue(t){return(n,e)=>{const s=Ne(n);const i=[];for(const n of s){const s=t(n,e);i.push(s)}return()=>{for(const t of i)t()}}}const Xe=(t,n)=>n&&typeof t==="number"?n.transform(t):t;class We{constructor(){this.latest={};this.values=new Map}set(t,n,e,s,i=true){const o=this.values.get(t);if(o){o.onRemove()}const u=()=>{const s=n.get();if(i){this.latest[t]=Xe(s,$e[t])}else{this.latest[t]=s}e&&r.render(e)};u();const a=n.on("change",u);s&&n.addDependent(s);const f=()=>{a();e&&c(e);this.values.delete(t);s&&n.removeDependent(s)};this.values.set(t,{value:n,onRemove:f});return f}get(t){return this.values.get(t)?.value}destroy(){for(const t of this.values.values()){t.onRemove()}}}function Ye(t){const n=new WeakMap;const e=[];return(s,i)=>{const o=n.get(s)??new We;n.set(s,o);for(const n in i){const r=i[n];const c=t(s,o,n,r);e.push(c)}return()=>{for(const t of e)t()}}}function ze(t,n){if(!(n in t))return false;const e=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),n)||Object.getOwnPropertyDescriptor(t,n);return e&&typeof e.set==="function"}const _e=(t,n,e,s)=>{const i=ze(t,e);const o=i?e:e.startsWith("data")||e.startsWith("aria")?Ve(e):e;const r=i?()=>{t[o]=n.latest[e]}:()=>{const s=n.latest[e];if(s===null||s===undefined){t.removeAttribute(o)}else{t.setAttribute(o,String(s))}};return n.set(e,s,r)};const Ke=Ue(Ye(_e));const He=Ye(((t,n,e,s)=>n.set(e,s,(()=>{t[e]=n.latest[e]}),undefined,false)));function Ze(n){return t.isObject(n)&&"offsetHeight"in n}const Ge=30;const qe=t=>!isNaN(parseFloat(t));const Je={current:undefined};class Qe{constructor(t,n={}){this.canTrackVelocity=null;this.events={};this.updateAndNotify=(t,n=true)=>{const e=m.now();if(this.updatedAt!==e){this.setPrevFrameValue()}this.prev=this.current;this.setCurrent(t);if(this.current!==this.prev){this.events.change?.notify(this.current);if(this.dependents){for(const t of this.dependents){t.dirty()}}}if(n){this.events.renderRequest?.notify(this.current)}};this.hasAnimated=false;this.setCurrent(t);this.owner=n.owner}setCurrent(t){this.current=t;this.updatedAt=m.now();if(this.canTrackVelocity===null&&t!==undefined){this.canTrackVelocity=qe(this.current)}}setPrevFrameValue(t=this.current){this.prevFrameValue=t;this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(n,e){if(!this.events[n]){this.events[n]=new t.SubscriptionManager}const s=this.events[n].add(e);if(n==="change"){return()=>{s();r.read((()=>{if(!this.events.change.getSize()){this.stop()}}))}}return s}clearListeners(){for(const t in this.events){this.events[t].clear()}}attach(t,n){this.passiveEffect=t;this.stopPassiveEffect=n}set(t,n=true){if(!n||!this.passiveEffect){this.updateAndNotify(t,n)}else{this.passiveEffect(t,this.updateAndNotify)}}setWithVelocity(t,n,e){this.set(n);this.prev=undefined;this.prevFrameValue=t;this.prevUpdatedAt=this.updatedAt-e}jump(t,n=true){this.updateAndNotify(t);this.prev=t;this.prevUpdatedAt=this.prevFrameValue=undefined;n&&this.stop();if(this.stopPassiveEffect)this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){if(!this.dependents){this.dependents=new Set}this.dependents.add(t)}removeDependent(t){if(this.dependents){this.dependents.delete(t)}}get(){if(Je.current){Je.current.push(this)}return this.current}getPrevious(){return this.prev}getVelocity(){const n=m.now();if(!this.canTrackVelocity||this.prevFrameValue===undefined||n-this.updatedAt>Ge){return 0}const e=Math.min(this.updatedAt-this.prevUpdatedAt,Ge);return t.velocityPerSecond(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){this.stop();return new Promise((n=>{this.hasAnimated=true;this.animation=t(n);if(this.events.animationStart){this.events.animationStart.notify()}})).then((()=>{if(this.events.animationComplete){this.events.animationComplete.notify()}this.clearAnimation()}))}stop(){if(this.animation){this.animation.stop();if(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();if(this.stopPassiveEffect){this.stopPassiveEffect()}}}function ts(t,n){return new Qe(t,n)}const ns={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function es(t){let n="";let e=true;for(let s=0;s<gn.length;s++){const i=gn[s];const o=t.latest[i];if(o===undefined)continue;let r=true;if(typeof o==="number"){r=o===(i.startsWith("scale")?1:0)}else{r=parseFloat(o)===0}if(!r){e=false;const s=ns[i]||i;const o=t.latest[i];n+=`${s}(${o}) `}}return e?"none":n.trim()}const ss=new Set(["originX","originY","originZ"]);const is=(t,n,e,s)=>{let i=undefined;let o=undefined;if(wn.has(e)){if(!n.get("transform")){if(!Ze(t)&&!n.get("transformBox")){is(t,n,"transformBox",new Qe("fill-box"))}n.set("transform",new Qe("none"),(()=>{t.style.transform=es(n)}))}o=n.get("transform")}else if(ss.has(e)){if(!n.get("transformOrigin")){n.set("transformOrigin",new Qe(""),(()=>{const e=n.latest.originX??"50%";const s=n.latest.originY??"50%";const i=n.latest.originZ??0;t.style.transformOrigin=`${e} ${s} ${i}`}))}o=n.get("transformOrigin")}else if(En(e)){i=()=>{t.style.setProperty(e,n.latest[e])}}else{i=()=>{t.style[e]=n.latest[e]}}return n.set(e,s,i,o)};const os=Ue(Ye(is));const rs=V.transform;function cs(t,n,e,s){r.render((()=>t.setAttribute("pathLength","1")));if(e==="pathOffset"){return n.set(e,s,(()=>t.setAttribute("stroke-dashoffset",rs(-n.latest[e]))))}else{if(!n.get("stroke-dasharray")){n.set("stroke-dasharray",new Qe("1 1"),(()=>{const{pathLength:e=1,pathSpacing:s}=n.latest;t.setAttribute("stroke-dasharray",`${rs(e)} ${rs(s??1-Number(e))}`)}))}return n.set(e,s,undefined,n.get("stroke-dasharray"))}}const us=(t,n,e,s)=>{if(e.startsWith("path")){return cs(t,n,e,s)}else if(e.startsWith("attr")){return _e(t,n,fs(e),s)}const i=e in t.style?is:_e;return i(t,n,e,s)};const as=Ue(Ye(us));function fs(t){return t.replace(/^attr([A-Z])/,((t,n)=>n.toLowerCase()))}const{schedule:ls,cancel:hs}=o(queueMicrotask,false);const ds={x:false,y:false};function ps(){return ds.x||ds.y}function ms(t){if(t==="x"||t==="y"){if(ds[t]){return null}else{ds[t]=true;return()=>{ds[t]=false}}}else{if(ds.x||ds.y){return null}else{ds.x=ds.y=true;return()=>{ds.x=ds.y=false}}}}function ys(t,n){const e=Ne(t);const s=new AbortController;const i={passive:true,...n,signal:s.signal};const o=()=>s.abort();return[e,i,o]}function gs(t){return!(t.pointerType==="touch"||ps())}function ws(t,n,e={}){const[s,i,o]=ys(t,e);const r=t=>{if(!gs(t))return;const{target:e}=t;const s=n(e,t);if(typeof s!=="function"||!e)return;const o=t=>{if(!gs(t))return;s(t);e.removeEventListener("pointerleave",o)};e.addEventListener("pointerleave",o,i)};s.forEach((t=>{t.addEventListener("pointerenter",r,i)}));return o}const vs=(t,n)=>{if(!n){return false}else if(t===n){return true}else{return vs(t,n.parentElement)}};const bs=t=>{if(t.pointerType==="mouse"){return typeof t.button!=="number"||t.button<=0}else{return t.isPrimary!==false}};const xs=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Ss(t){return xs.has(t.tagName)||t.tabIndex!==-1}const Ms=new WeakSet;function ks(t){return n=>{if(n.key!=="Enter")return;t(n)}}function Ts(t,n){t.dispatchEvent(new PointerEvent("pointer"+n,{isPrimary:true,bubbles:true}))}const Ps=(t,n)=>{const e=t.currentTarget;if(!e)return;const s=ks((()=>{if(Ms.has(e))return;Ts(e,"down");const t=ks((()=>{Ts(e,"up")}));const s=()=>Ts(e,"cancel");e.addEventListener("keyup",t,n);e.addEventListener("blur",s,n)}));e.addEventListener("keydown",s,n);e.addEventListener("blur",(()=>e.removeEventListener("keydown",s)),n)};function $s(t){return bs(t)&&!ps()}function As(t,n,e={}){const[s,i,o]=ys(t,e);const r=t=>{const s=t.currentTarget;if(!$s(t))return;Ms.add(s);const o=n(s,t);const r=(t,n)=>{window.removeEventListener("pointerup",c);window.removeEventListener("pointercancel",u);if(Ms.has(s)){Ms.delete(s)}if(!$s(t)){return}if(typeof o==="function"){o(t,{success:n})}};const c=t=>{r(t,s===window||s===document||e.useGlobalTarget||vs(s,t.target))};const u=t=>{r(t,false)};window.addEventListener("pointerup",c,i);window.addEventListener("pointercancel",u,i)};s.forEach((t=>{const n=e.useGlobalTarget?window:t;n.addEventListener("pointerdown",r,i);if(Ze(t)){t.addEventListener("focus",(t=>Ps(t,i)));if(!Ss(t)&&!t.hasAttribute("tabindex")){t.tabIndex=0}}}));return o}function js(t,n){const e=window.getComputedStyle(t);return En(n)?e.getPropertyValue(n):e[n]}function Rs(n){return t.isObject(n)&&"ownerSVGElement"in n}const Cs=new WeakMap;let Es;const Os=(t,n,e)=>(s,i)=>{if(i&&i[0]){return i[0][t+"Size"]}else if(Rs(s)&&"getBBox"in s){return s.getBBox()[n]}else{return s[e]}};const Bs=Os("inline","width","offsetWidth");const Ls=Os("block","height","offsetHeight");function Fs({target:t,borderBoxSize:n}){Cs.get(t)?.forEach((e=>{e(t,{get width(){return Bs(t,n)},get height(){return Ls(t,n)}})}))}function Is(t){t.forEach(Fs)}function Ds(){if(typeof ResizeObserver==="undefined")return;Es=new ResizeObserver(Is)}function Vs(t,n){if(!Es)Ds();const e=Ne(t);e.forEach((t=>{let e=Cs.get(t);if(!e){e=new Set;Cs.set(t,e)}e.add(n);Es?.observe(t)}));return()=>{e.forEach((t=>{const e=Cs.get(t);e?.delete(n);if(!e?.size){Es?.unobserve(t)}}))}}const Ns=new Set;let Us;function Xs(){Us=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};Ns.forEach((n=>n(t)))};window.addEventListener("resize",Us)}function Ws(t){Ns.add(t);if(!Us)Xs();return()=>{Ns.delete(t);if(!Ns.size&&typeof Us==="function"){window.removeEventListener("resize",Us);Us=undefined}}}function Ys(t,n){return typeof t==="function"?Ws(t):Vs(t,n)}function zs(t,n){let e;const s=()=>{const{currentTime:s}=n;const i=s===null?0:s.value;const o=i/100;if(e!==o){t(o)}e=o};r.preUpdate(s,true);return()=>c(s)}function _s(){const{value:t}=e;if(t===null){c(_s);return}t.frameloop.rate.push(u.delta);t.animations.mainThread.push(y.mainThread);t.animations.waapi.push(y.waapi);t.animations.layout.push(y.layout)}function Ks(t){return t.reduce(((t,n)=>t+n),0)/t.length}function Hs(t,n=Ks){if(t.length===0){return{min:0,max:0,avg:0}}return{min:Math.min(...t),max:Math.max(...t),avg:n(t)}}const Zs=t=>Math.round(1e3/t);function Gs(){e.value=null;e.addProjectionMetrics=null}function qs(){const{value:t}=e;if(!t){throw new Error("Stats are not being measured")}Gs();c(_s);const n={frameloop:{setup:Hs(t.frameloop.setup),rate:Hs(t.frameloop.rate),read:Hs(t.frameloop.read),resolveKeyframes:Hs(t.frameloop.resolveKeyframes),preUpdate:Hs(t.frameloop.preUpdate),update:Hs(t.frameloop.update),preRender:Hs(t.frameloop.preRender),render:Hs(t.frameloop.render),postRender:Hs(t.frameloop.postRender)},animations:{mainThread:Hs(t.animations.mainThread),waapi:Hs(t.animations.waapi),layout:Hs(t.animations.layout)},layoutProjection:{nodes:Hs(t.layoutProjection.nodes),calculatedTargetDeltas:Hs(t.layoutProjection.calculatedTargetDeltas),calculatedProjections:Hs(t.layoutProjection.calculatedProjections)}};const{rate:s}=n.frameloop;s.min=Zs(s.min);s.max=Zs(s.max);s.avg=Zs(s.avg);[s.min,s.max]=[s.max,s.min];return n}function Js(){if(e.value){Gs();throw new Error("Stats are already being measured")}const t=e;t.value={frameloop:{setup:[],rate:[],read:[],resolveKeyframes:[],preUpdate:[],update:[],preRender:[],render:[],postRender:[]},animations:{mainThread:[],waapi:[],layout:[]},layoutProjection:{nodes:[],calculatedTargetDeltas:[],calculatedProjections:[]}};t.addProjectionMetrics=n=>{const{layoutProjection:e}=t.value;e.nodes.push(n.nodes);e.calculatedTargetDeltas.push(n.calculatedTargetDeltas);e.calculatedProjections.push(n.calculatedProjections)};r.postRender(_s,true);return qs}function Qs(t){return Rs(t)&&t.tagName==="svg"}function ti(t,n){if(t==="first"){return 0}else{const e=n-1;return t==="last"?e:e/2}}function ni(n=.1,{startDelay:e=0,from:s=0,ease:i}={}){return(o,r)=>{const c=typeof s==="number"?s:ti(s,r);const u=Math.abs(c-o);let a=n*u;if(i){const e=r*n;const s=t.easingDefinitionToFunction(i);a=s(a/e)*e}return e+a}}function ei(...t){const n=!Array.isArray(t[0]);const e=n?0:-1;const s=t[0+e];const i=t[1+e];const o=t[2+e];const r=t[3+e];const c=Wt(i,o,r);return n?c(s):c}function si(t,n,e){const s=()=>n.set(e());const i=()=>r.preRender(s,false,true);const o=t.map((t=>t.on("change",i)));n.on("destroy",(()=>{o.forEach((t=>t()));c(s)}))}function ii(t){const n=[];Je.current=n;const e=t();Je.current=undefined;const s=ts(e);si(n,s,t);return s}function oi(t,n,e,s){const i=ei(n,e,s);return ii((()=>i(t.get())))}const ri=t=>Boolean(t&&t.getVelocity);function ci(t,n){const e=ri(t)?t.get():t;const s=ts(e);ui(s,t,n);return s}function ui(t,n,e){const s=t.get();let i=null;let o=s;let c;const u=typeof s==="string"?s.replace(/[\d.-]/g,""):undefined;const a=()=>{if(i){i.stop();i=null}};const f=()=>{a();i=new nn({keyframes:[fi(t.get()),fi(o)],velocity:t.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...e,onUpdate:c})};t.attach(((n,e)=>{o=n;c=t=>e(ai(t,u));r.postRender(f);return t.get()}),a);let l=undefined;if(ri(n)){l=n.on("change",(n=>t.set(ai(n,u))));t.on("destroy",l)}return l}function ai(t,n){return n?t+n:t}function fi(t){return typeof t==="number"?t:parseFloat(t)}const li=[...we,Y,it];const hi=t=>li.find(ge(t));function di(t){if(t==="layout")return"group";if(t==="enter"||t==="new")return"new";if(t==="exit"||t==="old")return"old";return"group"}let pi={};let mi=null;const yi={set:(t,n)=>{pi[t]=n},commit:()=>{if(!mi){mi=document.createElement("style");mi.id="motion-view"}let t="";for(const n in pi){const e=pi[n];t+=`${n} {\n`;for(const[n,s]of Object.entries(e)){t+=` ${n}: ${s};\n`}t+="}\n"}mi.textContent=t;document.head.appendChild(mi);pi={}},remove:()=>{if(mi&&mi.parentElement){mi.parentElement.removeChild(mi)}}};function gi(t){const n=t.match(/::view-transition-(old|new|group|image-pair)\((.*?)\)/);if(!n)return null;return{layer:n[2],type:n[1]}}function wi(t){const{effect:n}=t;if(!n)return false;return n.target===document.documentElement&&n.pseudoElement?.startsWith("::view-transition")}function vi(){return document.getAnimations().filter(wi)}function bi(t,n){return n.has(t)&&Object.keys(n.get(t)).length>0}const xi=["layout","enter","exit","new","old"];function Si(n){const{update:e,targets:s,options:i}=n;if(!document.startViewTransition){return new Promise((async t=>{await e();t(new ie([]))}))}if(!bi("root",s)){yi.set(":root",{"view-transition-name":"none"})}yi.set("::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)",{"animation-timing-function":"linear !important"});yi.commit();const o=document.startViewTransition((async()=>{await e()}));o.finished.finally((()=>{yi.remove()}));return new Promise((n=>{o.ready.then((()=>{const e=vi();const o=[];s.forEach(((n,e)=>{for(const s of xi){if(!n[s])continue;const{keyframes:r,options:c}=n[s];for(let[n,u]of Object.entries(r)){if(!u)continue;const r={...pe(i,n),...pe(c,n)};const a=di(s);if(n==="opacity"&&!Array.isArray(u)){const t=a==="new"?0:1;u=[t,u]}if(typeof r.delay==="function"){r.delay=r.delay(0,1)}r.duration&&(r.duration=t.secondsToMilliseconds(r.duration));r.delay&&(r.delay=t.secondsToMilliseconds(r.delay));const f=new Yn({...r,element:document.documentElement,name:n,pseudoElement:`::view-transition-${a}(${e})`,keyframes:u});o.push(f)}}}));for(const n of e){if(n.playState==="finished")continue;const{effect:e}=n;if(!e||!(e instanceof KeyframeEffect))continue;const{pseudoElement:r}=e;if(!r)continue;const c=gi(r);if(!c)continue;const u=s.get(c.layer);if(!u){const s=c.type==="group"?"layout":"";let r={...pe(i,s)};r.duration&&(r.duration=t.secondsToMilliseconds(r.duration));r=Wn(r);const u=Nn(r.ease,r.duration);e.updateTiming({delay:t.secondsToMilliseconds(r.delay??0),duration:r.duration,easing:u});o.push(new re(n))}else if(Mi(u,"enter")&&Mi(u,"exit")&&e.getKeyframes().some((t=>t.mixBlendMode))){o.push(new re(n))}else{n.cancel()}}n(new ie(o))}))}))}function Mi(t,n){return t?.[n]?.keyframes.opacity}let ki=[];let Ti=null;function Pi(){Ti=null;const[t]=ki;if(t)$i(t)}function $i(n){t.removeItem(ki,n);Ti=n;Si(n).then((t=>{n.notifyReady(t);t.finished.finally(Pi)}))}function Ai(){for(let t=ki.length-1;t>=0;t--){const n=ki[t];const{interrupt:e}=n.options;if(e==="immediate"){const e=ki.slice(0,t+1).map((t=>t.update));const s=ki.slice(t+1);n.update=()=>{e.forEach((t=>t()))};ki=[n,...s];break}}if(!Ti||ki[0]?.options.interrupt==="immediate"){Pi()}}function ji(t){ki.push(t);ls.render(Ai)}class Ri{constructor(n,e={}){this.currentSubject="root";this.targets=new Map;this.notifyReady=t.noop;this.readyPromise=new Promise((t=>{this.notifyReady=t}));this.update=n;this.options={interrupt:"wait",...e};ji(this)}get(t){this.currentSubject=t;return this}layout(t,n){this.updateTarget("layout",t,n);return this}new(t,n){this.updateTarget("new",t,n);return this}old(t,n){this.updateTarget("old",t,n);return this}enter(t,n){this.updateTarget("enter",t,n);return this}exit(t,n){this.updateTarget("exit",t,n);return this}crossfade(t){this.updateTarget("enter",{opacity:1},t);this.updateTarget("exit",{opacity:0},t);return this}updateTarget(t,n,e={}){const{currentSubject:s,targets:i}=this;if(!i.has(s)){i.set(s,{})}const o=i.get(s);o[t]={keyframes:n,options:e}}then(t,n){return this.readyPromise.then(t,n)}}function Ci(t,n={}){return new Ri(t,n)}const Ei=r;const Oi=n.reduce(((t,n)=>{t[n]=t=>c(t);return t}),{});f.AsyncMotionValueAnimation=se;f.DOMKeyframesResolver=Oe;f.GroupAnimation=ie;f.GroupAnimationWithThen=oe;f.JSAnimation=nn;f.KeyframeResolver=Cn;f.MotionValue=Qe;f.NativeAnimation=Yn;f.NativeAnimationExtended=Zn;f.NativeAnimationWrapper=re;f.ViewTransitionBuilder=Ri;f.acceleratedValues=De;f.activeAnimations=y;f.addAttrValue=_e;f.addStyleValue=is;f.alpha=M;f.analyseComplexValue=Q;f.animateValue=en;f.animateView=Ci;f.animationMapKey=ue;f.applyPxDefaults=Le;f.attachSpring=ui;f.attrEffect=Ke;f.calcGeneratorDuration=Pt;f.cancelFrame=c;f.cancelMicrotask=hs;f.cancelSync=Oi;f.collectMotionValues=Je;f.color=Y;f.complex=it;f.convertOffsetToTimes=_t;f.createGeneratorEasing=$t;f.createRenderBatcher=o;f.cubicBezierAsString=Dn;f.defaultEasing=Kt;f.defaultOffset=zt;f.defaultTransformValue=dn;f.defaultValueTypes=Ae;f.degrees=I;f.dimensionValueTypes=we;f.fillOffset=Yt;f.fillWildcards=sn;f.findDimensionValueType=ve;f.findValueType=hi;f.flushKeyframeResolvers=Rn;f.frame=r;f.frameData=u;f.frameSteps=a;f.generateLinearEasing=kt;f.getAnimatableNone=Re;f.getAnimationMap=ae;f.getComputedStyle=js;f.getDefaultValueType=je;f.getMixer=gt;f.getOriginIndex=ti;f.getValueAsType=Xe;f.getValueTransition=pe;f.getVariableValue=de;f.hex=L;f.hover=ws;f.hsla=W;f.hslaToRgba=rt;f.inertia=Ut;f.interpolate=Wt;f.invisibleValues=pt;f.isCSSVariableName=w;f.isCSSVariableToken=b;f.isDragActive=ps;f.isDragging=ds;f.isGenerator=Xn;f.isHTMLElement=Ze;f.isMotionValue=ri;f.isNodeOrChild=vs;f.isPrimaryPointer=bs;f.isSVGElement=Rs;f.isSVGSVGElement=Qs;f.isWaapiSupportedEasing=Fe;f.keyframes=Ht;f.mapEasingToNativeEasing=Nn;f.mapValue=oi;f.maxGeneratorDuration=Tt;f.microtask=ls;f.mix=St;f.mixArray=wt;f.mixColor=dt;f.mixComplex=xt;f.mixImmediate=ct;f.mixLinearColor=at;f.mixNumber=ut;f.mixObject=vt;f.mixVisibility=mt;f.motionValue=ts;f.number=S;f.numberValueTypes=$e;f.observeTimeline=zs;f.parseCSSVariable=le;f.parseValueFromTransform=pn;f.percent=D;f.positionalKeys=me;f.press=As;f.progressPercentage=X;f.propEffect=He;f.px=V;f.readTransformValue=mn;f.recordStats=Js;f.resize=Ys;f.resolveElements=Ne;f.rgbUnit=E;f.rgba=O;f.scale=k;f.setDragLock=ms;f.setStyle=On;f.spring=Nt;f.springValue=ci;f.stagger=ni;f.startWaapiAnimation=Un;f.statsBuffer=e;f.styleEffect=os;f.supportedWaapiEasing=Vn;f.supportsBrowserAnimation=ne;f.supportsFlags=Ln;f.supportsLinearEasing=In;f.supportsPartialKeyframes=Ie;f.supportsScrollTimeline=Bn;f.svgEffect=as;f.sync=Ei;f.testValueType=ge;f.time=m;f.transform=ei;f.transformPropOrder=gn;f.transformProps=wn;f.transformValue=ii;f.transformValueTypes=Pe;f.vh=N;f.vw=U;return f}var y;function g(){if(y)return a;y=1;var n=c();var e=m();var s=d();var i=t();const o=n.createContext({});function r(t){const e=n.useRef(null);if(e.current===null){e.current=t()}return e.current}const u=typeof window!=="undefined";const f=u?n.useLayoutEffect:n.useEffect;const l=n.createContext(null);const h=n.createContext({transformPagePoint:t=>t,isStatic:false,reducedMotion:"never"});function p(t=true){const e=n.useContext(l);if(e===null)return[true,null];const{isPresent:s,onExitComplete:i,register:o}=e;const r=n.useId();n.useEffect((()=>{if(t){return o(r)}}),[t]);const c=n.useCallback((()=>t&&i&&i(r)),[r,i,t]);return!s&&i?[false,c]:[true]}function g(){return w(n.useContext(l))}function w(t){return t===null?true:t.isPresent}const v=1e-4;const b=1-v;const x=1+v;const S=.01;const M=0-S;const k=0+S;function T(t){return t.max-t.min}function P(t,n,e){return Math.abs(t-n)<=e}function $(t,n,s,i=.5){t.origin=i;t.originPoint=e.mixNumber(n.min,n.max,t.origin);t.scale=T(s)/T(n);t.translate=e.mixNumber(s.min,s.max,t.origin)-t.originPoint;if(t.scale>=b&&t.scale<=x||isNaN(t.scale)){t.scale=1}if(t.translate>=M&&t.translate<=k||isNaN(t.translate)){t.translate=0}}function A(t,n,e,s){$(t.x,n.x,e.x,s?s.originX:undefined);$(t.y,n.y,e.y,s?s.originY:undefined)}function j(t,n,e){t.min=e.min+n.min;t.max=t.min+T(n)}function R(t,n,e){j(t.x,n.x,e.x);j(t.y,n.y,e.y)}function C(t,n,e){t.min=n.min-e.min;t.max=t.min+T(n)}function E(t,n,e){C(t.x,n.x,e.x);C(t.y,n.y,e.y)}const O=t=>t!==null;function B(t,{repeat:n,repeatType:e="loop"},s){const i=t.filter(O);const o=n&&e!=="loop"&&n%2===1?0:i.length-1;return i[o]}const L={type:"spring",stiffness:500,damping:25,restSpeed:10};const F=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10});const I={type:"keyframes",duration:.8};const D={type:"keyframes",ease:[.25,.1,.35,1],duration:.3};const V=(t,{keyframes:n})=>{if(n.length>2){return I}else if(e.transformProps.has(t)){return t.startsWith("scale")?F(n[1]):L}return D};function N({when:t,delay:n,delayChildren:e,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:c,from:u,elapsed:a,...f}){return!!Object.keys(f).length}const U=(t,n,i,o={},r,c)=>u=>{const a=e.getValueTransition(o,t)||{};const f=a.delay||o.delay||0;let{elapsed:l=0}=o;l=l-s.secondsToMilliseconds(f);const h={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:n.getVelocity(),...a,delay:-l,onUpdate:t=>{n.set(t);a.onUpdate&&a.onUpdate(t)},onComplete:()=>{u();a.onComplete&&a.onComplete()},name:t,motionValue:n,element:c?undefined:r};if(!N(a)){Object.assign(h,V(t,h))}h.duration&&(h.duration=s.secondsToMilliseconds(h.duration));h.repeatDelay&&(h.repeatDelay=s.secondsToMilliseconds(h.repeatDelay));if(h.from!==undefined){h.keyframes[0]=h.from}let d=false;if(h.type===false||h.duration===0&&!h.repeatDelay){h.duration=0;if(h.delay===0){d=true}}if(s.MotionGlobalConfig.instantAnimations||s.MotionGlobalConfig.skipAnimations){d=true;h.duration=0;h.delay=0}h.allowFlatten=!a.type&&!a.ease;if(d&&!c&&n.get()!==undefined){const t=B(h.keyframes,a);if(t!==undefined){e.frame.update((()=>{h.onUpdate(t);h.onComplete()}));return}}return a.isSync?new e.JSAnimation(h):new e.AsyncMotionValueAnimation(h)};function X(t,n,s){const i=e.isMotionValue(t)?t:e.motionValue(t);i.start(U("",i,n,s));return i.animation}const W=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase();const Y="framerAppearId";const z="data-"+W(Y);function _(t){return t.props[z]}const K=(t,n)=>t.depth-n.depth;class H{constructor(){this.children=[];this.isDirty=false}add(t){s.addUniqueItem(this.children,t);this.isDirty=true}remove(t){s.removeItem(this.children,t);this.isDirty=true}forEach(t){this.isDirty&&this.children.sort(K);this.isDirty=false;this.children.forEach(t)}}function Z(t,n){const s=e.time.now();const i=({timestamp:o})=>{const r=o-s;if(r>=n){e.cancelFrame(i);t(r-n)}};e.frame.setup(i,true);return()=>e.cancelFrame(i)}function G(t){return e.isMotionValue(t)?t.get():t}const q=["TopLeft","TopRight","BottomLeft","BottomRight"];const J=q.length;const Q=t=>typeof t==="string"?parseFloat(t):t;const tt=t=>typeof t==="number"||e.px.test(t);function nt(t,n,s,i,o,r){if(o){t.opacity=e.mixNumber(0,s.opacity??1,st(i));t.opacityExit=e.mixNumber(n.opacity??1,0,it(i))}else if(r){t.opacity=e.mixNumber(n.opacity??1,s.opacity??1,i)}for(let o=0;o<J;o++){const r=`border${q[o]}Radius`;let c=et(n,r);let u=et(s,r);if(c===undefined&&u===undefined)continue;c||(c=0);u||(u=0);const a=c===0||u===0||tt(c)===tt(u);if(a){t[r]=Math.max(e.mixNumber(Q(c),Q(u),i),0);if(e.percent.test(u)||e.percent.test(c)){t[r]+="%"}}else{t[r]=u}}if(n.rotate||s.rotate){t.rotate=e.mixNumber(n.rotate||0,s.rotate||0,i)}}function et(t,n){return t[n]!==undefined?t[n]:t.borderRadius}const st=ot(0,.5,s.circOut);const it=ot(.5,.95,s.noop);function ot(t,n,e){return i=>{if(i<t)return 0;if(i>n)return 1;return e(s.progress(t,n,i))}}function rt(t,n){t.min=n.min;t.max=n.max}function ct(t,n){rt(t.x,n.x);rt(t.y,n.y)}function ut(t,n){t.translate=n.translate;t.scale=n.scale;t.originPoint=n.originPoint;t.origin=n.origin}function at(t){return t===undefined||t===1}function ft({scale:t,scaleX:n,scaleY:e}){return!at(t)||!at(n)||!at(e)}function lt(t){return ft(t)||ht(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function ht(t){return dt(t.x)||dt(t.y)}function dt(t){return t&&t!=="0%"}function pt(t,n,e){const s=t-e;const i=n*s;return e+i}function mt(t,n,e,s,i){if(i!==undefined){t=pt(t,i,s)}return pt(t,e,s)+n}function yt(t,n=0,e=1,s,i){t.min=mt(t.min,n,e,s,i);t.max=mt(t.max,n,e,s,i)}function gt(t,{x:n,y:e}){yt(t.x,n.translate,n.scale,n.originPoint);yt(t.y,e.translate,e.scale,e.originPoint)}const wt=.999999999999;const vt=1.0000000000001;function bt(t,n,e,s=false){const i=e.length;if(!i)return;n.x=n.y=1;let o;let r;for(let c=0;c<i;c++){o=e[c];r=o.projectionDelta;const{visualElement:i}=o.options;if(i&&i.props.style&&i.props.style.display==="contents"){continue}if(s&&o.options.layoutScroll&&o.scroll&&o!==o.root){Mt(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y})}if(r){n.x*=r.x.scale;n.y*=r.y.scale;gt(t,r)}if(s&<(o.latestValues)){Mt(t,o.latestValues)}}if(n.x<vt&&n.x>wt){n.x=1}if(n.y<vt&&n.y>wt){n.y=1}}function xt(t,n){t.min=t.min+n;t.max=t.max+n}function St(t,n,s,i,o=.5){const r=e.mixNumber(t.min,t.max,o);yt(t,n,s,r,i)}function Mt(t,n){St(t.x,n.x,n.scaleX,n.scale,n.originX);St(t.y,n.y,n.scaleY,n.scale,n.originY)}function kt(t,n,e,s,i){t-=n;t=pt(t,1/e,s);if(i!==undefined){t=pt(t,1/i,s)}return t}function Tt(t,n=0,s=1,i=.5,o,r=t,c=t){if(e.percent.test(n)){n=parseFloat(n);const t=e.mixNumber(c.min,c.max,n/100);n=t-c.min}if(typeof n!=="number")return;let u=e.mixNumber(r.min,r.max,i);if(t===r)u-=n;t.min=kt(t.min,n,s,u,o);t.max=kt(t.max,n,s,u,o)}function Pt(t,n,[e,s,i],o,r){Tt(t,n[e],n[s],n[i],n.scale,o,r)}const $t=["x","scaleX","originX"];const At=["y","scaleY","originY"];function jt(t,n,e,s){Pt(t.x,n,$t,e?e.x:undefined,s?s.x:undefined);Pt(t.y,n,At,e?e.y:undefined,s?s.y:undefined)}const Rt=()=>({translate:0,scale:1,origin:0,originPoint:0});const Ct=()=>({x:Rt(),y:Rt()});const Et=()=>({min:0,max:0});const Ot=()=>({x:Et(),y:Et()});function Bt(t){return t.translate===0&&t.scale===1}function Lt(t){return Bt(t.x)&&Bt(t.y)}function Ft(t,n){return t.min===n.min&&t.max===n.max}function It(t,n){return Ft(t.x,n.x)&&Ft(t.y,n.y)}function Dt(t,n){return Math.round(t.min)===Math.round(n.min)&&Math.round(t.max)===Math.round(n.max)}function Vt(t,n){return Dt(t.x,n.x)&&Dt(t.y,n.y)}function Nt(t){return T(t.x)/T(t.y)}function Ut(t,n){return t.translate===n.translate&&t.scale===n.scale&&t.originPoint===n.originPoint}class Xt{constructor(){this.members=[]}add(t){s.addUniqueItem(this.members,t);t.scheduleRender()}remove(t){s.removeItem(this.members,t);if(t===this.prevLead){this.prevLead=undefined}if(t===this.lead){const t=this.members[this.members.length-1];if(t){this.promote(t)}}}relegate(t){const n=this.members.findIndex((n=>t===n));if(n===0)return false;let e;for(let t=n;t>=0;t--){const n=this.members[t];if(n.isPresent!==false){e=n;break}}if(e){this.promote(e);return true}else{return false}}promote(t,n){const e=this.lead;if(t===e)return;this.prevLead=e;this.lead=t;t.show();if(e){e.instance&&e.scheduleRender();t.scheduleRender();t.resumeFrom=e;if(n){t.resumeFrom.preserveOpacity=true}if(e.snapshot){t.snapshot=e.snapshot;t.snapshot.latestValues=e.animationValues||e.latestValues}if(t.root&&t.root.isUpdating){t.isLayoutDirty=true}const{crossfade:s}=t.options;if(s===false){e.hide()}}}exitAnimationComplete(){this.members.forEach((t=>{const{options:n,resumingFrom:e}=t;n.onExitComplete&&n.onExitComplete();if(e){e.options.onExitComplete&&e.options.onExitComplete()}}))}scheduleRender(){this.members.forEach((t=>{t.instance&&t.scheduleRender(false)}))}removeLeadSnapshot(){if(this.lead&&this.lead.snapshot){this.lead.snapshot=undefined}}}const Wt={};function Yt(t){for(const n in t){Wt[n]=t[n];if(e.isCSSVariableName(n)){Wt[n].isCSSVariable=true}}}function zt(t,n,e){let s="";const i=t.x.translate/n.x;const o=t.y.translate/n.y;const r=e?.z||0;if(i||o||r){s=`translate3d(${i}px, ${o}px, ${r}px) `}if(n.x!==1||n.y!==1){s+=`scale(${1/n.x}, ${1/n.y}) `}if(e){const{transformPerspective:t,rotate:n,rotateX:i,rotateY:o,skewX:r,skewY:c}=e;if(t)s=`perspective(${t}px) ${s}`;if(n)s+=`rotate(${n}deg) `;if(i)s+=`rotateX(${i}deg) `;if(o)s+=`rotateY(${o}deg) `;if(r)s+=`skewX(${r}deg) `;if(c)s+=`skewY(${c}deg) `}const c=t.x.scale*n.x;const u=t.y.scale*n.y;if(c!==1||u!==1){s+=`scale(${c}, ${u})`}return s||"none"}function _t(t){return[t("x"),t("y")]}const Kt={hasAnimatedSinceResize:true,hasEverUpdated:false};const Ht={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0};const Zt=["","X","Y","Z"];const Gt=1e3;let qt=0;function Jt(t,n,e,s){const{latestValues:i}=n;if(i[t]){e[t]=i[t];n.setStaticValue(t,0);if(s){s[t]=0}}}function Qt(t){t.hasCheckedOptimisedAppear=true;if(t.root===t)return;const{visualElement:n}=t.options;if(!n)return;const s=_(n);if(window.MotionHasOptimisedAnimation(s,"transform")){const{layout:n,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(s,"transform",e.frame,!(n||i))}const{parent:i}=t;if(i&&!i.hasCheckedOptimisedAppear){Qt(i)}}function tn({attachResizeListener:t,defaultParent:n,measureScroll:i,checkIsScrollRoot:o,resetTransform:r}){return class c{constructor(t={},s=n?.()){this.id=qt++;this.animationId=0;this.animationCommitId=0;this.children=new Set;this.options={};this.isTreeAnimating=false;this.isAnimationBlocked=false;this.isLayoutDirty=false;this.isProjectionDirty=false;this.isSharedProjectionDirty=false;this.isTransformDirty=false;this.updateManuallyBlocked=false;this.updateBlockedByResize=false;this.isUpdating=false;this.isSVG=false;this.needsReset=false;this.shouldResetTransform=false;this.hasCheckedOptimisedAppear=false;this.treeScale={x:1,y:1};this.eventHandlers=new Map;this.hasTreeAnimated=false;this.updateScheduled=false;this.scheduleUpdate=()=>this.update();this.projectionUpdateScheduled=false;this.checkUpdateFailed=()=>{if(this.isUpdating){this.isUpdating=false;this.clearAllSnapshots()}};this.updateProjection=()=>{this.projectionUpdateScheduled=false;if(e.statsBuffer.value){Ht.nodes=Ht.calculatedTargetDeltas=Ht.calculatedProjections=0}this.nodes.forEach(sn);this.nodes.forEach(ln);this.nodes.forEach(hn);this.nodes.forEach(on);if(e.statsBuffer.addProjectionMetrics){e.statsBuffer.addProjectionMetrics(Ht)}};this.resolvedRelativeTargetAt=0;this.hasProjected=false;this.isVisible=true;this.animationProgress=0;this.sharedNodes=new Map;this.latestValues=t;this.root=s?s.root||s:this;this.path=s?[...s.path,s]:[];this.parent=s;this.depth=s?s.depth+1:0;for(let t=0;t<this.path.length;t++){this.path[t].shouldResetTransform=true}if(this.root===this)this.nodes=new H}addEventListener(t,n){if(!this.eventHandlers.has(t)){this.eventHandlers.set(t,new s.SubscriptionManager)}return this.eventHandlers.get(t).add(n)}notifyListeners(t,...n){const e=this.eventHandlers.get(t);e&&e.notify(...n)}hasListeners(t){return this.eventHandlers.has(t)}mount(n){if(this.instance)return;this.isSVG=e.isSVGElement(n)&&!e.isSVGSVGElement(n);this.instance=n;const{layoutId:s,layout:i,visualElement:o}=this.options;if(o&&!o.current){o.mount(n)}this.root.nodes.add(this);this.parent&&this.parent.children.add(this);if(this.root.hasTreeAnimated&&(i||s)){this.isLayoutDirty=true}if(t){let s;let i=0;const o=()=>this.root.updateBlockedByResize=false;e.frame.read((()=>{i=window.innerWidth}));t(n,(()=>{const t=window.innerWidth;if(t===i)return;i=t;this.root.updateBlockedByResize=true;s&&s();s=Z(o,250);if(Kt.hasAnimatedSinceResize){Kt.hasAnimatedSinceResize=false;this.nodes.forEach(fn)}}))}if(s){this.root.registerSharedNode(s,this)}if(this.options.animate!==false&&o&&(s||i)){this.addEventListener("didUpdate",(({delta:t,hasLayoutChanged:n,hasRelativeLayoutChanged:s,layout:i})=>{if(this.isTreeAnimationBlocked()){this.target=undefined;this.relativeTarget=undefined;return}const r=this.options.transition||o.getDefaultTransition()||vn;const{onLayoutAnimationStart:c,onLayoutAnimationComplete:u}=o.getProps();const a=!this.targetLayout||!Vt(this.targetLayout,i);const f=!n&&s;if(this.options.layoutRoot||this.resumeFrom||f||n&&(a||!this.currentAnimation)){if(this.resumeFrom){this.resumingFrom=this.resumeFrom;this.resumingFrom.resumingFrom=undefined}const n={...e.getValueTransition(r,"layout"),onPlay:c,onComplete:u};if(o.shouldReduceMotion||this.options.layoutRoot){n.delay=0;n.type=false}this.startAnimation(n);this.setAnimationOrigin(t,f)}else{if(!n){fn(this)}if(this.isLead()&&this.options.onExitComplete){this.options.onExitComplete()}}this.targetLayout=i}))}}unmount(){this.options.layoutId&&this.willUpdate();this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this);this.parent&&this.parent.children.delete(this);this.instance=undefined;this.eventHandlers.clear();e.cancelFrame(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=true}unblockUpdate(){this.updateManuallyBlocked=false}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||false}startUpdate(){if(this.isUpdateBlocked())return;this.isUpdating=true;this.nodes&&this.nodes.forEach(dn);this.animationId++}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=true){this.root.hasTreeAnimated=true;if(this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear){Qt(this)}!this.root.isUpdating&&this.root.startUpdate();if(this.isLayoutDirty)return;this.isLayoutDirty=true;for(let t=0;t<this.path.length;t++){const n=this.path[t];n.shouldResetTransform=true;n.updateScroll("snapshot");if(n.options.layoutRoot){n.willUpdate(false)}}const{layoutId:n,layout:e}=this.options;if(n===undefined&&!e)return;const s=this.getTransformTemplate();this.prevTransformTemplateValue=s?s(this.latestValues,""):undefined;this.updateSnapshot();t&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=false;const t=this.isUpdateBlocked();if(t){this.unblockUpdate();this.clearAllSnapshots();this.nodes.forEach(cn);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(un);return}this.animationCommitId=this.animationId;if(!this.isUpdating){this.nodes.forEach(un)}else{this.isUpdating=false;this.nodes.forEach(an);this.nodes.forEach(nn);this.nodes.forEach(en)}this.clearAllSnapshots();const n=e.time.now();e.frameData.delta=s.clamp(0,1e3/60,n-e.frameData.timestamp);e.frameData.timestamp=n;e.frameData.isProcessing=true;e.frameSteps.update.process(e.frameData);e.frameSteps.preRender.process(e.frameData);e.frameSteps.render.process(e.frameData);e.frameData.isProcessing=false}didUpdate(){if(!this.updateScheduled){this.updateScheduled=true;e.microtask.read(this.scheduleUpdate)}}clearAllSnapshots(){this.nodes.forEach(rn);this.sharedNodes.forEach(pn)}scheduleUpdateProjection(){if(!this.projectionUpdateScheduled){this.projectionUpdateScheduled=true;e.frame.preRender(this.updateProjection,false,true)}}scheduleCheckAfterUnmount(){e.frame.postRender((()=>{if(this.isLayoutDirty){this.root.didUpdate()}else{this.root.checkUpdateFailed()}}))}updateSnapshot(){if(this.snapshot||!this.instance)return;this.snapshot=this.measure();if(this.snapshot&&!T(this.snapshot.measuredBox.x)&&!T(this.snapshot.measuredBox.y)){this.snapshot=undefined}}updateLayout(){if(!this.instance)return;this.updateScroll();if(!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty){return}if(this.resumeFrom&&!this.resumeFrom.instance){for(let t=0;t<this.path.length;t++){const n=this.path[t];n.updateScroll()}}const t=this.layout;this.layout=this.measure(false);this.layoutCorrected=Ot();this.isLayoutDirty=false;this.projectionDelta=undefined;this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:n}=this.options;n&&n.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:undefined)}updateScroll(t="measure"){let n=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t){n=false}if(n&&this.instance){const n=o(this.instance);this.scroll={animationId:this.root.animationId,phase:t,isRoot:n,offset:i(this.instance),wasRoot:this.scroll?this.scroll.isRoot:n}}}resetTransform(){if(!r)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout;const n=this.projectionDelta&&!Lt(this.projectionDelta);const e=this.getTransformTemplate();const s=e?e(this.latestValues,""):undefined;const i=s!==this.prevTransformTemplateValue;if(t&&this.instance&&(n||lt(this.latestValues)||i)){r(this.instance,s);this.shouldResetTransform=false;this.scheduleRender()}}measure(t=true){const n=this.measurePageBox();let e=this.removeElementScroll(n);if(t){e=this.removeTransform(e)}Mn(e);return{animationId:this.root.animationId,measuredBox:n,layoutBox:e,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return Ot();const n=t.measureViewportBox();const e=this.scroll?.wasRoot||this.path.some(Tn);if(!e){const{scroll:t}=this.root;if(t){xt(n.x,t.offset.x);xt(n.y,t.offset.y)}}return n}removeElementScroll(t){const n=Ot();ct(n,t);if(this.scroll?.wasRoot){return n}for(let e=0;e<this.path.length;e++){const s=this.path[e];const{scroll:i,options:o}=s;if(s!==this.root&&i&&o.layoutScroll){if(i.wasRoot){ct(n,t)}xt(n.x,i.offset.x);xt(n.y,i.offset.y)}}return n}applyTransform(t,n=false){const e=Ot();ct(e,t);for(let t=0;t<this.path.length;t++){const s=this.path[t];if(!n&&s.options.layoutScroll&&s.scroll&&s!==s.root){Mt(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y})}if(!lt(s.latestValues))continue;Mt(e,s.latestValues)}if(lt(this.latestValues)){Mt(e,this.latestValues)}return e}removeTransform(t){const n=Ot();ct(n,t);for(let t=0;t<this.path.length;t++){const e=this.path[t];if(!e.instance)continue;if(!lt(e.latestValues))continue;ft(e.latestValues)&&e.updateSnapshot();const s=Ot();const i=e.measurePageBox();ct(s,i);jt(n,e.latestValues,e.snapshot?e.snapshot.layoutBox:undefined,s)}if(lt(this.latestValues)){jt(n,this.latestValues)}return n}setTargetDelta(t){this.targetDelta=t;this.root.scheduleUpdateProjection();this.isProjectionDirty=true}setOptions(t){this.options={...this.options,...t,crossfade:t.crossfade!==undefined?t.crossfade:true}}clearMeasurements(){this.scroll=undefined;this.layout=undefined;this.snapshot=undefined;this.prevTransformTemplateValue=undefined;this.targetDelta=undefined;this.target=undefined;this.isLayoutDirty=false}forceRelativeParentToResolveTarget(){if(!this.relativeParent)return;if(this.relativeParent.resolvedRelativeTargetAt!==e.frameData.timestamp){this.relativeParent.resolveTargetDelta(true)}}resolveTargetDelta(t=false){const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty);this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty);this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const s=Boolean(this.resumingFrom)||this!==n;const i=!(t||s&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize);if(i)return;const{layout:o,layoutId:r}=this.options;if(!this.layout||!(o||r))return;this.resolvedRelativeTargetAt=e.frameData.timestamp;if(!this.targetDelta&&!this.relativeTarget){const t=this.getClosestProjectingParent();if(t&&t.layout&&this.animationProgress!==1){this.relativeParent=t;this.forceRelativeParentToResolveTarget();this.relativeTarget=Ot();this.relativeTargetOrigin=Ot();E(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox);ct(this.relativeTarget,this.relativeTargetOrigin)}else{this.relativeParent=this.relativeTarget=undefined}}if(!this.relativeTarget&&!this.targetDelta)return;if(!this.target){this.target=Ot();this.targetWithTransforms=Ot()}if(this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target){this.forceRelativeParentToResolveTarget();R(this.target,this.relativeTarget,this.relativeParent.target)}else if(this.targetDelta){if(Boolean(this.resumingFrom)){this.target=this.applyTransform(this.layout.layoutBox)}else{ct(this.target,this.layout.layoutBox)}gt(this.target,this.targetDelta)}else{ct(this.target,this.layout.layoutBox)}if(this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=false;const t=this.getClosestProjectingParent();if(t&&Boolean(t.resumingFrom)===Boolean(this.resumingFrom)&&!t.options.layoutScroll&&t.target&&this.animationProgress!==1){this.relativeParent=t;this.forceRelativeParentToResolveTarget();this.relativeTarget=Ot();this.relativeTargetOrigin=Ot();E(this.relativeTargetOrigin,this.target,t.target);ct(this.relativeTarget,this.relativeTargetOrigin)}else{this.relativeParent=this.relativeTarget=undefined}}if(e.statsBuffer.value){Ht.calculatedTargetDeltas++}}getClosestProjectingParent(){if(!this.parent||ft(this.parent.latestValues)||ht(this.parent.latestValues)){return undefined}if(this.parent.isProjecting()){return this.parent}else{return this.parent.getClosestProjectingParent()}}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const t=this.getLead();const n=Boolean(this.resumingFrom)||this!==t;let s=true;if(this.isProjectionDirty||this.parent?.isProjectionDirty){s=false}if(n&&(this.isSharedProjectionDirty||this.isTransformDirty)){s=false}if(this.resolvedRelativeTargetAt===e.frameData.timestamp){s=false}if(s)return;const{layout:i,layoutId:o}=this.options;this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation);if(!this.isTreeAnimating){this.targetDelta=this.relativeTarget=undefined}if(!this.layout||!(i||o))return;ct(this.layoutCorrected,this.layout.layoutBox);const r=this.treeScale.x;const c=this.treeScale.y;bt(this.layoutCorrected,this.treeScale,this.path,n);if(t.layout&&!t.target&&(this.treeScale.x!==1||this.treeScale.y!==1)){t.target=t.layout.layoutBox;t.targetWithTransforms=Ot()}const{target:u}=t;if(!u){if(this.prevProjectionDelta){this.createProjectionDeltas();this.scheduleRender()}return}if(!this.projectionDelta||!this.prevProjectionDelta){this.createProjectionDeltas()}else{ut(this.prevProjectionDelta.x,this.projectionDelta.x);ut(this.prevProjectionDelta.y,this.projectionDelta.y)}A(this.projectionDelta,this.layoutCorrected,u,this.latestValues);if(this.treeScale.x!==r||this.treeScale.y!==c||!Ut(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ut(this.projectionDelta.y,this.prevProjectionDelta.y)){this.hasProjected=true;this.scheduleRender();this.notifyListeners("projectionUpdate",u)}if(e.statsBuffer.value){Ht.calculatedProjections++}}hide(){this.isVisible=false}show(){this.isVisible=true}scheduleRender(t=true){this.options.visualElement?.scheduleRender();if(t){const t=this.getStack();t&&t.scheduleRender()}if(this.resumingFrom&&!this.resumingFrom.instance){this.resumingFrom=undefined}}createProjectionDeltas(){this.prevProjectionDelta=Ct();this.projectionDelta=Ct();this.projectionDeltaWithTransform=Ct()}setAnimationOrigin(t,n=false){const e=this.snapshot;const s=e?e.latestValues:{};const i={...this.latestValues};const o=Ct();if(!this.relativeParent||!this.relativeParent.options.layoutRoot){this.relativeTarget=this.relativeTargetOrigin=undefined}this.attemptToResolveRelativeTarget=!n;const r=Ot();const c=e?e.source:undefined;const u=this.layout?this.layout.source:undefined;const a=c!==u;const f=this.getStack();const l=!f||f.members.length<=1;const h=Boolean(a&&!l&&this.options.crossfade===true&&!this.path.some(wn));this.animationProgress=0;let d;this.mixTargetDelta=n=>{const e=n/1e3;mn(o.x,t.x,e);mn(o.y,t.y,e);this.setTargetDelta(o);if(this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){E(r,this.layout.layoutBox,this.relativeParent.layout.layoutBox);gn(this.relativeTarget,this.relativeTargetOrigin,r,e);if(d&&It(this.relativeTarget,d)){this.isProjectionDirty=false}if(!d)d=Ot();ct(d,this.relativeTarget)}if(a){this.animationValues=i;nt(i,s,this.latestValues,e,h,l)}this.root.scheduleUpdateProjection();this.scheduleRender();this.animationProgress=e};this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart");this.currentAnimation?.stop();this.resumingFrom?.currentAnimation?.stop();if(this.pendingAnimation){e.cancelFrame(this.pendingAnimation);this.pendingAnimation=undefined}this.pendingAnimation=e.frame.update((()=>{Kt.hasAnimatedSinceResize=true;e.activeAnimations.layout++;this.motionValue||(this.motionValue=e.motionValue(0));this.currentAnimation=X(this.motionValue,[0,1e3],{...t,velocity:0,isSync:true,onUpdate:n=>{this.mixTargetDelta(n);t.onUpdate&&t.onUpdate(n)},onStop:()=>{e.activeAnimations.layout--},onComplete:()=>{e.activeAnimations.layout--;t.onComplete&&t.onComplete();this.completeAnimation()}});if(this.resumingFrom){this.resumingFrom.currentAnimation=this.currentAnimation}this.pendingAnimation=undefined}))}completeAnimation(){if(this.resumingFrom){this.resumingFrom.currentAnimation=undefined;this.resumingFrom.preserveOpacity=undefined}const t=this.getStack();t&&t.exitAnimationComplete();this.resumingFrom=this.currentAnimation=this.animationValues=undefined;this.notifyListeners("animationComplete")}finishAnimation(){if(this.currentAnimation){this.mixTargetDelta&&this.mixTargetDelta(Gt);this.currentAnimation.stop()}this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:n,target:e,layout:s,latestValues:i}=t;if(!n||!e||!s)return;if(this!==t&&this.layout&&s&&kn(this.options.animationType,this.layout.layoutBox,s.layoutBox)){e=this.target||Ot();const n=T(this.layout.layoutBox.x);e.x.min=t.target.x.min;e.x.max=e.x.min+n;const s=T(this.layout.layoutBox.y);e.y.min=t.target.y.min;e.y.max=e.y.min+s}ct(n,e);Mt(n,i);A(this.projectionDeltaWithTransform,this.layoutCorrected,n,i)}registerSharedNode(t,n){if(!this.sharedNodes.has(t)){this.sharedNodes.set(t,new Xt)}const e=this.sharedNodes.get(t);e.add(n);const s=n.options.initialPromotionConfig;n.promote({transition:s?s.transition:undefined,preserveFollowOpacity:s&&s.shouldPreserveFollowOpacity?s.shouldPreserveFollowOpacity(n):undefined})}isLead(){const t=this.getStack();return t?t.lead===this:true}getLead(){const{layoutId:t}=this.options;return t?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:t}=this.options;return t?this.getStack()?.prevLead:undefined}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:n,preserveFollowOpacity:e}={}){const s=this.getStack();if(s)s.promote(this,e);if(t){this.projectionDelta=undefined;this.needsReset=true}if(n)this.setOptions({transition:n})}relegate(){const t=this.getStack();if(t){return t.relegate(this)}else{return false}}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;let n=false;const{latestValues:e}=t;if(e.z||e.rotate||e.rotateX||e.rotateY||e.rotateZ||e.skewX||e.skewY){n=true}if(!n)return;const s={};if(e.z){Jt("z",t,s,this.animationValues)}for(let n=0;n<Zt.length;n++){Jt(`rotate${Zt[n]}`,t,s,this.animationValues);Jt(`skew${Zt[n]}`,t,s,this.animationValues)}t.render();for(const n in s){t.setStaticValue(n,s[n]);if(this.animationValues){this.animationValues[n]=s[n]}}t.scheduleRender()}applyProjectionStyles(t,n){if(!this.instance||this.isSVG)return;if(!this.isVisible){t.visibility="hidden";return}const e=this.getTransformTemplate();if(this.needsReset){this.needsReset=false;t.visibility="";t.opacity="";t.pointerEvents=G(n?.pointerEvents)||"";t.transform=e?e(this.latestValues,""):"none";return}const s=this.getLead();if(!this.projectionDelta||!this.layout||!s.target){if(this.options.layoutId){t.opacity=this.latestValues.opacity!==undefined?this.latestValues.opacity:1;t.pointerEvents=G(n?.pointerEvents)||""}if(this.hasProjected&&!lt(this.latestValues)){t.transform=e?e({},""):"none";this.hasProjected=false}return}t.visibility="";const i=s.animationValues||s.latestValues;this.applyTransformsToTarget();let o=zt(this.projectionDeltaWithTransform,this.treeScale,i);if(e){o=e(i,o)}t.transform=o;const{x:r,y:c}=this.projectionDelta;t.transformOrigin=`${r.origin*100}% ${c.origin*100}% 0`;if(s.animationValues){t.opacity=s===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit}else{t.opacity=s===this?i.opacity!==undefined?i.opacity:"":i.opacityExit!==undefined?i.opacityExit:0}for(const n in Wt){if(i[n]===undefined)continue;const{correct:e,applyTo:r,isCSSVariable:c}=Wt[n];const u=o==="none"?i[n]:e(i[n],s);if(r){const n=r.length;for(let e=0;e<n;e++){t[r[e]]=u}}else{if(c){this.options.visualElement.renderState.vars[n]=u}else{t[n]=u}}}if(this.options.layoutId){t.pointerEvents=s===this?G(n?.pointerEvents)||"":"none"}}clearSnapshot(){this.resumeFrom=this.snapshot=undefined}resetTree(){this.root.nodes.forEach((t=>t.currentAnimation?.stop()));this.root.nodes.forEach(cn);this.root.sharedNodes.clear()}}}function nn(t){t.updateLayout()}function en(t){const n=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:e,measuredBox:s}=t.layout;const{animationType:i}=t.options;const o=n.source!==t.layout.source;if(i==="size"){_t((t=>{const s=o?n.measuredBox[t]:n.layoutBox[t];const i=T(s);s.min=e[t].min;s.max=s.min+i}))}else if(kn(i,n.layoutBox,e)){_t((s=>{const i=o?n.measuredBox[s]:n.layoutBox[s];const r=T(e[s]);i.max=i.min+r;if(t.relativeTarget&&!t.currentAnimation){t.isProjectionDirty=true;t.relativeTarget[s].max=t.relativeTarget[s].min+r}}))}const r=Ct();A(r,e,n.layoutBox);const c=Ct();if(o){A(c,t.applyTransform(s,true),n.measuredBox)}else{A(c,e,n.layoutBox)}const u=!Lt(r);let a=false;if(!t.resumeFrom){const s=t.getClosestProjectingParent();if(s&&!s.resumeFrom){const{snapshot:i,layout:o}=s;if(i&&o){const r=Ot();E(r,n.layoutBox,i.layoutBox);const c=Ot();E(c,e,o.layoutBox);if(!Vt(r,c)){a=true}if(s.options.layoutRoot){t.relativeTarget=c;t.relativeTargetOrigin=r;t.relativeParent=s}}}}t.notifyListeners("didUpdate",{layout:e,snapshot:n,delta:c,layoutDelta:r,hasLayoutChanged:u,hasRelativeLayoutChanged:a})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=undefined}function sn(t){if(e.statsBuffer.value){Ht.nodes++}if(!t.parent)return;if(!t.isProjecting()){t.isProjectionDirty=t.parent.isProjectionDirty}t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty));t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty)}function on(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=false}function rn(t){t.clearSnapshot()}function cn(t){t.clearMeasurements()}function un(t){t.isLayoutDirty=false}function an(t){const{visualElement:n}=t.options;if(n&&n.getProps().onBeforeLayoutMeasure){n.notify("BeforeLayoutMeasure")}t.resetTransform()}function fn(t){t.finishAnimation();t.targetDelta=t.relativeTarget=t.target=undefined;t.isProjectionDirty=true}function ln(t){t.resolveTargetDelta()}function hn(t){t.calcProjection()}function dn(t){t.resetSkewAndRotation()}function pn(t){t.removeLeadSnapshot()}function mn(t,n,s){t.translate=e.mixNumber(n.translate,0,s);t.scale=e.mixNumber(n.scale,1,s);t.origin=n.origin;t.originPoint=n.originPoint}function yn(t,n,s,i){t.min=e.mixNumber(n.min,s.min,i);t.max=e.mixNumber(n.max,s.max,i)}function gn(t,n,e,s){yn(t.x,n.x,e.x,s);yn(t.y,n.y,e.y,s)}function wn(t){return t.animationValues&&t.animationValues.opacityExit!==undefined}const vn={duration:.45,ease:[.4,0,.1,1]};const bn=t=>typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t);const xn=bn("applewebkit/")&&!bn("chrome/")?Math.round:s.noop;function Sn(t){t.min=xn(t.min);t.max=xn(t.max)}function Mn(t){Sn(t.x);Sn(t.y)}function kn(t,n,e){return t==="position"||t==="preserve-aspect"&&!P(Nt(n),Nt(e),.2)}function Tn(t){return t!==t.root&&t.scroll?.wasRoot}function Pn(t,n,e,s={passive:true}){t.addEventListener(n,e,s);return()=>t.removeEventListener(n,e)}const $n=tn({attachResizeListener:(t,n)=>Pn(t,"resize",n),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>true});const An={current:undefined};const jn=tn({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!An.current){const t=new $n({});t.mount(window);t.setOptions({layoutScroll:true});An.current=t}return An.current},resetTransform:(t,n)=>{t.style.transform=n!==undefined?n:"none"},checkIsScrollRoot:t=>Boolean(window.getComputedStyle(t).position==="fixed")});function Rn(t,n){if(n.max===n.min)return 0;return t/(n.max-n.min)*100}const Cn={correct:(t,n)=>{if(!n.target)return t;if(typeof t==="string"){if(e.px.test(t)){t=parseFloat(t)}else{return t}}const s=Rn(t,n.target.x);const i=Rn(t,n.target.y);return`${s}% ${i}%`}};const En={correct:(t,{treeScale:n,projectionDelta:s})=>{const i=t;const o=e.complex.parse(t);if(o.length>5)return i;const r=e.complex.createTransformer(t);const c=typeof o[0]!=="number"?1:0;const u=s.x.scale*n.x;const a=s.y.scale*n.y;o[0+c]/=u;o[1+c]/=a;const f=e.mixNumber(u,a,.5);if(typeof o[2+c]==="number")o[2+c]/=f;if(typeof o[3+c]==="number")o[3+c]/=f;return r(o)}};function On({top:t,left:n,right:e,bottom:s}){return{x:{min:n,max:e},y:{min:t,max:s}}}function Bn({x:t,y:n}){return{top:n.min,right:t.max,bottom:n.max,left:t.min}}function Ln(t,n){if(!n)return t;const e=n({x:t.left,y:t.top});const s=n({x:t.right,y:t.bottom});return{top:e.y,left:e.x,bottom:s.y,right:s.x}}function Fn(t,n){return On(Ln(t.getBoundingClientRect(),n))}function In(t,n,e){const s=Fn(t,e);const{scroll:i}=n;if(i){xt(s.x,i.offset.x);xt(s.y,i.offset.y)}return s}const Dn={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"]};const Vn={};for(const t in Dn){Vn[t]={isEnabled:n=>Dn[t].some((t=>!!n[t]))}}const Nn={current:null};const Un={current:false};function Xn(){Un.current=true;if(!u)return;if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)");const n=()=>Nn.current=t.matches;t.addEventListener("change",n);n()}else{Nn.current=false}}const Wn=new WeakMap;function Yn(t){return t!==null&&typeof t==="object"&&typeof t.start==="function"}function zn(t){return typeof t==="string"||Array.isArray(t)}const _n=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"];const Kn=["initial",..._n];function Hn(t){return Yn(t.animate)||Kn.some((n=>zn(t[n])))}function Zn(t){return Boolean(Hn(t)||t.variants)}function Gn(t,n,s){for(const i in n){const o=n[i];const r=s[i];if(e.isMotionValue(o)){t.addValue(i,o)}else if(e.isMotionValue(r)){t.addValue(i,e.motionValue(o,{owner:t}))}else if(r!==o){if(t.hasValue(i)){const n=t.getValue(i);if(n.liveStyle===true){n.jump(o)}else if(!n.hasAnimated){n.set(o)}}else{const n=t.getStaticValue(i);t.addValue(i,e.motionValue(n!==undefined?n:o,{owner:t}))}}}for(const e in s){if(n[e]===undefined)t.removeValue(e)}return n}function qn(t){const n=[{},{}];t?.values.forEach(((t,e)=>{n[0][e]=t.get();n[1][e]=t.getVelocity()}));return n}function Jn(t,n,e,s){if(typeof n==="function"){const[i,o]=qn(s);n=n(e!==undefined?e:t.custom,i,o)}if(typeof n==="string"){n=t.variants&&t.variants[n]}if(typeof n==="function"){const[i,o]=qn(s);n=n(e!==undefined?e:t.custom,i,o)}return n}const Qn=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class te{scrapeMotionValuesFromProps(t,n,e){return{}}constructor({parent:t,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:o,visualState:r},c={}){this.current=null;this.children=new Set;this.isVariantNode=false;this.isControllingVariants=false;this.shouldReduceMotion=null;this.values=new Map;this.KeyframeResolver=e.KeyframeResolver;this.features={};this.valueSubscriptions=new Map;this.prevMotionValues={};this.events={};this.propEventSubscriptions={};this.notifyUpdate=()=>this.notify("Update",this.latestValues);this.render=()=>{if(!this.current)return;this.triggerBuild();this.renderInstance(this.current,this.renderState,this.props.style,this.projection)};this.renderScheduledAt=0;this.scheduleRender=()=>{const t=e.time.now();if(this.renderScheduledAt<t){this.renderScheduledAt=t;e.frame.render(this.render,false,true)}};const{latestValues:u,renderState:a}=r;this.latestValues=u;this.baseTarget={...u};this.initialValues=n.initial?{...u}:{};this.renderState=a;this.parent=t;this.props=n;this.presenceContext=s;this.depth=t?t.depth+1:0;this.reducedMotionConfig=i;this.options=c;this.blockInitialAnimation=Boolean(o);this.isControllingVariants=Hn(n);this.isVariantNode=Zn(n);if(this.isVariantNode){this.variantChildren=new Set}this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:f,...l}=this.scrapeMotionValuesFromProps(n,{},this);for(const t in l){const n=l[t];if(u[t]!==undefined&&e.isMotionValue(n)){n.set(u[t],false)}}}mount(t){this.current=t;Wn.set(t,this);if(this.projection&&!this.projection.instance){this.projection.mount(t)}if(this.parent&&this.isVariantNode&&!this.isControllingVariants){this.removeFromVariantTree=this.parent.addVariantChild(this)}this.values.forEach(((t,n)=>this.bindToMotionValue(n,t)));if(!Un.current){Xn()}this.shouldReduceMotion=this.reducedMotionConfig==="never"?false:this.reducedMotionConfig==="always"?true:Nn.current;if(this.parent)this.parent.children.add(this);this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount();e.cancelFrame(this.notifyUpdate);e.cancelFrame(this.render);this.valueSubscriptions.forEach((t=>t()));this.valueSubscriptions.clear();this.removeFromVariantTree&&this.removeFromVariantTree();this.parent&&this.parent.children.delete(this);for(const t in this.events){this.events[t].clear()}for(const t in this.features){const n=this.features[t];if(n){n.unmount();n.isMounted=false}}this.current=null}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)){this.valueSubscriptions.get(t)()}const s=e.transformProps.has(t);if(s&&this.onBindTransform){this.onBindTransform()}const i=n.on("change",(n=>{this.latestValues[t]=n;this.props.onUpdate&&e.frame.preRender(this.notifyUpdate);if(s&&this.projection){this.projection.isTransformDirty=true}}));const o=n.on("renderRequest",this.scheduleRender);let r;if(window.MotionCheckAppearSync){r=window.MotionCheckAppearSync(this,t,n)}this.valueSubscriptions.set(t,(()=>{i();o();if(r)r();if(n.owner)n.stop()}))}sortNodePosition(t){if(!this.current||!this.sortInstanceNodePosition||this.type!==t.type){return 0}return this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Vn){const n=Vn[t];if(!n)continue;const{isEnabled:e,Feature:s}=n;if(!this.features[t]&&s&&e(this.props)){this.features[t]=new s(this)}if(this.features[t]){const n=this.features[t];if(n.isMounted){n.update()}else{n.mount();n.isMounted=true}}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ot()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){if(t.transformTemplate||this.props.transformTemplate){this.scheduleRender()}this.prevProps=this.props;this.props=t;this.prevPresenceContext=this.presenceContext;this.presenceContext=n;for(let n=0;n<Qn.length;n++){const e=Qn[n];if(this.propEventSubscriptions[e]){this.propEventSubscriptions[e]();delete this.propEventSubscriptions[e]}const s="on"+e;const i=t[s];if(i){this.propEventSubscriptions[e]=this.on(e,i)}}this.prevMotionValues=Gn(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues);if(this.handleChildMotionValue){this.handleChildMotionValue()}}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:undefined}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():undefined}addVariantChild(t){const n=this.getClosestVariantNode();if(n){n.variantChildren&&n.variantChildren.add(t);return()=>n.variantChildren.delete(t)}}addValue(t,n){const e=this.values.get(t);if(n!==e){if(e)this.removeValue(t);this.bindToMotionValue(t,n);this.values.set(t,n);this.latestValues[t]=n.get()}}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);if(n){n();this.valueSubscriptions.delete(t)}delete this.latestValues[t];this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t]){return this.props.values[t]}let s=this.values.get(t);if(s===undefined&&n!==undefined){s=e.motionValue(n===null?undefined:n,{owner:this});this.addValue(t,s)}return s}readValue(t,n){let i=this.latestValues[t]!==undefined||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);if(i!==undefined&&i!==null){if(typeof i==="string"&&(s.isNumericalString(i)||s.isZeroValueString(i))){i=parseFloat(i)}else if(!e.findValueType(i)&&e.complex.test(n)){i=e.getAnimatableNone(t,n)}this.setBaseTarget(t,e.isMotionValue(i)?i.get():i)}return e.isMotionValue(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let s;if(typeof n==="string"||typeof n==="object"){const e=Jn(this.props,n,this.presenceContext?.custom);if(e){s=e[t]}}if(n&&s!==undefined){return s}const i=this.getBaseTargetFromProps(this.props,t);if(i!==undefined&&!e.isMotionValue(i))return i;return this.initialValues[t]!==undefined&&s===undefined?undefined:this.baseTarget[t]}on(t,n){if(!this.events[t]){this.events[t]=new s.SubscriptionManager}return this.events[t].add(n)}notify(t,...n){if(this.events[t]){this.events[t].notify(...n)}}scheduleRenderMicrotask(){e.microtask.render(this.render)}}class ne extends te{constructor(){super(...arguments);this.KeyframeResolver=e.DOMKeyframesResolver}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:undefined}removeValueFromRenderState(t,{vars:n,style:e}){delete n[t];delete e[t]}handleChildMotionValue(){if(this.childSubscription){this.childSubscription();delete this.childSubscription}const{children:t}=this.props;if(e.isMotionValue(t)){this.childSubscription=t.on("change",(t=>{if(this.current){this.current.textContent=`${t}`}}))}}}const ee={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};const se=e.transformPropOrder.length;function ie(t,n,s){let i="";let o=true;for(let r=0;r<se;r++){const c=e.transformPropOrder[r];const u=t[c];if(u===undefined)continue;let a=true;if(typeof u==="number"){a=u===(c.startsWith("scale")?1:0)}else{a=parseFloat(u)===0}if(!a||s){const t=e.getValueAsType(u,e.numberValueTypes[c]);if(!a){o=false;const n=ee[c]||c;i+=`${n}(${t}) `}if(s){n[c]=t}}}i=i.trim();if(s){i=s(n,o?"":i)}else if(o){i="none"}return i}function oe(t,n,s){const{style:i,vars:o,transformOrigin:r}=t;let c=false;let u=false;for(const t in n){const s=n[t];if(e.transformProps.has(t)){c=true;continue}else if(e.isCSSVariableName(t)){o[t]=s;continue}else{const n=e.getValueAsType(s,e.numberValueTypes[t]);if(t.startsWith("origin")){u=true;r[t]=n}else{i[t]=n}}}if(!n.transform){if(c||s){i.transform=ie(n,t.transform,s)}else if(i.transform){i.transform="none"}}if(u){const{originX:t="50%",originY:n="50%",originZ:e=0}=r;i.transformOrigin=`${t} ${n} ${e}`}}function re(t,{style:n,vars:e},s,i){const o=t.style;let r;for(r in n){o[r]=n[r]}i?.applyProjectionStyles(o,s);for(r in e){o.setProperty(r,e[r])}}function ce(t,{layout:n,layoutId:s}){return e.transformProps.has(t)||t.startsWith("origin")||(n||s!==undefined)&&(!!Wt[t]||t==="opacity")}function ue(t,n,s){const{style:i}=t;const o={};for(const r in i){if(e.isMotionValue(i[r])||n.style&&e.isMotionValue(n.style[r])||ce(r,t)||s?.getValue(r)?.liveStyle!==undefined){o[r]=i[r]}}return o}function ae(t){return window.getComputedStyle(t)}class fe extends ne{constructor(){super(...arguments);this.type="html";this.renderInstance=re}readValueFromInstance(t,n){if(e.transformProps.has(n)){return this.projection?.isProjecting?e.defaultTransformValue(n):e.readTransformValue(t,n)}else{const s=ae(t);const i=(e.isCSSVariableName(n)?s.getPropertyValue(n):s[n])||0;return typeof i==="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Fn(t,n)}build(t,n,e){oe(t,n,e.transformTemplate)}scrapeMotionValuesFromProps(t,n,e){return ue(t,n,e)}}const le=n.createContext({strict:false});function he(t){for(const n in t){Vn[n]={...Vn[n],...t[n]}}}const de=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function pe(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||de.has(t)}let me=t=>!pe(t);function ye(t){if(typeof t!=="function")return;me=n=>n.startsWith("on")?!pe(n):t(n)}try{ye(require("@emotion/is-prop-valid").default)}catch{}function ge(t,n,e){const s={};for(const i in t){if(i==="values"&&typeof t.values==="object")continue;if(me(i)||e===true&&pe(i)||!n&&!pe(i)||t["draggable"]&&i.startsWith("onDrag")){s[i]=t[i]}}return s}const we={offset:"stroke-dashoffset",array:"stroke-dasharray"};const ve={offset:"strokeDashoffset",array:"strokeDasharray"};function be(t,n,s=1,i=0,o=true){t.pathLength=1;const r=o?we:ve;t[r.offset]=e.px.transform(-i);const c=e.px.transform(n);const u=e.px.transform(s);t[r.array]=`${c} ${u}`}function xe(t,{attrX:n,attrY:e,attrScale:s,pathLength:i,pathSpacing:o=1,pathOffset:r=0,...c},u,a,f){oe(t,c,a);if(u){if(t.style.viewBox){t.attrs.viewBox=t.style.viewBox}return}t.attrs=t.style;t.style={};const{attrs:l,style:h}=t;if(l.transform){h.transform=l.transform;delete l.transform}if(h.transform||l.transformOrigin){h.transformOrigin=l.transformOrigin??"50% 50%";delete l.transformOrigin}if(h.transform){h.transformBox=f?.transformBox??"fill-box";delete l.transformBox}if(n!==undefined)l.x=n;if(e!==undefined)l.y=e;if(s!==undefined)l.scale=s;if(i!==undefined){be(l,i,o,r,false)}}const Se=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"]);const Me=t=>typeof t==="string"&&t.toLowerCase()==="svg";function ke(t,n,e,s){re(t,n,undefined,s);for(const e in n.attrs){t.setAttribute(!Se.has(e)?W(e):e,n.attrs[e])}}function Te(t,n,s){const i=ue(t,n,s);for(const s in t){if(e.isMotionValue(t[s])||e.isMotionValue(n[s])){const n=e.transformPropOrder.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;i[n]=t[s]}}return i}class Pe extends ne{constructor(){super(...arguments);this.type="svg";this.isSVGTag=false;this.measureInstanceViewportBox=Ot}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(e.transformProps.has(n)){const t=e.getDefaultValueType(n);return t?t.default||0:0}n=!Se.has(n)?W(n):n;return t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,e){return Te(t,n,e)}build(t,n,e){xe(t,n,this.isSVGTag,e.transformTemplate,e.style)}renderInstance(t,n,e,s){ke(t,n,e,s)}mount(t){this.isSVGTag=Me(t.tagName);super.mount(t)}}const $e=["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 Ae(t){if(typeof t!=="string"||t.includes("-")){return false}else if($e.indexOf(t)>-1||/[A-Z]/u.test(t)){return true}return false}const je=(t,e)=>Ae(t)?new Pe(e):new fe(e,{allowProjection:t!==n.Fragment});const Re=n.createContext({});function Ce(t,n){if(Hn(t)){const{initial:n,animate:e}=t;return{initial:n===false||zn(n)?n:undefined,animate:zn(e)?e:undefined}}return t.inherit!==false?n:{}}function Ee(t){const{initial:e,animate:s}=Ce(t,n.useContext(Re));return n.useMemo((()=>({initial:e,animate:s})),[Oe(e),Oe(s)])}function Oe(t){return Array.isArray(t)?t.join(" "):t}const Be=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Le(t,n,s){for(const i in n){if(!e.isMotionValue(n[i])&&!ce(i,s)){t[i]=n[i]}}}function Fe({transformTemplate:t},e){return n.useMemo((()=>{const n=Be();oe(n,e,t);return Object.assign({},n.vars,n.style)}),[e])}function Ie(t,n){const e=t.style||{};const s={};Le(s,e,t);Object.assign(s,Fe(t,n));return s}function De(t,n){const e={};const s=Ie(t,n);if(t.drag&&t.dragListener!==false){e.draggable=false;s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none";s.touchAction=t.drag===true?"none":`pan-${t.drag==="x"?"y":"x"}`}if(t.tabIndex===undefined&&(t.onTap||t.onTapStart||t.whileTap)){e.tabIndex=0}e.style=s;return e}const Ve=()=>({...Be(),attrs:{}});function Ne(t,e,s,i){const o=n.useMemo((()=>{const n=Ve();xe(n,e,Me(i),t.transformTemplate,t.style);return{...n.attrs,style:{...n.style}}}),[e]);if(t.style){const n={};Le(n,t.style,t);o.style={...n,...o.style}}return o}function Ue(t,s,i,{latestValues:o},r,c=false){const u=Ae(t)?Ne:De;const a=u(s,o,r,t);const f=ge(s,typeof t==="string",c);const l=t!==n.Fragment?{...f,...a,ref:i}:{};const{children:h}=s;const d=n.useMemo((()=>e.isMotionValue(h)?h.get():h),[h]);return n.createElement(t,{...l,children:d})}function Xe({scrapeMotionValuesFromProps:t,createRenderState:n},e,s,i){const o={latestValues:We(e,s,i,t),renderState:n()};return o}function We(t,n,e,s){const i={};const o=s(t,{});for(const t in o){i[t]=G(o[t])}let{initial:r,animate:c}=t;const u=Hn(t);const a=Zn(t);if(n&&a&&!u&&t.inherit!==false){if(r===undefined)r=n.initial;if(c===undefined)c=n.animate}let f=e?e.initial===false:false;f=f||r===false;const l=f?c:r;if(l&&typeof l!=="boolean"&&!Yn(l)){const n=Array.isArray(l)?l:[l];for(let e=0;e<n.length;e++){const s=Jn(t,n[e]);if(s){const{transitionEnd:t,transition:n,...e}=s;for(const t in e){let n=e[t];if(Array.isArray(n)){const t=f?n.length-1:0;n=n[t]}if(n!==null){i[t]=n}}for(const n in t){i[n]=t[n]}}}}return i}const Ye=t=>(e,s)=>{const i=n.useContext(Re);const o=n.useContext(l);const c=()=>Xe(t,e,i,o);return s?c():r(c)};const ze=Ye({scrapeMotionValuesFromProps:ue,createRenderState:Be});const _e=Ye({scrapeMotionValuesFromProps:Te,createRenderState:Ve});const Ke=Symbol.for("motionComponentSymbol");function He(t){return t&&typeof t==="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Ze(t,e,s){return n.useCallback((n=>{if(n){t.onMount&&t.onMount(n)}if(e){if(n){e.mount(n)}else{e.unmount()}}if(s){if(typeof s==="function"){s(n)}else if(He(s)){s.current=n}}}),[e])}const Ge=n.createContext({});function qe(t,e,s,i,o){const{visualElement:r}=n.useContext(Re);const c=n.useContext(le);const u=n.useContext(l);const a=n.useContext(h).reducedMotion;const d=n.useRef(null);i=i||c.renderer;if(!d.current&&i){d.current=i(t,{visualState:e,parent:r,props:s,presenceContext:u,blockInitialAnimation:u?u.initial===false:false,reducedMotionConfig:a})}const p=d.current;const m=n.useContext(Ge);if(p&&!p.projection&&o&&(p.type==="html"||p.type==="svg")){Je(d.current,s,o,m)}const y=n.useRef(false);n.useInsertionEffect((()=>{if(p&&y.current){p.update(s,u)}}));const g=s[z];const w=n.useRef(Boolean(g)&&!window.MotionHandoffIsComplete?.(g)&&window.MotionHasOptimisedAnimation?.(g));f((()=>{if(!p)return;y.current=true;window.MotionIsMounted=true;p.updateFeatures();p.scheduleRenderMicrotask();if(w.current&&p.animationState){p.animationState.animateChanges()}}));n.useEffect((()=>{if(!p)return;if(!w.current&&p.animationState){p.animationState.animateChanges()}if(w.current){queueMicrotask((()=>{window.MotionHandoffMarkAsComplete?.(g)}));w.current=false}}));return p}function Je(t,n,e,s){const{layoutId:i,layout:o,drag:r,dragConstraints:c,layoutScroll:u,layoutRoot:a,layoutCrossfade:f}=n;t.projection=new e(t.latestValues,n["data-framer-portal-id"]?undefined:Qe(t.parent));t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:Boolean(r)||c&&He(c),visualElement:t,animationType:typeof o==="string"?o:"both",initialPromotionConfig:s,crossfade:f,layoutScroll:u,layoutRoot:a})}function Qe(t){if(!t)return undefined;return t.options.allowProjection!==false?t.projection:Qe(t.parent)}function ts(t,{forwardMotionProps:e=false}={},s,o){s&&he(s);const r=Ae(t)?_e:ze;function c(s,c){let a;const f={...n.useContext(h),...s,layoutId:ns(s)};const{isStatic:l}=f;const d=Ee(s);const p=r(s,l);if(!l&&u){es();const n=ss(f);a=n.MeasureLayout;d.visualElement=qe(t,p,f,o,n.ProjectionNode)}return i.jsxs(Re.Provider,{value:d,children:[a&&d.visualElement?i.jsx(a,{visualElement:d.visualElement,...f}):null,Ue(t,s,Ze(p,d.visualElement,c),p,l,e)]})}c.displayName=`motion.${typeof t==="string"?t:`create(${t.displayName??t.name??""})`}`;const a=n.forwardRef(c);a[Ke]=t;return a}function ns({layoutId:t}){const e=n.useContext(o).id;return e&&t!==undefined?e+"-"+t:t}function es(t,e){n.useContext(le).strict}function ss(t){const{drag:n,layout:e}=Vn;if(!n&&!e)return{};const s={...n,...e};return{MeasureLayout:n?.isEnabled(t)||e?.isEnabled(t)?s.MeasureLayout:undefined,ProjectionNode:s.ProjectionNode}}function is(t,n,e){const s=t.getProps();return Jn(s,n,e!==undefined?e:s.custom,t)}const os=t=>Array.isArray(t);function rs(t,n,s){if(t.hasValue(n)){t.getValue(n).set(s)}else{t.addValue(n,e.motionValue(s))}}function cs(t){return os(t)?t[t.length-1]||0:t}function us(t,n){const e=is(t,n);let{transitionEnd:s={},transition:i={},...o}=e||{};o={...o,...s};for(const n in o){const e=cs(o[n]);rs(t,n,e)}}function as(t){return Boolean(e.isMotionValue(t)&&t.add)}function fs(t,n){const e=t.getValue("willChange");if(as(e)){return e.add(n)}else if(!e&&s.MotionGlobalConfig.WillChange){const e=new s.MotionGlobalConfig.WillChange("auto");t.addValue("willChange",e);e.add(n)}}function ls({protectedKeys:t,needsAnimating:n},e){const s=t.hasOwnProperty(e)&&n[e]!==true;n[e]=false;return s}function hs(t,n,{delay:s=0,transitionOverride:i,type:o}={}){let{transition:r=t.getDefaultTransition(),transitionEnd:c,...u}=n;if(i)r=i;const a=[];const f=o&&t.animationState&&t.animationState.getState()[o];for(const n in u){const i=t.getValue(n,t.latestValues[n]??null);const o=u[n];if(o===undefined||f&&ls(f,n)){continue}const c={delay:s,...e.getValueTransition(r||{},n)};const l=i.get();if(l!==undefined&&!i.isAnimating&&!Array.isArray(o)&&o===l&&!c.velocity){continue}let h=false;if(window.MotionHandoffAnimation){const s=_(t);if(s){const t=window.MotionHandoffAnimation(s,n,e.frame);if(t!==null){c.startTime=t;h=true}}}fs(t,n);i.start(U(n,i,o,t.shouldReduceMotion&&e.positionalKeys.has(n)?{type:false}:c,t,h));const d=i.animation;if(d){a.push(d)}}if(c){Promise.all(a).then((()=>{e.frame.update((()=>{c&&us(t,c)}))}))}return a}function ds(t,n,e={}){const s=is(t,n,e.type==="exit"?t.presenceContext?.custom:undefined);let{transition:i=t.getDefaultTransition()||{}}=s||{};if(e.transitionOverride){i=e.transitionOverride}const o=s?()=>Promise.all(hs(t,s,e)):()=>Promise.resolve();const r=t.variantChildren&&t.variantChildren.size?(s=0)=>{const{delayChildren:o=0,staggerChildren:r,staggerDirection:c}=i;return ps(t,n,s,o,r,c,e)}:()=>Promise.resolve();const{when:c}=i;if(c){const[t,n]=c==="beforeChildren"?[o,r]:[r,o];return t().then((()=>n()))}else{return Promise.all([o(),r(e.delay)])}}function ps(t,n,e=0,s=0,i=0,o=1,r){const c=[];const u=t.variantChildren.size;const a=(u-1)*i;const f=typeof s==="function";const l=f?t=>s(t,u):o===1?(t=0)=>t*i:(t=0)=>a-t*i;Array.from(t.variantChildren).sort(ms).forEach(((t,i)=>{t.notify("AnimationStart",n);c.push(ds(t,n,{...r,delay:e+(f?0:s)+l(i)}).then((()=>t.notify("AnimationComplete",n))))}));return Promise.all(c)}function ms(t,n){return t.sortNodePosition(n)}function ys(t,n,e={}){t.notify("AnimationStart",n);let s;if(Array.isArray(n)){const i=n.map((n=>ds(t,n,e)));s=Promise.all(i)}else if(typeof n==="string"){s=ds(t,n,e)}else{const i=typeof n==="function"?is(t,n,e.custom):n;s=Promise.all(hs(t,i,e))}return s.then((()=>{t.notify("AnimationComplete",n)}))}function gs(t,n){if(!Array.isArray(n))return false;const e=n.length;if(e!==t.length)return false;for(let s=0;s<e;s++){if(n[s]!==t[s])return false}return true}const ws=Kn.length;function vs(t){if(!t)return undefined;if(!t.isControllingVariants){const n=t.parent?vs(t.parent)||{}:{};if(t.props.initial!==undefined){n.initial=t.props.initial}return n}const n={};for(let e=0;e<ws;e++){const s=Kn[e];const i=t.props[s];if(zn(i)||i===false){n[s]=i}}return n}const bs=[..._n].reverse();const xs=_n.length;function Ss(t){return n=>Promise.all(n.map((({animation:n,options:e})=>ys(t,n,e))))}function Ms(t){let n=Ss(t);let e=Ps();let s=true;const i=n=>(e,s)=>{const i=is(t,s,n==="exit"?t.presenceContext?.custom:undefined);if(i){const{transition:t,transitionEnd:n,...s}=i;e={...e,...s,...n}}return e};function o(e){n=e(t)}function r(o){const{props:r}=t;const c=vs(t.parent)||{};const u=[];const a=new Set;let f={};let l=Infinity;for(let n=0;n<xs;n++){const h=bs[n];const d=e[h];const p=r[h]!==undefined?r[h]:c[h];const m=zn(p);const y=h===o?d.isActive:null;if(y===false)l=n;let g=p===c[h]&&p!==r[h]&&m;if(g&&s&&t.manuallyAnimateOnMount){g=false}d.protectedKeys={...f};if(!d.isActive&&y===null||!p&&!d.prevProp||Yn(p)||typeof p==="boolean"){continue}const w=ks(d.prevProp,p);let v=w||h===o&&d.isActive&&!g&&m||n>l&&m;let b=false;const x=Array.isArray(p)?p:[p];let S=x.reduce(i(h),{});if(y===false)S={};const{prevResolvedValues:M={}}=d;const k={...M,...S};const T=n=>{v=true;if(a.has(n)){b=true;a.delete(n)}d.needsAnimating[n]=true;const e=t.getValue(n);if(e)e.liveStyle=false};for(const t in k){const n=S[t];const e=M[t];if(f.hasOwnProperty(t))continue;let s=false;if(os(n)&&os(e)){s=!gs(n,e)}else{s=n!==e}if(s){if(n!==undefined&&n!==null){T(t)}else{a.add(t)}}else if(n!==undefined&&a.has(t)){T(t)}else{d.protectedKeys[t]=true}}d.prevProp=p;d.prevResolvedValues=S;if(d.isActive){f={...f,...S}}if(s&&t.blockInitialAnimation){v=false}const P=g&&w;const $=!P||b;if(v&&$){u.push(...x.map((t=>({animation:t,options:{type:h}}))))}}if(a.size){const n={};if(typeof r.initial!=="boolean"){const e=is(t,Array.isArray(r.initial)?r.initial[0]:r.initial);if(e&&e.transition){n.transition=e.transition}}a.forEach((e=>{const s=t.getBaseTarget(e);const i=t.getValue(e);if(i)i.liveStyle=true;n[e]=s??null}));u.push({animation:n})}let h=Boolean(u.length);if(s&&(r.initial===false||r.initial===r.animate)&&!t.manuallyAnimateOnMount){h=false}s=false;return h?n(u):Promise.resolve()}function c(n,s){if(e[n].isActive===s)return Promise.resolve();t.variantChildren?.forEach((t=>t.animationState?.setActive(n,s)));e[n].isActive=s;const i=r(n);for(const t in e){e[t].protectedKeys={}}return i}return{animateChanges:r,setActive:c,setAnimateFunction:o,getState:()=>e,reset:()=>{e=Ps();s=true}}}function ks(t,n){if(typeof n==="string"){return n!==t}else if(Array.isArray(n)){return!gs(n,t)}return false}function Ts(t=false){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ps(){return{animate:Ts(true),whileInView:Ts(),whileHover:Ts(),whileTap:Ts(),whileDrag:Ts(),whileFocus:Ts(),exit:Ts()}}class $s{constructor(t){this.isMounted=false;this.node=t}update(){}}class As extends $s{constructor(t){super(t);t.animationState||(t.animationState=Ms(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();if(Yn(t)){this.unmountControls=t.subscribe(this.node)}}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps();const{animate:n}=this.node.prevProps||{};if(t!==n){this.updateAnimationControlsSubscription()}}unmount(){this.node.animationState.reset();this.unmountControls?.()}}let js=0;class Rs extends $s{constructor(){super(...arguments);this.id=js++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext;const{isPresent:e}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===e){return}const s=this.node.animationState.setActive("exit",!t);if(n&&!t){s.then((()=>{n(this.id)}))}}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};if(n){n(this.id)}if(t){this.unmount=t(this.id)}}unmount(){}}const Cs={animation:{Feature:As},exit:{Feature:Rs}};function Es(t){return{point:{x:t.pageX,y:t.pageY}}}const Os=t=>n=>e.isPrimaryPointer(n)&&t(n,Es(n));function Bs(t,n,e,s){return Pn(t,n,Os(e),s)}const Ls=({current:t})=>t?t.ownerDocument.defaultView:null;const Fs=(t,n)=>Math.abs(t-n);function Is(t,n){const e=Fs(t.x,n.x);const s=Fs(t.y,n.y);return Math.sqrt(e**2+s**2)}class Ds{constructor(t,n,{transformPagePoint:i,contextWindow:o=window,dragSnapToOrigin:r=false,distanceThreshold:c=3}={}){this.startEvent=null;this.lastMoveEvent=null;this.lastMoveEventInfo=null;this.handlers={};this.contextWindow=window;this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const t=Us(this.lastMoveEventInfo,this.history);const n=this.startEvent!==null;const s=Is(t.offset,{x:0,y:0})>=this.distanceThreshold;if(!n&&!s)return;const{point:i}=t;const{timestamp:o}=e.frameData;this.history.push({...i,timestamp:o});const{onStart:r,onMove:c}=this.handlers;if(!n){r&&r(this.lastMoveEvent,t);this.startEvent=this.lastMoveEvent}c&&c(this.lastMoveEvent,t)};this.handlePointerMove=(t,n)=>{this.lastMoveEvent=t;this.lastMoveEventInfo=Vs(n,this.transformPagePoint);e.frame.update(this.updatePoint,true)};this.handlePointerUp=(t,n)=>{this.end();const{onEnd:e,onSessionEnd:s,resumeAnimation:i}=this.handlers;if(this.dragSnapToOrigin)i&&i();if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const o=Us(t.type==="pointercancel"?this.lastMoveEventInfo:Vs(n,this.transformPagePoint),this.history);if(this.startEvent&&e){e(t,o)}s&&s(t,o)};if(!e.isPrimaryPointer(t))return;this.dragSnapToOrigin=r;this.handlers=n;this.transformPagePoint=i;this.distanceThreshold=c;this.contextWindow=o||window;const u=Es(t);const a=Vs(u,this.transformPagePoint);const{point:f}=a;const{timestamp:l}=e.frameData;this.history=[{...f,timestamp:l}];const{onSessionStart:h}=n;h&&h(t,Us(a,this.history));this.removeListeners=s.pipe(Bs(this.contextWindow,"pointermove",this.handlePointerMove),Bs(this.contextWindow,"pointerup",this.handlePointerUp),Bs(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners();e.cancelFrame(this.updatePoint)}}function Vs(t,n){return n?{point:n(t.point)}:t}function Ns(t,n){return{x:t.x-n.x,y:t.y-n.y}}function Us({point:t},n){return{point:t,delta:Ns(t,Ws(n)),offset:Ns(t,Xs(n)),velocity:Ys(n,.1)}}function Xs(t){return t[0]}function Ws(t){return t[t.length-1]}function Ys(t,n){if(t.length<2){return{x:0,y:0}}let e=t.length-1;let i=null;const o=Ws(t);while(e>=0){i=t[e];if(o.timestamp-i.timestamp>s.secondsToMilliseconds(n)){break}e--}if(!i){return{x:0,y:0}}const r=s.millisecondsToSeconds(o.timestamp-i.timestamp);if(r===0){return{x:0,y:0}}const c={x:(o.x-i.x)/r,y:(o.y-i.y)/r};if(c.x===Infinity){c.x=0}if(c.y===Infinity){c.y=0}return c}function zs(t,{min:n,max:s},i){if(n!==undefined&&t<n){t=i?e.mixNumber(n,t,i.min):Math.max(t,n)}else if(s!==undefined&&t>s){t=i?e.mixNumber(s,t,i.max):Math.min(t,s)}return t}function _s(t,n,e){return{min:n!==undefined?t.min+n:undefined,max:e!==undefined?t.max+e-(t.max-t.min):undefined}}function Ks(t,{top:n,left:e,bottom:s,right:i}){return{x:_s(t.x,e,i),y:_s(t.y,n,s)}}function Hs(t,n){let e=n.min-t.min;let s=n.max-t.max;if(n.max-n.min<t.max-t.min){[e,s]=[s,e]}return{min:e,max:s}}function Zs(t,n){return{x:Hs(t.x,n.x),y:Hs(t.y,n.y)}}function Gs(t,n){let e=.5;const i=T(t);const o=T(n);if(o>i){e=s.progress(n.min,n.max-i,t.min)}else if(i>o){e=s.progress(t.min,t.max-o,n.min)}return s.clamp(0,1,e)}function qs(t,n){const e={};if(n.min!==undefined){e.min=n.min-t.min}if(n.max!==undefined){e.max=n.max-t.min}return e}const Js=.35;function Qs(t=Js){if(t===false){t=0}else if(t===true){t=Js}return{x:ti(t,"left","right"),y:ti(t,"top","bottom")}}function ti(t,n,e){return{min:ni(t,n),max:ni(t,e)}}function ni(t,n){return typeof t==="number"?t:t[n]||0}const ei=new WeakMap;class si{constructor(t){this.openDragLock=null;this.isDragging=false;this.currentDirection=null;this.originPoint={x:0,y:0};this.constraints=false;this.hasMutatedConstraints=false;this.elastic=Ot();this.latestPointerEvent=null;this.latestPanInfo=null;this.visualElement=t}start(t,{snapToCursor:n=false,distanceThreshold:s}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===false)return;const o=t=>{const{dragSnapToOrigin:e}=this.getProps();e?this.pauseAnimation():this.stopAnimation();if(n){this.snapToCursor(Es(t).point)}};const r=(t,n)=>{const{drag:s,dragPropagation:i,onDragStart:o}=this.getProps();if(s&&!i){if(this.openDragLock)this.openDragLock();this.openDragLock=e.setDragLock(s);if(!this.openDragLock)return}this.latestPointerEvent=t;this.latestPanInfo=n;this.isDragging=true;this.currentDirection=null;this.resolveConstraints();if(this.visualElement.projection){this.visualElement.projection.isAnimationBlocked=true;this.visualElement.projection.target=undefined}_t((t=>{let n=this.getAxisMotionValue(t).get()||0;if(e.percent.test(n)){const{projection:e}=this.visualElement;if(e&&e.layout){const s=e.layout.layoutBox[t];if(s){const t=T(s);n=t*(parseFloat(n)/100)}}}this.originPoint[t]=n}));if(o){e.frame.postRender((()=>o(t,n)))}fs(this.visualElement,"transform");const{animationState:r}=this.visualElement;r&&r.setActive("whileDrag",true)};const c=(t,n)=>{this.latestPointerEvent=t;this.latestPanInfo=n;const{dragPropagation:e,dragDirectionLock:s,onDirectionLock:i,onDrag:o}=this.getProps();if(!e&&!this.openDragLock)return;const{offset:r}=n;if(s&&this.currentDirection===null){this.currentDirection=oi(r);if(this.currentDirection!==null){i&&i(this.currentDirection)}return}this.updateAxis("x",n.point,r);this.updateAxis("y",n.point,r);this.visualElement.render();o&&o(t,n)};const u=(t,n)=>{this.latestPointerEvent=t;this.latestPanInfo=n;this.stop(t,n);this.latestPointerEvent=null;this.latestPanInfo=null};const a=()=>_t((t=>this.getAnimationState(t)==="paused"&&this.getAxisMotionValue(t).animation?.play()));const{dragSnapToOrigin:f}=this.getProps();this.panSession=new Ds(t,{onSessionStart:o,onStart:r,onMove:c,onSessionEnd:u,resumeAnimation:a},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:f,distanceThreshold:s,contextWindow:Ls(this.visualElement)})}stop(t,n){const s=t||this.latestPointerEvent;const i=n||this.latestPanInfo;const o=this.isDragging;this.cancel();if(!o||!i||!s)return;const{velocity:r}=i;this.startAnimation(r);const{onDragEnd:c}=this.getProps();if(c){e.frame.postRender((()=>c(s,i)))}}cancel(){this.isDragging=false;const{projection:t,animationState:n}=this.visualElement;if(t){t.isAnimationBlocked=false}this.panSession&&this.panSession.end();this.panSession=undefined;const{dragPropagation:e}=this.getProps();if(!e&&this.openDragLock){this.openDragLock();this.openDragLock=null}n&&n.setActive("whileDrag",false)}updateAxis(t,n,e){const{drag:s}=this.getProps();if(!e||!ii(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+e[t];if(this.constraints&&this.constraints[t]){o=zs(o,this.constraints[t],this.elastic[t])}i.set(o)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps();const e=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(false):this.visualElement.projection?.layout;const s=this.constraints;if(t&&He(t)){if(!this.constraints){this.constraints=this.resolveRefConstraints()}}else{if(t&&e){this.constraints=Ks(e.layoutBox,t)}else{this.constraints=false}}this.elastic=Qs(n);if(s!==this.constraints&&e&&this.constraints&&!this.hasMutatedConstraints){_t((t=>{if(this.constraints!==false&&this.getAxisMotionValue(t)){this.constraints[t]=qs(e.layoutBox[t],this.constraints[t])}}))}}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!He(t))return false;const e=t.current;s.invariant(e!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:i}=this.visualElement;if(!i||!i.layout)return false;const o=In(e,i.root,this.visualElement.getTransformPagePoint());let r=Zs(i.layout.layoutBox,o);if(n){const t=n(Bn(r));this.hasMutatedConstraints=!!t;if(t){r=On(t)}}return r}startAnimation(t){const{drag:n,dragMomentum:e,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:r}=this.getProps();const c=this.constraints||{};const u=_t((r=>{if(!ii(r,n,this.currentDirection)){return}let u=c&&c[r]||{};if(o)u={min:0,max:0};const a=s?200:1e6;const f=s?40:1e7;const l={type:"inertia",velocity:e?t[r]:0,bounceStiffness:a,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...i,...u};return this.startAxisValueAnimation(r,l)}));return Promise.all(u).then(r)}startAxisValueAnimation(t,n){const e=this.getAxisMotionValue(t);fs(this.visualElement,t);return e.start(U(t,e,0,n,this.visualElement,false))}stopAnimation(){_t((t=>this.getAxisMotionValue(t).stop()))}pauseAnimation(){_t((t=>this.getAxisMotionValue(t).animation?.pause()))}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`;const e=this.visualElement.getProps();const s=e[n];return s?s:this.visualElement.getValue(t,(e.initial?e.initial[t]:undefined)||0)}snapToCursor(t){_t((n=>{const{drag:s}=this.getProps();if(!ii(n,s,this.currentDirection))return;const{projection:i}=this.visualElement;const o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:s,max:r}=i.layout.layoutBox[n];o.set(t[n]-e.mixNumber(s,r,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps();const{projection:s}=this.visualElement;if(!He(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};_t((t=>{const n=this.getAxisMotionValue(t);if(n&&this.constraints!==false){const e=n.get();i[t]=Gs({min:e,max:e},this.constraints[t])}}));const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none";s.root&&s.root.updateScroll();s.updateLayout();this.resolveConstraints();_t((n=>{if(!ii(n,t,null))return;const s=this.getAxisMotionValue(n);const{min:o,max:r}=this.constraints[n];s.set(e.mixNumber(o,r,i[n]))}))}addListeners(){if(!this.visualElement.current)return;ei.set(this.visualElement,this);const t=this.visualElement.current;const n=Bs(t,"pointerdown",(t=>{const{drag:n,dragListener:e=true}=this.getProps();n&&e&&this.start(t)}));const s=()=>{const{dragConstraints:t}=this.getProps();if(He(t)&&t.current){this.constraints=this.resolveRefConstraints()}};const{projection:i}=this.visualElement;const o=i.addEventListener("measure",s);if(i&&!i.layout){i.root&&i.root.updateScroll();i.updateLayout()}e.frame.read(s);const r=Pn(window,"resize",(()=>this.scalePositionWithinConstraints()));const c=i.addEventListener("didUpdate",(({delta:t,hasLayoutChanged:n})=>{if(this.isDragging&&n){_t((n=>{const e=this.getAxisMotionValue(n);if(!e)return;this.originPoint[n]+=t[n].translate;e.set(e.get()+t[n].translate)}));this.visualElement.render()}}));return()=>{r();n();o();c&&c()}}getProps(){const t=this.visualElement.getProps();const{drag:n=false,dragDirectionLock:e=false,dragPropagation:s=false,dragConstraints:i=false,dragElastic:o=Js,dragMomentum:r=true}=t;return{...t,drag:n,dragDirectionLock:e,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:r}}}function ii(t,n,e){return(n===true||n===t)&&(e===null||e===t)}function oi(t,n=10){let e=null;if(Math.abs(t.y)>n){e="y"}else if(Math.abs(t.x)>n){e="x"}return e}class ri extends $s{constructor(t){super(t);this.removeGroupControls=s.noop;this.removeListeners=s.noop;this.controls=new si(t)}mount(){const{dragControls:t}=this.node.getProps();if(t){this.removeGroupControls=t.subscribe(this.controls)}this.removeListeners=this.controls.addListeners()||s.noop}unmount(){this.removeGroupControls();this.removeListeners()}}const ci=t=>(n,s)=>{if(t){e.frame.postRender((()=>t(n,s)))}};class ui extends $s{constructor(){super(...arguments);this.removePointerDownListener=s.noop}onPointerDown(t){this.session=new Ds(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ls(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:ci(t),onStart:ci(n),onMove:s,onEnd:(t,n)=>{delete this.session;if(i){e.frame.postRender((()=>i(t,n)))}}}}mount(){this.removePointerDownListener=Bs(this.node.current,"pointerdown",(t=>this.onPointerDown(t)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener();this.session&&this.session.end()}}let ai=false;class fi extends n.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:e,layoutId:s}=this.props;const{projection:i}=t;Yt(hi);if(i){if(n.group)n.group.add(i);if(e&&e.register&&s){e.register(i)}if(ai){i.root.didUpdate()}i.addEventListener("animationComplete",(()=>{this.safeToRemove()}));i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})}Kt.hasEverUpdated=true}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props;const{projection:r}=s;if(!r)return null;r.isPresent=o;ai=true;if(i||t.layoutDependency!==n||n===undefined||t.isPresent!==o){r.willUpdate()}else{this.safeToRemove()}if(t.isPresent!==o){if(o){r.promote()}else if(!r.relegate()){e.frame.postRender((()=>{const t=r.getStack();if(!t||!t.members.length){this.safeToRemove()}}))}}return null}componentDidUpdate(){const{projection:t}=this.props.visualElement;if(t){t.root.didUpdate();e.microtask.postRender((()=>{if(!t.currentAnimation&&t.isLead()){this.safeToRemove()}}))}}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:e}=this.props;const{projection:s}=t;if(s){s.scheduleCheckAfterUnmount();if(n&&n.group)n.group.remove(s);if(e&&e.deregister)e.deregister(s)}}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function li(t){const[e,s]=p();const r=n.useContext(o);return i.jsx(fi,{...t,layoutGroup:r,switchLayoutGroup:n.useContext(Ge),isPresent:e,safeToRemove:s})}const hi={borderRadius:{...Cn,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Cn,borderTopRightRadius:Cn,borderBottomLeftRadius:Cn,borderBottomRightRadius:Cn,boxShadow:En};const di={pan:{Feature:ui},drag:{Feature:ri,ProjectionNode:jn,MeasureLayout:li}};function pi(t,n,s){const{props:i}=t;if(t.animationState&&i.whileHover){t.animationState.setActive("whileHover",s==="Start")}const o="onHover"+s;const r=i[o];if(r){e.frame.postRender((()=>r(n,Es(n))))}}class mi extends $s{mount(){const{current:t}=this.node;if(!t)return;this.unmount=e.hover(t,((t,n)=>{pi(this.node,n,"Start");return t=>pi(this.node,t,"End")}))}unmount(){}}class yi extends $s{constructor(){super(...arguments);this.isActive=false}onFocus(){let t=false;try{t=this.node.current.matches(":focus-visible")}catch(n){t=true}if(!t||!this.node.animationState)return;this.node.animationState.setActive("whileFocus",true);this.isActive=true}onBlur(){if(!this.isActive||!this.node.animationState)return;this.node.animationState.setActive("whileFocus",false);this.isActive=false}mount(){this.unmount=s.pipe(Pn(this.node.current,"focus",(()=>this.onFocus())),Pn(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}function gi(t,n,s){const{props:i}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled){return}if(t.animationState&&i.whileTap){t.animationState.setActive("whileTap",s==="Start")}const o="onTap"+(s==="End"?"":s);const r=i[o];if(r){e.frame.postRender((()=>r(n,Es(n))))}}class wi extends $s{mount(){const{current:t}=this.node;if(!t)return;this.unmount=e.press(t,((t,n)=>{gi(this.node,n,"Start");return(t,{success:n})=>gi(this.node,t,n?"End":"Cancel")}),{useGlobalTarget:this.node.props.globalTapTarget})}unmount(){}}const vi=new WeakMap;const bi=new WeakMap;const xi=t=>{const n=vi.get(t.target);n&&n(t)};const Si=t=>{t.forEach(xi)};function Mi({root:t,...n}){const e=t||document;if(!bi.has(e)){bi.set(e,{})}const s=bi.get(e);const i=JSON.stringify(n);if(!s[i]){s[i]=new IntersectionObserver(Si,{root:t,...n})}return s[i]}function ki(t,n,e){const s=Mi(n);vi.set(t,e);s.observe(t);return()=>{vi.delete(t);s.unobserve(t)}}const Ti={some:0,all:1};class Pi extends $s{constructor(){super(...arguments);this.hasEnteredView=false;this.isInView=false}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps();const{root:n,margin:e,amount:s="some",once:i}=t;const o={root:n?n.current:undefined,rootMargin:e,threshold:typeof s==="number"?s:Ti[s]};const r=t=>{const{isIntersecting:n}=t;if(this.isInView===n)return;this.isInView=n;if(i&&!n&&this.hasEnteredView){return}else if(n){this.hasEnteredView=true}if(this.node.animationState){this.node.animationState.setActive("whileInView",n)}const{onViewportEnter:e,onViewportLeave:s}=this.node.getProps();const o=n?e:s;o&&o(t)};return ki(this.node.current,o,r)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver==="undefined")return;const{props:t,prevProps:n}=this.node;const e=["amount","margin","root"].some($i(t,n));if(e){this.startObserver()}}unmount(){}}function $i({viewport:t={}},{viewport:n={}}={}){return e=>t[e]!==n[e]}const Ai={inView:{Feature:Pi},tap:{Feature:wi},focus:{Feature:yi},hover:{Feature:mi}};const ji={layout:{ProjectionNode:jn,MeasureLayout:li}};const Ri={...Cs,...Ai,...di,...ji};a.FlatTree=H;a.HTMLVisualElement=fe;a.LayoutGroupContext=o;a.LazyContext=le;a.MotionConfigContext=h;a.MotionContext=Re;a.PresenceContext=l;a.SVGVisualElement=Pe;a.SwitchLayoutGroupContext=Ge;a.VisualElement=te;a.addDomEvent=Pn;a.addPointerEvent=Bs;a.addPointerInfo=Os;a.addScaleCorrector=Yt;a.animateSingleValue=X;a.animateTarget=hs;a.animateVisualElement=ys;a.animations=Cs;a.buildTransform=ie;a.calcLength=T;a.createBox=Ot;a.createDomVisualElement=je;a.createMotionComponent=ts;a.delay=Z;a.distance=Fs;a.distance2D=Is;a.drag=di;a.featureBundle=Ri;a.filterProps=ge;a.gestureAnimations=Ai;a.getOptimisedAppearId=_;a.hasReducedMotionListener=Un;a.initPrefersReducedMotion=Xn;a.isBrowser=u;a.isValidMotionProp=pe;a.layout=ji;a.loadExternalIsValidProp=ye;a.loadFeatures=he;a.makeUseVisualState=Ye;a.motionComponentSymbol=Ke;a.optimizedAppearDataAttribute=z;a.optimizedAppearDataId=Y;a.prefersReducedMotion=Nn;a.resolveMotionValue=G;a.rootProjectionNode=An;a.setTarget=us;a.useConstant=r;a.useIsPresent=g;a.useIsomorphicLayoutEffect=f;a.usePresence=p;a.visualElementStore=Wn;return a}var w;function v(){if(w)return u;w=1;(function(n){Object.defineProperty(n,"__esModule",{value:true});var e=t();var s=c();var i=g();var o=m();var r=d();function u(t){var n=Object.create(null);if(t){Object.keys(t).forEach((function(e){if(e!=="default"){var s=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,s.get?s:{enumerable:true,get:function(){return t[e]}})}}))}n.default=t;return Object.freeze(n)}var a=u(s);class f extends a.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const t=n.offsetParent;const e=o.isHTMLElement(t)?t.offsetWidth||0:0;const s=this.props.sizeRef.current;s.height=n.offsetHeight||0;s.width=n.offsetWidth||0;s.top=n.offsetTop;s.left=n.offsetLeft;s.right=e-s.width-s.left}return null}componentDidUpdate(){}render(){return this.props.children}}function l({children:t,isPresent:n,anchorX:o,root:r}){const c=s.useId();const u=s.useRef(null);const l=s.useRef({width:0,height:0,top:0,left:0,right:0});const{nonce:h}=s.useContext(i.MotionConfigContext);s.useInsertionEffect((()=>{const{width:t,height:e,top:s,left:i,right:a}=l.current;if(n||!u.current||!t||!e)return;const f=o==="left"?`left: ${i}`:`right: ${a}`;u.current.dataset.motionPopId=c;const d=document.createElement("style");if(h)d.nonce=h;const p=r??document.head;p.appendChild(d);if(d.sheet){d.sheet.insertRule(`\n [data-motion-pop-id="${c}"] {\n position: absolute !important;\n width: ${t}px !important;\n height: ${e}px !important;\n ${f}px !important;\n top: ${s}px !important;\n }\n `)}return()=>{p.removeChild(d);if(p.contains(d)){p.removeChild(d)}}}),[n]);return e.jsx(f,{isPresent:n,childRef:u,sizeRef:l,children:a.cloneElement(t,{ref:u})})}const h=({children:t,initial:n,isPresent:o,onExitComplete:r,custom:c,presenceAffectsLayout:u,mode:f,anchorX:h,root:d})=>{const m=i.useConstant(p);const y=s.useId();let g=true;let w=s.useMemo((()=>{g=false;return{id:y,initial:n,isPresent:o,custom:c,onExitComplete:t=>{m.set(t,true);for(const t of m.values()){if(!t)return}r&&r()},register:t=>{m.set(t,false);return()=>m.delete(t)}}}),[o,m,r]);if(u&&g){w={...w}}s.useMemo((()=>{m.forEach(((t,n)=>m.set(n,false)))}),[o]);a.useEffect((()=>{!o&&!m.size&&r&&r()}),[o]);if(f==="popLayout"){t=e.jsx(l,{isPresent:o,anchorX:h,root:d,children:t})}return e.jsx(i.PresenceContext.Provider,{value:w,children:t})};function p(){return new Map}const y=t=>t.key||"";function w(t){const n=[];s.Children.forEach(t,(t=>{if(s.isValidElement(t))n.push(t)}));return n}const v=({children:t,custom:n,initial:o=true,onExitComplete:r,presenceAffectsLayout:c=true,mode:u="sync",propagate:a=false,anchorX:f="left",root:l})=>{const[d,p]=i.usePresence(a);const m=s.useMemo((()=>w(t)),[t]);const g=a&&!d?[]:m.map(y);const v=s.useRef(true);const b=s.useRef(m);const x=i.useConstant((()=>new Map));const[S,M]=s.useState(m);const[k,T]=s.useState(m);i.useIsomorphicLayoutEffect((()=>{v.current=false;b.current=m;for(let t=0;t<k.length;t++){const n=y(k[t]);if(!g.includes(n)){if(x.get(n)!==true){x.set(n,false)}}else{x.delete(n)}}}),[k,g.length,g.join("-")]);const P=[];if(m!==S){let t=[...m];for(let n=0;n<k.length;n++){const e=k[n];const s=y(e);if(!g.includes(s)){t.splice(n,0,e);P.push(e)}}if(u==="wait"&&P.length){t=P}T(w(t));M(m);return null}const{forceRender:$}=s.useContext(i.LayoutGroupContext);return e.jsx(e.Fragment,{children:k.map((t=>{const s=y(t);const i=a&&!d?false:m===k||g.includes(s);const w=()=>{if(x.has(s)){x.set(s,true)}else{return}let t=true;x.forEach((n=>{if(!n)t=false}));if(t){$?.();T(b.current);a&&p?.();r&&r()}};return e.jsx(h,{isPresent:i,initial:!v.current||o?undefined:false,custom:n,presenceAffectsLayout:c,mode:u,root:l,onExitComplete:i?undefined:w,anchorX:f,children:t},s)}))})};const b=s.createContext(null);const x=t=>!t.isLayoutDirty&&t.willUpdate(false);function S(){const t=new Set;const n=new WeakMap;const e=()=>t.forEach(x);return{add:s=>{t.add(s);n.set(s,s.addEventListener("willUpdate",e))},remove:s=>{t.delete(s);const i=n.get(s);if(i){i();n.delete(s)}e()},dirty:e}}function M(){const t=s.useRef(false);i.useIsomorphicLayoutEffect((()=>{t.current=true;return()=>{t.current=false}}),[]);return t}function k(){const t=M();const[n,e]=s.useState(0);const i=s.useCallback((()=>{t.current&&e(n+1)}),[n]);const r=s.useCallback((()=>o.frame.postRender(i)),[i]);return[r,n]}const T=t=>t===true;const P=t=>T(t===true)||t==="id";const $=({children:t,id:n,inherit:o=true})=>{const r=s.useContext(i.LayoutGroupContext);const c=s.useContext(b);const[u,a]=k();const f=s.useRef(null);const l=r.id||c;if(f.current===null){if(P(o)&&l){n=n?l+"-"+n:l}f.current={id:n,group:T(o)?r.group||S():S()}}const h=s.useMemo((()=>({...f.current,forceRender:u})),[a]);return e.jsx(i.LayoutGroupContext.Provider,{value:h,children:t})};function A({children:t,features:n,strict:o=false}){const[,r]=s.useState(!j(n));const c=s.useRef(undefined);if(!j(n)){const{renderer:t,...e}=n;c.current=t;i.loadFeatures(e)}s.useEffect((()=>{if(j(n)){n().then((({renderer:t,...n})=>{i.loadFeatures(n);c.current=t;r(true)}))}}),[]);return e.jsx(i.LazyContext.Provider,{value:{renderer:c.current,strict:o},children:t})}function j(t){return typeof t==="function"}function R({children:t,isValidProp:n,...o}){n&&i.loadExternalIsValidProp(n);o={...s.useContext(i.MotionConfigContext),...o};o.isStatic=i.useConstant((()=>o.isStatic));const r=s.useMemo((()=>o),[JSON.stringify(o.transition),o.transformPagePoint,o.reducedMotion]);return e.jsx(i.MotionConfigContext.Provider,{value:r,children:t})}const C=s.createContext(null);function E(t,n){if(typeof Proxy==="undefined"){return i.createMotionComponent}const e=new Map;const s=(e,s)=>i.createMotionComponent(e,s,t,n);const o=(t,n)=>s(t,n);return new Proxy(o,{get:(o,r)=>{if(r==="create")return s;if(!e.has(r)){e.set(r,i.createMotionComponent(r,undefined,t,n))}return e.get(r)}})}const O=E(i.featureBundle,i.createDomVisualElement);function B(t,n,e,s){if(!s)return t;const i=t.findIndex((t=>t.value===n));if(i===-1)return t;const c=s>0?1:-1;const u=t[i+c];if(!u)return t;const a=t[i];const f=u.layout;const l=o.mixNumber(f.min,f.max,.5);if(c===1&&a.layout.max+e>l||c===-1&&a.layout.min+e<l){return r.moveItem(t,i,i+c)}return t}function L({children:t,as:n="ul",axis:o="y",onReorder:c,values:u,...a},f){const l=i.useConstant((()=>O[n]));const h=[];const d=s.useRef(false);r.invariant(Boolean(u),"Reorder.Group must be provided a values prop","reorder-values");const p={axis:o,registerItem:(t,n)=>{const e=h.findIndex((n=>t===n.value));if(e!==-1){h[e].layout=n[o]}else{h.push({value:t,layout:n[o]})}h.sort(D)},updateOrder:(t,n,e)=>{if(d.current)return;const s=B(h,t,n,e);if(h!==s){d.current=true;c(s.map(I).filter((t=>u.indexOf(t)!==-1)))}}};s.useEffect((()=>{d.current=false}));return e.jsx(l,{...a,ref:f,ignoreStrict:true,children:e.jsx(C.Provider,{value:p,children:t})})}const F=s.forwardRef(L);function I(t){return t.value}function D(t,n){return t.layout.min-n.layout.min}function V(t){const n=i.useConstant((()=>o.motionValue(t)));const{isStatic:e}=s.useContext(i.MotionConfigContext);if(e){const[,e]=s.useState(t);s.useEffect((()=>n.on("change",e)),[])}return n}function N(t,n){const e=V(n());const s=()=>e.set(n());s();i.useIsomorphicLayoutEffect((()=>{const n=()=>o.frame.preRender(s,false,true);const e=t.map((t=>t.on("change",n)));return()=>{e.forEach((t=>t()));o.cancelFrame(s)}}));return e}function U(t){o.collectMotionValues.current=[];t();const n=N(o.collectMotionValues.current,t);o.collectMotionValues.current=undefined;return n}function X(t,n,e,s){if(typeof t==="function"){return U(t)}const i=typeof n==="function"?n:o.transform(n,e,s);return Array.isArray(t)?W(t,i):W([t],(([t])=>i(t)))}function W(t,n){const e=i.useConstant((()=>[]));return N(t,(()=>{e.length=0;const s=t.length;for(let n=0;n<s;n++){e[n]=t[n].get()}return n(e)}))}function Y(t,n=0){return o.isMotionValue(t)?t:V(n)}function z({children:t,style:n={},value:o,as:c="li",onDrag:u,layout:a=true,...f},l){const h=i.useConstant((()=>O[c]));const d=s.useContext(C);const p={x:Y(n.x),y:Y(n.y)};const m=X([p.x,p.y],(([t,n])=>t||n?1:"unset"));r.invariant(Boolean(d),"Reorder.Item must be a child of Reorder.Group","reorder-item-child");const{axis:y,registerItem:g,updateOrder:w}=d;return e.jsx(h,{drag:y,...f,dragSnapToOrigin:true,style:{...n,x:p.x,y:p.y,zIndex:m},layout:a,onDrag:(t,n)=>{const{velocity:e}=n;e[y]&&w(o,p[y].get(),e[y]);u&&u(t,n)},onLayoutMeasure:t=>g(o,t),ref:l,ignoreStrict:true,children:t})}const _=s.forwardRef(z);var K=Object.freeze({__proto__:null,Group:F,Item:_});function H(t){return typeof t==="object"&&!Array.isArray(t)}function Z(t,n,e,s){if(typeof t==="string"&&H(n)){return o.resolveElements(t,e,s)}else if(t instanceof NodeList){return Array.from(t)}else if(Array.isArray(t)){return t}else{return[t]}}function G(t,n,e){return t*(n+1)}function q(t,n,e,s){if(typeof n==="number"){return n}else if(n.startsWith("-")||n.startsWith("+")){return Math.max(0,t+parseFloat(n))}else if(n==="<"){return e}else if(n.startsWith("<")){return Math.max(0,e+parseFloat(n.slice(1)))}else{return s.get(n)??t}}function J(t,n,e){for(let s=0;s<t.length;s++){const i=t[s];if(i.at>n&&i.at<e){r.removeItem(t,i);s--}}}function Q(t,n,e,s,i,c){J(t,i,c);for(let u=0;u<n.length;u++){t.push({value:n[u],at:o.mixNumber(i,c,s[u]),easing:r.getEasingForSegment(e,u)})}}function tt(t,n){for(let e=0;e<t.length;e++){t[e]=t[e]/(n+1)}}function nt(t,n){if(t.at===n.at){if(t.value===null)return 1;if(n.value===null)return-1;return 0}else{return t.at-n.at}}const et="easeInOut";const st=20;function it(t,{defaultTransition:n={},...e}={},s,i){const c=n.duration||.3;const u=new Map;const a=new Map;const f={};const l=new Map;let h=0;let d=0;let p=0;for(let e=0;e<t.length;e++){const u=t[e];if(typeof u==="string"){l.set(u,d);continue}else if(!Array.isArray(u)){l.set(u.name,q(d,u.at,h,l));continue}let[m,y,g={}]=u;if(g.at!==undefined){d=q(d,g.at,h,l)}let w=0;const v=(t,e,s,u=0,a=0)=>{const f=ct(t);const{delay:l=0,times:h=o.defaultOffset(f),type:m="keyframes",repeat:y,repeatType:g,repeatDelay:v=0,...b}=e;let{ease:x=n.ease||"easeOut",duration:S}=e;const M=typeof l==="function"?l(u,a):l;const k=f.length;const T=o.isGenerator(m)?m:i?.[m||"keyframes"];if(k<=2&&T){let t=100;if(k===2&&ft(f)){const n=f[1]-f[0];t=Math.abs(n)}const n={...b};if(S!==undefined){n.duration=r.secondsToMilliseconds(S)}const e=o.createGeneratorEasing(n,t,T);x=e.ease;S=e.duration}S??(S=c);const P=d+M;if(h.length===1&&h[0]===0){h[1]=1}const $=h.length-f.length;$>0&&o.fillOffset(h,$);f.length===1&&f.unshift(null);if(y){r.invariant(y<st,"Repeat count too high, must be less than 20","repeat-count-high");S=G(S,y);const t=[...f];const n=[...h];x=Array.isArray(x)?[...x]:[x];const e=[...x];for(let s=0;s<y;s++){f.push(...t);for(let i=0;i<t.length;i++){h.push(n[i]+(s+1));x.push(i===0?"linear":r.getEasingForSegment(e,i-1))}}tt(h,y)}const A=P+S;Q(s,f,x,h,P,A);w=Math.max(M+S,w);p=Math.max(A,p)};if(o.isMotionValue(m)){const t=ot(m,a);v(y,g,rt("default",t))}else{const t=Z(m,y,s,f);const n=t.length;for(let e=0;e<n;e++){y=y;g=g;const s=t[e];const i=ot(s,a);for(const t in y){v(y[t],ut(g,t),rt(t,i),e,n)}}}h=d;d+=w}a.forEach(((t,s)=>{for(const i in t){const o=t[i];o.sort(nt);const c=[];const a=[];const f=[];for(let t=0;t<o.length;t++){const{at:n,value:e,easing:s}=o[t];c.push(e);a.push(r.progress(0,p,n));f.push(s||"easeOut")}if(a[0]!==0){a.unshift(0);c.unshift(c[0]);f.unshift(et)}if(a[a.length-1]!==1){a.push(1);c.push(null)}if(!u.has(s)){u.set(s,{keyframes:{},transition:{}})}const l=u.get(s);l.keyframes[i]=c;l.transition[i]={...n,duration:p,ease:f,times:a,...e}}}));return u}function ot(t,n){!n.has(t)&&n.set(t,{});return n.get(t)}function rt(t,n){if(!n[t])n[t]=[];return n[t]}function ct(t){return Array.isArray(t)?t:[t]}function ut(t,n){return t&&t[n]?{...t,...t[n]}:{...t}}const at=t=>typeof t==="number";const ft=t=>t.every(at);function lt(t,n){return t in n}class ht extends i.VisualElement{constructor(){super(...arguments);this.type="object"}readValueFromInstance(t,n){if(lt(n,t)){const e=t[n];if(typeof e==="string"||typeof e==="number"){return e}}return undefined}getBaseTargetFromProps(){return undefined}removeValueFromRenderState(t,n){delete n.output[t]}measureInstanceViewportBox(){return i.createBox()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}function dt(t){const n={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}};const e=o.isSVGElement(t)&&!o.isSVGSVGElement(t)?new i.SVGVisualElement(n):new i.HTMLVisualElement(n);e.mount(t);i.visualElementStore.set(t,e)}function pt(t){const n={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}};const e=new ht(n);e.mount(t);i.visualElementStore.set(t,e)}function mt(t,n){return o.isMotionValue(t)||typeof t==="number"||typeof t==="string"&&!H(n)}function yt(t,n,e,s){const o=[];if(mt(t,n)){o.push(i.animateSingleValue(t,H(n)?n.default||n:n,e?e.default||e:e))}else{const c=Z(t,n,s);const u=c.length;r.invariant(Boolean(u),"No valid elements provided.","no-valid-elements");for(let t=0;t<u;t++){const s=c[t];r.invariant(s!==null,"You're trying to perform an animation on null. Ensure that selectors are correctly finding elements and refs are correctly hydrated.","animate-null");const a=s instanceof Element?dt:pt;if(!i.visualElementStore.has(s)){a(s)}const f=i.visualElementStore.get(s);const l={...e};if("delay"in l&&typeof l.delay==="function"){l.delay=l.delay(t,u)}o.push(...i.animateTarget(f,{...n,transition:l},{}))}}return o}function gt(t,n,e){const s=[];const i=it(t,n,e,{spring:o.spring});i.forEach((({keyframes:t,transition:n},e)=>{s.push(...yt(e,t,n))}));return s}function wt(t){return Array.isArray(t)&&t.some(Array.isArray)}function vt(t){function n(n,e,s){let i=[];if(wt(n)){i=gt(n,e,t)}else{i=yt(n,e,s,t)}const c=new o.GroupAnimationWithThen(i);if(t){t.animations.push(c);c.finished.then((()=>{r.removeItem(t.animations,c)}))}return c}return n}const bt=vt();function xt(t,n,e,s){const i=o.resolveElements(t,s);const c=i.length;r.invariant(Boolean(c),"No valid elements provided.","no-valid-elements");const u=[];for(let t=0;t<c;t++){const s=i[t];const a={...e};if(typeof a.delay==="function"){a.delay=a.delay(t,c)}for(const t in n){let e=n[t];if(!Array.isArray(e)){e=[e]}const i={...o.getValueTransition(a,t)};i.duration&&(i.duration=r.secondsToMilliseconds(i.duration));i.delay&&(i.delay=r.secondsToMilliseconds(i.delay));const c=o.getAnimationMap(s);const f=o.animationMapKey(t,i.pseudoElement||"");const l=c.get(f);l&&l.stop();u.push({map:c,key:f,unresolvedKeyframes:e,options:{...i,element:s,name:t,allowFlatten:!a.type&&!a.ease}})}}for(let t=0;t<u.length;t++){const{unresolvedKeyframes:n,options:e}=u[t];const{element:s,name:i,pseudoElement:r}=e;if(!r&&n[0]===null){n[0]=o.getComputedStyle(s,i)}o.fillWildcards(n);o.applyPxDefaults(n,i);if(!r&&n.length<2){n.unshift(o.getComputedStyle(s,i))}e.keyframes=n}const a=[];for(let t=0;t<u.length;t++){const{map:n,key:e,options:s}=u[t];const i=new o.NativeAnimation(s);n.set(e,i);i.finished.finally((()=>n.delete(e)));a.push(i)}return a}const St=t=>{function n(n,e,s){return new o.GroupAnimationWithThen(xt(n,e,s,t))}return n};const Mt=St();const kt=50;const Tt=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0});const Pt=()=>({time:0,x:Tt(),y:Tt()});const $t={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function At(t,n,e,s){const i=e[n];const{length:o,position:c}=$t[n];const u=i.current;const a=e.time;i.current=t[`scroll${c}`];i.scrollLength=t[`scroll${o}`]-t[`client${o}`];i.offset.length=0;i.offset[0]=0;i.offset[1]=i.scrollLength;i.progress=r.progress(0,i.scrollLength,i.current);const f=s-a;i.velocity=f>kt?0:r.velocityPerSecond(i.current-u,f)}function jt(t,n,e){At(t,"x",n,e);At(t,"y",n,e);n.time=e}function Rt(t,n){const e={x:0,y:0};let s=t;while(s&&s!==n){if(o.isHTMLElement(s)){e.x+=s.offsetLeft;e.y+=s.offsetTop;s=s.offsetParent}else if(s.tagName==="svg"){const t=s.getBoundingClientRect();s=s.parentElement;const n=s.getBoundingClientRect();e.x+=t.left-n.left;e.y+=t.top-n.top}else if(s instanceof SVGGraphicsElement){const{x:t,y:n}=s.getBBox();e.x+=t;e.y+=n;let i=null;let o=s.parentNode;while(!i){if(o.tagName==="svg"){i=o}o=s.parentNode}s=i}else{break}}return e}const Ct={start:0,center:.5,end:1};function Et(t,n,e=0){let s=0;if(t in Ct){t=Ct[t]}if(typeof t==="string"){const n=parseFloat(t);if(t.endsWith("px")){s=n}else if(t.endsWith("%")){t=n/100}else if(t.endsWith("vw")){s=n/100*document.documentElement.clientWidth}else if(t.endsWith("vh")){s=n/100*document.documentElement.clientHeight}else{t=n}}if(typeof t==="number"){s=n*t}return e+s}const Ot=[0,0];function Bt(t,n,e,s){let i=Array.isArray(t)?t:Ot;let o=0;let r=0;if(typeof t==="number"){i=[t,t]}else if(typeof t==="string"){t=t.trim();if(t.includes(" ")){i=t.split(" ")}else{i=[t,Ct[t]?t:`0`]}}o=Et(i[0],e,s);r=Et(i[1],n);return o-r}const Lt={All:[[0,0],[1,1]]};const Ft={x:0,y:0};function It(t){return"getBBox"in t&&t.tagName!=="svg"?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}function Dt(t,n,e){const{offset:s=Lt.All}=e;const{target:i=t,axis:c="y"}=e;const u=c==="y"?"height":"width";const a=i!==t?Rt(i,t):Ft;const f=i===t?{width:t.scrollWidth,height:t.scrollHeight}:It(i);const l={width:t.clientWidth,height:t.clientHeight};n[c].offset.length=0;let h=!n[c].interpolate;const d=s.length;for(let t=0;t<d;t++){const e=Bt(s[t],l[u],f[u],a[c]);if(!h&&e!==n[c].interpolatorOffsets[t]){h=true}n[c].offset[t]=e}if(h){n[c].interpolate=o.interpolate(n[c].offset,o.defaultOffset(s),{clamp:false});n[c].interpolatorOffsets=[...n[c].offset]}n[c].progress=r.clamp(0,1,n[c].interpolate(n[c].current))}function Vt(t,n=t,e){e.x.targetOffset=0;e.y.targetOffset=0;if(n!==t){let s=n;while(s&&s!==t){e.x.targetOffset+=s.offsetLeft;e.y.targetOffset+=s.offsetTop;s=s.offsetParent}}e.x.targetLength=n===t?n.scrollWidth:n.clientWidth;e.y.targetLength=n===t?n.scrollHeight:n.clientHeight;e.x.containerLength=t.clientWidth;e.y.containerLength=t.clientHeight}function Nt(t,n,e,s={}){return{measure:n=>{Vt(t,s.target,e);jt(t,e,n);if(s.offset||s.target){Dt(t,e,s)}},notify:()=>n(e)}}const Ut=new WeakMap;const Xt=new WeakMap;const Wt=new WeakMap;const Yt=t=>t===document.scrollingElement?window:t;function zt(t,{container:n=document.scrollingElement,...e}={}){if(!n)return r.noop;let s=Wt.get(n);if(!s){s=new Set;Wt.set(n,s)}const i=Pt();const c=Nt(n,t,i,e);s.add(c);if(!Ut.has(n)){const t=()=>{for(const t of s){t.measure(o.frameData.timestamp)}o.frame.preUpdate(e)};const e=()=>{for(const t of s){t.notify()}};const i=()=>o.frame.read(t);Ut.set(n,i);const r=Yt(n);window.addEventListener("resize",i,{passive:true});if(n!==document.documentElement){Xt.set(n,o.resize(n,i))}r.addEventListener("scroll",i,{passive:true});i()}const u=Ut.get(n);o.frame.read(u,false,true);return()=>{o.cancelFrame(u);const t=Wt.get(n);if(!t)return;t.delete(c);if(t.size)return;const e=Ut.get(n);Ut.delete(n);if(e){Yt(n).removeEventListener("scroll",e);Xt.get(n)?.();window.removeEventListener("resize",e)}}}const _t=new Map;function Kt(t){const n={value:0};const e=zt((e=>{n.value=e[t.axis].progress*100}),t);return{currentTime:n,cancel:e}}function Ht({source:t,container:n,...e}){const{axis:s}=e;if(t)n=t;const i=_t.get(n)??new Map;_t.set(n,i);const r=e.target??"self";const c=i.get(r)??{};const u=s+(e.offset??[]).join(",");if(!c[u]){c[u]=!e.target&&o.supportsScrollTimeline()?new ScrollTimeline({source:n,axis:s}):Kt({container:n,...e})}return c[u]}function Zt(t,n){const e=Ht(n);return t.attachTimeline({timeline:n.target?undefined:e,observe:t=>{t.pause();return o.observeTimeline((n=>{t.time=t.duration*n}),e)}})}function Gt(t){return t.length===2}function qt(t,n){if(Gt(t)){return zt((e=>{t(e[n.axis].progress,e)}),n)}else{return o.observeTimeline(t,Ht(n))}}function Jt(t,{axis:n="y",container:e=document.scrollingElement,...s}={}){if(!e)return r.noop;const i={axis:n,container:e,...s};return typeof t==="function"?qt(t,i):Zt(t,i)}const Qt={some:0,all:1};function tn(t,n,{root:e,margin:s,amount:i="some"}={}){const r=o.resolveElements(t);const c=new WeakMap;const u=t=>{t.forEach((t=>{const e=c.get(t.target);if(t.isIntersecting===Boolean(e))return;if(t.isIntersecting){const e=n(t.target,t);if(typeof e==="function"){c.set(t.target,e)}else{a.unobserve(t.target)}}else if(typeof e==="function"){e(t);c.delete(t.target)}}))};const a=new IntersectionObserver(u,{root:e,rootMargin:s,threshold:typeof i==="number"?i:Qt[i]});r.forEach((t=>a.observe(t)));return()=>a.disconnect()}const nn=E();function en(t){return s.useEffect((()=>()=>t()),[])}const sn={renderer:i.createDomVisualElement,...i.animations,...i.gestureAnimations};const on={...sn,...i.drag,...i.layout};const rn={renderer:i.createDomVisualElement,...i.animations};function cn(t,n,e){s.useInsertionEffect((()=>t.on(n,e)),[t,n,e])}const un=()=>({scrollX:o.motionValue(0),scrollY:o.motionValue(0),scrollXProgress:o.motionValue(0),scrollYProgress:o.motionValue(0)});const an=t=>{if(!t)return false;return!t.current};function fn({container:t,target:n,...e}={}){const o=i.useConstant(un);const c=s.useRef(null);const u=s.useRef(false);const a=s.useCallback((()=>{c.current=Jt(((t,{x:n,y:e})=>{o.scrollX.set(n.current);o.scrollXProgress.set(n.progress);o.scrollY.set(e.current);o.scrollYProgress.set(e.progress)}),{...e,container:t?.current||undefined,target:n?.current||undefined});return()=>{c.current?.()}}),[t,n,JSON.stringify(e.offset)]);i.useIsomorphicLayoutEffect((()=>{u.current=false;if(an(t)||an(n)){u.current=true;return}else{return a()}}),[a]);s.useEffect((()=>{if(u.current){r.invariant(!an(t),"Container ref is defined but not hydrated","use-scroll-ref");r.invariant(!an(n),"Target ref is defined but not hydrated","use-scroll-ref");return a()}else{return}}),[a]);return o}function ln(t){return fn({container:t})}function hn(){return fn()}function dn(t,...n){const e=t.length;function s(){let s=``;for(let i=0;i<e;i++){s+=t[i];const e=n[i];if(e){s+=o.isMotionValue(e)?e.get():e}}return s}return N(n.filter(o.isMotionValue),s)}function pn(t,n={}){const{isStatic:e}=s.useContext(i.MotionConfigContext);const r=()=>o.isMotionValue(t)?t.get():t;if(e){return X(r)}const c=V(r());s.useInsertionEffect((()=>o.attachSpring(c,t,n)),[c,JSON.stringify(n)]);return c}function mn(t){const n=s.useRef(0);const{isStatic:e}=s.useContext(i.MotionConfigContext);s.useEffect((()=>{if(e)return;const s=({timestamp:e,delta:s})=>{if(!n.current)n.current=e;t(e-n.current,s)};o.frame.update(s,true);return()=>o.cancelFrame(s)}),[t])}function yn(){const t=V(0);mn((n=>t.set(n)));return t}function gn(t){const n=V(t.getVelocity());const e=()=>{const s=t.getVelocity();n.set(s);if(s)o.frame.update(e)};cn(t,"change",(()=>{o.frame.update(e,false,true)}));return n}class wn extends o.MotionValue{constructor(){super(...arguments);this.isEnabled=false}add(t){if(o.transformProps.has(t)||o.acceleratedValues.has(t)){this.isEnabled=true;this.update()}}update(){this.set(this.isEnabled?"transform":"auto")}}function vn(){return i.useConstant((()=>new wn("auto")))}function bn(){!i.hasReducedMotionListener.current&&i.initPrefersReducedMotion();const[t]=s.useState(i.prefersReducedMotion.current);return t}function xn(){const t=bn();const{reducedMotion:n}=s.useContext(i.MotionConfigContext);if(n==="never"){return false}else if(n==="always"){return true}else{return t}}function Sn(t){t.values.forEach((t=>t.stop()))}function Mn(t,n){const e=[...n].reverse();e.forEach((e=>{const s=t.getVariant(e);s&&i.setTarget(t,s);if(t.variantChildren){t.variantChildren.forEach((t=>{Mn(t,n)}))}}))}function kn(t,n){if(Array.isArray(n)){return Mn(t,n)}else if(typeof n==="string"){return Mn(t,[n])}else{i.setTarget(t,n)}}function Tn(){let t=false;const n=new Set;const e={subscribe(t){n.add(t);return()=>void n.delete(t)},start(e,s){r.invariant(t,"controls.start() should only be called after a component has mounted. Consider calling within a useEffect hook.");const o=[];n.forEach((t=>{o.push(i.animateVisualElement(t,e,{transitionOverride:s}))}));return Promise.all(o)},set(e){r.invariant(t,"controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook.");return n.forEach((t=>{kn(t,e)}))},stop(){n.forEach((t=>{Sn(t)}))},mount(){t=true;return()=>{t=false;e.stop()}}};return e}function Pn(){const t=i.useConstant((()=>({current:null,animations:[]})));const n=i.useConstant((()=>vt(t)));en((()=>{t.animations.forEach((t=>t.stop()));t.animations.length=0}));return[t,n]}function $n(){const t=i.useConstant((()=>({current:null,animations:[]})));const n=i.useConstant((()=>St(t)));en((()=>{t.animations.forEach((t=>t.stop()))}));return[t,n]}function An(){const t=i.useConstant(Tn);i.useIsomorphicLayoutEffect(t.mount,[]);return t}const jn=An;function Rn(){const t=s.useContext(i.PresenceContext);return t?t.custom:undefined}function Cn(t,n,e,o){s.useEffect((()=>{const s=t.current;if(e&&s){return i.addDomEvent(s,n,e,o)}}),[t,n,e,o])}class En{constructor(){this.componentControls=new Set}subscribe(t){this.componentControls.add(t);return()=>this.componentControls.delete(t)}start(t,n){this.componentControls.forEach((e=>{e.start(t.nativeEvent||t,n)}))}cancel(){this.componentControls.forEach((t=>{t.cancel()}))}stop(){this.componentControls.forEach((t=>{t.stop()}))}}const On=()=>new En;function Bn(){return i.useConstant(On)}function Ln(t){return t!==null&&typeof t==="object"&&i.motionComponentSymbol in t}function Fn(t){if(Ln(t)){return t[i.motionComponentSymbol]}return undefined}function In(){return Dn}function Dn(t){if(!i.rootProjectionNode.current)return;i.rootProjectionNode.current.isUpdating=false;i.rootProjectionNode.current.blockUpdate();t&&t()}function Vn(){const t=s.useCallback((()=>{const t=i.rootProjectionNode.current;if(!t)return;t.resetTree()}),[]);return t}function Nn(...t){const n=s.useRef(0);const[e,i]=s.useState(t[n.current]);const o=s.useCallback((e=>{n.current=typeof e!=="number"?r.wrap(0,t.length,n.current+1):e;i(t[n.current])}),[t.length,...t]);return[e,o]}function Un(t,{root:n,margin:e,amount:i,once:o=false,initial:r=false}={}){const[c,u]=s.useState(r);s.useEffect((()=>{if(!t.current||o&&c)return;const s=()=>{u(true);return o?undefined:()=>u(false)};const r={root:n&&n.current||undefined,margin:e,amount:i};return tn(t.current,s,r)}),[n,t,e,o,i]);return c}function Xn(){const[t,n]=k();const e=In();const i=s.useRef(-1);s.useEffect((()=>{o.frame.postRender((()=>o.frame.postRender((()=>{if(n!==i.current)return;r.MotionGlobalConfig.instantAnimations=false}))))}),[n]);return s=>{e((()=>{r.MotionGlobalConfig.instantAnimations=true;t();s();i.current=n+1}))}}function Wn(){r.MotionGlobalConfig.instantAnimations=false}function Yn(){const[t,n]=s.useState(true);s.useEffect((()=>{const t=()=>n(!document.hidden);if(document.hidden){t()}document.addEventListener("visibilitychange",t);return()=>{document.removeEventListener("visibilitychange",t)}}),[]);return t}const zn=new Map;const _n=new Map;const Kn=(t,n)=>{const e=o.transformProps.has(n)?"transform":n;return`${t}: ${e}`};function Hn(t,n,e){const s=Kn(t,n);const i=zn.get(s);if(!i){return null}const{animation:o,startTime:r}=i;function c(){window.MotionCancelOptimisedAnimation?.(t,n,e)}o.onfinish=c;if(r===null||window.MotionHandoffIsComplete?.(t)){c();return null}else{return r}}let Zn;let Gn;const qn=new Set;function Jn(){qn.forEach((t=>{t.animation.play();t.animation.startTime=t.startTime}));qn.clear()}function Qn(t,n,e,s,c){if(window.MotionIsMounted){return}const u=t.dataset[i.optimizedAppearDataId];if(!u)return;window.MotionHandoffAnimation=Hn;const a=Kn(u,n);if(!Gn){Gn=o.startWaapiAnimation(t,n,[e[0],e[0]],{duration:1e4,ease:"linear"});zn.set(a,{animation:Gn,startTime:null});window.MotionHandoffAnimation=Hn;window.MotionHasOptimisedAnimation=(t,n)=>{if(!t)return false;if(!n){return _n.has(t)}const e=Kn(t,n);return Boolean(zn.get(e))};window.MotionHandoffMarkAsComplete=t=>{if(_n.has(t)){_n.set(t,true)}};window.MotionHandoffIsComplete=t=>_n.get(t)===true;window.MotionCancelOptimisedAnimation=(t,n,e,s)=>{const i=Kn(t,n);const o=zn.get(i);if(!o)return;if(e&&s===undefined){e.postRender((()=>{e.postRender((()=>{o.animation.cancel()}))}))}else{o.animation.cancel()}if(e&&s){qn.add(o);e.render(Jn)}else{zn.delete(i);if(!zn.size){window.MotionCancelOptimisedAnimation=undefined}}};window.MotionCheckAppearSync=(t,n,e)=>{const s=i.getOptimisedAppearId(t);if(!s)return;const o=window.MotionHasOptimisedAnimation?.(s,n);const r=t.props.values?.[n];if(!o||!r)return;const c=e.on("change",(t=>{if(r.get()!==t){window.MotionCancelOptimisedAnimation?.(s,n);c()}}));return c}}const f=()=>{Gn.cancel();const i=o.startWaapiAnimation(t,n,e,s);if(Zn===undefined){Zn=performance.now()}i.startTime=Zn;zn.set(a,{animation:i,startTime:Zn});if(c)c(i)};_n.set(u,false);if(Gn.ready){Gn.ready.then(f).catch(r.noop)}else{f()}}const te=()=>({});class ne extends i.VisualElement{constructor(){super(...arguments);this.measureInstanceViewportBox=i.createBox}build(){}resetTransform(){}restoreTransform(){}removeValueFromRenderState(){}renderInstance(){}scrapeMotionValuesFromProps(){return te()}getBaseTargetFromProps(){return undefined}readValueFromInstance(t,n,e){return e.initialState[n]||0}sortInstanceNodePosition(){return 0}}const ee=i.makeUseVisualState({scrapeMotionValuesFromProps:te,createRenderState:te});function se(t){const[n,e]=s.useState(t);const o=ee({},false);const r=i.useConstant((()=>new ne({props:{onUpdate:t=>{e({...t})}},visualState:o,presenceContext:null},{initialState:t})));s.useLayoutEffect((()=>{r.mount({});return()=>r.unmount()}),[r]);const c=i.useConstant((()=>t=>i.animateVisualElement(r,t)));return[n,c]}let ie=0;const oe=({children:t})=>{a.useEffect((()=>{r.invariant(false,"AnimateSharedLayout is deprecated: https://www.framer.com/docs/guide-upgrade/##shared-layout-animations")}),[]);return e.jsx($,{id:i.useConstant((()=>`asl-${ie++}`)),children:t})};const re=1e5;const ce=t=>t>.001?1/t:re;let ue=false;function ae(t){let n=V(1);let e=V(1);const{visualElement:o}=s.useContext(i.MotionContext);r.invariant(!!(t||o),"If no scale values are provided, useInvertedScale must be used within a child of another motion component.");r.warning(ue,"useInvertedScale is deprecated and will be removed in 3.0. Use the layout prop instead.");ue=true;if(t){n=t.scaleX||n;e=t.scaleY||e}else if(o){n=o.getValue("scaleX",1);e=o.getValue("scaleY",1)}const c=X(n,ce);const u=X(e,ce);return{scaleX:c,scaleY:u}}n.FlatTree=i.FlatTree;n.LayoutGroupContext=i.LayoutGroupContext;n.MotionConfigContext=i.MotionConfigContext;n.MotionContext=i.MotionContext;n.PresenceContext=i.PresenceContext;n.SwitchLayoutGroupContext=i.SwitchLayoutGroupContext;n.VisualElement=i.VisualElement;n.addPointerEvent=i.addPointerEvent;n.addPointerInfo=i.addPointerInfo;n.addScaleCorrector=i.addScaleCorrector;n.animateVisualElement=i.animateVisualElement;n.animations=i.animations;n.buildTransform=i.buildTransform;n.calcLength=i.calcLength;n.createBox=i.createBox;n.delay=i.delay;n.distance=i.distance;n.distance2D=i.distance2D;n.filterProps=i.filterProps;n.isBrowser=i.isBrowser;n.isValidMotionProp=i.isValidMotionProp;n.makeUseVisualState=i.makeUseVisualState;n.optimizedAppearDataAttribute=i.optimizedAppearDataAttribute;n.resolveMotionValue=i.resolveMotionValue;n.useIsPresent=i.useIsPresent;n.useIsomorphicLayoutEffect=i.useIsomorphicLayoutEffect;n.usePresence=i.usePresence;n.visualElementStore=i.visualElementStore;Object.defineProperty(n,"MotionGlobalConfig",{enumerable:true,get:function(){return r.MotionGlobalConfig}});n.AnimatePresence=v;n.AnimateSharedLayout=oe;n.DeprecatedLayoutGroupContext=b;n.DragControls=En;n.LayoutGroup=$;n.LazyMotion=A;n.MotionConfig=R;n.Reorder=K;n.WillChangeMotionValue=wn;n.animate=bt;n.animateMini=Mt;n.animationControls=Tn;n.createScopedAnimate=vt;n.disableInstantTransitions=Wn;n.domAnimation=sn;n.domMax=on;n.domMin=rn;n.inView=tn;n.isMotionComponent=Ln;n.m=nn;n.motion=O;n.scroll=Jt;n.scrollInfo=zt;n.startOptimizedAppearAnimation=Qn;n.unwrapMotionComponent=Fn;n.useAnimate=Pn;n.useAnimateMini=$n;n.useAnimation=jn;n.useAnimationControls=An;n.useAnimationFrame=mn;n.useCycle=Nn;n.useDeprecatedAnimatedState=se;n.useDeprecatedInvertedScale=ae;n.useDomEvent=Cn;n.useDragControls=Bn;n.useElementScroll=ln;n.useForceUpdate=k;n.useInView=Un;n.useInstantLayoutTransition=In;n.useInstantTransition=Xn;n.useMotionTemplate=dn;n.useMotionValue=V;n.useMotionValueEvent=cn;n.usePageInView=Yn;n.usePresenceData=Rn;n.useReducedMotion=bn;n.useReducedMotionConfig=xn;n.useResetProjection=Vn;n.useScroll=fn;n.useSpring=pn;n.useTime=yn;n.useTransform=X;n.useUnmountEffect=en;n.useVelocity=gn;n.useViewportScroll=hn;n.useWillChange=vn;Object.keys(o).forEach((function(t){if(t!=="default"&&!Object.prototype.hasOwnProperty.call(n,t))Object.defineProperty(n,t,{enumerable:true,get:function(){return o[t]}})}));Object.keys(r).forEach((function(t){if(t!=="default"&&!Object.prototype.hasOwnProperty.call(n,t))Object.defineProperty(n,t,{enumerable:true,get:function(){return r[t]}})}))})(u);return u}var b=v();const x=({data:t,labels:e,colors:s,height:i=240})=>{const o=Math.max(...t,1);return n.jsx("div",{className:"w-full flex items-end h-full",style:{height:i},children:t.map(((t,i)=>n.jsxs("div",{className:"flex-1 flex flex-col items-center mx-1",children:[n.jsx(b.motion.div,{initial:{height:0},animate:{height:`${t/o*100}%`},transition:{type:"spring",stiffness:120,damping:20},className:"w-6 rounded-t-md",style:{background:s?.[i]||"#3b82f6",minHeight:4}}),n.jsx("span",{className:"mt-2 text-xs text-gray-600",children:e[i]})]},e[i])))})};const S=({data:t,labels:e,color:s="#3b82f6",height:i=240})=>{const o=Math.max(...t,1);const r=t.map(((n,e)=>`${e/(t.length-1)*100},${100-n/o*100}`)).join(" ");return n.jsxs("div",{className:"w-full h-full",style:{height:i},children:[n.jsxs("svg",{viewBox:"0 0 100 100",className:"w-full h-full",children:[n.jsx(b.motion.polyline,{fill:"none",stroke:s,strokeWidth:"2",points:r,initial:{pathLength:0},animate:{pathLength:1},transition:{duration:1}}),t.map(((e,i)=>n.jsx(b.motion.circle,{cx:i/(t.length-1)*100,cy:100-e/o*100,r:2.5,fill:s,initial:{scale:0},animate:{scale:1},transition:{delay:.2+i*.05}},i)))]}),n.jsx("div",{className:"flex justify-between mt-2 text-xs text-gray-600",children:e.map(((t,e)=>n.jsx("span",{children:t},e)))})]})};const M=({data:t,labels:e,colors:s,size:i=120,strokeWidth:o=16})=>{const r=t.reduce(((t,n)=>t+n),0)||1;let c=0;return n.jsxs("div",{className:"flex flex-col items-center",children:[n.jsx("svg",{width:i,height:i,viewBox:`0 0 ${i} ${i}`,className:"block",children:t.map(((t,e)=>{const u=(i-o)/2;const a=2*Math.PI*u;const f=t/r*a;const l=`${f} ${a-f}`;const h=c;c+=f;return n.jsx(b.motion.circle,{cx:i/2,cy:i/2,r:u,fill:"none",stroke:s?.[e]||"#3b82f6",strokeWidth:o,strokeDasharray:l,strokeDashoffset:-h,initial:{pathLength:0},animate:{pathLength:1},transition:{duration:1+e*.2}},e)}))}),n.jsx("div",{className:"flex flex-wrap justify-center mt-2 text-xs text-gray-600",children:e.map(((t,e)=>n.jsxs("span",{className:"mx-2 flex items-center",children:[n.jsx("span",{className:"inline-block w-3 h-3 rounded-full mr-1",style:{background:s?.[e]||"#3b82f6"}}),t]},e)))})]})};const k=({data:t,labels:e,color:s="#3b82f6",height:i=240})=>{const o=Math.max(...t,1);const r=t.map(((n,e)=>`${e/(t.length-1)*100},${100-n/o*100}`)).join(" ");const c=`0,100 ${r} 100,100`;return n.jsxs("div",{className:"w-full h-full",style:{height:i},children:[n.jsxs("svg",{viewBox:"0 0 100 100",className:"w-full h-full",children:[n.jsx(b.motion.polygon,{fill:s+"33",points:c,initial:{opacity:0},animate:{opacity:1},transition:{duration:1}}),n.jsx(b.motion.polyline,{fill:"none",stroke:s,strokeWidth:"2",points:r,initial:{pathLength:0},animate:{pathLength:1},transition:{duration:1}})]}),n.jsx("div",{className:"flex justify-between mt-2 text-xs text-gray-600",children:e.map(((t,e)=>n.jsx("span",{children:t},e)))})]})};export{k as AreaChart,x as BarChart,M as DonutChart,S as LineChart};
//# sourceMappingURL=index.esm.js.map