framer-motion 12.0.5 → 12.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/client.js +7 -2
- package/dist/cjs/dom.js +2 -2
- package/dist/cjs/index.js +7 -2
- package/dist/dom.js +1 -1
- package/dist/es/projection/node/create-projection-node.mjs +6 -1
- package/dist/es/render/utils/motion-values.mjs +1 -1
- package/dist/es/value/index.mjs +1 -1
- package/dist/framer-motion.dev.js +7 -2
- package/dist/framer-motion.js +1 -1
- package/package.json +4 -4
package/dist/cjs/client.js
CHANGED
|
@@ -409,7 +409,7 @@ class MotionValue {
|
|
|
409
409
|
* This will be replaced by the build step with the latest version number.
|
|
410
410
|
* When MotionValues are provided to motion components, warn if versions are mixed.
|
|
411
411
|
*/
|
|
412
|
-
this.version = "12.0.
|
|
412
|
+
this.version = "12.0.6";
|
|
413
413
|
/**
|
|
414
414
|
* Tracks whether this value can output a velocity. Currently this is only true
|
|
415
415
|
* if the value is numerical, but we might be able to widen the scope here and support
|
|
@@ -5205,7 +5205,7 @@ function updateMotionValuesFromProps(element, next, prev) {
|
|
|
5205
5205
|
* and warn against mismatches.
|
|
5206
5206
|
*/
|
|
5207
5207
|
if (process.env.NODE_ENV === "development") {
|
|
5208
|
-
warnOnce(nextValue.version === "12.0.
|
|
5208
|
+
warnOnce(nextValue.version === "12.0.6", `Attempting to mix Motion versions ${nextValue.version} with 12.0.6 may not work as expected.`);
|
|
5209
5209
|
}
|
|
5210
5210
|
}
|
|
5211
5211
|
else if (isMotionValue(prevValue)) {
|
|
@@ -7010,6 +7010,11 @@ function createProjectionNode$1({ attachResizeListener, defaultParent, measureSc
|
|
|
7010
7010
|
if (this.snapshot || !this.instance)
|
|
7011
7011
|
return;
|
|
7012
7012
|
this.snapshot = this.measure();
|
|
7013
|
+
if (this.snapshot &&
|
|
7014
|
+
!calcLength(this.snapshot.measuredBox.x) &&
|
|
7015
|
+
!calcLength(this.snapshot.measuredBox.y)) {
|
|
7016
|
+
this.snapshot = undefined;
|
|
7017
|
+
}
|
|
7013
7018
|
}
|
|
7014
7019
|
updateLayout() {
|
|
7015
7020
|
if (!this.instance)
|
package/dist/cjs/dom.js
CHANGED
|
@@ -994,7 +994,7 @@ class MotionValue {
|
|
|
994
994
|
* This will be replaced by the build step with the latest version number.
|
|
995
995
|
* When MotionValues are provided to motion components, warn if versions are mixed.
|
|
996
996
|
*/
|
|
997
|
-
this.version = "12.0.
|
|
997
|
+
this.version = "12.0.6";
|
|
998
998
|
/**
|
|
999
999
|
* Tracks whether this value can output a velocity. Currently this is only true
|
|
1000
1000
|
* if the value is numerical, but we might be able to widen the scope here and support
|
|
@@ -3928,7 +3928,7 @@ function updateMotionValuesFromProps(element, next, prev) {
|
|
|
3928
3928
|
* and warn against mismatches.
|
|
3929
3929
|
*/
|
|
3930
3930
|
if (process.env.NODE_ENV === "development") {
|
|
3931
|
-
warnOnce(nextValue.version === "12.0.
|
|
3931
|
+
warnOnce(nextValue.version === "12.0.6", `Attempting to mix Motion versions ${nextValue.version} with 12.0.6 may not work as expected.`);
|
|
3932
3932
|
}
|
|
3933
3933
|
}
|
|
3934
3934
|
else if (isMotionValue(prevValue)) {
|
package/dist/cjs/index.js
CHANGED
|
@@ -445,7 +445,7 @@ class MotionValue {
|
|
|
445
445
|
* This will be replaced by the build step with the latest version number.
|
|
446
446
|
* When MotionValues are provided to motion components, warn if versions are mixed.
|
|
447
447
|
*/
|
|
448
|
-
this.version = "12.0.
|
|
448
|
+
this.version = "12.0.6";
|
|
449
449
|
/**
|
|
450
450
|
* Tracks whether this value can output a velocity. Currently this is only true
|
|
451
451
|
* if the value is numerical, but we might be able to widen the scope here and support
|
|
@@ -5224,7 +5224,7 @@ function updateMotionValuesFromProps(element, next, prev) {
|
|
|
5224
5224
|
* and warn against mismatches.
|
|
5225
5225
|
*/
|
|
5226
5226
|
if (process.env.NODE_ENV === "development") {
|
|
5227
|
-
warnOnce(nextValue.version === "12.0.
|
|
5227
|
+
warnOnce(nextValue.version === "12.0.6", `Attempting to mix Motion versions ${nextValue.version} with 12.0.6 may not work as expected.`);
|
|
5228
5228
|
}
|
|
5229
5229
|
}
|
|
5230
5230
|
else if (isMotionValue(prevValue)) {
|
|
@@ -8187,6 +8187,11 @@ function createProjectionNode$1({ attachResizeListener, defaultParent, measureSc
|
|
|
8187
8187
|
if (this.snapshot || !this.instance)
|
|
8188
8188
|
return;
|
|
8189
8189
|
this.snapshot = this.measure();
|
|
8190
|
+
if (this.snapshot &&
|
|
8191
|
+
!calcLength(this.snapshot.measuredBox.x) &&
|
|
8192
|
+
!calcLength(this.snapshot.measuredBox.y)) {
|
|
8193
|
+
this.snapshot = undefined;
|
|
8194
|
+
}
|
|
8190
8195
|
}
|
|
8191
8196
|
updateLayout() {
|
|
8192
8197
|
if (!this.instance)
|
package/dist/dom.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={})}(this,(function(t){"use strict";const e=t=>t;let n=e;function s(t){let e;return()=>(void 0===e&&(e=t()),e)}const i=(t,e,n)=>{const s=e-t;return 0===s?1:(n-t)/s},r=t=>1e3*t,o=t=>t/1e3,a=s(()=>void 0!==window.ScrollTimeline);class l extends class{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t,e){const n=this.animations.map(n=>a()&&n.attachTimeline?n.attachTimeline(t):"function"==typeof e?e(n):void 0);return()=>{n.forEach((t,e)=>{t&&t(),this.animations[e].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let e=0;e<this.animations.length;e++)t=Math.max(t,this.animations[e].duration);return t}runAll(t){this.animations.forEach(e=>e[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}{then(t,e){return Promise.all(this.animations).then(t).catch(e)}}function u(t,e){return t?t[e]||t.default||t:void 0}function c(t){let e=0;let n=t.next(e);for(;!n.done&&e<2e4;)e+=50,n=t.next(e);return e>=2e4?1/0:e}function h(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(c(s),2e4);return{type:"keyframes",ease:t=>s.next(i*t).value/e,duration:o(i)}}function d(t){return"function"==typeof t}function p(t,e){t.timeline=e,t.onfinish=null}const f=t=>Array.isArray(t)&&"number"==typeof t[0],m={linearEasing:void 0};function g(t,e){const n=s(t);return()=>{var t;return null!==(t=m[e])&&void 0!==t?t:n()}}const v=g(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),y=(t,e,n=10)=>{let s="";const r=Math.max(Math.round(e/n),2);for(let e=0;e<r;e++)s+=t(i(0,r-1,e))+", ";return`linear(${s.substring(0,s.length-2)})`};function w(t){return Boolean("function"==typeof t&&v()||!t||"string"==typeof t&&(t in T||v())||f(t)||Array.isArray(t)&&t.every(w))}const b=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,T={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:b([0,.65,.55,1]),circOut:b([.55,0,1,.45]),backIn:b([.31,.01,.66,-.59]),backOut:b([.33,1.53,.69,.99])};const x=!1;function S(){return x}function A(t,e,n){var s;if(t instanceof Element)return[t];if("string"==typeof t){let i=document;e&&(i=e.current);const r=null!==(s=null==n?void 0:n[t])&&void 0!==s?s:i.querySelectorAll(t);return r?Array.from(r):[]}return Array.from(t)}function V(t,e){const n=A(t),s=new AbortController;return[n,{passive:!0,...e,signal:s.signal},()=>s.abort()]}function M(t){return!("touch"===t.pointerType||S())}const P=(t,e)=>!!e&&(t===e||P(t,e.parentElement)),k=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const E=new WeakSet;function C(t){return e=>{"Enter"===e.key&&t(e)}}function F(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function O(t){return(t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary)(t)&&!S()}const I=(t,e,n)=>n>e?e:n<t?t:n;function L(t,e){return e?t*(1e3/e):0}function R(t,e,n){const s=Math.max(e-5,0);return L(n-t(s),e-s)}const B=100,D=10,W=1,N=0,K=800,j=.3,z=.3,U={granular:.01,default:2},$={granular:.005,default:.5},H=.01,Y=10,q=.05,X=1;function G({duration:t=K,bounce:e=j,velocity:n=N,mass:s=W}){let i,a,l=1-e;l=I(q,X,l),t=I(H,Y,o(t)),l<1?(i=e=>{const s=e*l,i=s*t;return.001-(s-n)/Z(e,l)*Math.exp(-i)},a=e=>{const s=e*l*t,r=s*n+n,o=Math.pow(l,2)*Math.pow(e,2)*t,a=Math.exp(-s),u=Z(Math.pow(e,2),l);return(.001-i(e)>0?-1:1)*((r-o)*a)/u}):(i=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,a=e=>Math.exp(-e*t)*(t*t*(n-e)));const u=function(t,e,n){let s=n;for(let n=1;n<12;n++)s-=t(s)/e(s);return s}(i,a,5/t);if(t=r(t),isNaN(u))return{stiffness:B,damping:D,duration:t};{const e=Math.pow(u,2)*s;return{stiffness:e,damping:2*l*Math.sqrt(s*e),duration:t}}}function Z(t,e){return t*Math.sqrt(1-e*e)}const _=["duration","bounce"],J=["stiffness","damping","mass"];function Q(t,e){return e.some(e=>void 0!==t[e])}function tt(t=z,e=j){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const a=n.keyframes[0],l=n.keyframes[n.keyframes.length-1],u={done:!1,value:a},{stiffness:h,damping:d,mass:p,duration:f,velocity:m,isResolvedFromDuration:g}=function(t){let e={velocity:N,stiffness:B,damping:D,mass:W,isResolvedFromDuration:!1,...t};if(!Q(t,J)&&Q(t,_))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(1.2*n),i=s*s,r=2*I(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:W,stiffness:i,damping:r}}else{const n=G(t);e={...e,...n,mass:W},e.isResolvedFromDuration=!0}return e}({...n,velocity:-o(n.velocity||0)}),v=m||0,w=d/(2*Math.sqrt(h*p)),b=l-a,T=o(Math.sqrt(h/p)),x=Math.abs(b)<5;let S;if(s||(s=x?U.granular:U.default),i||(i=x?$.granular:$.default),w<1){const t=Z(T,w);S=e=>{const n=Math.exp(-w*T*e);return l-n*((v+w*T*b)/t*Math.sin(t*e)+b*Math.cos(t*e))}}else if(1===w)S=t=>l-Math.exp(-T*t)*(b+(v+T*b)*t);else{const t=T*Math.sqrt(w*w-1);S=e=>{const n=Math.exp(-w*T*e),s=Math.min(t*e,300);return l-n*((v+w*T*b)*Math.sinh(s)+t*b*Math.cosh(s))/t}}const A={calculatedDuration:g&&f||null,next:t=>{const e=S(t);if(g)u.done=t>=f;else{let n=0;w<1&&(n=0===t?r(v):R(S,t,e));const o=Math.abs(n)<=s,a=Math.abs(l-e)<=i;u.done=o&&a}return u.value=u.done?l:e,u},toString:()=>{const t=Math.min(c(A),2e4),e=y(e=>A.next(t*e).value,t,30);return t+"ms "+e}};return A}const et=(t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t},nt=t=>Array.isArray(t)&&"number"!=typeof t[0];function st(t,e){return nt(t)?t[et(0,t.length,e)]:t}const it=(t,e,n)=>t+(e-t)*n;function rt(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const r=i(0,e,s);t.push(it(n,1,r))}}function ot(t){const e=[0];return rt(e,t.length-1),e}const at=t=>Boolean(t&&t.getVelocity);function lt(t){return"object"==typeof t&&!Array.isArray(t)}function ut(t,e,n,s){return"string"==typeof t&<(e)?A(t,n,s):t instanceof NodeList?Array.from(t):Array.isArray(t)?t:[t]}function ct(t,e,n){return t*(e+1)}function ht(t,e,n,s){var i;return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:null!==(i=s.get(e))&&void 0!==i?i:t}function dt(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}function pt(t,e,n,s,i,r){!function(t,e,n){for(let s=0;s<t.length;s++){const i=t[s];i.at>e&&i.at<n&&(dt(t,i),s--)}}(t,i,r);for(let o=0;o<e.length;o++)t.push({value:e[o],at:it(i,r,s[o]),easing:st(n,o)})}function ft(t,e){for(let n=0;n<t.length;n++)t[n]=t[n]/(e+1)}function mt(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function gt(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function vt(t,e){return e[t]||(e[t]=[]),e[t]}function yt(t){return Array.isArray(t)?t:[t]}function wt(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const bt=t=>"number"==typeof t,Tt=t=>t.every(bt),xt=new WeakMap,St=!1;const At=["read","resolveKeyframes","update","preRender","render","postRender"];const{schedule:Vt,cancel:Mt,state:Pt,steps:kt}=function(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=At.reduce((t,e)=>(t[e]=function(t){let e=new Set,n=new Set,s=!1,i=!1;const r=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(e){r.has(e)&&(l.schedule(e),t()),e(o)}const l={schedule:(t,i=!1,o=!1)=>{const a=o&&s?e:n;return i&&r.add(t),a.has(t)||a.add(t),t},cancel:t=>{n.delete(t),r.delete(t)},process:t=>{o=t,s?i=!0:(s=!0,[e,n]=[n,e],e.forEach(a),e.clear(),s=!1,i&&(i=!1,l.process(t)))}};return l}(r),t),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:h,postRender:d}=o,p=()=>{const r=performance.now();n=!1,i.delta=s?1e3/60:Math.max(Math.min(r-i.timestamp,40),1),i.timestamp=r,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),h.process(i),d.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(p))};return{schedule:At.reduce((e,r)=>{const a=o[r];return e[r]=(e,r=!1,o=!1)=>(n||(n=!0,s=!0,i.isProcessing||t(p)),a.schedule(e,r,o)),e},{}),cancel:t=>{for(let e=0;e<At.length;e++)o[At[e]].cancel(t)},state:i,steps:o}}("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:e,!0),Et=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ct=new Set(Et),Ft=new Set(["width","height","top","left","right","bottom",...Et]),Ot=t=>(t=>Array.isArray(t))(t)?t[t.length-1]||0:t;let It;function Lt(){It=void 0}const Rt={now:()=>(void 0===It&&Rt.set(Pt.isProcessing||St?Pt.timestamp:performance.now()),It),set:t=>{It=t,queueMicrotask(Lt)}};class Bt{constructor(){this.subscriptions=[]}add(t){var e,n;return e=this.subscriptions,n=t,-1===e.indexOf(n)&&e.push(n),()=>dt(this.subscriptions,t)}notify(t,e,n){const s=this.subscriptions.length;if(s)if(1===s)this.subscriptions[0](t,e,n);else for(let i=0;i<s;i++){const s=this.subscriptions[i];s&&s(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}class Dt{constructor(t,e={}){this.version="12.0.5",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=Rt.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),e&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=Rt.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new Bt);const n=this.events[t].add(e);return"change"===t?()=>{n(),Vt.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Rt.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return L(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Wt(t,e){return new Dt(t,e)}function Nt(t){const e=[{},{}];return null==t||t.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function Kt(t,e,n,s){if("function"==typeof e){const[i,r]=Nt(s);e=e(void 0!==n?n:t.custom,i,r)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[i,r]=Nt(s);e=e(void 0!==n?n:t.custom,i,r)}return e}function jt(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Wt(n))}function zt(t,e){const n=function(t,e,n){const s=t.getProps();return Kt(s,e,void 0!==n?n:s.custom,t)}(t,e);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const e in r){jt(t,e,Ot(r[e]))}}function Ut(t,e){const n=t.getValue("willChange");if(s=n,Boolean(at(s)&&s.add))return n.add(e);var s}const $t=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Ht="data-"+$t("framerAppearId");function Yt(t){return t.props[Ht]}const qt=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function Xt(t,n,s,i){if(t===n&&s===i)return e;const r=e=>function(t,e,n,s,i){let r,o,a=0;do{o=e+(n-e)/2,r=qt(o,s,i)-t,r>0?n=o:e=o}while(Math.abs(r)>1e-7&&++a<12);return o}(e,0,1,t,s);return t=>0===t||1===t?t:qt(r(t),n,i)}const Gt=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Zt=t=>e=>1-t(1-e),_t=Xt(.33,1.53,.69,.99),Jt=Zt(_t),Qt=Gt(Jt),te=t=>(t*=2)<1?.5*Jt(t):.5*(2-Math.pow(2,-10*(t-1))),ee=t=>1-Math.sin(Math.acos(t)),ne=Zt(ee),se=Gt(ee),ie=t=>/^0[^.\s]+$/u.test(t);const re={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},oe={...re,transform:t=>I(0,1,t)},ae={...re,default:1},le=t=>Math.round(1e5*t)/1e5,ue=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const ce=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,he=(t,e)=>n=>Boolean("string"==typeof n&&ce.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),de=(t,e,n)=>s=>{if("string"!=typeof s)return s;const[i,r,o,a]=s.match(ue);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:void 0!==a?parseFloat(a):1}},pe={...re,transform:t=>Math.round((t=>I(0,255,t))(t))},fe={test:he("rgb","red"),parse:de("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+pe.transform(t)+", "+pe.transform(e)+", "+pe.transform(n)+", "+le(oe.transform(s))+")"};const me={test:he("#"),parse:function(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}},transform:fe.transform},ge=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),ve=ge("deg"),ye=ge("%"),we=ge("px"),be=ge("vh"),Te=ge("vw"),xe={...ye,parse:t=>ye.parse(t)/100,transform:t=>ye.transform(100*t)},Se={test:he("hsl","hue"),parse:de("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+ye.transform(le(e))+", "+ye.transform(le(n))+", "+le(oe.transform(s))+")"},Ae={test:t=>fe.test(t)||me.test(t)||Se.test(t),parse:t=>fe.test(t)?fe.parse(t):Se.test(t)?Se.parse(t):me.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?fe.transform(t):Se.transform(t)},Ve=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const Me=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Pe(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const o=e.replace(Me,t=>(Ae.test(t)?(s.color.push(r),i.push("color"),n.push(Ae.parse(t))):t.startsWith("var(")?(s.var.push(r),i.push("var"),n.push(t)):(s.number.push(r),i.push("number"),n.push(parseFloat(t))),++r,"${}")).split("${}");return{values:n,split:o,indexes:s,types:i}}function ke(t){return Pe(t).values}function Ee(t){const{split:e,types:n}=Pe(t),s=e.length;return t=>{let i="";for(let r=0;r<s;r++)if(i+=e[r],void 0!==t[r]){const e=n[r];i+="number"===e?le(t[r]):"color"===e?Ae.transform(t[r]):t[r]}return i}}const Ce=t=>"number"==typeof t?0:t;const Fe={test:function(t){var e,n;return isNaN(t)&&"string"==typeof t&&((null===(e=t.match(ue))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(Ve))||void 0===n?void 0:n.length)||0)>0},parse:ke,createTransformer:Ee,getAnimatableNone:function(t){const e=ke(t);return Ee(t)(e.map(Ce))}},Oe=new Set(["brightness","contrast","saturate","opacity"]);function Ie(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[s]=n.match(ue)||[];if(!s)return t;const i=n.replace(s,"");let r=Oe.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const Le=/\b([a-z-]*)\(.*?\)/gu,Re={...Fe,getAnimatableNone:t=>{const e=t.match(Le);return e?e.map(Ie).join(" "):t}},Be={borderWidth:we,borderTopWidth:we,borderRightWidth:we,borderBottomWidth:we,borderLeftWidth:we,borderRadius:we,radius:we,borderTopLeftRadius:we,borderTopRightRadius:we,borderBottomRightRadius:we,borderBottomLeftRadius:we,width:we,maxWidth:we,height:we,maxHeight:we,top:we,right:we,bottom:we,left:we,padding:we,paddingTop:we,paddingRight:we,paddingBottom:we,paddingLeft:we,margin:we,marginTop:we,marginRight:we,marginBottom:we,marginLeft:we,backgroundPositionX:we,backgroundPositionY:we},De={rotate:ve,rotateX:ve,rotateY:ve,rotateZ:ve,scale:ae,scaleX:ae,scaleY:ae,scaleZ:ae,skew:ve,skewX:ve,skewY:ve,distance:we,translateX:we,translateY:we,translateZ:we,x:we,y:we,z:we,perspective:we,transformPerspective:we,opacity:oe,originX:xe,originY:xe,originZ:we},We={...re,transform:Math.round},Ne={...Be,...De,zIndex:We,size:we,fillOpacity:oe,strokeOpacity:oe,numOctaves:We},Ke={...Ne,color:Ae,backgroundColor:Ae,outlineColor:Ae,fill:Ae,stroke:Ae,borderColor:Ae,borderTopColor:Ae,borderRightColor:Ae,borderBottomColor:Ae,borderLeftColor:Ae,filter:Re,WebkitFilter:Re},je=t=>Ke[t];function ze(t,e){let n=je(t);return n!==Re&&(n=Fe),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Ue=new Set(["auto","none","0"]);const $e=t=>t===re||t===we,He=(t,e)=>parseFloat(t.split(", ")[e]),Ye=(t,e)=>(n,{transform:s})=>{if("none"===s||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/u);if(i)return He(i[1],e);{const e=s.match(/^matrix\((.+)\)$/u);return e?He(e[1],t):0}},qe=new Set(["x","y","z"]),Xe=Et.filter(t=>!qe.has(t));const Ge={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:Ye(4,13),y:Ye(5,14)};Ge.translateX=Ge.x,Ge.translateY=Ge.y;const Ze=new Set;let _e=!1,Je=!1;function Qe(){if(Je){const t=Array.from(Ze).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),n=new Map;e.forEach(t=>{const e=function(t){const e=[];return Xe.forEach(n=>{const s=t.getValue(n);void 0!==s&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}(t);e.length&&(n.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=n.get(t);e&&e.forEach(([e,n])=>{var s;null===(s=t.getValue(e))||void 0===s||s.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}Je=!1,_e=!1,Ze.forEach(t=>t.complete()),Ze.clear()}function tn(){Ze.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Je=!0)})}class en{constructor(t,e,n,s,i,r=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=s,this.element=i,this.isAsync=r}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Ze.add(this),_e||(_e=!0,Vt.read(tn),Vt.resolveKeyframes(Qe))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:s}=this;for(let i=0;i<t.length;i++)if(null===t[i])if(0===i){const i=null==s?void 0:s.get(),r=t[t.length-1];if(void 0!==i)t[0]=i;else if(n&&e){const s=n.readValue(e,r);null!=s&&(t[0]=s)}void 0===t[0]&&(t[0]=r),s&&void 0===i&&s.set(t[0])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Ze.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Ze.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const nn=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),sn=t=>e=>"string"==typeof e&&e.startsWith(t),rn=sn("--"),on=sn("var(--"),an=t=>!!on(t)&&ln.test(t.split("/*")[0].trim()),ln=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,un=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function cn(t,e,n=1){const[s,i]=function(t){const e=un.exec(t);if(!e)return[,];const[,n,s,i]=e;return["--"+(null!=n?n:s),i]}(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const t=r.trim();return nn(t)?parseFloat(t):t}return an(i)?cn(i,e,n+1):i}const hn=t=>e=>e.test(t),dn=[re,we,ye,ve,Te,be,{test:t=>"auto"===t,parse:t=>t}],pn=t=>dn.find(hn(t));class fn extends en{constructor(t,e,n,s,i){super(t,e,n,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let n=0;n<t.length;n++){let s=t[n];if("string"==typeof s&&(s=s.trim(),an(s))){const i=cn(s,e.current);void 0!==i&&(t[n]=i),n===t.length-1&&(this.finalKeyframe=s)}}if(this.resolveNoneKeyframes(),!Ft.has(n)||2!==t.length)return;const[s,i]=t,r=pn(s),o=pn(i);if(r!==o)if($e(r)&&$e(o))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)("number"==typeof(s=t[e])?0===s:null===s||"none"===s||"0"===s||ie(s))&&n.push(e);var s;n.length&&function(t,e,n){let s=0,i=void 0;for(;s<t.length&&!i;){const e=t[s];"string"==typeof e&&!Ue.has(e)&&Pe(e).values.length&&(i=t[s]),s++}if(i&&n)for(const s of e)t[s]=ze(n,i)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ge[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const s=e[e.length-1];void 0!==s&&t.getValue(n,s).jump(s,!1)}measureEndState(){var t;const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const r=s.length-1,o=s[r];s[r]=Ge[n](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),(null===(t=this.removedTransforms)||void 0===t?void 0:t.length)&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}}const mn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Fe.test(t)&&"0"!==t||t.startsWith("url(")));function gn(t,e,n,s){const i=t[0];if(null===i)return!1;if("display"===e||"visibility"===e)return!0;const r=t[t.length-1],o=mn(i,e),a=mn(r,e);return!(!o||!a)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(t)||("spring"===n||d(n))&&s)}const vn=t=>null!==t;function yn(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(vn),r=e&&"loop"!==n&&e%2==1?0:i.length-1;return r&&void 0!==s?s:i[r]}class wn{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:r="loop",...o}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Rt.now(),this.options={autoplay:t,delay:e,type:n,repeat:s,repeatDelay:i,repeatType:r,...o},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(tn(),Qe()),this._resolved}onKeyframesResolved(t,e){this.resolvedAt=Rt.now(),this.hasAttemptedResolve=!0;const{name:n,type:s,velocity:i,delay:r,onComplete:o,onUpdate:a,isGenerator:l}=this.options;if(!l&&!gn(t,n,s,i)){if(!r)return a&&a(yn(t,this.options,e)),o&&o(),void this.resolveFinishedPromise();this.options.duration=0}const u=this.initPlayback(t,e);!1!==u&&(this._resolved={keyframes:t,finalKeyframe:e,...u},this.onPostResolved())}onPostResolved(){}then(t,e){return this.currentFinishedPromise.then(t,e)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function bn(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 Tn(t,e){return n=>n>0?e:t}const xn=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},Sn=[me,fe,Se];function An(t){const e=(n=t,Sn.find(t=>t.test(n)));var n;if(!Boolean(e))return!1;let s=e.parse(t);return e===Se&&(s=function({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,n/=100;let i=0,r=0,o=0;if(e/=100){const s=n<.5?n*(1+e):n+e-n*e,a=2*n-s;i=bn(a,s,t+1/3),r=bn(a,s,t),o=bn(a,s,t-1/3)}else i=r=o=n;return{red:Math.round(255*i),green:Math.round(255*r),blue:Math.round(255*o),alpha:s}}(s)),s}const Vn=(t,e)=>{const n=An(t),s=An(e);if(!n||!s)return Tn(t,e);const i={...n};return t=>(i.red=xn(n.red,s.red,t),i.green=xn(n.green,s.green,t),i.blue=xn(n.blue,s.blue,t),i.alpha=it(n.alpha,s.alpha,t),fe.transform(i))},Mn=(t,e)=>n=>e(t(n)),Pn=(...t)=>t.reduce(Mn),kn=new Set(["none","hidden"]);function En(t,e){return n=>it(t,e,n)}function Cn(t){return"number"==typeof t?En:"string"==typeof t?an(t)?Tn:Ae.test(t)?Vn:In:Array.isArray(t)?Fn:"object"==typeof t?Ae.test(t)?Vn:On:Tn}function Fn(t,e){const n=[...t],s=n.length,i=t.map((t,n)=>Cn(t)(t,e[n]));return t=>{for(let e=0;e<s;e++)n[e]=i[e](t);return n}}function On(t,e){const n={...t,...e},s={};for(const i in n)void 0!==t[i]&&void 0!==e[i]&&(s[i]=Cn(t[i])(t[i],e[i]));return t=>{for(const e in s)n[e]=s[e](t);return n}}const In=(t,e)=>{const n=Fe.createTransformer(e),s=Pe(t),i=Pe(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?kn.has(t)&&!i.values.length||kn.has(e)&&!s.values.length?function(t,e){return kn.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):Pn(Fn(function(t,e){var n;const s=[],i={color:0,var:0,number:0};for(let r=0;r<e.values.length;r++){const o=e.types[r],a=t.indexes[o][i[o]],l=null!==(n=t.values[a])&&void 0!==n?n:0;s[r]=l,i[o]++}return s}(s,i),i.values),n):Tn(t,e)};function Ln(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return it(t,e,n);return Cn(t)(t,e)}function Rn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let f=n*e;const m=h+f,g=void 0===o?m:o(m);g!==m&&(f=g-h);const v=t=>-f*Math.exp(-t/s),y=t=>g+v(t),w=t=>{const e=v(t),n=y(t);d.done=Math.abs(e)<=u,d.value=d.done?g:n};let b,T;const x=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(b=t,T=tt({keyframes:[d.value,p(d.value)],velocity:R(y,t,d.value),damping:i,stiffness:r,restDelta:u,restSpeed:c}))};return x(0),{calculatedDuration:null,next:t=>{let e=!1;return T||void 0!==b||(e=!0,w(t),x(t)),void 0!==b&&t>=b?T.next(t-b):(!e&&w(t),d)}}}const Bn=Xt(.42,0,1,1),Dn=Xt(0,0,.58,1),Wn=Xt(.42,0,.58,1),Nn={linear:e,easeIn:Bn,easeInOut:Wn,easeOut:Dn,circIn:ee,circInOut:se,circOut:ne,backIn:Jt,backInOut:Qt,backOut:_t,anticipate:te},Kn=t=>{if(f(t)){n(4===t.length);const[e,s,i,r]=t;return Xt(e,s,i,r)}return"string"==typeof t?Nn[t]:t};function jn(t,s,{clamp:r=!0,ease:o,mixer:a}={}){const l=t.length;if(n(l===s.length),1===l)return()=>s[0];if(2===l&&s[0]===s[1])return()=>s[1];const u=t[0]===t[1];t[0]>t[l-1]&&(t=[...t].reverse(),s=[...s].reverse());const c=function(t,n,s){const i=[],r=s||Ln,o=t.length-1;for(let s=0;s<o;s++){let o=r(t[s],t[s+1]);if(n){const t=Array.isArray(n)?n[s]||e:n;o=Pn(t,o)}i.push(o)}return i}(s,o,a),h=c.length,d=e=>{if(u&&e<t[0])return s[0];let n=0;if(h>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const r=i(t[n],t[n+1],e);return c[n](r)};return r?e=>d(I(t[0],t[l-1],e)):d}function zn({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=nt(s)?s.map(Kn):Kn(s),r={done:!1,value:e[0]},o=jn(function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:ot(e),t),e,{ease:Array.isArray(i)?i:(a=e,l=i,a.map(()=>l||Wn).splice(0,a.length-1))});var a,l;return{calculatedDuration:t,next:e=>(r.value=o(e),r.done=e>=t,r)}}const Un=t=>{const e=({timestamp:e})=>t(e);return{start:()=>Vt.update(e,!0),stop:()=>Mt(e),now:()=>Pt.isProcessing?Pt.timestamp:Rt.now()}},$n={decay:Rn,inertia:Rn,tween:zn,keyframes:zn,spring:tt},Hn=t=>t/100;class Yn extends wn{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:t}=this.options;t&&t()};const{name:e,motionValue:n,element:s,keyframes:i}=this.options,r=(null==s?void 0:s.KeyframeResolver)||en;this.resolver=new r(i,(t,e)=>this.onKeyframesResolved(t,e),e,n,s),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:e="keyframes",repeat:n=0,repeatDelay:s=0,repeatType:i,velocity:r=0}=this.options,o=d(e)?e:$n[e]||zn;let a,l;o!==zn&&"number"!=typeof t[0]&&(a=Pn(Hn,Ln(t[0],t[1])),t=[0,100]);const u=o({...this.options,keyframes:t});"mirror"===i&&(l=o({...this.options,keyframes:[...t].reverse(),velocity:-r})),null===u.calculatedDuration&&(u.calculatedDuration=c(u));const{calculatedDuration:h}=u,p=h+s;return{generator:u,mirroredGenerator:l,mapPercentToKeyframes:a,calculatedDuration:h,resolvedDuration:p,totalDuration:p*(n+1)-s}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&t?this.state=this.pendingPlayState:this.pause()}tick(t,e=!1){const{resolved:n}=this;if(!n){const{keyframes:t}=this.options;return{done:!0,value:t[t.length-1]}}const{finalKeyframe:s,generator:i,mirroredGenerator:r,mapPercentToKeyframes:o,keyframes:a,calculatedDuration:l,totalDuration:u,resolvedDuration:c}=n;if(null===this.startTime)return i.next(0);const{delay:h,repeat:d,repeatType:p,repeatDelay:f,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),e?this.currentTime=t:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const g=this.currentTime-h*(this.speed>=0?1:-1),v=this.speed>=0?g<0:g>u;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=u);let y=this.currentTime,w=i;if(d){const t=Math.min(this.currentTime,u)/c;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,d+1);Boolean(e%2)&&("reverse"===p?(n=1-n,f&&(n-=f/c)):"mirror"===p&&(w=r)),y=I(0,1,n)*c}const b=v?{done:!1,value:a[0]}:w.next(y);o&&(b.value=o(b.value));let{done:T}=b;v||null===l||(T=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const x=null===this.holdTime&&("finished"===this.state||"running"===this.state&&T);return x&&void 0!==s&&(b.value=yn(a,this.options,s)),m&&m(b.value),x&&this.finish(),b}get duration(){const{resolved:t}=this;return t?o(t.calculatedDuration):0}get time(){return o(this.currentTime)}set time(t){t=r(t),this.currentTime=t,null!==this.holdTime||0===this.speed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=o(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:t=Un,onPlay:e,startTime:n}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),e&&e();const s=this.driver.now();null!==this.holdTime?this.startTime=s-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=s):this.startTime=null!=n?n:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;this._resolved?(this.state="paused",this.holdTime=null!==(t=this.currentTime)&&void 0!==t?t:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const qn=new Set(["opacity","clipPath","filter","transform"]);function Xn(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeInOut",times:l}={}){const u={[e]:n};l&&(u.offset=l);const c=function t(e,n){return e?"function"==typeof e&&v()?y(e,n):f(e)?b(e):Array.isArray(e)?e.map(e=>t(e,n)||T.easeOut):T[e]:void 0}(a,i);return Array.isArray(c)&&(u.easing=c),t.animate(u,{delay:s,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:r+1,direction:"reverse"===o?"alternate":"normal"})}const Gn=s(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));const Zn={anticipate:te,backInOut:Qt,circInOut:se};class _n extends wn{constructor(t){super(t);const{name:e,motionValue:n,element:s,keyframes:i}=this.options;this.resolver=new fn(i,(t,e)=>this.onKeyframesResolved(t,e),e,n,s),this.resolver.scheduleResolve()}initPlayback(t,e){let{duration:n=300,times:s,ease:i,type:r,motionValue:o,name:a,startTime:l}=this.options;if(!o.owner||!o.owner.current)return!1;var u;if("string"==typeof i&&v()&&i in Zn&&(i=Zn[i]),d((u=this.options).type)||"spring"===u.type||!w(u.ease)){const{onComplete:e,onUpdate:o,motionValue:a,element:l,...u}=this.options,c=function(t,e){const n=new Yn({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:t[0]};const i=[];let r=0;for(;!s.done&&r<2e4;)s=n.sample(r),i.push(s.value),r+=10;return{times:void 0,keyframes:i,duration:r-10,ease:"linear"}}(t,u);1===(t=c.keyframes).length&&(t[1]=t[0]),n=c.duration,s=c.times,i=c.ease,r="keyframes"}const c=Xn(o.owner.current,a,t,{...this.options,duration:n,times:s,ease:i});return c.startTime=null!=l?l:this.calcStartTime(),this.pendingTimeline?(p(c,this.pendingTimeline),this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:n}=this.options;o.set(yn(t,this.options,e)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:n,times:s,type:r,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:e}=t;return o(e)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:e}=t;return o(e.currentTime||0)}set time(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.currentTime=r(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:e}=t;return e.playbackRate}set speed(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:e}=t;return e.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:e}=t;return e.startTime}attachTimeline(t){if(this._resolved){const{resolved:n}=this;if(!n)return e;const{animation:s}=n;p(s,t)}else this.pendingTimeline=t;return e}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:e}=t;"finished"===e.playState&&this.updateFinishedPromise(),e.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:e}=t;e.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:e,keyframes:n,duration:s,type:i,ease:o,times:a}=t;if("idle"===e.playState||"finished"===e.playState)return;if(this.time){const{motionValue:t,onUpdate:e,onComplete:l,element:u,...c}=this.options,h=new Yn({...c,keyframes:n,duration:s,type:i,ease:o,times:a,isGenerator:!0}),d=r(this.time);t.setWithVelocity(h.sample(d-10).value,h.sample(d).value,10)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:r,type:o}=t;if(!(e&&e.owner&&e.owner.current instanceof HTMLElement))return!1;const{onUpdate:a,transformTemplate:l}=e.owner.getProps();return Gn()&&n&&qn.has(n)&&!a&&!l&&!s&&"mirror"!==i&&0!==r&&"inertia"!==o}}const Jn={type:"spring",stiffness:500,damping:25,restSpeed:10},Qn={type:"keyframes",duration:.8},ts={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},es=(t,{keyframes:e})=>e.length>2?Qn:Ct.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:Jn:ts;const ns=(t,e,n,s={},i,o)=>a=>{const c=u(s,t)||{},h=c.delay||s.delay||0;let{elapsed:d=0}=s;d-=r(h);let p={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...c,delay:-d,onUpdate:t=>{e.set(t),c.onUpdate&&c.onUpdate(t)},onComplete:()=>{a(),c.onComplete&&c.onComplete()},name:t,motionValue:e,element:o?void 0:i};(function({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:r,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length})(c)||(p={...p,...es(t,p)}),p.duration&&(p.duration=r(p.duration)),p.repeatDelay&&(p.repeatDelay=r(p.repeatDelay)),void 0!==p.from&&(p.keyframes[0]=p.from);let f=!1;if((!1===p.type||0===p.duration&&!p.repeatDelay)&&(p.duration=0,0===p.delay&&(f=!0)),f&&!o&&void 0!==e.get()){const t=yn(p.keyframes,c);if(void 0!==t)return Vt.update(()=>{p.onUpdate(t),p.onComplete()}),new l([])}return!o&&_n.supports(p)?new _n(p):new Yn(p)};function ss({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,s}function is(t,e,{delay:n=0,transitionOverride:s,type:i}={}){var r;let{transition:o=t.getDefaultTransition(),transitionEnd:a,...l}=e;s&&(o=s);const c=[],h=i&&t.animationState&&t.animationState.getState()[i];for(const e in l){const s=t.getValue(e,null!==(r=t.latestValues[e])&&void 0!==r?r:null),i=l[e];if(void 0===i||h&&ss(h,e))continue;const a={delay:n,...u(o||{},e)};let d=!1;if(window.MotionHandoffAnimation){const n=Yt(t);if(n){const t=window.MotionHandoffAnimation(n,e,Vt);null!==t&&(a.startTime=t,d=!0)}}Ut(t,e),s.start(ns(e,s,i,t.shouldReduceMotion&&Ft.has(e)?{type:!1}:a,t,d));const p=s.animation;p&&c.push(p)}return a&&Promise.all(c).then(()=>{Vt.update(()=>{a&&zt(t,a)})}),c}const rs=()=>({x:{min:0,max:0},y:{min:0,max:0}}),os={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},as={};for(const t in os)as[t]={isEnabled:e=>os[t].some(t=>!!e[t])};const ls="undefined"!=typeof window,us={current:null},cs={current:!1};const hs=[...dn,Ae,Fe];const ds=["initial","animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"];function ps(t){return null!==(e=t.animate)&&"object"==typeof e&&"function"==typeof e.start||ds.some(e=>function(t){return"string"==typeof t||Array.isArray(t)}(t[e]));var e}const fs=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class ms{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:s,blockInitialAnimation:i,visualState:r},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=en,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=Rt.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,Vt.render(this.render,!1,!0))};const{latestValues:a,renderState:l,onUpdate:u}=r;this.onUpdate=u,this.latestValues=a,this.baseTarget={...a},this.initialValues=e.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=o,this.blockInitialAnimation=Boolean(i),this.isControllingVariants=ps(e),this.isVariantNode=function(t){return Boolean(ps(t)||t.variants)}(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:c,...h}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in h){const e=h[t];void 0!==a[t]&&at(e)&&e.set(a[t],!1)}}mount(t){this.current=t,xt.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),cs.current||function(){if(cs.current=!0,ls)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>us.current=t.matches;t.addListener(e),e()}else us.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||us.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){xt.delete(this.current),this.projection&&this.projection.unmount(),Mt(this.notifyUpdate),Mt(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=Ct.has(t),s=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&Vt.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=e.on("renderRequest",this.scheduleRender);let r;window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{s(),i(),r&&r(),e.owner&&e.stop()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in as){const e=as[t];if(!e)continue;const{isEnabled:n,Feature:s}=e;if(!this.features[t]&&s&&n(this.props)&&(this.features[t]=new s(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<fs.length;e++){const n=fs[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const s=t["on"+n];s&&(this.propEventSubscriptions[n]=this.on(n,s))}this.prevMotionValues=function(t,e,n){for(const s in e){const i=e[s],r=n[s];if(at(i))t.addValue(s,i);else if(at(r))t.addValue(s,Wt(i,{owner:t}));else if(r!==i)if(t.hasValue(s)){const e=t.getValue(s);!0===e.liveStyle?e.jump(i):e.hasAnimated||e.set(i)}else{const e=t.getStaticValue(s);t.addValue(s,Wt(void 0!==e?e:i,{owner:t}))}}for(const s in n)void 0===e[s]&&t.removeValue(s);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=Wt(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){var n;let s=void 0===this.latestValues[t]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,t))&&void 0!==n?n:this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];var i;return null!=s&&("string"==typeof s&&(nn(s)||ie(s))?s=parseFloat(s):(i=s,!hs.find(hn(i))&&Fe.test(e)&&(s=ze(t,e))),this.setBaseTarget(t,at(s)?s.get():s)),at(s)?s.get():s}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props;let s;if("string"==typeof n||"object"==typeof n){const i=Kt(this.props,n,null===(e=this.presenceContext)||void 0===e?void 0:e.custom);i&&(s=i[t])}if(n&&void 0!==s)return s;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||at(i)?void 0!==this.initialValues[t]&&void 0===s?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new Bt),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class gs extends ms{constructor(){super(...arguments),this.KeyframeResolver=fn}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;at(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=""+t)}))}}const vs=(t,e)=>e&&"number"==typeof t?e.transform(t):t,ys={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ws=Et.length;function bs(t,e,n){const{style:s,vars:i,transformOrigin:r}=t;let o=!1,a=!1;for(const t in e){const n=e[t];if(Ct.has(t))o=!0;else if(rn(t))i[t]=n;else{const e=vs(n,Ne[t]);t.startsWith("origin")?(a=!0,r[t]=e):s[t]=e}}if(e.transform||(o||n?s.transform=function(t,e,n){let s="",i=!0;for(let r=0;r<ws;r++){const o=Et[r],a=t[o];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(o.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const t=vs(a,Ne[o]);if(!l){i=!1;s+=`${ys[o]||o}(${t}) `}n&&(e[o]=t)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=r;s.transformOrigin=`${t} ${e} ${n}`}}const Ts={offset:"stroke-dashoffset",array:"stroke-dasharray"},xs={offset:"strokeDashoffset",array:"strokeDasharray"};function Ss(t,e,n){return"string"==typeof t?t:we.transform(e+n*t)}function As(t,{attrX:e,attrY:n,attrScale:s,originX:i,originY:r,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},c,h){if(bs(t,u,h),c)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:d,style:p,dimensions:f}=t;d.transform&&(f&&(p.transform=d.transform),delete d.transform),f&&(void 0!==i||void 0!==r||p.transform)&&(p.transformOrigin=function(t,e,n){return`${Ss(e,t.x,t.width)} ${Ss(n,t.y,t.height)}`}(f,void 0!==i?i:.5,void 0!==r?r:.5)),void 0!==e&&(d.x=e),void 0!==n&&(d.y=n),void 0!==s&&(d.scale=s),void 0!==o&&function(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?Ts:xs;t[r.offset]=we.transform(-s);const o=we.transform(e),a=we.transform(n);t[r.array]=`${o} ${a}`}(d,o,a,l,!1)}const Vs=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Ms(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const e in n)t.style.setProperty(e,n[e])}const Ps={};function ks(t,{layout:e,layoutId:n}){return Ct.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!Ps[t]||"opacity"===t)}function Es(t,e,n){var s;const{style:i}=t,r={};for(const o in i)(at(i[o])||e.style&&at(e.style[o])||ks(o,t)||void 0!==(null===(s=null==n?void 0:n.getValue(o))||void 0===s?void 0:s.liveStyle))&&(r[o]=i[o]);return r}class Cs extends gs{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=rs}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(Ct.has(e)){const t=je(e);return t&&t.default||0}return e=Vs.has(e)?e:$t(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return function(t,e,n){const s=Es(t,e,n);for(const n in t)if(at(t[n])||at(e[n])){s[-1!==Et.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return s}(t,e,n)}build(t,e,n){As(t,e,this.isSVGTag,n.transformTemplate)}renderInstance(t,e,n,s){!function(t,e,n,s){Ms(t,e,void 0,s);for(const n in e.attrs)t.setAttribute(Vs.has(n)?n:$t(n),e.attrs[n])}(t,e,0,s)}mount(t){var e;this.isSVGTag="string"==typeof(e=t.tagName)&&"svg"===e.toLowerCase(),super.mount(t)}}class Fs extends gs{constructor(){super(...arguments),this.type="html",this.renderInstance=Ms}readValueFromInstance(t,e){if(Ct.has(e)){const t=je(e);return t&&t.default||0}{const s=(n=t,window.getComputedStyle(n)),i=(rn(e)?s.getPropertyValue(e):s[e])||0;return"string"==typeof i?i.trim():i}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return function(t,e){return function({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}(t.getBoundingClientRect(),e))}(t,e)}build(t,e,n){bs(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return Es(t,e,n)}}class Os extends ms{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(function(t,e){return t in e}(e,t)){const n=t[e];if("string"==typeof n||"number"==typeof n)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}}function Is(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=function(t){return t instanceof SVGElement&&"svg"!==t.tagName}(t)?new Cs(e):new Fs(e);n.mount(t),xt.set(t,n)}function Ls(t){const e=new Os({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});e.mount(t),xt.set(t,e)}function Rs(t,e,n,s){const i=[];if(function(t,e){return at(t)||"number"==typeof t||"string"==typeof t&&!lt(e)}(t,e))i.push(function(t,e,n){const s=at(t)?t:Wt(t);return s.start(ns("",s,e,n)),s.animation}(t,lt(e)&&e.default||e,n&&n.default||n));else{const r=ut(t,e,s),o=r.length;for(let t=0;t<o;t++){const s=r[t],a=s instanceof Element?Is:Ls;xt.has(s)||a(s);const l=xt.get(s),u={...n};"delay"in u&&"function"==typeof u.delay&&(u.delay=u.delay(t,o)),i.push(...is(l,{...e,transition:u},{}))}}return i}function Bs(t,e,n){const s=[];return function(t,{defaultTransition:e={},...n}={},s,o){const a=e.duration||.3,l=new Map,u=new Map,c={},p=new Map;let f=0,m=0,g=0;for(let n=0;n<t.length;n++){const i=t[n];if("string"==typeof i){p.set(i,m);continue}if(!Array.isArray(i)){p.set(i.name,ht(m,i.at,f,p));continue}let[l,v,y={}]=i;void 0!==y.at&&(m=ht(m,y.at,f,p));let w=0;const b=(t,n,s,i=0,l=0)=>{const u=yt(t),{delay:c=0,times:p=ot(u),type:f="keyframes",repeat:v,repeatType:y,repeatDelay:b=0,...T}=n;let{ease:x=e.ease||"easeOut",duration:S}=n;const A="function"==typeof c?c(i,l):c,V=u.length,M=d(f)?f:null==o?void 0:o[f];if(V<=2&&M){let t=100;if(2===V&&Tt(u)){const e=u[1]-u[0];t=Math.abs(e)}const e={...T};void 0!==S&&(e.duration=r(S));const n=h(e,t,M);x=n.ease,S=n.duration}null!=S||(S=a);const P=m+A;1===p.length&&0===p[0]&&(p[1]=1);const k=p.length-u.length;if(k>0&&rt(p,k),1===u.length&&u.unshift(null),v){S=ct(S,v);const t=[...u],e=[...p];x=Array.isArray(x)?[...x]:[x];const n=[...x];for(let s=0;s<v;s++){u.push(...t);for(let i=0;i<t.length;i++)p.push(e[i]+(s+1)),x.push(0===i?"linear":st(n,i-1))}ft(p,v)}const E=P+S;pt(s,u,x,p,P,E),w=Math.max(A+S,w),g=Math.max(E,g)};if(at(l)){b(v,y,vt("default",gt(l,u)))}else{const t=ut(l,v,s,c),e=t.length;for(let n=0;n<e;n++){v=v,y=y;const s=gt(t[n],u);for(const t in v)b(v[t],wt(y,t),vt(t,s),n,e)}}f=m,m+=w}return u.forEach((t,s)=>{for(const r in t){const o=t[r];o.sort(mt);const a=[],u=[],c=[];for(let t=0;t<o.length;t++){const{at:e,value:n,easing:s}=o[t];a.push(n),u.push(i(0,g,e)),c.push(s||"easeOut")}0!==u[0]&&(u.unshift(0),a.unshift(a[0]),c.unshift("easeInOut")),1!==u[u.length-1]&&(u.push(1),a.push(null)),l.has(s)||l.set(s,{keyframes:{},transition:{}});const h=l.get(s);h.keyframes[r]=a,h.transition[r]={...e,duration:g,ease:c,times:u,...n}}}),l}(t,e,n,{spring:tt}).forEach(({keyframes:t,transition:e},n)=>{s.push(...Rs(n,t,e))}),s}function Ds(t){return function(e,n,s){let i=[];var r;r=e,i=Array.isArray(r)&&r.some(Array.isArray)?Bs(e,n,t):Rs(e,n,s,t);const o=new l(i);return t&&t.animations.push(o),o}}const Ws=Ds();function Ns(t,e,n){t.style.setProperty("--"+e,n)}function Ks(t,e,n){t.style[e]=n}const js=s(()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0}),zs=new WeakMap;function Us(t){const e=zs.get(t)||new Map;return zs.set(t,e),zs.get(t)}class $s extends class{constructor(t){this.animation=t}get duration(){var t,e,n;const s=(null===(e=null===(t=this.animation)||void 0===t?void 0:t.effect)||void 0===e?void 0:e.getComputedTiming().duration)||(null===(n=this.options)||void 0===n?void 0:n.duration)||300;return o(Number(s))}get time(){var t;return this.animation?o((null===(t=this.animation)||void 0===t?void 0:t.currentTime)||0):0}set time(t){this.animation&&(this.animation.currentTime=r(t))}get speed(){return this.animation?this.animation.playbackRate:1}set speed(t){this.animation&&(this.animation.playbackRate=t)}get state(){return this.animation?this.animation.playState:"finished"}get startTime(){return this.animation?this.animation.startTime:null}get finished(){return this.animation?this.animation.finished:Promise.resolve()}play(){this.animation&&this.animation.play()}pause(){this.animation&&this.animation.pause()}stop(){this.animation&&"idle"!==this.state&&"finished"!==this.state&&(this.animation.commitStyles&&this.animation.commitStyles(),this.cancel())}flatten(){var t;this.animation&&(null===(t=this.animation.effect)||void 0===t||t.updateTiming({easing:"linear"}))}attachTimeline(t){return this.animation&&p(this.animation,t),e}complete(){this.animation&&this.animation.finish()}cancel(){try{this.animation&&this.animation.cancel()}catch(t){}}}{constructor(t,e,s,i){const o=e.startsWith("--");n("string"!=typeof i.type);const a=Us(t).get(e);a&&a.stop();if(Array.isArray(s)||(s=[s]),function(t,e,n){for(let s=0;s<e.length;s++)null===e[s]&&(e[s]=0===s?n():e[s-1]),"number"==typeof e[s]&&Be[t]&&(e[s]=Be[t].transform(e[s]));!js()&&e.length<2&&e.unshift(n())}(e,s,()=>e.startsWith("--")?t.style.getPropertyValue(e):window.getComputedStyle(t)[e]),d(i.type)){const t=h(i,100,i.type);i.ease=v()?t.ease:"easeOut",i.duration=r(t.duration),i.type="keyframes"}else i.ease=i.ease||"easeOut";const l=()=>{this.setValue(t,e,yn(s,i)),this.cancel(),this.resolveFinishedPromise()},u=()=>{this.setValue=o?Ns:Ks,this.options=i,this.updateFinishedPromise(),this.removeAnimation=()=>{const n=zs.get(t);n&&n.delete(e)}};Gn()?(super(Xn(t,e,s,i)),u(),!1===i.autoplay&&this.animation.pause(),this.animation.onfinish=l,Us(t).set(e,this)):(super(),u(),l())}then(t,e){return this.currentFinishedPromise.then(t,e)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}play(){"finished"===this.state&&this.updateFinishedPromise(),super.play()}cancel(){this.removeAnimation(),super.cancel()}}const Hs=(t=>function(e,n,s){return new l(function(t,e,n,s){const i=A(t,s),o=i.length,a=[];for(let t=0;t<o;t++){const s=i[t],l={...n};"function"==typeof l.delay&&(l.delay=l.delay(t,o));for(const t in e){const n=e[t],i={...u(l,t)};i.duration=i.duration?r(i.duration):i.duration,i.delay=r(i.delay||0),a.push(new $s(s,t,n,i))}}return a}(e,n,s,t))})();function Ys(t,e){let n;const s=()=>{const{currentTime:s}=e,i=(null===s?0:s.value)/100;n!==i&&t(i),n=i};return Vt.update(s,!0),()=>Mt(s)}const qs=new WeakMap;let Xs;function Gs({target:t,contentRect:e,borderBoxSize:n}){var s;null===(s=qs.get(t))||void 0===s||s.forEach(s=>{s({target:t,contentSize:e,get size(){return function(t,e){if(e){const{inlineSize:t,blockSize:n}=e[0];return{width:t,height:n}}return t instanceof SVGElement&&"getBBox"in t?t.getBBox():{width:t.offsetWidth,height:t.offsetHeight}}(t,n)}})})}function Zs(t){t.forEach(Gs)}function _s(t,e){Xs||"undefined"!=typeof ResizeObserver&&(Xs=new ResizeObserver(Zs));const n=A(t);return n.forEach(t=>{let n=qs.get(t);n||(n=new Set,qs.set(t,n)),n.add(e),null==Xs||Xs.observe(t)}),()=>{n.forEach(t=>{const n=qs.get(t);null==n||n.delete(e),(null==n?void 0:n.size)||null==Xs||Xs.unobserve(t)})}}const Js=new Set;let Qs;function ti(t){return Js.add(t),Qs||(Qs=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};Js.forEach(t=>t(e))},window.addEventListener("resize",Qs)),()=>{Js.delete(t),!Js.size&&Qs&&(Qs=void 0)}}const ei={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function ni(t,e,n,s){const r=n[e],{length:o,position:a}=ei[e],l=r.current,u=n.time;r.current=t["scroll"+a],r.scrollLength=t["scroll"+o]-t["client"+o],r.offset.length=0,r.offset[0]=0,r.offset[1]=r.scrollLength,r.progress=i(0,r.scrollLength,r.current);const c=s-u;r.velocity=c>50?0:L(r.current-l,c)}const si={start:0,center:.5,end:1};function ii(t,e,n=0){let s=0;if(t in si&&(t=si[t]),"string"==typeof t){const e=parseFloat(t);t.endsWith("px")?s=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?s=e/100*document.documentElement.clientWidth:t.endsWith("vh")?s=e/100*document.documentElement.clientHeight:t=e}return"number"==typeof t&&(s=e*t),n+s}const ri=[0,0];function oi(t,e,n,s){let i=Array.isArray(t)?t:ri,r=0,o=0;return"number"==typeof t?i=[t,t]:"string"==typeof t&&(i=(t=t.trim()).includes(" ")?t.split(" "):[t,si[t]?t:"0"]),r=ii(i[0],n,s),o=ii(i[1],e),r-o}const ai={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},li={x:0,y:0};function ui(t,e,n){const{offset:s=ai.All}=n,{target:i=t,axis:r="y"}=n,o="y"===r?"height":"width",a=i!==t?function(t,e){const n={x:0,y:0};let s=t;for(;s&&s!==e;)if(s instanceof HTMLElement)n.x+=s.offsetLeft,n.y+=s.offsetTop,s=s.offsetParent;else if("svg"===s.tagName){const t=s.getBoundingClientRect();s=s.parentElement;const e=s.getBoundingClientRect();n.x+=t.left-e.left,n.y+=t.top-e.top}else{if(!(s instanceof SVGGraphicsElement))break;{const{x:t,y:e}=s.getBBox();n.x+=t,n.y+=e;let i=null,r=s.parentNode;for(;!i;)"svg"===r.tagName&&(i=r),r=s.parentNode;s=i}}return n}(i,t):li,l=i===t?{width:t.scrollWidth,height:t.scrollHeight}:function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(i),u={width:t.clientWidth,height:t.clientHeight};e[r].offset.length=0;let c=!e[r].interpolate;const h=s.length;for(let t=0;t<h;t++){const n=oi(s[t],u[o],l[o],a[r]);c||n===e[r].interpolatorOffsets[t]||(c=!0),e[r].offset[t]=n}c&&(e[r].interpolate=jn(e[r].offset,ot(s),{clamp:!1}),e[r].interpolatorOffsets=[...e[r].offset]),e[r].progress=I(0,1,e[r].interpolate(e[r].current))}function ci(t,e,n,s={}){return{measure:()=>function(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let s=e;for(;s&&s!==t;)n.x.targetOffset+=s.offsetLeft,n.y.targetOffset+=s.offsetTop,s=s.offsetParent}n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight}(t,s.target,n),update:e=>{!function(t,e,n){ni(t,"x",e,n),ni(t,"y",e,n),e.time=n}(t,n,e),(s.offset||s.target)&&ui(t,n,s)},notify:()=>e(n)}}const hi=new WeakMap,di=new WeakMap,pi=new WeakMap,fi=t=>t===document.documentElement?window:t;function mi(t,{container:e=document.documentElement,...n}={}){let s=pi.get(e);s||(s=new Set,pi.set(e,s));const i=ci(e,t,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},n);if(s.add(i),!hi.has(e)){const t=()=>{for(const t of s)t.measure()},n=()=>{for(const t of s)t.update(Pt.timestamp)},i=()=>{for(const t of s)t.notify()},a=()=>{Vt.read(t,!1,!0),Vt.read(n,!1,!0),Vt.update(i,!1,!0)};hi.set(e,a);const l=fi(e);window.addEventListener("resize",a,{passive:!0}),e!==document.documentElement&&di.set(e,(o=a,"function"==typeof(r=e)?ti(r):_s(r,o))),l.addEventListener("scroll",a,{passive:!0})}var r,o;const a=hi.get(e);return Vt.read(a,!1,!0),()=>{var t;Mt(a);const n=pi.get(e);if(!n)return;if(n.delete(i),n.size)return;const s=hi.get(e);hi.delete(e),s&&(fi(e).removeEventListener("scroll",s),null===(t=di.get(e))||void 0===t||t(),window.removeEventListener("resize",s))}}const gi=new Map;function vi({source:t,container:e=document.documentElement,axis:n="y"}={}){t&&(e=t),gi.has(e)||gi.set(e,{});const s=gi.get(e);return s[n]||(s[n]=a()?new ScrollTimeline({source:e,axis:n}):function({source:t,container:e,axis:n="y"}){t&&(e=t);const s={value:0},i=mi(t=>{s.value=100*t[n].progress},{container:e,axis:n});return{currentTime:s,cancel:i}}({source:e,axis:n})),s[n]}function yi(t){return t&&(t.target||t.offset)}const wi={some:0,all:1};const bi=(t,e)=>Math.abs(t-e);const Ti=Vt,xi=At.reduce((t,e)=>(t[e]=t=>Mt(t),t),{});t.MotionValue=Dt,t.animate=Ws,t.animateMini=Hs,t.anticipate=te,t.backIn=Jt,t.backInOut=Qt,t.backOut=_t,t.cancelFrame=Mt,t.cancelSync=xi,t.circIn=ee,t.circInOut=se,t.circOut=ne,t.clamp=I,t.createScopedAnimate=Ds,t.cubicBezier=Xt,t.delay=function(t,e){return function(t,e){const n=Rt.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(Mt(s),t(r-e))};return Vt.read(s,!0),()=>Mt(s)}(t,r(e))},t.distance=bi,t.distance2D=function(t,e){const n=bi(t.x,e.x),s=bi(t.y,e.y);return Math.sqrt(n**2+s**2)},t.easeIn=Bn,t.easeInOut=Wn,t.easeOut=Dn,t.frame=Vt,t.frameData=Pt,t.frameSteps=kt,t.hover=function(t,e,n={}){const[s,i,r]=V(t,n),o=t=>{if(!M(t))return;const{target:n}=t,s=e(n,t);if("function"!=typeof s||!n)return;const r=t=>{M(t)&&(s(t),n.removeEventListener("pointerleave",r))};n.addEventListener("pointerleave",r,i)};return s.forEach(t=>{t.addEventListener("pointerenter",o,i)}),r},t.inView=function(t,e,{root:n,margin:s,amount:i="some"}={}){const r=A(t),o=new WeakMap,a=new IntersectionObserver(t=>{t.forEach(t=>{const n=o.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){const n=e(t.target,t);"function"==typeof n?o.set(t.target,n):a.unobserve(t.target)}else"function"==typeof n&&(n(t),o.delete(t.target))})},{root:n,rootMargin:s,threshold:"number"==typeof i?i:wi[i]});return r.forEach(t=>a.observe(t)),()=>a.disconnect()},t.inertia=Rn,t.interpolate=jn,t.invariant=n,t.isDragActive=S,t.keyframes=zn,t.mirrorEasing=Gt,t.mix=Ln,t.motionValue=Wt,t.noop=e,t.pipe=Pn,t.press=function(t,e,n={}){const[s,i,r]=V(t,n),o=t=>{const s=t.currentTarget;if(!O(t)||E.has(s))return;E.add(s);const r=e(s,t),o=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),O(t)&&E.has(s)&&(E.delete(s),"function"==typeof r&&r(t,{success:e}))},a=t=>{o(t,n.useGlobalTarget||P(s,t.target))},l=t=>{o(t,!1)};window.addEventListener("pointerup",a,i),window.addEventListener("pointercancel",l,i)};return s.forEach(t=>{(function(t){return k.has(t.tagName)||-1!==t.tabIndex})(t)||null!==t.getAttribute("tabindex")||(t.tabIndex=0);(n.useGlobalTarget?window:t).addEventListener("pointerdown",o,i),t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const s=C(()=>{if(E.has(n))return;F(n,"down");const t=C(()=>{F(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>F(n,"cancel"),e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)})(t,i),i)}),r},t.progress=i,t.reverseEasing=Zt,t.scroll=function(t,{axis:n="y",...s}={}){const i={axis:n,...s};return"function"==typeof t?function(t,e){return function(t){return 2===t.length}(t)||yi(e)?mi(n=>{t(n[e.axis].progress,n)},e):Ys(t,vi(e))}(t,i):function(t,n){if(t.flatten(),yi(n))return t.pause(),mi(e=>{t.time=t.duration*e[n.axis].progress},n);{const s=vi(n);return t.attachTimeline?t.attachTimeline(s,t=>(t.pause(),Ys(e=>{t.time=t.duration*e},s))):e}}(t,i)},t.scrollInfo=mi,t.spring=tt,t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:s}={}){return(i,r)=>{const o="number"==typeof n?n:function(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}(n,r),a=Math.abs(o-i);let l=t*a;if(s){const e=r*t;l=Kn(s)(l/e)*e}return e+l}},t.steps=function(t,e="end"){return n=>{const s=(n="end"===e?Math.min(n,.999):Math.max(n,.001))*t,i="end"===e?Math.floor(s):Math.ceil(s);return I(0,1,i/t)}},t.sync=Ti,t.time=Rt,t.transform=function(...t){const e=!Array.isArray(t[0]),n=e?0:-1,s=t[0+n],i=t[1+n],r=t[2+n],o=t[3+n],a=jn(i,r,{mixer:(l=r[0],(t=>t&&"object"==typeof t&&t.mix)(l)?l.mix:void 0),...o});var l;return e?a(s):a},t.wrap=et}));
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={})}(this,(function(t){"use strict";const e=t=>t;let n=e;function s(t){let e;return()=>(void 0===e&&(e=t()),e)}const i=(t,e,n)=>{const s=e-t;return 0===s?1:(n-t)/s},r=t=>1e3*t,o=t=>t/1e3,a=s(()=>void 0!==window.ScrollTimeline);class l extends class{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t,e){const n=this.animations.map(n=>a()&&n.attachTimeline?n.attachTimeline(t):"function"==typeof e?e(n):void 0);return()=>{n.forEach((t,e)=>{t&&t(),this.animations[e].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let e=0;e<this.animations.length;e++)t=Math.max(t,this.animations[e].duration);return t}runAll(t){this.animations.forEach(e=>e[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}{then(t,e){return Promise.all(this.animations).then(t).catch(e)}}function u(t,e){return t?t[e]||t.default||t:void 0}function c(t){let e=0;let n=t.next(e);for(;!n.done&&e<2e4;)e+=50,n=t.next(e);return e>=2e4?1/0:e}function h(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(c(s),2e4);return{type:"keyframes",ease:t=>s.next(i*t).value/e,duration:o(i)}}function d(t){return"function"==typeof t}function p(t,e){t.timeline=e,t.onfinish=null}const f=t=>Array.isArray(t)&&"number"==typeof t[0],m={linearEasing:void 0};function g(t,e){const n=s(t);return()=>{var t;return null!==(t=m[e])&&void 0!==t?t:n()}}const v=g(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),y=(t,e,n=10)=>{let s="";const r=Math.max(Math.round(e/n),2);for(let e=0;e<r;e++)s+=t(i(0,r-1,e))+", ";return`linear(${s.substring(0,s.length-2)})`};function w(t){return Boolean("function"==typeof t&&v()||!t||"string"==typeof t&&(t in T||v())||f(t)||Array.isArray(t)&&t.every(w))}const b=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,T={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:b([0,.65,.55,1]),circOut:b([.55,0,1,.45]),backIn:b([.31,.01,.66,-.59]),backOut:b([.33,1.53,.69,.99])};const x=!1;function S(){return x}function A(t,e,n){var s;if(t instanceof Element)return[t];if("string"==typeof t){let i=document;e&&(i=e.current);const r=null!==(s=null==n?void 0:n[t])&&void 0!==s?s:i.querySelectorAll(t);return r?Array.from(r):[]}return Array.from(t)}function V(t,e){const n=A(t),s=new AbortController;return[n,{passive:!0,...e,signal:s.signal},()=>s.abort()]}function M(t){return!("touch"===t.pointerType||S())}const P=(t,e)=>!!e&&(t===e||P(t,e.parentElement)),k=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const E=new WeakSet;function C(t){return e=>{"Enter"===e.key&&t(e)}}function F(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function O(t){return(t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary)(t)&&!S()}const I=(t,e,n)=>n>e?e:n<t?t:n;function L(t,e){return e?t*(1e3/e):0}function R(t,e,n){const s=Math.max(e-5,0);return L(n-t(s),e-s)}const B=100,D=10,W=1,N=0,K=800,j=.3,z=.3,U={granular:.01,default:2},$={granular:.005,default:.5},H=.01,Y=10,q=.05,X=1;function G({duration:t=K,bounce:e=j,velocity:n=N,mass:s=W}){let i,a,l=1-e;l=I(q,X,l),t=I(H,Y,o(t)),l<1?(i=e=>{const s=e*l,i=s*t;return.001-(s-n)/Z(e,l)*Math.exp(-i)},a=e=>{const s=e*l*t,r=s*n+n,o=Math.pow(l,2)*Math.pow(e,2)*t,a=Math.exp(-s),u=Z(Math.pow(e,2),l);return(.001-i(e)>0?-1:1)*((r-o)*a)/u}):(i=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,a=e=>Math.exp(-e*t)*(t*t*(n-e)));const u=function(t,e,n){let s=n;for(let n=1;n<12;n++)s-=t(s)/e(s);return s}(i,a,5/t);if(t=r(t),isNaN(u))return{stiffness:B,damping:D,duration:t};{const e=Math.pow(u,2)*s;return{stiffness:e,damping:2*l*Math.sqrt(s*e),duration:t}}}function Z(t,e){return t*Math.sqrt(1-e*e)}const _=["duration","bounce"],J=["stiffness","damping","mass"];function Q(t,e){return e.some(e=>void 0!==t[e])}function tt(t=z,e=j){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const a=n.keyframes[0],l=n.keyframes[n.keyframes.length-1],u={done:!1,value:a},{stiffness:h,damping:d,mass:p,duration:f,velocity:m,isResolvedFromDuration:g}=function(t){let e={velocity:N,stiffness:B,damping:D,mass:W,isResolvedFromDuration:!1,...t};if(!Q(t,J)&&Q(t,_))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(1.2*n),i=s*s,r=2*I(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:W,stiffness:i,damping:r}}else{const n=G(t);e={...e,...n,mass:W},e.isResolvedFromDuration=!0}return e}({...n,velocity:-o(n.velocity||0)}),v=m||0,w=d/(2*Math.sqrt(h*p)),b=l-a,T=o(Math.sqrt(h/p)),x=Math.abs(b)<5;let S;if(s||(s=x?U.granular:U.default),i||(i=x?$.granular:$.default),w<1){const t=Z(T,w);S=e=>{const n=Math.exp(-w*T*e);return l-n*((v+w*T*b)/t*Math.sin(t*e)+b*Math.cos(t*e))}}else if(1===w)S=t=>l-Math.exp(-T*t)*(b+(v+T*b)*t);else{const t=T*Math.sqrt(w*w-1);S=e=>{const n=Math.exp(-w*T*e),s=Math.min(t*e,300);return l-n*((v+w*T*b)*Math.sinh(s)+t*b*Math.cosh(s))/t}}const A={calculatedDuration:g&&f||null,next:t=>{const e=S(t);if(g)u.done=t>=f;else{let n=0;w<1&&(n=0===t?r(v):R(S,t,e));const o=Math.abs(n)<=s,a=Math.abs(l-e)<=i;u.done=o&&a}return u.value=u.done?l:e,u},toString:()=>{const t=Math.min(c(A),2e4),e=y(e=>A.next(t*e).value,t,30);return t+"ms "+e}};return A}const et=(t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t},nt=t=>Array.isArray(t)&&"number"!=typeof t[0];function st(t,e){return nt(t)?t[et(0,t.length,e)]:t}const it=(t,e,n)=>t+(e-t)*n;function rt(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const r=i(0,e,s);t.push(it(n,1,r))}}function ot(t){const e=[0];return rt(e,t.length-1),e}const at=t=>Boolean(t&&t.getVelocity);function lt(t){return"object"==typeof t&&!Array.isArray(t)}function ut(t,e,n,s){return"string"==typeof t&<(e)?A(t,n,s):t instanceof NodeList?Array.from(t):Array.isArray(t)?t:[t]}function ct(t,e,n){return t*(e+1)}function ht(t,e,n,s){var i;return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:null!==(i=s.get(e))&&void 0!==i?i:t}function dt(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}function pt(t,e,n,s,i,r){!function(t,e,n){for(let s=0;s<t.length;s++){const i=t[s];i.at>e&&i.at<n&&(dt(t,i),s--)}}(t,i,r);for(let o=0;o<e.length;o++)t.push({value:e[o],at:it(i,r,s[o]),easing:st(n,o)})}function ft(t,e){for(let n=0;n<t.length;n++)t[n]=t[n]/(e+1)}function mt(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function gt(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function vt(t,e){return e[t]||(e[t]=[]),e[t]}function yt(t){return Array.isArray(t)?t:[t]}function wt(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const bt=t=>"number"==typeof t,Tt=t=>t.every(bt),xt=new WeakMap,St=!1;const At=["read","resolveKeyframes","update","preRender","render","postRender"];const{schedule:Vt,cancel:Mt,state:Pt,steps:kt}=function(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=At.reduce((t,e)=>(t[e]=function(t){let e=new Set,n=new Set,s=!1,i=!1;const r=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(e){r.has(e)&&(l.schedule(e),t()),e(o)}const l={schedule:(t,i=!1,o=!1)=>{const a=o&&s?e:n;return i&&r.add(t),a.has(t)||a.add(t),t},cancel:t=>{n.delete(t),r.delete(t)},process:t=>{o=t,s?i=!0:(s=!0,[e,n]=[n,e],e.forEach(a),e.clear(),s=!1,i&&(i=!1,l.process(t)))}};return l}(r),t),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:h,postRender:d}=o,p=()=>{const r=performance.now();n=!1,i.delta=s?1e3/60:Math.max(Math.min(r-i.timestamp,40),1),i.timestamp=r,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),h.process(i),d.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(p))};return{schedule:At.reduce((e,r)=>{const a=o[r];return e[r]=(e,r=!1,o=!1)=>(n||(n=!0,s=!0,i.isProcessing||t(p)),a.schedule(e,r,o)),e},{}),cancel:t=>{for(let e=0;e<At.length;e++)o[At[e]].cancel(t)},state:i,steps:o}}("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:e,!0),Et=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ct=new Set(Et),Ft=new Set(["width","height","top","left","right","bottom",...Et]),Ot=t=>(t=>Array.isArray(t))(t)?t[t.length-1]||0:t;let It;function Lt(){It=void 0}const Rt={now:()=>(void 0===It&&Rt.set(Pt.isProcessing||St?Pt.timestamp:performance.now()),It),set:t=>{It=t,queueMicrotask(Lt)}};class Bt{constructor(){this.subscriptions=[]}add(t){var e,n;return e=this.subscriptions,n=t,-1===e.indexOf(n)&&e.push(n),()=>dt(this.subscriptions,t)}notify(t,e,n){const s=this.subscriptions.length;if(s)if(1===s)this.subscriptions[0](t,e,n);else for(let i=0;i<s;i++){const s=this.subscriptions[i];s&&s(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}class Dt{constructor(t,e={}){this.version="12.0.6",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=Rt.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),e&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=Rt.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new Bt);const n=this.events[t].add(e);return"change"===t?()=>{n(),Vt.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Rt.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return L(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Wt(t,e){return new Dt(t,e)}function Nt(t){const e=[{},{}];return null==t||t.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function Kt(t,e,n,s){if("function"==typeof e){const[i,r]=Nt(s);e=e(void 0!==n?n:t.custom,i,r)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[i,r]=Nt(s);e=e(void 0!==n?n:t.custom,i,r)}return e}function jt(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Wt(n))}function zt(t,e){const n=function(t,e,n){const s=t.getProps();return Kt(s,e,void 0!==n?n:s.custom,t)}(t,e);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const e in r){jt(t,e,Ot(r[e]))}}function Ut(t,e){const n=t.getValue("willChange");if(s=n,Boolean(at(s)&&s.add))return n.add(e);var s}const $t=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Ht="data-"+$t("framerAppearId");function Yt(t){return t.props[Ht]}const qt=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function Xt(t,n,s,i){if(t===n&&s===i)return e;const r=e=>function(t,e,n,s,i){let r,o,a=0;do{o=e+(n-e)/2,r=qt(o,s,i)-t,r>0?n=o:e=o}while(Math.abs(r)>1e-7&&++a<12);return o}(e,0,1,t,s);return t=>0===t||1===t?t:qt(r(t),n,i)}const Gt=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Zt=t=>e=>1-t(1-e),_t=Xt(.33,1.53,.69,.99),Jt=Zt(_t),Qt=Gt(Jt),te=t=>(t*=2)<1?.5*Jt(t):.5*(2-Math.pow(2,-10*(t-1))),ee=t=>1-Math.sin(Math.acos(t)),ne=Zt(ee),se=Gt(ee),ie=t=>/^0[^.\s]+$/u.test(t);const re={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},oe={...re,transform:t=>I(0,1,t)},ae={...re,default:1},le=t=>Math.round(1e5*t)/1e5,ue=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const ce=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,he=(t,e)=>n=>Boolean("string"==typeof n&&ce.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),de=(t,e,n)=>s=>{if("string"!=typeof s)return s;const[i,r,o,a]=s.match(ue);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:void 0!==a?parseFloat(a):1}},pe={...re,transform:t=>Math.round((t=>I(0,255,t))(t))},fe={test:he("rgb","red"),parse:de("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+pe.transform(t)+", "+pe.transform(e)+", "+pe.transform(n)+", "+le(oe.transform(s))+")"};const me={test:he("#"),parse:function(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}},transform:fe.transform},ge=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),ve=ge("deg"),ye=ge("%"),we=ge("px"),be=ge("vh"),Te=ge("vw"),xe={...ye,parse:t=>ye.parse(t)/100,transform:t=>ye.transform(100*t)},Se={test:he("hsl","hue"),parse:de("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+ye.transform(le(e))+", "+ye.transform(le(n))+", "+le(oe.transform(s))+")"},Ae={test:t=>fe.test(t)||me.test(t)||Se.test(t),parse:t=>fe.test(t)?fe.parse(t):Se.test(t)?Se.parse(t):me.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?fe.transform(t):Se.transform(t)},Ve=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const Me=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Pe(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const o=e.replace(Me,t=>(Ae.test(t)?(s.color.push(r),i.push("color"),n.push(Ae.parse(t))):t.startsWith("var(")?(s.var.push(r),i.push("var"),n.push(t)):(s.number.push(r),i.push("number"),n.push(parseFloat(t))),++r,"${}")).split("${}");return{values:n,split:o,indexes:s,types:i}}function ke(t){return Pe(t).values}function Ee(t){const{split:e,types:n}=Pe(t),s=e.length;return t=>{let i="";for(let r=0;r<s;r++)if(i+=e[r],void 0!==t[r]){const e=n[r];i+="number"===e?le(t[r]):"color"===e?Ae.transform(t[r]):t[r]}return i}}const Ce=t=>"number"==typeof t?0:t;const Fe={test:function(t){var e,n;return isNaN(t)&&"string"==typeof t&&((null===(e=t.match(ue))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(Ve))||void 0===n?void 0:n.length)||0)>0},parse:ke,createTransformer:Ee,getAnimatableNone:function(t){const e=ke(t);return Ee(t)(e.map(Ce))}},Oe=new Set(["brightness","contrast","saturate","opacity"]);function Ie(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[s]=n.match(ue)||[];if(!s)return t;const i=n.replace(s,"");let r=Oe.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const Le=/\b([a-z-]*)\(.*?\)/gu,Re={...Fe,getAnimatableNone:t=>{const e=t.match(Le);return e?e.map(Ie).join(" "):t}},Be={borderWidth:we,borderTopWidth:we,borderRightWidth:we,borderBottomWidth:we,borderLeftWidth:we,borderRadius:we,radius:we,borderTopLeftRadius:we,borderTopRightRadius:we,borderBottomRightRadius:we,borderBottomLeftRadius:we,width:we,maxWidth:we,height:we,maxHeight:we,top:we,right:we,bottom:we,left:we,padding:we,paddingTop:we,paddingRight:we,paddingBottom:we,paddingLeft:we,margin:we,marginTop:we,marginRight:we,marginBottom:we,marginLeft:we,backgroundPositionX:we,backgroundPositionY:we},De={rotate:ve,rotateX:ve,rotateY:ve,rotateZ:ve,scale:ae,scaleX:ae,scaleY:ae,scaleZ:ae,skew:ve,skewX:ve,skewY:ve,distance:we,translateX:we,translateY:we,translateZ:we,x:we,y:we,z:we,perspective:we,transformPerspective:we,opacity:oe,originX:xe,originY:xe,originZ:we},We={...re,transform:Math.round},Ne={...Be,...De,zIndex:We,size:we,fillOpacity:oe,strokeOpacity:oe,numOctaves:We},Ke={...Ne,color:Ae,backgroundColor:Ae,outlineColor:Ae,fill:Ae,stroke:Ae,borderColor:Ae,borderTopColor:Ae,borderRightColor:Ae,borderBottomColor:Ae,borderLeftColor:Ae,filter:Re,WebkitFilter:Re},je=t=>Ke[t];function ze(t,e){let n=je(t);return n!==Re&&(n=Fe),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Ue=new Set(["auto","none","0"]);const $e=t=>t===re||t===we,He=(t,e)=>parseFloat(t.split(", ")[e]),Ye=(t,e)=>(n,{transform:s})=>{if("none"===s||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/u);if(i)return He(i[1],e);{const e=s.match(/^matrix\((.+)\)$/u);return e?He(e[1],t):0}},qe=new Set(["x","y","z"]),Xe=Et.filter(t=>!qe.has(t));const Ge={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:Ye(4,13),y:Ye(5,14)};Ge.translateX=Ge.x,Ge.translateY=Ge.y;const Ze=new Set;let _e=!1,Je=!1;function Qe(){if(Je){const t=Array.from(Ze).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),n=new Map;e.forEach(t=>{const e=function(t){const e=[];return Xe.forEach(n=>{const s=t.getValue(n);void 0!==s&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}(t);e.length&&(n.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=n.get(t);e&&e.forEach(([e,n])=>{var s;null===(s=t.getValue(e))||void 0===s||s.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}Je=!1,_e=!1,Ze.forEach(t=>t.complete()),Ze.clear()}function tn(){Ze.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Je=!0)})}class en{constructor(t,e,n,s,i,r=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=s,this.element=i,this.isAsync=r}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Ze.add(this),_e||(_e=!0,Vt.read(tn),Vt.resolveKeyframes(Qe))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:s}=this;for(let i=0;i<t.length;i++)if(null===t[i])if(0===i){const i=null==s?void 0:s.get(),r=t[t.length-1];if(void 0!==i)t[0]=i;else if(n&&e){const s=n.readValue(e,r);null!=s&&(t[0]=s)}void 0===t[0]&&(t[0]=r),s&&void 0===i&&s.set(t[0])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Ze.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Ze.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const nn=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),sn=t=>e=>"string"==typeof e&&e.startsWith(t),rn=sn("--"),on=sn("var(--"),an=t=>!!on(t)&&ln.test(t.split("/*")[0].trim()),ln=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,un=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function cn(t,e,n=1){const[s,i]=function(t){const e=un.exec(t);if(!e)return[,];const[,n,s,i]=e;return["--"+(null!=n?n:s),i]}(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const t=r.trim();return nn(t)?parseFloat(t):t}return an(i)?cn(i,e,n+1):i}const hn=t=>e=>e.test(t),dn=[re,we,ye,ve,Te,be,{test:t=>"auto"===t,parse:t=>t}],pn=t=>dn.find(hn(t));class fn extends en{constructor(t,e,n,s,i){super(t,e,n,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let n=0;n<t.length;n++){let s=t[n];if("string"==typeof s&&(s=s.trim(),an(s))){const i=cn(s,e.current);void 0!==i&&(t[n]=i),n===t.length-1&&(this.finalKeyframe=s)}}if(this.resolveNoneKeyframes(),!Ft.has(n)||2!==t.length)return;const[s,i]=t,r=pn(s),o=pn(i);if(r!==o)if($e(r)&&$e(o))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)("number"==typeof(s=t[e])?0===s:null===s||"none"===s||"0"===s||ie(s))&&n.push(e);var s;n.length&&function(t,e,n){let s=0,i=void 0;for(;s<t.length&&!i;){const e=t[s];"string"==typeof e&&!Ue.has(e)&&Pe(e).values.length&&(i=t[s]),s++}if(i&&n)for(const s of e)t[s]=ze(n,i)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ge[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const s=e[e.length-1];void 0!==s&&t.getValue(n,s).jump(s,!1)}measureEndState(){var t;const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const r=s.length-1,o=s[r];s[r]=Ge[n](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),(null===(t=this.removedTransforms)||void 0===t?void 0:t.length)&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}}const mn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Fe.test(t)&&"0"!==t||t.startsWith("url(")));function gn(t,e,n,s){const i=t[0];if(null===i)return!1;if("display"===e||"visibility"===e)return!0;const r=t[t.length-1],o=mn(i,e),a=mn(r,e);return!(!o||!a)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(t)||("spring"===n||d(n))&&s)}const vn=t=>null!==t;function yn(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(vn),r=e&&"loop"!==n&&e%2==1?0:i.length-1;return r&&void 0!==s?s:i[r]}class wn{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:r="loop",...o}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Rt.now(),this.options={autoplay:t,delay:e,type:n,repeat:s,repeatDelay:i,repeatType:r,...o},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(tn(),Qe()),this._resolved}onKeyframesResolved(t,e){this.resolvedAt=Rt.now(),this.hasAttemptedResolve=!0;const{name:n,type:s,velocity:i,delay:r,onComplete:o,onUpdate:a,isGenerator:l}=this.options;if(!l&&!gn(t,n,s,i)){if(!r)return a&&a(yn(t,this.options,e)),o&&o(),void this.resolveFinishedPromise();this.options.duration=0}const u=this.initPlayback(t,e);!1!==u&&(this._resolved={keyframes:t,finalKeyframe:e,...u},this.onPostResolved())}onPostResolved(){}then(t,e){return this.currentFinishedPromise.then(t,e)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function bn(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 Tn(t,e){return n=>n>0?e:t}const xn=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},Sn=[me,fe,Se];function An(t){const e=(n=t,Sn.find(t=>t.test(n)));var n;if(!Boolean(e))return!1;let s=e.parse(t);return e===Se&&(s=function({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,n/=100;let i=0,r=0,o=0;if(e/=100){const s=n<.5?n*(1+e):n+e-n*e,a=2*n-s;i=bn(a,s,t+1/3),r=bn(a,s,t),o=bn(a,s,t-1/3)}else i=r=o=n;return{red:Math.round(255*i),green:Math.round(255*r),blue:Math.round(255*o),alpha:s}}(s)),s}const Vn=(t,e)=>{const n=An(t),s=An(e);if(!n||!s)return Tn(t,e);const i={...n};return t=>(i.red=xn(n.red,s.red,t),i.green=xn(n.green,s.green,t),i.blue=xn(n.blue,s.blue,t),i.alpha=it(n.alpha,s.alpha,t),fe.transform(i))},Mn=(t,e)=>n=>e(t(n)),Pn=(...t)=>t.reduce(Mn),kn=new Set(["none","hidden"]);function En(t,e){return n=>it(t,e,n)}function Cn(t){return"number"==typeof t?En:"string"==typeof t?an(t)?Tn:Ae.test(t)?Vn:In:Array.isArray(t)?Fn:"object"==typeof t?Ae.test(t)?Vn:On:Tn}function Fn(t,e){const n=[...t],s=n.length,i=t.map((t,n)=>Cn(t)(t,e[n]));return t=>{for(let e=0;e<s;e++)n[e]=i[e](t);return n}}function On(t,e){const n={...t,...e},s={};for(const i in n)void 0!==t[i]&&void 0!==e[i]&&(s[i]=Cn(t[i])(t[i],e[i]));return t=>{for(const e in s)n[e]=s[e](t);return n}}const In=(t,e)=>{const n=Fe.createTransformer(e),s=Pe(t),i=Pe(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?kn.has(t)&&!i.values.length||kn.has(e)&&!s.values.length?function(t,e){return kn.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):Pn(Fn(function(t,e){var n;const s=[],i={color:0,var:0,number:0};for(let r=0;r<e.values.length;r++){const o=e.types[r],a=t.indexes[o][i[o]],l=null!==(n=t.values[a])&&void 0!==n?n:0;s[r]=l,i[o]++}return s}(s,i),i.values),n):Tn(t,e)};function Ln(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return it(t,e,n);return Cn(t)(t,e)}function Rn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let f=n*e;const m=h+f,g=void 0===o?m:o(m);g!==m&&(f=g-h);const v=t=>-f*Math.exp(-t/s),y=t=>g+v(t),w=t=>{const e=v(t),n=y(t);d.done=Math.abs(e)<=u,d.value=d.done?g:n};let b,T;const x=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(b=t,T=tt({keyframes:[d.value,p(d.value)],velocity:R(y,t,d.value),damping:i,stiffness:r,restDelta:u,restSpeed:c}))};return x(0),{calculatedDuration:null,next:t=>{let e=!1;return T||void 0!==b||(e=!0,w(t),x(t)),void 0!==b&&t>=b?T.next(t-b):(!e&&w(t),d)}}}const Bn=Xt(.42,0,1,1),Dn=Xt(0,0,.58,1),Wn=Xt(.42,0,.58,1),Nn={linear:e,easeIn:Bn,easeInOut:Wn,easeOut:Dn,circIn:ee,circInOut:se,circOut:ne,backIn:Jt,backInOut:Qt,backOut:_t,anticipate:te},Kn=t=>{if(f(t)){n(4===t.length);const[e,s,i,r]=t;return Xt(e,s,i,r)}return"string"==typeof t?Nn[t]:t};function jn(t,s,{clamp:r=!0,ease:o,mixer:a}={}){const l=t.length;if(n(l===s.length),1===l)return()=>s[0];if(2===l&&s[0]===s[1])return()=>s[1];const u=t[0]===t[1];t[0]>t[l-1]&&(t=[...t].reverse(),s=[...s].reverse());const c=function(t,n,s){const i=[],r=s||Ln,o=t.length-1;for(let s=0;s<o;s++){let o=r(t[s],t[s+1]);if(n){const t=Array.isArray(n)?n[s]||e:n;o=Pn(t,o)}i.push(o)}return i}(s,o,a),h=c.length,d=e=>{if(u&&e<t[0])return s[0];let n=0;if(h>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const r=i(t[n],t[n+1],e);return c[n](r)};return r?e=>d(I(t[0],t[l-1],e)):d}function zn({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=nt(s)?s.map(Kn):Kn(s),r={done:!1,value:e[0]},o=jn(function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:ot(e),t),e,{ease:Array.isArray(i)?i:(a=e,l=i,a.map(()=>l||Wn).splice(0,a.length-1))});var a,l;return{calculatedDuration:t,next:e=>(r.value=o(e),r.done=e>=t,r)}}const Un=t=>{const e=({timestamp:e})=>t(e);return{start:()=>Vt.update(e,!0),stop:()=>Mt(e),now:()=>Pt.isProcessing?Pt.timestamp:Rt.now()}},$n={decay:Rn,inertia:Rn,tween:zn,keyframes:zn,spring:tt},Hn=t=>t/100;class Yn extends wn{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:t}=this.options;t&&t()};const{name:e,motionValue:n,element:s,keyframes:i}=this.options,r=(null==s?void 0:s.KeyframeResolver)||en;this.resolver=new r(i,(t,e)=>this.onKeyframesResolved(t,e),e,n,s),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:e="keyframes",repeat:n=0,repeatDelay:s=0,repeatType:i,velocity:r=0}=this.options,o=d(e)?e:$n[e]||zn;let a,l;o!==zn&&"number"!=typeof t[0]&&(a=Pn(Hn,Ln(t[0],t[1])),t=[0,100]);const u=o({...this.options,keyframes:t});"mirror"===i&&(l=o({...this.options,keyframes:[...t].reverse(),velocity:-r})),null===u.calculatedDuration&&(u.calculatedDuration=c(u));const{calculatedDuration:h}=u,p=h+s;return{generator:u,mirroredGenerator:l,mapPercentToKeyframes:a,calculatedDuration:h,resolvedDuration:p,totalDuration:p*(n+1)-s}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&t?this.state=this.pendingPlayState:this.pause()}tick(t,e=!1){const{resolved:n}=this;if(!n){const{keyframes:t}=this.options;return{done:!0,value:t[t.length-1]}}const{finalKeyframe:s,generator:i,mirroredGenerator:r,mapPercentToKeyframes:o,keyframes:a,calculatedDuration:l,totalDuration:u,resolvedDuration:c}=n;if(null===this.startTime)return i.next(0);const{delay:h,repeat:d,repeatType:p,repeatDelay:f,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),e?this.currentTime=t:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const g=this.currentTime-h*(this.speed>=0?1:-1),v=this.speed>=0?g<0:g>u;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=u);let y=this.currentTime,w=i;if(d){const t=Math.min(this.currentTime,u)/c;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,d+1);Boolean(e%2)&&("reverse"===p?(n=1-n,f&&(n-=f/c)):"mirror"===p&&(w=r)),y=I(0,1,n)*c}const b=v?{done:!1,value:a[0]}:w.next(y);o&&(b.value=o(b.value));let{done:T}=b;v||null===l||(T=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const x=null===this.holdTime&&("finished"===this.state||"running"===this.state&&T);return x&&void 0!==s&&(b.value=yn(a,this.options,s)),m&&m(b.value),x&&this.finish(),b}get duration(){const{resolved:t}=this;return t?o(t.calculatedDuration):0}get time(){return o(this.currentTime)}set time(t){t=r(t),this.currentTime=t,null!==this.holdTime||0===this.speed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=o(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:t=Un,onPlay:e,startTime:n}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),e&&e();const s=this.driver.now();null!==this.holdTime?this.startTime=s-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=s):this.startTime=null!=n?n:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;this._resolved?(this.state="paused",this.holdTime=null!==(t=this.currentTime)&&void 0!==t?t:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const qn=new Set(["opacity","clipPath","filter","transform"]);function Xn(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeInOut",times:l}={}){const u={[e]:n};l&&(u.offset=l);const c=function t(e,n){return e?"function"==typeof e&&v()?y(e,n):f(e)?b(e):Array.isArray(e)?e.map(e=>t(e,n)||T.easeOut):T[e]:void 0}(a,i);return Array.isArray(c)&&(u.easing=c),t.animate(u,{delay:s,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:r+1,direction:"reverse"===o?"alternate":"normal"})}const Gn=s(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));const Zn={anticipate:te,backInOut:Qt,circInOut:se};class _n extends wn{constructor(t){super(t);const{name:e,motionValue:n,element:s,keyframes:i}=this.options;this.resolver=new fn(i,(t,e)=>this.onKeyframesResolved(t,e),e,n,s),this.resolver.scheduleResolve()}initPlayback(t,e){let{duration:n=300,times:s,ease:i,type:r,motionValue:o,name:a,startTime:l}=this.options;if(!o.owner||!o.owner.current)return!1;var u;if("string"==typeof i&&v()&&i in Zn&&(i=Zn[i]),d((u=this.options).type)||"spring"===u.type||!w(u.ease)){const{onComplete:e,onUpdate:o,motionValue:a,element:l,...u}=this.options,c=function(t,e){const n=new Yn({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:t[0]};const i=[];let r=0;for(;!s.done&&r<2e4;)s=n.sample(r),i.push(s.value),r+=10;return{times:void 0,keyframes:i,duration:r-10,ease:"linear"}}(t,u);1===(t=c.keyframes).length&&(t[1]=t[0]),n=c.duration,s=c.times,i=c.ease,r="keyframes"}const c=Xn(o.owner.current,a,t,{...this.options,duration:n,times:s,ease:i});return c.startTime=null!=l?l:this.calcStartTime(),this.pendingTimeline?(p(c,this.pendingTimeline),this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:n}=this.options;o.set(yn(t,this.options,e)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:n,times:s,type:r,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:e}=t;return o(e)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:e}=t;return o(e.currentTime||0)}set time(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.currentTime=r(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:e}=t;return e.playbackRate}set speed(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:e}=t;return e.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:e}=t;return e.startTime}attachTimeline(t){if(this._resolved){const{resolved:n}=this;if(!n)return e;const{animation:s}=n;p(s,t)}else this.pendingTimeline=t;return e}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:e}=t;"finished"===e.playState&&this.updateFinishedPromise(),e.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:e}=t;e.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:e,keyframes:n,duration:s,type:i,ease:o,times:a}=t;if("idle"===e.playState||"finished"===e.playState)return;if(this.time){const{motionValue:t,onUpdate:e,onComplete:l,element:u,...c}=this.options,h=new Yn({...c,keyframes:n,duration:s,type:i,ease:o,times:a,isGenerator:!0}),d=r(this.time);t.setWithVelocity(h.sample(d-10).value,h.sample(d).value,10)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:r,type:o}=t;if(!(e&&e.owner&&e.owner.current instanceof HTMLElement))return!1;const{onUpdate:a,transformTemplate:l}=e.owner.getProps();return Gn()&&n&&qn.has(n)&&!a&&!l&&!s&&"mirror"!==i&&0!==r&&"inertia"!==o}}const Jn={type:"spring",stiffness:500,damping:25,restSpeed:10},Qn={type:"keyframes",duration:.8},ts={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},es=(t,{keyframes:e})=>e.length>2?Qn:Ct.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:Jn:ts;const ns=(t,e,n,s={},i,o)=>a=>{const c=u(s,t)||{},h=c.delay||s.delay||0;let{elapsed:d=0}=s;d-=r(h);let p={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...c,delay:-d,onUpdate:t=>{e.set(t),c.onUpdate&&c.onUpdate(t)},onComplete:()=>{a(),c.onComplete&&c.onComplete()},name:t,motionValue:e,element:o?void 0:i};(function({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:r,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length})(c)||(p={...p,...es(t,p)}),p.duration&&(p.duration=r(p.duration)),p.repeatDelay&&(p.repeatDelay=r(p.repeatDelay)),void 0!==p.from&&(p.keyframes[0]=p.from);let f=!1;if((!1===p.type||0===p.duration&&!p.repeatDelay)&&(p.duration=0,0===p.delay&&(f=!0)),f&&!o&&void 0!==e.get()){const t=yn(p.keyframes,c);if(void 0!==t)return Vt.update(()=>{p.onUpdate(t),p.onComplete()}),new l([])}return!o&&_n.supports(p)?new _n(p):new Yn(p)};function ss({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,s}function is(t,e,{delay:n=0,transitionOverride:s,type:i}={}){var r;let{transition:o=t.getDefaultTransition(),transitionEnd:a,...l}=e;s&&(o=s);const c=[],h=i&&t.animationState&&t.animationState.getState()[i];for(const e in l){const s=t.getValue(e,null!==(r=t.latestValues[e])&&void 0!==r?r:null),i=l[e];if(void 0===i||h&&ss(h,e))continue;const a={delay:n,...u(o||{},e)};let d=!1;if(window.MotionHandoffAnimation){const n=Yt(t);if(n){const t=window.MotionHandoffAnimation(n,e,Vt);null!==t&&(a.startTime=t,d=!0)}}Ut(t,e),s.start(ns(e,s,i,t.shouldReduceMotion&&Ft.has(e)?{type:!1}:a,t,d));const p=s.animation;p&&c.push(p)}return a&&Promise.all(c).then(()=>{Vt.update(()=>{a&&zt(t,a)})}),c}const rs=()=>({x:{min:0,max:0},y:{min:0,max:0}}),os={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},as={};for(const t in os)as[t]={isEnabled:e=>os[t].some(t=>!!e[t])};const ls="undefined"!=typeof window,us={current:null},cs={current:!1};const hs=[...dn,Ae,Fe];const ds=["initial","animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"];function ps(t){return null!==(e=t.animate)&&"object"==typeof e&&"function"==typeof e.start||ds.some(e=>function(t){return"string"==typeof t||Array.isArray(t)}(t[e]));var e}const fs=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class ms{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:s,blockInitialAnimation:i,visualState:r},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=en,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=Rt.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,Vt.render(this.render,!1,!0))};const{latestValues:a,renderState:l,onUpdate:u}=r;this.onUpdate=u,this.latestValues=a,this.baseTarget={...a},this.initialValues=e.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=o,this.blockInitialAnimation=Boolean(i),this.isControllingVariants=ps(e),this.isVariantNode=function(t){return Boolean(ps(t)||t.variants)}(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:c,...h}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in h){const e=h[t];void 0!==a[t]&&at(e)&&e.set(a[t],!1)}}mount(t){this.current=t,xt.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),cs.current||function(){if(cs.current=!0,ls)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>us.current=t.matches;t.addListener(e),e()}else us.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||us.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){xt.delete(this.current),this.projection&&this.projection.unmount(),Mt(this.notifyUpdate),Mt(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=Ct.has(t),s=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&Vt.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=e.on("renderRequest",this.scheduleRender);let r;window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{s(),i(),r&&r(),e.owner&&e.stop()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in as){const e=as[t];if(!e)continue;const{isEnabled:n,Feature:s}=e;if(!this.features[t]&&s&&n(this.props)&&(this.features[t]=new s(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<fs.length;e++){const n=fs[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const s=t["on"+n];s&&(this.propEventSubscriptions[n]=this.on(n,s))}this.prevMotionValues=function(t,e,n){for(const s in e){const i=e[s],r=n[s];if(at(i))t.addValue(s,i);else if(at(r))t.addValue(s,Wt(i,{owner:t}));else if(r!==i)if(t.hasValue(s)){const e=t.getValue(s);!0===e.liveStyle?e.jump(i):e.hasAnimated||e.set(i)}else{const e=t.getStaticValue(s);t.addValue(s,Wt(void 0!==e?e:i,{owner:t}))}}for(const s in n)void 0===e[s]&&t.removeValue(s);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=Wt(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){var n;let s=void 0===this.latestValues[t]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,t))&&void 0!==n?n:this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];var i;return null!=s&&("string"==typeof s&&(nn(s)||ie(s))?s=parseFloat(s):(i=s,!hs.find(hn(i))&&Fe.test(e)&&(s=ze(t,e))),this.setBaseTarget(t,at(s)?s.get():s)),at(s)?s.get():s}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props;let s;if("string"==typeof n||"object"==typeof n){const i=Kt(this.props,n,null===(e=this.presenceContext)||void 0===e?void 0:e.custom);i&&(s=i[t])}if(n&&void 0!==s)return s;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||at(i)?void 0!==this.initialValues[t]&&void 0===s?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new Bt),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class gs extends ms{constructor(){super(...arguments),this.KeyframeResolver=fn}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;at(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=""+t)}))}}const vs=(t,e)=>e&&"number"==typeof t?e.transform(t):t,ys={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ws=Et.length;function bs(t,e,n){const{style:s,vars:i,transformOrigin:r}=t;let o=!1,a=!1;for(const t in e){const n=e[t];if(Ct.has(t))o=!0;else if(rn(t))i[t]=n;else{const e=vs(n,Ne[t]);t.startsWith("origin")?(a=!0,r[t]=e):s[t]=e}}if(e.transform||(o||n?s.transform=function(t,e,n){let s="",i=!0;for(let r=0;r<ws;r++){const o=Et[r],a=t[o];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(o.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const t=vs(a,Ne[o]);if(!l){i=!1;s+=`${ys[o]||o}(${t}) `}n&&(e[o]=t)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=r;s.transformOrigin=`${t} ${e} ${n}`}}const Ts={offset:"stroke-dashoffset",array:"stroke-dasharray"},xs={offset:"strokeDashoffset",array:"strokeDasharray"};function Ss(t,e,n){return"string"==typeof t?t:we.transform(e+n*t)}function As(t,{attrX:e,attrY:n,attrScale:s,originX:i,originY:r,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},c,h){if(bs(t,u,h),c)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:d,style:p,dimensions:f}=t;d.transform&&(f&&(p.transform=d.transform),delete d.transform),f&&(void 0!==i||void 0!==r||p.transform)&&(p.transformOrigin=function(t,e,n){return`${Ss(e,t.x,t.width)} ${Ss(n,t.y,t.height)}`}(f,void 0!==i?i:.5,void 0!==r?r:.5)),void 0!==e&&(d.x=e),void 0!==n&&(d.y=n),void 0!==s&&(d.scale=s),void 0!==o&&function(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?Ts:xs;t[r.offset]=we.transform(-s);const o=we.transform(e),a=we.transform(n);t[r.array]=`${o} ${a}`}(d,o,a,l,!1)}const Vs=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Ms(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const e in n)t.style.setProperty(e,n[e])}const Ps={};function ks(t,{layout:e,layoutId:n}){return Ct.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!Ps[t]||"opacity"===t)}function Es(t,e,n){var s;const{style:i}=t,r={};for(const o in i)(at(i[o])||e.style&&at(e.style[o])||ks(o,t)||void 0!==(null===(s=null==n?void 0:n.getValue(o))||void 0===s?void 0:s.liveStyle))&&(r[o]=i[o]);return r}class Cs extends gs{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=rs}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(Ct.has(e)){const t=je(e);return t&&t.default||0}return e=Vs.has(e)?e:$t(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return function(t,e,n){const s=Es(t,e,n);for(const n in t)if(at(t[n])||at(e[n])){s[-1!==Et.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return s}(t,e,n)}build(t,e,n){As(t,e,this.isSVGTag,n.transformTemplate)}renderInstance(t,e,n,s){!function(t,e,n,s){Ms(t,e,void 0,s);for(const n in e.attrs)t.setAttribute(Vs.has(n)?n:$t(n),e.attrs[n])}(t,e,0,s)}mount(t){var e;this.isSVGTag="string"==typeof(e=t.tagName)&&"svg"===e.toLowerCase(),super.mount(t)}}class Fs extends gs{constructor(){super(...arguments),this.type="html",this.renderInstance=Ms}readValueFromInstance(t,e){if(Ct.has(e)){const t=je(e);return t&&t.default||0}{const s=(n=t,window.getComputedStyle(n)),i=(rn(e)?s.getPropertyValue(e):s[e])||0;return"string"==typeof i?i.trim():i}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return function(t,e){return function({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}(t.getBoundingClientRect(),e))}(t,e)}build(t,e,n){bs(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return Es(t,e,n)}}class Os extends ms{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(function(t,e){return t in e}(e,t)){const n=t[e];if("string"==typeof n||"number"==typeof n)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}}function Is(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=function(t){return t instanceof SVGElement&&"svg"!==t.tagName}(t)?new Cs(e):new Fs(e);n.mount(t),xt.set(t,n)}function Ls(t){const e=new Os({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});e.mount(t),xt.set(t,e)}function Rs(t,e,n,s){const i=[];if(function(t,e){return at(t)||"number"==typeof t||"string"==typeof t&&!lt(e)}(t,e))i.push(function(t,e,n){const s=at(t)?t:Wt(t);return s.start(ns("",s,e,n)),s.animation}(t,lt(e)&&e.default||e,n&&n.default||n));else{const r=ut(t,e,s),o=r.length;for(let t=0;t<o;t++){const s=r[t],a=s instanceof Element?Is:Ls;xt.has(s)||a(s);const l=xt.get(s),u={...n};"delay"in u&&"function"==typeof u.delay&&(u.delay=u.delay(t,o)),i.push(...is(l,{...e,transition:u},{}))}}return i}function Bs(t,e,n){const s=[];return function(t,{defaultTransition:e={},...n}={},s,o){const a=e.duration||.3,l=new Map,u=new Map,c={},p=new Map;let f=0,m=0,g=0;for(let n=0;n<t.length;n++){const i=t[n];if("string"==typeof i){p.set(i,m);continue}if(!Array.isArray(i)){p.set(i.name,ht(m,i.at,f,p));continue}let[l,v,y={}]=i;void 0!==y.at&&(m=ht(m,y.at,f,p));let w=0;const b=(t,n,s,i=0,l=0)=>{const u=yt(t),{delay:c=0,times:p=ot(u),type:f="keyframes",repeat:v,repeatType:y,repeatDelay:b=0,...T}=n;let{ease:x=e.ease||"easeOut",duration:S}=n;const A="function"==typeof c?c(i,l):c,V=u.length,M=d(f)?f:null==o?void 0:o[f];if(V<=2&&M){let t=100;if(2===V&&Tt(u)){const e=u[1]-u[0];t=Math.abs(e)}const e={...T};void 0!==S&&(e.duration=r(S));const n=h(e,t,M);x=n.ease,S=n.duration}null!=S||(S=a);const P=m+A;1===p.length&&0===p[0]&&(p[1]=1);const k=p.length-u.length;if(k>0&&rt(p,k),1===u.length&&u.unshift(null),v){S=ct(S,v);const t=[...u],e=[...p];x=Array.isArray(x)?[...x]:[x];const n=[...x];for(let s=0;s<v;s++){u.push(...t);for(let i=0;i<t.length;i++)p.push(e[i]+(s+1)),x.push(0===i?"linear":st(n,i-1))}ft(p,v)}const E=P+S;pt(s,u,x,p,P,E),w=Math.max(A+S,w),g=Math.max(E,g)};if(at(l)){b(v,y,vt("default",gt(l,u)))}else{const t=ut(l,v,s,c),e=t.length;for(let n=0;n<e;n++){v=v,y=y;const s=gt(t[n],u);for(const t in v)b(v[t],wt(y,t),vt(t,s),n,e)}}f=m,m+=w}return u.forEach((t,s)=>{for(const r in t){const o=t[r];o.sort(mt);const a=[],u=[],c=[];for(let t=0;t<o.length;t++){const{at:e,value:n,easing:s}=o[t];a.push(n),u.push(i(0,g,e)),c.push(s||"easeOut")}0!==u[0]&&(u.unshift(0),a.unshift(a[0]),c.unshift("easeInOut")),1!==u[u.length-1]&&(u.push(1),a.push(null)),l.has(s)||l.set(s,{keyframes:{},transition:{}});const h=l.get(s);h.keyframes[r]=a,h.transition[r]={...e,duration:g,ease:c,times:u,...n}}}),l}(t,e,n,{spring:tt}).forEach(({keyframes:t,transition:e},n)=>{s.push(...Rs(n,t,e))}),s}function Ds(t){return function(e,n,s){let i=[];var r;r=e,i=Array.isArray(r)&&r.some(Array.isArray)?Bs(e,n,t):Rs(e,n,s,t);const o=new l(i);return t&&t.animations.push(o),o}}const Ws=Ds();function Ns(t,e,n){t.style.setProperty("--"+e,n)}function Ks(t,e,n){t.style[e]=n}const js=s(()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0}),zs=new WeakMap;function Us(t){const e=zs.get(t)||new Map;return zs.set(t,e),zs.get(t)}class $s extends class{constructor(t){this.animation=t}get duration(){var t,e,n;const s=(null===(e=null===(t=this.animation)||void 0===t?void 0:t.effect)||void 0===e?void 0:e.getComputedTiming().duration)||(null===(n=this.options)||void 0===n?void 0:n.duration)||300;return o(Number(s))}get time(){var t;return this.animation?o((null===(t=this.animation)||void 0===t?void 0:t.currentTime)||0):0}set time(t){this.animation&&(this.animation.currentTime=r(t))}get speed(){return this.animation?this.animation.playbackRate:1}set speed(t){this.animation&&(this.animation.playbackRate=t)}get state(){return this.animation?this.animation.playState:"finished"}get startTime(){return this.animation?this.animation.startTime:null}get finished(){return this.animation?this.animation.finished:Promise.resolve()}play(){this.animation&&this.animation.play()}pause(){this.animation&&this.animation.pause()}stop(){this.animation&&"idle"!==this.state&&"finished"!==this.state&&(this.animation.commitStyles&&this.animation.commitStyles(),this.cancel())}flatten(){var t;this.animation&&(null===(t=this.animation.effect)||void 0===t||t.updateTiming({easing:"linear"}))}attachTimeline(t){return this.animation&&p(this.animation,t),e}complete(){this.animation&&this.animation.finish()}cancel(){try{this.animation&&this.animation.cancel()}catch(t){}}}{constructor(t,e,s,i){const o=e.startsWith("--");n("string"!=typeof i.type);const a=Us(t).get(e);a&&a.stop();if(Array.isArray(s)||(s=[s]),function(t,e,n){for(let s=0;s<e.length;s++)null===e[s]&&(e[s]=0===s?n():e[s-1]),"number"==typeof e[s]&&Be[t]&&(e[s]=Be[t].transform(e[s]));!js()&&e.length<2&&e.unshift(n())}(e,s,()=>e.startsWith("--")?t.style.getPropertyValue(e):window.getComputedStyle(t)[e]),d(i.type)){const t=h(i,100,i.type);i.ease=v()?t.ease:"easeOut",i.duration=r(t.duration),i.type="keyframes"}else i.ease=i.ease||"easeOut";const l=()=>{this.setValue(t,e,yn(s,i)),this.cancel(),this.resolveFinishedPromise()},u=()=>{this.setValue=o?Ns:Ks,this.options=i,this.updateFinishedPromise(),this.removeAnimation=()=>{const n=zs.get(t);n&&n.delete(e)}};Gn()?(super(Xn(t,e,s,i)),u(),!1===i.autoplay&&this.animation.pause(),this.animation.onfinish=l,Us(t).set(e,this)):(super(),u(),l())}then(t,e){return this.currentFinishedPromise.then(t,e)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}play(){"finished"===this.state&&this.updateFinishedPromise(),super.play()}cancel(){this.removeAnimation(),super.cancel()}}const Hs=(t=>function(e,n,s){return new l(function(t,e,n,s){const i=A(t,s),o=i.length,a=[];for(let t=0;t<o;t++){const s=i[t],l={...n};"function"==typeof l.delay&&(l.delay=l.delay(t,o));for(const t in e){const n=e[t],i={...u(l,t)};i.duration=i.duration?r(i.duration):i.duration,i.delay=r(i.delay||0),a.push(new $s(s,t,n,i))}}return a}(e,n,s,t))})();function Ys(t,e){let n;const s=()=>{const{currentTime:s}=e,i=(null===s?0:s.value)/100;n!==i&&t(i),n=i};return Vt.update(s,!0),()=>Mt(s)}const qs=new WeakMap;let Xs;function Gs({target:t,contentRect:e,borderBoxSize:n}){var s;null===(s=qs.get(t))||void 0===s||s.forEach(s=>{s({target:t,contentSize:e,get size(){return function(t,e){if(e){const{inlineSize:t,blockSize:n}=e[0];return{width:t,height:n}}return t instanceof SVGElement&&"getBBox"in t?t.getBBox():{width:t.offsetWidth,height:t.offsetHeight}}(t,n)}})})}function Zs(t){t.forEach(Gs)}function _s(t,e){Xs||"undefined"!=typeof ResizeObserver&&(Xs=new ResizeObserver(Zs));const n=A(t);return n.forEach(t=>{let n=qs.get(t);n||(n=new Set,qs.set(t,n)),n.add(e),null==Xs||Xs.observe(t)}),()=>{n.forEach(t=>{const n=qs.get(t);null==n||n.delete(e),(null==n?void 0:n.size)||null==Xs||Xs.unobserve(t)})}}const Js=new Set;let Qs;function ti(t){return Js.add(t),Qs||(Qs=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};Js.forEach(t=>t(e))},window.addEventListener("resize",Qs)),()=>{Js.delete(t),!Js.size&&Qs&&(Qs=void 0)}}const ei={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function ni(t,e,n,s){const r=n[e],{length:o,position:a}=ei[e],l=r.current,u=n.time;r.current=t["scroll"+a],r.scrollLength=t["scroll"+o]-t["client"+o],r.offset.length=0,r.offset[0]=0,r.offset[1]=r.scrollLength,r.progress=i(0,r.scrollLength,r.current);const c=s-u;r.velocity=c>50?0:L(r.current-l,c)}const si={start:0,center:.5,end:1};function ii(t,e,n=0){let s=0;if(t in si&&(t=si[t]),"string"==typeof t){const e=parseFloat(t);t.endsWith("px")?s=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?s=e/100*document.documentElement.clientWidth:t.endsWith("vh")?s=e/100*document.documentElement.clientHeight:t=e}return"number"==typeof t&&(s=e*t),n+s}const ri=[0,0];function oi(t,e,n,s){let i=Array.isArray(t)?t:ri,r=0,o=0;return"number"==typeof t?i=[t,t]:"string"==typeof t&&(i=(t=t.trim()).includes(" ")?t.split(" "):[t,si[t]?t:"0"]),r=ii(i[0],n,s),o=ii(i[1],e),r-o}const ai={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},li={x:0,y:0};function ui(t,e,n){const{offset:s=ai.All}=n,{target:i=t,axis:r="y"}=n,o="y"===r?"height":"width",a=i!==t?function(t,e){const n={x:0,y:0};let s=t;for(;s&&s!==e;)if(s instanceof HTMLElement)n.x+=s.offsetLeft,n.y+=s.offsetTop,s=s.offsetParent;else if("svg"===s.tagName){const t=s.getBoundingClientRect();s=s.parentElement;const e=s.getBoundingClientRect();n.x+=t.left-e.left,n.y+=t.top-e.top}else{if(!(s instanceof SVGGraphicsElement))break;{const{x:t,y:e}=s.getBBox();n.x+=t,n.y+=e;let i=null,r=s.parentNode;for(;!i;)"svg"===r.tagName&&(i=r),r=s.parentNode;s=i}}return n}(i,t):li,l=i===t?{width:t.scrollWidth,height:t.scrollHeight}:function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(i),u={width:t.clientWidth,height:t.clientHeight};e[r].offset.length=0;let c=!e[r].interpolate;const h=s.length;for(let t=0;t<h;t++){const n=oi(s[t],u[o],l[o],a[r]);c||n===e[r].interpolatorOffsets[t]||(c=!0),e[r].offset[t]=n}c&&(e[r].interpolate=jn(e[r].offset,ot(s),{clamp:!1}),e[r].interpolatorOffsets=[...e[r].offset]),e[r].progress=I(0,1,e[r].interpolate(e[r].current))}function ci(t,e,n,s={}){return{measure:()=>function(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let s=e;for(;s&&s!==t;)n.x.targetOffset+=s.offsetLeft,n.y.targetOffset+=s.offsetTop,s=s.offsetParent}n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight}(t,s.target,n),update:e=>{!function(t,e,n){ni(t,"x",e,n),ni(t,"y",e,n),e.time=n}(t,n,e),(s.offset||s.target)&&ui(t,n,s)},notify:()=>e(n)}}const hi=new WeakMap,di=new WeakMap,pi=new WeakMap,fi=t=>t===document.documentElement?window:t;function mi(t,{container:e=document.documentElement,...n}={}){let s=pi.get(e);s||(s=new Set,pi.set(e,s));const i=ci(e,t,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},n);if(s.add(i),!hi.has(e)){const t=()=>{for(const t of s)t.measure()},n=()=>{for(const t of s)t.update(Pt.timestamp)},i=()=>{for(const t of s)t.notify()},a=()=>{Vt.read(t,!1,!0),Vt.read(n,!1,!0),Vt.update(i,!1,!0)};hi.set(e,a);const l=fi(e);window.addEventListener("resize",a,{passive:!0}),e!==document.documentElement&&di.set(e,(o=a,"function"==typeof(r=e)?ti(r):_s(r,o))),l.addEventListener("scroll",a,{passive:!0})}var r,o;const a=hi.get(e);return Vt.read(a,!1,!0),()=>{var t;Mt(a);const n=pi.get(e);if(!n)return;if(n.delete(i),n.size)return;const s=hi.get(e);hi.delete(e),s&&(fi(e).removeEventListener("scroll",s),null===(t=di.get(e))||void 0===t||t(),window.removeEventListener("resize",s))}}const gi=new Map;function vi({source:t,container:e=document.documentElement,axis:n="y"}={}){t&&(e=t),gi.has(e)||gi.set(e,{});const s=gi.get(e);return s[n]||(s[n]=a()?new ScrollTimeline({source:e,axis:n}):function({source:t,container:e,axis:n="y"}){t&&(e=t);const s={value:0},i=mi(t=>{s.value=100*t[n].progress},{container:e,axis:n});return{currentTime:s,cancel:i}}({source:e,axis:n})),s[n]}function yi(t){return t&&(t.target||t.offset)}const wi={some:0,all:1};const bi=(t,e)=>Math.abs(t-e);const Ti=Vt,xi=At.reduce((t,e)=>(t[e]=t=>Mt(t),t),{});t.MotionValue=Dt,t.animate=Ws,t.animateMini=Hs,t.anticipate=te,t.backIn=Jt,t.backInOut=Qt,t.backOut=_t,t.cancelFrame=Mt,t.cancelSync=xi,t.circIn=ee,t.circInOut=se,t.circOut=ne,t.clamp=I,t.createScopedAnimate=Ds,t.cubicBezier=Xt,t.delay=function(t,e){return function(t,e){const n=Rt.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(Mt(s),t(r-e))};return Vt.read(s,!0),()=>Mt(s)}(t,r(e))},t.distance=bi,t.distance2D=function(t,e){const n=bi(t.x,e.x),s=bi(t.y,e.y);return Math.sqrt(n**2+s**2)},t.easeIn=Bn,t.easeInOut=Wn,t.easeOut=Dn,t.frame=Vt,t.frameData=Pt,t.frameSteps=kt,t.hover=function(t,e,n={}){const[s,i,r]=V(t,n),o=t=>{if(!M(t))return;const{target:n}=t,s=e(n,t);if("function"!=typeof s||!n)return;const r=t=>{M(t)&&(s(t),n.removeEventListener("pointerleave",r))};n.addEventListener("pointerleave",r,i)};return s.forEach(t=>{t.addEventListener("pointerenter",o,i)}),r},t.inView=function(t,e,{root:n,margin:s,amount:i="some"}={}){const r=A(t),o=new WeakMap,a=new IntersectionObserver(t=>{t.forEach(t=>{const n=o.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){const n=e(t.target,t);"function"==typeof n?o.set(t.target,n):a.unobserve(t.target)}else"function"==typeof n&&(n(t),o.delete(t.target))})},{root:n,rootMargin:s,threshold:"number"==typeof i?i:wi[i]});return r.forEach(t=>a.observe(t)),()=>a.disconnect()},t.inertia=Rn,t.interpolate=jn,t.invariant=n,t.isDragActive=S,t.keyframes=zn,t.mirrorEasing=Gt,t.mix=Ln,t.motionValue=Wt,t.noop=e,t.pipe=Pn,t.press=function(t,e,n={}){const[s,i,r]=V(t,n),o=t=>{const s=t.currentTarget;if(!O(t)||E.has(s))return;E.add(s);const r=e(s,t),o=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),O(t)&&E.has(s)&&(E.delete(s),"function"==typeof r&&r(t,{success:e}))},a=t=>{o(t,n.useGlobalTarget||P(s,t.target))},l=t=>{o(t,!1)};window.addEventListener("pointerup",a,i),window.addEventListener("pointercancel",l,i)};return s.forEach(t=>{(function(t){return k.has(t.tagName)||-1!==t.tabIndex})(t)||null!==t.getAttribute("tabindex")||(t.tabIndex=0);(n.useGlobalTarget?window:t).addEventListener("pointerdown",o,i),t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const s=C(()=>{if(E.has(n))return;F(n,"down");const t=C(()=>{F(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>F(n,"cancel"),e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)})(t,i),i)}),r},t.progress=i,t.reverseEasing=Zt,t.scroll=function(t,{axis:n="y",...s}={}){const i={axis:n,...s};return"function"==typeof t?function(t,e){return function(t){return 2===t.length}(t)||yi(e)?mi(n=>{t(n[e.axis].progress,n)},e):Ys(t,vi(e))}(t,i):function(t,n){if(t.flatten(),yi(n))return t.pause(),mi(e=>{t.time=t.duration*e[n.axis].progress},n);{const s=vi(n);return t.attachTimeline?t.attachTimeline(s,t=>(t.pause(),Ys(e=>{t.time=t.duration*e},s))):e}}(t,i)},t.scrollInfo=mi,t.spring=tt,t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:s}={}){return(i,r)=>{const o="number"==typeof n?n:function(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}(n,r),a=Math.abs(o-i);let l=t*a;if(s){const e=r*t;l=Kn(s)(l/e)*e}return e+l}},t.steps=function(t,e="end"){return n=>{const s=(n="end"===e?Math.min(n,.999):Math.max(n,.001))*t,i="end"===e?Math.floor(s):Math.ceil(s);return I(0,1,i/t)}},t.sync=Ti,t.time=Rt,t.transform=function(...t){const e=!Array.isArray(t[0]),n=e?0:-1,s=t[0+n],i=t[1+n],r=t[2+n],o=t[3+n],a=jn(i,r,{mixer:(l=r[0],(t=>t&&"object"==typeof t&&t.mix)(l)?l.mix:void 0),...o});var l;return e?a(s):a},t.wrap=et}));
|
|
@@ -15,7 +15,7 @@ import { resolveMotionValue } from '../../value/utils/resolve-motion-value.mjs';
|
|
|
15
15
|
import { mixValues } from '../animation/mix-values.mjs';
|
|
16
16
|
import { copyBoxInto, copyAxisDeltaInto } from '../geometry/copy.mjs';
|
|
17
17
|
import { translateAxis, transformBox, applyBoxDelta, applyTreeDeltas } from '../geometry/delta-apply.mjs';
|
|
18
|
-
import { calcRelativePosition, calcRelativeBox, calcBoxDelta,
|
|
18
|
+
import { calcLength, calcRelativePosition, calcRelativeBox, calcBoxDelta, isNear } from '../geometry/delta-calc.mjs';
|
|
19
19
|
import { removeBoxTransforms } from '../geometry/delta-remove.mjs';
|
|
20
20
|
import { createBox, createDelta } from '../geometry/models.mjs';
|
|
21
21
|
import { boxEqualsRounded, isDeltaZero, axisDeltaEquals, aspectRatio, boxEquals } from '../geometry/utils.mjs';
|
|
@@ -504,6 +504,11 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
504
504
|
if (this.snapshot || !this.instance)
|
|
505
505
|
return;
|
|
506
506
|
this.snapshot = this.measure();
|
|
507
|
+
if (this.snapshot &&
|
|
508
|
+
!calcLength(this.snapshot.measuredBox.x) &&
|
|
509
|
+
!calcLength(this.snapshot.measuredBox.y)) {
|
|
510
|
+
this.snapshot = undefined;
|
|
511
|
+
}
|
|
507
512
|
}
|
|
508
513
|
updateLayout() {
|
|
509
514
|
if (!this.instance)
|
|
@@ -17,7 +17,7 @@ function updateMotionValuesFromProps(element, next, prev) {
|
|
|
17
17
|
* and warn against mismatches.
|
|
18
18
|
*/
|
|
19
19
|
if (process.env.NODE_ENV === "development") {
|
|
20
|
-
warnOnce(nextValue.version === "12.0.
|
|
20
|
+
warnOnce(nextValue.version === "12.0.6", `Attempting to mix Motion versions ${nextValue.version} with 12.0.6 may not work as expected.`);
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
else if (isMotionValue(prevValue)) {
|
package/dist/es/value/index.mjs
CHANGED
|
@@ -34,7 +34,7 @@ class MotionValue {
|
|
|
34
34
|
* This will be replaced by the build step with the latest version number.
|
|
35
35
|
* When MotionValues are provided to motion components, warn if versions are mixed.
|
|
36
36
|
*/
|
|
37
|
-
this.version = "12.0.
|
|
37
|
+
this.version = "12.0.6";
|
|
38
38
|
/**
|
|
39
39
|
* Tracks whether this value can output a velocity. Currently this is only true
|
|
40
40
|
* if the value is numerical, but we might be able to widen the scope here and support
|
|
@@ -1078,7 +1078,7 @@
|
|
|
1078
1078
|
* This will be replaced by the build step with the latest version number.
|
|
1079
1079
|
* When MotionValues are provided to motion components, warn if versions are mixed.
|
|
1080
1080
|
*/
|
|
1081
|
-
this.version = "12.0.
|
|
1081
|
+
this.version = "12.0.6";
|
|
1082
1082
|
/**
|
|
1083
1083
|
* Tracks whether this value can output a velocity. Currently this is only true
|
|
1084
1084
|
* if the value is numerical, but we might be able to widen the scope here and support
|
|
@@ -5856,7 +5856,7 @@
|
|
|
5856
5856
|
* and warn against mismatches.
|
|
5857
5857
|
*/
|
|
5858
5858
|
{
|
|
5859
|
-
warnOnce(nextValue.version === "12.0.
|
|
5859
|
+
warnOnce(nextValue.version === "12.0.6", `Attempting to mix Motion versions ${nextValue.version} with 12.0.6 may not work as expected.`);
|
|
5860
5860
|
}
|
|
5861
5861
|
}
|
|
5862
5862
|
else if (isMotionValue(prevValue)) {
|
|
@@ -8819,6 +8819,11 @@
|
|
|
8819
8819
|
if (this.snapshot || !this.instance)
|
|
8820
8820
|
return;
|
|
8821
8821
|
this.snapshot = this.measure();
|
|
8822
|
+
if (this.snapshot &&
|
|
8823
|
+
!calcLength(this.snapshot.measuredBox.x) &&
|
|
8824
|
+
!calcLength(this.snapshot.measuredBox.y)) {
|
|
8825
|
+
this.snapshot = undefined;
|
|
8826
|
+
}
|
|
8822
8827
|
}
|
|
8823
8828
|
updateLayout() {
|
|
8824
8829
|
if (!this.instance)
|