framer-motion 10.2.0 → 10.2.2
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/dist/cjs/dom-entry.js +1 -1
- package/dist/cjs/index.js +14 -3
- package/dist/cjs/{wrap-752dc0be.js → wrap-b7ab39cb.js} +1 -1
- package/dist/es/components/LayoutGroup/index.mjs +3 -1
- package/dist/es/context/DeprecatedLayoutGroupContext.mjs +10 -0
- package/dist/es/index.mjs +1 -0
- package/dist/es/render/utils/motion-values.mjs +1 -1
- package/dist/es/value/index.mjs +1 -1
- package/dist/es/value/use-spring.mjs +2 -0
- package/dist/framer-motion.dev.js +14 -3
- package/dist/framer-motion.js +1 -1
- package/dist/index.d.ts +8 -1
- package/dist/projection.dev.js +2 -2
- package/package.json +2 -2
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-b7ab39cb.js');
|
|
7
7
|
|
|
8
8
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
9
9
|
|
|
@@ -5516,7 +5516,7 @@ function updateMotionValuesFromProps(element, next, prev) {
|
|
|
5516
5516
|
* and warn against mismatches.
|
|
5517
5517
|
*/
|
|
5518
5518
|
if (process.env.NODE_ENV === "development") {
|
|
5519
|
-
wrap.warnOnce(nextValue.version === "10.2.
|
|
5519
|
+
wrap.warnOnce(nextValue.version === "10.2.2", `Attempting to mix Framer Motion versions ${nextValue.version} with 10.2.2 may not work as expected.`);
|
|
5520
5520
|
}
|
|
5521
5521
|
}
|
|
5522
5522
|
else if (wrap.isMotionValue(prevValue)) {
|
|
@@ -6786,13 +6786,21 @@ function isLazyBundle(features) {
|
|
|
6786
6786
|
return typeof features === "function";
|
|
6787
6787
|
}
|
|
6788
6788
|
|
|
6789
|
+
/**
|
|
6790
|
+
* Note: Still used by components generated by old versions of Framer
|
|
6791
|
+
*
|
|
6792
|
+
* @deprecated
|
|
6793
|
+
*/
|
|
6794
|
+
const DeprecatedLayoutGroupContext = React.createContext(null);
|
|
6795
|
+
|
|
6789
6796
|
const shouldInheritGroup = (inherit) => inherit === true;
|
|
6790
6797
|
const shouldInheritId = (inherit) => shouldInheritGroup(inherit === true) || inherit === "id";
|
|
6791
6798
|
const LayoutGroup = ({ children, id, inherit = true }) => {
|
|
6792
6799
|
const layoutGroupContext = React.useContext(LayoutGroupContext);
|
|
6800
|
+
const deprecatedLayoutGroupContext = React.useContext(DeprecatedLayoutGroupContext);
|
|
6793
6801
|
const [forceRender, key] = useForceUpdate();
|
|
6794
6802
|
const context = React.useRef(null);
|
|
6795
|
-
const upstreamId = layoutGroupContext.id;
|
|
6803
|
+
const upstreamId = layoutGroupContext.id || deprecatedLayoutGroupContext;
|
|
6796
6804
|
if (context.current === null) {
|
|
6797
6805
|
if (shouldInheritId(inherit) && upstreamId) {
|
|
6798
6806
|
id = id ? upstreamId + "-" + id : upstreamId;
|
|
@@ -7090,6 +7098,8 @@ function useSpring(source, config = {}) {
|
|
|
7090
7098
|
keyframes: [value.get(), v],
|
|
7091
7099
|
velocity: value.getVelocity(),
|
|
7092
7100
|
type: "spring",
|
|
7101
|
+
restDelta: 0.001,
|
|
7102
|
+
restSpeed: 0.01,
|
|
7093
7103
|
...config,
|
|
7094
7104
|
onUpdate: set,
|
|
7095
7105
|
});
|
|
@@ -7897,6 +7907,7 @@ Object.defineProperty(exports, 'warning', {
|
|
|
7897
7907
|
exports.wrap = wrap.wrap;
|
|
7898
7908
|
exports.AnimatePresence = AnimatePresence;
|
|
7899
7909
|
exports.AnimateSharedLayout = AnimateSharedLayout;
|
|
7910
|
+
exports.DeprecatedLayoutGroupContext = DeprecatedLayoutGroupContext;
|
|
7900
7911
|
exports.DragControls = DragControls;
|
|
7901
7912
|
exports.FlatTree = FlatTree;
|
|
7902
7913
|
exports.LayoutGroup = LayoutGroup;
|
|
@@ -415,7 +415,7 @@ class MotionValue {
|
|
|
415
415
|
* This will be replaced by the build step with the latest version number.
|
|
416
416
|
* When MotionValues are provided to motion components, warn if versions are mixed.
|
|
417
417
|
*/
|
|
418
|
-
this.version = "10.2.
|
|
418
|
+
this.version = "10.2.2";
|
|
419
419
|
/**
|
|
420
420
|
* Duration, in milliseconds, since last updating frame.
|
|
421
421
|
*
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useContext, useRef, useMemo } from 'react';
|
|
3
3
|
import { LayoutGroupContext } from '../../context/LayoutGroupContext.mjs';
|
|
4
|
+
import { DeprecatedLayoutGroupContext } from '../../context/DeprecatedLayoutGroupContext.mjs';
|
|
4
5
|
import { useForceUpdate } from '../../utils/use-force-update.mjs';
|
|
5
6
|
import { nodeGroup } from '../../projection/node/group.mjs';
|
|
6
7
|
|
|
@@ -8,9 +9,10 @@ const shouldInheritGroup = (inherit) => inherit === true;
|
|
|
8
9
|
const shouldInheritId = (inherit) => shouldInheritGroup(inherit === true) || inherit === "id";
|
|
9
10
|
const LayoutGroup = ({ children, id, inherit = true }) => {
|
|
10
11
|
const layoutGroupContext = useContext(LayoutGroupContext);
|
|
12
|
+
const deprecatedLayoutGroupContext = useContext(DeprecatedLayoutGroupContext);
|
|
11
13
|
const [forceRender, key] = useForceUpdate();
|
|
12
14
|
const context = useRef(null);
|
|
13
|
-
const upstreamId = layoutGroupContext.id;
|
|
15
|
+
const upstreamId = layoutGroupContext.id || deprecatedLayoutGroupContext;
|
|
14
16
|
if (context.current === null) {
|
|
15
17
|
if (shouldInheritId(inherit) && upstreamId) {
|
|
16
18
|
id = id ? upstreamId + "-" + id : upstreamId;
|
package/dist/es/index.mjs
CHANGED
|
@@ -54,6 +54,7 @@ export { PresenceContext } from './context/PresenceContext.mjs';
|
|
|
54
54
|
export { LayoutGroupContext } from './context/LayoutGroupContext.mjs';
|
|
55
55
|
export { SwitchLayoutGroupContext } from './context/SwitchLayoutGroupContext.mjs';
|
|
56
56
|
export { FlatTree } from './render/utils/flat-tree.mjs';
|
|
57
|
+
export { DeprecatedLayoutGroupContext } from './context/DeprecatedLayoutGroupContext.mjs';
|
|
57
58
|
export { useAnimatedState as useDeprecatedAnimatedState } from './animation/hooks/use-animated-state.mjs';
|
|
58
59
|
export { useInvertedScale as useDeprecatedInvertedScale } from './value/use-inverted-scale.mjs';
|
|
59
60
|
export { AnimateSharedLayout } from './components/AnimateSharedLayout.mjs';
|
|
@@ -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.2.
|
|
25
|
+
warnOnce(nextValue.version === "10.2.2", `Attempting to mix Framer Motion versions ${nextValue.version} with 10.2.2 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.2.
|
|
29
|
+
this.version = "10.2.2";
|
|
30
30
|
/**
|
|
31
31
|
* Duration, in milliseconds, since last updating frame.
|
|
32
32
|
*
|
|
@@ -1995,7 +1995,7 @@
|
|
|
1995
1995
|
* This will be replaced by the build step with the latest version number.
|
|
1996
1996
|
* When MotionValues are provided to motion components, warn if versions are mixed.
|
|
1997
1997
|
*/
|
|
1998
|
-
this.version = "10.2.
|
|
1998
|
+
this.version = "10.2.2";
|
|
1999
1999
|
/**
|
|
2000
2000
|
* Duration, in milliseconds, since last updating frame.
|
|
2001
2001
|
*
|
|
@@ -7862,7 +7862,7 @@
|
|
|
7862
7862
|
* and warn against mismatches.
|
|
7863
7863
|
*/
|
|
7864
7864
|
{
|
|
7865
|
-
warnOnce(nextValue.version === "10.2.
|
|
7865
|
+
warnOnce(nextValue.version === "10.2.2", `Attempting to mix Framer Motion versions ${nextValue.version} with 10.2.2 may not work as expected.`);
|
|
7866
7866
|
}
|
|
7867
7867
|
}
|
|
7868
7868
|
else if (isMotionValue(prevValue)) {
|
|
@@ -9130,13 +9130,21 @@
|
|
|
9130
9130
|
return typeof features === "function";
|
|
9131
9131
|
}
|
|
9132
9132
|
|
|
9133
|
+
/**
|
|
9134
|
+
* Note: Still used by components generated by old versions of Framer
|
|
9135
|
+
*
|
|
9136
|
+
* @deprecated
|
|
9137
|
+
*/
|
|
9138
|
+
const DeprecatedLayoutGroupContext = React.createContext(null);
|
|
9139
|
+
|
|
9133
9140
|
const shouldInheritGroup = (inherit) => inherit === true;
|
|
9134
9141
|
const shouldInheritId = (inherit) => shouldInheritGroup(inherit === true) || inherit === "id";
|
|
9135
9142
|
const LayoutGroup = ({ children, id, inherit = true }) => {
|
|
9136
9143
|
const layoutGroupContext = React.useContext(LayoutGroupContext);
|
|
9144
|
+
const deprecatedLayoutGroupContext = React.useContext(DeprecatedLayoutGroupContext);
|
|
9137
9145
|
const [forceRender, key] = useForceUpdate();
|
|
9138
9146
|
const context = React.useRef(null);
|
|
9139
|
-
const upstreamId = layoutGroupContext.id;
|
|
9147
|
+
const upstreamId = layoutGroupContext.id || deprecatedLayoutGroupContext;
|
|
9140
9148
|
if (context.current === null) {
|
|
9141
9149
|
if (shouldInheritId(inherit) && upstreamId) {
|
|
9142
9150
|
id = id ? upstreamId + "-" + id : upstreamId;
|
|
@@ -9932,6 +9940,8 @@
|
|
|
9932
9940
|
keyframes: [value.get(), v],
|
|
9933
9941
|
velocity: value.getVelocity(),
|
|
9934
9942
|
type: "spring",
|
|
9943
|
+
restDelta: 0.001,
|
|
9944
|
+
restSpeed: 0.01,
|
|
9935
9945
|
...config,
|
|
9936
9946
|
onUpdate: set,
|
|
9937
9947
|
});
|
|
@@ -10696,6 +10706,7 @@
|
|
|
10696
10706
|
|
|
10697
10707
|
exports.AnimatePresence = AnimatePresence;
|
|
10698
10708
|
exports.AnimateSharedLayout = AnimateSharedLayout;
|
|
10709
|
+
exports.DeprecatedLayoutGroupContext = DeprecatedLayoutGroupContext;
|
|
10699
10710
|
exports.DragControls = DragControls;
|
|
10700
10711
|
exports.FlatTree = FlatTree;
|
|
10701
10712
|
exports.LayoutGroup = LayoutGroup;
|
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 o=s(e),i=n(e);const r=e.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),a=e.createContext({}),c=e.createContext(null),u="undefined"!=typeof document,l=u?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:i,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=i(m,v);if(!v&&u){P.visualElement=function(t,n,s,o){const{visualElement:i}=e.useContext(a),u=e.useContext(h),d=e.useContext(c),p=e.useContext(r).reducedMotion,m=e.useRef();o=o||u.renderer,!m.current&&o&&(m.current=o(t,{visualState:n,parent:i,props:s,presenceContext:d,blockInitialAnimation:!!d&&!1===d.initial,reducedMotionConfig:p}));const f=m.current;return e.useInsertionEffect(()=>{f&&f.update(s,d)}),l(()=>{f&&f.render()}),e.useEffect(()=>{f&&f.updateFeatures()}),(window.HandoffAppearAnimations?l:e.useEffect)(()=>{f&&f.animationState&&f.animationState.animateChanges()}),f}(p,w,y,n);const s=e.useContext(V),o=e.useContext(h).strict;P.visualElement&&(g=P.visualElement.loadFeatures(y,o,t,E,s))}return o.createElement(a.Provider,{value:P},g&&P.visualElement?o.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 I=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],O=new Set(I);function U(t,{layout:e,layoutId:n}){return O.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=I.length;function $(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},s,o){let i="";for(let e=0;e<W;e++){const n=I[e];if(void 0!==t[n]){i+=`${z[n]||n}(${t[n]}) `}}return e&&!t.z&&(i+="translateZ(0)"),i=i.trim(),o?i=o(t,s?"":i):n&&s&&(i="none"),i}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}`}),ot=st("deg"),it=st("%"),rt=st("px"),at=st("vh"),ct=st("vw"),ut={...it,parse:t=>it.parse(t)/100,transform:t=>it.transform(100*t)},lt={...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:ot,rotateX:ot,rotateY:ot,rotateZ:ot,scale:K,scaleX:K,scaleY:K,scaleZ:K,skew:ot,skewX:ot,skewY:ot,distance:rt,translateX:rt,translateY:rt,translateZ:rt,x:rt,y:rt,z:rt,perspective:rt,transformPerspective:rt,opacity:_,originX:ut,originY:ut,originZ:rt,zIndex:lt,fillOpacity:_,strokeOpacity:_,numOctaves:lt};function dt(t,e,n,s){const{style:o,vars:i,transform:r,transformOrigin:a}=t;let c=!1,u=!1,l=!0;for(const t in e){const n=e[t];if(Y(t)){i[t]=n;continue}const s=ht[t],h=G(n,s);if(O.has(t)){if(c=!0,r[t]=h,!l)continue;n!==(s.default||0)&&(l=!1)}else t.startsWith("origin")?(u=!0,a[t]=h):o[t]=h}if(e.transform||(c||s?o.transform=$(t.transform,n,l,s):o.transform&&(o.transform="none")),u){const{originX:t="50%",originY:e="50%",originZ:n=0}=a;o.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 o={};return mt(o,t.style||{},t),Object.assign(o,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(o):o}function gt(t,e,n){const s={},o=ft(t,e,n);return t.drag&&!1!==t.dragListener&&(s.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.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=o,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 o in t)"values"===o&&"object"==typeof t.values||(xt(o)||!0===n&&vt(o)||!e&&!vt(o)||t.draggable&&o.startsWith("onDrag"))&&(s[o]=t[o]);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:o,pathLength:i,pathSpacing:r=1,pathOffset:a=0,...c},u,l,h){if(dt(t,c,u,h),l)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!==o||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!==o?o:.5)),void 0!==e&&(d.x=e),void 0!==n&&(d.y=n),void 0!==i&&function(t,e,n=1,s=0,o=!0){t.pathLength=1;const i=o?bt:St;t[i.offset]=rt.transform(-s);const r=rt.transform(e),a=rt.transform(n);t[i.array]=`${r} ${a}`}(d,i,r,a,!1)}const Ct=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),At=t=>"string"==typeof t&&"svg"===t.toLowerCase();function Vt(t,n,s,o){const i=e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Tt(e,n,{enableHardwareAcceleration:!1},At(o),t.transformTemplate),{...e.attrs,style:{...e.style}}},[n]);if(t.style){const e={};mt(e,t.style,t),i.style={...e,...i.style}}return i}function Mt(t=!1){return(n,s,o,i,{latestValues:r},a)=>{const c=(B(n)?Vt:gt)(s,r,a,n),u={...Et(s,"string"==typeof n,t),...c,ref:i},{children:l}=s,h=e.useMemo(()=>N(l)?l.get():l,[l]);return o&&(u["data-projection-id"]=o),e.createElement(n,{...u,children:h})}}const Lt=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function Dt(t,{style:e,vars:n},s,o){Object.assign(t.style,e,o&&o.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 o in n)(N(n[o])||e.style&&N(e.style[o])||U(o,t))&&(s[o]=n[o]);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={},o={}){return"function"==typeof e&&(e=e(void 0!==n?n:t.custom,s,o)),"string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e&&(e=e(void 0!==n?n:t.custom,s,o)),e}const It=t=>Array.isArray(t);function Ot(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 o=e.useContext(a),i=e.useContext(c),r=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},s,o,i){const r={latestValues:Nt(s,o,i,t),renderState:e()};return n&&(r.mount=t=>n(s,t,r)),r}(t,n,o,i);return s?r():S(r)};function Nt(t,e,n,s){const o={},i=s(t,{});for(const t in i)o[t]=Ot(i[t]);let{initial:r,animate:a}=t;const c=y(t),u=v(t);e&&u&&!c&&!1!==t.inherit&&(void 0===r&&(r=e.initial),void 0===a&&(a=e.animate));let l=!!n&&!1===n.initial;l=l||!1===r;const h=l?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:i,...r}=n;for(const t in r){let e=r[t];if(Array.isArray(e)){e=e[l?e.length-1:0]}null!==e&&(o[t]=e)}for(const t in s)o[t]=s[t]})}return o}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="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),oe="undefined"!=typeof window?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(se()),1/60*1e3);const ie={delta:0,timestamp:0};let re=!0,ae=!1,ce=!1;const ue=["read","update","preRender","render","postRender"],le=ue.reduce((t,e)=>(t[e]=function(t){let e=[],n=[],s=0,o=!1,i=!1;const r=new WeakSet,a={schedule:(t,i=!1,a=!1)=>{const c=a&&o,u=c?e:n;return i&&r.add(t),-1===u.indexOf(t)&&(u.push(t),c&&o&&(s=e.length)),t},cancel:t=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1),r.delete(t)},process:c=>{if(o)i=!0;else{if(o=!0,[e,n]=[n,e],n.length=0,s=e.length,s)for(let n=0;n<s;n++){const s=e[n];s(c),r.has(s)&&(a.schedule(s),t())}o=!1,i&&(i=!1,a.process(c))}}};return a}(()=>ae=!0),t),{}),he=ue.reduce((t,e)=>{const n=le[e];return t[e]=(t,e=!1,s=!1)=>(ae||ge(),n.schedule(t,e,s)),t},{}),de=ue.reduce((t,e)=>(t[e]=le[e].cancel,t),{}),pe=ue.reduce((t,e)=>(t[e]=()=>le[e].process(ie),t),{}),me=t=>le[t].process(ie),fe=t=>{ae=!1,ie.delta=re?1/60*1e3:Math.max(Math.min(t-ie.timestamp,40),1),ie.timestamp=t,ce=!0,ue.forEach(me),ce=!1,ae&&(re=!1,oe(fe))},ge=()=>{ae=!0,re=!0,ce||oe(fe)};function ye(t,e){const n="pointer"+(e?"enter":"leave"),s="onHover"+(e?"Start":"End");return qt(t.current,n,(n,o)=>{if("touch"===n.type||ee())return;const i=t.getProps();t.animationState&&i.whileHover&&t.animationState.setActive("whileHover",e),i[s]&&he.update(()=>i[s](n,o))},{passive:!t.getProps()[s]})}const ve=(t,e)=>!!e&&(t===e||ve(t,e.parentElement)),xe=t=>t;function Pe(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,Xt(n))}const Ee=new WeakMap,we=new WeakMap,be=t=>{const e=Ee.get(t.target);e&&e(t)},Se=t=>{t.forEach(be)};function Te(t,e,n){const s=function({root:t,...e}){const n=t||document;we.has(n)||we.set(n,{});const s=we.get(n),o=JSON.stringify(e);return s[o]||(s[o]=new IntersectionObserver(Se,{root:t,...e})),s[o]}(e);return Ee.set(t,n),s.observe(t),()=>{Ee.delete(t),s.unobserve(t)}}const Ce={some:0,all:1};const Ae={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:o}=t,i={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof s?s:Ce[s]};return Te(this.node.current,i,t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,o&&!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(),i=e?n:s;i&&i(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=xe,this.removeEndListeners=xe,this.removeAccessibleListeners=xe,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();he.update(()=>{ve(this.node.current,t.target)?n&&n(t,e):s&&s(t,e)})},{passive:!(n.onTap||n.onPointerUp)}),o=qt(window,"pointercancel",(t,e)=>this.cancelPress(t,e),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=_t(s,o),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()&&Pe("up",(t,e)=>{const{onTap:n}=this.node.getProps();n&&he.update(()=>n(t,e))})}),Pe("down",(t,e)=>{this.startPress(t,e)})}),e=Ht(this.node.current,"blur",()=>{this.isPressing&&Pe("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&&he.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&&he.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(ye(this.node,!0),ye(this.node,!1))}unmount(){}}}};function Ve(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 Me=t=>/^0[^.\s]+$/.test(t);function Le(t,e){-1===t.indexOf(e)&&t.push(e)}function De(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class Re{constructor(){this.subscriptions=[]}add(t){return Le(this.subscriptions,t),()=>De(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 o=0;o<s;o++){const s=this.subscriptions[o];s&&s(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function ke(t,e){return e?t*(1e3/e):0}class Be{constructor(t,e={}){var n;this.version="10.2.0",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}=ie;this.lastUpdated!==s&&(this.timeDelta=n,this.lastUpdated=s,he.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=()=>he.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 Re);const n=this.events[t].add(e);return"change"===t?()=>{n(),he.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?ke(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e)||null,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(){this.animation=null}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function je(t,e){return new Be(t,e)}const Fe=(t,e)=>n=>Boolean(nt(n)&&et.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),Ie=(t,e,n)=>s=>{if(!nt(s))return s;const[o,i,r,a]=s.match(Q);return{[t]:parseFloat(o),[e]:parseFloat(i),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},Oe={...Z,transform:t=>Math.round((t=>q(0,255,t))(t))},Ue={test:Fe("rgb","red"),parse:Ie("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+Oe.transform(t)+", "+Oe.transform(e)+", "+Oe.transform(n)+", "+J(_.transform(s))+")"};const Ne={test:Fe("#"),parse:function(t){let e="",n="",s="",o="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),o=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),o=t.substring(4,5),e+=e,n+=n,s+=s,o+=o),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:o?parseInt(o,16)/255:1}},transform:Ue.transform},ze={test:Fe("hsl","hue"),parse:Ie("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+it.transform(J(e))+", "+it.transform(J(n))+", "+J(_.transform(s))+")"},We={test:t=>Ue.test(t)||Ne.test(t)||ze.test(t),parse:t=>Ue.test(t)?Ue.parse(t):ze.test(t)?ze.parse(t):Ne.parse(t),transform:t=>nt(t)?t:t.hasOwnProperty("red")?Ue.transform(t):ze.transform(t)};function $e(t){"number"==typeof t&&(t=""+t);const e=[];let n=0,s=0;const o=t.match(tt);o&&(n=o.length,t=t.replace(tt,"${c}"),e.push(...o.map(We.parse)));const i=t.match(Q);return i&&(s=i.length,t=t.replace(Q,"${n}"),e.push(...i.map(Z.parse))),{values:e,numColors:n,numNumbers:s,tokenised:t}}function He(t){return $e(t).values}function Ye(t){const{values:e,numColors:n,tokenised:s}=$e(t),o=e.length;return t=>{let e=s;for(let s=0;s<o;s++)e=e.replace(s<n?"${c}":"${n}",s<n?We.transform(t[s]):J(t[s]));return e}}const Xe=t=>"number"==typeof t?0:t;const Ge={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:He,createTransformer:Ye,getAnimatableNone:function(t){const e=He(t);return Ye(t)(e.map(Xe))}},qe=new Set(["brightness","contrast","saturate","opacity"]);function Ze(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 o=n.replace(s,"");let i=qe.has(e)?1:0;return s!==n&&(i*=100),e+"("+i+o+")"}const _e=/([a-z-]*)\(.*?\)/g,Ke={...Ge,getAnimatableNone:t=>{const e=t.match(_e);return e?e.map(Ze).join(" "):t}},Je={...ht,color:We,backgroundColor:We,outlineColor:We,fill:We,stroke:We,borderColor:We,borderTopColor:We,borderRightColor:We,borderBottomColor:We,borderLeftColor:We,filter:Ke,WebkitFilter:Ke},Qe=t=>Je[t];function tn(t,e){let n=Qe(t);return n!==Ke&&(n=Ge),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const en=t=>e=>e.test(t),nn=[Z,rt,it,ot,ct,at,{test:t=>"auto"===t,parse:t=>t}],sn=t=>nn.find(en(t)),on=[...nn,We,Ge],rn=t=>on.find(en(t));function an(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 cn(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,je(n))}function un(t,e){const n=an(t,e);let{transitionEnd:s={},transition:o={},...i}=n?t.makeTargetAnimatable(n,!1):{};i={...i,...s};for(const e in i){cn(t,e,(r=i[e],It(r)?r[r.length-1]||0:r))}var r}function ln(t,e){[...e].reverse().forEach(n=>{const s=t.getVariant(n);s&&un(t,s),t.variantChildren&&t.variantChildren.forEach(t=>{ln(t,e)})})}function hn(t,e,n){var s,o;const i=Object.keys(e).filter(e=>!t.hasValue(e)),r=i.length;if(r)for(let a=0;a<r;a++){const r=i[a],c=e[r];let u=null;Array.isArray(c)&&(u=c[0]),null===u&&(u=null!==(o=null!==(s=n[r])&&void 0!==s?s:t.readValue(r))&&void 0!==o?o:e[r]),null!=u&&("string"==typeof u&&(/^\-?\d*\.?\d+$/.test(u)||Me(u))?u=parseFloat(u):!rn(u)&&Ge.test(c)&&(u=tn(r,c)),t.addValue(r,je(u,{owner:t})),void 0===n[r]&&(n[r]=u),null!==u&&t.setBaseTarget(r,u))}}function dn(t,e){if(!e)return;return(e[t]||e.default||e).from}function pn(t,e,n){const s={};for(const o in t){const t=dn(o,e);if(void 0!==t)s[o]=t;else{const t=n.getValue(o);t&&(s[o]=t.get())}}return s}function mn(t){return Boolean(N(t)&&t.add)}const fn="data-"+Lt("framerAppearId");let gn=xe,yn=xe;const vn=t=>1e3*t,xn={current:!1},Pn=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,En=t=>e=>1-t(1-e),wn=t=>t*t,bn=En(wn),Sn=Pn(wn),Tn=(t,e,n)=>-n*t+n*e+t;function Cn(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 An=(t,e,n)=>{const s=t*t;return Math.sqrt(Math.max(0,n*(e*e-s)+s))},Vn=[Ne,Ue,ze];function Mn(t){const e=(n=t,Vn.find(t=>t.test(n)));var n;yn(Boolean(e));let s=e.parse(t);return e===ze&&(s=function({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,n/=100;let o=0,i=0,r=0;if(e/=100){const s=n<.5?n*(1+e):n+e-n*e,a=2*n-s;o=Cn(a,s,t+1/3),i=Cn(a,s,t),r=Cn(a,s,t-1/3)}else o=i=r=n;return{red:Math.round(255*o),green:Math.round(255*i),blue:Math.round(255*r),alpha:s}}(s)),s}const Ln=(t,e)=>{const n=Mn(t),s=Mn(e),o={...n};return t=>(o.red=An(n.red,s.red,t),o.green=An(n.green,s.green,t),o.blue=An(n.blue,s.blue,t),o.alpha=Tn(n.alpha,s.alpha,t),Ue.transform(o))};function Dn(t,e){return"number"==typeof t?n=>Tn(t,e,n):We.test(t)?Ln(t,e):Bn(t,e)}const Rn=(t,e)=>{const n=[...t],s=n.length,o=t.map((t,n)=>Dn(t,e[n]));return t=>{for(let e=0;e<s;e++)n[e]=o[e](t);return n}},kn=(t,e)=>{const n={...t,...e},s={};for(const o in n)void 0!==t[o]&&void 0!==e[o]&&(s[o]=Dn(t[o],e[o]));return t=>{for(const e in s)n[e]=s[e](t);return n}},Bn=(t,e)=>{const n=Ge.createTransformer(e),s=$e(t),o=$e(e);return s.numColors===o.numColors&&s.numNumbers>=o.numNumbers?_t(Rn(s.values,o.values),n):(gn(!0),n=>""+(n>0?e:t))},jn=(t,e,n)=>{const s=e-t;return 0===s?1:(n-t)/s},Fn=(t,e)=>n=>Tn(t,e,n);function In(t,e,n){const s=[],o=n||("number"==typeof(i=t[0])?Fn:"string"==typeof i?We.test(i)?Ln:Bn:Array.isArray(i)?Rn:"object"==typeof i?kn:Fn);var i;const r=t.length-1;for(let n=0;n<r;n++){let i=o(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]:e;i=_t(t,i)}s.push(i)}return s}function On(t,e,{clamp:n=!0,ease:s,mixer:o}={}){const i=t.length;yn(i===e.length),yn(!s||!Array.isArray(s)||s.length===i-1),t[0]>t[i-1]&&(t=[...t].reverse(),e=[...e].reverse());const r=In(e,s,o),a=r.length,c=e=>{let n=0;if(a>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const s=jn(t[n],t[n+1],e);return r[n](s)};return n?e=>c(q(t[0],t[i-1],e)):c}function Un(t){const e=[0];return function(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const o=jn(0,e,s);t.push(Tn(n,1,o))}}(e,t.length-1),e}const Nn=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function zn(t,e,n,s){if(t===e&&n===s)return xe;const o=e=>function(t,e,n,s,o){let i,r,a=0;do{r=e+(n-e)/2,i=Nn(r,s,o)-t,i>0?n=r:e=r}while(Math.abs(i)>1e-7&&++a<12);return r}(e,0,1,t,n);return t=>0===t||1===t?t:Nn(o(t),e,s)}const Wn=t=>1-Math.sin(Math.acos(t)),$n=En(Wn),Hn=Pn($n),Yn=zn(.33,1.53,.69,.99),Xn=En(Yn),Gn=Pn(Xn),qn=t=>(t*=2)<1?.5*Xn(t):.5*(2-Math.pow(2,-10*(t-1))),Zn={linear:xe,easeIn:wn,easeInOut:Sn,easeOut:bn,circIn:Wn,circInOut:Hn,circOut:$n,backIn:Xn,backInOut:Gn,backOut:Yn,anticipate:qn},_n=t=>{if(Array.isArray(t)){yn(4===t.length);const[e,n,s,o]=t;return zn(e,n,s,o)}return"string"==typeof t?(yn(void 0!==Zn[t]),Zn[t]):t};function Kn({keyframes:t,ease:e=Sn,times:n,duration:s=300}){t=[...t];const o=(t=>Array.isArray(t)&&"number"!=typeof t[0])(e)?e.map(_n):_n(e),i={done:!1,value:t[0]},r=function(t,e){return t.map(t=>t*e)}(n&&n.length===t.length?n:Un(t),s);function a(){return On(r,t,{ease:Array.isArray(o)?o:(e=t,n=o,e.map(()=>n||Sn).splice(0,e.length-1))});var e,n}let c=a();return{next:t=>(i.value=c(t),i.done=t>=s,i),flipTarget:()=>{t.reverse(),c=a()}}}function Jn({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let o,i;gn(t<=1e4);let r=1-e;r=q(.05,1,r),t=q(.01,10,t/1e3),r<1?(o=e=>{const s=e*r,o=s*t;return.001-(s-n)/Qn(e,r)*Math.exp(-o)},i=e=>{const s=e*r*t,i=s*n+n,a=Math.pow(r,2)*Math.pow(e,2)*t,c=Math.exp(-s),u=Qn(Math.pow(e,2),r);return(.001-o(e)>0?-1:1)*((i-a)*c)/u}):(o=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,i=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}(o,i,5/t);if(t*=1e3,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 Qn(t,e){return t*Math.sqrt(1-e*e)}const ts=["duration","bounce"],es=["stiffness","damping","mass"];function ns(t,e){return e.some(e=>void 0!==t[e])}function ss({keyframes:t,restDelta:e,restSpeed:n,...s}){let o=t[0],i=t[t.length-1];const r={done:!1,value:o},{stiffness:a,damping:c,mass:u,velocity:l,duration:h,isResolvedFromDuration:d}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!ns(t,es)&&ns(t,ts)){const n=Jn(t);e={...e,...n,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}(s);let p=os,m=l?-l/1e3:0;const f=c/(2*Math.sqrt(a*u));function g(){const t=i-o,s=Math.sqrt(a/u)/1e3,r=Math.abs(t)<5;if(n||(n=r?.01:2),e||(e=r?.005:.5),f<1){const e=Qn(s,f);p=n=>{const o=Math.exp(-f*s*n);return i-o*((m+f*s*t)/e*Math.sin(e*n)+t*Math.cos(e*n))}}else if(1===f)p=e=>i-Math.exp(-s*e)*(t+(m+s*t)*e);else{const e=s*Math.sqrt(f*f-1);p=n=>{const o=Math.exp(-f*s*n),r=Math.min(e*n,300);return i-o*((m+f*s*t)*Math.sinh(r)+e*t*Math.cosh(r))/e}}}return g(),{next:t=>{const s=p(t);if(d)r.done=t>=h;else{let o=m;if(0!==t)if(f<1){const e=Math.max(0,t-5);o=ke(s-p(e),t-e)}else o=0;const a=Math.abs(o)<=n,c=Math.abs(i-s)<=e;r.done=a&&c}return r.value=r.done?i:s,r},flipTarget:()=>{m=-m,[o,i]=[i,o],g()}}}ss.needsInterpolation=(t,e)=>"string"==typeof t||"string"==typeof e;const os=t=>0;const is={decay:function({keyframes:t=[0],velocity:e=0,power:n=.8,timeConstant:s=350,restDelta:o=.5,modifyTarget:i}){const r=t[0],a={done:!1,value:r};let c=n*e;const u=r+c,l=void 0===i?u:i(u);return l!==u&&(c=l-r),{next:t=>{const e=-c*Math.exp(-t/s);return a.done=!(e>o||e<-o),a.value=a.done?l:l+e,a},flipTarget:()=>{}}},keyframes:Kn,tween:Kn,spring:ss};function rs(t,e,n=0){return t-e-n}const as=t=>{const e=({delta:e})=>t(e);return{start:()=>he.update(e,!0),stop:()=>de.update(e)}};function cs({duration:t,driver:e=as,elapsed:n=0,repeat:s=0,repeatType:o="loop",repeatDelay:i=0,keyframes:r,autoplay:a=!0,onPlay:c,onStop:u,onComplete:l,onRepeat:h,onUpdate:d,type:p="keyframes",...m}){const f=n;let g,y,v=0,x=t,P=!1,E=!0;const w=is[r.length>2?"keyframes":p]||Kn,b=r[0],S=r[r.length-1];let T={done:!1,value:b};const{needsInterpolation:C}=w;C&&C(b,S)&&(y=On([0,100],[b,S],{clamp:!1}),r=[0,100]);const A=w({...m,duration:t,keyframes:r});function V(){v++,"reverse"===o?(E=v%2==0,n=function(t,e=0,n=0,s=!0){return s?rs(e+-t,e,n):e-(t-e)+n}(n,x,i,E)):(n=rs(n,x,i),"mirror"===o&&A.flipTarget()),P=!1,h&&h()}function M(t){E||(t=-t),n+=t,P||(T=A.next(Math.max(0,n)),y&&(T.value=y(T.value)),P=E?T.done:n<=0),d&&d(T.value),P&&(0===v&&(x=void 0!==x?x:n),v<s?function(t,e,n,s){return s?t>=e+n:t<=-n}(n,x,i,E)&&V():(g&&g.stop(),l&&l()))}return a&&(c&&c(),g=e(M),g.start()),{stop:()=>{u&&u(),g&&g.stop()},set currentTime(t){n=f,M(t)},sample:(e,s=!1)=>{if(n=f,s)return M(e),T;const o=t&&"number"==typeof t?Math.max(.5*t,50):50;let i=0;for(M(0);i<=e;){const t=e-i;M(Math.min(t,o)),i+=o}return T}}}const us=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,ls={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:us([0,.65,.55,1]),circOut:us([.55,0,1,.45]),backIn:us([.31,.01,.66,-.59]),backOut:us([.33,1.53,.69,.99])};function hs(t){if(t)return Array.isArray(t)?us(t):ls[t]}function ds(t,e,n,{delay:s=0,duration:o,repeat:i=0,repeatType:r="loop",ease:a,times:c}={}){const u={[e]:n};return c&&(u.offset=c),t.animate(u,{delay:s,duration:o,easing:hs(a),fill:"both",iterations:i+1,direction:"reverse"===r?"alternate":"normal"})}const ps={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},ms={},fs={};for(const t in ps)fs[t]=()=>(void 0===ms[t]&&(ms[t]=ps[t]()),ms[t]);const gs=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),ys=(t,e)=>{return"spring"===e.type||"backgroundColor"===t||!(!(n=e.ease)||Array.isArray(n)||"string"==typeof n&&ls[n]);var n};function vs(t,e){const n=performance.now(),s=({timestamp:o})=>{const i=o-n;i>=e&&(de.read(s),t(i-e))};return he.read(s,!0),()=>de.read(s)}function xs({keyframes:t,elapsed:e,onUpdate:n,onComplete:s}){const o=()=>{n&&n(t[t.length-1]),s&&s()};return e?{stop:vs(o,-e)}:o()}function Ps({keyframes:t,velocity:e=0,min:n,max:s,power:o=.8,timeConstant:i=750,bounceStiffness:r=500,bounceDamping:a=10,restDelta:c=1,modifyTarget:u,driver:l,onUpdate:h,onComplete:d,onStop:p}){const m=t[0];let f;function g(t){return void 0!==n&&t<n||void 0!==s&&t>s}function y(t){return void 0===n?s:void 0===s||Math.abs(n-t)<Math.abs(s-t)?n:s}function v(t){f&&f.stop(),f=cs({keyframes:[0,1],velocity:0,...t,driver:l,onUpdate:e=>{h&&h(e),t.onUpdate&&t.onUpdate(e)},onComplete:d,onStop:p})}function x(t){v({type:"spring",stiffness:r,damping:a,restDelta:c,...t})}if(g(m))x({velocity:e,keyframes:[m,y(m)]});else{let t=o*e+m;void 0!==u&&(t=u(t));const s=y(t),r=s===n?-1:1;let a,l;const h=t=>{a=l,l=t,e=ke(t-a,ie.delta),(1===r&&t>s||-1===r&&t<s)&&x({keyframes:[t,s],velocity:e})};v({type:"decay",keyframes:[m,0],velocity:e,timeConstant:i,power:o,restDelta:c,modifyTarget:u,onUpdate:g(t)?h:void 0})}return{stop:()=>f&&f.stop()}}const Es={type:"spring",stiffness:500,damping:25,restSpeed:10},ws={type:"keyframes",duration:.8},bs={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ss=(t,{keyframes:e})=>e.length>2?ws:O.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:Es:bs,Ts=(t,e)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!Ge.test(e)||e.startsWith("url(")));function Cs(t){return 0===t||"string"==typeof t&&0===parseFloat(t)&&-1===t.indexOf(" ")}function As(t){return"number"==typeof t?0:tn("",t)}function Vs(t,e){return t[e]||t.default||t}const Ms=(t,e,n,s={})=>o=>{const i=Vs(s,t)||{},r=i.delay||s.delay||0;let{elapsed:a=0}=s;a-=vn(r);const c=function(t,e,n,s){const o=Ts(e,n);let i=void 0!==s.from?s.from:t.get();return"none"===i&&o&&"string"==typeof n?i=tn(e,n):Cs(i)&&"string"==typeof n?i=As(n):!Array.isArray(n)&&Cs(n)&&"string"==typeof i&&(n=As(i)),Array.isArray(n)?(null===n[0]&&(n[0]=i),n):[i,n]}(e,t,n,i),u=c[0],l=c[c.length-1],h=Ts(t,u),d=Ts(t,l);gn(h===d);let p={keyframes:c,velocity:e.getVelocity(),...i,elapsed:a,onUpdate:t=>{e.set(t),i.onUpdate&&i.onUpdate(t)},onComplete:()=>{o(),i.onComplete&&i.onComplete()}};if(!h||!d||xn.current||!1===i.type)return xs(p);if("inertia"===i.type)return Ps(p);if(function({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:o,repeat:i,repeatType:r,repeatDelay:a,from:c,elapsed:u,...l}){return!!Object.keys(l).length}(i)||(p={...p,...Ss(t,p)}),p.duration&&(p.duration=vn(p.duration)),p.repeatDelay&&(p.repeatDelay=vn(p.repeatDelay)),e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const n=function(t,e,{onUpdate:n,onComplete:s,...o}){if(!(fs.waapi()&&gs.has(e)&&!o.repeatDelay&&"mirror"!==o.repeatType&&0!==o.damping))return!1;let{keyframes:i,duration:r=300,elapsed:a=0,ease:c}=o;if(ys(e,o)){const t=cs({...o,repeat:0,elapsed:0});let e={done:!1,value:i[0]};const n=[];let s=0;for(;!e.done&&s<2e4;)e=t.sample(s,!0),n.push(e.value),s+=10;i=n,r=s-10,c="linear"}const u=ds(t.owner.current,e,i,{...o,delay:-a,duration:r,ease:c});return u.onfinish=()=>{t.set(function(t,{repeat:e,repeatType:n="loop"}){return t[e&&"loop"!==n&&e%2==1?0:t.length-1]}(i,o)),he.update(()=>u.cancel()),s&&s()},{get currentTime(){return u.currentTime||0},set currentTime(t){u.currentTime=t},stop:()=>{const{currentTime:e}=u;if(e){const n=cs({...o,autoplay:!1});t.setWithVelocity(n.sample(e-10).value,n.sample(e).value,10)}he.update(()=>u.cancel())}}}(e,t,p);if(n)return n}return cs(p)};function Ls(t,e,n={}){let s;if(t.notify("AnimationStart",e),Array.isArray(e)){const o=e.map(e=>Ds(t,e,n));s=Promise.all(o)}else if("string"==typeof e)s=Ds(t,e,n);else{const o="function"==typeof e?an(t,e,n.custom):e;s=Rs(t,o,n)}return s.then(()=>t.notify("AnimationComplete",e))}function Ds(t,e,n={}){const s=an(t,e,n.custom);let{transition:o=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(o=n.transitionOverride);const i=s?()=>Rs(t,s,n):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(s=0)=>{const{delayChildren:i=0,staggerChildren:r,staggerDirection:a}=o;return function(t,e,n=0,s=0,o=1,i){const r=[],a=(t.variantChildren.size-1)*s,c=1===o?(t=0)=>t*s:(t=0)=>a-t*s;return Array.from(t.variantChildren).sort(ks).forEach((t,s)=>{t.notify("AnimationStart",e),r.push(Ds(t,e,{...i,delay:n+c(s)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(r)}(t,e,i+s,r,a,n)}:()=>Promise.resolve(),{when:a}=o;if(a){const[t,e]="beforeChildren"===a?[i,r]:[r,i];return t().then(e)}return Promise.all([i(),r(n.delay)])}function Rs(t,e,{delay:n=0,transitionOverride:s,type:o}={}){let{transition:i=t.getDefaultTransition(),transitionEnd:r,...a}=t.makeTargetAnimatable(e);const c=t.getValue("willChange");s&&(i=s);const u=[],l=o&&t.animationState&&t.animationState.getState()[o];for(const e in a){const s=t.getValue(e),o=a[e];if(!s||void 0===o||l&&Bs(l,e))continue;const r={delay:n,elapsed:0,...i};if(window.HandoffAppearAnimations&&!s.hasAnimated){const n=t.getProps()[fn];n&&(r.elapsed=window.HandoffAppearAnimations(n,e,s,he))}let h=s.start(Ms(e,s,o,t.shouldReduceMotion&&O.has(e)?{type:!1}:r));mn(c)&&(c.add(e),h=h.then(()=>c.remove(e))),u.push(h)}return Promise.all(u).then(()=>{r&&un(t,r)})}function ks(t,e){return t.sortNodePosition(e)}function Bs({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,s}const js=[...f].reverse(),Fs=f.length;function Is(t){let e=function(t){return e=>Promise.all(e.map(({animation:e,options:n})=>Ls(t,e,n)))}(t);const n={animate:Us(!0),whileInView:Us(),whileHover:Us(),whileTap:Us(),whileDrag:Us(),whileFocus:Us(),exit:Us()};let s=!0;const o=(e,n)=>{const s=an(t,n);if(s){const{transition:t,transitionEnd:n,...o}=s;e={...e,...o,...n}}return e};function i(i,r){const a=t.getProps(),c=t.getVariantContext(!0)||{},u=[],l=new Set;let h={},d=1/0;for(let e=0;e<Fs;e++){const f=js[e],g=n[f],y=void 0!==a[f]?a[f]:c[f],v=p(y),x=f===r?g.isActive:null;!1===x&&(d=e);let P=y===c[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=Os(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(o,{});!1===x&&(S={});const{prevResolvedValues:T={}}=g,C={...T,...S},A=t=>{w=!0,l.delete(t),g.needsAnimating[t]=!0};for(const t in C){const e=S[t],n=T[t];h.hasOwnProperty(t)||(e!==n?It(e)&&It(n)?!Ve(e,n)||E?A(t):g.protectedKeys[t]=!0:void 0!==e?A(t):l.add(t):void 0!==e&&l.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&&u.push(...b.map(t=>({animation:t,options:{type:f,...i}})))}if(l.size){const e={};l.forEach(n=>{const s=t.getBaseTarget(n);void 0!==s&&(e[n]=s)}),u.push({animation:e})}let f=Boolean(u.length);return s&&!1===a.initial&&!t.manuallyAnimateOnMount&&(f=!1),s=!1,f?e(u):Promise.resolve()}return{animateChanges:i,setActive:function(e,s,o){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=i(o,e);for(const t in n)n[t].protectedKeys={};return a},setAnimateFunction:function(n){e=n(t)},getState:()=>n}}function Os(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!Ve(e,t)}function Us(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}let Ns=0;const zs={animation:{Feature:class extends ne{constructor(t){super(t),t.animationState||(t.animationState=Is(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=Ns++}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 o=this.node.animationState.setActive("exit",!t,{custom:null!=n?n:this.node.getProps().custom});e&&!t&&o.then(()=>e(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}}},Ws=(t,e)=>Math.abs(t-e);function $s(t,e){const n=Ws(t.x,e.x),s=Ws(t.y,e.y);return Math.sqrt(n**2+s**2)}class Hs{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=Gs(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=$s(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:s}=t,{timestamp:o}=ie;this.history.push({...s,timestamp:o});const{onStart:i,onMove:r}=this.handlers;e||(i&&i(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),r&&r(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=Ys(e,this.transformPagePoint),he.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{if(this.end(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const{onEnd:n,onSessionEnd:s}=this.handlers,o=Gs("pointercancel"===t.type?this.lastMoveEventInfo:Ys(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,o),s&&s(t,o)},!Yt(t))return;this.handlers=e,this.transformPagePoint=n;const s=Ys(Xt(t),this.transformPagePoint),{point:o}=s,{timestamp:i}=ie;this.history=[{...o,timestamp:i}];const{onSessionStart:r}=e;r&&r(t,Gs(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(),de.update(this.updatePoint)}}function Ys(t,e){return e?{point:e(t.point)}:t}function Xs(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Gs({point:t},e){return{point:t,delta:Xs(t,Zs(e)),offset:Xs(t,qs(e)),velocity:_s(e,.1)}}function qs(t){return t[0]}function Zs(t){return t[t.length-1]}function _s(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const o=Zs(t);for(;n>=0&&(s=t[n],!(o.timestamp-s.timestamp>vn(e)));)n--;if(!s)return{x:0,y:0};const i=(o.timestamp-s.timestamp)/1e3;if(0===i)return{x:0,y:0};const r={x:(o.x-s.x)/i,y:(o.y-s.y)/i};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function Ks(t){return t.max-t.min}function Js(t,e=0,n=.01){return Math.abs(t-e)<=n}function Qs(t,e,n,s=.5){t.origin=s,t.originPoint=Tn(e.min,e.max,t.origin),t.scale=Ks(n)/Ks(e),(Js(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=Tn(n.min,n.max,t.origin)-t.originPoint,(Js(t.translate)||isNaN(t.translate))&&(t.translate=0)}function to(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 eo(t,e,n){t.min=n.min+e.min,t.max=t.min+Ks(e)}function no(t,e,n){t.min=e.min-n.min,t.max=t.min+Ks(e)}function so(t,e,n){no(t.x,e.x,n.x),no(t.y,e.y,n.y)}function oo(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 io(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 ro=.35;function ao(t,e,n){return{min:co(t,e),max:co(t,n)}}function co(t,e){return"number"==typeof t?t:t[e]||0}const uo=()=>({x:{min:0,max:0},y:{min:0,max:0}});function lo(t){return[t("x"),t("y")]}function ho({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function po(t){return void 0===t||1===t}function mo({scale:t,scaleX:e,scaleY:n}){return!po(t)||!po(e)||!po(n)}function fo(t){return mo(t)||go(t)||t.z||t.rotate||t.rotateX||t.rotateY}function go(t){return yo(t.x)||yo(t.y)}function yo(t){return t&&"0%"!==t}function vo(t,e,n){return n+e*(t-n)}function xo(t,e,n,s,o){return void 0!==o&&(t=vo(t,o,s)),vo(t,n,s)+e}function Po(t,e=0,n=1,s,o){t.min=xo(t.min,e,n,s,o),t.max=xo(t.max,e,n,s,o)}function Eo(t,{x:e,y:n}){Po(t.x,e.translate,e.scale,e.originPoint),Po(t.y,n.translate,n.scale,n.originPoint)}function wo(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function bo(t,e){t.min=t.min+e,t.max=t.max+e}function So(t,e,[n,s,o]){const i=void 0!==e[o]?e[o]:.5,r=Tn(t.min,t.max,i);Po(t,e[n],e[s],r,e.scale)}const To=["x","scaleX","originX"],Co=["y","scaleY","originY"];function Ao(t,e){So(t.x,e,To),So(t.y,e,Co)}function Vo(t,e){return ho(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 Mo=new WeakMap;class Lo{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 Hs(t,{onSessionStart:t=>{this.stopAnimation(),e&&this.snapToCursor(Xt(t,"page").point)},onStart:(t,e)=>{const{drag:n,dragPropagation:s,onDragStart:o}=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),lo(t=>{let e=this.getAxisMotionValue(t).get()||0;if(it.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const s=n.layout.layoutBox[t];if(s){e=Ks(s)*(parseFloat(e)/100)}}}this.originPoint[t]=e}),o&&he.update(()=>o(t,e));const{animationState:i}=this.visualElement;i&&i.setActive("whileDrag",!0)},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:s,onDirectionLock:o,onDrag:i}=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&&o&&o(this.currentDirection));this.updateAxis("x",e.point,r),this.updateAxis("y",e.point,r),this.visualElement.render(),i&&i(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:o}=this.getProps();o&&he.update(()=>o(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||!Do(t,s,this.currentDirection))return;const o=this.getAxisMotionValue(t);let i=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(i=function(t,{min:e,max:n},s){return void 0!==e&&t<e?t=s?Tn(e,t,s.min):Math.max(t,e):void 0!==n&&t>n&&(t=s?Tn(n,t,s.max):Math.min(t,n)),t}(i,this.constraints[t],this.elastic[t])),o.set(i)}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:o}){return{x:oo(t.x,n,o),y:oo(t.y,e,s)}}(n.layoutBox,t),this.elastic=function(t=ro){return!1===t?t=0:!0===t&&(t=ro),{x:ao(t,"left","right"),y:ao(t,"top","bottom")}}(e),s!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&lo(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;yn(null!==n);const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const o=function(t,e,n){const s=Vo(t,n),{scroll:o}=e;return o&&(bo(s.x,o.offset.x),bo(s.y,o.offset.y)),s}(n,s.root,this.visualElement.getTransformPagePoint());let i=function(t,e){return{x:io(t.x,e.x),y:io(t.y,e.y)}}(s.layout.layoutBox,o);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(i));this.hasMutatedConstraints=!!t,t&&(i=ho(t))}return i}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:s,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},c=lo(r=>{if(!Do(r,e,this.currentDirection))return;let c=a&&a[r]||{};i&&(c={min:0,max:0});const u=s?200:1e6,l=s?40:1e7,h={type:"inertia",velocity:n?t[r]:0,bounceStiffness:u,bounceDamping:l,timeConstant:750,restDelta:1,restSpeed:10,...o,...c};return this.startAxisValueAnimation(r,h)});return Promise.all(c).then(r)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return n.start(Ms(t,n,0,e))}stopAnimation(){lo(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){lo(e=>{const{drag:n}=this.getProps();if(!Do(e,n,this.currentDirection))return;const{projection:s}=this.visualElement,o=this.getAxisMotionValue(e);if(s&&s.layout){const{min:n,max:i}=s.layout.layoutBox[e];o.set(t[e]-Tn(n,i,.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};lo(t=>{const e=this.getAxisMotionValue(t);if(e){const n=e.get();s[t]=function(t,e){let n=.5;const s=Ks(t),o=Ks(e);return o>s?n=jn(e.min,e.max-s,t.min):s>o&&(n=jn(t.min,t.max-o,e.min)),q(0,1,n)}({min:n,max:n},this.constraints[t])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),lo(e=>{if(!Do(e,t,null))return;const n=this.getAxisMotionValue(e),{min:o,max:i}=this.constraints[e];n.set(Tn(o,i,s[e]))})}addListeners(){if(!this.visualElement.current)return;Mo.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 o=Ht(window,"resize",()=>this.scalePositionWithinConstraints()),i=n.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(lo(e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))}),this.visualElement.render())});return()=>{o(),t(),s(),i&&i()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:s=!1,dragConstraints:o=!1,dragElastic:i=ro,dragMomentum:r=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:s,dragConstraints:o,dragElastic:i,dragMomentum:r}}}function Do(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const Ro=t=>(e,n)=>{t&&he.update(()=>t(e,n))};function ko(t,e,n={}){const s=N(t)?t:je(t);return s.start(Ms("",s,e,n)),{stop:()=>s.stop(),isAnimating:()=>s.isAnimating()}}const Bo=["TopLeft","TopRight","BottomLeft","BottomRight"],jo=Bo.length,Fo=t=>"string"==typeof t?parseFloat(t):t,Io=t=>"number"==typeof t||rt.test(t);function Oo(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const Uo=zo(0,.5,$n),No=zo(.5,.95,xe);function zo(t,e,n){return s=>s<t?0:s>e?1:n(jn(t,e,s))}function Wo(t,e){t.min=e.min,t.max=e.max}function $o(t,e){Wo(t.x,e.x),Wo(t.y,e.y)}function Ho(t,e,n,s,o){return t=vo(t-=e,1/n,s),void 0!==o&&(t=vo(t,1/o,s)),t}function Yo(t,e,[n,s,o],i,r){!function(t,e=0,n=1,s=.5,o,i=t,r=t){if(it.test(e)){e=parseFloat(e);e=Tn(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=Tn(i.min,i.max,s);t===i&&(a-=e),t.min=Ho(t.min,e,n,a,o),t.max=Ho(t.max,e,n,a,o)}(t,e[n],e[s],e[o],e.scale,i,r)}const Xo=["x","scaleX","originX"],Go=["y","scaleY","originY"];function qo(t,e,n,s){Yo(t.x,e,Xo,n?n.x:void 0,s?s.x:void 0),Yo(t.y,e,Go,n?n.y:void 0,s?s.y:void 0)}function Zo(t){return 0===t.translate&&1===t.scale}function _o(t){return Zo(t.x)&&Zo(t.y)}function Ko(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 Jo(t){return Ks(t.x)/Ks(t.y)}class Qo{constructor(){this.members=[]}add(t){Le(this.members,t),t.scheduleRender()}remove(t){if(De(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 ti(t,e,n){let s="";const o=t.x.translate/e.x,i=t.y.translate/e.y;if((o||i)&&(s=`translate3d(${o}px, ${i}px, 0) `),1===e.x&&1===e.y||(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{rotate:t,rotateX:e,rotateY:o}=n;t&&(s+=`rotate(${t}deg) `),e&&(s+=`rotateX(${e}deg) `),o&&(s+=`rotateY(${o}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 ei=(t,e)=>t.depth-e.depth;class ni{constructor(){this.children=[],this.isDirty=!1}add(t){Le(this.children,t),this.isDirty=!0}remove(t){De(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(ei),this.isDirty=!1,this.children.forEach(t)}}const si=["","X","Y","Z"];let oi=0;const ii={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function ri({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:o}){return class{constructor(t,n={},s=(null==e?void 0:e())){this.id=oi++,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;ii.totalNodes=ii.resolvedTargetDeltas=ii.recalculatedProjection=0,this.nodes.forEach(ui),this.nodes.forEach(fi),this.nodes.forEach(gi),this.nodes.forEach(li),t=ii,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 ni)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new Re),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:o,visualElement:i}=this.options;if(i&&!i.current&&i.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.elementId&&this.root.potentialNodes.delete(this.elementId),n&&(o||s)&&(this.isLayoutDirty=!0),t){let n;const s=()=>this.root.updateBlockedByResize=!1;t(e,()=>{this.root.updateBlockedByResize=!0,n&&n(),n=vs(s,250),T.hasAnimatedSinceResize&&(T.hasAnimatedSinceResize=!1,this.nodes.forEach(mi))})}s&&this.root.registerSharedNode(s,this),!1!==this.options.animate&&i&&(s||o)&&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 o=this.options.transition||i.getDefaultTransition()||wi,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=i.getProps(),c=!this.targetLayout||!Ko(this.targetLayout,s)||n,u=!e&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||u||e&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(t,u);const e={...Vs(o,"layout"),onPlay:r,onComplete:a};(i.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e)}else e||0!==this.animationProgress||mi(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,de.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(yi),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(di);this.isUpdating&&(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(bi),this.potentialNodes.clear()),this.nodes.forEach(pi),this.nodes.forEach(ai),this.nodes.forEach(ci),this.clearAllSnapshots(),pe.update(),pe.preRender(),pe.render())}clearAllSnapshots(){this.nodes.forEach(hi),this.sharedNodes.forEach(vi)}scheduleUpdateProjection(){he.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){he.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(!o)return;const t=this.isLayoutDirty||this.shouldResetTransform,e=this.projectionDelta&&!_o(this.projectionDelta),n=this.getTransformTemplate(),s=n?n(this.latestValues,""):void 0,i=s!==this.prevTransformTemplateValue;t&&(e||fo(this.latestValues)||i)&&(o(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)),Si((s=n).x),Si(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&&(bo(e.x,n.offset.x),bo(e.y,n.offset.y)),e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};$o(e,t);for(let n=0;n<this.path.length;n++){const s=this.path[n],{scroll:o,options:i}=s;if(s!==this.root&&o&&i.layoutScroll){if(o.isRoot){$o(e,t);const{scroll:n}=this.root;n&&(bo(e.x,-n.offset.x),bo(e.y,-n.offset.y))}bo(e.x,o.offset.x),bo(e.y,o.offset.y)}}return e}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};$o(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&&Ao(n,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),fo(s.latestValues)&&Ao(n,s.latestValues)}return fo(this.latestValues)&&Ao(n,this.latestValues),n}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};$o(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!n.instance)continue;if(!fo(n.latestValues))continue;mo(n.latestValues)&&n.updateSnapshot();const s={x:{min:0,max:0},y:{min:0,max:0}};$o(s,n.measurePageBox()),qo(e,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,s)}return fo(this.latestValues)&&qo(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(){var t;const e=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=e.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=e.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=e.isSharedProjectionDirty);if(!((Boolean(this.resumingFrom)||this!==e)&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget))return;const{layout:n,layoutId:s}=this.options;if(this.layout&&(n||s)){if(!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}},so(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),$o(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var o,i,r;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?(o=this.target,i=this.relativeTarget,r=this.relativeParent.target,eo(o.x,i.x,r.x),eo(o.y,i.y,r.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):$o(this.target,this.layout.layoutBox),Eo(this.target,this.targetDelta)):$o(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}},so(this.relativeTargetOrigin,this.target,t.target),$o(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}ii.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!mo(this.parent.latestValues)&&!go(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),s)return;const{layout:o,layoutId:i}=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||!o&&!i)return;$o(this.layoutCorrected,this.layout.layoutBox),function(t,e,n,s=!1){const o=n.length;if(!o)return;let i,r;e.x=e.y=1;for(let a=0;a<o;a++){i=n[a],r=i.projectionDelta;const o=i.instance;o&&o.style&&"contents"===o.style.display||(s&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Ao(t,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Eo(t,r)),s&&fo(i.latestValues)&&Ao(t,i.latestValues))}e.x=wo(e.x),e.y=wo(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,c=this.treeScale.y,u=this.projectionTransform;to(this.projectionDelta,this.layoutCorrected,r,this.latestValues),this.projectionTransform=ti(this.projectionDelta,this.treeScale),this.projectionTransform===u&&this.treeScale.x===a&&this.treeScale.y===c||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",r)),ii.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:{},o={...this.latestValues},i={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),c=this.getStack(),u=!c||c.members.length<=1,l=Boolean(a&&!u&&!0===this.options.crossfade&&!this.path.some(Ei));let h;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var c,d,p,m;xi(i.x,t.x,n),xi(i.y,t.y,n),this.setTargetDelta(i),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(so(r,this.layout.layoutBox,this.relativeParent.layout.layoutBox),c=this.relativeTarget,d=this.relativeTargetOrigin,p=r,m=n,Pi(c.x,d.x,p.x,m),Pi(c.y,d.y,p.y,m),h&&Ko(this.relativeTarget,h)&&(this.isProjectionDirty=!1),h||(h={x:{min:0,max:0},y:{min:0,max:0}}),$o(h,this.relativeTarget)),a&&(this.animationValues=o,function(t,e,n,s,o,i){o?(t.opacity=Tn(0,void 0!==n.opacity?n.opacity:1,Uo(s)),t.opacityExit=Tn(void 0!==e.opacity?e.opacity:1,0,No(s))):i&&(t.opacity=Tn(void 0!==e.opacity?e.opacity:1,void 0!==n.opacity?n.opacity:1,s));for(let o=0;o<jo;o++){const i=`border${Bo[o]}Radius`;let r=Oo(e,i),a=Oo(n,i);if(void 0===r&&void 0===a)continue;r||(r=0),a||(a=0);0===r||0===a||Io(r)===Io(a)?(t[i]=Math.max(Tn(Fo(r),Fo(a),s),0),(it.test(a)||it.test(r))&&(t[i]+="%")):t[i]=a}(e.rotate||n.rotate)&&(t.rotate=Tn(e.rotate||0,n.rotate||0,s))}(o,s,this.latestValues,n,l,u)),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&&(de.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=he.update(()=>{T.hasAnimatedSinceResize=!0,this.currentAnimation=ko(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:o}=t;if(e&&n&&s){if(this!==t&&this.layout&&s&&Ti(this.options.animationType,this.layout.layoutBox,s.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=Ks(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const s=Ks(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+s}$o(e,n),Ao(e,o),to(this.projectionDeltaWithTransform,this.layoutCorrected,e,o)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new Qo);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<si.length;e++){const o="rotate"+si[e];n[o]&&(s[o]=n[o],t.setStaticValue(o,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 o=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,s.opacity="",s.pointerEvents=Ot(t.pointerEvents)||"",s.transform=o?o(this.latestValues,""):"none",s;const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target){const e={};return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=Ot(t.pointerEvents)||""),this.hasProjected&&!fo(this.latestValues)&&(e.transform=o?o({},""):"none",this.hasProjected=!1),e}const r=i.animationValues||i.latestValues;this.applyTransformsToTarget(),s.transform=ti(this.projectionDeltaWithTransform,this.treeScale,r),o&&(s.transform=o(r,s.transform));const{x:a,y:c}=this.projectionDelta;s.transformOrigin=`${100*a.origin}% ${100*c.origin}% 0`,i.animationValues?s.opacity=i===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=i===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],o="none"===s.transform?r[t]:e(r[t],i);if(n){const t=n.length;for(let e=0;e<t;e++)s[n[e]]=o}else s[t]=o}return this.options.layoutId&&(s.pointerEvents=i===this?Ot(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(di),this.root.sharedNodes.clear()}}}function ai(t){t.updateLayout()}function ci(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:o}=t.options,i=n.source!==t.layout.source;"size"===o?lo(t=>{const s=i?n.measuredBox[t]:n.layoutBox[t],o=Ks(s);s.min=e[t].min,s.max=s.min+o}):Ti(o,n.layoutBox,e)&&lo(t=>{const s=i?n.measuredBox[t]:n.layoutBox[t],o=Ks(e[t]);s.max=s.min+o});const r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};to(r,e,n.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};i?to(a,t.applyTransform(s,!0),n.measuredBox):to(a,e,n.layoutBox);const c=!_o(r);let u=!1;if(!t.resumeFrom){const s=t.getClosestProjectingParent();if(s&&!s.resumeFrom){const{snapshot:o,layout:i}=s;if(o&&i){const r={x:{min:0,max:0},y:{min:0,max:0}};so(r,n.layoutBox,o.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};so(a,e,i.layoutBox),Ko(r,a)||(u=!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:c,hasRelativeTargetChanged:u})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function ui(t){ii.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 li(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function hi(t){t.clearSnapshot()}function di(t){t.clearMeasurements()}function pi(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function mi(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0}function fi(t){t.resolveTargetDelta()}function gi(t){t.calcProjection()}function yi(t){t.resetRotation()}function vi(t){t.removeLeadSnapshot()}function xi(t,e,n){t.translate=Tn(e.translate,0,n),t.scale=Tn(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Pi(t,e,n,s){t.min=Tn(e.min,n.min,s),t.max=Tn(e.max,n.max,s)}function Ei(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const wi={duration:.45,ease:[.4,0,.1,1]};function bi(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 Si(t){t.min=Math.round(t.min),t.max=Math.round(t.max)}function Ti(t,e,n){return"position"===t||"preserve-aspect"===t&&!Js(Jo(e),Jo(n),.2)}const Ci=ri({attachResizeListener:(t,e)=>Ht(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ai={current:void 0},Vi=ri({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Ai.current){const t=new Ci(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),Ai.current=t}return Ai.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),Mi=t=>!t.isLayoutDirty&&t.willUpdate(!1);function Li(){const t=new Set,e=new WeakMap,n=()=>t.forEach(Mi);return{add:s=>{t.add(s),e.set(s,s.addEventListener("willUpdate",n))},remove:s=>{t.delete(s);const o=e.get(s);o&&(o(),e.delete(s)),n()},dirty:n}}function Di(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Ri={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!rt.test(t))return t;t=parseFloat(t)}return`${Di(t,e.target.x)}% ${Di(t,e.target.y)}%`}},ki=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Bi(t,e,n=1){yn(n<=4);const[s,o]=function(t){const e=ki.exec(t);if(!e)return[,];const[,n,s]=e;return[n,s]}(t);if(!s)return;const i=window.getComputedStyle(e).getPropertyValue(s);return i?i.trim():X(o)?Bi(o,e,n+1):o}const ji={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,o=t.includes("var("),i=[];o&&(t=t.replace(ki,t=>(i.push(t),"_$css")));const r=Ge.parse(t);if(r.length>5)return s;const a=Ge.createTransformer(t),c="number"!=typeof r[0]?1:0,u=n.x.scale*e.x,l=n.y.scale*e.y;r[0+c]/=u,r[1+c]/=l;const h=Tn(u,l,.5);"number"==typeof r[2+c]&&(r[2+c]/=h),"number"==typeof r[3+c]&&(r[3+c]/=h);let d=a(r);if(o){let t=0;d=d.replace("_$css",()=>{const e=i[t];return t++,e})}return d}},Fi=new Set(["width","height","top","left","right","bottom","x","y"]),Ii=t=>Fi.has(t),Oi=t=>t===Z||t===rt,Ui=(t,e)=>parseFloat(t.split(", ")[e]),Ni=(t,e)=>(n,{transform:s})=>{if("none"===s||!s)return 0;const o=s.match(/^matrix3d\((.+)\)$/);if(o)return Ui(o[1],e);{const e=s.match(/^matrix\((.+)\)$/);return e?Ui(e[1],t):0}},zi=new Set(["x","y","z"]),Wi=I.filter(t=>!zi.has(t));const $i={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:Ni(4,13),y:Ni(5,14)},Hi=(t,e,n={},s={})=>{e={...e},s={...s};const o=Object.keys(e).filter(Ii);let i=[],r=!1;const a=[];if(o.forEach(o=>{const c=t.getValue(o);if(!t.hasValue(o))return;let u=n[o],l=sn(u);const h=e[o];let d;if(It(h)){const t=h.length,e=null===h[0]?1:0;u=h[e],l=sn(u);for(let n=e;n<t;n++)d?yn(sn(h[n])===d):(d=sn(h[n]),yn(d===l||Oi(l)&&Oi(d)))}else d=sn(h);if(l!==d)if(Oi(l)&&Oi(d)){const t=c.get();"string"==typeof t&&c.set(parseFloat(t)),"string"==typeof h?e[o]=parseFloat(h):Array.isArray(h)&&d===rt&&(e[o]=h.map(parseFloat))}else(null==l?void 0:l.transform)&&(null==d?void 0:d.transform)&&(0===u||0===h)?0===u?c.set(d.transform(u)):e[o]=l.transform(h):(r||(i=function(t){const e=[];return Wi.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(o),s[o]=void 0!==s[o]?s[o]:e[o],c.jump(h))}),a.length){const n=a.indexOf("height")>=0?window.pageYOffset:null,o=((t,e,n)=>{const s=e.measureViewportBox(),o=e.current,i=getComputedStyle(o),{display:r}=i,a={};"none"===r&&e.setStaticValue("display",t.display||"block"),n.forEach(t=>{a[t]=$i[t](s,i)}),e.render();const c=e.measureViewportBox();return n.forEach(n=>{const s=e.getValue(n);s&&s.jump(a[n]),t[n]=$i[n](c,i)}),t})(e,t,a);return i.length&&i.forEach(([e,n])=>{t.getValue(e).set(n)}),t.render(),u&&null!==n&&window.scrollTo({top:n}),{target:o,transitionEnd:s}}return{target:e,transitionEnd:s}};function Yi(t,e,n,s){return(t=>Object.keys(t).some(Ii))(e)?Hi(t,e,n,s):{target:e,transitionEnd:s}}const Xi=(t,e,n,s)=>{const o=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=Bi(e,s);n&&t.set(n)});for(const t in e){const o=e[t];if(!X(o))continue;const i=Bi(o,s);i&&(e[t]=i,n&&void 0===n[t]&&(n[t]=o))}return{target:e,transitionEnd:n}}(t,e,s);return Yi(t,e=o.target,n,s=o.transitionEnd)},Gi={current:null},qi={current:!1};function Zi(){if(qi.current=!0,u)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Gi.current=t.matches;t.addListener(e),e()}else Gi.current=!1}const _i=Object.keys(w),Ki=_i.length,Ji=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Qi=g.length;class tr{constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:s,visualState:o},i={}){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=()=>he.render(this.render,!1,!0);const{latestValues:r,renderState:a}=o;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=i,this.isControllingVariants=y(e),this.isVariantNode=v(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:c,...u}=this.scrapeMotionValuesFromProps(e,{});for(const t in u){const e=u[t];void 0!==r[t]&&N(e)&&(e.set(r[t],!1),mn(c)&&c.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)),qi.current||Zi(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Gi.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),de.update(this.notifyUpdate),de.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=O.has(t),s=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&he.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),o=e.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{s(),o()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}loadFeatures({children:t,...e},n,s,o,i){let r,a;for(let t=0;t<Ki;t++){const n=_i[t],{isEnabled:s,Feature:o,ProjectionNode:i,MeasureLayout:c}=w[n];i&&(r=i),s(e)&&(!this.features[n]&&o&&(this.features[n]=new o(this)),c&&(a=c))}if(!this.projection&&r){this.projection=new r(o,this.latestValues,this.parent&&this.parent.projection);const{layoutId:t,layout:n,drag:s,dragConstraints:a,layoutScroll:c,layoutRoot:u}=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:i,layoutScroll:c,layoutRoot:u})}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<Ji.length;e++){const n=Ji[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 o in e){const i=e[o],r=n[o];if(N(i))t.addValue(o,i),mn(s)&&s.add(o);else if(N(r))t.addValue(o,je(i,{owner:t})),mn(s)&&s.remove(o);else if(r!==i)if(t.hasValue(o)){const e=t.getValue(o);!e.hasAnimated&&e.set(i)}else{const e=t.getStaticValue(o);t.addValue(o,je(void 0!==e?e:i,{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<Qi;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=je(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 o=this.getBaseTargetFromProps(this.props,t);return void 0===o||N(o)?void 0!==this.initialValues[t]&&void 0===s?void 0:this.baseTarget[t]:o}on(t,e){return this.events[t]||(this.events[t]=new Re),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class er 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},o){let i=pn(n,t||{},this);if(s&&(e&&(e=s(e)),n&&(n=s(n)),i&&(i=s(i))),o){hn(this,n,i);const t=Xi(this,n,i,e);e=t.transitionEnd,n=t.target}return{transition:t,transitionEnd:e,...n}}}class nr extends er{readValueFromInstance(t,e){if(O.has(e)){const t=Qe(e);return t&&t.default||0}{const s=(n=t,window.getComputedStyle(n)),o=(Y(e)?s.getPropertyValue(e):s[e])||0;return"string"==typeof o?o.trim():o}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return Vo(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 sr(){const t=e.useContext(c);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:s,register:o}=t,i=e.useId();e.useEffect(()=>o(i),[]);return!n&&s?[!1,()=>s&&s(i)]:[!0]}class or extends i.default.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:s}=this.props,{projection:o}=t;F(rr),o&&(e.group&&e.group.add(o),n&&n.register&&s&&n.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),T.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:s,isPresent:o}=this.props,i=n.projection;return i?(i.isPresent=o,s||t.layoutDependency!==e||void 0===e?i.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?i.promote():i.relegate()||he.postRender(()=>{const t=i.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 ir(t){const[n,s]=sr(),o=e.useContext(A);return i.default.createElement(or,{...t,layoutGroup:o,switchLayoutGroup:e.useContext(V),isPresent:n,safeToRemove:s})}const rr={borderRadius:{...Ri,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ri,borderTopRightRadius:Ri,borderBottomLeftRadius:Ri,borderBottomRightRadius:Ri,boxShadow:ji},ar={pan:{Feature:class extends ne{constructor(){super(...arguments),this.removePointerDownListener=xe}onPointerDown(t){this.session=new Hs(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:s}=this.node.getProps();return{onSessionStart:Ro(t),onStart:Ro(e),onMove:n,onEnd:(t,e)=>{delete this.session,s&&he.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=xe,this.removeListeners=xe,this.controls=new Lo(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||xe}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Vi,MeasureLayout:ir}};class cr extends er{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(O.has(e)){const t=Qe(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 ur=(t,e)=>B(t)?new cr(e,{enableHardwareAcceleration:!1}):new nr(e,{enableHardwareAcceleration:!0}),lr={layout:{ProjectionNode:Vi,MeasureLayout:ir}},hr={...zs,...Ae,...ar,...lr},dr=R((t,e)=>$t(t,e,hr,ur));const pr=R($t);function mr(){const t=e.useRef(!1);return l(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function fr(){const t=mr(),[n,s]=e.useState(0),o=e.useCallback(()=>{t.current&&s(n+1)},[n]);return[e.useCallback(()=>he.postRender(o),[o]),n]}class gr extends o.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 yr({children:t,isPresent:n}){const s=e.useId(),i=e.useRef(null),r=e.useRef({width:0,height:0,top:0,left:0});return e.useInsertionEffect(()=>{const{width:t,height:e,top:o,left:a}=r.current;if(n||!i.current||!t||!e)return;i.current.dataset.motionPopId=s;const c=document.createElement("style");return document.head.appendChild(c),c.sheet&&c.sheet.insertRule(`\n [data-motion-pop-id="${s}"] {\n position: absolute !important;\n width: ${t}px !important;\n height: ${e}px !important;\n top: ${o}px !important;\n left: ${a}px !important;\n }\n `),()=>{document.head.removeChild(c)}},[n]),o.createElement(gr,{isPresent:n,childRef:i,sizeRef:r},o.cloneElement(t,{ref:i}))}const vr=({children:t,initial:n,isPresent:s,onExitComplete:i,custom:r,presenceAffectsLayout:a,mode:u})=>{const l=S(xr),h=e.useId(),d=e.useMemo(()=>({id:h,initial:n,isPresent:s,custom:r,onExitComplete:t=>{l.set(t,!0);for(const t of l.values())if(!t)return;i&&i()},register:t=>(l.set(t,!1),()=>l.delete(t))}),a?void 0:[s]);return e.useMemo(()=>{l.forEach((t,e)=>l.set(e,!1))},[s]),o.useEffect(()=>{!s&&!l.size&&i&&i()},[s]),"popLayout"===u&&(t=o.createElement(yr,{isPresent:s},t)),o.createElement(c.Provider,{value:d},t)};function xr(){return new Map}function Pr(t){return e.useEffect(()=>()=>t(),[])}const Er=t=>t.key||"";function wr(t){return"function"==typeof t}const br=t=>!0===t,Sr=({children:t,id:n,inherit:s=!0})=>{const i=e.useContext(A),[r,a]=fr(),c=e.useRef(null),u=i.id;null===c.current&&((t=>br(!0===t)||"id"===t)(s)&&u&&(n=n?u+"-"+n:u),c.current={id:n,group:br(s)&&i.group||Li()});const l=e.useMemo(()=>({...c.current,forceRender:r}),[a]);return o.createElement(A.Provider,{value:l},t)},Tr=e.createContext(null);const Cr=e.forwardRef((function({children:t,as:n="ul",axis:s="y",onReorder:i,values:r,...a},c){const u=S(()=>dr(n)),l=[],h=e.useRef(!1);yn(Boolean(r));const d={axis:s,registerItem:(t,e)=>{e&&-1===l.findIndex(e=>t===e.value)&&(l.push({value:t,layout:e[s]}),l.sort(Vr))},updateOrder:(t,e,n)=>{if(h.current)return;const s=function(t,e,n,s){if(!s)return t;const o=t.findIndex(t=>t.value===e);if(-1===o)return t;const i=s>0?1:-1,r=t[o+i];if(!r)return t;const a=t[o],c=r.layout,u=Tn(c.min,c.max,.5);return 1===i&&a.layout.max+n>u||-1===i&&a.layout.min+n<u?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,[o]=t.splice(e,1);t.splice(s,0,o)}return t}(t,o,o+i):t}(l,t,e,n);l!==s&&(h.current=!0,i(s.map(Ar).filter(t=>-1!==r.indexOf(t))))}};return e.useEffect(()=>{h.current=!1}),o.createElement(u,{...a,ref:c,ignoreStrict:!0},o.createElement(Tr.Provider,{value:d},t))}));function Ar(t){return t.value}function Vr(t,e){return t.layout.min-e.layout.min}function Mr(t){const n=S(()=>je(t)),{isStatic:s}=e.useContext(r);if(s){const[,s]=e.useState(t);e.useEffect(()=>n.on("change",s),[])}return n}function Lr(...t){const e=!Array.isArray(t[0]),n=e?0:-1,s=t[0+n],o=t[1+n],i=t[2+n],r=t[3+n],a=On(o,i,{mixer:(c=i[0],(t=>"object"==typeof t&&t.mix)(c)?c.mix:void 0),...r});var c;return e?a(s):a}function Dr(t,e){const n=Mr(e()),s=()=>n.set(e());return s(),l(()=>{const e=()=>he.update(s,!1,!0),n=t.map(t=>t.on("change",e));return()=>{n.forEach(t=>t()),de.update(s)}}),n}function Rr(t,e,n,s){const o="function"==typeof e?e:Lr(e,n,s);return Array.isArray(t)?kr(t,o):kr([t],([t])=>o(t))}function kr(t,e){const n=S(()=>[]);return Dr(t,()=>{n.length=0;const s=t.length;for(let e=0;e<s;e++)n[e]=t[e].get();return e(n)})}function Br(t,e=0){return N(t)?t:Mr(e)}const jr={Group:Cr,Item:e.forwardRef((function({children:t,style:n={},value:s,as:i="li",onDrag:r,layout:a=!0,...c},u){const l=S(()=>dr(i)),h=e.useContext(Tr),d={x:Br(n.x),y:Br(n.y)},p=Rr([d.x,d.y],([t,e])=>t||e?1:"unset"),m=e.useRef(null);yn(Boolean(h));const{axis:f,registerItem:g,updateOrder:y}=h;return e.useEffect(()=>{g(s,m.current)},[h]),o.createElement(l,{drag:f,...c,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:u,ignoreStrict:!0},t)}))};function Fr(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 Ir=new WeakMap;let Or;function Ur({target:t,contentRect:e,borderBoxSize:n}){var s;null===(s=Ir.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 Nr(t){t.forEach(Ur)}function zr(t,e){Or||"undefined"!=typeof ResizeObserver&&(Or=new ResizeObserver(Nr));const n=Fr(t);return n.forEach(t=>{let n=Ir.get(t);n||(n=new Set,Ir.set(t,n)),n.add(e),null==Or||Or.observe(t)}),()=>{n.forEach(t=>{const n=Ir.get(t);null==n||n.delete(e),(null==n?void 0:n.size)||null==Or||Or.unobserve(t)})}}const Wr=new Set;let $r;function Hr(t){return Wr.add(t),$r||($r=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};Wr.forEach(t=>t(e))},window.addEventListener("resize",$r)),()=>{Wr.delete(t),!Wr.size&&$r&&($r=void 0)}}const Yr={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function Xr(t,e,n,s){const o=n[e],{length:i,position:r}=Yr[e],a=o.current,c=n.time;o.current=t["scroll"+r],o.scrollLength=t["scroll"+i]-t["client"+i],o.offset.length=0,o.offset[0]=0,o.offset[1]=o.scrollLength,o.progress=jn(0,o.scrollLength,o.current);const u=s-c;o.velocity=u>50?0:ke(o.current-a,u)}const Gr={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},qr={start:0,center:.5,end:1};function Zr(t,e,n=0){let s=0;if(void 0!==qr[t]&&(t=qr[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 _r=[0,0];function Kr(t,e,n,s){let o=Array.isArray(t)?t:_r,i=0,r=0;return"number"==typeof t?o=[t,t]:"string"==typeof t&&(o=(t=t.trim()).includes(" ")?t.split(" "):[t,qr[t]?t:"0"]),i=Zr(o[0],n,s),r=Zr(o[1],e),i-r}const Jr={x:0,y:0};function Qr(t,e,n){let{offset:s=Gr.All}=n;const{target:o=t,axis:i="y"}=n,r="y"===i?"height":"width",a=o!==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}(o,t):Jr,c=o===t?{width:t.scrollWidth,height:t.scrollHeight}:{width:o.clientWidth,height:o.clientHeight},u={width:t.clientWidth,height:t.clientHeight};e[i].offset.length=0;let l=!e[i].interpolate;const h=s.length;for(let t=0;t<h;t++){const n=Kr(s[t],u[r],c[r],a[i]);l||n===e[i].interpolatorOffsets[t]||(l=!0),e[i].offset[t]=n}l&&(e[i].interpolate=On(e[i].offset,Un(s)),e[i].interpolatorOffsets=[...e[i].offset]),e[i].progress=e[i].interpolate(e[i].current)}function ta(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){Xr(t,"x",e,n),Xr(t,"y",e,n),e.time=n}(t,n,e),(s.offset||s.target)&&Qr(t,n,s)},notify:()=>e(n)}}const ea=new WeakMap,na=new WeakMap,sa=new WeakMap,oa=t=>t===document.documentElement?window:t;function ia(t,{container:e=document.documentElement,...n}={}){let s=sa.get(e);s||(s=new Set,sa.set(e,s));const o=ta(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(o),!ea.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()};ea.set(e,t);const n=oa(e);window.addEventListener("resize",t,{passive:!0}),e!==document.documentElement&&na.set(e,(r=t,"function"==typeof(i=e)?Hr(i):zr(i,r))),n.addEventListener("scroll",t,{passive:!0})}var i,r;const a=ea.get(e),c=requestAnimationFrame(a);return()=>{var t;cancelAnimationFrame(c);const n=sa.get(e);if(!n)return;if(n.delete(o),n.size)return;const s=ea.get(e);ea.delete(e),s&&(oa(e).removeEventListener("scroll",s),null===(t=na.get(e))||void 0===t||t(),window.removeEventListener("resize",s))}}const ra={any:0,all:1};function aa(t,e,{root:n,margin:s,amount:o="any"}={}){const i=Fr(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 o?o:ra[o]});return i.forEach(t=>a.observe(t)),()=>a.disconnect()}const ca=(t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t},ua={renderer:ur,...zs,...Ae},la={...ua,...ar,...lr};function ha(t,e){gn(Boolean(!e||e.current))}const da=()=>({scrollX:je(0),scrollY:je(0),scrollXProgress:je(0),scrollYProgress:je(0)});function pa({container:t,target:n,layoutEffect:s=!0,...o}={}){const i=S(da);return(s?l:e.useEffect)(()=>(ha(0,n),ha(0,t),ia(({x:t,y:e})=>{i.scrollX.set(t.current),i.scrollXProgress.set(t.progress),i.scrollY.set(e.current),i.scrollYProgress.set(e.progress)},{...o,container:(null==t?void 0:t.current)||void 0,target:(null==n?void 0:n.current)||void 0})),[]),i}function ma(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 he.update(e,!0),()=>de.update(e)},[t])}class fa extends Be{constructor(){super(...arguments),this.members=[],this.transforms=new Set}add(t){let e;O.has(t)?(this.transforms.add(t),e="transform"):t.startsWith("origin")||Y(t)||"willChange"===t||(e=Lt(t)),e&&(Le(this.members,e),this.update())}remove(t){O.has(t)?(this.transforms.delete(t),this.transforms.size||De(this.members,"transform")):De(this.members,Lt(t)),this.update()}update(){this.set(this.members.length?this.members.join(", "):"auto")}}function ga(){!qi.current&&Zi();const[t]=e.useState(Gi.current);return t}function ya(){let t=!1;const e=new Set,n={subscribe:t=>(e.add(t),()=>{e.delete(t)}),start(n,s){yn(t);const o=[];return e.forEach(t=>{o.push(Ls(t,n,{transitionOverride:s}))}),Promise.all(o)},set:n=>(yn(t),e.forEach(t=>{!function(t,e){Array.isArray(e)?ln(t,e):"string"==typeof e?ln(t,[e]):un(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 va(){const t=S(ya);return l(t.mount,[]),t}const xa=va;class Pa{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 Ea=()=>new Pa;function wa(t){return null!==t&&"object"==typeof t&&M in t}function ba(){return Sa}function Sa(t){Ai.current&&(Ai.current.isUpdating=!1,Ai.current.blockUpdate(),t&&t())}const Ta=(t,e)=>`${t}: ${e}`,Ca=new Map;function Aa(t,e,n,s){const o=Ta(t,O.has(e)?"transform":e),i=Ca.get(o);if(!i)return 0;const{animation:r,startTime:a}=i,c=()=>{Ca.delete(o);try{r.cancel()}catch(t){}};if(null!==a){const t=performance.now();return s.update(()=>{n.animation&&(n.animation.currentTime=performance.now()-t)}),s.render(c),t-a||0}return c(),0}const Va=()=>({});class Ma 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 hn(this,n,pn(n,t||{},this)),{transition:t,transitionEnd:e,...n}}}const La=Ut({scrapeMotionValuesFromProps:Va,createRenderState:Va});const Da=t=>t>.001?1/t:1e5;let Ra=!1;let ka=0;t.AnimatePresence=({children:t,custom:n,initial:s=!0,onExitComplete:i,exitBeforeEnter:r,presenceAffectsLayout:a=!0,mode:c="sync"})=>{yn(!r);let[u]=fr();const h=e.useContext(A).forceRender;h&&(u=h);const d=mr(),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(l(()=>{v.current=!1,function(t,e){t.forEach(t=>{const n=Er(t);e.set(n,t)})}(p,y),g.current=m}),Pr(()=>{v.current=!0,y.clear(),f.clear()}),v.current)return o.createElement(o.Fragment,null,m.map(t=>o.createElement(vr,{key:Er(t),isPresent:!0,initial:!!s&&void 0,presenceAffectsLayout:a,mode:c},t)));m=[...m];const x=g.current.map(Er),P=p.map(Er),E=x.length;for(let t=0;t<E;t++){const e=x[t];-1===P.indexOf(e)&&f.add(e)}return"wait"===c&&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,o.createElement(vr,{key:Er(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;u(),i&&i()}},custom:n,presenceAffectsLayout:a,mode:c},e))}),m=m.map(t=>{const e=t.key;return f.has(e)?t:o.createElement(vr,{key:Er(t),isPresent:!0,presenceAffectsLayout:a,mode:c},t)}),o.createElement(o.Fragment,null,f.size?m:m.map(t=>e.cloneElement(t)))},t.AnimateSharedLayout=({children:t})=>(o.useEffect(()=>{yn(!1)},[]),o.createElement(Sr,{id:S(()=>"asl-"+ka++)},t)),t.DragControls=Pa,t.FlatTree=ni,t.LayoutGroup=Sr,t.LayoutGroupContext=A,t.LazyMotion=function({children:t,features:n,strict:s=!1}){const[,i]=e.useState(!wr(n)),r=e.useRef(void 0);if(!wr(n)){const{renderer:t,...e}=n;r.current=t,b(e)}return e.useEffect(()=>{wr(n)&&n().then(({renderer:t,...e})=>{b(e),r.current=t,i(!0)})},[]),o.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 i=e.useMemo(()=>s,[JSON.stringify(s.transition),s.transformPagePoint,s.reducedMotion]);return o.createElement(r.Provider,{value:i},t)},t.MotionConfigContext=r,t.MotionContext=a,t.MotionValue=Be,t.PresenceContext=c,t.Reorder=jr,t.SwitchLayoutGroupContext=V,t.VisualElement=tr,t.addPointerEvent=qt,t.addPointerInfo=Gt,t.addScaleCorrector=F,t.animate=ko,t.animateValue=cs,t.animateVisualElement=Ls,t.animationControls=ya,t.animations=zs,t.anticipate=qn,t.backIn=Xn,t.backInOut=Gn,t.backOut=Yn,t.buildTransform=$,t.calcLength=Ks,t.checkTargetForNewValues=hn,t.circIn=Wn,t.circInOut=Hn,t.circOut=$n,t.clamp=q,t.color=We,t.complex=Ge,t.createBox=uo,t.createDomMotionComponent=function(t){return L($t(t,{forwardMotionProps:!1},hr,ur))},t.createMotionComponent=L,t.cubicBezier=zn,t.delay=vs,t.distance=Ws,t.distance2D=$s,t.domAnimation=ua,t.domMax=la,t.easeIn=wn,t.easeInOut=Sn,t.easeOut=bn,t.filterProps=Et,t.frameData=ie,t.inView=aa,t.inertia=Ps,t.interpolate=On,t.invariant=yn,t.isBrowser=u,t.isDragActive=ee,t.isMotionComponent=wa,t.isMotionValue=N,t.isValidMotionProp=vt,t.m=pr,t.makeUseVisualState=Ut,t.mix=Tn,t.motion=dr,t.motionValue=je,t.optimizedAppearDataAttribute=fn,t.pipe=_t,t.progress=jn,t.px=rt,t.resolveMotionValue=Ot,t.scroll=ia,t.spring=ss,t.startOptimizedAppearAnimation=function(t,e,n,s,o){const i=t.dataset.framerAppearId;if(!i)return;window.HandoffAppearAnimations=Aa;const r=Ta(i,e),a=ds(t,e,[n[0],n[0]],{duration:1e4,ease:"linear"});Ca.set(r,{animation:a,startTime:null});const c=()=>{a.cancel();const i=ds(t,e,n,s);document.timeline&&(i.startTime=document.timeline.currentTime),Ca.set(r,{animation:i,startTime:performance.now()}),o&&o(i)};a.ready?a.ready.then(c).catch(xe):c()},t.sync=he,t.transform=Lr,t.unwrapMotionComponent=function(t){if(wa(t))return t[M]},t.useAnimation=xa,t.useAnimationControls=va,t.useAnimationFrame=ma,t.useCycle=function(...t){const n=e.useRef(0),[s,o]=e.useState(t[n.current]);return[s,e.useCallback(e=>{n.current="number"!=typeof e?ca(0,t.length,n.current+1):e,o(t[n.current])},[t.length,...t])]},t.useDeprecatedAnimatedState=function(t){const[n,s]=e.useState(t),o=La({},!1),i=S(()=>new Ma({props:{},visualState:o,presenceContext:null},{initialState:t}));return e.useEffect(()=>(i.mount({}),()=>i.unmount()),[i]),e.useEffect(()=>{i.update({onUpdate:t=>{s({...t})}},null)},[s,i]),[n,S(()=>t=>Ls(i,t))]},t.useDeprecatedInvertedScale=function(t){let n=Mr(1),s=Mr(1);const{visualElement:o}=e.useContext(a);return yn(!(!t&&!o)),gn(Ra),Ra=!0,t?(n=t.scaleX||n,s=t.scaleY||s):o&&(n=o.getValue("scaleX",1),s=o.getValue("scaleY",1)),{scaleX:Rr(n,Da),scaleY:Rr(s,Da)}},t.useDomEvent=function(t,n,s,o){e.useEffect(()=>{const e=t.current;if(s&&e)return Ht(e,n,s,o)},[t,n,s,o])},t.useDragControls=function(){return S(Ea)},t.useElementScroll=function(t){return pa({container:t})},t.useForceUpdate=fr,t.useInView=function(t,{root:n,margin:s,amount:o,once:i=!1}={}){const[r,a]=e.useState(!1);return e.useEffect(()=>{if(!t.current||i&&r)return;const e={root:n&&n.current||void 0,margin:s,amount:"some"===o?"any":o};return aa(t.current,()=>(a(!0),i?void 0:()=>a(!1)),e)},[n,t,s,i]),r},t.useInstantLayoutTransition=ba,t.useInstantTransition=function(){const[t,n]=fr(),s=ba();return e.useEffect(()=>{he.postRender(()=>he.postRender(()=>xn.current=!1))},[n]),e=>{s(()=>{xn.current=!0,t(),e()})}},t.useIsPresent=function(){return null===(t=e.useContext(c))||t.isPresent;var t},t.useIsomorphicLayoutEffect=l,t.useMotionTemplate=function(t,...e){const n=t.length;return Dr(e.filter(N),(function(){let s="";for(let o=0;o<n;o++){s+=t[o];const n=e[o];n&&(s+=N(n)?n.get():n)}return s}))},t.useMotionValue=Mr,t.useMotionValueEvent=function(t,n,s){e.useInsertionEffect(()=>t.on(n,s),[t,n,s])},t.usePresence=sr,t.useReducedMotion=ga,t.useReducedMotionConfig=function(){const t=ga(),{reducedMotion:n}=e.useContext(r);return"never"!==n&&("always"===n||t)},t.useResetProjection=function(){return o.useCallback(()=>{const t=Ai.current;t&&t.resetTree()},[])},t.useScroll=pa,t.useSpring=function(t,n={}){const{isStatic:s}=e.useContext(r),o=e.useRef(null),i=Mr(N(t)?t.get():t),a=()=>{o.current&&o.current.stop()};return e.useInsertionEffect(()=>i.attach((t,e)=>s?e(t):(a(),o.current=cs({keyframes:[i.get(),t],velocity:i.getVelocity(),type:"spring",...n,onUpdate:e}),i.get()),a),[JSON.stringify(n)]),l(()=>{if(N(t))return t.on("change",t=>i.set(parseFloat(t)))},[i]),i},t.useTime=function(){const t=Mr(0);return ma(e=>t.set(e)),t},t.useTransform=Rr,t.useUnmountEffect=Pr,t.useVelocity=function(t){const n=Mr(t.getVelocity());return e.useEffect(()=>t.on("velocityChange",t=>{n.set(t)}),[t]),n},t.useViewportScroll=function(){return pa()},t.useWillChange=function(){return S(()=>new fa("auto"))},t.warning=gn,t.wrap=ca,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 o=s(e),i=n(e);const r=e.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),a=e.createContext({}),c=e.createContext(null),u="undefined"!=typeof document,l=u?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:i,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=i(m,v);if(!v&&u){P.visualElement=function(t,n,s,o){const{visualElement:i}=e.useContext(a),u=e.useContext(h),d=e.useContext(c),p=e.useContext(r).reducedMotion,m=e.useRef();o=o||u.renderer,!m.current&&o&&(m.current=o(t,{visualState:n,parent:i,props:s,presenceContext:d,blockInitialAnimation:!!d&&!1===d.initial,reducedMotionConfig:p}));const f=m.current;return e.useInsertionEffect(()=>{f&&f.update(s,d)}),l(()=>{f&&f.render()}),e.useEffect(()=>{f&&f.updateFeatures()}),(window.HandoffAppearAnimations?l:e.useEffect)(()=>{f&&f.animationState&&f.animationState.animateChanges()}),f}(p,w,y,n);const s=e.useContext(V),o=e.useContext(h).strict;P.visualElement&&(g=P.visualElement.loadFeatures(y,o,t,E,s))}return o.createElement(a.Provider,{value:P},g&&P.visualElement?o.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 I=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],O=new Set(I);function U(t,{layout:e,layoutId:n}){return O.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=I.length;function $(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},s,o){let i="";for(let e=0;e<W;e++){const n=I[e];if(void 0!==t[n]){i+=`${z[n]||n}(${t[n]}) `}}return e&&!t.z&&(i+="translateZ(0)"),i=i.trim(),o?i=o(t,s?"":i):n&&s&&(i="none"),i}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}`}),ot=st("deg"),it=st("%"),rt=st("px"),at=st("vh"),ct=st("vw"),ut={...it,parse:t=>it.parse(t)/100,transform:t=>it.transform(100*t)},lt={...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:ot,rotateX:ot,rotateY:ot,rotateZ:ot,scale:K,scaleX:K,scaleY:K,scaleZ:K,skew:ot,skewX:ot,skewY:ot,distance:rt,translateX:rt,translateY:rt,translateZ:rt,x:rt,y:rt,z:rt,perspective:rt,transformPerspective:rt,opacity:_,originX:ut,originY:ut,originZ:rt,zIndex:lt,fillOpacity:_,strokeOpacity:_,numOctaves:lt};function dt(t,e,n,s){const{style:o,vars:i,transform:r,transformOrigin:a}=t;let c=!1,u=!1,l=!0;for(const t in e){const n=e[t];if(Y(t)){i[t]=n;continue}const s=ht[t],h=G(n,s);if(O.has(t)){if(c=!0,r[t]=h,!l)continue;n!==(s.default||0)&&(l=!1)}else t.startsWith("origin")?(u=!0,a[t]=h):o[t]=h}if(e.transform||(c||s?o.transform=$(t.transform,n,l,s):o.transform&&(o.transform="none")),u){const{originX:t="50%",originY:e="50%",originZ:n=0}=a;o.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 o={};return mt(o,t.style||{},t),Object.assign(o,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(o):o}function gt(t,e,n){const s={},o=ft(t,e,n);return t.drag&&!1!==t.dragListener&&(s.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.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=o,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 o in t)"values"===o&&"object"==typeof t.values||(xt(o)||!0===n&&vt(o)||!e&&!vt(o)||t.draggable&&o.startsWith("onDrag"))&&(s[o]=t[o]);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:o,pathLength:i,pathSpacing:r=1,pathOffset:a=0,...c},u,l,h){if(dt(t,c,u,h),l)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!==o||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!==o?o:.5)),void 0!==e&&(d.x=e),void 0!==n&&(d.y=n),void 0!==i&&function(t,e,n=1,s=0,o=!0){t.pathLength=1;const i=o?bt:St;t[i.offset]=rt.transform(-s);const r=rt.transform(e),a=rt.transform(n);t[i.array]=`${r} ${a}`}(d,i,r,a,!1)}const Ct=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),At=t=>"string"==typeof t&&"svg"===t.toLowerCase();function Vt(t,n,s,o){const i=e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Tt(e,n,{enableHardwareAcceleration:!1},At(o),t.transformTemplate),{...e.attrs,style:{...e.style}}},[n]);if(t.style){const e={};mt(e,t.style,t),i.style={...e,...i.style}}return i}function Mt(t=!1){return(n,s,o,i,{latestValues:r},a)=>{const c=(B(n)?Vt:gt)(s,r,a,n),u={...Et(s,"string"==typeof n,t),...c,ref:i},{children:l}=s,h=e.useMemo(()=>N(l)?l.get():l,[l]);return o&&(u["data-projection-id"]=o),e.createElement(n,{...u,children:h})}}const Lt=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function Dt(t,{style:e,vars:n},s,o){Object.assign(t.style,e,o&&o.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 o in n)(N(n[o])||e.style&&N(e.style[o])||U(o,t))&&(s[o]=n[o]);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={},o={}){return"function"==typeof e&&(e=e(void 0!==n?n:t.custom,s,o)),"string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e&&(e=e(void 0!==n?n:t.custom,s,o)),e}const It=t=>Array.isArray(t);function Ot(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 o=e.useContext(a),i=e.useContext(c),r=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},s,o,i){const r={latestValues:Nt(s,o,i,t),renderState:e()};return n&&(r.mount=t=>n(s,t,r)),r}(t,n,o,i);return s?r():S(r)};function Nt(t,e,n,s){const o={},i=s(t,{});for(const t in i)o[t]=Ot(i[t]);let{initial:r,animate:a}=t;const c=y(t),u=v(t);e&&u&&!c&&!1!==t.inherit&&(void 0===r&&(r=e.initial),void 0===a&&(a=e.animate));let l=!!n&&!1===n.initial;l=l||!1===r;const h=l?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:i,...r}=n;for(const t in r){let e=r[t];if(Array.isArray(e)){e=e[l?e.length-1:0]}null!==e&&(o[t]=e)}for(const t in s)o[t]=s[t]})}return o}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="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),oe="undefined"!=typeof window?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(se()),1/60*1e3);const ie={delta:0,timestamp:0};let re=!0,ae=!1,ce=!1;const ue=["read","update","preRender","render","postRender"],le=ue.reduce((t,e)=>(t[e]=function(t){let e=[],n=[],s=0,o=!1,i=!1;const r=new WeakSet,a={schedule:(t,i=!1,a=!1)=>{const c=a&&o,u=c?e:n;return i&&r.add(t),-1===u.indexOf(t)&&(u.push(t),c&&o&&(s=e.length)),t},cancel:t=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1),r.delete(t)},process:c=>{if(o)i=!0;else{if(o=!0,[e,n]=[n,e],n.length=0,s=e.length,s)for(let n=0;n<s;n++){const s=e[n];s(c),r.has(s)&&(a.schedule(s),t())}o=!1,i&&(i=!1,a.process(c))}}};return a}(()=>ae=!0),t),{}),he=ue.reduce((t,e)=>{const n=le[e];return t[e]=(t,e=!1,s=!1)=>(ae||ge(),n.schedule(t,e,s)),t},{}),de=ue.reduce((t,e)=>(t[e]=le[e].cancel,t),{}),pe=ue.reduce((t,e)=>(t[e]=()=>le[e].process(ie),t),{}),me=t=>le[t].process(ie),fe=t=>{ae=!1,ie.delta=re?1/60*1e3:Math.max(Math.min(t-ie.timestamp,40),1),ie.timestamp=t,ce=!0,ue.forEach(me),ce=!1,ae&&(re=!1,oe(fe))},ge=()=>{ae=!0,re=!0,ce||oe(fe)};function ye(t,e){const n="pointer"+(e?"enter":"leave"),s="onHover"+(e?"Start":"End");return qt(t.current,n,(n,o)=>{if("touch"===n.type||ee())return;const i=t.getProps();t.animationState&&i.whileHover&&t.animationState.setActive("whileHover",e),i[s]&&he.update(()=>i[s](n,o))},{passive:!t.getProps()[s]})}const ve=(t,e)=>!!e&&(t===e||ve(t,e.parentElement)),xe=t=>t;function Pe(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,Xt(n))}const Ee=new WeakMap,we=new WeakMap,be=t=>{const e=Ee.get(t.target);e&&e(t)},Se=t=>{t.forEach(be)};function Te(t,e,n){const s=function({root:t,...e}){const n=t||document;we.has(n)||we.set(n,{});const s=we.get(n),o=JSON.stringify(e);return s[o]||(s[o]=new IntersectionObserver(Se,{root:t,...e})),s[o]}(e);return Ee.set(t,n),s.observe(t),()=>{Ee.delete(t),s.unobserve(t)}}const Ce={some:0,all:1};const Ae={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:o}=t,i={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof s?s:Ce[s]};return Te(this.node.current,i,t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,o&&!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(),i=e?n:s;i&&i(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=xe,this.removeEndListeners=xe,this.removeAccessibleListeners=xe,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();he.update(()=>{ve(this.node.current,t.target)?n&&n(t,e):s&&s(t,e)})},{passive:!(n.onTap||n.onPointerUp)}),o=qt(window,"pointercancel",(t,e)=>this.cancelPress(t,e),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=_t(s,o),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()&&Pe("up",(t,e)=>{const{onTap:n}=this.node.getProps();n&&he.update(()=>n(t,e))})}),Pe("down",(t,e)=>{this.startPress(t,e)})}),e=Ht(this.node.current,"blur",()=>{this.isPressing&&Pe("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&&he.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&&he.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(ye(this.node,!0),ye(this.node,!1))}unmount(){}}}};function Ve(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 Me=t=>/^0[^.\s]+$/.test(t);function Le(t,e){-1===t.indexOf(e)&&t.push(e)}function De(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class Re{constructor(){this.subscriptions=[]}add(t){return Le(this.subscriptions,t),()=>De(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 o=0;o<s;o++){const s=this.subscriptions[o];s&&s(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function ke(t,e){return e?t*(1e3/e):0}class Be{constructor(t,e={}){var n;this.version="10.2.2",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}=ie;this.lastUpdated!==s&&(this.timeDelta=n,this.lastUpdated=s,he.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=()=>he.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 Re);const n=this.events[t].add(e);return"change"===t?()=>{n(),he.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?ke(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e)||null,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(){this.animation=null}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function je(t,e){return new Be(t,e)}const Fe=(t,e)=>n=>Boolean(nt(n)&&et.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),Ie=(t,e,n)=>s=>{if(!nt(s))return s;const[o,i,r,a]=s.match(Q);return{[t]:parseFloat(o),[e]:parseFloat(i),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},Oe={...Z,transform:t=>Math.round((t=>q(0,255,t))(t))},Ue={test:Fe("rgb","red"),parse:Ie("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+Oe.transform(t)+", "+Oe.transform(e)+", "+Oe.transform(n)+", "+J(_.transform(s))+")"};const Ne={test:Fe("#"),parse:function(t){let e="",n="",s="",o="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),o=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),o=t.substring(4,5),e+=e,n+=n,s+=s,o+=o),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:o?parseInt(o,16)/255:1}},transform:Ue.transform},ze={test:Fe("hsl","hue"),parse:Ie("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+it.transform(J(e))+", "+it.transform(J(n))+", "+J(_.transform(s))+")"},We={test:t=>Ue.test(t)||Ne.test(t)||ze.test(t),parse:t=>Ue.test(t)?Ue.parse(t):ze.test(t)?ze.parse(t):Ne.parse(t),transform:t=>nt(t)?t:t.hasOwnProperty("red")?Ue.transform(t):ze.transform(t)};function $e(t){"number"==typeof t&&(t=""+t);const e=[];let n=0,s=0;const o=t.match(tt);o&&(n=o.length,t=t.replace(tt,"${c}"),e.push(...o.map(We.parse)));const i=t.match(Q);return i&&(s=i.length,t=t.replace(Q,"${n}"),e.push(...i.map(Z.parse))),{values:e,numColors:n,numNumbers:s,tokenised:t}}function He(t){return $e(t).values}function Ye(t){const{values:e,numColors:n,tokenised:s}=$e(t),o=e.length;return t=>{let e=s;for(let s=0;s<o;s++)e=e.replace(s<n?"${c}":"${n}",s<n?We.transform(t[s]):J(t[s]));return e}}const Xe=t=>"number"==typeof t?0:t;const Ge={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:He,createTransformer:Ye,getAnimatableNone:function(t){const e=He(t);return Ye(t)(e.map(Xe))}},qe=new Set(["brightness","contrast","saturate","opacity"]);function Ze(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 o=n.replace(s,"");let i=qe.has(e)?1:0;return s!==n&&(i*=100),e+"("+i+o+")"}const _e=/([a-z-]*)\(.*?\)/g,Ke={...Ge,getAnimatableNone:t=>{const e=t.match(_e);return e?e.map(Ze).join(" "):t}},Je={...ht,color:We,backgroundColor:We,outlineColor:We,fill:We,stroke:We,borderColor:We,borderTopColor:We,borderRightColor:We,borderBottomColor:We,borderLeftColor:We,filter:Ke,WebkitFilter:Ke},Qe=t=>Je[t];function tn(t,e){let n=Qe(t);return n!==Ke&&(n=Ge),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const en=t=>e=>e.test(t),nn=[Z,rt,it,ot,ct,at,{test:t=>"auto"===t,parse:t=>t}],sn=t=>nn.find(en(t)),on=[...nn,We,Ge],rn=t=>on.find(en(t));function an(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 cn(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,je(n))}function un(t,e){const n=an(t,e);let{transitionEnd:s={},transition:o={},...i}=n?t.makeTargetAnimatable(n,!1):{};i={...i,...s};for(const e in i){cn(t,e,(r=i[e],It(r)?r[r.length-1]||0:r))}var r}function ln(t,e){[...e].reverse().forEach(n=>{const s=t.getVariant(n);s&&un(t,s),t.variantChildren&&t.variantChildren.forEach(t=>{ln(t,e)})})}function hn(t,e,n){var s,o;const i=Object.keys(e).filter(e=>!t.hasValue(e)),r=i.length;if(r)for(let a=0;a<r;a++){const r=i[a],c=e[r];let u=null;Array.isArray(c)&&(u=c[0]),null===u&&(u=null!==(o=null!==(s=n[r])&&void 0!==s?s:t.readValue(r))&&void 0!==o?o:e[r]),null!=u&&("string"==typeof u&&(/^\-?\d*\.?\d+$/.test(u)||Me(u))?u=parseFloat(u):!rn(u)&&Ge.test(c)&&(u=tn(r,c)),t.addValue(r,je(u,{owner:t})),void 0===n[r]&&(n[r]=u),null!==u&&t.setBaseTarget(r,u))}}function dn(t,e){if(!e)return;return(e[t]||e.default||e).from}function pn(t,e,n){const s={};for(const o in t){const t=dn(o,e);if(void 0!==t)s[o]=t;else{const t=n.getValue(o);t&&(s[o]=t.get())}}return s}function mn(t){return Boolean(N(t)&&t.add)}const fn="data-"+Lt("framerAppearId");let gn=xe,yn=xe;const vn=t=>1e3*t,xn={current:!1},Pn=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,En=t=>e=>1-t(1-e),wn=t=>t*t,bn=En(wn),Sn=Pn(wn),Tn=(t,e,n)=>-n*t+n*e+t;function Cn(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 An=(t,e,n)=>{const s=t*t;return Math.sqrt(Math.max(0,n*(e*e-s)+s))},Vn=[Ne,Ue,ze];function Mn(t){const e=(n=t,Vn.find(t=>t.test(n)));var n;yn(Boolean(e));let s=e.parse(t);return e===ze&&(s=function({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,n/=100;let o=0,i=0,r=0;if(e/=100){const s=n<.5?n*(1+e):n+e-n*e,a=2*n-s;o=Cn(a,s,t+1/3),i=Cn(a,s,t),r=Cn(a,s,t-1/3)}else o=i=r=n;return{red:Math.round(255*o),green:Math.round(255*i),blue:Math.round(255*r),alpha:s}}(s)),s}const Ln=(t,e)=>{const n=Mn(t),s=Mn(e),o={...n};return t=>(o.red=An(n.red,s.red,t),o.green=An(n.green,s.green,t),o.blue=An(n.blue,s.blue,t),o.alpha=Tn(n.alpha,s.alpha,t),Ue.transform(o))};function Dn(t,e){return"number"==typeof t?n=>Tn(t,e,n):We.test(t)?Ln(t,e):Bn(t,e)}const Rn=(t,e)=>{const n=[...t],s=n.length,o=t.map((t,n)=>Dn(t,e[n]));return t=>{for(let e=0;e<s;e++)n[e]=o[e](t);return n}},kn=(t,e)=>{const n={...t,...e},s={};for(const o in n)void 0!==t[o]&&void 0!==e[o]&&(s[o]=Dn(t[o],e[o]));return t=>{for(const e in s)n[e]=s[e](t);return n}},Bn=(t,e)=>{const n=Ge.createTransformer(e),s=$e(t),o=$e(e);return s.numColors===o.numColors&&s.numNumbers>=o.numNumbers?_t(Rn(s.values,o.values),n):(gn(!0),n=>""+(n>0?e:t))},jn=(t,e,n)=>{const s=e-t;return 0===s?1:(n-t)/s},Fn=(t,e)=>n=>Tn(t,e,n);function In(t,e,n){const s=[],o=n||("number"==typeof(i=t[0])?Fn:"string"==typeof i?We.test(i)?Ln:Bn:Array.isArray(i)?Rn:"object"==typeof i?kn:Fn);var i;const r=t.length-1;for(let n=0;n<r;n++){let i=o(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]:e;i=_t(t,i)}s.push(i)}return s}function On(t,e,{clamp:n=!0,ease:s,mixer:o}={}){const i=t.length;yn(i===e.length),yn(!s||!Array.isArray(s)||s.length===i-1),t[0]>t[i-1]&&(t=[...t].reverse(),e=[...e].reverse());const r=In(e,s,o),a=r.length,c=e=>{let n=0;if(a>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const s=jn(t[n],t[n+1],e);return r[n](s)};return n?e=>c(q(t[0],t[i-1],e)):c}function Un(t){const e=[0];return function(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const o=jn(0,e,s);t.push(Tn(n,1,o))}}(e,t.length-1),e}const Nn=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function zn(t,e,n,s){if(t===e&&n===s)return xe;const o=e=>function(t,e,n,s,o){let i,r,a=0;do{r=e+(n-e)/2,i=Nn(r,s,o)-t,i>0?n=r:e=r}while(Math.abs(i)>1e-7&&++a<12);return r}(e,0,1,t,n);return t=>0===t||1===t?t:Nn(o(t),e,s)}const Wn=t=>1-Math.sin(Math.acos(t)),$n=En(Wn),Hn=Pn($n),Yn=zn(.33,1.53,.69,.99),Xn=En(Yn),Gn=Pn(Xn),qn=t=>(t*=2)<1?.5*Xn(t):.5*(2-Math.pow(2,-10*(t-1))),Zn={linear:xe,easeIn:wn,easeInOut:Sn,easeOut:bn,circIn:Wn,circInOut:Hn,circOut:$n,backIn:Xn,backInOut:Gn,backOut:Yn,anticipate:qn},_n=t=>{if(Array.isArray(t)){yn(4===t.length);const[e,n,s,o]=t;return zn(e,n,s,o)}return"string"==typeof t?(yn(void 0!==Zn[t]),Zn[t]):t};function Kn({keyframes:t,ease:e=Sn,times:n,duration:s=300}){t=[...t];const o=(t=>Array.isArray(t)&&"number"!=typeof t[0])(e)?e.map(_n):_n(e),i={done:!1,value:t[0]},r=function(t,e){return t.map(t=>t*e)}(n&&n.length===t.length?n:Un(t),s);function a(){return On(r,t,{ease:Array.isArray(o)?o:(e=t,n=o,e.map(()=>n||Sn).splice(0,e.length-1))});var e,n}let c=a();return{next:t=>(i.value=c(t),i.done=t>=s,i),flipTarget:()=>{t.reverse(),c=a()}}}function Jn({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let o,i;gn(t<=1e4);let r=1-e;r=q(.05,1,r),t=q(.01,10,t/1e3),r<1?(o=e=>{const s=e*r,o=s*t;return.001-(s-n)/Qn(e,r)*Math.exp(-o)},i=e=>{const s=e*r*t,i=s*n+n,a=Math.pow(r,2)*Math.pow(e,2)*t,c=Math.exp(-s),u=Qn(Math.pow(e,2),r);return(.001-o(e)>0?-1:1)*((i-a)*c)/u}):(o=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,i=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}(o,i,5/t);if(t*=1e3,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 Qn(t,e){return t*Math.sqrt(1-e*e)}const ts=["duration","bounce"],es=["stiffness","damping","mass"];function ns(t,e){return e.some(e=>void 0!==t[e])}function ss({keyframes:t,restDelta:e,restSpeed:n,...s}){let o=t[0],i=t[t.length-1];const r={done:!1,value:o},{stiffness:a,damping:c,mass:u,velocity:l,duration:h,isResolvedFromDuration:d}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!ns(t,es)&&ns(t,ts)){const n=Jn(t);e={...e,...n,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}(s);let p=os,m=l?-l/1e3:0;const f=c/(2*Math.sqrt(a*u));function g(){const t=i-o,s=Math.sqrt(a/u)/1e3,r=Math.abs(t)<5;if(n||(n=r?.01:2),e||(e=r?.005:.5),f<1){const e=Qn(s,f);p=n=>{const o=Math.exp(-f*s*n);return i-o*((m+f*s*t)/e*Math.sin(e*n)+t*Math.cos(e*n))}}else if(1===f)p=e=>i-Math.exp(-s*e)*(t+(m+s*t)*e);else{const e=s*Math.sqrt(f*f-1);p=n=>{const o=Math.exp(-f*s*n),r=Math.min(e*n,300);return i-o*((m+f*s*t)*Math.sinh(r)+e*t*Math.cosh(r))/e}}}return g(),{next:t=>{const s=p(t);if(d)r.done=t>=h;else{let o=m;if(0!==t)if(f<1){const e=Math.max(0,t-5);o=ke(s-p(e),t-e)}else o=0;const a=Math.abs(o)<=n,c=Math.abs(i-s)<=e;r.done=a&&c}return r.value=r.done?i:s,r},flipTarget:()=>{m=-m,[o,i]=[i,o],g()}}}ss.needsInterpolation=(t,e)=>"string"==typeof t||"string"==typeof e;const os=t=>0;const is={decay:function({keyframes:t=[0],velocity:e=0,power:n=.8,timeConstant:s=350,restDelta:o=.5,modifyTarget:i}){const r=t[0],a={done:!1,value:r};let c=n*e;const u=r+c,l=void 0===i?u:i(u);return l!==u&&(c=l-r),{next:t=>{const e=-c*Math.exp(-t/s);return a.done=!(e>o||e<-o),a.value=a.done?l:l+e,a},flipTarget:()=>{}}},keyframes:Kn,tween:Kn,spring:ss};function rs(t,e,n=0){return t-e-n}const as=t=>{const e=({delta:e})=>t(e);return{start:()=>he.update(e,!0),stop:()=>de.update(e)}};function cs({duration:t,driver:e=as,elapsed:n=0,repeat:s=0,repeatType:o="loop",repeatDelay:i=0,keyframes:r,autoplay:a=!0,onPlay:c,onStop:u,onComplete:l,onRepeat:h,onUpdate:d,type:p="keyframes",...m}){const f=n;let g,y,v=0,x=t,P=!1,E=!0;const w=is[r.length>2?"keyframes":p]||Kn,b=r[0],S=r[r.length-1];let T={done:!1,value:b};const{needsInterpolation:C}=w;C&&C(b,S)&&(y=On([0,100],[b,S],{clamp:!1}),r=[0,100]);const A=w({...m,duration:t,keyframes:r});function V(){v++,"reverse"===o?(E=v%2==0,n=function(t,e=0,n=0,s=!0){return s?rs(e+-t,e,n):e-(t-e)+n}(n,x,i,E)):(n=rs(n,x,i),"mirror"===o&&A.flipTarget()),P=!1,h&&h()}function M(t){E||(t=-t),n+=t,P||(T=A.next(Math.max(0,n)),y&&(T.value=y(T.value)),P=E?T.done:n<=0),d&&d(T.value),P&&(0===v&&(x=void 0!==x?x:n),v<s?function(t,e,n,s){return s?t>=e+n:t<=-n}(n,x,i,E)&&V():(g&&g.stop(),l&&l()))}return a&&(c&&c(),g=e(M),g.start()),{stop:()=>{u&&u(),g&&g.stop()},set currentTime(t){n=f,M(t)},sample:(e,s=!1)=>{if(n=f,s)return M(e),T;const o=t&&"number"==typeof t?Math.max(.5*t,50):50;let i=0;for(M(0);i<=e;){const t=e-i;M(Math.min(t,o)),i+=o}return T}}}const us=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,ls={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:us([0,.65,.55,1]),circOut:us([.55,0,1,.45]),backIn:us([.31,.01,.66,-.59]),backOut:us([.33,1.53,.69,.99])};function hs(t){if(t)return Array.isArray(t)?us(t):ls[t]}function ds(t,e,n,{delay:s=0,duration:o,repeat:i=0,repeatType:r="loop",ease:a,times:c}={}){const u={[e]:n};return c&&(u.offset=c),t.animate(u,{delay:s,duration:o,easing:hs(a),fill:"both",iterations:i+1,direction:"reverse"===r?"alternate":"normal"})}const ps={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},ms={},fs={};for(const t in ps)fs[t]=()=>(void 0===ms[t]&&(ms[t]=ps[t]()),ms[t]);const gs=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),ys=(t,e)=>{return"spring"===e.type||"backgroundColor"===t||!(!(n=e.ease)||Array.isArray(n)||"string"==typeof n&&ls[n]);var n};function vs(t,e){const n=performance.now(),s=({timestamp:o})=>{const i=o-n;i>=e&&(de.read(s),t(i-e))};return he.read(s,!0),()=>de.read(s)}function xs({keyframes:t,elapsed:e,onUpdate:n,onComplete:s}){const o=()=>{n&&n(t[t.length-1]),s&&s()};return e?{stop:vs(o,-e)}:o()}function Ps({keyframes:t,velocity:e=0,min:n,max:s,power:o=.8,timeConstant:i=750,bounceStiffness:r=500,bounceDamping:a=10,restDelta:c=1,modifyTarget:u,driver:l,onUpdate:h,onComplete:d,onStop:p}){const m=t[0];let f;function g(t){return void 0!==n&&t<n||void 0!==s&&t>s}function y(t){return void 0===n?s:void 0===s||Math.abs(n-t)<Math.abs(s-t)?n:s}function v(t){f&&f.stop(),f=cs({keyframes:[0,1],velocity:0,...t,driver:l,onUpdate:e=>{h&&h(e),t.onUpdate&&t.onUpdate(e)},onComplete:d,onStop:p})}function x(t){v({type:"spring",stiffness:r,damping:a,restDelta:c,...t})}if(g(m))x({velocity:e,keyframes:[m,y(m)]});else{let t=o*e+m;void 0!==u&&(t=u(t));const s=y(t),r=s===n?-1:1;let a,l;const h=t=>{a=l,l=t,e=ke(t-a,ie.delta),(1===r&&t>s||-1===r&&t<s)&&x({keyframes:[t,s],velocity:e})};v({type:"decay",keyframes:[m,0],velocity:e,timeConstant:i,power:o,restDelta:c,modifyTarget:u,onUpdate:g(t)?h:void 0})}return{stop:()=>f&&f.stop()}}const Es={type:"spring",stiffness:500,damping:25,restSpeed:10},ws={type:"keyframes",duration:.8},bs={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ss=(t,{keyframes:e})=>e.length>2?ws:O.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:Es:bs,Ts=(t,e)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!Ge.test(e)||e.startsWith("url(")));function Cs(t){return 0===t||"string"==typeof t&&0===parseFloat(t)&&-1===t.indexOf(" ")}function As(t){return"number"==typeof t?0:tn("",t)}function Vs(t,e){return t[e]||t.default||t}const Ms=(t,e,n,s={})=>o=>{const i=Vs(s,t)||{},r=i.delay||s.delay||0;let{elapsed:a=0}=s;a-=vn(r);const c=function(t,e,n,s){const o=Ts(e,n);let i=void 0!==s.from?s.from:t.get();return"none"===i&&o&&"string"==typeof n?i=tn(e,n):Cs(i)&&"string"==typeof n?i=As(n):!Array.isArray(n)&&Cs(n)&&"string"==typeof i&&(n=As(i)),Array.isArray(n)?(null===n[0]&&(n[0]=i),n):[i,n]}(e,t,n,i),u=c[0],l=c[c.length-1],h=Ts(t,u),d=Ts(t,l);gn(h===d);let p={keyframes:c,velocity:e.getVelocity(),...i,elapsed:a,onUpdate:t=>{e.set(t),i.onUpdate&&i.onUpdate(t)},onComplete:()=>{o(),i.onComplete&&i.onComplete()}};if(!h||!d||xn.current||!1===i.type)return xs(p);if("inertia"===i.type)return Ps(p);if(function({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:o,repeat:i,repeatType:r,repeatDelay:a,from:c,elapsed:u,...l}){return!!Object.keys(l).length}(i)||(p={...p,...Ss(t,p)}),p.duration&&(p.duration=vn(p.duration)),p.repeatDelay&&(p.repeatDelay=vn(p.repeatDelay)),e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const n=function(t,e,{onUpdate:n,onComplete:s,...o}){if(!(fs.waapi()&&gs.has(e)&&!o.repeatDelay&&"mirror"!==o.repeatType&&0!==o.damping))return!1;let{keyframes:i,duration:r=300,elapsed:a=0,ease:c}=o;if(ys(e,o)){const t=cs({...o,repeat:0,elapsed:0});let e={done:!1,value:i[0]};const n=[];let s=0;for(;!e.done&&s<2e4;)e=t.sample(s,!0),n.push(e.value),s+=10;i=n,r=s-10,c="linear"}const u=ds(t.owner.current,e,i,{...o,delay:-a,duration:r,ease:c});return u.onfinish=()=>{t.set(function(t,{repeat:e,repeatType:n="loop"}){return t[e&&"loop"!==n&&e%2==1?0:t.length-1]}(i,o)),he.update(()=>u.cancel()),s&&s()},{get currentTime(){return u.currentTime||0},set currentTime(t){u.currentTime=t},stop:()=>{const{currentTime:e}=u;if(e){const n=cs({...o,autoplay:!1});t.setWithVelocity(n.sample(e-10).value,n.sample(e).value,10)}he.update(()=>u.cancel())}}}(e,t,p);if(n)return n}return cs(p)};function Ls(t,e,n={}){let s;if(t.notify("AnimationStart",e),Array.isArray(e)){const o=e.map(e=>Ds(t,e,n));s=Promise.all(o)}else if("string"==typeof e)s=Ds(t,e,n);else{const o="function"==typeof e?an(t,e,n.custom):e;s=Rs(t,o,n)}return s.then(()=>t.notify("AnimationComplete",e))}function Ds(t,e,n={}){const s=an(t,e,n.custom);let{transition:o=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(o=n.transitionOverride);const i=s?()=>Rs(t,s,n):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(s=0)=>{const{delayChildren:i=0,staggerChildren:r,staggerDirection:a}=o;return function(t,e,n=0,s=0,o=1,i){const r=[],a=(t.variantChildren.size-1)*s,c=1===o?(t=0)=>t*s:(t=0)=>a-t*s;return Array.from(t.variantChildren).sort(ks).forEach((t,s)=>{t.notify("AnimationStart",e),r.push(Ds(t,e,{...i,delay:n+c(s)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(r)}(t,e,i+s,r,a,n)}:()=>Promise.resolve(),{when:a}=o;if(a){const[t,e]="beforeChildren"===a?[i,r]:[r,i];return t().then(e)}return Promise.all([i(),r(n.delay)])}function Rs(t,e,{delay:n=0,transitionOverride:s,type:o}={}){let{transition:i=t.getDefaultTransition(),transitionEnd:r,...a}=t.makeTargetAnimatable(e);const c=t.getValue("willChange");s&&(i=s);const u=[],l=o&&t.animationState&&t.animationState.getState()[o];for(const e in a){const s=t.getValue(e),o=a[e];if(!s||void 0===o||l&&Bs(l,e))continue;const r={delay:n,elapsed:0,...i};if(window.HandoffAppearAnimations&&!s.hasAnimated){const n=t.getProps()[fn];n&&(r.elapsed=window.HandoffAppearAnimations(n,e,s,he))}let h=s.start(Ms(e,s,o,t.shouldReduceMotion&&O.has(e)?{type:!1}:r));mn(c)&&(c.add(e),h=h.then(()=>c.remove(e))),u.push(h)}return Promise.all(u).then(()=>{r&&un(t,r)})}function ks(t,e){return t.sortNodePosition(e)}function Bs({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,s}const js=[...f].reverse(),Fs=f.length;function Is(t){let e=function(t){return e=>Promise.all(e.map(({animation:e,options:n})=>Ls(t,e,n)))}(t);const n={animate:Us(!0),whileInView:Us(),whileHover:Us(),whileTap:Us(),whileDrag:Us(),whileFocus:Us(),exit:Us()};let s=!0;const o=(e,n)=>{const s=an(t,n);if(s){const{transition:t,transitionEnd:n,...o}=s;e={...e,...o,...n}}return e};function i(i,r){const a=t.getProps(),c=t.getVariantContext(!0)||{},u=[],l=new Set;let h={},d=1/0;for(let e=0;e<Fs;e++){const f=js[e],g=n[f],y=void 0!==a[f]?a[f]:c[f],v=p(y),x=f===r?g.isActive:null;!1===x&&(d=e);let P=y===c[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=Os(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(o,{});!1===x&&(S={});const{prevResolvedValues:T={}}=g,C={...T,...S},A=t=>{w=!0,l.delete(t),g.needsAnimating[t]=!0};for(const t in C){const e=S[t],n=T[t];h.hasOwnProperty(t)||(e!==n?It(e)&&It(n)?!Ve(e,n)||E?A(t):g.protectedKeys[t]=!0:void 0!==e?A(t):l.add(t):void 0!==e&&l.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&&u.push(...b.map(t=>({animation:t,options:{type:f,...i}})))}if(l.size){const e={};l.forEach(n=>{const s=t.getBaseTarget(n);void 0!==s&&(e[n]=s)}),u.push({animation:e})}let f=Boolean(u.length);return s&&!1===a.initial&&!t.manuallyAnimateOnMount&&(f=!1),s=!1,f?e(u):Promise.resolve()}return{animateChanges:i,setActive:function(e,s,o){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=i(o,e);for(const t in n)n[t].protectedKeys={};return a},setAnimateFunction:function(n){e=n(t)},getState:()=>n}}function Os(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!Ve(e,t)}function Us(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}let Ns=0;const zs={animation:{Feature:class extends ne{constructor(t){super(t),t.animationState||(t.animationState=Is(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=Ns++}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 o=this.node.animationState.setActive("exit",!t,{custom:null!=n?n:this.node.getProps().custom});e&&!t&&o.then(()=>e(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}}},Ws=(t,e)=>Math.abs(t-e);function $s(t,e){const n=Ws(t.x,e.x),s=Ws(t.y,e.y);return Math.sqrt(n**2+s**2)}class Hs{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=Gs(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=$s(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:s}=t,{timestamp:o}=ie;this.history.push({...s,timestamp:o});const{onStart:i,onMove:r}=this.handlers;e||(i&&i(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),r&&r(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=Ys(e,this.transformPagePoint),he.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{if(this.end(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const{onEnd:n,onSessionEnd:s}=this.handlers,o=Gs("pointercancel"===t.type?this.lastMoveEventInfo:Ys(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,o),s&&s(t,o)},!Yt(t))return;this.handlers=e,this.transformPagePoint=n;const s=Ys(Xt(t),this.transformPagePoint),{point:o}=s,{timestamp:i}=ie;this.history=[{...o,timestamp:i}];const{onSessionStart:r}=e;r&&r(t,Gs(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(),de.update(this.updatePoint)}}function Ys(t,e){return e?{point:e(t.point)}:t}function Xs(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Gs({point:t},e){return{point:t,delta:Xs(t,Zs(e)),offset:Xs(t,qs(e)),velocity:_s(e,.1)}}function qs(t){return t[0]}function Zs(t){return t[t.length-1]}function _s(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const o=Zs(t);for(;n>=0&&(s=t[n],!(o.timestamp-s.timestamp>vn(e)));)n--;if(!s)return{x:0,y:0};const i=(o.timestamp-s.timestamp)/1e3;if(0===i)return{x:0,y:0};const r={x:(o.x-s.x)/i,y:(o.y-s.y)/i};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function Ks(t){return t.max-t.min}function Js(t,e=0,n=.01){return Math.abs(t-e)<=n}function Qs(t,e,n,s=.5){t.origin=s,t.originPoint=Tn(e.min,e.max,t.origin),t.scale=Ks(n)/Ks(e),(Js(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=Tn(n.min,n.max,t.origin)-t.originPoint,(Js(t.translate)||isNaN(t.translate))&&(t.translate=0)}function to(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 eo(t,e,n){t.min=n.min+e.min,t.max=t.min+Ks(e)}function no(t,e,n){t.min=e.min-n.min,t.max=t.min+Ks(e)}function so(t,e,n){no(t.x,e.x,n.x),no(t.y,e.y,n.y)}function oo(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 io(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 ro=.35;function ao(t,e,n){return{min:co(t,e),max:co(t,n)}}function co(t,e){return"number"==typeof t?t:t[e]||0}const uo=()=>({x:{min:0,max:0},y:{min:0,max:0}});function lo(t){return[t("x"),t("y")]}function ho({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function po(t){return void 0===t||1===t}function mo({scale:t,scaleX:e,scaleY:n}){return!po(t)||!po(e)||!po(n)}function fo(t){return mo(t)||go(t)||t.z||t.rotate||t.rotateX||t.rotateY}function go(t){return yo(t.x)||yo(t.y)}function yo(t){return t&&"0%"!==t}function vo(t,e,n){return n+e*(t-n)}function xo(t,e,n,s,o){return void 0!==o&&(t=vo(t,o,s)),vo(t,n,s)+e}function Po(t,e=0,n=1,s,o){t.min=xo(t.min,e,n,s,o),t.max=xo(t.max,e,n,s,o)}function Eo(t,{x:e,y:n}){Po(t.x,e.translate,e.scale,e.originPoint),Po(t.y,n.translate,n.scale,n.originPoint)}function wo(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function bo(t,e){t.min=t.min+e,t.max=t.max+e}function So(t,e,[n,s,o]){const i=void 0!==e[o]?e[o]:.5,r=Tn(t.min,t.max,i);Po(t,e[n],e[s],r,e.scale)}const To=["x","scaleX","originX"],Co=["y","scaleY","originY"];function Ao(t,e){So(t.x,e,To),So(t.y,e,Co)}function Vo(t,e){return ho(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 Mo=new WeakMap;class Lo{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 Hs(t,{onSessionStart:t=>{this.stopAnimation(),e&&this.snapToCursor(Xt(t,"page").point)},onStart:(t,e)=>{const{drag:n,dragPropagation:s,onDragStart:o}=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),lo(t=>{let e=this.getAxisMotionValue(t).get()||0;if(it.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const s=n.layout.layoutBox[t];if(s){e=Ks(s)*(parseFloat(e)/100)}}}this.originPoint[t]=e}),o&&he.update(()=>o(t,e));const{animationState:i}=this.visualElement;i&&i.setActive("whileDrag",!0)},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:s,onDirectionLock:o,onDrag:i}=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&&o&&o(this.currentDirection));this.updateAxis("x",e.point,r),this.updateAxis("y",e.point,r),this.visualElement.render(),i&&i(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:o}=this.getProps();o&&he.update(()=>o(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||!Do(t,s,this.currentDirection))return;const o=this.getAxisMotionValue(t);let i=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(i=function(t,{min:e,max:n},s){return void 0!==e&&t<e?t=s?Tn(e,t,s.min):Math.max(t,e):void 0!==n&&t>n&&(t=s?Tn(n,t,s.max):Math.min(t,n)),t}(i,this.constraints[t],this.elastic[t])),o.set(i)}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:o}){return{x:oo(t.x,n,o),y:oo(t.y,e,s)}}(n.layoutBox,t),this.elastic=function(t=ro){return!1===t?t=0:!0===t&&(t=ro),{x:ao(t,"left","right"),y:ao(t,"top","bottom")}}(e),s!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&lo(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;yn(null!==n);const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const o=function(t,e,n){const s=Vo(t,n),{scroll:o}=e;return o&&(bo(s.x,o.offset.x),bo(s.y,o.offset.y)),s}(n,s.root,this.visualElement.getTransformPagePoint());let i=function(t,e){return{x:io(t.x,e.x),y:io(t.y,e.y)}}(s.layout.layoutBox,o);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(i));this.hasMutatedConstraints=!!t,t&&(i=ho(t))}return i}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:s,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},c=lo(r=>{if(!Do(r,e,this.currentDirection))return;let c=a&&a[r]||{};i&&(c={min:0,max:0});const u=s?200:1e6,l=s?40:1e7,h={type:"inertia",velocity:n?t[r]:0,bounceStiffness:u,bounceDamping:l,timeConstant:750,restDelta:1,restSpeed:10,...o,...c};return this.startAxisValueAnimation(r,h)});return Promise.all(c).then(r)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return n.start(Ms(t,n,0,e))}stopAnimation(){lo(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){lo(e=>{const{drag:n}=this.getProps();if(!Do(e,n,this.currentDirection))return;const{projection:s}=this.visualElement,o=this.getAxisMotionValue(e);if(s&&s.layout){const{min:n,max:i}=s.layout.layoutBox[e];o.set(t[e]-Tn(n,i,.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};lo(t=>{const e=this.getAxisMotionValue(t);if(e){const n=e.get();s[t]=function(t,e){let n=.5;const s=Ks(t),o=Ks(e);return o>s?n=jn(e.min,e.max-s,t.min):s>o&&(n=jn(t.min,t.max-o,e.min)),q(0,1,n)}({min:n,max:n},this.constraints[t])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),lo(e=>{if(!Do(e,t,null))return;const n=this.getAxisMotionValue(e),{min:o,max:i}=this.constraints[e];n.set(Tn(o,i,s[e]))})}addListeners(){if(!this.visualElement.current)return;Mo.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 o=Ht(window,"resize",()=>this.scalePositionWithinConstraints()),i=n.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(lo(e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))}),this.visualElement.render())});return()=>{o(),t(),s(),i&&i()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:s=!1,dragConstraints:o=!1,dragElastic:i=ro,dragMomentum:r=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:s,dragConstraints:o,dragElastic:i,dragMomentum:r}}}function Do(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const Ro=t=>(e,n)=>{t&&he.update(()=>t(e,n))};function ko(t,e,n={}){const s=N(t)?t:je(t);return s.start(Ms("",s,e,n)),{stop:()=>s.stop(),isAnimating:()=>s.isAnimating()}}const Bo=["TopLeft","TopRight","BottomLeft","BottomRight"],jo=Bo.length,Fo=t=>"string"==typeof t?parseFloat(t):t,Io=t=>"number"==typeof t||rt.test(t);function Oo(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const Uo=zo(0,.5,$n),No=zo(.5,.95,xe);function zo(t,e,n){return s=>s<t?0:s>e?1:n(jn(t,e,s))}function Wo(t,e){t.min=e.min,t.max=e.max}function $o(t,e){Wo(t.x,e.x),Wo(t.y,e.y)}function Ho(t,e,n,s,o){return t=vo(t-=e,1/n,s),void 0!==o&&(t=vo(t,1/o,s)),t}function Yo(t,e,[n,s,o],i,r){!function(t,e=0,n=1,s=.5,o,i=t,r=t){if(it.test(e)){e=parseFloat(e);e=Tn(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=Tn(i.min,i.max,s);t===i&&(a-=e),t.min=Ho(t.min,e,n,a,o),t.max=Ho(t.max,e,n,a,o)}(t,e[n],e[s],e[o],e.scale,i,r)}const Xo=["x","scaleX","originX"],Go=["y","scaleY","originY"];function qo(t,e,n,s){Yo(t.x,e,Xo,n?n.x:void 0,s?s.x:void 0),Yo(t.y,e,Go,n?n.y:void 0,s?s.y:void 0)}function Zo(t){return 0===t.translate&&1===t.scale}function _o(t){return Zo(t.x)&&Zo(t.y)}function Ko(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 Jo(t){return Ks(t.x)/Ks(t.y)}class Qo{constructor(){this.members=[]}add(t){Le(this.members,t),t.scheduleRender()}remove(t){if(De(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 ti(t,e,n){let s="";const o=t.x.translate/e.x,i=t.y.translate/e.y;if((o||i)&&(s=`translate3d(${o}px, ${i}px, 0) `),1===e.x&&1===e.y||(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{rotate:t,rotateX:e,rotateY:o}=n;t&&(s+=`rotate(${t}deg) `),e&&(s+=`rotateX(${e}deg) `),o&&(s+=`rotateY(${o}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 ei=(t,e)=>t.depth-e.depth;class ni{constructor(){this.children=[],this.isDirty=!1}add(t){Le(this.children,t),this.isDirty=!0}remove(t){De(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(ei),this.isDirty=!1,this.children.forEach(t)}}const si=["","X","Y","Z"];let oi=0;const ii={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function ri({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:o}){return class{constructor(t,n={},s=(null==e?void 0:e())){this.id=oi++,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;ii.totalNodes=ii.resolvedTargetDeltas=ii.recalculatedProjection=0,this.nodes.forEach(ui),this.nodes.forEach(fi),this.nodes.forEach(gi),this.nodes.forEach(li),t=ii,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 ni)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new Re),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:o,visualElement:i}=this.options;if(i&&!i.current&&i.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.elementId&&this.root.potentialNodes.delete(this.elementId),n&&(o||s)&&(this.isLayoutDirty=!0),t){let n;const s=()=>this.root.updateBlockedByResize=!1;t(e,()=>{this.root.updateBlockedByResize=!0,n&&n(),n=vs(s,250),T.hasAnimatedSinceResize&&(T.hasAnimatedSinceResize=!1,this.nodes.forEach(mi))})}s&&this.root.registerSharedNode(s,this),!1!==this.options.animate&&i&&(s||o)&&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 o=this.options.transition||i.getDefaultTransition()||wi,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=i.getProps(),c=!this.targetLayout||!Ko(this.targetLayout,s)||n,u=!e&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||u||e&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(t,u);const e={...Vs(o,"layout"),onPlay:r,onComplete:a};(i.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e)}else e||0!==this.animationProgress||mi(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,de.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(yi),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(di);this.isUpdating&&(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(bi),this.potentialNodes.clear()),this.nodes.forEach(pi),this.nodes.forEach(ai),this.nodes.forEach(ci),this.clearAllSnapshots(),pe.update(),pe.preRender(),pe.render())}clearAllSnapshots(){this.nodes.forEach(hi),this.sharedNodes.forEach(vi)}scheduleUpdateProjection(){he.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){he.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(!o)return;const t=this.isLayoutDirty||this.shouldResetTransform,e=this.projectionDelta&&!_o(this.projectionDelta),n=this.getTransformTemplate(),s=n?n(this.latestValues,""):void 0,i=s!==this.prevTransformTemplateValue;t&&(e||fo(this.latestValues)||i)&&(o(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)),Si((s=n).x),Si(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&&(bo(e.x,n.offset.x),bo(e.y,n.offset.y)),e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};$o(e,t);for(let n=0;n<this.path.length;n++){const s=this.path[n],{scroll:o,options:i}=s;if(s!==this.root&&o&&i.layoutScroll){if(o.isRoot){$o(e,t);const{scroll:n}=this.root;n&&(bo(e.x,-n.offset.x),bo(e.y,-n.offset.y))}bo(e.x,o.offset.x),bo(e.y,o.offset.y)}}return e}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};$o(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&&Ao(n,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),fo(s.latestValues)&&Ao(n,s.latestValues)}return fo(this.latestValues)&&Ao(n,this.latestValues),n}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};$o(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!n.instance)continue;if(!fo(n.latestValues))continue;mo(n.latestValues)&&n.updateSnapshot();const s={x:{min:0,max:0},y:{min:0,max:0}};$o(s,n.measurePageBox()),qo(e,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,s)}return fo(this.latestValues)&&qo(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(){var t;const e=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=e.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=e.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=e.isSharedProjectionDirty);if(!((Boolean(this.resumingFrom)||this!==e)&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget))return;const{layout:n,layoutId:s}=this.options;if(this.layout&&(n||s)){if(!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}},so(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),$o(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var o,i,r;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?(o=this.target,i=this.relativeTarget,r=this.relativeParent.target,eo(o.x,i.x,r.x),eo(o.y,i.y,r.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):$o(this.target,this.layout.layoutBox),Eo(this.target,this.targetDelta)):$o(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}},so(this.relativeTargetOrigin,this.target,t.target),$o(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}ii.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!mo(this.parent.latestValues)&&!go(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),s)return;const{layout:o,layoutId:i}=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||!o&&!i)return;$o(this.layoutCorrected,this.layout.layoutBox),function(t,e,n,s=!1){const o=n.length;if(!o)return;let i,r;e.x=e.y=1;for(let a=0;a<o;a++){i=n[a],r=i.projectionDelta;const o=i.instance;o&&o.style&&"contents"===o.style.display||(s&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Ao(t,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Eo(t,r)),s&&fo(i.latestValues)&&Ao(t,i.latestValues))}e.x=wo(e.x),e.y=wo(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,c=this.treeScale.y,u=this.projectionTransform;to(this.projectionDelta,this.layoutCorrected,r,this.latestValues),this.projectionTransform=ti(this.projectionDelta,this.treeScale),this.projectionTransform===u&&this.treeScale.x===a&&this.treeScale.y===c||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",r)),ii.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:{},o={...this.latestValues},i={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),c=this.getStack(),u=!c||c.members.length<=1,l=Boolean(a&&!u&&!0===this.options.crossfade&&!this.path.some(Ei));let h;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var c,d,p,m;xi(i.x,t.x,n),xi(i.y,t.y,n),this.setTargetDelta(i),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(so(r,this.layout.layoutBox,this.relativeParent.layout.layoutBox),c=this.relativeTarget,d=this.relativeTargetOrigin,p=r,m=n,Pi(c.x,d.x,p.x,m),Pi(c.y,d.y,p.y,m),h&&Ko(this.relativeTarget,h)&&(this.isProjectionDirty=!1),h||(h={x:{min:0,max:0},y:{min:0,max:0}}),$o(h,this.relativeTarget)),a&&(this.animationValues=o,function(t,e,n,s,o,i){o?(t.opacity=Tn(0,void 0!==n.opacity?n.opacity:1,Uo(s)),t.opacityExit=Tn(void 0!==e.opacity?e.opacity:1,0,No(s))):i&&(t.opacity=Tn(void 0!==e.opacity?e.opacity:1,void 0!==n.opacity?n.opacity:1,s));for(let o=0;o<jo;o++){const i=`border${Bo[o]}Radius`;let r=Oo(e,i),a=Oo(n,i);if(void 0===r&&void 0===a)continue;r||(r=0),a||(a=0);0===r||0===a||Io(r)===Io(a)?(t[i]=Math.max(Tn(Fo(r),Fo(a),s),0),(it.test(a)||it.test(r))&&(t[i]+="%")):t[i]=a}(e.rotate||n.rotate)&&(t.rotate=Tn(e.rotate||0,n.rotate||0,s))}(o,s,this.latestValues,n,l,u)),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&&(de.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=he.update(()=>{T.hasAnimatedSinceResize=!0,this.currentAnimation=ko(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:o}=t;if(e&&n&&s){if(this!==t&&this.layout&&s&&Ti(this.options.animationType,this.layout.layoutBox,s.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=Ks(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const s=Ks(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+s}$o(e,n),Ao(e,o),to(this.projectionDeltaWithTransform,this.layoutCorrected,e,o)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new Qo);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<si.length;e++){const o="rotate"+si[e];n[o]&&(s[o]=n[o],t.setStaticValue(o,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 o=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,s.opacity="",s.pointerEvents=Ot(t.pointerEvents)||"",s.transform=o?o(this.latestValues,""):"none",s;const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target){const e={};return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=Ot(t.pointerEvents)||""),this.hasProjected&&!fo(this.latestValues)&&(e.transform=o?o({},""):"none",this.hasProjected=!1),e}const r=i.animationValues||i.latestValues;this.applyTransformsToTarget(),s.transform=ti(this.projectionDeltaWithTransform,this.treeScale,r),o&&(s.transform=o(r,s.transform));const{x:a,y:c}=this.projectionDelta;s.transformOrigin=`${100*a.origin}% ${100*c.origin}% 0`,i.animationValues?s.opacity=i===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=i===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],o="none"===s.transform?r[t]:e(r[t],i);if(n){const t=n.length;for(let e=0;e<t;e++)s[n[e]]=o}else s[t]=o}return this.options.layoutId&&(s.pointerEvents=i===this?Ot(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(di),this.root.sharedNodes.clear()}}}function ai(t){t.updateLayout()}function ci(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:o}=t.options,i=n.source!==t.layout.source;"size"===o?lo(t=>{const s=i?n.measuredBox[t]:n.layoutBox[t],o=Ks(s);s.min=e[t].min,s.max=s.min+o}):Ti(o,n.layoutBox,e)&&lo(t=>{const s=i?n.measuredBox[t]:n.layoutBox[t],o=Ks(e[t]);s.max=s.min+o});const r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};to(r,e,n.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};i?to(a,t.applyTransform(s,!0),n.measuredBox):to(a,e,n.layoutBox);const c=!_o(r);let u=!1;if(!t.resumeFrom){const s=t.getClosestProjectingParent();if(s&&!s.resumeFrom){const{snapshot:o,layout:i}=s;if(o&&i){const r={x:{min:0,max:0},y:{min:0,max:0}};so(r,n.layoutBox,o.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};so(a,e,i.layoutBox),Ko(r,a)||(u=!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:c,hasRelativeTargetChanged:u})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function ui(t){ii.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 li(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function hi(t){t.clearSnapshot()}function di(t){t.clearMeasurements()}function pi(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function mi(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0}function fi(t){t.resolveTargetDelta()}function gi(t){t.calcProjection()}function yi(t){t.resetRotation()}function vi(t){t.removeLeadSnapshot()}function xi(t,e,n){t.translate=Tn(e.translate,0,n),t.scale=Tn(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Pi(t,e,n,s){t.min=Tn(e.min,n.min,s),t.max=Tn(e.max,n.max,s)}function Ei(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const wi={duration:.45,ease:[.4,0,.1,1]};function bi(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 Si(t){t.min=Math.round(t.min),t.max=Math.round(t.max)}function Ti(t,e,n){return"position"===t||"preserve-aspect"===t&&!Js(Jo(e),Jo(n),.2)}const Ci=ri({attachResizeListener:(t,e)=>Ht(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ai={current:void 0},Vi=ri({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Ai.current){const t=new Ci(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),Ai.current=t}return Ai.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),Mi=t=>!t.isLayoutDirty&&t.willUpdate(!1);function Li(){const t=new Set,e=new WeakMap,n=()=>t.forEach(Mi);return{add:s=>{t.add(s),e.set(s,s.addEventListener("willUpdate",n))},remove:s=>{t.delete(s);const o=e.get(s);o&&(o(),e.delete(s)),n()},dirty:n}}function Di(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Ri={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!rt.test(t))return t;t=parseFloat(t)}return`${Di(t,e.target.x)}% ${Di(t,e.target.y)}%`}},ki=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Bi(t,e,n=1){yn(n<=4);const[s,o]=function(t){const e=ki.exec(t);if(!e)return[,];const[,n,s]=e;return[n,s]}(t);if(!s)return;const i=window.getComputedStyle(e).getPropertyValue(s);return i?i.trim():X(o)?Bi(o,e,n+1):o}const ji={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,o=t.includes("var("),i=[];o&&(t=t.replace(ki,t=>(i.push(t),"_$css")));const r=Ge.parse(t);if(r.length>5)return s;const a=Ge.createTransformer(t),c="number"!=typeof r[0]?1:0,u=n.x.scale*e.x,l=n.y.scale*e.y;r[0+c]/=u,r[1+c]/=l;const h=Tn(u,l,.5);"number"==typeof r[2+c]&&(r[2+c]/=h),"number"==typeof r[3+c]&&(r[3+c]/=h);let d=a(r);if(o){let t=0;d=d.replace("_$css",()=>{const e=i[t];return t++,e})}return d}},Fi=new Set(["width","height","top","left","right","bottom","x","y"]),Ii=t=>Fi.has(t),Oi=t=>t===Z||t===rt,Ui=(t,e)=>parseFloat(t.split(", ")[e]),Ni=(t,e)=>(n,{transform:s})=>{if("none"===s||!s)return 0;const o=s.match(/^matrix3d\((.+)\)$/);if(o)return Ui(o[1],e);{const e=s.match(/^matrix\((.+)\)$/);return e?Ui(e[1],t):0}},zi=new Set(["x","y","z"]),Wi=I.filter(t=>!zi.has(t));const $i={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:Ni(4,13),y:Ni(5,14)},Hi=(t,e,n={},s={})=>{e={...e},s={...s};const o=Object.keys(e).filter(Ii);let i=[],r=!1;const a=[];if(o.forEach(o=>{const c=t.getValue(o);if(!t.hasValue(o))return;let u=n[o],l=sn(u);const h=e[o];let d;if(It(h)){const t=h.length,e=null===h[0]?1:0;u=h[e],l=sn(u);for(let n=e;n<t;n++)d?yn(sn(h[n])===d):(d=sn(h[n]),yn(d===l||Oi(l)&&Oi(d)))}else d=sn(h);if(l!==d)if(Oi(l)&&Oi(d)){const t=c.get();"string"==typeof t&&c.set(parseFloat(t)),"string"==typeof h?e[o]=parseFloat(h):Array.isArray(h)&&d===rt&&(e[o]=h.map(parseFloat))}else(null==l?void 0:l.transform)&&(null==d?void 0:d.transform)&&(0===u||0===h)?0===u?c.set(d.transform(u)):e[o]=l.transform(h):(r||(i=function(t){const e=[];return Wi.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(o),s[o]=void 0!==s[o]?s[o]:e[o],c.jump(h))}),a.length){const n=a.indexOf("height")>=0?window.pageYOffset:null,o=((t,e,n)=>{const s=e.measureViewportBox(),o=e.current,i=getComputedStyle(o),{display:r}=i,a={};"none"===r&&e.setStaticValue("display",t.display||"block"),n.forEach(t=>{a[t]=$i[t](s,i)}),e.render();const c=e.measureViewportBox();return n.forEach(n=>{const s=e.getValue(n);s&&s.jump(a[n]),t[n]=$i[n](c,i)}),t})(e,t,a);return i.length&&i.forEach(([e,n])=>{t.getValue(e).set(n)}),t.render(),u&&null!==n&&window.scrollTo({top:n}),{target:o,transitionEnd:s}}return{target:e,transitionEnd:s}};function Yi(t,e,n,s){return(t=>Object.keys(t).some(Ii))(e)?Hi(t,e,n,s):{target:e,transitionEnd:s}}const Xi=(t,e,n,s)=>{const o=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=Bi(e,s);n&&t.set(n)});for(const t in e){const o=e[t];if(!X(o))continue;const i=Bi(o,s);i&&(e[t]=i,n&&void 0===n[t]&&(n[t]=o))}return{target:e,transitionEnd:n}}(t,e,s);return Yi(t,e=o.target,n,s=o.transitionEnd)},Gi={current:null},qi={current:!1};function Zi(){if(qi.current=!0,u)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Gi.current=t.matches;t.addListener(e),e()}else Gi.current=!1}const _i=Object.keys(w),Ki=_i.length,Ji=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Qi=g.length;class tr{constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:s,visualState:o},i={}){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=()=>he.render(this.render,!1,!0);const{latestValues:r,renderState:a}=o;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=i,this.isControllingVariants=y(e),this.isVariantNode=v(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:c,...u}=this.scrapeMotionValuesFromProps(e,{});for(const t in u){const e=u[t];void 0!==r[t]&&N(e)&&(e.set(r[t],!1),mn(c)&&c.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)),qi.current||Zi(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Gi.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),de.update(this.notifyUpdate),de.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=O.has(t),s=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&he.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),o=e.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{s(),o()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}loadFeatures({children:t,...e},n,s,o,i){let r,a;for(let t=0;t<Ki;t++){const n=_i[t],{isEnabled:s,Feature:o,ProjectionNode:i,MeasureLayout:c}=w[n];i&&(r=i),s(e)&&(!this.features[n]&&o&&(this.features[n]=new o(this)),c&&(a=c))}if(!this.projection&&r){this.projection=new r(o,this.latestValues,this.parent&&this.parent.projection);const{layoutId:t,layout:n,drag:s,dragConstraints:a,layoutScroll:c,layoutRoot:u}=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:i,layoutScroll:c,layoutRoot:u})}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<Ji.length;e++){const n=Ji[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 o in e){const i=e[o],r=n[o];if(N(i))t.addValue(o,i),mn(s)&&s.add(o);else if(N(r))t.addValue(o,je(i,{owner:t})),mn(s)&&s.remove(o);else if(r!==i)if(t.hasValue(o)){const e=t.getValue(o);!e.hasAnimated&&e.set(i)}else{const e=t.getStaticValue(o);t.addValue(o,je(void 0!==e?e:i,{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<Qi;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=je(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 o=this.getBaseTargetFromProps(this.props,t);return void 0===o||N(o)?void 0!==this.initialValues[t]&&void 0===s?void 0:this.baseTarget[t]:o}on(t,e){return this.events[t]||(this.events[t]=new Re),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class er 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},o){let i=pn(n,t||{},this);if(s&&(e&&(e=s(e)),n&&(n=s(n)),i&&(i=s(i))),o){hn(this,n,i);const t=Xi(this,n,i,e);e=t.transitionEnd,n=t.target}return{transition:t,transitionEnd:e,...n}}}class nr extends er{readValueFromInstance(t,e){if(O.has(e)){const t=Qe(e);return t&&t.default||0}{const s=(n=t,window.getComputedStyle(n)),o=(Y(e)?s.getPropertyValue(e):s[e])||0;return"string"==typeof o?o.trim():o}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return Vo(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 sr(){const t=e.useContext(c);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:s,register:o}=t,i=e.useId();e.useEffect(()=>o(i),[]);return!n&&s?[!1,()=>s&&s(i)]:[!0]}class or extends i.default.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:s}=this.props,{projection:o}=t;F(rr),o&&(e.group&&e.group.add(o),n&&n.register&&s&&n.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),T.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:s,isPresent:o}=this.props,i=n.projection;return i?(i.isPresent=o,s||t.layoutDependency!==e||void 0===e?i.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?i.promote():i.relegate()||he.postRender(()=>{const t=i.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 ir(t){const[n,s]=sr(),o=e.useContext(A);return i.default.createElement(or,{...t,layoutGroup:o,switchLayoutGroup:e.useContext(V),isPresent:n,safeToRemove:s})}const rr={borderRadius:{...Ri,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ri,borderTopRightRadius:Ri,borderBottomLeftRadius:Ri,borderBottomRightRadius:Ri,boxShadow:ji},ar={pan:{Feature:class extends ne{constructor(){super(...arguments),this.removePointerDownListener=xe}onPointerDown(t){this.session=new Hs(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:s}=this.node.getProps();return{onSessionStart:Ro(t),onStart:Ro(e),onMove:n,onEnd:(t,e)=>{delete this.session,s&&he.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=xe,this.removeListeners=xe,this.controls=new Lo(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||xe}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Vi,MeasureLayout:ir}};class cr extends er{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(O.has(e)){const t=Qe(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 ur=(t,e)=>B(t)?new cr(e,{enableHardwareAcceleration:!1}):new nr(e,{enableHardwareAcceleration:!0}),lr={layout:{ProjectionNode:Vi,MeasureLayout:ir}},hr={...zs,...Ae,...ar,...lr},dr=R((t,e)=>$t(t,e,hr,ur));const pr=R($t);function mr(){const t=e.useRef(!1);return l(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function fr(){const t=mr(),[n,s]=e.useState(0),o=e.useCallback(()=>{t.current&&s(n+1)},[n]);return[e.useCallback(()=>he.postRender(o),[o]),n]}class gr extends o.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 yr({children:t,isPresent:n}){const s=e.useId(),i=e.useRef(null),r=e.useRef({width:0,height:0,top:0,left:0});return e.useInsertionEffect(()=>{const{width:t,height:e,top:o,left:a}=r.current;if(n||!i.current||!t||!e)return;i.current.dataset.motionPopId=s;const c=document.createElement("style");return document.head.appendChild(c),c.sheet&&c.sheet.insertRule(`\n [data-motion-pop-id="${s}"] {\n position: absolute !important;\n width: ${t}px !important;\n height: ${e}px !important;\n top: ${o}px !important;\n left: ${a}px !important;\n }\n `),()=>{document.head.removeChild(c)}},[n]),o.createElement(gr,{isPresent:n,childRef:i,sizeRef:r},o.cloneElement(t,{ref:i}))}const vr=({children:t,initial:n,isPresent:s,onExitComplete:i,custom:r,presenceAffectsLayout:a,mode:u})=>{const l=S(xr),h=e.useId(),d=e.useMemo(()=>({id:h,initial:n,isPresent:s,custom:r,onExitComplete:t=>{l.set(t,!0);for(const t of l.values())if(!t)return;i&&i()},register:t=>(l.set(t,!1),()=>l.delete(t))}),a?void 0:[s]);return e.useMemo(()=>{l.forEach((t,e)=>l.set(e,!1))},[s]),o.useEffect(()=>{!s&&!l.size&&i&&i()},[s]),"popLayout"===u&&(t=o.createElement(yr,{isPresent:s},t)),o.createElement(c.Provider,{value:d},t)};function xr(){return new Map}function Pr(t){return e.useEffect(()=>()=>t(),[])}const Er=t=>t.key||"";function wr(t){return"function"==typeof t}const br=e.createContext(null),Sr=t=>!0===t,Tr=({children:t,id:n,inherit:s=!0})=>{const i=e.useContext(A),r=e.useContext(br),[a,c]=fr(),u=e.useRef(null),l=i.id||r;null===u.current&&((t=>Sr(!0===t)||"id"===t)(s)&&l&&(n=n?l+"-"+n:l),u.current={id:n,group:Sr(s)&&i.group||Li()});const h=e.useMemo(()=>({...u.current,forceRender:a}),[c]);return o.createElement(A.Provider,{value:h},t)},Cr=e.createContext(null);const Ar=e.forwardRef((function({children:t,as:n="ul",axis:s="y",onReorder:i,values:r,...a},c){const u=S(()=>dr(n)),l=[],h=e.useRef(!1);yn(Boolean(r));const d={axis:s,registerItem:(t,e)=>{e&&-1===l.findIndex(e=>t===e.value)&&(l.push({value:t,layout:e[s]}),l.sort(Mr))},updateOrder:(t,e,n)=>{if(h.current)return;const s=function(t,e,n,s){if(!s)return t;const o=t.findIndex(t=>t.value===e);if(-1===o)return t;const i=s>0?1:-1,r=t[o+i];if(!r)return t;const a=t[o],c=r.layout,u=Tn(c.min,c.max,.5);return 1===i&&a.layout.max+n>u||-1===i&&a.layout.min+n<u?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,[o]=t.splice(e,1);t.splice(s,0,o)}return t}(t,o,o+i):t}(l,t,e,n);l!==s&&(h.current=!0,i(s.map(Vr).filter(t=>-1!==r.indexOf(t))))}};return e.useEffect(()=>{h.current=!1}),o.createElement(u,{...a,ref:c,ignoreStrict:!0},o.createElement(Cr.Provider,{value:d},t))}));function Vr(t){return t.value}function Mr(t,e){return t.layout.min-e.layout.min}function Lr(t){const n=S(()=>je(t)),{isStatic:s}=e.useContext(r);if(s){const[,s]=e.useState(t);e.useEffect(()=>n.on("change",s),[])}return n}function Dr(...t){const e=!Array.isArray(t[0]),n=e?0:-1,s=t[0+n],o=t[1+n],i=t[2+n],r=t[3+n],a=On(o,i,{mixer:(c=i[0],(t=>"object"==typeof t&&t.mix)(c)?c.mix:void 0),...r});var c;return e?a(s):a}function Rr(t,e){const n=Lr(e()),s=()=>n.set(e());return s(),l(()=>{const e=()=>he.update(s,!1,!0),n=t.map(t=>t.on("change",e));return()=>{n.forEach(t=>t()),de.update(s)}}),n}function kr(t,e,n,s){const o="function"==typeof e?e:Dr(e,n,s);return Array.isArray(t)?Br(t,o):Br([t],([t])=>o(t))}function Br(t,e){const n=S(()=>[]);return Rr(t,()=>{n.length=0;const s=t.length;for(let e=0;e<s;e++)n[e]=t[e].get();return e(n)})}function jr(t,e=0){return N(t)?t:Lr(e)}const Fr={Group:Ar,Item:e.forwardRef((function({children:t,style:n={},value:s,as:i="li",onDrag:r,layout:a=!0,...c},u){const l=S(()=>dr(i)),h=e.useContext(Cr),d={x:jr(n.x),y:jr(n.y)},p=kr([d.x,d.y],([t,e])=>t||e?1:"unset"),m=e.useRef(null);yn(Boolean(h));const{axis:f,registerItem:g,updateOrder:y}=h;return e.useEffect(()=>{g(s,m.current)},[h]),o.createElement(l,{drag:f,...c,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:u,ignoreStrict:!0},t)}))};function Ir(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 Or=new WeakMap;let Ur;function Nr({target:t,contentRect:e,borderBoxSize:n}){var s;null===(s=Or.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 zr(t){t.forEach(Nr)}function Wr(t,e){Ur||"undefined"!=typeof ResizeObserver&&(Ur=new ResizeObserver(zr));const n=Ir(t);return n.forEach(t=>{let n=Or.get(t);n||(n=new Set,Or.set(t,n)),n.add(e),null==Ur||Ur.observe(t)}),()=>{n.forEach(t=>{const n=Or.get(t);null==n||n.delete(e),(null==n?void 0:n.size)||null==Ur||Ur.unobserve(t)})}}const $r=new Set;let Hr;function Yr(t){return $r.add(t),Hr||(Hr=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};$r.forEach(t=>t(e))},window.addEventListener("resize",Hr)),()=>{$r.delete(t),!$r.size&&Hr&&(Hr=void 0)}}const Xr={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function Gr(t,e,n,s){const o=n[e],{length:i,position:r}=Xr[e],a=o.current,c=n.time;o.current=t["scroll"+r],o.scrollLength=t["scroll"+i]-t["client"+i],o.offset.length=0,o.offset[0]=0,o.offset[1]=o.scrollLength,o.progress=jn(0,o.scrollLength,o.current);const u=s-c;o.velocity=u>50?0:ke(o.current-a,u)}const qr={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},Zr={start:0,center:.5,end:1};function _r(t,e,n=0){let s=0;if(void 0!==Zr[t]&&(t=Zr[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 Kr=[0,0];function Jr(t,e,n,s){let o=Array.isArray(t)?t:Kr,i=0,r=0;return"number"==typeof t?o=[t,t]:"string"==typeof t&&(o=(t=t.trim()).includes(" ")?t.split(" "):[t,Zr[t]?t:"0"]),i=_r(o[0],n,s),r=_r(o[1],e),i-r}const Qr={x:0,y:0};function ta(t,e,n){let{offset:s=qr.All}=n;const{target:o=t,axis:i="y"}=n,r="y"===i?"height":"width",a=o!==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}(o,t):Qr,c=o===t?{width:t.scrollWidth,height:t.scrollHeight}:{width:o.clientWidth,height:o.clientHeight},u={width:t.clientWidth,height:t.clientHeight};e[i].offset.length=0;let l=!e[i].interpolate;const h=s.length;for(let t=0;t<h;t++){const n=Jr(s[t],u[r],c[r],a[i]);l||n===e[i].interpolatorOffsets[t]||(l=!0),e[i].offset[t]=n}l&&(e[i].interpolate=On(e[i].offset,Un(s)),e[i].interpolatorOffsets=[...e[i].offset]),e[i].progress=e[i].interpolate(e[i].current)}function ea(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){Gr(t,"x",e,n),Gr(t,"y",e,n),e.time=n}(t,n,e),(s.offset||s.target)&&ta(t,n,s)},notify:()=>e(n)}}const na=new WeakMap,sa=new WeakMap,oa=new WeakMap,ia=t=>t===document.documentElement?window:t;function ra(t,{container:e=document.documentElement,...n}={}){let s=oa.get(e);s||(s=new Set,oa.set(e,s));const o=ea(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(o),!na.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()};na.set(e,t);const n=ia(e);window.addEventListener("resize",t,{passive:!0}),e!==document.documentElement&&sa.set(e,(r=t,"function"==typeof(i=e)?Yr(i):Wr(i,r))),n.addEventListener("scroll",t,{passive:!0})}var i,r;const a=na.get(e),c=requestAnimationFrame(a);return()=>{var t;cancelAnimationFrame(c);const n=oa.get(e);if(!n)return;if(n.delete(o),n.size)return;const s=na.get(e);na.delete(e),s&&(ia(e).removeEventListener("scroll",s),null===(t=sa.get(e))||void 0===t||t(),window.removeEventListener("resize",s))}}const aa={any:0,all:1};function ca(t,e,{root:n,margin:s,amount:o="any"}={}){const i=Ir(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 o?o:aa[o]});return i.forEach(t=>a.observe(t)),()=>a.disconnect()}const ua=(t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t},la={renderer:ur,...zs,...Ae},ha={...la,...ar,...lr};function da(t,e){gn(Boolean(!e||e.current))}const pa=()=>({scrollX:je(0),scrollY:je(0),scrollXProgress:je(0),scrollYProgress:je(0)});function ma({container:t,target:n,layoutEffect:s=!0,...o}={}){const i=S(pa);return(s?l:e.useEffect)(()=>(da(0,n),da(0,t),ra(({x:t,y:e})=>{i.scrollX.set(t.current),i.scrollXProgress.set(t.progress),i.scrollY.set(e.current),i.scrollYProgress.set(e.progress)},{...o,container:(null==t?void 0:t.current)||void 0,target:(null==n?void 0:n.current)||void 0})),[]),i}function fa(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 he.update(e,!0),()=>de.update(e)},[t])}class ga extends Be{constructor(){super(...arguments),this.members=[],this.transforms=new Set}add(t){let e;O.has(t)?(this.transforms.add(t),e="transform"):t.startsWith("origin")||Y(t)||"willChange"===t||(e=Lt(t)),e&&(Le(this.members,e),this.update())}remove(t){O.has(t)?(this.transforms.delete(t),this.transforms.size||De(this.members,"transform")):De(this.members,Lt(t)),this.update()}update(){this.set(this.members.length?this.members.join(", "):"auto")}}function ya(){!qi.current&&Zi();const[t]=e.useState(Gi.current);return t}function va(){let t=!1;const e=new Set,n={subscribe:t=>(e.add(t),()=>{e.delete(t)}),start(n,s){yn(t);const o=[];return e.forEach(t=>{o.push(Ls(t,n,{transitionOverride:s}))}),Promise.all(o)},set:n=>(yn(t),e.forEach(t=>{!function(t,e){Array.isArray(e)?ln(t,e):"string"==typeof e?ln(t,[e]):un(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 xa(){const t=S(va);return l(t.mount,[]),t}const Pa=xa;class Ea{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 wa=()=>new Ea;function ba(t){return null!==t&&"object"==typeof t&&M in t}function Sa(){return Ta}function Ta(t){Ai.current&&(Ai.current.isUpdating=!1,Ai.current.blockUpdate(),t&&t())}const Ca=(t,e)=>`${t}: ${e}`,Aa=new Map;function Va(t,e,n,s){const o=Ca(t,O.has(e)?"transform":e),i=Aa.get(o);if(!i)return 0;const{animation:r,startTime:a}=i,c=()=>{Aa.delete(o);try{r.cancel()}catch(t){}};if(null!==a){const t=performance.now();return s.update(()=>{n.animation&&(n.animation.currentTime=performance.now()-t)}),s.render(c),t-a||0}return c(),0}const Ma=()=>({});class La 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 hn(this,n,pn(n,t||{},this)),{transition:t,transitionEnd:e,...n}}}const Da=Ut({scrapeMotionValuesFromProps:Ma,createRenderState:Ma});const Ra=t=>t>.001?1/t:1e5;let ka=!1;let Ba=0;t.AnimatePresence=({children:t,custom:n,initial:s=!0,onExitComplete:i,exitBeforeEnter:r,presenceAffectsLayout:a=!0,mode:c="sync"})=>{yn(!r);let[u]=fr();const h=e.useContext(A).forceRender;h&&(u=h);const d=mr(),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(l(()=>{v.current=!1,function(t,e){t.forEach(t=>{const n=Er(t);e.set(n,t)})}(p,y),g.current=m}),Pr(()=>{v.current=!0,y.clear(),f.clear()}),v.current)return o.createElement(o.Fragment,null,m.map(t=>o.createElement(vr,{key:Er(t),isPresent:!0,initial:!!s&&void 0,presenceAffectsLayout:a,mode:c},t)));m=[...m];const x=g.current.map(Er),P=p.map(Er),E=x.length;for(let t=0;t<E;t++){const e=x[t];-1===P.indexOf(e)&&f.add(e)}return"wait"===c&&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,o.createElement(vr,{key:Er(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;u(),i&&i()}},custom:n,presenceAffectsLayout:a,mode:c},e))}),m=m.map(t=>{const e=t.key;return f.has(e)?t:o.createElement(vr,{key:Er(t),isPresent:!0,presenceAffectsLayout:a,mode:c},t)}),o.createElement(o.Fragment,null,f.size?m:m.map(t=>e.cloneElement(t)))},t.AnimateSharedLayout=({children:t})=>(o.useEffect(()=>{yn(!1)},[]),o.createElement(Tr,{id:S(()=>"asl-"+Ba++)},t)),t.DeprecatedLayoutGroupContext=br,t.DragControls=Ea,t.FlatTree=ni,t.LayoutGroup=Tr,t.LayoutGroupContext=A,t.LazyMotion=function({children:t,features:n,strict:s=!1}){const[,i]=e.useState(!wr(n)),r=e.useRef(void 0);if(!wr(n)){const{renderer:t,...e}=n;r.current=t,b(e)}return e.useEffect(()=>{wr(n)&&n().then(({renderer:t,...e})=>{b(e),r.current=t,i(!0)})},[]),o.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 i=e.useMemo(()=>s,[JSON.stringify(s.transition),s.transformPagePoint,s.reducedMotion]);return o.createElement(r.Provider,{value:i},t)},t.MotionConfigContext=r,t.MotionContext=a,t.MotionValue=Be,t.PresenceContext=c,t.Reorder=Fr,t.SwitchLayoutGroupContext=V,t.VisualElement=tr,t.addPointerEvent=qt,t.addPointerInfo=Gt,t.addScaleCorrector=F,t.animate=ko,t.animateValue=cs,t.animateVisualElement=Ls,t.animationControls=va,t.animations=zs,t.anticipate=qn,t.backIn=Xn,t.backInOut=Gn,t.backOut=Yn,t.buildTransform=$,t.calcLength=Ks,t.checkTargetForNewValues=hn,t.circIn=Wn,t.circInOut=Hn,t.circOut=$n,t.clamp=q,t.color=We,t.complex=Ge,t.createBox=uo,t.createDomMotionComponent=function(t){return L($t(t,{forwardMotionProps:!1},hr,ur))},t.createMotionComponent=L,t.cubicBezier=zn,t.delay=vs,t.distance=Ws,t.distance2D=$s,t.domAnimation=la,t.domMax=ha,t.easeIn=wn,t.easeInOut=Sn,t.easeOut=bn,t.filterProps=Et,t.frameData=ie,t.inView=ca,t.inertia=Ps,t.interpolate=On,t.invariant=yn,t.isBrowser=u,t.isDragActive=ee,t.isMotionComponent=ba,t.isMotionValue=N,t.isValidMotionProp=vt,t.m=pr,t.makeUseVisualState=Ut,t.mix=Tn,t.motion=dr,t.motionValue=je,t.optimizedAppearDataAttribute=fn,t.pipe=_t,t.progress=jn,t.px=rt,t.resolveMotionValue=Ot,t.scroll=ra,t.spring=ss,t.startOptimizedAppearAnimation=function(t,e,n,s,o){const i=t.dataset.framerAppearId;if(!i)return;window.HandoffAppearAnimations=Va;const r=Ca(i,e),a=ds(t,e,[n[0],n[0]],{duration:1e4,ease:"linear"});Aa.set(r,{animation:a,startTime:null});const c=()=>{a.cancel();const i=ds(t,e,n,s);document.timeline&&(i.startTime=document.timeline.currentTime),Aa.set(r,{animation:i,startTime:performance.now()}),o&&o(i)};a.ready?a.ready.then(c).catch(xe):c()},t.sync=he,t.transform=Dr,t.unwrapMotionComponent=function(t){if(ba(t))return t[M]},t.useAnimation=Pa,t.useAnimationControls=xa,t.useAnimationFrame=fa,t.useCycle=function(...t){const n=e.useRef(0),[s,o]=e.useState(t[n.current]);return[s,e.useCallback(e=>{n.current="number"!=typeof e?ua(0,t.length,n.current+1):e,o(t[n.current])},[t.length,...t])]},t.useDeprecatedAnimatedState=function(t){const[n,s]=e.useState(t),o=Da({},!1),i=S(()=>new La({props:{},visualState:o,presenceContext:null},{initialState:t}));return e.useEffect(()=>(i.mount({}),()=>i.unmount()),[i]),e.useEffect(()=>{i.update({onUpdate:t=>{s({...t})}},null)},[s,i]),[n,S(()=>t=>Ls(i,t))]},t.useDeprecatedInvertedScale=function(t){let n=Lr(1),s=Lr(1);const{visualElement:o}=e.useContext(a);return yn(!(!t&&!o)),gn(ka),ka=!0,t?(n=t.scaleX||n,s=t.scaleY||s):o&&(n=o.getValue("scaleX",1),s=o.getValue("scaleY",1)),{scaleX:kr(n,Ra),scaleY:kr(s,Ra)}},t.useDomEvent=function(t,n,s,o){e.useEffect(()=>{const e=t.current;if(s&&e)return Ht(e,n,s,o)},[t,n,s,o])},t.useDragControls=function(){return S(wa)},t.useElementScroll=function(t){return ma({container:t})},t.useForceUpdate=fr,t.useInView=function(t,{root:n,margin:s,amount:o,once:i=!1}={}){const[r,a]=e.useState(!1);return e.useEffect(()=>{if(!t.current||i&&r)return;const e={root:n&&n.current||void 0,margin:s,amount:"some"===o?"any":o};return ca(t.current,()=>(a(!0),i?void 0:()=>a(!1)),e)},[n,t,s,i]),r},t.useInstantLayoutTransition=Sa,t.useInstantTransition=function(){const[t,n]=fr(),s=Sa();return e.useEffect(()=>{he.postRender(()=>he.postRender(()=>xn.current=!1))},[n]),e=>{s(()=>{xn.current=!0,t(),e()})}},t.useIsPresent=function(){return null===(t=e.useContext(c))||t.isPresent;var t},t.useIsomorphicLayoutEffect=l,t.useMotionTemplate=function(t,...e){const n=t.length;return Rr(e.filter(N),(function(){let s="";for(let o=0;o<n;o++){s+=t[o];const n=e[o];n&&(s+=N(n)?n.get():n)}return s}))},t.useMotionValue=Lr,t.useMotionValueEvent=function(t,n,s){e.useInsertionEffect(()=>t.on(n,s),[t,n,s])},t.usePresence=sr,t.useReducedMotion=ya,t.useReducedMotionConfig=function(){const t=ya(),{reducedMotion:n}=e.useContext(r);return"never"!==n&&("always"===n||t)},t.useResetProjection=function(){return o.useCallback(()=>{const t=Ai.current;t&&t.resetTree()},[])},t.useScroll=ma,t.useSpring=function(t,n={}){const{isStatic:s}=e.useContext(r),o=e.useRef(null),i=Lr(N(t)?t.get():t),a=()=>{o.current&&o.current.stop()};return e.useInsertionEffect(()=>i.attach((t,e)=>s?e(t):(a(),o.current=cs({keyframes:[i.get(),t],velocity:i.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:e}),i.get()),a),[JSON.stringify(n)]),l(()=>{if(N(t))return t.on("change",t=>i.set(parseFloat(t)))},[i]),i},t.useTime=function(){const t=Lr(0);return fa(e=>t.set(e)),t},t.useTransform=kr,t.useUnmountEffect=Pr,t.useVelocity=function(t){const n=Lr(t.getVelocity());return e.useEffect(()=>t.on("velocityChange",t=>{n.set(t)}),[t]),n},t.useViewportScroll=function(){return ma()},t.useWillChange=function(){return S(()=>new ga("auto"))},t.warning=gn,t.wrap=ua,Object.defineProperty(t,"__esModule",{value:!0})}));
|
package/dist/index.d.ts
CHANGED
|
@@ -4547,6 +4547,13 @@ interface ScrollMotionValues {
|
|
|
4547
4547
|
scrollYProgress: MotionValue<number>;
|
|
4548
4548
|
}
|
|
4549
4549
|
|
|
4550
|
+
/**
|
|
4551
|
+
* Note: Still used by components generated by old versions of Framer
|
|
4552
|
+
*
|
|
4553
|
+
* @deprecated
|
|
4554
|
+
*/
|
|
4555
|
+
declare const DeprecatedLayoutGroupContext: React$1.Context<string | null>;
|
|
4556
|
+
|
|
4550
4557
|
/**
|
|
4551
4558
|
* This is not an officially supported API and may be removed
|
|
4552
4559
|
* on any version.
|
|
@@ -4580,4 +4587,4 @@ declare function useInvertedScale(scale?: Partial<ScaleMotionValues>): ScaleMoti
|
|
|
4580
4587
|
|
|
4581
4588
|
declare const AnimateSharedLayout: React$1.FunctionComponent<React$1.PropsWithChildren<unknown>>;
|
|
4582
4589
|
|
|
4583
|
-
export { AnimatePresence, AnimatePresenceProps, AnimateSharedLayout, AnimationControls, AnimationLifecycleOptions, AnimationLifecycles, AnimationOptions$1 as AnimationOptions, AnimationPlaybackControls, AnimationPlaybackOptions, AnimationProps, AnimationType, Axis, AxisDelta, BezierDefinition, BoundingBox, Box, ControlsAnimationDefinition, CreateVisualElement, CustomDomComponent, CustomValueType, Cycle, CycleState, DecayOptions, DelayedFunction, Delta, DevMessage, DragControls, DragElastic, DragHandlers, DraggableProps, DurationSpringOptions, Easing, EasingDefinition, EasingFunction, EasingModifier, EventInfo, FeatureBundle, FeatureDefinition, FeatureDefinitions, FeaturePackage, FeaturePackages, FlatTree, FocusHandlers, ForwardRefComponent, HTMLMotionProps, HoverHandlers, HydratedFeatureDefinition, HydratedFeatureDefinitions, IProjectionNode, Inertia, InertiaOptions$1 as InertiaOptions, InterpolateOptions, KeyframeOptions, Keyframes, KeyframesTarget, LayoutGroup, LayoutGroupContext, LayoutProps, LazyFeatureBundle$1 as LazyFeatureBundle, LazyMotion, LazyProps, MixerFactory, MotionAdvancedProps, MotionConfig, MotionConfigContext, MotionConfigProps, MotionContext, MotionProps, MotionStyle, MotionTransform, MotionValue, None, Orchestration, PanHandlers, PanInfo, PassiveEffect, PlaybackControls, Point, PresenceContext, RelayoutInfo, RenderComponent, Reorder, Repeat, ResolveLayoutTransition, ResolvedKeyframesTarget, ResolvedSingleTarget, ResolvedValueTarget, ResolvedValues, SVGAttributesAsMotionValues, SVGMotionProps, ScrapeMotionValuesFromProps, ScrollMotionValues, SingleTarget, Spring, SpringOptions, Subscriber, SwitchLayoutGroupContext, TapHandlers, TapInfo, Target, TargetAndTransition, TransformPoint, Transition, Tween, ValueTarget, ValueType, Variant, VariantLabels, Variants, VelocityOptions, VisualElement, VisualState, addPointerEvent, addPointerInfo, addScaleCorrector, animate, animateValue, animateVisualElement, animationControls, animations, anticipate, backIn, backInOut, backOut, buildTransform, calcLength, checkTargetForNewValues, circIn, circInOut, circOut, clamp, color, complex, createBox, createDomMotionComponent, createMotionComponent, cubicBezier, delay, distance, distance2D, domAnimation, domMax, easeIn, easeInOut, easeOut, filterProps, frameData, inView, inertia, interpolate, invariant, isBrowser, isDragActive, isMotionComponent, isMotionValue, isValidMotionProp, m, makeUseVisualState, mix, motion, motionValue, optimizedAppearDataAttribute, pipe, progress, px, resolveMotionValue, scroll, spring, startOptimizedAppearAnimation, sync, transform, unwrapMotionComponent, useAnimation, useAnimationControls, useAnimationFrame, useCycle, useAnimatedState as useDeprecatedAnimatedState, useInvertedScale as useDeprecatedInvertedScale, useDomEvent, useDragControls, useElementScroll, useForceUpdate, useInView, useInstantLayoutTransition, useInstantTransition, useIsPresent, useIsomorphicLayoutEffect, useMotionTemplate, useMotionValue, useMotionValueEvent, usePresence, useReducedMotion, useReducedMotionConfig, useResetProjection, useScroll, useSpring, useTime, useTransform, useUnmountEffect, useVelocity, useViewportScroll, useWillChange, warning, wrap };
|
|
4590
|
+
export { AnimatePresence, AnimatePresenceProps, AnimateSharedLayout, AnimationControls, AnimationLifecycleOptions, AnimationLifecycles, AnimationOptions$1 as AnimationOptions, AnimationPlaybackControls, AnimationPlaybackOptions, AnimationProps, AnimationType, Axis, AxisDelta, BezierDefinition, BoundingBox, Box, ControlsAnimationDefinition, CreateVisualElement, CustomDomComponent, CustomValueType, Cycle, CycleState, DecayOptions, DelayedFunction, Delta, DeprecatedLayoutGroupContext, DevMessage, DragControls, DragElastic, DragHandlers, DraggableProps, DurationSpringOptions, Easing, EasingDefinition, EasingFunction, EasingModifier, EventInfo, FeatureBundle, FeatureDefinition, FeatureDefinitions, FeaturePackage, FeaturePackages, FlatTree, FocusHandlers, ForwardRefComponent, HTMLMotionProps, HoverHandlers, HydratedFeatureDefinition, HydratedFeatureDefinitions, IProjectionNode, Inertia, InertiaOptions$1 as InertiaOptions, InterpolateOptions, KeyframeOptions, Keyframes, KeyframesTarget, LayoutGroup, LayoutGroupContext, LayoutProps, LazyFeatureBundle$1 as LazyFeatureBundle, LazyMotion, LazyProps, MixerFactory, MotionAdvancedProps, MotionConfig, MotionConfigContext, MotionConfigProps, MotionContext, MotionProps, MotionStyle, MotionTransform, MotionValue, None, Orchestration, PanHandlers, PanInfo, PassiveEffect, PlaybackControls, Point, PresenceContext, RelayoutInfo, RenderComponent, Reorder, Repeat, ResolveLayoutTransition, ResolvedKeyframesTarget, ResolvedSingleTarget, ResolvedValueTarget, ResolvedValues, SVGAttributesAsMotionValues, SVGMotionProps, ScrapeMotionValuesFromProps, ScrollMotionValues, SingleTarget, Spring, SpringOptions, Subscriber, SwitchLayoutGroupContext, TapHandlers, TapInfo, Target, TargetAndTransition, TransformPoint, Transition, Tween, ValueTarget, ValueType, Variant, VariantLabels, Variants, VelocityOptions, VisualElement, VisualState, addPointerEvent, addPointerInfo, addScaleCorrector, animate, animateValue, animateVisualElement, animationControls, animations, anticipate, backIn, backInOut, backOut, buildTransform, calcLength, checkTargetForNewValues, circIn, circInOut, circOut, clamp, color, complex, createBox, createDomMotionComponent, createMotionComponent, cubicBezier, delay, distance, distance2D, domAnimation, domMax, easeIn, easeInOut, easeOut, filterProps, frameData, inView, inertia, interpolate, invariant, isBrowser, isDragActive, isMotionComponent, isMotionValue, isValidMotionProp, m, makeUseVisualState, mix, motion, motionValue, optimizedAppearDataAttribute, pipe, progress, px, resolveMotionValue, scroll, spring, startOptimizedAppearAnimation, sync, transform, unwrapMotionComponent, useAnimation, useAnimationControls, useAnimationFrame, useCycle, useAnimatedState as useDeprecatedAnimatedState, useInvertedScale as useDeprecatedInvertedScale, useDomEvent, useDragControls, useElementScroll, useForceUpdate, useInView, useInstantLayoutTransition, useInstantTransition, useIsPresent, useIsomorphicLayoutEffect, useMotionTemplate, useMotionValue, useMotionValueEvent, usePresence, useReducedMotion, useReducedMotionConfig, useResetProjection, useScroll, useSpring, useTime, useTransform, useUnmountEffect, useVelocity, useViewportScroll, useWillChange, warning, wrap };
|
package/dist/projection.dev.js
CHANGED
|
@@ -1992,7 +1992,7 @@
|
|
|
1992
1992
|
* This will be replaced by the build step with the latest version number.
|
|
1993
1993
|
* When MotionValues are provided to motion components, warn if versions are mixed.
|
|
1994
1994
|
*/
|
|
1995
|
-
this.version = "10.2.
|
|
1995
|
+
this.version = "10.2.2";
|
|
1996
1996
|
/**
|
|
1997
1997
|
* Duration, in milliseconds, since last updating frame.
|
|
1998
1998
|
*
|
|
@@ -5185,7 +5185,7 @@
|
|
|
5185
5185
|
* and warn against mismatches.
|
|
5186
5186
|
*/
|
|
5187
5187
|
{
|
|
5188
|
-
warnOnce(nextValue.version === "10.2.
|
|
5188
|
+
warnOnce(nextValue.version === "10.2.2", `Attempting to mix Framer Motion versions ${nextValue.version} with 10.2.2 may not work as expected.`);
|
|
5189
5189
|
}
|
|
5190
5190
|
}
|
|
5191
5191
|
else if (isMotionValue(prevValue)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "framer-motion",
|
|
3
|
-
"version": "10.2.
|
|
3
|
+
"version": "10.2.2",
|
|
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.55 kB"
|
|
117
117
|
}
|
|
118
118
|
],
|
|
119
|
-
"gitHead": "
|
|
119
|
+
"gitHead": "daeddff03d931dba8ca04611b66b64b4f40b4736"
|
|
120
120
|
}
|