framer-motion 10.3.3 → 10.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -1
- package/dist/cjs/dom-entry.js +1 -1
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/{wrap-0db10bf6.js → wrap-196fd3c5.js} +1 -1
- package/dist/es/render/utils/motion-values.mjs +1 -1
- package/dist/es/value/index.mjs +1 -1
- package/dist/framer-motion.dev.js +2 -2
- package/dist/framer-motion.js +1 -1
- package/dist/projection.dev.js +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -3,7 +3,10 @@
|
|
|
3
3
|
</p>
|
|
4
4
|
<h1 align="center">Framer Motion</h1>
|
|
5
5
|
<h3 align="center">
|
|
6
|
-
An open source motion library for React, made by Framer.
|
|
6
|
+
An open source motion library for React, made by Framer.
|
|
7
|
+
</h3>
|
|
8
|
+
<h3 align="center">
|
|
9
|
+
Motion powers Framer, the web builder for creative pros. Design and ship your dream site. Zero code, maximum speed.
|
|
7
10
|
</h3>
|
|
8
11
|
<br/>
|
|
9
12
|
<p align="center">
|
package/dist/cjs/dom-entry.js
CHANGED
package/dist/cjs/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var wrap = require('./wrap-
|
|
6
|
+
var wrap = require('./wrap-196fd3c5.js');
|
|
7
7
|
|
|
8
8
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
9
9
|
|
|
@@ -5534,7 +5534,7 @@ function updateMotionValuesFromProps(element, next, prev) {
|
|
|
5534
5534
|
* and warn against mismatches.
|
|
5535
5535
|
*/
|
|
5536
5536
|
if (process.env.NODE_ENV === "development") {
|
|
5537
|
-
wrap.warnOnce(nextValue.version === "10.3.
|
|
5537
|
+
wrap.warnOnce(nextValue.version === "10.3.4", `Attempting to mix Framer Motion versions ${nextValue.version} with 10.3.4 may not work as expected.`);
|
|
5538
5538
|
}
|
|
5539
5539
|
}
|
|
5540
5540
|
else if (wrap.isMotionValue(prevValue)) {
|
|
@@ -404,7 +404,7 @@ class MotionValue {
|
|
|
404
404
|
* This will be replaced by the build step with the latest version number.
|
|
405
405
|
* When MotionValues are provided to motion components, warn if versions are mixed.
|
|
406
406
|
*/
|
|
407
|
-
this.version = "10.3.
|
|
407
|
+
this.version = "10.3.4";
|
|
408
408
|
/**
|
|
409
409
|
* Duration, in milliseconds, since last updating frame.
|
|
410
410
|
*
|
|
@@ -22,7 +22,7 @@ function updateMotionValuesFromProps(element, next, prev) {
|
|
|
22
22
|
* and warn against mismatches.
|
|
23
23
|
*/
|
|
24
24
|
if (process.env.NODE_ENV === "development") {
|
|
25
|
-
warnOnce(nextValue.version === "10.3.
|
|
25
|
+
warnOnce(nextValue.version === "10.3.4", `Attempting to mix Framer Motion versions ${nextValue.version} with 10.3.4 may not work as expected.`);
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
else if (isMotionValue(prevValue)) {
|
package/dist/es/value/index.mjs
CHANGED
|
@@ -26,7 +26,7 @@ class MotionValue {
|
|
|
26
26
|
* This will be replaced by the build step with the latest version number.
|
|
27
27
|
* When MotionValues are provided to motion components, warn if versions are mixed.
|
|
28
28
|
*/
|
|
29
|
-
this.version = "10.3.
|
|
29
|
+
this.version = "10.3.4";
|
|
30
30
|
/**
|
|
31
31
|
* Duration, in milliseconds, since last updating frame.
|
|
32
32
|
*
|
|
@@ -1984,7 +1984,7 @@
|
|
|
1984
1984
|
* This will be replaced by the build step with the latest version number.
|
|
1985
1985
|
* When MotionValues are provided to motion components, warn if versions are mixed.
|
|
1986
1986
|
*/
|
|
1987
|
-
this.version = "10.3.
|
|
1987
|
+
this.version = "10.3.4";
|
|
1988
1988
|
/**
|
|
1989
1989
|
* Duration, in milliseconds, since last updating frame.
|
|
1990
1990
|
*
|
|
@@ -8449,7 +8449,7 @@
|
|
|
8449
8449
|
* and warn against mismatches.
|
|
8450
8450
|
*/
|
|
8451
8451
|
{
|
|
8452
|
-
warnOnce(nextValue.version === "10.3.
|
|
8452
|
+
warnOnce(nextValue.version === "10.3.4", `Attempting to mix Framer Motion versions ${nextValue.version} with 10.3.4 may not work as expected.`);
|
|
8453
8453
|
}
|
|
8454
8454
|
}
|
|
8455
8455
|
else if (isMotionValue(prevValue)) {
|
package/dist/framer-motion.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={},t.React)}(this,(function(t,e){"use strict";function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}function s(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,s.get?s:{enumerable:!0,get:function(){return t[n]}})}})),e.default=t,Object.freeze(e)}var i=s(e),o=n(e);const r=e.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),a=e.createContext({}),l=e.createContext(null),c="undefined"!=typeof document,u=c?e.useLayoutEffect:e.useEffect,h=e.createContext({strict:!1});function d(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function p(t){return"string"==typeof t||Array.isArray(t)}function m(t){return"object"==typeof t&&"function"==typeof t.start}const f=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],g=["initial",...f];function y(t){return m(t.animate)||g.some(e=>p(t[e]))}function v(t){return Boolean(y(t)||t.variants)}function x(t){const{initial:n,animate:s}=function(t,e){if(y(t)){const{initial:e,animate:n}=t;return{initial:!1===e||p(e)?e:void 0,animate:p(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,e.useContext(a));return e.useMemo(()=>({initial:n,animate:s}),[P(n),P(s)])}function P(t){return Array.isArray(t)?t.join(" "):t}const E={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"]},w={};for(const t in E)w[t]={isEnabled:e=>E[t].some(t=>!!e[t])};function b(t){for(const e in t)w[e]={...w[e],...t[e]}}function S(t){const n=e.useRef(null);return null===n.current&&(n.current=t()),n.current}const T={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let C=1;const A=e.createContext({}),V=e.createContext({}),M=Symbol.for("motionComponentSymbol");function L({preloadedFeatures:t,createVisualElement:n,useRender:s,useVisualState:o,Component:p}){t&&b(t);const m=e.forwardRef((function(m,f){let g;const y={...e.useContext(r),...m,layoutId:D(m)},{isStatic:v}=y,P=x(m),E=v?void 0:S(()=>{if(T.hasEverUpdated)return C++}),w=o(m,v);if(!v&&c){P.visualElement=function(t,n,s,i){const{visualElement:o}=e.useContext(a),c=e.useContext(h),d=e.useContext(l),p=e.useContext(r).reducedMotion,m=e.useRef();i=i||c.renderer,!m.current&&i&&(m.current=i(t,{visualState:n,parent:o,props:s,presenceContext:d,blockInitialAnimation:!!d&&!1===d.initial,reducedMotionConfig:p}));const f=m.current;return e.useInsertionEffect(()=>{f&&f.update(s,d)}),u(()=>{f&&f.render()}),e.useEffect(()=>{f&&f.updateFeatures()}),(window.HandoffAppearAnimations?u:e.useEffect)(()=>{f&&f.animationState&&f.animationState.animateChanges()}),f}(p,w,y,n);const s=e.useContext(V),i=e.useContext(h).strict;P.visualElement&&(g=P.visualElement.loadFeatures(y,i,t,E,s))}return i.createElement(a.Provider,{value:P},g&&P.visualElement?i.createElement(g,{visualElement:P.visualElement,...y}):null,s(p,m,E,function(t,n,s){return e.useCallback(e=>{e&&t.mount&&t.mount(e),n&&(e?n.mount(e):n.unmount()),s&&("function"==typeof s?s(e):d(s)&&(s.current=e))},[n])}(w,P.visualElement,f),w,v,P.visualElement))}));return m[M]=p,m}function D({layoutId:t}){const n=e.useContext(A).id;return n&&void 0!==t?n+"-"+t:t}function R(t){function e(e,n={}){return L(t(e,n))}if("undefined"==typeof Proxy)return e;const n=new Map;return new Proxy(e,{get:(t,s)=>(n.has(s)||n.set(s,e(s)),n.get(s))})}const k=["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 B(t){return"string"==typeof t&&!t.includes("-")&&!!(k.indexOf(t)>-1||/[A-Z]/.test(t))}const j={};function F(t){Object.assign(j,t)}const O=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],I=new Set(O);function U(t,{layout:e,layoutId:n}){return I.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!j[t]||"opacity"===t)}const N=t=>Boolean(t&&t.getVelocity),z={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},W=O.length;function $(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},s,i){let o="";for(let e=0;e<W;e++){const n=O[e];if(void 0!==t[n]){o+=`${z[n]||n}(${t[n]}) `}}return e&&!t.z&&(o+="translateZ(0)"),o=o.trim(),i?o=i(t,s?"":o):n&&s&&(o="none"),o}const H=t=>e=>"string"==typeof e&&e.startsWith(t),Y=H("--"),X=H("var(--"),G=(t,e)=>e&&"number"==typeof t?e.transform(t):t,q=(t,e,n)=>Math.min(Math.max(n,t),e),Z={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},_={...Z,transform:t=>q(0,1,t)},K={...Z,default:1},J=t=>Math.round(1e5*t)/1e5,Q=/(-)?([\d]*\.?[\d])+/g,tt=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,et=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function nt(t){return"string"==typeof t}const st=t=>({test:e=>nt(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),it=st("deg"),ot=st("%"),rt=st("px"),at=st("vh"),lt=st("vw"),ct={...ot,parse:t=>ot.parse(t)/100,transform:t=>ot.transform(100*t)},ut={...Z,transform:Math.round},ht={borderWidth:rt,borderTopWidth:rt,borderRightWidth:rt,borderBottomWidth:rt,borderLeftWidth:rt,borderRadius:rt,radius:rt,borderTopLeftRadius:rt,borderTopRightRadius:rt,borderBottomRightRadius:rt,borderBottomLeftRadius:rt,width:rt,maxWidth:rt,height:rt,maxHeight:rt,size:rt,top:rt,right:rt,bottom:rt,left:rt,padding:rt,paddingTop:rt,paddingRight:rt,paddingBottom:rt,paddingLeft:rt,margin:rt,marginTop:rt,marginRight:rt,marginBottom:rt,marginLeft:rt,rotate:it,rotateX:it,rotateY:it,rotateZ:it,scale:K,scaleX:K,scaleY:K,scaleZ:K,skew:it,skewX:it,skewY:it,distance:rt,translateX:rt,translateY:rt,translateZ:rt,x:rt,y:rt,z:rt,perspective:rt,transformPerspective:rt,opacity:_,originX:ct,originY:ct,originZ:rt,zIndex:ut,fillOpacity:_,strokeOpacity:_,numOctaves:ut};function dt(t,e,n,s){const{style:i,vars:o,transform:r,transformOrigin:a}=t;let l=!1,c=!1,u=!0;for(const t in e){const n=e[t];if(Y(t)){o[t]=n;continue}const s=ht[t],h=G(n,s);if(I.has(t)){if(l=!0,r[t]=h,!u)continue;n!==(s.default||0)&&(u=!1)}else t.startsWith("origin")?(c=!0,a[t]=h):i[t]=h}if(e.transform||(l||s?i.transform=$(t.transform,n,u,s):i.transform&&(i.transform="none")),c){const{originX:t="50%",originY:e="50%",originZ:n=0}=a;i.transformOrigin=`${t} ${e} ${n}`}}const pt=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function mt(t,e,n){for(const s in e)N(e[s])||U(s,n)||(t[s]=e[s])}function ft(t,n,s){const i={};return mt(i,t.style||{},t),Object.assign(i,function({transformTemplate:t},n,s){return e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{}};return dt(e,n,{enableHardwareAcceleration:!s},t),Object.assign({},e.vars,e.style)},[n])}(t,n,s)),t.transformValues?t.transformValues(i):i}function gt(t,e,n){const s={},i=ft(t,e,n);return t.drag&&!1!==t.dragListener&&(s.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(s.tabIndex=0),s.style=i,s}const yt=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function vt(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||yt.has(t)}let xt=t=>!vt(t);function Pt(t){t&&(xt=e=>e.startsWith("on")?!vt(e):t(e))}try{Pt(require("@emotion/is-prop-valid").default)}catch(t){}function Et(t,e,n){const s={};for(const i in t)"values"===i&&"object"==typeof t.values||(xt(i)||!0===n&&vt(i)||!e&&!vt(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}function wt(t,e,n){return"string"==typeof t?t:rt.transform(e+n*t)}const bt={offset:"stroke-dashoffset",array:"stroke-dasharray"},St={offset:"strokeDashoffset",array:"strokeDasharray"};function Tt(t,{attrX:e,attrY:n,originX:s,originY:i,pathLength:o,pathSpacing:r=1,pathOffset:a=0,...l},c,u,h){if(dt(t,l,c,h),u)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:d,style:p,dimensions:m}=t;d.transform&&(m&&(p.transform=d.transform),delete d.transform),m&&(void 0!==s||void 0!==i||p.transform)&&(p.transformOrigin=function(t,e,n){return`${wt(e,t.x,t.width)} ${wt(n,t.y,t.height)}`}(m,void 0!==s?s:.5,void 0!==i?i:.5)),void 0!==e&&(d.x=e),void 0!==n&&(d.y=n),void 0!==o&&function(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?bt:St;t[o.offset]=rt.transform(-s);const r=rt.transform(e),a=rt.transform(n);t[o.array]=`${r} ${a}`}(d,o,r,a,!1)}const Ct=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),At=t=>"string"==typeof t&&"svg"===t.toLowerCase();function Vt(t,n,s,i){const o=e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Tt(e,n,{enableHardwareAcceleration:!1},At(i),t.transformTemplate),{...e.attrs,style:{...e.style}}},[n]);if(t.style){const e={};mt(e,t.style,t),o.style={...e,...o.style}}return o}function Mt(t=!1){return(n,s,i,o,{latestValues:r},a)=>{const l=(B(n)?Vt:gt)(s,r,a,n),c={...Et(s,"string"==typeof n,t),...l,ref:o},{children:u}=s,h=e.useMemo(()=>N(u)?u.get():u,[u]);return i&&(c["data-projection-id"]=i),e.createElement(n,{...c,children:h})}}const Lt=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function Dt(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const e in n)t.style.setProperty(e,n[e])}const Rt=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function kt(t,e,n,s){Dt(t,e,void 0,s);for(const n in e.attrs)t.setAttribute(Rt.has(n)?n:Lt(n),e.attrs[n])}function Bt(t,e){const{style:n}=t,s={};for(const i in n)(N(n[i])||e.style&&N(e.style[i])||U(i,t))&&(s[i]=n[i]);return s}function jt(t,e){const n=Bt(t,e);for(const s in t)if(N(t[s])||N(e[s])){n["x"===s||"y"===s?"attr"+s.toUpperCase():s]=t[s]}return n}function Ft(t,e,n,s={},i={}){return"function"==typeof e&&(e=e(void 0!==n?n:t.custom,s,i)),"string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e&&(e=e(void 0!==n?n:t.custom,s,i)),e}const Ot=t=>Array.isArray(t);function It(t){const e=N(t)?t.get():t;return n=e,Boolean(n&&"object"==typeof n&&n.mix&&n.toValue)?e.toValue():e;var n}const Ut=t=>(n,s)=>{const i=e.useContext(a),o=e.useContext(l),r=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},s,i,o){const r={latestValues:Nt(s,i,o,t),renderState:e()};return n&&(r.mount=t=>n(s,t,r)),r}(t,n,i,o);return s?r():S(r)};function Nt(t,e,n,s){const i={},o=s(t,{});for(const t in o)i[t]=It(o[t]);let{initial:r,animate:a}=t;const l=y(t),c=v(t);e&&c&&!l&&!1!==t.inherit&&(void 0===r&&(r=e.initial),void 0===a&&(a=e.animate));let u=!!n&&!1===n.initial;u=u||!1===r;const h=u?a:r;if(h&&"boolean"!=typeof h&&!m(h)){(Array.isArray(h)?h:[h]).forEach(e=>{const n=Ft(t,e);if(!n)return;const{transitionEnd:s,transition:o,...r}=n;for(const t in r){let e=r[t];if(Array.isArray(e)){e=e[u?e.length-1:0]}null!==e&&(i[t]=e)}for(const t in s)i[t]=s[t]})}return i}const zt={useVisualState:Ut({scrapeMotionValuesFromProps:jt,createRenderState:Ct,onMount:(t,e,{renderState:n,latestValues:s})=>{try{n.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(t){n.dimensions={x:0,y:0,width:0,height:0}}Tt(n,s,{enableHardwareAcceleration:!1},At(e.tagName),t.transformTemplate),kt(e,n)}})},Wt={useVisualState:Ut({scrapeMotionValuesFromProps:Bt,createRenderState:pt})};function $t(t,{forwardMotionProps:e=!1},n,s){return{...B(t)?zt:Wt,preloadedFeatures:n,useRender:Mt(e),createVisualElement:s,Component:t}}function Ht(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const Yt=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function Xt(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const Gt=t=>e=>Yt(e)&&t(e,Xt(e));function qt(t,e,n,s){return Ht(t,e,Gt(n),s)}const Zt=(t,e)=>n=>e(t(n)),_t=(...t)=>t.reduce(Zt);function Kt(t){let e=null;return()=>{const n=()=>{e=null};return null===e&&(e=t,n)}}const Jt=Kt("dragHorizontal"),Qt=Kt("dragVertical");function te(t){let e=!1;if("y"===t)e=Qt();else if("x"===t)e=Jt();else{const t=Jt(),n=Qt();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}function ee(){const t=te(!0);return!t||(t(),!1)}class ne{constructor(t){this.isMounted=!1,this.node=t}update(){}}const se={delta:0,timestamp:0,isProcessing:!1};let ie=!0,oe=!1;const re=["read","update","preRender","render","postRender"],ae=re.reduce((t,e)=>(t[e]=function(t){let e=[],n=[],s=0,i=!1,o=!1;const r=new WeakSet,a={schedule:(t,o=!1,a=!1)=>{const l=a&&i,c=l?e:n;return o&&r.add(t),-1===c.indexOf(t)&&(c.push(t),l&&i&&(s=e.length)),t},cancel:t=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1),r.delete(t)},process:l=>{if(i)o=!0;else{if(i=!0,[e,n]=[n,e],n.length=0,s=e.length,s)for(let n=0;n<s;n++){const s=e[n];s(l),r.has(s)&&(a.schedule(s),t())}i=!1,o&&(o=!1,a.process(l))}}};return a}(()=>oe=!0),t),{}),le=re.reduce((t,e)=>{const n=ae[e];return t[e]=(t,e=!1,s=!1)=>(oe||pe(),n.schedule(t,e,s)),t},{}),ce=re.reduce((t,e)=>(t[e]=ae[e].cancel,t),{}),ue=re.reduce((t,e)=>(t[e]=()=>ae[e].process(se),t),{}),he=t=>ae[t].process(se),de=t=>{oe=!1,se.delta=ie?1e3/60:Math.max(Math.min(t-se.timestamp,40),1),se.timestamp=t,se.isProcessing=!0,re.forEach(he),se.isProcessing=!1,oe&&(ie=!1,requestAnimationFrame(de))},pe=()=>{oe=!0,ie=!0,se.isProcessing||requestAnimationFrame(de)};function me(t,e){const n="pointer"+(e?"enter":"leave"),s="onHover"+(e?"Start":"End");return qt(t.current,n,(n,i)=>{if("touch"===n.type||ee())return;const o=t.getProps();t.animationState&&o.whileHover&&t.animationState.setActive("whileHover",e),o[s]&&le.update(()=>o[s](n,i))},{passive:!t.getProps()[s]})}const fe=(t,e)=>!!e&&(t===e||fe(t,e.parentElement)),ge=t=>t;function ye(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,Xt(n))}const ve=new WeakMap,xe=new WeakMap,Pe=t=>{const e=ve.get(t.target);e&&e(t)},Ee=t=>{t.forEach(Pe)};function we(t,e,n){const s=function({root:t,...e}){const n=t||document;xe.has(n)||xe.set(n,{});const s=xe.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(Ee,{root:t,...e})),s[i]}(e);return ve.set(t,n),s.observe(t),()=>{ve.delete(t),s.unobserve(t)}}const be={some:0,all:1};const Se={inView:{Feature:class extends ne{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:s="some",once:i}=t,o={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof s?s:be[s]};return we(this.node.current,o,t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,i&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:s}=this.node.getProps(),o=e?n:s;o&&o(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends ne{constructor(){super(...arguments),this.removeStartListeners=ge,this.removeEndListeners=ge,this.removeAccessibleListeners=ge,this.startPointerPress=(t,e)=>{if(this.removeEndListeners(),this.isPressing)return;const n=this.node.getProps(),s=qt(window,"pointerup",(t,e)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:s}=this.node.getProps();le.update(()=>{fe(this.node.current,t.target)?n&&n(t,e):s&&s(t,e)})},{passive:!(n.onTap||n.onPointerUp)}),i=qt(window,"pointercancel",(t,e)=>this.cancelPress(t,e),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=_t(s,i),this.startPress(t,e)},this.startAccessiblePress=()=>{const t=Ht(this.node.current,"keydown",t=>{if("Enter"!==t.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=Ht(this.node.current,"keyup",t=>{"Enter"===t.key&&this.checkPressEnd()&&ye("up",(t,e)=>{const{onTap:n}=this.node.getProps();n&&le.update(()=>n(t,e))})}),ye("down",(t,e)=>{this.startPress(t,e)})}),e=Ht(this.node.current,"blur",()=>{this.isPressing&&ye("cancel",(t,e)=>this.cancelPress(t,e))});this.removeAccessibleListeners=_t(t,e)}}startPress(t,e){this.isPressing=!0;const{onTapStart:n,whileTap:s}=this.node.getProps();s&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&le.update(()=>n(t,e))}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!ee()}cancelPress(t,e){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&le.update(()=>n(t,e))}mount(){const t=this.node.getProps(),e=qt(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),n=Ht(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=_t(e,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends ne{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=_t(Ht(this.node.current,"focus",()=>this.onFocus()),Ht(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends ne{mount(){this.unmount=_t(me(this.node,!0),me(this.node,!1))}unmount(){}}}};function Te(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}const Ce=t=>/^0[^.\s]+$/.test(t);function Ae(t,e){-1===t.indexOf(e)&&t.push(e)}function Ve(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class Me{constructor(){this.subscriptions=[]}add(t){return Ae(this.subscriptions,t),()=>Ve(this.subscriptions,t)}notify(t,e,n){const s=this.subscriptions.length;if(s)if(1===s)this.subscriptions[0](t,e,n);else for(let i=0;i<s;i++){const s=this.subscriptions[i];s&&s(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function Le(t,e){return e?t*(1e3/e):0}class De{constructor(t,e={}){var n;this.version="10.3.3",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(t,e=!0)=>{this.prev=this.current,this.current=t;const{delta:n,timestamp:s}=se;this.lastUpdated!==s&&(this.timeDelta=n,this.lastUpdated=s,le.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),e&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>le.postRender(this.velocityCheck),this.velocityCheck=({timestamp:t})=>{t!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=(n=this.current,!isNaN(parseFloat(n))),this.owner=e.owner}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new Me);const n=this.events[t].add(e);return"change"===t?()=>{n(),le.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,n){this.set(e),this.prev=t,this.timeDelta=n}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?Le(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Re(t,e){return new De(t,e)}const ke=(t,e)=>n=>Boolean(nt(n)&&et.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),Be=(t,e,n)=>s=>{if(!nt(s))return s;const[i,o,r,a]=s.match(Q);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},je={...Z,transform:t=>Math.round((t=>q(0,255,t))(t))},Fe={test:ke("rgb","red"),parse:Be("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+je.transform(t)+", "+je.transform(e)+", "+je.transform(n)+", "+J(_.transform(s))+")"};const Oe={test:ke("#"),parse:function(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}},transform:Fe.transform},Ie={test:ke("hsl","hue"),parse:Be("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+ot.transform(J(e))+", "+ot.transform(J(n))+", "+J(_.transform(s))+")"},Ue={test:t=>Fe.test(t)||Oe.test(t)||Ie.test(t),parse:t=>Fe.test(t)?Fe.parse(t):Ie.test(t)?Ie.parse(t):Oe.parse(t),transform:t=>nt(t)?t:t.hasOwnProperty("red")?Fe.transform(t):Ie.transform(t)};function Ne(t){"number"==typeof t&&(t=""+t);const e=[];let n=0,s=0;const i=t.match(tt);i&&(n=i.length,t=t.replace(tt,"${c}"),e.push(...i.map(Ue.parse)));const o=t.match(Q);return o&&(s=o.length,t=t.replace(Q,"${n}"),e.push(...o.map(Z.parse))),{values:e,numColors:n,numNumbers:s,tokenised:t}}function ze(t){return Ne(t).values}function We(t){const{values:e,numColors:n,tokenised:s}=Ne(t),i=e.length;return t=>{let e=s;for(let s=0;s<i;s++)e=e.replace(s<n?"${c}":"${n}",s<n?Ue.transform(t[s]):J(t[s]));return e}}const $e=t=>"number"==typeof t?0:t;const He={test:function(t){var e,n;return isNaN(t)&&nt(t)&&((null===(e=t.match(Q))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(tt))||void 0===n?void 0:n.length)||0)>0},parse:ze,createTransformer:We,getAnimatableNone:function(t){const e=ze(t);return We(t)(e.map($e))}},Ye=new Set(["brightness","contrast","saturate","opacity"]);function Xe(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[s]=n.match(Q)||[];if(!s)return t;const i=n.replace(s,"");let o=Ye.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const Ge=/([a-z-]*)\(.*?\)/g,qe={...He,getAnimatableNone:t=>{const e=t.match(Ge);return e?e.map(Xe).join(" "):t}},Ze={...ht,color:Ue,backgroundColor:Ue,outlineColor:Ue,fill:Ue,stroke:Ue,borderColor:Ue,borderTopColor:Ue,borderRightColor:Ue,borderBottomColor:Ue,borderLeftColor:Ue,filter:qe,WebkitFilter:qe},_e=t=>Ze[t];function Ke(t,e){let n=_e(t);return n!==qe&&(n=He),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Je=t=>e=>e.test(t),Qe=[Z,rt,ot,it,lt,at,{test:t=>"auto"===t,parse:t=>t}],tn=t=>Qe.find(Je(t)),en=[...Qe,Ue,He],nn=t=>en.find(Je(t));function sn(t,e,n){const s=t.getProps();return Ft(s,e,void 0!==n?n:s.custom,function(t){const e={};return t.values.forEach((t,n)=>e[n]=t.get()),e}(t),function(t){const e={};return t.values.forEach((t,n)=>e[n]=t.getVelocity()),e}(t))}function on(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Re(n))}function rn(t,e){const n=sn(t,e);let{transitionEnd:s={},transition:i={},...o}=n?t.makeTargetAnimatable(n,!1):{};o={...o,...s};for(const e in o){on(t,e,(r=o[e],Ot(r)?r[r.length-1]||0:r))}var r}function an(t,e){[...e].reverse().forEach(n=>{const s=t.getVariant(n);s&&rn(t,s),t.variantChildren&&t.variantChildren.forEach(t=>{an(t,e)})})}function ln(t,e,n){var s,i;const o=Object.keys(e).filter(e=>!t.hasValue(e)),r=o.length;if(r)for(let a=0;a<r;a++){const r=o[a],l=e[r];let c=null;Array.isArray(l)&&(c=l[0]),null===c&&(c=null!==(i=null!==(s=n[r])&&void 0!==s?s:t.readValue(r))&&void 0!==i?i:e[r]),null!=c&&("string"==typeof c&&(/^\-?\d*\.?\d+$/.test(c)||Ce(c))?c=parseFloat(c):!nn(c)&&He.test(l)&&(c=Ke(r,l)),t.addValue(r,Re(c,{owner:t})),void 0===n[r]&&(n[r]=c),null!==c&&t.setBaseTarget(r,c))}}function cn(t,e){if(!e)return;return(e[t]||e.default||e).from}function un(t,e,n){const s={};for(const i in t){const t=cn(i,e);if(void 0!==t)s[i]=t;else{const t=n.getValue(i);t&&(s[i]=t.get())}}return s}function hn(t){return Boolean(N(t)&&t.add)}const dn="data-"+Lt("framerAppearId");let pn=ge,mn=ge;const fn=t=>1e3*t,gn=t=>t/1e3,yn={current:!1};const vn=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,xn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:vn([0,.65,.55,1]),circOut:vn([.55,0,1,.45]),backIn:vn([.31,.01,.66,-.59]),backOut:vn([.33,1.53,.69,.99])};function Pn(t){if(t)return Array.isArray(t)?vn(t):xn[t]}function En(t,e,n,{delay:s=0,duration:i,repeat:o=0,repeatType:r="loop",ease:a,times:l}={}){const c={[e]:n};return l&&(c.offset=l),t.animate(c,{delay:s,duration:i,easing:Pn(a),fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"})}const wn={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},bn={},Sn={};for(const t in wn)Sn[t]=()=>(void 0===bn[t]&&(bn[t]=wn[t]()),bn[t]);const Tn=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Cn=t=>e=>1-t(1-e),An=t=>t*t,Vn=Cn(An),Mn=Tn(An),Ln=(t,e,n)=>-n*t+n*e+t;function Dn(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}const Rn=(t,e,n)=>{const s=t*t;return Math.sqrt(Math.max(0,n*(e*e-s)+s))},kn=[Oe,Fe,Ie];function Bn(t){const e=(n=t,kn.find(t=>t.test(n)));var n;mn(Boolean(e));let s=e.parse(t);return e===Ie&&(s=function({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,n/=100;let i=0,o=0,r=0;if(e/=100){const s=n<.5?n*(1+e):n+e-n*e,a=2*n-s;i=Dn(a,s,t+1/3),o=Dn(a,s,t),r=Dn(a,s,t-1/3)}else i=o=r=n;return{red:Math.round(255*i),green:Math.round(255*o),blue:Math.round(255*r),alpha:s}}(s)),s}const jn=(t,e)=>{const n=Bn(t),s=Bn(e),i={...n};return t=>(i.red=Rn(n.red,s.red,t),i.green=Rn(n.green,s.green,t),i.blue=Rn(n.blue,s.blue,t),i.alpha=Ln(n.alpha,s.alpha,t),Fe.transform(i))};function Fn(t,e){return"number"==typeof t?n=>Ln(t,e,n):Ue.test(t)?jn(t,e):Un(t,e)}const On=(t,e)=>{const n=[...t],s=n.length,i=t.map((t,n)=>Fn(t,e[n]));return t=>{for(let e=0;e<s;e++)n[e]=i[e](t);return n}},In=(t,e)=>{const n={...t,...e},s={};for(const i in n)void 0!==t[i]&&void 0!==e[i]&&(s[i]=Fn(t[i],e[i]));return t=>{for(const e in s)n[e]=s[e](t);return n}},Un=(t,e)=>{const n=He.createTransformer(e),s=Ne(t),i=Ne(e);return s.numColors===i.numColors&&s.numNumbers>=i.numNumbers?_t(On(s.values,i.values),n):(pn(!0),n=>""+(n>0?e:t))},Nn=(t,e,n)=>{const s=e-t;return 0===s?1:(n-t)/s},zn=(t,e)=>n=>Ln(t,e,n);function Wn(t,e,n){const s=[],i=n||("number"==typeof(o=t[0])?zn:"string"==typeof o?Ue.test(o)?jn:Un:Array.isArray(o)?On:"object"==typeof o?In:zn);var o;const r=t.length-1;for(let n=0;n<r;n++){let o=i(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]:e;o=_t(t,o)}s.push(o)}return s}function $n(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;mn(o===e.length),mn(!s||!Array.isArray(s)||s.length===o-1),t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const r=Wn(e,s,i),a=r.length,l=e=>{let n=0;if(a>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const s=Nn(t[n],t[n+1],e);return r[n](s)};return n?e=>l(q(t[0],t[o-1],e)):l}function Hn(t){const e=[0];return function(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=Nn(0,e,s);t.push(Ln(n,1,i))}}(e,t.length-1),e}const Yn=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function Xn(t,e,n,s){if(t===e&&n===s)return ge;const i=e=>function(t,e,n,s,i){let o,r,a=0;do{r=e+(n-e)/2,o=Yn(r,s,i)-t,o>0?n=r:e=r}while(Math.abs(o)>1e-7&&++a<12);return r}(e,0,1,t,n);return t=>0===t||1===t?t:Yn(i(t),e,s)}const Gn=t=>1-Math.sin(Math.acos(t)),qn=Cn(Gn),Zn=Tn(qn),_n=Xn(.33,1.53,.69,.99),Kn=Cn(_n),Jn=Tn(Kn),Qn=t=>(t*=2)<1?.5*Kn(t):.5*(2-Math.pow(2,-10*(t-1))),ts={linear:ge,easeIn:An,easeInOut:Mn,easeOut:Vn,circIn:Gn,circInOut:Zn,circOut:qn,backIn:Kn,backInOut:Jn,backOut:_n,anticipate:Qn},es=t=>{if(Array.isArray(t)){mn(4===t.length);const[e,n,s,i]=t;return Xn(e,n,s,i)}return"string"==typeof t?(mn(void 0!==ts[t]),ts[t]):t};function ns({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=(t=>Array.isArray(t)&&"number"!=typeof t[0])(s)?s.map(es):es(s),o={done:!1,value:e[0]},r=$n(function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:Hn(e),t),e,{ease:Array.isArray(i)?i:(a=e,l=i,a.map(()=>l||Mn).splice(0,a.length-1))});var a,l;return{calculatedDuration:t,next:e=>(o.value=r(e),o.done=e>=t,o)}}function ss(t,e,n){const s=Math.max(e-5,0);return Le(n-t(s),e-s)}function is({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let i,o;pn(t<=fn(10));let r=1-e;r=q(.05,1,r),t=q(.01,10,gn(t)),r<1?(i=e=>{const s=e*r,i=s*t;return.001-(s-n)/os(e,r)*Math.exp(-i)},o=e=>{const s=e*r*t,o=s*n+n,a=Math.pow(r,2)*Math.pow(e,2)*t,l=Math.exp(-s),c=os(Math.pow(e,2),r);return(.001-i(e)>0?-1:1)*((o-a)*l)/c}):(i=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,o=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let s=n;for(let n=1;n<12;n++)s-=t(s)/e(s);return s}(i,o,5/t);if(t=fn(t),isNaN(a))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(a,2)*s;return{stiffness:e,damping:2*r*Math.sqrt(s*e),duration:t}}}function os(t,e){return t*Math.sqrt(1-e*e)}const rs=["duration","bounce"],as=["stiffness","damping","mass"];function ls(t,e){return e.some(e=>void 0!==t[e])}function cs({keyframes:t,restDelta:e,restSpeed:n,...s}){const i=t[0],o=t[t.length-1],r={done:!1,value:i},{stiffness:a,damping:l,mass:c,velocity:u,duration:h,isResolvedFromDuration:d}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!ls(t,as)&&ls(t,rs)){const n=is(t);e={...e,...n,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}(s),p=u?-gn(u):0,m=l/(2*Math.sqrt(a*c)),f=o-i,g=gn(Math.sqrt(a/c)),y=Math.abs(f)<5;let v;if(n||(n=y?.01:2),e||(e=y?.005:.5),m<1){const t=os(g,m);v=e=>{const n=Math.exp(-m*g*e);return o-n*((p+m*g*f)/t*Math.sin(t*e)+f*Math.cos(t*e))}}else if(1===m)v=t=>o-Math.exp(-g*t)*(f+(p+g*f)*t);else{const t=g*Math.sqrt(m*m-1);v=e=>{const n=Math.exp(-m*g*e),s=Math.min(t*e,300);return o-n*((p+m*g*f)*Math.sinh(s)+t*f*Math.cosh(s))/t}}return{calculatedDuration:d&&h||null,next:t=>{const s=v(t);if(d)r.done=t>=h;else{let i=p;0!==t&&(i=m<1?ss(v,t,s):0);const a=Math.abs(i)<=n,l=Math.abs(o-s)<=e;r.done=a&&l}return r.value=r.done?o:s,r}}}function us({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let m=n*e;const f=h+m,g=void 0===r?f:r(f);g!==f&&(m=g-h);const y=t=>-m*Math.exp(-t/s),v=t=>g+y(t),x=t=>{const e=y(t),n=v(t);d.done=Math.abs(e)<=c,d.value=d.done?g:n};let P,E;const w=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(P=t,E=cs({keyframes:[d.value,p(d.value)],velocity:ss(v,t,d.value),damping:i,stiffness:o,restDelta:c,restSpeed:u}))};return w(0),{calculatedDuration:null,next:t=>{let e=!1;return E||void 0!==P||(e=!0,x(t),w(t)),void 0!==P&&t>P?E.next(t-P):(!e&&x(t),d)}}}const hs=t=>{const e=({timestamp:e})=>t(e);return{start:()=>le.update(e,!0),stop:()=>ce.update(e),now:()=>se.isProcessing?se.timestamp:performance.now()}},ds={decay:us,inertia:us,tween:ns,keyframes:ns,spring:cs};function ps({autoplay:t=!0,delay:e=0,driver:n=hs,keyframes:s,type:i="keyframes",repeat:o=0,repeatDelay:r=0,repeatType:a="loop",onPlay:l,onStop:c,onComplete:u,onUpdate:h,...d}){let p,m;const f=()=>{m=new Promise(t=>{p=t})};let g;f();const y=ds[i]||ns;let v;y!==ns&&"number"!=typeof s[0]&&(v=$n([0,100],s,{clamp:!1}),s=[0,100]);const x=y({...d,keyframes:s});let P;"mirror"===a&&(P=y({...d,keyframes:[...s].reverse(),velocity:-(d.velocity||0)}));let E="idle",w=null,b=null;null===x.calculatedDuration&&o&&(x.calculatedDuration=function(t){let e=0,n=t.next(e);for(;!n.done&&e<2e4;)e+=50,n=t.next(e);return e}(x));const{calculatedDuration:S}=x;let T=1/0,C=1/0;S&&(T=S+r,C=T*(o+1)-r);let A=0;const V=t=>{if(null===b)return;A=null!==w?w:t-b,A=Math.max(A-e,0),"finished"===E&&null===w&&(A=C);let n=A,s=x;if(o){const t=A/T;let e=Math.floor(t),i=t%1;!i&&t>=1&&(i=1),1===i&&e--;const o=e%2;o&&("reverse"===a?(i=1-i,r&&(i-=r/T)):"mirror"===a&&(s=P));n=(A>=C?"reverse"===a&&o?0:1:q(0,1,i))*T}const i=s.next(n);let{value:l,done:c}=i;h&&h(v?v(l):l),null!==S&&(c=A>=C);return null===w&&("finished"===E||"running"===E&&c)&&M(),i},M=()=>{g&&g.stop(),E="finished",u&&u(),p(),f()},L=()=>{g||(g=n(V));const t=g.now();l&&l(),E="running",null!==w?b=t-w:b||(b=t),w=null,g.start()};t&&L();return{then:(t,e)=>m.then(t,e),get time(){return gn(A)},set time(t){const e=fn(t);null===w&&g?b=g.now()-e:w=e},play:L,pause:()=>{E="paused",w=A},stop:()=>{c&&c(),g&&g.stop(),g=void 0},sample:t=>(b=0,V(t))}}const ms=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),fs=(t,e)=>{return"spring"===e.type||"backgroundColor"===t||!(!(n=e.ease)||Array.isArray(n)||"string"==typeof n&&xn[n]);var n};const gs={type:"spring",stiffness:500,damping:25,restSpeed:10},ys={type:"keyframes",duration:.8},vs={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},xs=(t,{keyframes:e})=>e.length>2?ys:I.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:gs:vs,Ps=(t,e)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!He.test(e)||e.startsWith("url(")));function Es(t){return 0===t||"string"==typeof t&&0===parseFloat(t)&&-1===t.indexOf(" ")}function ws(t){return"number"==typeof t?0:Ke("",t)}function bs(t,e){return t[e]||t.default||t}const Ss=(t,e,n,s={})=>i=>{const o=bs(s,t)||{},r=o.delay||s.delay||0;let{elapsed:a=0}=s;a-=fn(r);const l=function(t,e,n,s){const i=Ps(e,n);let o=void 0!==s.from?s.from:t.get();return"none"===o&&i&&"string"==typeof n?o=Ke(e,n):Es(o)&&"string"==typeof n?o=ws(n):!Array.isArray(n)&&Es(n)&&"string"==typeof o&&(n=ws(o)),Array.isArray(n)?(null===n[0]&&(n[0]=o),n):[o,n]}(e,t,n,o),c=l[0],u=l[l.length-1],h=Ps(t,c),d=Ps(t,u);pn(h===d);let p={keyframes:l,velocity:e.getVelocity(),...o,delay:-a,onUpdate:t=>{e.set(t),o.onUpdate&&o.onUpdate(t)},onComplete:()=>{i(),o.onComplete&&o.onComplete()}};if(!h||!d||yn.current||!1===o.type)return function({keyframes:t,delay:e,onUpdate:n,onComplete:s}){const i=()=>(n&&n(t[t.length-1]),s&&s(),{time:0,play:ge,pause:ge,stop:ge,then:()=>Promise.resolve()});return e?ps({keyframes:[0,1],duration:e,onComplete:i}):i()}(p);if(function({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}(o)||(p={...p,...xs(t,p)}),p.duration&&(p.duration=fn(p.duration)),p.repeatDelay&&(p.repeatDelay=fn(p.repeatDelay)),e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const n=function(t,e,{onUpdate:n,onComplete:s,...i}){if(!(Sn.waapi()&&ms.has(e)&&!i.repeatDelay&&"mirror"!==i.repeatType&&0!==i.damping&&"inertia"!==i.type))return!1;let{keyframes:o,duration:r=300,ease:a}=i;if(fs(e,i)){const t=ps({...i,repeat:0,delay:0});let e={done:!1,value:o[0]};const n=[];let s=0;for(;!e.done&&s<2e4;)e=t.sample(s),n.push(e.value),s+=10;o=n,r=s-10,a="linear"}const l=En(t.owner.current,e,o,{...i,duration:r,ease:a});return l.onfinish=()=>{t.set(function(t,{repeat:e,repeatType:n="loop"}){return t[e&&"loop"!==n&&e%2==1?0:t.length-1]}(o,i)),le.update(()=>l.cancel()),s&&s()},{then:(t,e)=>l.finished.then(t,e),get time(){return gn(l.currentTime||0)},set time(t){l.currentTime=fn(t)},play:()=>l.play(),pause:()=>l.pause(),stop:()=>{const{currentTime:e}=l;if(e){const n=ps({...i,autoplay:!1});t.setWithVelocity(n.sample(e-10).value,n.sample(e).value,10)}le.update(()=>l.cancel())}}}(e,t,p);if(n)return n}return ps(p)};function Ts(t,e,n={}){let s;if(t.notify("AnimationStart",e),Array.isArray(e)){const i=e.map(e=>Cs(t,e,n));s=Promise.all(i)}else if("string"==typeof e)s=Cs(t,e,n);else{const i="function"==typeof e?sn(t,e,n.custom):e;s=As(t,i,n)}return s.then(()=>t.notify("AnimationComplete",e))}function Cs(t,e,n={}){const s=sn(t,e,n.custom);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>As(t,s,n):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(s=0)=>{const{delayChildren:o=0,staggerChildren:r,staggerDirection:a}=i;return function(t,e,n=0,s=0,i=1,o){const r=[],a=(t.variantChildren.size-1)*s,l=1===i?(t=0)=>t*s:(t=0)=>a-t*s;return Array.from(t.variantChildren).sort(Vs).forEach((t,s)=>{t.notify("AnimationStart",e),r.push(Cs(t,e,{...o,delay:n+l(s)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(r)}(t,e,o+s,r,a,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[t,e]="beforeChildren"===a?[o,r]:[r,o];return t().then(e)}return Promise.all([o(),r(n.delay)])}function As(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=t.makeTargetAnimatable(e);const l=t.getValue("willChange");s&&(o=s);const c=[],u=i&&t.animationState&&t.animationState.getState()[i];for(const e in a){const s=t.getValue(e),i=a[e];if(!s||void 0===i||u&&Ms(u,e))continue;const r={delay:n,elapsed:0,...o};if(window.HandoffAppearAnimations&&!s.hasAnimated){const n=t.getProps()[dn];n&&(r.elapsed=window.HandoffAppearAnimations(n,e,s,le))}let h=s.start(Ss(e,s,i,t.shouldReduceMotion&&I.has(e)?{type:!1}:r));hn(l)&&(l.add(e),h=h.then(()=>l.remove(e))),c.push(h)}return Promise.all(c).then(()=>{r&&rn(t,r)})}function Vs(t,e){return t.sortNodePosition(e)}function Ms({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,s}const Ls=[...f].reverse(),Ds=f.length;function Rs(t){let e=function(t){return e=>Promise.all(e.map(({animation:e,options:n})=>Ts(t,e,n)))}(t);const n={animate:Bs(!0),whileInView:Bs(),whileHover:Bs(),whileTap:Bs(),whileDrag:Bs(),whileFocus:Bs(),exit:Bs()};let s=!0;const i=(e,n)=>{const s=sn(t,n);if(s){const{transition:t,transitionEnd:n,...i}=s;e={...e,...i,...n}}return e};function o(o,r){const a=t.getProps(),l=t.getVariantContext(!0)||{},c=[],u=new Set;let h={},d=1/0;for(let e=0;e<Ds;e++){const f=Ls[e],g=n[f],y=void 0!==a[f]?a[f]:l[f],v=p(y),x=f===r?g.isActive:null;!1===x&&(d=e);let P=y===l[f]&&y!==a[f]&&v;if(P&&s&&t.manuallyAnimateOnMount&&(P=!1),g.protectedKeys={...h},!g.isActive&&null===x||!y&&!g.prevProp||m(y)||"boolean"==typeof y)continue;const E=ks(g.prevProp,y);let w=E||f===r&&g.isActive&&!P&&v||e>d&&v;const b=Array.isArray(y)?y:[y];let S=b.reduce(i,{});!1===x&&(S={});const{prevResolvedValues:T={}}=g,C={...T,...S},A=t=>{w=!0,u.delete(t),g.needsAnimating[t]=!0};for(const t in C){const e=S[t],n=T[t];h.hasOwnProperty(t)||(e!==n?Ot(e)&&Ot(n)?!Te(e,n)||E?A(t):g.protectedKeys[t]=!0:void 0!==e?A(t):u.add(t):void 0!==e&&u.has(t)?A(t):g.protectedKeys[t]=!0)}g.prevProp=y,g.prevResolvedValues=S,g.isActive&&(h={...h,...S}),s&&t.blockInitialAnimation&&(w=!1),w&&!P&&c.push(...b.map(t=>({animation:t,options:{type:f,...o}})))}if(u.size){const e={};u.forEach(n=>{const s=t.getBaseTarget(n);void 0!==s&&(e[n]=s)}),c.push({animation:e})}let f=Boolean(c.length);return s&&!1===a.initial&&!t.manuallyAnimateOnMount&&(f=!1),s=!1,f?e(c):Promise.resolve()}return{animateChanges:o,setActive:function(e,s,i){var r;if(n[e].isActive===s)return Promise.resolve();null===(r=t.variantChildren)||void 0===r||r.forEach(t=>{var n;return null===(n=t.animationState)||void 0===n?void 0:n.setActive(e,s)}),n[e].isActive=s;const a=o(i,e);for(const t in n)n[t].protectedKeys={};return a},setAnimateFunction:function(n){e=n(t)},getState:()=>n}}function ks(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!Te(e,t)}function Bs(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}let js=0;const Fs={animation:{Feature:class extends ne{constructor(t){super(t),t.animationState||(t.animationState=Rs(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),m(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){}}},exit:{Feature:class extends ne{constructor(){super(...arguments),this.id=js++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e,custom:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const i=this.node.animationState.setActive("exit",!t,{custom:null!=n?n:this.node.getProps().custom});e&&!t&&i.then(()=>e(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}}},Os=(t,e)=>Math.abs(t-e);function Is(t,e){const n=Os(t.x,e.x),s=Os(t.y,e.y);return Math.sqrt(n**2+s**2)}class Us{constructor(t,e,{transformPagePoint:n}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const t=Ws(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=Is(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:s}=t,{timestamp:i}=se;this.history.push({...s,timestamp:i});const{onStart:o,onMove:r}=this.handlers;e||(o&&o(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),r&&r(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=Ns(e,this.transformPagePoint),le.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{if(this.end(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const{onEnd:n,onSessionEnd:s}=this.handlers,i=Ws("pointercancel"===t.type?this.lastMoveEventInfo:Ns(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,i),s&&s(t,i)},!Yt(t))return;this.handlers=e,this.transformPagePoint=n;const s=Ns(Xt(t),this.transformPagePoint),{point:i}=s,{timestamp:o}=se;this.history=[{...i,timestamp:o}];const{onSessionStart:r}=e;r&&r(t,Ws(s,this.history)),this.removeListeners=_t(qt(window,"pointermove",this.handlePointerMove),qt(window,"pointerup",this.handlePointerUp),qt(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ce.update(this.updatePoint)}}function Ns(t,e){return e?{point:e(t.point)}:t}function zs(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Ws({point:t},e){return{point:t,delta:zs(t,Hs(e)),offset:zs(t,$s(e)),velocity:Ys(e,.1)}}function $s(t){return t[0]}function Hs(t){return t[t.length-1]}function Ys(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=Hs(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>fn(e)));)n--;if(!s)return{x:0,y:0};const o=gn(i.timestamp-s.timestamp);if(0===o)return{x:0,y:0};const r={x:(i.x-s.x)/o,y:(i.y-s.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function Xs(t){return t.max-t.min}function Gs(t,e=0,n=.01){return Math.abs(t-e)<=n}function qs(t,e,n,s=.5){t.origin=s,t.originPoint=Ln(e.min,e.max,t.origin),t.scale=Xs(n)/Xs(e),(Gs(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=Ln(n.min,n.max,t.origin)-t.originPoint,(Gs(t.translate)||isNaN(t.translate))&&(t.translate=0)}function Zs(t,e,n,s){qs(t.x,e.x,n.x,s?s.originX:void 0),qs(t.y,e.y,n.y,s?s.originY:void 0)}function _s(t,e,n){t.min=n.min+e.min,t.max=t.min+Xs(e)}function Ks(t,e,n){t.min=e.min-n.min,t.max=t.min+Xs(e)}function Js(t,e,n){Ks(t.x,e.x,n.x),Ks(t.y,e.y,n.y)}function Qs(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function ti(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}const ei=.35;function ni(t,e,n){return{min:si(t,e),max:si(t,n)}}function si(t,e){return"number"==typeof t?t:t[e]||0}const ii=()=>({x:{min:0,max:0},y:{min:0,max:0}});function oi(t){return[t("x"),t("y")]}function ri({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function ai(t){return void 0===t||1===t}function li({scale:t,scaleX:e,scaleY:n}){return!ai(t)||!ai(e)||!ai(n)}function ci(t){return li(t)||ui(t)||t.z||t.rotate||t.rotateX||t.rotateY}function ui(t){return hi(t.x)||hi(t.y)}function hi(t){return t&&"0%"!==t}function di(t,e,n){return n+e*(t-n)}function pi(t,e,n,s,i){return void 0!==i&&(t=di(t,i,s)),di(t,n,s)+e}function mi(t,e=0,n=1,s,i){t.min=pi(t.min,e,n,s,i),t.max=pi(t.max,e,n,s,i)}function fi(t,{x:e,y:n}){mi(t.x,e.translate,e.scale,e.originPoint),mi(t.y,n.translate,n.scale,n.originPoint)}function gi(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function yi(t,e){t.min=t.min+e,t.max=t.max+e}function vi(t,e,[n,s,i]){const o=void 0!==e[i]?e[i]:.5,r=Ln(t.min,t.max,o);mi(t,e[n],e[s],r,e.scale)}const xi=["x","scaleX","originX"],Pi=["y","scaleY","originY"];function Ei(t,e){vi(t.x,e,xi),vi(t.y,e,Pi)}function wi(t,e){return ri(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}(t.getBoundingClientRect(),e))}const bi=new WeakMap;class Si{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=t}start(t,{snapToCursor:e=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;this.panSession=new Us(t,{onSessionStart:t=>{this.stopAnimation(),e&&this.snapToCursor(Xt(t,"page").point)},onStart:(t,e)=>{const{drag:n,dragPropagation:s,onDragStart:i}=this.getProps();if(n&&!s&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=te(n),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),oi(t=>{let e=this.getAxisMotionValue(t).get()||0;if(ot.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const s=n.layout.layoutBox[t];if(s){e=Xs(s)*(parseFloat(e)/100)}}}this.originPoint[t]=e}),i&&le.update(()=>i(t,e));const{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:s,onDirectionLock:i,onDrag:o}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:r}=e;if(s&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(r),void(null!==this.currentDirection&&i&&i(this.currentDirection));this.updateAxis("x",e.point,r),this.updateAxis("y",e.point,r),this.visualElement.render(),o&&o(t,e)},onSessionEnd:(t,e)=>this.stop(t,e)},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,e){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:s}=e;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i&&le.update(()=>i(t,e))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,n){const{drag:s}=this.getProps();if(!n||!Ti(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=function(t,{min:e,max:n},s){return void 0!==e&&t<e?t=s?Ln(e,t,s.min):Math.max(t,e):void 0!==n&&t>n&&(t=s?Ln(n,t,s.max):Math.min(t,n)),t}(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){const{dragConstraints:t,dragElastic:e}=this.getProps(),{layout:n}=this.visualElement.projection||{},s=this.constraints;t&&d(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!n)&&function(t,{top:e,left:n,bottom:s,right:i}){return{x:Qs(t.x,n,i),y:Qs(t.y,e,s)}}(n.layoutBox,t),this.elastic=function(t=ei){return!1===t?t=0:!0===t&&(t=ei),{x:ni(t,"left","right"),y:ni(t,"top","bottom")}}(e),s!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&oi(t=>{this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(n.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!d(t))return!1;const n=t.current;mn(null!==n);const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=function(t,e,n){const s=wi(t,n),{scroll:i}=e;return i&&(yi(s.x,i.offset.x),yi(s.y,i.offset.y)),s}(n,s.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:ti(t.x,e.x),y:ti(t.y,e.y)}}(s.layout.layoutBox,i);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=ri(t))}return o}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},l=oi(r=>{if(!Ti(r,e,this.currentDirection))return;let l=a&&a[r]||{};o&&(l={min:0,max:0});const c=s?200:1e6,u=s?40:1e7,h={type:"inertia",velocity:n?t[r]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...l};return this.startAxisValueAnimation(r,h)});return Promise.all(l).then(r)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return n.start(Ss(t,n,0,e))}stopAnimation(){oi(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const e="_drag"+t.toUpperCase(),n=this.visualElement.getProps(),s=n[e];return s||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){oi(e=>{const{drag:n}=this.getProps();if(!Ti(e,n,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(e);if(s&&s.layout){const{min:n,max:o}=s.layout.layoutBox[e];i.set(t[e]-Ln(n,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!d(e)||!n||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};oi(t=>{const e=this.getAxisMotionValue(t);if(e){const n=e.get();s[t]=function(t,e){let n=.5;const s=Xs(t),i=Xs(e);return i>s?n=Nn(e.min,e.max-s,t.min):s>i&&(n=Nn(t.min,t.max-i,e.min)),q(0,1,n)}({min:n,max:n},this.constraints[t])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),oi(e=>{if(!Ti(e,t,null))return;const n=this.getAxisMotionValue(e),{min:i,max:o}=this.constraints[e];n.set(Ln(i,o,s[e]))})}addListeners(){if(!this.visualElement.current)return;bi.set(this.visualElement,this);const t=qt(this.visualElement.current,"pointerdown",t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)}),e=()=>{const{dragConstraints:t}=this.getProps();d(t)&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,s=n.addEventListener("measure",e);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),e();const i=Ht(window,"resize",()=>this.scalePositionWithinConstraints()),o=n.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(oi(e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))}),this.visualElement.render())});return()=>{i(),t(),s(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=ei,dragMomentum:r=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:r}}}function Ti(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const Ci=t=>(e,n)=>{t&&le.update(()=>t(e,n))};class Ai{constructor(t){this.animations=t.filter(Boolean)}then(t,e){return Promise.all(this.animations).then(t).catch(e)}get time(){return this.animations[0].time}set time(t){for(let e=0;e<this.animations.length;e++)this.animations[e].time=t}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}stop(){this.runAll("stop")}}function Vi(t,e,n={}){const s=N(t)?t:Re(t);return s.start(Ss("",s,e,n)),s.animation||new Ai([])}const Mi=["TopLeft","TopRight","BottomLeft","BottomRight"],Li=Mi.length,Di=t=>"string"==typeof t?parseFloat(t):t,Ri=t=>"number"==typeof t||rt.test(t);function ki(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const Bi=Fi(0,.5,qn),ji=Fi(.5,.95,ge);function Fi(t,e,n){return s=>s<t?0:s>e?1:n(Nn(t,e,s))}function Oi(t,e){t.min=e.min,t.max=e.max}function Ii(t,e){Oi(t.x,e.x),Oi(t.y,e.y)}function Ui(t,e,n,s,i){return t=di(t-=e,1/n,s),void 0!==i&&(t=di(t,1/i,s)),t}function Ni(t,e,[n,s,i],o,r){!function(t,e=0,n=1,s=.5,i,o=t,r=t){if(ot.test(e)){e=parseFloat(e);e=Ln(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=Ln(o.min,o.max,s);t===o&&(a-=e),t.min=Ui(t.min,e,n,a,i),t.max=Ui(t.max,e,n,a,i)}(t,e[n],e[s],e[i],e.scale,o,r)}const zi=["x","scaleX","originX"],Wi=["y","scaleY","originY"];function $i(t,e,n,s){Ni(t.x,e,zi,n?n.x:void 0,s?s.x:void 0),Ni(t.y,e,Wi,n?n.y:void 0,s?s.y:void 0)}function Hi(t){return 0===t.translate&&1===t.scale}function Yi(t){return Hi(t.x)&&Hi(t.y)}function Xi(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function Gi(t){return Xs(t.x)/Xs(t.y)}class qi{constructor(){this.members=[]}add(t){Ae(this.members,t),t.scheduleRender()}remove(t){if(Ve(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){const e=this.members.findIndex(e=>t===e);if(0===e)return!1;let n;for(let t=e;t>=0;t--){const e=this.members[t];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,e&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:s}=t.options;!1===s&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:e,resumingFrom:n}=t;e.onExitComplete&&e.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Zi(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y;if((i||o)&&(s=`translate3d(${i}px, ${o}px, 0) `),1===e.x&&1===e.y||(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{rotate:t,rotateX:e,rotateY:i}=n;t&&(s+=`rotate(${t}deg) `),e&&(s+=`rotateX(${e}deg) `),i&&(s+=`rotateY(${i}deg) `)}const r=t.x.scale*e.x,a=t.y.scale*e.y;return 1===r&&1===a||(s+=`scale(${r}, ${a})`),s||"none"}const _i=(t,e)=>t.depth-e.depth;class Ki{constructor(){this.children=[],this.isDirty=!1}add(t){Ae(this.children,t),this.isDirty=!0}remove(t){Ve(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(_i),this.isDirty=!1,this.children.forEach(t)}}function Ji(t,e){const n=performance.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(ce.read(s),t(o-e))};return le.read(s,!0),()=>ce.read(s)}function Qi(t,e){var n;return"string"==typeof t?e?(null!==(n=e[t])&&void 0!==n||(e[t]=document.querySelectorAll(t)),t=e[t]):t=document.querySelectorAll(t):t instanceof Element&&(t=[t]),Array.from(t||[])}const to=new WeakMap;let eo;function no({target:t,contentRect:e,borderBoxSize:n}){var s;null===(s=to.get(t))||void 0===s||s.forEach(s=>{s({target:t,contentSize:e,get size(){return function(t,e){if(e){const{inlineSize:t,blockSize:n}=e[0];return{width:t,height:n}}return t instanceof SVGElement&&"getBBox"in t?t.getBBox():{width:t.offsetWidth,height:t.offsetHeight}}(t,n)}})})}function so(t){t.forEach(no)}function io(t,e){eo||"undefined"!=typeof ResizeObserver&&(eo=new ResizeObserver(so));const n=Qi(t);return n.forEach(t=>{let n=to.get(t);n||(n=new Set,to.set(t,n)),n.add(e),null==eo||eo.observe(t)}),()=>{n.forEach(t=>{const n=to.get(t);null==n||n.delete(e),(null==n?void 0:n.size)||null==eo||eo.unobserve(t)})}}const oo=new Set;let ro;function ao(t){return oo.add(t),ro||(ro=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};oo.forEach(t=>t(e))},window.addEventListener("resize",ro)),()=>{oo.delete(t),!oo.size&&ro&&(ro=void 0)}}const lo={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function co(t,e,n,s){const i=n[e],{length:o,position:r}=lo[e],a=i.current,l=n.time;i.current=t["scroll"+r],i.scrollLength=t["scroll"+o]-t["client"+o],i.offset.length=0,i.offset[0]=0,i.offset[1]=i.scrollLength,i.progress=Nn(0,i.scrollLength,i.current);const c=s-l;i.velocity=c>50?0:Le(i.current-a,c)}const uo={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},ho={start:0,center:.5,end:1};function po(t,e,n=0){let s=0;if(void 0!==ho[t]&&(t=ho[t]),"string"==typeof t){const e=parseFloat(t);t.endsWith("px")?s=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?s=e/100*document.documentElement.clientWidth:t.endsWith("vh")?s=e/100*document.documentElement.clientHeight:t=e}return"number"==typeof t&&(s=e*t),n+s}const mo=[0,0];function fo(t,e,n,s){let i=Array.isArray(t)?t:mo,o=0,r=0;return"number"==typeof t?i=[t,t]:"string"==typeof t&&(i=(t=t.trim()).includes(" ")?t.split(" "):[t,ho[t]?t:"0"]),o=po(i[0],n,s),r=po(i[1],e),o-r}const go={x:0,y:0};function yo(t,e,n){let{offset:s=uo.All}=n;const{target:i=t,axis:o="y"}=n,r="y"===o?"height":"width",a=i!==t?function(t,e){let n={x:0,y:0},s=t;for(;s&&s!==e;)if(s instanceof HTMLElement)n.x+=s.offsetLeft,n.y+=s.offsetTop,s=s.offsetParent;else if(s instanceof SVGGraphicsElement&&"getBBox"in s){const{top:t,left:e}=s.getBBox();for(n.x+=e,n.y+=t;s&&"svg"!==s.tagName;)s=s.parentNode}return n}(i,t):go,l=i===t?{width:t.scrollWidth,height:t.scrollHeight}:{width:i.clientWidth,height:i.clientHeight},c={width:t.clientWidth,height:t.clientHeight};e[o].offset.length=0;let u=!e[o].interpolate;const h=s.length;for(let t=0;t<h;t++){const n=fo(s[t],c[r],l[r],a[o]);u||n===e[o].interpolatorOffsets[t]||(u=!0),e[o].offset[t]=n}u&&(e[o].interpolate=$n(e[o].offset,Hn(s)),e[o].interpolatorOffsets=[...e[o].offset]),e[o].progress=e[o].interpolate(e[o].current)}function vo(t,e,n,s={}){return{measure:()=>function(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let s=e;for(;s&&s!==t;)n.x.targetOffset+=s.offsetLeft,n.y.targetOffset+=s.offsetTop,s=s.offsetParent}n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight}(t,s.target,n),update:e=>{!function(t,e,n){co(t,"x",e,n),co(t,"y",e,n),e.time=n}(t,n,e),(s.offset||s.target)&&yo(t,n,s)},notify:()=>e(n)}}const xo=new WeakMap,Po=new WeakMap,Eo=new WeakMap,wo=t=>t===document.documentElement?window:t;function bo(t,{container:e=document.documentElement,...n}={}){let s=Eo.get(e);s||(s=new Set,Eo.set(e,s));const i=vo(e,t,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},n);if(s.add(i),!xo.has(e)){const t=()=>{const t=performance.now();for(const t of s)t.measure();for(const e of s)e.update(t);for(const t of s)t.notify()};xo.set(e,t);const n=wo(e);window.addEventListener("resize",t,{passive:!0}),e!==document.documentElement&&Po.set(e,(r=t,"function"==typeof(o=e)?ao(o):io(o,r))),n.addEventListener("scroll",t,{passive:!0})}var o,r;const a=xo.get(e),l=requestAnimationFrame(a);return()=>{var t;cancelAnimationFrame(l);const n=Eo.get(e);if(!n)return;if(n.delete(i),n.size)return;const s=xo.get(e);xo.delete(e),s&&(wo(e).removeEventListener("scroll",s),null===(t=Po.get(e))||void 0===t||t(),window.removeEventListener("resize",s))}}const So={any:0,all:1};function To(t,e,{root:n,margin:s,amount:i="any"}={}){const o=Qi(t),r=new WeakMap,a=new IntersectionObserver(t=>{t.forEach(t=>{const n=r.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){const n=e(t);"function"==typeof n?r.set(t.target,n):a.unobserve(t.target)}else n&&(n(t),r.delete(t.target))})},{root:n,rootMargin:s,threshold:"number"==typeof i?i:So[i]});return o.forEach(t=>a.observe(t)),()=>a.disconnect()}function Co(...t){const e=!Array.isArray(t[0]),n=e?0:-1,s=t[0+n],i=t[1+n],o=t[2+n],r=t[3+n],a=$n(i,o,{mixer:(l=o[0],(t=>"object"==typeof t&&t.mix)(l)?l.mix:void 0),...r});var l;return e?a(s):a}const Ao=(t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t},Vo=["","X","Y","Z"];let Mo=0;const Lo={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function Do({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(t,n={},s=(null==e?void 0:e())){this.id=Mo++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{var t;Lo.totalNodes=Lo.resolvedTargetDeltas=Lo.recalculatedProjection=0,this.nodes.forEach(Bo),this.nodes.forEach(No),this.nodes.forEach(zo),this.nodes.forEach(jo),t=Lo,window.MotionDebug&&window.MotionDebug.record(t)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=t,this.latestValues=n,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0,t&&this.root.registerPotentialNode(t,this);for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new Ki)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new Me),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}registerPotentialNode(t,e){this.potentialNodes.set(t,e)}mount(e,n=!1){if(this.instance)return;this.isSVG=e instanceof SVGElement&&"svg"!==e.tagName,this.instance=e;const{layoutId:s,layout:i,visualElement:o}=this.options;if(o&&!o.current&&o.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.elementId&&this.root.potentialNodes.delete(this.elementId),n&&(i||s)&&(this.isLayoutDirty=!0),t){let n;const s=()=>this.root.updateBlockedByResize=!1;t(e,()=>{this.root.updateBlockedByResize=!0,n&&n(),n=Ji(s,250),T.hasAnimatedSinceResize&&(T.hasAnimatedSinceResize=!1,this.nodes.forEach(Uo))})}s&&this.root.registerSharedNode(s,this),!1!==this.options.animate&&o&&(s||i)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeTargetChanged:n,layout:s})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const i=this.options.transition||o.getDefaultTransition()||Go,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=o.getProps(),l=!this.targetLayout||!Xi(this.targetLayout,s)||n,c=!e&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||c||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(t,c);const e={...bs(i,"layout"),onPlay:r,onComplete:a};(o.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e)}else e||0!==this.animationProgress||Uo(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=s})}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=void 0,ce.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Wo),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const s=this.getTransformTemplate();this.prevTransformTemplateValue=s?s(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}didUpdate(){if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(Oo);this.isUpdating&&(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(qo),this.potentialNodes.clear()),this.nodes.forEach(Io),this.nodes.forEach(Ro),this.nodes.forEach(ko),this.clearAllSnapshots(),ue.update(),ue.preRender(),ue.render())}clearAllSnapshots(){this.nodes.forEach(Fo),this.sharedNodes.forEach($o)}scheduleUpdateProjection(){le.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){le.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++){this.path[t].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=Boolean(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&(this.scroll={animationId:this.root.animationId,phase:t,isRoot:s(this.instance),offset:n(this.instance)})}resetTransform(){if(!i)return;const t=this.isLayoutDirty||this.shouldResetTransform,e=this.projectionDelta&&!Yi(this.projectionDelta),n=this.getTransformTemplate(),s=n?n(this.latestValues,""):void 0,o=s!==this.prevTransformTemplateValue;t&&(e||ci(this.latestValues)||o)&&(i(this.instance,s),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);var s;return t&&(n=this.removeTransform(n)),Zo((s=n).x),Zo(s.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const e=t.measureViewportBox(),{scroll:n}=this.root;return n&&(yi(e.x,n.offset.x),yi(e.y,n.offset.y)),e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};Ii(e,t);for(let n=0;n<this.path.length;n++){const s=this.path[n],{scroll:i,options:o}=s;if(s!==this.root&&i&&o.layoutScroll){if(i.isRoot){Ii(e,t);const{scroll:n}=this.root;n&&(yi(e.x,-n.offset.x),yi(e.y,-n.offset.y))}yi(e.x,i.offset.x),yi(e.y,i.offset.y)}}return e}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};Ii(n,t);for(let t=0;t<this.path.length;t++){const s=this.path[t];!e&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Ei(n,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),ci(s.latestValues)&&Ei(n,s.latestValues)}return ci(this.latestValues)&&Ei(n,this.latestValues),n}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};Ii(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!n.instance)continue;if(!ci(n.latestValues))continue;li(n.latestValues)&&n.updateSnapshot();const s={x:{min:0,max:0},y:{min:0,max:0}};Ii(s,n.measurePageBox()),$i(e,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,s)}return ci(this.latestValues)&&$i(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}resolveTargetDelta(t=!1){var e;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;if(!(t||s&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty)||this.attemptToResolveRelativeTarget))return;const{layout:i,layoutId:o}=this.options;if(this.layout&&(i||o)){if(this.resolvedRelativeTargetAt=se.timestamp,!this.targetDelta&&!this.relativeTarget){const t=this.getClosestProjectingParent();t&&t.layout?(this.relativeParent=t,this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Js(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),Ii(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var r,a,l;if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.relativeParent.resolvedRelativeTargetAt!==se.timestamp&&this.relativeParent.resolveTargetDelta(!0),r=this.target,a=this.relativeTarget,l=this.relativeParent.target,_s(r.x,a.x,l.x),_s(r.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Ii(this.target,this.layout.layoutBox),fi(this.target,this.targetDelta)):Ii(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const t=this.getClosestProjectingParent();t&&Boolean(t.resumingFrom)===Boolean(this.resumingFrom)&&!t.options.layoutScroll&&t.target?(this.relativeParent=t,this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Js(this.relativeTargetOrigin,this.target,t.target),Ii(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Lo.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!li(this.parent.latestValues)&&!ui(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var t;const e=this.getLead(),n=Boolean(this.resumingFrom)||this!==e;let s=!0;if((this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty))&&(s=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(s=!1),this.resolvedRelativeTargetAt===se.timestamp&&(s=!1),s)return;const{layout:i,layoutId:o}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!i&&!o)return;Ii(this.layoutCorrected,this.layout.layoutBox),function(t,e,n,s=!1){const i=n.length;if(!i)return;let o,r;e.x=e.y=1;for(let a=0;a<i;a++){o=n[a],r=o.projectionDelta;const i=o.instance;i&&i.style&&"contents"===i.style.display||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Ei(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,fi(t,r)),s&&ci(o.latestValues)&&Ei(t,o.latestValues))}e.x=gi(e.x),e.y=gi(e.y)}(this.layoutCorrected,this.treeScale,this.path,n);const{target:r}=e;if(!r)return;this.projectionDelta||(this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}});const a=this.treeScale.x,l=this.treeScale.y,c=this.projectionTransform;Zs(this.projectionDelta,this.layoutCorrected,r,this.latestValues),this.projectionTransform=Zi(this.projectionDelta,this.treeScale),this.projectionTransform===c&&this.treeScale.x===a&&this.treeScale.y===l||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",r)),Lo.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(t,e=!1){const n=this.snapshot,s=n?n.latestValues:{},i={...this.latestValues},o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const r={x:{min:0,max:0},y:{min:0,max:0}},a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,u=Boolean(a&&!c&&!0===this.options.crossfade&&!this.path.some(Xo));let h;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var l,d,p,m;Ho(o.x,t.x,n),Ho(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Js(r,this.layout.layoutBox,this.relativeParent.layout.layoutBox),l=this.relativeTarget,d=this.relativeTargetOrigin,p=r,m=n,Yo(l.x,d.x,p.x,m),Yo(l.y,d.y,p.y,m),h&&Xi(this.relativeTarget,h)&&(this.isProjectionDirty=!1),h||(h={x:{min:0,max:0},y:{min:0,max:0}}),Ii(h,this.relativeTarget)),a&&(this.animationValues=i,function(t,e,n,s,i,o){i?(t.opacity=Ln(0,void 0!==n.opacity?n.opacity:1,Bi(s)),t.opacityExit=Ln(void 0!==e.opacity?e.opacity:1,0,ji(s))):o&&(t.opacity=Ln(void 0!==e.opacity?e.opacity:1,void 0!==n.opacity?n.opacity:1,s));for(let i=0;i<Li;i++){const o=`border${Mi[i]}Radius`;let r=ki(e,o),a=ki(n,o);if(void 0===r&&void 0===a)continue;r||(r=0),a||(a=0);0===r||0===a||Ri(r)===Ri(a)?(t[o]=Math.max(Ln(Di(r),Di(a),s),0),(ot.test(a)||ot.test(r))&&(t[o]+="%")):t[o]=a}(e.rotate||n.rotate)&&(t.rotate=Ln(e.rotate||0,n.rotate||0,s))}(i,s,this.latestValues,n,u,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(ce.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=le.update(()=>{T.hasAnimatedSinceResize=!0,this.currentAnimation=Vi(0,1e3,{...t,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onComplete:()=>{t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:s,latestValues:i}=t;if(e&&n&&s){if(this!==t&&this.layout&&s&&_o(this.options.animationType,this.layout.layoutBox,s.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=Xs(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const s=Xs(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+s}Ii(e,n),Ei(e,i),Zs(this.projectionDeltaWithTransform,this.layoutCorrected,e,i)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new qi);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){var t;const{layoutId:e}=this.options;return e&&(null===(t=this.getStack())||void 0===t?void 0:t.lead)||this}getPrevLead(){var t;const{layoutId:e}=this.options;return e?null===(t=this.getStack())||void 0===t?void 0:t.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const s=this.getStack();s&&s.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.rotate||n.rotateX||n.rotateY||n.rotateZ)&&(e=!0),!e)return;const s={};for(let e=0;e<Vo.length;e++){const i="rotate"+Vo[e];n[i]&&(s[i]=n[i],t.setStaticValue(i,0))}t.render();for(const e in s)t.setStaticValue(e,s[e]);t.scheduleRender()}getProjectionStyles(t={}){var e,n;const s={};if(!this.instance||this.isSVG)return s;if(!this.isVisible)return{visibility:"hidden"};s.visibility="";const i=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,s.opacity="",s.pointerEvents=It(t.pointerEvents)||"",s.transform=i?i(this.latestValues,""):"none",s;const o=this.getLead();if(!this.projectionDelta||!this.layout||!o.target){const e={};return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=It(t.pointerEvents)||""),this.hasProjected&&!ci(this.latestValues)&&(e.transform=i?i({},""):"none",this.hasProjected=!1),e}const r=o.animationValues||o.latestValues;this.applyTransformsToTarget(),s.transform=Zi(this.projectionDeltaWithTransform,this.treeScale,r),i&&(s.transform=i(r,s.transform));const{x:a,y:l}=this.projectionDelta;s.transformOrigin=`${100*a.origin}% ${100*l.origin}% 0`,o.animationValues?s.opacity=o===this?null!==(n=null!==(e=r.opacity)&&void 0!==e?e:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:r.opacityExit:s.opacity=o===this?void 0!==r.opacity?r.opacity:"":void 0!==r.opacityExit?r.opacityExit:0;for(const t in j){if(void 0===r[t])continue;const{correct:e,applyTo:n}=j[t],i="none"===s.transform?r[t]:e(r[t],o);if(n){const t=n.length;for(let e=0;e<t;e++)s[n[e]]=i}else s[t]=i}return this.options.layoutId&&(s.pointerEvents=o===this?It(t.pointerEvents)||"":"none"),s}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>{var e;return null===(e=t.currentAnimation)||void 0===e?void 0:e.stop()}),this.root.nodes.forEach(Oo),this.root.sharedNodes.clear()}}}function Ro(t){t.updateLayout()}function ko(t){var e;const n=(null===(e=t.resumeFrom)||void 0===e?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:e,measuredBox:s}=t.layout,{animationType:i}=t.options,o=n.source!==t.layout.source;"size"===i?oi(t=>{const s=o?n.measuredBox[t]:n.layoutBox[t],i=Xs(s);s.min=e[t].min,s.max=s.min+i}):_o(i,n.layoutBox,e)&&oi(t=>{const s=o?n.measuredBox[t]:n.layoutBox[t],i=Xs(e[t]);s.max=s.min+i});const r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Zs(r,e,n.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?Zs(a,t.applyTransform(s,!0),n.measuredBox):Zs(a,e,n.layoutBox);const l=!Yi(r);let c=!1;if(!t.resumeFrom){const s=t.getClosestProjectingParent();if(s&&!s.resumeFrom){const{snapshot:i,layout:o}=s;if(i&&o){const r={x:{min:0,max:0},y:{min:0,max:0}};Js(r,n.layoutBox,i.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};Js(a,e,o.layoutBox),Xi(r,a)||(c=!0),s.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=r,t.relativeParent=s)}}}t.notifyListeners("didUpdate",{layout:e,snapshot:n,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function Bo(t){Lo.totalNodes++,t.parent&&(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 jo(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Fo(t){t.clearSnapshot()}function Oo(t){t.clearMeasurements()}function Io(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Uo(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0}function No(t){t.resolveTargetDelta()}function zo(t){t.calcProjection()}function Wo(t){t.resetRotation()}function $o(t){t.removeLeadSnapshot()}function Ho(t,e,n){t.translate=Ln(e.translate,0,n),t.scale=Ln(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Yo(t,e,n,s){t.min=Ln(e.min,n.min,s),t.max=Ln(e.max,n.max,s)}function Xo(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const Go={duration:.45,ease:[.4,0,.1,1]};function qo(t,e){let n=t.root;for(let e=t.path.length-1;e>=0;e--)if(Boolean(t.path[e].instance)){n=t.path[e];break}const s=(n&&n!==t.root?n.instance:document).querySelector(`[data-projection-id="${e}"]`);s&&t.mount(s,!0)}function Zo(t){t.min=Math.round(t.min),t.max=Math.round(t.max)}function _o(t,e,n){return"position"===t||"preserve-aspect"===t&&!Gs(Gi(e),Gi(n),.2)}const Ko=Do({attachResizeListener:(t,e)=>Ht(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Jo={current:void 0},Qo=Do({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Jo.current){const t=new Ko(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),Jo.current=t}return Jo.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),tr=t=>!t.isLayoutDirty&&t.willUpdate(!1);function er(){const t=new Set,e=new WeakMap,n=()=>t.forEach(tr);return{add:s=>{t.add(s),e.set(s,s.addEventListener("willUpdate",n))},remove:s=>{t.delete(s);const i=e.get(s);i&&(i(),e.delete(s)),n()},dirty:n}}function nr(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const sr={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!rt.test(t))return t;t=parseFloat(t)}return`${nr(t,e.target.x)}% ${nr(t,e.target.y)}%`}},ir=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function or(t,e,n=1){mn(n<=4);const[s,i]=function(t){const e=ir.exec(t);if(!e)return[,];const[,n,s]=e;return[n,s]}(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);return o?o.trim():X(i)?or(i,e,n+1):i}const rr={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=t.includes("var("),o=[];i&&(t=t.replace(ir,t=>(o.push(t),"_$css")));const r=He.parse(t);if(r.length>5)return s;const a=He.createTransformer(t),l="number"!=typeof r[0]?1:0,c=n.x.scale*e.x,u=n.y.scale*e.y;r[0+l]/=c,r[1+l]/=u;const h=Ln(c,u,.5);"number"==typeof r[2+l]&&(r[2+l]/=h),"number"==typeof r[3+l]&&(r[3+l]/=h);let d=a(r);if(i){let t=0;d=d.replace("_$css",()=>{const e=o[t];return t++,e})}return d}},ar=new Set(["width","height","top","left","right","bottom","x","y"]),lr=t=>ar.has(t),cr=t=>t===Z||t===rt,ur=(t,e)=>parseFloat(t.split(", ")[e]),hr=(t,e)=>(n,{transform:s})=>{if("none"===s||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/);if(i)return ur(i[1],e);{const e=s.match(/^matrix\((.+)\)$/);return e?ur(e[1],t):0}},dr=new Set(["x","y","z"]),pr=O.filter(t=>!dr.has(t));const mr={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:hr(4,13),y:hr(5,14)},fr=(t,e,n={},s={})=>{e={...e},s={...s};const i=Object.keys(e).filter(lr);let o=[],r=!1;const a=[];if(i.forEach(i=>{const l=t.getValue(i);if(!t.hasValue(i))return;let c=n[i],u=tn(c);const h=e[i];let d;if(Ot(h)){const t=h.length,e=null===h[0]?1:0;c=h[e],u=tn(c);for(let n=e;n<t;n++)d?mn(tn(h[n])===d):(d=tn(h[n]),mn(d===u||cr(u)&&cr(d)))}else d=tn(h);if(u!==d)if(cr(u)&&cr(d)){const t=l.get();"string"==typeof t&&l.set(parseFloat(t)),"string"==typeof h?e[i]=parseFloat(h):Array.isArray(h)&&d===rt&&(e[i]=h.map(parseFloat))}else(null==u?void 0:u.transform)&&(null==d?void 0:d.transform)&&(0===c||0===h)?0===c?l.set(d.transform(c)):e[i]=u.transform(h):(r||(o=function(t){const e=[];return pr.forEach(n=>{const s=t.getValue(n);void 0!==s&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e.length&&t.render(),e}(t),r=!0),a.push(i),s[i]=void 0!==s[i]?s[i]:e[i],l.jump(h))}),a.length){const n=a.indexOf("height")>=0?window.pageYOffset:null,i=((t,e,n)=>{const s=e.measureViewportBox(),i=e.current,o=getComputedStyle(i),{display:r}=o,a={};"none"===r&&e.setStaticValue("display",t.display||"block"),n.forEach(t=>{a[t]=mr[t](s,o)}),e.render();const l=e.measureViewportBox();return n.forEach(n=>{const s=e.getValue(n);s&&s.jump(a[n]),t[n]=mr[n](l,o)}),t})(e,t,a);return o.length&&o.forEach(([e,n])=>{t.getValue(e).set(n)}),t.render(),c&&null!==n&&window.scrollTo({top:n}),{target:i,transitionEnd:s}}return{target:e,transitionEnd:s}};function gr(t,e,n,s){return(t=>Object.keys(t).some(lr))(e)?fr(t,e,n,s):{target:e,transitionEnd:s}}const yr=(t,e,n,s)=>{const i=function(t,{...e},n){const s=t.current;if(!(s instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.values.forEach(t=>{const e=t.get();if(!X(e))return;const n=or(e,s);n&&t.set(n)});for(const t in e){const i=e[t];if(!X(i))continue;const o=or(i,s);o&&(e[t]=o,n||(n={}),void 0===n[t]&&(n[t]=i))}return{target:e,transitionEnd:n}}(t,e,s);return gr(t,e=i.target,n,s=i.transitionEnd)},vr={current:null},xr={current:!1};function Pr(){if(xr.current=!0,c)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>vr.current=t.matches;t.addListener(e),e()}else vr.current=!1}const Er=Object.keys(w),wr=Er.length,br=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Sr=g.length;class Tr{constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:s,visualState:i},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>le.render(this.render,!1,!0);const{latestValues:r,renderState:a}=i;this.latestValues=r,this.baseTarget={...r},this.initialValues=e.initial?{...r}:{},this.renderState=a,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=o,this.isControllingVariants=y(e),this.isVariantNode=v(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:l,...c}=this.scrapeMotionValuesFromProps(e,{});for(const t in c){const e=c[t];void 0!==r[t]&&N(e)&&(e.set(r[t],!1),hn(l)&&l.add(t))}}scrapeMotionValuesFromProps(t,e){return{}}mount(t){this.current=t,this.projection&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),xr.current||Pr(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||vr.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),ce.update(this.notifyUpdate),ce.render(this.render),this.valueSubscriptions.forEach(t=>t()),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)this.features[t].unmount();this.current=null}bindToMotionValue(t,e){const n=I.has(t),s=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&le.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=e.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{s(),i()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}loadFeatures({children:t,...e},n,s,i,o){let r,a;for(let t=0;t<wr;t++){const n=Er[t],{isEnabled:s,Feature:i,ProjectionNode:o,MeasureLayout:l}=w[n];o&&(r=o),s(e)&&(!this.features[n]&&i&&(this.features[n]=new i(this)),l&&(a=l))}if(!this.projection&&r){this.projection=new r(i,this.latestValues,this.parent&&this.parent.projection);const{layoutId:t,layout:n,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:c}=e;this.projection.setOptions({layoutId:t,layout:n,alwaysMeasureLayout:Boolean(s)||a&&d(a),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:o,layoutScroll:l,layoutRoot:c})}return a}updateFeatures(){for(const t in this.features){const e=this.features[t];e.isMounted?e.update(this.props,this.prevProps):(e.mount(),e.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}makeTargetAnimatable(t,e=!0){return this.makeTargetAnimatableFromInstance(t,this.props,e)}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<br.length;e++){const n=br[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const s=t["on"+n];s&&(this.propEventSubscriptions[n]=this.on(n,s))}this.prevMotionValues=function(t,e,n){const{willChange:s}=e;for(const i in e){const o=e[i],r=n[i];if(N(o))t.addValue(i,o),hn(s)&&s.add(i);else if(N(r))t.addValue(i,Re(o,{owner:t})),hn(s)&&s.remove(i);else if(r!==o)if(t.hasValue(i)){const e=t.getValue(i);!e.hasAnimated&&e.set(o)}else{const e=t.getStaticValue(i);t.addValue(i,Re(void 0!==e?e:o,{owner:t}))}}for(const s in n)void 0===e[s]&&t.removeValue(s);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const t=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(t.initial=this.props.initial),t}const e={};for(let t=0;t<Sr;t++){const n=g[t],s=this.props[n];(p(s)||!1===s)&&(e[n]=s)}return e}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){e!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,e)),this.values.set(t,e),this.latestValues[t]=e.get()}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=Re(e,{owner:this}),this.addValue(t,n)),n}readValue(t){return void 0===this.latestValues[t]&&this.current?this.readValueFromInstance(this.current,t,this.options):this.latestValues[t]}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props,s="string"==typeof n||"object"==typeof n?null===(e=Ft(this.props,n))||void 0===e?void 0:e[t]:void 0;if(n&&void 0!==s)return s;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||N(i)?void 0!==this.initialValues[t]&&void 0===s?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new Me),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class Cr extends Tr{sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:e,...n},{transformValues:s},i){let o=un(n,t||{},this);if(s&&(e&&(e=s(e)),n&&(n=s(n)),o&&(o=s(o))),i){ln(this,n,o);const t=yr(this,n,o,e);e=t.transitionEnd,n=t.target}return{transition:t,transitionEnd:e,...n}}}class Ar extends Cr{readValueFromInstance(t,e){if(I.has(e)){const t=_e(e);return t&&t.default||0}{const s=(n=t,window.getComputedStyle(n)),i=(Y(e)?s.getPropertyValue(e):s[e])||0;return"string"==typeof i?i.trim():i}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return wi(t,e)}build(t,e,n,s){dt(t,e,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,e){return Bt(t,e)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;N(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=""+t)}))}renderInstance(t,e,n,s){Dt(t,e,n,s)}}function Vr(){const t=e.useContext(l);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=t,o=e.useId();e.useEffect(()=>i(o),[]);return!n&&s?[!1,()=>s&&s(o)]:[!0]}class Mr extends o.default.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:s}=this.props,{projection:i}=t;F(Dr),i&&(e.group&&e.group.add(i),n&&n.register&&s&&n.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),T.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:s,isPresent:i}=this.props,o=n.projection;return o?(o.isPresent=i,s||t.layoutDependency!==e||void 0===e?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||le.postRender(()=>{const t=o.getStack();t&&t.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:s}=t;s&&(s.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(s),n&&n.deregister&&n.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Lr(t){const[n,s]=Vr(),i=e.useContext(A);return o.default.createElement(Mr,{...t,layoutGroup:i,switchLayoutGroup:e.useContext(V),isPresent:n,safeToRemove:s})}const Dr={borderRadius:{...sr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:sr,borderTopRightRadius:sr,borderBottomLeftRadius:sr,borderBottomRightRadius:sr,boxShadow:rr},Rr={pan:{Feature:class extends ne{constructor(){super(...arguments),this.removePointerDownListener=ge}onPointerDown(t){this.session=new Us(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:s}=this.node.getProps();return{onSessionStart:Ci(t),onStart:Ci(e),onMove:n,onEnd:(t,e)=>{delete this.session,s&&le.update(()=>s(t,e))}}}mount(){this.removePointerDownListener=qt(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends ne{constructor(t){super(t),this.removeGroupControls=ge,this.removeListeners=ge,this.controls=new Si(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ge}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Qo,MeasureLayout:Lr}};class kr extends Cr{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(I.has(e)){const t=_e(e);return t&&t.default||0}return e=Rt.has(e)?e:Lt(e),t.getAttribute(e)}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}scrapeMotionValuesFromProps(t,e){return jt(t,e)}build(t,e,n,s){Tt(t,e,n,this.isSVGTag,s.transformTemplate)}renderInstance(t,e,n,s){kt(t,e,0,s)}mount(t){this.isSVGTag=At(t.tagName),super.mount(t)}}const Br=(t,e)=>B(t)?new kr(e,{enableHardwareAcceleration:!1}):new Ar(e,{enableHardwareAcceleration:!0}),jr={layout:{ProjectionNode:Qo,MeasureLayout:Lr}},Fr={...Fs,...Se,...Rr,...jr},Or=R((t,e)=>$t(t,e,Fr,Br));const Ir=R($t);function Ur(){const t=e.useRef(!1);return u(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function Nr(){const t=Ur(),[n,s]=e.useState(0),i=e.useCallback(()=>{t.current&&s(n+1)},[n]);return[e.useCallback(()=>le.postRender(i),[i]),n]}class zr extends i.Component{getSnapshotBeforeUpdate(t){const e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent){const t=this.props.sizeRef.current;t.height=e.offsetHeight||0,t.width=e.offsetWidth||0,t.top=e.offsetTop,t.left=e.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Wr({children:t,isPresent:n}){const s=e.useId(),o=e.useRef(null),r=e.useRef({width:0,height:0,top:0,left:0});return e.useInsertionEffect(()=>{const{width:t,height:e,top:i,left:a}=r.current;if(n||!o.current||!t||!e)return;o.current.dataset.motionPopId=s;const l=document.createElement("style");return document.head.appendChild(l),l.sheet&&l.sheet.insertRule(`\n [data-motion-pop-id="${s}"] {\n position: absolute !important;\n width: ${t}px !important;\n height: ${e}px !important;\n top: ${i}px !important;\n left: ${a}px !important;\n }\n `),()=>{document.head.removeChild(l)}},[n]),i.createElement(zr,{isPresent:n,childRef:o,sizeRef:r},i.cloneElement(t,{ref:o}))}const $r=({children:t,initial:n,isPresent:s,onExitComplete:o,custom:r,presenceAffectsLayout:a,mode:c})=>{const u=S(Hr),h=e.useId(),d=e.useMemo(()=>({id:h,initial:n,isPresent:s,custom:r,onExitComplete:t=>{u.set(t,!0);for(const t of u.values())if(!t)return;o&&o()},register:t=>(u.set(t,!1),()=>u.delete(t))}),a?void 0:[s]);return e.useMemo(()=>{u.forEach((t,e)=>u.set(e,!1))},[s]),i.useEffect(()=>{!s&&!u.size&&o&&o()},[s]),"popLayout"===c&&(t=i.createElement(Wr,{isPresent:s},t)),i.createElement(l.Provider,{value:d},t)};function Hr(){return new Map}function Yr(t){return e.useEffect(()=>()=>t(),[])}const Xr=t=>t.key||"";function Gr(t){return"function"==typeof t}const qr=e.createContext(null),Zr=t=>!0===t,_r=({children:t,id:n,inherit:s=!0})=>{const o=e.useContext(A),r=e.useContext(qr),[a,l]=Nr(),c=e.useRef(null),u=o.id||r;null===c.current&&((t=>Zr(!0===t)||"id"===t)(s)&&u&&(n=n?u+"-"+n:u),c.current={id:n,group:Zr(s)&&o.group||er()});const h=e.useMemo(()=>({...c.current,forceRender:a}),[l]);return i.createElement(A.Provider,{value:h},t)},Kr=e.createContext(null);function Jr(t){return t.value}function Qr(t,e){return t.layout.min-e.layout.min}function ta(t){const n=S(()=>Re(t)),{isStatic:s}=e.useContext(r);if(s){const[,s]=e.useState(t);e.useEffect(()=>n.on("change",s),[])}return n}function ea(t,e){const n=ta(e()),s=()=>n.set(e());return s(),u(()=>{const e=()=>le.update(s,!1,!0),n=t.map(t=>t.on("change",e));return()=>{n.forEach(t=>t()),ce.update(s)}}),n}function na(t,e,n,s){const i="function"==typeof e?e:Co(e,n,s);return Array.isArray(t)?sa(t,i):sa([t],([t])=>i(t))}function sa(t,e){const n=S(()=>[]);return ea(t,()=>{n.length=0;const s=t.length;for(let e=0;e<s;e++)n[e]=t[e].get();return e(n)})}function ia(t,e=0){return N(t)?t:ta(e)}const oa={Group:e.forwardRef((function({children:t,as:n="ul",axis:s="y",onReorder:o,values:r,...a},l){const c=S(()=>Or(n)),u=[],h=e.useRef(!1);mn(Boolean(r));const d={axis:s,registerItem:(t,e)=>{e&&-1===u.findIndex(e=>t===e.value)&&(u.push({value:t,layout:e[s]}),u.sort(Qr))},updateOrder:(t,e,n)=>{if(h.current)return;const s=function(t,e,n,s){if(!s)return t;const i=t.findIndex(t=>t.value===e);if(-1===i)return t;const o=s>0?1:-1,r=t[i+o];if(!r)return t;const a=t[i],l=r.layout,c=Ln(l.min,l.max,.5);return 1===o&&a.layout.max+n>c||-1===o&&a.layout.min+n<c?function([...t],e,n){const s=e<0?t.length+e:e;if(s>=0&&s<t.length){const s=n<0?t.length+n:n,[i]=t.splice(e,1);t.splice(s,0,i)}return t}(t,i,i+o):t}(u,t,e,n);u!==s&&(h.current=!0,o(s.map(Jr).filter(t=>-1!==r.indexOf(t))))}};return e.useEffect(()=>{h.current=!1}),i.createElement(c,{...a,ref:l,ignoreStrict:!0},i.createElement(Kr.Provider,{value:d},t))})),Item:e.forwardRef((function({children:t,style:n={},value:s,as:o="li",onDrag:r,layout:a=!0,...l},c){const u=S(()=>Or(o)),h=e.useContext(Kr),d={x:ia(n.x),y:ia(n.y)},p=na([d.x,d.y],([t,e])=>t||e?1:"unset"),m=e.useRef(null);mn(Boolean(h));const{axis:f,registerItem:g,updateOrder:y}=h;return e.useEffect(()=>{g(s,m.current)},[h]),i.createElement(u,{drag:f,...l,dragSnapToOrigin:!0,style:{...n,x:d.x,y:d.y,zIndex:p},layout:a,onDrag:(t,e)=>{const{velocity:n}=e;n[f]&&y(s,d[f].get(),n[f]),r&&r(t,e)},onLayoutMeasure:t=>{m.current=t},ref:c,ignoreStrict:!0},t)}))},ra={renderer:Br,...Fs,...Se},aa={...ra,...Rr,...jr};function la(t,n,s){e.useInsertionEffect(()=>t.on(n,s),[t,n,s])}function ca(t,e){pn(Boolean(!e||e.current))}const ua=()=>({scrollX:Re(0),scrollY:Re(0),scrollXProgress:Re(0),scrollYProgress:Re(0)});function ha({container:t,target:n,layoutEffect:s=!0,...i}={}){const o=S(ua);return(s?u:e.useEffect)(()=>(ca(0,n),ca(0,t),bo(({x:t,y:e})=>{o.scrollX.set(t.current),o.scrollXProgress.set(t.progress),o.scrollY.set(e.current),o.scrollYProgress.set(e.progress)},{...i,container:(null==t?void 0:t.current)||void 0,target:(null==n?void 0:n.current)||void 0})),[]),o}function da(t){const n=e.useRef(0),{isStatic:s}=e.useContext(r);e.useEffect(()=>{if(s)return;const e=({timestamp:e,delta:s})=>{n.current||(n.current=e),t(e-n.current,s)};return le.update(e,!0),()=>ce.update(e)},[t])}class pa extends De{constructor(){super(...arguments),this.members=[],this.transforms=new Set}add(t){let e;I.has(t)?(this.transforms.add(t),e="transform"):t.startsWith("origin")||Y(t)||"willChange"===t||(e=Lt(t)),e&&(Ae(this.members,e),this.update())}remove(t){I.has(t)?(this.transforms.delete(t),this.transforms.size||Ve(this.members,"transform")):Ve(this.members,Lt(t)),this.update()}update(){this.set(this.members.length?this.members.join(", "):"auto")}}function ma(){!xr.current&&Pr();const[t]=e.useState(vr.current);return t}function fa(){let t=!1;const e=new Set,n={subscribe:t=>(e.add(t),()=>{e.delete(t)}),start(n,s){mn(t);const i=[];return e.forEach(t=>{i.push(Ts(t,n,{transitionOverride:s}))}),Promise.all(i)},set:n=>(mn(t),e.forEach(t=>{!function(t,e){Array.isArray(e)?an(t,e):"string"==typeof e?an(t,[e]):rn(t,e)}(t,n)})),stop(){e.forEach(t=>{!function(t){t.values.forEach(t=>t.stop())}(t)})},mount:()=>(t=!0,()=>{t=!1,n.stop()})};return n}function ga(){const t=S(fa);return u(t.mount,[]),t}const ya=ga;class va{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,e){this.componentControls.forEach(n=>{n.start(t.nativeEvent||t,e)})}}const xa=()=>new va;function Pa(t){return null!==t&&"object"==typeof t&&M in t}function Ea(){return wa}function wa(t){Jo.current&&(Jo.current.isUpdating=!1,Jo.current.blockUpdate(),t&&t())}const ba=(t,e)=>`${t}: ${e}`,Sa=new Map;function Ta(t,e,n,s){const i=ba(t,I.has(e)?"transform":e),o=Sa.get(i);if(!o)return 0;const{animation:r,startTime:a}=o,l=()=>{Sa.delete(i);try{r.cancel()}catch(t){}};if(null!==a){const t=performance.now();return s.update(()=>{n.animation&&(n.animation.time=performance.now()-gn(t))}),s.render(l),t-a||0}return l(),0}const Ca=()=>({});class Aa extends Tr{build(){}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}resetTransform(){}restoreTransform(){}removeValueFromRenderState(){}renderInstance(){}scrapeMotionValuesFromProps(){return{}}getBaseTargetFromProps(){}readValueFromInstance(t,e,n){return n.initialState[e]||0}sortInstanceNodePosition(){return 0}makeTargetAnimatableFromInstance({transition:t,transitionEnd:e,...n}){return ln(this,n,un(n,t||{},this)),{transition:t,transitionEnd:e,...n}}}const Va=Ut({scrapeMotionValuesFromProps:Ca,createRenderState:Ca});const Ma=t=>t>.001?1/t:1e5;let La=!1;let Da=0;t.AnimatePresence=({children:t,custom:n,initial:s=!0,onExitComplete:o,exitBeforeEnter:r,presenceAffectsLayout:a=!0,mode:l="sync"})=>{mn(!r);let[c]=Nr();const h=e.useContext(A).forceRender;h&&(c=h);const d=Ur(),p=function(t){const n=[];return e.Children.forEach(t,t=>{e.isValidElement(t)&&n.push(t)}),n}(t);let m=p;const f=new Set,g=e.useRef(m),y=e.useRef(new Map).current,v=e.useRef(!0);if(u(()=>{v.current=!1,function(t,e){t.forEach(t=>{const n=Xr(t);e.set(n,t)})}(p,y),g.current=m}),Yr(()=>{v.current=!0,y.clear(),f.clear()}),v.current)return i.createElement(i.Fragment,null,m.map(t=>i.createElement($r,{key:Xr(t),isPresent:!0,initial:!!s&&void 0,presenceAffectsLayout:a,mode:l},t)));m=[...m];const x=g.current.map(Xr),P=p.map(Xr),E=x.length;for(let t=0;t<E;t++){const e=x[t];-1===P.indexOf(e)&&f.add(e)}return"wait"===l&&f.size&&(m=[]),f.forEach(t=>{if(-1!==P.indexOf(t))return;const e=y.get(t);if(!e)return;const s=x.indexOf(t);m.splice(s,0,i.createElement($r,{key:Xr(e),isPresent:!1,onExitComplete:()=>{y.delete(t),f.delete(t);const e=g.current.findIndex(e=>e.key===t);if(g.current.splice(e,1),!f.size){if(g.current=p,!1===d.current)return;c(),o&&o()}},custom:n,presenceAffectsLayout:a,mode:l},e))}),m=m.map(t=>{const e=t.key;return f.has(e)?t:i.createElement($r,{key:Xr(t),isPresent:!0,presenceAffectsLayout:a,mode:l},t)}),i.createElement(i.Fragment,null,f.size?m:m.map(t=>e.cloneElement(t)))},t.AnimateSharedLayout=({children:t})=>(i.useEffect(()=>{mn(!1)},[]),i.createElement(_r,{id:S(()=>"asl-"+Da++)},t)),t.DeprecatedLayoutGroupContext=qr,t.DragControls=va,t.FlatTree=Ki,t.LayoutGroup=_r,t.LayoutGroupContext=A,t.LazyMotion=function({children:t,features:n,strict:s=!1}){const[,o]=e.useState(!Gr(n)),r=e.useRef(void 0);if(!Gr(n)){const{renderer:t,...e}=n;r.current=t,b(e)}return e.useEffect(()=>{Gr(n)&&n().then(({renderer:t,...e})=>{b(e),r.current=t,o(!0)})},[]),i.createElement(h.Provider,{value:{renderer:r.current,strict:s}},t)},t.MotionConfig=function({children:t,isValidProp:n,...s}){n&&Pt(n),(s={...e.useContext(r),...s}).isStatic=S(()=>s.isStatic);const o=e.useMemo(()=>s,[JSON.stringify(s.transition),s.transformPagePoint,s.reducedMotion]);return i.createElement(r.Provider,{value:o},t)},t.MotionConfigContext=r,t.MotionContext=a,t.MotionValue=De,t.PresenceContext=l,t.Reorder=oa,t.SwitchLayoutGroupContext=V,t.VisualElement=Tr,t.addPointerEvent=qt,t.addPointerInfo=Gt,t.addScaleCorrector=F,t.animate=Vi,t.animateValue=ps,t.animateVisualElement=Ts,t.animationControls=fa,t.animations=Fs,t.anticipate=Qn,t.backIn=Kn,t.backInOut=Jn,t.backOut=_n,t.buildTransform=$,t.calcLength=Xs,t.checkTargetForNewValues=ln,t.circIn=Gn,t.circInOut=Zn,t.circOut=qn,t.clamp=q,t.color=Ue,t.complex=He,t.createBox=ii,t.createDomMotionComponent=function(t){return L($t(t,{forwardMotionProps:!1},Fr,Br))},t.createMotionComponent=L,t.cubicBezier=Xn,t.delay=Ji,t.distance=Os,t.distance2D=Is,t.domAnimation=ra,t.domMax=aa,t.easeIn=An,t.easeInOut=Mn,t.easeOut=Vn,t.filterProps=Et,t.frameData=se,t.inView=To,t.interpolate=$n,t.invariant=mn,t.isBrowser=c,t.isDragActive=ee,t.isMotionComponent=Pa,t.isMotionValue=N,t.isValidMotionProp=vt,t.m=Ir,t.makeUseVisualState=Ut,t.mix=Ln,t.motion=Or,t.motionValue=Re,t.optimizedAppearDataAttribute=dn,t.pipe=_t,t.progress=Nn,t.px=rt,t.resolveMotionValue=It,t.scroll=bo,t.spring=cs,t.startOptimizedAppearAnimation=function(t,e,n,s,i){const o=t.dataset.framerAppearId;if(!o)return;window.HandoffAppearAnimations=Ta;const r=ba(o,e),a=En(t,e,[n[0],n[0]],{duration:1e4,ease:"linear"});Sa.set(r,{animation:a,startTime:null});const l=()=>{a.cancel();const o=En(t,e,n,s);document.timeline&&(o.startTime=document.timeline.currentTime),Sa.set(r,{animation:o,startTime:performance.now()}),i&&i(o)};a.ready?a.ready.then(l).catch(ge):l()},t.sync=le,t.transform=Co,t.unwrapMotionComponent=function(t){if(Pa(t))return t[M]},t.useAnimation=ya,t.useAnimationControls=ga,t.useAnimationFrame=da,t.useCycle=function(...t){const n=e.useRef(0),[s,i]=e.useState(t[n.current]);return[s,e.useCallback(e=>{n.current="number"!=typeof e?Ao(0,t.length,n.current+1):e,i(t[n.current])},[t.length,...t])]},t.useDeprecatedAnimatedState=function(t){const[n,s]=e.useState(t),i=Va({},!1),o=S(()=>new Aa({props:{},visualState:i,presenceContext:null},{initialState:t}));return e.useEffect(()=>(o.mount({}),()=>o.unmount()),[o]),e.useEffect(()=>{o.update({onUpdate:t=>{s({...t})}},null)},[s,o]),[n,S(()=>t=>Ts(o,t))]},t.useDeprecatedInvertedScale=function(t){let n=ta(1),s=ta(1);const{visualElement:i}=e.useContext(a);return mn(!(!t&&!i)),pn(La),La=!0,t?(n=t.scaleX||n,s=t.scaleY||s):i&&(n=i.getValue("scaleX",1),s=i.getValue("scaleY",1)),{scaleX:na(n,Ma),scaleY:na(s,Ma)}},t.useDomEvent=function(t,n,s,i){e.useEffect(()=>{const e=t.current;if(s&&e)return Ht(e,n,s,i)},[t,n,s,i])},t.useDragControls=function(){return S(xa)},t.useElementScroll=function(t){return ha({container:t})},t.useForceUpdate=Nr,t.useInView=function(t,{root:n,margin:s,amount:i,once:o=!1}={}){const[r,a]=e.useState(!1);return e.useEffect(()=>{if(!t.current||o&&r)return;const e={root:n&&n.current||void 0,margin:s,amount:"some"===i?"any":i};return To(t.current,()=>(a(!0),o?void 0:()=>a(!1)),e)},[n,t,s,o]),r},t.useInstantLayoutTransition=Ea,t.useInstantTransition=function(){const[t,n]=Nr(),s=Ea();return e.useEffect(()=>{le.postRender(()=>le.postRender(()=>yn.current=!1))},[n]),e=>{s(()=>{yn.current=!0,t(),e()})}},t.useIsPresent=function(){return null===(t=e.useContext(l))||t.isPresent;var t},t.useIsomorphicLayoutEffect=u,t.useMotionTemplate=function(t,...e){const n=t.length;return ea(e.filter(N),(function(){let s="";for(let i=0;i<n;i++){s+=t[i];const n=e[i];n&&(s+=N(n)?n.get():n)}return s}))},t.useMotionValue=ta,t.useMotionValueEvent=la,t.usePresence=Vr,t.useReducedMotion=ma,t.useReducedMotionConfig=function(){const t=ma(),{reducedMotion:n}=e.useContext(r);return"never"!==n&&("always"===n||t)},t.useResetProjection=function(){return i.useCallback(()=>{const t=Jo.current;t&&t.resetTree()},[])},t.useScroll=ha,t.useSpring=function(t,n={}){const{isStatic:s}=e.useContext(r),i=e.useRef(null),o=ta(N(t)?t.get():t),a=()=>{i.current&&i.current.stop()};return e.useInsertionEffect(()=>o.attach((t,e)=>s?e(t):(a(),i.current=ps({keyframes:[o.get(),t],velocity:o.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:e}),o.get()),a),[JSON.stringify(n)]),u(()=>{if(N(t))return t.on("change",t=>o.set(parseFloat(t)))},[o]),o},t.useTime=function(){const t=ta(0);return da(e=>t.set(e)),t},t.useTransform=na,t.useUnmountEffect=Yr,t.useVelocity=function(t){const e=ta(t.getVelocity());return la(t,"velocityChange",t=>{e.set(t)}),e},t.useViewportScroll=function(){return ha()},t.useWillChange=function(){return S(()=>new pa("auto"))},t.warning=pn,t.wrap=Ao,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={},t.React)}(this,(function(t,e){"use strict";function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}function s(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,s.get?s:{enumerable:!0,get:function(){return t[n]}})}})),e.default=t,Object.freeze(e)}var i=s(e),o=n(e);const r=e.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),a=e.createContext({}),l=e.createContext(null),c="undefined"!=typeof document,u=c?e.useLayoutEffect:e.useEffect,h=e.createContext({strict:!1});function d(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function p(t){return"string"==typeof t||Array.isArray(t)}function m(t){return"object"==typeof t&&"function"==typeof t.start}const f=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],g=["initial",...f];function y(t){return m(t.animate)||g.some(e=>p(t[e]))}function v(t){return Boolean(y(t)||t.variants)}function x(t){const{initial:n,animate:s}=function(t,e){if(y(t)){const{initial:e,animate:n}=t;return{initial:!1===e||p(e)?e:void 0,animate:p(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,e.useContext(a));return e.useMemo(()=>({initial:n,animate:s}),[P(n),P(s)])}function P(t){return Array.isArray(t)?t.join(" "):t}const E={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"]},w={};for(const t in E)w[t]={isEnabled:e=>E[t].some(t=>!!e[t])};function b(t){for(const e in t)w[e]={...w[e],...t[e]}}function S(t){const n=e.useRef(null);return null===n.current&&(n.current=t()),n.current}const T={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let C=1;const A=e.createContext({}),V=e.createContext({}),M=Symbol.for("motionComponentSymbol");function L({preloadedFeatures:t,createVisualElement:n,useRender:s,useVisualState:o,Component:p}){t&&b(t);const m=e.forwardRef((function(m,f){let g;const y={...e.useContext(r),...m,layoutId:D(m)},{isStatic:v}=y,P=x(m),E=v?void 0:S(()=>{if(T.hasEverUpdated)return C++}),w=o(m,v);if(!v&&c){P.visualElement=function(t,n,s,i){const{visualElement:o}=e.useContext(a),c=e.useContext(h),d=e.useContext(l),p=e.useContext(r).reducedMotion,m=e.useRef();i=i||c.renderer,!m.current&&i&&(m.current=i(t,{visualState:n,parent:o,props:s,presenceContext:d,blockInitialAnimation:!!d&&!1===d.initial,reducedMotionConfig:p}));const f=m.current;return e.useInsertionEffect(()=>{f&&f.update(s,d)}),u(()=>{f&&f.render()}),e.useEffect(()=>{f&&f.updateFeatures()}),(window.HandoffAppearAnimations?u:e.useEffect)(()=>{f&&f.animationState&&f.animationState.animateChanges()}),f}(p,w,y,n);const s=e.useContext(V),i=e.useContext(h).strict;P.visualElement&&(g=P.visualElement.loadFeatures(y,i,t,E,s))}return i.createElement(a.Provider,{value:P},g&&P.visualElement?i.createElement(g,{visualElement:P.visualElement,...y}):null,s(p,m,E,function(t,n,s){return e.useCallback(e=>{e&&t.mount&&t.mount(e),n&&(e?n.mount(e):n.unmount()),s&&("function"==typeof s?s(e):d(s)&&(s.current=e))},[n])}(w,P.visualElement,f),w,v,P.visualElement))}));return m[M]=p,m}function D({layoutId:t}){const n=e.useContext(A).id;return n&&void 0!==t?n+"-"+t:t}function R(t){function e(e,n={}){return L(t(e,n))}if("undefined"==typeof Proxy)return e;const n=new Map;return new Proxy(e,{get:(t,s)=>(n.has(s)||n.set(s,e(s)),n.get(s))})}const k=["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 B(t){return"string"==typeof t&&!t.includes("-")&&!!(k.indexOf(t)>-1||/[A-Z]/.test(t))}const j={};function F(t){Object.assign(j,t)}const O=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],I=new Set(O);function U(t,{layout:e,layoutId:n}){return I.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!j[t]||"opacity"===t)}const N=t=>Boolean(t&&t.getVelocity),z={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},W=O.length;function $(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},s,i){let o="";for(let e=0;e<W;e++){const n=O[e];if(void 0!==t[n]){o+=`${z[n]||n}(${t[n]}) `}}return e&&!t.z&&(o+="translateZ(0)"),o=o.trim(),i?o=i(t,s?"":o):n&&s&&(o="none"),o}const H=t=>e=>"string"==typeof e&&e.startsWith(t),Y=H("--"),X=H("var(--"),G=(t,e)=>e&&"number"==typeof t?e.transform(t):t,q=(t,e,n)=>Math.min(Math.max(n,t),e),Z={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},_={...Z,transform:t=>q(0,1,t)},K={...Z,default:1},J=t=>Math.round(1e5*t)/1e5,Q=/(-)?([\d]*\.?[\d])+/g,tt=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,et=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function nt(t){return"string"==typeof t}const st=t=>({test:e=>nt(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),it=st("deg"),ot=st("%"),rt=st("px"),at=st("vh"),lt=st("vw"),ct={...ot,parse:t=>ot.parse(t)/100,transform:t=>ot.transform(100*t)},ut={...Z,transform:Math.round},ht={borderWidth:rt,borderTopWidth:rt,borderRightWidth:rt,borderBottomWidth:rt,borderLeftWidth:rt,borderRadius:rt,radius:rt,borderTopLeftRadius:rt,borderTopRightRadius:rt,borderBottomRightRadius:rt,borderBottomLeftRadius:rt,width:rt,maxWidth:rt,height:rt,maxHeight:rt,size:rt,top:rt,right:rt,bottom:rt,left:rt,padding:rt,paddingTop:rt,paddingRight:rt,paddingBottom:rt,paddingLeft:rt,margin:rt,marginTop:rt,marginRight:rt,marginBottom:rt,marginLeft:rt,rotate:it,rotateX:it,rotateY:it,rotateZ:it,scale:K,scaleX:K,scaleY:K,scaleZ:K,skew:it,skewX:it,skewY:it,distance:rt,translateX:rt,translateY:rt,translateZ:rt,x:rt,y:rt,z:rt,perspective:rt,transformPerspective:rt,opacity:_,originX:ct,originY:ct,originZ:rt,zIndex:ut,fillOpacity:_,strokeOpacity:_,numOctaves:ut};function dt(t,e,n,s){const{style:i,vars:o,transform:r,transformOrigin:a}=t;let l=!1,c=!1,u=!0;for(const t in e){const n=e[t];if(Y(t)){o[t]=n;continue}const s=ht[t],h=G(n,s);if(I.has(t)){if(l=!0,r[t]=h,!u)continue;n!==(s.default||0)&&(u=!1)}else t.startsWith("origin")?(c=!0,a[t]=h):i[t]=h}if(e.transform||(l||s?i.transform=$(t.transform,n,u,s):i.transform&&(i.transform="none")),c){const{originX:t="50%",originY:e="50%",originZ:n=0}=a;i.transformOrigin=`${t} ${e} ${n}`}}const pt=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function mt(t,e,n){for(const s in e)N(e[s])||U(s,n)||(t[s]=e[s])}function ft(t,n,s){const i={};return mt(i,t.style||{},t),Object.assign(i,function({transformTemplate:t},n,s){return e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{}};return dt(e,n,{enableHardwareAcceleration:!s},t),Object.assign({},e.vars,e.style)},[n])}(t,n,s)),t.transformValues?t.transformValues(i):i}function gt(t,e,n){const s={},i=ft(t,e,n);return t.drag&&!1!==t.dragListener&&(s.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(s.tabIndex=0),s.style=i,s}const yt=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function vt(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||yt.has(t)}let xt=t=>!vt(t);function Pt(t){t&&(xt=e=>e.startsWith("on")?!vt(e):t(e))}try{Pt(require("@emotion/is-prop-valid").default)}catch(t){}function Et(t,e,n){const s={};for(const i in t)"values"===i&&"object"==typeof t.values||(xt(i)||!0===n&&vt(i)||!e&&!vt(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}function wt(t,e,n){return"string"==typeof t?t:rt.transform(e+n*t)}const bt={offset:"stroke-dashoffset",array:"stroke-dasharray"},St={offset:"strokeDashoffset",array:"strokeDasharray"};function Tt(t,{attrX:e,attrY:n,originX:s,originY:i,pathLength:o,pathSpacing:r=1,pathOffset:a=0,...l},c,u,h){if(dt(t,l,c,h),u)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:d,style:p,dimensions:m}=t;d.transform&&(m&&(p.transform=d.transform),delete d.transform),m&&(void 0!==s||void 0!==i||p.transform)&&(p.transformOrigin=function(t,e,n){return`${wt(e,t.x,t.width)} ${wt(n,t.y,t.height)}`}(m,void 0!==s?s:.5,void 0!==i?i:.5)),void 0!==e&&(d.x=e),void 0!==n&&(d.y=n),void 0!==o&&function(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?bt:St;t[o.offset]=rt.transform(-s);const r=rt.transform(e),a=rt.transform(n);t[o.array]=`${r} ${a}`}(d,o,r,a,!1)}const Ct=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),At=t=>"string"==typeof t&&"svg"===t.toLowerCase();function Vt(t,n,s,i){const o=e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Tt(e,n,{enableHardwareAcceleration:!1},At(i),t.transformTemplate),{...e.attrs,style:{...e.style}}},[n]);if(t.style){const e={};mt(e,t.style,t),o.style={...e,...o.style}}return o}function Mt(t=!1){return(n,s,i,o,{latestValues:r},a)=>{const l=(B(n)?Vt:gt)(s,r,a,n),c={...Et(s,"string"==typeof n,t),...l,ref:o},{children:u}=s,h=e.useMemo(()=>N(u)?u.get():u,[u]);return i&&(c["data-projection-id"]=i),e.createElement(n,{...c,children:h})}}const Lt=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function Dt(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const e in n)t.style.setProperty(e,n[e])}const Rt=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function kt(t,e,n,s){Dt(t,e,void 0,s);for(const n in e.attrs)t.setAttribute(Rt.has(n)?n:Lt(n),e.attrs[n])}function Bt(t,e){const{style:n}=t,s={};for(const i in n)(N(n[i])||e.style&&N(e.style[i])||U(i,t))&&(s[i]=n[i]);return s}function jt(t,e){const n=Bt(t,e);for(const s in t)if(N(t[s])||N(e[s])){n["x"===s||"y"===s?"attr"+s.toUpperCase():s]=t[s]}return n}function Ft(t,e,n,s={},i={}){return"function"==typeof e&&(e=e(void 0!==n?n:t.custom,s,i)),"string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e&&(e=e(void 0!==n?n:t.custom,s,i)),e}const Ot=t=>Array.isArray(t);function It(t){const e=N(t)?t.get():t;return n=e,Boolean(n&&"object"==typeof n&&n.mix&&n.toValue)?e.toValue():e;var n}const Ut=t=>(n,s)=>{const i=e.useContext(a),o=e.useContext(l),r=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},s,i,o){const r={latestValues:Nt(s,i,o,t),renderState:e()};return n&&(r.mount=t=>n(s,t,r)),r}(t,n,i,o);return s?r():S(r)};function Nt(t,e,n,s){const i={},o=s(t,{});for(const t in o)i[t]=It(o[t]);let{initial:r,animate:a}=t;const l=y(t),c=v(t);e&&c&&!l&&!1!==t.inherit&&(void 0===r&&(r=e.initial),void 0===a&&(a=e.animate));let u=!!n&&!1===n.initial;u=u||!1===r;const h=u?a:r;if(h&&"boolean"!=typeof h&&!m(h)){(Array.isArray(h)?h:[h]).forEach(e=>{const n=Ft(t,e);if(!n)return;const{transitionEnd:s,transition:o,...r}=n;for(const t in r){let e=r[t];if(Array.isArray(e)){e=e[u?e.length-1:0]}null!==e&&(i[t]=e)}for(const t in s)i[t]=s[t]})}return i}const zt={useVisualState:Ut({scrapeMotionValuesFromProps:jt,createRenderState:Ct,onMount:(t,e,{renderState:n,latestValues:s})=>{try{n.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(t){n.dimensions={x:0,y:0,width:0,height:0}}Tt(n,s,{enableHardwareAcceleration:!1},At(e.tagName),t.transformTemplate),kt(e,n)}})},Wt={useVisualState:Ut({scrapeMotionValuesFromProps:Bt,createRenderState:pt})};function $t(t,{forwardMotionProps:e=!1},n,s){return{...B(t)?zt:Wt,preloadedFeatures:n,useRender:Mt(e),createVisualElement:s,Component:t}}function Ht(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const Yt=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function Xt(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const Gt=t=>e=>Yt(e)&&t(e,Xt(e));function qt(t,e,n,s){return Ht(t,e,Gt(n),s)}const Zt=(t,e)=>n=>e(t(n)),_t=(...t)=>t.reduce(Zt);function Kt(t){let e=null;return()=>{const n=()=>{e=null};return null===e&&(e=t,n)}}const Jt=Kt("dragHorizontal"),Qt=Kt("dragVertical");function te(t){let e=!1;if("y"===t)e=Qt();else if("x"===t)e=Jt();else{const t=Jt(),n=Qt();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}function ee(){const t=te(!0);return!t||(t(),!1)}class ne{constructor(t){this.isMounted=!1,this.node=t}update(){}}const se={delta:0,timestamp:0,isProcessing:!1};let ie=!0,oe=!1;const re=["read","update","preRender","render","postRender"],ae=re.reduce((t,e)=>(t[e]=function(t){let e=[],n=[],s=0,i=!1,o=!1;const r=new WeakSet,a={schedule:(t,o=!1,a=!1)=>{const l=a&&i,c=l?e:n;return o&&r.add(t),-1===c.indexOf(t)&&(c.push(t),l&&i&&(s=e.length)),t},cancel:t=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1),r.delete(t)},process:l=>{if(i)o=!0;else{if(i=!0,[e,n]=[n,e],n.length=0,s=e.length,s)for(let n=0;n<s;n++){const s=e[n];s(l),r.has(s)&&(a.schedule(s),t())}i=!1,o&&(o=!1,a.process(l))}}};return a}(()=>oe=!0),t),{}),le=re.reduce((t,e)=>{const n=ae[e];return t[e]=(t,e=!1,s=!1)=>(oe||pe(),n.schedule(t,e,s)),t},{}),ce=re.reduce((t,e)=>(t[e]=ae[e].cancel,t),{}),ue=re.reduce((t,e)=>(t[e]=()=>ae[e].process(se),t),{}),he=t=>ae[t].process(se),de=t=>{oe=!1,se.delta=ie?1e3/60:Math.max(Math.min(t-se.timestamp,40),1),se.timestamp=t,se.isProcessing=!0,re.forEach(he),se.isProcessing=!1,oe&&(ie=!1,requestAnimationFrame(de))},pe=()=>{oe=!0,ie=!0,se.isProcessing||requestAnimationFrame(de)};function me(t,e){const n="pointer"+(e?"enter":"leave"),s="onHover"+(e?"Start":"End");return qt(t.current,n,(n,i)=>{if("touch"===n.type||ee())return;const o=t.getProps();t.animationState&&o.whileHover&&t.animationState.setActive("whileHover",e),o[s]&&le.update(()=>o[s](n,i))},{passive:!t.getProps()[s]})}const fe=(t,e)=>!!e&&(t===e||fe(t,e.parentElement)),ge=t=>t;function ye(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,Xt(n))}const ve=new WeakMap,xe=new WeakMap,Pe=t=>{const e=ve.get(t.target);e&&e(t)},Ee=t=>{t.forEach(Pe)};function we(t,e,n){const s=function({root:t,...e}){const n=t||document;xe.has(n)||xe.set(n,{});const s=xe.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(Ee,{root:t,...e})),s[i]}(e);return ve.set(t,n),s.observe(t),()=>{ve.delete(t),s.unobserve(t)}}const be={some:0,all:1};const Se={inView:{Feature:class extends ne{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:s="some",once:i}=t,o={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof s?s:be[s]};return we(this.node.current,o,t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,i&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:s}=this.node.getProps(),o=e?n:s;o&&o(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends ne{constructor(){super(...arguments),this.removeStartListeners=ge,this.removeEndListeners=ge,this.removeAccessibleListeners=ge,this.startPointerPress=(t,e)=>{if(this.removeEndListeners(),this.isPressing)return;const n=this.node.getProps(),s=qt(window,"pointerup",(t,e)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:s}=this.node.getProps();le.update(()=>{fe(this.node.current,t.target)?n&&n(t,e):s&&s(t,e)})},{passive:!(n.onTap||n.onPointerUp)}),i=qt(window,"pointercancel",(t,e)=>this.cancelPress(t,e),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=_t(s,i),this.startPress(t,e)},this.startAccessiblePress=()=>{const t=Ht(this.node.current,"keydown",t=>{if("Enter"!==t.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=Ht(this.node.current,"keyup",t=>{"Enter"===t.key&&this.checkPressEnd()&&ye("up",(t,e)=>{const{onTap:n}=this.node.getProps();n&&le.update(()=>n(t,e))})}),ye("down",(t,e)=>{this.startPress(t,e)})}),e=Ht(this.node.current,"blur",()=>{this.isPressing&&ye("cancel",(t,e)=>this.cancelPress(t,e))});this.removeAccessibleListeners=_t(t,e)}}startPress(t,e){this.isPressing=!0;const{onTapStart:n,whileTap:s}=this.node.getProps();s&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&le.update(()=>n(t,e))}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!ee()}cancelPress(t,e){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&le.update(()=>n(t,e))}mount(){const t=this.node.getProps(),e=qt(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),n=Ht(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=_t(e,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends ne{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=_t(Ht(this.node.current,"focus",()=>this.onFocus()),Ht(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends ne{mount(){this.unmount=_t(me(this.node,!0),me(this.node,!1))}unmount(){}}}};function Te(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}const Ce=t=>/^0[^.\s]+$/.test(t);function Ae(t,e){-1===t.indexOf(e)&&t.push(e)}function Ve(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class Me{constructor(){this.subscriptions=[]}add(t){return Ae(this.subscriptions,t),()=>Ve(this.subscriptions,t)}notify(t,e,n){const s=this.subscriptions.length;if(s)if(1===s)this.subscriptions[0](t,e,n);else for(let i=0;i<s;i++){const s=this.subscriptions[i];s&&s(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function Le(t,e){return e?t*(1e3/e):0}class De{constructor(t,e={}){var n;this.version="10.3.4",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(t,e=!0)=>{this.prev=this.current,this.current=t;const{delta:n,timestamp:s}=se;this.lastUpdated!==s&&(this.timeDelta=n,this.lastUpdated=s,le.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),e&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>le.postRender(this.velocityCheck),this.velocityCheck=({timestamp:t})=>{t!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=(n=this.current,!isNaN(parseFloat(n))),this.owner=e.owner}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new Me);const n=this.events[t].add(e);return"change"===t?()=>{n(),le.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,n){this.set(e),this.prev=t,this.timeDelta=n}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?Le(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Re(t,e){return new De(t,e)}const ke=(t,e)=>n=>Boolean(nt(n)&&et.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),Be=(t,e,n)=>s=>{if(!nt(s))return s;const[i,o,r,a]=s.match(Q);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},je={...Z,transform:t=>Math.round((t=>q(0,255,t))(t))},Fe={test:ke("rgb","red"),parse:Be("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+je.transform(t)+", "+je.transform(e)+", "+je.transform(n)+", "+J(_.transform(s))+")"};const Oe={test:ke("#"),parse:function(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}},transform:Fe.transform},Ie={test:ke("hsl","hue"),parse:Be("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+ot.transform(J(e))+", "+ot.transform(J(n))+", "+J(_.transform(s))+")"},Ue={test:t=>Fe.test(t)||Oe.test(t)||Ie.test(t),parse:t=>Fe.test(t)?Fe.parse(t):Ie.test(t)?Ie.parse(t):Oe.parse(t),transform:t=>nt(t)?t:t.hasOwnProperty("red")?Fe.transform(t):Ie.transform(t)};function Ne(t){"number"==typeof t&&(t=""+t);const e=[];let n=0,s=0;const i=t.match(tt);i&&(n=i.length,t=t.replace(tt,"${c}"),e.push(...i.map(Ue.parse)));const o=t.match(Q);return o&&(s=o.length,t=t.replace(Q,"${n}"),e.push(...o.map(Z.parse))),{values:e,numColors:n,numNumbers:s,tokenised:t}}function ze(t){return Ne(t).values}function We(t){const{values:e,numColors:n,tokenised:s}=Ne(t),i=e.length;return t=>{let e=s;for(let s=0;s<i;s++)e=e.replace(s<n?"${c}":"${n}",s<n?Ue.transform(t[s]):J(t[s]));return e}}const $e=t=>"number"==typeof t?0:t;const He={test:function(t){var e,n;return isNaN(t)&&nt(t)&&((null===(e=t.match(Q))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(tt))||void 0===n?void 0:n.length)||0)>0},parse:ze,createTransformer:We,getAnimatableNone:function(t){const e=ze(t);return We(t)(e.map($e))}},Ye=new Set(["brightness","contrast","saturate","opacity"]);function Xe(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[s]=n.match(Q)||[];if(!s)return t;const i=n.replace(s,"");let o=Ye.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const Ge=/([a-z-]*)\(.*?\)/g,qe={...He,getAnimatableNone:t=>{const e=t.match(Ge);return e?e.map(Xe).join(" "):t}},Ze={...ht,color:Ue,backgroundColor:Ue,outlineColor:Ue,fill:Ue,stroke:Ue,borderColor:Ue,borderTopColor:Ue,borderRightColor:Ue,borderBottomColor:Ue,borderLeftColor:Ue,filter:qe,WebkitFilter:qe},_e=t=>Ze[t];function Ke(t,e){let n=_e(t);return n!==qe&&(n=He),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Je=t=>e=>e.test(t),Qe=[Z,rt,ot,it,lt,at,{test:t=>"auto"===t,parse:t=>t}],tn=t=>Qe.find(Je(t)),en=[...Qe,Ue,He],nn=t=>en.find(Je(t));function sn(t,e,n){const s=t.getProps();return Ft(s,e,void 0!==n?n:s.custom,function(t){const e={};return t.values.forEach((t,n)=>e[n]=t.get()),e}(t),function(t){const e={};return t.values.forEach((t,n)=>e[n]=t.getVelocity()),e}(t))}function on(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Re(n))}function rn(t,e){const n=sn(t,e);let{transitionEnd:s={},transition:i={},...o}=n?t.makeTargetAnimatable(n,!1):{};o={...o,...s};for(const e in o){on(t,e,(r=o[e],Ot(r)?r[r.length-1]||0:r))}var r}function an(t,e){[...e].reverse().forEach(n=>{const s=t.getVariant(n);s&&rn(t,s),t.variantChildren&&t.variantChildren.forEach(t=>{an(t,e)})})}function ln(t,e,n){var s,i;const o=Object.keys(e).filter(e=>!t.hasValue(e)),r=o.length;if(r)for(let a=0;a<r;a++){const r=o[a],l=e[r];let c=null;Array.isArray(l)&&(c=l[0]),null===c&&(c=null!==(i=null!==(s=n[r])&&void 0!==s?s:t.readValue(r))&&void 0!==i?i:e[r]),null!=c&&("string"==typeof c&&(/^\-?\d*\.?\d+$/.test(c)||Ce(c))?c=parseFloat(c):!nn(c)&&He.test(l)&&(c=Ke(r,l)),t.addValue(r,Re(c,{owner:t})),void 0===n[r]&&(n[r]=c),null!==c&&t.setBaseTarget(r,c))}}function cn(t,e){if(!e)return;return(e[t]||e.default||e).from}function un(t,e,n){const s={};for(const i in t){const t=cn(i,e);if(void 0!==t)s[i]=t;else{const t=n.getValue(i);t&&(s[i]=t.get())}}return s}function hn(t){return Boolean(N(t)&&t.add)}const dn="data-"+Lt("framerAppearId");let pn=ge,mn=ge;const fn=t=>1e3*t,gn=t=>t/1e3,yn={current:!1};const vn=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,xn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:vn([0,.65,.55,1]),circOut:vn([.55,0,1,.45]),backIn:vn([.31,.01,.66,-.59]),backOut:vn([.33,1.53,.69,.99])};function Pn(t){if(t)return Array.isArray(t)?vn(t):xn[t]}function En(t,e,n,{delay:s=0,duration:i,repeat:o=0,repeatType:r="loop",ease:a,times:l}={}){const c={[e]:n};return l&&(c.offset=l),t.animate(c,{delay:s,duration:i,easing:Pn(a),fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"})}const wn={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},bn={},Sn={};for(const t in wn)Sn[t]=()=>(void 0===bn[t]&&(bn[t]=wn[t]()),bn[t]);const Tn=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Cn=t=>e=>1-t(1-e),An=t=>t*t,Vn=Cn(An),Mn=Tn(An),Ln=(t,e,n)=>-n*t+n*e+t;function Dn(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}const Rn=(t,e,n)=>{const s=t*t;return Math.sqrt(Math.max(0,n*(e*e-s)+s))},kn=[Oe,Fe,Ie];function Bn(t){const e=(n=t,kn.find(t=>t.test(n)));var n;mn(Boolean(e));let s=e.parse(t);return e===Ie&&(s=function({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,n/=100;let i=0,o=0,r=0;if(e/=100){const s=n<.5?n*(1+e):n+e-n*e,a=2*n-s;i=Dn(a,s,t+1/3),o=Dn(a,s,t),r=Dn(a,s,t-1/3)}else i=o=r=n;return{red:Math.round(255*i),green:Math.round(255*o),blue:Math.round(255*r),alpha:s}}(s)),s}const jn=(t,e)=>{const n=Bn(t),s=Bn(e),i={...n};return t=>(i.red=Rn(n.red,s.red,t),i.green=Rn(n.green,s.green,t),i.blue=Rn(n.blue,s.blue,t),i.alpha=Ln(n.alpha,s.alpha,t),Fe.transform(i))};function Fn(t,e){return"number"==typeof t?n=>Ln(t,e,n):Ue.test(t)?jn(t,e):Un(t,e)}const On=(t,e)=>{const n=[...t],s=n.length,i=t.map((t,n)=>Fn(t,e[n]));return t=>{for(let e=0;e<s;e++)n[e]=i[e](t);return n}},In=(t,e)=>{const n={...t,...e},s={};for(const i in n)void 0!==t[i]&&void 0!==e[i]&&(s[i]=Fn(t[i],e[i]));return t=>{for(const e in s)n[e]=s[e](t);return n}},Un=(t,e)=>{const n=He.createTransformer(e),s=Ne(t),i=Ne(e);return s.numColors===i.numColors&&s.numNumbers>=i.numNumbers?_t(On(s.values,i.values),n):(pn(!0),n=>""+(n>0?e:t))},Nn=(t,e,n)=>{const s=e-t;return 0===s?1:(n-t)/s},zn=(t,e)=>n=>Ln(t,e,n);function Wn(t,e,n){const s=[],i=n||("number"==typeof(o=t[0])?zn:"string"==typeof o?Ue.test(o)?jn:Un:Array.isArray(o)?On:"object"==typeof o?In:zn);var o;const r=t.length-1;for(let n=0;n<r;n++){let o=i(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]:e;o=_t(t,o)}s.push(o)}return s}function $n(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;mn(o===e.length),mn(!s||!Array.isArray(s)||s.length===o-1),t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const r=Wn(e,s,i),a=r.length,l=e=>{let n=0;if(a>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const s=Nn(t[n],t[n+1],e);return r[n](s)};return n?e=>l(q(t[0],t[o-1],e)):l}function Hn(t){const e=[0];return function(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=Nn(0,e,s);t.push(Ln(n,1,i))}}(e,t.length-1),e}const Yn=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function Xn(t,e,n,s){if(t===e&&n===s)return ge;const i=e=>function(t,e,n,s,i){let o,r,a=0;do{r=e+(n-e)/2,o=Yn(r,s,i)-t,o>0?n=r:e=r}while(Math.abs(o)>1e-7&&++a<12);return r}(e,0,1,t,n);return t=>0===t||1===t?t:Yn(i(t),e,s)}const Gn=t=>1-Math.sin(Math.acos(t)),qn=Cn(Gn),Zn=Tn(qn),_n=Xn(.33,1.53,.69,.99),Kn=Cn(_n),Jn=Tn(Kn),Qn=t=>(t*=2)<1?.5*Kn(t):.5*(2-Math.pow(2,-10*(t-1))),ts={linear:ge,easeIn:An,easeInOut:Mn,easeOut:Vn,circIn:Gn,circInOut:Zn,circOut:qn,backIn:Kn,backInOut:Jn,backOut:_n,anticipate:Qn},es=t=>{if(Array.isArray(t)){mn(4===t.length);const[e,n,s,i]=t;return Xn(e,n,s,i)}return"string"==typeof t?(mn(void 0!==ts[t]),ts[t]):t};function ns({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=(t=>Array.isArray(t)&&"number"!=typeof t[0])(s)?s.map(es):es(s),o={done:!1,value:e[0]},r=$n(function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:Hn(e),t),e,{ease:Array.isArray(i)?i:(a=e,l=i,a.map(()=>l||Mn).splice(0,a.length-1))});var a,l;return{calculatedDuration:t,next:e=>(o.value=r(e),o.done=e>=t,o)}}function ss(t,e,n){const s=Math.max(e-5,0);return Le(n-t(s),e-s)}function is({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let i,o;pn(t<=fn(10));let r=1-e;r=q(.05,1,r),t=q(.01,10,gn(t)),r<1?(i=e=>{const s=e*r,i=s*t;return.001-(s-n)/os(e,r)*Math.exp(-i)},o=e=>{const s=e*r*t,o=s*n+n,a=Math.pow(r,2)*Math.pow(e,2)*t,l=Math.exp(-s),c=os(Math.pow(e,2),r);return(.001-i(e)>0?-1:1)*((o-a)*l)/c}):(i=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,o=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let s=n;for(let n=1;n<12;n++)s-=t(s)/e(s);return s}(i,o,5/t);if(t=fn(t),isNaN(a))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(a,2)*s;return{stiffness:e,damping:2*r*Math.sqrt(s*e),duration:t}}}function os(t,e){return t*Math.sqrt(1-e*e)}const rs=["duration","bounce"],as=["stiffness","damping","mass"];function ls(t,e){return e.some(e=>void 0!==t[e])}function cs({keyframes:t,restDelta:e,restSpeed:n,...s}){const i=t[0],o=t[t.length-1],r={done:!1,value:i},{stiffness:a,damping:l,mass:c,velocity:u,duration:h,isResolvedFromDuration:d}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!ls(t,as)&&ls(t,rs)){const n=is(t);e={...e,...n,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}(s),p=u?-gn(u):0,m=l/(2*Math.sqrt(a*c)),f=o-i,g=gn(Math.sqrt(a/c)),y=Math.abs(f)<5;let v;if(n||(n=y?.01:2),e||(e=y?.005:.5),m<1){const t=os(g,m);v=e=>{const n=Math.exp(-m*g*e);return o-n*((p+m*g*f)/t*Math.sin(t*e)+f*Math.cos(t*e))}}else if(1===m)v=t=>o-Math.exp(-g*t)*(f+(p+g*f)*t);else{const t=g*Math.sqrt(m*m-1);v=e=>{const n=Math.exp(-m*g*e),s=Math.min(t*e,300);return o-n*((p+m*g*f)*Math.sinh(s)+t*f*Math.cosh(s))/t}}return{calculatedDuration:d&&h||null,next:t=>{const s=v(t);if(d)r.done=t>=h;else{let i=p;0!==t&&(i=m<1?ss(v,t,s):0);const a=Math.abs(i)<=n,l=Math.abs(o-s)<=e;r.done=a&&l}return r.value=r.done?o:s,r}}}function us({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let m=n*e;const f=h+m,g=void 0===r?f:r(f);g!==f&&(m=g-h);const y=t=>-m*Math.exp(-t/s),v=t=>g+y(t),x=t=>{const e=y(t),n=v(t);d.done=Math.abs(e)<=c,d.value=d.done?g:n};let P,E;const w=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(P=t,E=cs({keyframes:[d.value,p(d.value)],velocity:ss(v,t,d.value),damping:i,stiffness:o,restDelta:c,restSpeed:u}))};return w(0),{calculatedDuration:null,next:t=>{let e=!1;return E||void 0!==P||(e=!0,x(t),w(t)),void 0!==P&&t>P?E.next(t-P):(!e&&x(t),d)}}}const hs=t=>{const e=({timestamp:e})=>t(e);return{start:()=>le.update(e,!0),stop:()=>ce.update(e),now:()=>se.isProcessing?se.timestamp:performance.now()}},ds={decay:us,inertia:us,tween:ns,keyframes:ns,spring:cs};function ps({autoplay:t=!0,delay:e=0,driver:n=hs,keyframes:s,type:i="keyframes",repeat:o=0,repeatDelay:r=0,repeatType:a="loop",onPlay:l,onStop:c,onComplete:u,onUpdate:h,...d}){let p,m;const f=()=>{m=new Promise(t=>{p=t})};let g;f();const y=ds[i]||ns;let v;y!==ns&&"number"!=typeof s[0]&&(v=$n([0,100],s,{clamp:!1}),s=[0,100]);const x=y({...d,keyframes:s});let P;"mirror"===a&&(P=y({...d,keyframes:[...s].reverse(),velocity:-(d.velocity||0)}));let E="idle",w=null,b=null;null===x.calculatedDuration&&o&&(x.calculatedDuration=function(t){let e=0,n=t.next(e);for(;!n.done&&e<2e4;)e+=50,n=t.next(e);return e}(x));const{calculatedDuration:S}=x;let T=1/0,C=1/0;S&&(T=S+r,C=T*(o+1)-r);let A=0;const V=t=>{if(null===b)return;A=null!==w?w:t-b,A=Math.max(A-e,0),"finished"===E&&null===w&&(A=C);let n=A,s=x;if(o){const t=A/T;let e=Math.floor(t),i=t%1;!i&&t>=1&&(i=1),1===i&&e--;const o=e%2;o&&("reverse"===a?(i=1-i,r&&(i-=r/T)):"mirror"===a&&(s=P));n=(A>=C?"reverse"===a&&o?0:1:q(0,1,i))*T}const i=s.next(n);let{value:l,done:c}=i;h&&h(v?v(l):l),null!==S&&(c=A>=C);return null===w&&("finished"===E||"running"===E&&c)&&M(),i},M=()=>{g&&g.stop(),E="finished",u&&u(),p(),f()},L=()=>{g||(g=n(V));const t=g.now();l&&l(),E="running",null!==w?b=t-w:b||(b=t),w=null,g.start()};t&&L();return{then:(t,e)=>m.then(t,e),get time(){return gn(A)},set time(t){const e=fn(t);null===w&&g?b=g.now()-e:w=e},play:L,pause:()=>{E="paused",w=A},stop:()=>{c&&c(),g&&g.stop(),g=void 0},sample:t=>(b=0,V(t))}}const ms=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),fs=(t,e)=>{return"spring"===e.type||"backgroundColor"===t||!(!(n=e.ease)||Array.isArray(n)||"string"==typeof n&&xn[n]);var n};const gs={type:"spring",stiffness:500,damping:25,restSpeed:10},ys={type:"keyframes",duration:.8},vs={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},xs=(t,{keyframes:e})=>e.length>2?ys:I.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:gs:vs,Ps=(t,e)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!He.test(e)||e.startsWith("url(")));function Es(t){return 0===t||"string"==typeof t&&0===parseFloat(t)&&-1===t.indexOf(" ")}function ws(t){return"number"==typeof t?0:Ke("",t)}function bs(t,e){return t[e]||t.default||t}const Ss=(t,e,n,s={})=>i=>{const o=bs(s,t)||{},r=o.delay||s.delay||0;let{elapsed:a=0}=s;a-=fn(r);const l=function(t,e,n,s){const i=Ps(e,n);let o=void 0!==s.from?s.from:t.get();return"none"===o&&i&&"string"==typeof n?o=Ke(e,n):Es(o)&&"string"==typeof n?o=ws(n):!Array.isArray(n)&&Es(n)&&"string"==typeof o&&(n=ws(o)),Array.isArray(n)?(null===n[0]&&(n[0]=o),n):[o,n]}(e,t,n,o),c=l[0],u=l[l.length-1],h=Ps(t,c),d=Ps(t,u);pn(h===d);let p={keyframes:l,velocity:e.getVelocity(),...o,delay:-a,onUpdate:t=>{e.set(t),o.onUpdate&&o.onUpdate(t)},onComplete:()=>{i(),o.onComplete&&o.onComplete()}};if(!h||!d||yn.current||!1===o.type)return function({keyframes:t,delay:e,onUpdate:n,onComplete:s}){const i=()=>(n&&n(t[t.length-1]),s&&s(),{time:0,play:ge,pause:ge,stop:ge,then:()=>Promise.resolve()});return e?ps({keyframes:[0,1],duration:e,onComplete:i}):i()}(p);if(function({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}(o)||(p={...p,...xs(t,p)}),p.duration&&(p.duration=fn(p.duration)),p.repeatDelay&&(p.repeatDelay=fn(p.repeatDelay)),e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const n=function(t,e,{onUpdate:n,onComplete:s,...i}){if(!(Sn.waapi()&&ms.has(e)&&!i.repeatDelay&&"mirror"!==i.repeatType&&0!==i.damping&&"inertia"!==i.type))return!1;let{keyframes:o,duration:r=300,ease:a}=i;if(fs(e,i)){const t=ps({...i,repeat:0,delay:0});let e={done:!1,value:o[0]};const n=[];let s=0;for(;!e.done&&s<2e4;)e=t.sample(s),n.push(e.value),s+=10;o=n,r=s-10,a="linear"}const l=En(t.owner.current,e,o,{...i,duration:r,ease:a});return l.onfinish=()=>{t.set(function(t,{repeat:e,repeatType:n="loop"}){return t[e&&"loop"!==n&&e%2==1?0:t.length-1]}(o,i)),le.update(()=>l.cancel()),s&&s()},{then:(t,e)=>l.finished.then(t,e),get time(){return gn(l.currentTime||0)},set time(t){l.currentTime=fn(t)},play:()=>l.play(),pause:()=>l.pause(),stop:()=>{const{currentTime:e}=l;if(e){const n=ps({...i,autoplay:!1});t.setWithVelocity(n.sample(e-10).value,n.sample(e).value,10)}le.update(()=>l.cancel())}}}(e,t,p);if(n)return n}return ps(p)};function Ts(t,e,n={}){let s;if(t.notify("AnimationStart",e),Array.isArray(e)){const i=e.map(e=>Cs(t,e,n));s=Promise.all(i)}else if("string"==typeof e)s=Cs(t,e,n);else{const i="function"==typeof e?sn(t,e,n.custom):e;s=As(t,i,n)}return s.then(()=>t.notify("AnimationComplete",e))}function Cs(t,e,n={}){const s=sn(t,e,n.custom);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>As(t,s,n):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(s=0)=>{const{delayChildren:o=0,staggerChildren:r,staggerDirection:a}=i;return function(t,e,n=0,s=0,i=1,o){const r=[],a=(t.variantChildren.size-1)*s,l=1===i?(t=0)=>t*s:(t=0)=>a-t*s;return Array.from(t.variantChildren).sort(Vs).forEach((t,s)=>{t.notify("AnimationStart",e),r.push(Cs(t,e,{...o,delay:n+l(s)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(r)}(t,e,o+s,r,a,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[t,e]="beforeChildren"===a?[o,r]:[r,o];return t().then(e)}return Promise.all([o(),r(n.delay)])}function As(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=t.makeTargetAnimatable(e);const l=t.getValue("willChange");s&&(o=s);const c=[],u=i&&t.animationState&&t.animationState.getState()[i];for(const e in a){const s=t.getValue(e),i=a[e];if(!s||void 0===i||u&&Ms(u,e))continue;const r={delay:n,elapsed:0,...o};if(window.HandoffAppearAnimations&&!s.hasAnimated){const n=t.getProps()[dn];n&&(r.elapsed=window.HandoffAppearAnimations(n,e,s,le))}let h=s.start(Ss(e,s,i,t.shouldReduceMotion&&I.has(e)?{type:!1}:r));hn(l)&&(l.add(e),h=h.then(()=>l.remove(e))),c.push(h)}return Promise.all(c).then(()=>{r&&rn(t,r)})}function Vs(t,e){return t.sortNodePosition(e)}function Ms({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,s}const Ls=[...f].reverse(),Ds=f.length;function Rs(t){let e=function(t){return e=>Promise.all(e.map(({animation:e,options:n})=>Ts(t,e,n)))}(t);const n={animate:Bs(!0),whileInView:Bs(),whileHover:Bs(),whileTap:Bs(),whileDrag:Bs(),whileFocus:Bs(),exit:Bs()};let s=!0;const i=(e,n)=>{const s=sn(t,n);if(s){const{transition:t,transitionEnd:n,...i}=s;e={...e,...i,...n}}return e};function o(o,r){const a=t.getProps(),l=t.getVariantContext(!0)||{},c=[],u=new Set;let h={},d=1/0;for(let e=0;e<Ds;e++){const f=Ls[e],g=n[f],y=void 0!==a[f]?a[f]:l[f],v=p(y),x=f===r?g.isActive:null;!1===x&&(d=e);let P=y===l[f]&&y!==a[f]&&v;if(P&&s&&t.manuallyAnimateOnMount&&(P=!1),g.protectedKeys={...h},!g.isActive&&null===x||!y&&!g.prevProp||m(y)||"boolean"==typeof y)continue;const E=ks(g.prevProp,y);let w=E||f===r&&g.isActive&&!P&&v||e>d&&v;const b=Array.isArray(y)?y:[y];let S=b.reduce(i,{});!1===x&&(S={});const{prevResolvedValues:T={}}=g,C={...T,...S},A=t=>{w=!0,u.delete(t),g.needsAnimating[t]=!0};for(const t in C){const e=S[t],n=T[t];h.hasOwnProperty(t)||(e!==n?Ot(e)&&Ot(n)?!Te(e,n)||E?A(t):g.protectedKeys[t]=!0:void 0!==e?A(t):u.add(t):void 0!==e&&u.has(t)?A(t):g.protectedKeys[t]=!0)}g.prevProp=y,g.prevResolvedValues=S,g.isActive&&(h={...h,...S}),s&&t.blockInitialAnimation&&(w=!1),w&&!P&&c.push(...b.map(t=>({animation:t,options:{type:f,...o}})))}if(u.size){const e={};u.forEach(n=>{const s=t.getBaseTarget(n);void 0!==s&&(e[n]=s)}),c.push({animation:e})}let f=Boolean(c.length);return s&&!1===a.initial&&!t.manuallyAnimateOnMount&&(f=!1),s=!1,f?e(c):Promise.resolve()}return{animateChanges:o,setActive:function(e,s,i){var r;if(n[e].isActive===s)return Promise.resolve();null===(r=t.variantChildren)||void 0===r||r.forEach(t=>{var n;return null===(n=t.animationState)||void 0===n?void 0:n.setActive(e,s)}),n[e].isActive=s;const a=o(i,e);for(const t in n)n[t].protectedKeys={};return a},setAnimateFunction:function(n){e=n(t)},getState:()=>n}}function ks(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!Te(e,t)}function Bs(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}let js=0;const Fs={animation:{Feature:class extends ne{constructor(t){super(t),t.animationState||(t.animationState=Rs(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),m(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){}}},exit:{Feature:class extends ne{constructor(){super(...arguments),this.id=js++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e,custom:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const i=this.node.animationState.setActive("exit",!t,{custom:null!=n?n:this.node.getProps().custom});e&&!t&&i.then(()=>e(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}}},Os=(t,e)=>Math.abs(t-e);function Is(t,e){const n=Os(t.x,e.x),s=Os(t.y,e.y);return Math.sqrt(n**2+s**2)}class Us{constructor(t,e,{transformPagePoint:n}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const t=Ws(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=Is(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:s}=t,{timestamp:i}=se;this.history.push({...s,timestamp:i});const{onStart:o,onMove:r}=this.handlers;e||(o&&o(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),r&&r(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=Ns(e,this.transformPagePoint),le.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{if(this.end(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const{onEnd:n,onSessionEnd:s}=this.handlers,i=Ws("pointercancel"===t.type?this.lastMoveEventInfo:Ns(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,i),s&&s(t,i)},!Yt(t))return;this.handlers=e,this.transformPagePoint=n;const s=Ns(Xt(t),this.transformPagePoint),{point:i}=s,{timestamp:o}=se;this.history=[{...i,timestamp:o}];const{onSessionStart:r}=e;r&&r(t,Ws(s,this.history)),this.removeListeners=_t(qt(window,"pointermove",this.handlePointerMove),qt(window,"pointerup",this.handlePointerUp),qt(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ce.update(this.updatePoint)}}function Ns(t,e){return e?{point:e(t.point)}:t}function zs(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Ws({point:t},e){return{point:t,delta:zs(t,Hs(e)),offset:zs(t,$s(e)),velocity:Ys(e,.1)}}function $s(t){return t[0]}function Hs(t){return t[t.length-1]}function Ys(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=Hs(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>fn(e)));)n--;if(!s)return{x:0,y:0};const o=gn(i.timestamp-s.timestamp);if(0===o)return{x:0,y:0};const r={x:(i.x-s.x)/o,y:(i.y-s.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function Xs(t){return t.max-t.min}function Gs(t,e=0,n=.01){return Math.abs(t-e)<=n}function qs(t,e,n,s=.5){t.origin=s,t.originPoint=Ln(e.min,e.max,t.origin),t.scale=Xs(n)/Xs(e),(Gs(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=Ln(n.min,n.max,t.origin)-t.originPoint,(Gs(t.translate)||isNaN(t.translate))&&(t.translate=0)}function Zs(t,e,n,s){qs(t.x,e.x,n.x,s?s.originX:void 0),qs(t.y,e.y,n.y,s?s.originY:void 0)}function _s(t,e,n){t.min=n.min+e.min,t.max=t.min+Xs(e)}function Ks(t,e,n){t.min=e.min-n.min,t.max=t.min+Xs(e)}function Js(t,e,n){Ks(t.x,e.x,n.x),Ks(t.y,e.y,n.y)}function Qs(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function ti(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}const ei=.35;function ni(t,e,n){return{min:si(t,e),max:si(t,n)}}function si(t,e){return"number"==typeof t?t:t[e]||0}const ii=()=>({x:{min:0,max:0},y:{min:0,max:0}});function oi(t){return[t("x"),t("y")]}function ri({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function ai(t){return void 0===t||1===t}function li({scale:t,scaleX:e,scaleY:n}){return!ai(t)||!ai(e)||!ai(n)}function ci(t){return li(t)||ui(t)||t.z||t.rotate||t.rotateX||t.rotateY}function ui(t){return hi(t.x)||hi(t.y)}function hi(t){return t&&"0%"!==t}function di(t,e,n){return n+e*(t-n)}function pi(t,e,n,s,i){return void 0!==i&&(t=di(t,i,s)),di(t,n,s)+e}function mi(t,e=0,n=1,s,i){t.min=pi(t.min,e,n,s,i),t.max=pi(t.max,e,n,s,i)}function fi(t,{x:e,y:n}){mi(t.x,e.translate,e.scale,e.originPoint),mi(t.y,n.translate,n.scale,n.originPoint)}function gi(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function yi(t,e){t.min=t.min+e,t.max=t.max+e}function vi(t,e,[n,s,i]){const o=void 0!==e[i]?e[i]:.5,r=Ln(t.min,t.max,o);mi(t,e[n],e[s],r,e.scale)}const xi=["x","scaleX","originX"],Pi=["y","scaleY","originY"];function Ei(t,e){vi(t.x,e,xi),vi(t.y,e,Pi)}function wi(t,e){return ri(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}(t.getBoundingClientRect(),e))}const bi=new WeakMap;class Si{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=t}start(t,{snapToCursor:e=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;this.panSession=new Us(t,{onSessionStart:t=>{this.stopAnimation(),e&&this.snapToCursor(Xt(t,"page").point)},onStart:(t,e)=>{const{drag:n,dragPropagation:s,onDragStart:i}=this.getProps();if(n&&!s&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=te(n),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),oi(t=>{let e=this.getAxisMotionValue(t).get()||0;if(ot.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const s=n.layout.layoutBox[t];if(s){e=Xs(s)*(parseFloat(e)/100)}}}this.originPoint[t]=e}),i&&le.update(()=>i(t,e));const{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:s,onDirectionLock:i,onDrag:o}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:r}=e;if(s&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(r),void(null!==this.currentDirection&&i&&i(this.currentDirection));this.updateAxis("x",e.point,r),this.updateAxis("y",e.point,r),this.visualElement.render(),o&&o(t,e)},onSessionEnd:(t,e)=>this.stop(t,e)},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,e){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:s}=e;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i&&le.update(()=>i(t,e))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,n){const{drag:s}=this.getProps();if(!n||!Ti(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=function(t,{min:e,max:n},s){return void 0!==e&&t<e?t=s?Ln(e,t,s.min):Math.max(t,e):void 0!==n&&t>n&&(t=s?Ln(n,t,s.max):Math.min(t,n)),t}(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){const{dragConstraints:t,dragElastic:e}=this.getProps(),{layout:n}=this.visualElement.projection||{},s=this.constraints;t&&d(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!n)&&function(t,{top:e,left:n,bottom:s,right:i}){return{x:Qs(t.x,n,i),y:Qs(t.y,e,s)}}(n.layoutBox,t),this.elastic=function(t=ei){return!1===t?t=0:!0===t&&(t=ei),{x:ni(t,"left","right"),y:ni(t,"top","bottom")}}(e),s!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&oi(t=>{this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(n.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!d(t))return!1;const n=t.current;mn(null!==n);const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=function(t,e,n){const s=wi(t,n),{scroll:i}=e;return i&&(yi(s.x,i.offset.x),yi(s.y,i.offset.y)),s}(n,s.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:ti(t.x,e.x),y:ti(t.y,e.y)}}(s.layout.layoutBox,i);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=ri(t))}return o}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},l=oi(r=>{if(!Ti(r,e,this.currentDirection))return;let l=a&&a[r]||{};o&&(l={min:0,max:0});const c=s?200:1e6,u=s?40:1e7,h={type:"inertia",velocity:n?t[r]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...l};return this.startAxisValueAnimation(r,h)});return Promise.all(l).then(r)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return n.start(Ss(t,n,0,e))}stopAnimation(){oi(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const e="_drag"+t.toUpperCase(),n=this.visualElement.getProps(),s=n[e];return s||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){oi(e=>{const{drag:n}=this.getProps();if(!Ti(e,n,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(e);if(s&&s.layout){const{min:n,max:o}=s.layout.layoutBox[e];i.set(t[e]-Ln(n,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!d(e)||!n||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};oi(t=>{const e=this.getAxisMotionValue(t);if(e){const n=e.get();s[t]=function(t,e){let n=.5;const s=Xs(t),i=Xs(e);return i>s?n=Nn(e.min,e.max-s,t.min):s>i&&(n=Nn(t.min,t.max-i,e.min)),q(0,1,n)}({min:n,max:n},this.constraints[t])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),oi(e=>{if(!Ti(e,t,null))return;const n=this.getAxisMotionValue(e),{min:i,max:o}=this.constraints[e];n.set(Ln(i,o,s[e]))})}addListeners(){if(!this.visualElement.current)return;bi.set(this.visualElement,this);const t=qt(this.visualElement.current,"pointerdown",t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)}),e=()=>{const{dragConstraints:t}=this.getProps();d(t)&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,s=n.addEventListener("measure",e);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),e();const i=Ht(window,"resize",()=>this.scalePositionWithinConstraints()),o=n.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(oi(e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))}),this.visualElement.render())});return()=>{i(),t(),s(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=ei,dragMomentum:r=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:r}}}function Ti(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const Ci=t=>(e,n)=>{t&&le.update(()=>t(e,n))};class Ai{constructor(t){this.animations=t.filter(Boolean)}then(t,e){return Promise.all(this.animations).then(t).catch(e)}get time(){return this.animations[0].time}set time(t){for(let e=0;e<this.animations.length;e++)this.animations[e].time=t}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}stop(){this.runAll("stop")}}function Vi(t,e,n={}){const s=N(t)?t:Re(t);return s.start(Ss("",s,e,n)),s.animation||new Ai([])}const Mi=["TopLeft","TopRight","BottomLeft","BottomRight"],Li=Mi.length,Di=t=>"string"==typeof t?parseFloat(t):t,Ri=t=>"number"==typeof t||rt.test(t);function ki(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const Bi=Fi(0,.5,qn),ji=Fi(.5,.95,ge);function Fi(t,e,n){return s=>s<t?0:s>e?1:n(Nn(t,e,s))}function Oi(t,e){t.min=e.min,t.max=e.max}function Ii(t,e){Oi(t.x,e.x),Oi(t.y,e.y)}function Ui(t,e,n,s,i){return t=di(t-=e,1/n,s),void 0!==i&&(t=di(t,1/i,s)),t}function Ni(t,e,[n,s,i],o,r){!function(t,e=0,n=1,s=.5,i,o=t,r=t){if(ot.test(e)){e=parseFloat(e);e=Ln(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=Ln(o.min,o.max,s);t===o&&(a-=e),t.min=Ui(t.min,e,n,a,i),t.max=Ui(t.max,e,n,a,i)}(t,e[n],e[s],e[i],e.scale,o,r)}const zi=["x","scaleX","originX"],Wi=["y","scaleY","originY"];function $i(t,e,n,s){Ni(t.x,e,zi,n?n.x:void 0,s?s.x:void 0),Ni(t.y,e,Wi,n?n.y:void 0,s?s.y:void 0)}function Hi(t){return 0===t.translate&&1===t.scale}function Yi(t){return Hi(t.x)&&Hi(t.y)}function Xi(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function Gi(t){return Xs(t.x)/Xs(t.y)}class qi{constructor(){this.members=[]}add(t){Ae(this.members,t),t.scheduleRender()}remove(t){if(Ve(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){const e=this.members.findIndex(e=>t===e);if(0===e)return!1;let n;for(let t=e;t>=0;t--){const e=this.members[t];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,e&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:s}=t.options;!1===s&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:e,resumingFrom:n}=t;e.onExitComplete&&e.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Zi(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y;if((i||o)&&(s=`translate3d(${i}px, ${o}px, 0) `),1===e.x&&1===e.y||(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{rotate:t,rotateX:e,rotateY:i}=n;t&&(s+=`rotate(${t}deg) `),e&&(s+=`rotateX(${e}deg) `),i&&(s+=`rotateY(${i}deg) `)}const r=t.x.scale*e.x,a=t.y.scale*e.y;return 1===r&&1===a||(s+=`scale(${r}, ${a})`),s||"none"}const _i=(t,e)=>t.depth-e.depth;class Ki{constructor(){this.children=[],this.isDirty=!1}add(t){Ae(this.children,t),this.isDirty=!0}remove(t){Ve(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(_i),this.isDirty=!1,this.children.forEach(t)}}function Ji(t,e){const n=performance.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(ce.read(s),t(o-e))};return le.read(s,!0),()=>ce.read(s)}function Qi(t,e){var n;return"string"==typeof t?e?(null!==(n=e[t])&&void 0!==n||(e[t]=document.querySelectorAll(t)),t=e[t]):t=document.querySelectorAll(t):t instanceof Element&&(t=[t]),Array.from(t||[])}const to=new WeakMap;let eo;function no({target:t,contentRect:e,borderBoxSize:n}){var s;null===(s=to.get(t))||void 0===s||s.forEach(s=>{s({target:t,contentSize:e,get size(){return function(t,e){if(e){const{inlineSize:t,blockSize:n}=e[0];return{width:t,height:n}}return t instanceof SVGElement&&"getBBox"in t?t.getBBox():{width:t.offsetWidth,height:t.offsetHeight}}(t,n)}})})}function so(t){t.forEach(no)}function io(t,e){eo||"undefined"!=typeof ResizeObserver&&(eo=new ResizeObserver(so));const n=Qi(t);return n.forEach(t=>{let n=to.get(t);n||(n=new Set,to.set(t,n)),n.add(e),null==eo||eo.observe(t)}),()=>{n.forEach(t=>{const n=to.get(t);null==n||n.delete(e),(null==n?void 0:n.size)||null==eo||eo.unobserve(t)})}}const oo=new Set;let ro;function ao(t){return oo.add(t),ro||(ro=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};oo.forEach(t=>t(e))},window.addEventListener("resize",ro)),()=>{oo.delete(t),!oo.size&&ro&&(ro=void 0)}}const lo={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function co(t,e,n,s){const i=n[e],{length:o,position:r}=lo[e],a=i.current,l=n.time;i.current=t["scroll"+r],i.scrollLength=t["scroll"+o]-t["client"+o],i.offset.length=0,i.offset[0]=0,i.offset[1]=i.scrollLength,i.progress=Nn(0,i.scrollLength,i.current);const c=s-l;i.velocity=c>50?0:Le(i.current-a,c)}const uo={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},ho={start:0,center:.5,end:1};function po(t,e,n=0){let s=0;if(void 0!==ho[t]&&(t=ho[t]),"string"==typeof t){const e=parseFloat(t);t.endsWith("px")?s=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?s=e/100*document.documentElement.clientWidth:t.endsWith("vh")?s=e/100*document.documentElement.clientHeight:t=e}return"number"==typeof t&&(s=e*t),n+s}const mo=[0,0];function fo(t,e,n,s){let i=Array.isArray(t)?t:mo,o=0,r=0;return"number"==typeof t?i=[t,t]:"string"==typeof t&&(i=(t=t.trim()).includes(" ")?t.split(" "):[t,ho[t]?t:"0"]),o=po(i[0],n,s),r=po(i[1],e),o-r}const go={x:0,y:0};function yo(t,e,n){let{offset:s=uo.All}=n;const{target:i=t,axis:o="y"}=n,r="y"===o?"height":"width",a=i!==t?function(t,e){let n={x:0,y:0},s=t;for(;s&&s!==e;)if(s instanceof HTMLElement)n.x+=s.offsetLeft,n.y+=s.offsetTop,s=s.offsetParent;else if(s instanceof SVGGraphicsElement&&"getBBox"in s){const{top:t,left:e}=s.getBBox();for(n.x+=e,n.y+=t;s&&"svg"!==s.tagName;)s=s.parentNode}return n}(i,t):go,l=i===t?{width:t.scrollWidth,height:t.scrollHeight}:{width:i.clientWidth,height:i.clientHeight},c={width:t.clientWidth,height:t.clientHeight};e[o].offset.length=0;let u=!e[o].interpolate;const h=s.length;for(let t=0;t<h;t++){const n=fo(s[t],c[r],l[r],a[o]);u||n===e[o].interpolatorOffsets[t]||(u=!0),e[o].offset[t]=n}u&&(e[o].interpolate=$n(e[o].offset,Hn(s)),e[o].interpolatorOffsets=[...e[o].offset]),e[o].progress=e[o].interpolate(e[o].current)}function vo(t,e,n,s={}){return{measure:()=>function(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let s=e;for(;s&&s!==t;)n.x.targetOffset+=s.offsetLeft,n.y.targetOffset+=s.offsetTop,s=s.offsetParent}n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight}(t,s.target,n),update:e=>{!function(t,e,n){co(t,"x",e,n),co(t,"y",e,n),e.time=n}(t,n,e),(s.offset||s.target)&&yo(t,n,s)},notify:()=>e(n)}}const xo=new WeakMap,Po=new WeakMap,Eo=new WeakMap,wo=t=>t===document.documentElement?window:t;function bo(t,{container:e=document.documentElement,...n}={}){let s=Eo.get(e);s||(s=new Set,Eo.set(e,s));const i=vo(e,t,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},n);if(s.add(i),!xo.has(e)){const t=()=>{const t=performance.now();for(const t of s)t.measure();for(const e of s)e.update(t);for(const t of s)t.notify()};xo.set(e,t);const n=wo(e);window.addEventListener("resize",t,{passive:!0}),e!==document.documentElement&&Po.set(e,(r=t,"function"==typeof(o=e)?ao(o):io(o,r))),n.addEventListener("scroll",t,{passive:!0})}var o,r;const a=xo.get(e),l=requestAnimationFrame(a);return()=>{var t;cancelAnimationFrame(l);const n=Eo.get(e);if(!n)return;if(n.delete(i),n.size)return;const s=xo.get(e);xo.delete(e),s&&(wo(e).removeEventListener("scroll",s),null===(t=Po.get(e))||void 0===t||t(),window.removeEventListener("resize",s))}}const So={any:0,all:1};function To(t,e,{root:n,margin:s,amount:i="any"}={}){const o=Qi(t),r=new WeakMap,a=new IntersectionObserver(t=>{t.forEach(t=>{const n=r.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){const n=e(t);"function"==typeof n?r.set(t.target,n):a.unobserve(t.target)}else n&&(n(t),r.delete(t.target))})},{root:n,rootMargin:s,threshold:"number"==typeof i?i:So[i]});return o.forEach(t=>a.observe(t)),()=>a.disconnect()}function Co(...t){const e=!Array.isArray(t[0]),n=e?0:-1,s=t[0+n],i=t[1+n],o=t[2+n],r=t[3+n],a=$n(i,o,{mixer:(l=o[0],(t=>"object"==typeof t&&t.mix)(l)?l.mix:void 0),...r});var l;return e?a(s):a}const Ao=(t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t},Vo=["","X","Y","Z"];let Mo=0;const Lo={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function Do({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(t,n={},s=(null==e?void 0:e())){this.id=Mo++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{var t;Lo.totalNodes=Lo.resolvedTargetDeltas=Lo.recalculatedProjection=0,this.nodes.forEach(Bo),this.nodes.forEach(No),this.nodes.forEach(zo),this.nodes.forEach(jo),t=Lo,window.MotionDebug&&window.MotionDebug.record(t)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=t,this.latestValues=n,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0,t&&this.root.registerPotentialNode(t,this);for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new Ki)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new Me),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}registerPotentialNode(t,e){this.potentialNodes.set(t,e)}mount(e,n=!1){if(this.instance)return;this.isSVG=e instanceof SVGElement&&"svg"!==e.tagName,this.instance=e;const{layoutId:s,layout:i,visualElement:o}=this.options;if(o&&!o.current&&o.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.elementId&&this.root.potentialNodes.delete(this.elementId),n&&(i||s)&&(this.isLayoutDirty=!0),t){let n;const s=()=>this.root.updateBlockedByResize=!1;t(e,()=>{this.root.updateBlockedByResize=!0,n&&n(),n=Ji(s,250),T.hasAnimatedSinceResize&&(T.hasAnimatedSinceResize=!1,this.nodes.forEach(Uo))})}s&&this.root.registerSharedNode(s,this),!1!==this.options.animate&&o&&(s||i)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeTargetChanged:n,layout:s})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const i=this.options.transition||o.getDefaultTransition()||Go,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=o.getProps(),l=!this.targetLayout||!Xi(this.targetLayout,s)||n,c=!e&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||c||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(t,c);const e={...bs(i,"layout"),onPlay:r,onComplete:a};(o.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e)}else e||0!==this.animationProgress||Uo(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=s})}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=void 0,ce.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Wo),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const s=this.getTransformTemplate();this.prevTransformTemplateValue=s?s(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}didUpdate(){if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(Oo);this.isUpdating&&(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(qo),this.potentialNodes.clear()),this.nodes.forEach(Io),this.nodes.forEach(Ro),this.nodes.forEach(ko),this.clearAllSnapshots(),ue.update(),ue.preRender(),ue.render())}clearAllSnapshots(){this.nodes.forEach(Fo),this.sharedNodes.forEach($o)}scheduleUpdateProjection(){le.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){le.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++){this.path[t].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=Boolean(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&(this.scroll={animationId:this.root.animationId,phase:t,isRoot:s(this.instance),offset:n(this.instance)})}resetTransform(){if(!i)return;const t=this.isLayoutDirty||this.shouldResetTransform,e=this.projectionDelta&&!Yi(this.projectionDelta),n=this.getTransformTemplate(),s=n?n(this.latestValues,""):void 0,o=s!==this.prevTransformTemplateValue;t&&(e||ci(this.latestValues)||o)&&(i(this.instance,s),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);var s;return t&&(n=this.removeTransform(n)),Zo((s=n).x),Zo(s.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const e=t.measureViewportBox(),{scroll:n}=this.root;return n&&(yi(e.x,n.offset.x),yi(e.y,n.offset.y)),e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};Ii(e,t);for(let n=0;n<this.path.length;n++){const s=this.path[n],{scroll:i,options:o}=s;if(s!==this.root&&i&&o.layoutScroll){if(i.isRoot){Ii(e,t);const{scroll:n}=this.root;n&&(yi(e.x,-n.offset.x),yi(e.y,-n.offset.y))}yi(e.x,i.offset.x),yi(e.y,i.offset.y)}}return e}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};Ii(n,t);for(let t=0;t<this.path.length;t++){const s=this.path[t];!e&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Ei(n,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),ci(s.latestValues)&&Ei(n,s.latestValues)}return ci(this.latestValues)&&Ei(n,this.latestValues),n}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};Ii(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!n.instance)continue;if(!ci(n.latestValues))continue;li(n.latestValues)&&n.updateSnapshot();const s={x:{min:0,max:0},y:{min:0,max:0}};Ii(s,n.measurePageBox()),$i(e,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,s)}return ci(this.latestValues)&&$i(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}resolveTargetDelta(t=!1){var e;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;if(!(t||s&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty)||this.attemptToResolveRelativeTarget))return;const{layout:i,layoutId:o}=this.options;if(this.layout&&(i||o)){if(this.resolvedRelativeTargetAt=se.timestamp,!this.targetDelta&&!this.relativeTarget){const t=this.getClosestProjectingParent();t&&t.layout?(this.relativeParent=t,this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Js(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),Ii(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var r,a,l;if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.relativeParent.resolvedRelativeTargetAt!==se.timestamp&&this.relativeParent.resolveTargetDelta(!0),r=this.target,a=this.relativeTarget,l=this.relativeParent.target,_s(r.x,a.x,l.x),_s(r.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Ii(this.target,this.layout.layoutBox),fi(this.target,this.targetDelta)):Ii(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const t=this.getClosestProjectingParent();t&&Boolean(t.resumingFrom)===Boolean(this.resumingFrom)&&!t.options.layoutScroll&&t.target?(this.relativeParent=t,this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Js(this.relativeTargetOrigin,this.target,t.target),Ii(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Lo.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!li(this.parent.latestValues)&&!ui(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var t;const e=this.getLead(),n=Boolean(this.resumingFrom)||this!==e;let s=!0;if((this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty))&&(s=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(s=!1),this.resolvedRelativeTargetAt===se.timestamp&&(s=!1),s)return;const{layout:i,layoutId:o}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!i&&!o)return;Ii(this.layoutCorrected,this.layout.layoutBox),function(t,e,n,s=!1){const i=n.length;if(!i)return;let o,r;e.x=e.y=1;for(let a=0;a<i;a++){o=n[a],r=o.projectionDelta;const i=o.instance;i&&i.style&&"contents"===i.style.display||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Ei(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,fi(t,r)),s&&ci(o.latestValues)&&Ei(t,o.latestValues))}e.x=gi(e.x),e.y=gi(e.y)}(this.layoutCorrected,this.treeScale,this.path,n);const{target:r}=e;if(!r)return;this.projectionDelta||(this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}});const a=this.treeScale.x,l=this.treeScale.y,c=this.projectionTransform;Zs(this.projectionDelta,this.layoutCorrected,r,this.latestValues),this.projectionTransform=Zi(this.projectionDelta,this.treeScale),this.projectionTransform===c&&this.treeScale.x===a&&this.treeScale.y===l||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",r)),Lo.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(t,e=!1){const n=this.snapshot,s=n?n.latestValues:{},i={...this.latestValues},o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const r={x:{min:0,max:0},y:{min:0,max:0}},a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,u=Boolean(a&&!c&&!0===this.options.crossfade&&!this.path.some(Xo));let h;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var l,d,p,m;Ho(o.x,t.x,n),Ho(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Js(r,this.layout.layoutBox,this.relativeParent.layout.layoutBox),l=this.relativeTarget,d=this.relativeTargetOrigin,p=r,m=n,Yo(l.x,d.x,p.x,m),Yo(l.y,d.y,p.y,m),h&&Xi(this.relativeTarget,h)&&(this.isProjectionDirty=!1),h||(h={x:{min:0,max:0},y:{min:0,max:0}}),Ii(h,this.relativeTarget)),a&&(this.animationValues=i,function(t,e,n,s,i,o){i?(t.opacity=Ln(0,void 0!==n.opacity?n.opacity:1,Bi(s)),t.opacityExit=Ln(void 0!==e.opacity?e.opacity:1,0,ji(s))):o&&(t.opacity=Ln(void 0!==e.opacity?e.opacity:1,void 0!==n.opacity?n.opacity:1,s));for(let i=0;i<Li;i++){const o=`border${Mi[i]}Radius`;let r=ki(e,o),a=ki(n,o);if(void 0===r&&void 0===a)continue;r||(r=0),a||(a=0);0===r||0===a||Ri(r)===Ri(a)?(t[o]=Math.max(Ln(Di(r),Di(a),s),0),(ot.test(a)||ot.test(r))&&(t[o]+="%")):t[o]=a}(e.rotate||n.rotate)&&(t.rotate=Ln(e.rotate||0,n.rotate||0,s))}(i,s,this.latestValues,n,u,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(ce.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=le.update(()=>{T.hasAnimatedSinceResize=!0,this.currentAnimation=Vi(0,1e3,{...t,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onComplete:()=>{t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:s,latestValues:i}=t;if(e&&n&&s){if(this!==t&&this.layout&&s&&_o(this.options.animationType,this.layout.layoutBox,s.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=Xs(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const s=Xs(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+s}Ii(e,n),Ei(e,i),Zs(this.projectionDeltaWithTransform,this.layoutCorrected,e,i)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new qi);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){var t;const{layoutId:e}=this.options;return e&&(null===(t=this.getStack())||void 0===t?void 0:t.lead)||this}getPrevLead(){var t;const{layoutId:e}=this.options;return e?null===(t=this.getStack())||void 0===t?void 0:t.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const s=this.getStack();s&&s.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.rotate||n.rotateX||n.rotateY||n.rotateZ)&&(e=!0),!e)return;const s={};for(let e=0;e<Vo.length;e++){const i="rotate"+Vo[e];n[i]&&(s[i]=n[i],t.setStaticValue(i,0))}t.render();for(const e in s)t.setStaticValue(e,s[e]);t.scheduleRender()}getProjectionStyles(t={}){var e,n;const s={};if(!this.instance||this.isSVG)return s;if(!this.isVisible)return{visibility:"hidden"};s.visibility="";const i=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,s.opacity="",s.pointerEvents=It(t.pointerEvents)||"",s.transform=i?i(this.latestValues,""):"none",s;const o=this.getLead();if(!this.projectionDelta||!this.layout||!o.target){const e={};return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=It(t.pointerEvents)||""),this.hasProjected&&!ci(this.latestValues)&&(e.transform=i?i({},""):"none",this.hasProjected=!1),e}const r=o.animationValues||o.latestValues;this.applyTransformsToTarget(),s.transform=Zi(this.projectionDeltaWithTransform,this.treeScale,r),i&&(s.transform=i(r,s.transform));const{x:a,y:l}=this.projectionDelta;s.transformOrigin=`${100*a.origin}% ${100*l.origin}% 0`,o.animationValues?s.opacity=o===this?null!==(n=null!==(e=r.opacity)&&void 0!==e?e:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:r.opacityExit:s.opacity=o===this?void 0!==r.opacity?r.opacity:"":void 0!==r.opacityExit?r.opacityExit:0;for(const t in j){if(void 0===r[t])continue;const{correct:e,applyTo:n}=j[t],i="none"===s.transform?r[t]:e(r[t],o);if(n){const t=n.length;for(let e=0;e<t;e++)s[n[e]]=i}else s[t]=i}return this.options.layoutId&&(s.pointerEvents=o===this?It(t.pointerEvents)||"":"none"),s}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>{var e;return null===(e=t.currentAnimation)||void 0===e?void 0:e.stop()}),this.root.nodes.forEach(Oo),this.root.sharedNodes.clear()}}}function Ro(t){t.updateLayout()}function ko(t){var e;const n=(null===(e=t.resumeFrom)||void 0===e?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:e,measuredBox:s}=t.layout,{animationType:i}=t.options,o=n.source!==t.layout.source;"size"===i?oi(t=>{const s=o?n.measuredBox[t]:n.layoutBox[t],i=Xs(s);s.min=e[t].min,s.max=s.min+i}):_o(i,n.layoutBox,e)&&oi(t=>{const s=o?n.measuredBox[t]:n.layoutBox[t],i=Xs(e[t]);s.max=s.min+i});const r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Zs(r,e,n.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?Zs(a,t.applyTransform(s,!0),n.measuredBox):Zs(a,e,n.layoutBox);const l=!Yi(r);let c=!1;if(!t.resumeFrom){const s=t.getClosestProjectingParent();if(s&&!s.resumeFrom){const{snapshot:i,layout:o}=s;if(i&&o){const r={x:{min:0,max:0},y:{min:0,max:0}};Js(r,n.layoutBox,i.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};Js(a,e,o.layoutBox),Xi(r,a)||(c=!0),s.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=r,t.relativeParent=s)}}}t.notifyListeners("didUpdate",{layout:e,snapshot:n,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function Bo(t){Lo.totalNodes++,t.parent&&(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 jo(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Fo(t){t.clearSnapshot()}function Oo(t){t.clearMeasurements()}function Io(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Uo(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0}function No(t){t.resolveTargetDelta()}function zo(t){t.calcProjection()}function Wo(t){t.resetRotation()}function $o(t){t.removeLeadSnapshot()}function Ho(t,e,n){t.translate=Ln(e.translate,0,n),t.scale=Ln(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Yo(t,e,n,s){t.min=Ln(e.min,n.min,s),t.max=Ln(e.max,n.max,s)}function Xo(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const Go={duration:.45,ease:[.4,0,.1,1]};function qo(t,e){let n=t.root;for(let e=t.path.length-1;e>=0;e--)if(Boolean(t.path[e].instance)){n=t.path[e];break}const s=(n&&n!==t.root?n.instance:document).querySelector(`[data-projection-id="${e}"]`);s&&t.mount(s,!0)}function Zo(t){t.min=Math.round(t.min),t.max=Math.round(t.max)}function _o(t,e,n){return"position"===t||"preserve-aspect"===t&&!Gs(Gi(e),Gi(n),.2)}const Ko=Do({attachResizeListener:(t,e)=>Ht(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Jo={current:void 0},Qo=Do({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Jo.current){const t=new Ko(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),Jo.current=t}return Jo.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),tr=t=>!t.isLayoutDirty&&t.willUpdate(!1);function er(){const t=new Set,e=new WeakMap,n=()=>t.forEach(tr);return{add:s=>{t.add(s),e.set(s,s.addEventListener("willUpdate",n))},remove:s=>{t.delete(s);const i=e.get(s);i&&(i(),e.delete(s)),n()},dirty:n}}function nr(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const sr={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!rt.test(t))return t;t=parseFloat(t)}return`${nr(t,e.target.x)}% ${nr(t,e.target.y)}%`}},ir=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function or(t,e,n=1){mn(n<=4);const[s,i]=function(t){const e=ir.exec(t);if(!e)return[,];const[,n,s]=e;return[n,s]}(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);return o?o.trim():X(i)?or(i,e,n+1):i}const rr={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=t.includes("var("),o=[];i&&(t=t.replace(ir,t=>(o.push(t),"_$css")));const r=He.parse(t);if(r.length>5)return s;const a=He.createTransformer(t),l="number"!=typeof r[0]?1:0,c=n.x.scale*e.x,u=n.y.scale*e.y;r[0+l]/=c,r[1+l]/=u;const h=Ln(c,u,.5);"number"==typeof r[2+l]&&(r[2+l]/=h),"number"==typeof r[3+l]&&(r[3+l]/=h);let d=a(r);if(i){let t=0;d=d.replace("_$css",()=>{const e=o[t];return t++,e})}return d}},ar=new Set(["width","height","top","left","right","bottom","x","y"]),lr=t=>ar.has(t),cr=t=>t===Z||t===rt,ur=(t,e)=>parseFloat(t.split(", ")[e]),hr=(t,e)=>(n,{transform:s})=>{if("none"===s||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/);if(i)return ur(i[1],e);{const e=s.match(/^matrix\((.+)\)$/);return e?ur(e[1],t):0}},dr=new Set(["x","y","z"]),pr=O.filter(t=>!dr.has(t));const mr={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:hr(4,13),y:hr(5,14)},fr=(t,e,n={},s={})=>{e={...e},s={...s};const i=Object.keys(e).filter(lr);let o=[],r=!1;const a=[];if(i.forEach(i=>{const l=t.getValue(i);if(!t.hasValue(i))return;let c=n[i],u=tn(c);const h=e[i];let d;if(Ot(h)){const t=h.length,e=null===h[0]?1:0;c=h[e],u=tn(c);for(let n=e;n<t;n++)d?mn(tn(h[n])===d):(d=tn(h[n]),mn(d===u||cr(u)&&cr(d)))}else d=tn(h);if(u!==d)if(cr(u)&&cr(d)){const t=l.get();"string"==typeof t&&l.set(parseFloat(t)),"string"==typeof h?e[i]=parseFloat(h):Array.isArray(h)&&d===rt&&(e[i]=h.map(parseFloat))}else(null==u?void 0:u.transform)&&(null==d?void 0:d.transform)&&(0===c||0===h)?0===c?l.set(d.transform(c)):e[i]=u.transform(h):(r||(o=function(t){const e=[];return pr.forEach(n=>{const s=t.getValue(n);void 0!==s&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e.length&&t.render(),e}(t),r=!0),a.push(i),s[i]=void 0!==s[i]?s[i]:e[i],l.jump(h))}),a.length){const n=a.indexOf("height")>=0?window.pageYOffset:null,i=((t,e,n)=>{const s=e.measureViewportBox(),i=e.current,o=getComputedStyle(i),{display:r}=o,a={};"none"===r&&e.setStaticValue("display",t.display||"block"),n.forEach(t=>{a[t]=mr[t](s,o)}),e.render();const l=e.measureViewportBox();return n.forEach(n=>{const s=e.getValue(n);s&&s.jump(a[n]),t[n]=mr[n](l,o)}),t})(e,t,a);return o.length&&o.forEach(([e,n])=>{t.getValue(e).set(n)}),t.render(),c&&null!==n&&window.scrollTo({top:n}),{target:i,transitionEnd:s}}return{target:e,transitionEnd:s}};function gr(t,e,n,s){return(t=>Object.keys(t).some(lr))(e)?fr(t,e,n,s):{target:e,transitionEnd:s}}const yr=(t,e,n,s)=>{const i=function(t,{...e},n){const s=t.current;if(!(s instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.values.forEach(t=>{const e=t.get();if(!X(e))return;const n=or(e,s);n&&t.set(n)});for(const t in e){const i=e[t];if(!X(i))continue;const o=or(i,s);o&&(e[t]=o,n||(n={}),void 0===n[t]&&(n[t]=i))}return{target:e,transitionEnd:n}}(t,e,s);return gr(t,e=i.target,n,s=i.transitionEnd)},vr={current:null},xr={current:!1};function Pr(){if(xr.current=!0,c)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>vr.current=t.matches;t.addListener(e),e()}else vr.current=!1}const Er=Object.keys(w),wr=Er.length,br=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Sr=g.length;class Tr{constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:s,visualState:i},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>le.render(this.render,!1,!0);const{latestValues:r,renderState:a}=i;this.latestValues=r,this.baseTarget={...r},this.initialValues=e.initial?{...r}:{},this.renderState=a,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=o,this.isControllingVariants=y(e),this.isVariantNode=v(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:l,...c}=this.scrapeMotionValuesFromProps(e,{});for(const t in c){const e=c[t];void 0!==r[t]&&N(e)&&(e.set(r[t],!1),hn(l)&&l.add(t))}}scrapeMotionValuesFromProps(t,e){return{}}mount(t){this.current=t,this.projection&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),xr.current||Pr(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||vr.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),ce.update(this.notifyUpdate),ce.render(this.render),this.valueSubscriptions.forEach(t=>t()),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)this.features[t].unmount();this.current=null}bindToMotionValue(t,e){const n=I.has(t),s=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&le.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=e.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{s(),i()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}loadFeatures({children:t,...e},n,s,i,o){let r,a;for(let t=0;t<wr;t++){const n=Er[t],{isEnabled:s,Feature:i,ProjectionNode:o,MeasureLayout:l}=w[n];o&&(r=o),s(e)&&(!this.features[n]&&i&&(this.features[n]=new i(this)),l&&(a=l))}if(!this.projection&&r){this.projection=new r(i,this.latestValues,this.parent&&this.parent.projection);const{layoutId:t,layout:n,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:c}=e;this.projection.setOptions({layoutId:t,layout:n,alwaysMeasureLayout:Boolean(s)||a&&d(a),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:o,layoutScroll:l,layoutRoot:c})}return a}updateFeatures(){for(const t in this.features){const e=this.features[t];e.isMounted?e.update(this.props,this.prevProps):(e.mount(),e.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}makeTargetAnimatable(t,e=!0){return this.makeTargetAnimatableFromInstance(t,this.props,e)}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<br.length;e++){const n=br[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const s=t["on"+n];s&&(this.propEventSubscriptions[n]=this.on(n,s))}this.prevMotionValues=function(t,e,n){const{willChange:s}=e;for(const i in e){const o=e[i],r=n[i];if(N(o))t.addValue(i,o),hn(s)&&s.add(i);else if(N(r))t.addValue(i,Re(o,{owner:t})),hn(s)&&s.remove(i);else if(r!==o)if(t.hasValue(i)){const e=t.getValue(i);!e.hasAnimated&&e.set(o)}else{const e=t.getStaticValue(i);t.addValue(i,Re(void 0!==e?e:o,{owner:t}))}}for(const s in n)void 0===e[s]&&t.removeValue(s);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const t=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(t.initial=this.props.initial),t}const e={};for(let t=0;t<Sr;t++){const n=g[t],s=this.props[n];(p(s)||!1===s)&&(e[n]=s)}return e}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){e!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,e)),this.values.set(t,e),this.latestValues[t]=e.get()}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=Re(e,{owner:this}),this.addValue(t,n)),n}readValue(t){return void 0===this.latestValues[t]&&this.current?this.readValueFromInstance(this.current,t,this.options):this.latestValues[t]}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props,s="string"==typeof n||"object"==typeof n?null===(e=Ft(this.props,n))||void 0===e?void 0:e[t]:void 0;if(n&&void 0!==s)return s;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||N(i)?void 0!==this.initialValues[t]&&void 0===s?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new Me),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class Cr extends Tr{sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:e,...n},{transformValues:s},i){let o=un(n,t||{},this);if(s&&(e&&(e=s(e)),n&&(n=s(n)),o&&(o=s(o))),i){ln(this,n,o);const t=yr(this,n,o,e);e=t.transitionEnd,n=t.target}return{transition:t,transitionEnd:e,...n}}}class Ar extends Cr{readValueFromInstance(t,e){if(I.has(e)){const t=_e(e);return t&&t.default||0}{const s=(n=t,window.getComputedStyle(n)),i=(Y(e)?s.getPropertyValue(e):s[e])||0;return"string"==typeof i?i.trim():i}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return wi(t,e)}build(t,e,n,s){dt(t,e,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,e){return Bt(t,e)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;N(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=""+t)}))}renderInstance(t,e,n,s){Dt(t,e,n,s)}}function Vr(){const t=e.useContext(l);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=t,o=e.useId();e.useEffect(()=>i(o),[]);return!n&&s?[!1,()=>s&&s(o)]:[!0]}class Mr extends o.default.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:s}=this.props,{projection:i}=t;F(Dr),i&&(e.group&&e.group.add(i),n&&n.register&&s&&n.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),T.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:s,isPresent:i}=this.props,o=n.projection;return o?(o.isPresent=i,s||t.layoutDependency!==e||void 0===e?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||le.postRender(()=>{const t=o.getStack();t&&t.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:s}=t;s&&(s.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(s),n&&n.deregister&&n.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Lr(t){const[n,s]=Vr(),i=e.useContext(A);return o.default.createElement(Mr,{...t,layoutGroup:i,switchLayoutGroup:e.useContext(V),isPresent:n,safeToRemove:s})}const Dr={borderRadius:{...sr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:sr,borderTopRightRadius:sr,borderBottomLeftRadius:sr,borderBottomRightRadius:sr,boxShadow:rr},Rr={pan:{Feature:class extends ne{constructor(){super(...arguments),this.removePointerDownListener=ge}onPointerDown(t){this.session=new Us(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:s}=this.node.getProps();return{onSessionStart:Ci(t),onStart:Ci(e),onMove:n,onEnd:(t,e)=>{delete this.session,s&&le.update(()=>s(t,e))}}}mount(){this.removePointerDownListener=qt(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends ne{constructor(t){super(t),this.removeGroupControls=ge,this.removeListeners=ge,this.controls=new Si(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ge}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Qo,MeasureLayout:Lr}};class kr extends Cr{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(I.has(e)){const t=_e(e);return t&&t.default||0}return e=Rt.has(e)?e:Lt(e),t.getAttribute(e)}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}scrapeMotionValuesFromProps(t,e){return jt(t,e)}build(t,e,n,s){Tt(t,e,n,this.isSVGTag,s.transformTemplate)}renderInstance(t,e,n,s){kt(t,e,0,s)}mount(t){this.isSVGTag=At(t.tagName),super.mount(t)}}const Br=(t,e)=>B(t)?new kr(e,{enableHardwareAcceleration:!1}):new Ar(e,{enableHardwareAcceleration:!0}),jr={layout:{ProjectionNode:Qo,MeasureLayout:Lr}},Fr={...Fs,...Se,...Rr,...jr},Or=R((t,e)=>$t(t,e,Fr,Br));const Ir=R($t);function Ur(){const t=e.useRef(!1);return u(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function Nr(){const t=Ur(),[n,s]=e.useState(0),i=e.useCallback(()=>{t.current&&s(n+1)},[n]);return[e.useCallback(()=>le.postRender(i),[i]),n]}class zr extends i.Component{getSnapshotBeforeUpdate(t){const e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent){const t=this.props.sizeRef.current;t.height=e.offsetHeight||0,t.width=e.offsetWidth||0,t.top=e.offsetTop,t.left=e.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Wr({children:t,isPresent:n}){const s=e.useId(),o=e.useRef(null),r=e.useRef({width:0,height:0,top:0,left:0});return e.useInsertionEffect(()=>{const{width:t,height:e,top:i,left:a}=r.current;if(n||!o.current||!t||!e)return;o.current.dataset.motionPopId=s;const l=document.createElement("style");return document.head.appendChild(l),l.sheet&&l.sheet.insertRule(`\n [data-motion-pop-id="${s}"] {\n position: absolute !important;\n width: ${t}px !important;\n height: ${e}px !important;\n top: ${i}px !important;\n left: ${a}px !important;\n }\n `),()=>{document.head.removeChild(l)}},[n]),i.createElement(zr,{isPresent:n,childRef:o,sizeRef:r},i.cloneElement(t,{ref:o}))}const $r=({children:t,initial:n,isPresent:s,onExitComplete:o,custom:r,presenceAffectsLayout:a,mode:c})=>{const u=S(Hr),h=e.useId(),d=e.useMemo(()=>({id:h,initial:n,isPresent:s,custom:r,onExitComplete:t=>{u.set(t,!0);for(const t of u.values())if(!t)return;o&&o()},register:t=>(u.set(t,!1),()=>u.delete(t))}),a?void 0:[s]);return e.useMemo(()=>{u.forEach((t,e)=>u.set(e,!1))},[s]),i.useEffect(()=>{!s&&!u.size&&o&&o()},[s]),"popLayout"===c&&(t=i.createElement(Wr,{isPresent:s},t)),i.createElement(l.Provider,{value:d},t)};function Hr(){return new Map}function Yr(t){return e.useEffect(()=>()=>t(),[])}const Xr=t=>t.key||"";function Gr(t){return"function"==typeof t}const qr=e.createContext(null),Zr=t=>!0===t,_r=({children:t,id:n,inherit:s=!0})=>{const o=e.useContext(A),r=e.useContext(qr),[a,l]=Nr(),c=e.useRef(null),u=o.id||r;null===c.current&&((t=>Zr(!0===t)||"id"===t)(s)&&u&&(n=n?u+"-"+n:u),c.current={id:n,group:Zr(s)&&o.group||er()});const h=e.useMemo(()=>({...c.current,forceRender:a}),[l]);return i.createElement(A.Provider,{value:h},t)},Kr=e.createContext(null);function Jr(t){return t.value}function Qr(t,e){return t.layout.min-e.layout.min}function ta(t){const n=S(()=>Re(t)),{isStatic:s}=e.useContext(r);if(s){const[,s]=e.useState(t);e.useEffect(()=>n.on("change",s),[])}return n}function ea(t,e){const n=ta(e()),s=()=>n.set(e());return s(),u(()=>{const e=()=>le.update(s,!1,!0),n=t.map(t=>t.on("change",e));return()=>{n.forEach(t=>t()),ce.update(s)}}),n}function na(t,e,n,s){const i="function"==typeof e?e:Co(e,n,s);return Array.isArray(t)?sa(t,i):sa([t],([t])=>i(t))}function sa(t,e){const n=S(()=>[]);return ea(t,()=>{n.length=0;const s=t.length;for(let e=0;e<s;e++)n[e]=t[e].get();return e(n)})}function ia(t,e=0){return N(t)?t:ta(e)}const oa={Group:e.forwardRef((function({children:t,as:n="ul",axis:s="y",onReorder:o,values:r,...a},l){const c=S(()=>Or(n)),u=[],h=e.useRef(!1);mn(Boolean(r));const d={axis:s,registerItem:(t,e)=>{e&&-1===u.findIndex(e=>t===e.value)&&(u.push({value:t,layout:e[s]}),u.sort(Qr))},updateOrder:(t,e,n)=>{if(h.current)return;const s=function(t,e,n,s){if(!s)return t;const i=t.findIndex(t=>t.value===e);if(-1===i)return t;const o=s>0?1:-1,r=t[i+o];if(!r)return t;const a=t[i],l=r.layout,c=Ln(l.min,l.max,.5);return 1===o&&a.layout.max+n>c||-1===o&&a.layout.min+n<c?function([...t],e,n){const s=e<0?t.length+e:e;if(s>=0&&s<t.length){const s=n<0?t.length+n:n,[i]=t.splice(e,1);t.splice(s,0,i)}return t}(t,i,i+o):t}(u,t,e,n);u!==s&&(h.current=!0,o(s.map(Jr).filter(t=>-1!==r.indexOf(t))))}};return e.useEffect(()=>{h.current=!1}),i.createElement(c,{...a,ref:l,ignoreStrict:!0},i.createElement(Kr.Provider,{value:d},t))})),Item:e.forwardRef((function({children:t,style:n={},value:s,as:o="li",onDrag:r,layout:a=!0,...l},c){const u=S(()=>Or(o)),h=e.useContext(Kr),d={x:ia(n.x),y:ia(n.y)},p=na([d.x,d.y],([t,e])=>t||e?1:"unset"),m=e.useRef(null);mn(Boolean(h));const{axis:f,registerItem:g,updateOrder:y}=h;return e.useEffect(()=>{g(s,m.current)},[h]),i.createElement(u,{drag:f,...l,dragSnapToOrigin:!0,style:{...n,x:d.x,y:d.y,zIndex:p},layout:a,onDrag:(t,e)=>{const{velocity:n}=e;n[f]&&y(s,d[f].get(),n[f]),r&&r(t,e)},onLayoutMeasure:t=>{m.current=t},ref:c,ignoreStrict:!0},t)}))},ra={renderer:Br,...Fs,...Se},aa={...ra,...Rr,...jr};function la(t,n,s){e.useInsertionEffect(()=>t.on(n,s),[t,n,s])}function ca(t,e){pn(Boolean(!e||e.current))}const ua=()=>({scrollX:Re(0),scrollY:Re(0),scrollXProgress:Re(0),scrollYProgress:Re(0)});function ha({container:t,target:n,layoutEffect:s=!0,...i}={}){const o=S(ua);return(s?u:e.useEffect)(()=>(ca(0,n),ca(0,t),bo(({x:t,y:e})=>{o.scrollX.set(t.current),o.scrollXProgress.set(t.progress),o.scrollY.set(e.current),o.scrollYProgress.set(e.progress)},{...i,container:(null==t?void 0:t.current)||void 0,target:(null==n?void 0:n.current)||void 0})),[]),o}function da(t){const n=e.useRef(0),{isStatic:s}=e.useContext(r);e.useEffect(()=>{if(s)return;const e=({timestamp:e,delta:s})=>{n.current||(n.current=e),t(e-n.current,s)};return le.update(e,!0),()=>ce.update(e)},[t])}class pa extends De{constructor(){super(...arguments),this.members=[],this.transforms=new Set}add(t){let e;I.has(t)?(this.transforms.add(t),e="transform"):t.startsWith("origin")||Y(t)||"willChange"===t||(e=Lt(t)),e&&(Ae(this.members,e),this.update())}remove(t){I.has(t)?(this.transforms.delete(t),this.transforms.size||Ve(this.members,"transform")):Ve(this.members,Lt(t)),this.update()}update(){this.set(this.members.length?this.members.join(", "):"auto")}}function ma(){!xr.current&&Pr();const[t]=e.useState(vr.current);return t}function fa(){let t=!1;const e=new Set,n={subscribe:t=>(e.add(t),()=>{e.delete(t)}),start(n,s){mn(t);const i=[];return e.forEach(t=>{i.push(Ts(t,n,{transitionOverride:s}))}),Promise.all(i)},set:n=>(mn(t),e.forEach(t=>{!function(t,e){Array.isArray(e)?an(t,e):"string"==typeof e?an(t,[e]):rn(t,e)}(t,n)})),stop(){e.forEach(t=>{!function(t){t.values.forEach(t=>t.stop())}(t)})},mount:()=>(t=!0,()=>{t=!1,n.stop()})};return n}function ga(){const t=S(fa);return u(t.mount,[]),t}const ya=ga;class va{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,e){this.componentControls.forEach(n=>{n.start(t.nativeEvent||t,e)})}}const xa=()=>new va;function Pa(t){return null!==t&&"object"==typeof t&&M in t}function Ea(){return wa}function wa(t){Jo.current&&(Jo.current.isUpdating=!1,Jo.current.blockUpdate(),t&&t())}const ba=(t,e)=>`${t}: ${e}`,Sa=new Map;function Ta(t,e,n,s){const i=ba(t,I.has(e)?"transform":e),o=Sa.get(i);if(!o)return 0;const{animation:r,startTime:a}=o,l=()=>{Sa.delete(i);try{r.cancel()}catch(t){}};if(null!==a){const t=performance.now();return s.update(()=>{n.animation&&(n.animation.time=performance.now()-gn(t))}),s.render(l),t-a||0}return l(),0}const Ca=()=>({});class Aa extends Tr{build(){}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}resetTransform(){}restoreTransform(){}removeValueFromRenderState(){}renderInstance(){}scrapeMotionValuesFromProps(){return{}}getBaseTargetFromProps(){}readValueFromInstance(t,e,n){return n.initialState[e]||0}sortInstanceNodePosition(){return 0}makeTargetAnimatableFromInstance({transition:t,transitionEnd:e,...n}){return ln(this,n,un(n,t||{},this)),{transition:t,transitionEnd:e,...n}}}const Va=Ut({scrapeMotionValuesFromProps:Ca,createRenderState:Ca});const Ma=t=>t>.001?1/t:1e5;let La=!1;let Da=0;t.AnimatePresence=({children:t,custom:n,initial:s=!0,onExitComplete:o,exitBeforeEnter:r,presenceAffectsLayout:a=!0,mode:l="sync"})=>{mn(!r);let[c]=Nr();const h=e.useContext(A).forceRender;h&&(c=h);const d=Ur(),p=function(t){const n=[];return e.Children.forEach(t,t=>{e.isValidElement(t)&&n.push(t)}),n}(t);let m=p;const f=new Set,g=e.useRef(m),y=e.useRef(new Map).current,v=e.useRef(!0);if(u(()=>{v.current=!1,function(t,e){t.forEach(t=>{const n=Xr(t);e.set(n,t)})}(p,y),g.current=m}),Yr(()=>{v.current=!0,y.clear(),f.clear()}),v.current)return i.createElement(i.Fragment,null,m.map(t=>i.createElement($r,{key:Xr(t),isPresent:!0,initial:!!s&&void 0,presenceAffectsLayout:a,mode:l},t)));m=[...m];const x=g.current.map(Xr),P=p.map(Xr),E=x.length;for(let t=0;t<E;t++){const e=x[t];-1===P.indexOf(e)&&f.add(e)}return"wait"===l&&f.size&&(m=[]),f.forEach(t=>{if(-1!==P.indexOf(t))return;const e=y.get(t);if(!e)return;const s=x.indexOf(t);m.splice(s,0,i.createElement($r,{key:Xr(e),isPresent:!1,onExitComplete:()=>{y.delete(t),f.delete(t);const e=g.current.findIndex(e=>e.key===t);if(g.current.splice(e,1),!f.size){if(g.current=p,!1===d.current)return;c(),o&&o()}},custom:n,presenceAffectsLayout:a,mode:l},e))}),m=m.map(t=>{const e=t.key;return f.has(e)?t:i.createElement($r,{key:Xr(t),isPresent:!0,presenceAffectsLayout:a,mode:l},t)}),i.createElement(i.Fragment,null,f.size?m:m.map(t=>e.cloneElement(t)))},t.AnimateSharedLayout=({children:t})=>(i.useEffect(()=>{mn(!1)},[]),i.createElement(_r,{id:S(()=>"asl-"+Da++)},t)),t.DeprecatedLayoutGroupContext=qr,t.DragControls=va,t.FlatTree=Ki,t.LayoutGroup=_r,t.LayoutGroupContext=A,t.LazyMotion=function({children:t,features:n,strict:s=!1}){const[,o]=e.useState(!Gr(n)),r=e.useRef(void 0);if(!Gr(n)){const{renderer:t,...e}=n;r.current=t,b(e)}return e.useEffect(()=>{Gr(n)&&n().then(({renderer:t,...e})=>{b(e),r.current=t,o(!0)})},[]),i.createElement(h.Provider,{value:{renderer:r.current,strict:s}},t)},t.MotionConfig=function({children:t,isValidProp:n,...s}){n&&Pt(n),(s={...e.useContext(r),...s}).isStatic=S(()=>s.isStatic);const o=e.useMemo(()=>s,[JSON.stringify(s.transition),s.transformPagePoint,s.reducedMotion]);return i.createElement(r.Provider,{value:o},t)},t.MotionConfigContext=r,t.MotionContext=a,t.MotionValue=De,t.PresenceContext=l,t.Reorder=oa,t.SwitchLayoutGroupContext=V,t.VisualElement=Tr,t.addPointerEvent=qt,t.addPointerInfo=Gt,t.addScaleCorrector=F,t.animate=Vi,t.animateValue=ps,t.animateVisualElement=Ts,t.animationControls=fa,t.animations=Fs,t.anticipate=Qn,t.backIn=Kn,t.backInOut=Jn,t.backOut=_n,t.buildTransform=$,t.calcLength=Xs,t.checkTargetForNewValues=ln,t.circIn=Gn,t.circInOut=Zn,t.circOut=qn,t.clamp=q,t.color=Ue,t.complex=He,t.createBox=ii,t.createDomMotionComponent=function(t){return L($t(t,{forwardMotionProps:!1},Fr,Br))},t.createMotionComponent=L,t.cubicBezier=Xn,t.delay=Ji,t.distance=Os,t.distance2D=Is,t.domAnimation=ra,t.domMax=aa,t.easeIn=An,t.easeInOut=Mn,t.easeOut=Vn,t.filterProps=Et,t.frameData=se,t.inView=To,t.interpolate=$n,t.invariant=mn,t.isBrowser=c,t.isDragActive=ee,t.isMotionComponent=Pa,t.isMotionValue=N,t.isValidMotionProp=vt,t.m=Ir,t.makeUseVisualState=Ut,t.mix=Ln,t.motion=Or,t.motionValue=Re,t.optimizedAppearDataAttribute=dn,t.pipe=_t,t.progress=Nn,t.px=rt,t.resolveMotionValue=It,t.scroll=bo,t.spring=cs,t.startOptimizedAppearAnimation=function(t,e,n,s,i){const o=t.dataset.framerAppearId;if(!o)return;window.HandoffAppearAnimations=Ta;const r=ba(o,e),a=En(t,e,[n[0],n[0]],{duration:1e4,ease:"linear"});Sa.set(r,{animation:a,startTime:null});const l=()=>{a.cancel();const o=En(t,e,n,s);document.timeline&&(o.startTime=document.timeline.currentTime),Sa.set(r,{animation:o,startTime:performance.now()}),i&&i(o)};a.ready?a.ready.then(l).catch(ge):l()},t.sync=le,t.transform=Co,t.unwrapMotionComponent=function(t){if(Pa(t))return t[M]},t.useAnimation=ya,t.useAnimationControls=ga,t.useAnimationFrame=da,t.useCycle=function(...t){const n=e.useRef(0),[s,i]=e.useState(t[n.current]);return[s,e.useCallback(e=>{n.current="number"!=typeof e?Ao(0,t.length,n.current+1):e,i(t[n.current])},[t.length,...t])]},t.useDeprecatedAnimatedState=function(t){const[n,s]=e.useState(t),i=Va({},!1),o=S(()=>new Aa({props:{},visualState:i,presenceContext:null},{initialState:t}));return e.useEffect(()=>(o.mount({}),()=>o.unmount()),[o]),e.useEffect(()=>{o.update({onUpdate:t=>{s({...t})}},null)},[s,o]),[n,S(()=>t=>Ts(o,t))]},t.useDeprecatedInvertedScale=function(t){let n=ta(1),s=ta(1);const{visualElement:i}=e.useContext(a);return mn(!(!t&&!i)),pn(La),La=!0,t?(n=t.scaleX||n,s=t.scaleY||s):i&&(n=i.getValue("scaleX",1),s=i.getValue("scaleY",1)),{scaleX:na(n,Ma),scaleY:na(s,Ma)}},t.useDomEvent=function(t,n,s,i){e.useEffect(()=>{const e=t.current;if(s&&e)return Ht(e,n,s,i)},[t,n,s,i])},t.useDragControls=function(){return S(xa)},t.useElementScroll=function(t){return ha({container:t})},t.useForceUpdate=Nr,t.useInView=function(t,{root:n,margin:s,amount:i,once:o=!1}={}){const[r,a]=e.useState(!1);return e.useEffect(()=>{if(!t.current||o&&r)return;const e={root:n&&n.current||void 0,margin:s,amount:"some"===i?"any":i};return To(t.current,()=>(a(!0),o?void 0:()=>a(!1)),e)},[n,t,s,o]),r},t.useInstantLayoutTransition=Ea,t.useInstantTransition=function(){const[t,n]=Nr(),s=Ea();return e.useEffect(()=>{le.postRender(()=>le.postRender(()=>yn.current=!1))},[n]),e=>{s(()=>{yn.current=!0,t(),e()})}},t.useIsPresent=function(){return null===(t=e.useContext(l))||t.isPresent;var t},t.useIsomorphicLayoutEffect=u,t.useMotionTemplate=function(t,...e){const n=t.length;return ea(e.filter(N),(function(){let s="";for(let i=0;i<n;i++){s+=t[i];const n=e[i];n&&(s+=N(n)?n.get():n)}return s}))},t.useMotionValue=ta,t.useMotionValueEvent=la,t.usePresence=Vr,t.useReducedMotion=ma,t.useReducedMotionConfig=function(){const t=ma(),{reducedMotion:n}=e.useContext(r);return"never"!==n&&("always"===n||t)},t.useResetProjection=function(){return i.useCallback(()=>{const t=Jo.current;t&&t.resetTree()},[])},t.useScroll=ha,t.useSpring=function(t,n={}){const{isStatic:s}=e.useContext(r),i=e.useRef(null),o=ta(N(t)?t.get():t),a=()=>{i.current&&i.current.stop()};return e.useInsertionEffect(()=>o.attach((t,e)=>s?e(t):(a(),i.current=ps({keyframes:[o.get(),t],velocity:o.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:e}),o.get()),a),[JSON.stringify(n)]),u(()=>{if(N(t))return t.on("change",t=>o.set(parseFloat(t)))},[o]),o},t.useTime=function(){const t=ta(0);return da(e=>t.set(e)),t},t.useTransform=na,t.useUnmountEffect=Yr,t.useVelocity=function(t){const e=ta(t.getVelocity());return la(t,"velocityChange",t=>{e.set(t)}),e},t.useViewportScroll=function(){return ha()},t.useWillChange=function(){return S(()=>new pa("auto"))},t.warning=pn,t.wrap=Ao,Object.defineProperty(t,"__esModule",{value:!0})}));
|
package/dist/projection.dev.js
CHANGED
|
@@ -2014,7 +2014,7 @@
|
|
|
2014
2014
|
* This will be replaced by the build step with the latest version number.
|
|
2015
2015
|
* When MotionValues are provided to motion components, warn if versions are mixed.
|
|
2016
2016
|
*/
|
|
2017
|
-
this.version = "10.3.
|
|
2017
|
+
this.version = "10.3.4";
|
|
2018
2018
|
/**
|
|
2019
2019
|
* Duration, in milliseconds, since last updating frame.
|
|
2020
2020
|
*
|
|
@@ -5274,7 +5274,7 @@
|
|
|
5274
5274
|
* and warn against mismatches.
|
|
5275
5275
|
*/
|
|
5276
5276
|
{
|
|
5277
|
-
warnOnce(nextValue.version === "10.3.
|
|
5277
|
+
warnOnce(nextValue.version === "10.3.4", `Attempting to mix Framer Motion versions ${nextValue.version} with 10.3.4 may not work as expected.`);
|
|
5278
5278
|
}
|
|
5279
5279
|
}
|
|
5280
5280
|
else if (isMotionValue(prevValue)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "framer-motion",
|
|
3
|
-
"version": "10.3.
|
|
3
|
+
"version": "10.3.4",
|
|
4
4
|
"description": "A simple and powerful React and JavaScript animation library",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/es/index.mjs",
|
|
@@ -116,5 +116,5 @@
|
|
|
116
116
|
"maxSize": "30.8 kB"
|
|
117
117
|
}
|
|
118
118
|
],
|
|
119
|
-
"gitHead": "
|
|
119
|
+
"gitHead": "1842a8041eb4a11c2bf0f1c817383b9152bd98d5"
|
|
120
120
|
}
|