framer-motion 5.3.2 → 5.4.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/es/animation/utils/easing.mjs +1 -1
  2. package/dist/es/animation/utils/transitions.mjs +1 -1
  3. package/dist/es/components/AnimatePresence/index.mjs +1 -1
  4. package/dist/es/components/AnimatePresence/use-presence.mjs +1 -27
  5. package/dist/es/components/AnimateSharedLayout.mjs +1 -1
  6. package/dist/es/components/MotionCanvas/index.mjs +14 -0
  7. package/dist/es/components/Reorder/Item.mjs +1 -1
  8. package/dist/es/context/MotionContext/index.mjs +1 -1
  9. package/dist/es/events/use-dom-event.mjs +2 -31
  10. package/dist/es/events/use-pointer-event.mjs +2 -5
  11. package/dist/es/gestures/utils/event-type.mjs +1 -8
  12. package/dist/es/motion/index.mjs +1 -1
  13. package/dist/es/projection/animation/mix-values.mjs +1 -1
  14. package/dist/es/projection/geometry/models.mjs +1 -11
  15. package/dist/es/projection/node/create-projection-node.mjs +4 -1167
  16. package/dist/es/projection/styles/scale-border-radius.mjs +1 -1
  17. package/dist/es/projection/styles/transform.mjs +5 -5
  18. package/dist/es/render/dom/motion-proxy.mjs +3 -0
  19. package/dist/es/render/dom/utils/css-variables-conversion.mjs +2 -2
  20. package/dist/es/render/dom/utils/filter-props.mjs +3 -1
  21. package/dist/es/render/dom/value-types/dimensions.mjs +1 -8
  22. package/dist/es/render/html/use-props.mjs +1 -1
  23. package/dist/es/render/html/utils/build-transform.mjs +2 -2
  24. package/dist/es/render/svg/utils/path.mjs +1 -1
  25. package/dist/es/render/svg/utils/transform-origin.mjs +1 -1
  26. package/dist/es/render/three/create-visual-element.mjs +42 -0
  27. package/dist/es/render/three/gestures/use-hover.mjs +22 -0
  28. package/dist/es/render/three/gestures/use-tap.mjs +56 -0
  29. package/dist/es/render/three/motion.mjs +30 -0
  30. package/dist/es/render/three/use-render.mjs +11 -0
  31. package/dist/es/render/three/utils/read-value.mjs +43 -0
  32. package/dist/es/render/three/utils/set-value.mjs +59 -0
  33. package/dist/es/render/utils/animation.mjs +1 -4
  34. package/dist/es/render/utils/setters.mjs +2 -39
  35. package/dist/es/three-entry.mjs +2 -0
  36. package/dist/es/utils/array.mjs +2 -13
  37. package/dist/framer-motion-three.cjs.js +3004 -0
  38. package/dist/framer-motion.cjs.js +46 -43
  39. package/dist/framer-motion.dev.js +35 -32
  40. package/dist/framer-motion.js +1 -1
  41. package/dist/projection.dev.js +17 -17
  42. package/dist/size-rollup-dom-animation.js +1 -1
  43. package/dist/size-rollup-dom-max.js +1 -1
  44. package/dist/size-rollup-m.js +1 -1
  45. package/package.json +27 -6
  46. package/types/components/MotionCanvas/index.d.ts +4 -0
  47. package/types/motion/features/types.d.ts +1 -1
  48. package/types/render/three/create-visual-element.d.ts +6 -0
  49. package/types/render/three/gestures/use-hover.d.ts +10 -0
  50. package/types/render/three/gestures/use-tap.d.ts +8 -0
  51. package/types/render/three/motion.d.ts +5 -0
  52. package/types/render/three/types.d.ts +24 -0
  53. package/types/render/three/use-render.d.ts +4 -0
  54. package/types/render/three/utils/read-value.d.ts +2 -0
  55. package/types/render/three/utils/set-value.d.ts +2 -0
  56. package/types/render/utils/lifecycles.d.ts +8 -8
  57. package/types/render/utils/setters.d.ts +1 -0
  58. package/types/three-entry.d.ts +2 -0
@@ -2,7 +2,7 @@
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
3
3
  typeof define === 'function' && define.amd ? define(['exports'], factory) :
4
4
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Projection = {}));
5
- }(this, (function (exports) { 'use strict';
5
+ })(this, (function (exports) { 'use strict';
6
6
 
7
7
  /*! *****************************************************************************
8
8
  Copyright (c) Microsoft Corporation.
@@ -1597,7 +1597,7 @@
1597
1597
  }
1598
1598
  else if (typeof definition === "string") {
1599
1599
  // Else lookup from table
1600
- invariant(easingLookup[definition] !== undefined, "Invalid easing type '" + definition + "'");
1600
+ invariant(easingLookup[definition] !== undefined, "Invalid easing type '".concat(definition, "'"));
1601
1601
  return easingLookup[definition];
1602
1602
  }
1603
1603
  return definition;
@@ -1909,7 +1909,7 @@
1909
1909
  target = getZeroUnit(origin);
1910
1910
  }
1911
1911
  var isOriginAnimatable = isAnimatable(key, origin);
1912
- warning(isOriginAnimatable === isTargetAnimatable, "You are trying to animate " + key + " from \"" + origin + "\" to \"" + target + "\". " + origin + " is not an animatable value - to enable this animation set " + origin + " to a value animatable to " + target + " via the `style` property.");
1912
+ warning(isOriginAnimatable === isTargetAnimatable, "You are trying to animate ".concat(key, " from \"").concat(origin, "\" to \"").concat(target, "\". ").concat(origin, " is not an animatable value - to enable this animation set ").concat(origin, " to a value animatable to ").concat(target, " via the `style` property."));
1913
1913
  function start() {
1914
1914
  var options = {
1915
1915
  from: origin,
@@ -2045,7 +2045,7 @@
2045
2045
  * Mix border radius
2046
2046
  */
2047
2047
  for (var i = 0; i < numBorders; i++) {
2048
- var borderLabel = "border" + borders[i] + "Radius";
2048
+ var borderLabel = "border".concat(borders[i], "Radius");
2049
2049
  var followRadius = getRadius(follow, borderLabel);
2050
2050
  var leadRadius = getRadius(lead, borderLabel);
2051
2051
  if (followRadius === undefined && leadRadius === undefined)
@@ -2502,17 +2502,17 @@
2502
2502
  */
2503
2503
  var xTranslate = delta.x.translate / treeScale.x;
2504
2504
  var yTranslate = delta.y.translate / treeScale.y;
2505
- var transform = "translate3d(" + xTranslate + "px, " + yTranslate + "px, 0) ";
2505
+ var transform = "translate3d(".concat(xTranslate, "px, ").concat(yTranslate, "px, 0) ");
2506
2506
  if (latestTransform) {
2507
2507
  var rotate = latestTransform.rotate, rotateX = latestTransform.rotateX, rotateY = latestTransform.rotateY;
2508
2508
  if (rotate)
2509
- transform += "rotate(" + rotate + "deg) ";
2509
+ transform += "rotate(".concat(rotate, "deg) ");
2510
2510
  if (rotateX)
2511
- transform += "rotateX(" + rotateX + "deg) ";
2511
+ transform += "rotateX(".concat(rotateX, "deg) ");
2512
2512
  if (rotateY)
2513
- transform += "rotateY(" + rotateY + "deg) ";
2513
+ transform += "rotateY(".concat(rotateY, "deg) ");
2514
2514
  }
2515
- transform += "scale(" + delta.x.scale + ", " + delta.y.scale + ")";
2515
+ transform += "scale(".concat(delta.x.scale, ", ").concat(delta.y.scale, ")");
2516
2516
  return transform === identityProjection ? "none" : transform;
2517
2517
  }
2518
2518
 
@@ -3543,7 +3543,7 @@
3543
3543
  styles.transform = transformTemplate(valuesToRender, styles.transform);
3544
3544
  }
3545
3545
  var _g = this.projectionDelta, x = _g.x, y = _g.y;
3546
- styles.transformOrigin = x.origin * 100 + "% " + y.origin * 100 + "% 0";
3546
+ styles.transformOrigin = "".concat(x.origin * 100, "% ").concat(y.origin * 100, "% 0");
3547
3547
  if (lead.animationValues) {
3548
3548
  /**
3549
3549
  * If the lead component is animating, assign this either the entering/leaving
@@ -3749,7 +3749,7 @@
3749
3749
  }
3750
3750
  }
3751
3751
  var searchElement = searchNode && searchNode !== node.root ? searchNode.instance : document;
3752
- var element = searchElement.querySelector("[data-projection-id=\"" + id + "\"]");
3752
+ var element = searchElement.querySelector("[data-projection-id=\"".concat(id, "\"]"));
3753
3753
  if (element)
3754
3754
  node.mount(element, true);
3755
3755
  }
@@ -3844,7 +3844,7 @@
3844
3844
  var numTransformKeys = transformKeys.length;
3845
3845
  for (var i = 0; i < numTransformKeys; i++) {
3846
3846
  var key = transformKeys[i];
3847
- transformString += (translateAlias[key] || key) + "(" + transform[key] + ") ";
3847
+ transformString += "".concat(translateAlias[key] || key, "(").concat(transform[key], ") ");
3848
3848
  if (key === "z")
3849
3849
  transformHasZ = true;
3850
3850
  }
@@ -3870,7 +3870,7 @@
3870
3870
  */
3871
3871
  function buildTransformOrigin(_a) {
3872
3872
  var _b = _a.originX, originX = _b === void 0 ? "50%" : _b, _c = _a.originY, originY = _c === void 0 ? "50%" : _c, _d = _a.originZ, originZ = _d === void 0 ? 0 : _d;
3873
- return originX + " " + originY + " " + originZ;
3873
+ return "".concat(originX, " ").concat(originY, " ").concat(originZ);
3874
3874
  }
3875
3875
 
3876
3876
  function pixelsToPercent(pixels, axis) {
@@ -3907,7 +3907,7 @@
3907
3907
  */
3908
3908
  var x = pixelsToPercent(latest, node.target.x);
3909
3909
  var y = pixelsToPercent(latest, node.target.y);
3910
- return x + "% " + y + "%";
3910
+ return "".concat(x, "% ").concat(y, "%");
3911
3911
  },
3912
3912
  };
3913
3913
 
@@ -3934,7 +3934,7 @@
3934
3934
  var maxDepth = 4;
3935
3935
  function getVariableValue(current, element, depth) {
3936
3936
  if (depth === void 0) { depth = 1; }
3937
- invariant(depth <= maxDepth, "Max CSS variable fallback depth detected in property \"" + current + "\". This may indicate a circular fallback dependency.");
3937
+ invariant(depth <= maxDepth, "Max CSS variable fallback depth detected in property \"".concat(current, "\". This may indicate a circular fallback dependency."));
3938
3938
  var _a = __read(parseCSSVariable(current), 2), token = _a[0], fallback = _a[1];
3939
3939
  // No CSS variable detected
3940
3940
  if (!token)
@@ -3961,7 +3961,7 @@
3961
3961
  var _b;
3962
3962
  var target = __rest(_a, []);
3963
3963
  var element = visualElement.getInstance();
3964
- if (!(element instanceof HTMLElement))
3964
+ if (!(element instanceof Element))
3965
3965
  return { target: target, transitionEnd: transitionEnd };
3966
3966
  // If `transitionEnd` isn't `undefined`, clone it. We could clone `target` and `transitionEnd`
3967
3967
  // only if they change but I think this reads clearer and this isn't a performance-critical path.
@@ -5191,4 +5191,4 @@
5191
5191
 
5192
5192
  Object.defineProperty(exports, '__esModule', { value: true });
5193
5193
 
5194
- })));
5194
+ }));
@@ -1 +1 @@
1
- import{createContext as t,useRef as e,useContext as n,useEffect as r}from"react";var o=function(){return(o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function i(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n}function a(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function u(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))}function s(t){return"object"==typeof t&&"function"==typeof t.start}var l=t(null);var c=0,f=function(){return c++},d=function(){return t=f,null===(n=e(null)).current&&(n.current=t()),n.current;var t,n},p=function(t){return Array.isArray(t)};function v(t,e){if(!Array.isArray(e))return!1;var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}const m=(t,e,n)=>Math.min(Math.max(n,t),e);function h({duration:t=800,bounce:e=.25,velocity:n=0,mass:r=1}){let o,i,a=1-e;a=m(.05,1,a),t=m(.01,10,t/1e3),a<1?(o=e=>{const r=e*a,o=r*t;return.001-(r-n)/g(e,a)*Math.exp(-o)},i=e=>{const r=e*a*t,i=r*n+n,u=Math.pow(a,2)*Math.pow(e,2)*t,s=Math.exp(-r),l=g(Math.pow(e,2),a);return(.001-o(e)>0?-1:1)*((i-u)*s)/l}):(o=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,i=e=>Math.exp(-e*t)*(t*t*(n-e)));const u=function(t,e,n){let r=n;for(let n=1;n<12;n++)r-=t(r)/e(r);return r}(o,i,5/t);if(t*=1e3,isNaN(u))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(u,2)*r;return{stiffness:e,damping:2*a*Math.sqrt(r*e),duration:t}}}function g(t,e){return t*Math.sqrt(1-e*e)}const y=["duration","bounce"],b=["stiffness","damping","mass"];function w(t,e){return e.some(e=>void 0!==t[e])}function A(t){var{from:e=0,to:n=1,restSpeed:r=2,restDelta:o}=t,a=i(t,["from","to","restSpeed","restDelta"]);const u={done:!1,value:e};let{stiffness:s,damping:l,mass:c,velocity:f,duration:d,isResolvedFromDuration:p}=function(t){let e=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},t);if(!w(t,b)&&w(t,y)){const n=h(t);e=Object.assign(Object.assign(Object.assign({},e),n),{velocity:0,mass:1}),e.isResolvedFromDuration=!0}return e}(a),v=V,m=V;function A(){const t=f?-f/1e3:0,r=n-e,i=l/(2*Math.sqrt(s*c)),a=Math.sqrt(s/c)/1e3;if(null!=o||(o=Math.abs(n-e)<=1?.01:.4),i<1){const e=g(a,i);v=o=>{const u=Math.exp(-i*a*o);return n-u*((t+i*a*r)/e*Math.sin(e*o)+r*Math.cos(e*o))},m=n=>{const o=Math.exp(-i*a*n);return i*a*o*(Math.sin(e*n)*(t+i*a*r)/e+r*Math.cos(e*n))-o*(Math.cos(e*n)*(t+i*a*r)-e*r*Math.sin(e*n))}}else if(1===i)v=e=>n-Math.exp(-a*e)*(r+(t+a*r)*e);else{const e=a*Math.sqrt(i*i-1);v=o=>{const u=Math.exp(-i*a*o),s=Math.min(e*o,300);return n-u*((t+i*a*r)*Math.sinh(s)+e*r*Math.cosh(s))/e}}}return A(),{next:t=>{const e=v(t);if(p)u.done=t>=d;else{const i=1e3*m(t),a=Math.abs(i)<=r,s=Math.abs(n-e)<=o;u.done=a&&s}return u.value=u.done?n:e,u},flipTarget:()=>{f=-f,[e,n]=[n,e],A()}}}A.needsInterpolation=(t,e)=>"string"==typeof t||"string"==typeof e;const V=t=>0,x=(t,e,n)=>{const r=e-t;return 0===r?1:(n-t)/r},O=(t,e,n)=>-n*t+n*e+t,S=(t,e)=>n=>Math.max(Math.min(n,e),t),M=t=>t%1?Number(t.toFixed(5)):t,T=/(-)?([\d]*\.?[\d])+/g,E=/(#[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,C=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function P(t){return"string"==typeof t}const k={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},F=Object.assign(Object.assign({},k),{transform:S(0,1)}),I=Object.assign(Object.assign({},k),{default:1}),R=t=>({test:e=>P(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),j=R("deg"),D=R("%"),B=R("px"),L=R("vh"),U=R("vw"),N=Object.assign(Object.assign({},D),{parse:t=>D.parse(t)/100,transform:t=>D.transform(100*t)}),z=(t,e)=>n=>Boolean(P(n)&&C.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),H=(t,e,n)=>r=>{if(!P(r))return r;const[o,i,a,u]=r.match(T);return{[t]:parseFloat(o),[e]:parseFloat(i),[n]:parseFloat(a),alpha:void 0!==u?parseFloat(u):1}},X={test:z("hsl","hue"),parse:H("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+D.transform(M(e))+", "+D.transform(M(n))+", "+M(F.transform(r))+")"},Y=S(0,255),W=Object.assign(Object.assign({},k),{transform:t=>Math.round(Y(t))}),Z={test:z("rgb","red"),parse:H("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+W.transform(t)+", "+W.transform(e)+", "+W.transform(n)+", "+M(F.transform(r))+")"};const $={test:z("#"),parse:function(t){let e="",n="",r="",o="";return t.length>5?(e=t.substr(1,2),n=t.substr(3,2),r=t.substr(5,2),o=t.substr(7,2)):(e=t.substr(1,1),n=t.substr(2,1),r=t.substr(3,1),o=t.substr(4,1),e+=e,n+=n,r+=r,o+=o),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:Z.transform},q={test:t=>Z.test(t)||$.test(t)||X.test(t),parse:t=>Z.test(t)?Z.parse(t):X.test(t)?X.parse(t):$.parse(t),transform:t=>P(t)?t:t.hasOwnProperty("red")?Z.transform(t):X.transform(t)};function K(t){"number"==typeof t&&(t=""+t);const e=[];let n=0;const r=t.match(E);r&&(n=r.length,t=t.replace(E,"${c}"),e.push(...r.map(q.parse)));const o=t.match(T);return o&&(t=t.replace(T,"${n}"),e.push(...o.map(k.parse))),{values:e,numColors:n,tokenised:t}}function G(t){return K(t).values}function J(t){const{values:e,numColors:n,tokenised:r}=K(t),o=e.length;return t=>{let e=r;for(let r=0;r<o;r++)e=e.replace(r<n?"${c}":"${n}",r<n?q.transform(t[r]):M(t[r]));return e}}const _=t=>"number"==typeof t?0:t;const Q={test:function(t){var e,n,r,o;return isNaN(t)&&P(t)&&(null!==(n=null===(e=t.match(T))||void 0===e?void 0:e.length)&&void 0!==n?n:0)+(null!==(o=null===(r=t.match(E))||void 0===r?void 0:r.length)&&void 0!==o?o:0)>0},parse:G,createTransformer:J,getAnimatableNone:function(t){const e=G(t);return J(t)(e.map(_))}},tt=new Set(["brightness","contrast","saturate","opacity"]);function et(t){let[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[r]=n.match(T)||[];if(!r)return t;const o=n.replace(r,"");let i=tt.has(e)?1:0;return r!==n&&(i*=100),e+"("+i+o+")"}const nt=/([a-z-]*)\(.*?\)/g,rt=Object.assign(Object.assign({},Q),{getAnimatableNone:t=>{const e=t.match(nt);return e?e.map(et).join(" "):t}});function ot(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function it({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,n/=100;let o=0,i=0,a=0;if(e/=100){const r=n<.5?n*(1+e):n+e-n*e,u=2*n-r;o=ot(u,r,t+1/3),i=ot(u,r,t),a=ot(u,r,t-1/3)}else o=i=a=n;return{red:Math.round(255*o),green:Math.round(255*i),blue:Math.round(255*a),alpha:r}}const at=(t,e,n)=>{const r=t*t,o=e*e;return Math.sqrt(Math.max(0,n*(o-r)+r))},ut=[$,Z,X],st=t=>ut.find(e=>e.test(t)),lt=(t,e)=>{let n=st(t),r=st(e),o=n.parse(t),i=r.parse(e);n===X&&(o=it(o),n=Z),r===X&&(i=it(i),r=Z);const a=Object.assign({},o);return t=>{for(const e in a)"alpha"!==e&&(a[e]=at(o[e],i[e],t));return a.alpha=O(o.alpha,i.alpha,t),n.transform(a)}},ct=(t,e)=>n=>e(t(n)),ft=(...t)=>t.reduce(ct);function dt(t,e){return"number"==typeof t?n=>O(t,e,n):q.test(t)?lt(t,e):ht(t,e)}const pt=(t,e)=>{const n=[...t],r=n.length,o=t.map((t,n)=>dt(t,e[n]));return t=>{for(let e=0;e<r;e++)n[e]=o[e](t);return n}},vt=(t,e)=>{const n=Object.assign(Object.assign({},t),e),r={};for(const o in n)void 0!==t[o]&&void 0!==e[o]&&(r[o]=dt(t[o],e[o]));return t=>{for(const e in r)n[e]=r[e](t);return n}};function mt(t){const e=Q.parse(t),n=e.length;let r=0,o=0,i=0;for(let t=0;t<n;t++)r||"number"==typeof e[t]?r++:void 0!==e[t].hue?i++:o++;return{parsed:e,numNumbers:r,numRGB:o,numHSL:i}}const ht=(t,e)=>{const n=Q.createTransformer(e),r=mt(t),o=mt(e);return r.numHSL===o.numHSL&&r.numRGB===o.numRGB&&r.numNumbers>=o.numNumbers?ft(pt(r.parsed,o.parsed),n):n=>""+(n>0?e:t)},gt=(t,e)=>n=>O(t,e,n);function yt(t,e,n){const r=[],o=n||("number"==typeof(i=t[0])?gt:"string"==typeof i?q.test(i)?lt:ht:Array.isArray(i)?pt:"object"==typeof i?vt:void 0);var i;const a=t.length-1;for(let n=0;n<a;n++){let i=o(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]:e;i=ft(t,i)}r.push(i)}return r}function bt(t,e,{clamp:n=!0,ease:r,mixer:o}={}){const i=t.length;e.length,!r||!Array.isArray(r)||r.length,t[0]>t[i-1]&&(t=[].concat(t),e=[].concat(e),t.reverse(),e.reverse());const a=yt(e,r,o),u=2===i?function([t,e],[n]){return r=>n(x(t,e,r))}(t,a):function(t,e){const n=t.length,r=n-1;return o=>{let i=0,a=!1;if(o<=t[0]?a=!0:o>=t[r]&&(i=r-1,a=!0),!a){let e=1;for(;e<n&&!(t[e]>o||e===r);e++);i=e-1}const u=x(t[i],t[i+1],o);return e[i](u)}}(t,a);return n?e=>u(m(t[0],t[i-1],e)):u}const wt=t=>e=>1-t(1-e),At=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Vt=t=>e=>e*e*((t+1)*e-t),xt=t=>t,Ot=(St=2,t=>Math.pow(t,St));var St;const Mt=wt(Ot),Tt=At(Ot),Et=t=>1-Math.sin(Math.acos(t)),Ct=wt(Et),Pt=At(Ct),kt=Vt(1.525),Ft=wt(kt),It=At(kt),Rt=(t=>{const e=Vt(t);return t=>(t*=2)<1?.5*e(t):.5*(2-Math.pow(2,-10*(t-1)))})(1.525),jt=t=>{if(1===t||0===t)return t;const e=t*t;return t<4/11?7.5625*e:t<8/11?9.075*e-9.9*t+3.4:t<.9?4356/361*e-35442/1805*t+16061/1805:10.8*t*t-20.52*t+10.72},Dt=wt(jt);function Bt(t,e){return t.map(()=>e||Tt).splice(0,t.length-1)}function Lt({from:t=0,to:e=1,ease:n,offset:r,duration:o=300}){const i={done:!1,value:t},a=Array.isArray(e)?e:[t,e],u=function(t,e){return t.map(t=>t*e)}(r&&r.length===a.length?r:function(t){const e=t.length;return t.map((t,n)=>0!==n?n/(e-1):0)}(a),o);function s(){return bt(u,a,{ease:Array.isArray(n)?n:Bt(a,n)})}let l=s();return{next:t=>(i.value=l(t),i.done=t>=o,i),flipTarget:()=>{a.reverse(),l=s()}}}const Ut={keyframes:Lt,spring:A,decay:function({velocity:t=0,from:e=0,power:n=.8,timeConstant:r=350,restDelta:o=.5,modifyTarget:i}){const a={done:!1,value:e};let u=n*t;const s=e+u,l=void 0===i?s:i(s);return l!==s&&(u=l-e),{next:t=>{const e=-u*Math.exp(-t/r);return a.done=!(e>o||e<-o),a.value=a.done?l:l+e,a},flipTarget:()=>{}}}};const Nt="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),zt="undefined"!=typeof window?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(Nt()),1/60*1e3);let Ht=!0,Xt=!1,Yt=!1;const Wt={delta:0,timestamp:0},Zt=["read","update","preRender","render","postRender"],$t=Zt.reduce((t,e)=>(t[e]=function(t){let e=[],n=[],r=0,o=!1,i=!1;const a=new WeakSet,u={schedule:(t,i=!1,u=!1)=>{const s=u&&o,l=s?e:n;return i&&a.add(t),-1===l.indexOf(t)&&(l.push(t),s&&o&&(r=e.length)),t},cancel:t=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1),a.delete(t)},process:s=>{if(o)i=!0;else{if(o=!0,[e,n]=[n,e],n.length=0,r=e.length,r)for(let n=0;n<r;n++){const r=e[n];r(s),a.has(r)&&(u.schedule(r),t())}o=!1,i&&(i=!1,u.process(s))}}};return u}(()=>Xt=!0),t),{}),qt=Zt.reduce((t,e)=>{const n=$t[e];return t[e]=(t,e=!1,r=!1)=>(Xt||_t(),n.schedule(t,e,r)),t},{}),Kt=Zt.reduce((t,e)=>(t[e]=$t[e].cancel,t),{});Zt.reduce((t,e)=>(t[e]=()=>$t[e].process(Wt),t),{});const Gt=t=>$t[t].process(Wt),Jt=t=>{Xt=!1,Wt.delta=Ht?1/60*1e3:Math.max(Math.min(t-Wt.timestamp,40),1),Wt.timestamp=t,Yt=!0,Zt.forEach(Gt),Yt=!1,Xt&&(Ht=!1,zt(Jt))},_t=()=>{Xt=!0,Ht=!0,Yt||zt(Jt)},Qt=()=>Wt;function te(t,e,n=0){return t-e-n}const ee=t=>{const e=({delta:e})=>t(e);return{start:()=>qt.update(e,!0),stop:()=>Kt.update(e)}};function ne(t){var e,n,{from:r,autoplay:o=!0,driver:a=ee,elapsed:u=0,repeat:s=0,repeatType:l="loop",repeatDelay:c=0,onPlay:f,onStop:d,onComplete:p,onRepeat:v,onUpdate:m}=t,h=i(t,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let g,y,b,{to:w}=h,V=0,x=h.duration,O=!1,S=!0;const M=function(t){if(Array.isArray(t.to))return Lt;if(Ut[t.type])return Ut[t.type];const e=new Set(Object.keys(t));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?Lt:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?A:Lt}(h);(null===(n=(e=M).needsInterpolation)||void 0===n?void 0:n.call(e,r,w))&&(b=bt([0,100],[r,w],{clamp:!1}),r=0,w=100);const T=M(Object.assign(Object.assign({},h),{from:r,to:w}));function E(){V++,"reverse"===l?(S=V%2==0,u=function(t,e,n=0,r=!0){return r?te(e+-t,e,n):e-(t-e)+n}(u,x,c,S)):(u=te(u,x,c),"mirror"===l&&T.flipTarget()),O=!1,v&&v()}function C(t){if(S||(t=-t),u+=t,!O){const t=T.next(Math.max(0,u));y=t.value,b&&(y=b(y)),O=S?t.done:u<=0}null==m||m(y),O&&(0===V&&(null!=x||(x=u)),V<s?function(t,e,n,r){return r?t>=e+n:t<=-n}(u,x,c,S)&&E():(g.stop(),p&&p()))}return o&&(null==f||f(),g=a(C),g.start()),{stop:()=>{null==d||d(),g.stop()}}}function re(t,e){return e?t*(1e3/e):0}const oe=(t,e)=>1-3*e+3*t,ie=(t,e)=>3*e-6*t,ae=t=>3*t,ue=(t,e,n)=>((oe(e,n)*t+ie(e,n))*t+ae(e))*t,se=(t,e,n)=>3*oe(e,n)*t*t+2*ie(e,n)*t+ae(e);function le(t,e,n,r){if(t===e&&n===r)return xt;const o=new Float32Array(11);for(let e=0;e<11;++e)o[e]=ue(.1*e,t,n);function i(e){let r=0,i=1;for(;10!==i&&o[i]<=e;++i)r+=.1;--i;const a=r+.1*((e-o[i])/(o[i+1]-o[i])),u=se(a,t,n);return u>=.001?function(t,e,n,r){for(let o=0;o<8;++o){const o=se(e,n,r);if(0===o)return e;e-=(ue(e,n,r)-t)/o}return e}(e,a,t,n):0===u?a:function(t,e,n,r,o){let i,a,u=0;do{a=e+(n-e)/2,i=ue(a,r,o)-t,i>0?n=a:e=a}while(Math.abs(i)>1e-7&&++u<10);return a}(e,r,r+.1,t,n)}return t=>0===t||1===t?t:ue(i(t),e,r)}var ce=function(t){return 1e3*t},fe={linear:xt,easeIn:Ot,easeInOut:Tt,easeOut:Mt,circIn:Et,circInOut:Pt,circOut:Ct,backIn:kt,backInOut:It,backOut:Ft,anticipate:Rt,bounceIn:Dt,bounceInOut:t=>t<.5?.5*(1-jt(1-2*t)):.5*jt(2*t-1)+.5,bounceOut:jt},de=function(t){if(Array.isArray(t)){t.length;var e=a(t,4);return le(e[0],e[1],e[2],e[3])}return"string"==typeof t?fe[t]:t},pe=function(t,e){return"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!Q.test(e)||e.startsWith("url(")))},ve=function(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}},me=function(t){return{type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restDelta:.01,restSpeed:10}},he=function(){return{type:"keyframes",ease:"linear",duration:.3}},ge=function(t){return{type:"keyframes",duration:.8,values:t}},ye={x:ve,y:ve,z:ve,rotate:ve,rotateX:ve,rotateY:ve,rotateZ:ve,scaleX:me,scaleY:me,scale:me,opacity:he,backgroundColor:he,color:he,default:me},be=o(o({},k),{transform:Math.round}),we={borderWidth:B,borderTopWidth:B,borderRightWidth:B,borderBottomWidth:B,borderLeftWidth:B,borderRadius:B,radius:B,borderTopLeftRadius:B,borderTopRightRadius:B,borderBottomRightRadius:B,borderBottomLeftRadius:B,width:B,maxWidth:B,height:B,maxHeight:B,size:B,top:B,right:B,bottom:B,left:B,padding:B,paddingTop:B,paddingRight:B,paddingBottom:B,paddingLeft:B,margin:B,marginTop:B,marginRight:B,marginBottom:B,marginLeft:B,rotate:j,rotateX:j,rotateY:j,rotateZ:j,scale:I,scaleX:I,scaleY:I,scaleZ:I,skew:j,skewX:j,skewY:j,distance:B,translateX:B,translateY:B,translateZ:B,x:B,y:B,z:B,perspective:B,transformPerspective:B,opacity:F,originX:N,originY:N,originZ:B,zIndex:be,fillOpacity:F,strokeOpacity:F,numOctaves:be},Ae=o(o({},we),{color:q,backgroundColor:q,outlineColor:q,fill:q,stroke:q,borderColor:q,borderTopColor:q,borderRightColor:q,borderBottomColor:q,borderLeftColor:q,filter:rt,WebkitFilter:rt}),Ve=function(t){return Ae[t]};function xe(t,e){var n,r=Ve(t);return r!==rt&&(r=Q),null===(n=r.getAnimatableNone)||void 0===n?void 0:n.call(r,e)}var Oe=!1,Se=function(t){return p(t)?t[t.length-1]||0:t};function Me(t){var e=t.ease,n=t.times,r=t.yoyo,a=t.flip,u=t.loop,s=i(t,["ease","times","yoyo","flip","loop"]),l=o({},s);return n&&(l.offset=n),s.duration&&(l.duration=ce(s.duration)),s.repeatDelay&&(l.repeatDelay=ce(s.repeatDelay)),e&&(l.ease=function(t){return Array.isArray(t)&&"number"!=typeof t[0]}(e)?e.map(de):de(e)),"tween"===s.type&&(l.type="keyframes"),(r||u||a)&&(r?l.repeatType="reverse":u?l.repeatType="loop":a&&(l.repeatType="mirror"),l.repeat=u||r||a||s.repeat),"spring"!==s.type&&(l.type="keyframes"),l}function Te(t,e,n){var r,s,l,c;return Array.isArray(e.to)&&(null!==(r=t.duration)&&void 0!==r||(t.duration=.8)),function(t){Array.isArray(t.to)&&null===t.to[0]&&(t.to=u([],a(t.to),!1),t.to[0]=t.from)}(e),function(t){t.when,t.delay,t.delayChildren,t.staggerChildren,t.staggerDirection,t.repeat,t.repeatType,t.repeatDelay,t.from;var e=i(t,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(e).length}(t)||(t=o(o({},t),(s=n,l=e.to,c=p(l)?ge:ye[s]||ye.default,o({to:l},c(l))))),o(o({},e),Me(t))}function Ee(t,e,n,r,i){var a,u=ke(r,t),s=null!==(a=u.from)&&void 0!==a?a:e.get(),l=pe(t,n);return"none"===s&&l&&"string"==typeof n?s=xe(t,n):Ce(s)&&"string"==typeof n?s=Pe(n):!Array.isArray(n)&&Ce(n)&&"string"==typeof s&&(n=Pe(s)),pe(t,s)&&l&&!1!==u.type?function(){var r={from:s,to:n,velocity:e.getVelocity(),onComplete:i,onUpdate:function(t){return e.set(t)}};return"inertia"===u.type||"decay"===u.type?function({from:t=0,velocity:e=0,min:n,max:r,power:o=.8,timeConstant:i=750,bounceStiffness:a=500,bounceDamping:u=10,restDelta:s=1,modifyTarget:l,driver:c,onUpdate:f,onComplete:d,onStop:p}){let v;function m(t){return void 0!==n&&t<n||void 0!==r&&t>r}function h(t){return void 0===n?r:void 0===r||Math.abs(n-t)<Math.abs(r-t)?n:r}function g(t){null==v||v.stop(),v=ne(Object.assign(Object.assign({},t),{driver:c,onUpdate:e=>{var n;null==f||f(e),null===(n=t.onUpdate)||void 0===n||n.call(t,e)},onComplete:d,onStop:p}))}function y(t){g(Object.assign({type:"spring",stiffness:a,damping:u,restDelta:s},t))}if(m(t))y({from:t,velocity:e,to:h(t)});else{let r=o*e+t;void 0!==l&&(r=l(r));const a=h(r),u=a===n?-1:1;let c,f;const d=t=>{c=f,f=t,e=re(t-c,Qt().delta),(1===u&&t>a||-1===u&&t<a)&&y({from:t,to:a,velocity:e})};g({type:"decay",from:t,velocity:e,timeConstant:i,power:o,restDelta:s,modifyTarget:l,onUpdate:m(r)?d:void 0})}return{stop:()=>null==v?void 0:v.stop()}}(o(o({},r),u)):ne(o(o({},Te(u,r,t)),{onUpdate:function(t){var e;r.onUpdate(t),null===(e=u.onUpdate)||void 0===e||e.call(u,t)},onComplete:function(){var t;r.onComplete(),null===(t=u.onComplete)||void 0===t||t.call(u)}}))}:function(){var t,r,o=Se(n);return e.set(o),i(),null===(t=null==u?void 0:u.onUpdate)||void 0===t||t.call(u,o),null===(r=null==u?void 0:u.onComplete)||void 0===r||r.call(u),{stop:function(){}}}}function Ce(t){return 0===t||"string"==typeof t&&0===parseFloat(t)&&-1===t.indexOf(" ")}function Pe(t){return"number"==typeof t?0:xe("",t)}function ke(t,e){return t[e]||t.default||t}function Fe(t,e,n,r){return void 0===r&&(r={}),Oe&&(r={type:!1}),e.start((function(o){var i,a,u=Ee(t,e,n,r,o),s=function(t,e){var n,r;return null!==(r=null!==(n=(ke(t,e)||{}).delay)&&void 0!==n?n:t.delay)&&void 0!==r?r:0}(r,t),l=function(){return a=u()};return s?i=setTimeout(l,ce(s)):l(),function(){clearTimeout(i),null==a||a.stop()}}))}var Ie=function(t){return/^0[^.\s]+$/.test(t)};var Re=function(){function t(){this.subscriptions=[]}return t.prototype.add=function(t){var e,n,r=this;return e=this.subscriptions,n=t,-1===e.indexOf(n)&&e.push(n),function(){return function(t,e){var n=t.indexOf(e);n>-1&&t.splice(n,1)}(r.subscriptions,t)}},t.prototype.notify=function(t,e,n){var r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](t,e,n);else for(var o=0;o<r;o++){var i=this.subscriptions[o];i&&i(t,e,n)}},t.prototype.getSize=function(){return this.subscriptions.length},t.prototype.clear=function(){this.subscriptions.length=0},t}(),je=function(){function t(t){var e,n=this;this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Re,this.velocityUpdateSubscribers=new Re,this.renderSubscribers=new Re,this.canTrackVelocity=!1,this.updateAndNotify=function(t,e){void 0===e&&(e=!0),n.prev=n.current,n.current=t;var r=Qt(),o=r.delta,i=r.timestamp;n.lastUpdated!==i&&(n.timeDelta=o,n.lastUpdated=i,qt.postRender(n.scheduleVelocityCheck)),n.prev!==n.current&&n.updateSubscribers.notify(n.current),n.velocityUpdateSubscribers.getSize()&&n.velocityUpdateSubscribers.notify(n.getVelocity()),e&&n.renderSubscribers.notify(n.current)},this.scheduleVelocityCheck=function(){return qt.postRender(n.velocityCheck)},this.velocityCheck=function(t){t.timestamp!==n.lastUpdated&&(n.prev=n.current,n.velocityUpdateSubscribers.notify(n.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e)))}return t.prototype.onChange=function(t){return this.updateSubscribers.add(t)},t.prototype.clearListeners=function(){this.updateSubscribers.clear()},t.prototype.onRenderRequest=function(t){return t(this.get()),this.renderSubscribers.add(t)},t.prototype.attach=function(t){this.passiveEffect=t},t.prototype.set=function(t,e){void 0===e&&(e=!0),e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)},t.prototype.get=function(){return this.current},t.prototype.getPrevious=function(){return this.prev},t.prototype.getVelocity=function(){return this.canTrackVelocity?re(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0},t.prototype.start=function(t){var e=this;return this.stop(),new Promise((function(n){e.hasAnimated=!0,e.stopAnimation=t(n)})).then((function(){return e.clearAnimation()}))},t.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},t.prototype.isAnimating=function(){return!!this.stopAnimation},t.prototype.clearAnimation=function(){this.stopAnimation=null},t.prototype.destroy=function(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()},t}();function De(t){return new je(t)}var Be,Le=function(t){return function(e){return e.test(t)}},Ue=[k,B,D,j,U,L,{test:function(t){return"auto"===t},parse:function(t){return t}}],Ne=function(t){return Ue.find(Le(t))},ze=u(u([],a(Ue),!1),[q,Q],!1),He=function(t){return ze.find(Le(t))};function Xe(t){return Array.isArray(t)}function Ye(t){return"string"==typeof t||Xe(t)}function We(t,e,n){var r=t.getProps();return function(t,e,n,r,o){var i;return void 0===r&&(r={}),void 0===o&&(o={}),"function"==typeof e&&(e=e(null!=n?n:t.custom,r,o)),"string"==typeof e&&(e=null===(i=t.variants)||void 0===i?void 0:i[e]),"function"==typeof e&&(e=e(null!=n?n:t.custom,r,o)),e}(r,e,null!=n?n:r.custom,function(t){var e={};return t.forEachValue((function(t,n){return e[n]=t.get()})),e}(t),function(t){var e={};return t.forEachValue((function(t,n){return e[n]=t.getVelocity()})),e}(t))}function Ze(t){var e;return"function"==typeof(null===(e=t.animate)||void 0===e?void 0:e.start)||Ye(t.initial)||Ye(t.animate)||Ye(t.whileHover)||Ye(t.whileDrag)||Ye(t.whileTap)||Ye(t.whileFocus)||Ye(t.exit)}function $e(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,De(n))}function qe(t,e){if(e)return(e[t]||e.default||e).from}function Ke(t,e,n){var r;void 0===n&&(n={});var i=We(t,e,n.custom),u=(i||{}).transition,s=void 0===u?t.getDefaultTransition()||{}:u;n.transitionOverride&&(s=n.transitionOverride);var l=i?function(){return Ge(t,i,n)}:function(){return Promise.resolve()},c=(null===(r=t.variantChildren)||void 0===r?void 0:r.size)?function(r){void 0===r&&(r=0);var i=s.delayChildren,a=void 0===i?0:i,u=s.staggerChildren,l=s.staggerDirection;return function(t,e,n,r,i,a){void 0===n&&(n=0);void 0===r&&(r=0);void 0===i&&(i=1);var u=[],s=(t.variantChildren.size-1)*r,l=1===i?function(t){return void 0===t&&(t=0),t*r}:function(t){return void 0===t&&(t=0),s-t*r};return Array.from(t.variantChildren).sort(Je).forEach((function(t,r){u.push(Ke(t,e,o(o({},a),{delay:n+l(r)})).then((function(){return t.notifyAnimationComplete(e)})))})),Promise.all(u)}(t,e,a+r,u,l,n)}:function(){return Promise.resolve()},f=s.when;if(f){var d=a("beforeChildren"===f?[l,c]:[c,l],2),p=d[0],v=d[1];return p().then(v)}return Promise.all([l(),c(n.delay)])}function Ge(t,e,n){var r,a=void 0===n?{}:n,u=a.delay,s=void 0===u?0:u,l=a.transitionOverride,c=a.type,f=t.makeTargetAnimatable(e),d=f.transition,p=void 0===d?t.getDefaultTransition():d,v=f.transitionEnd,m=i(f,["transition","transitionEnd"]);l&&(p=l);var h=[],g=c&&(null===(r=t.animationState)||void 0===r?void 0:r.getState()[c]);for(var y in m){var b=t.getValue(y),w=m[y];if(!(!b||void 0===w||g&&_e(g,y))){var A=Fe(y,b,w,o({delay:s},p));h.push(A)}}return Promise.all(h).then((function(){v&&function(t,e){var n=We(t,e),r=n?t.makeTargetAnimatable(n,!1):{},a=r.transitionEnd,u=void 0===a?{}:a;r.transition;var s=i(r,["transitionEnd","transition"]);for(var l in s=o(o({},s),u)){$e(t,l,Se(s[l]))}}(t,v)}))}function Je(t,e){return t.sortNodePosition(e)}function _e(t,e){var n=t.protectedKeys,r=t.needsAnimating,o=n.hasOwnProperty(e)&&!0!==r[e];return r[e]=!1,o}!function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.InView="whileInView",t.Exit="exit"}(Be||(Be={}));var Qe=[Be.Animate,Be.InView,Be.Focus,Be.Hover,Be.Tap,Be.Drag,Be.Exit],tn=u([],a(Qe),!1).reverse(),en=Qe.length;function nn(t){return function(e){return Promise.all(e.map((function(e){var n=e.animation,r=e.options;return function(t,e,n){var r;if(void 0===n&&(n={}),t.notifyAnimationStart(e),Array.isArray(e)){var o=e.map((function(e){return Ke(t,e,n)}));r=Promise.all(o)}else if("string"==typeof e)r=Ke(t,e,n);else{var i="function"==typeof e?We(t,e,n.custom):e;r=Ge(t,i,n)}return r.then((function(){return t.notifyAnimationComplete(e)}))}(t,n,r)})))}}function rn(t){var e,n=nn(t),r=((e={})[Be.Animate]=on(!0),e[Be.InView]=on(),e[Be.Hover]=on(),e[Be.Tap]=on(),e[Be.Drag]=on(),e[Be.Focus]=on(),e[Be.Exit]=on(),e),l={},c=!0,f=function(e,n){var r=We(t,n);if(r){r.transition;var a=r.transitionEnd,u=i(r,["transition","transitionEnd"]);e=o(o(o({},e),u),a)}return e};function d(e,i){for(var d,m=t.getProps(),h=t.getVariantContext(!0)||{},g=[],y=new Set,b={},w=1/0,A=function(n){var l=tn[n],A=r[l],V=null!==(d=m[l])&&void 0!==d?d:h[l],x=Ye(V),O=l===i?A.isActive:null;!1===O&&(w=n);var S=V===h[l]&&V!==m[l]&&x;if(S&&c&&t.manuallyAnimateOnMount&&(S=!1),A.protectedKeys=o({},b),!A.isActive&&null===O||!V&&!A.prevProp||s(V)||"boolean"==typeof V)return"continue";var M=function(t,e){if("string"==typeof e)return e!==t;if(Xe(e))return!v(e,t);return!1}(A.prevProp,V),T=M||l===i&&A.isActive&&!S&&x||n>w&&x,E=Array.isArray(V)?V:[V],C=E.reduce(f,{});!1===O&&(C={});var P=A.prevResolvedValues,k=void 0===P?{}:P,F=o(o({},k),C),I=function(t){T=!0,y.delete(t),A.needsAnimating[t]=!0};for(var R in F){var j=C[R],D=k[R];b.hasOwnProperty(R)||(j!==D?p(j)&&p(D)?!v(j,D)||M?I(R):A.protectedKeys[R]=!0:void 0!==j?I(R):y.add(R):void 0!==j&&y.has(R)?I(R):A.protectedKeys[R]=!0)}A.prevProp=V,A.prevResolvedValues=C,A.isActive&&(b=o(o({},b),C)),c&&t.blockInitialAnimation&&(T=!1),T&&!S&&g.push.apply(g,u([],a(E.map((function(t){return{animation:t,options:o({type:l},e)}}))),!1))},V=0;V<en;V++)A(V);if(l=o({},b),y.size){var x={};y.forEach((function(e){var n=t.getBaseTarget(e);void 0!==n&&(x[e]=n)})),g.push({animation:x})}var O=Boolean(g.length);return c&&!1===m.initial&&!t.manuallyAnimateOnMount&&(O=!1),c=!1,O?n(g):Promise.resolve()}return{isAnimated:function(t){return void 0!==l[t]},animateChanges:d,setActive:function(e,n,o){var i;return r[e].isActive===n?Promise.resolve():(null===(i=t.variantChildren)||void 0===i||i.forEach((function(t){var r;return null===(r=t.animationState)||void 0===r?void 0:r.setActive(e,n)})),r[e].isActive=n,d(o,e))},setAnimateFunction:function(e){n=e(t)},getState:function(){return r}}}function on(t){return void 0===t&&(t=!1),{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}var an=function(t){return function(e){return t(e),null}},un={animation:an((function(t){var e=t.visualElement,n=t.animate;e.animationState||(e.animationState=rn(e)),s(n)&&r((function(){return n.subscribe(e)}),[n])})),exit:an((function(t){var e=t.custom,o=t.visualElement,i=a(function(){var t=n(l);if(null===t)return[!0,null];var e=t.isPresent,o=t.onExitComplete,i=t.register,a=d();return r((function(){return i(a)}),[]),!e&&o?[!1,function(){return null==o?void 0:o(a)}]:[!0]}(),2),u=i[0],s=i[1],c=n(l);r((function(){var t,n;o.isPresent=u;var r=null===(t=o.animationState)||void 0===t?void 0:t.setActive(Be.Exit,!u,{custom:null!==(n=null==c?void 0:c.custom)&&void 0!==n?n:e});!u&&(null==r||r.then(s))}),[u])}))};function sn(t,e,n,r){return t.addEventListener(e,n,r),function(){return t.removeEventListener(e,n,r)}}function ln(t,e,n,o){r((function(){var r=t.current;if(n&&r)return sn(r,e,n,o)}),[t,e,n,o])}function cn(t){return!!t.touches}var fn={pageX:0,pageY:0};function dn(t,e){void 0===e&&(e="page");var n=t.touches[0]||t.changedTouches[0]||fn;return{x:n[e+"X"],y:n[e+"Y"]}}function pn(t,e){return void 0===e&&(e="page"),{x:t[e+"X"],y:t[e+"Y"]}}var vn=function(t,e){void 0===e&&(e=!1);var n,r=function(e){return t(e,function(t,e){return void 0===e&&(e="page"),{point:cn(t)?dn(t,e):pn(t,e)}}(e))};return e?(n=r,function(t){var e=t instanceof MouseEvent;(!e||e&&0===t.button)&&n(t)}):r},mn="undefined"!=typeof window,hn={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},gn={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function yn(t){return mn&&null===window.onpointerdown?t:mn&&null===window.ontouchstart?gn[t]:mn&&null===window.onmousedown?hn[t]:t}function bn(t,e,n,r){return sn(t,yn(e),vn(n,"pointerdown"===e),r)}function wn(t,e,n,r){return ln(t,yn(e),n&&vn(n,"pointerdown"===e),r)}function An(t){var e=null;return function(){return null===e&&(e=t,function(){e=null})}}var Vn=An("dragHorizontal"),xn=An("dragVertical");function On(){var t=function(t){var e=!1;if("y"===t)e=xn();else if("x"===t)e=Vn();else{var n=Vn(),r=xn();n&&r?e=function(){n(),r()}:(n&&n(),r&&r())}return e}(!0);return!t||(t(),!1)}function Sn(t,e,n){return function(r,o){var i;(function(t){return"undefined"!=typeof PointerEvent&&t instanceof PointerEvent?!("mouse"!==t.pointerType):t instanceof MouseEvent})(r)&&!On()&&(null===(i=t.animationState)||void 0===i||i.setActive(Be.Hover,e),null==n||n(r,o))}}var Mn=function(t,e){return!!e&&(t===e||Mn(t,e.parentElement))};var Tn=new WeakMap,En=new WeakMap,Cn=function(t){var e;null===(e=Tn.get(t.target))||void 0===e||e(t)},Pn=function(t){t.forEach(Cn)};function kn(t,e,n){var r=function(t){var e=t.root,n=i(t,["root"]),r=e||document;En.has(r)||En.set(r,{});var a=En.get(r),u=JSON.stringify(n);return a[u]||(a[u]=new IntersectionObserver(Pn,o({root:e},n))),a[u]}(e);return Tn.set(t,n),r.observe(t),function(){Tn.delete(t),r.unobserve(t)}}var Fn={some:0,all:1};function In(t,e,n,o){var i=o.root,a=o.margin,u=o.amount,s=void 0===u?"some":u,l=o.once;r((function(){if(t){var r={root:null==i?void 0:i.current,rootMargin:a,threshold:"number"==typeof s?s:Fn[s]};return kn(n.getInstance(),r,(function(t){var r,o=t.isIntersecting;if(e.isInView!==o&&(e.isInView=o,!l||o||!e.hasEnteredView)){o&&(e.hasEnteredView=!0),null===(r=n.animationState)||void 0===r||r.setActive(Be.InView,o);var i=n.getProps(),a=o?i.onViewportEnter:i.onViewportLeave;null==a||a(t)}}))}}),[t,i,a,s])}function Rn(t,e,n){r((function(){t&&requestAnimationFrame((function(){var t;e.hasEnteredView=!0;var r=n.getProps().onViewportEnter;null==r||r(null),null===(t=n.animationState)||void 0===t||t.setActive(Be.InView,!0)}))}),[t])}var jn={inView:an((function(t){var n=t.visualElement,r=t.whileInView,o=t.onViewportEnter,i=t.onViewportLeave,a=t.viewport,u=void 0===a?{}:a,s=e({hasEnteredView:!1,isInView:!1}),l=Boolean(r||o||i);u.once&&s.current.hasEnteredView&&(l=!1),("undefined"==typeof IntersectionObserver?Rn:In)(l,s.current,n,u)})),tap:an((function(t){var n,o=t.onTap,i=t.onTapStart,a=t.onTapCancel,u=t.whileTap,s=t.visualElement,l=o||i||a||u,c=e(!1),f=e(null);function d(){var t;null===(t=f.current)||void 0===t||t.call(f),f.current=null}function p(){var t;return d(),c.current=!1,null===(t=s.animationState)||void 0===t||t.setActive(Be.Tap,!1),!On()}function v(t,e){p()&&(Mn(s.getInstance(),t.target)?null==o||o(t,e):null==a||a(t,e))}function m(t,e){p()&&(null==a||a(t,e))}wn(s,"pointerdown",l?function(t,e){var n;d(),c.current||(c.current=!0,f.current=ft(bn(window,"pointerup",v),bn(window,"pointercancel",m)),null===(n=s.animationState)||void 0===n||n.setActive(Be.Tap,!0),null==i||i(t,e))}:void 0),n=d,r((function(){return function(){return n()}}),[])})),focus:an((function(t){var e=t.whileFocus,n=t.visualElement;ln(n,"focus",e?function(){var t;null===(t=n.animationState)||void 0===t||t.setActive(Be.Focus,!0)}:void 0),ln(n,"blur",e?function(){var t;null===(t=n.animationState)||void 0===t||t.setActive(Be.Focus,!1)}:void 0)})),hover:an((function(t){var e=t.onHoverStart,n=t.onHoverEnd,r=t.whileHover,o=t.visualElement;wn(o,"pointerenter",e||r?Sn(o,!0,e):void 0),wn(o,"pointerleave",n||r?Sn(o,!1,n):void 0)}))},Dn=function(t){return null!==t&&"object"==typeof t&&t.getVelocity},Bn=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","SetAxisTarget","Unmount"];var Ln=function(t){var e=t.treeType,n=void 0===e?"":e,r=t.build,i=t.getBaseTarget,s=t.makeTargetAnimatable,l=t.measureViewportBox,c=t.render,f=t.readValueFromInstance,d=t.removeValueFromRenderState,p=t.sortNodePosition,v=t.scrapeMotionValuesFromProps;return function(t,e){var m=t.parent,h=t.props,g=t.presenceId,y=t.blockInitialAnimation,b=t.visualState;void 0===e&&(e={});var w,A,V=!1,x=b.latestValues,O=b.renderState,S=function(){var t=Bn.map((function(){return new Re})),e={},n={clearAllListeners:function(){return t.forEach((function(t){return t.clear()}))},updatePropListeners:function(t){Bn.forEach((function(r){var o,i="on"+r,a=t[i];null===(o=e[r])||void 0===o||o.call(e),a&&(e[r]=n[i](a))}))}};return t.forEach((function(t,e){n["on"+Bn[e]]=function(e){return t.add(e)},n["notify"+Bn[e]]=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.notify.apply(t,u([],a(e),!1))}})),n}(),M=new Map,T=new Map,E={},C=o({},x);function P(){w&&V&&(k(),c(w,O,h.style,L.projection))}function k(){r(L,O,x,e,h)}function F(){S.notifyUpdate(x)}var I=v(h);for(var R in I){var j=I[R];void 0!==x[R]&&Dn(j)&&j.set(x[R],!1)}var D=Ze(h),B=function(t){return Boolean(Ze(t)||t.variants)}(h),L=o(o({treeType:n,current:null,depth:m?m.depth+1:0,parent:m,children:new Set,presenceId:g,variantChildren:B?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(null==m?void 0:m.isMounted()),blockInitialAnimation:y,isMounted:function(){return Boolean(w)},mount:function(t){V=!0,w=L.current=t,L.projection&&L.projection.mount(t),B&&m&&!D&&(A=null==m?void 0:m.addVariantChild(L)),null==m||m.children.add(L),L.setProps(h)},unmount:function(){var t;null===(t=L.projection)||void 0===t||t.unmount(),Kt.update(F),Kt.render(P),T.forEach((function(t){return t()})),null==A||A(),null==m||m.children.delete(L),S.clearAllListeners(),w=void 0,V=!1},addVariantChild:function(t){var e,n=L.getClosestVariantNode();if(n)return null===(e=n.variantChildren)||void 0===e||e.add(t),function(){return n.variantChildren.delete(t)}},sortNodePosition:function(t){return p&&n===t.treeType?p(L.getInstance(),t.getInstance()):0},getClosestVariantNode:function(){return B?L:null==m?void 0:m.getClosestVariantNode()},getLayoutId:function(){return h.layoutId},getInstance:function(){return w},getStaticValue:function(t){return x[t]},setStaticValue:function(t,e){return x[t]=e},getLatestValues:function(){return x},setVisibility:function(t){L.isVisible!==t&&(L.isVisible=t,L.scheduleRender())},makeTargetAnimatable:function(t,e){return void 0===e&&(e=!0),s(L,t,h,e)},measureViewportBox:function(){return l(w,h)},addValue:function(t,e){L.hasValue(t)&&L.removeValue(t),M.set(t,e),x[t]=e.get(),function(t,e){var n=e.onChange((function(e){x[t]=e,h.onUpdate&&qt.update(F,!1,!0)})),r=e.onRenderRequest(L.scheduleRender);T.set(t,(function(){n(),r()}))}(t,e)},removeValue:function(t){var e;M.delete(t),null===(e=T.get(t))||void 0===e||e(),T.delete(t),delete x[t],d(t,O)},hasValue:function(t){return M.has(t)},getValue:function(t,e){var n=M.get(t);return void 0===n&&void 0!==e&&(n=De(e),L.addValue(t,n)),n},forEachValue:function(t){return M.forEach(t)},readValue:function(t){var n;return null!==(n=x[t])&&void 0!==n?n:f(w,t,e)},setBaseTarget:function(t,e){C[t]=e},getBaseTarget:function(t){if(i){var e=i(h,t);if(void 0!==e&&!Dn(e))return e}return C[t]}},S),{build:function(){return k(),O},scheduleRender:function(){qt.render(P,!1,!0)},syncRender:P,setProps:function(t){h=t,S.updatePropListeners(t),E=function(t,e,n){var r;for(var o in e){var i=e[o],a=n[o];if(Dn(i))t.addValue(o,i);else if(Dn(a))t.addValue(o,De(i));else if(a!==i)if(t.hasValue(o)){var u=t.getValue(o);!u.hasAnimated&&u.set(i)}else t.addValue(o,De(null!==(r=t.getStaticValue(o))&&void 0!==r?r:i))}for(var o in n)void 0===e[o]&&t.removeValue(o);return e}(L,v(h),E)},getProps:function(){return h},getVariant:function(t){var e;return null===(e=h.variants)||void 0===e?void 0:e[t]},getDefaultTransition:function(){return h.transition},getTransformPagePoint:function(){return h.transformPagePoint},getVariantContext:function(t){if(void 0===t&&(t=!1),t)return null==m?void 0:m.getVariantContext();if(!D){var e=(null==m?void 0:m.getVariantContext())||{};return void 0!==h.initial&&(e.initial=h.initial),e}for(var n={},r=0;r<Nn;r++){var o=Un[r],i=h[o];(Ye(i)||!1===i)&&(n[o]=i)}return n}});return L}},Un=u(["initial"],a(Qe),!1),Nn=Un.length,zn=["","X","Y","Z"],Hn=["transformPerspective","x","y","z"];function Xn(t,e){return Hn.indexOf(t)-Hn.indexOf(e)}["translate","scale","rotate","skew"].forEach((function(t){return zn.forEach((function(e){return Hn.push(t+e)}))}));var Yn=new Set(Hn);function Wn(t){return Yn.has(t)}var Zn=new Set(["originX","originY","originZ"]);function $n(t){return Zn.has(t)}var qn={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function Kn(t){return t.startsWith("--")}var Gn=function(t,e){return e&&"number"==typeof t?e.transform(t):t};function Jn(t,e,n,r){var o,i=t.style,a=t.vars,u=t.transform,s=t.transformKeys,l=t.transformOrigin;s.length=0;var c=!1,f=!1,d=!0;for(var p in e){var v=e[p];if(Kn(p))a[p]=v;else{var m=we[p],h=Gn(v,m);if(Wn(p)){if(c=!0,u[p]=h,s.push(p),!d)continue;v!==(null!==(o=m.default)&&void 0!==o?o:0)&&(d=!1)}else $n(p)?(l[p]=h,f=!0):i[p]=h}}c?i.transform=function(t,e,n,r){var o=t.transform,i=t.transformKeys,a=e.enableHardwareAcceleration,u=void 0===a||a,s=e.allowTransformNone,l=void 0===s||s,c="";i.sort(Xn);for(var f=!1,d=i.length,p=0;p<d;p++){var v=i[p];c+=(qn[v]||v)+"("+o[v]+") ","z"===v&&(f=!0)}return!f&&u?c+="translateZ(0)":c=c.trim(),r?c=r(o,n?"":c):l&&n&&(c="none"),c}(t,n,d,r):r&&(i.transform=r({},"")),f&&(i.transformOrigin=function(t){var e=t.originX,n=void 0===e?"50%":e,r=t.originY,o=void 0===r?"50%":r,i=t.originZ;return n+" "+o+" "+(void 0===i?0:i)}(l))}function _n(t){return"string"==typeof t&&t.startsWith("var(--")}var Qn=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function tr(t,e,n){var r=a(function(t){var e=Qn.exec(t);if(!e)return[,];var n=a(e,3);return[n[1],n[2]]}(t),2),o=r[0],i=r[1];if(o){var u=window.getComputedStyle(e).getPropertyValue(o);return u?u.trim():_n(i)?tr(i,e):i}}var er,nr=new Set(["width","height","top","left","right","bottom","x","y"]),rr=function(t){return nr.has(t)},or=function(t,e){t.set(e,!1),t.set(e)},ir=function(t){return t===k||t===B};!function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"}(er||(er={}));var ar=function(t,e){return parseFloat(t.split(", ")[e])},ur=function(t,e){return function(n,r){var o=r.transform;if("none"===o||!o)return 0;var i=o.match(/^matrix3d\((.+)\)$/);if(i)return ar(i[1],e);var a=o.match(/^matrix\((.+)\)$/);return a?ar(a[1],t):0}},sr=new Set(["x","y","z"]),lr=Hn.filter((function(t){return!sr.has(t)}));var cr={width:function(t,e){var n=t.x,r=e.paddingLeft,o=void 0===r?"0":r,i=e.paddingRight,a=void 0===i?"0":i;return n.max-n.min-parseFloat(o)-parseFloat(a)},height:function(t,e){var n=t.y,r=e.paddingTop,o=void 0===r?"0":r,i=e.paddingBottom,a=void 0===i?"0":i;return n.max-n.min-parseFloat(o)-parseFloat(a)},top:function(t,e){var n=e.top;return parseFloat(n)},left:function(t,e){var n=e.left;return parseFloat(n)},bottom:function(t,e){var n=t.y,r=e.top;return parseFloat(r)+(n.max-n.min)},right:function(t,e){var n=t.x,r=e.left;return parseFloat(r)+(n.max-n.min)},x:ur(4,13),y:ur(5,14)},fr=function(t,e,n,r){void 0===n&&(n={}),void 0===r&&(r={}),e=o({},e),r=o({},r);var i=Object.keys(e).filter(rr),u=[],s=!1,l=[];if(i.forEach((function(o){var i=t.getValue(o);if(t.hasValue(o)){var a,c=n[o],f=Ne(c),d=e[o];if(p(d)){var v=d.length,m=null===d[0]?1:0;c=d[m],f=Ne(c);for(var h=m;h<v;h++)a?Ne(d[h]):a=Ne(d[h])}else a=Ne(d);if(f!==a)if(ir(f)&&ir(a)){var g=i.get();"string"==typeof g&&i.set(parseFloat(g)),"string"==typeof d?e[o]=parseFloat(d):Array.isArray(d)&&a===B&&(e[o]=d.map(parseFloat))}else(null==f?void 0:f.transform)&&(null==a?void 0:a.transform)&&(0===c||0===d)?0===c?i.set(a.transform(c)):e[o]=f.transform(d):(s||(u=function(t){var e=[];return lr.forEach((function(n){var r=t.getValue(n);void 0!==r&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),e.length&&t.syncRender(),e}(t),s=!0),l.push(o),r[o]=void 0!==r[o]?r[o]:e[o],or(i,d))}})),l.length){var c=function(t,e,n){var r=e.measureViewportBox(),o=e.getInstance(),i=getComputedStyle(o),a=i.display,u={};"none"===a&&e.setStaticValue("display",t.display||"block"),n.forEach((function(t){u[t]=cr[t](r,i)})),e.syncRender();var s=e.measureViewportBox();return n.forEach((function(n){var r=e.getValue(n);or(r,u[n]),t[n]=cr[n](s,i)})),t}(e,t,l);return u.length&&u.forEach((function(e){var n=a(e,2),r=n[0],o=n[1];t.getValue(r).set(o)})),t.syncRender(),{target:c,transitionEnd:r}}return{target:e,transitionEnd:r}};function dr(t,e,n,r){return function(t){return Object.keys(t).some(rr)}(e)?fr(t,e,n,r):{target:e,transitionEnd:r}}var pr=function(t,e,n,r){var a=function(t,e,n){var r,a=i(e,[]),u=t.getInstance();if(!(u instanceof HTMLElement))return{target:a,transitionEnd:n};for(var s in n&&(n=o({},n)),t.forEachValue((function(t){var e=t.get();if(_n(e)){var n=tr(e,u);n&&t.set(n)}})),a){var l=a[s];if(_n(l)){var c=tr(l,u);c&&(a[s]=c,n&&(null!==(r=n[s])&&void 0!==r||(n[s]=l)))}}return{target:a,transitionEnd:n}}(t,e,r);return dr(t,e=a.target,n,r=a.transitionEnd)},vr={};function mr(t,e){var n=e.layout,r=e.layoutId;return Wn(t)||$n(t)||(n||void 0!==r)&&(!!vr[t]||"opacity"===t)}function hr(t){var e=t.style,n={};for(var r in e)(Dn(e[r])||mr(r,t))&&(n[r]=e[r]);return n}function gr(t,e,n,r){var o=e.style,i=e.vars;for(var a in Object.assign(t.style,o,r&&r.getProjectionStyles(n)),i)t.style.setProperty(a,i[a])}var yr={treeType:"dom",readValueFromInstance:function(t,e){if(Wn(e)){var n=Ve(e);return n&&n.default||0}var r,o=(r=t,window.getComputedStyle(r));return(Kn(e)?o.getPropertyValue(e):o[e])||0},sortNodePosition:function(t,e){return 2&t.compareDocumentPosition(e)?1:-1},getBaseTarget:function(t,e){var n;return null===(n=t.style)||void 0===n?void 0:n[e]},measureViewportBox:function(t,e){return function(t,e){return n=function(t,e){if(!e)return t;var n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(t.getBoundingClientRect(),e),r=n.top,{x:{min:n.left,max:n.right},y:{min:r,max:n.bottom}};var n,r}(t,e.transformPagePoint)},resetTransform:function(t,e,n){var r=n.transformTemplate;e.style.transform=r?r({},""):"none",t.scheduleRender()},restoreTransform:function(t,e){t.style.transform=e.style.transform},removeValueFromRenderState:function(t,e){var n=e.vars,r=e.style;delete n[t],delete r[t]},makeTargetAnimatable:function(t,e,n,r){var a=n.transformValues;void 0===r&&(r=!0);var u=e.transition,s=e.transitionEnd,l=i(e,["transition","transitionEnd"]),c=function(t,e,n){var r,o,i={};for(var a in t)i[a]=null!==(r=qe(a,e))&&void 0!==r?r:null===(o=n.getValue(a))||void 0===o?void 0:o.get();return i}(l,u||{},t);if(a&&(s&&(s=a(s)),l&&(l=a(l)),c&&(c=a(c))),r){!function(t,e,n){var r,o,i,a,u=Object.keys(e).filter((function(e){return!t.hasValue(e)})),s=u.length;if(s)for(var l=0;l<s;l++){var c=u[l],f=e[c],d=null;Array.isArray(f)&&(d=f[0]),null===d&&(d=null!==(o=null!==(r=n[c])&&void 0!==r?r:t.readValue(c))&&void 0!==o?o:e[c]),null!=d&&("string"==typeof d&&(/^\-?\d*\.?\d+$/.test(d)||Ie(d))?d=parseFloat(d):!He(d)&&Q.test(f)&&(d=xe(c,f)),t.addValue(c,De(d)),null!==(i=(a=n)[c])&&void 0!==i||(a[c]=d),t.setBaseTarget(c,d))}}(t,l,c);var f=pr(t,l,c,s);s=f.transitionEnd,l=f.target}return o({transition:u,transitionEnd:s},l)},scrapeMotionValuesFromProps:hr,build:function(t,e,n,r,o){void 0!==t.isVisible&&(e.style.visibility=t.isVisible?"visible":"hidden"),Jn(e,n,r,o.transformTemplate)},render:gr},br=Ln(yr);function wr(t,e,n){return"string"==typeof t?t:B.transform(e+n*t)}var Ar={offset:"stroke-dashoffset",array:"stroke-dasharray"},Vr={offset:"strokeDashoffset",array:"strokeDasharray"};function xr(t,e,n,r){var o=e.attrX,a=e.attrY,u=e.originX,s=e.originY,l=e.pathLength,c=e.pathSpacing,f=void 0===c?1:c,d=e.pathOffset,p=void 0===d?0:d;Jn(t,i(e,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]),n,r),t.attrs=t.style,t.style={};var v=t.attrs,m=t.style,h=t.dimensions;v.transform&&(h&&(m.transform=v.transform),delete v.transform),h&&(void 0!==u||void 0!==s||m.transform)&&(m.transformOrigin=function(t,e,n){return wr(e,t.x,t.width)+" "+wr(n,t.y,t.height)}(h,void 0!==u?u:.5,void 0!==s?s:.5)),void 0!==o&&(v.x=o),void 0!==a&&(v.y=a),void 0!==l&&function(t,e,n,r,o){void 0===n&&(n=1),void 0===r&&(r=0),void 0===o&&(o=!0),t.pathLength=1;var i=o?Ar:Vr;t[i.offset]=B.transform(-r);var a=B.transform(e),u=B.transform(n);t[i.array]=a+" "+u}(v,l,f,p,!1)}var Or=/([a-z])([A-Z])/g,Sr=function(t){return t.replace(Or,"$1-$2").toLowerCase()},Mr=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);var Tr=Ln(o(o({},yr),{getBaseTarget:function(t,e){return t[e]},readValueFromInstance:function(t,e){var n;return Wn(e)?(null===(n=Ve(e))||void 0===n?void 0:n.default)||0:(e=Mr.has(e)?e:Sr(e),t.getAttribute(e))},scrapeMotionValuesFromProps:function(t){var e=hr(t);for(var n in t){if(Dn(t[n]))e["x"===n||"y"===n?"attr"+n.toUpperCase():n]=t[n]}return e},build:function(t,e,n,r,o){xr(e,n,r,o.transformTemplate)},render:function(t,e){for(var n in gr(t,e),e.attrs)t.setAttribute(Mr.has(n)?n:Sr(n),e.attrs[n])}})),Er=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];var Cr=o(o({renderer:function(t,e){return function(t){return"string"==typeof t&&!t.includes("-")&&!!(Er.indexOf(t)>-1||/[A-Z]/.test(t))}(t)?Tr(e,{enableHardwareAcceleration:!1}):br(e,{enableHardwareAcceleration:!0})}},un),jn);export{Cr as domAnimation};
1
+ import{createContext as t,useRef as n,useContext as e,useEffect as r}from"react";var o=function(){return(o=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 i(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 a(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(t,n,e){if(e||2===arguments.length)for(var r,o=0,i=n.length;o<i;o++)!r&&o in n||(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return t.concat(r||Array.prototype.slice.call(n))}function s(t){return"object"==typeof t&&"function"==typeof t.start}var c=t(null);var l=0,f=function(){return l++},d=function(){return t=f,null===(e=n(null)).current&&(e.current=t()),e.current;var t,e},p=function(t){return Array.isArray(t)};function v(t,n){if(!Array.isArray(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}const m=(t,n,e)=>Math.min(Math.max(e,t),n);function h({duration:t=800,bounce:n=.25,velocity:e=0,mass:r=1}){let o,i,a=1-n;a=m(.05,1,a),t=m(.01,10,t/1e3),a<1?(o=n=>{const r=n*a,o=r*t;return.001-(r-e)/g(n,a)*Math.exp(-o)},i=n=>{const r=n*a*t,i=r*e+e,u=Math.pow(a,2)*Math.pow(n,2)*t,s=Math.exp(-r),c=g(Math.pow(n,2),a);return(.001-o(n)>0?-1:1)*((i-u)*s)/c}):(o=n=>Math.exp(-n*t)*((n-e)*t+1)-.001,i=n=>Math.exp(-n*t)*(t*t*(e-n)));const u=function(t,n,e){let r=e;for(let e=1;e<12;e++)r-=t(r)/n(r);return r}(o,i,5/t);if(t*=1e3,isNaN(u))return{stiffness:100,damping:10,duration:t};{const n=Math.pow(u,2)*r;return{stiffness:n,damping:2*a*Math.sqrt(r*n),duration:t}}}function g(t,n){return t*Math.sqrt(1-n*n)}const y=["duration","bounce"],b=["stiffness","damping","mass"];function w(t,n){return n.some(n=>void 0!==t[n])}function A(t){var{from:n=0,to:e=1,restSpeed:r=2,restDelta:o}=t,a=i(t,["from","to","restSpeed","restDelta"]);const u={done:!1,value:n};let{stiffness:s,damping:c,mass:l,velocity:f,duration:d,isResolvedFromDuration:p}=function(t){let n=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},t);if(!w(t,b)&&w(t,y)){const e=h(t);n=Object.assign(Object.assign(Object.assign({},n),e),{velocity:0,mass:1}),n.isResolvedFromDuration=!0}return n}(a),v=V,m=V;function A(){const t=f?-f/1e3:0,r=e-n,i=c/(2*Math.sqrt(s*l)),a=Math.sqrt(s/l)/1e3;if(null!=o||(o=Math.abs(e-n)<=1?.01:.4),i<1){const n=g(a,i);v=o=>{const u=Math.exp(-i*a*o);return e-u*((t+i*a*r)/n*Math.sin(n*o)+r*Math.cos(n*o))},m=e=>{const o=Math.exp(-i*a*e);return i*a*o*(Math.sin(n*e)*(t+i*a*r)/n+r*Math.cos(n*e))-o*(Math.cos(n*e)*(t+i*a*r)-n*r*Math.sin(n*e))}}else if(1===i)v=n=>e-Math.exp(-a*n)*(r+(t+a*r)*n);else{const n=a*Math.sqrt(i*i-1);v=o=>{const u=Math.exp(-i*a*o),s=Math.min(n*o,300);return e-u*((t+i*a*r)*Math.sinh(s)+n*r*Math.cosh(s))/n}}}return A(),{next:t=>{const n=v(t);if(p)u.done=t>=d;else{const i=1e3*m(t),a=Math.abs(i)<=r,s=Math.abs(e-n)<=o;u.done=a&&s}return u.value=u.done?e:n,u},flipTarget:()=>{f=-f,[n,e]=[e,n],A()}}}A.needsInterpolation=(t,n)=>"string"==typeof t||"string"==typeof n;const V=t=>0,x=(t,n,e)=>{const r=n-t;return 0===r?1:(e-t)/r},O=(t,n,e)=>-e*t+e*n+t,S=(t,n)=>e=>Math.max(Math.min(e,n),t),M=t=>t%1?Number(t.toFixed(5)):t,T=/(-)?([\d]*\.?[\d])+/g,E=/(#[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,C=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function P(t){return"string"==typeof t}const k={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},F=Object.assign(Object.assign({},k),{transform:S(0,1)}),I=Object.assign(Object.assign({},k),{default:1}),R=t=>({test:n=>P(n)&&n.endsWith(t)&&1===n.split(" ").length,parse:parseFloat,transform:n=>`${n}${t}`}),j=R("deg"),D=R("%"),B=R("px"),L=R("vh"),U=R("vw"),N=Object.assign(Object.assign({},D),{parse:t=>D.parse(t)/100,transform:t=>D.transform(100*t)}),z=(t,n)=>e=>Boolean(P(e)&&C.test(e)&&e.startsWith(t)||n&&Object.prototype.hasOwnProperty.call(e,n)),X=(t,n,e)=>r=>{if(!P(r))return r;const[o,i,a,u]=r.match(T);return{[t]:parseFloat(o),[n]:parseFloat(i),[e]:parseFloat(a),alpha:void 0!==u?parseFloat(u):1}},Y={test:z("hsl","hue"),parse:X("hue","saturation","lightness"),transform:({hue:t,saturation:n,lightness:e,alpha:r=1})=>"hsla("+Math.round(t)+", "+D.transform(M(n))+", "+D.transform(M(e))+", "+M(F.transform(r))+")"},H=S(0,255),W=Object.assign(Object.assign({},k),{transform:t=>Math.round(H(t))}),Z={test:z("rgb","red"),parse:X("red","green","blue"),transform:({red:t,green:n,blue:e,alpha:r=1})=>"rgba("+W.transform(t)+", "+W.transform(n)+", "+W.transform(e)+", "+M(F.transform(r))+")"};const $={test:z("#"),parse:function(t){let n="",e="",r="",o="";return t.length>5?(n=t.substr(1,2),e=t.substr(3,2),r=t.substr(5,2),o=t.substr(7,2)):(n=t.substr(1,1),e=t.substr(2,1),r=t.substr(3,1),o=t.substr(4,1),n+=n,e+=e,r+=r,o+=o),{red:parseInt(n,16),green:parseInt(e,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:Z.transform},q={test:t=>Z.test(t)||$.test(t)||Y.test(t),parse:t=>Z.test(t)?Z.parse(t):Y.test(t)?Y.parse(t):$.parse(t),transform:t=>P(t)?t:t.hasOwnProperty("red")?Z.transform(t):Y.transform(t)};function K(t){"number"==typeof t&&(t=""+t);const n=[];let e=0;const r=t.match(E);r&&(e=r.length,t=t.replace(E,"${c}"),n.push(...r.map(q.parse)));const o=t.match(T);return o&&(t=t.replace(T,"${n}"),n.push(...o.map(k.parse))),{values:n,numColors:e,tokenised:t}}function G(t){return K(t).values}function J(t){const{values:n,numColors:e,tokenised:r}=K(t),o=n.length;return t=>{let n=r;for(let r=0;r<o;r++)n=n.replace(r<e?"${c}":"${n}",r<e?q.transform(t[r]):M(t[r]));return n}}const _=t=>"number"==typeof t?0:t;const Q={test:function(t){var n,e,r,o;return isNaN(t)&&P(t)&&(null!==(e=null===(n=t.match(T))||void 0===n?void 0:n.length)&&void 0!==e?e:0)+(null!==(o=null===(r=t.match(E))||void 0===r?void 0:r.length)&&void 0!==o?o:0)>0},parse:G,createTransformer:J,getAnimatableNone:function(t){const n=G(t);return J(t)(n.map(_))}},tt=new Set(["brightness","contrast","saturate","opacity"]);function nt(t){let[n,e]=t.slice(0,-1).split("(");if("drop-shadow"===n)return t;const[r]=e.match(T)||[];if(!r)return t;const o=e.replace(r,"");let i=tt.has(n)?1:0;return r!==e&&(i*=100),n+"("+i+o+")"}const et=/([a-z-]*)\(.*?\)/g,rt=Object.assign(Object.assign({},Q),{getAnimatableNone:t=>{const n=t.match(et);return n?n.map(nt).join(" "):t}});function ot(t,n,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?t+6*(n-t)*e:e<.5?n:e<2/3?t+(n-t)*(2/3-e)*6:t}function it({hue:t,saturation:n,lightness:e,alpha:r}){t/=360,e/=100;let o=0,i=0,a=0;if(n/=100){const r=e<.5?e*(1+n):e+n-e*n,u=2*e-r;o=ot(u,r,t+1/3),i=ot(u,r,t),a=ot(u,r,t-1/3)}else o=i=a=e;return{red:Math.round(255*o),green:Math.round(255*i),blue:Math.round(255*a),alpha:r}}const at=(t,n,e)=>{const r=t*t,o=n*n;return Math.sqrt(Math.max(0,e*(o-r)+r))},ut=[$,Z,Y],st=t=>ut.find(n=>n.test(t)),ct=(t,n)=>{let e=st(t),r=st(n),o=e.parse(t),i=r.parse(n);e===Y&&(o=it(o),e=Z),r===Y&&(i=it(i),r=Z);const a=Object.assign({},o);return t=>{for(const n in a)"alpha"!==n&&(a[n]=at(o[n],i[n],t));return a.alpha=O(o.alpha,i.alpha,t),e.transform(a)}},lt=(t,n)=>e=>n(t(e)),ft=(...t)=>t.reduce(lt);function dt(t,n){return"number"==typeof t?e=>O(t,n,e):q.test(t)?ct(t,n):ht(t,n)}const pt=(t,n)=>{const e=[...t],r=e.length,o=t.map((t,e)=>dt(t,n[e]));return t=>{for(let n=0;n<r;n++)e[n]=o[n](t);return e}},vt=(t,n)=>{const e=Object.assign(Object.assign({},t),n),r={};for(const o in e)void 0!==t[o]&&void 0!==n[o]&&(r[o]=dt(t[o],n[o]));return t=>{for(const n in r)e[n]=r[n](t);return e}};function mt(t){const n=Q.parse(t),e=n.length;let r=0,o=0,i=0;for(let t=0;t<e;t++)r||"number"==typeof n[t]?r++:void 0!==n[t].hue?i++:o++;return{parsed:n,numNumbers:r,numRGB:o,numHSL:i}}const ht=(t,n)=>{const e=Q.createTransformer(n),r=mt(t),o=mt(n);return r.numHSL===o.numHSL&&r.numRGB===o.numRGB&&r.numNumbers>=o.numNumbers?ft(pt(r.parsed,o.parsed),e):e=>""+(e>0?n:t)},gt=(t,n)=>e=>O(t,n,e);function yt(t,n,e){const r=[],o=e||("number"==typeof(i=t[0])?gt:"string"==typeof i?q.test(i)?ct:ht:Array.isArray(i)?pt:"object"==typeof i?vt:void 0);var i;const a=t.length-1;for(let e=0;e<a;e++){let i=o(t[e],t[e+1]);if(n){const t=Array.isArray(n)?n[e]:n;i=ft(t,i)}r.push(i)}return r}function bt(t,n,{clamp:e=!0,ease:r,mixer:o}={}){const i=t.length;n.length,!r||!Array.isArray(r)||r.length,t[0]>t[i-1]&&(t=[].concat(t),n=[].concat(n),t.reverse(),n.reverse());const a=yt(n,r,o),u=2===i?function([t,n],[e]){return r=>e(x(t,n,r))}(t,a):function(t,n){const e=t.length,r=e-1;return o=>{let i=0,a=!1;if(o<=t[0]?a=!0:o>=t[r]&&(i=r-1,a=!0),!a){let n=1;for(;n<e&&!(t[n]>o||n===r);n++);i=n-1}const u=x(t[i],t[i+1],o);return n[i](u)}}(t,a);return e?n=>u(m(t[0],t[i-1],n)):u}const wt=t=>n=>1-t(1-n),At=t=>n=>n<=.5?t(2*n)/2:(2-t(2*(1-n)))/2,Vt=t=>n=>n*n*((t+1)*n-t),xt=t=>t,Ot=(St=2,t=>Math.pow(t,St));var St;const Mt=wt(Ot),Tt=At(Ot),Et=t=>1-Math.sin(Math.acos(t)),Ct=wt(Et),Pt=At(Ct),kt=Vt(1.525),Ft=wt(kt),It=At(kt),Rt=(t=>{const n=Vt(t);return t=>(t*=2)<1?.5*n(t):.5*(2-Math.pow(2,-10*(t-1)))})(1.525),jt=t=>{if(1===t||0===t)return t;const 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},Dt=wt(jt);function Bt(t,n){return t.map(()=>n||Tt).splice(0,t.length-1)}function Lt({from:t=0,to:n=1,ease:e,offset:r,duration:o=300}){const i={done:!1,value:t},a=Array.isArray(n)?n:[t,n],u=function(t,n){return t.map(t=>t*n)}(r&&r.length===a.length?r:function(t){const n=t.length;return t.map((t,e)=>0!==e?e/(n-1):0)}(a),o);function s(){return bt(u,a,{ease:Array.isArray(e)?e:Bt(a,e)})}let c=s();return{next:t=>(i.value=c(t),i.done=t>=o,i),flipTarget:()=>{a.reverse(),c=s()}}}const Ut={keyframes:Lt,spring:A,decay:function({velocity:t=0,from:n=0,power:e=.8,timeConstant:r=350,restDelta:o=.5,modifyTarget:i}){const a={done:!1,value:n};let u=e*t;const s=n+u,c=void 0===i?s:i(s);return c!==s&&(u=c-n),{next:t=>{const n=-u*Math.exp(-t/r);return a.done=!(n>o||n<-o),a.value=a.done?c:c+n,a},flipTarget:()=>{}}}};const Nt="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),zt="undefined"!=typeof window?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(Nt()),1/60*1e3);let Xt=!0,Yt=!1,Ht=!1;const Wt={delta:0,timestamp:0},Zt=["read","update","preRender","render","postRender"],$t=Zt.reduce((t,n)=>(t[n]=function(t){let n=[],e=[],r=0,o=!1,i=!1;const a=new WeakSet,u={schedule:(t,i=!1,u=!1)=>{const s=u&&o,c=s?n:e;return i&&a.add(t),-1===c.indexOf(t)&&(c.push(t),s&&o&&(r=n.length)),t},cancel:t=>{const n=e.indexOf(t);-1!==n&&e.splice(n,1),a.delete(t)},process:s=>{if(o)i=!0;else{if(o=!0,[n,e]=[e,n],e.length=0,r=n.length,r)for(let e=0;e<r;e++){const r=n[e];r(s),a.has(r)&&(u.schedule(r),t())}o=!1,i&&(i=!1,u.process(s))}}};return u}(()=>Yt=!0),t),{}),qt=Zt.reduce((t,n)=>{const e=$t[n];return t[n]=(t,n=!1,r=!1)=>(Yt||_t(),e.schedule(t,n,r)),t},{}),Kt=Zt.reduce((t,n)=>(t[n]=$t[n].cancel,t),{});Zt.reduce((t,n)=>(t[n]=()=>$t[n].process(Wt),t),{});const Gt=t=>$t[t].process(Wt),Jt=t=>{Yt=!1,Wt.delta=Xt?1/60*1e3:Math.max(Math.min(t-Wt.timestamp,40),1),Wt.timestamp=t,Ht=!0,Zt.forEach(Gt),Ht=!1,Yt&&(Xt=!1,zt(Jt))},_t=()=>{Yt=!0,Xt=!0,Ht||zt(Jt)},Qt=()=>Wt;function tn(t,n,e=0){return t-n-e}const nn=t=>{const n=({delta:n})=>t(n);return{start:()=>qt.update(n,!0),stop:()=>Kt.update(n)}};function en(t){var n,e,{from:r,autoplay:o=!0,driver:a=nn,elapsed:u=0,repeat:s=0,repeatType:c="loop",repeatDelay:l=0,onPlay:f,onStop:d,onComplete:p,onRepeat:v,onUpdate:m}=t,h=i(t,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let g,y,b,{to:w}=h,V=0,x=h.duration,O=!1,S=!0;const M=function(t){if(Array.isArray(t.to))return Lt;if(Ut[t.type])return Ut[t.type];const n=new Set(Object.keys(t));return n.has("ease")||n.has("duration")&&!n.has("dampingRatio")?Lt:n.has("dampingRatio")||n.has("stiffness")||n.has("mass")||n.has("damping")||n.has("restSpeed")||n.has("restDelta")?A:Lt}(h);(null===(e=(n=M).needsInterpolation)||void 0===e?void 0:e.call(n,r,w))&&(b=bt([0,100],[r,w],{clamp:!1}),r=0,w=100);const T=M(Object.assign(Object.assign({},h),{from:r,to:w}));function E(){V++,"reverse"===c?(S=V%2==0,u=function(t,n,e=0,r=!0){return r?tn(n+-t,n,e):n-(t-n)+e}(u,x,l,S)):(u=tn(u,x,l),"mirror"===c&&T.flipTarget()),O=!1,v&&v()}function C(t){if(S||(t=-t),u+=t,!O){const t=T.next(Math.max(0,u));y=t.value,b&&(y=b(y)),O=S?t.done:u<=0}null==m||m(y),O&&(0===V&&(null!=x||(x=u)),V<s?function(t,n,e,r){return r?t>=n+e:t<=-e}(u,x,l,S)&&E():(g.stop(),p&&p()))}return o&&(null==f||f(),g=a(C),g.start()),{stop:()=>{null==d||d(),g.stop()}}}function rn(t,n){return n?t*(1e3/n):0}const on=(t,n)=>1-3*n+3*t,an=(t,n)=>3*n-6*t,un=t=>3*t,sn=(t,n,e)=>((on(n,e)*t+an(n,e))*t+un(n))*t,cn=(t,n,e)=>3*on(n,e)*t*t+2*an(n,e)*t+un(n);function ln(t,n,e,r){if(t===n&&e===r)return xt;const o=new Float32Array(11);for(let n=0;n<11;++n)o[n]=sn(.1*n,t,e);function i(n){let r=0,i=1;for(;10!==i&&o[i]<=n;++i)r+=.1;--i;const a=r+.1*((n-o[i])/(o[i+1]-o[i])),u=cn(a,t,e);return u>=.001?function(t,n,e,r){for(let o=0;o<8;++o){const o=cn(n,e,r);if(0===o)return n;n-=(sn(n,e,r)-t)/o}return n}(n,a,t,e):0===u?a:function(t,n,e,r,o){let i,a,u=0;do{a=n+(e-n)/2,i=sn(a,r,o)-t,i>0?e=a:n=a}while(Math.abs(i)>1e-7&&++u<10);return a}(n,r,r+.1,t,e)}return t=>0===t||1===t?t:sn(i(t),n,r)}var fn=function(t){return 1e3*t},dn={linear:xt,easeIn:Ot,easeInOut:Tt,easeOut:Mt,circIn:Et,circInOut:Pt,circOut:Ct,backIn:kt,backInOut:It,backOut:Ft,anticipate:Rt,bounceIn:Dt,bounceInOut:t=>t<.5?.5*(1-jt(1-2*t)):.5*jt(2*t-1)+.5,bounceOut:jt},pn=function(t){if(Array.isArray(t)){t.length;var n=a(t,4);return ln(n[0],n[1],n[2],n[3])}return"string"==typeof t?dn[t]:t},vn=function(t,n){return"zIndex"!==t&&(!("number"!=typeof n&&!Array.isArray(n))||!("string"!=typeof n||!Q.test(n)||n.startsWith("url(")))},mn=function(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}},hn=function(t){return{type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restDelta:.01,restSpeed:10}},gn=function(){return{type:"keyframes",ease:"linear",duration:.3}},yn=function(t){return{type:"keyframes",duration:.8,values:t}},bn={x:mn,y:mn,z:mn,rotate:mn,rotateX:mn,rotateY:mn,rotateZ:mn,scaleX:hn,scaleY:hn,scale:hn,opacity:gn,backgroundColor:gn,color:gn,default:hn},wn=o(o({},k),{transform:Math.round}),An={borderWidth:B,borderTopWidth:B,borderRightWidth:B,borderBottomWidth:B,borderLeftWidth:B,borderRadius:B,radius:B,borderTopLeftRadius:B,borderTopRightRadius:B,borderBottomRightRadius:B,borderBottomLeftRadius:B,width:B,maxWidth:B,height:B,maxHeight:B,size:B,top:B,right:B,bottom:B,left:B,padding:B,paddingTop:B,paddingRight:B,paddingBottom:B,paddingLeft:B,margin:B,marginTop:B,marginRight:B,marginBottom:B,marginLeft:B,rotate:j,rotateX:j,rotateY:j,rotateZ:j,scale:I,scaleX:I,scaleY:I,scaleZ:I,skew:j,skewX:j,skewY:j,distance:B,translateX:B,translateY:B,translateZ:B,x:B,y:B,z:B,perspective:B,transformPerspective:B,opacity:F,originX:N,originY:N,originZ:B,zIndex:wn,fillOpacity:F,strokeOpacity:F,numOctaves:wn},Vn=o(o({},An),{color:q,backgroundColor:q,outlineColor:q,fill:q,stroke:q,borderColor:q,borderTopColor:q,borderRightColor:q,borderBottomColor:q,borderLeftColor:q,filter:rt,WebkitFilter:rt}),xn=function(t){return Vn[t]};function On(t,n){var e,r=xn(t);return r!==rt&&(r=Q),null===(e=r.getAnimatableNone)||void 0===e?void 0:e.call(r,n)}var Sn=!1,Mn=function(t){return p(t)?t[t.length-1]||0:t};function Tn(t){var n=t.ease,e=t.times,r=t.yoyo,a=t.flip,u=t.loop,s=i(t,["ease","times","yoyo","flip","loop"]),c=o({},s);return e&&(c.offset=e),s.duration&&(c.duration=fn(s.duration)),s.repeatDelay&&(c.repeatDelay=fn(s.repeatDelay)),n&&(c.ease=function(t){return Array.isArray(t)&&"number"!=typeof t[0]}(n)?n.map(pn):pn(n)),"tween"===s.type&&(c.type="keyframes"),(r||u||a)&&(r?c.repeatType="reverse":u?c.repeatType="loop":a&&(c.repeatType="mirror"),c.repeat=u||r||a||s.repeat),"spring"!==s.type&&(c.type="keyframes"),c}function En(t,n,e){var r,s,c,l;return Array.isArray(n.to)&&(null!==(r=t.duration)&&void 0!==r||(t.duration=.8)),function(t){Array.isArray(t.to)&&null===t.to[0]&&(t.to=u([],a(t.to),!1),t.to[0]=t.from)}(n),function(t){t.when,t.delay,t.delayChildren,t.staggerChildren,t.staggerDirection,t.repeat,t.repeatType,t.repeatDelay,t.from;var n=i(t,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(n).length}(t)||(t=o(o({},t),(s=e,c=n.to,l=p(c)?yn:bn[s]||bn.default,o({to:c},l(c))))),o(o({},n),Tn(t))}function Cn(t,n,e,r,i){var a,u=Fn(r,t),s=null!==(a=u.from)&&void 0!==a?a:n.get(),c=vn(t,e);return"none"===s&&c&&"string"==typeof e?s=On(t,e):Pn(s)&&"string"==typeof e?s=kn(e):!Array.isArray(e)&&Pn(e)&&"string"==typeof s&&(e=kn(s)),vn(t,s)&&c&&!1!==u.type?function(){var r={from:s,to:e,velocity:n.getVelocity(),onComplete:i,onUpdate:function(t){return n.set(t)}};return"inertia"===u.type||"decay"===u.type?function({from:t=0,velocity:n=0,min:e,max:r,power:o=.8,timeConstant:i=750,bounceStiffness:a=500,bounceDamping:u=10,restDelta:s=1,modifyTarget:c,driver:l,onUpdate:f,onComplete:d,onStop:p}){let v;function m(t){return void 0!==e&&t<e||void 0!==r&&t>r}function h(t){return void 0===e?r:void 0===r||Math.abs(e-t)<Math.abs(r-t)?e:r}function g(t){null==v||v.stop(),v=en(Object.assign(Object.assign({},t),{driver:l,onUpdate:n=>{var e;null==f||f(n),null===(e=t.onUpdate)||void 0===e||e.call(t,n)},onComplete:d,onStop:p}))}function y(t){g(Object.assign({type:"spring",stiffness:a,damping:u,restDelta:s},t))}if(m(t))y({from:t,velocity:n,to:h(t)});else{let r=o*n+t;void 0!==c&&(r=c(r));const a=h(r),u=a===e?-1:1;let l,f;const d=t=>{l=f,f=t,n=rn(t-l,Qt().delta),(1===u&&t>a||-1===u&&t<a)&&y({from:t,to:a,velocity:n})};g({type:"decay",from:t,velocity:n,timeConstant:i,power:o,restDelta:s,modifyTarget:c,onUpdate:m(r)?d:void 0})}return{stop:()=>null==v?void 0:v.stop()}}(o(o({},r),u)):en(o(o({},En(u,r,t)),{onUpdate:function(t){var n;r.onUpdate(t),null===(n=u.onUpdate)||void 0===n||n.call(u,t)},onComplete:function(){var t;r.onComplete(),null===(t=u.onComplete)||void 0===t||t.call(u)}}))}:function(){var t,r,o=Mn(e);return n.set(o),i(),null===(t=null==u?void 0:u.onUpdate)||void 0===t||t.call(u,o),null===(r=null==u?void 0:u.onComplete)||void 0===r||r.call(u),{stop:function(){}}}}function Pn(t){return 0===t||"string"==typeof t&&0===parseFloat(t)&&-1===t.indexOf(" ")}function kn(t){return"number"==typeof t?0:On("",t)}function Fn(t,n){return t[n]||t.default||t}function In(t,n,e,r){return void 0===r&&(r={}),Sn&&(r={type:!1}),n.start((function(o){var i,a,u=Cn(t,n,e,r,o),s=function(t,n){var e,r;return null!==(r=null!==(e=(Fn(t,n)||{}).delay)&&void 0!==e?e:t.delay)&&void 0!==r?r:0}(r,t),c=function(){return a=u()};return s?i=setTimeout(c,fn(s)):c(),function(){clearTimeout(i),null==a||a.stop()}}))}var Rn=function(t){return/^0[^.\s]+$/.test(t)};var jn=function(){function t(){this.subscriptions=[]}return t.prototype.add=function(t){var n,e,r=this;return n=this.subscriptions,e=t,-1===n.indexOf(e)&&n.push(e),function(){return function(t,n){var e=t.indexOf(n);e>-1&&t.splice(e,1)}(r.subscriptions,t)}},t.prototype.notify=function(t,n,e){var r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](t,n,e);else for(var o=0;o<r;o++){var i=this.subscriptions[o];i&&i(t,n,e)}},t.prototype.getSize=function(){return this.subscriptions.length},t.prototype.clear=function(){this.subscriptions.length=0},t}(),Dn=function(){function t(t){var n,e=this;this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new jn,this.velocityUpdateSubscribers=new jn,this.renderSubscribers=new jn,this.canTrackVelocity=!1,this.updateAndNotify=function(t,n){void 0===n&&(n=!0),e.prev=e.current,e.current=t;var r=Qt(),o=r.delta,i=r.timestamp;e.lastUpdated!==i&&(e.timeDelta=o,e.lastUpdated=i,qt.postRender(e.scheduleVelocityCheck)),e.prev!==e.current&&e.updateSubscribers.notify(e.current),e.velocityUpdateSubscribers.getSize()&&e.velocityUpdateSubscribers.notify(e.getVelocity()),n&&e.renderSubscribers.notify(e.current)},this.scheduleVelocityCheck=function(){return qt.postRender(e.velocityCheck)},this.velocityCheck=function(t){t.timestamp!==e.lastUpdated&&(e.prev=e.current,e.velocityUpdateSubscribers.notify(e.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,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?rn(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.hasAnimated=!0,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 Bn(t){return new Dn(t)}var Ln,Un=function(t){return function(n){return n.test(t)}},Nn=[k,B,D,j,U,L,{test:function(t){return"auto"===t},parse:function(t){return t}}],zn=function(t){return Nn.find(Un(t))},Xn=u(u([],a(Nn),!1),[q,Q],!1),Yn=function(t){return Xn.find(Un(t))};function Hn(t){return Array.isArray(t)}function Wn(t){return"string"==typeof t||Hn(t)}function Zn(t,n,e){var r=t.getProps();return function(t,n,e,r,o){var i;return void 0===r&&(r={}),void 0===o&&(o={}),"function"==typeof n&&(n=n(null!=e?e:t.custom,r,o)),"string"==typeof n&&(n=null===(i=t.variants)||void 0===i?void 0:i[n]),"function"==typeof n&&(n=n(null!=e?e:t.custom,r,o)),n}(r,n,null!=e?e:r.custom,function(t){var n={};return t.forEachValue((function(t,e){return n[e]=t.get()})),n}(t),function(t){var n={};return t.forEachValue((function(t,e){return n[e]=t.getVelocity()})),n}(t))}function $n(t){var n;return"function"==typeof(null===(n=t.animate)||void 0===n?void 0:n.start)||Wn(t.initial)||Wn(t.animate)||Wn(t.whileHover)||Wn(t.whileDrag)||Wn(t.whileTap)||Wn(t.whileFocus)||Wn(t.exit)}function qn(t,n,e){t.hasValue(n)?t.getValue(n).set(e):t.addValue(n,Bn(e))}function Kn(t,n){if(n)return(n[t]||n.default||n).from}function Gn(t,n,e){var r;void 0===e&&(e={});var i=Zn(t,n,e.custom),u=(i||{}).transition,s=void 0===u?t.getDefaultTransition()||{}:u;e.transitionOverride&&(s=e.transitionOverride);var c=i?function(){return Jn(t,i,e)}:function(){return Promise.resolve()},l=(null===(r=t.variantChildren)||void 0===r?void 0:r.size)?function(r){void 0===r&&(r=0);var i=s.delayChildren,a=void 0===i?0:i,u=s.staggerChildren,c=s.staggerDirection;return function(t,n,e,r,i,a){void 0===e&&(e=0);void 0===r&&(r=0);void 0===i&&(i=1);var u=[],s=(t.variantChildren.size-1)*r,c=1===i?function(t){return void 0===t&&(t=0),t*r}:function(t){return void 0===t&&(t=0),s-t*r};return Array.from(t.variantChildren).sort(_n).forEach((function(t,r){u.push(Gn(t,n,o(o({},a),{delay:e+c(r)})).then((function(){return t.notifyAnimationComplete(n)})))})),Promise.all(u)}(t,n,a+r,u,c,e)}:function(){return Promise.resolve()},f=s.when;if(f){var d=a("beforeChildren"===f?[c,l]:[l,c],2),p=d[0],v=d[1];return p().then(v)}return Promise.all([c(),l(e.delay)])}function Jn(t,n,e){var r,a=void 0===e?{}:e,u=a.delay,s=void 0===u?0:u,c=a.transitionOverride,l=a.type,f=t.makeTargetAnimatable(n),d=f.transition,p=void 0===d?t.getDefaultTransition():d,v=f.transitionEnd,m=i(f,["transition","transitionEnd"]);c&&(p=c);var h=[],g=l&&(null===(r=t.animationState)||void 0===r?void 0:r.getState()[l]);for(var y in m){var b=t.getValue(y),w=m[y];if(!(!b||void 0===w||g&&Qn(g,y))){var A=In(y,b,w,o({delay:s},p));h.push(A)}}return Promise.all(h).then((function(){v&&function(t,n){var e=Zn(t,n),r=e?t.makeTargetAnimatable(e,!1):{},a=r.transitionEnd,u=void 0===a?{}:a;r.transition;var s=i(r,["transitionEnd","transition"]);for(var c in s=o(o({},s),u)){qn(t,c,Mn(s[c]))}}(t,v)}))}function _n(t,n){return t.sortNodePosition(n)}function Qn(t,n){var e=t.protectedKeys,r=t.needsAnimating,o=e.hasOwnProperty(n)&&!0!==r[n];return r[n]=!1,o}!function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.InView="whileInView",t.Exit="exit"}(Ln||(Ln={}));var te=[Ln.Animate,Ln.InView,Ln.Focus,Ln.Hover,Ln.Tap,Ln.Drag,Ln.Exit],ne=u([],a(te),!1).reverse(),ee=te.length;function re(t){return function(n){return Promise.all(n.map((function(n){var e=n.animation,r=n.options;return function(t,n,e){var r;if(void 0===e&&(e={}),t.notifyAnimationStart(n),Array.isArray(n)){var o=n.map((function(n){return Gn(t,n,e)}));r=Promise.all(o)}else if("string"==typeof n)r=Gn(t,n,e);else{var i="function"==typeof n?Zn(t,n,e.custom):n;r=Jn(t,i,e)}return r.then((function(){return t.notifyAnimationComplete(n)}))}(t,e,r)})))}}function oe(t){var n,e=re(t),r=((n={})[Ln.Animate]=ie(!0),n[Ln.InView]=ie(),n[Ln.Hover]=ie(),n[Ln.Tap]=ie(),n[Ln.Drag]=ie(),n[Ln.Focus]=ie(),n[Ln.Exit]=ie(),n),c={},l=!0,f=function(n,e){var r=Zn(t,e);if(r){r.transition;var a=r.transitionEnd,u=i(r,["transition","transitionEnd"]);n=o(o(o({},n),u),a)}return n};function d(n,i){for(var d,m=t.getProps(),h=t.getVariantContext(!0)||{},g=[],y=new Set,b={},w=1/0,A=function(e){var c=ne[e],A=r[c],V=null!==(d=m[c])&&void 0!==d?d:h[c],x=Wn(V),O=c===i?A.isActive:null;!1===O&&(w=e);var S=V===h[c]&&V!==m[c]&&x;if(S&&l&&t.manuallyAnimateOnMount&&(S=!1),A.protectedKeys=o({},b),!A.isActive&&null===O||!V&&!A.prevProp||s(V)||"boolean"==typeof V)return"continue";var M=function(t,n){if("string"==typeof n)return n!==t;if(Hn(n))return!v(n,t);return!1}(A.prevProp,V),T=M||c===i&&A.isActive&&!S&&x||e>w&&x,E=Array.isArray(V)?V:[V],C=E.reduce(f,{});!1===O&&(C={});var P=A.prevResolvedValues,k=void 0===P?{}:P,F=o(o({},k),C),I=function(t){T=!0,y.delete(t),A.needsAnimating[t]=!0};for(var R in F){var j=C[R],D=k[R];b.hasOwnProperty(R)||(j!==D?p(j)&&p(D)?!v(j,D)||M?I(R):A.protectedKeys[R]=!0:void 0!==j?I(R):y.add(R):void 0!==j&&y.has(R)?I(R):A.protectedKeys[R]=!0)}A.prevProp=V,A.prevResolvedValues=C,A.isActive&&(b=o(o({},b),C)),l&&t.blockInitialAnimation&&(T=!1),T&&!S&&g.push.apply(g,u([],a(E.map((function(t){return{animation:t,options:o({type:c},n)}}))),!1))},V=0;V<ee;V++)A(V);if(c=o({},b),y.size){var x={};y.forEach((function(n){var e=t.getBaseTarget(n);void 0!==e&&(x[n]=e)})),g.push({animation:x})}var O=Boolean(g.length);return l&&!1===m.initial&&!t.manuallyAnimateOnMount&&(O=!1),l=!1,O?e(g):Promise.resolve()}return{isAnimated:function(t){return void 0!==c[t]},animateChanges:d,setActive:function(n,e,o){var i;return r[n].isActive===e?Promise.resolve():(null===(i=t.variantChildren)||void 0===i||i.forEach((function(t){var r;return null===(r=t.animationState)||void 0===r?void 0:r.setActive(n,e)})),r[n].isActive=e,d(o,n))},setAnimateFunction:function(n){e=n(t)},getState:function(){return r}}}function ie(t){return void 0===t&&(t=!1),{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}var ae=function(t){return function(n){return t(n),null}},ue={animation:ae((function(t){var n=t.visualElement,e=t.animate;n.animationState||(n.animationState=oe(n)),s(e)&&r((function(){return e.subscribe(n)}),[e])})),exit:ae((function(t){var n=t.custom,o=t.visualElement,i=a(function(){var t=e(c);if(null===t)return[!0,null];var n=t.isPresent,o=t.onExitComplete,i=t.register,a=d();return r((function(){return i(a)}),[]),!n&&o?[!1,function(){return null==o?void 0:o(a)}]:[!0]}(),2),u=i[0],s=i[1],l=e(c);r((function(){var t,e;o.isPresent=u;var r=null===(t=o.animationState)||void 0===t?void 0:t.setActive(Ln.Exit,!u,{custom:null!==(e=null==l?void 0:l.custom)&&void 0!==e?e:n});!u&&(null==r||r.then(s))}),[u])}))};function se(t,n,e,r){return t.addEventListener(n,e,r),function(){return t.removeEventListener(n,e,r)}}function ce(t,n,e,o){r((function(){var r=t.current;if(e&&r)return se(r,n,e,o)}),[t,n,e,o])}function le(t){return!!t.touches}var fe={pageX:0,pageY:0};function de(t,n){void 0===n&&(n="page");var e=t.touches[0]||t.changedTouches[0]||fe;return{x:e[n+"X"],y:e[n+"Y"]}}function pe(t,n){return void 0===n&&(n="page"),{x:t[n+"X"],y:t[n+"Y"]}}var ve=function(t,n){void 0===n&&(n=!1);var e,r=function(n){return t(n,function(t,n){return void 0===n&&(n="page"),{point:le(t)?de(t,n):pe(t,n)}}(n))};return n?(e=r,function(t){var n=t instanceof MouseEvent;(!n||n&&0===t.button)&&e(t)}):r},me="undefined"!=typeof window,he={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},ge={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function ye(t){return me&&null===window.onpointerdown?t:me&&null===window.ontouchstart?ge[t]:me&&null===window.onmousedown?he[t]:t}function be(t,n,e,r){return se(t,ye(n),ve(e,"pointerdown"===n),r)}function we(t,n,e,r){return ce(t,ye(n),e&&ve(e,"pointerdown"===n),r)}function Ae(t){var n=null;return function(){return null===n&&(n=t,function(){n=null})}}var Ve=Ae("dragHorizontal"),xe=Ae("dragVertical");function Oe(){var t=function(t){var n=!1;if("y"===t)n=xe();else if("x"===t)n=Ve();else{var e=Ve(),r=xe();e&&r?n=function(){e(),r()}:(e&&e(),r&&r())}return n}(!0);return!t||(t(),!1)}function Se(t,n,e){return function(r,o){var i;(function(t){return"undefined"!=typeof PointerEvent&&t instanceof PointerEvent?!("mouse"!==t.pointerType):t instanceof MouseEvent})(r)&&!Oe()&&(null===(i=t.animationState)||void 0===i||i.setActive(Ln.Hover,n),null==e||e(r,o))}}var Me=function(t,n){return!!n&&(t===n||Me(t,n.parentElement))};var Te=new WeakMap,Ee=new WeakMap,Ce=function(t){var n;null===(n=Te.get(t.target))||void 0===n||n(t)},Pe=function(t){t.forEach(Ce)};function ke(t,n,e){var r=function(t){var n=t.root,e=i(t,["root"]),r=n||document;Ee.has(r)||Ee.set(r,{});var a=Ee.get(r),u=JSON.stringify(e);return a[u]||(a[u]=new IntersectionObserver(Pe,o({root:n},e))),a[u]}(n);return Te.set(t,e),r.observe(t),function(){Te.delete(t),r.unobserve(t)}}var Fe={some:0,all:1};function Ie(t,n,e,o){var i=o.root,a=o.margin,u=o.amount,s=void 0===u?"some":u,c=o.once;r((function(){if(t){var r={root:null==i?void 0:i.current,rootMargin:a,threshold:"number"==typeof s?s:Fe[s]};return ke(e.getInstance(),r,(function(t){var r,o=t.isIntersecting;if(n.isInView!==o&&(n.isInView=o,!c||o||!n.hasEnteredView)){o&&(n.hasEnteredView=!0),null===(r=e.animationState)||void 0===r||r.setActive(Ln.InView,o);var i=e.getProps(),a=o?i.onViewportEnter:i.onViewportLeave;null==a||a(t)}}))}}),[t,i,a,s])}function Re(t,n,e){r((function(){t&&requestAnimationFrame((function(){var t;n.hasEnteredView=!0;var r=e.getProps().onViewportEnter;null==r||r(null),null===(t=e.animationState)||void 0===t||t.setActive(Ln.InView,!0)}))}),[t])}var je={inView:ae((function(t){var e=t.visualElement,r=t.whileInView,o=t.onViewportEnter,i=t.onViewportLeave,a=t.viewport,u=void 0===a?{}:a,s=n({hasEnteredView:!1,isInView:!1}),c=Boolean(r||o||i);u.once&&s.current.hasEnteredView&&(c=!1),("undefined"==typeof IntersectionObserver?Re:Ie)(c,s.current,e,u)})),tap:ae((function(t){var e,o=t.onTap,i=t.onTapStart,a=t.onTapCancel,u=t.whileTap,s=t.visualElement,c=o||i||a||u,l=n(!1),f=n(null);function d(){var t;null===(t=f.current)||void 0===t||t.call(f),f.current=null}function p(){var t;return d(),l.current=!1,null===(t=s.animationState)||void 0===t||t.setActive(Ln.Tap,!1),!Oe()}function v(t,n){p()&&(Me(s.getInstance(),t.target)?null==o||o(t,n):null==a||a(t,n))}function m(t,n){p()&&(null==a||a(t,n))}we(s,"pointerdown",c?function(t,n){var e;d(),l.current||(l.current=!0,f.current=ft(be(window,"pointerup",v),be(window,"pointercancel",m)),null===(e=s.animationState)||void 0===e||e.setActive(Ln.Tap,!0),null==i||i(t,n))}:void 0),e=d,r((function(){return function(){return e()}}),[])})),focus:ae((function(t){var n=t.whileFocus,e=t.visualElement;ce(e,"focus",n?function(){var t;null===(t=e.animationState)||void 0===t||t.setActive(Ln.Focus,!0)}:void 0),ce(e,"blur",n?function(){var t;null===(t=e.animationState)||void 0===t||t.setActive(Ln.Focus,!1)}:void 0)})),hover:ae((function(t){var n=t.onHoverStart,e=t.onHoverEnd,r=t.whileHover,o=t.visualElement;we(o,"pointerenter",n||r?Se(o,!0,n):void 0),we(o,"pointerleave",e||r?Se(o,!1,e):void 0)}))},De=function(t){return null!==t&&"object"==typeof t&&t.getVelocity},Be=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","SetAxisTarget","Unmount"];var Le=function(t){var n=t.treeType,e=void 0===n?"":n,r=t.build,i=t.getBaseTarget,s=t.makeTargetAnimatable,c=t.measureViewportBox,l=t.render,f=t.readValueFromInstance,d=t.removeValueFromRenderState,p=t.sortNodePosition,v=t.scrapeMotionValuesFromProps;return function(t,n){var m=t.parent,h=t.props,g=t.presenceId,y=t.blockInitialAnimation,b=t.visualState;void 0===n&&(n={});var w,A,V=!1,x=b.latestValues,O=b.renderState,S=function(){var t=Be.map((function(){return new jn})),n={},e={clearAllListeners:function(){return t.forEach((function(t){return t.clear()}))},updatePropListeners:function(t){Be.forEach((function(r){var o,i="on"+r,a=t[i];null===(o=n[r])||void 0===o||o.call(n),a&&(n[r]=e[i](a))}))}};return t.forEach((function(t,n){e["on"+Be[n]]=function(n){return t.add(n)},e["notify"+Be[n]]=function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];t.notify.apply(t,u([],a(n),!1))}})),e}(),M=new Map,T=new Map,E={},C=o({},x);function P(){w&&V&&(k(),l(w,O,h.style,L.projection))}function k(){r(L,O,x,n,h)}function F(){S.notifyUpdate(x)}var I=v(h);for(var R in I){var j=I[R];void 0!==x[R]&&De(j)&&j.set(x[R],!1)}var D=$n(h),B=function(t){return Boolean($n(t)||t.variants)}(h),L=o(o({treeType:e,current:null,depth:m?m.depth+1:0,parent:m,children:new Set,presenceId:g,variantChildren:B?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(null==m?void 0:m.isMounted()),blockInitialAnimation:y,isMounted:function(){return Boolean(w)},mount:function(t){V=!0,w=L.current=t,L.projection&&L.projection.mount(t),B&&m&&!D&&(A=null==m?void 0:m.addVariantChild(L)),null==m||m.children.add(L),L.setProps(h)},unmount:function(){var t;null===(t=L.projection)||void 0===t||t.unmount(),Kt.update(F),Kt.render(P),T.forEach((function(t){return t()})),null==A||A(),null==m||m.children.delete(L),S.clearAllListeners(),w=void 0,V=!1},addVariantChild:function(t){var n,e=L.getClosestVariantNode();if(e)return null===(n=e.variantChildren)||void 0===n||n.add(t),function(){return e.variantChildren.delete(t)}},sortNodePosition:function(t){return p&&e===t.treeType?p(L.getInstance(),t.getInstance()):0},getClosestVariantNode:function(){return B?L:null==m?void 0:m.getClosestVariantNode()},getLayoutId:function(){return h.layoutId},getInstance:function(){return w},getStaticValue:function(t){return x[t]},setStaticValue:function(t,n){return x[t]=n},getLatestValues:function(){return x},setVisibility:function(t){L.isVisible!==t&&(L.isVisible=t,L.scheduleRender())},makeTargetAnimatable:function(t,n){return void 0===n&&(n=!0),s(L,t,h,n)},measureViewportBox:function(){return c(w,h)},addValue:function(t,n){L.hasValue(t)&&L.removeValue(t),M.set(t,n),x[t]=n.get(),function(t,n){var e=n.onChange((function(n){x[t]=n,h.onUpdate&&qt.update(F,!1,!0)})),r=n.onRenderRequest(L.scheduleRender);T.set(t,(function(){e(),r()}))}(t,n)},removeValue:function(t){var n;M.delete(t),null===(n=T.get(t))||void 0===n||n(),T.delete(t),delete x[t],d(t,O)},hasValue:function(t){return M.has(t)},getValue:function(t,n){var e=M.get(t);return void 0===e&&void 0!==n&&(e=Bn(n),L.addValue(t,e)),e},forEachValue:function(t){return M.forEach(t)},readValue:function(t){var e;return null!==(e=x[t])&&void 0!==e?e:f(w,t,n)},setBaseTarget:function(t,n){C[t]=n},getBaseTarget:function(t){if(i){var n=i(h,t);if(void 0!==n&&!De(n))return n}return C[t]}},S),{build:function(){return k(),O},scheduleRender:function(){qt.render(P,!1,!0)},syncRender:P,setProps:function(t){h=t,S.updatePropListeners(t),E=function(t,n,e){var r;for(var o in n){var i=n[o],a=e[o];if(De(i))t.addValue(o,i);else if(De(a))t.addValue(o,Bn(i));else if(a!==i)if(t.hasValue(o)){var u=t.getValue(o);!u.hasAnimated&&u.set(i)}else t.addValue(o,Bn(null!==(r=t.getStaticValue(o))&&void 0!==r?r:i))}for(var o in e)void 0===n[o]&&t.removeValue(o);return n}(L,v(h),E)},getProps:function(){return h},getVariant:function(t){var n;return null===(n=h.variants)||void 0===n?void 0:n[t]},getDefaultTransition:function(){return h.transition},getTransformPagePoint:function(){return h.transformPagePoint},getVariantContext:function(t){if(void 0===t&&(t=!1),t)return null==m?void 0:m.getVariantContext();if(!D){var n=(null==m?void 0:m.getVariantContext())||{};return void 0!==h.initial&&(n.initial=h.initial),n}for(var e={},r=0;r<Ne;r++){var o=Ue[r],i=h[o];(Wn(i)||!1===i)&&(e[o]=i)}return e}});return L}},Ue=u(["initial"],a(te),!1),Ne=Ue.length,ze=["","X","Y","Z"],Xe=["transformPerspective","x","y","z"];function Ye(t,n){return Xe.indexOf(t)-Xe.indexOf(n)}["translate","scale","rotate","skew"].forEach((function(t){return ze.forEach((function(n){return Xe.push(t+n)}))}));var He=new Set(Xe);function We(t){return He.has(t)}var Ze=new Set(["originX","originY","originZ"]);function $e(t){return Ze.has(t)}var qe={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function Ke(t){return t.startsWith("--")}var Ge=function(t,n){return n&&"number"==typeof t?n.transform(t):t};function Je(t,n,e,r){var o,i=t.style,a=t.vars,u=t.transform,s=t.transformKeys,c=t.transformOrigin;s.length=0;var l=!1,f=!1,d=!0;for(var p in n){var v=n[p];if(Ke(p))a[p]=v;else{var m=An[p],h=Ge(v,m);if(We(p)){if(l=!0,u[p]=h,s.push(p),!d)continue;v!==(null!==(o=m.default)&&void 0!==o?o:0)&&(d=!1)}else $e(p)?(c[p]=h,f=!0):i[p]=h}}l?i.transform=function(t,n,e,r){var o=t.transform,i=t.transformKeys,a=n.enableHardwareAcceleration,u=void 0===a||a,s=n.allowTransformNone,c=void 0===s||s,l="";i.sort(Ye);for(var f=!1,d=i.length,p=0;p<d;p++){var v=i[p];l+="".concat(qe[v]||v,"(").concat(o[v],") "),"z"===v&&(f=!0)}return!f&&u?l+="translateZ(0)":l=l.trim(),r?l=r(o,e?"":l):c&&e&&(l="none"),l}(t,e,d,r):r&&(i.transform=r({},"")),f&&(i.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,a=void 0===i?0:i;return"".concat(e," ").concat(o," ").concat(a)}(c))}function _e(t){return"string"==typeof t&&t.startsWith("var(--")}var Qe=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function tr(t,n,e){var r=a(function(t){var n=Qe.exec(t);if(!n)return[,];var e=a(n,3);return[e[1],e[2]]}(t),2),o=r[0],i=r[1];if(o){var u=window.getComputedStyle(n).getPropertyValue(o);return u?u.trim():_e(i)?tr(i,n):i}}var nr,er=new Set(["width","height","top","left","right","bottom","x","y"]),rr=function(t){return er.has(t)},or=function(t,n){t.set(n,!1),t.set(n)},ir=function(t){return t===k||t===B};!function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"}(nr||(nr={}));var ar=function(t,n){return parseFloat(t.split(", ")[n])},ur=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 ar(i[1],n);var a=o.match(/^matrix\((.+)\)$/);return a?ar(a[1],t):0}},sr=new Set(["x","y","z"]),cr=Xe.filter((function(t){return!sr.has(t)}));var lr={width:function(t,n){var e=t.x,r=n.paddingLeft,o=void 0===r?"0":r,i=n.paddingRight,a=void 0===i?"0":i;return e.max-e.min-parseFloat(o)-parseFloat(a)},height:function(t,n){var e=t.y,r=n.paddingTop,o=void 0===r?"0":r,i=n.paddingBottom,a=void 0===i?"0":i;return e.max-e.min-parseFloat(o)-parseFloat(a)},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:ur(4,13),y:ur(5,14)},fr=function(t,n,e,r){void 0===e&&(e={}),void 0===r&&(r={}),n=o({},n),r=o({},r);var i=Object.keys(n).filter(rr),u=[],s=!1,c=[];if(i.forEach((function(o){var i=t.getValue(o);if(t.hasValue(o)){var a,l=e[o],f=zn(l),d=n[o];if(p(d)){var v=d.length,m=null===d[0]?1:0;l=d[m],f=zn(l);for(var h=m;h<v;h++)a?zn(d[h]):a=zn(d[h])}else a=zn(d);if(f!==a)if(ir(f)&&ir(a)){var g=i.get();"string"==typeof g&&i.set(parseFloat(g)),"string"==typeof d?n[o]=parseFloat(d):Array.isArray(d)&&a===B&&(n[o]=d.map(parseFloat))}else(null==f?void 0:f.transform)&&(null==a?void 0:a.transform)&&(0===l||0===d)?0===l?i.set(a.transform(l)):n[o]=f.transform(d):(s||(u=function(t){var n=[];return cr.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.syncRender(),n}(t),s=!0),c.push(o),r[o]=void 0!==r[o]?r[o]:n[o],or(i,d))}})),c.length){var l=function(t,n,e){var r=n.measureViewportBox(),o=n.getInstance(),i=getComputedStyle(o),a=i.display,u={};"none"===a&&n.setStaticValue("display",t.display||"block"),e.forEach((function(t){u[t]=lr[t](r,i)})),n.syncRender();var s=n.measureViewportBox();return e.forEach((function(e){var r=n.getValue(e);or(r,u[e]),t[e]=lr[e](s,i)})),t}(n,t,c);return u.length&&u.forEach((function(n){var e=a(n,2),r=e[0],o=e[1];t.getValue(r).set(o)})),t.syncRender(),{target:l,transitionEnd:r}}return{target:n,transitionEnd:r}};function dr(t,n,e,r){return function(t){return Object.keys(t).some(rr)}(n)?fr(t,n,e,r):{target:n,transitionEnd:r}}var pr=function(t,n,e,r){var a=function(t,n,e){var r,a=i(n,[]),u=t.getInstance();if(!(u instanceof Element))return{target:a,transitionEnd:e};for(var s in e&&(e=o({},e)),t.forEachValue((function(t){var n=t.get();if(_e(n)){var e=tr(n,u);e&&t.set(e)}})),a){var c=a[s];if(_e(c)){var l=tr(c,u);l&&(a[s]=l,e&&(null!==(r=e[s])&&void 0!==r||(e[s]=c)))}}return{target:a,transitionEnd:e}}(t,n,r);return dr(t,n=a.target,e,r=a.transitionEnd)},vr={};function mr(t,n){var e=n.layout,r=n.layoutId;return We(t)||$e(t)||(e||void 0!==r)&&(!!vr[t]||"opacity"===t)}function hr(t){var n=t.style,e={};for(var r in n)(De(n[r])||mr(r,t))&&(e[r]=n[r]);return e}function gr(t,n,e,r){var o=n.style,i=n.vars;for(var a in Object.assign(t.style,o,r&&r.getProjectionStyles(e)),i)t.style.setProperty(a,i[a])}var yr={treeType:"dom",readValueFromInstance:function(t,n){if(We(n)){var e=xn(n);return e&&e.default||0}var r,o=(r=t,window.getComputedStyle(r));return(Ke(n)?o.getPropertyValue(n):o[n])||0},sortNodePosition:function(t,n){return 2&t.compareDocumentPosition(n)?1:-1},getBaseTarget:function(t,n){var e;return null===(e=t.style)||void 0===e?void 0:e[n]},measureViewportBox:function(t,n){return function(t,n){return e=function(t,n){if(!n)return t;var e=n({x:t.left,y:t.top}),r=n({x:t.right,y:t.bottom});return{top:e.y,left:e.x,bottom:r.y,right:r.x}}(t.getBoundingClientRect(),n),r=e.top,{x:{min:e.left,max:e.right},y:{min:r,max:e.bottom}};var e,r}(t,n.transformPagePoint)},resetTransform:function(t,n,e){var r=e.transformTemplate;n.style.transform=r?r({},""):"none",t.scheduleRender()},restoreTransform:function(t,n){t.style.transform=n.style.transform},removeValueFromRenderState:function(t,n){var e=n.vars,r=n.style;delete e[t],delete r[t]},makeTargetAnimatable:function(t,n,e,r){var a=e.transformValues;void 0===r&&(r=!0);var u=n.transition,s=n.transitionEnd,c=i(n,["transition","transitionEnd"]),l=function(t,n,e){var r,o,i={};for(var a in t)i[a]=null!==(r=Kn(a,n))&&void 0!==r?r:null===(o=e.getValue(a))||void 0===o?void 0:o.get();return i}(c,u||{},t);if(a&&(s&&(s=a(s)),c&&(c=a(c)),l&&(l=a(l))),r){!function(t,n,e){var r,o,i,a,u=Object.keys(n).filter((function(n){return!t.hasValue(n)})),s=u.length;if(s)for(var c=0;c<s;c++){var l=u[c],f=n[l],d=null;Array.isArray(f)&&(d=f[0]),null===d&&(d=null!==(o=null!==(r=e[l])&&void 0!==r?r:t.readValue(l))&&void 0!==o?o:n[l]),null!=d&&("string"==typeof d&&(/^\-?\d*\.?\d+$/.test(d)||Rn(d))?d=parseFloat(d):!Yn(d)&&Q.test(f)&&(d=On(l,f)),t.addValue(l,Bn(d)),null!==(i=(a=e)[l])&&void 0!==i||(a[l]=d),t.setBaseTarget(l,d))}}(t,c,l);var f=pr(t,c,l,s);s=f.transitionEnd,c=f.target}return o({transition:u,transitionEnd:s},c)},scrapeMotionValuesFromProps:hr,build:function(t,n,e,r,o){void 0!==t.isVisible&&(n.style.visibility=t.isVisible?"visible":"hidden"),Je(n,e,r,o.transformTemplate)},render:gr},br=Le(yr);function wr(t,n,e){return"string"==typeof t?t:B.transform(n+e*t)}var Ar={offset:"stroke-dashoffset",array:"stroke-dasharray"},Vr={offset:"strokeDashoffset",array:"strokeDasharray"};function xr(t,n,e,r){var o=n.attrX,a=n.attrY,u=n.originX,s=n.originY,c=n.pathLength,l=n.pathSpacing,f=void 0===l?1:l,d=n.pathOffset,p=void 0===d?0:d;Je(t,i(n,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]),e,r),t.attrs=t.style,t.style={};var v=t.attrs,m=t.style,h=t.dimensions;v.transform&&(h&&(m.transform=v.transform),delete v.transform),h&&(void 0!==u||void 0!==s||m.transform)&&(m.transformOrigin=function(t,n,e){var r=wr(n,t.x,t.width),o=wr(e,t.y,t.height);return"".concat(r," ").concat(o)}(h,void 0!==u?u:.5,void 0!==s?s:.5)),void 0!==o&&(v.x=o),void 0!==a&&(v.y=a),void 0!==c&&function(t,n,e,r,o){void 0===e&&(e=1),void 0===r&&(r=0),void 0===o&&(o=!0),t.pathLength=1;var i=o?Ar:Vr;t[i.offset]=B.transform(-r);var a=B.transform(n),u=B.transform(e);t[i.array]="".concat(a," ").concat(u)}(v,c,f,p,!1)}var Or=/([a-z])([A-Z])/g,Sr=function(t){return t.replace(Or,"$1-$2").toLowerCase()},Mr=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);var Tr=Le(o(o({},yr),{getBaseTarget:function(t,n){return t[n]},readValueFromInstance:function(t,n){var e;return We(n)?(null===(e=xn(n))||void 0===e?void 0:e.default)||0:(n=Mr.has(n)?n:Sr(n),t.getAttribute(n))},scrapeMotionValuesFromProps:function(t){var n=hr(t);for(var e in t){if(De(t[e]))n["x"===e||"y"===e?"attr"+e.toUpperCase():e]=t[e]}return n},build:function(t,n,e,r,o){xr(n,e,r,o.transformTemplate)},render:function(t,n){for(var e in gr(t,n),n.attrs)t.setAttribute(Mr.has(e)?e:Sr(e),n.attrs[e])}})),Er=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];var Cr=o(o({renderer:function(t,n){return function(t){return"string"==typeof t&&!t.includes("-")&&!!(Er.indexOf(t)>-1||/[A-Z]/.test(t))}(t)?Tr(n,{enableHardwareAcceleration:!1}):br(n,{enableHardwareAcceleration:!0})}},ue),je);export{Cr as domAnimation};