framer-motion 2.9.0 → 2.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,7 +2,31 @@
2
2
 
3
3
  Framer Motion adheres to [Semantic Versioning](http://semver.org/).
4
4
 
5
- ## [2.9.0] 2020-10-11
5
+ ## [2.9.4] 2020-10-21
6
+
7
+ ### Added
8
+
9
+ - Exporting internal API `startVisualElementAnimation` for use in Framer.
10
+
11
+ ## [2.9.3] 2020-10-19
12
+
13
+ ### Added
14
+
15
+ - Exporting `Target` type.
16
+
17
+ ## [2.9.2] 2020-10-19
18
+
19
+ ### Fixed
20
+
21
+ - Over-eager variant propagation.
22
+
23
+ ## [2.9.1] 2020-10-12
24
+
25
+ ### Fixed
26
+
27
+ - Reverting `matchMedia` listener to legacy `addListener` to fix in Safari.
28
+
29
+ ## [2.9.0] 2020-10-12
6
30
 
7
31
  ### Added
8
32
 
@@ -11809,6 +11809,50 @@
11809
11809
  ],
11810
11810
  "extendsTokenRanges": []
11811
11811
  },
11812
+ {
11813
+ "kind": "TypeAlias",
11814
+ "docComment": "",
11815
+ "excerptTokens": [
11816
+ {
11817
+ "kind": "Content",
11818
+ "text": "export declare type "
11819
+ },
11820
+ {
11821
+ "kind": "Reference",
11822
+ "text": "Target"
11823
+ },
11824
+ {
11825
+ "kind": "Content",
11826
+ "text": " = "
11827
+ },
11828
+ {
11829
+ "kind": "Reference",
11830
+ "text": "MakeCustomValueType"
11831
+ },
11832
+ {
11833
+ "kind": "Content",
11834
+ "text": "<"
11835
+ },
11836
+ {
11837
+ "kind": "Reference",
11838
+ "text": "TargetProperties"
11839
+ },
11840
+ {
11841
+ "kind": "Content",
11842
+ "text": ">"
11843
+ },
11844
+ {
11845
+ "kind": "Content",
11846
+ "text": ";"
11847
+ }
11848
+ ],
11849
+ "releaseTag": "Public",
11850
+ "name": "Target",
11851
+ "typeTokenRange": {
11852
+ "startIndex": 3,
11853
+ "endIndex": 7
11854
+ }
11855
+ },
11812
11856
  {
11813
11857
  "kind": "TypeAlias",
11814
11858
  "docComment": "/**\n * An object that specifies values to animate to. Each value may be set either as a single value, or an array of values.\n *\n * It may also option contain these properties:\n *\n * - `transition`: Specifies transitions for all or individual values. - `transitionEnd`: Specifies values to set when the animation finishes.\n * ```jsx\n * const target = {\n * x: \"0%\",\n * opacity: 0,\n * transition: { duration: 1 },\n * transitionEnd: { display: \"none\" }\n * }\n * ```\n *\n * @public\n */\n",
@@ -955,6 +955,9 @@ function getOrigin(target, transition, visualElement) {
955
955
  return origin;
956
956
  }
957
957
 
958
+ /**
959
+ * @internal
960
+ */
958
961
  function startVisualElementAnimation(visualElement, definition, opts) {
959
962
  if (opts === void 0) { opts = {}; }
960
963
  if (opts.priority) {
@@ -3652,11 +3655,11 @@ function useVariants(visualElement, _a, isStatic) {
3652
3655
  * to Framer which uses a `motion` component in every `Frame` and it might be if we change that
3653
3656
  * in the future that this restriction is removed.
3654
3657
  */
3655
- var isVariantNode = variants ||
3656
- isVariantLabel$1(animate) ||
3658
+ var controlsVariants = isVariantLabel$1(animate) ||
3657
3659
  isVariantLabel$1(whileTap) ||
3658
3660
  isVariantLabel$1(whileHover) ||
3659
3661
  isAnimationControls(animate);
3662
+ var isVariantNode = variants || controlsVariants;
3660
3663
  /**
3661
3664
  * Override initial with one from a parent `AnimatePresence`, if present
3662
3665
  */
@@ -3687,7 +3690,7 @@ function useVariants(visualElement, _a, isStatic) {
3687
3690
  /**
3688
3691
  * Subscribe to the parent visualElement if this is a participant in the variant tree
3689
3692
  */
3690
- isVariantNode && (parent === null || parent === void 0 ? void 0 : parent.addVariantChild(visualElement));
3693
+ isVariantNode && !controlsVariants && (parent === null || parent === void 0 ? void 0 : parent.addVariantChild(visualElement));
3691
3694
  /**
3692
3695
  * If this component isn't exiting the tree, clear all the children in the render phase.
3693
3696
  * This will allow children to resubscribe in the correct order to ensure the correct stagger order.
@@ -6729,7 +6732,7 @@ if (typeof window !== "undefined") {
6729
6732
  var setReducedMotionPreferences = function () {
6730
6733
  return prefersReducedMotion.set(motionMediaQuery_1.matches);
6731
6734
  };
6732
- motionMediaQuery_1.addEventListener("change", setReducedMotionPreferences);
6735
+ motionMediaQuery_1.addListener(setReducedMotionPreferences);
6733
6736
  setReducedMotionPreferences();
6734
6737
  }
6735
6738
  else {
@@ -7167,6 +7170,7 @@ exports.motion = motion;
7167
7170
  exports.motionValue = motionValue;
7168
7171
  exports.resolveMotionValue = resolveMotionValue;
7169
7172
  exports.startAnimation = startAnimation;
7173
+ exports.startVisualElementAnimation = startVisualElementAnimation;
7170
7174
  exports.transform = transform;
7171
7175
  exports.useAnimatedState = useAnimatedState;
7172
7176
  exports.useAnimation = useAnimation;
@@ -378,6 +378,13 @@ declare type AnimationOptions<V> = (Tween | Spring) & PlaybackLifecycles<V> & {
378
378
  type?: "tween" | "spring";
379
379
  };
380
380
 
381
+ declare type AnimationOptions_2 = {
382
+ delay?: number;
383
+ priority?: number;
384
+ transitionOverride?: Transition;
385
+ custom?: any;
386
+ };
387
+
381
388
  /**
382
389
  * @public
383
390
  */
@@ -7075,6 +7082,11 @@ declare type StartAnimation = (complete: () => void) => () => void;
7075
7082
  */
7076
7083
  export declare function startAnimation(key: string, value: MotionValue, target: ResolvedValueTarget, transition?: Transition): Promise<void>;
7077
7084
 
7085
+ /**
7086
+ * @internal
7087
+ */
7088
+ export declare function startVisualElementAnimation(visualElement: VisualElement, definition: AnimationDefinition, opts?: AnimationOptions_2): Promise<void>;
7089
+
7078
7090
  /**
7079
7091
  * @public
7080
7092
  */
@@ -7311,7 +7323,7 @@ export declare interface TapInfo {
7311
7323
  point: Point2D;
7312
7324
  }
7313
7325
 
7314
- declare type Target = MakeCustomValueType<TargetProperties>;
7326
+ export declare type Target = MakeCustomValueType<TargetProperties>;
7315
7327
 
7316
7328
  /**
7317
7329
  * An object that specifies values to animate to. Each value may be set either as
@@ -2243,6 +2243,9 @@
2243
2243
  return origin;
2244
2244
  }
2245
2245
 
2246
+ /**
2247
+ * @internal
2248
+ */
2246
2249
  function startVisualElementAnimation(visualElement, definition, opts) {
2247
2250
  if (opts === void 0) { opts = {}; }
2248
2251
  if (opts.priority) {
@@ -4940,11 +4943,11 @@
4940
4943
  * to Framer which uses a `motion` component in every `Frame` and it might be if we change that
4941
4944
  * in the future that this restriction is removed.
4942
4945
  */
4943
- var isVariantNode = variants ||
4944
- isVariantLabel$1(animate) ||
4946
+ var controlsVariants = isVariantLabel$1(animate) ||
4945
4947
  isVariantLabel$1(whileTap) ||
4946
4948
  isVariantLabel$1(whileHover) ||
4947
4949
  isAnimationControls(animate);
4950
+ var isVariantNode = variants || controlsVariants;
4948
4951
  /**
4949
4952
  * Override initial with one from a parent `AnimatePresence`, if present
4950
4953
  */
@@ -4975,7 +4978,7 @@
4975
4978
  /**
4976
4979
  * Subscribe to the parent visualElement if this is a participant in the variant tree
4977
4980
  */
4978
- isVariantNode && (parent === null || parent === void 0 ? void 0 : parent.addVariantChild(visualElement));
4981
+ isVariantNode && !controlsVariants && (parent === null || parent === void 0 ? void 0 : parent.addVariantChild(visualElement));
4979
4982
  /**
4980
4983
  * If this component isn't exiting the tree, clear all the children in the render phase.
4981
4984
  * This will allow children to resubscribe in the correct order to ensure the correct stagger order.
@@ -8017,7 +8020,7 @@
8017
8020
  var setReducedMotionPreferences = function () {
8018
8021
  return prefersReducedMotion.set(motionMediaQuery_1.matches);
8019
8022
  };
8020
- motionMediaQuery_1.addEventListener("change", setReducedMotionPreferences);
8023
+ motionMediaQuery_1.addListener(setReducedMotionPreferences);
8021
8024
  setReducedMotionPreferences();
8022
8025
  }
8023
8026
  else {
@@ -8455,6 +8458,7 @@
8455
8458
  exports.motionValue = motionValue;
8456
8459
  exports.resolveMotionValue = resolveMotionValue;
8457
8460
  exports.startAnimation = startAnimation;
8461
+ exports.startVisualElementAnimation = startVisualElementAnimation;
8458
8462
  exports.transform = transform;
8459
8463
  exports.useAnimatedState = useAnimatedState;
8460
8464
  exports.useAnimation = useAnimation;
@@ -946,6 +946,9 @@ function getOrigin(target, transition, visualElement) {
946
946
  return origin;
947
947
  }
948
948
 
949
+ /**
950
+ * @internal
951
+ */
949
952
  function startVisualElementAnimation(visualElement, definition, opts) {
950
953
  if (opts === void 0) { opts = {}; }
951
954
  if (opts.priority) {
@@ -3644,11 +3647,11 @@ function useVariants(visualElement, _a, isStatic) {
3644
3647
  * to Framer which uses a `motion` component in every `Frame` and it might be if we change that
3645
3648
  * in the future that this restriction is removed.
3646
3649
  */
3647
- var isVariantNode = variants ||
3648
- isVariantLabel$1(animate) ||
3650
+ var controlsVariants = isVariantLabel$1(animate) ||
3649
3651
  isVariantLabel$1(whileTap) ||
3650
3652
  isVariantLabel$1(whileHover) ||
3651
3653
  isAnimationControls(animate);
3654
+ var isVariantNode = variants || controlsVariants;
3652
3655
  /**
3653
3656
  * Override initial with one from a parent `AnimatePresence`, if present
3654
3657
  */
@@ -3679,7 +3682,7 @@ function useVariants(visualElement, _a, isStatic) {
3679
3682
  /**
3680
3683
  * Subscribe to the parent visualElement if this is a participant in the variant tree
3681
3684
  */
3682
- isVariantNode && (parent === null || parent === void 0 ? void 0 : parent.addVariantChild(visualElement));
3685
+ isVariantNode && !controlsVariants && (parent === null || parent === void 0 ? void 0 : parent.addVariantChild(visualElement));
3683
3686
  /**
3684
3687
  * If this component isn't exiting the tree, clear all the children in the render phase.
3685
3688
  * This will allow children to resubscribe in the correct order to ensure the correct stagger order.
@@ -6721,7 +6724,7 @@ if (typeof window !== "undefined") {
6721
6724
  var setReducedMotionPreferences = function () {
6722
6725
  return prefersReducedMotion.set(motionMediaQuery_1.matches);
6723
6726
  };
6724
- motionMediaQuery_1.addEventListener("change", setReducedMotionPreferences);
6727
+ motionMediaQuery_1.addListener(setReducedMotionPreferences);
6725
6728
  setReducedMotionPreferences();
6726
6729
  }
6727
6730
  else {
@@ -7132,4 +7135,4 @@ function useAnimatedState(initialState) {
7132
7135
  return [animationState, startAnimation];
7133
7136
  }
7134
7137
 
7135
- export { AnimateLayout as AnimateLayoutFeature, AnimatePresence, AnimateSharedLayout, AnimationControls, Animation as AnimationFeature, DragControls, Drag as DragFeature, Exit as ExitFeature, Gestures as GesturesFeature, HTMLVisualElement, MotionConfig, MotionConfigContext, MotionValue, PresenceContext, SharedLayoutContext, VisibilityAction, addScaleCorrection, animate, animationControls, createBatcher, createDomMotionComponent, createMotionComponent, isValidMotionProp, m, motion, motionValue, resolveMotionValue, startAnimation, transform, useAnimatedState, useAnimation, useCycle, useDomEvent, useDragControls, useElementScroll, useExternalRef, useGestures, useInvertedScale, useIsPresent, useMotionTemplate, useMotionValue, usePanGesture, usePresence, useReducedMotion, useSpring, useTapGesture, useTransform, useViewportScroll };
7138
+ export { AnimateLayout as AnimateLayoutFeature, AnimatePresence, AnimateSharedLayout, AnimationControls, Animation as AnimationFeature, DragControls, Drag as DragFeature, Exit as ExitFeature, Gestures as GesturesFeature, HTMLVisualElement, MotionConfig, MotionConfigContext, MotionValue, PresenceContext, SharedLayoutContext, VisibilityAction, addScaleCorrection, animate, animationControls, createBatcher, createDomMotionComponent, createMotionComponent, isValidMotionProp, m, motion, motionValue, resolveMotionValue, startAnimation, startVisualElementAnimation, transform, useAnimatedState, useAnimation, useCycle, useDomEvent, useDragControls, useElementScroll, useExternalRef, useGestures, useInvertedScale, useIsPresent, useMotionTemplate, useMotionValue, usePanGesture, usePresence, useReducedMotion, useSpring, useTapGesture, useTransform, useViewportScroll };
@@ -1 +1 @@
1
- !function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={},t.React)}(this,(function(t,n){"use strict";function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var r=e(n),o=function(t,n){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)n.hasOwnProperty(e)&&(t[e]=n[e])})(t,n)};function i(t,n){function e(){this.constructor=t}o(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)}var a=function(){return(a=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t}).apply(this,arguments)};function u(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(e[r[o]]=t[r[o]])}return e}function s(t,n){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var r,o,i=e.call(t),a=[];try{for(;(void 0===n||n-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(e=i.return)&&e.call(i)}finally{if(o)throw o.error}}return a}function c(){for(var t=[],n=0;n<arguments.length;n++)t=t.concat(s(arguments[n]));return t}var f=function(t){return"object"==typeof t&&t.hasOwnProperty("current")},l=0,d="undefined"!=typeof window&&void 0!==window.requestAnimationFrame?function(t){return window.requestAnimationFrame(t)}:function(t){var n=Date.now(),e=Math.max(0,16.7-(n-l));l=n+e,setTimeout((function(){return t(l)}),e)},p=1/60*1e3,v=!0,h=!1,m=!1,y={delta:0,timestamp:0},g=["read","update","preRender","render","postRender"],x=function(t){return h=t},b=g.reduce((function(t,n){return t[n]=function(t){var n=[],e=[],r=0,o=!1,i=0,a=new WeakSet,u=new WeakSet,s={cancel:function(t){var n=e.indexOf(t);a.add(t),-1!==n&&e.splice(n,1)},process:function(c){var f,l;if(o=!0,n=(f=[e,n])[0],(e=f[1]).length=0,r=n.length)for(i=0;i<r;i++)(l=n[i])(c),!0!==u.has(l)||a.has(l)||(s.schedule(l),t(!0));o=!1},schedule:function(t,i,s){void 0===i&&(i=!1),void 0===s&&(s=!1);var c=s&&o,f=c?n:e;a.delete(t),i&&u.add(t),-1===f.indexOf(t)&&(f.push(t),c&&(r=n.length))}};return s}(x),t}),{}),E=g.reduce((function(t,n){var e=b[n];return t[n]=function(t,n,r){return void 0===n&&(n=!1),void 0===r&&(r=!1),h||S(),e.schedule(t,n,r),t},t}),{}),w=g.reduce((function(t,n){return t[n]=b[n].cancel,t}),{}),C=function(t){return b[t].process(y)},A=function(t){h=!1,y.delta=v?p:Math.max(Math.min(t-y.timestamp,40),1),v||(p=y.delta),y.timestamp=t,m=!0,g.forEach(C),m=!1,h&&(v=!1,d(A))},S=function(){h=!0,v=!0,m||d(A)},P=function(){return y},M=function(t,n){return function(e){return Math.max(Math.min(e,n),t)}},T=function(t){return t%1?Number(t.toFixed(5)):t},V=/(-)?(\d[\d\.]*)/g,L=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,B=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i,k={test:function(t){return"number"==typeof t},parse:parseFloat,transform:function(t){return t}},R=a(a({},k),{transform:M(0,1)}),O=a(a({},k),{default:1}),D=function(t){return{test:function(n){return"string"==typeof n&&n.endsWith(t)&&1===n.split(" ").length},parse:parseFloat,transform:function(n){return""+n+t}}},F=D("deg"),U=D("%"),I=D("px"),j=D("vh"),H=D("vw"),X=a(a({},U),{parse:function(t){return U.parse(t)/100},transform:function(t){return U.transform(100*t)}}),Y=M(0,255),z=function(t){return void 0!==t.red},W=function(t){return void 0!==t.hue};var N=function(t){return function(n){if("string"!=typeof n)return n;for(var e={},r=function(t){return t.substring(t.indexOf("(")+1,t.lastIndexOf(")"))}(n).replace(/(,|\/)/g," ").split(/ \s*/),o=0;o<4;o++)e[t[o]]=void 0!==r[o]?parseFloat(r[o]):1;return e}},G=a(a({},k),{transform:function(t){return Math.round(Y(t))}});function _(t,n){return t.startsWith(n)&&B.test(t)}var q={test:function(t){return"string"==typeof t?_(t,"rgb"):z(t)},parse:N(["red","green","blue","alpha"]),transform:function(t){var n=t.red,e=t.green,r=t.blue,o=t.alpha,i=void 0===o?1:o;return function(t){var n=t.red,e=t.green,r=t.blue,o=t.alpha;return"rgba("+n+", "+e+", "+r+", "+(void 0===o?1:o)+")"}({red:G.transform(n),green:G.transform(e),blue:G.transform(r),alpha:T(R.transform(i))})}},Z={test:function(t){return"string"==typeof t?_(t,"hsl"):W(t)},parse:N(["hue","saturation","lightness","alpha"]),transform:function(t){var n=t.hue,e=t.saturation,r=t.lightness,o=t.alpha,i=void 0===o?1:o;return function(t){var n=t.hue,e=t.saturation,r=t.lightness,o=t.alpha;return"hsla("+n+", "+e+", "+r+", "+(void 0===o?1:o)+")"}({hue:Math.round(n),saturation:U.transform(T(e)),lightness:U.transform(T(r)),alpha:T(R.transform(i))})}},$=a(a({},q),{test:function(t){return"string"==typeof t&&_(t,"#")},parse:function(t){var n="",e="",r="";return t.length>4?(n=t.substr(1,2),e=t.substr(3,2),r=t.substr(5,2)):(n=t.substr(1,1),e=t.substr(2,1),r=t.substr(3,1),n+=n,e+=e,r+=r),{red:parseInt(n,16),green:parseInt(e,16),blue:parseInt(r,16),alpha:1}}}),K={test:function(t){return"string"==typeof t&&B.test(t)||z(t)||W(t)},parse:function(t){return q.test(t)?q.parse(t):Z.test(t)?Z.parse(t):$.test(t)?$.parse(t):t},transform:function(t){return z(t)?q.transform(t):W(t)?Z.transform(t):t}},J=function(t){return"number"==typeof t?0:t},Q={test:function(t){if("string"!=typeof t||!isNaN(t))return!1;var n=0,e=t.match(V),r=t.match(L);return e&&(n+=e.length),r&&(n+=r.length),n>0},parse:function(t){var n=t,e=[],r=n.match(L);r&&(n=n.replace(L,"${c}"),e.push.apply(e,r.map(K.parse)));var o=n.match(V);return o&&e.push.apply(e,o.map(k.parse)),e},createTransformer:function(t){var n=t,e=0,r=t.match(L),o=r?r.length:0;if(r)for(var i=0;i<o;i++)n=n.replace(r[i],"${c}"),e++;var a=n.match(V),u=a?a.length:0;if(a)for(i=0;i<u;i++)n=n.replace(a[i],"${n}"),e++;return function(t){for(var r=n,i=0;i<e;i++)r=r.replace(i<o?"${c}":"${n}",i<o?K.transform(t[i]):T(t[i]));return r}},getAnimatableNone:function(t){var n=Q.parse(t);return Q.createTransformer(t)(n.map(J))}},tt=function(t,n,e){return Math.min(Math.max(e,t),n)};function nt(t){var n,e,r=t.duration,o=void 0===r?800:r,i=t.bounce,a=void 0===i?.25:i,u=t.velocity,s=void 0===u?0:u,c=t.mass,f=void 0===c?1:c,l=1-a;l=tt(.05,1,l),o=tt(.01,10,o/1e3),l<1?(n=function(t){var n=t*l,e=n*o;return.001-(n-s)/et(t,l)*Math.exp(-e)},e=function(t){var e=t*l*o,r=e*s+s,i=Math.pow(l,2)*Math.pow(t,2)*o,a=Math.exp(-e),u=et(Math.pow(t,2),l);return(.001-n(t)>0?-1:1)*((r-i)*a)/u}):(n=function(t){return Math.exp(-t*o)*((t-s)*o+1)-.001},e=function(t){return Math.exp(-t*o)*(o*o*(s-t))});var d=function(t,n,e){for(var r=e,o=1;o<12;o++)r-=t(r)/n(r);return r}(n,e,5/o);if(isNaN(d))return{stiffness:100,damping:10};var p=Math.pow(d,2)*f;return{stiffness:p,damping:2*l*Math.sqrt(f*p)}}function et(t,n){return t*Math.sqrt(1-n*n)}var rt=["duration","bounce"],ot=["stiffness","damping","mass"];function it(t,n){return n.some((function(n){return void 0!==t[n]}))}function at(t){var n=t.from,e=void 0===n?0:n,r=t.to,o=void 0===r?1:r,i=t.restSpeed,s=void 0===i?2:i,c=t.restDelta,f=u(t,["from","to","restSpeed","restDelta"]),l={done:!1,value:e},d=function(t){var n=a({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},t);if(!it(t,ot)&&it(t,rt)){var e=nt(t);(n=a(a(a({},n),e),{velocity:0,mass:1})).isResolvedFromDuration=!0}return n}(f),p=d.stiffness,v=d.damping,h=d.mass,m=d.velocity,y=d.isResolvedFromDuration,g=ut,x=ut;function b(){var t=m?-m/1e3:0,n=o-e,r=v/(2*Math.sqrt(p*h)),i=Math.sqrt(p/h)/1e3;if(null!=c||(c=Math.abs(o-e)<=1?.01:.4),r<1){var a=et(i,r);g=function(e){var u=Math.exp(-r*i*e);return o-u*((t+r*i*n)/a*Math.sin(a*e)+n*Math.cos(a*e))},x=function(e){var o=Math.exp(-r*i*e);return r*i*o*(Math.sin(a*e)*(t+r*i*n)/a+n*Math.cos(a*e))-o*(Math.cos(a*e)*(t+r*i*n)-a*n*Math.sin(a*e))}}else if(1===r)g=function(e){return o-Math.exp(-i*e)*(n+(t+i*n)*e)};else{var u=i*Math.sqrt(r*r-1);g=function(e){var a=Math.exp(-r*i*e),s=Math.min(u*e,300);return o-a*((t+r*i*n)*Math.sinh(s)+u*n*Math.cosh(s))/u}}}return b(),{next:function(t){var n=g(t);if(y)l.done=t>=f.duration;else{var e=1e3*x(t),r=Math.abs(e)<=s,i=Math.abs(o-n)<=c;l.done=r&&i}return l.value=l.done?o:n,l},flipTarget:function(){var t;m=-m,e=(t=[o,e])[0],o=t[1],b()}}}at.needsInterpolation=function(t,n){return"string"==typeof t||"string"==typeof n};var ut=function(t){return 0},st=function(t,n,e){var r=n-t;return 0===r?1:(e-t)/r},ct=function(t,n,e){return-e*t+e*n+t},ft=function(t,n,e){var r=t*t,o=n*n;return Math.sqrt(Math.max(0,e*(o-r)+r))},lt=[$,q,Z],dt=function(t){return lt.find((function(n){return n.test(t)}))},pt=function(t,n){var e=dt(t),r=dt(n);e.transform,r.transform;var o=e.parse(t),i=r.parse(n),u=a({},o),s=e===Z?ct:ft;return function(t){for(var n in u)"alpha"!==n&&(u[n]=s(o[n],i[n],t));return u.alpha=ct(o.alpha,i.alpha,t),e.transform(u)}},vt=function(t){return"number"==typeof t},ht=function(t,n){return function(e){return n(t(e))}},mt=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.reduce(ht)};function yt(t,n){return vt(t)?function(e){return ct(t,n,e)}:K.test(t)?pt(t,n):Et(t,n)}var gt=function(t,n){var e=function(){for(var t=0,n=0,e=arguments.length;n<e;n++)t+=arguments[n].length;var r=Array(t),o=0;for(n=0;n<e;n++)for(var i=arguments[n],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}(t),r=e.length,o=t.map((function(t,e){return yt(t,n[e])}));return function(t){for(var n=0;n<r;n++)e[n]=o[n](t);return e}},xt=function(t,n){var e=a(a({},t),n),r={};for(var o in e)void 0!==t[o]&&void 0!==n[o]&&(r[o]=yt(t[o],n[o]));return function(t){for(var n in r)e[n]=r[n](t);return e}};function bt(t){for(var n=Q.parse(t),e=n.length,r=0,o=0,i=0,a=0;a<e;a++)r||"number"==typeof n[a]?r++:void 0!==n[a].hue?i++:o++;return{parsed:n,numNumbers:r,numRGB:o,numHSL:i}}var Et=function(t,n){var e=Q.createTransformer(n),r=bt(t),o=bt(n);return mt(gt(r.parsed,o.parsed),e)},wt=function(t,n){return function(e){return ct(t,n,e)}};function Ct(t,n,e){for(var r,o=[],i=e||("number"==typeof(r=t[0])?wt:"string"==typeof r?K.test(r)?pt:Et:Array.isArray(r)?gt:"object"==typeof r?xt:void 0),a=t.length-1,u=0;u<a;u++){var s=i(t[u],t[u+1]);if(n){var c=Array.isArray(n)?n[u]:n;s=mt(c,s)}o.push(s)}return o}function At(t,n,e){var r=void 0===e?{}:e,o=r.clamp,i=void 0===o||o,a=r.ease,u=r.mixer,s=t.length;n.length,!a||!Array.isArray(a)||a.length,t[0]>t[s-1]&&(t=[].concat(t),n=[].concat(n),t.reverse(),n.reverse());var c=Ct(n,a,u),f=2===s?function(t,n){var e=t[0],r=t[1],o=n[0];return function(t){return o(st(e,r,t))}}(t,c):function(t,n){var e=t.length,r=e-1;return function(o){var i=0,a=!1;if(o<=t[0]?a=!0:o>=t[r]&&(i=r-1,a=!0),!a){for(var u=1;u<e&&!(t[u]>o||u===r);u++);i=u-1}var s=st(t[i],t[i+1],o);return n[i](s)}}(t,c);return i?function(n){return f(tt(t[0],t[s-1],n))}:f}var St=function(t){return function(n){return 1-t(1-n)}},Pt=function(t){return function(n){return n<=.5?t(2*n)/2:(2-t(2*(1-n)))/2}},Mt=function(t){return function(n){return n*n*((t+1)*n-t)}},Tt=function(t){var n=Mt(t);return function(t){return(t*=2)<1?.5*n(t):.5*(2-Math.pow(2,-10*(t-1)))}},Vt=function(t){return t},Lt=function(t){return function(n){return Math.pow(n,t)}}(2),Bt=St(Lt),kt=Pt(Lt),Rt=function(t){return 1-Math.sin(Math.acos(t))},Ot=St(Rt),Dt=Pt(Ot),Ft=Mt(1.525),Ut=St(Ft),It=Pt(Ft),jt=Tt(1.525),Ht=function(t){if(1===t||0===t)return t;var n=t*t;return t<4/11?7.5625*n:t<8/11?9.075*n-9.9*t+3.4:t<.9?4356/361*n-35442/1805*t+16061/1805:10.8*t*t-20.52*t+10.72},Xt=St(Ht);function Yt(t,n){return t.map((function(){return n||kt})).splice(0,t.length-1)}function zt(t){var n=t.from,e=void 0===n?0:n,r=t.to,o=void 0===r?1:r,i=t.ease,a=t.offset,u=t.duration,s=void 0===u?300:u,c={done:!1,value:e},f=Array.isArray(o)?o:[e,o],l=function(t,n){return t.map((function(t){return t*n}))}(null!=a?a:function(t){var n=t.length;return t.map((function(t,e){return 0!==e?e/(n-1):0}))}(f),s);function d(){return At(l,f,{ease:Array.isArray(i)?i:Yt(f,i)})}var p=d();return{next:function(t){return c.value=p(t),c.done=t>=s,c},flipTarget:function(){f.reverse(),p=d()}}}var Wt={keyframes:zt,spring:at,decay:function(t){var n=t.velocity,e=void 0===n?0:n,r=t.from,o=void 0===r?0:r,i=t.power,a=void 0===i?.8:i,u=t.timeConstant,s=void 0===u?350:u,c=t.restDelta,f=void 0===c?.5:c,l=t.modifyTarget,d={done:!1,value:o},p=a*e,v=o+p,h=void 0===l?v:l(v);return h!==v&&(p=h-o),{next:function(t){var n=-p*Math.exp(-t/s);return d.done=!(n>f||n<-f),d.value=d.done?h:h+n,d},flipTarget:function(){}}}};function Nt(t,n,e){return void 0===e&&(e=0),t-n-e}var Gt=function(t){var n=function(n){var e=n.delta;return t(e)};return{start:function(){return E.update(n,!0,!0)},stop:function(){return w.update(n)}}};function _t(t){var n,e,r,o,i,s=t.from,c=t.autoplay,f=void 0===c||c,l=t.driver,d=void 0===l?Gt:l,p=t.elapsed,v=void 0===p?0:p,h=t.repeat,m=void 0===h?0:h,y=t.repeatType,g=void 0===y?"loop":y,x=t.repeatDelay,b=void 0===x?0:x,E=t.onPlay,w=t.onStop,C=t.onComplete,A=t.onRepeat,S=t.onUpdate,P=u(t,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]),M=P.to,T=0,V=P.duration,L=!1,B=!0,k=function(t){if(Array.isArray(t.to))return zt;if(Wt[t.type])return Wt[t.type];var n=new Set(Object.keys(t));return n.has("ease")||n.has("duration")&&!n.has("dampingRatio")?zt:n.has("dampingRatio")||n.has("stiffness")||n.has("mass")||n.has("damping")||n.has("restSpeed")||n.has("restDelta")?at:zt}(P);(null===(e=(n=k).needsInterpolation)||void 0===e?void 0:e.call(n,s,M))&&(i=At([0,100],[s,M],{clamp:!1}),s=0,M=100);var R=k(a(a({},P),{from:s,to:M}));function O(){T++,"reverse"===g?v=function(t,n,e,r){return void 0===e&&(e=0),void 0===r&&(r=!0),r?Nt(n+-t,n,e):n-(t-n)+e}(v,V,b,B=T%2==0):(v=Nt(v,V,b),"mirror"===g&&R.flipTarget()),L=!1,A&&A()}function D(t){if(B||(t=-t),v+=t,!L){var n=R.next(Math.max(0,v));o=n.value,i&&(o=i(o)),L=B?n.done:v<=0}null==S||S(o),L&&(0===T&&(null!=V||(V=v)),T<m?function(t,n,e,r){return r?t>=n+e:t<=-e}(v,V,b,B)&&O():(r.stop(),C&&C()))}return f&&(null==E||E(),(r=d(D)).start()),{stop:function(){null==w||w(),r.stop()}}}function qt(t,n){return n?t*(1e3/n):0}var Zt=function(t){return t.hasOwnProperty("x")&&t.hasOwnProperty("y")},$t=function(t){return Zt(t)&&t.hasOwnProperty("z")},Kt=function(t,n){return Math.abs(t-n)};function Jt(t,n){if(vt(t)&&vt(n))return Kt(t,n);if(Zt(t)&&Zt(n)){var e=Kt(t.x,n.x),r=Kt(t.y,n.y),o=$t(t)&&$t(n)?Kt(t.z,n.z):0;return Math.sqrt(Math.pow(e,2)+Math.pow(r,2)+Math.pow(o,2))}}var Qt=function(t,n,e){var r=n-t;return((e-t)%r+r)%r+t},tn=function(t,n){return 1-3*n+3*t},nn=function(t,n){return 3*n-6*t},en=function(t){return 3*t},rn=function(t,n,e){return((tn(n,e)*t+nn(n,e))*t+en(n))*t},on=function(t,n,e){return 3*tn(n,e)*t*t+2*nn(n,e)*t+en(n)};function an(t,n,e,r){if(t===n&&e===r)return Vt;for(var o=new Float32Array(11),i=0;i<11;++i)o[i]=rn(.1*i,t,e);function a(n){for(var r=0,i=1;10!==i&&o[i]<=n;++i)r+=.1;--i;var a=r+.1*((n-o[i])/(o[i+1]-o[i])),u=on(a,t,e);return u>=.001?function(t,n,e,r){for(var o=0;o<8;++o){var i=on(n,e,r);if(0===i)return n;n-=(rn(n,e,r)-t)/i}return n}(n,a,t,e):0===u?a:function(t,n,e,r,o){var i,a,u=0;do{(i=rn(a=n+(e-n)/2,r,o)-t)>0?e=a:n=a}while(Math.abs(i)>1e-7&&++u<10);return a}(n,r,r+.1,t,e)}return function(t){return 0===t||1===t?t:rn(a(t),n,r)}}var un=function(){function t(){this.subscriptions=new Set}return t.prototype.add=function(t){var n=this;return this.subscriptions.add(t),function(){n.subscriptions.delete(t)}},t.prototype.notify=function(t,n,e){var r,o;if(this.subscriptions.size)try{for(var i=function(t){var n="function"==typeof Symbol&&Symbol.iterator,e=n&&t[n],r=0;if(e)return e.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}(this.subscriptions),a=i.next();!a.done;a=i.next()){(0,a.value)(t,n,e)}}catch(t){r={error:t}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}},t.prototype.clear=function(){this.subscriptions.clear()},t}(),sn=function(){function t(t){var n,e=this;this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new un,this.renderSubscribers=new un,this.canTrackVelocity=!1,this.updateAndNotify=function(t,n){void 0===n&&(n=!0),e.prev=e.current,e.current=t,e.prev!==e.current&&e.updateSubscribers.notify(e.current),n&&e.renderSubscribers.notify(e.current);var r=P(),o=r.delta,i=r.timestamp;e.lastUpdated!==i&&(e.timeDelta=o,e.lastUpdated=i,E.postRender(e.scheduleVelocityCheck))},this.scheduleVelocityCheck=function(){return E.postRender(e.velocityCheck)},this.velocityCheck=function(t){t.timestamp!==e.lastUpdated&&(e.prev=e.current)},this.set(t,!1),this.canTrackVelocity=(n=this.current,!isNaN(parseFloat(n)))}return t.prototype.onChange=function(t){return this.updateSubscribers.add(t)},t.prototype.clearListeners=function(){this.updateSubscribers.clear()},t.prototype.onRenderRequest=function(t){return t(this.get()),this.renderSubscribers.add(t)},t.prototype.attach=function(t){this.passiveEffect=t},t.prototype.set=function(t,n){void 0===n&&(n=!0),n&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,n)},t.prototype.get=function(){return this.current},t.prototype.getPrevious=function(){return this.prev},t.prototype.getVelocity=function(){return this.canTrackVelocity?qt(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0},t.prototype.start=function(t){var n=this;return this.stop(),new Promise((function(e){n.stopAnimation=t(e)})).then((function(){return n.clearAnimation()}))},t.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},t.prototype.isAnimating=function(){return!!this.stopAnimation},t.prototype.clearAnimation=function(){this.stopAnimation=null},t.prototype.destroy=function(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()},t}();function cn(t){return new sn(t)}var fn=function(t){return 1e3*t},ln={linear:Vt,easeIn:Lt,easeInOut:kt,easeOut:Bt,circIn:Rt,circInOut:Dt,circOut:Ot,backIn:Ft,backInOut:It,backOut:Ut,anticipate:jt,bounceIn:Xt,bounceInOut:function(t){return t<.5?.5*(1-Ht(1-2*t)):.5*Ht(2*t-1)+.5},bounceOut:Ht},dn=function(t){if(Array.isArray(t)){t.length;var n=s(t,4);return an(n[0],n[1],n[2],n[3])}return"string"==typeof t?ln[t]:t},pn=function(t,n){return"zIndex"!==t&&(!("number"!=typeof n&&!Array.isArray(n))||!("string"!=typeof n||!Q.test(n)||n.startsWith("url(")))},vn=function(t){return Array.isArray(t)},hn=function(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}},mn=function(t){return{type:"spring",stiffness:550,damping:0===t?100:30,restDelta:.01,restSpeed:10}},yn=function(){return{type:"keyframes",ease:"linear",duration:.3}},gn=function(t){return{type:"keyframes",duration:.8,values:t}},xn={x:hn,y:hn,z:hn,rotate:hn,rotateX:hn,rotateY:hn,rotateZ:hn,scaleX:mn,scaleY:mn,scale:mn,opacity:yn,backgroundColor:yn,color:yn,default:mn};function bn(t){var n=t.yoyo,e=t.loop,r=t.flip,o=t.ease,i=t.times,s=u(t,["yoyo","loop","flip","ease","times"]),c=a({},s);return i&&(c.offset=i),s.duration&&(c.duration=fn(s.duration)),s.repeatDelay&&(c.repeatDelay=fn(s.repeatDelay)),o&&(c.ease=function(t){return Array.isArray(t)&&"number"!=typeof t[0]}(o)?o.map(dn):dn(o)),"tween"===s.type&&(c.type="keyframes"),n?c.repeatType="reverse":e?c.repeatType="loop":r&&(c.repeatType="mirror"),c.repeat=e||n||r||s.repeat,"spring"!==s.type&&(c.type="keyframes"),c}function En(t,n,e){var r,o,i,s;return Array.isArray(n.to)&&(null!==(r=t.duration)&&void 0!==r||(t.duration=.8)),function(t){Array.isArray(t.to)&&null===t.to[0]&&(t.to=c(t.to),t.to[0]=t.from)}(n),function(t){t.when,t.delay,t.delayChildren,t.staggerChildren,t.staggerDirection,t.repeat,t.repeatType,t.repeatDelay,t.from;var n=u(t,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(n).length}(t)||(t=a(a({},t),(o=e,i=n.to,s=vn(i)?gn:xn[o]||xn.default,a({to:i},s(i))))),a(a({},n),bn(t))}function wn(t,n,e,r,o){var i,u=function(t,n){return t[n]||t.default||t}(r,t),s=null!==(i=u.from)&&void 0!==i?i:n.get(),c=pn(t,e);return"none"===s&&c&&"string"==typeof e&&(s=Q.getAnimatableNone(e)),pn(t,s)&&c&&!1!==u.type?function(){var r={from:s,to:e,velocity:n.getVelocity(),onComplete:o,onUpdate:function(t){return n.set(t)}};return"inertia"===u.type||"decay"===u.type?function(t){var n,e=t.from,r=void 0===e?0:e,o=t.velocity,i=void 0===o?0:o,u=t.min,s=t.max,c=t.power,f=void 0===c?.8:c,l=t.timeConstant,d=void 0===l?750:l,p=t.bounceStiffness,v=void 0===p?500:p,h=t.bounceDamping,m=void 0===h?10:h,y=t.restDelta,g=void 0===y?1:y,x=t.modifyTarget,b=t.driver,E=t.onUpdate,w=t.onComplete;function C(t){return void 0!==u&&t<u||void 0!==s&&t>s}function A(t){return void 0===u?s:void 0===s||Math.abs(u-t)<Math.abs(s-t)?u:s}function S(t){null==n||n.stop(),n=_t(a(a({},t),{driver:b,onUpdate:function(n){var e;null==E||E(n),null===(e=t.onUpdate)||void 0===e||e.call(t,n)},onComplete:w}))}function M(t){S(a({type:"spring",stiffness:v,damping:m,restDelta:g},t))}if(C(r))M({from:r,velocity:i,to:A(r)});else{var T=f*i+r;void 0!==x&&(T=x(T));var V,L,B=A(T),k=B===u?-1:1;S({type:"decay",from:r,velocity:i,timeConstant:d,power:f,restDelta:g,modifyTarget:x,onUpdate:C(T)?function(t){V=L,L=t,i=qt(t-V,P().delta),(1===k&&t>B||-1===k&&t<B)&&M({from:t,to:B,velocity:i})}:void 0})}return{stop:function(){return null==n?void 0:n.stop()}}}(a(a({},r),u)):_t(a(a({},En(u,r,t)),{onUpdate:function(t){var n;r.onUpdate(t),null===(n=u.onUpdate)||void 0===n||n.call(u,t)},onComplete:function(){var t;r.onComplete(),null===(t=u.onComplete)||void 0===t||t.call(u)}}))}:function(){var t;return n.set(e),o(),null===(t=null==u?void 0:u.onComplete)||void 0===t||t.call(u),{stop:function(){}}}}function Cn(t,n,e,r){return void 0===r&&(r={}),n.start((function(o){var i,a,u=wn(t,n,e,r,o),s=function(t,n){var e,r,o,i,a;return null!==(a=null!==(i=null!==(r=null===(e=t[n])||void 0===e?void 0:e.delay)&&void 0!==r?r:null===(o=t.default)||void 0===o?void 0:o.delay)&&void 0!==i?i:t.delay)&&void 0!==a?a:0}(r,t),c=function(){return a=u()};return s?i=setTimeout(c,fn(s)):c(),function(){clearTimeout(i),null==a||a.stop()}}))}var An=function(t){return vn(t)?t[t.length-1]||0:t},Sn=a(a({},k),{transform:Math.round}),Pn={color:K,backgroundColor:K,outlineColor:K,fill:K,stroke:K,borderColor:K,borderTopColor:K,borderRightColor:K,borderBottomColor:K,borderLeftColor:K,borderWidth:I,borderTopWidth:I,borderRightWidth:I,borderBottomWidth:I,borderLeftWidth:I,borderRadius:I,radius:I,borderTopLeftRadius:I,borderTopRightRadius:I,borderBottomRightRadius:I,borderBottomLeftRadius:I,width:I,maxWidth:I,height:I,maxHeight:I,size:I,top:I,right:I,bottom:I,left:I,padding:I,paddingTop:I,paddingRight:I,paddingBottom:I,paddingLeft:I,margin:I,marginTop:I,marginRight:I,marginBottom:I,marginLeft:I,rotate:F,rotateX:F,rotateY:F,rotateZ:F,scale:O,scaleX:O,scaleY:O,scaleZ:O,skew:F,skewX:F,skewY:F,distance:I,translateX:I,translateY:I,translateZ:I,x:I,y:I,z:I,perspective:I,transformPerspective:I,opacity:R,originX:X,originY:X,originZ:I,zIndex:Sn,fillOpacity:R,strokeOpacity:R,numOctaves:Sn},Mn=[k,I,U,F,H,j,{test:function(t){return"auto"===t},parse:function(t){return t}}],Tn=function(t){return function(n){return n.test(t)}},Vn=function(t){return Mn.find(Tn(t))},Ln=c(Mn,[K,Q]),Bn=function(t){return Ln.find(Tn(t))},kn=function(t){return Pn[t]},Rn=function(t,n){return n&&"number"==typeof t?n.transform(t):t};function On(t){return Array.isArray(t)}function Dn(t){return"string"==typeof t||On(t)}function Fn(t,n,e){var r={};return n?(r=function(t){return"function"==typeof t}(n)?n(null!=e?e:t.getVariantPayload(),function(t){var n={};return t.forEachValue((function(t,e){return n[e]=t.get()})),n}(t),function(t){var n={};return t.forEachValue((function(t,e){return n[e]=t.getVelocity()})),n}(t)):n,a({transition:t.getDefaultTransition()},r)):r}function Un(t,n,e){t.hasValue(n)?t.getValue(n).set(e):t.addValue(n,cn(e))}function In(t,n,e){var r=(void 0===e?{}:e).priority,o=t.makeTargetAnimatable(Fn(t,n),!1),i=o.transitionEnd,s=void 0===i?{}:i,c=(o.transition,u(o,["transitionEnd","transition"]));for(var f in c=a(a({},c),s)){var l=An(c[f]);Un(t,f,l),r||(t.baseTarget[f]=l)}}function jn(t,n){c(n).reverse().forEach((function(e){var r;In(t,t.getVariant(e)),null===(r=t.variantChildren)||void 0===r||r.forEach((function(t){jn(t,n)}))}))}function Hn(t,n){return Array.isArray(n)?jn(t,n):"string"==typeof n?jn(t,[n]):void In(t,n)}function Xn(t,n,e){var r,o,i,a=Object.keys(n).filter((function(n){return!t.hasValue(n)})),u=a.length;if(u)for(var s=0;s<u;s++){var c=a[s],f=n[c],l=null;if(Array.isArray(f)&&(l=f[0]),null===l){var d=null!==(r=e[c])&&void 0!==r?r:t.readNativeValue(c);l=void 0!==d?d:n[c]}"string"==typeof l&&/^\-?\d*\.?\d+$/.test(l)?l=parseFloat(l):!Bn(l)&&Q.test(f)&&(l=Q.getAnimatableNone(f)),t.addValue(c,cn(l)),null!==(o=(i=e)[c])&&void 0!==o||(i[c]=l),t.baseTarget[c]=l}}function Yn(t,n){if(n)return(n[t]||n.default||n).from}function zn(t,n,e){var r,o,i={};for(var a in t)i[a]=null!==(r=Yn(a,n))&&void 0!==r?r:null===(o=e.getValue(a))||void 0===o?void 0:o.get();return i}function Wn(t,n,e){var r;return void 0===e&&(e={}),e.priority&&t.activeOverrides.add(e.priority),t.resetIsAnimating(e.priority),r=On(n)?function(t,n,e){var r=c(n).reverse().map((function(n){return Nn(t,n,e)}));return Promise.all(r)}(t,n,e):Dn(n)?Nn(t,n,e):Gn(t,n,e),t.onAnimationStart(),r.then((function(){return t.onAnimationComplete()}))}function Nn(t,n,e){var r,o=e&&e.priority||0,i=t.getVariant(n),a=Fn(t,i,e&&e.custom),u=a.transition||{},c=i?function(){return Gn(t,a,e)}:function(){return Promise.resolve()},f=(null===(r=t.variantChildrenOrder)||void 0===r?void 0:r.size)?function(r){void 0===r&&(r=0);var i=u.delayChildren;return function(t,n,e,r,o,i,a){void 0===e&&(e=0);void 0===r&&(r=0);void 0===o&&(o=1);void 0===i&&(i=0);var u=[],s=(t.variantChildrenOrder.size-1)*r,c=1===o?function(t){return t*r}:function(t){return s-t*r};return Array.from(t.variantChildrenOrder).forEach((function(t,r){var o=Nn(t,n,{priority:i,delay:e+c(r),custom:a});u.push(o)})),Promise.all(u)}(t,n,(void 0===i?0:i)+r,u.staggerChildren,u.staggerDirection,o,null==e?void 0:e.custom)}:function(){return Promise.resolve()},l=u.when;if(l){var d=s("beforeChildren"===l?[c,f]:[f,c],2),p=d[0],v=d[1];return p().then(v)}return Promise.all([c(),f(null==e?void 0:e.delay)])}function Gn(t,n,e){var r=void 0===e?{}:e,o=r.delay,i=void 0===o?0:o,s=r.priority,c=void 0===s?0:s,f=r.transitionOverride,l=r.custom,d=Fn(t,n,l);f&&(d.transition=f);var p=t.makeTargetAnimatable(d),v=p.transitionEnd,h=p.transition,m=u(p,["transitionEnd","transition"]);c&&(t.resolvedOverrides[c]=m);var y=[];for(var g in m){var x=t.getValue(g);if(x&&m&&void 0!==m[g]){var b=m[g];c||(t.baseTarget[g]=An(b)),t.isAnimating.has(g)||(t.isAnimating.add(g),y.push(Cn(g,x,b,a({delay:i},h))))}}var E=Promise.all(y);return v?E.then((function(){return In(t,v,{priority:c})})):E}function _n(t,n,e){var r;t.overrides[e]=n,null===(r=t.variantChildren)||void 0===r||r.forEach((function(t){_n(t,n,e)}))}function qn(t,n){var e=t.overrides[n];if(e)return Wn(t,e,{priority:n})}function Zn(t,n){var e;if(null===(e=t.variantChildrenOrder)||void 0===e||e.forEach((function(t){Zn(t,n)})),t.overrides[n]){t.activeOverrides.delete(n);var r=$n(t);if(t.resetIsAnimating(),r)t.overrides[r]&&qn(t,r);var o=t.resolvedOverrides[n];if(o){var i={};for(var a in t.baseTarget)void 0!==o[a]&&(i[a]=t.baseTarget[a]);t.onAnimationStart(),Gn(t,i).then((function(){t.onAnimationComplete()}))}}}function $n(t){return t.activeOverrides.size?Math.max.apply(Math,c(Array.from(t.activeOverrides))):0}var Kn=function(){function t(t,n){var e=this;this.children=new Set,this.baseTarget={},this.overrides=[],this.resolvedOverrides=[],this.activeOverrides=new Set,this.isAnimating=new Set,this.latest={},this.values=new Map,this.valueSubscriptions=new Map,this.config={},this.isMounted=!1,this.update=function(){return e.config.onUpdate(e.latest)},this.triggerRender=function(){return e.render()},this.ref=function(t){t?e.mount(t):e.unmount(),e.externalRef&&("function"==typeof e.externalRef?e.externalRef(t):f(e.externalRef)&&(e.externalRef.current=t))},this.parent=t,this.rootParent=t?t.rootParent:this,this.treePath=t?c(t.treePath,[t]):[],this.depth=t?t.depth+1:0,this.externalRef=n}return t.prototype.getVariantPayload=function(){return this.config.custom},t.prototype.getVariant=function(t){var n;return null===(n=this.config.variants)||void 0===n?void 0:n[t]},t.prototype.addVariantChild=function(t){this.variantChildren||(this.variantChildren=new Set),this.variantChildren.add(t)},t.prototype.addVariantChildOrder=function(t){this.variantChildrenOrder||(this.variantChildrenOrder=new Set),this.variantChildrenOrder.add(t)},t.prototype.onAnimationStart=function(){var t,n;null===(n=(t=this.config).onAnimationStart)||void 0===n||n.call(t)},t.prototype.onAnimationComplete=function(){var t,n;this.isMounted&&(null===(n=(t=this.config).onAnimationComplete)||void 0===n||n.call(t))},t.prototype.getDefaultTransition=function(){return this.config.transition},t.prototype.resetIsAnimating=function(t){var n;void 0===t&&(t=0),this.isAnimating.clear(),t<$n(this)&&this.checkOverrideIsAnimating(t),null===(n=this.variantChildren)||void 0===n||n.forEach((function(n){return n.resetIsAnimating(t)}))},t.prototype.checkOverrideIsAnimating=function(t){for(var n=this.overrides.length,e=t+1;e<n;e++){var r=this.resolvedOverrides[e];if(r)for(var o in r)this.isAnimating.add(o)}},t.prototype.subscribe=function(t){var n=this;return this.children.add(t),function(){return n.children.delete(t)}},t.prototype.hasValue=function(t){return this.values.has(t)},t.prototype.addValue=function(t,n){this.hasValue(t)&&this.removeValue(t),this.values.set(t,n),this.setSingleStaticValue(t,n.get()),this.subscribeToValue(t,n)},t.prototype.removeValue=function(t){var n;null===(n=this.valueSubscriptions.get(t))||void 0===n||n(),this.valueSubscriptions.delete(t),this.values.delete(t),delete this.latest[t]},t.prototype.getValue=function(t,n){var e=this.values.get(t);return void 0===e&&void 0!==n&&(e=new sn(n),this.addValue(t,e)),e},t.prototype.forEachValue=function(t){this.values.forEach(t)},t.prototype.getInstance=function(){return this.element},t.prototype.updateConfig=function(t){void 0===t&&(t={}),this.config=a({},t)},t.prototype.setSingleStaticValue=function(t,n){this.latest[t]=n},t.prototype.setStaticValues=function(t,n){if("string"==typeof t)this.setSingleStaticValue(t,n);else for(var e in t)this.setSingleStaticValue(e,t[e])},t.prototype.scheduleRender=function(){E.render(this.triggerRender,!1,!0)},t.prototype.scheduleUpdateLayoutDelta=function(){E.preRender(this.rootParent.updateLayoutDelta,!1,!0)},t.prototype.subscribeToValue=function(t,n){var e=this,r=n.onChange((function(n){e.setSingleStaticValue(t,n),e.element&&e.config.onUpdate&&E.update(e.update,!1,!0)})),o=n.onRenderRequest((function(){e.element&&e.scheduleRender()}));this.valueSubscriptions.set(t,(function(){r(),o()}))},t.prototype.mount=function(t){this.parent&&(this.removeFromParent=this.parent.subscribe(this)),this.element=this.current=t},t.prototype.unmount=function(){var t=this;this.forEachValue((function(n,e){return t.removeValue(e)})),w.update(this.update),w.render(this.render),this.removeFromParent&&this.removeFromParent()},t}();function Jn(t){return t}function Qn(t){var n=t.top;return{x:{min:t.left,max:t.right},y:{min:n,max:t.bottom}}}function te(t){return{x:a({},t.x),y:a({},t.y)}}var ne={translate:0,scale:1,origin:0,originPoint:0};function ee(){return{x:a({},ne),y:a({},ne)}}var re=["","X","Y","Z"],oe=new Set,ie=["transformPerspective","x","y","z"];function ae(t,n){return ie.indexOf(t)-ie.indexOf(n)}["perspective","translate","scale","rotate","skew"].forEach((function(t){var n=new Set(["rotate","skew"]).has(t);re.forEach((function(e){var r=t+e;ie.push(r),n&&oe.add(r)}))}));var ue=new Set(ie);function se(t){return ue.has(t)}var ce=new Set(["originX","originY","originZ"]);function fe(t){return ce.has(t)}var le={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function de(t,n){var e=t.x,r=t.y;return"translate3d("+e.translate/n.x+"px, "+r.translate/n.y+"px, 0) scale("+e.scale+", "+r.scale+")"}var pe=de(ee(),{x:1,y:1});function ve(t){return t.startsWith("--")}function he(t){return"string"==typeof t&&t.startsWith("var(--")}var me=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function ye(t,n,e){var r=s(function(t){var n=me.exec(t);if(!n)return[,];var e=s(n,3);return[e[1],e[2]]}(t),2),o=r[0],i=r[1];if(o){var a=window.getComputedStyle(n).getPropertyValue(o);return a?a.trim():he(i)?ye(i,n):i}}function ge(t,n){return t/(n.max-n.min)*100}var xe={process:function(t,n){if("string"==typeof t){if(!I.test(t))return t;t=parseFloat(t)}return ge(t,n.x)+"% "+ge(t,n.y)+"%"}},be={borderRadius:a(a({},xe),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:xe,borderTopRightRadius:xe,borderBottomLeftRadius:xe,borderBottomRightRadius:xe,boxShadow:{process:function(t,n,e,r){var o=t,i=t.includes("var("),a=[];i&&(t=t.replace(me,(function(t){return a.push(t),"_$css"})));var u=Q.parse(t);if(u.length>5)return o;var s=Q.createTransformer(t),c="number"!=typeof u[0]?1:0,f=e.x.scale*r.x,l=e.y.scale*r.y;u[0+c]/=f,u[1+c]/=l;var d=ct(f,l,.5);"number"==typeof u[2+c]&&(u[2+c]/=d),"number"==typeof u[3+c]&&(u[3+c]/=d);var p=s(u);if(i){var v=0;p=p.replace("_$css",(function(){var t=a[v];return v++,t}))}return p}}};function Ee(t,n,e,r,o,i,a,u,s,c,f,l){var d=a.enableHardwareAcceleration,p=a.transformTemplate,v=a.allowTransformNone;i.length=0;var h=!1,m=!1,y=!0;for(var g in t){var x=t[g],b=kn(g),E=Rn(x,b);if(se(g)){if(h=!0,r[g]=E,i.push(g),!y)continue;x!==(void 0!==b.default?b.default:0)&&(y=!1)}else if(fe(g))o[g]=E,m=!0;else if("transform"!==g||"function"!=typeof x){var w=ve(g)?e:n;if(u&&be[g]){var C=be[g].process(x,l,s,f),A=be[g].applyTo;if(A)for(var S=A.length,P=0;P<S;P++)w[A[P]]=C;else w[g]=C}else w[g]=E}}u?(n.transform=de(c,f),n.transform===pe&&(n.transform=""),h&&(n.transform+=" "+function(t,n){var e="";n.sort(ae);for(var r=n.length,o=0;o<r;o++){var i=n[o];oe.has(i)&&(e+=i+"("+t[i]+") ")}return e}(r,i),n.transform=n.transform.trim()),p&&(n.transform=p(r,n.transform)),n.transformOrigin=function(t){var n=t.x,e=t.y;return 100*n.origin+"% "+100*e.origin+"% 0"}(c)):(h&&(n.transform=function(t,n,e,r,o,i){void 0===o&&(o=!0),void 0===i&&(i=!0);var a="";n.sort(ae);for(var u=!1,s=n.length,c=0;c<s;c++){var f=n[c];a+=(le[f]||f)+"("+t[f]+") ","z"===f&&(u=!0)}return!u&&o?a+="translateZ(0)":a=a.trim(),e?a=e(t,r?"":a):i&&r&&(a="none"),a}(r,i,p,y,d,v)),m&&(n.transformOrigin=function(t){var n=t.originX,e=void 0===n?"50%":n,r=t.originY,o=void 0===r?"50%":r,i=t.originZ;return e+" "+o+" "+(void 0===i?0:i)}(o)))}function we(t,n){t.min=n.min,t.max=n.max}function Ce(t,n,e){return e+n*(t-e)}function Ae(t,n,e,r,o){return void 0!==o&&(t=Ce(t,o,r)),Ce(t,e,r)+n}function Se(t,n,e,r,o){void 0===n&&(n=0),void 0===e&&(e=1),t.min=Ae(t.min,n,e,r,o),t.max=Ae(t.max,n,e,r,o)}function Pe(t,n){var e=n.x,r=n.y;Se(t.x,e.translate,e.scale,e.originPoint),Se(t.y,r.translate,r.scale,r.originPoint)}function Me(t,n,e,r){var o=s(r,3),i=o[0],a=o[1],u=o[2];t.min=n.min,t.max=n.max;var c=void 0!==e[u]?e[u]:.5,f=ct(n.min,n.max,c);Se(t,e[i],e[a],f,e.scale)}var Te=["x","scaleX","originX"],Ve=["y","scaleY","originY"];function Le(t,n,e,r,o){return t=Ce(t-=n,1/e,r),void 0!==o&&(t=Ce(t,1/o,r)),t}function Be(t,n,e){var r=s(e,3),o=r[0],i=r[1],a=r[2];!function(t,n,e,r,o){void 0===n&&(n=0),void 0===e&&(e=1),void 0===r&&(r=.5);var i=ct(t.min,t.max,r)-n;t.min=Le(t.min,n,e,i,o),t.max=Le(t.max,n,e,i,o)}(t,n[o],n[i],n[a],n.scale)}function ke(t,n,e){return void 0===n&&(n=0),void 0===e&&(e=.01),Jt(t,n)<e}function Re(t){return t.max-t.min}function Oe(t,n){var e=.5,r=Re(t),o=Re(n);return o>r?e=st(n.min,n.max-r,t.min):r>o&&(e=st(t.min,t.max-o,n.min)),tt(0,1,e)}function De(t,n,e,r){t.origin=void 0===r?Oe(n,e):r,t.originPoint=ct(n.min,n.max,t.origin),t.scale=Re(e)/Re(n),ke(t.scale,1,1e-4)&&(t.scale=1),t.translate=ct(e.min,e.max,t.origin)-t.originPoint,ke(t.translate)&&(t.translate=0)}function Fe(t,n,e,r){De(t.x,n.x,e.x,r),De(t.y,n.y,e.y,r)}function Ue(t){return[t("x"),t("y")]}function Ie(t,n){return Qn(function(t,n){var e=t.top,r=t.left,o=t.bottom,i=t.right;void 0===n&&(n=Jn);var a=n({x:r,y:e}),u=n({x:i,y:o});return{top:a.y,left:a.x,bottom:u.y,right:u.x}}(t.getBoundingClientRect(),n))}var je,He=new Set(["width","height","top","left","right","bottom","x","y"]),Xe=function(t){return He.has(t)},Ye=function(t,n){t.set(n,!1),t.set(n)},ze=function(t){return t===k||t===I};!function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"}(je||(je={}));var We=function(t,n){return parseFloat(t.split(", ")[n])},Ne=function(t,n){return function(e,r){var o=r.transform;if("none"===o||!o)return 0;var i=o.match(/^matrix3d\((.+)\)$/);if(i)return We(i[1],n);var a=o.match(/^matrix\((.+)\)$/);return a?We(a[1],t):0}},Ge=new Set(["x","y","z"]),_e=ie.filter((function(t){return!Ge.has(t)}));var qe={width:function(t){var n=t.x;return n.max-n.min},height:function(t){var n=t.y;return n.max-n.min},top:function(t,n){var e=n.top;return parseFloat(e)},left:function(t,n){var e=n.left;return parseFloat(e)},bottom:function(t,n){var e=t.y,r=n.top;return parseFloat(r)+(e.max-e.min)},right:function(t,n){var e=t.x,r=n.left;return parseFloat(r)+(e.max-e.min)},x:Ne(4,13),y:Ne(5,14)},Ze=function(t,n,e,r){void 0===e&&(e={}),void 0===r&&(r={}),n=a({},n),r=a({},r);var o=Object.keys(n).filter(Xe),i=[],u=!1,c=[];if(o.forEach((function(o){var a=t.getValue(o);if(t.hasValue(o)){var s,f=e[o],l=n[o],d=Vn(f);if(vn(l))for(var p=l.length,v=null===l[0]?1:0;v<p;v++)s?Vn(l[v]):s=Vn(l[v]);else s=Vn(l);if(d!==s)if(ze(d)&&ze(s)){var h=a.get();"string"==typeof h&&a.set(parseFloat(h)),"string"==typeof l?n[o]=parseFloat(l):Array.isArray(l)&&s===I&&(n[o]=l.map(parseFloat))}else(null==d?void 0:d.transform)&&(null==s?void 0:s.transform)&&(0===f||0===l)?0===f?a.set(s.transform(f)):n[o]=d.transform(l):(u||(i=function(t){var n=[];return _e.forEach((function(e){var r=t.getValue(e);void 0!==r&&(n.push([e,r.get()]),r.set(e.startsWith("scale")?1:0))})),n.length&&t.render(),n}(t),u=!0),c.push(o),r[o]=void 0!==r[o]?r[o]:n[o],Ye(a,l))}})),c.length){var f=function(t,n,e){var r=n.getBoundingBox(),o=n.getComputedStyle(),i=o.display,a={top:o.top,left:o.left,bottom:o.bottom,right:o.right,transform:o.transform};"none"===i&&n.setStaticValues("display",t.display||"block"),n.render();var u=n.getBoundingBox();return e.forEach((function(e){var i=n.getValue(e);Ye(i,qe[e](r,a)),t[e]=qe[e](u,o)})),t}(n,t,c);return i.length&&i.forEach((function(n){var e=s(n,2),r=e[0],o=e[1];t.getValue(r).set(o)})),t.render(),{target:f,transitionEnd:r}}return{target:n,transitionEnd:r}};function $e(t,n,e,r){return function(t){return Object.keys(t).some(Xe)}(n)?Ze(t,n,e,r):{target:n,transitionEnd:r}}var Ke=function(t,n,e,r){var o=function(t,n,e){var r,o=u(n,[]),i=t.getInstance();if(!(i instanceof HTMLElement))return{target:o,transitionEnd:e};for(var s in e&&(e=a({},e)),t.forEachValue((function(t){var n=t.get();if(he(n)){var e=ye(n,i);e&&t.set(e)}})),o){var c=o[s];if(he(c)){var f=ye(c,i);f&&(o[s]=f,e&&(null!==(r=e[s])&&void 0!==r||(e[s]=c)))}}return{target:o,transitionEnd:e}}(t,n,r);return $e(t,n=o.target,e,r=o.transitionEnd)},Je=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.defaultConfig={enableHardwareAcceleration:!0,allowTransformNone:!0},n.style={},n.reactStyle={},n.vars={},n.transform={},n.transformOrigin={},n.transformKeys=[],n.config=n.defaultConfig,n.isLayoutProjectionEnabled=!1,n.layoutUpdateListeners=new un,n.layoutMeasureListeners=new un,n.viewportBoxUpdateListeners=new un,n.hasViewportBoxUpdated=!1,n.targetBoxFinal={x:{min:0,max:1},y:{min:0,max:1}},n.treeScale={x:1,y:1},n.prevTreeScale={x:1,y:1},n.delta=ee(),n.deltaFinal=ee(),n.deltaTransform=pe,n.stopLayoutAxisAnimation={x:function(){},y:function(){}},n.isTargetBoxLocked=!1,n.axisProgress={x:cn(0),y:cn(0)},n.updateLayoutDelta=function(){n.isLayoutProjectionEnabled&&n.box&&n.updateLayoutDeltas(),n.children.forEach(Qe)},n}return i(n,t),n.prototype.removeValue=function(n){t.prototype.removeValue.call(this,n),delete this.vars[n],delete this.style[n]},n.prototype.clean=function(){this.style={},this.vars={},this.transform={}},n.prototype.updateConfig=function(t){void 0===t&&(t={}),this.config=a(a({},this.defaultConfig),t)},n.prototype.read=function(t){return this.getComputedStyle()[t]||0},n.prototype.addValue=function(n,e){t.prototype.addValue.call(this,n,e),n.startsWith("rotate")&&(this.layoutOrigin=.5)},n.prototype.readNativeValue=function(t){if(se(t)){var n=kn(t);return n&&n.default||0}return this.read(t)},n.prototype.makeTargetAnimatable=function(t,n){void 0===n&&(n=!0);var e=t.transition,r=t.transitionEnd,o=u(t,["transition","transitionEnd"]),i=this.config.transformValues,s=zn(o,e||{},this);if(i&&(r&&(r=i(r)),o&&(o=i(o)),s&&(s=i(s))),n){Xn(this,o,s);var c=Ke(this,o,s,r);r=c.transitionEnd,o=c.target}return a({transition:e,transitionEnd:r},o)},n.prototype.enableLayoutProjection=function(){this.isLayoutProjectionEnabled=!0},n.prototype.hide=function(){!1!==this.isVisible&&(this.isVisible=!1,this.scheduleRender())},n.prototype.show=function(){!0!==this.isVisible&&(this.isVisible=!0,this.scheduleRender())},n.prototype.onLayoutUpdate=function(t){return this.layoutUpdateListeners.add(t)},n.prototype.onLayoutMeasure=function(t){return this.layoutMeasureListeners.add(t)},n.prototype.onViewportBoxUpdate=function(t){return this.viewportBoxUpdateListeners.add(t)},n.prototype.layoutReady=function(t){this.layoutUpdateListeners.notify(this.box,this.prevViewportBox||this.box,t)},n.prototype.getBoundingBox=function(){var t=this.config.transformPagePoint;return Ie(this.element,t)},n.prototype.getBoundingBoxWithoutTransforms=function(){var t,n,e=this.getBoundingBox();return t=e,n=this.latest,Be(t.x,n,Te),Be(t.y,n,Ve),e},n.prototype.getComputedStyle=function(){return window.getComputedStyle(this.element)},n.prototype.snapshotBoundingBox=function(){this.prevViewportBox=this.getBoundingBoxWithoutTransforms(),this.rebaseTargetBox(!1,this.prevViewportBox)},n.prototype.rebaseTargetBox=function(t,n){var e=this;void 0===t&&(t=!1),void 0===n&&(n=this.box);var r=this.axisProgress,o=r.x,i=r.y,a=this.box&&!this.isTargetBoxLocked&&!o.isAnimating()&&!i.isAnimating();(t||a)&&Ue((function(t){var r=n[t],o=r.min,i=r.max;e.setAxisTarget(t,o,i)}))},n.prototype.measureLayout=function(){var t=this;this.box=this.getBoundingBox(),this.boxCorrected=te(this.box),this.targetBox||(this.targetBox=te(this.box)),this.layoutMeasureListeners.notify(this.box,this.prevViewportBox||this.box),E.update((function(){return t.rebaseTargetBox()}))},n.prototype.lockTargetBox=function(){this.isTargetBoxLocked=!0},n.prototype.unlockTargetBox=function(){this.stopLayoutAnimation(),this.isTargetBoxLocked=!1},n.prototype.resetTransform=function(){var t=this.config.transformTemplate;this.element.style.transform=t?t({},""):"none",this.scheduleRender()},n.prototype.setAxisTarget=function(t,n,e){var r=this.targetBox[t];r.min=n,r.max=e,this.hasViewportBoxUpdated=!0,this.rootParent.scheduleUpdateLayoutDelta()},n.prototype.startLayoutAxisAnimation=function(t,n){var e,r=this,o=this.axisProgress[t],i=this.targetBox[t],a=i.min,u=i.max-a;return o.clearListeners(),o.set(a),o.set(a),o.onChange((function(n){return r.setAxisTarget(t,n,n+u)})),null===(e=this.animateMotionValue)||void 0===e?void 0:e.call(this,t,o,0,n)},n.prototype.stopLayoutAnimation=function(){var t=this;Ue((function(n){return t.axisProgress[n].stop()}))},n.prototype.updateLayoutDeltas=function(){var t,n,e,r,o;t=this.boxCorrected,n=this.box,we(t.x,n.x),we(t.y,n.y),this.parent&&(this.prevTreeScale.x=this.treeScale.x,this.prevTreeScale.y=this.treeScale.y,e=this.treeScale,r=this.parent.treeScale,o=this.parent.delta,e.x=r.x*o.x.scale,e.y=r.y*o.y.scale),function(t,n){for(var e=n.length,r=0;r<e;r++)Pe(t,n[r].delta)}(this.boxCorrected,this.treePath),Fe(this.delta,this.boxCorrected,this.targetBox,this.layoutOrigin),this.hasViewportBoxUpdated&&this.viewportBoxUpdateListeners.notify(this.targetBox,this.delta),this.hasViewportBoxUpdated=!1;var i=de(this.delta,this.treeScale);i===this.deltaTransform&&this.prevTreeScale.x===this.treeScale.x&&this.prevTreeScale.y===this.treeScale.y||this.scheduleRender(),this.deltaTransform=i},n.prototype.updateTransformDeltas=function(){var t,n,e;this.isLayoutProjectionEnabled&&this.box&&(t=this.targetBoxFinal,n=this.targetBox,e=this.latest,Me(t.x,n.x,e,Te),Me(t.y,n.y,e,Ve),Fe(this.deltaFinal,this.boxCorrected,this.targetBoxFinal,this.layoutOrigin))},n.prototype.build=function(){this.updateTransformDeltas(),void 0!==this.isVisible&&(this.style.visibility=this.isVisible?"visible":"hidden"),Ee(this.latest,this.style,this.vars,this.transform,this.transformOrigin,this.transformKeys,this.config,this.isLayoutProjectionEnabled&&!!this.box,this.delta,this.deltaFinal,this.treeScale,this.targetBoxFinal)},n.prototype.render=function(){for(var t in this.build(),Object.assign(this.element.style,this.style),this.vars)this.element.style.setProperty(t,this.vars[t])},n}(Kn),Qe=function(t){return t.updateLayoutDelta()};function tr(t){var e=n.useRef(null);return null===e.current&&(e.current=t()),e.current}function nr(t,n,e){return"string"==typeof t?t:I.transform(n+e*t)}var er=function(t,n){return I.transform(t*n)},rr={offset:"stroke-dashoffset",array:"stroke-dasharray"},or={offset:"strokeDashoffset",array:"strokeDasharray"};var ir={x:0,y:0,width:0,height:0};function ar(t,n,e,r,o,i,a,s,c,f,l,d,p,v,h){var m=t.attrX,y=t.attrY,g=t.originX,x=t.originY,b=t.pathLength,E=t.pathSpacing,w=void 0===E?1:E,C=t.pathOffset,A=void 0===C?0:C;return Ee(u(t,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]),r,e,o,i,a,s,l,d,p,v,h),r.transform&&(n.transform=r.transform,delete r.transform),(void 0!==g||void 0!==x||n.transform)&&(n.transformOrigin=function(t,n,e){return nr(n,t.x,t.width)+" "+nr(e,t.y,t.height)}(c||ir,void 0!==g?g:.5,void 0!==x?x:.5)),void 0!==m&&(r.x=m),void 0!==y&&(r.y=y),void 0!==f&&void 0!==b&&function(t,n,e,r,o,i){void 0===r&&(r=1),void 0===o&&(o=0),void 0===i&&(i=!0);var a=i?rr:or;t[a.offset]=er(-o,n);var u=er(e,n),s=er(r,n);t[a.array]=u+" "+s}(r,f,b,w,A,!1),r}var ur=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox"]),sr=/([a-z])([A-Z])/g,cr=function(t){return t.replace(sr,"$1-$2").toLowerCase()},fr=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.attrs={},n.defaultConfig={enableHardwareAcceleration:!1},n.config=n.defaultConfig,n}return i(n,t),n.prototype.mount=function(n){t.prototype.mount.call(this,n),this.measure()},n.prototype.measure=function(){try{this.dimensions="function"==typeof this.element.getBBox?this.element.getBBox():this.element.getBoundingClientRect()}catch(t){this.dimensions={x:0,y:0,width:0,height:0}}"path"===this.element.tagName&&(this.totalPathLength=this.element.getTotalLength())},n.prototype.clean=function(){t.prototype.clean.call(this),this.attrs={}},n.prototype.read=function(t){return t=ur.has(t)?t:cr(t),this.element.getAttribute(t)},n.prototype.build=function(){this.updateTransformDeltas(),ar(this.latest,this.style,this.vars,this.attrs,this.transform,this.transformOrigin,this.transformKeys,this.config,this.dimensions,this.totalPathLength,this.isLayoutProjectionEnabled&&!!this.box,this.delta,this.deltaFinal,this.treeScale,this.targetBoxFinal)},n.prototype.render=function(){for(var n in t.prototype.render.call(this),this.attrs)this.element.setAttribute(ur.has(n)?n:cr(n),this.attrs[n])},n}(Je);var lr=new Set(["animate","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","metadata","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","tspan","use","view"]);function dr(t){return"string"==typeof t&&lr.has(t)}var pr=n.createContext(null),vr=n.createContext({variantContext:{}});function hr(){return n.useContext(vr).variantContext}function mr(){return n.useContext(vr).visualElement}var yr=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","onLayoutAnimationComplete","onViewportBoxUpdate","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","whileHover","whileTap","onHoverEnd","onHoverStart"]);function gr(t){return yr.has(t)}var xr=function(t){return!gr(t)};try{var br=require("@emotion/is-prop-valid").default;xr=function(t){return t.startsWith("on")?!gr(t):br(t)}}catch(t){}var Er=function(t){return t instanceof sn};function wr(t,n){var e=n.layout,r=n.layoutId;return se(t)||fe(t)||(e||void 0!==r)&&!!be[t]}function Cr(t,n,e,r,o){for(var i in void 0===r&&(r=!1),r&&(t.reactStyle={}),e){var a=e[i],u=!1;if(Er(a))Pr.has(i)||(t.addValue(i,a),u=!0);else if(wr(i,o)){if(t.hasValue(i)){if(a!==n[i]){if(Er(n[i]))t.addValue(i,cn(a));else t.getValue(i).set(a)}}else t.addValue(i,cn(a));u=!0}else r&&(t.reactStyle[i]=a);u&&(n[i]=a)}}var Ar,Sr,Pr=new Set([]),Mr=function(){return{}},Tr=n.createContext({transformPagePoint:function(t){return t},features:[],isStatic:!1});function Vr(t){var n=t.animate,e=t.variants,r=t.inherit;return void 0===r?!!e&&!n:r}!function(t){t[t.Entering=0]="Entering",t[t.Present=1]="Present",t[t.Exiting=2]="Exiting"}(Ar||(Ar={})),(Sr=t.VisibilityAction||(t.VisibilityAction={}))[Sr.Hide=0]="Hide",Sr[Sr.Show=1]="Show";var Lr={measureLayout:function(t){return t.measureLayout()},layoutReady:function(t){return t.layoutReady()}},Br=function(t,n){return t.depth-n.depth};function kr(){var t=new Set;return{add:function(n){return t.add(n)},flush:function(n){var e=void 0===n?Lr:n,r=e.measureLayout,o=e.layoutReady,i=Array.from(t).sort(Br);i.forEach((function(t){return t.resetTransform()})),i.forEach(r),i.forEach(o),i.forEach((function(t){t.isPresent&&(t.presence=Ar.Present)})),t.clear()}}}function Rr(t){return!!t.forceUpdate}var Or=n.createContext(kr()),Dr="undefined"!=typeof window?n.useLayoutEffect:n.useEffect;function Fr(){var t=n.useContext(pr);if(null===t)return[!0,null];var e=t.isPresent,r=t.onExitComplete,o=t.register,i=Hr();n.useEffect((function(){return o(i)}),[]);return!e&&r?[!1,function(){return null==r?void 0:r(i)}]:[!0]}function Ur(t){return null===t||t.isPresent}var Ir=0,jr=function(){return Ir++},Hr=function(){return tr(jr)};function Xr(t,e){void 0===e&&(e=!1);var r=n.useRef(!0);(!e||e&&r.current)&&t(),r.current=!1}function Yr(t){return"string"==typeof t||Array.isArray(t)}function zr(t){return"object"==typeof t&&"function"==typeof t.start}function Wr(t,e){var r=e.defaultFeatures,o=e.useVisualElement,i=e.render;return n.forwardRef((function(e,u){var s=n.useContext(Tr).isStatic,f=o(t,e,s,u);!function(t,n){var e=tr(Mr);for(var r in e){var o=wr(r,n),i=void 0!==n[r],a=n.style&&void 0!==n.style[r],u=i&&Er(n[r]),s=a&&Er(n.style[r]);(o&&!i&&!a||!o&&!u&&!s)&&(t.removeValue(r),delete e[r])}Cr(t,e,n,!1,n),n.style&&Cr(t,e,n.style,!0,n),n.transformValues&&(t.reactStyle=n.transformValues(t.reactStyle))}(f,e);var l=function(t,e,r){var o,i,a=e.variants,u=e.initial,s=e.animate,c=e.whileTap,f=e.whileHover,l=hr(),d=l.parent,p=l.initial,v=l.animate,h=n.useContext(pr),m=a||Yr(s)||Yr(c)||Yr(f)||zr(s);!1!==(u=null!==(o=null==h?void 0:h.initial)&&void 0!==o?o:u)||zr(s)||(u=s);var y=n.useMemo((function(){return{parent:m?t:d,initial:Yr(u)?u:p,animate:Yr(s)?s:v}}),[r?u:null]);return Xr((function(){var n=u||p;n&&Hn(t,n)}),!r),m&&(null==d||d.addVariantChild(t)),Ur(h)&&(null===(i=t.variantChildrenOrder)||void 0===i||i.clear()),n.useEffect((function(){m&&(null==d||d.addVariantChildOrder(t))})),n.useEffect((function(){return t.isMounted=!0,function(){var n;t.isMounted=!1,null===(n=null==d?void 0:d.variantChildren)||void 0===n||n.delete(t)}}),[]),Xr((function(){t.forEachValue((function(n,e){t.baseTarget[e]=n.get()}))}),!0),y}(f,e,s),d=function(t,e,r,o){var i=n.useContext(Tr);if(e||"undefined"==typeof window)return null;for(var u=c(t,i.features),s=u.length,f=[],l=0;l<s;l++){var d=u[l],p=d.shouldRender,v=d.key,h=d.getComponent;if(p(o)){var m=h(o);m&&f.push(n.createElement(m,a({key:v},o,{visualElement:r,inherit:Vr(o)})))}}return f}(r,s,f,e),p=n.useMemo((function(){return{visualElement:f,variantContext:l}}),[f,l]),v=i(t,e,f);return function(t){var e=n.useContext(Or);Dr((function(){return function(){Rr(e)&&e.remove(t)}}),[])}(f),n.createElement(n.Fragment,null,n.createElement(vr.Provider,{value:p},v),d)}))}function Nr(t){var n=null;return function(){return null===n&&(n=t,function(){n=null})}}var Gr=Nr("dragHorizontal"),_r=Nr("dragVertical");function qr(t){var n=!1;if("y"===t)n=_r();else if("x"===t)n=Gr();else{var e=Gr(),r=_r();e&&r?n=function(){e(),r()}:(e&&e(),r&&r())}return n}function Zr(t,n,e,r){return t.addEventListener(n,e,r),function(){return t.removeEventListener(n,e,r)}}function $r(t,e,r,o){n.useEffect((function(){var n=t.current;if(r&&n)return Zr(n,e,r,o)}),[t,e,r,o])}function Kr(t){return"undefined"!=typeof PointerEvent&&t instanceof PointerEvent?!("mouse"!==t.pointerType):t instanceof MouseEvent}function Jr(t){return!!t.touches}var Qr={pageX:0,pageY:0};function to(t,n){void 0===n&&(n="page");var e=t.touches[0]||t.changedTouches[0]||Qr;return{x:e[n+"X"],y:e[n+"Y"]}}function no(t,n){return void 0===n&&(n="page"),{x:t[n+"X"],y:t[n+"Y"]}}function eo(t,n){return void 0===n&&(n="page"),{point:Jr(t)?to(t,n):no(t,n)}}function ro(t){return eo(t,"client")}var oo=function(t,n){void 0===n&&(n=!1);var e,r=function(n){return t(n,eo(n))};return n?(e=r,function(t){var n=t instanceof MouseEvent;(!n||n&&0===t.button)&&e(t)}):r},io="undefined"!=typeof window,ao={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},uo={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function so(t){return io&&null===window.onpointerdown?t:io&&null===window.ontouchstart?uo[t]:io&&null===window.onmousedown?ao[t]:t}function co(t,n,e,r){return Zr(t,so(n),oo(e,"pointerdown"===n),r)}function fo(t,n,e,r){return $r(t,so(n),e&&oo(e,"pointerdown"===n),r)}var lo=function(){function t(t,n,e){var r=this,o=(void 0===e?{}:e).transformPagePoint;if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(r.lastMoveEvent&&r.lastMoveEventInfo){var t=ho(r.lastMoveEventInfo,r.history),n=null!==r.startEvent,e=Jt(t.offset,{x:0,y:0})>=3;if(n||e){var o=t.point,i=P().timestamp;r.history.push(a(a({},o),{timestamp:i}));var u=r.handlers,s=u.onStart,c=u.onMove;n||(s&&s(r.lastMoveEvent,t),r.startEvent=r.lastMoveEvent),c&&c(r.lastMoveEvent,t)}}},this.handlePointerMove=function(t,n){r.lastMoveEvent=t,r.lastMoveEventInfo=po(n,r.transformPagePoint),Kr(t)&&0===t.buttons?r.handlePointerUp(t,n):E.update(r.updatePoint,!0)},this.handlePointerUp=function(t,n){r.end();var e=r.handlers.onEnd;if(e){var o=ho(po(n,r.transformPagePoint),r.history);e&&e(t,o)}},!(Jr(t)&&t.touches.length>1)){this.handlers=n,this.transformPagePoint=o;var i=po(eo(t),this.transformPagePoint),u=i.point,s=P().timestamp;this.history=[a(a({},u),{timestamp:s})];var c=n.onSessionStart;c&&c(t,ho(i,this.history)),this.removeListeners=mt(co(window,"pointermove",this.handlePointerMove),co(window,"pointerup",this.handlePointerUp),co(window,"pointercancel",this.handlePointerUp))}}return t.prototype.updateHandlers=function(t){this.handlers=t},t.prototype.end=function(){this.removeListeners&&this.removeListeners(),w.update(this.updatePoint)},t}();function po(t,n){return n?{point:n(t.point)}:t}function vo(t,n){return{x:t.x-n.x,y:t.y-n.y}}function ho(t,n){var e=t.point;return{point:e,delta:vo(e,yo(n)),offset:vo(e,mo(n)),velocity:go(n,.1)}}function mo(t){return t[0]}function yo(t){return t[t.length-1]}function go(t,n){if(t.length<2)return{x:0,y:0};for(var e=t.length-1,r=null,o=yo(t);e>=0&&(r=t[e],!(o.timestamp-r.timestamp>fn(n)));)e--;if(!r)return{x:0,y:0};var i=(o.timestamp-r.timestamp)/1e3;if(0===i)return{x:0,y:0};var a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function xo(t,n,e){var r=n.min,o=n.max;return void 0!==r&&t<r?t=e?ct(r,t,e):Math.max(t,r):void 0!==o&&t>o&&(t=e?ct(o,t,e):Math.min(t,o)),t}function bo(t,n,e){return{min:void 0!==n?t.min+n:void 0,max:void 0!==e?t.max+e-(t.max-t.min):void 0}}function Eo(t,n){var e,r=n.min-t.min,o=n.max-t.max;return n.max-n.min<t.max-t.min&&(r=(e=s([o,r],2))[0],o=e[1]),{min:t.min+r,max:t.min+o}}var wo,Co=new WeakMap,Ao=function(){function t(t){var n=t.visualElement;this.isDragging=!1,this.currentDirection=null,this.constraints=!1,this.props={},this.hasMutatedConstraints=!1,this.cursorProgress={x:.5,y:.5},this.originPoint={},this.openGlobalLock=null,this.panSession=null,this.visualElement=n,this.visualElement.enableLayoutProjection(),Co.set(n,this)}return t.prototype.start=function(t,n){var e=this,r=void 0===n?{}:n,o=r.snapToCursor,i=void 0!==o&&o,a=r.cursorProgress;i&&this.snapToCursor(t);var u=this.props.transformPagePoint;this.panSession=new lo(t,{onSessionStart:function(){e.stopMotion()},onStart:function(t,n){var r,o,i=e.props,u=i.drag,s=i.dragPropagation;if(!u||s||(e.openGlobalLock&&e.openGlobalLock(),e.openGlobalLock=qr(u),e.openGlobalLock)){e.prepareBoundingBox(),e.visualElement.lockTargetBox(),e.resolveDragConstraints();var c=ro(t).point;Ue((function(t){var n=e.visualElement.targetBox[t],r=n.min,o=n.max;e.cursorProgress[t]=a?a[t]:st(r,o,c[t]);var i=e.getAxisMotionValue(t);i&&(e.originPoint[t]=i.get())})),e.isDragging=!0,e.currentDirection=null,null===(o=(r=e.props).onDragStart)||void 0===o||o.call(r,t,n)}},onMove:function(t,n){var r,o,i,a,u=e.props,s=u.dragPropagation,c=u.dragDirectionLock;if(s||e.openGlobalLock){var f=n.offset;if(c&&null===e.currentDirection)return e.currentDirection=function(t,n){void 0===n&&(n=10);var e=null;Math.abs(t.y)>n?e="y":Math.abs(t.x)>n&&(e="x");return e}(f),void(null!==e.currentDirection&&(null===(o=(r=e.props).onDirectionLock)||void 0===o||o.call(r,e.currentDirection)));e.updateAxis("x",t,f),e.updateAxis("y",t,f),null===(a=(i=e.props).onDrag)||void 0===a||a.call(i,t,n),wo=t}},onEnd:function(t,n){return e.stop(t,n)}},{transformPagePoint:u})},t.prototype.prepareBoundingBox=function(){var t=this.visualElement.getInstance(),n=t.style.transform;this.visualElement.resetTransform(),this.visualElement.measureLayout(),t.style.transform=n,this.visualElement.rebaseTargetBox(!0,this.visualElement.getBoundingBoxWithoutTransforms())},t.prototype.resolveDragConstraints=function(){var t,n,e,r,o,i,a=this,u=this.props.dragConstraints;this.constraints=!!u&&(f(u)?this.resolveRefConstraints(this.visualElement.box,u):(t=this.visualElement.box,e=(n=u).top,r=n.left,o=n.bottom,i=n.right,{x:bo(t.x,r,i),y:bo(t.y,e,o)})),this.constraints&&!this.hasMutatedConstraints&&Ue((function(t){var n,e,r;a.getAxisMotionValue(t)&&(a.constraints[t]=(n=a.visualElement.box[t],e=a.constraints[t],r={},void 0!==e.min&&(r.min=e.min-n.min),void 0!==e.max&&(r.max=e.max-n.min),r))}))},t.prototype.resolveRefConstraints=function(t,n){var e=this.props,r=e.onMeasureDragConstraints,o=e.transformPagePoint,i=n.current;this.constraintsBox=Ie(i,o);var a=function(t,n){return{x:Eo(t.x,n.x),y:Eo(t.y,n.y)}}(t,this.constraintsBox);if(r){var u=r(function(t){var n=t.x,e=t.y;return{top:e.min,bottom:e.max,left:n.min,right:n.max}}(a));this.hasMutatedConstraints=!!u,u&&(a=Qn(u))}return a},t.prototype.cancelDrag=function(){this.isDragging=!1,this.panSession&&this.panSession.end(),this.panSession=null,!this.props.dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null)},t.prototype.stop=function(t,n){var e;this.visualElement.unlockTargetBox(),null===(e=this.panSession)||void 0===e||e.end(),this.panSession=null;var r=this.isDragging;if(this.cancelDrag(),r){var o=this.props,i=o.dragMomentum,a=o.dragElastic,u=o.onDragEnd;if(i||a){var s=n.velocity;this.animateDragEnd(s)}null==u||u(t,n)}},t.prototype.snapToCursor=function(t){var n=this;this.prepareBoundingBox(),Ue((function(e){var r=n.getAxisMotionValue(e);if(r){var o=ro(t).point,i=n.visualElement.box,a=i[e].max-i[e].min,u=i[e].min+a/2,s=o[e]-u;n.originPoint[e]=o[e],r.set(s)}else n.cursorProgress[e]=.5,n.updateVisualElementAxis(e,t)}))},t.prototype.updateAxis=function(t,n,e){if(So(t,this.props.drag,this.currentDirection))return this.getAxisMotionValue(t)?this.updateAxisMotionValue(t,e):this.updateVisualElementAxis(t,n)},t.prototype.updateAxisMotionValue=function(t,n){var e=this.getAxisMotionValue(t);if(n&&e){var r=this.props.dragElastic,o=this.originPoint[t]+n[t],i=this.constraints?xo(o,this.constraints[t],r):o;e.set(i)}},t.prototype.updateVisualElementAxis=function(t,n){var e,r=this.props.dragElastic,o=this.visualElement.box[t],i=o.max-o.min,a=this.cursorProgress[t],u=function(t,n,e,r,o){var i=t-n*e;return r?xo(i,r,o):i}(ro(n).point[t],i,a,null===(e=this.constraints)||void 0===e?void 0:e[t],r);this.visualElement.setAxisTarget(t,u,u+i)},t.prototype.updateProps=function(t){var n=t.drag,e=void 0!==n&&n,r=t.dragDirectionLock,o=void 0!==r&&r,i=t.dragPropagation,s=void 0!==i&&i,c=t.dragConstraints,f=void 0!==c&&c,l=t.dragElastic,d=void 0===l?.35:l,p=t.dragMomentum,v=void 0===p||p,h=u(t,["drag","dragDirectionLock","dragPropagation","dragConstraints","dragElastic","dragMomentum"]);this.props=a({drag:e,dragDirectionLock:o,dragPropagation:s,dragConstraints:f,dragElastic:d,dragMomentum:v},h)},t.prototype.getAxisMotionValue=function(t){var n=this.props,e=n.layout,r=n.layoutId,o="_drag"+t.toUpperCase();return this.props[o]?this.props[o]:e||void 0!==r?void 0:this.visualElement.getValue(t,0)},t.prototype.animateDragEnd=function(t){var n=this,e=this.props,r=e.drag,o=e.dragMomentum,i=e.dragElastic,u=e.dragTransition,s=Ue((function(e){if(So(e,r,n.currentDirection)){var s=n.constraints?n.constraints[e]:{},c=i?200:1e6,f=i?40:1e7,l=a(a({type:"inertia",velocity:o?t[e]:0,bounceStiffness:c,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10},u),s);return n.getAxisMotionValue(e)?n.startAxisValueAnimation(e,l):n.visualElement.startLayoutAxisAnimation(e,l)}}));return Promise.all(s).then((function(){var t,e;null===(e=(t=n.props).onDragTransitionEnd)||void 0===e||e.call(t)}))},t.prototype.stopMotion=function(){var t=this;Ue((function(n){var e=t.getAxisMotionValue(n);e?e.stop():t.visualElement.stopLayoutAnimation()}))},t.prototype.startAxisValueAnimation=function(t,n){var e=this.getAxisMotionValue(t);if(e){var r=e.get();return e.set(r),e.set(r),Cn(t,e,0,n)}},t.prototype.scalePoint=function(){var t=this,n=this.props,e=n.drag,r=n.dragConstraints;if(f(r)&&this.constraintsBox){this.stopMotion();var o={x:0,y:0};Ue((function(n){o[n]=Oe(t.visualElement.targetBox[n],t.constraintsBox[n])})),this.prepareBoundingBox(),this.resolveDragConstraints(),Ue((function(n){if(So(n,e,null)){var r=function(t,n,e){var r=t.max-t.min,o=ct(n.min,n.max-r,e);return{min:o,max:o+r}}(t.visualElement.targetBox[n],t.constraintsBox[n],o[n]),i=r.min,a=r.max;t.visualElement.setAxisTarget(n,i,a)}}))}},t.prototype.mount=function(t){var n=this,e=co(t.getInstance(),"pointerdown",(function(t){var e=n.props,r=e.drag,o=e.dragListener;r&&(void 0===o||o)&&n.start(t)})),r=Zr(window,"resize",(function(){n.scalePoint()})),o=t.onLayoutUpdate((function(){n.isDragging&&n.resolveDragConstraints()})),i=t.prevSnapshot;return(null==i?void 0:i.isDragging)&&this.start(wo,{cursorProgress:i.cursorProgress}),function(){null==e||e(),null==r||r(),null==o||o(),n.cancelDrag()}},t}();function So(t,n,e){return!(!0!==n&&n!==t||null!==e&&e!==t)}var Po=function(t){return function(n){return t(n),null}},Mo=Po((function(t){var e=t.visualElement;return function(t,e){var r=t.dragControls,o=n.useContext(Tr).transformPagePoint,i=tr((function(){return new Ao({visualElement:e})}));i.updateProps(a(a({},t),{transformPagePoint:o})),n.useEffect((function(){return r&&r.subscribe(i)}),[i]),n.useEffect((function(){return i.mount(e)}),[])}(u(t,["visualElement"]),e)})),To={key:"drag",shouldRender:function(t){return!!t.drag||!!t.dragControls},getComponent:function(){return Mo}};function Vo(t){return n.useEffect((function(){return function(){return t()}}),[])}function Lo(t,e){var r=t.onPan,o=t.onPanStart,i=t.onPanEnd,a=t.onPanSessionStart,u=r||o||i||a,s=n.useRef(null),c=n.useContext(Tr).transformPagePoint,f={onSessionStart:a,onStart:o,onMove:r,onEnd:function(t,n){s.current=null,i&&i(t,n)}};n.useEffect((function(){null!==s.current&&s.current.updateHandlers(f)})),fo(e,"pointerdown",u&&function(t){s.current=new lo(t,f,{transformPagePoint:c})}),Vo((function(){return s.current&&s.current.end()}))}var Bo=function(t,n){return!!n&&(t===n||Bo(t,n.parentElement))},ko=["whileHover","whileTap","whileDrag"],Ro=function(t){return ko.indexOf(t)+1},Oo=Ro("whileTap");function Do(t,e){var r=t.onTap,o=t.onTapStart,i=t.onTapCancel,a=t.whileTap,u=r||o||i||a,s=n.useRef(!1),c=n.useRef(null);function f(){var t;null===(t=c.current)||void 0===t||t.call(c),c.current=null}a&&_n(e,a,Oo);var l=n.useRef(null);l.current=function(t,n){var o=e.getInstance();if(f(),s.current&&o){s.current=!1,a&&Zn(e,Oo);var u=qr(!0);u&&(u(),Bo(o,t.target)?null==r||r(t,n):null==i||i(t,n))}},fo(e,"pointerdown",u?function(t,n){f(),c.current=mt(co(window,"pointerup",(function(t,n){var e;return null===(e=l.current)||void 0===e?void 0:e.call(l,t,n)})),co(window,"pointercancel",(function(t,n){var e;return null===(e=l.current)||void 0===e?void 0:e.call(l,t,n)}))),e.getInstance()&&!s.current&&(s.current=!0,null==o||o(t,n),a&&qn(e,Oo))}:void 0),Vo(f)}var Fo=Ro("whileHover"),Uo=function(t){return function(n,e){Kr(n)&&t(n,e)}};function Io(t,n){Lo(t,n),Do(t,n),function(t,n){var e=t.whileHover,r=t.onHoverStart,o=t.onHoverEnd;e&&_n(n,e,Fo),fo(n,"pointerenter",Uo((function(t,o){null==r||r(t,o),e&&qn(n,Fo)}))),fo(n,"pointerleave",Uo((function(t,r){null==o||o(t,r),e&&Zn(n,Fo)})))}(t,n)}var jo=["onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","whileTap","whileHover","onHoverStart","onHoverEnd"],Ho=Po((function(t){var n=t.visualElement;Io(u(t,["visualElement"]),n)})),Xo={key:"gestures",shouldRender:function(t){return jo.some((function(n){return t.hasOwnProperty(n)}))},getComponent:function(){return Ho}},Yo=function(){function t(){this.hasMounted=!1,this.pendingAnimations=[],this.subscribers=new Set}return t.prototype.subscribe=function(t){var n=this;return this.subscribers.add(t),function(){return n.subscribers.delete(t)}},t.prototype.start=function(t,n){var e=this;if(this.hasMounted){var r=[];return this.subscribers.forEach((function(e){var o=Wn(e,t,{transitionOverride:n});r.push(o)})),Promise.all(r)}return new Promise((function(r){e.pendingAnimations.push({animation:[t,n],resolve:r})}))},t.prototype.set=function(t){return this.hasMounted,this.subscribers.forEach((function(n){Hn(n,t)}))},t.prototype.stop=function(){this.subscribers.forEach((function(t){!function(t){t.forEachValue((function(t){return t.stop()}))}(t)}))},t.prototype.mount=function(){var t=this;this.hasMounted=!0,this.pendingAnimations.forEach((function(n){var e=n.animation,r=n.resolve;t.start.apply(t,c(e)).then(r)}))},t.prototype.unmount=function(){this.hasMounted=!1,this.stop()},t}(),zo=Po((function(t){var e=t.animate,r=t.exit,o=t.visualElement,i=s(Fr(),2),a=i[0],u=i[1],c=n.useContext(pr),f=n.useRef(!1),l=void 0!==(null==c?void 0:c.custom)?c.custom:t.custom;n.useEffect((function(){a?!f.current||!e||"boolean"==typeof e||e instanceof Yo||Wn(o,e):(!f.current&&r&&Wn(o,r,{custom:l}).then(u),f.current=!0),a&&(f.current=!1)}),[e,l,r,a,u,t])})),Wo={key:"exit",shouldRender:function(t){return!!t.exit&&!Vr(t)},getComponent:function(){return zo}};function No(t,n){void 0===n&&(n=!1);t.transition;var e=t.transitionEnd,r=u(t,["transition","transitionEnd"]);return n?a(a({},r),e):r}var Go=function(t){var n,e=t instanceof sn?t.get():t;return Array.from(new Set((n=e)?Array.isArray(n)?n:[n]:[]))};var _o={shouldRender:function(t){return void 0!==t.animate&&!Dn(t.animate)&&!zr(t.animate)},Component:Po((function(t){var e=t.animate;return function(t,e,r){var o=n.useRef(!0),i=n.useRef(null);i.current||(i.current=No(e,!0)),n.useEffect((function(){var n,u,s={},c=No(e),f=No(e,!0);for(var l in c){var d=o.current&&(!t.hasValue(l)||t.getValue(l).get()!==f[l]),p=null!==f[l],v=(n=i.current[l],void 0!==(u=f[l])&&(Array.isArray(n)&&Array.isArray(u)?!function(t,n){if(null===n)return!1;var e=n.length;if(e!==t.length)return!1;for(var r=0;r<e;r++)if(n[r]!==t[r])return!1;return!0}(u,n):n!==u));p&&(v||d)&&(s[l]=c[l])}o.current=!1,i.current=a(a({},i.current),f),Object.keys(s).length&&Wn(t,a(a({},s),{transition:e.transition||r,transitionEnd:e.transitionEnd}))}),[e])}(t.visualElement,e,t.transition)}))},qo={shouldRender:function(t){return t.variants&&!zr(t.animate)||Dn(t.animate)},Component:Po((function(t){var e=t.animate,r=t.inherit,o=void 0===r||r;return function(t,e,r,o){var i,a=Go(r),u=hr(),s=null===(i=u.parent)||void 0===i?void 0:i.isMounted,c=n.useRef(!1);n.useEffect((function(){var n,r,i=!1;o?(i=!!s,a=Go(u.animate)):i=c.current||(n=Go(e),r=a,n.join(",")!==r.join(",")),i&&Wn(t,a),c.current=!0}),[a.join(",")])}(t.visualElement,t.initial,e,o)}))},Zo={shouldRender:function(t){return zr(t.animate)},Component:Po((function(t){var e=t.animate;return function(t,e){var r=n.useMemo((function(){return e.subscribe(t)}),[e]);Vo((function(){return null==r?void 0:r()}))}(t.visualElement,e)}))},$o={key:"animation",shouldRender:function(){return!0},getComponent:function(t){return _o.shouldRender(t)?_o.Component:qo.shouldRender(t)?qo.Component:Zo.shouldRender(t)?Zo.Component:void 0}};var Ko=function(n){function e(){var e=null!==n&&n.apply(this,arguments)||this;return e.frameTarget={x:{min:0,max:0},y:{min:0,max:0}},e.stopAxisAnimation={x:void 0,y:void 0},e.animate=function(n,r,o){void 0===o&&(o={});var i=o.originBox,a=o.targetBox,s=o.visibilityAction,c=o.shouldStackAnimate,f=u(o,["originBox","targetBox","visibilityAction","shouldStackAnimate"]),l=e.props,d=l.visualElement,p=l.layout;if(!1===c)return e.safeToRemove();var v=Qo(r=i||r,n=a||n),h=Ue((function(o){if("position"===p){var i=n[o].max-n[o].min;r[o].max=r[o].min+i}if(!d.isTargetBoxLocked)return void 0===s?v?e.animateAxis(o,n[o],r[o],f):d.setAxisTarget(o,n[o].min,n[o].max):void(s===t.VisibilityAction.Hide?d.hide():d.show())}));return d.render(),Promise.all(h).then((function(){var t,n;null===(n=(t=e.props).onLayoutAnimationComplete)||void 0===n||n.call(t),d.isPresent?d.presence=Ar.Present:e.safeToRemove()}))},e}return i(e,n),e.prototype.componentDidMount=function(){var t=this,n=this.props.visualElement;n.animateMotionValue=Cn,n.enableLayoutProjection(),this.unsubLayoutReady=n.onLayoutUpdate(this.animate),n.updateConfig(a(a({},n.config),{safeToRemove:function(){return t.safeToRemove()}}))},e.prototype.componentWillUnmount=function(){var t=this;this.unsubLayoutReady(),Ue((function(n){var e,r;return null===(r=(e=t.stopAxisAnimation)[n])||void 0===r?void 0:r.call(e)}))},e.prototype.animateAxis=function(t,n,e,r){var o,i,a=void 0===r?{}:r,u=a.transition,s=a.crossfadeOpacity;null===(i=(o=this.stopAxisAnimation)[t])||void 0===i||i.call(o);var c,f=this.props.visualElement,l=this.frameTarget[t],d=f.axisProgress[t];d.clearListeners(),d.set(0),d.set(0),s&&(c=this.createCrossfadeAnimation(s),f.show());var p=function(){var r=d.get()/1e3;!function(t,n,e,r){t.min=ct(n.min,e.min,r),t.max=ct(n.max,e.max,r)}(l,e,n,r),f.setAxisTarget(t,l.min,l.max),null==c||c(r)};p(),f.updateLayoutDelta();var v=d.onChange(p),h=Cn("x"===t?"layoutX":"layoutY",d,1e3,u||this.props.transition||ni).then(v);return this.stopAxisAnimation[t]=function(){d.stop(),v()},h},e.prototype.createCrossfadeAnimation=function(t){var n=this.props.visualElement.getValue("opacity",0);return function(e){n.set(ri(ct(0,1,e))),t.set(oi(ct(1,0,e)))}},e.prototype.safeToRemove=function(){var t,n;null===(n=(t=this.props).safeToRemove)||void 0===n||n.call(t)},e.prototype.render=function(){return null},e}(n.Component);function Jo(t){var e=s(Fr(),2)[1];return n.createElement(Ko,a({},t,{safeToRemove:e}))}function Qo(t,n){return ti(t.x,n.x)||ti(t.y,n.y)}function ti(t,n){return t.min!==n.min||t.max!==n.max}var ni={duration:.45,ease:[.4,0,.1,1]};function ei(t,n,e){return function(r){return r<t?0:r>n?1:e(st(t,n,r))}}var ri=ei(0,.5,Ot),oi=ei(.5,.95,Vt),ii={key:"animate-layout",shouldRender:function(t){return!!t.layout||!!t.layoutId},getComponent:function(){return Jo}},ai=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i(n,t),n.prototype.componentDidMount=function(){var t=this.props,n=t.syncLayout,e=t.visualElement;Rr(n)&&n.register(e)},n.prototype.getSnapshotBeforeUpdate=function(){var t=this.props,n=t.syncLayout,e=t.visualElement;return Rr(n)?n.syncUpdate():(e.snapshotBoundingBox(),n.add(e)),null},n.prototype.componentDidUpdate=function(){var t=this.props,n=t.syncLayout,e=t.visualElement;Rr(n)||n.flush(),e.rebaseTargetBox()},n.prototype.render=function(){return null},n}(r.default.Component);function ui(t){var e=n.useContext(Or);return r.default.createElement(ai,a({},t,{syncLayout:e}))}var si={key:"measure-layout",shouldRender:function(t){return!!t.drag||!!t.layout||!!t.layoutId},getComponent:function(){return ui}},ci=[si,$o,To,Xo,Wo,ii],fi={useVisualElement:function(t,e,r,o){var i=mr(),u=tr((function(){return new(dr(t)?fr:Je)(i,o)}));u.updateConfig(a(a(a({},u.config),{enableHardwareAcceleration:!r}),e)),u.layoutId=e.layoutId;var s=n.useContext(pr),c=null===s||s.isPresent;u.isPresent=void 0!==e.isPresent?e.isPresent:c;var f=null==s?void 0:s.id;return u.isPresenceRoot=!i||i.presenceId!==f,n.useEffect((function(){if(e.onViewportBoxUpdate)return u.onViewportBoxUpdate(e.onViewportBoxUpdate)}),[e.onViewportBoxUpdate]),u},render:function(t,e,r){var o="string"==typeof t?function(t){var n={};for(var e in t)xr(e)&&(n[e]=t[e]);return n}(e):e;r.clean(),r.build();var i=dr(t)?function(t){return a(a({},t.attrs),{style:a({},t.reactStyle)})}(r):function(t,n){var e=n.drag,r={style:a(a(a({},t.reactStyle),t.style),t.vars)};return e&&(r.draggable=!1,r.style.userSelect="none",r.style.touchAction=!0===e?"none":"pan-"+("x"===e?"y":"x")),r}(r,e);return n.createElement(t,a(a(a({},o),{ref:r.ref}),i))}};function li(t){var n=a(a({},fi),{defaultFeatures:t});var e=new Map;return new Proxy({custom:function(t){return Wr(t,n)}},{get:function(t,r){return"custom"===r?t.custom:(e.has(r)||e.set(r,Wr(r,n)),e.get(r))}})}var di=li(ci);var pi=li([si]);var vi=0;function hi(){var t=vi;return vi++,t}var mi=function(t){var e=t.children,r=t.initial,o=t.isPresent,i=t.onExitComplete,a=t.custom,u=t.presenceAffectsLayout,s=tr(yi),c=tr(hi),f=n.useMemo((function(){return{id:c,initial:r,isPresent:o,custom:a,onExitComplete:function(t){s.set(t,!0);var n=!0;s.forEach((function(t){t||(n=!1)})),n&&(null==i||i())},register:function(t){return s.set(t,!1),function(){return s.delete(t)}}}}),u?void 0:[o]);return n.useMemo((function(){s.forEach((function(t,n){return s.set(n,!1)}))}),[o]),n.createElement(pr.Provider,{value:f},e)};function yi(){return new Map}function gi(t){return t.key||""}function xi(n,e){return e&&n!==e.lead?{visibilityAction:t.VisibilityAction.Hide}:e&&n.presence!==Ar.Entering&&n===e.lead&&e.lead!==e.prevLead?{visibilityAction:t.VisibilityAction.Show}:(n.presence===Ar.Entering?r=null==e?void 0:e.getFollowOrigin():n.presence===Ar.Exiting&&(o=null==e?void 0:e.getFollowTarget()),{originBox:r,targetBox:o});var r,o}function bi(n,e){var r,o,i,a={},u=e&&e.lead,s=null==u?void 0:u.presence;return e&&n===u?n.presence===Ar.Entering?a.originBox=e.getFollowOrigin():n.presence===Ar.Exiting&&(a.targetBox=e.getFollowTarget()):e&&n===e.follow&&(a.transition=e.getLeadTransition(),s===Ar.Entering?a.targetBox=e.getLeadTarget():s===Ar.Exiting&&(a.originBox=e.getLeadOrigin())),(null===(r=null==e?void 0:e.follow)||void 0===r?void 0:r.isPresenceRoot)||(null==u?void 0:u.isPresenceRoot)?(e&&n!==u?e&&n===e.follow?u&&s!==Ar.Entering&&s===Ar.Exiting&&(a.crossfadeOpacity=null===(i=null==e?void 0:e.lead)||void 0===i?void 0:i.getValue("opacity",1)):a.visibilityAction=t.VisibilityAction.Hide:n.presence===Ar.Entering&&(a.crossfadeOpacity=null===(o=null==e?void 0:e.follow)||void 0===o?void 0:o.getValue("opacity",0)),a):a}var Ei=function(){function t(){this.order=[],this.hasChildren=!1}return t.prototype.add=function(t){var n;if(this.order.push(t),this.snapshot){t.prevSnapshot=this.snapshot,t.prevViewportBox=this.snapshot.boundingBox;var e=this.snapshot.latestMotionValues;for(var r in e)t.hasValue(r)?null===(n=t.getValue(r))||void 0===n||n.set(e[r]):t.addValue(r,cn(e[r]))}this.hasChildren=!0},t.prototype.remove=function(t){var n=this.order.findIndex((function(n){return t===n}));-1!==n&&this.order.splice(n,1)},t.prototype.updateLeadAndFollow=function(){this.prevLead=this.lead,this.prevFollow=this.follow;var t=s(function(t,n){for(var e=s(n,2),r=e[0],o=e[1],i=void 0,a=0,u=void 0,c=t.length,f=!1,l=c-1;l>=0;l--){var d=t[l];if(l===c-1&&(f=d.isPresent),f)i=d;else{var p=t[l-1];p&&p.isPresent&&(i=d)}if(i){a=l;break}}if(i||(i=t[0]),u=t[a-1],i)for(l=a-1;l>=0;l--){if((d=t[l]).isPresent){u=d;break}}return i!==r&&!f&&u===o&&t.find((function(t){return t===r}))&&(i=r),[i,u]}(this.order,[this.lead,this.follow]),2),n=t[0],e=t[1];this.lead=n,this.follow=e},t.prototype.updateSnapshot=function(){if(this.lead){var t={boundingBox:this.lead.prevViewportBox,latestMotionValues:{}};this.lead.forEachValue((function(n,e){var r=n.get();se(r)||(t.latestMotionValues[e]=r)}));var n=Co.get(this.lead);n&&n.isDragging&&(t.isDragging=!0,t.cursorProgress=n.cursorProgress),this.snapshot=t}},t.prototype.isLeadPresent=function(){var t;return this.lead&&(null===(t=this.lead)||void 0===t?void 0:t.presence)!==Ar.Exiting},t.prototype.getFollowOrigin=function(){var t;return this.follow?this.follow.prevViewportBox:null===(t=this.snapshot)||void 0===t?void 0:t.boundingBox},t.prototype.getFollowTarget=function(){var t;return null===(t=this.follow)||void 0===t?void 0:t.box},t.prototype.getLeadOrigin=function(){var t;return null===(t=this.lead)||void 0===t?void 0:t.prevViewportBox},t.prototype.getLeadTarget=function(){var t;return null===(t=this.lead)||void 0===t?void 0:t.box},t.prototype.getLeadTransition=function(){var t;return null===(t=this.lead)||void 0===t?void 0:t.config.transition},t}(),wi=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.children=new Set,n.stacks=new Map,n.hasMounted=!1,n.updateScheduled=!1,n.renderScheduled=!1,n.syncContext=a(a({},kr()),{syncUpdate:function(t){return n.scheduleUpdate(t)},forceUpdate:function(){n.syncContext=a({},n.syncContext),n.scheduleUpdate(!0)},register:function(t){return n.addChild(t)},remove:function(t){return n.removeChild(t)}}),n}return i(e,t),e.prototype.componentDidMount=function(){this.hasMounted=!0,this.updateStacks()},e.prototype.componentDidUpdate=function(){this.startLayoutAnimation()},e.prototype.shouldComponentUpdate=function(){return this.renderScheduled=!0,!0},e.prototype.startLayoutAnimation=function(){var t=this;this.renderScheduled=this.updateScheduled=!1;var n=this.props.type;this.children.forEach((function(t){t.isPresent?t.presence!==Ar.Entering&&(t.presence=t.presence===Ar.Exiting?Ar.Entering:Ar.Present):t.presence=Ar.Exiting})),this.updateStacks();var e="crossfade"===n?bi:xi,r={measureLayout:function(t){return t.measureLayout()},layoutReady:function(n){var r=n.layoutId;n.layoutReady(e(n,t.getStack(r)))}};this.children.forEach((function(n){return t.syncContext.add(n)})),this.syncContext.flush(r),this.stacks.forEach((function(t){return t.snapshot=void 0}))},e.prototype.updateStacks=function(){this.stacks.forEach((function(t){return t.updateLeadAndFollow()}))},e.prototype.scheduleUpdate=function(t){void 0===t&&(t=!1),!t&&this.updateScheduled||(this.updateScheduled=!0,this.children.forEach((function(t){return t.snapshotBoundingBox()})),this.stacks.forEach((function(t){return t.updateSnapshot()})),!t&&this.renderScheduled||(this.renderScheduled=!0,this.forceUpdate()))},e.prototype.addChild=function(t){this.children.add(t),this.addToStack(t),t.presence=this.hasMounted?Ar.Entering:Ar.Present},e.prototype.removeChild=function(t){this.scheduleUpdate(),this.children.delete(t),this.removeFromStack(t)},e.prototype.addToStack=function(t){var n=this.getStack(t.layoutId);null==n||n.add(t)},e.prototype.removeFromStack=function(t){var n=this.getStack(t.layoutId);null==n||n.remove(t)},e.prototype.getStack=function(t){if(void 0!==t)return!this.stacks.has(t)&&this.stacks.set(t,new Ei),this.stacks.get(t)},e.prototype.render=function(){return n.createElement(Or.Provider,{value:this.syncContext},this.props.children)},e}(n.Component);function Ci(t){return tr((function(){return cn(t)}))}function Ai(t,e){n.useEffect((function(){return Er(t)?t.onChange(e):void 0}))}function Si(t,e){var r=Ci(e()),o=function(){return r.set(e())};return o(),function(t,e){n.useEffect((function(){var n=t.map((function(t){return t.onChange(e)}));return function(){return n.forEach((function(t){return t()}))}}))}(t,(function(){return E.update(o,!1,!0)})),r}var Pi=function(t){return function(t){return"object"==typeof t&&t.mix}(t)?t.mix:void 0};function Mi(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var e=!Array.isArray(t[0]),r=e?0:-1,o=t[0+r],i=t[1+r],u=t[2+r],s=t[3+r],c=At(i,u,a({mixer:Pi(u[0])},s));return e?c(o):c}function Ti(t,n,e,r){var o="function"==typeof n?n:Mi(n,e,r);return Array.isArray(t)?Vi(t,o):Vi([t],(function(t){var n=s(t,1)[0];return o(n)}))}function Vi(t,n){var e=tr((function(){return[]}));return Si(t,(function(){e.length=0;for(var r=t.length,o=0;o<r;o++)e[o]=t[o].get();return n(e)}))}var Li=function(t){return t>.001?1/t:1e5};function Bi(){return{scrollX:cn(0),scrollY:cn(0),scrollXProgress:cn(0),scrollYProgress:cn(0)}}function ki(t,n,e){e.set(t&&n?t/n:0)}function Ri(t,n){var e=function(){var e=n(),r=e.xOffset,o=e.yOffset,i=e.xMaxOffset,a=e.yMaxOffset;t.scrollX.set(r),t.scrollY.set(o),ki(r,i,t.scrollXProgress),ki(o,a,t.scrollYProgress)};return e(),e}var Oi=Bi();function Di(){return{xOffset:window.pageXOffset,yOffset:window.pageYOffset,xMaxOffset:document.body.clientWidth-window.innerWidth,yMaxOffset:document.body.clientHeight-window.innerHeight}}var Fi=!1;var Ui=cn(null);if("undefined"!=typeof window)if(window.matchMedia){var Ii=window.matchMedia("(prefers-reduced-motion)"),ji=function(){return Ui.set(Ii.matches)};Ii.addEventListener("change",ji),ji()}else Ui.set(!1);var Hi=function(){function t(){this.componentControls=new Set}return t.prototype.subscribe=function(t){var n=this;return this.componentControls.add(t),function(){return n.componentControls.delete(t)}},t.prototype.start=function(t,n){this.componentControls.forEach((function(e){e.start(t.nativeEvent||t,n)}))},t.prototype.updateConstraints=function(){this.componentControls.forEach((function(t){t.prepareBoundingBox(),t.resolveDragConstraints()}))},t}(),Xi=function(){return new Hi};var Yi=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.initialState={},n}return i(n,t),n.prototype.updateLayoutDelta=function(){},n.prototype.build=function(){},n.prototype.clean=function(){},n.prototype.makeTargetAnimatable=function(t){var n=t.transition,e=t.transitionEnd,r=u(t,["transition","transitionEnd"]);return Xn(this,r,zn(r,n||{},this)),a({transition:n,transitionEnd:e},r)},n.prototype.getBoundingBox=function(){return{x:{min:0,max:0},y:{min:0,max:0}}},n.prototype.readNativeValue=function(t){return this.initialState[t]||0},n.prototype.render=function(){this.build()},n}(Kn);t.AnimateLayoutFeature=ii,t.AnimatePresence=function(t){var e=t.children,r=t.custom,o=t.initial,i=void 0===o||o,a=t.onExitComplete,u=t.exitBeforeEnter,f=t.presenceAffectsLayout,l=void 0===f||f,d=function(){var t=n.useRef(!1),e=s(n.useState(0),2),r=e[0],o=e[1];return Vo((function(){return t.current=!0})),n.useCallback((function(){!t.current&&o(r+1)}),[r])}(),p=n.useContext(Or);Rr(p)&&(d=p.forceUpdate);var v=n.useRef(!0),h=function(t){var e=[];return n.Children.forEach(t,(function(t){n.isValidElement(t)&&e.push(t)})),e}(e),m=n.useRef(h),y=n.useRef(new Map).current,g=n.useRef(new Set).current;if(function(t,n){t.forEach((function(t){var e=gi(t);n.set(e,t)}))}(h,y),v.current)return v.current=!1,n.createElement(n.Fragment,null,h.map((function(t){return n.createElement(mi,{key:gi(t),isPresent:!0,initial:!!i&&void 0,presenceAffectsLayout:l},t)})));for(var x=c(h),b=m.current.map(gi),E=h.map(gi),w=b.length,C=0;C<w;C++){var A=b[C];-1===E.indexOf(A)?g.add(A):g.delete(A)}return u&&g.size&&(x=[]),g.forEach((function(t){if(-1===E.indexOf(t)){var e=y.get(t);if(e){var o=b.indexOf(t);x.splice(o,0,n.createElement(mi,{key:gi(e),isPresent:!1,onExitComplete:function(){y.delete(t),g.delete(t);var n=m.current.findIndex((function(n){return n.key===t}));m.current.splice(n,1),g.size||(m.current=h,d(),a&&a())},custom:r,presenceAffectsLayout:l},e))}}})),x=x.map((function(t){var e=t.key;return g.has(e)?t:n.createElement(mi,{key:gi(t),isPresent:!0,presenceAffectsLayout:l},t)})),m.current=x,n.createElement(n.Fragment,null,g.size?x:x.map((function(t){return n.cloneElement(t)})))},t.AnimateSharedLayout=wi,t.AnimationControls=Yo,t.AnimationFeature=$o,t.DragControls=Hi,t.DragFeature=To,t.ExitFeature=Wo,t.GesturesFeature=Xo,t.HTMLVisualElement=Je,t.MotionConfig=function(t){var e=t.children,r=t.features,o=void 0===r?[]:r,i=u(t,["children","features"]),a=c(n.useContext(Tr).features,o),s=n.useMemo((function(){return{features:a}}),[a.length]);for(var f in i)s[f]=i[f];return n.createElement(Tr.Provider,{value:s},e)},t.MotionConfigContext=Tr,t.MotionValue=sn,t.PresenceContext=pr,t.SharedLayoutContext=Or,t.addScaleCorrection=function(t){for(var n in t)be[n]=t[n]},t.animate=function(t,n,e){void 0===e&&(e={});var r=Er(t)?t:cn(t);return Cn("",r,n,e),{stop:function(){return r.stop()}}},t.animationControls=function(){return new Yo},t.createBatcher=kr,t.createDomMotionComponent=function(t){return Wr(t,a(a({},fi),{defaultFeatures:ci}))},t.createMotionComponent=Wr,t.isValidMotionProp=gr,t.m=pi,t.motion=di,t.motionValue=cn,t.resolveMotionValue=function(t){var n,e=t instanceof sn?t.get():t;return n=e,Boolean(n&&"object"==typeof n&&n.mix&&n.toValue)?e.toValue():e},t.startAnimation=Cn,t.transform=Mi,t.useAnimatedState=function(t){var e=s(n.useState(t),2),r=e[0],o=e[1],i=tr((function(){return new Yi}));return i.updateConfig({onUpdate:function(t){return o(a({},t))}}),i.initialState=t,n.useEffect((function(){return i.mount({}),function(){return i.unmount()}}),[]),[r,tr((function(){return function(t){return Wn(i,t)}}))]},t.useAnimation=function(){var t=tr((function(){return new Yo}));return n.useEffect((function(){return t.mount(),function(){return t.unmount()}}),[]),t},t.useCycle=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=n.useRef(0),o=s(n.useState(t[r.current]),2),i=o[0],a=o[1];return[i,function(n){r.current="number"!=typeof n?Qt(0,t.length,r.current+1):n,a(t[r.current])}]},t.useDomEvent=$r,t.useDragControls=function(){return tr(Xi)},t.useElementScroll=function(t){var n=tr(Bi);return Dr((function(){var e=t.current;if(e){var r=Ri(n,function(t){return function(){return{xOffset:t.scrollLeft,yOffset:t.scrollTop,xMaxOffset:t.scrollWidth-t.offsetWidth,yMaxOffset:t.scrollHeight-t.offsetHeight}}}(e)),o=Zr(e,"scroll",r,{passive:!0}),i=Zr(e,"resize",r);return function(){o&&o(),i&&i()}}}),[]),n},t.useExternalRef=function(t){var e=t&&"function"!=typeof t?t:n.useRef(null);return t&&"function"==typeof t&&n.useEffect((function(){return t(e.current),function(){return t(null)}}),[]),e},t.useGestures=Io,t.useInvertedScale=function(t){var n=Ci(1),e=Ci(1),r=mr();return t?(n=t.scaleX||n,e=t.scaleY||e):r&&(n=r.getValue("scaleX",1),e=r.getValue("scaleY",1)),{scaleX:Ti(n,Li),scaleY:Ti(e,Li)}},t.useIsPresent=function(){return Ur(n.useContext(pr))},t.useMotionTemplate=function(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];var r=t.length;function o(){for(var e="",o=0;o<r;o++){e+=t[o],n[o]&&(e+=n[o].get())}return e}return Si(n,o)},t.useMotionValue=Ci,t.usePanGesture=Lo,t.usePresence=Fr,t.useReducedMotion=function(){var t=s(n.useState(Ui.get()),2),e=t[0],r=t[1];return Ai(Ui,r),e},t.useSpring=function(t,e){void 0===e&&(e={});var r=n.useRef(null),o=Ci(Er(t)?t.get():t);return n.useMemo((function(){return o.attach((function(t,n){return r.current&&r.current.stop(),r.current=_t(a(a({from:o.get(),to:t,velocity:o.getVelocity()},e),{onUpdate:n})),o.get()}))}),Object.values(e)),Ai(t,(function(t){return o.set(parseFloat(t))})),o},t.useTapGesture=Do,t.useTransform=Ti,t.useViewportScroll=function(){return Dr((function(){!Fi&&function(){if(Fi=!0,"undefined"!=typeof window){var t=Ri(Oi,Di);Zr(window,"scroll",t,{passive:!0}),Zr(window,"resize",t)}}()}),[]),Oi},Object.defineProperty(t,"__esModule",{value:!0})}));
1
+ !function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={},t.React)}(this,(function(t,n){"use strict";function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var r=e(n),o=function(t,n){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)n.hasOwnProperty(e)&&(t[e]=n[e])})(t,n)};function i(t,n){function e(){this.constructor=t}o(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)}var a=function(){return(a=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t}).apply(this,arguments)};function u(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(e[r[o]]=t[r[o]])}return e}function s(t,n){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var r,o,i=e.call(t),a=[];try{for(;(void 0===n||n-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(e=i.return)&&e.call(i)}finally{if(o)throw o.error}}return a}function c(){for(var t=[],n=0;n<arguments.length;n++)t=t.concat(s(arguments[n]));return t}var f=function(t){return"object"==typeof t&&t.hasOwnProperty("current")},l=0,d="undefined"!=typeof window&&void 0!==window.requestAnimationFrame?function(t){return window.requestAnimationFrame(t)}:function(t){var n=Date.now(),e=Math.max(0,16.7-(n-l));l=n+e,setTimeout((function(){return t(l)}),e)},p=1/60*1e3,v=!0,h=!1,m=!1,y={delta:0,timestamp:0},g=["read","update","preRender","render","postRender"],x=function(t){return h=t},b=g.reduce((function(t,n){return t[n]=function(t){var n=[],e=[],r=0,o=!1,i=0,a=new WeakSet,u=new WeakSet,s={cancel:function(t){var n=e.indexOf(t);a.add(t),-1!==n&&e.splice(n,1)},process:function(c){var f,l;if(o=!0,n=(f=[e,n])[0],(e=f[1]).length=0,r=n.length)for(i=0;i<r;i++)(l=n[i])(c),!0!==u.has(l)||a.has(l)||(s.schedule(l),t(!0));o=!1},schedule:function(t,i,s){void 0===i&&(i=!1),void 0===s&&(s=!1);var c=s&&o,f=c?n:e;a.delete(t),i&&u.add(t),-1===f.indexOf(t)&&(f.push(t),c&&(r=n.length))}};return s}(x),t}),{}),E=g.reduce((function(t,n){var e=b[n];return t[n]=function(t,n,r){return void 0===n&&(n=!1),void 0===r&&(r=!1),h||S(),e.schedule(t,n,r),t},t}),{}),w=g.reduce((function(t,n){return t[n]=b[n].cancel,t}),{}),C=function(t){return b[t].process(y)},A=function(t){h=!1,y.delta=v?p:Math.max(Math.min(t-y.timestamp,40),1),v||(p=y.delta),y.timestamp=t,m=!0,g.forEach(C),m=!1,h&&(v=!1,d(A))},S=function(){h=!0,v=!0,m||d(A)},P=function(){return y},M=function(t,n){return function(e){return Math.max(Math.min(e,n),t)}},T=function(t){return t%1?Number(t.toFixed(5)):t},V=/(-)?(\d[\d\.]*)/g,L=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,B=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i,k={test:function(t){return"number"==typeof t},parse:parseFloat,transform:function(t){return t}},R=a(a({},k),{transform:M(0,1)}),O=a(a({},k),{default:1}),D=function(t){return{test:function(n){return"string"==typeof n&&n.endsWith(t)&&1===n.split(" ").length},parse:parseFloat,transform:function(n){return""+n+t}}},F=D("deg"),U=D("%"),I=D("px"),j=D("vh"),H=D("vw"),X=a(a({},U),{parse:function(t){return U.parse(t)/100},transform:function(t){return U.transform(100*t)}}),Y=M(0,255),z=function(t){return void 0!==t.red},W=function(t){return void 0!==t.hue};var N=function(t){return function(n){if("string"!=typeof n)return n;for(var e={},r=function(t){return t.substring(t.indexOf("(")+1,t.lastIndexOf(")"))}(n).replace(/(,|\/)/g," ").split(/ \s*/),o=0;o<4;o++)e[t[o]]=void 0!==r[o]?parseFloat(r[o]):1;return e}},G=a(a({},k),{transform:function(t){return Math.round(Y(t))}});function _(t,n){return t.startsWith(n)&&B.test(t)}var q={test:function(t){return"string"==typeof t?_(t,"rgb"):z(t)},parse:N(["red","green","blue","alpha"]),transform:function(t){var n=t.red,e=t.green,r=t.blue,o=t.alpha,i=void 0===o?1:o;return function(t){var n=t.red,e=t.green,r=t.blue,o=t.alpha;return"rgba("+n+", "+e+", "+r+", "+(void 0===o?1:o)+")"}({red:G.transform(n),green:G.transform(e),blue:G.transform(r),alpha:T(R.transform(i))})}},Z={test:function(t){return"string"==typeof t?_(t,"hsl"):W(t)},parse:N(["hue","saturation","lightness","alpha"]),transform:function(t){var n=t.hue,e=t.saturation,r=t.lightness,o=t.alpha,i=void 0===o?1:o;return function(t){var n=t.hue,e=t.saturation,r=t.lightness,o=t.alpha;return"hsla("+n+", "+e+", "+r+", "+(void 0===o?1:o)+")"}({hue:Math.round(n),saturation:U.transform(T(e)),lightness:U.transform(T(r)),alpha:T(R.transform(i))})}},$=a(a({},q),{test:function(t){return"string"==typeof t&&_(t,"#")},parse:function(t){var n="",e="",r="";return t.length>4?(n=t.substr(1,2),e=t.substr(3,2),r=t.substr(5,2)):(n=t.substr(1,1),e=t.substr(2,1),r=t.substr(3,1),n+=n,e+=e,r+=r),{red:parseInt(n,16),green:parseInt(e,16),blue:parseInt(r,16),alpha:1}}}),K={test:function(t){return"string"==typeof t&&B.test(t)||z(t)||W(t)},parse:function(t){return q.test(t)?q.parse(t):Z.test(t)?Z.parse(t):$.test(t)?$.parse(t):t},transform:function(t){return z(t)?q.transform(t):W(t)?Z.transform(t):t}},J=function(t){return"number"==typeof t?0:t},Q={test:function(t){if("string"!=typeof t||!isNaN(t))return!1;var n=0,e=t.match(V),r=t.match(L);return e&&(n+=e.length),r&&(n+=r.length),n>0},parse:function(t){var n=t,e=[],r=n.match(L);r&&(n=n.replace(L,"${c}"),e.push.apply(e,r.map(K.parse)));var o=n.match(V);return o&&e.push.apply(e,o.map(k.parse)),e},createTransformer:function(t){var n=t,e=0,r=t.match(L),o=r?r.length:0;if(r)for(var i=0;i<o;i++)n=n.replace(r[i],"${c}"),e++;var a=n.match(V),u=a?a.length:0;if(a)for(i=0;i<u;i++)n=n.replace(a[i],"${n}"),e++;return function(t){for(var r=n,i=0;i<e;i++)r=r.replace(i<o?"${c}":"${n}",i<o?K.transform(t[i]):T(t[i]));return r}},getAnimatableNone:function(t){var n=Q.parse(t);return Q.createTransformer(t)(n.map(J))}},tt=function(t,n,e){return Math.min(Math.max(e,t),n)};function nt(t){var n,e,r=t.duration,o=void 0===r?800:r,i=t.bounce,a=void 0===i?.25:i,u=t.velocity,s=void 0===u?0:u,c=t.mass,f=void 0===c?1:c,l=1-a;l=tt(.05,1,l),o=tt(.01,10,o/1e3),l<1?(n=function(t){var n=t*l,e=n*o;return.001-(n-s)/et(t,l)*Math.exp(-e)},e=function(t){var e=t*l*o,r=e*s+s,i=Math.pow(l,2)*Math.pow(t,2)*o,a=Math.exp(-e),u=et(Math.pow(t,2),l);return(.001-n(t)>0?-1:1)*((r-i)*a)/u}):(n=function(t){return Math.exp(-t*o)*((t-s)*o+1)-.001},e=function(t){return Math.exp(-t*o)*(o*o*(s-t))});var d=function(t,n,e){for(var r=e,o=1;o<12;o++)r-=t(r)/n(r);return r}(n,e,5/o);if(isNaN(d))return{stiffness:100,damping:10};var p=Math.pow(d,2)*f;return{stiffness:p,damping:2*l*Math.sqrt(f*p)}}function et(t,n){return t*Math.sqrt(1-n*n)}var rt=["duration","bounce"],ot=["stiffness","damping","mass"];function it(t,n){return n.some((function(n){return void 0!==t[n]}))}function at(t){var n=t.from,e=void 0===n?0:n,r=t.to,o=void 0===r?1:r,i=t.restSpeed,s=void 0===i?2:i,c=t.restDelta,f=u(t,["from","to","restSpeed","restDelta"]),l={done:!1,value:e},d=function(t){var n=a({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},t);if(!it(t,ot)&&it(t,rt)){var e=nt(t);(n=a(a(a({},n),e),{velocity:0,mass:1})).isResolvedFromDuration=!0}return n}(f),p=d.stiffness,v=d.damping,h=d.mass,m=d.velocity,y=d.isResolvedFromDuration,g=ut,x=ut;function b(){var t=m?-m/1e3:0,n=o-e,r=v/(2*Math.sqrt(p*h)),i=Math.sqrt(p/h)/1e3;if(null!=c||(c=Math.abs(o-e)<=1?.01:.4),r<1){var a=et(i,r);g=function(e){var u=Math.exp(-r*i*e);return o-u*((t+r*i*n)/a*Math.sin(a*e)+n*Math.cos(a*e))},x=function(e){var o=Math.exp(-r*i*e);return r*i*o*(Math.sin(a*e)*(t+r*i*n)/a+n*Math.cos(a*e))-o*(Math.cos(a*e)*(t+r*i*n)-a*n*Math.sin(a*e))}}else if(1===r)g=function(e){return o-Math.exp(-i*e)*(n+(t+i*n)*e)};else{var u=i*Math.sqrt(r*r-1);g=function(e){var a=Math.exp(-r*i*e),s=Math.min(u*e,300);return o-a*((t+r*i*n)*Math.sinh(s)+u*n*Math.cosh(s))/u}}}return b(),{next:function(t){var n=g(t);if(y)l.done=t>=f.duration;else{var e=1e3*x(t),r=Math.abs(e)<=s,i=Math.abs(o-n)<=c;l.done=r&&i}return l.value=l.done?o:n,l},flipTarget:function(){var t;m=-m,e=(t=[o,e])[0],o=t[1],b()}}}at.needsInterpolation=function(t,n){return"string"==typeof t||"string"==typeof n};var ut=function(t){return 0},st=function(t,n,e){var r=n-t;return 0===r?1:(e-t)/r},ct=function(t,n,e){return-e*t+e*n+t},ft=function(t,n,e){var r=t*t,o=n*n;return Math.sqrt(Math.max(0,e*(o-r)+r))},lt=[$,q,Z],dt=function(t){return lt.find((function(n){return n.test(t)}))},pt=function(t,n){var e=dt(t),r=dt(n);e.transform,r.transform;var o=e.parse(t),i=r.parse(n),u=a({},o),s=e===Z?ct:ft;return function(t){for(var n in u)"alpha"!==n&&(u[n]=s(o[n],i[n],t));return u.alpha=ct(o.alpha,i.alpha,t),e.transform(u)}},vt=function(t){return"number"==typeof t},ht=function(t,n){return function(e){return n(t(e))}},mt=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.reduce(ht)};function yt(t,n){return vt(t)?function(e){return ct(t,n,e)}:K.test(t)?pt(t,n):Et(t,n)}var gt=function(t,n){var e=function(){for(var t=0,n=0,e=arguments.length;n<e;n++)t+=arguments[n].length;var r=Array(t),o=0;for(n=0;n<e;n++)for(var i=arguments[n],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}(t),r=e.length,o=t.map((function(t,e){return yt(t,n[e])}));return function(t){for(var n=0;n<r;n++)e[n]=o[n](t);return e}},xt=function(t,n){var e=a(a({},t),n),r={};for(var o in e)void 0!==t[o]&&void 0!==n[o]&&(r[o]=yt(t[o],n[o]));return function(t){for(var n in r)e[n]=r[n](t);return e}};function bt(t){for(var n=Q.parse(t),e=n.length,r=0,o=0,i=0,a=0;a<e;a++)r||"number"==typeof n[a]?r++:void 0!==n[a].hue?i++:o++;return{parsed:n,numNumbers:r,numRGB:o,numHSL:i}}var Et=function(t,n){var e=Q.createTransformer(n),r=bt(t),o=bt(n);return mt(gt(r.parsed,o.parsed),e)},wt=function(t,n){return function(e){return ct(t,n,e)}};function Ct(t,n,e){for(var r,o=[],i=e||("number"==typeof(r=t[0])?wt:"string"==typeof r?K.test(r)?pt:Et:Array.isArray(r)?gt:"object"==typeof r?xt:void 0),a=t.length-1,u=0;u<a;u++){var s=i(t[u],t[u+1]);if(n){var c=Array.isArray(n)?n[u]:n;s=mt(c,s)}o.push(s)}return o}function At(t,n,e){var r=void 0===e?{}:e,o=r.clamp,i=void 0===o||o,a=r.ease,u=r.mixer,s=t.length;n.length,!a||!Array.isArray(a)||a.length,t[0]>t[s-1]&&(t=[].concat(t),n=[].concat(n),t.reverse(),n.reverse());var c=Ct(n,a,u),f=2===s?function(t,n){var e=t[0],r=t[1],o=n[0];return function(t){return o(st(e,r,t))}}(t,c):function(t,n){var e=t.length,r=e-1;return function(o){var i=0,a=!1;if(o<=t[0]?a=!0:o>=t[r]&&(i=r-1,a=!0),!a){for(var u=1;u<e&&!(t[u]>o||u===r);u++);i=u-1}var s=st(t[i],t[i+1],o);return n[i](s)}}(t,c);return i?function(n){return f(tt(t[0],t[s-1],n))}:f}var St=function(t){return function(n){return 1-t(1-n)}},Pt=function(t){return function(n){return n<=.5?t(2*n)/2:(2-t(2*(1-n)))/2}},Mt=function(t){return function(n){return n*n*((t+1)*n-t)}},Tt=function(t){var n=Mt(t);return function(t){return(t*=2)<1?.5*n(t):.5*(2-Math.pow(2,-10*(t-1)))}},Vt=function(t){return t},Lt=function(t){return function(n){return Math.pow(n,t)}}(2),Bt=St(Lt),kt=Pt(Lt),Rt=function(t){return 1-Math.sin(Math.acos(t))},Ot=St(Rt),Dt=Pt(Ot),Ft=Mt(1.525),Ut=St(Ft),It=Pt(Ft),jt=Tt(1.525),Ht=function(t){if(1===t||0===t)return t;var n=t*t;return t<4/11?7.5625*n:t<8/11?9.075*n-9.9*t+3.4:t<.9?4356/361*n-35442/1805*t+16061/1805:10.8*t*t-20.52*t+10.72},Xt=St(Ht);function Yt(t,n){return t.map((function(){return n||kt})).splice(0,t.length-1)}function zt(t){var n=t.from,e=void 0===n?0:n,r=t.to,o=void 0===r?1:r,i=t.ease,a=t.offset,u=t.duration,s=void 0===u?300:u,c={done:!1,value:e},f=Array.isArray(o)?o:[e,o],l=function(t,n){return t.map((function(t){return t*n}))}(null!=a?a:function(t){var n=t.length;return t.map((function(t,e){return 0!==e?e/(n-1):0}))}(f),s);function d(){return At(l,f,{ease:Array.isArray(i)?i:Yt(f,i)})}var p=d();return{next:function(t){return c.value=p(t),c.done=t>=s,c},flipTarget:function(){f.reverse(),p=d()}}}var Wt={keyframes:zt,spring:at,decay:function(t){var n=t.velocity,e=void 0===n?0:n,r=t.from,o=void 0===r?0:r,i=t.power,a=void 0===i?.8:i,u=t.timeConstant,s=void 0===u?350:u,c=t.restDelta,f=void 0===c?.5:c,l=t.modifyTarget,d={done:!1,value:o},p=a*e,v=o+p,h=void 0===l?v:l(v);return h!==v&&(p=h-o),{next:function(t){var n=-p*Math.exp(-t/s);return d.done=!(n>f||n<-f),d.value=d.done?h:h+n,d},flipTarget:function(){}}}};function Nt(t,n,e){return void 0===e&&(e=0),t-n-e}var Gt=function(t){var n=function(n){var e=n.delta;return t(e)};return{start:function(){return E.update(n,!0,!0)},stop:function(){return w.update(n)}}};function _t(t){var n,e,r,o,i,s=t.from,c=t.autoplay,f=void 0===c||c,l=t.driver,d=void 0===l?Gt:l,p=t.elapsed,v=void 0===p?0:p,h=t.repeat,m=void 0===h?0:h,y=t.repeatType,g=void 0===y?"loop":y,x=t.repeatDelay,b=void 0===x?0:x,E=t.onPlay,w=t.onStop,C=t.onComplete,A=t.onRepeat,S=t.onUpdate,P=u(t,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]),M=P.to,T=0,V=P.duration,L=!1,B=!0,k=function(t){if(Array.isArray(t.to))return zt;if(Wt[t.type])return Wt[t.type];var n=new Set(Object.keys(t));return n.has("ease")||n.has("duration")&&!n.has("dampingRatio")?zt:n.has("dampingRatio")||n.has("stiffness")||n.has("mass")||n.has("damping")||n.has("restSpeed")||n.has("restDelta")?at:zt}(P);(null===(e=(n=k).needsInterpolation)||void 0===e?void 0:e.call(n,s,M))&&(i=At([0,100],[s,M],{clamp:!1}),s=0,M=100);var R=k(a(a({},P),{from:s,to:M}));function O(){T++,"reverse"===g?v=function(t,n,e,r){return void 0===e&&(e=0),void 0===r&&(r=!0),r?Nt(n+-t,n,e):n-(t-n)+e}(v,V,b,B=T%2==0):(v=Nt(v,V,b),"mirror"===g&&R.flipTarget()),L=!1,A&&A()}function D(t){if(B||(t=-t),v+=t,!L){var n=R.next(Math.max(0,v));o=n.value,i&&(o=i(o)),L=B?n.done:v<=0}null==S||S(o),L&&(0===T&&(null!=V||(V=v)),T<m?function(t,n,e,r){return r?t>=n+e:t<=-e}(v,V,b,B)&&O():(r.stop(),C&&C()))}return f&&(null==E||E(),(r=d(D)).start()),{stop:function(){null==w||w(),r.stop()}}}function qt(t,n){return n?t*(1e3/n):0}var Zt=function(t){return t.hasOwnProperty("x")&&t.hasOwnProperty("y")},$t=function(t){return Zt(t)&&t.hasOwnProperty("z")},Kt=function(t,n){return Math.abs(t-n)};function Jt(t,n){if(vt(t)&&vt(n))return Kt(t,n);if(Zt(t)&&Zt(n)){var e=Kt(t.x,n.x),r=Kt(t.y,n.y),o=$t(t)&&$t(n)?Kt(t.z,n.z):0;return Math.sqrt(Math.pow(e,2)+Math.pow(r,2)+Math.pow(o,2))}}var Qt=function(t,n,e){var r=n-t;return((e-t)%r+r)%r+t},tn=function(t,n){return 1-3*n+3*t},nn=function(t,n){return 3*n-6*t},en=function(t){return 3*t},rn=function(t,n,e){return((tn(n,e)*t+nn(n,e))*t+en(n))*t},on=function(t,n,e){return 3*tn(n,e)*t*t+2*nn(n,e)*t+en(n)};function an(t,n,e,r){if(t===n&&e===r)return Vt;for(var o=new Float32Array(11),i=0;i<11;++i)o[i]=rn(.1*i,t,e);function a(n){for(var r=0,i=1;10!==i&&o[i]<=n;++i)r+=.1;--i;var a=r+.1*((n-o[i])/(o[i+1]-o[i])),u=on(a,t,e);return u>=.001?function(t,n,e,r){for(var o=0;o<8;++o){var i=on(n,e,r);if(0===i)return n;n-=(rn(n,e,r)-t)/i}return n}(n,a,t,e):0===u?a:function(t,n,e,r,o){var i,a,u=0;do{(i=rn(a=n+(e-n)/2,r,o)-t)>0?e=a:n=a}while(Math.abs(i)>1e-7&&++u<10);return a}(n,r,r+.1,t,e)}return function(t){return 0===t||1===t?t:rn(a(t),n,r)}}var un=function(){function t(){this.subscriptions=new Set}return t.prototype.add=function(t){var n=this;return this.subscriptions.add(t),function(){n.subscriptions.delete(t)}},t.prototype.notify=function(t,n,e){var r,o;if(this.subscriptions.size)try{for(var i=function(t){var n="function"==typeof Symbol&&Symbol.iterator,e=n&&t[n],r=0;if(e)return e.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}(this.subscriptions),a=i.next();!a.done;a=i.next()){(0,a.value)(t,n,e)}}catch(t){r={error:t}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}},t.prototype.clear=function(){this.subscriptions.clear()},t}(),sn=function(){function t(t){var n,e=this;this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new un,this.renderSubscribers=new un,this.canTrackVelocity=!1,this.updateAndNotify=function(t,n){void 0===n&&(n=!0),e.prev=e.current,e.current=t,e.prev!==e.current&&e.updateSubscribers.notify(e.current),n&&e.renderSubscribers.notify(e.current);var r=P(),o=r.delta,i=r.timestamp;e.lastUpdated!==i&&(e.timeDelta=o,e.lastUpdated=i,E.postRender(e.scheduleVelocityCheck))},this.scheduleVelocityCheck=function(){return E.postRender(e.velocityCheck)},this.velocityCheck=function(t){t.timestamp!==e.lastUpdated&&(e.prev=e.current)},this.set(t,!1),this.canTrackVelocity=(n=this.current,!isNaN(parseFloat(n)))}return t.prototype.onChange=function(t){return this.updateSubscribers.add(t)},t.prototype.clearListeners=function(){this.updateSubscribers.clear()},t.prototype.onRenderRequest=function(t){return t(this.get()),this.renderSubscribers.add(t)},t.prototype.attach=function(t){this.passiveEffect=t},t.prototype.set=function(t,n){void 0===n&&(n=!0),n&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,n)},t.prototype.get=function(){return this.current},t.prototype.getPrevious=function(){return this.prev},t.prototype.getVelocity=function(){return this.canTrackVelocity?qt(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0},t.prototype.start=function(t){var n=this;return this.stop(),new Promise((function(e){n.stopAnimation=t(e)})).then((function(){return n.clearAnimation()}))},t.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},t.prototype.isAnimating=function(){return!!this.stopAnimation},t.prototype.clearAnimation=function(){this.stopAnimation=null},t.prototype.destroy=function(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()},t}();function cn(t){return new sn(t)}var fn=function(t){return 1e3*t},ln={linear:Vt,easeIn:Lt,easeInOut:kt,easeOut:Bt,circIn:Rt,circInOut:Dt,circOut:Ot,backIn:Ft,backInOut:It,backOut:Ut,anticipate:jt,bounceIn:Xt,bounceInOut:function(t){return t<.5?.5*(1-Ht(1-2*t)):.5*Ht(2*t-1)+.5},bounceOut:Ht},dn=function(t){if(Array.isArray(t)){t.length;var n=s(t,4);return an(n[0],n[1],n[2],n[3])}return"string"==typeof t?ln[t]:t},pn=function(t,n){return"zIndex"!==t&&(!("number"!=typeof n&&!Array.isArray(n))||!("string"!=typeof n||!Q.test(n)||n.startsWith("url(")))},vn=function(t){return Array.isArray(t)},hn=function(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}},mn=function(t){return{type:"spring",stiffness:550,damping:0===t?100:30,restDelta:.01,restSpeed:10}},yn=function(){return{type:"keyframes",ease:"linear",duration:.3}},gn=function(t){return{type:"keyframes",duration:.8,values:t}},xn={x:hn,y:hn,z:hn,rotate:hn,rotateX:hn,rotateY:hn,rotateZ:hn,scaleX:mn,scaleY:mn,scale:mn,opacity:yn,backgroundColor:yn,color:yn,default:mn};function bn(t){var n=t.yoyo,e=t.loop,r=t.flip,o=t.ease,i=t.times,s=u(t,["yoyo","loop","flip","ease","times"]),c=a({},s);return i&&(c.offset=i),s.duration&&(c.duration=fn(s.duration)),s.repeatDelay&&(c.repeatDelay=fn(s.repeatDelay)),o&&(c.ease=function(t){return Array.isArray(t)&&"number"!=typeof t[0]}(o)?o.map(dn):dn(o)),"tween"===s.type&&(c.type="keyframes"),n?c.repeatType="reverse":e?c.repeatType="loop":r&&(c.repeatType="mirror"),c.repeat=e||n||r||s.repeat,"spring"!==s.type&&(c.type="keyframes"),c}function En(t,n,e){var r,o,i,s;return Array.isArray(n.to)&&(null!==(r=t.duration)&&void 0!==r||(t.duration=.8)),function(t){Array.isArray(t.to)&&null===t.to[0]&&(t.to=c(t.to),t.to[0]=t.from)}(n),function(t){t.when,t.delay,t.delayChildren,t.staggerChildren,t.staggerDirection,t.repeat,t.repeatType,t.repeatDelay,t.from;var n=u(t,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(n).length}(t)||(t=a(a({},t),(o=e,i=n.to,s=vn(i)?gn:xn[o]||xn.default,a({to:i},s(i))))),a(a({},n),bn(t))}function wn(t,n,e,r,o){var i,u=function(t,n){return t[n]||t.default||t}(r,t),s=null!==(i=u.from)&&void 0!==i?i:n.get(),c=pn(t,e);return"none"===s&&c&&"string"==typeof e&&(s=Q.getAnimatableNone(e)),pn(t,s)&&c&&!1!==u.type?function(){var r={from:s,to:e,velocity:n.getVelocity(),onComplete:o,onUpdate:function(t){return n.set(t)}};return"inertia"===u.type||"decay"===u.type?function(t){var n,e=t.from,r=void 0===e?0:e,o=t.velocity,i=void 0===o?0:o,u=t.min,s=t.max,c=t.power,f=void 0===c?.8:c,l=t.timeConstant,d=void 0===l?750:l,p=t.bounceStiffness,v=void 0===p?500:p,h=t.bounceDamping,m=void 0===h?10:h,y=t.restDelta,g=void 0===y?1:y,x=t.modifyTarget,b=t.driver,E=t.onUpdate,w=t.onComplete;function C(t){return void 0!==u&&t<u||void 0!==s&&t>s}function A(t){return void 0===u?s:void 0===s||Math.abs(u-t)<Math.abs(s-t)?u:s}function S(t){null==n||n.stop(),n=_t(a(a({},t),{driver:b,onUpdate:function(n){var e;null==E||E(n),null===(e=t.onUpdate)||void 0===e||e.call(t,n)},onComplete:w}))}function M(t){S(a({type:"spring",stiffness:v,damping:m,restDelta:g},t))}if(C(r))M({from:r,velocity:i,to:A(r)});else{var T=f*i+r;void 0!==x&&(T=x(T));var V,L,B=A(T),k=B===u?-1:1;S({type:"decay",from:r,velocity:i,timeConstant:d,power:f,restDelta:g,modifyTarget:x,onUpdate:C(T)?function(t){V=L,L=t,i=qt(t-V,P().delta),(1===k&&t>B||-1===k&&t<B)&&M({from:t,to:B,velocity:i})}:void 0})}return{stop:function(){return null==n?void 0:n.stop()}}}(a(a({},r),u)):_t(a(a({},En(u,r,t)),{onUpdate:function(t){var n;r.onUpdate(t),null===(n=u.onUpdate)||void 0===n||n.call(u,t)},onComplete:function(){var t;r.onComplete(),null===(t=u.onComplete)||void 0===t||t.call(u)}}))}:function(){var t;return n.set(e),o(),null===(t=null==u?void 0:u.onComplete)||void 0===t||t.call(u),{stop:function(){}}}}function Cn(t,n,e,r){return void 0===r&&(r={}),n.start((function(o){var i,a,u=wn(t,n,e,r,o),s=function(t,n){var e,r,o,i,a;return null!==(a=null!==(i=null!==(r=null===(e=t[n])||void 0===e?void 0:e.delay)&&void 0!==r?r:null===(o=t.default)||void 0===o?void 0:o.delay)&&void 0!==i?i:t.delay)&&void 0!==a?a:0}(r,t),c=function(){return a=u()};return s?i=setTimeout(c,fn(s)):c(),function(){clearTimeout(i),null==a||a.stop()}}))}var An=function(t){return vn(t)?t[t.length-1]||0:t},Sn=a(a({},k),{transform:Math.round}),Pn={color:K,backgroundColor:K,outlineColor:K,fill:K,stroke:K,borderColor:K,borderTopColor:K,borderRightColor:K,borderBottomColor:K,borderLeftColor:K,borderWidth:I,borderTopWidth:I,borderRightWidth:I,borderBottomWidth:I,borderLeftWidth:I,borderRadius:I,radius:I,borderTopLeftRadius:I,borderTopRightRadius:I,borderBottomRightRadius:I,borderBottomLeftRadius:I,width:I,maxWidth:I,height:I,maxHeight:I,size:I,top:I,right:I,bottom:I,left:I,padding:I,paddingTop:I,paddingRight:I,paddingBottom:I,paddingLeft:I,margin:I,marginTop:I,marginRight:I,marginBottom:I,marginLeft:I,rotate:F,rotateX:F,rotateY:F,rotateZ:F,scale:O,scaleX:O,scaleY:O,scaleZ:O,skew:F,skewX:F,skewY:F,distance:I,translateX:I,translateY:I,translateZ:I,x:I,y:I,z:I,perspective:I,transformPerspective:I,opacity:R,originX:X,originY:X,originZ:I,zIndex:Sn,fillOpacity:R,strokeOpacity:R,numOctaves:Sn},Mn=[k,I,U,F,H,j,{test:function(t){return"auto"===t},parse:function(t){return t}}],Tn=function(t){return function(n){return n.test(t)}},Vn=function(t){return Mn.find(Tn(t))},Ln=c(Mn,[K,Q]),Bn=function(t){return Ln.find(Tn(t))},kn=function(t){return Pn[t]},Rn=function(t,n){return n&&"number"==typeof t?n.transform(t):t};function On(t){return Array.isArray(t)}function Dn(t){return"string"==typeof t||On(t)}function Fn(t,n,e){var r={};return n?(r=function(t){return"function"==typeof t}(n)?n(null!=e?e:t.getVariantPayload(),function(t){var n={};return t.forEachValue((function(t,e){return n[e]=t.get()})),n}(t),function(t){var n={};return t.forEachValue((function(t,e){return n[e]=t.getVelocity()})),n}(t)):n,a({transition:t.getDefaultTransition()},r)):r}function Un(t,n,e){t.hasValue(n)?t.getValue(n).set(e):t.addValue(n,cn(e))}function In(t,n,e){var r=(void 0===e?{}:e).priority,o=t.makeTargetAnimatable(Fn(t,n),!1),i=o.transitionEnd,s=void 0===i?{}:i,c=(o.transition,u(o,["transitionEnd","transition"]));for(var f in c=a(a({},c),s)){var l=An(c[f]);Un(t,f,l),r||(t.baseTarget[f]=l)}}function jn(t,n){c(n).reverse().forEach((function(e){var r;In(t,t.getVariant(e)),null===(r=t.variantChildren)||void 0===r||r.forEach((function(t){jn(t,n)}))}))}function Hn(t,n){return Array.isArray(n)?jn(t,n):"string"==typeof n?jn(t,[n]):void In(t,n)}function Xn(t,n,e){var r,o,i,a=Object.keys(n).filter((function(n){return!t.hasValue(n)})),u=a.length;if(u)for(var s=0;s<u;s++){var c=a[s],f=n[c],l=null;if(Array.isArray(f)&&(l=f[0]),null===l){var d=null!==(r=e[c])&&void 0!==r?r:t.readNativeValue(c);l=void 0!==d?d:n[c]}"string"==typeof l&&/^\-?\d*\.?\d+$/.test(l)?l=parseFloat(l):!Bn(l)&&Q.test(f)&&(l=Q.getAnimatableNone(f)),t.addValue(c,cn(l)),null!==(o=(i=e)[c])&&void 0!==o||(i[c]=l),t.baseTarget[c]=l}}function Yn(t,n){if(n)return(n[t]||n.default||n).from}function zn(t,n,e){var r,o,i={};for(var a in t)i[a]=null!==(r=Yn(a,n))&&void 0!==r?r:null===(o=e.getValue(a))||void 0===o?void 0:o.get();return i}function Wn(t,n,e){var r;return void 0===e&&(e={}),e.priority&&t.activeOverrides.add(e.priority),t.resetIsAnimating(e.priority),r=On(n)?function(t,n,e){var r=c(n).reverse().map((function(n){return Nn(t,n,e)}));return Promise.all(r)}(t,n,e):Dn(n)?Nn(t,n,e):Gn(t,n,e),t.onAnimationStart(),r.then((function(){return t.onAnimationComplete()}))}function Nn(t,n,e){var r,o=e&&e.priority||0,i=t.getVariant(n),a=Fn(t,i,e&&e.custom),u=a.transition||{},c=i?function(){return Gn(t,a,e)}:function(){return Promise.resolve()},f=(null===(r=t.variantChildrenOrder)||void 0===r?void 0:r.size)?function(r){void 0===r&&(r=0);var i=u.delayChildren;return function(t,n,e,r,o,i,a){void 0===e&&(e=0);void 0===r&&(r=0);void 0===o&&(o=1);void 0===i&&(i=0);var u=[],s=(t.variantChildrenOrder.size-1)*r,c=1===o?function(t){return t*r}:function(t){return s-t*r};return Array.from(t.variantChildrenOrder).forEach((function(t,r){var o=Nn(t,n,{priority:i,delay:e+c(r),custom:a});u.push(o)})),Promise.all(u)}(t,n,(void 0===i?0:i)+r,u.staggerChildren,u.staggerDirection,o,null==e?void 0:e.custom)}:function(){return Promise.resolve()},l=u.when;if(l){var d=s("beforeChildren"===l?[c,f]:[f,c],2),p=d[0],v=d[1];return p().then(v)}return Promise.all([c(),f(null==e?void 0:e.delay)])}function Gn(t,n,e){var r=void 0===e?{}:e,o=r.delay,i=void 0===o?0:o,s=r.priority,c=void 0===s?0:s,f=r.transitionOverride,l=r.custom,d=Fn(t,n,l);f&&(d.transition=f);var p=t.makeTargetAnimatable(d),v=p.transitionEnd,h=p.transition,m=u(p,["transitionEnd","transition"]);c&&(t.resolvedOverrides[c]=m);var y=[];for(var g in m){var x=t.getValue(g);if(x&&m&&void 0!==m[g]){var b=m[g];c||(t.baseTarget[g]=An(b)),t.isAnimating.has(g)||(t.isAnimating.add(g),y.push(Cn(g,x,b,a({delay:i},h))))}}var E=Promise.all(y);return v?E.then((function(){return In(t,v,{priority:c})})):E}function _n(t,n,e){var r;t.overrides[e]=n,null===(r=t.variantChildren)||void 0===r||r.forEach((function(t){_n(t,n,e)}))}function qn(t,n){var e=t.overrides[n];if(e)return Wn(t,e,{priority:n})}function Zn(t,n){var e;if(null===(e=t.variantChildrenOrder)||void 0===e||e.forEach((function(t){Zn(t,n)})),t.overrides[n]){t.activeOverrides.delete(n);var r=$n(t);if(t.resetIsAnimating(),r)t.overrides[r]&&qn(t,r);var o=t.resolvedOverrides[n];if(o){var i={};for(var a in t.baseTarget)void 0!==o[a]&&(i[a]=t.baseTarget[a]);t.onAnimationStart(),Gn(t,i).then((function(){t.onAnimationComplete()}))}}}function $n(t){return t.activeOverrides.size?Math.max.apply(Math,c(Array.from(t.activeOverrides))):0}var Kn=function(){function t(t,n){var e=this;this.children=new Set,this.baseTarget={},this.overrides=[],this.resolvedOverrides=[],this.activeOverrides=new Set,this.isAnimating=new Set,this.latest={},this.values=new Map,this.valueSubscriptions=new Map,this.config={},this.isMounted=!1,this.update=function(){return e.config.onUpdate(e.latest)},this.triggerRender=function(){return e.render()},this.ref=function(t){t?e.mount(t):e.unmount(),e.externalRef&&("function"==typeof e.externalRef?e.externalRef(t):f(e.externalRef)&&(e.externalRef.current=t))},this.parent=t,this.rootParent=t?t.rootParent:this,this.treePath=t?c(t.treePath,[t]):[],this.depth=t?t.depth+1:0,this.externalRef=n}return t.prototype.getVariantPayload=function(){return this.config.custom},t.prototype.getVariant=function(t){var n;return null===(n=this.config.variants)||void 0===n?void 0:n[t]},t.prototype.addVariantChild=function(t){this.variantChildren||(this.variantChildren=new Set),this.variantChildren.add(t)},t.prototype.addVariantChildOrder=function(t){this.variantChildrenOrder||(this.variantChildrenOrder=new Set),this.variantChildrenOrder.add(t)},t.prototype.onAnimationStart=function(){var t,n;null===(n=(t=this.config).onAnimationStart)||void 0===n||n.call(t)},t.prototype.onAnimationComplete=function(){var t,n;this.isMounted&&(null===(n=(t=this.config).onAnimationComplete)||void 0===n||n.call(t))},t.prototype.getDefaultTransition=function(){return this.config.transition},t.prototype.resetIsAnimating=function(t){var n;void 0===t&&(t=0),this.isAnimating.clear(),t<$n(this)&&this.checkOverrideIsAnimating(t),null===(n=this.variantChildren)||void 0===n||n.forEach((function(n){return n.resetIsAnimating(t)}))},t.prototype.checkOverrideIsAnimating=function(t){for(var n=this.overrides.length,e=t+1;e<n;e++){var r=this.resolvedOverrides[e];if(r)for(var o in r)this.isAnimating.add(o)}},t.prototype.subscribe=function(t){var n=this;return this.children.add(t),function(){return n.children.delete(t)}},t.prototype.hasValue=function(t){return this.values.has(t)},t.prototype.addValue=function(t,n){this.hasValue(t)&&this.removeValue(t),this.values.set(t,n),this.setSingleStaticValue(t,n.get()),this.subscribeToValue(t,n)},t.prototype.removeValue=function(t){var n;null===(n=this.valueSubscriptions.get(t))||void 0===n||n(),this.valueSubscriptions.delete(t),this.values.delete(t),delete this.latest[t]},t.prototype.getValue=function(t,n){var e=this.values.get(t);return void 0===e&&void 0!==n&&(e=new sn(n),this.addValue(t,e)),e},t.prototype.forEachValue=function(t){this.values.forEach(t)},t.prototype.getInstance=function(){return this.element},t.prototype.updateConfig=function(t){void 0===t&&(t={}),this.config=a({},t)},t.prototype.setSingleStaticValue=function(t,n){this.latest[t]=n},t.prototype.setStaticValues=function(t,n){if("string"==typeof t)this.setSingleStaticValue(t,n);else for(var e in t)this.setSingleStaticValue(e,t[e])},t.prototype.scheduleRender=function(){E.render(this.triggerRender,!1,!0)},t.prototype.scheduleUpdateLayoutDelta=function(){E.preRender(this.rootParent.updateLayoutDelta,!1,!0)},t.prototype.subscribeToValue=function(t,n){var e=this,r=n.onChange((function(n){e.setSingleStaticValue(t,n),e.element&&e.config.onUpdate&&E.update(e.update,!1,!0)})),o=n.onRenderRequest((function(){e.element&&e.scheduleRender()}));this.valueSubscriptions.set(t,(function(){r(),o()}))},t.prototype.mount=function(t){this.parent&&(this.removeFromParent=this.parent.subscribe(this)),this.element=this.current=t},t.prototype.unmount=function(){var t=this;this.forEachValue((function(n,e){return t.removeValue(e)})),w.update(this.update),w.render(this.render),this.removeFromParent&&this.removeFromParent()},t}();function Jn(t){return t}function Qn(t){var n=t.top;return{x:{min:t.left,max:t.right},y:{min:n,max:t.bottom}}}function te(t){return{x:a({},t.x),y:a({},t.y)}}var ne={translate:0,scale:1,origin:0,originPoint:0};function ee(){return{x:a({},ne),y:a({},ne)}}var re=["","X","Y","Z"],oe=new Set,ie=["transformPerspective","x","y","z"];function ae(t,n){return ie.indexOf(t)-ie.indexOf(n)}["perspective","translate","scale","rotate","skew"].forEach((function(t){var n=new Set(["rotate","skew"]).has(t);re.forEach((function(e){var r=t+e;ie.push(r),n&&oe.add(r)}))}));var ue=new Set(ie);function se(t){return ue.has(t)}var ce=new Set(["originX","originY","originZ"]);function fe(t){return ce.has(t)}var le={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function de(t,n){var e=t.x,r=t.y;return"translate3d("+e.translate/n.x+"px, "+r.translate/n.y+"px, 0) scale("+e.scale+", "+r.scale+")"}var pe=de(ee(),{x:1,y:1});function ve(t){return t.startsWith("--")}function he(t){return"string"==typeof t&&t.startsWith("var(--")}var me=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function ye(t,n,e){var r=s(function(t){var n=me.exec(t);if(!n)return[,];var e=s(n,3);return[e[1],e[2]]}(t),2),o=r[0],i=r[1];if(o){var a=window.getComputedStyle(n).getPropertyValue(o);return a?a.trim():he(i)?ye(i,n):i}}function ge(t,n){return t/(n.max-n.min)*100}var xe={process:function(t,n){if("string"==typeof t){if(!I.test(t))return t;t=parseFloat(t)}return ge(t,n.x)+"% "+ge(t,n.y)+"%"}},be={borderRadius:a(a({},xe),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:xe,borderTopRightRadius:xe,borderBottomLeftRadius:xe,borderBottomRightRadius:xe,boxShadow:{process:function(t,n,e,r){var o=t,i=t.includes("var("),a=[];i&&(t=t.replace(me,(function(t){return a.push(t),"_$css"})));var u=Q.parse(t);if(u.length>5)return o;var s=Q.createTransformer(t),c="number"!=typeof u[0]?1:0,f=e.x.scale*r.x,l=e.y.scale*r.y;u[0+c]/=f,u[1+c]/=l;var d=ct(f,l,.5);"number"==typeof u[2+c]&&(u[2+c]/=d),"number"==typeof u[3+c]&&(u[3+c]/=d);var p=s(u);if(i){var v=0;p=p.replace("_$css",(function(){var t=a[v];return v++,t}))}return p}}};function Ee(t,n,e,r,o,i,a,u,s,c,f,l){var d=a.enableHardwareAcceleration,p=a.transformTemplate,v=a.allowTransformNone;i.length=0;var h=!1,m=!1,y=!0;for(var g in t){var x=t[g],b=kn(g),E=Rn(x,b);if(se(g)){if(h=!0,r[g]=E,i.push(g),!y)continue;x!==(void 0!==b.default?b.default:0)&&(y=!1)}else if(fe(g))o[g]=E,m=!0;else if("transform"!==g||"function"!=typeof x){var w=ve(g)?e:n;if(u&&be[g]){var C=be[g].process(x,l,s,f),A=be[g].applyTo;if(A)for(var S=A.length,P=0;P<S;P++)w[A[P]]=C;else w[g]=C}else w[g]=E}}u?(n.transform=de(c,f),n.transform===pe&&(n.transform=""),h&&(n.transform+=" "+function(t,n){var e="";n.sort(ae);for(var r=n.length,o=0;o<r;o++){var i=n[o];oe.has(i)&&(e+=i+"("+t[i]+") ")}return e}(r,i),n.transform=n.transform.trim()),p&&(n.transform=p(r,n.transform)),n.transformOrigin=function(t){var n=t.x,e=t.y;return 100*n.origin+"% "+100*e.origin+"% 0"}(c)):(h&&(n.transform=function(t,n,e,r,o,i){void 0===o&&(o=!0),void 0===i&&(i=!0);var a="";n.sort(ae);for(var u=!1,s=n.length,c=0;c<s;c++){var f=n[c];a+=(le[f]||f)+"("+t[f]+") ","z"===f&&(u=!0)}return!u&&o?a+="translateZ(0)":a=a.trim(),e?a=e(t,r?"":a):i&&r&&(a="none"),a}(r,i,p,y,d,v)),m&&(n.transformOrigin=function(t){var n=t.originX,e=void 0===n?"50%":n,r=t.originY,o=void 0===r?"50%":r,i=t.originZ;return e+" "+o+" "+(void 0===i?0:i)}(o)))}function we(t,n){t.min=n.min,t.max=n.max}function Ce(t,n,e){return e+n*(t-e)}function Ae(t,n,e,r,o){return void 0!==o&&(t=Ce(t,o,r)),Ce(t,e,r)+n}function Se(t,n,e,r,o){void 0===n&&(n=0),void 0===e&&(e=1),t.min=Ae(t.min,n,e,r,o),t.max=Ae(t.max,n,e,r,o)}function Pe(t,n){var e=n.x,r=n.y;Se(t.x,e.translate,e.scale,e.originPoint),Se(t.y,r.translate,r.scale,r.originPoint)}function Me(t,n,e,r){var o=s(r,3),i=o[0],a=o[1],u=o[2];t.min=n.min,t.max=n.max;var c=void 0!==e[u]?e[u]:.5,f=ct(n.min,n.max,c);Se(t,e[i],e[a],f,e.scale)}var Te=["x","scaleX","originX"],Ve=["y","scaleY","originY"];function Le(t,n,e,r,o){return t=Ce(t-=n,1/e,r),void 0!==o&&(t=Ce(t,1/o,r)),t}function Be(t,n,e){var r=s(e,3),o=r[0],i=r[1],a=r[2];!function(t,n,e,r,o){void 0===n&&(n=0),void 0===e&&(e=1),void 0===r&&(r=.5);var i=ct(t.min,t.max,r)-n;t.min=Le(t.min,n,e,i,o),t.max=Le(t.max,n,e,i,o)}(t,n[o],n[i],n[a],n.scale)}function ke(t,n,e){return void 0===n&&(n=0),void 0===e&&(e=.01),Jt(t,n)<e}function Re(t){return t.max-t.min}function Oe(t,n){var e=.5,r=Re(t),o=Re(n);return o>r?e=st(n.min,n.max-r,t.min):r>o&&(e=st(t.min,t.max-o,n.min)),tt(0,1,e)}function De(t,n,e,r){t.origin=void 0===r?Oe(n,e):r,t.originPoint=ct(n.min,n.max,t.origin),t.scale=Re(e)/Re(n),ke(t.scale,1,1e-4)&&(t.scale=1),t.translate=ct(e.min,e.max,t.origin)-t.originPoint,ke(t.translate)&&(t.translate=0)}function Fe(t,n,e,r){De(t.x,n.x,e.x,r),De(t.y,n.y,e.y,r)}function Ue(t){return[t("x"),t("y")]}function Ie(t,n){return Qn(function(t,n){var e=t.top,r=t.left,o=t.bottom,i=t.right;void 0===n&&(n=Jn);var a=n({x:r,y:e}),u=n({x:i,y:o});return{top:a.y,left:a.x,bottom:u.y,right:u.x}}(t.getBoundingClientRect(),n))}var je,He=new Set(["width","height","top","left","right","bottom","x","y"]),Xe=function(t){return He.has(t)},Ye=function(t,n){t.set(n,!1),t.set(n)},ze=function(t){return t===k||t===I};!function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"}(je||(je={}));var We=function(t,n){return parseFloat(t.split(", ")[n])},Ne=function(t,n){return function(e,r){var o=r.transform;if("none"===o||!o)return 0;var i=o.match(/^matrix3d\((.+)\)$/);if(i)return We(i[1],n);var a=o.match(/^matrix\((.+)\)$/);return a?We(a[1],t):0}},Ge=new Set(["x","y","z"]),_e=ie.filter((function(t){return!Ge.has(t)}));var qe={width:function(t){var n=t.x;return n.max-n.min},height:function(t){var n=t.y;return n.max-n.min},top:function(t,n){var e=n.top;return parseFloat(e)},left:function(t,n){var e=n.left;return parseFloat(e)},bottom:function(t,n){var e=t.y,r=n.top;return parseFloat(r)+(e.max-e.min)},right:function(t,n){var e=t.x,r=n.left;return parseFloat(r)+(e.max-e.min)},x:Ne(4,13),y:Ne(5,14)},Ze=function(t,n,e,r){void 0===e&&(e={}),void 0===r&&(r={}),n=a({},n),r=a({},r);var o=Object.keys(n).filter(Xe),i=[],u=!1,c=[];if(o.forEach((function(o){var a=t.getValue(o);if(t.hasValue(o)){var s,f=e[o],l=n[o],d=Vn(f);if(vn(l))for(var p=l.length,v=null===l[0]?1:0;v<p;v++)s?Vn(l[v]):s=Vn(l[v]);else s=Vn(l);if(d!==s)if(ze(d)&&ze(s)){var h=a.get();"string"==typeof h&&a.set(parseFloat(h)),"string"==typeof l?n[o]=parseFloat(l):Array.isArray(l)&&s===I&&(n[o]=l.map(parseFloat))}else(null==d?void 0:d.transform)&&(null==s?void 0:s.transform)&&(0===f||0===l)?0===f?a.set(s.transform(f)):n[o]=d.transform(l):(u||(i=function(t){var n=[];return _e.forEach((function(e){var r=t.getValue(e);void 0!==r&&(n.push([e,r.get()]),r.set(e.startsWith("scale")?1:0))})),n.length&&t.render(),n}(t),u=!0),c.push(o),r[o]=void 0!==r[o]?r[o]:n[o],Ye(a,l))}})),c.length){var f=function(t,n,e){var r=n.getBoundingBox(),o=n.getComputedStyle(),i=o.display,a={top:o.top,left:o.left,bottom:o.bottom,right:o.right,transform:o.transform};"none"===i&&n.setStaticValues("display",t.display||"block"),n.render();var u=n.getBoundingBox();return e.forEach((function(e){var i=n.getValue(e);Ye(i,qe[e](r,a)),t[e]=qe[e](u,o)})),t}(n,t,c);return i.length&&i.forEach((function(n){var e=s(n,2),r=e[0],o=e[1];t.getValue(r).set(o)})),t.render(),{target:f,transitionEnd:r}}return{target:n,transitionEnd:r}};function $e(t,n,e,r){return function(t){return Object.keys(t).some(Xe)}(n)?Ze(t,n,e,r):{target:n,transitionEnd:r}}var Ke=function(t,n,e,r){var o=function(t,n,e){var r,o=u(n,[]),i=t.getInstance();if(!(i instanceof HTMLElement))return{target:o,transitionEnd:e};for(var s in e&&(e=a({},e)),t.forEachValue((function(t){var n=t.get();if(he(n)){var e=ye(n,i);e&&t.set(e)}})),o){var c=o[s];if(he(c)){var f=ye(c,i);f&&(o[s]=f,e&&(null!==(r=e[s])&&void 0!==r||(e[s]=c)))}}return{target:o,transitionEnd:e}}(t,n,r);return $e(t,n=o.target,e,r=o.transitionEnd)},Je=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.defaultConfig={enableHardwareAcceleration:!0,allowTransformNone:!0},n.style={},n.reactStyle={},n.vars={},n.transform={},n.transformOrigin={},n.transformKeys=[],n.config=n.defaultConfig,n.isLayoutProjectionEnabled=!1,n.layoutUpdateListeners=new un,n.layoutMeasureListeners=new un,n.viewportBoxUpdateListeners=new un,n.hasViewportBoxUpdated=!1,n.targetBoxFinal={x:{min:0,max:1},y:{min:0,max:1}},n.treeScale={x:1,y:1},n.prevTreeScale={x:1,y:1},n.delta=ee(),n.deltaFinal=ee(),n.deltaTransform=pe,n.stopLayoutAxisAnimation={x:function(){},y:function(){}},n.isTargetBoxLocked=!1,n.axisProgress={x:cn(0),y:cn(0)},n.updateLayoutDelta=function(){n.isLayoutProjectionEnabled&&n.box&&n.updateLayoutDeltas(),n.children.forEach(Qe)},n}return i(n,t),n.prototype.removeValue=function(n){t.prototype.removeValue.call(this,n),delete this.vars[n],delete this.style[n]},n.prototype.clean=function(){this.style={},this.vars={},this.transform={}},n.prototype.updateConfig=function(t){void 0===t&&(t={}),this.config=a(a({},this.defaultConfig),t)},n.prototype.read=function(t){return this.getComputedStyle()[t]||0},n.prototype.addValue=function(n,e){t.prototype.addValue.call(this,n,e),n.startsWith("rotate")&&(this.layoutOrigin=.5)},n.prototype.readNativeValue=function(t){if(se(t)){var n=kn(t);return n&&n.default||0}return this.read(t)},n.prototype.makeTargetAnimatable=function(t,n){void 0===n&&(n=!0);var e=t.transition,r=t.transitionEnd,o=u(t,["transition","transitionEnd"]),i=this.config.transformValues,s=zn(o,e||{},this);if(i&&(r&&(r=i(r)),o&&(o=i(o)),s&&(s=i(s))),n){Xn(this,o,s);var c=Ke(this,o,s,r);r=c.transitionEnd,o=c.target}return a({transition:e,transitionEnd:r},o)},n.prototype.enableLayoutProjection=function(){this.isLayoutProjectionEnabled=!0},n.prototype.hide=function(){!1!==this.isVisible&&(this.isVisible=!1,this.scheduleRender())},n.prototype.show=function(){!0!==this.isVisible&&(this.isVisible=!0,this.scheduleRender())},n.prototype.onLayoutUpdate=function(t){return this.layoutUpdateListeners.add(t)},n.prototype.onLayoutMeasure=function(t){return this.layoutMeasureListeners.add(t)},n.prototype.onViewportBoxUpdate=function(t){return this.viewportBoxUpdateListeners.add(t)},n.prototype.layoutReady=function(t){this.layoutUpdateListeners.notify(this.box,this.prevViewportBox||this.box,t)},n.prototype.getBoundingBox=function(){var t=this.config.transformPagePoint;return Ie(this.element,t)},n.prototype.getBoundingBoxWithoutTransforms=function(){var t,n,e=this.getBoundingBox();return t=e,n=this.latest,Be(t.x,n,Te),Be(t.y,n,Ve),e},n.prototype.getComputedStyle=function(){return window.getComputedStyle(this.element)},n.prototype.snapshotBoundingBox=function(){this.prevViewportBox=this.getBoundingBoxWithoutTransforms(),this.rebaseTargetBox(!1,this.prevViewportBox)},n.prototype.rebaseTargetBox=function(t,n){var e=this;void 0===t&&(t=!1),void 0===n&&(n=this.box);var r=this.axisProgress,o=r.x,i=r.y,a=this.box&&!this.isTargetBoxLocked&&!o.isAnimating()&&!i.isAnimating();(t||a)&&Ue((function(t){var r=n[t],o=r.min,i=r.max;e.setAxisTarget(t,o,i)}))},n.prototype.measureLayout=function(){var t=this;this.box=this.getBoundingBox(),this.boxCorrected=te(this.box),this.targetBox||(this.targetBox=te(this.box)),this.layoutMeasureListeners.notify(this.box,this.prevViewportBox||this.box),E.update((function(){return t.rebaseTargetBox()}))},n.prototype.lockTargetBox=function(){this.isTargetBoxLocked=!0},n.prototype.unlockTargetBox=function(){this.stopLayoutAnimation(),this.isTargetBoxLocked=!1},n.prototype.resetTransform=function(){var t=this.config.transformTemplate;this.element.style.transform=t?t({},""):"none",this.scheduleRender()},n.prototype.setAxisTarget=function(t,n,e){var r=this.targetBox[t];r.min=n,r.max=e,this.hasViewportBoxUpdated=!0,this.rootParent.scheduleUpdateLayoutDelta()},n.prototype.startLayoutAxisAnimation=function(t,n){var e,r=this,o=this.axisProgress[t],i=this.targetBox[t],a=i.min,u=i.max-a;return o.clearListeners(),o.set(a),o.set(a),o.onChange((function(n){return r.setAxisTarget(t,n,n+u)})),null===(e=this.animateMotionValue)||void 0===e?void 0:e.call(this,t,o,0,n)},n.prototype.stopLayoutAnimation=function(){var t=this;Ue((function(n){return t.axisProgress[n].stop()}))},n.prototype.updateLayoutDeltas=function(){var t,n,e,r,o;t=this.boxCorrected,n=this.box,we(t.x,n.x),we(t.y,n.y),this.parent&&(this.prevTreeScale.x=this.treeScale.x,this.prevTreeScale.y=this.treeScale.y,e=this.treeScale,r=this.parent.treeScale,o=this.parent.delta,e.x=r.x*o.x.scale,e.y=r.y*o.y.scale),function(t,n){for(var e=n.length,r=0;r<e;r++)Pe(t,n[r].delta)}(this.boxCorrected,this.treePath),Fe(this.delta,this.boxCorrected,this.targetBox,this.layoutOrigin),this.hasViewportBoxUpdated&&this.viewportBoxUpdateListeners.notify(this.targetBox,this.delta),this.hasViewportBoxUpdated=!1;var i=de(this.delta,this.treeScale);i===this.deltaTransform&&this.prevTreeScale.x===this.treeScale.x&&this.prevTreeScale.y===this.treeScale.y||this.scheduleRender(),this.deltaTransform=i},n.prototype.updateTransformDeltas=function(){var t,n,e;this.isLayoutProjectionEnabled&&this.box&&(t=this.targetBoxFinal,n=this.targetBox,e=this.latest,Me(t.x,n.x,e,Te),Me(t.y,n.y,e,Ve),Fe(this.deltaFinal,this.boxCorrected,this.targetBoxFinal,this.layoutOrigin))},n.prototype.build=function(){this.updateTransformDeltas(),void 0!==this.isVisible&&(this.style.visibility=this.isVisible?"visible":"hidden"),Ee(this.latest,this.style,this.vars,this.transform,this.transformOrigin,this.transformKeys,this.config,this.isLayoutProjectionEnabled&&!!this.box,this.delta,this.deltaFinal,this.treeScale,this.targetBoxFinal)},n.prototype.render=function(){for(var t in this.build(),Object.assign(this.element.style,this.style),this.vars)this.element.style.setProperty(t,this.vars[t])},n}(Kn),Qe=function(t){return t.updateLayoutDelta()};function tr(t){var e=n.useRef(null);return null===e.current&&(e.current=t()),e.current}function nr(t,n,e){return"string"==typeof t?t:I.transform(n+e*t)}var er=function(t,n){return I.transform(t*n)},rr={offset:"stroke-dashoffset",array:"stroke-dasharray"},or={offset:"strokeDashoffset",array:"strokeDasharray"};var ir={x:0,y:0,width:0,height:0};function ar(t,n,e,r,o,i,a,s,c,f,l,d,p,v,h){var m=t.attrX,y=t.attrY,g=t.originX,x=t.originY,b=t.pathLength,E=t.pathSpacing,w=void 0===E?1:E,C=t.pathOffset,A=void 0===C?0:C;return Ee(u(t,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]),r,e,o,i,a,s,l,d,p,v,h),r.transform&&(n.transform=r.transform,delete r.transform),(void 0!==g||void 0!==x||n.transform)&&(n.transformOrigin=function(t,n,e){return nr(n,t.x,t.width)+" "+nr(e,t.y,t.height)}(c||ir,void 0!==g?g:.5,void 0!==x?x:.5)),void 0!==m&&(r.x=m),void 0!==y&&(r.y=y),void 0!==f&&void 0!==b&&function(t,n,e,r,o,i){void 0===r&&(r=1),void 0===o&&(o=0),void 0===i&&(i=!0);var a=i?rr:or;t[a.offset]=er(-o,n);var u=er(e,n),s=er(r,n);t[a.array]=u+" "+s}(r,f,b,w,A,!1),r}var ur=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox"]),sr=/([a-z])([A-Z])/g,cr=function(t){return t.replace(sr,"$1-$2").toLowerCase()},fr=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.attrs={},n.defaultConfig={enableHardwareAcceleration:!1},n.config=n.defaultConfig,n}return i(n,t),n.prototype.mount=function(n){t.prototype.mount.call(this,n),this.measure()},n.prototype.measure=function(){try{this.dimensions="function"==typeof this.element.getBBox?this.element.getBBox():this.element.getBoundingClientRect()}catch(t){this.dimensions={x:0,y:0,width:0,height:0}}"path"===this.element.tagName&&(this.totalPathLength=this.element.getTotalLength())},n.prototype.clean=function(){t.prototype.clean.call(this),this.attrs={}},n.prototype.read=function(t){return t=ur.has(t)?t:cr(t),this.element.getAttribute(t)},n.prototype.build=function(){this.updateTransformDeltas(),ar(this.latest,this.style,this.vars,this.attrs,this.transform,this.transformOrigin,this.transformKeys,this.config,this.dimensions,this.totalPathLength,this.isLayoutProjectionEnabled&&!!this.box,this.delta,this.deltaFinal,this.treeScale,this.targetBoxFinal)},n.prototype.render=function(){for(var n in t.prototype.render.call(this),this.attrs)this.element.setAttribute(ur.has(n)?n:cr(n),this.attrs[n])},n}(Je);var lr=new Set(["animate","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","metadata","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","tspan","use","view"]);function dr(t){return"string"==typeof t&&lr.has(t)}var pr=n.createContext(null),vr=n.createContext({variantContext:{}});function hr(){return n.useContext(vr).variantContext}function mr(){return n.useContext(vr).visualElement}var yr=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","onLayoutAnimationComplete","onViewportBoxUpdate","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","whileHover","whileTap","onHoverEnd","onHoverStart"]);function gr(t){return yr.has(t)}var xr=function(t){return!gr(t)};try{var br=require("@emotion/is-prop-valid").default;xr=function(t){return t.startsWith("on")?!gr(t):br(t)}}catch(t){}var Er=function(t){return t instanceof sn};function wr(t,n){var e=n.layout,r=n.layoutId;return se(t)||fe(t)||(e||void 0!==r)&&!!be[t]}function Cr(t,n,e,r,o){for(var i in void 0===r&&(r=!1),r&&(t.reactStyle={}),e){var a=e[i],u=!1;if(Er(a))Pr.has(i)||(t.addValue(i,a),u=!0);else if(wr(i,o)){if(t.hasValue(i)){if(a!==n[i]){if(Er(n[i]))t.addValue(i,cn(a));else t.getValue(i).set(a)}}else t.addValue(i,cn(a));u=!0}else r&&(t.reactStyle[i]=a);u&&(n[i]=a)}}var Ar,Sr,Pr=new Set([]),Mr=function(){return{}},Tr=n.createContext({transformPagePoint:function(t){return t},features:[],isStatic:!1});function Vr(t){var n=t.animate,e=t.variants,r=t.inherit;return void 0===r?!!e&&!n:r}!function(t){t[t.Entering=0]="Entering",t[t.Present=1]="Present",t[t.Exiting=2]="Exiting"}(Ar||(Ar={})),(Sr=t.VisibilityAction||(t.VisibilityAction={}))[Sr.Hide=0]="Hide",Sr[Sr.Show=1]="Show";var Lr={measureLayout:function(t){return t.measureLayout()},layoutReady:function(t){return t.layoutReady()}},Br=function(t,n){return t.depth-n.depth};function kr(){var t=new Set;return{add:function(n){return t.add(n)},flush:function(n){var e=void 0===n?Lr:n,r=e.measureLayout,o=e.layoutReady,i=Array.from(t).sort(Br);i.forEach((function(t){return t.resetTransform()})),i.forEach(r),i.forEach(o),i.forEach((function(t){t.isPresent&&(t.presence=Ar.Present)})),t.clear()}}}function Rr(t){return!!t.forceUpdate}var Or=n.createContext(kr()),Dr="undefined"!=typeof window?n.useLayoutEffect:n.useEffect;function Fr(){var t=n.useContext(pr);if(null===t)return[!0,null];var e=t.isPresent,r=t.onExitComplete,o=t.register,i=Hr();n.useEffect((function(){return o(i)}),[]);return!e&&r?[!1,function(){return null==r?void 0:r(i)}]:[!0]}function Ur(t){return null===t||t.isPresent}var Ir=0,jr=function(){return Ir++},Hr=function(){return tr(jr)};function Xr(t,e){void 0===e&&(e=!1);var r=n.useRef(!0);(!e||e&&r.current)&&t(),r.current=!1}function Yr(t){return"string"==typeof t||Array.isArray(t)}function zr(t){return"object"==typeof t&&"function"==typeof t.start}function Wr(t,e){var r=e.defaultFeatures,o=e.useVisualElement,i=e.render;return n.forwardRef((function(e,u){var s=n.useContext(Tr).isStatic,f=o(t,e,s,u);!function(t,n){var e=tr(Mr);for(var r in e){var o=wr(r,n),i=void 0!==n[r],a=n.style&&void 0!==n.style[r],u=i&&Er(n[r]),s=a&&Er(n.style[r]);(o&&!i&&!a||!o&&!u&&!s)&&(t.removeValue(r),delete e[r])}Cr(t,e,n,!1,n),n.style&&Cr(t,e,n.style,!0,n),n.transformValues&&(t.reactStyle=n.transformValues(t.reactStyle))}(f,e);var l=function(t,e,r){var o,i,a=e.variants,u=e.initial,s=e.animate,c=e.whileTap,f=e.whileHover,l=hr(),d=l.parent,p=l.initial,v=l.animate,h=n.useContext(pr),m=Yr(s)||Yr(c)||Yr(f)||zr(s),y=a||m;!1!==(u=null!==(o=null==h?void 0:h.initial)&&void 0!==o?o:u)||zr(s)||(u=s);var g=n.useMemo((function(){return{parent:y?t:d,initial:Yr(u)?u:p,animate:Yr(s)?s:v}}),[r?u:null]);return Xr((function(){var n=u||p;n&&Hn(t,n)}),!r),y&&!m&&(null==d||d.addVariantChild(t)),Ur(h)&&(null===(i=t.variantChildrenOrder)||void 0===i||i.clear()),n.useEffect((function(){y&&(null==d||d.addVariantChildOrder(t))})),n.useEffect((function(){return t.isMounted=!0,function(){var n;t.isMounted=!1,null===(n=null==d?void 0:d.variantChildren)||void 0===n||n.delete(t)}}),[]),Xr((function(){t.forEachValue((function(n,e){t.baseTarget[e]=n.get()}))}),!0),g}(f,e,s),d=function(t,e,r,o){var i=n.useContext(Tr);if(e||"undefined"==typeof window)return null;for(var u=c(t,i.features),s=u.length,f=[],l=0;l<s;l++){var d=u[l],p=d.shouldRender,v=d.key,h=d.getComponent;if(p(o)){var m=h(o);m&&f.push(n.createElement(m,a({key:v},o,{visualElement:r,inherit:Vr(o)})))}}return f}(r,s,f,e),p=n.useMemo((function(){return{visualElement:f,variantContext:l}}),[f,l]),v=i(t,e,f);return function(t){var e=n.useContext(Or);Dr((function(){return function(){Rr(e)&&e.remove(t)}}),[])}(f),n.createElement(n.Fragment,null,n.createElement(vr.Provider,{value:p},v),d)}))}function Nr(t){var n=null;return function(){return null===n&&(n=t,function(){n=null})}}var Gr=Nr("dragHorizontal"),_r=Nr("dragVertical");function qr(t){var n=!1;if("y"===t)n=_r();else if("x"===t)n=Gr();else{var e=Gr(),r=_r();e&&r?n=function(){e(),r()}:(e&&e(),r&&r())}return n}function Zr(t,n,e,r){return t.addEventListener(n,e,r),function(){return t.removeEventListener(n,e,r)}}function $r(t,e,r,o){n.useEffect((function(){var n=t.current;if(r&&n)return Zr(n,e,r,o)}),[t,e,r,o])}function Kr(t){return"undefined"!=typeof PointerEvent&&t instanceof PointerEvent?!("mouse"!==t.pointerType):t instanceof MouseEvent}function Jr(t){return!!t.touches}var Qr={pageX:0,pageY:0};function to(t,n){void 0===n&&(n="page");var e=t.touches[0]||t.changedTouches[0]||Qr;return{x:e[n+"X"],y:e[n+"Y"]}}function no(t,n){return void 0===n&&(n="page"),{x:t[n+"X"],y:t[n+"Y"]}}function eo(t,n){return void 0===n&&(n="page"),{point:Jr(t)?to(t,n):no(t,n)}}function ro(t){return eo(t,"client")}var oo=function(t,n){void 0===n&&(n=!1);var e,r=function(n){return t(n,eo(n))};return n?(e=r,function(t){var n=t instanceof MouseEvent;(!n||n&&0===t.button)&&e(t)}):r},io="undefined"!=typeof window,ao={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},uo={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function so(t){return io&&null===window.onpointerdown?t:io&&null===window.ontouchstart?uo[t]:io&&null===window.onmousedown?ao[t]:t}function co(t,n,e,r){return Zr(t,so(n),oo(e,"pointerdown"===n),r)}function fo(t,n,e,r){return $r(t,so(n),e&&oo(e,"pointerdown"===n),r)}var lo=function(){function t(t,n,e){var r=this,o=(void 0===e?{}:e).transformPagePoint;if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(r.lastMoveEvent&&r.lastMoveEventInfo){var t=ho(r.lastMoveEventInfo,r.history),n=null!==r.startEvent,e=Jt(t.offset,{x:0,y:0})>=3;if(n||e){var o=t.point,i=P().timestamp;r.history.push(a(a({},o),{timestamp:i}));var u=r.handlers,s=u.onStart,c=u.onMove;n||(s&&s(r.lastMoveEvent,t),r.startEvent=r.lastMoveEvent),c&&c(r.lastMoveEvent,t)}}},this.handlePointerMove=function(t,n){r.lastMoveEvent=t,r.lastMoveEventInfo=po(n,r.transformPagePoint),Kr(t)&&0===t.buttons?r.handlePointerUp(t,n):E.update(r.updatePoint,!0)},this.handlePointerUp=function(t,n){r.end();var e=r.handlers.onEnd;if(e){var o=ho(po(n,r.transformPagePoint),r.history);e&&e(t,o)}},!(Jr(t)&&t.touches.length>1)){this.handlers=n,this.transformPagePoint=o;var i=po(eo(t),this.transformPagePoint),u=i.point,s=P().timestamp;this.history=[a(a({},u),{timestamp:s})];var c=n.onSessionStart;c&&c(t,ho(i,this.history)),this.removeListeners=mt(co(window,"pointermove",this.handlePointerMove),co(window,"pointerup",this.handlePointerUp),co(window,"pointercancel",this.handlePointerUp))}}return t.prototype.updateHandlers=function(t){this.handlers=t},t.prototype.end=function(){this.removeListeners&&this.removeListeners(),w.update(this.updatePoint)},t}();function po(t,n){return n?{point:n(t.point)}:t}function vo(t,n){return{x:t.x-n.x,y:t.y-n.y}}function ho(t,n){var e=t.point;return{point:e,delta:vo(e,yo(n)),offset:vo(e,mo(n)),velocity:go(n,.1)}}function mo(t){return t[0]}function yo(t){return t[t.length-1]}function go(t,n){if(t.length<2)return{x:0,y:0};for(var e=t.length-1,r=null,o=yo(t);e>=0&&(r=t[e],!(o.timestamp-r.timestamp>fn(n)));)e--;if(!r)return{x:0,y:0};var i=(o.timestamp-r.timestamp)/1e3;if(0===i)return{x:0,y:0};var a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function xo(t,n,e){var r=n.min,o=n.max;return void 0!==r&&t<r?t=e?ct(r,t,e):Math.max(t,r):void 0!==o&&t>o&&(t=e?ct(o,t,e):Math.min(t,o)),t}function bo(t,n,e){return{min:void 0!==n?t.min+n:void 0,max:void 0!==e?t.max+e-(t.max-t.min):void 0}}function Eo(t,n){var e,r=n.min-t.min,o=n.max-t.max;return n.max-n.min<t.max-t.min&&(r=(e=s([o,r],2))[0],o=e[1]),{min:t.min+r,max:t.min+o}}var wo,Co=new WeakMap,Ao=function(){function t(t){var n=t.visualElement;this.isDragging=!1,this.currentDirection=null,this.constraints=!1,this.props={},this.hasMutatedConstraints=!1,this.cursorProgress={x:.5,y:.5},this.originPoint={},this.openGlobalLock=null,this.panSession=null,this.visualElement=n,this.visualElement.enableLayoutProjection(),Co.set(n,this)}return t.prototype.start=function(t,n){var e=this,r=void 0===n?{}:n,o=r.snapToCursor,i=void 0!==o&&o,a=r.cursorProgress;i&&this.snapToCursor(t);var u=this.props.transformPagePoint;this.panSession=new lo(t,{onSessionStart:function(){e.stopMotion()},onStart:function(t,n){var r,o,i=e.props,u=i.drag,s=i.dragPropagation;if(!u||s||(e.openGlobalLock&&e.openGlobalLock(),e.openGlobalLock=qr(u),e.openGlobalLock)){e.prepareBoundingBox(),e.visualElement.lockTargetBox(),e.resolveDragConstraints();var c=ro(t).point;Ue((function(t){var n=e.visualElement.targetBox[t],r=n.min,o=n.max;e.cursorProgress[t]=a?a[t]:st(r,o,c[t]);var i=e.getAxisMotionValue(t);i&&(e.originPoint[t]=i.get())})),e.isDragging=!0,e.currentDirection=null,null===(o=(r=e.props).onDragStart)||void 0===o||o.call(r,t,n)}},onMove:function(t,n){var r,o,i,a,u=e.props,s=u.dragPropagation,c=u.dragDirectionLock;if(s||e.openGlobalLock){var f=n.offset;if(c&&null===e.currentDirection)return e.currentDirection=function(t,n){void 0===n&&(n=10);var e=null;Math.abs(t.y)>n?e="y":Math.abs(t.x)>n&&(e="x");return e}(f),void(null!==e.currentDirection&&(null===(o=(r=e.props).onDirectionLock)||void 0===o||o.call(r,e.currentDirection)));e.updateAxis("x",t,f),e.updateAxis("y",t,f),null===(a=(i=e.props).onDrag)||void 0===a||a.call(i,t,n),wo=t}},onEnd:function(t,n){return e.stop(t,n)}},{transformPagePoint:u})},t.prototype.prepareBoundingBox=function(){var t=this.visualElement.getInstance(),n=t.style.transform;this.visualElement.resetTransform(),this.visualElement.measureLayout(),t.style.transform=n,this.visualElement.rebaseTargetBox(!0,this.visualElement.getBoundingBoxWithoutTransforms())},t.prototype.resolveDragConstraints=function(){var t,n,e,r,o,i,a=this,u=this.props.dragConstraints;this.constraints=!!u&&(f(u)?this.resolveRefConstraints(this.visualElement.box,u):(t=this.visualElement.box,e=(n=u).top,r=n.left,o=n.bottom,i=n.right,{x:bo(t.x,r,i),y:bo(t.y,e,o)})),this.constraints&&!this.hasMutatedConstraints&&Ue((function(t){var n,e,r;a.getAxisMotionValue(t)&&(a.constraints[t]=(n=a.visualElement.box[t],e=a.constraints[t],r={},void 0!==e.min&&(r.min=e.min-n.min),void 0!==e.max&&(r.max=e.max-n.min),r))}))},t.prototype.resolveRefConstraints=function(t,n){var e=this.props,r=e.onMeasureDragConstraints,o=e.transformPagePoint,i=n.current;this.constraintsBox=Ie(i,o);var a=function(t,n){return{x:Eo(t.x,n.x),y:Eo(t.y,n.y)}}(t,this.constraintsBox);if(r){var u=r(function(t){var n=t.x,e=t.y;return{top:e.min,bottom:e.max,left:n.min,right:n.max}}(a));this.hasMutatedConstraints=!!u,u&&(a=Qn(u))}return a},t.prototype.cancelDrag=function(){this.isDragging=!1,this.panSession&&this.panSession.end(),this.panSession=null,!this.props.dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null)},t.prototype.stop=function(t,n){var e;this.visualElement.unlockTargetBox(),null===(e=this.panSession)||void 0===e||e.end(),this.panSession=null;var r=this.isDragging;if(this.cancelDrag(),r){var o=this.props,i=o.dragMomentum,a=o.dragElastic,u=o.onDragEnd;if(i||a){var s=n.velocity;this.animateDragEnd(s)}null==u||u(t,n)}},t.prototype.snapToCursor=function(t){var n=this;this.prepareBoundingBox(),Ue((function(e){var r=n.getAxisMotionValue(e);if(r){var o=ro(t).point,i=n.visualElement.box,a=i[e].max-i[e].min,u=i[e].min+a/2,s=o[e]-u;n.originPoint[e]=o[e],r.set(s)}else n.cursorProgress[e]=.5,n.updateVisualElementAxis(e,t)}))},t.prototype.updateAxis=function(t,n,e){if(So(t,this.props.drag,this.currentDirection))return this.getAxisMotionValue(t)?this.updateAxisMotionValue(t,e):this.updateVisualElementAxis(t,n)},t.prototype.updateAxisMotionValue=function(t,n){var e=this.getAxisMotionValue(t);if(n&&e){var r=this.props.dragElastic,o=this.originPoint[t]+n[t],i=this.constraints?xo(o,this.constraints[t],r):o;e.set(i)}},t.prototype.updateVisualElementAxis=function(t,n){var e,r=this.props.dragElastic,o=this.visualElement.box[t],i=o.max-o.min,a=this.cursorProgress[t],u=function(t,n,e,r,o){var i=t-n*e;return r?xo(i,r,o):i}(ro(n).point[t],i,a,null===(e=this.constraints)||void 0===e?void 0:e[t],r);this.visualElement.setAxisTarget(t,u,u+i)},t.prototype.updateProps=function(t){var n=t.drag,e=void 0!==n&&n,r=t.dragDirectionLock,o=void 0!==r&&r,i=t.dragPropagation,s=void 0!==i&&i,c=t.dragConstraints,f=void 0!==c&&c,l=t.dragElastic,d=void 0===l?.35:l,p=t.dragMomentum,v=void 0===p||p,h=u(t,["drag","dragDirectionLock","dragPropagation","dragConstraints","dragElastic","dragMomentum"]);this.props=a({drag:e,dragDirectionLock:o,dragPropagation:s,dragConstraints:f,dragElastic:d,dragMomentum:v},h)},t.prototype.getAxisMotionValue=function(t){var n=this.props,e=n.layout,r=n.layoutId,o="_drag"+t.toUpperCase();return this.props[o]?this.props[o]:e||void 0!==r?void 0:this.visualElement.getValue(t,0)},t.prototype.animateDragEnd=function(t){var n=this,e=this.props,r=e.drag,o=e.dragMomentum,i=e.dragElastic,u=e.dragTransition,s=Ue((function(e){if(So(e,r,n.currentDirection)){var s=n.constraints?n.constraints[e]:{},c=i?200:1e6,f=i?40:1e7,l=a(a({type:"inertia",velocity:o?t[e]:0,bounceStiffness:c,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10},u),s);return n.getAxisMotionValue(e)?n.startAxisValueAnimation(e,l):n.visualElement.startLayoutAxisAnimation(e,l)}}));return Promise.all(s).then((function(){var t,e;null===(e=(t=n.props).onDragTransitionEnd)||void 0===e||e.call(t)}))},t.prototype.stopMotion=function(){var t=this;Ue((function(n){var e=t.getAxisMotionValue(n);e?e.stop():t.visualElement.stopLayoutAnimation()}))},t.prototype.startAxisValueAnimation=function(t,n){var e=this.getAxisMotionValue(t);if(e){var r=e.get();return e.set(r),e.set(r),Cn(t,e,0,n)}},t.prototype.scalePoint=function(){var t=this,n=this.props,e=n.drag,r=n.dragConstraints;if(f(r)&&this.constraintsBox){this.stopMotion();var o={x:0,y:0};Ue((function(n){o[n]=Oe(t.visualElement.targetBox[n],t.constraintsBox[n])})),this.prepareBoundingBox(),this.resolveDragConstraints(),Ue((function(n){if(So(n,e,null)){var r=function(t,n,e){var r=t.max-t.min,o=ct(n.min,n.max-r,e);return{min:o,max:o+r}}(t.visualElement.targetBox[n],t.constraintsBox[n],o[n]),i=r.min,a=r.max;t.visualElement.setAxisTarget(n,i,a)}}))}},t.prototype.mount=function(t){var n=this,e=co(t.getInstance(),"pointerdown",(function(t){var e=n.props,r=e.drag,o=e.dragListener;r&&(void 0===o||o)&&n.start(t)})),r=Zr(window,"resize",(function(){n.scalePoint()})),o=t.onLayoutUpdate((function(){n.isDragging&&n.resolveDragConstraints()})),i=t.prevSnapshot;return(null==i?void 0:i.isDragging)&&this.start(wo,{cursorProgress:i.cursorProgress}),function(){null==e||e(),null==r||r(),null==o||o(),n.cancelDrag()}},t}();function So(t,n,e){return!(!0!==n&&n!==t||null!==e&&e!==t)}var Po=function(t){return function(n){return t(n),null}},Mo=Po((function(t){var e=t.visualElement;return function(t,e){var r=t.dragControls,o=n.useContext(Tr).transformPagePoint,i=tr((function(){return new Ao({visualElement:e})}));i.updateProps(a(a({},t),{transformPagePoint:o})),n.useEffect((function(){return r&&r.subscribe(i)}),[i]),n.useEffect((function(){return i.mount(e)}),[])}(u(t,["visualElement"]),e)})),To={key:"drag",shouldRender:function(t){return!!t.drag||!!t.dragControls},getComponent:function(){return Mo}};function Vo(t){return n.useEffect((function(){return function(){return t()}}),[])}function Lo(t,e){var r=t.onPan,o=t.onPanStart,i=t.onPanEnd,a=t.onPanSessionStart,u=r||o||i||a,s=n.useRef(null),c=n.useContext(Tr).transformPagePoint,f={onSessionStart:a,onStart:o,onMove:r,onEnd:function(t,n){s.current=null,i&&i(t,n)}};n.useEffect((function(){null!==s.current&&s.current.updateHandlers(f)})),fo(e,"pointerdown",u&&function(t){s.current=new lo(t,f,{transformPagePoint:c})}),Vo((function(){return s.current&&s.current.end()}))}var Bo=function(t,n){return!!n&&(t===n||Bo(t,n.parentElement))},ko=["whileHover","whileTap","whileDrag"],Ro=function(t){return ko.indexOf(t)+1},Oo=Ro("whileTap");function Do(t,e){var r=t.onTap,o=t.onTapStart,i=t.onTapCancel,a=t.whileTap,u=r||o||i||a,s=n.useRef(!1),c=n.useRef(null);function f(){var t;null===(t=c.current)||void 0===t||t.call(c),c.current=null}a&&_n(e,a,Oo);var l=n.useRef(null);l.current=function(t,n){var o=e.getInstance();if(f(),s.current&&o){s.current=!1,a&&Zn(e,Oo);var u=qr(!0);u&&(u(),Bo(o,t.target)?null==r||r(t,n):null==i||i(t,n))}},fo(e,"pointerdown",u?function(t,n){f(),c.current=mt(co(window,"pointerup",(function(t,n){var e;return null===(e=l.current)||void 0===e?void 0:e.call(l,t,n)})),co(window,"pointercancel",(function(t,n){var e;return null===(e=l.current)||void 0===e?void 0:e.call(l,t,n)}))),e.getInstance()&&!s.current&&(s.current=!0,null==o||o(t,n),a&&qn(e,Oo))}:void 0),Vo(f)}var Fo=Ro("whileHover"),Uo=function(t){return function(n,e){Kr(n)&&t(n,e)}};function Io(t,n){Lo(t,n),Do(t,n),function(t,n){var e=t.whileHover,r=t.onHoverStart,o=t.onHoverEnd;e&&_n(n,e,Fo),fo(n,"pointerenter",Uo((function(t,o){null==r||r(t,o),e&&qn(n,Fo)}))),fo(n,"pointerleave",Uo((function(t,r){null==o||o(t,r),e&&Zn(n,Fo)})))}(t,n)}var jo=["onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","whileTap","whileHover","onHoverStart","onHoverEnd"],Ho=Po((function(t){var n=t.visualElement;Io(u(t,["visualElement"]),n)})),Xo={key:"gestures",shouldRender:function(t){return jo.some((function(n){return t.hasOwnProperty(n)}))},getComponent:function(){return Ho}},Yo=function(){function t(){this.hasMounted=!1,this.pendingAnimations=[],this.subscribers=new Set}return t.prototype.subscribe=function(t){var n=this;return this.subscribers.add(t),function(){return n.subscribers.delete(t)}},t.prototype.start=function(t,n){var e=this;if(this.hasMounted){var r=[];return this.subscribers.forEach((function(e){var o=Wn(e,t,{transitionOverride:n});r.push(o)})),Promise.all(r)}return new Promise((function(r){e.pendingAnimations.push({animation:[t,n],resolve:r})}))},t.prototype.set=function(t){return this.hasMounted,this.subscribers.forEach((function(n){Hn(n,t)}))},t.prototype.stop=function(){this.subscribers.forEach((function(t){!function(t){t.forEachValue((function(t){return t.stop()}))}(t)}))},t.prototype.mount=function(){var t=this;this.hasMounted=!0,this.pendingAnimations.forEach((function(n){var e=n.animation,r=n.resolve;t.start.apply(t,c(e)).then(r)}))},t.prototype.unmount=function(){this.hasMounted=!1,this.stop()},t}(),zo=Po((function(t){var e=t.animate,r=t.exit,o=t.visualElement,i=s(Fr(),2),a=i[0],u=i[1],c=n.useContext(pr),f=n.useRef(!1),l=void 0!==(null==c?void 0:c.custom)?c.custom:t.custom;n.useEffect((function(){a?!f.current||!e||"boolean"==typeof e||e instanceof Yo||Wn(o,e):(!f.current&&r&&Wn(o,r,{custom:l}).then(u),f.current=!0),a&&(f.current=!1)}),[e,l,r,a,u,t])})),Wo={key:"exit",shouldRender:function(t){return!!t.exit&&!Vr(t)},getComponent:function(){return zo}};function No(t,n){void 0===n&&(n=!1);t.transition;var e=t.transitionEnd,r=u(t,["transition","transitionEnd"]);return n?a(a({},r),e):r}var Go=function(t){var n,e=t instanceof sn?t.get():t;return Array.from(new Set((n=e)?Array.isArray(n)?n:[n]:[]))};var _o={shouldRender:function(t){return void 0!==t.animate&&!Dn(t.animate)&&!zr(t.animate)},Component:Po((function(t){var e=t.animate;return function(t,e,r){var o=n.useRef(!0),i=n.useRef(null);i.current||(i.current=No(e,!0)),n.useEffect((function(){var n,u,s={},c=No(e),f=No(e,!0);for(var l in c){var d=o.current&&(!t.hasValue(l)||t.getValue(l).get()!==f[l]),p=null!==f[l],v=(n=i.current[l],void 0!==(u=f[l])&&(Array.isArray(n)&&Array.isArray(u)?!function(t,n){if(null===n)return!1;var e=n.length;if(e!==t.length)return!1;for(var r=0;r<e;r++)if(n[r]!==t[r])return!1;return!0}(u,n):n!==u));p&&(v||d)&&(s[l]=c[l])}o.current=!1,i.current=a(a({},i.current),f),Object.keys(s).length&&Wn(t,a(a({},s),{transition:e.transition||r,transitionEnd:e.transitionEnd}))}),[e])}(t.visualElement,e,t.transition)}))},qo={shouldRender:function(t){return t.variants&&!zr(t.animate)||Dn(t.animate)},Component:Po((function(t){var e=t.animate,r=t.inherit,o=void 0===r||r;return function(t,e,r,o){var i,a=Go(r),u=hr(),s=null===(i=u.parent)||void 0===i?void 0:i.isMounted,c=n.useRef(!1);n.useEffect((function(){var n,r,i=!1;o?(i=!!s,a=Go(u.animate)):i=c.current||(n=Go(e),r=a,n.join(",")!==r.join(",")),i&&Wn(t,a),c.current=!0}),[a.join(",")])}(t.visualElement,t.initial,e,o)}))},Zo={shouldRender:function(t){return zr(t.animate)},Component:Po((function(t){var e=t.animate;return function(t,e){var r=n.useMemo((function(){return e.subscribe(t)}),[e]);Vo((function(){return null==r?void 0:r()}))}(t.visualElement,e)}))},$o={key:"animation",shouldRender:function(){return!0},getComponent:function(t){return _o.shouldRender(t)?_o.Component:qo.shouldRender(t)?qo.Component:Zo.shouldRender(t)?Zo.Component:void 0}};var Ko=function(n){function e(){var e=null!==n&&n.apply(this,arguments)||this;return e.frameTarget={x:{min:0,max:0},y:{min:0,max:0}},e.stopAxisAnimation={x:void 0,y:void 0},e.animate=function(n,r,o){void 0===o&&(o={});var i=o.originBox,a=o.targetBox,s=o.visibilityAction,c=o.shouldStackAnimate,f=u(o,["originBox","targetBox","visibilityAction","shouldStackAnimate"]),l=e.props,d=l.visualElement,p=l.layout;if(!1===c)return e.safeToRemove();var v=Qo(r=i||r,n=a||n),h=Ue((function(o){if("position"===p){var i=n[o].max-n[o].min;r[o].max=r[o].min+i}if(!d.isTargetBoxLocked)return void 0===s?v?e.animateAxis(o,n[o],r[o],f):d.setAxisTarget(o,n[o].min,n[o].max):void(s===t.VisibilityAction.Hide?d.hide():d.show())}));return d.render(),Promise.all(h).then((function(){var t,n;null===(n=(t=e.props).onLayoutAnimationComplete)||void 0===n||n.call(t),d.isPresent?d.presence=Ar.Present:e.safeToRemove()}))},e}return i(e,n),e.prototype.componentDidMount=function(){var t=this,n=this.props.visualElement;n.animateMotionValue=Cn,n.enableLayoutProjection(),this.unsubLayoutReady=n.onLayoutUpdate(this.animate),n.updateConfig(a(a({},n.config),{safeToRemove:function(){return t.safeToRemove()}}))},e.prototype.componentWillUnmount=function(){var t=this;this.unsubLayoutReady(),Ue((function(n){var e,r;return null===(r=(e=t.stopAxisAnimation)[n])||void 0===r?void 0:r.call(e)}))},e.prototype.animateAxis=function(t,n,e,r){var o,i,a=void 0===r?{}:r,u=a.transition,s=a.crossfadeOpacity;null===(i=(o=this.stopAxisAnimation)[t])||void 0===i||i.call(o);var c,f=this.props.visualElement,l=this.frameTarget[t],d=f.axisProgress[t];d.clearListeners(),d.set(0),d.set(0),s&&(c=this.createCrossfadeAnimation(s),f.show());var p=function(){var r=d.get()/1e3;!function(t,n,e,r){t.min=ct(n.min,e.min,r),t.max=ct(n.max,e.max,r)}(l,e,n,r),f.setAxisTarget(t,l.min,l.max),null==c||c(r)};p(),f.updateLayoutDelta();var v=d.onChange(p),h=Cn("x"===t?"layoutX":"layoutY",d,1e3,u||this.props.transition||ni).then(v);return this.stopAxisAnimation[t]=function(){d.stop(),v()},h},e.prototype.createCrossfadeAnimation=function(t){var n=this.props.visualElement.getValue("opacity",0);return function(e){n.set(ri(ct(0,1,e))),t.set(oi(ct(1,0,e)))}},e.prototype.safeToRemove=function(){var t,n;null===(n=(t=this.props).safeToRemove)||void 0===n||n.call(t)},e.prototype.render=function(){return null},e}(n.Component);function Jo(t){var e=s(Fr(),2)[1];return n.createElement(Ko,a({},t,{safeToRemove:e}))}function Qo(t,n){return ti(t.x,n.x)||ti(t.y,n.y)}function ti(t,n){return t.min!==n.min||t.max!==n.max}var ni={duration:.45,ease:[.4,0,.1,1]};function ei(t,n,e){return function(r){return r<t?0:r>n?1:e(st(t,n,r))}}var ri=ei(0,.5,Ot),oi=ei(.5,.95,Vt),ii={key:"animate-layout",shouldRender:function(t){return!!t.layout||!!t.layoutId},getComponent:function(){return Jo}},ai=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i(n,t),n.prototype.componentDidMount=function(){var t=this.props,n=t.syncLayout,e=t.visualElement;Rr(n)&&n.register(e)},n.prototype.getSnapshotBeforeUpdate=function(){var t=this.props,n=t.syncLayout,e=t.visualElement;return Rr(n)?n.syncUpdate():(e.snapshotBoundingBox(),n.add(e)),null},n.prototype.componentDidUpdate=function(){var t=this.props,n=t.syncLayout,e=t.visualElement;Rr(n)||n.flush(),e.rebaseTargetBox()},n.prototype.render=function(){return null},n}(r.default.Component);function ui(t){var e=n.useContext(Or);return r.default.createElement(ai,a({},t,{syncLayout:e}))}var si={key:"measure-layout",shouldRender:function(t){return!!t.drag||!!t.layout||!!t.layoutId},getComponent:function(){return ui}},ci=[si,$o,To,Xo,Wo,ii],fi={useVisualElement:function(t,e,r,o){var i=mr(),u=tr((function(){return new(dr(t)?fr:Je)(i,o)}));u.updateConfig(a(a(a({},u.config),{enableHardwareAcceleration:!r}),e)),u.layoutId=e.layoutId;var s=n.useContext(pr),c=null===s||s.isPresent;u.isPresent=void 0!==e.isPresent?e.isPresent:c;var f=null==s?void 0:s.id;return u.isPresenceRoot=!i||i.presenceId!==f,n.useEffect((function(){if(e.onViewportBoxUpdate)return u.onViewportBoxUpdate(e.onViewportBoxUpdate)}),[e.onViewportBoxUpdate]),u},render:function(t,e,r){var o="string"==typeof t?function(t){var n={};for(var e in t)xr(e)&&(n[e]=t[e]);return n}(e):e;r.clean(),r.build();var i=dr(t)?function(t){return a(a({},t.attrs),{style:a({},t.reactStyle)})}(r):function(t,n){var e=n.drag,r={style:a(a(a({},t.reactStyle),t.style),t.vars)};return e&&(r.draggable=!1,r.style.userSelect="none",r.style.touchAction=!0===e?"none":"pan-"+("x"===e?"y":"x")),r}(r,e);return n.createElement(t,a(a(a({},o),{ref:r.ref}),i))}};function li(t){var n=a(a({},fi),{defaultFeatures:t});var e=new Map;return new Proxy({custom:function(t){return Wr(t,n)}},{get:function(t,r){return"custom"===r?t.custom:(e.has(r)||e.set(r,Wr(r,n)),e.get(r))}})}var di=li(ci);var pi=li([si]);var vi=0;function hi(){var t=vi;return vi++,t}var mi=function(t){var e=t.children,r=t.initial,o=t.isPresent,i=t.onExitComplete,a=t.custom,u=t.presenceAffectsLayout,s=tr(yi),c=tr(hi),f=n.useMemo((function(){return{id:c,initial:r,isPresent:o,custom:a,onExitComplete:function(t){s.set(t,!0);var n=!0;s.forEach((function(t){t||(n=!1)})),n&&(null==i||i())},register:function(t){return s.set(t,!1),function(){return s.delete(t)}}}}),u?void 0:[o]);return n.useMemo((function(){s.forEach((function(t,n){return s.set(n,!1)}))}),[o]),n.createElement(pr.Provider,{value:f},e)};function yi(){return new Map}function gi(t){return t.key||""}function xi(n,e){return e&&n!==e.lead?{visibilityAction:t.VisibilityAction.Hide}:e&&n.presence!==Ar.Entering&&n===e.lead&&e.lead!==e.prevLead?{visibilityAction:t.VisibilityAction.Show}:(n.presence===Ar.Entering?r=null==e?void 0:e.getFollowOrigin():n.presence===Ar.Exiting&&(o=null==e?void 0:e.getFollowTarget()),{originBox:r,targetBox:o});var r,o}function bi(n,e){var r,o,i,a={},u=e&&e.lead,s=null==u?void 0:u.presence;return e&&n===u?n.presence===Ar.Entering?a.originBox=e.getFollowOrigin():n.presence===Ar.Exiting&&(a.targetBox=e.getFollowTarget()):e&&n===e.follow&&(a.transition=e.getLeadTransition(),s===Ar.Entering?a.targetBox=e.getLeadTarget():s===Ar.Exiting&&(a.originBox=e.getLeadOrigin())),(null===(r=null==e?void 0:e.follow)||void 0===r?void 0:r.isPresenceRoot)||(null==u?void 0:u.isPresenceRoot)?(e&&n!==u?e&&n===e.follow?u&&s!==Ar.Entering&&s===Ar.Exiting&&(a.crossfadeOpacity=null===(i=null==e?void 0:e.lead)||void 0===i?void 0:i.getValue("opacity",1)):a.visibilityAction=t.VisibilityAction.Hide:n.presence===Ar.Entering&&(a.crossfadeOpacity=null===(o=null==e?void 0:e.follow)||void 0===o?void 0:o.getValue("opacity",0)),a):a}var Ei=function(){function t(){this.order=[],this.hasChildren=!1}return t.prototype.add=function(t){var n;if(this.order.push(t),this.snapshot){t.prevSnapshot=this.snapshot,t.prevViewportBox=this.snapshot.boundingBox;var e=this.snapshot.latestMotionValues;for(var r in e)t.hasValue(r)?null===(n=t.getValue(r))||void 0===n||n.set(e[r]):t.addValue(r,cn(e[r]))}this.hasChildren=!0},t.prototype.remove=function(t){var n=this.order.findIndex((function(n){return t===n}));-1!==n&&this.order.splice(n,1)},t.prototype.updateLeadAndFollow=function(){this.prevLead=this.lead,this.prevFollow=this.follow;var t=s(function(t,n){for(var e=s(n,2),r=e[0],o=e[1],i=void 0,a=0,u=void 0,c=t.length,f=!1,l=c-1;l>=0;l--){var d=t[l];if(l===c-1&&(f=d.isPresent),f)i=d;else{var p=t[l-1];p&&p.isPresent&&(i=d)}if(i){a=l;break}}if(i||(i=t[0]),u=t[a-1],i)for(l=a-1;l>=0;l--){if((d=t[l]).isPresent){u=d;break}}return i!==r&&!f&&u===o&&t.find((function(t){return t===r}))&&(i=r),[i,u]}(this.order,[this.lead,this.follow]),2),n=t[0],e=t[1];this.lead=n,this.follow=e},t.prototype.updateSnapshot=function(){if(this.lead){var t={boundingBox:this.lead.prevViewportBox,latestMotionValues:{}};this.lead.forEachValue((function(n,e){var r=n.get();se(r)||(t.latestMotionValues[e]=r)}));var n=Co.get(this.lead);n&&n.isDragging&&(t.isDragging=!0,t.cursorProgress=n.cursorProgress),this.snapshot=t}},t.prototype.isLeadPresent=function(){var t;return this.lead&&(null===(t=this.lead)||void 0===t?void 0:t.presence)!==Ar.Exiting},t.prototype.getFollowOrigin=function(){var t;return this.follow?this.follow.prevViewportBox:null===(t=this.snapshot)||void 0===t?void 0:t.boundingBox},t.prototype.getFollowTarget=function(){var t;return null===(t=this.follow)||void 0===t?void 0:t.box},t.prototype.getLeadOrigin=function(){var t;return null===(t=this.lead)||void 0===t?void 0:t.prevViewportBox},t.prototype.getLeadTarget=function(){var t;return null===(t=this.lead)||void 0===t?void 0:t.box},t.prototype.getLeadTransition=function(){var t;return null===(t=this.lead)||void 0===t?void 0:t.config.transition},t}(),wi=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.children=new Set,n.stacks=new Map,n.hasMounted=!1,n.updateScheduled=!1,n.renderScheduled=!1,n.syncContext=a(a({},kr()),{syncUpdate:function(t){return n.scheduleUpdate(t)},forceUpdate:function(){n.syncContext=a({},n.syncContext),n.scheduleUpdate(!0)},register:function(t){return n.addChild(t)},remove:function(t){return n.removeChild(t)}}),n}return i(e,t),e.prototype.componentDidMount=function(){this.hasMounted=!0,this.updateStacks()},e.prototype.componentDidUpdate=function(){this.startLayoutAnimation()},e.prototype.shouldComponentUpdate=function(){return this.renderScheduled=!0,!0},e.prototype.startLayoutAnimation=function(){var t=this;this.renderScheduled=this.updateScheduled=!1;var n=this.props.type;this.children.forEach((function(t){t.isPresent?t.presence!==Ar.Entering&&(t.presence=t.presence===Ar.Exiting?Ar.Entering:Ar.Present):t.presence=Ar.Exiting})),this.updateStacks();var e="crossfade"===n?bi:xi,r={measureLayout:function(t){return t.measureLayout()},layoutReady:function(n){var r=n.layoutId;n.layoutReady(e(n,t.getStack(r)))}};this.children.forEach((function(n){return t.syncContext.add(n)})),this.syncContext.flush(r),this.stacks.forEach((function(t){return t.snapshot=void 0}))},e.prototype.updateStacks=function(){this.stacks.forEach((function(t){return t.updateLeadAndFollow()}))},e.prototype.scheduleUpdate=function(t){void 0===t&&(t=!1),!t&&this.updateScheduled||(this.updateScheduled=!0,this.children.forEach((function(t){return t.snapshotBoundingBox()})),this.stacks.forEach((function(t){return t.updateSnapshot()})),!t&&this.renderScheduled||(this.renderScheduled=!0,this.forceUpdate()))},e.prototype.addChild=function(t){this.children.add(t),this.addToStack(t),t.presence=this.hasMounted?Ar.Entering:Ar.Present},e.prototype.removeChild=function(t){this.scheduleUpdate(),this.children.delete(t),this.removeFromStack(t)},e.prototype.addToStack=function(t){var n=this.getStack(t.layoutId);null==n||n.add(t)},e.prototype.removeFromStack=function(t){var n=this.getStack(t.layoutId);null==n||n.remove(t)},e.prototype.getStack=function(t){if(void 0!==t)return!this.stacks.has(t)&&this.stacks.set(t,new Ei),this.stacks.get(t)},e.prototype.render=function(){return n.createElement(Or.Provider,{value:this.syncContext},this.props.children)},e}(n.Component);function Ci(t){return tr((function(){return cn(t)}))}function Ai(t,e){n.useEffect((function(){return Er(t)?t.onChange(e):void 0}))}function Si(t,e){var r=Ci(e()),o=function(){return r.set(e())};return o(),function(t,e){n.useEffect((function(){var n=t.map((function(t){return t.onChange(e)}));return function(){return n.forEach((function(t){return t()}))}}))}(t,(function(){return E.update(o,!1,!0)})),r}var Pi=function(t){return function(t){return"object"==typeof t&&t.mix}(t)?t.mix:void 0};function Mi(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var e=!Array.isArray(t[0]),r=e?0:-1,o=t[0+r],i=t[1+r],u=t[2+r],s=t[3+r],c=At(i,u,a({mixer:Pi(u[0])},s));return e?c(o):c}function Ti(t,n,e,r){var o="function"==typeof n?n:Mi(n,e,r);return Array.isArray(t)?Vi(t,o):Vi([t],(function(t){var n=s(t,1)[0];return o(n)}))}function Vi(t,n){var e=tr((function(){return[]}));return Si(t,(function(){e.length=0;for(var r=t.length,o=0;o<r;o++)e[o]=t[o].get();return n(e)}))}var Li=function(t){return t>.001?1/t:1e5};function Bi(){return{scrollX:cn(0),scrollY:cn(0),scrollXProgress:cn(0),scrollYProgress:cn(0)}}function ki(t,n,e){e.set(t&&n?t/n:0)}function Ri(t,n){var e=function(){var e=n(),r=e.xOffset,o=e.yOffset,i=e.xMaxOffset,a=e.yMaxOffset;t.scrollX.set(r),t.scrollY.set(o),ki(r,i,t.scrollXProgress),ki(o,a,t.scrollYProgress)};return e(),e}var Oi=Bi();function Di(){return{xOffset:window.pageXOffset,yOffset:window.pageYOffset,xMaxOffset:document.body.clientWidth-window.innerWidth,yMaxOffset:document.body.clientHeight-window.innerHeight}}var Fi=!1;var Ui=cn(null);if("undefined"!=typeof window)if(window.matchMedia){var Ii=window.matchMedia("(prefers-reduced-motion)"),ji=function(){return Ui.set(Ii.matches)};Ii.addListener(ji),ji()}else Ui.set(!1);var Hi=function(){function t(){this.componentControls=new Set}return t.prototype.subscribe=function(t){var n=this;return this.componentControls.add(t),function(){return n.componentControls.delete(t)}},t.prototype.start=function(t,n){this.componentControls.forEach((function(e){e.start(t.nativeEvent||t,n)}))},t.prototype.updateConstraints=function(){this.componentControls.forEach((function(t){t.prepareBoundingBox(),t.resolveDragConstraints()}))},t}(),Xi=function(){return new Hi};var Yi=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.initialState={},n}return i(n,t),n.prototype.updateLayoutDelta=function(){},n.prototype.build=function(){},n.prototype.clean=function(){},n.prototype.makeTargetAnimatable=function(t){var n=t.transition,e=t.transitionEnd,r=u(t,["transition","transitionEnd"]);return Xn(this,r,zn(r,n||{},this)),a({transition:n,transitionEnd:e},r)},n.prototype.getBoundingBox=function(){return{x:{min:0,max:0},y:{min:0,max:0}}},n.prototype.readNativeValue=function(t){return this.initialState[t]||0},n.prototype.render=function(){this.build()},n}(Kn);t.AnimateLayoutFeature=ii,t.AnimatePresence=function(t){var e=t.children,r=t.custom,o=t.initial,i=void 0===o||o,a=t.onExitComplete,u=t.exitBeforeEnter,f=t.presenceAffectsLayout,l=void 0===f||f,d=function(){var t=n.useRef(!1),e=s(n.useState(0),2),r=e[0],o=e[1];return Vo((function(){return t.current=!0})),n.useCallback((function(){!t.current&&o(r+1)}),[r])}(),p=n.useContext(Or);Rr(p)&&(d=p.forceUpdate);var v=n.useRef(!0),h=function(t){var e=[];return n.Children.forEach(t,(function(t){n.isValidElement(t)&&e.push(t)})),e}(e),m=n.useRef(h),y=n.useRef(new Map).current,g=n.useRef(new Set).current;if(function(t,n){t.forEach((function(t){var e=gi(t);n.set(e,t)}))}(h,y),v.current)return v.current=!1,n.createElement(n.Fragment,null,h.map((function(t){return n.createElement(mi,{key:gi(t),isPresent:!0,initial:!!i&&void 0,presenceAffectsLayout:l},t)})));for(var x=c(h),b=m.current.map(gi),E=h.map(gi),w=b.length,C=0;C<w;C++){var A=b[C];-1===E.indexOf(A)?g.add(A):g.delete(A)}return u&&g.size&&(x=[]),g.forEach((function(t){if(-1===E.indexOf(t)){var e=y.get(t);if(e){var o=b.indexOf(t);x.splice(o,0,n.createElement(mi,{key:gi(e),isPresent:!1,onExitComplete:function(){y.delete(t),g.delete(t);var n=m.current.findIndex((function(n){return n.key===t}));m.current.splice(n,1),g.size||(m.current=h,d(),a&&a())},custom:r,presenceAffectsLayout:l},e))}}})),x=x.map((function(t){var e=t.key;return g.has(e)?t:n.createElement(mi,{key:gi(t),isPresent:!0,presenceAffectsLayout:l},t)})),m.current=x,n.createElement(n.Fragment,null,g.size?x:x.map((function(t){return n.cloneElement(t)})))},t.AnimateSharedLayout=wi,t.AnimationControls=Yo,t.AnimationFeature=$o,t.DragControls=Hi,t.DragFeature=To,t.ExitFeature=Wo,t.GesturesFeature=Xo,t.HTMLVisualElement=Je,t.MotionConfig=function(t){var e=t.children,r=t.features,o=void 0===r?[]:r,i=u(t,["children","features"]),a=c(n.useContext(Tr).features,o),s=n.useMemo((function(){return{features:a}}),[a.length]);for(var f in i)s[f]=i[f];return n.createElement(Tr.Provider,{value:s},e)},t.MotionConfigContext=Tr,t.MotionValue=sn,t.PresenceContext=pr,t.SharedLayoutContext=Or,t.addScaleCorrection=function(t){for(var n in t)be[n]=t[n]},t.animate=function(t,n,e){void 0===e&&(e={});var r=Er(t)?t:cn(t);return Cn("",r,n,e),{stop:function(){return r.stop()}}},t.animationControls=function(){return new Yo},t.createBatcher=kr,t.createDomMotionComponent=function(t){return Wr(t,a(a({},fi),{defaultFeatures:ci}))},t.createMotionComponent=Wr,t.isValidMotionProp=gr,t.m=pi,t.motion=di,t.motionValue=cn,t.resolveMotionValue=function(t){var n,e=t instanceof sn?t.get():t;return n=e,Boolean(n&&"object"==typeof n&&n.mix&&n.toValue)?e.toValue():e},t.startAnimation=Cn,t.startVisualElementAnimation=Wn,t.transform=Mi,t.useAnimatedState=function(t){var e=s(n.useState(t),2),r=e[0],o=e[1],i=tr((function(){return new Yi}));return i.updateConfig({onUpdate:function(t){return o(a({},t))}}),i.initialState=t,n.useEffect((function(){return i.mount({}),function(){return i.unmount()}}),[]),[r,tr((function(){return function(t){return Wn(i,t)}}))]},t.useAnimation=function(){var t=tr((function(){return new Yo}));return n.useEffect((function(){return t.mount(),function(){return t.unmount()}}),[]),t},t.useCycle=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=n.useRef(0),o=s(n.useState(t[r.current]),2),i=o[0],a=o[1];return[i,function(n){r.current="number"!=typeof n?Qt(0,t.length,r.current+1):n,a(t[r.current])}]},t.useDomEvent=$r,t.useDragControls=function(){return tr(Xi)},t.useElementScroll=function(t){var n=tr(Bi);return Dr((function(){var e=t.current;if(e){var r=Ri(n,function(t){return function(){return{xOffset:t.scrollLeft,yOffset:t.scrollTop,xMaxOffset:t.scrollWidth-t.offsetWidth,yMaxOffset:t.scrollHeight-t.offsetHeight}}}(e)),o=Zr(e,"scroll",r,{passive:!0}),i=Zr(e,"resize",r);return function(){o&&o(),i&&i()}}}),[]),n},t.useExternalRef=function(t){var e=t&&"function"!=typeof t?t:n.useRef(null);return t&&"function"==typeof t&&n.useEffect((function(){return t(e.current),function(){return t(null)}}),[]),e},t.useGestures=Io,t.useInvertedScale=function(t){var n=Ci(1),e=Ci(1),r=mr();return t?(n=t.scaleX||n,e=t.scaleY||e):r&&(n=r.getValue("scaleX",1),e=r.getValue("scaleY",1)),{scaleX:Ti(n,Li),scaleY:Ti(e,Li)}},t.useIsPresent=function(){return Ur(n.useContext(pr))},t.useMotionTemplate=function(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];var r=t.length;function o(){for(var e="",o=0;o<r;o++){e+=t[o],n[o]&&(e+=n[o].get())}return e}return Si(n,o)},t.useMotionValue=Ci,t.usePanGesture=Lo,t.usePresence=Fr,t.useReducedMotion=function(){var t=s(n.useState(Ui.get()),2),e=t[0],r=t[1];return Ai(Ui,r),e},t.useSpring=function(t,e){void 0===e&&(e={});var r=n.useRef(null),o=Ci(Er(t)?t.get():t);return n.useMemo((function(){return o.attach((function(t,n){return r.current&&r.current.stop(),r.current=_t(a(a({from:o.get(),to:t,velocity:o.getVelocity()},e),{onUpdate:n})),o.get()}))}),Object.values(e)),Ai(t,(function(t){return o.set(parseFloat(t))})),o},t.useTapGesture=Do,t.useTransform=Ti,t.useViewportScroll=function(){return Dr((function(){!Fi&&function(){if(Fi=!0,"undefined"!=typeof window){var t=Ri(Oi,Di);Zr(window,"scroll",t,{passive:!0}),Zr(window,"resize",t)}}()}),[]),Oi},Object.defineProperty(t,"__esModule",{value:!0})}));
@@ -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 r(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var n=r(e),i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};function o(t,e){function r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var a,s,u=function(){return(u=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function f(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]])}return r}function c(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function l(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(c(arguments[e]));return t}!function(t){t[t.Entering=0]="Entering",t[t.Present=1]="Present",t[t.Exiting=2]="Exiting"}(a||(a={})),function(t){t[t.Hide=0]="Hide",t[t.Show=1]="Show"}(s||(s={}));var d={measureLayout:function(t){return t.measureLayout()},layoutReady:function(t){return t.layoutReady()}},h=function(t,e){return t.depth-e.depth};function p(t){return!!t.forceUpdate}var v,y=e.createContext((v=new Set,{add:function(t){return v.add(t)},flush:function(t){var e=void 0===t?d:t,r=e.measureLayout,n=e.layoutReady,i=Array.from(v).sort(h);i.forEach((function(t){return t.resetTransform()})),i.forEach(r),i.forEach(n),i.forEach((function(t){t.isPresent&&(t.presence=a.Present)})),v.clear()}})),m=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.componentDidMount=function(){var t=this.props,e=t.syncLayout,r=t.visualElement;p(e)&&e.register(r)},e.prototype.getSnapshotBeforeUpdate=function(){var t=this.props,e=t.syncLayout,r=t.visualElement;return p(e)?e.syncUpdate():(r.snapshotBoundingBox(),e.add(r)),null},e.prototype.componentDidUpdate=function(){var t=this.props,e=t.syncLayout,r=t.visualElement;p(e)||e.flush(),r.rebaseTargetBox()},e.prototype.render=function(){return null},e}(n.default.Component);function g(t){var r=e.useContext(y);return n.default.createElement(m,u({},t,{syncLayout:r}))}var x={key:"measure-layout",shouldRender:function(t){return!!t.drag||!!t.layout||!!t.layoutId},getComponent:function(){return g}},b=0,w="undefined"!=typeof window&&void 0!==window.requestAnimationFrame?function(t){return window.requestAnimationFrame(t)}:function(t){var e=Date.now(),r=Math.max(0,16.7-(e-b));b=e+r,setTimeout((function(){return t(b)}),r)},S=1/60*1e3,V=!0,C=!1,B=!1,T={delta:0,timestamp:0},E=["read","update","preRender","render","postRender"],P=function(t){return C=t},L=E.reduce((function(t,e){return t[e]=function(t){var e=[],r=[],n=0,i=!1,o=0,a=new WeakSet,s=new WeakSet,u={cancel:function(t){var e=r.indexOf(t);a.add(t),-1!==e&&r.splice(e,1)},process:function(f){var c,l;if(i=!0,e=(c=[r,e])[0],(r=c[1]).length=0,n=e.length)for(o=0;o<n;o++)(l=e[o])(f),!0!==s.has(l)||a.has(l)||(u.schedule(l),t(!0));i=!1},schedule:function(t,o,u){void 0===o&&(o=!1),void 0===u&&(u=!1);var f=u&&i,c=f?e:r;a.delete(t),o&&s.add(t),-1===c.indexOf(t)&&(c.push(t),f&&(n=e.length))}};return u}(P),t}),{}),A=E.reduce((function(t,e){var r=L[e];return t[e]=function(t,e,n){return void 0===e&&(e=!1),void 0===n&&(n=!1),C||M(),r.schedule(t,e,n),t},t}),{}),O=E.reduce((function(t,e){return t[e]=L[e].cancel,t}),{}),R=function(t){return L[t].process(T)},k=function(t){C=!1,T.delta=V?S:Math.max(Math.min(t-T.timestamp,40),1),V||(S=T.delta),T.timestamp=t,B=!0,E.forEach(R),B=!1,C&&(V=!1,w(k))},M=function(){C=!0,V=!0,B||w(k)},F=function(t,e){return function(r){return Math.max(Math.min(r,e),t)}},D=function(t){return t%1?Number(t.toFixed(5)):t},U=/(-)?(\d[\d\.]*)/g,j=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,I=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i,W={test:function(t){return"number"==typeof t},parse:parseFloat,transform:function(t){return t}},X=u(u({},W),{transform:F(0,1)}),Y=u(u({},W),{default:1}),N=function(t){return{test:function(e){return"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length},parse:parseFloat,transform:function(e){return""+e+t}}},z=N("deg"),_=N("%"),H=N("px"),$=N("vh"),Z=N("vw"),q=u(u({},_),{parse:function(t){return _.parse(t)/100},transform:function(t){return _.transform(100*t)}}),G=F(0,255),K=function(t){return void 0!==t.red},J=function(t){return void 0!==t.hue};var Q=function(t){return function(e){if("string"!=typeof e)return e;for(var r={},n=function(t){return t.substring(t.indexOf("(")+1,t.lastIndexOf(")"))}(e).replace(/(,|\/)/g," ").split(/ \s*/),i=0;i<4;i++)r[t[i]]=void 0!==n[i]?parseFloat(n[i]):1;return r}},tt=u(u({},W),{transform:function(t){return Math.round(G(t))}});function et(t,e){return t.startsWith(e)&&I.test(t)}var rt={test:function(t){return"string"==typeof t?et(t,"rgb"):K(t)},parse:Q(["red","green","blue","alpha"]),transform:function(t){var e=t.red,r=t.green,n=t.blue,i=t.alpha,o=void 0===i?1:i;return function(t){var e=t.red,r=t.green,n=t.blue,i=t.alpha;return"rgba("+e+", "+r+", "+n+", "+(void 0===i?1:i)+")"}({red:tt.transform(e),green:tt.transform(r),blue:tt.transform(n),alpha:D(X.transform(o))})}},nt={test:function(t){return"string"==typeof t?et(t,"hsl"):J(t)},parse:Q(["hue","saturation","lightness","alpha"]),transform:function(t){var e=t.hue,r=t.saturation,n=t.lightness,i=t.alpha,o=void 0===i?1:i;return function(t){var e=t.hue,r=t.saturation,n=t.lightness,i=t.alpha;return"hsla("+e+", "+r+", "+n+", "+(void 0===i?1:i)+")"}({hue:Math.round(e),saturation:_.transform(D(r)),lightness:_.transform(D(n)),alpha:D(X.transform(o))})}},it=u(u({},rt),{test:function(t){return"string"==typeof t&&et(t,"#")},parse:function(t){var e="",r="",n="";return t.length>4?(e=t.substr(1,2),r=t.substr(3,2),n=t.substr(5,2)):(e=t.substr(1,1),r=t.substr(2,1),n=t.substr(3,1),e+=e,r+=r,n+=n),{red:parseInt(e,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:1}}}),ot={test:function(t){return"string"==typeof t&&I.test(t)||K(t)||J(t)},parse:function(t){return rt.test(t)?rt.parse(t):nt.test(t)?nt.parse(t):it.test(t)?it.parse(t):t},transform:function(t){return K(t)?rt.transform(t):J(t)?nt.transform(t):t}},at=function(t){return"number"==typeof t?0:t},st={test:function(t){if("string"!=typeof t||!isNaN(t))return!1;var e=0,r=t.match(U),n=t.match(j);return r&&(e+=r.length),n&&(e+=n.length),e>0},parse:function(t){var e=t,r=[],n=e.match(j);n&&(e=e.replace(j,"${c}"),r.push.apply(r,n.map(ot.parse)));var i=e.match(U);return i&&r.push.apply(r,i.map(W.parse)),r},createTransformer:function(t){var e=t,r=0,n=t.match(j),i=n?n.length:0;if(n)for(var o=0;o<i;o++)e=e.replace(n[o],"${c}"),r++;var a=e.match(U),s=a?a.length:0;if(a)for(o=0;o<s;o++)e=e.replace(a[o],"${n}"),r++;return function(t){for(var n=e,o=0;o<r;o++)n=n.replace(o<i?"${c}":"${n}",o<i?ot.transform(t[o]):D(t[o]));return n}},getAnimatableNone:function(t){var e=st.parse(t);return st.createTransformer(t)(e.map(at))}},ut=function(t,e,r){var n=e-t;return 0===n?1:(r-t)/n},ft=function(t,e,r){return-r*t+r*e+t},ct=function(t){return"number"==typeof t};var lt=function(t){return t.hasOwnProperty("x")&&t.hasOwnProperty("y")},dt=function(t){return lt(t)&&t.hasOwnProperty("z")},ht=function(t,e){return Math.abs(t-e)};var pt=function(){function t(){this.subscriptions=new Set}return t.prototype.add=function(t){var e=this;return this.subscriptions.add(t),function(){e.subscriptions.delete(t)}},t.prototype.notify=function(t,e,r){var n,i;if(this.subscriptions.size)try{for(var o=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(this.subscriptions),a=o.next();!a.done;a=o.next()){(0,a.value)(t,e,r)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}},t.prototype.clear=function(){this.subscriptions.clear()},t}(),vt=function(){function t(t){var e,r=this;this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new pt,this.renderSubscribers=new pt,this.canTrackVelocity=!1,this.updateAndNotify=function(t,e){void 0===e&&(e=!0),r.prev=r.current,r.current=t,r.prev!==r.current&&r.updateSubscribers.notify(r.current),e&&r.renderSubscribers.notify(r.current);var n=T,i=n.delta,o=n.timestamp;r.lastUpdated!==o&&(r.timeDelta=i,r.lastUpdated=o,A.postRender(r.scheduleVelocityCheck))},this.scheduleVelocityCheck=function(){return A.postRender(r.velocityCheck)},this.velocityCheck=function(t){t.timestamp!==r.lastUpdated&&(r.prev=r.current)},this.set(t,!1),this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e)))}return t.prototype.onChange=function(t){return this.updateSubscribers.add(t)},t.prototype.clearListeners=function(){this.updateSubscribers.clear()},t.prototype.onRenderRequest=function(t){return t(this.get()),this.renderSubscribers.add(t)},t.prototype.attach=function(t){this.passiveEffect=t},t.prototype.set=function(t,e){void 0===e&&(e=!0),e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)},t.prototype.get=function(){return this.current},t.prototype.getPrevious=function(){return this.prev},t.prototype.getVelocity=function(){return this.canTrackVelocity?(t=parseFloat(this.current)-parseFloat(this.prev),(e=this.timeDelta)?t*(1e3/e):0):0;var t,e},t.prototype.start=function(t){var e=this;return this.stop(),new Promise((function(r){e.stopAnimation=t(r)})).then((function(){return e.clearAnimation()}))},t.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},t.prototype.isAnimating=function(){return!!this.stopAnimation},t.prototype.clearAnimation=function(){this.stopAnimation=null},t.prototype.destroy=function(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()},t}();function yt(t){return new vt(t)}var mt=function(t){return Array.isArray(t)},gt=u(u({},W),{transform:Math.round}),xt={color:ot,backgroundColor:ot,outlineColor:ot,fill:ot,stroke:ot,borderColor:ot,borderTopColor:ot,borderRightColor:ot,borderBottomColor:ot,borderLeftColor:ot,borderWidth:H,borderTopWidth:H,borderRightWidth:H,borderBottomWidth:H,borderLeftWidth:H,borderRadius:H,radius:H,borderTopLeftRadius:H,borderTopRightRadius:H,borderBottomRightRadius:H,borderBottomLeftRadius:H,width:H,maxWidth:H,height:H,maxHeight:H,size:H,top:H,right:H,bottom:H,left:H,padding:H,paddingTop:H,paddingRight:H,paddingBottom:H,paddingLeft:H,margin:H,marginTop:H,marginRight:H,marginBottom:H,marginLeft:H,rotate:z,rotateX:z,rotateY:z,rotateZ:z,scale:Y,scaleX:Y,scaleY:Y,scaleZ:Y,skew:z,skewX:z,skewY:z,distance:H,translateX:H,translateY:H,translateZ:H,x:H,y:H,z:H,perspective:H,transformPerspective:H,opacity:X,originX:q,originY:q,originZ:H,zIndex:gt,fillOpacity:X,strokeOpacity:X,numOctaves:gt},bt=[W,H,_,z,Z,$,{test:function(t){return"auto"===t},parse:function(t){return t}}],wt=function(t){return function(e){return e.test(t)}},St=function(t){return bt.find(wt(t))},Vt=l(bt,[ot,st]),Ct=function(t){return Vt.find(wt(t))},Bt=function(t){return xt[t]},Tt=function(t,e){return e&&"number"==typeof t?e.transform(t):t};function Et(t,e,r){t.hasValue(e)?t.getValue(e).set(r):t.addValue(e,yt(r))}function Pt(t,e,r){var n,i=(void 0===r?{}:r).priority,o=t.makeTargetAnimatable(function(t,e,r){var n={};return e?(n=function(t){return"function"==typeof t}(e)?e(null!=r?r:t.getVariantPayload(),function(t){var e={};return t.forEachValue((function(t,r){return e[r]=t.get()})),e}(t),function(t){var e={};return t.forEachValue((function(t,r){return e[r]=t.getVelocity()})),e}(t)):e,u({transition:t.getDefaultTransition()},n)):n}(t,e),!1),a=o.transitionEnd,s=void 0===a?{}:a,c=(o.transition,f(o,["transitionEnd","transition"]));for(var l in c=u(u({},c),s)){var d=(n=c[l],mt(n)?n[n.length-1]||0:n);Et(t,l,d),i||(t.baseTarget[l]=d)}}function Lt(t,e){l(e).reverse().forEach((function(r){var n;Pt(t,t.getVariant(r)),null===(n=t.variantChildren)||void 0===n||n.forEach((function(t){Lt(t,e)}))}))}function At(t,e){if(e)return(e[t]||e.default||e).from}var Ot=function(){function t(t,e){var r=this;this.children=new Set,this.baseTarget={},this.overrides=[],this.resolvedOverrides=[],this.activeOverrides=new Set,this.isAnimating=new Set,this.latest={},this.values=new Map,this.valueSubscriptions=new Map,this.config={},this.isMounted=!1,this.update=function(){return r.config.onUpdate(r.latest)},this.triggerRender=function(){return r.render()},this.ref=function(t){t?r.mount(t):r.unmount(),r.externalRef&&("function"==typeof r.externalRef?r.externalRef(t):function(t){return"object"==typeof t&&t.hasOwnProperty("current")}(r.externalRef)&&(r.externalRef.current=t))},this.parent=t,this.rootParent=t?t.rootParent:this,this.treePath=t?l(t.treePath,[t]):[],this.depth=t?t.depth+1:0,this.externalRef=e}return t.prototype.getVariantPayload=function(){return this.config.custom},t.prototype.getVariant=function(t){var e;return null===(e=this.config.variants)||void 0===e?void 0:e[t]},t.prototype.addVariantChild=function(t){this.variantChildren||(this.variantChildren=new Set),this.variantChildren.add(t)},t.prototype.addVariantChildOrder=function(t){this.variantChildrenOrder||(this.variantChildrenOrder=new Set),this.variantChildrenOrder.add(t)},t.prototype.onAnimationStart=function(){var t,e;null===(e=(t=this.config).onAnimationStart)||void 0===e||e.call(t)},t.prototype.onAnimationComplete=function(){var t,e;this.isMounted&&(null===(e=(t=this.config).onAnimationComplete)||void 0===e||e.call(t))},t.prototype.getDefaultTransition=function(){return this.config.transition},t.prototype.resetIsAnimating=function(t){var e,r;void 0===t&&(t=0),this.isAnimating.clear(),t<((r=this).activeOverrides.size?Math.max.apply(Math,l(Array.from(r.activeOverrides))):0)&&this.checkOverrideIsAnimating(t),null===(e=this.variantChildren)||void 0===e||e.forEach((function(e){return e.resetIsAnimating(t)}))},t.prototype.checkOverrideIsAnimating=function(t){for(var e=this.overrides.length,r=t+1;r<e;r++){var n=this.resolvedOverrides[r];if(n)for(var i in n)this.isAnimating.add(i)}},t.prototype.subscribe=function(t){var e=this;return this.children.add(t),function(){return e.children.delete(t)}},t.prototype.hasValue=function(t){return this.values.has(t)},t.prototype.addValue=function(t,e){this.hasValue(t)&&this.removeValue(t),this.values.set(t,e),this.setSingleStaticValue(t,e.get()),this.subscribeToValue(t,e)},t.prototype.removeValue=function(t){var e;null===(e=this.valueSubscriptions.get(t))||void 0===e||e(),this.valueSubscriptions.delete(t),this.values.delete(t),delete this.latest[t]},t.prototype.getValue=function(t,e){var r=this.values.get(t);return void 0===r&&void 0!==e&&(r=new vt(e),this.addValue(t,r)),r},t.prototype.forEachValue=function(t){this.values.forEach(t)},t.prototype.getInstance=function(){return this.element},t.prototype.updateConfig=function(t){void 0===t&&(t={}),this.config=u({},t)},t.prototype.setSingleStaticValue=function(t,e){this.latest[t]=e},t.prototype.setStaticValues=function(t,e){if("string"==typeof t)this.setSingleStaticValue(t,e);else for(var r in t)this.setSingleStaticValue(r,t[r])},t.prototype.scheduleRender=function(){A.render(this.triggerRender,!1,!0)},t.prototype.scheduleUpdateLayoutDelta=function(){A.preRender(this.rootParent.updateLayoutDelta,!1,!0)},t.prototype.subscribeToValue=function(t,e){var r=this,n=e.onChange((function(e){r.setSingleStaticValue(t,e),r.element&&r.config.onUpdate&&A.update(r.update,!1,!0)})),i=e.onRenderRequest((function(){r.element&&r.scheduleRender()}));this.valueSubscriptions.set(t,(function(){n(),i()}))},t.prototype.mount=function(t){this.parent&&(this.removeFromParent=this.parent.subscribe(this)),this.element=this.current=t},t.prototype.unmount=function(){var t=this;this.forEachValue((function(e,r){return t.removeValue(r)})),O.update(this.update),O.render(this.render),this.removeFromParent&&this.removeFromParent()},t}();function Rt(t){return t}function kt(t){return{x:u({},t.x),y:u({},t.y)}}var Mt={translate:0,scale:1,origin:0,originPoint:0};function Ft(){return{x:u({},Mt),y:u({},Mt)}}var Dt=["","X","Y","Z"],Ut=new Set,jt=["transformPerspective","x","y","z"];function It(t,e){return jt.indexOf(t)-jt.indexOf(e)}["perspective","translate","scale","rotate","skew"].forEach((function(t){var e=new Set(["rotate","skew"]).has(t);Dt.forEach((function(r){var n=t+r;jt.push(n),e&&Ut.add(n)}))}));var Wt=new Set(jt);function Xt(t){return Wt.has(t)}var Yt=new Set(["originX","originY","originZ"]);function Nt(t){return Yt.has(t)}var zt={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function _t(t,e){var r=t.x,n=t.y;return"translate3d("+r.translate/e.x+"px, "+n.translate/e.y+"px, 0) scale("+r.scale+", "+n.scale+")"}var Ht=_t(Ft(),{x:1,y:1});function $t(t){return t.startsWith("--")}function Zt(t){return"string"==typeof t&&t.startsWith("var(--")}var qt=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Gt(t,e,r){var n=c(function(t){var e=qt.exec(t);if(!e)return[,];var r=c(e,3);return[r[1],r[2]]}(t),2),i=n[0],o=n[1];if(i){var a=window.getComputedStyle(e).getPropertyValue(i);return a?a.trim():Zt(o)?Gt(o,e):o}}function Kt(t,e){return t/(e.max-e.min)*100}var Jt={process:function(t,e){if("string"==typeof t){if(!H.test(t))return t;t=parseFloat(t)}return Kt(t,e.x)+"% "+Kt(t,e.y)+"%"}},Qt={borderRadius:u(u({},Jt),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:Jt,borderTopRightRadius:Jt,borderBottomLeftRadius:Jt,borderBottomRightRadius:Jt,boxShadow:{process:function(t,e,r,n){var i=t,o=t.includes("var("),a=[];o&&(t=t.replace(qt,(function(t){return a.push(t),"_$css"})));var s=st.parse(t);if(s.length>5)return i;var u=st.createTransformer(t),f="number"!=typeof s[0]?1:0,c=r.x.scale*n.x,l=r.y.scale*n.y;s[0+f]/=c,s[1+f]/=l;var d=ft(c,l,.5);"number"==typeof s[2+f]&&(s[2+f]/=d),"number"==typeof s[3+f]&&(s[3+f]/=d);var h=u(s);if(o){var p=0;h=h.replace("_$css",(function(){var t=a[p];return p++,t}))}return h}}};function te(t,e,r,n,i,o,a,s,u,f,c,l){var d=a.enableHardwareAcceleration,h=a.transformTemplate,p=a.allowTransformNone;o.length=0;var v=!1,y=!1,m=!0;for(var g in t){var x=t[g],b=Bt(g),w=Tt(x,b);if(Xt(g)){if(v=!0,n[g]=w,o.push(g),!m)continue;x!==(void 0!==b.default?b.default:0)&&(m=!1)}else if(Nt(g))i[g]=w,y=!0;else if("transform"!==g||"function"!=typeof x){var S=$t(g)?r:e;if(s&&Qt[g]){var V=Qt[g].process(x,l,u,c),C=Qt[g].applyTo;if(C)for(var B=C.length,T=0;T<B;T++)S[C[T]]=V;else S[g]=V}else S[g]=w}}s?(e.transform=_t(f,c),e.transform===Ht&&(e.transform=""),v&&(e.transform+=" "+function(t,e){var r="";e.sort(It);for(var n=e.length,i=0;i<n;i++){var o=e[i];Ut.has(o)&&(r+=o+"("+t[o]+") ")}return r}(n,o),e.transform=e.transform.trim()),h&&(e.transform=h(n,e.transform)),e.transformOrigin=function(t){var e=t.x,r=t.y;return 100*e.origin+"% "+100*r.origin+"% 0"}(f)):(v&&(e.transform=function(t,e,r,n,i,o){void 0===i&&(i=!0),void 0===o&&(o=!0);var a="";e.sort(It);for(var s=!1,u=e.length,f=0;f<u;f++){var c=e[f];a+=(zt[c]||c)+"("+t[c]+") ","z"===c&&(s=!0)}return!s&&i?a+="translateZ(0)":a=a.trim(),r?a=r(t,n?"":a):o&&n&&(a="none"),a}(n,o,h,m,d,p)),y&&(e.transformOrigin=function(t){var e=t.originX,r=void 0===e?"50%":e,n=t.originY,i=void 0===n?"50%":n,o=t.originZ;return r+" "+i+" "+(void 0===o?0:o)}(i)))}function ee(t,e){t.min=e.min,t.max=e.max}function re(t,e,r){return r+e*(t-r)}function ne(t,e,r,n,i){return void 0!==i&&(t=re(t,i,n)),re(t,r,n)+e}function ie(t,e,r,n,i){void 0===e&&(e=0),void 0===r&&(r=1),t.min=ne(t.min,e,r,n,i),t.max=ne(t.max,e,r,n,i)}function oe(t,e){var r=e.x,n=e.y;ie(t.x,r.translate,r.scale,r.originPoint),ie(t.y,n.translate,n.scale,n.originPoint)}function ae(t,e,r,n){var i=c(n,3),o=i[0],a=i[1],s=i[2];t.min=e.min,t.max=e.max;var u=void 0!==r[s]?r[s]:.5,f=ft(e.min,e.max,u);ie(t,r[o],r[a],f,r.scale)}var se=["x","scaleX","originX"],ue=["y","scaleY","originY"];function fe(t,e,r,n,i){return t=re(t-=e,1/r,n),void 0!==i&&(t=re(t,1/i,n)),t}function ce(t,e,r){var n=c(r,3),i=n[0],o=n[1],a=n[2];!function(t,e,r,n,i){void 0===e&&(e=0),void 0===r&&(r=1),void 0===n&&(n=.5);var o=ft(t.min,t.max,n)-e;t.min=fe(t.min,e,r,o,i),t.max=fe(t.max,e,r,o,i)}(t,e[i],e[o],e[a],e.scale)}var le=function(t){return function(t,e,r){return Math.min(Math.max(r,t),e)}(0,1,t)};function de(t,e,r){return void 0===e&&(e=0),void 0===r&&(r=.01),function(t,e){if(ct(t)&&ct(e))return ht(t,e);if(lt(t)&&lt(e)){var r=ht(t.x,e.x),n=ht(t.y,e.y),i=dt(t)&&dt(e)?ht(t.z,e.z):0;return Math.sqrt(Math.pow(r,2)+Math.pow(n,2)+Math.pow(i,2))}}(t,e)<r}function he(t){return t.max-t.min}function pe(t,e,r,n){t.origin=void 0===n?function(t,e){var r=.5,n=he(t),i=he(e);return i>n?r=ut(e.min,e.max-n,t.min):n>i&&(r=ut(t.min,t.max-i,e.min)),le(r)}(e,r):n,t.originPoint=ft(e.min,e.max,t.origin),t.scale=he(r)/he(e),de(t.scale,1,1e-4)&&(t.scale=1),t.translate=ft(r.min,r.max,t.origin)-t.originPoint,de(t.translate)&&(t.translate=0)}function ve(t,e,r,n){pe(t.x,e.x,r.x,n),pe(t.y,e.y,r.y,n)}function ye(t){return[t("x"),t("y")]}function me(t,e){return function(t){var e=t.top;return{x:{min:t.left,max:t.right},y:{min:e,max:t.bottom}}}(function(t,e){var r=t.top,n=t.left,i=t.bottom,o=t.right;void 0===e&&(e=Rt);var a=e({x:n,y:r}),s=e({x:o,y:i});return{top:a.y,left:a.x,bottom:s.y,right:s.x}}(t.getBoundingClientRect(),e))}var ge,xe=new Set(["width","height","top","left","right","bottom","x","y"]),be=function(t){return xe.has(t)},we=function(t,e){t.set(e,!1),t.set(e)},Se=function(t){return t===W||t===H};!function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"}(ge||(ge={}));var Ve=function(t,e){return parseFloat(t.split(", ")[e])},Ce=function(t,e){return function(r,n){var i=n.transform;if("none"===i||!i)return 0;var o=i.match(/^matrix3d\((.+)\)$/);if(o)return Ve(o[1],e);var a=i.match(/^matrix\((.+)\)$/);return a?Ve(a[1],t):0}},Be=new Set(["x","y","z"]),Te=jt.filter((function(t){return!Be.has(t)}));var Ee={width:function(t){var e=t.x;return e.max-e.min},height:function(t){var e=t.y;return e.max-e.min},top:function(t,e){var r=e.top;return parseFloat(r)},left:function(t,e){var r=e.left;return parseFloat(r)},bottom:function(t,e){var r=t.y,n=e.top;return parseFloat(n)+(r.max-r.min)},right:function(t,e){var r=t.x,n=e.left;return parseFloat(n)+(r.max-r.min)},x:Ce(4,13),y:Ce(5,14)},Pe=function(t,e,r,n){void 0===r&&(r={}),void 0===n&&(n={}),e=u({},e),n=u({},n);var i=Object.keys(e).filter(be),o=[],a=!1,s=[];if(i.forEach((function(i){var u=t.getValue(i);if(t.hasValue(i)){var f,c=r[i],l=e[i],d=St(c);if(mt(l))for(var h=l.length,p=null===l[0]?1:0;p<h;p++)f?St(l[p]):f=St(l[p]);else f=St(l);if(d!==f)if(Se(d)&&Se(f)){var v=u.get();"string"==typeof v&&u.set(parseFloat(v)),"string"==typeof l?e[i]=parseFloat(l):Array.isArray(l)&&f===H&&(e[i]=l.map(parseFloat))}else(null==d?void 0:d.transform)&&(null==f?void 0:f.transform)&&(0===c||0===l)?0===c?u.set(f.transform(c)):e[i]=d.transform(l):(a||(o=function(t){var e=[];return Te.forEach((function(r){var n=t.getValue(r);void 0!==n&&(e.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))})),e.length&&t.render(),e}(t),a=!0),s.push(i),n[i]=void 0!==n[i]?n[i]:e[i],we(u,l))}})),s.length){var f=function(t,e,r){var n=e.getBoundingBox(),i=e.getComputedStyle(),o=i.display,a={top:i.top,left:i.left,bottom:i.bottom,right:i.right,transform:i.transform};"none"===o&&e.setStaticValues("display",t.display||"block"),e.render();var s=e.getBoundingBox();return r.forEach((function(r){var o=e.getValue(r);we(o,Ee[r](n,a)),t[r]=Ee[r](s,i)})),t}(e,t,s);return o.length&&o.forEach((function(e){var r=c(e,2),n=r[0],i=r[1];t.getValue(n).set(i)})),t.render(),{target:f,transitionEnd:n}}return{target:e,transitionEnd:n}};function Le(t,e,r,n){return function(t){return Object.keys(t).some(be)}(e)?Pe(t,e,r,n):{target:e,transitionEnd:n}}var Ae=function(t,e,r,n){var i=function(t,e,r){var n,i=f(e,[]),o=t.getInstance();if(!(o instanceof HTMLElement))return{target:i,transitionEnd:r};for(var a in r&&(r=u({},r)),t.forEachValue((function(t){var e=t.get();if(Zt(e)){var r=Gt(e,o);r&&t.set(r)}})),i){var s=i[a];if(Zt(s)){var c=Gt(s,o);c&&(i[a]=c,r&&(null!==(n=r[a])&&void 0!==n||(r[a]=s)))}}return{target:i,transitionEnd:r}}(t,e,n);return Le(t,e=i.target,r,n=i.transitionEnd)},Oe=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.defaultConfig={enableHardwareAcceleration:!0,allowTransformNone:!0},e.style={},e.reactStyle={},e.vars={},e.transform={},e.transformOrigin={},e.transformKeys=[],e.config=e.defaultConfig,e.isLayoutProjectionEnabled=!1,e.layoutUpdateListeners=new pt,e.layoutMeasureListeners=new pt,e.viewportBoxUpdateListeners=new pt,e.hasViewportBoxUpdated=!1,e.targetBoxFinal={x:{min:0,max:1},y:{min:0,max:1}},e.treeScale={x:1,y:1},e.prevTreeScale={x:1,y:1},e.delta=Ft(),e.deltaFinal=Ft(),e.deltaTransform=Ht,e.stopLayoutAxisAnimation={x:function(){},y:function(){}},e.isTargetBoxLocked=!1,e.axisProgress={x:yt(0),y:yt(0)},e.updateLayoutDelta=function(){e.isLayoutProjectionEnabled&&e.box&&e.updateLayoutDeltas(),e.children.forEach(Re)},e}return o(e,t),e.prototype.removeValue=function(e){t.prototype.removeValue.call(this,e),delete this.vars[e],delete this.style[e]},e.prototype.clean=function(){this.style={},this.vars={},this.transform={}},e.prototype.updateConfig=function(t){void 0===t&&(t={}),this.config=u(u({},this.defaultConfig),t)},e.prototype.read=function(t){return this.getComputedStyle()[t]||0},e.prototype.addValue=function(e,r){t.prototype.addValue.call(this,e,r),e.startsWith("rotate")&&(this.layoutOrigin=.5)},e.prototype.readNativeValue=function(t){if(Xt(t)){var e=Bt(t);return e&&e.default||0}return this.read(t)},e.prototype.makeTargetAnimatable=function(t,e){void 0===e&&(e=!0);var r=t.transition,n=t.transitionEnd,i=f(t,["transition","transitionEnd"]),o=this.config.transformValues,a=function(t,e,r){var n,i,o={};for(var a in t)o[a]=null!==(n=At(a,e))&&void 0!==n?n:null===(i=r.getValue(a))||void 0===i?void 0:i.get();return o}(i,r||{},this);if(o&&(n&&(n=o(n)),i&&(i=o(i)),a&&(a=o(a))),e){!function(t,e,r){var n,i,o,a=Object.keys(e).filter((function(e){return!t.hasValue(e)})),s=a.length;if(s)for(var u=0;u<s;u++){var f=a[u],c=e[f],l=null;if(Array.isArray(c)&&(l=c[0]),null===l){var d=null!==(n=r[f])&&void 0!==n?n:t.readNativeValue(f);l=void 0!==d?d:e[f]}"string"==typeof l&&/^\-?\d*\.?\d+$/.test(l)?l=parseFloat(l):!Ct(l)&&st.test(c)&&(l=st.getAnimatableNone(c)),t.addValue(f,yt(l)),null!==(i=(o=r)[f])&&void 0!==i||(o[f]=l),t.baseTarget[f]=l}}(this,i,a);var s=Ae(this,i,a,n);n=s.transitionEnd,i=s.target}return u({transition:r,transitionEnd:n},i)},e.prototype.enableLayoutProjection=function(){this.isLayoutProjectionEnabled=!0},e.prototype.hide=function(){!1!==this.isVisible&&(this.isVisible=!1,this.scheduleRender())},e.prototype.show=function(){!0!==this.isVisible&&(this.isVisible=!0,this.scheduleRender())},e.prototype.onLayoutUpdate=function(t){return this.layoutUpdateListeners.add(t)},e.prototype.onLayoutMeasure=function(t){return this.layoutMeasureListeners.add(t)},e.prototype.onViewportBoxUpdate=function(t){return this.viewportBoxUpdateListeners.add(t)},e.prototype.layoutReady=function(t){this.layoutUpdateListeners.notify(this.box,this.prevViewportBox||this.box,t)},e.prototype.getBoundingBox=function(){var t=this.config.transformPagePoint;return me(this.element,t)},e.prototype.getBoundingBoxWithoutTransforms=function(){var t,e,r=this.getBoundingBox();return t=r,e=this.latest,ce(t.x,e,se),ce(t.y,e,ue),r},e.prototype.getComputedStyle=function(){return window.getComputedStyle(this.element)},e.prototype.snapshotBoundingBox=function(){this.prevViewportBox=this.getBoundingBoxWithoutTransforms(),this.rebaseTargetBox(!1,this.prevViewportBox)},e.prototype.rebaseTargetBox=function(t,e){var r=this;void 0===t&&(t=!1),void 0===e&&(e=this.box);var n=this.axisProgress,i=n.x,o=n.y,a=this.box&&!this.isTargetBoxLocked&&!i.isAnimating()&&!o.isAnimating();(t||a)&&ye((function(t){var n=e[t],i=n.min,o=n.max;r.setAxisTarget(t,i,o)}))},e.prototype.measureLayout=function(){var t=this;this.box=this.getBoundingBox(),this.boxCorrected=kt(this.box),this.targetBox||(this.targetBox=kt(this.box)),this.layoutMeasureListeners.notify(this.box,this.prevViewportBox||this.box),A.update((function(){return t.rebaseTargetBox()}))},e.prototype.lockTargetBox=function(){this.isTargetBoxLocked=!0},e.prototype.unlockTargetBox=function(){this.stopLayoutAnimation(),this.isTargetBoxLocked=!1},e.prototype.resetTransform=function(){var t=this.config.transformTemplate;this.element.style.transform=t?t({},""):"none",this.scheduleRender()},e.prototype.setAxisTarget=function(t,e,r){var n=this.targetBox[t];n.min=e,n.max=r,this.hasViewportBoxUpdated=!0,this.rootParent.scheduleUpdateLayoutDelta()},e.prototype.startLayoutAxisAnimation=function(t,e){var r,n=this,i=this.axisProgress[t],o=this.targetBox[t],a=o.min,s=o.max-a;return i.clearListeners(),i.set(a),i.set(a),i.onChange((function(e){return n.setAxisTarget(t,e,e+s)})),null===(r=this.animateMotionValue)||void 0===r?void 0:r.call(this,t,i,0,e)},e.prototype.stopLayoutAnimation=function(){var t=this;ye((function(e){return t.axisProgress[e].stop()}))},e.prototype.updateLayoutDeltas=function(){var t,e,r,n,i;t=this.boxCorrected,e=this.box,ee(t.x,e.x),ee(t.y,e.y),this.parent&&(this.prevTreeScale.x=this.treeScale.x,this.prevTreeScale.y=this.treeScale.y,r=this.treeScale,n=this.parent.treeScale,i=this.parent.delta,r.x=n.x*i.x.scale,r.y=n.y*i.y.scale),function(t,e){for(var r=e.length,n=0;n<r;n++)oe(t,e[n].delta)}(this.boxCorrected,this.treePath),ve(this.delta,this.boxCorrected,this.targetBox,this.layoutOrigin),this.hasViewportBoxUpdated&&this.viewportBoxUpdateListeners.notify(this.targetBox,this.delta),this.hasViewportBoxUpdated=!1;var o=_t(this.delta,this.treeScale);o===this.deltaTransform&&this.prevTreeScale.x===this.treeScale.x&&this.prevTreeScale.y===this.treeScale.y||this.scheduleRender(),this.deltaTransform=o},e.prototype.updateTransformDeltas=function(){var t,e,r;this.isLayoutProjectionEnabled&&this.box&&(t=this.targetBoxFinal,e=this.targetBox,r=this.latest,ae(t.x,e.x,r,se),ae(t.y,e.y,r,ue),ve(this.deltaFinal,this.boxCorrected,this.targetBoxFinal,this.layoutOrigin))},e.prototype.build=function(){this.updateTransformDeltas(),void 0!==this.isVisible&&(this.style.visibility=this.isVisible?"visible":"hidden"),te(this.latest,this.style,this.vars,this.transform,this.transformOrigin,this.transformKeys,this.config,this.isLayoutProjectionEnabled&&!!this.box,this.delta,this.deltaFinal,this.treeScale,this.targetBoxFinal)},e.prototype.render=function(){for(var t in this.build(),Object.assign(this.element.style,this.style),this.vars)this.element.style.setProperty(t,this.vars[t])},e}(Ot),Re=function(t){return t.updateLayoutDelta()};function ke(t){var r=e.useRef(null);return null===r.current&&(r.current=t()),r.current}function Me(t,e,r){return"string"==typeof t?t:H.transform(e+r*t)}var Fe=function(t,e){return H.transform(t*e)},De={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ue={offset:"strokeDashoffset",array:"strokeDasharray"};var je={x:0,y:0,width:0,height:0};function Ie(t,e,r,n,i,o,a,s,u,c,l,d,h,p,v){var y=t.attrX,m=t.attrY,g=t.originX,x=t.originY,b=t.pathLength,w=t.pathSpacing,S=void 0===w?1:w,V=t.pathOffset,C=void 0===V?0:V;return te(f(t,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]),n,r,i,o,a,s,l,d,h,p,v),n.transform&&(e.transform=n.transform,delete n.transform),(void 0!==g||void 0!==x||e.transform)&&(e.transformOrigin=function(t,e,r){return Me(e,t.x,t.width)+" "+Me(r,t.y,t.height)}(u||je,void 0!==g?g:.5,void 0!==x?x:.5)),void 0!==y&&(n.x=y),void 0!==m&&(n.y=m),void 0!==c&&void 0!==b&&function(t,e,r,n,i,o){void 0===n&&(n=1),void 0===i&&(i=0),void 0===o&&(o=!0);var a=o?De:Ue;t[a.offset]=Fe(-i,e);var s=Fe(r,e),u=Fe(n,e);t[a.array]=s+" "+u}(n,c,b,S,C,!1),n}var We=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox"]),Xe=/([a-z])([A-Z])/g,Ye=function(t){return t.replace(Xe,"$1-$2").toLowerCase()},Ne=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.attrs={},e.defaultConfig={enableHardwareAcceleration:!1},e.config=e.defaultConfig,e}return o(e,t),e.prototype.mount=function(e){t.prototype.mount.call(this,e),this.measure()},e.prototype.measure=function(){try{this.dimensions="function"==typeof this.element.getBBox?this.element.getBBox():this.element.getBoundingClientRect()}catch(t){this.dimensions={x:0,y:0,width:0,height:0}}"path"===this.element.tagName&&(this.totalPathLength=this.element.getTotalLength())},e.prototype.clean=function(){t.prototype.clean.call(this),this.attrs={}},e.prototype.read=function(t){return t=We.has(t)?t:Ye(t),this.element.getAttribute(t)},e.prototype.build=function(){this.updateTransformDeltas(),Ie(this.latest,this.style,this.vars,this.attrs,this.transform,this.transformOrigin,this.transformKeys,this.config,this.dimensions,this.totalPathLength,this.isLayoutProjectionEnabled&&!!this.box,this.delta,this.deltaFinal,this.treeScale,this.targetBoxFinal)},e.prototype.render=function(){for(var e in t.prototype.render.call(this),this.attrs)this.element.setAttribute(We.has(e)?e:Ye(e),this.attrs[e])},e}(Oe);var ze=new Set(["animate","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","metadata","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","tspan","use","view"]);function _e(t){return"string"==typeof t&&ze.has(t)}var He=e.createContext(null),$e=e.createContext({variantContext:{}});var Ze=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","onLayoutAnimationComplete","onViewportBoxUpdate","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","whileHover","whileTap","onHoverEnd","onHoverStart"]);function qe(t){return Ze.has(t)}var Ge=function(t){return!qe(t)};try{var Ke=require("@emotion/is-prop-valid").default;Ge=function(t){return t.startsWith("on")?!qe(t):Ke(t)}}catch(t){}var Je=function(t){return t instanceof vt};function Qe(t,e){var r=e.layout,n=e.layoutId;return Xt(t)||Nt(t)||(r||void 0!==n)&&!!Qt[t]}function tr(t,e,r,n,i){for(var o in void 0===n&&(n=!1),n&&(t.reactStyle={}),r){var a=r[o],s=!1;if(Je(a))er.has(o)||(t.addValue(o,a),s=!0);else if(Qe(o,i)){if(t.hasValue(o)){if(a!==e[o]){if(Je(e[o]))t.addValue(o,yt(a));else t.getValue(o).set(a)}}else t.addValue(o,yt(a));s=!0}else n&&(t.reactStyle[o]=a);s&&(e[o]=a)}}var er=new Set([]),rr=function(){return{}},nr=e.createContext({transformPagePoint:function(t){return t},features:[],isStatic:!1});function ir(t){var e=t.animate,r=t.variants,n=t.inherit;return void 0===n?!!r&&!e:n}var or="undefined"!=typeof window?e.useLayoutEffect:e.useEffect;function ar(t,r){void 0===r&&(r=!1);var n=e.useRef(!0);(!r||r&&n.current)&&t(),n.current=!1}function sr(t,r,n){var i,o,a=r.variants,s=r.initial,u=r.animate,f=r.whileTap,c=r.whileHover,l=e.useContext($e).variantContext,d=l.parent,h=l.initial,p=l.animate,v=e.useContext(He),y=a||ur(u)||ur(f)||ur(c)||fr(u);!1!==(s=null!==(i=null==v?void 0:v.initial)&&void 0!==i?i:s)||fr(u)||(s=u);var m=e.useMemo((function(){return{parent:y?t:d,initial:ur(s)?s:h,animate:ur(u)?u:p}}),[n?s:null]);return ar((function(){var e=s||h;e&&function(t,e){Array.isArray(e)?Lt(t,e):"string"==typeof e?Lt(t,[e]):Pt(t,e)}(t,e)}),!n),y&&(null==d||d.addVariantChild(t)),function(t){return null===t||t.isPresent}(v)&&(null===(o=t.variantChildrenOrder)||void 0===o||o.clear()),e.useEffect((function(){y&&(null==d||d.addVariantChildOrder(t))})),e.useEffect((function(){return t.isMounted=!0,function(){var e;t.isMounted=!1,null===(e=null==d?void 0:d.variantChildren)||void 0===e||e.delete(t)}}),[]),ar((function(){t.forEachValue((function(e,r){t.baseTarget[r]=e.get()}))}),!0),m}function ur(t){return"string"==typeof t||Array.isArray(t)}function fr(t){return"object"==typeof t&&"function"==typeof t.start}function cr(t,r){var n=r.defaultFeatures,i=r.useVisualElement,o=r.render;return e.forwardRef((function(r,a){var s=e.useContext(nr).isStatic,f=i(t,r,s,a);!function(t,e){var r=ke(rr);for(var n in r){var i=Qe(n,e),o=void 0!==e[n],a=e.style&&void 0!==e.style[n],s=o&&Je(e[n]),u=a&&Je(e.style[n]);(i&&!o&&!a||!i&&!s&&!u)&&(t.removeValue(n),delete r[n])}tr(t,r,e,!1,e),e.style&&tr(t,r,e.style,!0,e),e.transformValues&&(t.reactStyle=e.transformValues(t.reactStyle))}(f,r);var c=sr(f,r,s),d=function(t,r,n,i){var o=e.useContext(nr);if(r||"undefined"==typeof window)return null;for(var a=l(t,o.features),s=a.length,f=[],c=0;c<s;c++){var d=a[c],h=d.shouldRender,p=d.key,v=d.getComponent;if(h(i)){var y=v(i);y&&f.push(e.createElement(y,u({key:p},i,{visualElement:n,inherit:ir(i)})))}}return f}(n,s,f,r),h=e.useMemo((function(){return{visualElement:f,variantContext:c}}),[f,c]),v=o(t,r,f);return function(t){var r=e.useContext(y);or((function(){return function(){p(r)&&r.remove(t)}}),[])}(f),e.createElement(e.Fragment,null,e.createElement($e.Provider,{value:h},v),d)}))}var lr={useVisualElement:function(t,r,n,i){var o=e.useContext($e).visualElement,a=ke((function(){return new(_e(t)?Ne:Oe)(o,i)}));a.updateConfig(u(u(u({},a.config),{enableHardwareAcceleration:!n}),r)),a.layoutId=r.layoutId;var s=e.useContext(He),f=null===s||s.isPresent;a.isPresent=void 0!==r.isPresent?r.isPresent:f;var c=null==s?void 0:s.id;return a.isPresenceRoot=!o||o.presenceId!==c,e.useEffect((function(){if(r.onViewportBoxUpdate)return a.onViewportBoxUpdate(r.onViewportBoxUpdate)}),[r.onViewportBoxUpdate]),a},render:function(t,r,n){var i="string"==typeof t?function(t){var e={};for(var r in t)Ge(r)&&(e[r]=t[r]);return e}(r):r;n.clean(),n.build();var o=_e(t)?function(t){return u(u({},t.attrs),{style:u({},t.reactStyle)})}(n):function(t,e){var r=e.drag,n={style:u(u(u({},t.reactStyle),t.style),t.vars)};return r&&(n.draggable=!1,n.style.userSelect="none",n.style.touchAction=!0===r?"none":"pan-"+("x"===r?"y":"x")),n}(n,r);return e.createElement(t,u(u(u({},i),{ref:n.ref}),o))}};function dr(t){var e=u(u({},lr),{defaultFeatures:t});var r=new Map;return new Proxy({custom:function(t){return cr(t,e)}},{get:function(t,n){return"custom"===n?t.custom:(r.has(n)||r.set(n,cr(n,e)),r.get(n))}})}var hr=dr([x]);t.m=hr,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 r(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var n=r(e),i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};function o(t,e){function r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var a,s,u=function(){return(u=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function f(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]])}return r}function c(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function l(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(c(arguments[e]));return t}!function(t){t[t.Entering=0]="Entering",t[t.Present=1]="Present",t[t.Exiting=2]="Exiting"}(a||(a={})),function(t){t[t.Hide=0]="Hide",t[t.Show=1]="Show"}(s||(s={}));var d={measureLayout:function(t){return t.measureLayout()},layoutReady:function(t){return t.layoutReady()}},h=function(t,e){return t.depth-e.depth};function p(t){return!!t.forceUpdate}var v,y=e.createContext((v=new Set,{add:function(t){return v.add(t)},flush:function(t){var e=void 0===t?d:t,r=e.measureLayout,n=e.layoutReady,i=Array.from(v).sort(h);i.forEach((function(t){return t.resetTransform()})),i.forEach(r),i.forEach(n),i.forEach((function(t){t.isPresent&&(t.presence=a.Present)})),v.clear()}})),m=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.componentDidMount=function(){var t=this.props,e=t.syncLayout,r=t.visualElement;p(e)&&e.register(r)},e.prototype.getSnapshotBeforeUpdate=function(){var t=this.props,e=t.syncLayout,r=t.visualElement;return p(e)?e.syncUpdate():(r.snapshotBoundingBox(),e.add(r)),null},e.prototype.componentDidUpdate=function(){var t=this.props,e=t.syncLayout,r=t.visualElement;p(e)||e.flush(),r.rebaseTargetBox()},e.prototype.render=function(){return null},e}(n.default.Component);function g(t){var r=e.useContext(y);return n.default.createElement(m,u({},t,{syncLayout:r}))}var x={key:"measure-layout",shouldRender:function(t){return!!t.drag||!!t.layout||!!t.layoutId},getComponent:function(){return g}},b=0,w="undefined"!=typeof window&&void 0!==window.requestAnimationFrame?function(t){return window.requestAnimationFrame(t)}:function(t){var e=Date.now(),r=Math.max(0,16.7-(e-b));b=e+r,setTimeout((function(){return t(b)}),r)},S=1/60*1e3,V=!0,C=!1,B=!1,T={delta:0,timestamp:0},E=["read","update","preRender","render","postRender"],P=function(t){return C=t},L=E.reduce((function(t,e){return t[e]=function(t){var e=[],r=[],n=0,i=!1,o=0,a=new WeakSet,s=new WeakSet,u={cancel:function(t){var e=r.indexOf(t);a.add(t),-1!==e&&r.splice(e,1)},process:function(f){var c,l;if(i=!0,e=(c=[r,e])[0],(r=c[1]).length=0,n=e.length)for(o=0;o<n;o++)(l=e[o])(f),!0!==s.has(l)||a.has(l)||(u.schedule(l),t(!0));i=!1},schedule:function(t,o,u){void 0===o&&(o=!1),void 0===u&&(u=!1);var f=u&&i,c=f?e:r;a.delete(t),o&&s.add(t),-1===c.indexOf(t)&&(c.push(t),f&&(n=e.length))}};return u}(P),t}),{}),A=E.reduce((function(t,e){var r=L[e];return t[e]=function(t,e,n){return void 0===e&&(e=!1),void 0===n&&(n=!1),C||M(),r.schedule(t,e,n),t},t}),{}),O=E.reduce((function(t,e){return t[e]=L[e].cancel,t}),{}),R=function(t){return L[t].process(T)},k=function(t){C=!1,T.delta=V?S:Math.max(Math.min(t-T.timestamp,40),1),V||(S=T.delta),T.timestamp=t,B=!0,E.forEach(R),B=!1,C&&(V=!1,w(k))},M=function(){C=!0,V=!0,B||w(k)},F=function(t,e){return function(r){return Math.max(Math.min(r,e),t)}},D=function(t){return t%1?Number(t.toFixed(5)):t},U=/(-)?(\d[\d\.]*)/g,j=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,I=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i,W={test:function(t){return"number"==typeof t},parse:parseFloat,transform:function(t){return t}},X=u(u({},W),{transform:F(0,1)}),Y=u(u({},W),{default:1}),N=function(t){return{test:function(e){return"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length},parse:parseFloat,transform:function(e){return""+e+t}}},z=N("deg"),_=N("%"),H=N("px"),$=N("vh"),Z=N("vw"),q=u(u({},_),{parse:function(t){return _.parse(t)/100},transform:function(t){return _.transform(100*t)}}),G=F(0,255),K=function(t){return void 0!==t.red},J=function(t){return void 0!==t.hue};var Q=function(t){return function(e){if("string"!=typeof e)return e;for(var r={},n=function(t){return t.substring(t.indexOf("(")+1,t.lastIndexOf(")"))}(e).replace(/(,|\/)/g," ").split(/ \s*/),i=0;i<4;i++)r[t[i]]=void 0!==n[i]?parseFloat(n[i]):1;return r}},tt=u(u({},W),{transform:function(t){return Math.round(G(t))}});function et(t,e){return t.startsWith(e)&&I.test(t)}var rt={test:function(t){return"string"==typeof t?et(t,"rgb"):K(t)},parse:Q(["red","green","blue","alpha"]),transform:function(t){var e=t.red,r=t.green,n=t.blue,i=t.alpha,o=void 0===i?1:i;return function(t){var e=t.red,r=t.green,n=t.blue,i=t.alpha;return"rgba("+e+", "+r+", "+n+", "+(void 0===i?1:i)+")"}({red:tt.transform(e),green:tt.transform(r),blue:tt.transform(n),alpha:D(X.transform(o))})}},nt={test:function(t){return"string"==typeof t?et(t,"hsl"):J(t)},parse:Q(["hue","saturation","lightness","alpha"]),transform:function(t){var e=t.hue,r=t.saturation,n=t.lightness,i=t.alpha,o=void 0===i?1:i;return function(t){var e=t.hue,r=t.saturation,n=t.lightness,i=t.alpha;return"hsla("+e+", "+r+", "+n+", "+(void 0===i?1:i)+")"}({hue:Math.round(e),saturation:_.transform(D(r)),lightness:_.transform(D(n)),alpha:D(X.transform(o))})}},it=u(u({},rt),{test:function(t){return"string"==typeof t&&et(t,"#")},parse:function(t){var e="",r="",n="";return t.length>4?(e=t.substr(1,2),r=t.substr(3,2),n=t.substr(5,2)):(e=t.substr(1,1),r=t.substr(2,1),n=t.substr(3,1),e+=e,r+=r,n+=n),{red:parseInt(e,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:1}}}),ot={test:function(t){return"string"==typeof t&&I.test(t)||K(t)||J(t)},parse:function(t){return rt.test(t)?rt.parse(t):nt.test(t)?nt.parse(t):it.test(t)?it.parse(t):t},transform:function(t){return K(t)?rt.transform(t):J(t)?nt.transform(t):t}},at=function(t){return"number"==typeof t?0:t},st={test:function(t){if("string"!=typeof t||!isNaN(t))return!1;var e=0,r=t.match(U),n=t.match(j);return r&&(e+=r.length),n&&(e+=n.length),e>0},parse:function(t){var e=t,r=[],n=e.match(j);n&&(e=e.replace(j,"${c}"),r.push.apply(r,n.map(ot.parse)));var i=e.match(U);return i&&r.push.apply(r,i.map(W.parse)),r},createTransformer:function(t){var e=t,r=0,n=t.match(j),i=n?n.length:0;if(n)for(var o=0;o<i;o++)e=e.replace(n[o],"${c}"),r++;var a=e.match(U),s=a?a.length:0;if(a)for(o=0;o<s;o++)e=e.replace(a[o],"${n}"),r++;return function(t){for(var n=e,o=0;o<r;o++)n=n.replace(o<i?"${c}":"${n}",o<i?ot.transform(t[o]):D(t[o]));return n}},getAnimatableNone:function(t){var e=st.parse(t);return st.createTransformer(t)(e.map(at))}},ut=function(t,e,r){var n=e-t;return 0===n?1:(r-t)/n},ft=function(t,e,r){return-r*t+r*e+t},ct=function(t){return"number"==typeof t};var lt=function(t){return t.hasOwnProperty("x")&&t.hasOwnProperty("y")},dt=function(t){return lt(t)&&t.hasOwnProperty("z")},ht=function(t,e){return Math.abs(t-e)};var pt=function(){function t(){this.subscriptions=new Set}return t.prototype.add=function(t){var e=this;return this.subscriptions.add(t),function(){e.subscriptions.delete(t)}},t.prototype.notify=function(t,e,r){var n,i;if(this.subscriptions.size)try{for(var o=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(this.subscriptions),a=o.next();!a.done;a=o.next()){(0,a.value)(t,e,r)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}},t.prototype.clear=function(){this.subscriptions.clear()},t}(),vt=function(){function t(t){var e,r=this;this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new pt,this.renderSubscribers=new pt,this.canTrackVelocity=!1,this.updateAndNotify=function(t,e){void 0===e&&(e=!0),r.prev=r.current,r.current=t,r.prev!==r.current&&r.updateSubscribers.notify(r.current),e&&r.renderSubscribers.notify(r.current);var n=T,i=n.delta,o=n.timestamp;r.lastUpdated!==o&&(r.timeDelta=i,r.lastUpdated=o,A.postRender(r.scheduleVelocityCheck))},this.scheduleVelocityCheck=function(){return A.postRender(r.velocityCheck)},this.velocityCheck=function(t){t.timestamp!==r.lastUpdated&&(r.prev=r.current)},this.set(t,!1),this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e)))}return t.prototype.onChange=function(t){return this.updateSubscribers.add(t)},t.prototype.clearListeners=function(){this.updateSubscribers.clear()},t.prototype.onRenderRequest=function(t){return t(this.get()),this.renderSubscribers.add(t)},t.prototype.attach=function(t){this.passiveEffect=t},t.prototype.set=function(t,e){void 0===e&&(e=!0),e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)},t.prototype.get=function(){return this.current},t.prototype.getPrevious=function(){return this.prev},t.prototype.getVelocity=function(){return this.canTrackVelocity?(t=parseFloat(this.current)-parseFloat(this.prev),(e=this.timeDelta)?t*(1e3/e):0):0;var t,e},t.prototype.start=function(t){var e=this;return this.stop(),new Promise((function(r){e.stopAnimation=t(r)})).then((function(){return e.clearAnimation()}))},t.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},t.prototype.isAnimating=function(){return!!this.stopAnimation},t.prototype.clearAnimation=function(){this.stopAnimation=null},t.prototype.destroy=function(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()},t}();function yt(t){return new vt(t)}var mt=function(t){return Array.isArray(t)},gt=u(u({},W),{transform:Math.round}),xt={color:ot,backgroundColor:ot,outlineColor:ot,fill:ot,stroke:ot,borderColor:ot,borderTopColor:ot,borderRightColor:ot,borderBottomColor:ot,borderLeftColor:ot,borderWidth:H,borderTopWidth:H,borderRightWidth:H,borderBottomWidth:H,borderLeftWidth:H,borderRadius:H,radius:H,borderTopLeftRadius:H,borderTopRightRadius:H,borderBottomRightRadius:H,borderBottomLeftRadius:H,width:H,maxWidth:H,height:H,maxHeight:H,size:H,top:H,right:H,bottom:H,left:H,padding:H,paddingTop:H,paddingRight:H,paddingBottom:H,paddingLeft:H,margin:H,marginTop:H,marginRight:H,marginBottom:H,marginLeft:H,rotate:z,rotateX:z,rotateY:z,rotateZ:z,scale:Y,scaleX:Y,scaleY:Y,scaleZ:Y,skew:z,skewX:z,skewY:z,distance:H,translateX:H,translateY:H,translateZ:H,x:H,y:H,z:H,perspective:H,transformPerspective:H,opacity:X,originX:q,originY:q,originZ:H,zIndex:gt,fillOpacity:X,strokeOpacity:X,numOctaves:gt},bt=[W,H,_,z,Z,$,{test:function(t){return"auto"===t},parse:function(t){return t}}],wt=function(t){return function(e){return e.test(t)}},St=function(t){return bt.find(wt(t))},Vt=l(bt,[ot,st]),Ct=function(t){return Vt.find(wt(t))},Bt=function(t){return xt[t]},Tt=function(t,e){return e&&"number"==typeof t?e.transform(t):t};function Et(t,e,r){t.hasValue(e)?t.getValue(e).set(r):t.addValue(e,yt(r))}function Pt(t,e,r){var n,i=(void 0===r?{}:r).priority,o=t.makeTargetAnimatable(function(t,e,r){var n={};return e?(n=function(t){return"function"==typeof t}(e)?e(null!=r?r:t.getVariantPayload(),function(t){var e={};return t.forEachValue((function(t,r){return e[r]=t.get()})),e}(t),function(t){var e={};return t.forEachValue((function(t,r){return e[r]=t.getVelocity()})),e}(t)):e,u({transition:t.getDefaultTransition()},n)):n}(t,e),!1),a=o.transitionEnd,s=void 0===a?{}:a,c=(o.transition,f(o,["transitionEnd","transition"]));for(var l in c=u(u({},c),s)){var d=(n=c[l],mt(n)?n[n.length-1]||0:n);Et(t,l,d),i||(t.baseTarget[l]=d)}}function Lt(t,e){l(e).reverse().forEach((function(r){var n;Pt(t,t.getVariant(r)),null===(n=t.variantChildren)||void 0===n||n.forEach((function(t){Lt(t,e)}))}))}function At(t,e){if(e)return(e[t]||e.default||e).from}var Ot=function(){function t(t,e){var r=this;this.children=new Set,this.baseTarget={},this.overrides=[],this.resolvedOverrides=[],this.activeOverrides=new Set,this.isAnimating=new Set,this.latest={},this.values=new Map,this.valueSubscriptions=new Map,this.config={},this.isMounted=!1,this.update=function(){return r.config.onUpdate(r.latest)},this.triggerRender=function(){return r.render()},this.ref=function(t){t?r.mount(t):r.unmount(),r.externalRef&&("function"==typeof r.externalRef?r.externalRef(t):function(t){return"object"==typeof t&&t.hasOwnProperty("current")}(r.externalRef)&&(r.externalRef.current=t))},this.parent=t,this.rootParent=t?t.rootParent:this,this.treePath=t?l(t.treePath,[t]):[],this.depth=t?t.depth+1:0,this.externalRef=e}return t.prototype.getVariantPayload=function(){return this.config.custom},t.prototype.getVariant=function(t){var e;return null===(e=this.config.variants)||void 0===e?void 0:e[t]},t.prototype.addVariantChild=function(t){this.variantChildren||(this.variantChildren=new Set),this.variantChildren.add(t)},t.prototype.addVariantChildOrder=function(t){this.variantChildrenOrder||(this.variantChildrenOrder=new Set),this.variantChildrenOrder.add(t)},t.prototype.onAnimationStart=function(){var t,e;null===(e=(t=this.config).onAnimationStart)||void 0===e||e.call(t)},t.prototype.onAnimationComplete=function(){var t,e;this.isMounted&&(null===(e=(t=this.config).onAnimationComplete)||void 0===e||e.call(t))},t.prototype.getDefaultTransition=function(){return this.config.transition},t.prototype.resetIsAnimating=function(t){var e,r;void 0===t&&(t=0),this.isAnimating.clear(),t<((r=this).activeOverrides.size?Math.max.apply(Math,l(Array.from(r.activeOverrides))):0)&&this.checkOverrideIsAnimating(t),null===(e=this.variantChildren)||void 0===e||e.forEach((function(e){return e.resetIsAnimating(t)}))},t.prototype.checkOverrideIsAnimating=function(t){for(var e=this.overrides.length,r=t+1;r<e;r++){var n=this.resolvedOverrides[r];if(n)for(var i in n)this.isAnimating.add(i)}},t.prototype.subscribe=function(t){var e=this;return this.children.add(t),function(){return e.children.delete(t)}},t.prototype.hasValue=function(t){return this.values.has(t)},t.prototype.addValue=function(t,e){this.hasValue(t)&&this.removeValue(t),this.values.set(t,e),this.setSingleStaticValue(t,e.get()),this.subscribeToValue(t,e)},t.prototype.removeValue=function(t){var e;null===(e=this.valueSubscriptions.get(t))||void 0===e||e(),this.valueSubscriptions.delete(t),this.values.delete(t),delete this.latest[t]},t.prototype.getValue=function(t,e){var r=this.values.get(t);return void 0===r&&void 0!==e&&(r=new vt(e),this.addValue(t,r)),r},t.prototype.forEachValue=function(t){this.values.forEach(t)},t.prototype.getInstance=function(){return this.element},t.prototype.updateConfig=function(t){void 0===t&&(t={}),this.config=u({},t)},t.prototype.setSingleStaticValue=function(t,e){this.latest[t]=e},t.prototype.setStaticValues=function(t,e){if("string"==typeof t)this.setSingleStaticValue(t,e);else for(var r in t)this.setSingleStaticValue(r,t[r])},t.prototype.scheduleRender=function(){A.render(this.triggerRender,!1,!0)},t.prototype.scheduleUpdateLayoutDelta=function(){A.preRender(this.rootParent.updateLayoutDelta,!1,!0)},t.prototype.subscribeToValue=function(t,e){var r=this,n=e.onChange((function(e){r.setSingleStaticValue(t,e),r.element&&r.config.onUpdate&&A.update(r.update,!1,!0)})),i=e.onRenderRequest((function(){r.element&&r.scheduleRender()}));this.valueSubscriptions.set(t,(function(){n(),i()}))},t.prototype.mount=function(t){this.parent&&(this.removeFromParent=this.parent.subscribe(this)),this.element=this.current=t},t.prototype.unmount=function(){var t=this;this.forEachValue((function(e,r){return t.removeValue(r)})),O.update(this.update),O.render(this.render),this.removeFromParent&&this.removeFromParent()},t}();function Rt(t){return t}function kt(t){return{x:u({},t.x),y:u({},t.y)}}var Mt={translate:0,scale:1,origin:0,originPoint:0};function Ft(){return{x:u({},Mt),y:u({},Mt)}}var Dt=["","X","Y","Z"],Ut=new Set,jt=["transformPerspective","x","y","z"];function It(t,e){return jt.indexOf(t)-jt.indexOf(e)}["perspective","translate","scale","rotate","skew"].forEach((function(t){var e=new Set(["rotate","skew"]).has(t);Dt.forEach((function(r){var n=t+r;jt.push(n),e&&Ut.add(n)}))}));var Wt=new Set(jt);function Xt(t){return Wt.has(t)}var Yt=new Set(["originX","originY","originZ"]);function Nt(t){return Yt.has(t)}var zt={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function _t(t,e){var r=t.x,n=t.y;return"translate3d("+r.translate/e.x+"px, "+n.translate/e.y+"px, 0) scale("+r.scale+", "+n.scale+")"}var Ht=_t(Ft(),{x:1,y:1});function $t(t){return t.startsWith("--")}function Zt(t){return"string"==typeof t&&t.startsWith("var(--")}var qt=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Gt(t,e,r){var n=c(function(t){var e=qt.exec(t);if(!e)return[,];var r=c(e,3);return[r[1],r[2]]}(t),2),i=n[0],o=n[1];if(i){var a=window.getComputedStyle(e).getPropertyValue(i);return a?a.trim():Zt(o)?Gt(o,e):o}}function Kt(t,e){return t/(e.max-e.min)*100}var Jt={process:function(t,e){if("string"==typeof t){if(!H.test(t))return t;t=parseFloat(t)}return Kt(t,e.x)+"% "+Kt(t,e.y)+"%"}},Qt={borderRadius:u(u({},Jt),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:Jt,borderTopRightRadius:Jt,borderBottomLeftRadius:Jt,borderBottomRightRadius:Jt,boxShadow:{process:function(t,e,r,n){var i=t,o=t.includes("var("),a=[];o&&(t=t.replace(qt,(function(t){return a.push(t),"_$css"})));var s=st.parse(t);if(s.length>5)return i;var u=st.createTransformer(t),f="number"!=typeof s[0]?1:0,c=r.x.scale*n.x,l=r.y.scale*n.y;s[0+f]/=c,s[1+f]/=l;var d=ft(c,l,.5);"number"==typeof s[2+f]&&(s[2+f]/=d),"number"==typeof s[3+f]&&(s[3+f]/=d);var h=u(s);if(o){var p=0;h=h.replace("_$css",(function(){var t=a[p];return p++,t}))}return h}}};function te(t,e,r,n,i,o,a,s,u,f,c,l){var d=a.enableHardwareAcceleration,h=a.transformTemplate,p=a.allowTransformNone;o.length=0;var v=!1,y=!1,m=!0;for(var g in t){var x=t[g],b=Bt(g),w=Tt(x,b);if(Xt(g)){if(v=!0,n[g]=w,o.push(g),!m)continue;x!==(void 0!==b.default?b.default:0)&&(m=!1)}else if(Nt(g))i[g]=w,y=!0;else if("transform"!==g||"function"!=typeof x){var S=$t(g)?r:e;if(s&&Qt[g]){var V=Qt[g].process(x,l,u,c),C=Qt[g].applyTo;if(C)for(var B=C.length,T=0;T<B;T++)S[C[T]]=V;else S[g]=V}else S[g]=w}}s?(e.transform=_t(f,c),e.transform===Ht&&(e.transform=""),v&&(e.transform+=" "+function(t,e){var r="";e.sort(It);for(var n=e.length,i=0;i<n;i++){var o=e[i];Ut.has(o)&&(r+=o+"("+t[o]+") ")}return r}(n,o),e.transform=e.transform.trim()),h&&(e.transform=h(n,e.transform)),e.transformOrigin=function(t){var e=t.x,r=t.y;return 100*e.origin+"% "+100*r.origin+"% 0"}(f)):(v&&(e.transform=function(t,e,r,n,i,o){void 0===i&&(i=!0),void 0===o&&(o=!0);var a="";e.sort(It);for(var s=!1,u=e.length,f=0;f<u;f++){var c=e[f];a+=(zt[c]||c)+"("+t[c]+") ","z"===c&&(s=!0)}return!s&&i?a+="translateZ(0)":a=a.trim(),r?a=r(t,n?"":a):o&&n&&(a="none"),a}(n,o,h,m,d,p)),y&&(e.transformOrigin=function(t){var e=t.originX,r=void 0===e?"50%":e,n=t.originY,i=void 0===n?"50%":n,o=t.originZ;return r+" "+i+" "+(void 0===o?0:o)}(i)))}function ee(t,e){t.min=e.min,t.max=e.max}function re(t,e,r){return r+e*(t-r)}function ne(t,e,r,n,i){return void 0!==i&&(t=re(t,i,n)),re(t,r,n)+e}function ie(t,e,r,n,i){void 0===e&&(e=0),void 0===r&&(r=1),t.min=ne(t.min,e,r,n,i),t.max=ne(t.max,e,r,n,i)}function oe(t,e){var r=e.x,n=e.y;ie(t.x,r.translate,r.scale,r.originPoint),ie(t.y,n.translate,n.scale,n.originPoint)}function ae(t,e,r,n){var i=c(n,3),o=i[0],a=i[1],s=i[2];t.min=e.min,t.max=e.max;var u=void 0!==r[s]?r[s]:.5,f=ft(e.min,e.max,u);ie(t,r[o],r[a],f,r.scale)}var se=["x","scaleX","originX"],ue=["y","scaleY","originY"];function fe(t,e,r,n,i){return t=re(t-=e,1/r,n),void 0!==i&&(t=re(t,1/i,n)),t}function ce(t,e,r){var n=c(r,3),i=n[0],o=n[1],a=n[2];!function(t,e,r,n,i){void 0===e&&(e=0),void 0===r&&(r=1),void 0===n&&(n=.5);var o=ft(t.min,t.max,n)-e;t.min=fe(t.min,e,r,o,i),t.max=fe(t.max,e,r,o,i)}(t,e[i],e[o],e[a],e.scale)}var le=function(t){return function(t,e,r){return Math.min(Math.max(r,t),e)}(0,1,t)};function de(t,e,r){return void 0===e&&(e=0),void 0===r&&(r=.01),function(t,e){if(ct(t)&&ct(e))return ht(t,e);if(lt(t)&&lt(e)){var r=ht(t.x,e.x),n=ht(t.y,e.y),i=dt(t)&&dt(e)?ht(t.z,e.z):0;return Math.sqrt(Math.pow(r,2)+Math.pow(n,2)+Math.pow(i,2))}}(t,e)<r}function he(t){return t.max-t.min}function pe(t,e,r,n){t.origin=void 0===n?function(t,e){var r=.5,n=he(t),i=he(e);return i>n?r=ut(e.min,e.max-n,t.min):n>i&&(r=ut(t.min,t.max-i,e.min)),le(r)}(e,r):n,t.originPoint=ft(e.min,e.max,t.origin),t.scale=he(r)/he(e),de(t.scale,1,1e-4)&&(t.scale=1),t.translate=ft(r.min,r.max,t.origin)-t.originPoint,de(t.translate)&&(t.translate=0)}function ve(t,e,r,n){pe(t.x,e.x,r.x,n),pe(t.y,e.y,r.y,n)}function ye(t){return[t("x"),t("y")]}function me(t,e){return function(t){var e=t.top;return{x:{min:t.left,max:t.right},y:{min:e,max:t.bottom}}}(function(t,e){var r=t.top,n=t.left,i=t.bottom,o=t.right;void 0===e&&(e=Rt);var a=e({x:n,y:r}),s=e({x:o,y:i});return{top:a.y,left:a.x,bottom:s.y,right:s.x}}(t.getBoundingClientRect(),e))}var ge,xe=new Set(["width","height","top","left","right","bottom","x","y"]),be=function(t){return xe.has(t)},we=function(t,e){t.set(e,!1),t.set(e)},Se=function(t){return t===W||t===H};!function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"}(ge||(ge={}));var Ve=function(t,e){return parseFloat(t.split(", ")[e])},Ce=function(t,e){return function(r,n){var i=n.transform;if("none"===i||!i)return 0;var o=i.match(/^matrix3d\((.+)\)$/);if(o)return Ve(o[1],e);var a=i.match(/^matrix\((.+)\)$/);return a?Ve(a[1],t):0}},Be=new Set(["x","y","z"]),Te=jt.filter((function(t){return!Be.has(t)}));var Ee={width:function(t){var e=t.x;return e.max-e.min},height:function(t){var e=t.y;return e.max-e.min},top:function(t,e){var r=e.top;return parseFloat(r)},left:function(t,e){var r=e.left;return parseFloat(r)},bottom:function(t,e){var r=t.y,n=e.top;return parseFloat(n)+(r.max-r.min)},right:function(t,e){var r=t.x,n=e.left;return parseFloat(n)+(r.max-r.min)},x:Ce(4,13),y:Ce(5,14)},Pe=function(t,e,r,n){void 0===r&&(r={}),void 0===n&&(n={}),e=u({},e),n=u({},n);var i=Object.keys(e).filter(be),o=[],a=!1,s=[];if(i.forEach((function(i){var u=t.getValue(i);if(t.hasValue(i)){var f,c=r[i],l=e[i],d=St(c);if(mt(l))for(var h=l.length,p=null===l[0]?1:0;p<h;p++)f?St(l[p]):f=St(l[p]);else f=St(l);if(d!==f)if(Se(d)&&Se(f)){var v=u.get();"string"==typeof v&&u.set(parseFloat(v)),"string"==typeof l?e[i]=parseFloat(l):Array.isArray(l)&&f===H&&(e[i]=l.map(parseFloat))}else(null==d?void 0:d.transform)&&(null==f?void 0:f.transform)&&(0===c||0===l)?0===c?u.set(f.transform(c)):e[i]=d.transform(l):(a||(o=function(t){var e=[];return Te.forEach((function(r){var n=t.getValue(r);void 0!==n&&(e.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))})),e.length&&t.render(),e}(t),a=!0),s.push(i),n[i]=void 0!==n[i]?n[i]:e[i],we(u,l))}})),s.length){var f=function(t,e,r){var n=e.getBoundingBox(),i=e.getComputedStyle(),o=i.display,a={top:i.top,left:i.left,bottom:i.bottom,right:i.right,transform:i.transform};"none"===o&&e.setStaticValues("display",t.display||"block"),e.render();var s=e.getBoundingBox();return r.forEach((function(r){var o=e.getValue(r);we(o,Ee[r](n,a)),t[r]=Ee[r](s,i)})),t}(e,t,s);return o.length&&o.forEach((function(e){var r=c(e,2),n=r[0],i=r[1];t.getValue(n).set(i)})),t.render(),{target:f,transitionEnd:n}}return{target:e,transitionEnd:n}};function Le(t,e,r,n){return function(t){return Object.keys(t).some(be)}(e)?Pe(t,e,r,n):{target:e,transitionEnd:n}}var Ae=function(t,e,r,n){var i=function(t,e,r){var n,i=f(e,[]),o=t.getInstance();if(!(o instanceof HTMLElement))return{target:i,transitionEnd:r};for(var a in r&&(r=u({},r)),t.forEachValue((function(t){var e=t.get();if(Zt(e)){var r=Gt(e,o);r&&t.set(r)}})),i){var s=i[a];if(Zt(s)){var c=Gt(s,o);c&&(i[a]=c,r&&(null!==(n=r[a])&&void 0!==n||(r[a]=s)))}}return{target:i,transitionEnd:r}}(t,e,n);return Le(t,e=i.target,r,n=i.transitionEnd)},Oe=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.defaultConfig={enableHardwareAcceleration:!0,allowTransformNone:!0},e.style={},e.reactStyle={},e.vars={},e.transform={},e.transformOrigin={},e.transformKeys=[],e.config=e.defaultConfig,e.isLayoutProjectionEnabled=!1,e.layoutUpdateListeners=new pt,e.layoutMeasureListeners=new pt,e.viewportBoxUpdateListeners=new pt,e.hasViewportBoxUpdated=!1,e.targetBoxFinal={x:{min:0,max:1},y:{min:0,max:1}},e.treeScale={x:1,y:1},e.prevTreeScale={x:1,y:1},e.delta=Ft(),e.deltaFinal=Ft(),e.deltaTransform=Ht,e.stopLayoutAxisAnimation={x:function(){},y:function(){}},e.isTargetBoxLocked=!1,e.axisProgress={x:yt(0),y:yt(0)},e.updateLayoutDelta=function(){e.isLayoutProjectionEnabled&&e.box&&e.updateLayoutDeltas(),e.children.forEach(Re)},e}return o(e,t),e.prototype.removeValue=function(e){t.prototype.removeValue.call(this,e),delete this.vars[e],delete this.style[e]},e.prototype.clean=function(){this.style={},this.vars={},this.transform={}},e.prototype.updateConfig=function(t){void 0===t&&(t={}),this.config=u(u({},this.defaultConfig),t)},e.prototype.read=function(t){return this.getComputedStyle()[t]||0},e.prototype.addValue=function(e,r){t.prototype.addValue.call(this,e,r),e.startsWith("rotate")&&(this.layoutOrigin=.5)},e.prototype.readNativeValue=function(t){if(Xt(t)){var e=Bt(t);return e&&e.default||0}return this.read(t)},e.prototype.makeTargetAnimatable=function(t,e){void 0===e&&(e=!0);var r=t.transition,n=t.transitionEnd,i=f(t,["transition","transitionEnd"]),o=this.config.transformValues,a=function(t,e,r){var n,i,o={};for(var a in t)o[a]=null!==(n=At(a,e))&&void 0!==n?n:null===(i=r.getValue(a))||void 0===i?void 0:i.get();return o}(i,r||{},this);if(o&&(n&&(n=o(n)),i&&(i=o(i)),a&&(a=o(a))),e){!function(t,e,r){var n,i,o,a=Object.keys(e).filter((function(e){return!t.hasValue(e)})),s=a.length;if(s)for(var u=0;u<s;u++){var f=a[u],c=e[f],l=null;if(Array.isArray(c)&&(l=c[0]),null===l){var d=null!==(n=r[f])&&void 0!==n?n:t.readNativeValue(f);l=void 0!==d?d:e[f]}"string"==typeof l&&/^\-?\d*\.?\d+$/.test(l)?l=parseFloat(l):!Ct(l)&&st.test(c)&&(l=st.getAnimatableNone(c)),t.addValue(f,yt(l)),null!==(i=(o=r)[f])&&void 0!==i||(o[f]=l),t.baseTarget[f]=l}}(this,i,a);var s=Ae(this,i,a,n);n=s.transitionEnd,i=s.target}return u({transition:r,transitionEnd:n},i)},e.prototype.enableLayoutProjection=function(){this.isLayoutProjectionEnabled=!0},e.prototype.hide=function(){!1!==this.isVisible&&(this.isVisible=!1,this.scheduleRender())},e.prototype.show=function(){!0!==this.isVisible&&(this.isVisible=!0,this.scheduleRender())},e.prototype.onLayoutUpdate=function(t){return this.layoutUpdateListeners.add(t)},e.prototype.onLayoutMeasure=function(t){return this.layoutMeasureListeners.add(t)},e.prototype.onViewportBoxUpdate=function(t){return this.viewportBoxUpdateListeners.add(t)},e.prototype.layoutReady=function(t){this.layoutUpdateListeners.notify(this.box,this.prevViewportBox||this.box,t)},e.prototype.getBoundingBox=function(){var t=this.config.transformPagePoint;return me(this.element,t)},e.prototype.getBoundingBoxWithoutTransforms=function(){var t,e,r=this.getBoundingBox();return t=r,e=this.latest,ce(t.x,e,se),ce(t.y,e,ue),r},e.prototype.getComputedStyle=function(){return window.getComputedStyle(this.element)},e.prototype.snapshotBoundingBox=function(){this.prevViewportBox=this.getBoundingBoxWithoutTransforms(),this.rebaseTargetBox(!1,this.prevViewportBox)},e.prototype.rebaseTargetBox=function(t,e){var r=this;void 0===t&&(t=!1),void 0===e&&(e=this.box);var n=this.axisProgress,i=n.x,o=n.y,a=this.box&&!this.isTargetBoxLocked&&!i.isAnimating()&&!o.isAnimating();(t||a)&&ye((function(t){var n=e[t],i=n.min,o=n.max;r.setAxisTarget(t,i,o)}))},e.prototype.measureLayout=function(){var t=this;this.box=this.getBoundingBox(),this.boxCorrected=kt(this.box),this.targetBox||(this.targetBox=kt(this.box)),this.layoutMeasureListeners.notify(this.box,this.prevViewportBox||this.box),A.update((function(){return t.rebaseTargetBox()}))},e.prototype.lockTargetBox=function(){this.isTargetBoxLocked=!0},e.prototype.unlockTargetBox=function(){this.stopLayoutAnimation(),this.isTargetBoxLocked=!1},e.prototype.resetTransform=function(){var t=this.config.transformTemplate;this.element.style.transform=t?t({},""):"none",this.scheduleRender()},e.prototype.setAxisTarget=function(t,e,r){var n=this.targetBox[t];n.min=e,n.max=r,this.hasViewportBoxUpdated=!0,this.rootParent.scheduleUpdateLayoutDelta()},e.prototype.startLayoutAxisAnimation=function(t,e){var r,n=this,i=this.axisProgress[t],o=this.targetBox[t],a=o.min,s=o.max-a;return i.clearListeners(),i.set(a),i.set(a),i.onChange((function(e){return n.setAxisTarget(t,e,e+s)})),null===(r=this.animateMotionValue)||void 0===r?void 0:r.call(this,t,i,0,e)},e.prototype.stopLayoutAnimation=function(){var t=this;ye((function(e){return t.axisProgress[e].stop()}))},e.prototype.updateLayoutDeltas=function(){var t,e,r,n,i;t=this.boxCorrected,e=this.box,ee(t.x,e.x),ee(t.y,e.y),this.parent&&(this.prevTreeScale.x=this.treeScale.x,this.prevTreeScale.y=this.treeScale.y,r=this.treeScale,n=this.parent.treeScale,i=this.parent.delta,r.x=n.x*i.x.scale,r.y=n.y*i.y.scale),function(t,e){for(var r=e.length,n=0;n<r;n++)oe(t,e[n].delta)}(this.boxCorrected,this.treePath),ve(this.delta,this.boxCorrected,this.targetBox,this.layoutOrigin),this.hasViewportBoxUpdated&&this.viewportBoxUpdateListeners.notify(this.targetBox,this.delta),this.hasViewportBoxUpdated=!1;var o=_t(this.delta,this.treeScale);o===this.deltaTransform&&this.prevTreeScale.x===this.treeScale.x&&this.prevTreeScale.y===this.treeScale.y||this.scheduleRender(),this.deltaTransform=o},e.prototype.updateTransformDeltas=function(){var t,e,r;this.isLayoutProjectionEnabled&&this.box&&(t=this.targetBoxFinal,e=this.targetBox,r=this.latest,ae(t.x,e.x,r,se),ae(t.y,e.y,r,ue),ve(this.deltaFinal,this.boxCorrected,this.targetBoxFinal,this.layoutOrigin))},e.prototype.build=function(){this.updateTransformDeltas(),void 0!==this.isVisible&&(this.style.visibility=this.isVisible?"visible":"hidden"),te(this.latest,this.style,this.vars,this.transform,this.transformOrigin,this.transformKeys,this.config,this.isLayoutProjectionEnabled&&!!this.box,this.delta,this.deltaFinal,this.treeScale,this.targetBoxFinal)},e.prototype.render=function(){for(var t in this.build(),Object.assign(this.element.style,this.style),this.vars)this.element.style.setProperty(t,this.vars[t])},e}(Ot),Re=function(t){return t.updateLayoutDelta()};function ke(t){var r=e.useRef(null);return null===r.current&&(r.current=t()),r.current}function Me(t,e,r){return"string"==typeof t?t:H.transform(e+r*t)}var Fe=function(t,e){return H.transform(t*e)},De={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ue={offset:"strokeDashoffset",array:"strokeDasharray"};var je={x:0,y:0,width:0,height:0};function Ie(t,e,r,n,i,o,a,s,u,c,l,d,h,p,v){var y=t.attrX,m=t.attrY,g=t.originX,x=t.originY,b=t.pathLength,w=t.pathSpacing,S=void 0===w?1:w,V=t.pathOffset,C=void 0===V?0:V;return te(f(t,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]),n,r,i,o,a,s,l,d,h,p,v),n.transform&&(e.transform=n.transform,delete n.transform),(void 0!==g||void 0!==x||e.transform)&&(e.transformOrigin=function(t,e,r){return Me(e,t.x,t.width)+" "+Me(r,t.y,t.height)}(u||je,void 0!==g?g:.5,void 0!==x?x:.5)),void 0!==y&&(n.x=y),void 0!==m&&(n.y=m),void 0!==c&&void 0!==b&&function(t,e,r,n,i,o){void 0===n&&(n=1),void 0===i&&(i=0),void 0===o&&(o=!0);var a=o?De:Ue;t[a.offset]=Fe(-i,e);var s=Fe(r,e),u=Fe(n,e);t[a.array]=s+" "+u}(n,c,b,S,C,!1),n}var We=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox"]),Xe=/([a-z])([A-Z])/g,Ye=function(t){return t.replace(Xe,"$1-$2").toLowerCase()},Ne=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.attrs={},e.defaultConfig={enableHardwareAcceleration:!1},e.config=e.defaultConfig,e}return o(e,t),e.prototype.mount=function(e){t.prototype.mount.call(this,e),this.measure()},e.prototype.measure=function(){try{this.dimensions="function"==typeof this.element.getBBox?this.element.getBBox():this.element.getBoundingClientRect()}catch(t){this.dimensions={x:0,y:0,width:0,height:0}}"path"===this.element.tagName&&(this.totalPathLength=this.element.getTotalLength())},e.prototype.clean=function(){t.prototype.clean.call(this),this.attrs={}},e.prototype.read=function(t){return t=We.has(t)?t:Ye(t),this.element.getAttribute(t)},e.prototype.build=function(){this.updateTransformDeltas(),Ie(this.latest,this.style,this.vars,this.attrs,this.transform,this.transformOrigin,this.transformKeys,this.config,this.dimensions,this.totalPathLength,this.isLayoutProjectionEnabled&&!!this.box,this.delta,this.deltaFinal,this.treeScale,this.targetBoxFinal)},e.prototype.render=function(){for(var e in t.prototype.render.call(this),this.attrs)this.element.setAttribute(We.has(e)?e:Ye(e),this.attrs[e])},e}(Oe);var ze=new Set(["animate","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","metadata","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","tspan","use","view"]);function _e(t){return"string"==typeof t&&ze.has(t)}var He=e.createContext(null),$e=e.createContext({variantContext:{}});var Ze=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","onLayoutAnimationComplete","onViewportBoxUpdate","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","whileHover","whileTap","onHoverEnd","onHoverStart"]);function qe(t){return Ze.has(t)}var Ge=function(t){return!qe(t)};try{var Ke=require("@emotion/is-prop-valid").default;Ge=function(t){return t.startsWith("on")?!qe(t):Ke(t)}}catch(t){}var Je=function(t){return t instanceof vt};function Qe(t,e){var r=e.layout,n=e.layoutId;return Xt(t)||Nt(t)||(r||void 0!==n)&&!!Qt[t]}function tr(t,e,r,n,i){for(var o in void 0===n&&(n=!1),n&&(t.reactStyle={}),r){var a=r[o],s=!1;if(Je(a))er.has(o)||(t.addValue(o,a),s=!0);else if(Qe(o,i)){if(t.hasValue(o)){if(a!==e[o]){if(Je(e[o]))t.addValue(o,yt(a));else t.getValue(o).set(a)}}else t.addValue(o,yt(a));s=!0}else n&&(t.reactStyle[o]=a);s&&(e[o]=a)}}var er=new Set([]),rr=function(){return{}},nr=e.createContext({transformPagePoint:function(t){return t},features:[],isStatic:!1});function ir(t){var e=t.animate,r=t.variants,n=t.inherit;return void 0===n?!!r&&!e:n}var or="undefined"!=typeof window?e.useLayoutEffect:e.useEffect;function ar(t,r){void 0===r&&(r=!1);var n=e.useRef(!0);(!r||r&&n.current)&&t(),n.current=!1}function sr(t,r,n){var i,o,a=r.variants,s=r.initial,u=r.animate,f=r.whileTap,c=r.whileHover,l=e.useContext($e).variantContext,d=l.parent,h=l.initial,p=l.animate,v=e.useContext(He),y=ur(u)||ur(f)||ur(c)||fr(u),m=a||y;!1!==(s=null!==(i=null==v?void 0:v.initial)&&void 0!==i?i:s)||fr(u)||(s=u);var g=e.useMemo((function(){return{parent:m?t:d,initial:ur(s)?s:h,animate:ur(u)?u:p}}),[n?s:null]);return ar((function(){var e=s||h;e&&function(t,e){Array.isArray(e)?Lt(t,e):"string"==typeof e?Lt(t,[e]):Pt(t,e)}(t,e)}),!n),m&&!y&&(null==d||d.addVariantChild(t)),function(t){return null===t||t.isPresent}(v)&&(null===(o=t.variantChildrenOrder)||void 0===o||o.clear()),e.useEffect((function(){m&&(null==d||d.addVariantChildOrder(t))})),e.useEffect((function(){return t.isMounted=!0,function(){var e;t.isMounted=!1,null===(e=null==d?void 0:d.variantChildren)||void 0===e||e.delete(t)}}),[]),ar((function(){t.forEachValue((function(e,r){t.baseTarget[r]=e.get()}))}),!0),g}function ur(t){return"string"==typeof t||Array.isArray(t)}function fr(t){return"object"==typeof t&&"function"==typeof t.start}function cr(t,r){var n=r.defaultFeatures,i=r.useVisualElement,o=r.render;return e.forwardRef((function(r,a){var s=e.useContext(nr).isStatic,f=i(t,r,s,a);!function(t,e){var r=ke(rr);for(var n in r){var i=Qe(n,e),o=void 0!==e[n],a=e.style&&void 0!==e.style[n],s=o&&Je(e[n]),u=a&&Je(e.style[n]);(i&&!o&&!a||!i&&!s&&!u)&&(t.removeValue(n),delete r[n])}tr(t,r,e,!1,e),e.style&&tr(t,r,e.style,!0,e),e.transformValues&&(t.reactStyle=e.transformValues(t.reactStyle))}(f,r);var c=sr(f,r,s),d=function(t,r,n,i){var o=e.useContext(nr);if(r||"undefined"==typeof window)return null;for(var a=l(t,o.features),s=a.length,f=[],c=0;c<s;c++){var d=a[c],h=d.shouldRender,p=d.key,v=d.getComponent;if(h(i)){var y=v(i);y&&f.push(e.createElement(y,u({key:p},i,{visualElement:n,inherit:ir(i)})))}}return f}(n,s,f,r),h=e.useMemo((function(){return{visualElement:f,variantContext:c}}),[f,c]),v=o(t,r,f);return function(t){var r=e.useContext(y);or((function(){return function(){p(r)&&r.remove(t)}}),[])}(f),e.createElement(e.Fragment,null,e.createElement($e.Provider,{value:h},v),d)}))}var lr={useVisualElement:function(t,r,n,i){var o=e.useContext($e).visualElement,a=ke((function(){return new(_e(t)?Ne:Oe)(o,i)}));a.updateConfig(u(u(u({},a.config),{enableHardwareAcceleration:!n}),r)),a.layoutId=r.layoutId;var s=e.useContext(He),f=null===s||s.isPresent;a.isPresent=void 0!==r.isPresent?r.isPresent:f;var c=null==s?void 0:s.id;return a.isPresenceRoot=!o||o.presenceId!==c,e.useEffect((function(){if(r.onViewportBoxUpdate)return a.onViewportBoxUpdate(r.onViewportBoxUpdate)}),[r.onViewportBoxUpdate]),a},render:function(t,r,n){var i="string"==typeof t?function(t){var e={};for(var r in t)Ge(r)&&(e[r]=t[r]);return e}(r):r;n.clean(),n.build();var o=_e(t)?function(t){return u(u({},t.attrs),{style:u({},t.reactStyle)})}(n):function(t,e){var r=e.drag,n={style:u(u(u({},t.reactStyle),t.style),t.vars)};return r&&(n.draggable=!1,n.style.userSelect="none",n.style.touchAction=!0===r?"none":"pan-"+("x"===r?"y":"x")),n}(n,r);return e.createElement(t,u(u(u({},i),{ref:n.ref}),o))}};function dr(t){var e=u(u({},lr),{defaultFeatures:t});var r=new Map;return new Proxy({custom:function(t){return cr(t,e)}},{get:function(t,n){return"custom"===n?t.custom:(r.has(n)||r.set(n,cr(n,e)),r.get(n))}})}var hr=dr([x]);t.m=hr,Object.defineProperty(t,"__esModule",{value:!0})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "framer-motion",
3
- "version": "2.9.0",
3
+ "version": "2.9.4",
4
4
  "main": "dist/framer-motion.cjs.js",
5
5
  "module": "dist/framer-motion.es.js",
6
6
  "types": "types/index.d.ts",
package/types/index.d.ts CHANGED
@@ -49,6 +49,7 @@ export { createMotionComponent } from "./motion";
49
49
  export { useAnimatedState } from "./animation/use-animated-state";
50
50
  export { addScaleCorrection } from "./render/dom/layout/scale-correction";
51
51
  export { startAnimation } from "./animation/utils/transitions";
52
+ export { startVisualElementAnimation } from "./render/VisualElement/utils/animation";
52
53
  /**
53
54
  * Contexts
54
55
  */
@@ -60,7 +61,7 @@ export { PresenceContext } from "./components/AnimatePresence/PresenceContext";
60
61
  export { HTMLMotionProps, SVGMotionProps, SVGAttributesAsMotionValues, ForwardRefComponent, } from "./render/dom/types";
61
62
  export { CustomDomComponent } from "./render/dom";
62
63
  export { AnimationProps, MotionProps, MotionCallbacks, MotionAdvancedProps, MotionStyle, MotionTransform, VariantLabels, RelayoutInfo, ResolveLayoutTransition, } from "./motion/types";
63
- export { Orchestration, Repeat, Tween, Spring, Keyframes, Inertia, None, EasingFunction, TargetAndTransition, Transition, ResolvedKeyframesTarget, KeyframesTarget, CustomValueType, ResolvedSingleTarget, SingleTarget, ResolvedValueTarget, ValueTarget, Variant, Variants, } from "./types";
64
+ export { Orchestration, Repeat, Tween, Spring, Keyframes, Inertia, None, EasingFunction, Target, TargetAndTransition, Transition, ResolvedKeyframesTarget, KeyframesTarget, CustomValueType, ResolvedSingleTarget, SingleTarget, ResolvedValueTarget, ValueTarget, Variant, Variants, } from "./types";
64
65
  export { EventInfo } from "./events/types";
65
66
  export { MotionFeature, FeatureProps } from "./motion/features/types";
66
67
  export { GestureHandlers } from "./gestures";
@@ -12,6 +12,9 @@ export declare type MakeTargetAnimatable = (visualElement: VisualElement, target
12
12
  target: TargetWithKeyframes;
13
13
  transitionEnd?: Target;
14
14
  };
15
+ /**
16
+ * @internal
17
+ */
15
18
  export declare function startVisualElementAnimation(visualElement: VisualElement, definition: AnimationDefinition, opts?: AnimationOptions): Promise<void>;
16
19
  export declare function stopAnimation(visualElement: VisualElement): void;
17
20
  export declare function animateTarget(visualElement: VisualElement, definition: Variant, { delay, priority, transitionOverride, custom, }?: AnimationOptions): Promise<any>;