framer-motion 2.5.0 → 2.5.5

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,6 +2,36 @@
2
2
 
3
3
  Framer Motion adheres to [Semantic Versioning](http://semver.org/).
4
4
 
5
+ ## [2.5.5] 2020-08-20
6
+
7
+ ### Fixed
8
+
9
+ - Tweaked `restDelta` in `popmotion@9.0.0-rc.7` for smoother `opacity` transitions.
10
+
11
+ ## [2.5.4] 2020-08-20
12
+
13
+ ### Fixed
14
+
15
+ - Fixed jumpy drag transitions resulting from existing animations not being correctly stopped.
16
+
17
+ ## [2.5.3] 2020-08-20
18
+
19
+ ### Fixed
20
+
21
+ - Improved velocity check for underdamped springs.
22
+
23
+ ## [2.5.2] 2020-08-20
24
+
25
+ ### Fixed
26
+
27
+ - Drag transitionEnd conflicting with layout animations.
28
+
29
+ ## [2.5.1] 2020-08-18
30
+
31
+ ### Fixed
32
+
33
+ - Occasional glitchy movement with `type: "spring"` and `repeatType: "mirror"`
34
+
5
35
  ## [2.5.0] 2020-08-18
6
36
 
7
37
  ### Added
@@ -7355,7 +7355,7 @@
7355
7355
  },
7356
7356
  {
7357
7357
  "kind": "PropertySignature",
7358
- "docComment": "/**\n * When repeating an animation using `loop`, `flip`, or `yoyo`, `repeatDelay` can set the duration of the time to wait, in seconds, between each repetition.\n *\n * @library\n * ```jsx\n * const transition = {\n * yoyo: Infinity,\n * repeatDelay: 1\n * }\n *\n * <Frame\n * animate={{ rotate: 180 }}\n * transition={transition}\n * />\n * ```\n *\n * @motion\n * ```jsx\n * <motion.div\n * animate={{ rotate: 180 }}\n * transition={{ yoyo: Infinity, repeatDelay: 1 }}\n * />\n * ```\n *\n * @public\n */\n",
7358
+ "docComment": "/**\n * When repeating an animation, `repeatDelay` will set the duration of the time to wait, in seconds, between each repetition.\n *\n * @library\n * ```jsx\n * const transition = {\n * repeat: Infinity,\n * repeatDelay: 1\n * }\n *\n * <Frame\n * animate={{ rotate: 180 }}\n * transition={transition}\n * />\n * ```\n *\n * @motion\n * ```jsx\n * <motion.div\n * animate={{ rotate: 180 }}\n * transition={{ repeat: Infinity, repeatDelay: 1 }}\n * />\n * ```\n *\n * @public\n */\n",
7359
7359
  "excerptTokens": [
7360
7360
  {
7361
7361
  "kind": "Reference",
@@ -7383,7 +7383,7 @@
7383
7383
  },
7384
7384
  {
7385
7385
  "kind": "PropertySignature",
7386
- "docComment": "/**\n * How to repeat the animation. This can be either: - \"loop\": Repeats the animation from the start - \"reverse\": Alternates between forward and backwards playback - \"mirror\": Switchs `from` and `to` alternately\n *\n * @library\n * ```jsx\n * const transition = {\n * repeat: 1,\n * repeatType: \"reverse\",\n * duration: 2\n * }\n *\n * <Frame\n * animate={{ rotate: 180 }}\n * transition={transition}\n * />\n * ```\n *\n * @motion\n * ```jsx\n * <motion.div\n * animate={{ rotate: 180 }}\n * transition={{\n * repeat: 1,\n * repeatType: \"reverse\",\n * duration: 2\n * }}\n * />\n * ```\n *\n * @public\n */\n",
7386
+ "docComment": "/**\n * How to repeat the animation. This can be either:\n *\n * \"loop\": Repeats the animation from the start\n *\n * \"reverse\": Alternates between forward and backwards playback\n *\n * \"mirror\": Switchs `from` and `to` alternately\n *\n * @library\n * ```jsx\n * const transition = {\n * repeat: 1,\n * repeatType: \"reverse\",\n * duration: 2\n * }\n *\n * <Frame\n * animate={{ rotate: 180 }}\n * transition={transition}\n * />\n * ```\n *\n * @motion\n * ```jsx\n * <motion.div\n * animate={{ rotate: 180 }}\n * transition={{\n * repeat: 1,\n * repeatType: \"reverse\",\n * duration: 2\n * }}\n * />\n * ```\n *\n * @public\n */\n",
7387
7387
  "excerptTokens": [
7388
7388
  {
7389
7389
  "kind": "Reference",
@@ -2,16 +2,39 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
6
-
7
5
  var tslib = require('tslib');
8
6
  var sync = require('framesync');
9
- var sync__default = _interopDefault(sync);
10
7
  var easingLookup = require('popmotion');
11
8
  var heyListen = require('hey-listen');
12
9
  var styleValueTypes = require('style-value-types');
13
10
  var React = require('react');
14
- var React__default = _interopDefault(React);
11
+
12
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
13
+
14
+ function _interopNamespace(e) {
15
+ if (e && e.__esModule) { return e; } else {
16
+ var n = Object.create(null);
17
+ if (e) {
18
+ Object.keys(e).forEach(function (k) {
19
+ if (k !== 'default') {
20
+ var d = Object.getOwnPropertyDescriptor(e, k);
21
+ Object.defineProperty(n, k, d.get ? d : {
22
+ enumerable: true,
23
+ get: function () {
24
+ return e[k];
25
+ }
26
+ });
27
+ }
28
+ });
29
+ }
30
+ n['default'] = e;
31
+ return Object.freeze(n);
32
+ }
33
+ }
34
+
35
+ var sync__default = /*#__PURE__*/_interopDefaultLegacy(sync);
36
+ var easingLookup__namespace = /*#__PURE__*/_interopNamespace(easingLookup);
37
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
15
38
 
16
39
  var isRefObject = function (ref) {
17
40
  return typeof ref === "object" && ref.hasOwnProperty("current");
@@ -124,7 +147,7 @@ var MotionValue = /** @class */ (function () {
124
147
  if (_this.lastUpdated !== timestamp) {
125
148
  _this.timeDelta = delta;
126
149
  _this.lastUpdated = timestamp;
127
- sync__default.postRender(_this.scheduleVelocityCheck);
150
+ sync__default['default'].postRender(_this.scheduleVelocityCheck);
128
151
  }
129
152
  };
130
153
  /**
@@ -135,7 +158,7 @@ var MotionValue = /** @class */ (function () {
135
158
  *
136
159
  * @internal
137
160
  */
138
- this.scheduleVelocityCheck = function () { return sync__default.postRender(_this.velocityCheck); };
161
+ this.scheduleVelocityCheck = function () { return sync__default['default'].postRender(_this.velocityCheck); };
139
162
  /**
140
163
  * Updates `prev` with `current` if the value hasn't been updated this frame.
141
164
  * This ensures velocity calculations return `0`.
@@ -403,7 +426,7 @@ var VisualElement = /** @class */ (function () {
403
426
  this.update = function () { return _this.config.onUpdate(_this.latest); };
404
427
  // Pre-bound version of render
405
428
  this.triggerRender = function () { return _this.render(); };
406
- this.scheduleRender = function () { return sync__default.render(_this.triggerRender, false, true); };
429
+ this.scheduleRender = function () { return sync__default['default'].render(_this.triggerRender, false, true); };
407
430
  // This function gets passed to the rendered component's `ref` prop
408
431
  // and is used to mount/unmount the VisualElement
409
432
  this.ref = function (element) {
@@ -490,7 +513,7 @@ var VisualElement = /** @class */ (function () {
490
513
  }
491
514
  };
492
515
  VisualElement.prototype.scheduleUpdateLayoutDelta = function () {
493
- sync__default.update(this.rootParent.updateLayoutDelta, false, true);
516
+ sync__default['default'].update(this.rootParent.updateLayoutDelta, false, true);
494
517
  };
495
518
  // Subscribe to changes in a MotionValue
496
519
  VisualElement.prototype.subscribeToValue = function (key, value) {
@@ -498,7 +521,7 @@ var VisualElement = /** @class */ (function () {
498
521
  var onChange = function (latest) {
499
522
  _this.setSingleStaticValue(key, latest);
500
523
  _this.latest[key] = latest;
501
- _this.config.onUpdate && sync__default.update(_this.update, false, true);
524
+ _this.config.onUpdate && sync__default['default'].update(_this.update, false, true);
502
525
  };
503
526
  var unsubscribeOnChange = value.onChange(onChange);
504
527
  var unsubscribeOnRender = value.onRenderRequest(this.scheduleRender);
@@ -1293,8 +1316,8 @@ var easingDefinitionToFunction = function (definition) {
1293
1316
  }
1294
1317
  else if (typeof definition === "string") {
1295
1318
  // Else lookup from table
1296
- heyListen.invariant(easingLookup[definition] !== undefined, "Invalid easing type '" + definition + "'");
1297
- return easingLookup[definition];
1319
+ heyListen.invariant(easingLookup__namespace[definition] !== undefined, "Invalid easing type '" + definition + "'");
1320
+ return easingLookup__namespace[definition];
1298
1321
  }
1299
1322
  return definition;
1300
1323
  };
@@ -1420,6 +1443,7 @@ function getAnimation(key, value, target, transition, onComplete) {
1420
1443
  function set() {
1421
1444
  value.set(target);
1422
1445
  onComplete();
1446
+ return { stop: function () { } };
1423
1447
  }
1424
1448
  return !isOriginAnimatable ||
1425
1449
  !isTargetAnimatable ||
@@ -1437,8 +1461,10 @@ function startAnimation(key, value, target, transition) {
1437
1461
  if (transition === void 0) { transition = {}; }
1438
1462
  return value.start(function (onComplete) {
1439
1463
  var delayTimer;
1440
- var start = getAnimation(key, value, target, transition, onComplete);
1464
+ var controls;
1465
+ var animation = getAnimation(key, value, target, transition, onComplete);
1441
1466
  var delay = getDelayFromTransition(transition, key);
1467
+ var start = function () { return (controls = animation()); };
1442
1468
  if (delay) {
1443
1469
  delayTimer = setTimeout(start, secondsToMilliseconds(delay));
1444
1470
  }
@@ -1447,6 +1473,7 @@ function startAnimation(key, value, target, transition) {
1447
1473
  }
1448
1474
  return function () {
1449
1475
  clearTimeout(delayTimer);
1476
+ controls === null || controls === void 0 ? void 0 : controls.stop();
1450
1477
  };
1451
1478
  });
1452
1479
  }
@@ -4231,7 +4258,7 @@ var PanSession = /** @class */ (function () {
4231
4258
  return;
4232
4259
  }
4233
4260
  // Throttle mouse move event to once per frame
4234
- sync__default.update(this.updatePoint, true);
4261
+ sync__default['default'].update(this.updatePoint, true);
4235
4262
  };
4236
4263
  PanSession.prototype.handlePointerUp = function (event, info) {
4237
4264
  this.end();
@@ -5515,10 +5542,10 @@ var Animate = /** @class */ (function (_super) {
5515
5542
  };
5516
5543
  // Synchronously run a frame to ensure there's no flash of the uncorrected bounding box.
5517
5544
  frame();
5518
- // Start the animation on this axis
5519
- var animation = startAnimation(axis === "x" ? "layoutX" : "layoutY", layoutProgress, progressTarget, transition || this.props.transition || defaultTransition);
5520
5545
  // Create a function to stop animation on this specific axis
5521
5546
  var unsubscribeProgress = layoutProgress.onChange(frame);
5547
+ // Start the animation on this axis
5548
+ var animation = startAnimation(axis === "x" ? "layoutX" : "layoutY", layoutProgress, progressTarget, transition || this.props.transition || defaultTransition).then(unsubscribeProgress);
5522
5549
  this.stopAxisAnimation[axis] = function () {
5523
5550
  layoutProgress.stop();
5524
5551
  unsubscribeProgress();
@@ -5634,10 +5661,10 @@ var Measure = /** @class */ (function (_super) {
5634
5661
  return null;
5635
5662
  };
5636
5663
  return Measure;
5637
- }(React__default.Component));
5664
+ }(React__default['default'].Component));
5638
5665
  function MeasureContextProvider(props) {
5639
5666
  var syncLayout = React.useContext(SharedLayoutContext);
5640
- return React__default.createElement(Measure, tslib.__assign({}, props, { syncLayout: syncLayout }));
5667
+ return React__default['default'].createElement(Measure, tslib.__assign({}, props, { syncLayout: syncLayout }));
5641
5668
  }
5642
5669
  var MeasureLayout = {
5643
5670
  key: "measure-layout",
@@ -6428,7 +6455,7 @@ function useCombineMotionValues(values, combineValues) {
6428
6455
  * Subscribe to all motion values found within the template. Whenever any of them change,
6429
6456
  * schedule an update.
6430
6457
  */
6431
- useMultiOnChange(values, function () { return sync__default.update(updateValue, false, true); });
6458
+ useMultiOnChange(values, function () { return sync__default['default'].update(updateValue, false, true); });
6432
6459
  return value;
6433
6460
  }
6434
6461
 
@@ -3708,7 +3708,7 @@ declare namespace React_2 {
3708
3708
  * inside your component or have to validate them.
3709
3709
  */
3710
3710
  interface Attributes {
3711
- key?: Key;
3711
+ key?: Key | null;
3712
3712
  }
3713
3713
  interface RefAttributes<T> extends Attributes {
3714
3714
  ref?: Ref<T>;
@@ -4774,6 +4774,7 @@ declare namespace React_2 {
4774
4774
 
4775
4775
  interface KeyboardEvent<T = Element> extends SyntheticEvent<T, NativeKeyboardEvent> {
4776
4776
  altKey: boolean;
4777
+ /** @deprecated */
4777
4778
  charCode: number;
4778
4779
  ctrlKey: boolean;
4779
4780
  /**
@@ -4784,6 +4785,7 @@ declare namespace React_2 {
4784
4785
  * See the [DOM Level 3 Events spec](https://www.w3.org/TR/uievents-key/#named-key-attribute-values). for possible values
4785
4786
  */
4786
4787
  key: string;
4788
+ /** @deprecated */
4787
4789
  keyCode: number;
4788
4790
  locale: string;
4789
4791
  location: number;
@@ -5599,6 +5601,7 @@ declare namespace React_2 {
5599
5601
  allowTransparency?: boolean;
5600
5602
  frameBorder?: number | string;
5601
5603
  height?: number | string;
5604
+ loading?: "eager" | "lazy";
5602
5605
  marginHeight?: number;
5603
5606
  marginWidth?: number;
5604
5607
  name?: string;
@@ -6523,9 +6526,12 @@ export declare interface Repeat {
6523
6526
  repeat?: number;
6524
6527
  /**
6525
6528
  * How to repeat the animation. This can be either:
6526
- * - "loop": Repeats the animation from the start
6527
- * - "reverse": Alternates between forward and backwards playback
6528
- * - "mirror": Switchs `from` and `to` alternately
6529
+ *
6530
+ * "loop": Repeats the animation from the start
6531
+ *
6532
+ * "reverse": Alternates between forward and backwards playback
6533
+ *
6534
+ * "mirror": Switchs `from` and `to` alternately
6529
6535
  *
6530
6536
  * @library
6531
6537
  *
@@ -6559,14 +6565,14 @@ export declare interface Repeat {
6559
6565
  */
6560
6566
  repeatType?: "loop" | "reverse" | "mirror";
6561
6567
  /**
6562
- * When repeating an animation using `loop`, `flip`, or `yoyo`, `repeatDelay` can set the
6568
+ * When repeating an animation, `repeatDelay` will set the
6563
6569
  * duration of the time to wait, in seconds, between each repetition.
6564
6570
  *
6565
6571
  * @library
6566
6572
  *
6567
6573
  * ```jsx
6568
6574
  * const transition = {
6569
- * yoyo: Infinity,
6575
+ * repeat: Infinity,
6570
6576
  * repeatDelay: 1
6571
6577
  * }
6572
6578
  *
@@ -6581,7 +6587,7 @@ export declare interface Repeat {
6581
6587
  * ```jsx
6582
6588
  * <motion.div
6583
6589
  * animate={{ rotate: 180 }}
6584
- * transition={{ yoyo: Infinity, repeatDelay: 1 }}
6590
+ * transition={{ repeat: Infinity, repeatDelay: 1 }}
6585
6591
  * />
6586
6592
  * ```
6587
6593
  *
@@ -1,10 +1,12 @@
1
1
  (function (global, factory) {
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
3
3
  typeof define === 'function' && define.amd ? define(['exports', 'react'], factory) :
4
- (global = global || self, factory(global.Motion = {}, global.React));
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Motion = {}, global.React));
5
5
  }(this, (function (exports, React) { 'use strict';
6
6
 
7
- var React__default = 'default' in React ? React['default'] : React;
7
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
+
9
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
8
10
 
9
11
  /*! *****************************************************************************
10
12
  Copyright (c) Microsoft Corporation.
@@ -490,26 +492,37 @@
490
492
  var expoDecay = angularFreq * Math.sqrt(1.0 - dampingRatio * dampingRatio);
491
493
  return to - envelope * ((initialVelocity + dampingRatio * angularFreq * initialDelta) / expoDecay * Math.sin(expoDecay * t) + initialDelta * Math.cos(expoDecay * t));
492
494
  };
495
+ this.resolveVelocity = function (t) {
496
+ var envelope = Math.exp(-dampingRatio * angularFreq * t);
497
+ var expoDecay = angularFreq * Math.sqrt(1.0 - dampingRatio * dampingRatio);
498
+ return dampingRatio * angularFreq * envelope * (Math.sin(expoDecay * t) * (initialVelocity + dampingRatio * angularFreq * initialDelta) / expoDecay + initialDelta * Math.cos(expoDecay * t)) - envelope * (Math.cos(expoDecay * t) * (initialVelocity + dampingRatio * angularFreq * initialDelta) - expoDecay * initialDelta * Math.sin(expoDecay * t));
499
+ };
493
500
  } else if (dampingRatio === 1) {
494
501
  this.resolveSpring = function (t) {
495
502
  var envelope = Math.exp(-angularFreq * t);
496
503
  return to - envelope * (1 + angularFreq * t);
497
504
  };
505
+ this.resolveVelocity = function () {
506
+ return 0;
507
+ };
498
508
  } else {
499
509
  var dampedAngularFreq_1 = angularFreq * Math.sqrt(dampingRatio * dampingRatio - 1);
500
510
  this.resolveSpring = function (t) {
501
511
  var envelope = Math.exp(-dampingRatio * angularFreq * t);
502
512
  return to - envelope * ((initialVelocity + dampingRatio * angularFreq * initialDelta) * Math.sinh(dampedAngularFreq_1 * t) + dampedAngularFreq_1 * initialDelta * Math.cosh(dampedAngularFreq_1 * t)) / dampedAngularFreq_1;
503
513
  };
514
+ this.resolveVelocity = function () {
515
+ return 0;
516
+ };
504
517
  }
505
518
  };
506
519
  SpringAnimator.prototype.update = function (t) {
507
- var latest = this.resolveSpring(t);
508
520
  var _a = this.options,
509
- velocity = _a.velocity,
510
521
  restSpeed = _a.restSpeed,
511
522
  restDelta = _a.restDelta,
512
523
  to = _a.to;
524
+ var latest = this.resolveSpring(t);
525
+ var velocity = this.resolveVelocity(t) * 1000;
513
526
  var isBelowVelocityThreshold = Math.abs(velocity) <= restSpeed;
514
527
  var isBelowDisplacementThreshold = Math.abs(to - latest) <= restDelta;
515
528
  this.isComplete = isBelowVelocityThreshold && isBelowDisplacementThreshold;
@@ -529,10 +542,10 @@
529
542
  _g = _a.mass,
530
543
  mass = _g === void 0 ? 1.0 : _g,
531
544
  _h = _a.restSpeed,
532
- restSpeed = _h === void 0 ? 0.005 : _h,
545
+ restSpeed = _h === void 0 ? 10 : _h,
533
546
  restDelta = _a.restDelta;
534
547
  if (restDelta === undefined) {
535
- restDelta = Math.abs(to - from) < 1 ? 0.01 : 0.5;
548
+ restDelta = Math.abs(to - from) <= 1 ? 0.01 : 0.5;
536
549
  }
537
550
  this.options = {
538
551
  from: from,
@@ -1038,6 +1051,8 @@
1038
1051
  var driverControls;
1039
1052
  var repeatCount = 0;
1040
1053
  var computedDuration = options.duration;
1054
+ var latest;
1055
+ var isComplete = false;
1041
1056
  var isForwardPlayback = true;
1042
1057
  var interpolateFromNumber;
1043
1058
  var Animator = detectAnimationFromOptions(options);
@@ -1058,6 +1073,7 @@
1058
1073
  elapsed = loopElapsed(elapsed, computedDuration, repeatDelay);
1059
1074
  if (repeatType === "mirror") animation.flipTarget();
1060
1075
  }
1076
+ isComplete = false;
1061
1077
  animation.isComplete = false;
1062
1078
  onRepeat && onRepeat();
1063
1079
  }
@@ -1069,12 +1085,12 @@
1069
1085
  var _a;
1070
1086
  if (!isForwardPlayback) delta = -delta;
1071
1087
  elapsed += delta;
1072
- var latest = animation.update(Math.max(0, elapsed));
1073
- if (interpolateFromNumber) {
1074
- latest = interpolateFromNumber(latest);
1088
+ if (!isComplete) {
1089
+ latest = animation.update(Math.max(0, elapsed));
1090
+ if (interpolateFromNumber) latest = interpolateFromNumber(latest);
1091
+ isComplete = isForwardPlayback ? animation.isComplete : elapsed <= 0;
1075
1092
  }
1076
1093
  (_a = onUpdate) === null || _a === void 0 ? void 0 : _a(latest);
1077
- var isComplete = isForwardPlayback ? animation.isComplete : elapsed <= 0;
1078
1094
  if (isComplete) {
1079
1095
  if (repeatCount === 0 && computedDuration === undefined) {
1080
1096
  computedDuration = elapsed;
@@ -2875,6 +2891,7 @@
2875
2891
  function set() {
2876
2892
  value.set(target);
2877
2893
  onComplete();
2894
+ return { stop: function () { } };
2878
2895
  }
2879
2896
  return !isOriginAnimatable ||
2880
2897
  !isTargetAnimatable ||
@@ -2892,8 +2909,10 @@
2892
2909
  if (transition === void 0) { transition = {}; }
2893
2910
  return value.start(function (onComplete) {
2894
2911
  var delayTimer;
2895
- var start = getAnimation(key, value, target, transition, onComplete);
2912
+ var controls;
2913
+ var animation = getAnimation(key, value, target, transition, onComplete);
2896
2914
  var delay = getDelayFromTransition(transition, key);
2915
+ var start = function () { return (controls = animation()); };
2897
2916
  if (delay) {
2898
2917
  delayTimer = setTimeout(start, secondsToMilliseconds(delay));
2899
2918
  }
@@ -2902,6 +2921,7 @@
2902
2921
  }
2903
2922
  return function () {
2904
2923
  clearTimeout(delayTimer);
2924
+ controls === null || controls === void 0 ? void 0 : controls.stop();
2905
2925
  };
2906
2926
  });
2907
2927
  }
@@ -6970,10 +6990,10 @@
6970
6990
  };
6971
6991
  // Synchronously run a frame to ensure there's no flash of the uncorrected bounding box.
6972
6992
  frame();
6973
- // Start the animation on this axis
6974
- var animation = startAnimation(axis === "x" ? "layoutX" : "layoutY", layoutProgress, progressTarget, transition || this.props.transition || defaultTransition);
6975
6993
  // Create a function to stop animation on this specific axis
6976
6994
  var unsubscribeProgress = layoutProgress.onChange(frame);
6995
+ // Start the animation on this axis
6996
+ var animation = startAnimation(axis === "x" ? "layoutX" : "layoutY", layoutProgress, progressTarget, transition || this.props.transition || defaultTransition).then(unsubscribeProgress);
6977
6997
  this.stopAxisAnimation[axis] = function () {
6978
6998
  layoutProgress.stop();
6979
6999
  unsubscribeProgress();
@@ -7089,10 +7109,10 @@
7089
7109
  return null;
7090
7110
  };
7091
7111
  return Measure;
7092
- }(React__default.Component));
7112
+ }(React__default['default'].Component));
7093
7113
  function MeasureContextProvider(props) {
7094
7114
  var syncLayout = React.useContext(SharedLayoutContext);
7095
- return React__default.createElement(Measure, __assign({}, props, { syncLayout: syncLayout }));
7115
+ return React__default['default'].createElement(Measure, __assign({}, props, { syncLayout: syncLayout }));
7096
7116
  }
7097
7117
  var MeasureLayout = {
7098
7118
  key: "measure-layout",
@@ -4,7 +4,7 @@ import * as easingLookup from 'popmotion';
4
4
  import { velocityPerSecond, mix, clamp, distance, progress, cubicBezier, inertia, animate, linear, circOut, interpolate, wrap } from 'popmotion';
5
5
  import { invariant, warning } from 'hey-listen';
6
6
  import { number, color, complex, px, percent, degrees, vw, vh, scale, alpha, progressPercentage } from 'style-value-types';
7
- import React__default, { useRef, createContext, useContext, useEffect, createElement, useMemo, useLayoutEffect, forwardRef, Fragment, Component as Component$1, useCallback, useState, cloneElement, Children, isValidElement } from 'react';
7
+ import React, { useRef, createContext, useContext, useEffect, createElement, useMemo, useLayoutEffect, forwardRef, Fragment, Component as Component$1, useCallback, useState, cloneElement, Children, isValidElement } from 'react';
8
8
 
9
9
  var isRefObject = function (ref) {
10
10
  return typeof ref === "object" && ref.hasOwnProperty("current");
@@ -1413,6 +1413,7 @@ function getAnimation(key, value, target, transition, onComplete) {
1413
1413
  function set() {
1414
1414
  value.set(target);
1415
1415
  onComplete();
1416
+ return { stop: function () { } };
1416
1417
  }
1417
1418
  return !isOriginAnimatable ||
1418
1419
  !isTargetAnimatable ||
@@ -1430,8 +1431,10 @@ function startAnimation(key, value, target, transition) {
1430
1431
  if (transition === void 0) { transition = {}; }
1431
1432
  return value.start(function (onComplete) {
1432
1433
  var delayTimer;
1433
- var start = getAnimation(key, value, target, transition, onComplete);
1434
+ var controls;
1435
+ var animation = getAnimation(key, value, target, transition, onComplete);
1434
1436
  var delay = getDelayFromTransition(transition, key);
1437
+ var start = function () { return (controls = animation()); };
1435
1438
  if (delay) {
1436
1439
  delayTimer = setTimeout(start, secondsToMilliseconds(delay));
1437
1440
  }
@@ -1440,6 +1443,7 @@ function startAnimation(key, value, target, transition) {
1440
1443
  }
1441
1444
  return function () {
1442
1445
  clearTimeout(delayTimer);
1446
+ controls === null || controls === void 0 ? void 0 : controls.stop();
1443
1447
  };
1444
1448
  });
1445
1449
  }
@@ -5508,10 +5512,10 @@ var Animate = /** @class */ (function (_super) {
5508
5512
  };
5509
5513
  // Synchronously run a frame to ensure there's no flash of the uncorrected bounding box.
5510
5514
  frame();
5511
- // Start the animation on this axis
5512
- var animation = startAnimation(axis === "x" ? "layoutX" : "layoutY", layoutProgress, progressTarget, transition || this.props.transition || defaultTransition);
5513
5515
  // Create a function to stop animation on this specific axis
5514
5516
  var unsubscribeProgress = layoutProgress.onChange(frame);
5517
+ // Start the animation on this axis
5518
+ var animation = startAnimation(axis === "x" ? "layoutX" : "layoutY", layoutProgress, progressTarget, transition || this.props.transition || defaultTransition).then(unsubscribeProgress);
5515
5519
  this.stopAxisAnimation[axis] = function () {
5516
5520
  layoutProgress.stop();
5517
5521
  unsubscribeProgress();
@@ -5627,10 +5631,10 @@ var Measure = /** @class */ (function (_super) {
5627
5631
  return null;
5628
5632
  };
5629
5633
  return Measure;
5630
- }(React__default.Component));
5634
+ }(React.Component));
5631
5635
  function MeasureContextProvider(props) {
5632
5636
  var syncLayout = useContext(SharedLayoutContext);
5633
- return React__default.createElement(Measure, __assign({}, props, { syncLayout: syncLayout }));
5637
+ return React.createElement(Measure, __assign({}, props, { syncLayout: syncLayout }));
5634
5638
  }
5635
5639
  var MeasureLayout = {
5636
5640
  key: "measure-layout",
@@ -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=t||self).Motion={},t.React)}(this,(function(t,n){"use strict";var e="default"in n?n.default:n,r=function(t,n){return(r=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 o(t,n){function e(){this.constructor=t}r(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)}var i=function(){return(i=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 a(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 u(){for(var t=[],n=0;n<arguments.length;n++)t=t.concat(s(arguments[n]));return t}var c,f=function(t){return"object"==typeof t&&t.hasOwnProperty("current")},l=0,p="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)};!function(t){t.Read="read",t.Update="update",t.Render="render",t.PostRender="postRender",t.FixedUpdate="fixedUpdate"}(c||(c={}));var d=1/60*1e3,h=!0,v=!1,m=!1,y={delta:0,timestamp:0},g=[c.Read,c.Update,c.Render,c.PostRender],x=function(t){return v=t},b=g.reduce((function(t,n){var e=function(t){var n=[],e=[],r=0,o=!1,i=0,a=new WeakSet,s=new WeakSet,u={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!==s.has(l)||a.has(l)||(u.schedule(l),t(!0));o=!1},schedule:function(t,i,u){void 0===i&&(i=!1),void 0===u&&(u=!1);var c=u&&o,f=c?n:e;a.delete(t),i&&s.add(t),-1===f.indexOf(t)&&(f.push(t),c&&(r=n.length))}};return u}(x);return t.sync[n]=function(t,n,r){return void 0===n&&(n=!1),void 0===r&&(r=!1),v||A(),e.schedule(t,n,r),t},t.cancelSync[n]=function(t){return e.cancel(t)},t.steps[n]=e,t}),{steps:{},sync:{},cancelSync:{}}),E=b.steps,w=b.sync,C=b.cancelSync,P=function(t){return E[t].process(y)},S=function(t){v=!1,y.delta=h?d:Math.max(Math.min(t-y.timestamp,40),1),h||(d=y.delta),y.timestamp=t,m=!0,g.forEach(P),m=!1,v&&(h=!1,p(S))},A=function(){v=!0,h=!0,m||p(S)},V=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},L=/(-)?(\d[\d\.]*)/g,B=/(#[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,O=/^(#[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=i(i({},k),{transform:M(0,1)}),D=i(i({},k),{default:1}),F=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}}},U=F("deg"),I=F("%"),H=F("px"),j=F("vh"),X=F("vw"),Y=i(i({},I),{parse:function(t){return I.parse(t)/100},transform:function(t){return I.transform(100*t)}}),z=M(0,255),W=function(t){return void 0!==t.red},N=function(t){return void 0!==t.hue};var _=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}},q=i(i({},k),{transform:function(t){return Math.round(z(t))}});function G(t,n){return t.startsWith(n)&&O.test(t)}var Z={test:function(t){return"string"==typeof t?G(t,"rgb"):W(t)},parse:_(["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:q.transform(n),green:q.transform(e),blue:q.transform(r),alpha:T(R.transform(i))})}},$={test:function(t){return"string"==typeof t?G(t,"hsl"):N(t)},parse:_(["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:I.transform(T(e)),lightness:I.transform(T(r)),alpha:T(R.transform(i))})}},K=i(i({},Z),{test:function(t){return"string"==typeof t&&G(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}}}),J={test:function(t){return"string"==typeof t&&O.test(t)||W(t)||N(t)},parse:function(t){return Z.test(t)?Z.parse(t):$.test(t)?$.parse(t):K.test(t)?K.parse(t):t},transform:function(t){return W(t)?Z.transform(t):N(t)?$.transform(t):t}},Q=function(t){return"number"==typeof t?0:t},tt={test:function(t){if("string"!=typeof t||!isNaN(t))return!1;var n=0,e=t.match(L),r=t.match(B);return e&&(n+=e.length),r&&(n+=r.length),n>0},parse:function(t){var n=t,e=[],r=n.match(B);r&&(n=n.replace(B,"${c}"),e.push.apply(e,r.map(J.parse)));var o=n.match(L);return o&&e.push.apply(e,o.map(k.parse)),e},createTransformer:function(t){var n=t,e=0,r=t.match(B),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(L),s=a?a.length:0;if(a)for(i=0;i<s;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?J.transform(t[i]):T(t[i]));return r}},getAnimatableNone:function(t){var n=tt.parse(t);return tt.createTransformer(t)(n.map(Q))}},nt=function(){function t(t){this.isComplete=!1,this.updateOptions(t),this.createSpring()}return t.prototype.createSpring=function(){var t=this.options,n=t.velocity,e=t.from,r=t.to,o=t.damping,i=t.stiffness,a=t.mass,s=n?-n/1e3:0,u=r-e,c=o/(2*Math.sqrt(i*a)),f=Math.sqrt(i/a)/1e3;if(c<1)this.resolveSpring=function(t){var n=Math.exp(-c*f*t),e=f*Math.sqrt(1-c*c);return r-n*((s+c*f*u)/e*Math.sin(e*t)+u*Math.cos(e*t))};else if(1===c)this.resolveSpring=function(t){var n=Math.exp(-f*t);return r-n*(1+f*t)};else{var l=f*Math.sqrt(c*c-1);this.resolveSpring=function(t){var n=Math.exp(-c*f*t);return r-n*((s+c*f*u)*Math.sinh(l*t)+l*u*Math.cosh(l*t))/l}}},t.prototype.update=function(t){var n=this.resolveSpring(t),e=this.options,r=e.velocity,o=e.restSpeed,i=e.restDelta,a=e.to,s=Math.abs(r)<=o,u=Math.abs(a-n)<=i;return this.isComplete=s&&u,this.isComplete?a:n},t.prototype.updateOptions=function(t){var n=t.from,e=void 0===n?0:n,r=t.to,o=void 0===r?0:r,i=t.velocity,a=void 0===i?0:i,s=t.stiffness,u=void 0===s?100:s,c=t.damping,f=void 0===c?10:c,l=t.mass,p=void 0===l?1:l,d=t.restSpeed,h=void 0===d?.005:d,v=t.restDelta;void 0===v&&(v=Math.abs(o-e)<1?.01:.5),this.options={from:e,to:o,velocity:a,stiffness:u,damping:f,mass:p,restSpeed:h,restDelta:v}},t.prototype.flipTarget=function(){var t=this.options,n=t.from,e=t.to,r=t.velocity;this.options.velocity=-r,this.options.from=e,this.options.to=n,this.createSpring()},t.needsInterpolation=function(t,n){return"string"==typeof t||"string"==typeof n},t.uniqueOptionKeys=new Set(["velocity","stiffness","damping","mass","restSpeed","restDelta"]),t}(),et=function(t,n,e){var r=n-t;return 0===r?1:(e-t)/r},rt=function(t,n,e){return-e*t+e*n+t},ot=function(t,n,e){var r=t*t,o=n*n;return Math.sqrt(Math.max(0,e*(o-r)+r))},it=[K,Z,$],at=function(t){return it.find((function(n){return n.test(t)}))},st=function(t,n){var e=at(t),r=at(n);e.transform,r.transform;var o=e.parse(t),a=r.parse(n),s=i({},o),u=e===$?rt:ot;return function(t){for(var n in s)"alpha"!==n&&(s[n]=u(o[n],a[n],t));return s.alpha=rt(o.alpha,a.alpha,t),e.transform(s)}},ut={x:0,y:0,z:0},ct=function(t){return"number"==typeof t},ft=function(t,n){return function(e){return n(t(e))}},lt=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.reduce(ft)};function pt(t,n){return ct(t)?function(e){return rt(t,n,e)}:J.test(t)?st(t,n):mt(t,n)}var dt=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,s=i.length;a<s;a++,o++)r[o]=i[a];return r}(t),r=e.length,o=t.map((function(t,e){return pt(t,n[e])}));return function(t){for(var n=0;n<r;n++)e[n]=o[n](t);return e}},ht=function(t,n){var e=i(i({},t),n),r={};for(var o in e)void 0!==t[o]&&void 0!==n[o]&&(r[o]=pt(t[o],n[o]));return function(t){for(var n in r)e[n]=r[n](t);return e}};function vt(t){for(var n=tt.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 mt=function(t,n){var e=tt.createTransformer(n),r=vt(t),o=vt(n);return lt(dt(r.parsed,o.parsed),e)},yt=function(t,n,e){return Math.min(Math.max(e,t),n)},gt=function(t,n){return function(e){return rt(t,n,e)}};function xt(t,n,e){for(var r,o=[],i=e||("number"==typeof(r=t[0])?gt:"string"==typeof r?J.test(r)?st:mt:Array.isArray(r)?dt:"object"==typeof r?ht:void 0),a=t.length-1,s=0;s<a;s++){var u=i(t[s],t[s+1]);if(n){var c=Array.isArray(n)?n[s]:n;u=lt(c,u)}o.push(u)}return o}function bt(t,n,e){var r=void 0===e?{}:e,o=r.clamp,i=void 0===o||o,a=r.ease,s=r.mixer,u=t.length;n.length,!a||!Array.isArray(a)||a.length,t[0]>t[u-1]&&(t=[].concat(t),n=[].concat(n),t.reverse(),n.reverse());var c=xt(n,a,s),f=2===u?function(t,n){var e=t[0],r=t[1],o=n[0];return function(t){return o(et(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 s=1;s<e&&!(t[s]>o||s===r);s++);i=s-1}var u=et(t[i],t[i+1],o);return n[i](u)}}(t,c);return i?function(n){return f(yt(t[0],t[u-1],n))}:f}var Et=function(t){return function(n){return 1-t(1-n)}},wt=function(t){return function(n){return n<=.5?t(2*n)/2:(2-t(2*(1-n)))/2}},Ct=function(t){return function(n){return Math.pow(n,t)}},Pt=function(t){return function(n){return n*n*((t+1)*n-t)}},St=function(t){var n=Pt(t);return function(t){return(t*=2)<1?.5*n(t):.5*(2-Math.pow(2,-10*(t-1)))}},At=function(t){return t},Vt=Ct(2),Mt=Et(Vt),Tt=wt(Vt),Lt=function(t){return 1-Math.sin(Math.acos(t))},Bt=Et(Lt),Ot=wt(Bt),kt=Pt(1.525),Rt=Et(kt),Dt=wt(kt),Ft=St(1.525),Ut=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},It=Et(Ut);var Ht=function(){function t(t){this.isComplete=!1,this.updateOptions(t);var n=this.options,e=n.from,r=n.to;this.values=Array.isArray(r)?r:[e,r],this.createInterpolator()}return t.prototype.createInterpolator=function(){var t,n,e=this.options,r=e.duration,o=e.ease,i=e.offset;o=Array.isArray(o)?o:(t=this.values,n=o,t.map((function(){return n||Tt})).splice(0,t.length-1));var a=function(t,n){return t.map((function(t){return t*n}))}(i=i||function(t){var n=t.length;return t.map((function(t,e){return 0!==e?e/(n-1):0}))}(this.values),r);this.interpolator=bt(a,this.values,{ease:o})},t.prototype.update=function(t){var n=this.options.duration;return this.isComplete=t>=n,this.interpolator(t)},t.prototype.updateOptions=function(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,s=t.duration,u=void 0===s?300:s;this.options={from:e,to:o,ease:i,offset:a,duration:u}},t.prototype.flipTarget=function(){this.values.reverse(),this.createInterpolator()},t.needsInterpolation=function(){return!1},t.uniqueOptionKeys=new Set(["duration","ease"]),t}(),jt=function(){function t(t){this.isComplete=!1,this.updateOptions(t);var n=this.options,e=n.power,r=n.velocity,o=n.modifyTarget,i=n.from,a=e*r,s=i+a,u=void 0===o?s:o(s);u!==s&&(a=u-i),this.target=u,this.amplitude=a}return t.prototype.flipTarget=function(){},t.prototype.update=function(t){var n=this.options,e=n.timeConstant,r=n.restDelta,o=-this.amplitude*Math.exp(-t/e);return this.isComplete=!(o>r||o<-r),this.isComplete?this.target:this.target+o},t.prototype.updateOptions=function(t){var n=void 0===t?{}:t,e=n.velocity,r=void 0===e?0:e,o=n.from,i=void 0===o?0:o,a=n.power,s=void 0===a?.8:a,u=n.timeConstant,c=void 0===u?350:u,f=n.restDelta,l=void 0===f?.5:f,p=n.modifyTarget;this.options={velocity:r,from:i,power:s,timeConstant:c,restDelta:l,modifyTarget:p}},t.needsInterpolation=function(){return!1},t.uniqueOptionKeys=new Set(["power","timeConstant","modifyTarget"]),t}(),Xt=[Ht,jt,nt],Yt={keyframes:Ht,spring:nt,decay:jt},zt=Xt.length;function Wt(t,n,e){return void 0===e&&(e=0),t-n-e}var Nt=function(t){var n=function(n){var e=n.delta;return t(e)};return{start:function(){return w.update(n,!0,!0)},stop:function(){return C.update(n)}}};function _t(t){var n,e,r=t.from,o=t.to,s=t.autoplay,u=void 0===s||s,c=t.driver,f=void 0===c?Nt:c,l=t.elapsed,p=void 0===l?0:l,d=t.repeat,h=void 0===d?0:d,v=t.repeatType,m=void 0===v?"loop":v,y=t.repeatDelay,g=void 0===y?0:y,x=t.onPlay,b=t.onStop,E=t.onComplete,w=t.onRepeat,C=t.onUpdate,P=a(t,["from","to","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]),S=0,A=P.duration,V=!0,M=function(t){if(Yt[t.type])return Yt[t.type];for(var n in t)for(var e=0;e<zt;e++){var r=Xt[e];if(r.uniqueOptionKeys.has(n))return r}return Ht}(P);M.needsInterpolation(r,o)&&(e=bt([0,100],[r,o],{clamp:!1}),r=0,o=100);var T=new M(i(i({},P),{from:r,to:o}));function L(){S++,"reverse"===m?p=function(t,n,e,r){return void 0===e&&(e=0),void 0===r&&(r=!0),r?Wt(n+-t,n,e):n-(t-n)+e}(p,A,g,V=S%2==0):(p=Wt(p,A,g),"mirror"===m&&T.flipTarget()),T.isComplete=!1,w&&w()}function B(t){var r;V||(t=-t),p+=t;var o=T.update(Math.max(0,p));e&&(o=e(o)),null===(r=C)||void 0===r||r(o),(V?T.isComplete:p<=0)&&(0===S&&void 0===A&&(A=p),S<h?function(t,n,e,r){return r?t>=n+e:t<=-e}(p,A,g,V)&&L():(n.stop(),E&&E()))}function O(){var t;null===(t=x)||void 0===t||t(),(n=f(B)).start()}return u&&O(),{play:O,pause:function(){},resume:function(){},reverse:function(){},seek:function(){},stop:function(){var t;null===(t=b)||void 0===t||t(),n.stop()}}}function qt(t,n){return n?t*(1e3/n):0}function Gt(t){var n,e=t.from,r=void 0===e?0:e,o=t.velocity,a=void 0===o?0:o,s=t.min,u=t.max,c=t.power,f=void 0===c?.8:c,l=t.timeConstant,p=void 0===l?750:l,d=t.bounceStiffness,h=void 0===d?500:d,v=t.bounceDamping,m=void 0===v?10:v,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!==s&&t<s||void 0!==u&&t>u}function P(t){return void 0===s?u:void 0===u||Math.abs(s-t)<Math.abs(u-t)?s:u}function S(t){var e;null===(e=n)||void 0===e||e.stop(),n=_t(i(i({},t),{driver:b,onUpdate:function(n){var e,r,o;null===(e=E)||void 0===e||e(n),null===(o=(r=t).onUpdate)||void 0===o||o.call(r,n)},onComplete:w}))}function A(t){S(i({type:"spring",stiffness:h,damping:m,restDelta:g},t))}if(C(r))A({from:r,velocity:a,to:P(r)});else{var M=f*a+r;void 0!==x&&(M=x(M));var T,L=P(M),B=L===s?-1:1;S({type:"decay",from:r,velocity:a,timeConstant:p,power:f,restDelta:g,modifyTarget:x,onUpdate:C(M)?function(t){a=qt(t-T,V().delta),T=t,L-t*B>0||A({from:T,to:L,velocity:a})}:void 0})}return{stop:function(){var t;return null===(t=n)||void 0===t?void 0:t.stop()}}}var Zt=function(t){return 180*t/Math.PI},$t=function(t){return t},Kt=function(t){return void 0===t&&(t=$t),function(n,e,r){var o=e-r,i=-(0-n+1)*(0-t(Math.abs(o)));return o<=0?e+i:e-i}},Jt=Kt(),Qt=Kt(Math.sqrt),tn=function(t){return t*Math.PI/180},nn=function(t){return t.hasOwnProperty("x")&&t.hasOwnProperty("y")},en=function(t){return nn(t)&&t.hasOwnProperty("z")},rn=function(t,n){return Math.abs(t-n)};function on(t,n){if(ct(t)&&ct(n))return rn(t,n);if(nn(t)&&nn(n)){var e=rn(t.x,n.x),r=rn(t.y,n.y),o=en(t)&&en(n)?rn(t.z,n.z):0;return Math.sqrt(Math.pow(e,2)+Math.pow(r,2)+Math.pow(o,2))}}var an=function(t,n){return void 0===n&&(n=2),n=Math.pow(10,n),Math.round(t*n)/n},sn=function(t,n,e,r){return void 0===r&&(r=0),an(t+e*(n-t)/Math.max(r,e))};var un=function(t,n,e){var r=n-t;return((e-t)%r+r)%r+t},cn=function(t,n){return 1-3*n+3*t},fn=function(t,n){return 3*n-6*t},ln=function(t){return 3*t},pn=function(t,n,e){return((cn(n,e)*t+fn(n,e))*t+ln(n))*t},dn=function(t,n,e){return 3*cn(n,e)*t*t+2*fn(n,e)*t+ln(n)};function hn(t,n,e,r){if(t===n&&e===r)return At;for(var o=new Float32Array(11),i=0;i<11;++i)o[i]=pn(.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])),s=dn(a,t,e);return s>=.001?function(t,n,e,r){for(var o=0;o<8;++o){var i=dn(n,e,r);if(0===i)return n;n-=(pn(n,e,r)-t)/i}return n}(n,a,t,e):0===s?a:function(t,n,e,r,o){var i,a,s=0;do{(i=pn(a=n+(e-n)/2,r,o)-t)>0?e=a:n=a}while(Math.abs(i)>1e-7&&++s<10);return a}(n,r,r+.1,t,e)}return function(t){return 0===t||1===t?t:pn(a(t),n,r)}}var vn=Object.freeze({__proto__:null,DecayAnimator:jt,KeyframesAnimator:Ht,SpringAnimator:nt,angle:function(t,n){return void 0===n&&(n=ut),Zt(Math.atan2(n.y-t.y,n.x-t.x))},animate:_t,anticipate:Ft,applyOffset:function(t,n){var e=!0;return void 0===n&&(n=t,e=!1),function(r){return e?r-t+n:(t=r,e=!0,n)}},attract:Jt,attractExpo:Qt,backIn:kt,backInOut:Dt,backOut:Rt,bounceIn:It,bounceInOut:function(t){return t<.5?.5*(1-Ut(1-2*t)):.5*Ut(2*t-1)+.5},bounceOut:Ut,circIn:Lt,circInOut:Ot,circOut:Bt,clamp:yt,createAnticipate:St,createAttractor:Kt,createBackIn:Pt,createExpoIn:Ct,cubicBezier:hn,degreesToRadians:tn,distance:on,easeIn:Vt,easeInOut:Tt,easeOut:Mt,inertia:Gt,interpolate:bt,isPoint:nn,isPoint3D:en,linear:At,mirrorEasing:wt,mix:rt,mixColor:st,mixComplex:mt,pipe:lt,pointFromVector:function(t,n,e){return n=tn(n),{x:e*Math.cos(n)+t.x,y:e*Math.sin(n)+t.y}},progress:et,radiansToDegrees:Zt,reverseEasing:Et,smooth:function(t){void 0===t&&(t=50);var n=0,e=0;return function(r){var o=V().timestamp,i=o!==e?o-e:0,a=i?sn(n,r,i,t):n;return e=o,n=a,a}},smoothFrame:sn,snap:function(t){if("number"==typeof t)return function(n){return Math.round(n/t)*t};var n=0,e=t.length;return function(r){var o=Math.abs(t[0]-r);for(n=1;n<e;n++){var i=t[n],a=Math.abs(i-r);if(0===a)return i;if(a>o)return t[n-1];if(n===e-1)return i;o=a}}},steps:function(t,n){return void 0===n&&(n="end"),function(e){var r=(e="end"===n?Math.min(e,.999):Math.max(e,.001))*t,o="end"===n?Math.floor(r):Math.ceil(r);return yt(0,1,o/t)}},toDecimal:an,velocityPerFrame:function(t,n){return t/(1e3/n)},velocityPerSecond:qt,wrap:un}),mn=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}(),yn=function(){function t(t){var n,e=this;this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new mn,this.renderSubscribers=new mn,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=V(),o=r.delta,i=r.timestamp;e.lastUpdated!==i&&(e.timeDelta=o,e.lastUpdated=i,w.postRender(e.scheduleVelocityCheck))},this.scheduleVelocityCheck=function(){return w.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 gn(t){return new yn(t)}var xn=function(){function t(t,n){var e=this;this.children=new Set,this.latest={},this.values=new Map,this.valueSubscriptions=new Map,this.config={},this.update=function(){return e.config.onUpdate(e.latest)},this.triggerRender=function(){return e.render()},this.scheduleRender=function(){return w.render(e.triggerRender,!1,!0)},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?u(t.treePath,[t]):[],this.depth=t?t.depth+1:0,this.externalRef=n}return 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.latest[t]=n.get(),this.element&&this.subscribeToValue(t,n)},t.prototype.removeValue=function(t){var n=this.valueSubscriptions.get(t);n&&n(),this.values.delete(t),delete this.latest[t],this.valueSubscriptions.delete(t)},t.prototype.getValue=function(t,n){var e=this.values.get(t);return void 0===e&&void 0!==n&&(e=new yn(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=i({},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.scheduleUpdateLayoutDelta=function(){w.update(this.rootParent.updateLayoutDelta,!1,!0)},t.prototype.subscribeToValue=function(t,n){var e=this,r=n.onChange((function(n){e.setSingleStaticValue(t,n),e.latest[t]=n,e.config.onUpdate&&w.update(e.update,!1,!0)})),o=n.onRenderRequest(this.scheduleRender);this.valueSubscriptions.set(t,(function(){r(),o()}))},t.prototype.mount=function(t){var n=this;this.parent&&(this.removeFromParent=this.parent.subscribe(this)),this.element=this.current=t,this.forEachValue((function(t,e){return n.subscribeToValue(e,t)}))},t.prototype.unmount=function(){var t=this;this.forEachValue((function(n,e){return t.removeValue(e)})),C.update(this.update),C.render(this.render),this.removeFromParent&&this.removeFromParent()},t}();function bn(t){return t}function En(t){var n=t.top;return{x:{min:t.left,max:t.right},y:{min:n,max:t.bottom}}}function wn(t){return{x:i({},t.x),y:i({},t.y)}}var Cn={translate:0,scale:1,origin:0,originPoint:0};function Pn(){return{x:i({},Cn),y:i({},Cn)}}var Sn=i(i({},k),{transform:Math.round}),An={color:J,backgroundColor:J,outlineColor:J,fill:J,stroke:J,borderColor:J,borderTopColor:J,borderRightColor:J,borderBottomColor:J,borderLeftColor:J,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:U,rotateX:U,rotateY:U,rotateZ:U,scale:D,scaleX:D,scaleY:D,scaleZ:D,skew:U,skewX:U,skewY:U,distance:H,translateX:H,translateY:H,translateZ:H,x:H,y:H,z:H,perspective:H,transformPerspective:H,opacity:R,originX:Y,originY:Y,originZ:H,zIndex:Sn,fillOpacity:R,strokeOpacity:R,numOctaves:Sn},Vn=[k,H,I,U,X,j,{test:function(t){return"auto"===t},parse:function(t){return t}}],Mn=function(t){return function(n){return n.test(t)}},Tn=function(t){return Vn.find(Mn(t))},Ln=u(Vn,[J,tt]),Bn=function(t){return Ln.find(Mn(t))},On=function(t){return An[t]},kn=function(t,n){return n&&"number"==typeof t?n.transform(t):t},Rn=["","X","Y","Z"],Dn=new Set,Fn=["transformPerspective","x","y","z"];function Un(t,n){return Fn.indexOf(t)-Fn.indexOf(n)}["perspective","translate","scale","rotate","skew"].forEach((function(t){var n=new Set(["rotate","skew"]).has(t);Rn.forEach((function(e){var r=t+e;Fn.push(r),n&&Dn.add(r)}))}));var In=new Set(Fn);function Hn(t){return In.has(t)}var jn=new Set(["originX","originY","originZ"]);function Xn(t){return jn.has(t)}var Yn={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function zn(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+")"}function Wn(t){return t.startsWith("--")}function Nn(t,n){return t/(n.max-n.min)*100}var _n={process:function(t,n){return"number"!=typeof t?t:Nn(t,n.x)+"% "+Nn(t,n.y)+"%"}},qn={borderRadius:i(i({},_n),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:_n,borderTopRightRadius:_n,borderBottomLeftRadius:_n,borderBottomRightRadius:_n,boxShadow:{process:function(t,n,e,r){var o=tt.parse(t),i=tt.createTransformer(t),a=e.x.scale*r.x,s=e.y.scale*r.y;o[1]/=a,o[2]/=s;var u=rt(a,s,.5);return"number"==typeof o[3]&&(o[3]/=u),"number"==typeof o[4]&&(o[4]/=u),i(o)}}};function Gn(t,n,e,r,o,i,a,s,u,c,f,l){var p=a.enableHardwareAcceleration,d=a.transformTemplate,h=a.allowTransformNone;i.length=0;var v=!1,m=!1,y=!0;for(var g in t){var x=t[g],b=On(g),E=kn(x,b);if(Hn(g)){if(v=!0,r[g]=E,i.push(g),!y)continue;x!==(void 0!==b.default?b.default:0)&&(y=!1)}else if(Xn(g))o[g]=E,m=!0;else if("transform"!==g||"function"!=typeof x){var w=Wn(g)?e:n;if(s&&qn[g]){var C=qn[g].process(x,l,u,f),P=qn[g].applyTo;if(P)for(var S=P.length,A=0;A<S;A++)w[P[A]]=C;else w[g]=C}else w[g]=E}}s?(n.transform=zn(c,f),v&&(n.transform+=" "+function(t,n){var e="";n.sort(Un);for(var r=n.length,o=0;o<r;o++){var i=n[o];Dn.has(i)&&(e+=i+"("+t[i]+") ")}return e}(r,i),n.transform=n.transform.trim()),d&&(n.transform=d(r,n.transform)),n.transformOrigin=function(t){var n=t.x,e=t.y;return 100*n.origin+"% "+100*e.origin+"% 0"}(c)):(v&&(n.transform=function(t,n,e,r,o,i){void 0===o&&(o=!0),void 0===i&&(i=!0);var a="";n.sort(Un);for(var s=!1,u=n.length,c=0;c<u;c++){var f=n[c];a+=(Yn[f]||f)+"("+t[f]+") ","z"===f&&(s=!0)}return!s&&o?a+="translateZ(0)":a=a.trim(),e?a=e(t,r?"":a):i&&r&&(a="none"),a}(r,i,d,y,p,h)),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 Zn(t,n){t.min=n.min,t.max=n.max}function $n(t,n,e){return e+n*(t-e)}function Kn(t,n,e,r,o){return void 0!==o&&(t=$n(t,o,r)),$n(t,e,r)+n}function Jn(t,n,e,r,o){void 0===n&&(n=0),void 0===e&&(e=1),t.min=Kn(t.min,n,e,r,o),t.max=Kn(t.max,n,e,r,o)}function Qn(t,n){var e=n.x,r=n.y;Jn(t.x,e.translate,e.scale,e.originPoint),Jn(t.y,r.translate,r.scale,r.originPoint)}function te(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=rt(n.min,n.max,c);Jn(t,e[i],e[a],f,e.scale)}var ne=["x","scaleX","originX"],ee=["y","scaleY","originY"];function re(t,n,e,r,o){return t=$n(t-=n,1/e,r),void 0!==o&&(t=$n(t,1/o,r)),t}function oe(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=rt(t.min,t.max,r)-n;t.min=re(t.min,n,e,i,o),t.max=re(t.max,n,e,i,o)}(t,n[o],n[i],n[a],n.scale)}function ie(t,n,e){return void 0===n&&(n=0),void 0===e&&(e=.01),on(t,n)<e}function ae(t,n){var e=.5,r=t.max-t.min,o=n.max-n.min;return o>r?e=et(n.min,n.max-r,t.min):r>o&&(e=et(t.min,t.max-o,n.min)),yt(0,1,e)}function se(t,n,e,r){var o=n.max-n.min,i=e.max-e.min;t.origin=void 0===r?ae(n,e):r,t.originPoint=rt(n.min,n.max,t.origin),t.scale=i/o,ie(t.scale,1,1e-4)&&(t.scale=1),t.translate=function(t,n,e){var r=rt(t.min,t.max,e);return rt(n.min,n.max,e)-r}(n,e,t.origin),ie(t.translate)&&(t.translate=0)}function ue(t,n,e,r){se(t.x,n.x,e.x,r),se(t.y,n.y,e.y,r)}function ce(t){return[t("x"),t("y")]}var fe=function(t){return 1e3*t},le=function(t){if(Array.isArray(t)){t.length;var n=s(t,4);return hn(n[0],n[1],n[2],n[3])}return"string"==typeof t?(vn[t],vn[t]):t},pe=function(t,n){return"zIndex"!==t&&(!("number"!=typeof n&&!Array.isArray(n))||!("string"!=typeof n||!tt.test(n)||n.startsWith("url(")))};function de(t){var n=t.yoyo,e=t.loop,r=t.flip,o=t.ease,s=a(t,["yoyo","loop","flip","ease"]),u=i({},s);return s.duration&&(u.duration=fe(s.duration)),s.repeatDelay&&(u.repeatDelay=fe(s.repeatDelay)),o&&(u.ease=function(t){return Array.isArray(t)&&"number"!=typeof t[0]}(o)?o.map(le):le(o)),"tween"===s.type&&(u.type="keyframes"),n?u.repeatType="reverse":e?u.repeatType="loop":r&&(u.repeatType="mirror"),u.repeat=e||n||r||s.repeat,"spring"!==s.type&&(u.type="keyframes"),u}function he(t,n){return function(t){Array.isArray(t.to)&&null===t.to[0]&&(t.to=u(t.to),t.to[0]=t.from)}(n),_t(i(i({},n),de(t)))}function ve(t,n,e,r,o){var a=n.get(),s=r[t]||r.default||r,u=pe(t,n.get()),c=pe(t,e);return u&&c&&!1!==s.type?function(){var t={from:a,to:e,velocity:n.getVelocity(),onComplete:o,onUpdate:function(t){return n.set(t)}};return"inertia"===s.type||"decay"===s.type?function(t,n){return Gt(i(i({},n),t))}(s,t):he(s,t)}:function(){n.set(e),o()}}function me(t,n,e,r){return void 0===r&&(r={}),n.start((function(o){var i,a=ve(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);return s?i=setTimeout(a,fe(s)):a(),function(){clearTimeout(i)}}))}function ye(t,n){return En(function(t,n){var e=t.top,r=t.left,o=t.bottom,i=t.right;void 0===n&&(n=bn);var a=n({x:r,y:e}),s=n({x:i,y:o});return{top:a.y,left:a.x,bottom:s.y,right:s.x}}(t.getBoundingClientRect(),n))}var ge=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 mn,n.layoutMeasureListeners=new mn,n.viewportBoxUpdateListeners=new mn,n.hasViewportBoxUpdated=!1,n.targetBoxFinal={x:{min:0,max:1},y:{min:0,max:1}},n.treeScale={x:1,y:1},n.delta=Pn(),n.deltaFinal=Pn(),n.stopLayoutAxisAnimation={x:function(){},y:function(){}},n.isTargetBoxLocked=!1,n.axisProgress={x:gn(0),y:gn(0)},n.updateLayoutDelta=function(){n.isLayoutProjectionEnabled&&n.box&&n.updateLayoutDeltas(),n.children.forEach(xe)},n}return o(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=i(i({},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(Hn(t)){var n=On(t);return n&&n.default||0}return this.read(t)},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 ye(this.element,t)},n.prototype.getBoundingBoxWithoutTransforms=function(){var t,n,e=this.getBoundingBox();return t=e,n=this.latest,oe(t.x,n,ne),oe(t.y,n,ee),e},n.prototype.getComputedStyle=function(){return window.getComputedStyle(this.element)},n.prototype.snapshotBoundingBox=function(){this.prevViewportBox=this.getBoundingBoxWithoutTransforms();var t=this.axisProgress,n=t.x,e=t.y;this.isTargetBoxLocked||n.isAnimating()||e.isAnimating()||(this.targetBox=wn(this.prevViewportBox))},n.prototype.measureLayout=function(){this.box=this.getBoundingBox(),this.boxCorrected=wn(this.box),this.targetBox||(this.targetBox=wn(this.box)),this.layoutMeasureListeners.notify(this.box,this.prevViewportBox||this.box)},n.prototype.refreshTargetBox=function(){this.targetBox=this.getBoundingBoxWithoutTransforms()},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.resetRotate=function(){var t=this,n=!1,e={};if(Rn.forEach((function(r){var o="rotate"+r;t.hasValue(o)&&(n=!0,e[o]=t.latest[o],t.latest[o]=0)})),n){for(var r in this.render(),e)this.latest[r]=e[r];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=this,r=this.axisProgress[t],o=this.targetBox[t],i=o.min,a=o.max-i;return r.clearListeners(),r.set(i),r.set(i),r.onChange((function(n){return e.setAxisTarget(t,n,n+a)})),me(t,r,0,n)},n.prototype.stopLayoutAnimation=function(){var t=this;ce((function(n){return t.axisProgress[n].stop()}))},n.prototype.updateLayoutDeltas=function(){var t,n,e,r,o;t=this.boxCorrected,n=this.box,Zn(t.x,n.x),Zn(t.y,n.y),this.parent&&(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++)Qn(t,n[r].delta)}(this.boxCorrected,this.treePath),ue(this.delta,this.boxCorrected,this.targetBox,this.layoutOrigin),this.hasViewportBoxUpdated&&this.viewportBoxUpdateListeners.notify(this.targetBox,this.delta),this.hasViewportBoxUpdated=!1;var i=zn(this.delta,this.treeScale);i!==this.deltaTransform&&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,te(t.x,n.x,e,ne),te(t.y,n.y,e,ee),ue(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"),Gn(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}(xn),xe=function(t){return t.updateLayoutDelta()};function be(t){var e=n.useRef(null);return null===e.current&&(e.current=t()),e.current}function Ee(t,n,e){return"string"==typeof t?t:H.transform(n+e*t)}var we=function(t,n){return H.transform(t*n)},Ce={offset:"stroke-dashoffset",array:"stroke-dasharray"},Pe={offset:"strokeDashoffset",array:"strokeDasharray"};var Se={x:0,y:0,width:0,height:0};function Ae(t,n,e,r,o,i,s,u,c,f,l,p,d,h,v){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,P=void 0===C?0:C;return Gn(a(t,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]),r,e,o,i,s,u,l,p,d,h,v),r.transform&&(n.transform=r.transform,delete r.transform),(void 0!==g||void 0!==x||n.transform)&&(n.transformOrigin=function(t,n,e){return Ee(n,t.x,t.width)+" "+Ee(e,t.y,t.height)}(c||Se,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?Ce:Pe;t[a.offset]=we(-o,n);var s=we(e,n),u=we(r,n);t[a.array]=s+" "+u}(r,f,b,w,P,!1),r}var Ve=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues"]),Me=/([a-z])([A-Z])/g,Te=function(t){return t.replace(Me,"$1-$2").toLowerCase()},Le=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 o(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=Ve.has(t)?t:Te(t),this.element.getAttribute(t)},n.prototype.build=function(){this.updateTransformDeltas(),Ae(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(Te(n),this.attrs[n])},n}(ge);var Be=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 Oe(t){return"string"==typeof t&&Be.has(t)}var ke=n.createContext(null);function Re(){var t=n.useContext(ke);if(null===t)return[!0,null];var e=t.isPresent,r=t.onExitComplete,o=t.register,i=Ie();n.useEffect((function(){return o(i)}),[]);return!e&&r?[!1,function(){return null==r?void 0:r(i)}]:[!0]}function De(){var t=n.useContext(ke);return null===t||t.isPresent}var Fe=0,Ue=function(){return Fe++},Ie=function(){return be(Ue)},He=function(t,e,r,o,a){var s=be((function(){return new(Oe(t)?Le:ge)(r,a)}));s.updateConfig(i({enableHardwareAcceleration:!o},e)),s.layoutId=e.layoutId;var u=De();return s.isPresent=void 0!==e.isPresent?e.isPresent:u,n.useEffect((function(){if(e.onViewportBoxUpdate)return s.onViewportBoxUpdate(e.onViewportBoxUpdate)}),[e.onViewportBoxUpdate]),s},je=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","static","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 Xe(t){return je.has(t)}var Ye=function(t){return!Xe(t)};try{var ze=require("@emotion/is-prop-valid").default;Ye=function(t){return t.startsWith("on")?!Xe(t):ze(t)}}catch(b){}function We(t,e,r){var o="string"==typeof t?function(t){var n={};for(var e in t)Ye(e)&&(n[e]=t[e]);return n}(e):e;r.clean(),r.build();var a=Oe(t)?function(t){return i(i({},t.attrs),{style:i({},t.reactStyle)})}(r):function(t,n){var e=n.drag,r={style:i(i(i({},t.reactStyle),t.style),t.vars)};return e&&(r.style.userSelect="none",r.draggable=!1),r}(r,e);return n.createElement(t,i(i(i({},o),{ref:r.ref}),a))}function Ne(t){return"string"==typeof t&&t.startsWith("var(--")}var _e=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function qe(t,n,e){var r=s(function(t){var n=_e.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||(Ne(i)?qe(i,n):i)}}var Ge,Ze=function(t){return Array.isArray(t)},$e=new Set(["width","height","top","left","right","bottom","x","y"]),Ke=function(t){return $e.has(t)},Je=function(t,n){t.set(n,!1),t.set(n)},Qe=function(t){return t===k||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 tr=function(t,n){return parseFloat(t.split(", ")[n])},nr=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 tr(i[1],n);var a=o.match(/^matrix\((.+)\)$/);return a?tr(a[1],t):0}},er=new Set(["x","y","z"]),rr=Fn.filter((function(t){return!er.has(t)}));var or={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:nr(4,13),y:nr(5,14)},ir=function(t,n,e,r){void 0===e&&(e={}),void 0===r&&(r={}),n=i({},n),r=i({},r);var o=Object.keys(n).filter(Ke),a=[],u=!1,c=[];if(o.forEach((function(o){var i=t.getValue(o);if(t.hasValue(o)){var s,f=e[o],l=n[o],p=Tn(f);if(Ze(l))for(var d=l.length,h=null===l[0]?1:0;h<d;h++)s?Tn(l[h]):s=Tn(l[h]);else s=Tn(l);if(p!==s)if(Qe(p)&&Qe(s)){var v=i.get();"string"==typeof v&&i.set(parseFloat(v)),"string"==typeof l?n[o]=parseFloat(l):Array.isArray(l)&&s===H&&(n[o]=l.map(parseFloat))}else u||(a=function(t){var n=[];return rr.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],Je(i,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 s=n.getBoundingBox();return e.forEach((function(e){var i=n.getValue(e);Je(i,or[e](r,a)),t[e]=or[e](s,o)})),t}(n,t,c);return a.length&&a.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 ar(t,n,e,r){return function(t){return Object.keys(t).some(Ke)}(n)?ir(t,n,e,r):{target:n,transitionEnd:r}}var sr=function(t,n,e,r){var o=function(t,n,e){var r=a(n,[]),o=t.getInstance();if(!(o instanceof HTMLElement))return{target:r,transitionEnd:e};for(var s in e&&(e=i({},e)),t.forEachValue((function(t){var n=t.get();if(Ne(n)){var e=qe(n,o);e&&t.set(e)}})),r){var u=r[s];if(Ne(u)){var c=qe(u,o);c&&(r[s]=c,e&&void 0===e[s]&&(e[s]=u))}}return{target:r,transitionEnd:e}}(t,n,r);return ar(t,n=o.target,e,r=o.transitionEnd)};var ur=function(){function t(){this.hasMounted=!1,this.pendingAnimations=[],this.componentControls=new Set}return t.prototype.setVariants=function(t){this.variants=t,this.componentControls.forEach((function(n){return n.setVariants(t)}))},t.prototype.setDefaultTransition=function(t){this.defaultTransition=t,this.componentControls.forEach((function(n){return n.setDefaultTransition(t)}))},t.prototype.subscribe=function(t){var n=this;return this.componentControls.add(t),this.variants&&t.setVariants(this.variants),this.defaultTransition&&t.setDefaultTransition(this.defaultTransition),function(){return n.componentControls.delete(t)}},t.prototype.start=function(t,n){var e=this;if(this.hasMounted){var r=[];return this.componentControls.forEach((function(e){var o=e.start(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.componentControls.forEach((function(n){return n.apply(t)}))},t.prototype.stop=function(){this.componentControls.forEach((function(t){return t.stop()}))},t.prototype.mount=function(){var t=this;this.hasMounted=!0,this.pendingAnimations.forEach((function(n){var e=n.animation,r=n.resolve;return t.start.apply(t,u(e)).then(r)}))},t.prototype.unmount=function(){this.hasMounted=!1,this.stop()},t}(),cr=n.createContext({static:!1}),fr=function(t){return"string"==typeof t||Array.isArray(t)},lr=function(t){return t instanceof ur},pr=function(t,e,r,o,i){void 0===o&&(o=!1);var a,s=i.initial,u=i.animate,c=i.variants,f=i.whileTap,l=i.whileHover,p=i.layoutId,d=n.useContext(ke),h=null==d?void 0:d.id;r.isPresenceRoot=t.presenceId!==h,void 0!==(null==d?void 0:d.initial)&&(s=d.initial),!1!==s||lr(u)?"boolean"!=typeof s&&(a=s):a=u;var v=n.useRef(!1),m=c||fr(u)||fr(f)||fr(l)||lr(u),y=fr(a)?a:t.initial,g=fr(u)?u:t.animate,x=o?y:null,b=m&&fr(g)?g:null,E=n.useMemo((function(){return{controls:m?e:t.controls,initial:y,animate:g,visualElement:r,hasMounted:v,isReducedMotion:t.isReducedMotion,presenceId:h}}),[x,b,t.isReducedMotion,u,p,h]);return E.static=o,function(t,e){void 0===e&&(e=!1);var r=n.useRef(!0);(!e||e&&r.current)&&t(),r.current=!1}((function(){var n=a||t.initial;n&&e.apply(n)}),!o),n.useEffect((function(){v.current=!0}),[]),E},dr=function(t){var n=t.animate,e=t.variants,r=t.inherit;return(void 0===r||r)&&!!e&&(!n||n instanceof ur)},hr=function(t){return t instanceof yn};function vr(t,n,e,r){for(var o in void 0===r&&(r=!1),r&&(t.reactStyle={}),e){var i=e[o],a=!1;if(hr(i))mr.has(o)||(t.addValue(o,i),a=!0);else if(Hn(o)||Xn(o)){if(t.hasValue(o)){if(i!==n[o]){t.getValue(o).set(i)}}else t.addValue(o,gn(i));a=!0}else r&&(t.reactStyle[o]=i);a&&(n[o]=i)}}var mr=new Set([]),yr=function(){return{}},gr=function(t){return Ze(t)?t[t.length-1]||0:t},xr=function(){function t(t,n){var e=this,r=n.makeTargetAnimatable;this.props={},this.variants={},this.baseTarget={},this.overrides=[],this.resolvedOverrides=[],this.activeOverrides=new Set,this.isAnimating=new Set,this.hasValue=function(t){return!e.visualElement.hasValue(t)},this.visualElement=t,this.makeTargetAnimatable=r,this.visualElement.forEachValue((function(t,n){return e.baseTarget[n]=t.get()}))}return t.prototype.setProps=function(t){this.props=t},t.prototype.setVariants=function(t){t&&(this.variants=t)},t.prototype.setDefaultTransition=function(t){t&&(this.defaultTransition=t)},t.prototype.setValues=function(t,n){var e=void 0===n?{}:n,r=e.isActive,o=void 0===r?new Set:r,a=e.priority,s=this.resolveVariant(t),u=s.target,c=s.transitionEnd;for(var f in u=this.transformValues(i(i({},u),c))){if(o.has(f))return;if(o.add(f),u){var l=gr(u[f]);if(this.visualElement.hasValue(f)){var p=this.visualElement.getValue(f);p&&p.set(l)}else this.visualElement.addValue(f,gn(l));a||(this.baseTarget[f]=l)}}},t.prototype.transformValues=function(t){var n=this.props.transformValues;return n?n(t):t},t.prototype.checkForNewValues=function(t){var n=Object.keys(t).filter(this.hasValue),e=n.length;if(e)for(var r=0;r<e;r++){var o=n[r],i=t[o],a=null;if(Array.isArray(i)&&(a=i[0]),null===a){var s=this.visualElement.readNativeValue(o);a=void 0!==s?s:t[o]}"string"==typeof a&&/^\-?\d*\.?\d+$/.test(a)?a=parseFloat(a):!Bn(a)&&tt.test(i)&&(a=tt.getAnimatableNone(i)),this.visualElement.addValue(o,gn(a)),this.baseTarget[o]=a}},t.prototype.resolveVariant=function(t){if(!t)return{target:void 0,transition:void 0,transitionEnd:void 0};var n,e;"function"==typeof t&&(t=t(this.props.custom,(n=this.visualElement,e={},n.forEachValue((function(t,n){return e[n]=t.get()})),e),function(t){var n={};return t.forEachValue((function(t,e){return n[e]=t.getVelocity()})),n}(this.visualElement)));var r=t.transition;return{transition:void 0===r?this.defaultTransition:r,transitionEnd:t.transitionEnd,target:a(t,["transition","transitionEnd"])}},t.prototype.getHighestPriority=function(){return this.activeOverrides.size?Math.max.apply(Math,u(Array.from(this.activeOverrides))):0},t.prototype.setOverride=function(t,n){this.overrides[n]=t,this.children&&this.children.forEach((function(e){return e.setOverride(t,n)}))},t.prototype.startOverride=function(t){var n=this.overrides[t];if(n)return this.start(n,{priority:t})},t.prototype.clearOverride=function(t){var n=this;if(this.children&&this.children.forEach((function(n){return n.clearOverride(t)})),this.overrides[t]){this.activeOverrides.delete(t);var e=this.getHighestPriority();if(this.resetIsAnimating(),e)this.overrides[e]&&this.startOverride(e);var r=this.resolvedOverrides[t];if(r){var o={};for(var i in this.baseTarget)void 0!==r[i]&&(o[i]=this.baseTarget[i]);this.onStart(),this.animate(o).then((function(){return n.onComplete()}))}}},t.prototype.apply=function(t){return Array.isArray(t)?this.applyVariantLabels(t):"string"==typeof t?this.applyVariantLabels([t]):void this.setValues(t)},t.prototype.applyVariantLabels=function(t){var n=this,e=new Set;u(t).reverse().forEach((function(r){var o=n.resolveVariant(n.variants[r]),i=o.target,a=o.transitionEnd;a&&n.setValues(a,{isActive:e}),i&&n.setValues(i,{isActive:e}),n.children&&n.children.size&&n.children.forEach((function(n){return n.applyVariantLabels(t)}))}))},t.prototype.start=function(t,n){var e,r,o=this;return void 0===n&&(n={}),n.priority&&this.activeOverrides.add(n.priority),this.resetIsAnimating(n.priority),r=t,e=Array.isArray(r)?this.animateVariantLabels(t,n):"string"==typeof t?this.animateVariant(t,n):this.animate(t,n),this.onStart(),e.then((function(){return o.onComplete()}))},t.prototype.animate=function(t,n){var e=this,r=void 0===n?{}:n,o=r.delay,a=void 0===o?0:o,s=r.priority,u=void 0===s?0:s,c=r.transitionOverride,f=this.resolveVariant(t),l=f.target,p=f.transition,d=f.transitionEnd;if(c&&(p=c),!l)return Promise.resolve();l=this.transformValues(l),d&&(d=this.transformValues(d)),this.checkForNewValues(l);var h=this.transformValues(function(t,n,e){var r,o,i={};for(var a in t)i[a]=null!==(r=br(a,n))&&void 0!==r?r:null===(o=e.getValue(a))||void 0===o?void 0:o.get();return i}(l,p,this.visualElement));if(this.makeTargetAnimatable){var v=this.makeTargetAnimatable(this.visualElement,l,h,d);l=v.target,d=v.transitionEnd}u&&(this.resolvedOverrides[u]=l),this.checkForNewValues(l);var m=[];for(var y in l){var g=this.visualElement.getValue(y);if(g&&l&&void 0!==l[y]){var x=l[y];u||(this.baseTarget[y]=gr(x)),this.isAnimating.has(y)||(this.isAnimating.add(y),m.push(me(y,g,x,i({delay:a},p))))}}var b=Promise.all(m);return d?b.then((function(){e.setValues(d,{priority:u})})):b},t.prototype.animateVariantLabels=function(t,n){var e=this,r=u(t).reverse().map((function(t){return e.animateVariant(t,n)}));return Promise.all(r)},t.prototype.animateVariant=function(t,n){var e=this,r=n&&n.priority||0,o=this.variants[t],i=o&&this.resolveVariant(o).transition||{},a=o?function(){return e.animate(o,n)}:function(){return Promise.resolve()},u=this.children?function(n){void 0===n&&(n=0);var o=i.delayChildren,a=void 0===o?0:o;return e.animateChildren(t,a+n,i.staggerChildren,i.staggerDirection,r)}:function(){return Promise.resolve()},c=i.when;if(c){var f=s("beforeChildren"===c?[a,u]:[u,a],2),l=f[0],p=f[1];return l().then(p)}return Promise.all([a(),u(null==n?void 0:n.delay)])},t.prototype.animateChildren=function(t,n,e,r,o){if(void 0===n&&(n=0),void 0===e&&(e=0),void 0===r&&(r=1),void 0===o&&(o=0),!this.children)return Promise.resolve();var i=[],a=(this.children.size-1)*e,s=1===r?function(t){return t*e}:function(t){return a-t*e};return Array.from(this.children).forEach((function(e,r){var a=e.animateVariant(t,{priority:o,delay:n+s(r)});i.push(a)})),Promise.all(i)},t.prototype.onStart=function(){var t=this.props.onAnimationStart;t&&t()},t.prototype.onComplete=function(){var t=this.props.onAnimationComplete;t&&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.resetIsAnimating=function(t){void 0===t&&(t=0),this.isAnimating.clear(),t<this.getHighestPriority()&&this.checkOverrideIsAnimating(t),this.children&&this.children.forEach((function(n){return n.resetIsAnimating(t)}))},t.prototype.stop=function(){this.visualElement.forEachValue((function(t){return t.stop()}))},t.prototype.addChild=function(t){this.children||(this.children=new Set),this.children.add(t),this.overrides.forEach((function(n,e){n&&t.setOverride(n,e)}))},t.prototype.removeChild=function(t){this.children&&this.children.delete(t)},t.prototype.resetChildren=function(){this.children&&this.children.clear()},t}();function br(t,n){if(n)return(n[t]||n.default||n).from}function Er(t,e,r){var o=dr(e),i=e.variants,s=e.transition,u=n.useContext(cr).controls,c=n.useContext(ke),f=be((function(){return new xr(t,r)}));return c&&!c.isPresent||(f.resetChildren(),f.setProps(e),f.setVariants(i),f.setDefaultTransition(s)),n.useEffect((function(){o&&u&&u.addChild(f)})),n.useEffect((function(){return function(){e.onAnimationComplete;var t=a(e,["onAnimationComplete"]);f.setProps(t),u&&u.removeChild(f)}}),[]),f}var wr,Cr,Pr=n.createContext({transformPagePoint:function(t){return t},features:[]});!function(t){t[t.Entering=0]="Entering",t[t.Present=1]="Present",t[t.Exiting=2]="Exiting"}(wr||(wr={})),function(t){t[t.Hide=0]="Hide",t[t.Show=1]="Show"}(Cr||(Cr={}));var Sr={measureLayout:function(t){return t.measureLayout()},layoutReady:function(t){return t.layoutReady()}},Ar=function(t,n){return t.depth-n.depth};function Vr(){var t=new Set;return{add:function(n){return t.add(n)},flush:function(n){var e=void 0===n?Sr:n,r=e.measureLayout,o=e.layoutReady,i=Array.from(t).sort(Ar);i.forEach((function(t){return t.resetTransform()})),i.forEach(r),i.forEach(o),i.forEach((function(t){t.isPresent&&(t.presence=wr.Present)})),t.clear()}}}function Mr(t){return!!t.forceUpdate}var Tr=n.createContext(Vr()),Lr="undefined"!=typeof window?n.useLayoutEffect:n.useEffect;function Br(t,e){var r=e.defaultFeatures,o=e.useVisualElement,a=e.render,s=e.animationControlsConfig;return n.forwardRef((function(e,c){var f=n.useContext(cr),l=dr(e),p=f.static||e.static||!1,d=o(t,e,f.visualElement,p,c);!function(t,n){var e=be(yr);for(var r in e){var o=Hn(r)||Xn(r),i=n[r],a=n.style&&n.style[r],s=i&&hr(n[r]),u=a&&hr(n.style[r]);(o&&!i&&!a||!o&&!s&&!u)&&(t.removeValue(r),delete e[r])}vr(t,e,n),n.style&&vr(t,e,n.style,!0),n.transformValues&&(t.reactStyle=n.transformValues(t.reactStyle))}(d,e);var h=Er(d,e,s),v=pr(f,h,d,p,e),m=function(t,e,r,o,a,s,c,f){var l=n.useContext(Pr);if(e||"undefined"==typeof window)return null;for(var p=u(t,l.features),d=p.length,h=[],v=0;v<d;v++){var m=p[v],y=m.shouldRender,g=m.key,x=m.getComponent;if(y(a,c)){var b=x(a);b&&h.push(n.createElement(b,i({key:g},a,{localContext:s,parentContext:c,visualElement:r,controls:o,inherit:f})))}}return h}(r,p,d,h,e,v,f,l),y=a(t,e,d);return function(t){var e=n.useContext(Tr);Lr((function(){return function(){Mr(e)&&e.remove(t)}}),[])}(d),n.createElement(n.Fragment,null,n.createElement(cr.Provider,{value:v},y),m)}))}function Or(t){var n=null;return function(){return null===n&&(n=t,function(){n=null})}}var kr=Or("dragHorizontal"),Rr=Or("dragVertical");function Dr(t){var n=!1;if("y"===t)n=Rr();else if("x"===t)n=kr();else{var e=kr(),r=Rr();e&&r?n=function(){e(),r()}:(e&&e(),r&&r())}return n}var Fr=!1;"undefined"!=typeof window&&document.addEventListener("touchmove",(function(t){Fr&&t.preventDefault()}),{passive:!1});var Ur=function(){return Fr=!1};function Ir(t,n,e,r){if(e)return t.addEventListener(n,e,r),function(){return t.removeEventListener(n,e,r)}}function Hr(t,e,r,o){n.useEffect((function(){var n=t.current;if(r&&n)return Ir(n,e,r,o)}),[t,e,r,o])}function jr(t){return"undefined"!=typeof PointerEvent&&t instanceof PointerEvent?!("mouse"!==t.pointerType):t instanceof MouseEvent}function Xr(t){return!!t.touches}var Yr={pageX:0,pageY:0};function zr(t,n){void 0===n&&(n="page");var e=t.touches[0]||t.changedTouches[0]||Yr;return{x:e[n+"X"],y:e[n+"Y"]}}function Wr(t,n){return void 0===n&&(n="page"),{x:t[n+"X"],y:t[n+"Y"]}}function Nr(t,n){return void 0===n&&(n="page"),{point:Xr(t)?zr(t,n):Wr(t,n)}}function _r(t){return Nr(t,"client")}var qr,Gr=function(t,n){if(void 0===n&&(n=!1),t){var e=function(n){return t(n,Nr(n))};return n?function(t){if(t)return function(n){var e=n instanceof MouseEvent;(!e||e&&0===n.button)&&t(n)}}(e):e}},Zr="undefined"!=typeof window,$r={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Kr={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function Jr(t){return Zr&&null===window.onpointerdown?t:Zr&&null===window.ontouchstart?Kr[t]:Zr&&null===window.onmousedown?$r[t]:t}function Qr(t,n,e,r){return Ir(t,Jr(n),Gr(e,"pointerdown"===n),r)}function to(t,n,e,r){return Hr(t,Jr(n),Gr(e,"pointerdown"===n),r)}!function(t){t.subtract=function(t,n){return{x:t.x-n.x,y:t.y-n.y}},t.relativeTo=function(t){var n;return function(e){var r=e.x,o=e.y,i=void 0!==n?n:n="string"==typeof t?document.getElementById(t):t;if(i){var a=i.getBoundingClientRect();return{x:r-a.left-window.scrollX,y:o-a.top-window.scrollY}}}}}(qr||(qr={}));var no=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=ro(r.lastMoveEventInfo,r.history),n=null!==r.startEvent,e=on(t.offset,{x:0,y:0})>=3;if(n||e){var o=t.point,a=V().timestamp;r.history.push(i(i({},o),{timestamp:a}));var s=r.handlers,u=s.onStart,c=s.onMove;n||(u&&u(r.lastMoveEvent,t),r.startEvent=r.lastMoveEvent),c&&c(r.lastMoveEvent,t)}}},!(Xr(t)&&t.touches.length>1)){this.handlers=n,this.transformPagePoint=o;var a=eo(Nr(t),this.transformPagePoint),s=a.point,u=V().timestamp;this.history=[i(i({},s),{timestamp:u})];var c=n.onSessionStart;c&&c(t,ro(a,this.history));var f=Qr(window,"pointermove",(function(t,n){return r.handlePointerMove(t,n)})),l=Qr(window,"pointerup",(function(t,n){return r.handlePointerUp(t,n)}));this.removeListeners=function(){f&&f(),l&&l()}}}return t.prototype.handlePointerMove=function(t,n){this.lastMoveEvent=t,this.lastMoveEventInfo=eo(n,this.transformPagePoint),jr(t)&&0===t.buttons?this.handlePointerUp(t,n):w.update(this.updatePoint,!0)},t.prototype.handlePointerUp=function(t,n){this.end();var e=this.handlers.onEnd;if(e){var r=ro(eo(n,this.transformPagePoint),this.history);e&&e(t,r)}},t.prototype.updateHandlers=function(t){this.handlers=t},t.prototype.end=function(){this.removeListeners&&this.removeListeners(),C.update(this.updatePoint),Ur()},t}();function eo(t,n){return n?{point:n(t.point)}:t}function ro(t,n){var e=t.point;return{point:e,delta:qr.subtract(e,io(n)),offset:qr.subtract(e,oo(n)),velocity:ao(n,.1)}}function oo(t){return t[0]}function io(t){return t[t.length-1]}function ao(t,n){if(t.length<2)return{x:0,y:0};for(var e=t.length-1,r=null,o=io(t);e>=0&&(r=t[e],!(o.timestamp-r.timestamp>fe(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 so(t,n,e){var r=n.min,o=n.max;return void 0!==r&&t<r?t=e?rt(r,t,e):Math.max(t,r):void 0!==o&&t>o&&(t=e?rt(o,t,e):Math.min(t,o)),t}function uo(t,n,e){var r={},o=t.max-t.min;return void 0!==n&&(r.min=t.min+n),void 0!==e&&(r.max=Math.max(t.min+e-o,t.min)),r}function co(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 fo,lo=new WeakMap,po=function(){function t(t){var n=t.visualElement;this.isDragging=!1,this.currentDirection=null,this.constraints=!1,this.props={},this.cursorProgress={x:.5,y:.5},this.originPoint={},this.openGlobalLock=null,this.panSession=null,this.visualElement=n,this.visualElement.enableLayoutProjection(),lo.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 s=this.props.transformPagePoint;this.panSession=new no(t,{onSessionStart:function(){Fr=!0,e.stopMotion()},onStart:function(t,n){var r,o,i=e.props,s=i.drag,u=i.dragPropagation;if(!s||u||(e.openGlobalLock&&e.openGlobalLock(),e.openGlobalLock=Dr(s),e.openGlobalLock)){e.prepareBoundingBox(),e.visualElement.lockTargetBox(),e.resolveDragConstraints();var c=_r(t).point;ce((function(t){var n=e.visualElement.targetBox[t],r=n.min,o=n.max;e.cursorProgress[t]=a?a[t]:et(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,s=e.props,u=s.dragPropagation,c=s.dragDirectionLock;if(u||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),fo=t}},onEnd:function(t,n){return e.stop(t,n)}},{transformPagePoint:s})},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.refreshTargetBox()},t.prototype.resolveDragConstraints=function(){var t=this,n=this.props.dragConstraints;this.constraints=!!n&&(f(n)?this.resolveRefConstraints(this.visualElement.box,n):function(t,n){var e=n.top,r=n.left,o=n.bottom,i=n.right;return{x:uo(t.x,r,i),y:uo(t.y,e,o)}}(this.visualElement.box,n)),this.constraints&&ce((function(n){var e,r,o;t.getAxisMotionValue(n)&&(t.constraints[n]=(e=t.visualElement.box[n],r=t.constraints[n],o={},void 0!==r.min&&(o.min=r.min-e.min),void 0!==r.max&&(o.max=r.max-e.min),o))}))},t.prototype.resolveRefConstraints=function(t,n){var e=this.props,r=e.onMeasureDragConstraints,o=e.transformPagePoint,i=n.current;this.constraintsBox=ye(i,o);var a=function(t,n){return{x:co(t.x,n.x),y:co(t.y,n.y)}}(t,this.constraintsBox);if(r){var s=r(function(t){var n=t.x,e=t.y;return{top:e.min,bottom:e.max,left:n.min,right:n.max}}(a));s&&(a=En(s))}return a},t.prototype.cancelDrag=function(){Ur(),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,s=o.onDragEnd;if(i||a){var u=n.velocity;this.animateDragEnd(u)}null==s||s(t,n)}},t.prototype.snapToCursor=function(t){var n=this;this.prepareBoundingBox(),ce((function(e){var r=n.getAxisMotionValue(e);if(r){var o=_r(t).point,i=n.visualElement.box,a=i[e].max-i[e].min,s=i[e].min+a/2,u=o[e]-s;n.originPoint[e]=o[e],r.set(u)}else n.cursorProgress[e]=.5,n.updateVisualElementAxis(e,t)}))},t.prototype.updateAxis=function(t,n,e){if(ho(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?so(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],s=function(t,n,e,r,o){var i=t-n*e;return r?so(i,r,o):i}(_r(n).point[t],i,a,null===(e=this.constraints)||void 0===e?void 0:e[t],r);this.visualElement.setAxisTarget(t,s,s+i)},t.prototype.updateProps=function(t){var n=t.drag,e=void 0!==n&&n,r=t.dragDirectionLock,o=void 0!==r&&r,s=t.dragPropagation,u=void 0!==s&&s,c=t.dragConstraints,f=void 0!==c&&c,l=t.dragElastic,p=void 0===l?.35:l,d=t.dragMomentum,h=void 0===d||d,v=a(t,["drag","dragDirectionLock","dragPropagation","dragConstraints","dragElastic","dragMomentum"]);this.props=i({drag:e,dragDirectionLock:o,dragPropagation:u,dragConstraints:f,dragElastic:p,dragMomentum:h},v)},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,a=e.dragElastic,s=e.dragTransition,u=ce((function(e){if(ho(e,r,n.currentDirection)){var u=n.constraints?n.constraints[e]:{},c=a?200:1e6,f=a?40:1e7,l=i(i({type:"inertia",velocity:o?t[e]:0,bounceStiffness:c,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10},s),u);return n.getAxisMotionValue(e)?n.startAxisValueAnimation(e,l):n.visualElement.startLayoutAxisAnimation(e,l)}}));return Promise.all(u).then((function(){var t,e;null===(e=(t=n.props).onDragTransitionEnd)||void 0===e||e.call(t)}))},t.prototype.stopMotion=function(){var t=this;ce((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),me(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};ce((function(n){o[n]=ae(t.visualElement.targetBox[n],t.constraintsBox[n])})),this.prepareBoundingBox(),this.resolveDragConstraints(),ce((function(n){if(ho(n,e,null)){var r=function(t,n,e){var r=t.max-t.min,o=rt(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=Qr(t.getInstance(),"pointerdown",(function(t){var e=n.props,r=e.drag,o=e.dragListener;r&&(void 0===o||o)&&n.start(t)})),r=Ir(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(fo,{cursorProgress:i.cursorProgress}),function(){null==e||e(),null==r||r(),null==o||o(),n.cancelDrag()}},t}();function ho(t,n,e){return!(!0!==n&&n!==t||null!==e&&e!==t)}var vo=function(t){return function(n){return t(n),null}},mo=vo((function(t){var e=t.visualElement;return function(t,e){var r=t.dragControls,o=n.useContext(Pr).transformPagePoint,a=be((function(){return new po({visualElement:e})}));a.updateProps(i(i({},t),{transformPagePoint:o})),n.useEffect((function(){return r&&r.subscribe(a)}),[a]),n.useEffect((function(){return a.mount(e)}),[])}(a(t,["visualElement"]),e)})),yo={key:"drag",shouldRender:function(t){return!!t.drag},getComponent:function(){return mo}};function go(t){return n.useEffect((function(){return function(){return t()}}),[])}function xo(t,e){var r=t.onPan,o=t.onPanStart,i=t.onPanEnd,a=t.onPanSessionStart,s=r||o||i||a,u=n.useRef(null),c=n.useContext(Pr).transformPagePoint,f={onSessionStart:a,onStart:o,onMove:r,onEnd:function(t,n){u.current=null,i&&i(t,n)}};n.useEffect((function(){null!==u.current&&u.current.updateHandlers(f)})),to(e,"pointerdown",s&&function(t){u.current=new no(t,f,{transformPagePoint:c})}),go((function(){return u.current&&u.current.end()}))}var bo=function(t,n){return!!n&&(t===n||bo(t,n.parentElement))},Eo=["whileHover","whileTap","whileDrag"],wo=function(t){return Eo.indexOf(t)+1},Co=wo("whileTap");function Po(t,e){var r=t.onTap,o=t.onTapStart,i=t.onTapCancel,a=t.whileTap,s=t.controls,u=r||o||i||a,c=n.useRef(!1),f=n.useRef(null);function l(){f.current&&f.current(),f.current=null}a&&s&&s.setOverride(a,Co);var p=n.useRef(null);p.current=function(t,n){var o=e.current;if(l(),c.current&&o){c.current=!1,s&&a&&s.clearOverride(Co);var u=Dr(!0);u&&(u(),bo(o,t.target)?r&&r(t,n):i&&i(t,n))}},to(e,"pointerdown",u?function(t,n){l(),f.current=Qr(window,"pointerup",(function(t,n){return p.current(t,n)})),e.current&&!c.current&&(c.current=!0,o&&o(t,n),s&&a&&s.startOverride(Co))}:void 0),go(l)}var So=wo("whileHover"),Ao=function(t){return function(n,e){jr(n)&&t(n,e)}};function Vo(t,n){xo(t,n),Po(t,n),function(t,n){var e=t.whileHover,r=t.onHoverStart,o=t.onHoverEnd,i=t.controls;e&&i&&i.setOverride(e,So),to(n,"pointerenter",Ao((function(t,n){r&&r(t,n),e&&i&&i.startOverride(So)}))),to(n,"pointerleave",Ao((function(t,n){o&&o(t,n),e&&i&&i.clearOverride(So)})))}(t,n)}var Mo,To=["onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","whileTap","whileHover","onHoverStart","onHoverEnd"],Lo=vo((function(t){var n=t.visualElement;Vo(a(t,["visualElement"]),n)})),Bo={key:"gestures",shouldRender:function(t){return To.some((function(n){return t.hasOwnProperty(n)}))},getComponent:function(){return Lo}},Oo=vo((function(t){var e=t.animate,r=t.controls,o=t.exit,a=s(Re(),2),u=a[0],c=a[1],f=n.useContext(ke),l=n.useRef(!1),p=void 0!==(null==f?void 0:f.custom)?f.custom:t.custom;n.useEffect((function(){u?!l.current||!e||"boolean"==typeof e||e instanceof ur||r.start(e):(!l.current&&o&&(r.setProps(i(i({},t),{custom:p})),r.start(o).then(c)),l.current=!0),u&&(l.current=!1)}),[e,r,p,o,u,c,t])})),ko={key:"exit",shouldRender:function(t){return!!t.exit&&!dr(t)},getComponent:function(){return Oo}};!function(t){t.Target="Target",t.VariantLabel="VariantLabel",t.AnimationSubscription="AnimationSubscription"}(Mo||(Mo={}));function Ro(t,n){void 0===n&&(n=!1);t.transition;var e=t.transitionEnd,r=a(t,["transition","transitionEnd"]);return n?i(i({},r),e):r}var Do,Fo,Uo=function(t){var n,e=t instanceof yn?t.get():t;return Array.from(new Set((n=e)?Array.isArray(n)?n:[n]:[]))};var Io=((Do={})[Mo.Target]=vo((function(t){return function(t,e,r,o){var a=n.useRef(!0),s=n.useRef(null);s.current||(s.current=Ro(t,!0)),n.useEffect((function(){var n,u,c={},f=Ro(t),l=Ro(t,!0);for(var p in f){var d=a.current&&(!r.hasValue(p)||r.getValue(p).get()!==l[p]),h=null!==l[p],v=(n=s.current[p],void 0!==(u=l[p])&&(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));h&&(v||d)&&(c[p]=f[p])}a.current=!1,s.current=i(i({},s.current),l),Object.keys(c).length&&e.start(i(i({},c),{transition:t.transition||o,transitionEnd:t.transitionEnd}))}),[t])}(t.animate,t.controls,t.visualElement,t.transition)})),Do[Mo.VariantLabel]=vo((function(t){var e=t.animate,r=t.inherit,o=void 0===r||r,i=t.controls;return function(t,e,r,o){var i=Uo(e),a=n.useContext(cr),s=a.hasMounted&&a.hasMounted.current,u=n.useRef(!1);n.useEffect((function(){var n,e,c=!1;r?(c=!!s,i=Uo(a.animate)):c=u.current||(n=Uo(t),e=i,n.join(",")!==e.join(",")),c&&o.start(i),u.current=!0}),[i.join(",")])}(t.initial,e,o,i)})),Do[Mo.AnimationSubscription]=vo((function(t){return function(t,e){var r=n.useMemo((function(){return t.subscribe(e)}),[t]);n.useEffect((function(){return function(){r&&r()}}),[r])}(t.animate,t.controls)})),Do),Ho=function(t){return t.animate instanceof ur},jo=["initial","animate","whileTap","whileHover"],Xo=((Fo={})[Mo.Target]=function(t){return!(void 0===t.animate||(n=t.animate,Array.isArray(n)||"string"==typeof n)||Ho(t));var n},Fo[Mo.VariantLabel]=function(t){return void 0!==t.variants||jo.some((function(n){return"string"==typeof t[n]}))},Fo[Mo.AnimationSubscription]=Ho,Fo),Yo={key:"animation",shouldRender:function(){return!0},getComponent:function(t){var n=void 0;for(var e in Mo)Xo[e](t)&&(n=e);return n?Io[n]:void 0}};var zo=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.frameTarget={x:{min:0,max:0},y:{min:0,max:0}},n.stopAxisAnimation={x:void 0,y:void 0},n.animate=function(t,e,r){void 0===r&&(r={});var o=r.originBox,i=r.targetBox,s=r.visibilityAction,u=a(r,["originBox","targetBox","visibilityAction"]),c=n.props,f=c.visualElement,l=c.layout,p=No(e=o||e,t=i||t),d=ce((function(r){if("position"===l){var o=t[r].max-t[r].min;e[r].max=e[r].min+o}if(!f.isTargetBoxLocked)return void 0===s?p?n.animateAxis(r,t[r],e[r],u):f.setAxisTarget(r,t[r].min,t[r].max):void(s===Cr.Hide?f.hide():f.show())}));return f.render(),Promise.all(d).then((function(){var t,e;null===(e=(t=n.props).onLayoutAnimationComplete)||void 0===e||e.call(t),f.isPresent?f.presence=wr.Present:n.safeToRemove()}))},n}return o(n,t),n.prototype.componentDidMount=function(){var t=this.props.visualElement;t.enableLayoutProjection(),this.unsubLayoutReady=t.onLayoutUpdate(this.animate)},n.prototype.componentWillUnmount=function(){var t=this;this.unsubLayoutReady(),ce((function(n){var e,r;return null===(r=(e=t.stopAxisAnimation)[n])||void 0===r?void 0:r.call(e)}))},n.prototype.animateAxis=function(t,n,e,r){var o,i,a=void 0===r?{}:r,s=a.transition,u=a.crossfadeOpacity;null===(i=(o=this.stopAxisAnimation)[t])||void 0===i||i.call(o);var c=this.props.visualElement,f=this.frameTarget[t],l=c.axisProgress[t];l.clearListeners(),l.set(0),l.set(0);var p=u&&this.createCrossfadeAnimation(u),d=function(){var r=l.get()/1e3;!function(t,n,e,r){t.min=rt(n.min,e.min,r),t.max=rt(n.max,e.max,r)}(f,e,n,r),c.setAxisTarget(t,f.min,f.max),null==p||p(r)};d();var h=me("x"===t?"layoutX":"layoutY",l,1e3,s||this.props.transition||qo),v=l.onChange(d);return this.stopAxisAnimation[t]=function(){l.stop(),v()},h},n.prototype.createCrossfadeAnimation=function(t){var n=this.props.visualElement.getValue("opacity",0);return function(e){n.set(Zo(rt(0,1,e))),t.set($o(rt(1,0,e)))}},n.prototype.safeToRemove=function(){var t,n;null===(n=(t=this.props).safeToRemove)||void 0===n||n.call(t)},n.prototype.render=function(){return null},n}(n.Component);function Wo(t){var e=s(Re(),2)[1];return n.createElement(zo,i({},t,{safeToRemove:e}))}function No(t,n){return _o(t.x,n.x)||_o(t.y,n.y)}function _o(t,n){return t.min!==n.min||t.max!==n.max}var qo={duration:.45,ease:[.4,0,.1,1]};function Go(t,n,e){return function(r){return r<t?0:r>n?1:e(et(t,n,r))}}var Zo=Go(0,.5,Bt),$o=Go(.5,.95,At),Ko={key:"animate-layout",shouldRender:function(t){return!!t.layout||!!t.layoutId},getComponent:function(){return Wo}},Jo=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o(n,t),n.prototype.componentDidMount=function(){var t=this.props,n=t.syncLayout,e=t.visualElement;Mr(n)&&n.register(e)},n.prototype.getSnapshotBeforeUpdate=function(){var t=this.props,n=t.syncLayout,e=t.visualElement;return Mr(n)?n.syncUpdate():(e.snapshotBoundingBox(),n.add(e)),null},n.prototype.componentDidUpdate=function(){var t=this.props,n=t.syncLayout,e=t.visualElement;Mr(n)||n.flush();var r=e.axisProgress,o=r.x,i=r.y;!e.box||e.isTargetBoxLocked||o.isAnimating()||i.isAnimating()||(ce((function(t){var n=e.box[t],r=n.min,o=n.max;e.setAxisTarget(t,r,o)})),e.render())},n.prototype.render=function(){return null},n}(e.Component);function Qo(t){var r=n.useContext(Tr);return e.createElement(Jo,i({},t,{syncLayout:r}))}var ti={key:"measure-layout",shouldRender:function(t){return!!t.drag||!!t.layout||!!t.layoutId},getComponent:function(){return Qo}};function ni(t){var n={defaultFeatures:t,useVisualElement:He,render:We,animationControlsConfig:{makeTargetAnimatable:sr}};var e=new Map;return new Proxy({custom:function(t){return Br(t,n)}},{get:function(t,r){return"custom"===r?t.custom:(e.has(r)||e.set(r,Br(r,n)),e.get(r))}})}var ei=ni([ti,Yo,yo,Bo,ko,Ko]),ri=ni([ti]);var oi=0;function ii(){var t=oi;return oi++,t}var ai=function(t){var e=t.children,r=t.initial,o=t.isPresent,i=t.onExitComplete,a=t.custom,s=be(si),u={id:be(ii),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)}}};return n.useMemo((function(){s.forEach((function(t,n){return s.set(n,!1)}))}),[o]),n.createElement(ke.Provider,{value:u},e)};function si(){return new Map}function ui(t){return t.key||""}function ci(t,n){return n&&t!==n.lead?{visibilityAction:Cr.Hide}:n&&t.presence!==wr.Entering&&t===n.lead&&n.lead!==n.prevLead?{visibilityAction:Cr.Show}:(t.presence===wr.Entering?e=null==n?void 0:n.getFollowOrigin():t.presence===wr.Exiting&&(r=null==n?void 0:n.getFollowTarget()),{originBox:e,targetBox:r});var e,r}function fi(t,n){var e,r,o,i={},a=n&&n.lead,s=null==a?void 0:a.presence;return n&&t===a?t.presence===wr.Entering?i.originBox=n.getFollowOrigin():t.presence===wr.Exiting&&(i.targetBox=n.getFollowTarget()):n&&t===n.follow&&(i.transition=n.getLeadTransition(),s===wr.Entering?i.targetBox=n.getLeadTarget():s===wr.Exiting&&(i.originBox=n.getLeadOrigin())),(null===(e=null==n?void 0:n.follow)||void 0===e?void 0:e.isPresenceRoot)||(null==a?void 0:a.isPresenceRoot)?(n&&t!==a?n&&t===n.follow?a&&s!==wr.Entering&&s===wr.Exiting&&(i.crossfadeOpacity=null===(o=null==n?void 0:n.lead)||void 0===o?void 0:o.getValue("opacity",1)):i.visibilityAction=Cr.Hide:t.presence===wr.Entering&&(i.crossfadeOpacity=null===(r=null==n?void 0:n.follow)||void 0===r?void 0:r.getValue("opacity",0)),i):i}var li=function(){function t(){this.order=[],this.hasChildren=!1}return t.prototype.add=function(t){var n,e=t.config.layoutOrder;if(void 0===e)this.order.push(t);else{var r=this.order.findIndex((function(t){return e<=(t.config.layoutOrder||0)}));-1===r&&(t.presence=this.hasChildren?wr.Entering:wr.Present,r=this.order.length),this.order.splice(r,0,t)}if(this.snapshot){t.prevSnapshot=this.snapshot,t.prevViewportBox=this.snapshot.boundingBox;var o=this.snapshot.latestMotionValues;for(var i in o)t.hasValue(i)?null===(n=t.getValue(i))||void 0===n||n.set(o[i]):t.addValue(i,gn(o[i]))}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 p=t[l];if(l===c-1&&(f=p.isPresent),f)i=p;else{var d=t[l-1];d&&d.isPresent&&(i=p)}if(i){a=l;break}}if(i||(i=t[0]),u=t[a-1],i)for(l=a-1;l>=0;l--){if((p=t[l]).isPresent){u=p;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();Hn(r)||(t.latestMotionValues[e]=r)}));var n=lo.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)!==wr.Exiting},t.prototype.shouldStackAnimate=function(){return!0},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}(),pi=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=i(i({},Vr()),{syncUpdate:function(t){return n.scheduleUpdate(t)},forceUpdate:function(){n.syncContext=i({},n.syncContext),n.scheduleUpdate(!0)},register:function(t){return n.addChild(t)},remove:function(t){return n.removeChild(t)}}),n}return o(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!==wr.Entering&&(t.presence=t.presence===wr.Exiting?wr.Entering:wr.Present):t.presence=wr.Exiting})),this.updateStacks();var e="crossfade"===n?fi:ci,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.props._supportRotate&&this.children.forEach((function(t){return t.resetRotate()})),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?wr.Entering:wr.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 li),this.stacks.get(t)},e.prototype.render=function(){return n.createElement(Tr.Provider,{value:this.syncContext},this.props.children)},e}(n.Component);function di(t){return be((function(){return gn(t)}))}function hi(t,e){var r=di(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)}(t,(function(){return w.update(o,!1,!0)})),r}var vi=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],a=t[1+r],s=t[2+r],u=t[3+r],c=bt(a,s,i({mixer:vi(s[0])},u));return e?c(o):c}function yi(t,n,e,r){var o="function"==typeof n?n:mi(n,e,r);return Array.isArray(t)?gi(t,o):gi([t],(function(t){var n=s(t,1)[0];return o(n)}))}function gi(t,n){var e=be((function(){return[]}));return hi(t,(function(){e.length=0;for(var r=t.length,o=0;o<r;o++)e[o]=t[o].get();return n(e)}))}var xi=function(t){return t>.001?1/t:1e5};function bi(){return{scrollX:gn(0),scrollY:gn(0),scrollXProgress:gn(0),scrollYProgress:gn(0)}}function Ei(t,n,e){e.set(t&&n?t/n:0)}function wi(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),Ei(r,i,t.scrollXProgress),Ei(o,a,t.scrollYProgress)};return e(),e}var Ci=bi();function Pi(){return{xOffset:window.pageXOffset,yOffset:window.pageYOffset,xMaxOffset:document.body.clientWidth-window.innerWidth,yMaxOffset:document.body.clientHeight-window.innerHeight}}var Si=!1;var Ai=gn(null);if("undefined"!=typeof window)if(window.matchMedia){var Vi=window.matchMedia("(prefers-reduced-motion)"),Mi=function(){return Ai.set(Vi.matches)};Vi.addListener(Mi),Mi()}else Ai.set(!1);function Ti(t,n){return"boolean"==typeof n?n:Boolean(t)}var Li=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}(),Bi=function(){return new Li};var Oi=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.initialState={},n}return o(n,t),n.prototype.updateLayoutDelta=function(){},n.prototype.build=function(){},n.prototype.clean=function(){},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}(xn);t.AnimateLayoutFeature=Ko,t.AnimatePresence=function(t){var e=t.children,r=t.custom,o=t.initial,i=void 0===o||o,a=t.onExitComplete,c=t.exitBeforeEnter,f=function(){var t=s(n.useState(0),2),e=t[0],r=t[1];return n.useCallback((function(){return r(e+1)}),[e])}(),l=n.useContext(Tr);Mr(l)&&(f=l.forceUpdate);var p=n.useRef(!0),d=function(t){var e=[];return n.Children.forEach(t,(function(t){n.isValidElement(t)&&e.push(t)})),e}(e),h=n.useRef(d),v=n.useRef(new Map).current,m=n.useRef(new Set).current;if(function(t,n){t.forEach((function(t){var e=ui(t);n.set(e,t)}))}(d,v),p.current)return p.current=!1,n.createElement(n.Fragment,null,d.map((function(t){return n.createElement(ai,{key:ui(t),isPresent:!0,initial:!!i&&void 0},t)})));for(var y=u(d),g=h.current.map(ui),x=d.map(ui),b=g.length,E=0;E<b;E++){var w=g[E];-1===x.indexOf(w)?m.add(w):m.delete(w)}return c&&m.size&&(y=[]),m.forEach((function(t){if(-1===x.indexOf(t)){var e=v.get(t);if(e){var o=g.indexOf(t);y.splice(o,0,n.createElement(ai,{key:ui(e),isPresent:!1,onExitComplete:function(){v.delete(t),m.delete(t);var n=h.current.findIndex((function(n){return n.key===t}));h.current.splice(n,1),m.size||(h.current=d,f(),a&&a())},custom:r},e))}}})),y=y.map((function(t){var e=t.key;return m.has(e)?t:n.createElement(ai,{key:ui(t),isPresent:!0},t)})),h.current=y,n.createElement(n.Fragment,null,m.size?y:y.map((function(t){return n.cloneElement(t)})))},t.AnimateSharedLayout=pi,t.AnimationControls=ur,t.AnimationFeature=Yo,t.DragControls=Li,t.DragFeature=yo,t.ExitFeature=ko,t.GesturesFeature=Bo,t.MotionConfig=function(t){var e=t.children,r=t.features,o=void 0===r?[]:r,i=a(t,["children","features"]),s=u(n.useContext(Pr).features,o),c=n.useMemo((function(){return{features:s}}),[s.length]);for(var f in i)c[f]=i[f];return n.createElement(Pr.Provider,{value:c},e)},t.MotionConfigContext=Pr,t.MotionContext=cr,t.MotionValue=yn,t.PresenceContext=ke,t.ReducedMotion=function(t){var e=t.children,r=t.enabled,o=n.useContext(cr);return o=n.useMemo((function(){return i(i({},o),{isReducedMotion:r})}),[r]),n.createElement(cr.Provider,{value:o},e)},t.VisualElementAnimationControls=xr,t.addScaleCorrection=function(t){for(var n in t)qn[n]=t[n]},t.animationControls=function(){return new ur},t.createMotionComponent=Br,t.isValidMotionProp=Xe,t.m=ri,t.motion=ei,t.motionValue=gn,t.resolveMotionValue=function(t){var n,e=t instanceof yn?t.get():t;return n=e,Boolean(n&&"object"==typeof n&&n.mix&&n.toValue)?e.toValue():e},t.transform=mi,t.useAnimatedState=function(t){var e=s(n.useState(t),2),r=e[0],o=e[1],a=be((function(){return new Oi}));a.updateConfig({onUpdate:function(t){return o(i({},t))}}),a.initialState=t;var u=Er(a,{},{});return n.useEffect((function(){return a.mount({}),function(){return a.unmount()}}),[]),[r,be((function(){return function(t){return u.start(t)}}))]},t.useAnimation=function(){var t=be((function(){return new ur}));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?un(0,t.length,r.current+1):n,a(t[r.current])}]},t.useDomEvent=Hr,t.useDragControls=function(){return be(Bi)},t.useElementScroll=function(t){var n=be(bi);return Lr((function(){var e=t.current;if(e){var r=wi(n,function(t){return function(){return{xOffset:t.scrollLeft,yOffset:t.scrollTop,xMaxOffset:t.scrollWidth-t.offsetWidth,yMaxOffset:t.scrollHeight-t.offsetHeight}}}(e)),o=Ir(e,"scroll",r,{passive:!0}),i=Ir(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=Vo,t.useInvertedScale=function(t){var e=di(1),r=di(1),o=n.useContext(cr).visualElement;return t?(e=t.scaleX||e,r=t.scaleY||r):o&&(e=o.getValue("scaleX",1),r=o.getValue("scaleY",1)),{scaleX:yi(e,xi),scaleY:yi(r,xi)}},t.useIsPresent=De,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 hi(n,o)},t.useMotionValue=di,t.usePanGesture=xo,t.usePresence=Re,t.useReducedMotion=function(){var t=n.useContext(cr).isReducedMotion,e=s(n.useState(Ti(Ai.get(),t)),2),r=e[0],o=e[1];return n.useEffect((function(){return Ai.onChange((function(n){o(Ti(n,t))}))}),[o,t]),r},t.useSpring=function(t,e){void 0===e&&(e={});var r=n.useRef(null),o=di(hr(t)?t.get():t);return n.useMemo((function(){return o.attach((function(t,n){return r.current&&r.current.stop(),r.current=_t(i(i({from:o.get(),to:t,velocity:o.getVelocity()},e),{onUpdate:n})),o.get()}))}),Object.values(e)),function(t,e){n.useEffect((function(){return hr(t)?t.onChange(e):void 0}),[t])}(t,(function(t){return o.set(parseFloat(t))})),o},t.useTapGesture=Po,t.useTransform=yi,t.useViewportScroll=function(){return Lr((function(){!Si&&function(){if(Si=!0,"undefined"!=typeof window){var t=wi(Ci,Pi);Ir(window,"scroll",t,{passive:!0}),Ir(window,"resize",t)}}()}),[]),Ci},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 s(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 u(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(u(arguments[n]));return t}var f,l=function(t){return"object"==typeof t&&t.hasOwnProperty("current")},p=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-p));p=n+e,setTimeout((function(){return t(p)}),e)};!function(t){t.Read="read",t.Update="update",t.Render="render",t.PostRender="postRender",t.FixedUpdate="fixedUpdate"}(f||(f={}));var h=1/60*1e3,v=!0,m=!1,y=!1,g={delta:0,timestamp:0},x=[f.Read,f.Update,f.Render,f.PostRender],b=function(t){return m=t},E=x.reduce((function(t,n){var e=function(t){var n=[],e=[],r=0,o=!1,i=0,a=new WeakSet,s=new WeakSet,u={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!==s.has(l)||a.has(l)||(u.schedule(l),t(!0));o=!1},schedule:function(t,i,u){void 0===i&&(i=!1),void 0===u&&(u=!1);var c=u&&o,f=c?n:e;a.delete(t),i&&s.add(t),-1===f.indexOf(t)&&(f.push(t),c&&(r=n.length))}};return u}(b);return t.sync[n]=function(t,n,r){return void 0===n&&(n=!1),void 0===r&&(r=!1),m||M(),e.schedule(t,n,r),t},t.cancelSync[n]=function(t){return e.cancel(t)},t.steps[n]=e,t}),{steps:{},sync:{},cancelSync:{}}),w=E.steps,C=E.sync,P=E.cancelSync,S=function(t){return w[t].process(g)},A=function(t){m=!1,g.delta=v?h:Math.max(Math.min(t-g.timestamp,40),1),v||(h=g.delta),g.timestamp=t,y=!0,x.forEach(S),y=!1,m&&(v=!1,d(A))},M=function(){m=!0,v=!0,y||d(A)},V=function(){return g},T=function(t,n){return function(e){return Math.max(Math.min(e,n),t)}},L=function(t){return t%1?Number(t.toFixed(5)):t},B=/(-)?(\d[\d\.]*)/g,O=/(#[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,k=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i,R={test:function(t){return"number"==typeof t},parse:parseFloat,transform:function(t){return t}},D=a(a({},R),{transform:T(0,1)}),F=a(a({},R),{default:1}),U=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}}},I=U("deg"),j=U("%"),H=U("px"),X=U("vh"),Y=U("vw"),z=a(a({},j),{parse:function(t){return j.parse(t)/100},transform:function(t){return j.transform(100*t)}}),W=T(0,255),N=function(t){return void 0!==t.red},q=function(t){return void 0!==t.hue};var _=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({},R),{transform:function(t){return Math.round(W(t))}});function Z(t,n){return t.startsWith(n)&&k.test(t)}var $={test:function(t){return"string"==typeof t?Z(t,"rgb"):N(t)},parse:_(["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:L(D.transform(i))})}},K={test:function(t){return"string"==typeof t?Z(t,"hsl"):q(t)},parse:_(["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:j.transform(L(e)),lightness:j.transform(L(r)),alpha:L(D.transform(i))})}},J=a(a({},$),{test:function(t){return"string"==typeof t&&Z(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}}}),Q={test:function(t){return"string"==typeof t&&k.test(t)||N(t)||q(t)},parse:function(t){return $.test(t)?$.parse(t):K.test(t)?K.parse(t):J.test(t)?J.parse(t):t},transform:function(t){return N(t)?$.transform(t):q(t)?K.transform(t):t}},tt=function(t){return"number"==typeof t?0:t},nt={test:function(t){if("string"!=typeof t||!isNaN(t))return!1;var n=0,e=t.match(B),r=t.match(O);return e&&(n+=e.length),r&&(n+=r.length),n>0},parse:function(t){var n=t,e=[],r=n.match(O);r&&(n=n.replace(O,"${c}"),e.push.apply(e,r.map(Q.parse)));var o=n.match(B);return o&&e.push.apply(e,o.map(R.parse)),e},createTransformer:function(t){var n=t,e=0,r=t.match(O),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(B),s=a?a.length:0;if(a)for(i=0;i<s;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?Q.transform(t[i]):L(t[i]));return r}},getAnimatableNone:function(t){var n=nt.parse(t);return nt.createTransformer(t)(n.map(tt))}},et=function(){function t(t){this.isComplete=!1,this.updateOptions(t),this.createSpring()}return t.prototype.createSpring=function(){var t=this.options,n=t.velocity,e=t.from,r=t.to,o=t.damping,i=t.stiffness,a=t.mass,s=n?-n/1e3:0,u=r-e,c=o/(2*Math.sqrt(i*a)),f=Math.sqrt(i/a)/1e3;if(c<1)this.resolveSpring=function(t){var n=Math.exp(-c*f*t),e=f*Math.sqrt(1-c*c);return r-n*((s+c*f*u)/e*Math.sin(e*t)+u*Math.cos(e*t))},this.resolveVelocity=function(t){var n=Math.exp(-c*f*t),e=f*Math.sqrt(1-c*c);return c*f*n*(Math.sin(e*t)*(s+c*f*u)/e+u*Math.cos(e*t))-n*(Math.cos(e*t)*(s+c*f*u)-e*u*Math.sin(e*t))};else if(1===c)this.resolveSpring=function(t){var n=Math.exp(-f*t);return r-n*(1+f*t)},this.resolveVelocity=function(){return 0};else{var l=f*Math.sqrt(c*c-1);this.resolveSpring=function(t){var n=Math.exp(-c*f*t);return r-n*((s+c*f*u)*Math.sinh(l*t)+l*u*Math.cosh(l*t))/l},this.resolveVelocity=function(){return 0}}},t.prototype.update=function(t){var n=this.options,e=n.restSpeed,r=n.restDelta,o=n.to,i=this.resolveSpring(t),a=1e3*this.resolveVelocity(t),s=Math.abs(a)<=e,u=Math.abs(o-i)<=r;return this.isComplete=s&&u,this.isComplete?o:i},t.prototype.updateOptions=function(t){var n=t.from,e=void 0===n?0:n,r=t.to,o=void 0===r?0:r,i=t.velocity,a=void 0===i?0:i,s=t.stiffness,u=void 0===s?100:s,c=t.damping,f=void 0===c?10:c,l=t.mass,p=void 0===l?1:l,d=t.restSpeed,h=void 0===d?10:d,v=t.restDelta;void 0===v&&(v=Math.abs(o-e)<=1?.01:.5),this.options={from:e,to:o,velocity:a,stiffness:u,damping:f,mass:p,restSpeed:h,restDelta:v}},t.prototype.flipTarget=function(){var t=this.options,n=t.from,e=t.to,r=t.velocity;this.options.velocity=-r,this.options.from=e,this.options.to=n,this.createSpring()},t.needsInterpolation=function(t,n){return"string"==typeof t||"string"==typeof n},t.uniqueOptionKeys=new Set(["velocity","stiffness","damping","mass","restSpeed","restDelta"]),t}(),rt=function(t,n,e){var r=n-t;return 0===r?1:(e-t)/r},ot=function(t,n,e){return-e*t+e*n+t},it=function(t,n,e){var r=t*t,o=n*n;return Math.sqrt(Math.max(0,e*(o-r)+r))},at=[J,$,K],st=function(t){return at.find((function(n){return n.test(t)}))},ut=function(t,n){var e=st(t),r=st(n);e.transform,r.transform;var o=e.parse(t),i=r.parse(n),s=a({},o),u=e===K?ot:it;return function(t){for(var n in s)"alpha"!==n&&(s[n]=u(o[n],i[n],t));return s.alpha=ot(o.alpha,i.alpha,t),e.transform(s)}},ct={x:0,y:0,z:0},ft=function(t){return"number"==typeof t},lt=function(t,n){return function(e){return n(t(e))}},pt=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.reduce(lt)};function dt(t,n){return ft(t)?function(e){return ot(t,n,e)}:Q.test(t)?ut(t,n):yt(t,n)}var ht=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,s=i.length;a<s;a++,o++)r[o]=i[a];return r}(t),r=e.length,o=t.map((function(t,e){return dt(t,n[e])}));return function(t){for(var n=0;n<r;n++)e[n]=o[n](t);return e}},vt=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]=dt(t[o],n[o]));return function(t){for(var n in r)e[n]=r[n](t);return e}};function mt(t){for(var n=nt.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 yt=function(t,n){var e=nt.createTransformer(n),r=mt(t),o=mt(n);return pt(ht(r.parsed,o.parsed),e)},gt=function(t,n,e){return Math.min(Math.max(e,t),n)},xt=function(t,n){return function(e){return ot(t,n,e)}};function bt(t,n,e){for(var r,o=[],i=e||("number"==typeof(r=t[0])?xt:"string"==typeof r?Q.test(r)?ut:yt:Array.isArray(r)?ht:"object"==typeof r?vt:void 0),a=t.length-1,s=0;s<a;s++){var u=i(t[s],t[s+1]);if(n){var c=Array.isArray(n)?n[s]:n;u=pt(c,u)}o.push(u)}return o}function Et(t,n,e){var r=void 0===e?{}:e,o=r.clamp,i=void 0===o||o,a=r.ease,s=r.mixer,u=t.length;n.length,!a||!Array.isArray(a)||a.length,t[0]>t[u-1]&&(t=[].concat(t),n=[].concat(n),t.reverse(),n.reverse());var c=bt(n,a,s),f=2===u?function(t,n){var e=t[0],r=t[1],o=n[0];return function(t){return o(rt(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 s=1;s<e&&!(t[s]>o||s===r);s++);i=s-1}var u=rt(t[i],t[i+1],o);return n[i](u)}}(t,c);return i?function(n){return f(gt(t[0],t[u-1],n))}:f}var wt=function(t){return function(n){return 1-t(1-n)}},Ct=function(t){return function(n){return n<=.5?t(2*n)/2:(2-t(2*(1-n)))/2}},Pt=function(t){return function(n){return Math.pow(n,t)}},St=function(t){return function(n){return n*n*((t+1)*n-t)}},At=function(t){var n=St(t);return function(t){return(t*=2)<1?.5*n(t):.5*(2-Math.pow(2,-10*(t-1)))}},Mt=function(t){return t},Vt=Pt(2),Tt=wt(Vt),Lt=Ct(Vt),Bt=function(t){return 1-Math.sin(Math.acos(t))},Ot=wt(Bt),kt=Ct(Ot),Rt=St(1.525),Dt=wt(Rt),Ft=Ct(Rt),Ut=At(1.525),It=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},jt=wt(It);var Ht=function(){function t(t){this.isComplete=!1,this.updateOptions(t);var n=this.options,e=n.from,r=n.to;this.values=Array.isArray(r)?r:[e,r],this.createInterpolator()}return t.prototype.createInterpolator=function(){var t,n,e=this.options,r=e.duration,o=e.ease,i=e.offset;o=Array.isArray(o)?o:(t=this.values,n=o,t.map((function(){return n||Lt})).splice(0,t.length-1));var a=function(t,n){return t.map((function(t){return t*n}))}(i=i||function(t){var n=t.length;return t.map((function(t,e){return 0!==e?e/(n-1):0}))}(this.values),r);this.interpolator=Et(a,this.values,{ease:o})},t.prototype.update=function(t){var n=this.options.duration;return this.isComplete=t>=n,this.interpolator(t)},t.prototype.updateOptions=function(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,s=t.duration,u=void 0===s?300:s;this.options={from:e,to:o,ease:i,offset:a,duration:u}},t.prototype.flipTarget=function(){this.values.reverse(),this.createInterpolator()},t.needsInterpolation=function(){return!1},t.uniqueOptionKeys=new Set(["duration","ease"]),t}(),Xt=function(){function t(t){this.isComplete=!1,this.updateOptions(t);var n=this.options,e=n.power,r=n.velocity,o=n.modifyTarget,i=n.from,a=e*r,s=i+a,u=void 0===o?s:o(s);u!==s&&(a=u-i),this.target=u,this.amplitude=a}return t.prototype.flipTarget=function(){},t.prototype.update=function(t){var n=this.options,e=n.timeConstant,r=n.restDelta,o=-this.amplitude*Math.exp(-t/e);return this.isComplete=!(o>r||o<-r),this.isComplete?this.target:this.target+o},t.prototype.updateOptions=function(t){var n=void 0===t?{}:t,e=n.velocity,r=void 0===e?0:e,o=n.from,i=void 0===o?0:o,a=n.power,s=void 0===a?.8:a,u=n.timeConstant,c=void 0===u?350:u,f=n.restDelta,l=void 0===f?.5:f,p=n.modifyTarget;this.options={velocity:r,from:i,power:s,timeConstant:c,restDelta:l,modifyTarget:p}},t.needsInterpolation=function(){return!1},t.uniqueOptionKeys=new Set(["power","timeConstant","modifyTarget"]),t}(),Yt=[Ht,Xt,et],zt={keyframes:Ht,spring:et,decay:Xt},Wt=Yt.length;function Nt(t,n,e){return void 0===e&&(e=0),t-n-e}var qt=function(t){var n=function(n){var e=n.delta;return t(e)};return{start:function(){return C.update(n,!0,!0)},stop:function(){return P.update(n)}}};function _t(t){var n,e,r,o=t.from,i=t.to,u=t.autoplay,c=void 0===u||u,f=t.driver,l=void 0===f?qt:f,p=t.elapsed,d=void 0===p?0:p,h=t.repeat,v=void 0===h?0:h,m=t.repeatType,y=void 0===m?"loop":m,g=t.repeatDelay,x=void 0===g?0:g,b=t.onPlay,E=t.onStop,w=t.onComplete,C=t.onRepeat,P=t.onUpdate,S=s(t,["from","to","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]),A=0,M=S.duration,V=!1,T=!0,L=function(t){if(zt[t.type])return zt[t.type];for(var n in t)for(var e=0;e<Wt;e++){var r=Yt[e];if(r.uniqueOptionKeys.has(n))return r}return Ht}(S);L.needsInterpolation(o,i)&&(r=Et([0,100],[o,i],{clamp:!1}),o=0,i=100);var B=new L(a(a({},S),{from:o,to:i}));function O(){A++,"reverse"===y?d=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}(d,M,x,T=A%2==0):(d=Nt(d,M,x),"mirror"===y&&B.flipTarget()),V=!1,B.isComplete=!1,C&&C()}function k(t){var o;T||(t=-t),d+=t,V||(e=B.update(Math.max(0,d)),r&&(e=r(e)),V=T?B.isComplete:d<=0),null===(o=P)||void 0===o||o(e),V&&(0===A&&void 0===M&&(M=d),A<v?function(t,n,e,r){return r?t>=n+e:t<=-e}(d,M,x,T)&&O():(n.stop(),w&&w()))}function R(){var t;null===(t=b)||void 0===t||t(),(n=l(k)).start()}return c&&R(),{play:R,pause:function(){},resume:function(){},reverse:function(){},seek:function(){},stop:function(){var t;null===(t=E)||void 0===t||t(),n.stop()}}}function Gt(t,n){return n?t*(1e3/n):0}function Zt(t){var n,e=t.from,r=void 0===e?0:e,o=t.velocity,i=void 0===o?0:o,s=t.min,u=t.max,c=t.power,f=void 0===c?.8:c,l=t.timeConstant,p=void 0===l?750:l,d=t.bounceStiffness,h=void 0===d?500:d,v=t.bounceDamping,m=void 0===v?10:v,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!==s&&t<s||void 0!==u&&t>u}function P(t){return void 0===s?u:void 0===u||Math.abs(s-t)<Math.abs(u-t)?s:u}function S(t){var e;null===(e=n)||void 0===e||e.stop(),n=_t(a(a({},t),{driver:b,onUpdate:function(n){var e,r,o;null===(e=E)||void 0===e||e(n),null===(o=(r=t).onUpdate)||void 0===o||o.call(r,n)},onComplete:w}))}function A(t){S(a({type:"spring",stiffness:h,damping:m,restDelta:g},t))}if(C(r))A({from:r,velocity:i,to:P(r)});else{var M=f*i+r;void 0!==x&&(M=x(M));var T,L=P(M),B=L===s?-1:1;S({type:"decay",from:r,velocity:i,timeConstant:p,power:f,restDelta:g,modifyTarget:x,onUpdate:C(M)?function(t){i=Gt(t-T,V().delta),T=t,L-t*B>0||A({from:T,to:L,velocity:i})}:void 0})}return{stop:function(){var t;return null===(t=n)||void 0===t?void 0:t.stop()}}}var $t=function(t){return 180*t/Math.PI},Kt=function(t){return t},Jt=function(t){return void 0===t&&(t=Kt),function(n,e,r){var o=e-r,i=-(0-n+1)*(0-t(Math.abs(o)));return o<=0?e+i:e-i}},Qt=Jt(),tn=Jt(Math.sqrt),nn=function(t){return t*Math.PI/180},en=function(t){return t.hasOwnProperty("x")&&t.hasOwnProperty("y")},rn=function(t){return en(t)&&t.hasOwnProperty("z")},on=function(t,n){return Math.abs(t-n)};function an(t,n){if(ft(t)&&ft(n))return on(t,n);if(en(t)&&en(n)){var e=on(t.x,n.x),r=on(t.y,n.y),o=rn(t)&&rn(n)?on(t.z,n.z):0;return Math.sqrt(Math.pow(e,2)+Math.pow(r,2)+Math.pow(o,2))}}var sn=function(t,n){return void 0===n&&(n=2),n=Math.pow(10,n),Math.round(t*n)/n},un=function(t,n,e,r){return void 0===r&&(r=0),sn(t+e*(n-t)/Math.max(r,e))};var cn=function(t,n,e){var r=n-t;return((e-t)%r+r)%r+t},fn=function(t,n){return 1-3*n+3*t},ln=function(t,n){return 3*n-6*t},pn=function(t){return 3*t},dn=function(t,n,e){return((fn(n,e)*t+ln(n,e))*t+pn(n))*t},hn=function(t,n,e){return 3*fn(n,e)*t*t+2*ln(n,e)*t+pn(n)};function vn(t,n,e,r){if(t===n&&e===r)return Mt;for(var o=new Float32Array(11),i=0;i<11;++i)o[i]=dn(.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])),s=hn(a,t,e);return s>=.001?function(t,n,e,r){for(var o=0;o<8;++o){var i=hn(n,e,r);if(0===i)return n;n-=(dn(n,e,r)-t)/i}return n}(n,a,t,e):0===s?a:function(t,n,e,r,o){var i,a,s=0;do{(i=dn(a=n+(e-n)/2,r,o)-t)>0?e=a:n=a}while(Math.abs(i)>1e-7&&++s<10);return a}(n,r,r+.1,t,e)}return function(t){return 0===t||1===t?t:dn(a(t),n,r)}}var mn=Object.freeze({__proto__:null,DecayAnimator:Xt,KeyframesAnimator:Ht,SpringAnimator:et,angle:function(t,n){return void 0===n&&(n=ct),$t(Math.atan2(n.y-t.y,n.x-t.x))},animate:_t,anticipate:Ut,applyOffset:function(t,n){var e=!0;return void 0===n&&(n=t,e=!1),function(r){return e?r-t+n:(t=r,e=!0,n)}},attract:Qt,attractExpo:tn,backIn:Rt,backInOut:Ft,backOut:Dt,bounceIn:jt,bounceInOut:function(t){return t<.5?.5*(1-It(1-2*t)):.5*It(2*t-1)+.5},bounceOut:It,circIn:Bt,circInOut:kt,circOut:Ot,clamp:gt,createAnticipate:At,createAttractor:Jt,createBackIn:St,createExpoIn:Pt,cubicBezier:vn,degreesToRadians:nn,distance:an,easeIn:Vt,easeInOut:Lt,easeOut:Tt,inertia:Zt,interpolate:Et,isPoint:en,isPoint3D:rn,linear:Mt,mirrorEasing:Ct,mix:ot,mixColor:ut,mixComplex:yt,pipe:pt,pointFromVector:function(t,n,e){return n=nn(n),{x:e*Math.cos(n)+t.x,y:e*Math.sin(n)+t.y}},progress:rt,radiansToDegrees:$t,reverseEasing:wt,smooth:function(t){void 0===t&&(t=50);var n=0,e=0;return function(r){var o=V().timestamp,i=o!==e?o-e:0,a=i?un(n,r,i,t):n;return e=o,n=a,a}},smoothFrame:un,snap:function(t){if("number"==typeof t)return function(n){return Math.round(n/t)*t};var n=0,e=t.length;return function(r){var o=Math.abs(t[0]-r);for(n=1;n<e;n++){var i=t[n],a=Math.abs(i-r);if(0===a)return i;if(a>o)return t[n-1];if(n===e-1)return i;o=a}}},steps:function(t,n){return void 0===n&&(n="end"),function(e){var r=(e="end"===n?Math.min(e,.999):Math.max(e,.001))*t,o="end"===n?Math.floor(r):Math.ceil(r);return gt(0,1,o/t)}},toDecimal:sn,velocityPerFrame:function(t,n){return t/(1e3/n)},velocityPerSecond:Gt,wrap:cn}),yn=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}(),gn=function(){function t(t){var n,e=this;this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new yn,this.renderSubscribers=new yn,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=V(),o=r.delta,i=r.timestamp;e.lastUpdated!==i&&(e.timeDelta=o,e.lastUpdated=i,C.postRender(e.scheduleVelocityCheck))},this.scheduleVelocityCheck=function(){return C.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?Gt(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 xn(t){return new gn(t)}var bn=function(){function t(t,n){var e=this;this.children=new Set,this.latest={},this.values=new Map,this.valueSubscriptions=new Map,this.config={},this.update=function(){return e.config.onUpdate(e.latest)},this.triggerRender=function(){return e.render()},this.scheduleRender=function(){return C.render(e.triggerRender,!1,!0)},this.ref=function(t){t?e.mount(t):e.unmount(),e.externalRef&&("function"==typeof e.externalRef?e.externalRef(t):l(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.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.latest[t]=n.get(),this.element&&this.subscribeToValue(t,n)},t.prototype.removeValue=function(t){var n=this.valueSubscriptions.get(t);n&&n(),this.values.delete(t),delete this.latest[t],this.valueSubscriptions.delete(t)},t.prototype.getValue=function(t,n){var e=this.values.get(t);return void 0===e&&void 0!==n&&(e=new gn(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.scheduleUpdateLayoutDelta=function(){C.update(this.rootParent.updateLayoutDelta,!1,!0)},t.prototype.subscribeToValue=function(t,n){var e=this,r=n.onChange((function(n){e.setSingleStaticValue(t,n),e.latest[t]=n,e.config.onUpdate&&C.update(e.update,!1,!0)})),o=n.onRenderRequest(this.scheduleRender);this.valueSubscriptions.set(t,(function(){r(),o()}))},t.prototype.mount=function(t){var n=this;this.parent&&(this.removeFromParent=this.parent.subscribe(this)),this.element=this.current=t,this.forEachValue((function(t,e){return n.subscribeToValue(e,t)}))},t.prototype.unmount=function(){var t=this;this.forEachValue((function(n,e){return t.removeValue(e)})),P.update(this.update),P.render(this.render),this.removeFromParent&&this.removeFromParent()},t}();function En(t){return t}function wn(t){var n=t.top;return{x:{min:t.left,max:t.right},y:{min:n,max:t.bottom}}}function Cn(t){return{x:a({},t.x),y:a({},t.y)}}var Pn={translate:0,scale:1,origin:0,originPoint:0};function Sn(){return{x:a({},Pn),y:a({},Pn)}}var An=a(a({},R),{transform:Math.round}),Mn={color:Q,backgroundColor:Q,outlineColor:Q,fill:Q,stroke:Q,borderColor:Q,borderTopColor:Q,borderRightColor:Q,borderBottomColor:Q,borderLeftColor:Q,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:I,rotateX:I,rotateY:I,rotateZ:I,scale:F,scaleX:F,scaleY:F,scaleZ:F,skew:I,skewX:I,skewY:I,distance:H,translateX:H,translateY:H,translateZ:H,x:H,y:H,z:H,perspective:H,transformPerspective:H,opacity:D,originX:z,originY:z,originZ:H,zIndex:An,fillOpacity:D,strokeOpacity:D,numOctaves:An},Vn=[R,H,j,I,Y,X,{test:function(t){return"auto"===t},parse:function(t){return t}}],Tn=function(t){return function(n){return n.test(t)}},Ln=function(t){return Vn.find(Tn(t))},Bn=c(Vn,[Q,nt]),On=function(t){return Bn.find(Tn(t))},kn=function(t){return Mn[t]},Rn=function(t,n){return n&&"number"==typeof t?n.transform(t):t},Dn=["","X","Y","Z"],Fn=new Set,Un=["transformPerspective","x","y","z"];function In(t,n){return Un.indexOf(t)-Un.indexOf(n)}["perspective","translate","scale","rotate","skew"].forEach((function(t){var n=new Set(["rotate","skew"]).has(t);Dn.forEach((function(e){var r=t+e;Un.push(r),n&&Fn.add(r)}))}));var jn=new Set(Un);function Hn(t){return jn.has(t)}var Xn=new Set(["originX","originY","originZ"]);function Yn(t){return Xn.has(t)}var zn={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function Wn(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+")"}function Nn(t){return t.startsWith("--")}function qn(t,n){return t/(n.max-n.min)*100}var _n={process:function(t,n){return"number"!=typeof t?t:qn(t,n.x)+"% "+qn(t,n.y)+"%"}},Gn={borderRadius:a(a({},_n),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:_n,borderTopRightRadius:_n,borderBottomLeftRadius:_n,borderBottomRightRadius:_n,boxShadow:{process:function(t,n,e,r){var o=nt.parse(t),i=nt.createTransformer(t),a=e.x.scale*r.x,s=e.y.scale*r.y;o[1]/=a,o[2]/=s;var u=ot(a,s,.5);return"number"==typeof o[3]&&(o[3]/=u),"number"==typeof o[4]&&(o[4]/=u),i(o)}}};function Zn(t,n,e,r,o,i,a,s,u,c,f,l){var p=a.enableHardwareAcceleration,d=a.transformTemplate,h=a.allowTransformNone;i.length=0;var v=!1,m=!1,y=!0;for(var g in t){var x=t[g],b=kn(g),E=Rn(x,b);if(Hn(g)){if(v=!0,r[g]=E,i.push(g),!y)continue;x!==(void 0!==b.default?b.default:0)&&(y=!1)}else if(Yn(g))o[g]=E,m=!0;else if("transform"!==g||"function"!=typeof x){var w=Nn(g)?e:n;if(s&&Gn[g]){var C=Gn[g].process(x,l,u,f),P=Gn[g].applyTo;if(P)for(var S=P.length,A=0;A<S;A++)w[P[A]]=C;else w[g]=C}else w[g]=E}}s?(n.transform=Wn(c,f),v&&(n.transform+=" "+function(t,n){var e="";n.sort(In);for(var r=n.length,o=0;o<r;o++){var i=n[o];Fn.has(i)&&(e+=i+"("+t[i]+") ")}return e}(r,i),n.transform=n.transform.trim()),d&&(n.transform=d(r,n.transform)),n.transformOrigin=function(t){var n=t.x,e=t.y;return 100*n.origin+"% "+100*e.origin+"% 0"}(c)):(v&&(n.transform=function(t,n,e,r,o,i){void 0===o&&(o=!0),void 0===i&&(i=!0);var a="";n.sort(In);for(var s=!1,u=n.length,c=0;c<u;c++){var f=n[c];a+=(zn[f]||f)+"("+t[f]+") ","z"===f&&(s=!0)}return!s&&o?a+="translateZ(0)":a=a.trim(),e?a=e(t,r?"":a):i&&r&&(a="none"),a}(r,i,d,y,p,h)),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 $n(t,n){t.min=n.min,t.max=n.max}function Kn(t,n,e){return e+n*(t-e)}function Jn(t,n,e,r,o){return void 0!==o&&(t=Kn(t,o,r)),Kn(t,e,r)+n}function Qn(t,n,e,r,o){void 0===n&&(n=0),void 0===e&&(e=1),t.min=Jn(t.min,n,e,r,o),t.max=Jn(t.max,n,e,r,o)}function te(t,n){var e=n.x,r=n.y;Qn(t.x,e.translate,e.scale,e.originPoint),Qn(t.y,r.translate,r.scale,r.originPoint)}function ne(t,n,e,r){var o=u(r,3),i=o[0],a=o[1],s=o[2];t.min=n.min,t.max=n.max;var c=void 0!==e[s]?e[s]:.5,f=ot(n.min,n.max,c);Qn(t,e[i],e[a],f,e.scale)}var ee=["x","scaleX","originX"],re=["y","scaleY","originY"];function oe(t,n,e,r,o){return t=Kn(t-=n,1/e,r),void 0!==o&&(t=Kn(t,1/o,r)),t}function ie(t,n,e){var r=u(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=ot(t.min,t.max,r)-n;t.min=oe(t.min,n,e,i,o),t.max=oe(t.max,n,e,i,o)}(t,n[o],n[i],n[a],n.scale)}function ae(t,n,e){return void 0===n&&(n=0),void 0===e&&(e=.01),an(t,n)<e}function se(t,n){var e=.5,r=t.max-t.min,o=n.max-n.min;return o>r?e=rt(n.min,n.max-r,t.min):r>o&&(e=rt(t.min,t.max-o,n.min)),gt(0,1,e)}function ue(t,n,e,r){var o=n.max-n.min,i=e.max-e.min;t.origin=void 0===r?se(n,e):r,t.originPoint=ot(n.min,n.max,t.origin),t.scale=i/o,ae(t.scale,1,1e-4)&&(t.scale=1),t.translate=function(t,n,e){var r=ot(t.min,t.max,e);return ot(n.min,n.max,e)-r}(n,e,t.origin),ae(t.translate)&&(t.translate=0)}function ce(t,n,e,r){ue(t.x,n.x,e.x,r),ue(t.y,n.y,e.y,r)}function fe(t){return[t("x"),t("y")]}var le=function(t){return 1e3*t},pe=function(t){if(Array.isArray(t)){t.length;var n=u(t,4);return vn(n[0],n[1],n[2],n[3])}return"string"==typeof t?(mn[t],mn[t]):t},de=function(t,n){return"zIndex"!==t&&(!("number"!=typeof n&&!Array.isArray(n))||!("string"!=typeof n||!nt.test(n)||n.startsWith("url(")))};function he(t){var n=t.yoyo,e=t.loop,r=t.flip,o=t.ease,i=s(t,["yoyo","loop","flip","ease"]),u=a({},i);return i.duration&&(u.duration=le(i.duration)),i.repeatDelay&&(u.repeatDelay=le(i.repeatDelay)),o&&(u.ease=function(t){return Array.isArray(t)&&"number"!=typeof t[0]}(o)?o.map(pe):pe(o)),"tween"===i.type&&(u.type="keyframes"),n?u.repeatType="reverse":e?u.repeatType="loop":r&&(u.repeatType="mirror"),u.repeat=e||n||r||i.repeat,"spring"!==i.type&&(u.type="keyframes"),u}function ve(t,n){return function(t){Array.isArray(t.to)&&null===t.to[0]&&(t.to=c(t.to),t.to[0]=t.from)}(n),_t(a(a({},n),he(t)))}function me(t,n,e,r,o){var i=n.get(),s=r[t]||r.default||r,u=de(t,n.get()),c=de(t,e);return u&&c&&!1!==s.type?function(){var t={from:i,to:e,velocity:n.getVelocity(),onComplete:o,onUpdate:function(t){return n.set(t)}};return"inertia"===s.type||"decay"===s.type?function(t,n){return Zt(a(a({},n),t))}(s,t):ve(s,t)}:function(){return n.set(e),o(),{stop:function(){}}}}function ye(t,n,e,r){return void 0===r&&(r={}),n.start((function(o){var i,a,s=me(t,n,e,r,o),u=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=s()};return u?i=setTimeout(c,le(u)):c(),function(){clearTimeout(i),null==a||a.stop()}}))}function ge(t,n){return wn(function(t,n){var e=t.top,r=t.left,o=t.bottom,i=t.right;void 0===n&&(n=En);var a=n({x:r,y:e}),s=n({x:i,y:o});return{top:a.y,left:a.x,bottom:s.y,right:s.x}}(t.getBoundingClientRect(),n))}var xe=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 yn,n.layoutMeasureListeners=new yn,n.viewportBoxUpdateListeners=new yn,n.hasViewportBoxUpdated=!1,n.targetBoxFinal={x:{min:0,max:1},y:{min:0,max:1}},n.treeScale={x:1,y:1},n.delta=Sn(),n.deltaFinal=Sn(),n.stopLayoutAxisAnimation={x:function(){},y:function(){}},n.isTargetBoxLocked=!1,n.axisProgress={x:xn(0),y:xn(0)},n.updateLayoutDelta=function(){n.isLayoutProjectionEnabled&&n.box&&n.updateLayoutDeltas(),n.children.forEach(be)},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(Hn(t)){var n=kn(t);return n&&n.default||0}return this.read(t)},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 ge(this.element,t)},n.prototype.getBoundingBoxWithoutTransforms=function(){var t,n,e=this.getBoundingBox();return t=e,n=this.latest,ie(t.x,n,ee),ie(t.y,n,re),e},n.prototype.getComputedStyle=function(){return window.getComputedStyle(this.element)},n.prototype.snapshotBoundingBox=function(){this.prevViewportBox=this.getBoundingBoxWithoutTransforms();var t=this.axisProgress,n=t.x,e=t.y;this.isTargetBoxLocked||n.isAnimating()||e.isAnimating()||(this.targetBox=Cn(this.prevViewportBox))},n.prototype.measureLayout=function(){this.box=this.getBoundingBox(),this.boxCorrected=Cn(this.box),this.targetBox||(this.targetBox=Cn(this.box)),this.layoutMeasureListeners.notify(this.box,this.prevViewportBox||this.box)},n.prototype.refreshTargetBox=function(){this.targetBox=this.getBoundingBoxWithoutTransforms()},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.resetRotate=function(){var t=this,n=!1,e={};if(Dn.forEach((function(r){var o="rotate"+r;t.hasValue(o)&&(n=!0,e[o]=t.latest[o],t.latest[o]=0)})),n){for(var r in this.render(),e)this.latest[r]=e[r];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=this,r=this.axisProgress[t],o=this.targetBox[t],i=o.min,a=o.max-i;return r.clearListeners(),r.set(i),r.set(i),r.onChange((function(n){return e.setAxisTarget(t,n,n+a)})),ye(t,r,0,n)},n.prototype.stopLayoutAnimation=function(){var t=this;fe((function(n){return t.axisProgress[n].stop()}))},n.prototype.updateLayoutDeltas=function(){var t,n,e,r,o;t=this.boxCorrected,n=this.box,$n(t.x,n.x),$n(t.y,n.y),this.parent&&(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++)te(t,n[r].delta)}(this.boxCorrected,this.treePath),ce(this.delta,this.boxCorrected,this.targetBox,this.layoutOrigin),this.hasViewportBoxUpdated&&this.viewportBoxUpdateListeners.notify(this.targetBox,this.delta),this.hasViewportBoxUpdated=!1;var i=Wn(this.delta,this.treeScale);i!==this.deltaTransform&&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,ne(t.x,n.x,e,ee),ne(t.y,n.y,e,re),ce(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"),Zn(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}(bn),be=function(t){return t.updateLayoutDelta()};function Ee(t){var e=n.useRef(null);return null===e.current&&(e.current=t()),e.current}function we(t,n,e){return"string"==typeof t?t:H.transform(n+e*t)}var Ce=function(t,n){return H.transform(t*n)},Pe={offset:"stroke-dashoffset",array:"stroke-dasharray"},Se={offset:"strokeDashoffset",array:"strokeDasharray"};var Ae={x:0,y:0,width:0,height:0};function Me(t,n,e,r,o,i,a,u,c,f,l,p,d,h,v){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,P=void 0===C?0:C;return Zn(s(t,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]),r,e,o,i,a,u,l,p,d,h,v),r.transform&&(n.transform=r.transform,delete r.transform),(void 0!==g||void 0!==x||n.transform)&&(n.transformOrigin=function(t,n,e){return we(n,t.x,t.width)+" "+we(e,t.y,t.height)}(c||Ae,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?Pe:Se;t[a.offset]=Ce(-o,n);var s=Ce(e,n),u=Ce(r,n);t[a.array]=s+" "+u}(r,f,b,w,P,!1),r}var Ve=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues"]),Te=/([a-z])([A-Z])/g,Le=function(t){return t.replace(Te,"$1-$2").toLowerCase()},Be=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=Ve.has(t)?t:Le(t),this.element.getAttribute(t)},n.prototype.build=function(){this.updateTransformDeltas(),Me(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(Le(n),this.attrs[n])},n}(xe);var Oe=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 ke(t){return"string"==typeof t&&Oe.has(t)}var Re=n.createContext(null);function De(){var t=n.useContext(Re);if(null===t)return[!0,null];var e=t.isPresent,r=t.onExitComplete,o=t.register,i=je();n.useEffect((function(){return o(i)}),[]);return!e&&r?[!1,function(){return null==r?void 0:r(i)}]:[!0]}function Fe(){var t=n.useContext(Re);return null===t||t.isPresent}var Ue=0,Ie=function(){return Ue++},je=function(){return Ee(Ie)},He=function(t,e,r,o,i){var s=Ee((function(){return new(ke(t)?Be:xe)(r,i)}));s.updateConfig(a({enableHardwareAcceleration:!o},e)),s.layoutId=e.layoutId;var u=Fe();return s.isPresent=void 0!==e.isPresent?e.isPresent:u,n.useEffect((function(){if(e.onViewportBoxUpdate)return s.onViewportBoxUpdate(e.onViewportBoxUpdate)}),[e.onViewportBoxUpdate]),s},Xe=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","static","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 Ye(t){return Xe.has(t)}var ze=function(t){return!Ye(t)};try{var We=require("@emotion/is-prop-valid").default;ze=function(t){return t.startsWith("on")?!Ye(t):We(t)}}catch(E){}function Ne(t,e,r){var o="string"==typeof t?function(t){var n={};for(var e in t)ze(e)&&(n[e]=t[e]);return n}(e):e;r.clean(),r.build();var i=ke(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.style.userSelect="none",r.draggable=!1),r}(r,e);return n.createElement(t,a(a(a({},o),{ref:r.ref}),i))}function qe(t){return"string"==typeof t&&t.startsWith("var(--")}var _e=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Ge(t,n,e){var r=u(function(t){var n=_e.exec(t);if(!n)return[,];var e=u(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||(qe(i)?Ge(i,n):i)}}var Ze,$e=function(t){return Array.isArray(t)},Ke=new Set(["width","height","top","left","right","bottom","x","y"]),Je=function(t){return Ke.has(t)},Qe=function(t,n){t.set(n,!1),t.set(n)},tr=function(t){return t===R||t===H};!function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"}(Ze||(Ze={}));var nr=function(t,n){return parseFloat(t.split(", ")[n])},er=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 nr(i[1],n);var a=o.match(/^matrix\((.+)\)$/);return a?nr(a[1],t):0}},rr=new Set(["x","y","z"]),or=Un.filter((function(t){return!rr.has(t)}));var ir={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:er(4,13),y:er(5,14)},ar=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(Je),i=[],s=!1,c=[];if(o.forEach((function(o){var a=t.getValue(o);if(t.hasValue(o)){var u,f=e[o],l=n[o],p=Ln(f);if($e(l))for(var d=l.length,h=null===l[0]?1:0;h<d;h++)u?Ln(l[h]):u=Ln(l[h]);else u=Ln(l);if(p!==u)if(tr(p)&&tr(u)){var v=a.get();"string"==typeof v&&a.set(parseFloat(v)),"string"==typeof l?n[o]=parseFloat(l):Array.isArray(l)&&u===H&&(n[o]=l.map(parseFloat))}else s||(i=function(t){var n=[];return or.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),s=!0),c.push(o),r[o]=void 0!==r[o]?r[o]:n[o],Qe(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 s=n.getBoundingBox();return e.forEach((function(e){var i=n.getValue(e);Qe(i,ir[e](r,a)),t[e]=ir[e](s,o)})),t}(n,t,c);return i.length&&i.forEach((function(n){var e=u(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 sr(t,n,e,r){return function(t){return Object.keys(t).some(Je)}(n)?ar(t,n,e,r):{target:n,transitionEnd:r}}var ur=function(t,n,e,r){var o=function(t,n,e){var r=s(n,[]),o=t.getInstance();if(!(o instanceof HTMLElement))return{target:r,transitionEnd:e};for(var i in e&&(e=a({},e)),t.forEachValue((function(t){var n=t.get();if(qe(n)){var e=Ge(n,o);e&&t.set(e)}})),r){var u=r[i];if(qe(u)){var c=Ge(u,o);c&&(r[i]=c,e&&void 0===e[i]&&(e[i]=u))}}return{target:r,transitionEnd:e}}(t,n,r);return sr(t,n=o.target,e,r=o.transitionEnd)};var cr=function(){function t(){this.hasMounted=!1,this.pendingAnimations=[],this.componentControls=new Set}return t.prototype.setVariants=function(t){this.variants=t,this.componentControls.forEach((function(n){return n.setVariants(t)}))},t.prototype.setDefaultTransition=function(t){this.defaultTransition=t,this.componentControls.forEach((function(n){return n.setDefaultTransition(t)}))},t.prototype.subscribe=function(t){var n=this;return this.componentControls.add(t),this.variants&&t.setVariants(this.variants),this.defaultTransition&&t.setDefaultTransition(this.defaultTransition),function(){return n.componentControls.delete(t)}},t.prototype.start=function(t,n){var e=this;if(this.hasMounted){var r=[];return this.componentControls.forEach((function(e){var o=e.start(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.componentControls.forEach((function(n){return n.apply(t)}))},t.prototype.stop=function(){this.componentControls.forEach((function(t){return t.stop()}))},t.prototype.mount=function(){var t=this;this.hasMounted=!0,this.pendingAnimations.forEach((function(n){var e=n.animation,r=n.resolve;return t.start.apply(t,c(e)).then(r)}))},t.prototype.unmount=function(){this.hasMounted=!1,this.stop()},t}(),fr=n.createContext({static:!1}),lr=function(t){return"string"==typeof t||Array.isArray(t)},pr=function(t){return t instanceof cr},dr=function(t,e,r,o,i){void 0===o&&(o=!1);var a,s=i.initial,u=i.animate,c=i.variants,f=i.whileTap,l=i.whileHover,p=i.layoutId,d=n.useContext(Re),h=null==d?void 0:d.id;r.isPresenceRoot=t.presenceId!==h,void 0!==(null==d?void 0:d.initial)&&(s=d.initial),!1!==s||pr(u)?"boolean"!=typeof s&&(a=s):a=u;var v=n.useRef(!1),m=c||lr(u)||lr(f)||lr(l)||pr(u),y=lr(a)?a:t.initial,g=lr(u)?u:t.animate,x=o?y:null,b=m&&lr(g)?g:null,E=n.useMemo((function(){return{controls:m?e:t.controls,initial:y,animate:g,visualElement:r,hasMounted:v,isReducedMotion:t.isReducedMotion,presenceId:h}}),[x,b,t.isReducedMotion,u,p,h]);return E.static=o,function(t,e){void 0===e&&(e=!1);var r=n.useRef(!0);(!e||e&&r.current)&&t(),r.current=!1}((function(){var n=a||t.initial;n&&e.apply(n)}),!o),n.useEffect((function(){v.current=!0}),[]),E},hr=function(t){var n=t.animate,e=t.variants,r=t.inherit;return(void 0===r||r)&&!!e&&(!n||n instanceof cr)},vr=function(t){return t instanceof gn};function mr(t,n,e,r){for(var o in void 0===r&&(r=!1),r&&(t.reactStyle={}),e){var i=e[o],a=!1;if(vr(i))yr.has(o)||(t.addValue(o,i),a=!0);else if(Hn(o)||Yn(o)){if(t.hasValue(o)){if(i!==n[o]){t.getValue(o).set(i)}}else t.addValue(o,xn(i));a=!0}else r&&(t.reactStyle[o]=i);a&&(n[o]=i)}}var yr=new Set([]),gr=function(){return{}},xr=function(t){return $e(t)?t[t.length-1]||0:t},br=function(){function t(t,n){var e=this,r=n.makeTargetAnimatable;this.props={},this.variants={},this.baseTarget={},this.overrides=[],this.resolvedOverrides=[],this.activeOverrides=new Set,this.isAnimating=new Set,this.hasValue=function(t){return!e.visualElement.hasValue(t)},this.visualElement=t,this.makeTargetAnimatable=r,this.visualElement.forEachValue((function(t,n){return e.baseTarget[n]=t.get()}))}return t.prototype.setProps=function(t){this.props=t},t.prototype.setVariants=function(t){t&&(this.variants=t)},t.prototype.setDefaultTransition=function(t){t&&(this.defaultTransition=t)},t.prototype.setValues=function(t,n){var e=void 0===n?{}:n,r=e.isActive,o=void 0===r?new Set:r,i=e.priority,s=this.resolveVariant(t),u=s.target,c=s.transitionEnd;for(var f in u=this.transformValues(a(a({},u),c))){if(o.has(f))return;if(o.add(f),u){var l=xr(u[f]);if(this.visualElement.hasValue(f)){var p=this.visualElement.getValue(f);p&&p.set(l)}else this.visualElement.addValue(f,xn(l));i||(this.baseTarget[f]=l)}}},t.prototype.transformValues=function(t){var n=this.props.transformValues;return n?n(t):t},t.prototype.checkForNewValues=function(t){var n=Object.keys(t).filter(this.hasValue),e=n.length;if(e)for(var r=0;r<e;r++){var o=n[r],i=t[o],a=null;if(Array.isArray(i)&&(a=i[0]),null===a){var s=this.visualElement.readNativeValue(o);a=void 0!==s?s:t[o]}"string"==typeof a&&/^\-?\d*\.?\d+$/.test(a)?a=parseFloat(a):!On(a)&&nt.test(i)&&(a=nt.getAnimatableNone(i)),this.visualElement.addValue(o,xn(a)),this.baseTarget[o]=a}},t.prototype.resolveVariant=function(t){if(!t)return{target:void 0,transition:void 0,transitionEnd:void 0};var n,e;"function"==typeof t&&(t=t(this.props.custom,(n=this.visualElement,e={},n.forEachValue((function(t,n){return e[n]=t.get()})),e),function(t){var n={};return t.forEachValue((function(t,e){return n[e]=t.getVelocity()})),n}(this.visualElement)));var r=t.transition;return{transition:void 0===r?this.defaultTransition:r,transitionEnd:t.transitionEnd,target:s(t,["transition","transitionEnd"])}},t.prototype.getHighestPriority=function(){return this.activeOverrides.size?Math.max.apply(Math,c(Array.from(this.activeOverrides))):0},t.prototype.setOverride=function(t,n){this.overrides[n]=t,this.children&&this.children.forEach((function(e){return e.setOverride(t,n)}))},t.prototype.startOverride=function(t){var n=this.overrides[t];if(n)return this.start(n,{priority:t})},t.prototype.clearOverride=function(t){var n=this;if(this.children&&this.children.forEach((function(n){return n.clearOverride(t)})),this.overrides[t]){this.activeOverrides.delete(t);var e=this.getHighestPriority();if(this.resetIsAnimating(),e)this.overrides[e]&&this.startOverride(e);var r=this.resolvedOverrides[t];if(r){var o={};for(var i in this.baseTarget)void 0!==r[i]&&(o[i]=this.baseTarget[i]);this.onStart(),this.animate(o).then((function(){return n.onComplete()}))}}},t.prototype.apply=function(t){return Array.isArray(t)?this.applyVariantLabels(t):"string"==typeof t?this.applyVariantLabels([t]):void this.setValues(t)},t.prototype.applyVariantLabels=function(t){var n=this,e=new Set;c(t).reverse().forEach((function(r){var o=n.resolveVariant(n.variants[r]),i=o.target,a=o.transitionEnd;a&&n.setValues(a,{isActive:e}),i&&n.setValues(i,{isActive:e}),n.children&&n.children.size&&n.children.forEach((function(n){return n.applyVariantLabels(t)}))}))},t.prototype.start=function(t,n){var e,r,o=this;return void 0===n&&(n={}),n.priority&&this.activeOverrides.add(n.priority),this.resetIsAnimating(n.priority),r=t,e=Array.isArray(r)?this.animateVariantLabels(t,n):"string"==typeof t?this.animateVariant(t,n):this.animate(t,n),this.onStart(),e.then((function(){return o.onComplete()}))},t.prototype.animate=function(t,n){var e=this,r=void 0===n?{}:n,o=r.delay,i=void 0===o?0:o,s=r.priority,u=void 0===s?0:s,c=r.transitionOverride,f=this.resolveVariant(t),l=f.target,p=f.transition,d=f.transitionEnd;if(c&&(p=c),!l)return Promise.resolve();l=this.transformValues(l),d&&(d=this.transformValues(d)),this.checkForNewValues(l);var h=this.transformValues(function(t,n,e){var r,o,i={};for(var a in t)i[a]=null!==(r=Er(a,n))&&void 0!==r?r:null===(o=e.getValue(a))||void 0===o?void 0:o.get();return i}(l,p,this.visualElement));if(this.makeTargetAnimatable){var v=this.makeTargetAnimatable(this.visualElement,l,h,d);l=v.target,d=v.transitionEnd}u&&(this.resolvedOverrides[u]=l),this.checkForNewValues(l);var m=[];for(var y in l){var g=this.visualElement.getValue(y);if(g&&l&&void 0!==l[y]){var x=l[y];u||(this.baseTarget[y]=xr(x)),this.isAnimating.has(y)||(this.isAnimating.add(y),m.push(ye(y,g,x,a({delay:i},p))))}}var b=Promise.all(m);return d?b.then((function(){e.setValues(d,{priority:u})})):b},t.prototype.animateVariantLabels=function(t,n){var e=this,r=c(t).reverse().map((function(t){return e.animateVariant(t,n)}));return Promise.all(r)},t.prototype.animateVariant=function(t,n){var e=this,r=n&&n.priority||0,o=this.variants[t],i=o&&this.resolveVariant(o).transition||{},a=o?function(){return e.animate(o,n)}:function(){return Promise.resolve()},s=this.children?function(n){void 0===n&&(n=0);var o=i.delayChildren,a=void 0===o?0:o;return e.animateChildren(t,a+n,i.staggerChildren,i.staggerDirection,r)}:function(){return Promise.resolve()},c=i.when;if(c){var f=u("beforeChildren"===c?[a,s]:[s,a],2),l=f[0],p=f[1];return l().then(p)}return Promise.all([a(),s(null==n?void 0:n.delay)])},t.prototype.animateChildren=function(t,n,e,r,o){if(void 0===n&&(n=0),void 0===e&&(e=0),void 0===r&&(r=1),void 0===o&&(o=0),!this.children)return Promise.resolve();var i=[],a=(this.children.size-1)*e,s=1===r?function(t){return t*e}:function(t){return a-t*e};return Array.from(this.children).forEach((function(e,r){var a=e.animateVariant(t,{priority:o,delay:n+s(r)});i.push(a)})),Promise.all(i)},t.prototype.onStart=function(){var t=this.props.onAnimationStart;t&&t()},t.prototype.onComplete=function(){var t=this.props.onAnimationComplete;t&&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.resetIsAnimating=function(t){void 0===t&&(t=0),this.isAnimating.clear(),t<this.getHighestPriority()&&this.checkOverrideIsAnimating(t),this.children&&this.children.forEach((function(n){return n.resetIsAnimating(t)}))},t.prototype.stop=function(){this.visualElement.forEachValue((function(t){return t.stop()}))},t.prototype.addChild=function(t){this.children||(this.children=new Set),this.children.add(t),this.overrides.forEach((function(n,e){n&&t.setOverride(n,e)}))},t.prototype.removeChild=function(t){this.children&&this.children.delete(t)},t.prototype.resetChildren=function(){this.children&&this.children.clear()},t}();function Er(t,n){if(n)return(n[t]||n.default||n).from}function wr(t,e,r){var o=hr(e),i=e.variants,a=e.transition,u=n.useContext(fr).controls,c=n.useContext(Re),f=Ee((function(){return new br(t,r)}));return c&&!c.isPresent||(f.resetChildren(),f.setProps(e),f.setVariants(i),f.setDefaultTransition(a)),n.useEffect((function(){o&&u&&u.addChild(f)})),n.useEffect((function(){return function(){e.onAnimationComplete;var t=s(e,["onAnimationComplete"]);f.setProps(t),u&&u.removeChild(f)}}),[]),f}var Cr,Pr,Sr=n.createContext({transformPagePoint:function(t){return t},features:[]});!function(t){t[t.Entering=0]="Entering",t[t.Present=1]="Present",t[t.Exiting=2]="Exiting"}(Cr||(Cr={})),function(t){t[t.Hide=0]="Hide",t[t.Show=1]="Show"}(Pr||(Pr={}));var Ar={measureLayout:function(t){return t.measureLayout()},layoutReady:function(t){return t.layoutReady()}},Mr=function(t,n){return t.depth-n.depth};function Vr(){var t=new Set;return{add:function(n){return t.add(n)},flush:function(n){var e=void 0===n?Ar:n,r=e.measureLayout,o=e.layoutReady,i=Array.from(t).sort(Mr);i.forEach((function(t){return t.resetTransform()})),i.forEach(r),i.forEach(o),i.forEach((function(t){t.isPresent&&(t.presence=Cr.Present)})),t.clear()}}}function Tr(t){return!!t.forceUpdate}var Lr=n.createContext(Vr()),Br="undefined"!=typeof window?n.useLayoutEffect:n.useEffect;function Or(t,e){var r=e.defaultFeatures,o=e.useVisualElement,i=e.render,s=e.animationControlsConfig;return n.forwardRef((function(e,u){var f=n.useContext(fr),l=hr(e),p=f.static||e.static||!1,d=o(t,e,f.visualElement,p,u);!function(t,n){var e=Ee(gr);for(var r in e){var o=Hn(r)||Yn(r),i=n[r],a=n.style&&n.style[r],s=i&&vr(n[r]),u=a&&vr(n.style[r]);(o&&!i&&!a||!o&&!s&&!u)&&(t.removeValue(r),delete e[r])}mr(t,e,n),n.style&&mr(t,e,n.style,!0),n.transformValues&&(t.reactStyle=n.transformValues(t.reactStyle))}(d,e);var h=wr(d,e,s),v=dr(f,h,d,p,e),m=function(t,e,r,o,i,s,u,f){var l=n.useContext(Sr);if(e||"undefined"==typeof window)return null;for(var p=c(t,l.features),d=p.length,h=[],v=0;v<d;v++){var m=p[v],y=m.shouldRender,g=m.key,x=m.getComponent;if(y(i,u)){var b=x(i);b&&h.push(n.createElement(b,a({key:g},i,{localContext:s,parentContext:u,visualElement:r,controls:o,inherit:f})))}}return h}(r,p,d,h,e,v,f,l),y=i(t,e,d);return function(t){var e=n.useContext(Lr);Br((function(){return function(){Tr(e)&&e.remove(t)}}),[])}(d),n.createElement(n.Fragment,null,n.createElement(fr.Provider,{value:v},y),m)}))}function kr(t){var n=null;return function(){return null===n&&(n=t,function(){n=null})}}var Rr=kr("dragHorizontal"),Dr=kr("dragVertical");function Fr(t){var n=!1;if("y"===t)n=Dr();else if("x"===t)n=Rr();else{var e=Rr(),r=Dr();e&&r?n=function(){e(),r()}:(e&&e(),r&&r())}return n}var Ur=!1;"undefined"!=typeof window&&document.addEventListener("touchmove",(function(t){Ur&&t.preventDefault()}),{passive:!1});var Ir=function(){return Ur=!1};function jr(t,n,e,r){if(e)return t.addEventListener(n,e,r),function(){return t.removeEventListener(n,e,r)}}function Hr(t,e,r,o){n.useEffect((function(){var n=t.current;if(r&&n)return jr(n,e,r,o)}),[t,e,r,o])}function Xr(t){return"undefined"!=typeof PointerEvent&&t instanceof PointerEvent?!("mouse"!==t.pointerType):t instanceof MouseEvent}function Yr(t){return!!t.touches}var zr={pageX:0,pageY:0};function Wr(t,n){void 0===n&&(n="page");var e=t.touches[0]||t.changedTouches[0]||zr;return{x:e[n+"X"],y:e[n+"Y"]}}function Nr(t,n){return void 0===n&&(n="page"),{x:t[n+"X"],y:t[n+"Y"]}}function qr(t,n){return void 0===n&&(n="page"),{point:Yr(t)?Wr(t,n):Nr(t,n)}}function _r(t){return qr(t,"client")}var Gr,Zr=function(t,n){if(void 0===n&&(n=!1),t){var e=function(n){return t(n,qr(n))};return n?function(t){if(t)return function(n){var e=n instanceof MouseEvent;(!e||e&&0===n.button)&&t(n)}}(e):e}},$r="undefined"!=typeof window,Kr={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Jr={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function Qr(t){return $r&&null===window.onpointerdown?t:$r&&null===window.ontouchstart?Jr[t]:$r&&null===window.onmousedown?Kr[t]:t}function to(t,n,e,r){return jr(t,Qr(n),Zr(e,"pointerdown"===n),r)}function no(t,n,e,r){return Hr(t,Qr(n),Zr(e,"pointerdown"===n),r)}!function(t){t.subtract=function(t,n){return{x:t.x-n.x,y:t.y-n.y}},t.relativeTo=function(t){var n;return function(e){var r=e.x,o=e.y,i=void 0!==n?n:n="string"==typeof t?document.getElementById(t):t;if(i){var a=i.getBoundingClientRect();return{x:r-a.left-window.scrollX,y:o-a.top-window.scrollY}}}}}(Gr||(Gr={}));var eo=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=oo(r.lastMoveEventInfo,r.history),n=null!==r.startEvent,e=an(t.offset,{x:0,y:0})>=3;if(n||e){var o=t.point,i=V().timestamp;r.history.push(a(a({},o),{timestamp:i}));var s=r.handlers,u=s.onStart,c=s.onMove;n||(u&&u(r.lastMoveEvent,t),r.startEvent=r.lastMoveEvent),c&&c(r.lastMoveEvent,t)}}},!(Yr(t)&&t.touches.length>1)){this.handlers=n,this.transformPagePoint=o;var i=ro(qr(t),this.transformPagePoint),s=i.point,u=V().timestamp;this.history=[a(a({},s),{timestamp:u})];var c=n.onSessionStart;c&&c(t,oo(i,this.history));var f=to(window,"pointermove",(function(t,n){return r.handlePointerMove(t,n)})),l=to(window,"pointerup",(function(t,n){return r.handlePointerUp(t,n)}));this.removeListeners=function(){f&&f(),l&&l()}}}return t.prototype.handlePointerMove=function(t,n){this.lastMoveEvent=t,this.lastMoveEventInfo=ro(n,this.transformPagePoint),Xr(t)&&0===t.buttons?this.handlePointerUp(t,n):C.update(this.updatePoint,!0)},t.prototype.handlePointerUp=function(t,n){this.end();var e=this.handlers.onEnd;if(e){var r=oo(ro(n,this.transformPagePoint),this.history);e&&e(t,r)}},t.prototype.updateHandlers=function(t){this.handlers=t},t.prototype.end=function(){this.removeListeners&&this.removeListeners(),P.update(this.updatePoint),Ir()},t}();function ro(t,n){return n?{point:n(t.point)}:t}function oo(t,n){var e=t.point;return{point:e,delta:Gr.subtract(e,ao(n)),offset:Gr.subtract(e,io(n)),velocity:so(n,.1)}}function io(t){return t[0]}function ao(t){return t[t.length-1]}function so(t,n){if(t.length<2)return{x:0,y:0};for(var e=t.length-1,r=null,o=ao(t);e>=0&&(r=t[e],!(o.timestamp-r.timestamp>le(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 uo(t,n,e){var r=n.min,o=n.max;return void 0!==r&&t<r?t=e?ot(r,t,e):Math.max(t,r):void 0!==o&&t>o&&(t=e?ot(o,t,e):Math.min(t,o)),t}function co(t,n,e){var r={},o=t.max-t.min;return void 0!==n&&(r.min=t.min+n),void 0!==e&&(r.max=Math.max(t.min+e-o,t.min)),r}function fo(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=u([o,r],2))[0],o=e[1]),{min:t.min+r,max:t.min+o}}var lo,po=new WeakMap,ho=function(){function t(t){var n=t.visualElement;this.isDragging=!1,this.currentDirection=null,this.constraints=!1,this.props={},this.cursorProgress={x:.5,y:.5},this.originPoint={},this.openGlobalLock=null,this.panSession=null,this.visualElement=n,this.visualElement.enableLayoutProjection(),po.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 s=this.props.transformPagePoint;this.panSession=new eo(t,{onSessionStart:function(){Ur=!0,e.stopMotion()},onStart:function(t,n){var r,o,i=e.props,s=i.drag,u=i.dragPropagation;if(!s||u||(e.openGlobalLock&&e.openGlobalLock(),e.openGlobalLock=Fr(s),e.openGlobalLock)){e.prepareBoundingBox(),e.visualElement.lockTargetBox(),e.resolveDragConstraints();var c=_r(t).point;fe((function(t){var n=e.visualElement.targetBox[t],r=n.min,o=n.max;e.cursorProgress[t]=a?a[t]:rt(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,s=e.props,u=s.dragPropagation,c=s.dragDirectionLock;if(u||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),lo=t}},onEnd:function(t,n){return e.stop(t,n)}},{transformPagePoint:s})},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.refreshTargetBox()},t.prototype.resolveDragConstraints=function(){var t=this,n=this.props.dragConstraints;this.constraints=!!n&&(l(n)?this.resolveRefConstraints(this.visualElement.box,n):function(t,n){var e=n.top,r=n.left,o=n.bottom,i=n.right;return{x:co(t.x,r,i),y:co(t.y,e,o)}}(this.visualElement.box,n)),this.constraints&&fe((function(n){var e,r,o;t.getAxisMotionValue(n)&&(t.constraints[n]=(e=t.visualElement.box[n],r=t.constraints[n],o={},void 0!==r.min&&(o.min=r.min-e.min),void 0!==r.max&&(o.max=r.max-e.min),o))}))},t.prototype.resolveRefConstraints=function(t,n){var e=this.props,r=e.onMeasureDragConstraints,o=e.transformPagePoint,i=n.current;this.constraintsBox=ge(i,o);var a=function(t,n){return{x:fo(t.x,n.x),y:fo(t.y,n.y)}}(t,this.constraintsBox);if(r){var s=r(function(t){var n=t.x,e=t.y;return{top:e.min,bottom:e.max,left:n.min,right:n.max}}(a));s&&(a=wn(s))}return a},t.prototype.cancelDrag=function(){Ir(),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,s=o.onDragEnd;if(i||a){var u=n.velocity;this.animateDragEnd(u)}null==s||s(t,n)}},t.prototype.snapToCursor=function(t){var n=this;this.prepareBoundingBox(),fe((function(e){var r=n.getAxisMotionValue(e);if(r){var o=_r(t).point,i=n.visualElement.box,a=i[e].max-i[e].min,s=i[e].min+a/2,u=o[e]-s;n.originPoint[e]=o[e],r.set(u)}else n.cursorProgress[e]=.5,n.updateVisualElementAxis(e,t)}))},t.prototype.updateAxis=function(t,n,e){if(vo(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?uo(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],s=function(t,n,e,r,o){var i=t-n*e;return r?uo(i,r,o):i}(_r(n).point[t],i,a,null===(e=this.constraints)||void 0===e?void 0:e[t],r);this.visualElement.setAxisTarget(t,s,s+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,u=void 0!==i&&i,c=t.dragConstraints,f=void 0!==c&&c,l=t.dragElastic,p=void 0===l?.35:l,d=t.dragMomentum,h=void 0===d||d,v=s(t,["drag","dragDirectionLock","dragPropagation","dragConstraints","dragElastic","dragMomentum"]);this.props=a({drag:e,dragDirectionLock:o,dragPropagation:u,dragConstraints:f,dragElastic:p,dragMomentum:h},v)},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,s=e.dragTransition,u=fe((function(e){if(vo(e,r,n.currentDirection)){var u=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},s),u);return n.getAxisMotionValue(e)?n.startAxisValueAnimation(e,l):n.visualElement.startLayoutAxisAnimation(e,l)}}));return Promise.all(u).then((function(){var t,e;null===(e=(t=n.props).onDragTransitionEnd)||void 0===e||e.call(t)}))},t.prototype.stopMotion=function(){var t=this;fe((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),ye(t,e,0,n)}},t.prototype.scalePoint=function(){var t=this,n=this.props,e=n.drag,r=n.dragConstraints;if(l(r)&&this.constraintsBox){this.stopMotion();var o={x:0,y:0};fe((function(n){o[n]=se(t.visualElement.targetBox[n],t.constraintsBox[n])})),this.prepareBoundingBox(),this.resolveDragConstraints(),fe((function(n){if(vo(n,e,null)){var r=function(t,n,e){var r=t.max-t.min,o=ot(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=to(t.getInstance(),"pointerdown",(function(t){var e=n.props,r=e.drag,o=e.dragListener;r&&(void 0===o||o)&&n.start(t)})),r=jr(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(lo,{cursorProgress:i.cursorProgress}),function(){null==e||e(),null==r||r(),null==o||o(),n.cancelDrag()}},t}();function vo(t,n,e){return!(!0!==n&&n!==t||null!==e&&e!==t)}var mo=function(t){return function(n){return t(n),null}},yo=mo((function(t){var e=t.visualElement;return function(t,e){var r=t.dragControls,o=n.useContext(Sr).transformPagePoint,i=Ee((function(){return new ho({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)}),[])}(s(t,["visualElement"]),e)})),go={key:"drag",shouldRender:function(t){return!!t.drag},getComponent:function(){return yo}};function xo(t){return n.useEffect((function(){return function(){return t()}}),[])}function bo(t,e){var r=t.onPan,o=t.onPanStart,i=t.onPanEnd,a=t.onPanSessionStart,s=r||o||i||a,u=n.useRef(null),c=n.useContext(Sr).transformPagePoint,f={onSessionStart:a,onStart:o,onMove:r,onEnd:function(t,n){u.current=null,i&&i(t,n)}};n.useEffect((function(){null!==u.current&&u.current.updateHandlers(f)})),no(e,"pointerdown",s&&function(t){u.current=new eo(t,f,{transformPagePoint:c})}),xo((function(){return u.current&&u.current.end()}))}var Eo=function(t,n){return!!n&&(t===n||Eo(t,n.parentElement))},wo=["whileHover","whileTap","whileDrag"],Co=function(t){return wo.indexOf(t)+1},Po=Co("whileTap");function So(t,e){var r=t.onTap,o=t.onTapStart,i=t.onTapCancel,a=t.whileTap,s=t.controls,u=r||o||i||a,c=n.useRef(!1),f=n.useRef(null);function l(){f.current&&f.current(),f.current=null}a&&s&&s.setOverride(a,Po);var p=n.useRef(null);p.current=function(t,n){var o=e.current;if(l(),c.current&&o){c.current=!1,s&&a&&s.clearOverride(Po);var u=Fr(!0);u&&(u(),Eo(o,t.target)?r&&r(t,n):i&&i(t,n))}},no(e,"pointerdown",u?function(t,n){l(),f.current=to(window,"pointerup",(function(t,n){return p.current(t,n)})),e.current&&!c.current&&(c.current=!0,o&&o(t,n),s&&a&&s.startOverride(Po))}:void 0),xo(l)}var Ao=Co("whileHover"),Mo=function(t){return function(n,e){Xr(n)&&t(n,e)}};function Vo(t,n){bo(t,n),So(t,n),function(t,n){var e=t.whileHover,r=t.onHoverStart,o=t.onHoverEnd,i=t.controls;e&&i&&i.setOverride(e,Ao),no(n,"pointerenter",Mo((function(t,n){r&&r(t,n),e&&i&&i.startOverride(Ao)}))),no(n,"pointerleave",Mo((function(t,n){o&&o(t,n),e&&i&&i.clearOverride(Ao)})))}(t,n)}var To,Lo=["onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","whileTap","whileHover","onHoverStart","onHoverEnd"],Bo=mo((function(t){var n=t.visualElement;Vo(s(t,["visualElement"]),n)})),Oo={key:"gestures",shouldRender:function(t){return Lo.some((function(n){return t.hasOwnProperty(n)}))},getComponent:function(){return Bo}},ko=mo((function(t){var e=t.animate,r=t.controls,o=t.exit,i=u(De(),2),s=i[0],c=i[1],f=n.useContext(Re),l=n.useRef(!1),p=void 0!==(null==f?void 0:f.custom)?f.custom:t.custom;n.useEffect((function(){s?!l.current||!e||"boolean"==typeof e||e instanceof cr||r.start(e):(!l.current&&o&&(r.setProps(a(a({},t),{custom:p})),r.start(o).then(c)),l.current=!0),s&&(l.current=!1)}),[e,r,p,o,s,c,t])})),Ro={key:"exit",shouldRender:function(t){return!!t.exit&&!hr(t)},getComponent:function(){return ko}};!function(t){t.Target="Target",t.VariantLabel="VariantLabel",t.AnimationSubscription="AnimationSubscription"}(To||(To={}));function Do(t,n){void 0===n&&(n=!1);t.transition;var e=t.transitionEnd,r=s(t,["transition","transitionEnd"]);return n?a(a({},r),e):r}var Fo,Uo,Io=function(t){var n,e=t instanceof gn?t.get():t;return Array.from(new Set((n=e)?Array.isArray(n)?n:[n]:[]))};var jo=((Fo={})[To.Target]=mo((function(t){return function(t,e,r,o){var i=n.useRef(!0),s=n.useRef(null);s.current||(s.current=Do(t,!0)),n.useEffect((function(){var n,u,c={},f=Do(t),l=Do(t,!0);for(var p in f){var d=i.current&&(!r.hasValue(p)||r.getValue(p).get()!==l[p]),h=null!==l[p],v=(n=s.current[p],void 0!==(u=l[p])&&(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));h&&(v||d)&&(c[p]=f[p])}i.current=!1,s.current=a(a({},s.current),l),Object.keys(c).length&&e.start(a(a({},c),{transition:t.transition||o,transitionEnd:t.transitionEnd}))}),[t])}(t.animate,t.controls,t.visualElement,t.transition)})),Fo[To.VariantLabel]=mo((function(t){var e=t.animate,r=t.inherit,o=void 0===r||r,i=t.controls;return function(t,e,r,o){var i=Io(e),a=n.useContext(fr),s=a.hasMounted&&a.hasMounted.current,u=n.useRef(!1);n.useEffect((function(){var n,e,c=!1;r?(c=!!s,i=Io(a.animate)):c=u.current||(n=Io(t),e=i,n.join(",")!==e.join(",")),c&&o.start(i),u.current=!0}),[i.join(",")])}(t.initial,e,o,i)})),Fo[To.AnimationSubscription]=mo((function(t){return function(t,e){var r=n.useMemo((function(){return t.subscribe(e)}),[t]);n.useEffect((function(){return function(){r&&r()}}),[r])}(t.animate,t.controls)})),Fo),Ho=function(t){return t.animate instanceof cr},Xo=["initial","animate","whileTap","whileHover"],Yo=((Uo={})[To.Target]=function(t){return!(void 0===t.animate||(n=t.animate,Array.isArray(n)||"string"==typeof n)||Ho(t));var n},Uo[To.VariantLabel]=function(t){return void 0!==t.variants||Xo.some((function(n){return"string"==typeof t[n]}))},Uo[To.AnimationSubscription]=Ho,Uo),zo={key:"animation",shouldRender:function(){return!0},getComponent:function(t){var n=void 0;for(var e in To)Yo[e](t)&&(n=e);return n?jo[n]:void 0}};var Wo=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.frameTarget={x:{min:0,max:0},y:{min:0,max:0}},n.stopAxisAnimation={x:void 0,y:void 0},n.animate=function(t,e,r){void 0===r&&(r={});var o=r.originBox,i=r.targetBox,a=r.visibilityAction,u=s(r,["originBox","targetBox","visibilityAction"]),c=n.props,f=c.visualElement,l=c.layout,p=qo(e=o||e,t=i||t),d=fe((function(r){if("position"===l){var o=t[r].max-t[r].min;e[r].max=e[r].min+o}if(!f.isTargetBoxLocked)return void 0===a?p?n.animateAxis(r,t[r],e[r],u):f.setAxisTarget(r,t[r].min,t[r].max):void(a===Pr.Hide?f.hide():f.show())}));return f.render(),Promise.all(d).then((function(){var t,e;null===(e=(t=n.props).onLayoutAnimationComplete)||void 0===e||e.call(t),f.isPresent?f.presence=Cr.Present:n.safeToRemove()}))},n}return i(n,t),n.prototype.componentDidMount=function(){var t=this.props.visualElement;t.enableLayoutProjection(),this.unsubLayoutReady=t.onLayoutUpdate(this.animate)},n.prototype.componentWillUnmount=function(){var t=this;this.unsubLayoutReady(),fe((function(n){var e,r;return null===(r=(e=t.stopAxisAnimation)[n])||void 0===r?void 0:r.call(e)}))},n.prototype.animateAxis=function(t,n,e,r){var o,i,a=void 0===r?{}:r,s=a.transition,u=a.crossfadeOpacity;null===(i=(o=this.stopAxisAnimation)[t])||void 0===i||i.call(o);var c=this.props.visualElement,f=this.frameTarget[t],l=c.axisProgress[t];l.clearListeners(),l.set(0),l.set(0);var p=u&&this.createCrossfadeAnimation(u),d=function(){var r=l.get()/1e3;!function(t,n,e,r){t.min=ot(n.min,e.min,r),t.max=ot(n.max,e.max,r)}(f,e,n,r),c.setAxisTarget(t,f.min,f.max),null==p||p(r)};d();var h=l.onChange(d),v=ye("x"===t?"layoutX":"layoutY",l,1e3,s||this.props.transition||Go).then(h);return this.stopAxisAnimation[t]=function(){l.stop(),h()},v},n.prototype.createCrossfadeAnimation=function(t){var n=this.props.visualElement.getValue("opacity",0);return function(e){n.set($o(ot(0,1,e))),t.set(Ko(ot(1,0,e)))}},n.prototype.safeToRemove=function(){var t,n;null===(n=(t=this.props).safeToRemove)||void 0===n||n.call(t)},n.prototype.render=function(){return null},n}(n.Component);function No(t){var e=u(De(),2)[1];return n.createElement(Wo,a({},t,{safeToRemove:e}))}function qo(t,n){return _o(t.x,n.x)||_o(t.y,n.y)}function _o(t,n){return t.min!==n.min||t.max!==n.max}var Go={duration:.45,ease:[.4,0,.1,1]};function Zo(t,n,e){return function(r){return r<t?0:r>n?1:e(rt(t,n,r))}}var $o=Zo(0,.5,Ot),Ko=Zo(.5,.95,Mt),Jo={key:"animate-layout",shouldRender:function(t){return!!t.layout||!!t.layoutId},getComponent:function(){return No}},Qo=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;Tr(n)&&n.register(e)},n.prototype.getSnapshotBeforeUpdate=function(){var t=this.props,n=t.syncLayout,e=t.visualElement;return Tr(n)?n.syncUpdate():(e.snapshotBoundingBox(),n.add(e)),null},n.prototype.componentDidUpdate=function(){var t=this.props,n=t.syncLayout,e=t.visualElement;Tr(n)||n.flush();var r=e.axisProgress,o=r.x,i=r.y;!e.box||e.isTargetBoxLocked||o.isAnimating()||i.isAnimating()||(fe((function(t){var n=e.box[t],r=n.min,o=n.max;e.setAxisTarget(t,r,o)})),e.render())},n.prototype.render=function(){return null},n}(r.default.Component);function ti(t){var e=n.useContext(Lr);return r.default.createElement(Qo,a({},t,{syncLayout:e}))}var ni={key:"measure-layout",shouldRender:function(t){return!!t.drag||!!t.layout||!!t.layoutId},getComponent:function(){return ti}};function ei(t){var n={defaultFeatures:t,useVisualElement:He,render:Ne,animationControlsConfig:{makeTargetAnimatable:ur}};var e=new Map;return new Proxy({custom:function(t){return Or(t,n)}},{get:function(t,r){return"custom"===r?t.custom:(e.has(r)||e.set(r,Or(r,n)),e.get(r))}})}var ri=ei([ni,zo,go,Oo,Ro,Jo]),oi=ei([ni]);var ii=0;function ai(){var t=ii;return ii++,t}var si=function(t){var e=t.children,r=t.initial,o=t.isPresent,i=t.onExitComplete,a=t.custom,s=Ee(ui),u={id:Ee(ai),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)}}};return n.useMemo((function(){s.forEach((function(t,n){return s.set(n,!1)}))}),[o]),n.createElement(Re.Provider,{value:u},e)};function ui(){return new Map}function ci(t){return t.key||""}function fi(t,n){return n&&t!==n.lead?{visibilityAction:Pr.Hide}:n&&t.presence!==Cr.Entering&&t===n.lead&&n.lead!==n.prevLead?{visibilityAction:Pr.Show}:(t.presence===Cr.Entering?e=null==n?void 0:n.getFollowOrigin():t.presence===Cr.Exiting&&(r=null==n?void 0:n.getFollowTarget()),{originBox:e,targetBox:r});var e,r}function li(t,n){var e,r,o,i={},a=n&&n.lead,s=null==a?void 0:a.presence;return n&&t===a?t.presence===Cr.Entering?i.originBox=n.getFollowOrigin():t.presence===Cr.Exiting&&(i.targetBox=n.getFollowTarget()):n&&t===n.follow&&(i.transition=n.getLeadTransition(),s===Cr.Entering?i.targetBox=n.getLeadTarget():s===Cr.Exiting&&(i.originBox=n.getLeadOrigin())),(null===(e=null==n?void 0:n.follow)||void 0===e?void 0:e.isPresenceRoot)||(null==a?void 0:a.isPresenceRoot)?(n&&t!==a?n&&t===n.follow?a&&s!==Cr.Entering&&s===Cr.Exiting&&(i.crossfadeOpacity=null===(o=null==n?void 0:n.lead)||void 0===o?void 0:o.getValue("opacity",1)):i.visibilityAction=Pr.Hide:t.presence===Cr.Entering&&(i.crossfadeOpacity=null===(r=null==n?void 0:n.follow)||void 0===r?void 0:r.getValue("opacity",0)),i):i}var pi=function(){function t(){this.order=[],this.hasChildren=!1}return t.prototype.add=function(t){var n,e=t.config.layoutOrder;if(void 0===e)this.order.push(t);else{var r=this.order.findIndex((function(t){return e<=(t.config.layoutOrder||0)}));-1===r&&(t.presence=this.hasChildren?Cr.Entering:Cr.Present,r=this.order.length),this.order.splice(r,0,t)}if(this.snapshot){t.prevSnapshot=this.snapshot,t.prevViewportBox=this.snapshot.boundingBox;var o=this.snapshot.latestMotionValues;for(var i in o)t.hasValue(i)?null===(n=t.getValue(i))||void 0===n||n.set(o[i]):t.addValue(i,xn(o[i]))}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=u(function(t,n){for(var e=u(n,2),r=e[0],o=e[1],i=void 0,a=0,s=void 0,c=t.length,f=!1,l=c-1;l>=0;l--){var p=t[l];if(l===c-1&&(f=p.isPresent),f)i=p;else{var d=t[l-1];d&&d.isPresent&&(i=p)}if(i){a=l;break}}if(i||(i=t[0]),s=t[a-1],i)for(l=a-1;l>=0;l--){if((p=t[l]).isPresent){s=p;break}}return i!==r&&!f&&s===o&&t.find((function(t){return t===r}))&&(i=r),[i,s]}(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();Hn(r)||(t.latestMotionValues[e]=r)}));var n=po.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)!==Cr.Exiting},t.prototype.shouldStackAnimate=function(){return!0},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}(),di=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({},Vr()),{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!==Cr.Entering&&(t.presence=t.presence===Cr.Exiting?Cr.Entering:Cr.Present):t.presence=Cr.Exiting})),this.updateStacks();var e="crossfade"===n?li:fi,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.props._supportRotate&&this.children.forEach((function(t){return t.resetRotate()})),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?Cr.Entering:Cr.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 pi),this.stacks.get(t)},e.prototype.render=function(){return n.createElement(Lr.Provider,{value:this.syncContext},this.props.children)},e}(n.Component);function hi(t){return Ee((function(){return xn(t)}))}function vi(t,e){var r=hi(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)}(t,(function(){return C.update(o,!1,!0)})),r}var mi=function(t){return function(t){return"object"==typeof t&&t.mix}(t)?t.mix:void 0};function yi(){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],s=t[2+r],u=t[3+r],c=Et(i,s,a({mixer:mi(s[0])},u));return e?c(o):c}function gi(t,n,e,r){var o="function"==typeof n?n:yi(n,e,r);return Array.isArray(t)?xi(t,o):xi([t],(function(t){var n=u(t,1)[0];return o(n)}))}function xi(t,n){var e=Ee((function(){return[]}));return vi(t,(function(){e.length=0;for(var r=t.length,o=0;o<r;o++)e[o]=t[o].get();return n(e)}))}var bi=function(t){return t>.001?1/t:1e5};function Ei(){return{scrollX:xn(0),scrollY:xn(0),scrollXProgress:xn(0),scrollYProgress:xn(0)}}function wi(t,n,e){e.set(t&&n?t/n:0)}function Ci(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),wi(r,i,t.scrollXProgress),wi(o,a,t.scrollYProgress)};return e(),e}var Pi=Ei();function Si(){return{xOffset:window.pageXOffset,yOffset:window.pageYOffset,xMaxOffset:document.body.clientWidth-window.innerWidth,yMaxOffset:document.body.clientHeight-window.innerHeight}}var Ai=!1;var Mi=xn(null);if("undefined"!=typeof window)if(window.matchMedia){var Vi=window.matchMedia("(prefers-reduced-motion)"),Ti=function(){return Mi.set(Vi.matches)};Vi.addListener(Ti),Ti()}else Mi.set(!1);function Li(t,n){return"boolean"==typeof n?n:Boolean(t)}var Bi=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}(),Oi=function(){return new Bi};var ki=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.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}(bn);t.AnimateLayoutFeature=Jo,t.AnimatePresence=function(t){var e=t.children,r=t.custom,o=t.initial,i=void 0===o||o,a=t.onExitComplete,s=t.exitBeforeEnter,f=function(){var t=u(n.useState(0),2),e=t[0],r=t[1];return n.useCallback((function(){return r(e+1)}),[e])}(),l=n.useContext(Lr);Tr(l)&&(f=l.forceUpdate);var p=n.useRef(!0),d=function(t){var e=[];return n.Children.forEach(t,(function(t){n.isValidElement(t)&&e.push(t)})),e}(e),h=n.useRef(d),v=n.useRef(new Map).current,m=n.useRef(new Set).current;if(function(t,n){t.forEach((function(t){var e=ci(t);n.set(e,t)}))}(d,v),p.current)return p.current=!1,n.createElement(n.Fragment,null,d.map((function(t){return n.createElement(si,{key:ci(t),isPresent:!0,initial:!!i&&void 0},t)})));for(var y=c(d),g=h.current.map(ci),x=d.map(ci),b=g.length,E=0;E<b;E++){var w=g[E];-1===x.indexOf(w)?m.add(w):m.delete(w)}return s&&m.size&&(y=[]),m.forEach((function(t){if(-1===x.indexOf(t)){var e=v.get(t);if(e){var o=g.indexOf(t);y.splice(o,0,n.createElement(si,{key:ci(e),isPresent:!1,onExitComplete:function(){v.delete(t),m.delete(t);var n=h.current.findIndex((function(n){return n.key===t}));h.current.splice(n,1),m.size||(h.current=d,f(),a&&a())},custom:r},e))}}})),y=y.map((function(t){var e=t.key;return m.has(e)?t:n.createElement(si,{key:ci(t),isPresent:!0},t)})),h.current=y,n.createElement(n.Fragment,null,m.size?y:y.map((function(t){return n.cloneElement(t)})))},t.AnimateSharedLayout=di,t.AnimationControls=cr,t.AnimationFeature=zo,t.DragControls=Bi,t.DragFeature=go,t.ExitFeature=Ro,t.GesturesFeature=Oo,t.MotionConfig=function(t){var e=t.children,r=t.features,o=void 0===r?[]:r,i=s(t,["children","features"]),a=c(n.useContext(Sr).features,o),u=n.useMemo((function(){return{features:a}}),[a.length]);for(var f in i)u[f]=i[f];return n.createElement(Sr.Provider,{value:u},e)},t.MotionConfigContext=Sr,t.MotionContext=fr,t.MotionValue=gn,t.PresenceContext=Re,t.ReducedMotion=function(t){var e=t.children,r=t.enabled,o=n.useContext(fr);return o=n.useMemo((function(){return a(a({},o),{isReducedMotion:r})}),[r]),n.createElement(fr.Provider,{value:o},e)},t.VisualElementAnimationControls=br,t.addScaleCorrection=function(t){for(var n in t)Gn[n]=t[n]},t.animationControls=function(){return new cr},t.createMotionComponent=Or,t.isValidMotionProp=Ye,t.m=oi,t.motion=ri,t.motionValue=xn,t.resolveMotionValue=function(t){var n,e=t instanceof gn?t.get():t;return n=e,Boolean(n&&"object"==typeof n&&n.mix&&n.toValue)?e.toValue():e},t.transform=yi,t.useAnimatedState=function(t){var e=u(n.useState(t),2),r=e[0],o=e[1],i=Ee((function(){return new ki}));i.updateConfig({onUpdate:function(t){return o(a({},t))}}),i.initialState=t;var s=wr(i,{},{});return n.useEffect((function(){return i.mount({}),function(){return i.unmount()}}),[]),[r,Ee((function(){return function(t){return s.start(t)}}))]},t.useAnimation=function(){var t=Ee((function(){return new cr}));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=u(n.useState(t[r.current]),2),i=o[0],a=o[1];return[i,function(n){r.current="number"!=typeof n?cn(0,t.length,r.current+1):n,a(t[r.current])}]},t.useDomEvent=Hr,t.useDragControls=function(){return Ee(Oi)},t.useElementScroll=function(t){var n=Ee(Ei);return Br((function(){var e=t.current;if(e){var r=Ci(n,function(t){return function(){return{xOffset:t.scrollLeft,yOffset:t.scrollTop,xMaxOffset:t.scrollWidth-t.offsetWidth,yMaxOffset:t.scrollHeight-t.offsetHeight}}}(e)),o=jr(e,"scroll",r,{passive:!0}),i=jr(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=Vo,t.useInvertedScale=function(t){var e=hi(1),r=hi(1),o=n.useContext(fr).visualElement;return t?(e=t.scaleX||e,r=t.scaleY||r):o&&(e=o.getValue("scaleX",1),r=o.getValue("scaleY",1)),{scaleX:gi(e,bi),scaleY:gi(r,bi)}},t.useIsPresent=Fe,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 vi(n,o)},t.useMotionValue=hi,t.usePanGesture=bo,t.usePresence=De,t.useReducedMotion=function(){var t=n.useContext(fr).isReducedMotion,e=u(n.useState(Li(Mi.get(),t)),2),r=e[0],o=e[1];return n.useEffect((function(){return Mi.onChange((function(n){o(Li(n,t))}))}),[o,t]),r},t.useSpring=function(t,e){void 0===e&&(e={});var r=n.useRef(null),o=hi(vr(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)),function(t,e){n.useEffect((function(){return vr(t)?t.onChange(e):void 0}),[t])}(t,(function(t){return o.set(parseFloat(t))})),o},t.useTapGesture=So,t.useTransform=gi,t.useViewportScroll=function(){return Br((function(){!Ai&&function(){if(Ai=!0,"undefined"!=typeof window){var t=Ci(Pi,Si);jr(window,"scroll",t,{passive:!0}),jr(window,"resize",t)}}()}),[]),Pi},Object.defineProperty(t,"__esModule",{value:!0})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "framer-motion",
3
- "version": "2.5.0",
3
+ "version": "2.5.5",
4
4
  "main": "dist/framer-motion.cjs.js",
5
5
  "module": "dist/framer-motion.es.js",
6
6
  "types": "dist/framer-motion.d.ts",
@@ -92,7 +92,7 @@
92
92
  "dependencies": {
93
93
  "framesync": "^4.0.4",
94
94
  "hey-listen": "^1.0.8",
95
- "popmotion": "^9.0.0-rc.4",
95
+ "popmotion": "9.0.0-rc.7",
96
96
  "style-value-types": "^3.1.9",
97
97
  "tslib": "^1.10.0"
98
98
  },