framer-motion 5.0.2 → 5.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/motion/utils/valid-prop.mjs +1 -0
- package/dist/es/projection/node/create-projection-node.mjs +1 -1
- package/dist/es/render/dom/utils/unit-conversion.mjs +8 -1
- package/dist/es/render/svg/config-motion.mjs +0 -6
- package/dist/es/render/svg/utils/build-attrs.mjs +4 -4
- package/dist/es/render/svg/utils/camel-case-attrs.mjs +1 -0
- package/dist/es/render/svg/utils/path.mjs +6 -8
- package/dist/es/render/utils/animation-state.mjs +1 -1
- package/dist/framer-motion.cjs.js +22 -21
- package/dist/framer-motion.dev.js +75 -33
- package/dist/framer-motion.js +1 -1
- package/dist/projection.dev.js +62 -14
- package/dist/size-rollup-dom-animation.js +1 -1
- package/dist/size-rollup-dom-max.js +1 -1
- package/dist/size-rollup-m.js +1 -1
- package/package.json +7 -6
- package/types/render/svg/types.d.ts +0 -4
- package/types/render/svg/utils/path.d.ts +1 -1
- package/dist/size-webpack-dom-animation.js +0 -1
- package/dist/size-webpack-dom-max.js +0 -2
- package/dist/size-webpack-dom-max.js.LICENSE.txt +0 -14
- package/dist/size-webpack-m.js +0 -2
- package/dist/size-webpack-m.js.LICENSE.txt +0 -14
package/dist/projection.dev.js
CHANGED
|
@@ -604,6 +604,46 @@
|
|
|
604
604
|
return functions ? functions.map(applyDefaultFilter).join(' ') : v;
|
|
605
605
|
} });
|
|
606
606
|
|
|
607
|
+
function hueToRgb(p, q, t) {
|
|
608
|
+
if (t < 0)
|
|
609
|
+
t += 1;
|
|
610
|
+
if (t > 1)
|
|
611
|
+
t -= 1;
|
|
612
|
+
if (t < 1 / 6)
|
|
613
|
+
return p + (q - p) * 6 * t;
|
|
614
|
+
if (t < 1 / 2)
|
|
615
|
+
return q;
|
|
616
|
+
if (t < 2 / 3)
|
|
617
|
+
return p + (q - p) * (2 / 3 - t) * 6;
|
|
618
|
+
return p;
|
|
619
|
+
}
|
|
620
|
+
function hslaToRgba({ hue, saturation, lightness, alpha }) {
|
|
621
|
+
hue /= 360;
|
|
622
|
+
saturation /= 100;
|
|
623
|
+
lightness /= 100;
|
|
624
|
+
let red = 0;
|
|
625
|
+
let green = 0;
|
|
626
|
+
let blue = 0;
|
|
627
|
+
if (!saturation) {
|
|
628
|
+
red = green = blue = lightness;
|
|
629
|
+
}
|
|
630
|
+
else {
|
|
631
|
+
const q = lightness < 0.5
|
|
632
|
+
? lightness * (1 + saturation)
|
|
633
|
+
: lightness + saturation - lightness * saturation;
|
|
634
|
+
const p = 2 * lightness - q;
|
|
635
|
+
red = hueToRgb(p, q, hue + 1 / 3);
|
|
636
|
+
green = hueToRgb(p, q, hue);
|
|
637
|
+
blue = hueToRgb(p, q, hue - 1 / 3);
|
|
638
|
+
}
|
|
639
|
+
return {
|
|
640
|
+
red: Math.round(red * 255),
|
|
641
|
+
green: Math.round(green * 255),
|
|
642
|
+
blue: Math.round(blue * 255),
|
|
643
|
+
alpha,
|
|
644
|
+
};
|
|
645
|
+
}
|
|
646
|
+
|
|
607
647
|
const mixLinearColor = (from, to, v) => {
|
|
608
648
|
const fromExpo = from * from;
|
|
609
649
|
const toExpo = to * to;
|
|
@@ -613,24 +653,25 @@
|
|
|
613
653
|
const getColorType = (v) => colorTypes.find((type) => type.test(v));
|
|
614
654
|
const notAnimatable = (color) => `'${color}' is not an animatable color. Use the equivalent color code instead.`;
|
|
615
655
|
const mixColor = (from, to) => {
|
|
616
|
-
|
|
617
|
-
|
|
656
|
+
let fromColorType = getColorType(from);
|
|
657
|
+
let toColorType = getColorType(to);
|
|
618
658
|
invariant(!!fromColorType, notAnimatable(from));
|
|
619
659
|
invariant(!!toColorType, notAnimatable(to));
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
660
|
+
let fromColor = fromColorType.parse(from);
|
|
661
|
+
let toColor = toColorType.parse(to);
|
|
662
|
+
if (fromColorType === hsla) {
|
|
663
|
+
fromColor = hslaToRgba(fromColor);
|
|
664
|
+
fromColorType = rgba;
|
|
665
|
+
}
|
|
666
|
+
if (toColorType === hsla) {
|
|
667
|
+
toColor = hslaToRgba(toColor);
|
|
668
|
+
toColorType = rgba;
|
|
625
669
|
}
|
|
626
|
-
const fromColor = fromColorType.parse(from);
|
|
627
|
-
const toColor = toColorType.parse(to);
|
|
628
670
|
const blended = Object.assign({}, fromColor);
|
|
629
|
-
const mixFunc = fromColorType === hsla ? mix : mixLinearColor;
|
|
630
671
|
return (v) => {
|
|
631
672
|
for (const key in blended) {
|
|
632
673
|
if (key !== "alpha") {
|
|
633
|
-
blended[key] =
|
|
674
|
+
blended[key] = mixLinearColor(fromColor[key], toColor[key], v);
|
|
634
675
|
}
|
|
635
676
|
}
|
|
636
677
|
blended.alpha = mix(fromColor.alpha, toColor.alpha, v);
|
|
@@ -2833,7 +2874,7 @@
|
|
|
2833
2874
|
node.updateScroll();
|
|
2834
2875
|
}
|
|
2835
2876
|
var _d = this.options, layoutId = _d.layoutId, layout = _d.layout;
|
|
2836
|
-
if (
|
|
2877
|
+
if (layoutId === undefined && !layout)
|
|
2837
2878
|
return;
|
|
2838
2879
|
var transformTemplate = (_c = this.options.visualElement) === null || _c === void 0 ? void 0 : _c.getProps().transformTemplate;
|
|
2839
2880
|
this.prevTransformTemplateValue = transformTemplate === null || transformTemplate === void 0 ? void 0 : transformTemplate(this.latestValues, "");
|
|
@@ -4140,10 +4181,10 @@
|
|
|
4140
4181
|
|
|
4141
4182
|
var variantPriorityOrder = [
|
|
4142
4183
|
AnimationType.Animate,
|
|
4184
|
+
AnimationType.Focus,
|
|
4143
4185
|
AnimationType.Hover,
|
|
4144
4186
|
AnimationType.Tap,
|
|
4145
4187
|
AnimationType.Drag,
|
|
4146
|
-
AnimationType.Focus,
|
|
4147
4188
|
AnimationType.Exit,
|
|
4148
4189
|
];
|
|
4149
4190
|
__spreadArray([], __read(variantPriorityOrder), false).reverse();
|
|
@@ -4812,11 +4853,18 @@
|
|
|
4812
4853
|
var element = visualElement.getInstance();
|
|
4813
4854
|
var elementComputedStyle = getComputedStyle(element);
|
|
4814
4855
|
var display = elementComputedStyle.display;
|
|
4856
|
+
var origin = {};
|
|
4815
4857
|
// If the element is currently set to display: "none", make it visible before
|
|
4816
4858
|
// measuring the target bounding box
|
|
4817
4859
|
if (display === "none") {
|
|
4818
4860
|
visualElement.setStaticValue("display", target.display || "block");
|
|
4819
4861
|
}
|
|
4862
|
+
/**
|
|
4863
|
+
* Record origins before we render and update styles
|
|
4864
|
+
*/
|
|
4865
|
+
changedKeys.forEach(function (key) {
|
|
4866
|
+
origin[key] = positionalValues[key](originBbox, elementComputedStyle);
|
|
4867
|
+
});
|
|
4820
4868
|
// Apply the latest values (as set in checkAndConvertChangedValueTypes)
|
|
4821
4869
|
visualElement.syncRender();
|
|
4822
4870
|
var targetBbox = visualElement.measureViewportBox();
|
|
@@ -4824,7 +4872,7 @@
|
|
|
4824
4872
|
// Restore styles to their **calculated computed style**, not their actual
|
|
4825
4873
|
// originally set style. This allows us to animate between equivalent pixel units.
|
|
4826
4874
|
var value = visualElement.getValue(key);
|
|
4827
|
-
setAndResetVelocity(value,
|
|
4875
|
+
setAndResetVelocity(value, origin[key]);
|
|
4828
4876
|
target[key] = positionalValues[key](targetBbox, elementComputedStyle);
|
|
4829
4877
|
});
|
|
4830
4878
|
return target;
|
|
@@ -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 s(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 u(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}var m=function(){},h=function(){};"production"!==process.env.NODE_ENV&&(m=function(t,e){t||"undefined"==typeof console||console.warn(e)},h=function(t,e){if(!t)throw new Error(e)});const y=(t,e,n)=>Math.min(Math.max(n,t),e);function g({duration:t=800,bounce:e=.25,velocity:n=0,mass:r=1}){let o,i;m(t<=1e4,"Spring duration must be 10 seconds or less");let a=1-e;a=y(.05,1,a),t=y(.01,10,t/1e3),a<1?(o=e=>{const r=e*a,o=r*t;return.001-(r-n)/b(e,a)*Math.exp(-o)},i=e=>{const r=e*a*t,i=r*n+n,s=Math.pow(a,2)*Math.pow(e,2)*t,u=Math.exp(-r),l=b(Math.pow(e,2),a);return(.001-o(e)>0?-1:1)*((i-s)*u)/l}):(o=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,i=e=>Math.exp(-e*t)*(t*t*(n-e)));const s=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(s))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(s,2)*r;return{stiffness:e,damping:2*a*Math.sqrt(r*e),duration:t}}}function b(t,e){return t*Math.sqrt(1-e*e)}const A=["duration","bounce"],w=["stiffness","damping","mass"];function x(t,e){return e.some(e=>void 0!==t[e])}function V(t){var{from:e=0,to:n=1,restSpeed:r=2,restDelta:o}=t,a=i(t,["from","to","restSpeed","restDelta"]);const s={done:!1,value:e};let{stiffness:u,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(!x(t,w)&&x(t,A)){const n=g(t);e=Object.assign(Object.assign(Object.assign({},e),n),{velocity:0,mass:1}),e.isResolvedFromDuration=!0}return e}(a),v=S,m=S;function h(){const t=f?-f/1e3:0,r=n-e,i=l/(2*Math.sqrt(u*c)),a=Math.sqrt(u/c)/1e3;if(null!=o||(o=Math.abs(n-e)<=1?.01:.4),i<1){const e=b(a,i);v=o=>{const s=Math.exp(-i*a*o);return n-s*((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 s=Math.exp(-i*a*o),u=Math.min(e*o,300);return n-s*((t+i*a*r)*Math.sinh(u)+e*r*Math.cosh(u))/e}}}return h(),{next:t=>{const e=v(t);if(p)s.done=t>=d;else{const i=1e3*m(t),a=Math.abs(i)<=r,u=Math.abs(n-e)<=o;s.done=a&&u}return s.value=s.done?n:e,s},flipTarget:()=>{f=-f,[e,n]=[n,e],h()}}}V.needsInterpolation=(t,e)=>"string"==typeof t||"string"==typeof e;const S=t=>0,O=(t,e,n)=>{const r=e-t;return 0===r?1:(n-t)/r},T=(t,e,n)=>-n*t+n*e+t,C=(t,e)=>n=>Math.max(Math.min(n,e),t),M=t=>t%1?Number(t.toFixed(5)):t,E=/(-)?([\d]*\.?[\d])+/g,P=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,k=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function F(t){return"string"==typeof t}const R={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},j=Object.assign(Object.assign({},R),{transform:C(0,1)}),D=Object.assign(Object.assign({},R),{default:1}),I=t=>({test:e=>F(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),B=I("deg"),L=I("%"),U=I("px"),N=I("vh"),z=I("vw"),H=Object.assign(Object.assign({},L),{parse:t=>L.parse(t)/100,transform:t=>L.transform(100*t)}),Y=(t,e)=>n=>Boolean(F(n)&&k.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),X=(t,e,n)=>r=>{if(!F(r))return r;const[o,i,a,s]=r.match(E);return{[t]:parseFloat(o),[e]:parseFloat(i),[n]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},$={test:Y("hsl","hue"),parse:X("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+L.transform(M(e))+", "+L.transform(M(n))+", "+M(j.transform(r))+")"},W=C(0,255),Z=Object.assign(Object.assign({},R),{transform:t=>Math.round(W(t))}),q={test:Y("rgb","red"),parse:X("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+Z.transform(t)+", "+Z.transform(e)+", "+Z.transform(n)+", "+M(j.transform(r))+")"};const K={test:Y("#"),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:q.transform},G={test:t=>q.test(t)||K.test(t)||$.test(t),parse:t=>q.test(t)?q.parse(t):$.test(t)?$.parse(t):K.parse(t),transform:t=>F(t)?t:t.hasOwnProperty("red")?q.transform(t):$.transform(t)};function _(t){"number"==typeof t&&(t=""+t);const e=[];let n=0;const r=t.match(P);r&&(n=r.length,t=t.replace(P,"${c}"),e.push(...r.map(G.parse)));const o=t.match(E);return o&&(t=t.replace(E,"${n}"),e.push(...o.map(R.parse))),{values:e,numColors:n,tokenised:t}}function J(t){return _(t).values}function Q(t){const{values:e,numColors:n,tokenised:r}=_(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?G.transform(t[r]):M(t[r]));return e}}const tt=t=>"number"==typeof t?0:t;const et={test:function(t){var e,n,r,o;return isNaN(t)&&F(t)&&(null!==(n=null===(e=t.match(E))||void 0===e?void 0:e.length)&&void 0!==n?n:0)+(null!==(o=null===(r=t.match(P))||void 0===r?void 0:r.length)&&void 0!==o?o:0)>0},parse:J,createTransformer:Q,getAnimatableNone:function(t){const e=J(t);return Q(t)(e.map(tt))}},nt=new Set(["brightness","contrast","saturate","opacity"]);function rt(t){let[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[r]=n.match(E)||[];if(!r)return t;const o=n.replace(r,"");let i=nt.has(e)?1:0;return r!==n&&(i*=100),e+"("+i+o+")"}const ot=/([a-z-]*)\(.*?\)/g,it=Object.assign(Object.assign({},et),{getAnimatableNone:t=>{const e=t.match(ot);return e?e.map(rt).join(" "):t}}),at=(t,e,n)=>{const r=t*t,o=e*e;return Math.sqrt(Math.max(0,n*(o-r)+r))},st=[K,q,$],ut=t=>st.find(e=>e.test(t)),lt=t=>`'${t}' is not an animatable color. Use the equivalent color code instead.`,ct=(t,e)=>{const n=ut(t),r=ut(e);if(h(!!n,lt(t)),h(!!r,lt(e)),h(n.transform===r.transform,"Both colors must be hex/RGBA, OR both must be HSLA."),!n||!r||n.transform!==r.transform)return n=>""+(n>0?e:t);const o=n.parse(t),i=r.parse(e),a=Object.assign({},o),s=n===$?T:at;return t=>{for(const e in a)"alpha"!==e&&(a[e]=s(o[e],i[e],t));return a.alpha=T(o.alpha,i.alpha,t),n.transform(a)}},ft=(t,e)=>n=>e(t(n)),dt=(...t)=>t.reduce(ft);function pt(t,e){return"number"==typeof t?n=>T(t,e,n):G.test(t)?ct(t,e):yt(t,e)}const vt=(t,e)=>{const n=[...t],r=n.length,o=t.map((t,n)=>pt(t,e[n]));return t=>{for(let e=0;e<r;e++)n[e]=o[e](t);return n}},mt=(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]=pt(t[o],e[o]));return t=>{for(const e in r)n[e]=r[e](t);return n}};function ht(t){const e=et.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 yt=(t,e)=>{const n=et.createTransformer(e),r=ht(t),o=ht(e);return r.numHSL===o.numHSL&&r.numRGB===o.numRGB&&r.numNumbers>=o.numNumbers?dt(vt(r.parsed,o.parsed),n):(m(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),n=>""+(n>0?e:t))},gt=(t,e)=>n=>T(t,e,n);function bt(t,e,n){const r=[],o=n||("number"==typeof(i=t[0])?gt:"string"==typeof i?G.test(i)?ct:yt:Array.isArray(i)?vt:"object"==typeof i?mt: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=dt(t,i)}r.push(i)}return r}function At(t,e,{clamp:n=!0,ease:r,mixer:o}={}){const i=t.length;h(i===e.length,"Both input and output ranges must be the same length"),h(!r||!Array.isArray(r)||r.length===i-1,"Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values."),t[0]>t[i-1]&&(t=[].concat(t),e=[].concat(e),t.reverse(),e.reverse());const a=bt(e,r,o),s=2===i?function([t,e],[n]){return r=>n(O(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 s=O(t[i],t[i+1],o);return e[i](s)}}(t,a);return n?e=>s(y(t[0],t[i-1],e)):s}const wt=t=>e=>1-t(1-e),xt=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Vt=t=>e=>e*e*((t+1)*e-t),St=t=>t,Ot=(Tt=2,t=>Math.pow(t,Tt));var Tt;const Ct=wt(Ot),Mt=xt(Ot),Et=t=>1-Math.sin(Math.acos(t)),Pt=wt(Et),kt=xt(Pt),Ft=Vt(1.525),Rt=wt(Ft),jt=xt(Ft),Dt=(t=>{const e=Vt(t);return t=>(t*=2)<1?.5*e(t):.5*(2-Math.pow(2,-10*(t-1)))})(1.525),It=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},Bt=wt(It);function Lt(t,e){return t.map(()=>e||Mt).splice(0,t.length-1)}function Ut({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],s=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 u(){return At(s,a,{ease:Array.isArray(n)?n:Lt(a,n)})}let l=u();return{next:t=>(i.value=l(t),i.done=t>=o,i),flipTarget:()=>{a.reverse(),l=u()}}}const Nt={keyframes:Ut,spring:V,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 s=n*t;const u=e+s,l=void 0===i?u:i(u);return l!==u&&(s=l-e),{next:t=>{const e=-s*Math.exp(-t/r);return a.done=!(e>o||e<-o),a.value=a.done?l:l+e,a},flipTarget:()=>{}}}};const zt="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),Ht="undefined"!=typeof window?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(zt()),1/60*1e3);let Yt=!0,Xt=!1,$t=!1;const Wt={delta:0,timestamp:0},Zt=["read","update","preRender","render","postRender"],qt=Zt.reduce((t,e)=>(t[e]=function(t){let e=[],n=[],r=0,o=!1,i=!1;const a=new WeakSet,s={schedule:(t,i=!1,s=!1)=>{const u=s&&o,l=u?e:n;return i&&a.add(t),-1===l.indexOf(t)&&(l.push(t),u&&o&&(r=e.length)),t},cancel:t=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1),a.delete(t)},process:u=>{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(u),a.has(r)&&(s.schedule(r),t())}o=!1,i&&(i=!1,s.process(u))}}};return s}(()=>Xt=!0),t),{}),Kt=Zt.reduce((t,e)=>{const n=qt[e];return t[e]=(t,e=!1,r=!1)=>(Xt||Qt(),n.schedule(t,e,r)),t},{}),Gt=Zt.reduce((t,e)=>(t[e]=qt[e].cancel,t),{});Zt.reduce((t,e)=>(t[e]=()=>qt[e].process(Wt),t),{});const _t=t=>qt[t].process(Wt),Jt=t=>{Xt=!1,Wt.delta=Yt?1/60*1e3:Math.max(Math.min(t-Wt.timestamp,40),1),Wt.timestamp=t,$t=!0,Zt.forEach(_t),$t=!1,Xt&&(Yt=!1,Ht(Jt))},Qt=()=>{Xt=!0,Yt=!0,$t||Ht(Jt)},te=()=>Wt;function ee(t,e,n=0){return t-e-n}const ne=t=>{const e=({delta:e})=>t(e);return{start:()=>Kt.update(e,!0),stop:()=>Gt.update(e)}};function re(t){var e,n,{from:r,autoplay:o=!0,driver:a=ne,elapsed:s=0,repeat:u=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 y,g,b,{to:A}=h,w=0,x=h.duration,S=!1,O=!0;const T=function(t){if(Array.isArray(t.to))return Ut;if(Nt[t.type])return Nt[t.type];const e=new Set(Object.keys(t));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?Ut:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?V:Ut}(h);(null===(n=(e=T).needsInterpolation)||void 0===n?void 0:n.call(e,r,A))&&(b=At([0,100],[r,A],{clamp:!1}),r=0,A=100);const C=T(Object.assign(Object.assign({},h),{from:r,to:A}));function M(){w++,"reverse"===l?(O=w%2==0,s=function(t,e,n=0,r=!0){return r?ee(e+-t,e,n):e-(t-e)+n}(s,x,c,O)):(s=ee(s,x,c),"mirror"===l&&C.flipTarget()),S=!1,v&&v()}function E(t){if(O||(t=-t),s+=t,!S){const t=C.next(Math.max(0,s));g=t.value,b&&(g=b(g)),S=O?t.done:s<=0}null==m||m(g),S&&(0===w&&(null!=x||(x=s)),w<u?function(t,e,n,r){return r?t>=e+n:t<=-n}(s,x,c,O)&&M():(y.stop(),p&&p()))}return o&&(null==f||f(),y=a(E),y.start()),{stop:()=>{null==d||d(),y.stop()}}}function oe(t,e){return e?t*(1e3/e):0}const ie=(t,e)=>1-3*e+3*t,ae=(t,e)=>3*e-6*t,se=t=>3*t,ue=(t,e,n)=>((ie(e,n)*t+ae(e,n))*t+se(e))*t,le=(t,e,n)=>3*ie(e,n)*t*t+2*ae(e,n)*t+se(e);function ce(t,e,n,r){if(t===e&&n===r)return St;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])),s=le(a,t,n);return s>=.001?function(t,e,n,r){for(let o=0;o<8;++o){const o=le(e,n,r);if(0===o)return e;e-=(ue(e,n,r)-t)/o}return e}(e,a,t,n):0===s?a:function(t,e,n,r,o){let i,a,s=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&&++s<10);return a}(e,r,r+.1,t,n)}return t=>0===t||1===t?t:ue(i(t),e,r)}var fe=function(t){return 1e3*t},de={linear:St,easeIn:Ot,easeInOut:Mt,easeOut:Ct,circIn:Et,circInOut:kt,circOut:Pt,backIn:Ft,backInOut:jt,backOut:Rt,anticipate:Dt,bounceIn:Bt,bounceInOut:t=>t<.5?.5*(1-It(1-2*t)):.5*It(2*t-1)+.5,bounceOut:It},pe=function(t){if(Array.isArray(t)){h(4===t.length,"Cubic bezier arrays must contain four numerical values.");var e=a(t,4);return ce(e[0],e[1],e[2],e[3])}return"string"==typeof t?(h(void 0!==de[t],"Invalid easing type '"+t+"'"),de[t]):t},ve=function(t,e){return"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!et.test(e)||e.startsWith("url(")))},me=function(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}},he=function(t){return{type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restDelta:.01,restSpeed:10}},ye=function(){return{type:"keyframes",ease:"linear",duration:.3}},ge=function(t){return{type:"keyframes",duration:.8,values:t}},be={x:me,y:me,z:me,rotate:me,rotateX:me,rotateY:me,rotateZ:me,scaleX:he,scaleY:he,scale:he,opacity:ye,backgroundColor:ye,color:ye,default:he},Ae=o(o({},R),{transform:Math.round}),we={borderWidth:U,borderTopWidth:U,borderRightWidth:U,borderBottomWidth:U,borderLeftWidth:U,borderRadius:U,radius:U,borderTopLeftRadius:U,borderTopRightRadius:U,borderBottomRightRadius:U,borderBottomLeftRadius:U,width:U,maxWidth:U,height:U,maxHeight:U,size:U,top:U,right:U,bottom:U,left:U,padding:U,paddingTop:U,paddingRight:U,paddingBottom:U,paddingLeft:U,margin:U,marginTop:U,marginRight:U,marginBottom:U,marginLeft:U,rotate:B,rotateX:B,rotateY:B,rotateZ:B,scale:D,scaleX:D,scaleY:D,scaleZ:D,skew:B,skewX:B,skewY:B,distance:U,translateX:U,translateY:U,translateZ:U,x:U,y:U,z:U,perspective:U,transformPerspective:U,opacity:j,originX:H,originY:H,originZ:U,zIndex:Ae,fillOpacity:j,strokeOpacity:j,numOctaves:Ae},xe=o(o({},we),{color:G,backgroundColor:G,outlineColor:G,fill:G,stroke:G,borderColor:G,borderTopColor:G,borderRightColor:G,borderBottomColor:G,borderLeftColor:G,filter:it,WebkitFilter:it}),Ve=function(t){return xe[t]};function Se(t,e){var n,r=Ve(t);return r!==it&&(r=et),null===(n=r.getAnimatableNone)||void 0===n?void 0:n.call(r,e)}var Oe=!1;function Te(t){var e=t.ease,n=t.times,r=t.yoyo,a=t.flip,s=t.loop,u=i(t,["ease","times","yoyo","flip","loop"]),l=o({},u);return n&&(l.offset=n),u.duration&&(l.duration=fe(u.duration)),u.repeatDelay&&(l.repeatDelay=fe(u.repeatDelay)),e&&(l.ease=function(t){return Array.isArray(t)&&"number"!=typeof t[0]}(e)?e.map(pe):pe(e)),"tween"===u.type&&(l.type="keyframes"),(r||s||a)&&(m(!Oe,"yoyo, loop and flip have been removed from the API. Replace with repeat and repeatType options."),Oe=!0,r?l.repeatType="reverse":s?l.repeatType="loop":a&&(l.repeatType="mirror"),l.repeat=s||r||a||u.repeat),"spring"!==u.type&&(l.type="keyframes"),l}function Ce(t,e,n){var r,u,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=s([],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),(u=n,l=e.to,c=p(l)?ge:be[u]||be.default,o({to:l},c(l))))),o(o({},e),Te(t))}function Me(t,e,n,r,i){var a,s=ke(r,t),u=null!==(a=s.from)&&void 0!==a?a:e.get(),l=ve(t,n);"none"===u&&l&&"string"==typeof n?u=Se(t,n):Ee(u)&&"string"==typeof n?u=Pe(n):!Array.isArray(n)&&Ee(n)&&"string"==typeof u&&(n=Pe(u));var c=ve(t,u);return m(c===l,"You are trying to animate "+t+' from "'+u+'" to "'+n+'". '+u+" is not an animatable value - to enable this animation set "+u+" to a value animatable to "+n+" via the `style` property."),c&&l&&!1!==s.type?function(){var r={from:u,to:n,velocity:e.getVelocity(),onComplete:i,onUpdate:function(t){return e.set(t)}};return"inertia"===s.type||"decay"===s.type?function({from:t=0,velocity:e=0,min:n,max:r,power:o=.8,timeConstant:i=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:u=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 y(t){null==v||v.stop(),v=re(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 g(t){y(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:u},t))}if(m(t))g({from:t,velocity:e,to:h(t)});else{let r=o*e+t;void 0!==l&&(r=l(r));const a=h(r),s=a===n?-1:1;let c,f;const d=t=>{c=f,f=t,e=oe(t-c,te().delta),(1===s&&t>a||-1===s&&t<a)&&g({from:t,to:a,velocity:e})};y({type:"decay",from:t,velocity:e,timeConstant:i,power:o,restDelta:u,modifyTarget:l,onUpdate:m(r)?d:void 0})}return{stop:()=>null==v?void 0:v.stop()}}(o(o({},r),s)):re(o(o({},Ce(s,r,t)),{onUpdate:function(t){var e;r.onUpdate(t),null===(e=s.onUpdate)||void 0===e||e.call(s,t)},onComplete:function(){var t;r.onComplete(),null===(t=s.onComplete)||void 0===t||t.call(s)}}))}:function(){var t,r;return e.set(n),i(),null===(t=null==s?void 0:s.onUpdate)||void 0===t||t.call(s,n),null===(r=null==s?void 0:s.onComplete)||void 0===r||r.call(s),{stop:function(){}}}}function Ee(t){return 0===t||"string"==typeof t&&0===parseFloat(t)&&-1===t.indexOf(" ")}function Pe(t){return"number"==typeof t?0:Se("",t)}function ke(t,e){return t[e]||t.default||t}function Fe(t,e,n,r){return void 0===r&&(r={}),e.start((function(o){var i,a,s=Me(t,e,n,r,o),u=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=s()};return u?i=setTimeout(l,fe(u)):l(),function(){clearTimeout(i),null==a||a.stop()}}))}var Re=function(t){return/^0[^.\s]+$/.test(t)};var je=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}(),De=function(){function t(t){var e,n=this;this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new je,this.velocityUpdateSubscribers=new je,this.renderSubscribers=new je,this.canTrackVelocity=!1,this.updateAndNotify=function(t,e){void 0===e&&(e=!0),n.prev=n.current,n.current=t;var r=te(),o=r.delta,i=r.timestamp;n.lastUpdated!==i&&(n.timeDelta=o,n.lastUpdated=i,Kt.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 Kt.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?oe(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 Ie(t){return new De(t)}var Be,Le=function(t){return function(e){return e.test(t)}},Ue=[R,U,L,B,z,N,{test:function(t){return"auto"===t},parse:function(t){return t}}],Ne=function(t){return Ue.find(Le(t))},ze=s(s([],a(Ue),!1),[G,et],!1),He=function(t){return ze.find(Le(t))};function Ye(t){return Array.isArray(t)}function Xe(t){return"string"==typeof t||Ye(t)}function $e(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 We(t){var e;return"function"==typeof(null===(e=t.animate)||void 0===e?void 0:e.start)||Xe(t.initial)||Xe(t.animate)||Xe(t.whileHover)||Xe(t.whileDrag)||Xe(t.whileTap)||Xe(t.whileFocus)||Xe(t.exit)}function Ze(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Ie(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=$e(t,e,n.custom),s=(i||{}).transition,u=void 0===s?t.getDefaultTransition()||{}:s;n.transitionOverride&&(u=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=u.delayChildren,a=void 0===i?0:i,s=u.staggerChildren,l=u.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 s=[],u=(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),u-t*r};return Array.from(t.variantChildren).sort(_e).forEach((function(t,r){s.push(Ke(t,e,o(o({},a),{delay:n+l(r)})).then((function(){return t.notifyAnimationComplete(e)})))})),Promise.all(s)}(t,e,a+r,s,l,n)}:function(){return Promise.resolve()},f=u.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,s=a.delay,u=void 0===s?0:s,l=a.transitionOverride,c=a.type,f=t.makeTargetAnimatable(e),d=f.transition,v=void 0===d?t.getDefaultTransition():d,m=f.transitionEnd,h=i(f,["transition","transitionEnd"]);l&&(v=l);var y=[],g=c&&(null===(r=t.animationState)||void 0===r?void 0:r.getState()[c]);for(var b in h){var A=t.getValue(b),w=h[b];if(!(!A||void 0===w||g&&Je(g,b))){var x=Fe(b,A,w,o({delay:u},v));y.push(x)}}return Promise.all(y).then((function(){m&&function(t,e){var n=$e(t,e),r=n?t.makeTargetAnimatable(n,!1):{},a=r.transitionEnd,s=void 0===a?{}:a;r.transition;var u,l=i(r,["transitionEnd","transition"]);for(var c in l=o(o({},l),s)){Ze(t,c,(u=l[c],p(u)?u[u.length-1]||0:u))}}(t,m)}))}function _e(t,e){return t.sortNodePosition(e)}function Je(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.Exit="exit"}(Be||(Be={}));var Qe=[Be.Animate,Be.Hover,Be.Tap,Be.Drag,Be.Focus,Be.Exit],tn=s([],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?$e(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.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=$e(t,n);if(r){r.transition;var a=r.transitionEnd,s=i(r,["transition","transitionEnd"]);e=o(o(o({},e),s),a)}return e};function d(e,i){for(var d,m=t.getProps(),h=t.getVariantContext(!0)||{},y=[],g=new Set,b={},A=1/0,w=function(n){var l=tn[n],w=r[l],x=null!==(d=m[l])&&void 0!==d?d:h[l],V=Xe(x),S=l===i?w.isActive:null;!1===S&&(A=n);var O=x===h[l]&&x!==m[l]&&V;if(O&&c&&t.manuallyAnimateOnMount&&(O=!1),w.protectedKeys=o({},b),!w.isActive&&null===S||!x&&!w.prevProp||u(x)||"boolean"==typeof x)return"continue";var T=function(t,e){if("string"==typeof e)return e!==t;if(Ye(e))return!v(e,t);return!1}(w.prevProp,x)||l===i&&w.isActive&&!O&&V||n>A&&V,C=Array.isArray(x)?x:[x],M=C.reduce(f,{});!1===S&&(M={});var E=w.prevResolvedValues,P=void 0===E?{}:E,k=o(o({},P),M),F=function(t){T=!0,g.delete(t),w.needsAnimating[t]=!0};for(var R in k){var j=M[R],D=P[R];b.hasOwnProperty(R)||(j!==D?p(j)&&p(D)?v(j,D)?w.protectedKeys[R]=!0:F(R):void 0!==j?F(R):g.add(R):void 0!==j&&g.has(R)?F(R):w.protectedKeys[R]=!0)}w.prevProp=x,w.prevResolvedValues=M,w.isActive&&(b=o(o({},b),M)),c&&t.blockInitialAnimation&&(T=!1),T&&!O&&y.push.apply(y,s([],a(C.map((function(t){return{animation:t,options:o({type:l},e)}}))),!1))},x=0;x<en;x++)w(x);if(l=o({},b),g.size){var V={};g.forEach((function(e){var n=t.getBaseTarget(e);void 0!==n&&(V[e]=n)})),y.push({animation:V})}var S=Boolean(y.length);return c&&!1===m.initial&&!t.manuallyAnimateOnMount&&(S=!1),c=!1,S?n(y):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}},sn={animation:an((function(t){var e=t.visualElement,n=t.animate;e.animationState||(e.animationState=rn(e)),u(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),s=i[0],u=i[1],c=n(l);r((function(){var t,n;o.isPresent=s;var r=null===(t=o.animationState)||void 0===t?void 0:t.setActive(Be.Exit,!s,{custom:null!==(n=null==c?void 0:c.custom)&&void 0!==n?n:e});!s&&(null==r||r.then(u))}),[s])}))};function un(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 un(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"},yn={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function gn(t){return mn&&null===window.onpointerdown?t:mn&&null===window.ontouchstart?yn[t]:mn&&null===window.onmousedown?hn[t]:t}function bn(t,e,n,r){return un(t,gn(e),vn(n,"pointerdown"===e),r)}function An(t,e,n,r){return ln(t,gn(e),n&&vn(n,"pointerdown"===e),r)}function wn(t){var e=null;return function(){return null===e&&(e=t,function(){e=null})}}var xn=wn("dragHorizontal"),Vn=wn("dragVertical");function Sn(){var t=function(t){var e=!1;if("y"===t)e=Vn();else if("x"===t)e=xn();else{var n=xn(),r=Vn();n&&r?e=function(){n(),r()}:(n&&n(),r&&r())}return e}(!0);return!t||(t(),!1)}function On(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)&&!Sn()&&(null==n||n(r,o),null===(i=t.animationState)||void 0===i||i.setActive(Be.Hover,e))}}var Tn=function(t,e){return!!e&&(t===e||Tn(t,e.parentElement))};var Cn={tap:an((function(t){var n,o=t.onTap,i=t.onTapStart,a=t.onTapCancel,s=t.whileTap,u=t.visualElement,l=o||i||a||s,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=u.animationState)||void 0===t||t.setActive(Be.Tap,!1),!Sn()}function v(t,e){p()&&(Tn(u.getInstance(),t.target)?null==o||o(t,e):null==a||a(t,e))}function m(t,e){p()&&(null==a||a(t,e))}An(u,"pointerdown",l?function(t,e){var n;d(),c.current||(c.current=!0,f.current=dt(bn(window,"pointerup",v),bn(window,"pointercancel",m)),null==i||i(t,e),null===(n=u.animationState)||void 0===n||n.setActive(Be.Tap,!0))}: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;An(o,"pointerenter",e||r?On(o,!0,e):void 0),An(o,"pointerleave",n||r?On(o,!1,n):void 0)}))},Mn=function(t){return null!==t&&"object"==typeof t&&t.getVelocity},En=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","SetAxisTarget","Unmount"];var Pn=function(t){var e=t.treeType,n=void 0===e?"":e,r=t.build,i=t.getBaseTarget,u=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,y=t.presenceId,g=t.blockInitialAnimation,b=t.visualState;void 0===e&&(e={});var A,w,x=!1,V=b.latestValues,S=b.renderState,O=function(){var t=En.map((function(){return new je})),e={},n={clearAllListeners:function(){return t.forEach((function(t){return t.clear()}))},updatePropListeners:function(t){En.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"+En[e]]=function(e){return t.add(e)},n["notify"+En[e]]=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.notify.apply(t,s([],a(e),!1))}})),n}(),T=new Map,C=new Map,M={},E=o({},V);function P(){A&&x&&(k(),c(A,S,h.style,L.projection))}function k(){r(L,S,V,e,h)}function F(){O.notifyUpdate(V)}var R=v(h);for(var j in R){var D=R[j];void 0!==V[j]&&Mn(D)&&D.set(V[j],!1)}var I=We(h),B=function(t){return Boolean(We(t)||t.variants)}(h),L=o(o({treeType:n,current:null,depth:m?m.depth+1:0,parent:m,children:new Set,presenceId:y,variantChildren:B?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(null==m?void 0:m.isMounted()),blockInitialAnimation:g,isMounted:function(){return Boolean(A)},mount:function(t){x=!0,A=L.current=t,L.projection&&L.projection.mount(t),B&&m&&!I&&(w=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(),Gt.update(F),Gt.render(P),C.forEach((function(t){return t()})),null==w||w(),null==m||m.children.delete(L),O.clearAllListeners(),A=void 0,x=!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 A},getStaticValue:function(t){return V[t]},setStaticValue:function(t,e){return V[t]=e},getLatestValues:function(){return V},setVisibility:function(t){L.isVisible!==t&&(L.isVisible=t,L.scheduleRender())},makeTargetAnimatable:function(t,e){return void 0===e&&(e=!0),u(L,t,h,e)},measureViewportBox:function(){return l(A,h)},addValue:function(t,e){L.hasValue(t)&&L.removeValue(t),T.set(t,e),V[t]=e.get(),function(t,e){var n=e.onChange((function(e){V[t]=e,h.onUpdate&&Kt.update(F,!1,!0)})),r=e.onRenderRequest(L.scheduleRender);C.set(t,(function(){n(),r()}))}(t,e)},removeValue:function(t){var e;T.delete(t),null===(e=C.get(t))||void 0===e||e(),C.delete(t),delete V[t],d(t,S)},hasValue:function(t){return T.has(t)},getValue:function(t,e){var n=T.get(t);return void 0===n&&void 0!==e&&(n=Ie(e),L.addValue(t,n)),n},forEachValue:function(t){return T.forEach(t)},readValue:function(t){var n;return null!==(n=V[t])&&void 0!==n?n:f(A,t,e)},setBaseTarget:function(t,e){E[t]=e},getBaseTarget:function(t){if(i){var e=i(h,t);if(void 0!==e&&!Mn(e))return e}return E[t]}},O),{build:function(){return k(),S},scheduleRender:function(){Kt.render(P,!1,!0)},syncRender:P,setProps:function(t){h=t,O.updatePropListeners(t),M=function(t,e,n){var r;for(var o in e){var i=e[o],a=n[o];if(Mn(i))t.addValue(o,i);else if(Mn(a))t.addValue(o,Ie(i));else if(a!==i)if(t.hasValue(o)){var s=t.getValue(o);!s.hasAnimated&&s.set(i)}else t.addValue(o,Ie(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),M)},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(!I){var e=(null==m?void 0:m.getVariantContext())||{};return void 0!==h.initial&&(e.initial=h.initial),e}for(var n={},r=0;r<Fn;r++){var o=kn[r],i=h[o];(Xe(i)||!1===i)&&(n[o]=i)}return n}});return L}},kn=s(["initial"],a(Qe),!1),Fn=kn.length,Rn=["","X","Y","Z"],jn=["transformPerspective","x","y","z"];function Dn(t,e){return jn.indexOf(t)-jn.indexOf(e)}["translate","scale","rotate","skew"].forEach((function(t){return Rn.forEach((function(e){return jn.push(t+e)}))}));var In=new Set(jn);function Bn(t){return In.has(t)}var Ln=new Set(["originX","originY","originZ"]);function Un(t){return Ln.has(t)}var Nn={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function zn(t){return t.startsWith("--")}var Hn=function(t,e){return e&&"number"==typeof t?e.transform(t):t};function Yn(t,e,n,r){var o,i=t.style,a=t.vars,s=t.transform,u=t.transformKeys,l=t.transformOrigin;u.length=0;var c=!1,f=!1,d=!0;for(var p in e){var v=e[p];if(zn(p))a[p]=v;else{var m=we[p],h=Hn(v,m);if(Bn(p)){if(c=!0,s[p]=h,u.push(p),!d)continue;v!==(null!==(o=m.default)&&void 0!==o?o:0)&&(d=!1)}else Un(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,s=void 0===a||a,u=e.allowTransformNone,l=void 0===u||u,c="";i.sort(Dn);for(var f=!1,d=i.length,p=0;p<d;p++){var v=i[p];c+=(Nn[v]||v)+"("+o[v]+") ","z"===v&&(f=!0)}return!f&&s?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 Xn(t){return"string"==typeof t&&t.startsWith("var(--")}var $n=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Wn(t,e,n){void 0===n&&(n=1),h(n<=4,'Max CSS variable fallback depth detected in property "'+t+'". This may indicate a circular fallback dependency.');var r=a(function(t){var e=$n.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 s=window.getComputedStyle(e).getPropertyValue(o);return s?s.trim():Xn(i)?Wn(i,e,n+1):i}}var Zn,qn=new Set(["width","height","top","left","right","bottom","x","y"]),Kn=function(t){return qn.has(t)},Gn=function(t,e){t.set(e,!1),t.set(e)},_n=function(t){return t===R||t===U};!function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"}(Zn||(Zn={}));var Jn=function(t,e){return parseFloat(t.split(", ")[e])},Qn=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 Jn(i[1],e);var a=o.match(/^matrix\((.+)\)$/);return a?Jn(a[1],t):0}},tr=new Set(["x","y","z"]),er=jn.filter((function(t){return!tr.has(t)}));var nr={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:Qn(4,13),y:Qn(5,14)},rr=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(Kn),s=[],u=!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 y=m;y<v;y++)a?h(Ne(d[y])===a,"All keyframes must be of the same type"):(a=Ne(d[y]),h(a===f||_n(f)&&_n(a),"Keyframes must be of the same dimension as the current value"))}else a=Ne(d);if(f!==a)if(_n(f)&&_n(a)){var g=i.get();"string"==typeof g&&i.set(parseFloat(g)),"string"==typeof d?e[o]=parseFloat(d):Array.isArray(d)&&a===U&&(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):(u||(s=function(t){var e=[];return er.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),u=!0),l.push(o),r[o]=void 0!==r[o]?r[o]:e[o],Gn(i,d))}})),l.length){var c=function(t,e,n){var r=e.measureViewportBox(),o=e.getInstance(),i=getComputedStyle(o);"none"===i.display&&e.setStaticValue("display",t.display||"block"),e.syncRender();var a=e.measureViewportBox();return n.forEach((function(n){var o=e.getValue(n);Gn(o,nr[n](r,i)),t[n]=nr[n](a,i)})),t}(e,t,l);return s.length&&s.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 or(t,e,n,r){return function(t){return Object.keys(t).some(Kn)}(e)?rr(t,e,n,r):{target:e,transitionEnd:r}}var ir=function(t,e,n,r){var a=function(t,e,n){var r,a=i(e,[]),s=t.getInstance();if(!(s instanceof HTMLElement))return{target:a,transitionEnd:n};for(var u in n&&(n=o({},n)),t.forEachValue((function(t){var e=t.get();if(Xn(e)){var n=Wn(e,s);n&&t.set(n)}})),a){var l=a[u];if(Xn(l)){var c=Wn(l,s);c&&(a[u]=c,n&&(null!==(r=n[u])&&void 0!==r||(n[u]=l)))}}return{target:a,transitionEnd:n}}(t,e,r);return or(t,e=a.target,n,r=a.transitionEnd)},ar={};function sr(t,e){var n=e.layout,r=e.layoutId;return Bn(t)||Un(t)||(n||void 0!==r)&&(!!ar[t]||"opacity"===t)}function ur(t){var e=t.style,n={};for(var r in e)(Mn(e[r])||sr(r,t))&&(n[r]=e[r]);return n}function lr(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 cr={treeType:"dom",readValueFromInstance:function(t,e){if(Bn(e)){var n=Ve(e);return n&&n.default||0}var r,o=(r=t,window.getComputedStyle(r));return(zn(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 s=e.transition,u=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,s||{},t);if(a&&(u&&(u=a(u)),l&&(l=a(l)),c&&(c=a(c))),r){!function(t,e,n){var r,o,i,a,s=Object.keys(e).filter((function(e){return!t.hasValue(e)})),u=s.length;if(u)for(var l=0;l<u;l++){var c=s[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)||Re(d))?d=parseFloat(d):!He(d)&&et.test(f)&&(d=Se(c,f)),t.addValue(c,Ie(d)),null!==(i=(a=n)[c])&&void 0!==i||(a[c]=d),t.setBaseTarget(c,d))}}(t,l,c);var f=ir(t,l,c,u);u=f.transitionEnd,l=f.target}return o({transition:s,transitionEnd:u},l)},scrapeMotionValuesFromProps:ur,build:function(t,e,n,r,o){void 0!==t.isVisible&&(e.style.visibility=t.isVisible?"visible":"hidden"),Yn(e,n,r,o.transformTemplate)},render:lr},fr=Pn(cr);function dr(t,e,n){return"string"==typeof t?t:U.transform(e+n*t)}var pr=function(t,e){return U.transform(t*e)},vr={offset:"stroke-dashoffset",array:"stroke-dasharray"},mr={offset:"strokeDashoffset",array:"strokeDasharray"};function hr(t,e,n,r){var o=e.attrX,a=e.attrY,s=e.originX,u=e.originY,l=e.pathLength,c=e.pathSpacing,f=void 0===c?1:c,d=e.pathOffset,p=void 0===d?0:d;Yn(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,y=t.totalPathLength;v.transform&&(h&&(m.transform=v.transform),delete v.transform),h&&(void 0!==s||void 0!==u||m.transform)&&(m.transformOrigin=function(t,e,n){return dr(e,t.x,t.width)+" "+dr(n,t.y,t.height)}(h,void 0!==s?s:.5,void 0!==u?u:.5)),void 0!==o&&(v.x=o),void 0!==a&&(v.y=a),void 0!==y&&void 0!==l&&function(t,e,n,r,o,i){void 0===r&&(r=1),void 0===o&&(o=0),void 0===i&&(i=!0);var a=i?vr:mr;t[a.offset]=pr(-o,e);var s=pr(n,e),u=pr(r,e);t[a.array]=s+" "+u}(v,y,l,f,p,!1)}var yr=/([a-z])([A-Z])/g,gr=function(t){return t.replace(yr,"$1-$2").toLowerCase()},br=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform"]);var Ar=Pn(o(o({},cr),{getBaseTarget:function(t,e){return t[e]},readValueFromInstance:function(t,e){var n;return Bn(e)?(null===(n=Ve(e))||void 0===n?void 0:n.default)||0:(e=br.has(e)?e:gr(e),t.getAttribute(e))},scrapeMotionValuesFromProps:function(t){var e=ur(t);for(var n in t){if(Mn(t[n]))e["x"===n||"y"===n?"attr"+n.toUpperCase():n]=t[n]}return e},build:function(t,e,n,r,o){hr(e,n,r,o.transformTemplate)},render:function(t,e){for(var n in lr(t,e),e.attrs)t.setAttribute(br.has(n)?n:gr(n),e.attrs[n])}})),wr=["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 xr=o(o({renderer:function(t,e){return function(t){return"string"==typeof t&&!t.includes("-")&&!!(wr.indexOf(t)>-1||/[A-Z]/.test(t))}(t)?Ar(e,{enableHardwareAcceleration:!1}):fr(e,{enableHardwareAcceleration:!0})}},sn),Cn);export{xr as domAnimation};
|
|
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 s(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 u(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}var m=function(){},h=function(){};"production"!==process.env.NODE_ENV&&(m=function(t,e){t||"undefined"==typeof console||console.warn(e)},h=function(t,e){if(!t)throw new Error(e)});const y=(t,e,n)=>Math.min(Math.max(n,t),e);function g({duration:t=800,bounce:e=.25,velocity:n=0,mass:r=1}){let o,i;m(t<=1e4,"Spring duration must be 10 seconds or less");let a=1-e;a=y(.05,1,a),t=y(.01,10,t/1e3),a<1?(o=e=>{const r=e*a,o=r*t;return.001-(r-n)/b(e,a)*Math.exp(-o)},i=e=>{const r=e*a*t,i=r*n+n,s=Math.pow(a,2)*Math.pow(e,2)*t,u=Math.exp(-r),l=b(Math.pow(e,2),a);return(.001-o(e)>0?-1:1)*((i-s)*u)/l}):(o=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,i=e=>Math.exp(-e*t)*(t*t*(n-e)));const s=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(s))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(s,2)*r;return{stiffness:e,damping:2*a*Math.sqrt(r*e),duration:t}}}function b(t,e){return t*Math.sqrt(1-e*e)}const A=["duration","bounce"],w=["stiffness","damping","mass"];function x(t,e){return e.some(e=>void 0!==t[e])}function V(t){var{from:e=0,to:n=1,restSpeed:r=2,restDelta:o}=t,a=i(t,["from","to","restSpeed","restDelta"]);const s={done:!1,value:e};let{stiffness:u,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(!x(t,w)&&x(t,A)){const n=g(t);e=Object.assign(Object.assign(Object.assign({},e),n),{velocity:0,mass:1}),e.isResolvedFromDuration=!0}return e}(a),v=S,m=S;function h(){const t=f?-f/1e3:0,r=n-e,i=l/(2*Math.sqrt(u*c)),a=Math.sqrt(u/c)/1e3;if(null!=o||(o=Math.abs(n-e)<=1?.01:.4),i<1){const e=b(a,i);v=o=>{const s=Math.exp(-i*a*o);return n-s*((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 s=Math.exp(-i*a*o),u=Math.min(e*o,300);return n-s*((t+i*a*r)*Math.sinh(u)+e*r*Math.cosh(u))/e}}}return h(),{next:t=>{const e=v(t);if(p)s.done=t>=d;else{const i=1e3*m(t),a=Math.abs(i)<=r,u=Math.abs(n-e)<=o;s.done=a&&u}return s.value=s.done?n:e,s},flipTarget:()=>{f=-f,[e,n]=[n,e],h()}}}V.needsInterpolation=(t,e)=>"string"==typeof t||"string"==typeof e;const S=t=>0,O=(t,e,n)=>{const r=e-t;return 0===r?1:(n-t)/r},T=(t,e,n)=>-n*t+n*e+t,C=(t,e)=>n=>Math.max(Math.min(n,e),t),M=t=>t%1?Number(t.toFixed(5)):t,E=/(-)?([\d]*\.?[\d])+/g,k=/(#[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,P=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function F(t){return"string"==typeof t}const R={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},j=Object.assign(Object.assign({},R),{transform:C(0,1)}),D=Object.assign(Object.assign({},R),{default:1}),I=t=>({test:e=>F(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),B=I("deg"),L=I("%"),U=I("px"),N=I("vh"),z=I("vw"),Y=Object.assign(Object.assign({},L),{parse:t=>L.parse(t)/100,transform:t=>L.transform(100*t)}),H=(t,e)=>n=>Boolean(F(n)&&P.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),X=(t,e,n)=>r=>{if(!F(r))return r;const[o,i,a,s]=r.match(E);return{[t]:parseFloat(o),[e]:parseFloat(i),[n]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},$={test:H("hsl","hue"),parse:X("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+L.transform(M(e))+", "+L.transform(M(n))+", "+M(j.transform(r))+")"},W=C(0,255),Z=Object.assign(Object.assign({},R),{transform:t=>Math.round(W(t))}),q={test:H("rgb","red"),parse:X("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+Z.transform(t)+", "+Z.transform(e)+", "+Z.transform(n)+", "+M(j.transform(r))+")"};const K={test:H("#"),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:q.transform},G={test:t=>q.test(t)||K.test(t)||$.test(t),parse:t=>q.test(t)?q.parse(t):$.test(t)?$.parse(t):K.parse(t),transform:t=>F(t)?t:t.hasOwnProperty("red")?q.transform(t):$.transform(t)};function _(t){"number"==typeof t&&(t=""+t);const e=[];let n=0;const r=t.match(k);r&&(n=r.length,t=t.replace(k,"${c}"),e.push(...r.map(G.parse)));const o=t.match(E);return o&&(t=t.replace(E,"${n}"),e.push(...o.map(R.parse))),{values:e,numColors:n,tokenised:t}}function J(t){return _(t).values}function Q(t){const{values:e,numColors:n,tokenised:r}=_(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?G.transform(t[r]):M(t[r]));return e}}const tt=t=>"number"==typeof t?0:t;const et={test:function(t){var e,n,r,o;return isNaN(t)&&F(t)&&(null!==(n=null===(e=t.match(E))||void 0===e?void 0:e.length)&&void 0!==n?n:0)+(null!==(o=null===(r=t.match(k))||void 0===r?void 0:r.length)&&void 0!==o?o:0)>0},parse:J,createTransformer:Q,getAnimatableNone:function(t){const e=J(t);return Q(t)(e.map(tt))}},nt=new Set(["brightness","contrast","saturate","opacity"]);function rt(t){let[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[r]=n.match(E)||[];if(!r)return t;const o=n.replace(r,"");let i=nt.has(e)?1:0;return r!==n&&(i*=100),e+"("+i+o+")"}const ot=/([a-z-]*)\(.*?\)/g,it=Object.assign(Object.assign({},et),{getAnimatableNone:t=>{const e=t.match(ot);return e?e.map(rt).join(" "):t}});function at(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 st({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,s=2*n-r;o=at(s,r,t+1/3),i=at(s,r,t),a=at(s,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 ut=(t,e,n)=>{const r=t*t,o=e*e;return Math.sqrt(Math.max(0,n*(o-r)+r))},lt=[K,q,$],ct=t=>lt.find(e=>e.test(t)),ft=t=>`'${t}' is not an animatable color. Use the equivalent color code instead.`,dt=(t,e)=>{let n=ct(t),r=ct(e);h(!!n,ft(t)),h(!!r,ft(e));let o=n.parse(t),i=r.parse(e);n===$&&(o=st(o),n=q),r===$&&(i=st(i),r=q);const a=Object.assign({},o);return t=>{for(const e in a)"alpha"!==e&&(a[e]=ut(o[e],i[e],t));return a.alpha=T(o.alpha,i.alpha,t),n.transform(a)}},pt=(t,e)=>n=>e(t(n)),vt=(...t)=>t.reduce(pt);function mt(t,e){return"number"==typeof t?n=>T(t,e,n):G.test(t)?dt(t,e):bt(t,e)}const ht=(t,e)=>{const n=[...t],r=n.length,o=t.map((t,n)=>mt(t,e[n]));return t=>{for(let e=0;e<r;e++)n[e]=o[e](t);return n}},yt=(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]=mt(t[o],e[o]));return t=>{for(const e in r)n[e]=r[e](t);return n}};function gt(t){const e=et.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 bt=(t,e)=>{const n=et.createTransformer(e),r=gt(t),o=gt(e);return r.numHSL===o.numHSL&&r.numRGB===o.numRGB&&r.numNumbers>=o.numNumbers?vt(ht(r.parsed,o.parsed),n):(m(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),n=>""+(n>0?e:t))},At=(t,e)=>n=>T(t,e,n);function wt(t,e,n){const r=[],o=n||("number"==typeof(i=t[0])?At:"string"==typeof i?G.test(i)?dt:bt:Array.isArray(i)?ht:"object"==typeof i?yt: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=vt(t,i)}r.push(i)}return r}function xt(t,e,{clamp:n=!0,ease:r,mixer:o}={}){const i=t.length;h(i===e.length,"Both input and output ranges must be the same length"),h(!r||!Array.isArray(r)||r.length===i-1,"Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values."),t[0]>t[i-1]&&(t=[].concat(t),e=[].concat(e),t.reverse(),e.reverse());const a=wt(e,r,o),s=2===i?function([t,e],[n]){return r=>n(O(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 s=O(t[i],t[i+1],o);return e[i](s)}}(t,a);return n?e=>s(y(t[0],t[i-1],e)):s}const Vt=t=>e=>1-t(1-e),St=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Ot=t=>e=>e*e*((t+1)*e-t),Tt=t=>t,Ct=(Mt=2,t=>Math.pow(t,Mt));var Mt;const Et=Vt(Ct),kt=St(Ct),Pt=t=>1-Math.sin(Math.acos(t)),Ft=Vt(Pt),Rt=St(Ft),jt=Ot(1.525),Dt=Vt(jt),It=St(jt),Bt=(t=>{const e=Ot(t);return t=>(t*=2)<1?.5*e(t):.5*(2-Math.pow(2,-10*(t-1)))})(1.525),Lt=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},Ut=Vt(Lt);function Nt(t,e){return t.map(()=>e||kt).splice(0,t.length-1)}function zt({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],s=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 u(){return xt(s,a,{ease:Array.isArray(n)?n:Nt(a,n)})}let l=u();return{next:t=>(i.value=l(t),i.done=t>=o,i),flipTarget:()=>{a.reverse(),l=u()}}}const Yt={keyframes:zt,spring:V,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 s=n*t;const u=e+s,l=void 0===i?u:i(u);return l!==u&&(s=l-e),{next:t=>{const e=-s*Math.exp(-t/r);return a.done=!(e>o||e<-o),a.value=a.done?l:l+e,a},flipTarget:()=>{}}}};const Ht="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),Xt="undefined"!=typeof window?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(Ht()),1/60*1e3);let $t=!0,Wt=!1,Zt=!1;const qt={delta:0,timestamp:0},Kt=["read","update","preRender","render","postRender"],Gt=Kt.reduce((t,e)=>(t[e]=function(t){let e=[],n=[],r=0,o=!1,i=!1;const a=new WeakSet,s={schedule:(t,i=!1,s=!1)=>{const u=s&&o,l=u?e:n;return i&&a.add(t),-1===l.indexOf(t)&&(l.push(t),u&&o&&(r=e.length)),t},cancel:t=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1),a.delete(t)},process:u=>{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(u),a.has(r)&&(s.schedule(r),t())}o=!1,i&&(i=!1,s.process(u))}}};return s}(()=>Wt=!0),t),{}),_t=Kt.reduce((t,e)=>{const n=Gt[e];return t[e]=(t,e=!1,r=!1)=>(Wt||ee(),n.schedule(t,e,r)),t},{}),Jt=Kt.reduce((t,e)=>(t[e]=Gt[e].cancel,t),{});Kt.reduce((t,e)=>(t[e]=()=>Gt[e].process(qt),t),{});const Qt=t=>Gt[t].process(qt),te=t=>{Wt=!1,qt.delta=$t?1/60*1e3:Math.max(Math.min(t-qt.timestamp,40),1),qt.timestamp=t,Zt=!0,Kt.forEach(Qt),Zt=!1,Wt&&($t=!1,Xt(te))},ee=()=>{Wt=!0,$t=!0,Zt||Xt(te)},ne=()=>qt;function re(t,e,n=0){return t-e-n}const oe=t=>{const e=({delta:e})=>t(e);return{start:()=>_t.update(e,!0),stop:()=>Jt.update(e)}};function ie(t){var e,n,{from:r,autoplay:o=!0,driver:a=oe,elapsed:s=0,repeat:u=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 y,g,b,{to:A}=h,w=0,x=h.duration,S=!1,O=!0;const T=function(t){if(Array.isArray(t.to))return zt;if(Yt[t.type])return Yt[t.type];const e=new Set(Object.keys(t));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?zt:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?V:zt}(h);(null===(n=(e=T).needsInterpolation)||void 0===n?void 0:n.call(e,r,A))&&(b=xt([0,100],[r,A],{clamp:!1}),r=0,A=100);const C=T(Object.assign(Object.assign({},h),{from:r,to:A}));function M(){w++,"reverse"===l?(O=w%2==0,s=function(t,e,n=0,r=!0){return r?re(e+-t,e,n):e-(t-e)+n}(s,x,c,O)):(s=re(s,x,c),"mirror"===l&&C.flipTarget()),S=!1,v&&v()}function E(t){if(O||(t=-t),s+=t,!S){const t=C.next(Math.max(0,s));g=t.value,b&&(g=b(g)),S=O?t.done:s<=0}null==m||m(g),S&&(0===w&&(null!=x||(x=s)),w<u?function(t,e,n,r){return r?t>=e+n:t<=-n}(s,x,c,O)&&M():(y.stop(),p&&p()))}return o&&(null==f||f(),y=a(E),y.start()),{stop:()=>{null==d||d(),y.stop()}}}function ae(t,e){return e?t*(1e3/e):0}const se=(t,e)=>1-3*e+3*t,ue=(t,e)=>3*e-6*t,le=t=>3*t,ce=(t,e,n)=>((se(e,n)*t+ue(e,n))*t+le(e))*t,fe=(t,e,n)=>3*se(e,n)*t*t+2*ue(e,n)*t+le(e);function de(t,e,n,r){if(t===e&&n===r)return Tt;const o=new Float32Array(11);for(let e=0;e<11;++e)o[e]=ce(.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])),s=fe(a,t,n);return s>=.001?function(t,e,n,r){for(let o=0;o<8;++o){const o=fe(e,n,r);if(0===o)return e;e-=(ce(e,n,r)-t)/o}return e}(e,a,t,n):0===s?a:function(t,e,n,r,o){let i,a,s=0;do{a=e+(n-e)/2,i=ce(a,r,o)-t,i>0?n=a:e=a}while(Math.abs(i)>1e-7&&++s<10);return a}(e,r,r+.1,t,n)}return t=>0===t||1===t?t:ce(i(t),e,r)}var pe=function(t){return 1e3*t},ve={linear:Tt,easeIn:Ct,easeInOut:kt,easeOut:Et,circIn:Pt,circInOut:Rt,circOut:Ft,backIn:jt,backInOut:It,backOut:Dt,anticipate:Bt,bounceIn:Ut,bounceInOut:t=>t<.5?.5*(1-Lt(1-2*t)):.5*Lt(2*t-1)+.5,bounceOut:Lt},me=function(t){if(Array.isArray(t)){h(4===t.length,"Cubic bezier arrays must contain four numerical values.");var e=a(t,4);return de(e[0],e[1],e[2],e[3])}return"string"==typeof t?(h(void 0!==ve[t],"Invalid easing type '"+t+"'"),ve[t]):t},he=function(t,e){return"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!et.test(e)||e.startsWith("url(")))},ye=function(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}},ge=function(t){return{type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restDelta:.01,restSpeed:10}},be=function(){return{type:"keyframes",ease:"linear",duration:.3}},Ae=function(t){return{type:"keyframes",duration:.8,values:t}},we={x:ye,y:ye,z:ye,rotate:ye,rotateX:ye,rotateY:ye,rotateZ:ye,scaleX:ge,scaleY:ge,scale:ge,opacity:be,backgroundColor:be,color:be,default:ge},xe=o(o({},R),{transform:Math.round}),Ve={borderWidth:U,borderTopWidth:U,borderRightWidth:U,borderBottomWidth:U,borderLeftWidth:U,borderRadius:U,radius:U,borderTopLeftRadius:U,borderTopRightRadius:U,borderBottomRightRadius:U,borderBottomLeftRadius:U,width:U,maxWidth:U,height:U,maxHeight:U,size:U,top:U,right:U,bottom:U,left:U,padding:U,paddingTop:U,paddingRight:U,paddingBottom:U,paddingLeft:U,margin:U,marginTop:U,marginRight:U,marginBottom:U,marginLeft:U,rotate:B,rotateX:B,rotateY:B,rotateZ:B,scale:D,scaleX:D,scaleY:D,scaleZ:D,skew:B,skewX:B,skewY:B,distance:U,translateX:U,translateY:U,translateZ:U,x:U,y:U,z:U,perspective:U,transformPerspective:U,opacity:j,originX:Y,originY:Y,originZ:U,zIndex:xe,fillOpacity:j,strokeOpacity:j,numOctaves:xe},Se=o(o({},Ve),{color:G,backgroundColor:G,outlineColor:G,fill:G,stroke:G,borderColor:G,borderTopColor:G,borderRightColor:G,borderBottomColor:G,borderLeftColor:G,filter:it,WebkitFilter:it}),Oe=function(t){return Se[t]};function Te(t,e){var n,r=Oe(t);return r!==it&&(r=et),null===(n=r.getAnimatableNone)||void 0===n?void 0:n.call(r,e)}var Ce=!1;function Me(t){var e=t.ease,n=t.times,r=t.yoyo,a=t.flip,s=t.loop,u=i(t,["ease","times","yoyo","flip","loop"]),l=o({},u);return n&&(l.offset=n),u.duration&&(l.duration=pe(u.duration)),u.repeatDelay&&(l.repeatDelay=pe(u.repeatDelay)),e&&(l.ease=function(t){return Array.isArray(t)&&"number"!=typeof t[0]}(e)?e.map(me):me(e)),"tween"===u.type&&(l.type="keyframes"),(r||s||a)&&(m(!Ce,"yoyo, loop and flip have been removed from the API. Replace with repeat and repeatType options."),Ce=!0,r?l.repeatType="reverse":s?l.repeatType="loop":a&&(l.repeatType="mirror"),l.repeat=s||r||a||u.repeat),"spring"!==u.type&&(l.type="keyframes"),l}function Ee(t,e,n){var r,u,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=s([],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),(u=n,l=e.to,c=p(l)?Ae:we[u]||we.default,o({to:l},c(l))))),o(o({},e),Me(t))}function ke(t,e,n,r,i){var a,s=Re(r,t),u=null!==(a=s.from)&&void 0!==a?a:e.get(),l=he(t,n);"none"===u&&l&&"string"==typeof n?u=Te(t,n):Pe(u)&&"string"==typeof n?u=Fe(n):!Array.isArray(n)&&Pe(n)&&"string"==typeof u&&(n=Fe(u));var c=he(t,u);return m(c===l,"You are trying to animate "+t+' from "'+u+'" to "'+n+'". '+u+" is not an animatable value - to enable this animation set "+u+" to a value animatable to "+n+" via the `style` property."),c&&l&&!1!==s.type?function(){var r={from:u,to:n,velocity:e.getVelocity(),onComplete:i,onUpdate:function(t){return e.set(t)}};return"inertia"===s.type||"decay"===s.type?function({from:t=0,velocity:e=0,min:n,max:r,power:o=.8,timeConstant:i=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:u=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 y(t){null==v||v.stop(),v=ie(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 g(t){y(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:u},t))}if(m(t))g({from:t,velocity:e,to:h(t)});else{let r=o*e+t;void 0!==l&&(r=l(r));const a=h(r),s=a===n?-1:1;let c,f;const d=t=>{c=f,f=t,e=ae(t-c,ne().delta),(1===s&&t>a||-1===s&&t<a)&&g({from:t,to:a,velocity:e})};y({type:"decay",from:t,velocity:e,timeConstant:i,power:o,restDelta:u,modifyTarget:l,onUpdate:m(r)?d:void 0})}return{stop:()=>null==v?void 0:v.stop()}}(o(o({},r),s)):ie(o(o({},Ee(s,r,t)),{onUpdate:function(t){var e;r.onUpdate(t),null===(e=s.onUpdate)||void 0===e||e.call(s,t)},onComplete:function(){var t;r.onComplete(),null===(t=s.onComplete)||void 0===t||t.call(s)}}))}:function(){var t,r;return e.set(n),i(),null===(t=null==s?void 0:s.onUpdate)||void 0===t||t.call(s,n),null===(r=null==s?void 0:s.onComplete)||void 0===r||r.call(s),{stop:function(){}}}}function Pe(t){return 0===t||"string"==typeof t&&0===parseFloat(t)&&-1===t.indexOf(" ")}function Fe(t){return"number"==typeof t?0:Te("",t)}function Re(t,e){return t[e]||t.default||t}function je(t,e,n,r){return void 0===r&&(r={}),e.start((function(o){var i,a,s=ke(t,e,n,r,o),u=function(t,e){var n,r;return null!==(r=null!==(n=(Re(t,e)||{}).delay)&&void 0!==n?n:t.delay)&&void 0!==r?r:0}(r,t),l=function(){return a=s()};return u?i=setTimeout(l,pe(u)):l(),function(){clearTimeout(i),null==a||a.stop()}}))}var De=function(t){return/^0[^.\s]+$/.test(t)};var Ie=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}(),Be=function(){function t(t){var e,n=this;this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Ie,this.velocityUpdateSubscribers=new Ie,this.renderSubscribers=new Ie,this.canTrackVelocity=!1,this.updateAndNotify=function(t,e){void 0===e&&(e=!0),n.prev=n.current,n.current=t;var r=ne(),o=r.delta,i=r.timestamp;n.lastUpdated!==i&&(n.timeDelta=o,n.lastUpdated=i,_t.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 _t.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?ae(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 Le(t){return new Be(t)}var Ue,Ne=function(t){return function(e){return e.test(t)}},ze=[R,U,L,B,z,N,{test:function(t){return"auto"===t},parse:function(t){return t}}],Ye=function(t){return ze.find(Ne(t))},He=s(s([],a(ze),!1),[G,et],!1),Xe=function(t){return He.find(Ne(t))};function $e(t){return Array.isArray(t)}function We(t){return"string"==typeof t||$e(t)}function Ze(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 qe(t){var e;return"function"==typeof(null===(e=t.animate)||void 0===e?void 0:e.start)||We(t.initial)||We(t.animate)||We(t.whileHover)||We(t.whileDrag)||We(t.whileTap)||We(t.whileFocus)||We(t.exit)}function Ke(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Le(n))}function Ge(t,e){if(e)return(e[t]||e.default||e).from}function _e(t,e,n){var r;void 0===n&&(n={});var i=Ze(t,e,n.custom),s=(i||{}).transition,u=void 0===s?t.getDefaultTransition()||{}:s;n.transitionOverride&&(u=n.transitionOverride);var l=i?function(){return Je(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=u.delayChildren,a=void 0===i?0:i,s=u.staggerChildren,l=u.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 s=[],u=(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),u-t*r};return Array.from(t.variantChildren).sort(Qe).forEach((function(t,r){s.push(_e(t,e,o(o({},a),{delay:n+l(r)})).then((function(){return t.notifyAnimationComplete(e)})))})),Promise.all(s)}(t,e,a+r,s,l,n)}:function(){return Promise.resolve()},f=u.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 Je(t,e,n){var r,a=void 0===n?{}:n,s=a.delay,u=void 0===s?0:s,l=a.transitionOverride,c=a.type,f=t.makeTargetAnimatable(e),d=f.transition,v=void 0===d?t.getDefaultTransition():d,m=f.transitionEnd,h=i(f,["transition","transitionEnd"]);l&&(v=l);var y=[],g=c&&(null===(r=t.animationState)||void 0===r?void 0:r.getState()[c]);for(var b in h){var A=t.getValue(b),w=h[b];if(!(!A||void 0===w||g&&tn(g,b))){var x=je(b,A,w,o({delay:u},v));y.push(x)}}return Promise.all(y).then((function(){m&&function(t,e){var n=Ze(t,e),r=n?t.makeTargetAnimatable(n,!1):{},a=r.transitionEnd,s=void 0===a?{}:a;r.transition;var u,l=i(r,["transitionEnd","transition"]);for(var c in l=o(o({},l),s)){Ke(t,c,(u=l[c],p(u)?u[u.length-1]||0:u))}}(t,m)}))}function Qe(t,e){return t.sortNodePosition(e)}function tn(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.Exit="exit"}(Ue||(Ue={}));var en=[Ue.Animate,Ue.Focus,Ue.Hover,Ue.Tap,Ue.Drag,Ue.Exit],nn=s([],a(en),!1).reverse(),rn=en.length;function on(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 _e(t,e,n)}));r=Promise.all(o)}else if("string"==typeof e)r=_e(t,e,n);else{var i="function"==typeof e?Ze(t,e,n.custom):e;r=Je(t,i,n)}return r.then((function(){return t.notifyAnimationComplete(e)}))}(t,n,r)})))}}function an(t){var e,n=on(t),r=((e={})[Ue.Animate]=sn(!0),e[Ue.Hover]=sn(),e[Ue.Tap]=sn(),e[Ue.Drag]=sn(),e[Ue.Focus]=sn(),e[Ue.Exit]=sn(),e),l={},c=!0,f=function(e,n){var r=Ze(t,n);if(r){r.transition;var a=r.transitionEnd,s=i(r,["transition","transitionEnd"]);e=o(o(o({},e),s),a)}return e};function d(e,i){for(var d,m=t.getProps(),h=t.getVariantContext(!0)||{},y=[],g=new Set,b={},A=1/0,w=function(n){var l=nn[n],w=r[l],x=null!==(d=m[l])&&void 0!==d?d:h[l],V=We(x),S=l===i?w.isActive:null;!1===S&&(A=n);var O=x===h[l]&&x!==m[l]&&V;if(O&&c&&t.manuallyAnimateOnMount&&(O=!1),w.protectedKeys=o({},b),!w.isActive&&null===S||!x&&!w.prevProp||u(x)||"boolean"==typeof x)return"continue";var T=function(t,e){if("string"==typeof e)return e!==t;if($e(e))return!v(e,t);return!1}(w.prevProp,x)||l===i&&w.isActive&&!O&&V||n>A&&V,C=Array.isArray(x)?x:[x],M=C.reduce(f,{});!1===S&&(M={});var E=w.prevResolvedValues,k=void 0===E?{}:E,P=o(o({},k),M),F=function(t){T=!0,g.delete(t),w.needsAnimating[t]=!0};for(var R in P){var j=M[R],D=k[R];b.hasOwnProperty(R)||(j!==D?p(j)&&p(D)?v(j,D)?w.protectedKeys[R]=!0:F(R):void 0!==j?F(R):g.add(R):void 0!==j&&g.has(R)?F(R):w.protectedKeys[R]=!0)}w.prevProp=x,w.prevResolvedValues=M,w.isActive&&(b=o(o({},b),M)),c&&t.blockInitialAnimation&&(T=!1),T&&!O&&y.push.apply(y,s([],a(C.map((function(t){return{animation:t,options:o({type:l},e)}}))),!1))},x=0;x<rn;x++)w(x);if(l=o({},b),g.size){var V={};g.forEach((function(e){var n=t.getBaseTarget(e);void 0!==n&&(V[e]=n)})),y.push({animation:V})}var S=Boolean(y.length);return c&&!1===m.initial&&!t.manuallyAnimateOnMount&&(S=!1),c=!1,S?n(y):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 sn(t){return void 0===t&&(t=!1),{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}var un=function(t){return function(e){return t(e),null}},ln={animation:un((function(t){var e=t.visualElement,n=t.animate;e.animationState||(e.animationState=an(e)),u(n)&&r((function(){return n.subscribe(e)}),[n])})),exit:un((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),s=i[0],u=i[1],c=n(l);r((function(){var t,n;o.isPresent=s;var r=null===(t=o.animationState)||void 0===t?void 0:t.setActive(Ue.Exit,!s,{custom:null!==(n=null==c?void 0:c.custom)&&void 0!==n?n:e});!s&&(null==r||r.then(u))}),[s])}))};function cn(t,e,n,r){return t.addEventListener(e,n,r),function(){return t.removeEventListener(e,n,r)}}function fn(t,e,n,o){r((function(){var r=t.current;if(n&&r)return cn(r,e,n,o)}),[t,e,n,o])}function dn(t){return!!t.touches}var pn={pageX:0,pageY:0};function vn(t,e){void 0===e&&(e="page");var n=t.touches[0]||t.changedTouches[0]||pn;return{x:n[e+"X"],y:n[e+"Y"]}}function mn(t,e){return void 0===e&&(e="page"),{x:t[e+"X"],y:t[e+"Y"]}}var hn=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:dn(t)?vn(t,e):mn(t,e)}}(e))};return e?(n=r,function(t){var e=t instanceof MouseEvent;(!e||e&&0===t.button)&&n(t)}):r},yn="undefined"!=typeof window,gn={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},bn={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function An(t){return yn&&null===window.onpointerdown?t:yn&&null===window.ontouchstart?bn[t]:yn&&null===window.onmousedown?gn[t]:t}function wn(t,e,n,r){return cn(t,An(e),hn(n,"pointerdown"===e),r)}function xn(t,e,n,r){return fn(t,An(e),n&&hn(n,"pointerdown"===e),r)}function Vn(t){var e=null;return function(){return null===e&&(e=t,function(){e=null})}}var Sn=Vn("dragHorizontal"),On=Vn("dragVertical");function Tn(){var t=function(t){var e=!1;if("y"===t)e=On();else if("x"===t)e=Sn();else{var n=Sn(),r=On();n&&r?e=function(){n(),r()}:(n&&n(),r&&r())}return e}(!0);return!t||(t(),!1)}function Cn(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)&&!Tn()&&(null==n||n(r,o),null===(i=t.animationState)||void 0===i||i.setActive(Ue.Hover,e))}}var Mn=function(t,e){return!!e&&(t===e||Mn(t,e.parentElement))};var En={tap:un((function(t){var n,o=t.onTap,i=t.onTapStart,a=t.onTapCancel,s=t.whileTap,u=t.visualElement,l=o||i||a||s,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=u.animationState)||void 0===t||t.setActive(Ue.Tap,!1),!Tn()}function v(t,e){p()&&(Mn(u.getInstance(),t.target)?null==o||o(t,e):null==a||a(t,e))}function m(t,e){p()&&(null==a||a(t,e))}xn(u,"pointerdown",l?function(t,e){var n;d(),c.current||(c.current=!0,f.current=vt(wn(window,"pointerup",v),wn(window,"pointercancel",m)),null==i||i(t,e),null===(n=u.animationState)||void 0===n||n.setActive(Ue.Tap,!0))}:void 0),n=d,r((function(){return function(){return n()}}),[])})),focus:un((function(t){var e=t.whileFocus,n=t.visualElement;fn(n,"focus",e?function(){var t;null===(t=n.animationState)||void 0===t||t.setActive(Ue.Focus,!0)}:void 0),fn(n,"blur",e?function(){var t;null===(t=n.animationState)||void 0===t||t.setActive(Ue.Focus,!1)}:void 0)})),hover:un((function(t){var e=t.onHoverStart,n=t.onHoverEnd,r=t.whileHover,o=t.visualElement;xn(o,"pointerenter",e||r?Cn(o,!0,e):void 0),xn(o,"pointerleave",n||r?Cn(o,!1,n):void 0)}))},kn=function(t){return null!==t&&"object"==typeof t&&t.getVelocity},Pn=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","SetAxisTarget","Unmount"];var Fn=function(t){var e=t.treeType,n=void 0===e?"":e,r=t.build,i=t.getBaseTarget,u=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,y=t.presenceId,g=t.blockInitialAnimation,b=t.visualState;void 0===e&&(e={});var A,w,x=!1,V=b.latestValues,S=b.renderState,O=function(){var t=Pn.map((function(){return new Ie})),e={},n={clearAllListeners:function(){return t.forEach((function(t){return t.clear()}))},updatePropListeners:function(t){Pn.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"+Pn[e]]=function(e){return t.add(e)},n["notify"+Pn[e]]=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.notify.apply(t,s([],a(e),!1))}})),n}(),T=new Map,C=new Map,M={},E=o({},V);function k(){A&&x&&(P(),c(A,S,h.style,L.projection))}function P(){r(L,S,V,e,h)}function F(){O.notifyUpdate(V)}var R=v(h);for(var j in R){var D=R[j];void 0!==V[j]&&kn(D)&&D.set(V[j],!1)}var I=qe(h),B=function(t){return Boolean(qe(t)||t.variants)}(h),L=o(o({treeType:n,current:null,depth:m?m.depth+1:0,parent:m,children:new Set,presenceId:y,variantChildren:B?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(null==m?void 0:m.isMounted()),blockInitialAnimation:g,isMounted:function(){return Boolean(A)},mount:function(t){x=!0,A=L.current=t,L.projection&&L.projection.mount(t),B&&m&&!I&&(w=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(),Jt.update(F),Jt.render(k),C.forEach((function(t){return t()})),null==w||w(),null==m||m.children.delete(L),O.clearAllListeners(),A=void 0,x=!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 A},getStaticValue:function(t){return V[t]},setStaticValue:function(t,e){return V[t]=e},getLatestValues:function(){return V},setVisibility:function(t){L.isVisible!==t&&(L.isVisible=t,L.scheduleRender())},makeTargetAnimatable:function(t,e){return void 0===e&&(e=!0),u(L,t,h,e)},measureViewportBox:function(){return l(A,h)},addValue:function(t,e){L.hasValue(t)&&L.removeValue(t),T.set(t,e),V[t]=e.get(),function(t,e){var n=e.onChange((function(e){V[t]=e,h.onUpdate&&_t.update(F,!1,!0)})),r=e.onRenderRequest(L.scheduleRender);C.set(t,(function(){n(),r()}))}(t,e)},removeValue:function(t){var e;T.delete(t),null===(e=C.get(t))||void 0===e||e(),C.delete(t),delete V[t],d(t,S)},hasValue:function(t){return T.has(t)},getValue:function(t,e){var n=T.get(t);return void 0===n&&void 0!==e&&(n=Le(e),L.addValue(t,n)),n},forEachValue:function(t){return T.forEach(t)},readValue:function(t){var n;return null!==(n=V[t])&&void 0!==n?n:f(A,t,e)},setBaseTarget:function(t,e){E[t]=e},getBaseTarget:function(t){if(i){var e=i(h,t);if(void 0!==e&&!kn(e))return e}return E[t]}},O),{build:function(){return P(),S},scheduleRender:function(){_t.render(k,!1,!0)},syncRender:k,setProps:function(t){h=t,O.updatePropListeners(t),M=function(t,e,n){var r;for(var o in e){var i=e[o],a=n[o];if(kn(i))t.addValue(o,i);else if(kn(a))t.addValue(o,Le(i));else if(a!==i)if(t.hasValue(o)){var s=t.getValue(o);!s.hasAnimated&&s.set(i)}else t.addValue(o,Le(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),M)},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(!I){var e=(null==m?void 0:m.getVariantContext())||{};return void 0!==h.initial&&(e.initial=h.initial),e}for(var n={},r=0;r<jn;r++){var o=Rn[r],i=h[o];(We(i)||!1===i)&&(n[o]=i)}return n}});return L}},Rn=s(["initial"],a(en),!1),jn=Rn.length,Dn=["","X","Y","Z"],In=["transformPerspective","x","y","z"];function Bn(t,e){return In.indexOf(t)-In.indexOf(e)}["translate","scale","rotate","skew"].forEach((function(t){return Dn.forEach((function(e){return In.push(t+e)}))}));var Ln=new Set(In);function Un(t){return Ln.has(t)}var Nn=new Set(["originX","originY","originZ"]);function zn(t){return Nn.has(t)}var Yn={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function Hn(t){return t.startsWith("--")}var Xn=function(t,e){return e&&"number"==typeof t?e.transform(t):t};function $n(t,e,n,r){var o,i=t.style,a=t.vars,s=t.transform,u=t.transformKeys,l=t.transformOrigin;u.length=0;var c=!1,f=!1,d=!0;for(var p in e){var v=e[p];if(Hn(p))a[p]=v;else{var m=Ve[p],h=Xn(v,m);if(Un(p)){if(c=!0,s[p]=h,u.push(p),!d)continue;v!==(null!==(o=m.default)&&void 0!==o?o:0)&&(d=!1)}else zn(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,s=void 0===a||a,u=e.allowTransformNone,l=void 0===u||u,c="";i.sort(Bn);for(var f=!1,d=i.length,p=0;p<d;p++){var v=i[p];c+=(Yn[v]||v)+"("+o[v]+") ","z"===v&&(f=!0)}return!f&&s?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 Wn(t){return"string"==typeof t&&t.startsWith("var(--")}var Zn=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function qn(t,e,n){void 0===n&&(n=1),h(n<=4,'Max CSS variable fallback depth detected in property "'+t+'". This may indicate a circular fallback dependency.');var r=a(function(t){var e=Zn.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 s=window.getComputedStyle(e).getPropertyValue(o);return s?s.trim():Wn(i)?qn(i,e,n+1):i}}var Kn,Gn=new Set(["width","height","top","left","right","bottom","x","y"]),_n=function(t){return Gn.has(t)},Jn=function(t,e){t.set(e,!1),t.set(e)},Qn=function(t){return t===R||t===U};!function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"}(Kn||(Kn={}));var tr=function(t,e){return parseFloat(t.split(", ")[e])},er=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 tr(i[1],e);var a=o.match(/^matrix\((.+)\)$/);return a?tr(a[1],t):0}},nr=new Set(["x","y","z"]),rr=In.filter((function(t){return!nr.has(t)}));var or={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:er(4,13),y:er(5,14)},ir=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(_n),s=[],u=!1,l=[];if(i.forEach((function(o){var i=t.getValue(o);if(t.hasValue(o)){var a,c=n[o],f=Ye(c),d=e[o];if(p(d)){var v=d.length,m=null===d[0]?1:0;c=d[m],f=Ye(c);for(var y=m;y<v;y++)a?h(Ye(d[y])===a,"All keyframes must be of the same type"):(a=Ye(d[y]),h(a===f||Qn(f)&&Qn(a),"Keyframes must be of the same dimension as the current value"))}else a=Ye(d);if(f!==a)if(Qn(f)&&Qn(a)){var g=i.get();"string"==typeof g&&i.set(parseFloat(g)),"string"==typeof d?e[o]=parseFloat(d):Array.isArray(d)&&a===U&&(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):(u||(s=function(t){var e=[];return rr.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),u=!0),l.push(o),r[o]=void 0!==r[o]?r[o]:e[o],Jn(i,d))}})),l.length){var c=function(t,e,n){var r=e.measureViewportBox(),o=e.getInstance(),i=getComputedStyle(o),a=i.display,s={};"none"===a&&e.setStaticValue("display",t.display||"block"),n.forEach((function(t){s[t]=or[t](r,i)})),e.syncRender();var u=e.measureViewportBox();return n.forEach((function(n){var r=e.getValue(n);Jn(r,s[n]),t[n]=or[n](u,i)})),t}(e,t,l);return s.length&&s.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 ar(t,e,n,r){return function(t){return Object.keys(t).some(_n)}(e)?ir(t,e,n,r):{target:e,transitionEnd:r}}var sr=function(t,e,n,r){var a=function(t,e,n){var r,a=i(e,[]),s=t.getInstance();if(!(s instanceof HTMLElement))return{target:a,transitionEnd:n};for(var u in n&&(n=o({},n)),t.forEachValue((function(t){var e=t.get();if(Wn(e)){var n=qn(e,s);n&&t.set(n)}})),a){var l=a[u];if(Wn(l)){var c=qn(l,s);c&&(a[u]=c,n&&(null!==(r=n[u])&&void 0!==r||(n[u]=l)))}}return{target:a,transitionEnd:n}}(t,e,r);return ar(t,e=a.target,n,r=a.transitionEnd)},ur={};function lr(t,e){var n=e.layout,r=e.layoutId;return Un(t)||zn(t)||(n||void 0!==r)&&(!!ur[t]||"opacity"===t)}function cr(t){var e=t.style,n={};for(var r in e)(kn(e[r])||lr(r,t))&&(n[r]=e[r]);return n}function fr(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 dr={treeType:"dom",readValueFromInstance:function(t,e){if(Un(e)){var n=Oe(e);return n&&n.default||0}var r,o=(r=t,window.getComputedStyle(r));return(Hn(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 s=e.transition,u=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=Ge(a,e))&&void 0!==r?r:null===(o=n.getValue(a))||void 0===o?void 0:o.get();return i}(l,s||{},t);if(a&&(u&&(u=a(u)),l&&(l=a(l)),c&&(c=a(c))),r){!function(t,e,n){var r,o,i,a,s=Object.keys(e).filter((function(e){return!t.hasValue(e)})),u=s.length;if(u)for(var l=0;l<u;l++){var c=s[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)||De(d))?d=parseFloat(d):!Xe(d)&&et.test(f)&&(d=Te(c,f)),t.addValue(c,Le(d)),null!==(i=(a=n)[c])&&void 0!==i||(a[c]=d),t.setBaseTarget(c,d))}}(t,l,c);var f=sr(t,l,c,u);u=f.transitionEnd,l=f.target}return o({transition:s,transitionEnd:u},l)},scrapeMotionValuesFromProps:cr,build:function(t,e,n,r,o){void 0!==t.isVisible&&(e.style.visibility=t.isVisible?"visible":"hidden"),$n(e,n,r,o.transformTemplate)},render:fr},pr=Fn(dr);function vr(t,e,n){return"string"==typeof t?t:U.transform(e+n*t)}var mr={offset:"stroke-dashoffset",array:"stroke-dasharray"},hr={offset:"strokeDashoffset",array:"strokeDasharray"};function yr(t,e,n,r){var o=e.attrX,a=e.attrY,s=e.originX,u=e.originY,l=e.pathLength,c=e.pathSpacing,f=void 0===c?1:c,d=e.pathOffset,p=void 0===d?0:d;$n(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!==s||void 0!==u||m.transform)&&(m.transformOrigin=function(t,e,n){return vr(e,t.x,t.width)+" "+vr(n,t.y,t.height)}(h,void 0!==s?s:.5,void 0!==u?u:.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?mr:hr;t[i.offset]=U.transform(-r);var a=U.transform(e),s=U.transform(n);t[i.array]=a+" "+s}(v,l,f,p,!1)}var gr=/([a-z])([A-Z])/g,br=function(t){return t.replace(gr,"$1-$2").toLowerCase()},Ar=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);var wr=Fn(o(o({},dr),{getBaseTarget:function(t,e){return t[e]},readValueFromInstance:function(t,e){var n;return Un(e)?(null===(n=Oe(e))||void 0===n?void 0:n.default)||0:(e=Ar.has(e)?e:br(e),t.getAttribute(e))},scrapeMotionValuesFromProps:function(t){var e=cr(t);for(var n in t){if(kn(t[n]))e["x"===n||"y"===n?"attr"+n.toUpperCase():n]=t[n]}return e},build:function(t,e,n,r,o){yr(e,n,r,o.transformTemplate)},render:function(t,e){for(var n in fr(t,e),e.attrs)t.setAttribute(Ar.has(n)?n:br(n),e.attrs[n])}})),xr=["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 Vr=o(o({renderer:function(t,e){return function(t){return"string"==typeof t&&!t.includes("-")&&!!(xr.indexOf(t)>-1||/[A-Z]/.test(t))}(t)?wr(e,{enableHardwareAcceleration:!1}):pr(e,{enableHardwareAcceleration:!0})}},ln),En);export{Vr as domAnimation};
|