framer-motion 11.0.2 → 11.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/dom-entry.js +1 -1
- package/dist/cjs/{index-legacy-777cef1e.js → index-legacy-21d7701e.js} +2 -3
- package/dist/cjs/index.js +3 -1
- package/dist/dom.js +1 -0
- package/dist/es/animation/animators/waapi/create-accelerated-animation.mjs +0 -1
- package/dist/es/projection/node/create-projection-node.mjs +2 -0
- package/dist/es/render/utils/motion-values.mjs +1 -1
- package/dist/es/value/index.mjs +1 -1
- package/dist/framer-motion.dev.js +4 -3
- package/dist/framer-motion.js +1 -1
- package/dist/projection.dev.js +4 -3
- package/package.json +2 -2
package/dist/cjs/dom-entry.js
CHANGED
|
@@ -2131,7 +2131,6 @@ const acceleratedValues = new Set([
|
|
|
2131
2131
|
"clipPath",
|
|
2132
2132
|
"filter",
|
|
2133
2133
|
"transform",
|
|
2134
|
-
"backgroundColor",
|
|
2135
2134
|
]);
|
|
2136
2135
|
/**
|
|
2137
2136
|
* 10ms is chosen here as it strikes a balance between smooth
|
|
@@ -2750,7 +2749,7 @@ class MotionValue {
|
|
|
2750
2749
|
* This will be replaced by the build step with the latest version number.
|
|
2751
2750
|
* When MotionValues are provided to motion components, warn if versions are mixed.
|
|
2752
2751
|
*/
|
|
2753
|
-
this.version = "11.0.
|
|
2752
|
+
this.version = "11.0.4";
|
|
2754
2753
|
/**
|
|
2755
2754
|
* Tracks whether this value can output a velocity. Currently this is only true
|
|
2756
2755
|
* if the value is numerical, but we might be able to widen the scope here and support
|
|
@@ -3978,7 +3977,7 @@ function updateMotionValuesFromProps(element, next, prev) {
|
|
|
3978
3977
|
* and warn against mismatches.
|
|
3979
3978
|
*/
|
|
3980
3979
|
if (process.env.NODE_ENV === "development") {
|
|
3981
|
-
warnOnce(nextValue.version === "11.0.
|
|
3980
|
+
warnOnce(nextValue.version === "11.0.4", `Attempting to mix Framer Motion versions ${nextValue.version} with 11.0.4 may not work as expected.`);
|
|
3982
3981
|
}
|
|
3983
3982
|
}
|
|
3984
3983
|
else if (isMotionValue(prevValue)) {
|
package/dist/cjs/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var indexLegacy = require('./index-legacy-
|
|
6
|
+
var indexLegacy = require('./index-legacy-21d7701e.js');
|
|
7
7
|
|
|
8
8
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
9
9
|
|
|
@@ -3641,6 +3641,7 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
3641
3641
|
!lead.target &&
|
|
3642
3642
|
(this.treeScale.x !== 1 || this.treeScale.y !== 1)) {
|
|
3643
3643
|
lead.target = lead.layout.layoutBox;
|
|
3644
|
+
lead.targetWithTransforms = indexLegacy.createBox();
|
|
3644
3645
|
}
|
|
3645
3646
|
const { target } = lead;
|
|
3646
3647
|
if (!target) {
|
|
@@ -4253,6 +4254,7 @@ const defaultLayoutTransition = {
|
|
|
4253
4254
|
ease: [0.4, 0, 0.1, 1],
|
|
4254
4255
|
};
|
|
4255
4256
|
const userAgentContains = (string) => typeof navigator !== "undefined" &&
|
|
4257
|
+
navigator.userAgent &&
|
|
4256
4258
|
navigator.userAgent.toLowerCase().includes(string);
|
|
4257
4259
|
/**
|
|
4258
4260
|
* Measured bounding boxes must be rounded in Safari and
|
package/dist/dom.js
ADDED
|
@@ -0,0 +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,n=!1,r=!1;class s{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const e=this.order.indexOf(t);-1!==e&&(this.order.splice(e,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}const o=["prepare","read","update","preRender","render","postRender"];const{schedule:i,cancel:a,state:l,steps:u}=function(t,e){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=o.reduce((t,e)=>(t[e]=function(t){let e=new s,n=new s,r=0,o=!1,i=!1;const a=new WeakSet,l={schedule:(t,s=!1,i=!1)=>{const l=i&&o,u=l?e:n;return s&&a.add(t),u.add(t)&&l&&o&&(r=e.order.length),t},cancel:t=>{n.remove(t),a.delete(t)},process:s=>{if(o)i=!0;else{if(o=!0,[e,n]=[n,e],n.clear(),r=e.order.length,r)for(let n=0;n<r;n++){const r=e.order[n];a.has(r)&&(l.schedule(r),t()),r(s)}o=!1,i&&(i=!1,l.process(s))}}};return l}(()=>n=!0),t),{}),l=t=>{a[t].process(i)},u=()=>{const s=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(s-i.timestamp,40),1),i.timestamp=s,i.isProcessing=!0,o.forEach(l),i.isProcessing=!1,n&&e&&(r=!1,t(u))};return{schedule:o.reduce((e,s)=>{const o=a[s];return e[s]=(e,s=!1,a=!1)=>(n||(n=!0,r=!0,i.isProcessing||t(u)),o.schedule(e,s,a)),e},{}),cancel:t=>o.forEach(e=>a[e].cancel(t)),state:i,steps:a}}("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:e,!0);function c(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class h{constructor(){this.subscriptions=[]}add(t){var e,n;return e=this.subscriptions,n=t,-1===e.indexOf(n)&&e.push(n),()=>c(this.subscriptions,t)}notify(t,e,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](t,e,n);else for(let s=0;s<r;s++){const r=this.subscriptions[s];r&&r(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function d(t,e){return e?t*(1e3/e):0}let f;function p(){f=void 0}const m={now:()=>(void 0===f&&m.set(l.isProcessing||r?l.timestamp:performance.now()),f),set:t=>{f=t,queueMicrotask(p)}};class g{constructor(t,e={}){var n;this.version="11.0.4",this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=m.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.canTrackVelocity=(n=this.current,!isNaN(parseFloat(n))),this.owner=e.owner}setCurrent(t){this.current=t,this.updatedAt=m.now()}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 h);const n=this.events[t].add(e);return"change"===t?()=>{n(),i.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){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=m.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return d(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 y(t,e){return new g(t,e)}let v=e,w=e;function b(t,e,n){var r;if("string"==typeof t){let s=document;e&&(w(Boolean(e.current)),s=e.current),n?(null!==(r=n[t])&&void 0!==r||(n[t]=s.querySelectorAll(t)),t=n[t]):t=s.querySelectorAll(t)}else t instanceof Element&&(t=[t]);return Array.from(t||[])}const x=new WeakMap;function V(t,e){let n;const r=()=>{const{currentTime:r}=e,s=(null===r?0:r.value)/100;n!==s&&t(s),n=s};return i.update(r,!0),()=>a(r)}function A(t){let e;return()=>(void 0===e&&(e=t()),e)}const M=A(()=>void 0!==window.ScrollTimeline);class S{constructor(t){this.animations=t.filter(Boolean)}then(t,e){return Promise.all(this.animations).then(t).catch(e)}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){const e=this.animations.map(e=>{if(!M()||!e.attachTimeline)return e.pause(),V(t=>{e.time=e.duration*t},t);e.attachTimeline(t)});return()=>{e.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 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]())}play(){this.runAll("play")}pause(){this.runAll("pause")}stop(){this.runAll("stop")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const k=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],C=new Set(k),T=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),E="data-"+T("framerAppearId"),P=t=>1e3*t,O=t=>t/1e3,F=!1,B=t=>Array.isArray(t)&&"number"==typeof t[0];function I(t){return Boolean(!t||"string"==typeof t&&W[t]||B(t)||Array.isArray(t)&&t.every(I))}const L=([t,e,n,r])=>`cubic-bezier(${t}, ${e}, ${n}, ${r})`,W={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:L([0,.65,.55,1]),circOut:L([.55,0,1,.45]),backIn:L([.31,.01,.66,-.59]),backOut:L([.33,1.53,.69,.99])};function R(t){if(t)return B(t)?L(t):Array.isArray(t)?t.map(R):W[t]}const N=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function j(t,n,r,s){if(t===n&&r===s)return e;const o=e=>function(t,e,n,r,s){let o,i,a=0;do{i=e+(n-e)/2,o=N(i,r,s)-t,o>0?n=i:e=i}while(Math.abs(o)>1e-7&&++a<12);return i}(e,0,1,t,r);return t=>0===t||1===t?t:N(o(t),n,s)}const D=j(.42,0,1,1),z=j(0,0,.58,1),H=j(.42,0,.58,1),$=t=>Array.isArray(t)&&"number"!=typeof t[0],U=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,q=t=>e=>1-t(1-e),Y=t=>1-Math.sin(Math.acos(t)),X=q(Y),Z=U(Y),G=j(.33,1.53,.69,.99),K=q(G),_=U(K),J=t=>(t*=2)<1?.5*K(t):.5*(2-Math.pow(2,-10*(t-1))),Q={linear:e,easeIn:D,easeInOut:H,easeOut:z,circIn:Y,circInOut:Z,circOut:X,backIn:K,backInOut:_,backOut:G,anticipate:J},tt=t=>{if(Array.isArray(t)){w(4===t.length);const[e,n,r,s]=t;return j(e,n,r,s)}return"string"==typeof t?Q[t]:t},et=t=>Math.round(1e5*t)/1e5,nt=/(-)?([\d]*\.?[\d])+/g,rt=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,st=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function ot(t){return"string"==typeof t}const it=(t,e,n)=>Math.min(Math.max(n,t),e),at={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},lt={...at,transform:t=>it(0,1,t)},ut={...at,default:1},ct=(t,e)=>n=>Boolean(ot(n)&&st.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),ht=(t,e,n)=>r=>{if(!ot(r))return r;const[s,o,i,a]=r.match(nt);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(i),alpha:void 0!==a?parseFloat(a):1}},dt={...at,transform:t=>Math.round((t=>it(0,255,t))(t))},ft={test:ct("rgb","red"),parse:ht("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+dt.transform(t)+", "+dt.transform(e)+", "+dt.transform(n)+", "+et(lt.transform(r))+")"};const pt={test:ct("#"),parse:function(t){let e="",n="",r="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),r=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),r=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,r+=r,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}},transform:ft.transform},mt=t=>({test:e=>ot(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),gt=mt("deg"),yt=mt("%"),vt=mt("px"),wt=mt("vh"),bt=mt("vw"),xt={...yt,parse:t=>yt.parse(t)/100,transform:t=>yt.transform(100*t)},Vt={test:ct("hsl","hue"),parse:ht("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+yt.transform(et(e))+", "+yt.transform(et(n))+", "+et(lt.transform(r))+")"},At={test:t=>ft.test(t)||pt.test(t)||Vt.test(t),parse:t=>ft.test(t)?ft.parse(t):Vt.test(t)?Vt.parse(t):pt.parse(t),transform:t=>ot(t)?t:t.hasOwnProperty("red")?ft.transform(t):Vt.transform(t)},Mt=(t,e,n)=>-n*t+n*e+t;function St(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}const kt=(t,e,n)=>{const r=t*t;return Math.sqrt(Math.max(0,n*(e*e-r)+r))},Ct=[pt,ft,Vt];function Tt(t){const e=(n=t,Ct.find(t=>t.test(n)));var n;let r=e.parse(t);return e===Vt&&(r=function({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,n/=100;let s=0,o=0,i=0;if(e/=100){const r=n<.5?n*(1+e):n+e-n*e,a=2*n-r;s=St(a,r,t+1/3),o=St(a,r,t),i=St(a,r,t-1/3)}else s=o=i=n;return{red:Math.round(255*s),green:Math.round(255*o),blue:Math.round(255*i),alpha:r}}(r)),r}const Et=(t,e)=>{const n=Tt(t),r=Tt(e),s={...n};return t=>(s.red=kt(n.red,r.red,t),s.green=kt(n.green,r.green,t),s.blue=kt(n.blue,r.blue,t),s.alpha=Mt(n.alpha,r.alpha,t),ft.transform(s))},Pt=(t,e)=>n=>e(t(n)),Ot=(...t)=>t.reduce(Pt),Ft=t=>e=>"string"==typeof e&&e.startsWith(t),Bt=Ft("--"),It=Ft("var(--");const Lt={regex:/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,countKey:"Vars",token:"${v}",parse:e},Wt={regex:rt,countKey:"Colors",token:"${c}",parse:At.parse},Rt={regex:nt,countKey:"Numbers",token:"${n}",parse:at.parse};function Nt(t,{regex:e,countKey:n,token:r,parse:s}){const o=t.tokenised.match(e);o&&(t["num"+n]=o.length,t.tokenised=t.tokenised.replace(e,r),t.values.push(...o.map(s)))}function jt(t){const e=t.toString(),n={value:e,tokenised:e,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&Nt(n,Lt),Nt(n,Wt),Nt(n,Rt),n}function Dt(t){return jt(t).values}function zt(t){const{values:e,numColors:n,numVars:r,tokenised:s}=jt(t),o=e.length;return t=>{let e=s;for(let s=0;s<o;s++)e=s<r?e.replace(Lt.token,t[s]):s<r+n?e.replace(Wt.token,At.transform(t[s])):e.replace(Rt.token,et(t[s]));return e}}const Ht=t=>"number"==typeof t?0:t;const $t={test:function(t){var e,n;return isNaN(t)&&ot(t)&&((null===(e=t.match(nt))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(rt))||void 0===n?void 0:n.length)||0)>0},parse:Dt,createTransformer:zt,getAnimatableNone:function(t){const e=Dt(t);return zt(t)(e.map(Ht))}},Ut=(t,e)=>n=>""+(n>0?e:t);function qt(t,e){return"number"==typeof t?n=>Mt(t,e,n):At.test(t)?Et(t,e):t.startsWith("var(")?Ut(t,e):Zt(t,e)}const Yt=(t,e)=>{const n=[...t],r=n.length,s=t.map((t,n)=>qt(t,e[n]));return t=>{for(let e=0;e<r;e++)n[e]=s[e](t);return n}},Xt=(t,e)=>{const n={...t,...e},r={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(r[s]=qt(t[s],e[s]));return t=>{for(const e in r)n[e]=r[e](t);return n}},Zt=(t,e)=>{const n=$t.createTransformer(e),r=jt(t),s=jt(e);return r.numVars===s.numVars&&r.numColors===s.numColors&&r.numNumbers>=s.numNumbers?Ot(Yt(r.values,s.values),n):Ut(t,e)},Gt=(t,e,n)=>{const r=e-t;return 0===r?1:(n-t)/r},Kt=(t,e)=>n=>Mt(t,e,n);function _t(t,n,r){const s=[],o=r||("number"==typeof(i=t[0])?Kt:"string"==typeof i?At.test(i)?Et:Zt:Array.isArray(i)?Yt:"object"==typeof i?Xt:Kt);var i;const a=t.length-1;for(let r=0;r<a;r++){let i=o(t[r],t[r+1]);if(n){const t=Array.isArray(n)?n[r]||e:n;i=Ot(t,i)}s.push(i)}return s}function Jt(t,e,{clamp:n=!0,ease:r,mixer:s}={}){const o=t.length;if(w(o===e.length),1===o)return()=>e[0];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const i=_t(e,r,s),a=i.length,l=e=>{let n=0;if(a>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const r=Gt(t[n],t[n+1],e);return i[n](r)};return n?e=>l(it(t[0],t[o-1],e)):l}function Qt(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const s=Gt(0,e,r);t.push(Mt(n,1,s))}}function te(t){const e=[0];return Qt(e,t.length-1),e}function ee({duration:t=300,keyframes:e,times:n,ease:r="easeInOut"}){const s=$(r)?r.map(tt):tt(r),o={done:!1,value:e[0]},i=Jt(function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:te(e),t),e,{ease:Array.isArray(s)?s:(a=e,l=s,a.map(()=>l||H).splice(0,a.length-1))});var a,l;return{calculatedDuration:t,next:e=>(o.value=i(e),o.done=e>=t,o)}}function ne(t,e,n){const r=Math.max(e-5,0);return d(n-t(r),e-r)}function re({duration:t=800,bounce:e=.25,velocity:n=0,mass:r=1}){let s,o;v(t<=P(10));let i=1-e;i=it(.05,1,i),t=it(.01,10,O(t)),i<1?(s=e=>{const r=e*i,s=r*t;return.001-(r-n)/se(e,i)*Math.exp(-s)},o=e=>{const r=e*i*t,o=r*n+n,a=Math.pow(i,2)*Math.pow(e,2)*t,l=Math.exp(-r),u=se(Math.pow(e,2),i);return(.001-s(e)>0?-1:1)*((o-a)*l)/u}):(s=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,o=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let r=n;for(let n=1;n<12;n++)r-=t(r)/e(r);return r}(s,o,5/t);if(t=P(t),isNaN(a))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(a,2)*r;return{stiffness:e,damping:2*i*Math.sqrt(r*e),duration:t}}}function se(t,e){return t*Math.sqrt(1-e*e)}const oe=["duration","bounce"],ie=["stiffness","damping","mass"];function ae(t,e){return e.some(e=>void 0!==t[e])}function le({keyframes:t,restDelta:e,restSpeed:n,...r}){const s=t[0],o=t[t.length-1],i={done:!1,value:s},{stiffness:a,damping:l,mass:u,duration:c,velocity:h,isResolvedFromDuration:d}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!ae(t,ie)&&ae(t,oe)){const n=re(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}({...r,velocity:-O(r.velocity||0)}),f=h||0,p=l/(2*Math.sqrt(a*u)),m=o-s,g=O(Math.sqrt(a/u)),y=Math.abs(m)<5;let v;if(n||(n=y?.01:2),e||(e=y?.005:.5),p<1){const t=se(g,p);v=e=>{const n=Math.exp(-p*g*e);return o-n*((f+p*g*m)/t*Math.sin(t*e)+m*Math.cos(t*e))}}else if(1===p)v=t=>o-Math.exp(-g*t)*(m+(f+g*m)*t);else{const t=g*Math.sqrt(p*p-1);v=e=>{const n=Math.exp(-p*g*e),r=Math.min(t*e,300);return o-n*((f+p*g*m)*Math.sinh(r)+t*m*Math.cosh(r))/t}}return{calculatedDuration:d&&c||null,next:t=>{const r=v(t);if(d)i.done=t>=c;else{let s=f;0!==t&&(s=p<1?ne(v,t,r):0);const a=Math.abs(s)<=n,l=Math.abs(o-r)<=e;i.done=a&&l}return i.value=i.done?o:r,i}}}function ue({keyframes:t,velocity:e=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:i,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],d={done:!1,value:h},f=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let p=n*e;const m=h+p,g=void 0===i?m:i(m);g!==m&&(p=g-h);const y=t=>-p*Math.exp(-t/r),v=t=>g+y(t),w=t=>{const e=y(t),n=v(t);d.done=Math.abs(e)<=u,d.value=d.done?g:n};let b,x;const V=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(b=t,x=le({keyframes:[d.value,f(d.value)],velocity:ne(v,t,d.value),damping:s,stiffness:o,restDelta:u,restSpeed:c}))};return V(0),{calculatedDuration:null,next:t=>{let e=!1;return x||void 0!==b||(e=!0,w(t),V(t)),void 0!==b&&t>b?x.next(t-b):(!e&&w(t),d)}}}const ce=t=>{const e=({timestamp:e})=>t(e);return{start:()=>i.update(e,!0),stop:()=>a(e),now:()=>l.isProcessing?l.timestamp:m.now()}};function he(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}const de={decay:ue,inertia:ue,tween:ee,keyframes:ee,spring:le};function fe({autoplay:t=!0,delay:e=0,driver:n=ce,keyframes:r,type:s="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:a="loop",onPlay:l,onStop:u,onComplete:c,onUpdate:h,...d}){let f,p,m=1,g=!1;const y=()=>{p=new Promise(t=>{f=t})};let v;y();const w=de[s]||ee;let b;w!==ee&&"number"!=typeof r[0]&&(b=Jt([0,100],r,{clamp:!1}),r=[0,100]);const x=w({...d,keyframes:r});let V;"mirror"===a&&(V=w({...d,keyframes:[...r].reverse(),velocity:-(d.velocity||0)}));let A="idle",M=null,S=null,k=null;null===x.calculatedDuration&&o&&(x.calculatedDuration=he(x));const{calculatedDuration:C}=x;let T=1/0,E=1/0;null!==C&&(T=C+i,E=T*(o+1)-i);let F=0;const B=t=>{if(null===S)return;m>0&&(S=Math.min(S,t)),m<0&&(S=Math.min(t-E/m,S)),F=null!==M?M:Math.round(t-S)*m;const n=F-e*(m>=0?1:-1),s=m>=0?n<0:n>E;F=Math.max(n,0),"finished"===A&&null===M&&(F=E);let l=F,u=x;if(o){const t=Math.min(F,E)/T;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,o+1);Boolean(e%2)&&("reverse"===a?(n=1-n,i&&(n-=i/T)):"mirror"===a&&(u=V)),l=it(0,1,n)*T}const c=s?{done:!1,value:r[0]}:u.next(l);b&&(c.value=b(c.value));let{done:d}=c;s||null===C||(d=m>=0?F>=E:F<=0);const f=null===M&&("finished"===A||"running"===A&&d);return h&&h(c.value),f&&W(),c},I=()=>{v&&v.stop(),v=void 0},L=()=>{A="idle",I(),f(),y(),S=k=null},W=()=>{A="finished",c&&c(),I(),f()},R=()=>{if(g)return;v||(v=n(B));const t=v.now();l&&l(),null!==M?S=t-M:S&&"finished"!==A||(S=t),"finished"===A&&y(),k=S,M=null,A="running",v.start()};t&&R();const N={then:(t,e)=>p.then(t,e),get time(){return O(F)},set time(t){t=P(t),F=t,null===M&&v&&0!==m?S=v.now()-t/m:M=t},get duration(){const t=null===x.calculatedDuration?he(x):x.calculatedDuration;return O(t)},get speed(){return m},set speed(t){t!==m&&v&&(m=t,N.time=O(F))},get state(){return A},play:R,pause:()=>{A="paused",M=F},stop:()=>{g=!0,"idle"!==A&&(A="idle",u&&u(),L())},cancel:()=>{null!==k&&B(k),L()},complete:()=>{A="finished"},sample:t=>(S=0,B(t))};return N}const pe=A(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),me=new Set(["opacity","clipPath","filter","transform"]);function ge(t,n,{onUpdate:r,onComplete:s,...o}){if(!(pe()&&me.has(n)&&!o.repeatDelay&&"mirror"!==o.repeatType&&0!==o.damping&&"inertia"!==o.type))return!1;let l,u,c=!1,h=!1;const d=()=>{u=new Promise(t=>{l=t})};d();let{keyframes:f,duration:p=300,ease:m,times:g}=o;if(((t,e)=>"spring"===e.type||"backgroundColor"===t||!I(e.ease))(n,o)){const t=fe({...o,repeat:0,delay:0});let e={done:!1,value:f[0]};const n=[];let r=0;for(;!e.done&&r<2e4;)e=t.sample(r),n.push(e.value),r+=10;g=void 0,f=n,p=r-10,m="linear"}const y=function(t,e,n,{delay:r=0,duration:s,repeat:o=0,repeatType:i="loop",ease:a,times:l}={}){const u={[e]:n};l&&(u.offset=l);const c=R(a);return Array.isArray(c)&&(u.easing=c),t.animate(u,{delay:r,duration:s,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:"reverse"===i?"alternate":"normal"})}(t.owner.current,n,f,{...o,duration:p,ease:m,times:g}),v=()=>{h=!1,y.cancel()},w=()=>{h=!0,i.update(v),l(),d()};y.onfinish=()=>{h||(t.set(function(t,{repeat:e,repeatType:n="loop"}){return t[e&&"loop"!==n&&e%2==1?0:t.length-1]}(f,o)),s&&s(),w())};return{then:(t,e)=>u.then(t,e),attachTimeline:t=>(y.timeline=t,y.onfinish=null,e),get time(){return O(y.currentTime||0)},set time(t){y.currentTime=P(t)},get speed(){return y.playbackRate},set speed(t){y.playbackRate=t},get duration(){return O(p)},play:()=>{c||(y.play(),a(v))},pause:()=>y.pause(),stop:()=>{if(c=!0,"idle"===y.playState)return;const{currentTime:e}=y;if(e){const n=fe({...o,autoplay:!1});t.setWithVelocity(n.sample(e-10).value,n.sample(e).value,10)}w()},complete:()=>{h||y.finish()},cancel:w}}const ye={type:"spring",stiffness:500,damping:25,restSpeed:10},ve={type:"keyframes",duration:.8},we={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},be=(t,{keyframes:e})=>e.length>2?ve:C.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:ye:we,xe=(t,e)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!$t.test(e)&&"0"!==e||e.startsWith("url("))),Ve=new Set(["brightness","contrast","saturate","opacity"]);function Ae(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[r]=n.match(nt)||[];if(!r)return t;const s=n.replace(r,"");let o=Ve.has(e)?1:0;return r!==n&&(o*=100),e+"("+o+s+")"}const Me=/([a-z-]*)\(.*?\)/g,Se={...$t,getAnimatableNone:t=>{const e=t.match(Me);return e?e.map(Ae).join(" "):t}},ke={...at,transform:Math.round},Ce={borderWidth:vt,borderTopWidth:vt,borderRightWidth:vt,borderBottomWidth:vt,borderLeftWidth:vt,borderRadius:vt,radius:vt,borderTopLeftRadius:vt,borderTopRightRadius:vt,borderBottomRightRadius:vt,borderBottomLeftRadius:vt,width:vt,maxWidth:vt,height:vt,maxHeight:vt,size:vt,top:vt,right:vt,bottom:vt,left:vt,padding:vt,paddingTop:vt,paddingRight:vt,paddingBottom:vt,paddingLeft:vt,margin:vt,marginTop:vt,marginRight:vt,marginBottom:vt,marginLeft:vt,rotate:gt,rotateX:gt,rotateY:gt,rotateZ:gt,scale:ut,scaleX:ut,scaleY:ut,scaleZ:ut,skew:gt,skewX:gt,skewY:gt,distance:vt,translateX:vt,translateY:vt,translateZ:vt,x:vt,y:vt,z:vt,perspective:vt,transformPerspective:vt,opacity:lt,originX:xt,originY:xt,originZ:vt,zIndex:ke,fillOpacity:lt,strokeOpacity:lt,numOctaves:ke},Te={...Ce,color:At,backgroundColor:At,outlineColor:At,fill:At,stroke:At,borderColor:At,borderTopColor:At,borderRightColor:At,borderBottomColor:At,borderLeftColor:At,filter:Se,WebkitFilter:Se},Ee=t=>Te[t];function Pe(t,e){let n=Ee(t);return n!==Se&&(n=$t),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Oe=t=>/^0[^.\s]+$/.test(t);function Fe(t){return"number"==typeof t?0===t:null!==t?"none"===t||"0"===t||Oe(t):void 0}function Be(t,e){return t[e]||t.default||t}const Ie=(t,r,s,o={})=>i=>{const a=Be(o,t)||{},l=a.delay||o.delay||0;let{elapsed:u=0}=o;u-=P(l);const c=function(t,e,n,r){const s=xe(e,n);let o;o=Array.isArray(n)?[...n]:[null,n];const i=void 0!==r.from?r.from:t.get();let a=void 0;const l=[];for(let t=0;t<o.length;t++)null===o[t]&&(o[t]=0===t?i:o[t-1]),Fe(o[t])&&l.push(t),"string"==typeof o[t]&&"none"!==o[t]&&"0"!==o[t]&&(a=o[t]);if(s&&l.length&&a)for(let t=0;t<l.length;t++){o[l[t]]=Pe(e,a)}return o}(r,t,s,a),h=c[0],d=c[c.length-1],f=xe(t,h),p=xe(t,d);let m={keyframes:c,velocity:r.getVelocity(),ease:"easeOut",...a,delay:-u,onUpdate:t=>{r.set(t),a.onUpdate&&a.onUpdate(t)},onComplete:()=>{i(),a.onComplete&&a.onComplete()}};if(function({when:t,delay:e,delayChildren:n,staggerChildren:r,staggerDirection:s,repeat:o,repeatType:i,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}(a)||(m={...m,...be(t,m)}),m.duration&&(m.duration=P(m.duration)),m.repeatDelay&&(m.repeatDelay=P(m.repeatDelay)),!f||!p||F||!1===a.type||n)return function({keyframes:t,delay:n,onUpdate:r,onComplete:s}){const o=()=>(r&&r(t[t.length-1]),s&&s(),{time:0,speed:1,duration:0,play:e,pause:e,stop:e,then:t=>(t(),Promise.resolve()),cancel:e,complete:e});return n?fe({keyframes:[0,1],duration:0,delay:n,onComplete:o}):o()}(F?{...m,delay:0}:m);if(!o.isHandoff&&r.owner&&r.owner.current instanceof HTMLElement&&!r.owner.getProps().onUpdate){const e=ge(r,t,m);if(e)return e}return fe(m)},Le=t=>Boolean(t&&t.getVelocity);function We(t){return Boolean(Le(t)&&t.add)}const Re=t=>/^\-?\d*\.?\d+$/.test(t),Ne=t=>Array.isArray(t),je=t=>e=>e.test(t),De=[at,vt,yt,gt,bt,wt,{test:t=>"auto"===t,parse:t=>t}],ze=t=>De.find(je(t)),He=[...De,At,$t];function $e(t,e,n,r={},s={}){return"function"==typeof e&&(e=e(void 0!==n?n:t.custom,r,s)),"string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e&&(e=e(void 0!==n?n:t.custom,r,s)),e}function Ue(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,y(n))}function qe(t,e){const n=function(t,e,n){const r=t.getProps();return $e(r,e,void 0!==n?n:r.custom,function(t){const e={};return t.values.forEach((t,n)=>e[n]=t.get()),e}(t),function(t){const e={};return t.values.forEach((t,n)=>e[n]=t.getVelocity()),e}(t))}(t,e);let{transitionEnd:r={},transition:s={},...o}=n?t.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const e in o){Ue(t,e,(i=o[e],Ne(i)?i[i.length-1]||0:i))}var i}function Ye(t,e){if(!e)return;return(e[t]||e.default||e).from}function Xe({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,r}function Ze(t,e){const n=t.get();if(!Array.isArray(e))return n!==e;for(let t=0;t<e.length;t++)if(e[t]!==n)return!0}function Ge(t,e,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:a,...l}=t.makeTargetAnimatable(e);const u=t.getValue("willChange");r&&(o=r);const c=[],h=s&&t.animationState&&t.animationState.getState()[s];for(const e in l){const r=t.getValue(e),s=l[e];if(!r||void 0===s||h&&Xe(h,e))continue;const a={delay:n,elapsed:0,...Be(o||{},e)};if(window.HandoffAppearAnimations){const n=t.getProps()[E];if(n){const t=window.HandoffAppearAnimations(n,e,r,i);null!==t&&(a.elapsed=t,a.isHandoff=!0)}}let d=!a.isHandoff&&!Ze(r,s);if("spring"===a.type&&(r.getVelocity()||a.velocity)&&(d=!1),r.animation&&(d=!1),d)continue;r.start(Ie(e,r,s,t.shouldReduceMotion&&C.has(e)?{type:!1}:a));const f=r.animation;We(u)&&(u.add(e),f.then(()=>u.remove(e))),c.push(f)}return a&&Promise.all(c).then(()=>{a&&qe(t,a)}),c}const Ke={};function _e(t,{layout:e,layoutId:n}){return C.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!Ke[t]||"opacity"===t)}function Je(t,e){const{style:n}=t,r={};for(const s in n)(Le(n[s])||e.style&&Le(e.style[s])||_e(s,t))&&(r[s]=n[s]);return r}const Qe=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function tn(t,e,n=1){const[r,s]=function(t){const e=Qe.exec(t);if(!e)return[,];const[,n,r]=e;return[n,r]}(t);if(!r)return;const o=window.getComputedStyle(e).getPropertyValue(r);if(o){const t=o.trim();return Re(t)?parseFloat(t):t}return It(s)?tn(s,e,n+1):s}const en="undefined"!=typeof document,nn=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),rn=t=>nn.has(t),sn=t=>t===at||t===vt,on=(t,e)=>parseFloat(t.split(", ")[e]),an=(t,e)=>(n,{transform:r})=>{if("none"===r||!r)return 0;const s=r.match(/^matrix3d\((.+)\)$/);if(s)return on(s[1],e);{const e=r.match(/^matrix\((.+)\)$/);return e?on(e[1],t):0}},ln=new Set(["x","y","z"]),un=k.filter(t=>!ln.has(t));const cn={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:an(4,13),y:an(5,14)};cn.translateX=cn.x,cn.translateY=cn.y;const hn=(t,e,n={},r={})=>{e={...e},r={...r};const s=Object.keys(e).filter(rn);let o=[],i=!1;const a=[];if(s.forEach(s=>{const l=t.getValue(s);if(!t.hasValue(s))return;let u=n[s],c=ze(u);const h=e[s];let d;if(Ne(h)){const t=h.length,e=null===h[0]?1:0;u=h[e],c=ze(u);for(let n=e;n<t&&null!==h[n];n++)d?w(ze(h[n])===d):d=ze(h[n])}else d=ze(h);if(c!==d)if(sn(c)&&sn(d)){const t=l.get();"string"==typeof t&&l.set(parseFloat(t)),"string"==typeof h?e[s]=parseFloat(h):Array.isArray(h)&&d===vt&&(e[s]=h.map(parseFloat))}else(null==c?void 0:c.transform)&&(null==d?void 0:d.transform)&&(0===u||0===h)?0===u?l.set(d.transform(u)):e[s]=c.transform(h):(i||(o=function(t){const e=[];return un.forEach(n=>{const r=t.getValue(n);void 0!==r&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e.length&&t.render(),e}(t),i=!0),a.push(s),r[s]=void 0!==r[s]?r[s]:e[s],l.jump(h))}),a.length){const n=a.indexOf("height")>=0?window.pageYOffset:null,s=((t,e,n)=>{const r=e.measureViewportBox(),s=e.current,o=getComputedStyle(s),{display:i}=o,a={};"none"===i&&e.setStaticValue("display",t.display||"block"),n.forEach(t=>{a[t]=cn[t](r,o)}),e.render();const l=e.measureViewportBox();return n.forEach(n=>{const r=e.getValue(n);r&&r.jump(a[n]),t[n]=cn[n](l,o)}),t})(e,t,a);return o.length&&o.forEach(([e,n])=>{t.getValue(e).set(n)}),t.render(),en&&null!==n&&window.scrollTo({top:n}),{target:s,transitionEnd:r}}return{target:e,transitionEnd:r}};function dn(t,e,n,r){return(t=>Object.keys(t).some(rn))(e)?hn(t,e,n,r):{target:e,transitionEnd:r}}const fn=(t,e,n,r)=>{const s=function(t,{...e},n){const r=t.current;if(!(r instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.values.forEach(t=>{const e=t.get();if(!It(e))return;const n=tn(e,r);n&&t.set(n)});for(const t in e){const s=e[t];if(!It(s))continue;const o=tn(s,r);o&&(e[t]=o,n||(n={}),void 0===n[t]&&(n[t]=s))}return{target:e,transitionEnd:n}}(t,e,r);return dn(t,e=s.target,n,r=s.transitionEnd)};const pn={current:null},mn={current:!1};function gn(t){return"string"==typeof t||Array.isArray(t)}const yn=["initial","animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"];function vn(t){return null!==(e=t.animate)&&"object"==typeof e&&"function"==typeof e.start||yn.some(e=>gn(t[e]));var e}const wn={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"]},bn={};for(const t in wn)bn[t]={isEnabled:e=>wn[t].some(t=>!!e[t])};const xn=Object.keys(bn),Vn=xn.length,An=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Mn=yn.length;class Sn extends class{constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:r,visualState:s},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,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.scheduleRender=()=>i.render(this.render,!1,!0);const{latestValues:a,renderState:l}=s;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=r,this.options=o,this.isControllingVariants=vn(e),this.isVariantNode=function(t){return Boolean(vn(t)||t.variants)}(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(e,{});for(const t in c){const e=c[t];void 0!==a[t]&&Le(e)&&(e.set(a[t],!1),We(u)&&u.add(t))}}scrapeMotionValuesFromProps(t,e){return{}}mount(t){this.current=t,x.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)),mn.current||function(){if(mn.current=!0,en)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>pn.current=t.matches;t.addListener(e),e()}else pn.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||pn.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){x.delete(this.current),this.projection&&this.projection.unmount(),a(this.notifyUpdate),a(this.render),this.valueSubscriptions.forEach(t=>t()),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)this.features[t].unmount();this.current=null}bindToMotionValue(t,e){const n=C.has(t),r=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&i.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),s=e.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{r(),s()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}loadFeatures({children:t,...e},n,r,s){let o,i;for(let t=0;t<Vn;t++){const n=xn[t],{isEnabled:r,Feature:s,ProjectionNode:a,MeasureLayout:l}=bn[n];a&&(o=a),r(e)&&(!this.features[n]&&s&&(this.features[n]=new s(this)),l&&(i=l))}if(("html"===this.type||"svg"===this.type)&&!this.projection&&o){this.projection=new o(this.latestValues,this.parent&&this.parent.projection);const{layoutId:t,layout:n,drag:r,dragConstraints:i,layoutScroll:l,layoutRoot:u}=e;this.projection.setOptions({layoutId:t,layout:n,alwaysMeasureLayout:Boolean(r)||i&&(a=i,a&&"object"==typeof a&&Object.prototype.hasOwnProperty.call(a,"current")),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:s,layoutScroll:l,layoutRoot:u})}var a;return i}updateFeatures(){for(const t in this.features){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,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}makeTargetAnimatable(t,e=!0){return this.makeTargetAnimatableFromInstance(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<An.length;e++){const n=An[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const r=t["on"+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=function(t,e,n){const{willChange:r}=e;for(const s in e){const o=e[s],i=n[s];if(Le(o))t.addValue(s,o),We(r)&&r.add(s);else if(Le(i))t.addValue(s,y(o,{owner:t})),We(r)&&r.remove(s);else if(i!==o)if(t.hasValue(s)){const e=t.getValue(s);!e.hasAnimated&&e.set(o)}else{const e=t.getStaticValue(s);t.addValue(s,y(void 0!==e?e:o,{owner:t}))}}for(const r in n)void 0===e[r]&&t.removeValue(r);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}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}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const t=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(t.initial=this.props.initial),t}const e={};for(let t=0;t<Mn;t++){const n=yn[t],r=this.props[n];(gn(r)||!1===r)&&(e[n]=r)}return e}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){e!==this.values.get(t)&&(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=y(e,{owner:this}),this.addValue(t,n)),n}readValue(t){var e;return void 0===this.latestValues[t]&&this.current?null!==(e=this.getBaseTargetFromProps(this.props,t))&&void 0!==e?e:this.readValueFromInstance(this.current,t,this.options):this.latestValues[t]}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props,r="string"==typeof n||"object"==typeof n?null===(e=$e(this.props,n))||void 0===e?void 0:e[t]:void 0;if(n&&void 0!==r)return r;const s=this.getBaseTargetFromProps(this.props,t);return void 0===s||Le(s)?void 0!==this.initialValues[t]&&void 0===r?void 0:this.baseTarget[t]:s}on(t,e){return this.events[t]||(this.events[t]=new h),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}{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]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:e,...n},r){const s=function(t,e,n){const r={};for(const s in t){const t=Ye(s,e);if(void 0!==t)r[s]=t;else{const t=n.getValue(s);t&&(r[s]=t.get())}}return r}(n,t||{},this);if(r){!function(t,e,n){var r,s;const o=Object.keys(e).filter(e=>!t.hasValue(e)),i=o.length;var a;if(i)for(let l=0;l<i;l++){const i=o[l],u=e[i];let c=null;Array.isArray(u)&&(c=u[0]),null===c&&(c=null!==(s=null!==(r=n[i])&&void 0!==r?r:t.readValue(i))&&void 0!==s?s:e[i]),null!=c&&("string"==typeof c&&(Re(c)||Oe(c))?c=parseFloat(c):(a=c,!He.find(je(a))&&$t.test(u)&&(c=Pe(i,u))),t.addValue(i,y(c,{owner:t})),void 0===n[i]&&(n[i]=c),null!==c&&t.setBaseTarget(i,c))}}(this,n,s);const t=fn(this,n,s,e);e=t.transitionEnd,n=t.target}return{transition:t,transitionEnd:e,...n}}}const kn={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Cn=k.length;const Tn=(t,e)=>e&&"number"==typeof t?e.transform(t):t;function En(t,e,n,r){const{style:s,vars:o,transform:i,transformOrigin:a}=t;let l=!1,u=!1,c=!0;for(const t in e){const n=e[t];if(Bt(t)){o[t]=n;continue}const r=Ce[t],h=Tn(n,r);if(C.has(t)){if(l=!0,i[t]=h,!c)continue;n!==(r.default||0)&&(c=!1)}else t.startsWith("origin")?(u=!0,a[t]=h):s[t]=h}if(e.transform||(l||r?s.transform=function(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},r,s){let o="";for(let e=0;e<Cn;e++){const n=k[e];if(void 0!==t[n]){o+=`${kn[n]||n}(${t[n]}) `}}return e&&!t.z&&(o+="translateZ(0)"),o=o.trim(),s?o=s(t,r?"":o):n&&r&&(o="none"),o}(t.transform,n,c,r):s.transform&&(s.transform="none")),u){const{originX:t="50%",originY:e="50%",originZ:n=0}=a;s.transformOrigin=`${t} ${e} ${n}`}}function Pn(t,e,n){return"string"==typeof t?t:vt.transform(e+n*t)}const On={offset:"stroke-dashoffset",array:"stroke-dasharray"},Fn={offset:"strokeDashoffset",array:"strokeDasharray"};function Bn(t,{attrX:e,attrY:n,attrScale:r,originX:s,originY:o,pathLength:i,pathSpacing:a=1,pathOffset:l=0,...u},c,h,d){if(En(t,u,c,d),h)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:f,style:p,dimensions:m}=t;f.transform&&(m&&(p.transform=f.transform),delete f.transform),m&&(void 0!==s||void 0!==o||p.transform)&&(p.transformOrigin=function(t,e,n){return`${Pn(e,t.x,t.width)} ${Pn(n,t.y,t.height)}`}(m,void 0!==s?s:.5,void 0!==o?o:.5)),void 0!==e&&(f.x=e),void 0!==n&&(f.y=n),void 0!==r&&(f.scale=r),void 0!==i&&function(t,e,n=1,r=0,s=!0){t.pathLength=1;const o=s?On:Fn;t[o.offset]=vt.transform(-r);const i=vt.transform(e),a=vt.transform(n);t[o.array]=`${i} ${a}`}(f,i,a,l,!1)}const In=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 Ln(t,{style:e,vars:n},r,s){Object.assign(t.style,e,s&&s.getProjectionStyles(r));for(const e in n)t.style.setProperty(e,n[e])}class Wn extends Sn{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(C.has(e)){const t=Ee(e);return t&&t.default||0}return e=In.has(e)?e:T(e),t.getAttribute(e)}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}scrapeMotionValuesFromProps(t,e){return function(t,e){const n=Je(t,e);for(const r in t)if(Le(t[r])||Le(e[r])){n[-1!==k.indexOf(r)?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r]=t[r]}return n}(t,e)}build(t,e,n,r){Bn(t,e,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,e,n,r){!function(t,e,n,r){Ln(t,e,void 0,r);for(const n in e.attrs)t.setAttribute(In.has(n)?n:T(n),e.attrs[n])}(t,e,0,r)}mount(t){var e;this.isSVGTag="string"==typeof(e=t.tagName)&&"svg"===e.toLowerCase(),super.mount(t)}}class Rn extends Sn{constructor(){super(...arguments),this.type="html"}readValueFromInstance(t,e){if(C.has(e)){const t=Ee(e);return t&&t.default||0}{const r=(n=t,window.getComputedStyle(n)),s=(Bt(e)?r.getPropertyValue(e):r[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return function(t,e){return function({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(t.getBoundingClientRect(),e))}(t,e)}build(t,e,n,r){En(t,e,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,e){return Je(t,e)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Le(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=""+t)}))}renderInstance(t,e,n,r){Ln(t,e,n,r)}}function Nn(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 Wn(e,{enableHardwareAcceleration:!1}):new Rn(e,{enableHardwareAcceleration:!0});n.mount(t),x.set(t,n)}function jn(t,e,n){const r=Le(t)?t:y(t);return r.start(Ie("",r,e,n)),r.animation}function Dn(t,e=100){const n=le({keyframes:[0,e],...t}),r=Math.min(he(n),2e4);return{type:"keyframes",ease:t=>n.next(r*t).value/e,duration:O(r)}}function zn(t,e,n,r){var s;return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:null!==(s=r.get(e))&&void 0!==s?s:t}const Hn=(t,e,n)=>{const r=e-t;return((n-t)%r+r)%r+t};function $n(t,e){return $(t)?t[Hn(0,t.length,e)]:t}function Un(t,e,n,r,s,o){!function(t,e,n){for(let r=0;r<t.length;r++){const s=t[r];s.at>e&&s.at<n&&(c(t,s),r--)}}(t,s,o);for(let i=0;i<e.length;i++)t.push({value:e[i],at:Mt(s,o,r[i]),easing:$n(n,i)})}function qn(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function Yn(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function Xn(t,e){return e[t]||(e[t]=[]),e[t]}function Zn(t){return Array.isArray(t)?t:[t]}function Gn(t,e){return t[e]?{...t,...t[e]}:{...t}}const Kn=t=>"number"==typeof t,_n=t=>t.every(Kn);function Jn(t,e,n,r){const s=b(t,r),o=s.length,i=[];for(let t=0;t<o;t++){const r=s[t];x.has(r)||Nn(r);const a=x.get(r),l={...n};"function"==typeof l.delay&&(l.delay=l.delay(t,o)),i.push(...Ge(a,{...e,transition:l},{}))}return new S(i)}function Qn(t,e,n){const r=[];return function(t,{defaultTransition:e={},...n}={},r){const s=e.duration||.3,o=new Map,i=new Map,a={},l=new Map;let u=0,c=0,h=0;for(let n=0;n<t.length;n++){const o=t[n];if("string"==typeof o){l.set(o,c);continue}if(!Array.isArray(o)){l.set(o.name,zn(c,o.at,u,l));continue}let[d,f,p={}]=o;void 0!==p.at&&(c=zn(c,p.at,u,l));let m=0;const g=(t,n,r,o=0,i=0)=>{const a=Zn(t),{delay:l=0,times:u=te(a),type:d="keyframes",...f}=n;let{ease:p=e.ease||"easeOut",duration:g}=n;const y="function"==typeof l?l(o,i):l,v=a.length;if(v<=2&&"spring"===d){let t=100;if(2===v&&_n(a)){const e=a[1]-a[0];t=Math.abs(e)}const e={...f};void 0!==g&&(e.duration=P(g));const n=Dn(e,t);p=n.ease,g=n.duration}null!=g||(g=s);const w=c+y,b=w+g;1===u.length&&0===u[0]&&(u[1]=1);const x=u.length-a.length;x>0&&Qt(u,x),1===a.length&&a.unshift(null),Un(r,a,p,u,w,b),m=Math.max(y+g,m),h=Math.max(b,h)};if(Le(d)){g(f,p,Xn("default",Yn(d,i)))}else{const t=b(d,r,a),e=t.length;for(let n=0;n<e;n++){f=f,p=p;const r=Yn(t[n],i);for(const t in f)g(f[t],Gn(p,t),Xn(t,r),n,e)}}u=c,c+=m}return i.forEach((t,r)=>{for(const s in t){const i=t[s];i.sort(qn);const a=[],l=[],u=[];for(let t=0;t<i.length;t++){const{at:e,value:n,easing:r}=i[t];a.push(n),l.push(Gt(0,h,e)),u.push(r||"easeOut")}0!==l[0]&&(l.unshift(0),a.unshift(a[0]),u.unshift("easeInOut")),1!==l[l.length-1]&&(l.push(1),a.push(null)),o.has(r)||o.set(r,{keyframes:{},transition:{}});const c=o.get(r);c.keyframes[s]=a,c.transition[s]={...e,duration:h,ease:u,times:l,...n}}}),o}(t,e,n).forEach(({keyframes:t,transition:e},n)=>{let s;s=Le(n)?jn(n,t.default,e.default):Jn(n,t,e),r.push(s)}),new S(r)}const tr=t=>function(e,n,r){let s;var o;return o=e,s=Array.isArray(o)&&Array.isArray(o[0])?Qn(e,n,t):function(t){return"object"==typeof t&&!Array.isArray(t)}(n)?Jn(e,n,r,t):jn(e,n,r),t&&t.animations.push(s),s},er=tr(),nr=new WeakMap;let rr;function sr({target:t,contentRect:e,borderBoxSize:n}){var r;null===(r=nr.get(t))||void 0===r||r.forEach(r=>{r({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 or(t){t.forEach(sr)}function ir(t,e){rr||"undefined"!=typeof ResizeObserver&&(rr=new ResizeObserver(or));const n=b(t);return n.forEach(t=>{let n=nr.get(t);n||(n=new Set,nr.set(t,n)),n.add(e),null==rr||rr.observe(t)}),()=>{n.forEach(t=>{const n=nr.get(t);null==n||n.delete(e),(null==n?void 0:n.size)||null==rr||rr.unobserve(t)})}}const ar=new Set;let lr;function ur(t){return ar.add(t),lr||(lr=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};ar.forEach(t=>t(e))},window.addEventListener("resize",lr)),()=>{ar.delete(t),!ar.size&&lr&&(lr=void 0)}}const cr={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function hr(t,e,n,r){const s=n[e],{length:o,position:i}=cr[e],a=s.current,l=n.time;s.current=t["scroll"+i],s.scrollLength=t["scroll"+o]-t["client"+o],s.offset.length=0,s.offset[0]=0,s.offset[1]=s.scrollLength,s.progress=Gt(0,s.scrollLength,s.current);const u=r-l;s.velocity=u>50?0:d(s.current-a,u)}const dr={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},fr={start:0,center:.5,end:1};function pr(t,e,n=0){let r=0;if(void 0!==fr[t]&&(t=fr[t]),"string"==typeof t){const e=parseFloat(t);t.endsWith("px")?r=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?r=e/100*document.documentElement.clientWidth:t.endsWith("vh")?r=e/100*document.documentElement.clientHeight:t=e}return"number"==typeof t&&(r=e*t),n+r}const mr=[0,0];function gr(t,e,n,r){let s=Array.isArray(t)?t:mr,o=0,i=0;return"number"==typeof t?s=[t,t]:"string"==typeof t&&(s=(t=t.trim()).includes(" ")?t.split(" "):[t,fr[t]?t:"0"]),o=pr(s[0],n,r),i=pr(s[1],e),o-i}const yr={x:0,y:0};function vr(t,e,n){let{offset:r=dr.All}=n;const{target:s=t,axis:o="y"}=n,i="y"===o?"height":"width",a=s!==t?function(t,e){const n={x:0,y:0};let r=t;for(;r&&r!==e;)if(r instanceof HTMLElement)n.x+=r.offsetLeft,n.y+=r.offsetTop,r=r.offsetParent;else if("svg"===r.tagName){const t=r.getBoundingClientRect();r=r.parentElement;const e=r.getBoundingClientRect();n.x+=t.left-e.left,n.y+=t.top-e.top}else{if(!(r instanceof SVGGraphicsElement))break;{const{x:t,y:e}=r.getBBox();n.x+=t,n.y+=e;let s=null,o=r.parentNode;for(;!s;)"svg"===o.tagName&&(s=o),o=r.parentNode;r=s}}return n}(s,t):yr,l=s===t?{width:t.scrollWidth,height:t.scrollHeight}:function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(s),u={width:t.clientWidth,height:t.clientHeight};e[o].offset.length=0;let c=!e[o].interpolate;const h=r.length;for(let t=0;t<h;t++){const n=gr(r[t],u[i],l[i],a[o]);c||n===e[o].interpolatorOffsets[t]||(c=!0),e[o].offset[t]=n}c&&(e[o].interpolate=Jt(e[o].offset,te(r)),e[o].interpolatorOffsets=[...e[o].offset]),e[o].progress=e[o].interpolate(e[o].current)}function wr(t,e,n,r={}){return{measure:()=>function(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let r=e;for(;r&&r!==t;)n.x.targetOffset+=r.offsetLeft,n.y.targetOffset+=r.offsetTop,r=r.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,r.target,n),update:e=>{!function(t,e,n){hr(t,"x",e,n),hr(t,"y",e,n),e.time=n}(t,n,e),(r.offset||r.target)&&vr(t,n,r)},notify:()=>e(n)}}const br=new WeakMap,xr=new WeakMap,Vr=new WeakMap,Ar=t=>t===document.documentElement?window:t;function Mr(t,{container:e=document.documentElement,...n}={}){let r=Vr.get(e);r||(r=new Set,Vr.set(e,r));const s=wr(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(r.add(s),!br.has(e)){const t=()=>{for(const t of r)t.measure()},n=()=>{for(const t of r)t.update(l.timestamp)},s=()=>{for(const t of r)t.notify()},a=()=>{i.read(t,!1,!0),i.read(n,!1,!0),i.update(s,!1,!0)};br.set(e,a);const c=Ar(e);window.addEventListener("resize",a,{passive:!0}),e!==document.documentElement&&xr.set(e,(u=a,"function"==typeof(o=e)?ur(o):ir(o,u))),c.addEventListener("scroll",a,{passive:!0})}var o,u;const c=br.get(e);return i.read(c,!1,!0),()=>{var t;a(c);const n=Vr.get(e);if(!n)return;if(n.delete(s),n.size)return;const r=br.get(e);br.delete(e),r&&(Ar(e).removeEventListener("scroll",r),null===(t=xr.get(e))||void 0===t||t(),window.removeEventListener("resize",r))}}const Sr=new Map;function kr({source:t=document.documentElement,axis:e="y"}={}){Sr.has(t)||Sr.set(t,{});const n=Sr.get(t);return n[e]||(n[e]=M()?new ScrollTimeline({source:t,axis:e}):function({source:t,axis:e="y"}){const n={value:0},r=Mr(t=>{n.value=100*t[e].progress},{container:t,axis:e});return{currentTime:n,cancel:r}}({source:t,axis:e})),n[e]}const Cr={some:0,all:1};const Tr=(t,e)=>Math.abs(t-e);const Er=i,Pr=o.reduce((t,e)=>(t[e]=t=>a(t),t),{});t.MotionValue=g,t.animate=er,t.anticipate=J,t.backIn=K,t.backInOut=_,t.backOut=G,t.cancelFrame=a,t.cancelSync=Pr,t.circIn=Y,t.circInOut=Z,t.circOut=X,t.clamp=it,t.createScopedAnimate=tr,t.cubicBezier=j,t.delay=function(t,e){const n=m.now(),r=({timestamp:s})=>{const o=s-n;o>=e&&(a(r),t(o-e))};return i.read(r,!0),()=>a(r)},t.distance=Tr,t.distance2D=function(t,e){const n=Tr(t.x,e.x),r=Tr(t.y,e.y);return Math.sqrt(n**2+r**2)},t.easeIn=D,t.easeInOut=H,t.easeOut=z,t.frame=i,t.frameData=l,t.inView=function(t,e,{root:n,margin:r,amount:s="some"}={}){const o=b(t),i=new WeakMap,a=new IntersectionObserver(t=>{t.forEach(t=>{const n=i.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){const n=e(t);"function"==typeof n?i.set(t.target,n):a.unobserve(t.target)}else n&&(n(t),i.delete(t.target))})},{root:n,rootMargin:r,threshold:"number"==typeof s?s:Cr[s]});return o.forEach(t=>a.observe(t)),()=>a.disconnect()},t.interpolate=Jt,t.invariant=w,t.mirrorEasing=U,t.mix=Mt,t.motionValue=y,t.pipe=Ot,t.progress=Gt,t.reverseEasing=q,t.scroll=function(t,e){const n=kr(e);return"function"==typeof t?V(t,n):t.attachTimeline(n)},t.scrollInfo=Mr,t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:r}={}){return(s,o)=>{const i="number"==typeof n?n:function(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}(n,o),a=Math.abs(i-s);let l=t*a;if(r){const e=o*t;l=tt(r)(l/e)*e}return e+l}},t.steps=u,t.sync=Er,t.transform=function(...t){const e=!Array.isArray(t[0]),n=e?0:-1,r=t[0+n],s=t[1+n],o=t[2+n],i=t[3+n],a=Jt(s,o,{mixer:(l=o[0],(t=>t&&"object"==typeof t&&t.mix)(l)?l.mix:void 0),...i});var l;return e?a(r):a},t.warning=v,t.wrap=Hn,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
@@ -859,6 +859,7 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
859
859
|
!lead.target &&
|
|
860
860
|
(this.treeScale.x !== 1 || this.treeScale.y !== 1)) {
|
|
861
861
|
lead.target = lead.layout.layoutBox;
|
|
862
|
+
lead.targetWithTransforms = createBox();
|
|
862
863
|
}
|
|
863
864
|
const { target } = lead;
|
|
864
865
|
if (!target) {
|
|
@@ -1471,6 +1472,7 @@ const defaultLayoutTransition = {
|
|
|
1471
1472
|
ease: [0.4, 0, 0.1, 1],
|
|
1472
1473
|
};
|
|
1473
1474
|
const userAgentContains = (string) => typeof navigator !== "undefined" &&
|
|
1475
|
+
navigator.userAgent &&
|
|
1474
1476
|
navigator.userAgent.toLowerCase().includes(string);
|
|
1475
1477
|
/**
|
|
1476
1478
|
* Measured bounding boxes must be rounded in Safari and
|
|
@@ -22,7 +22,7 @@ function updateMotionValuesFromProps(element, next, prev) {
|
|
|
22
22
|
* and warn against mismatches.
|
|
23
23
|
*/
|
|
24
24
|
if (process.env.NODE_ENV === "development") {
|
|
25
|
-
warnOnce(nextValue.version === "11.0.
|
|
25
|
+
warnOnce(nextValue.version === "11.0.4", `Attempting to mix Framer Motion versions ${nextValue.version} with 11.0.4 may not work as expected.`);
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
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 = "11.0.
|
|
37
|
+
this.version = "11.0.4";
|
|
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
|
|
@@ -3277,7 +3277,6 @@
|
|
|
3277
3277
|
"clipPath",
|
|
3278
3278
|
"filter",
|
|
3279
3279
|
"transform",
|
|
3280
|
-
"backgroundColor",
|
|
3281
3280
|
]);
|
|
3282
3281
|
/**
|
|
3283
3282
|
* 10ms is chosen here as it strikes a balance between smooth
|
|
@@ -3896,7 +3895,7 @@
|
|
|
3896
3895
|
* This will be replaced by the build step with the latest version number.
|
|
3897
3896
|
* When MotionValues are provided to motion components, warn if versions are mixed.
|
|
3898
3897
|
*/
|
|
3899
|
-
this.version = "11.0.
|
|
3898
|
+
this.version = "11.0.4";
|
|
3900
3899
|
/**
|
|
3901
3900
|
* Tracks whether this value can output a velocity. Currently this is only true
|
|
3902
3901
|
* if the value is numerical, but we might be able to widen the scope here and support
|
|
@@ -6785,7 +6784,7 @@
|
|
|
6785
6784
|
* and warn against mismatches.
|
|
6786
6785
|
*/
|
|
6787
6786
|
{
|
|
6788
|
-
warnOnce(nextValue.version === "11.0.
|
|
6787
|
+
warnOnce(nextValue.version === "11.0.4", `Attempting to mix Framer Motion versions ${nextValue.version} with 11.0.4 may not work as expected.`);
|
|
6789
6788
|
}
|
|
6790
6789
|
}
|
|
6791
6790
|
else if (isMotionValue(prevValue)) {
|
|
@@ -9243,6 +9242,7 @@
|
|
|
9243
9242
|
!lead.target &&
|
|
9244
9243
|
(this.treeScale.x !== 1 || this.treeScale.y !== 1)) {
|
|
9245
9244
|
lead.target = lead.layout.layoutBox;
|
|
9245
|
+
lead.targetWithTransforms = createBox();
|
|
9246
9246
|
}
|
|
9247
9247
|
const { target } = lead;
|
|
9248
9248
|
if (!target) {
|
|
@@ -9855,6 +9855,7 @@
|
|
|
9855
9855
|
ease: [0.4, 0, 0.1, 1],
|
|
9856
9856
|
};
|
|
9857
9857
|
const userAgentContains = (string) => typeof navigator !== "undefined" &&
|
|
9858
|
+
navigator.userAgent &&
|
|
9858
9859
|
navigator.userAgent.toLowerCase().includes(string);
|
|
9859
9860
|
/**
|
|
9860
9861
|
* Measured bounding boxes must be rounded in Safari and
|
package/dist/framer-motion.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={},t.React)}(this,(function(t,e){"use strict";function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}function i(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}})),e.default=t,Object.freeze(e)}var s=i(e),o=n(e);const r=e.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),a=e.createContext({}),l=e.createContext(null),u="undefined"!=typeof document,c=u?e.useLayoutEffect:e.useEffect,h=e.createContext({strict:!1}),d=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),p="data-"+d("framerAppearId"),m={skipAnimations:!1,useManualTiming:!1};class f{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const e=this.order.indexOf(t);-1!==e&&(this.order.splice(e,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}const g=["prepare","read","update","preRender","render","postRender"];function y(t,e){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=g.reduce((t,e)=>(t[e]=function(t){let e=new f,n=new f,i=0,s=!1,o=!1;const r=new WeakSet,a={schedule:(t,o=!1,a=!1)=>{const l=a&&s,u=l?e:n;return o&&r.add(t),u.add(t)&&l&&s&&(i=e.order.length),t},cancel:t=>{n.remove(t),r.delete(t)},process:l=>{if(s)o=!0;else{if(s=!0,[e,n]=[n,e],n.clear(),i=e.order.length,i)for(let n=0;n<i;n++){const i=e.order[n];r.has(i)&&(a.schedule(i),t()),i(l)}s=!1,o&&(o=!1,a.process(l))}}};return a}(()=>n=!0),t),{}),r=t=>{o[t].process(s)},a=()=>{const o=m.useManualTiming?s.timestamp:performance.now();n=!1,s.delta=i?1e3/60:Math.max(Math.min(o-s.timestamp,40),1),s.timestamp=o,s.isProcessing=!0,g.forEach(r),s.isProcessing=!1,n&&e&&(i=!1,t(a))};return{schedule:g.reduce((e,r)=>{const l=o[r];return e[r]=(e,o=!1,r=!1)=>(n||(n=!0,i=!0,s.isProcessing||t(a)),l.schedule(e,o,r)),e},{}),cancel:t=>g.forEach(e=>o[e].cancel(t)),state:s,steps:o}}const{schedule:v,cancel:x}=y(queueMicrotask,!1);function P(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function w(t){return"string"==typeof t||Array.isArray(t)}function E(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}const b=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],A=["initial",...b];function S(t){return E(t.animate)||A.some(e=>w(t[e]))}function T(t){return Boolean(S(t)||t.variants)}function C(t){const{initial:n,animate:i}=function(t,e){if(S(t)){const{initial:e,animate:n}=t;return{initial:!1===e||w(e)?e:void 0,animate:w(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,e.useContext(a));return e.useMemo(()=>({initial:n,animate:i}),[V(n),V(i)])}function V(t){return Array.isArray(t)?t.join(" "):t}const M={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"]},R={};for(const t in M)R[t]={isEnabled:e=>M[t].some(t=>!!e[t])};function D(t){for(const e in t)R[e]={...R[e],...t[e]}}const L=e.createContext({}),k=e.createContext({}),B=Symbol.for("motionComponentSymbol");function j({preloadedFeatures:t,createVisualElement:n,useRender:i,useVisualState:o,Component:d}){t&&D(t);const m=e.forwardRef((function(m,f){let g;const y={...e.useContext(r),...m,layoutId:F(m)},{isStatic:x}=y,w=C(m),E=o(m,x);if(!x&&u){w.visualElement=function(t,n,i,s){const{visualElement:o}=e.useContext(a),u=e.useContext(h),d=e.useContext(l),m=e.useContext(r).reducedMotion,f=e.useRef();s=s||u.renderer,!f.current&&s&&(f.current=s(t,{visualState:n,parent:o,props:i,presenceContext:d,blockInitialAnimation:!!d&&!1===d.initial,reducedMotionConfig:m}));const g=f.current;e.useInsertionEffect(()=>{g&&g.update(i,d)});const y=e.useRef(Boolean(i[p]&&!window.HandoffComplete));return c(()=>{g&&(v.postRender(g.render),y.current&&g.animationState&&g.animationState.animateChanges())}),e.useEffect(()=>{g&&(g.updateFeatures(),!y.current&&g.animationState&&g.animationState.animateChanges(),y.current&&(y.current=!1,window.HandoffComplete=!0))}),g}(d,E,y,n);const i=e.useContext(k),s=e.useContext(h).strict;w.visualElement&&(g=w.visualElement.loadFeatures(y,s,t,i))}return s.createElement(a.Provider,{value:w},g&&w.visualElement?s.createElement(g,{visualElement:w.visualElement,...y}):null,i(d,m,function(t,n,i){return e.useCallback(e=>{e&&t.mount&&t.mount(e),n&&(e?n.mount(e):n.unmount()),i&&("function"==typeof i?i(e):P(i)&&(i.current=e))},[n])}(E,w.visualElement,f),E,x,w.visualElement))}));return m[B]=d,m}function F({layoutId:t}){const n=e.useContext(L).id;return n&&void 0!==t?n+"-"+t:t}function O(t){function e(e,n={}){return j(t(e,n))}if("undefined"==typeof Proxy)return e;const n=new Map;return new Proxy(e,{get:(t,i)=>(n.has(i)||n.set(i,e(i)),n.get(i))})}const I=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function U(t){return"string"==typeof t&&!t.includes("-")&&!!(I.indexOf(t)>-1||/[A-Z]/.test(t))}const W={};function N(t){Object.assign(W,t)}const z=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],H=new Set(z);function $(t,{layout:e,layoutId:n}){return H.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!W[t]||"opacity"===t)}const Y=t=>Boolean(t&&t.getVelocity),X={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},G=z.length;function q(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},i,s){let o="";for(let e=0;e<G;e++){const n=z[e];if(void 0!==t[n]){o+=`${X[n]||n}(${t[n]}) `}}return e&&!t.z&&(o+="translateZ(0)"),o=o.trim(),s?o=s(t,i?"":o):n&&i&&(o="none"),o}const Z=t=>e=>"string"==typeof e&&e.startsWith(t),K=Z("--"),_=Z("var(--"),J=(t,e)=>e&&"number"==typeof t?e.transform(t):t,Q=(t,e,n)=>Math.min(Math.max(n,t),e),tt={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},et={...tt,transform:t=>Q(0,1,t)},nt={...tt,default:1},it=t=>Math.round(1e5*t)/1e5,st=/(-)?([\d]*\.?[\d])+/g,ot=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,rt=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function at(t){return"string"==typeof t}const lt=t=>({test:e=>at(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),ut=lt("deg"),ct=lt("%"),ht=lt("px"),dt=lt("vh"),pt=lt("vw"),mt={...ct,parse:t=>ct.parse(t)/100,transform:t=>ct.transform(100*t)},ft={...tt,transform:Math.round},gt={borderWidth:ht,borderTopWidth:ht,borderRightWidth:ht,borderBottomWidth:ht,borderLeftWidth:ht,borderRadius:ht,radius:ht,borderTopLeftRadius:ht,borderTopRightRadius:ht,borderBottomRightRadius:ht,borderBottomLeftRadius:ht,width:ht,maxWidth:ht,height:ht,maxHeight:ht,size:ht,top:ht,right:ht,bottom:ht,left:ht,padding:ht,paddingTop:ht,paddingRight:ht,paddingBottom:ht,paddingLeft:ht,margin:ht,marginTop:ht,marginRight:ht,marginBottom:ht,marginLeft:ht,rotate:ut,rotateX:ut,rotateY:ut,rotateZ:ut,scale:nt,scaleX:nt,scaleY:nt,scaleZ:nt,skew:ut,skewX:ut,skewY:ut,distance:ht,translateX:ht,translateY:ht,translateZ:ht,x:ht,y:ht,z:ht,perspective:ht,transformPerspective:ht,opacity:et,originX:mt,originY:mt,originZ:ht,zIndex:ft,fillOpacity:et,strokeOpacity:et,numOctaves:ft};function yt(t,e,n,i){const{style:s,vars:o,transform:r,transformOrigin:a}=t;let l=!1,u=!1,c=!0;for(const t in e){const n=e[t];if(K(t)){o[t]=n;continue}const i=gt[t],h=J(n,i);if(H.has(t)){if(l=!0,r[t]=h,!c)continue;n!==(i.default||0)&&(c=!1)}else t.startsWith("origin")?(u=!0,a[t]=h):s[t]=h}if(e.transform||(l||i?s.transform=q(t.transform,n,c,i):s.transform&&(s.transform="none")),u){const{originX:t="50%",originY:e="50%",originZ:n=0}=a;s.transformOrigin=`${t} ${e} ${n}`}}const vt=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function xt(t,e,n){for(const i in e)Y(e[i])||$(i,n)||(t[i]=e[i])}function Pt(t,n,i){const s={};return xt(s,t.style||{},t),Object.assign(s,function({transformTemplate:t},n,i){return e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{}};return yt(e,n,{enableHardwareAcceleration:!i},t),Object.assign({},e.vars,e.style)},[n])}(t,n,i)),s}function wt(t,e,n){const i={},s=Pt(t,e,n);return t.drag&&!1!==t.dragListener&&(i.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(i.tabIndex=0),i.style=s,i}const Et=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function bt(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Et.has(t)}let At=t=>!bt(t);function St(t){t&&(At=e=>e.startsWith("on")?!bt(e):t(e))}try{St(require("@emotion/is-prop-valid").default)}catch(t){}function Tt(t,e,n){const i={};for(const s in t)"values"===s&&"object"==typeof t.values||(At(s)||!0===n&&bt(s)||!e&&!bt(s)||t.draggable&&s.startsWith("onDrag"))&&(i[s]=t[s]);return i}function Ct(t,e,n){return"string"==typeof t?t:ht.transform(e+n*t)}const Vt={offset:"stroke-dashoffset",array:"stroke-dasharray"},Mt={offset:"strokeDashoffset",array:"strokeDasharray"};function Rt(t,{attrX:e,attrY:n,attrScale:i,originX:s,originY:o,pathLength:r,pathSpacing:a=1,pathOffset:l=0,...u},c,h,d){if(yt(t,u,c,d),h)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:p,style:m,dimensions:f}=t;p.transform&&(f&&(m.transform=p.transform),delete p.transform),f&&(void 0!==s||void 0!==o||m.transform)&&(m.transformOrigin=function(t,e,n){return`${Ct(e,t.x,t.width)} ${Ct(n,t.y,t.height)}`}(f,void 0!==s?s:.5,void 0!==o?o:.5)),void 0!==e&&(p.x=e),void 0!==n&&(p.y=n),void 0!==i&&(p.scale=i),void 0!==r&&function(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?Vt:Mt;t[o.offset]=ht.transform(-i);const r=ht.transform(e),a=ht.transform(n);t[o.array]=`${r} ${a}`}(p,r,a,l,!1)}const Dt=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),Lt=t=>"string"==typeof t&&"svg"===t.toLowerCase();function kt(t,n,i,s){const o=e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Rt(e,n,{enableHardwareAcceleration:!1},Lt(s),t.transformTemplate),{...e.attrs,style:{...e.style}}},[n]);if(t.style){const e={};xt(e,t.style,t),o.style={...e,...o.style}}return o}function Bt(t=!1){return(n,i,s,{latestValues:o},r)=>{const a=(U(n)?kt:wt)(i,o,r,n),l={...Tt(i,"string"==typeof n,t),...a,ref:s},{children:u}=i,c=e.useMemo(()=>Y(u)?u.get():u,[u]);return e.createElement(n,{...l,children:c})}}function jt(t,{style:e,vars:n},i,s){Object.assign(t.style,e,s&&s.getProjectionStyles(i));for(const e in n)t.style.setProperty(e,n[e])}const Ft=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 Ot(t,e,n,i){jt(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(Ft.has(n)?n:d(n),e.attrs[n])}function It(t,e){const{style:n}=t,i={};for(const s in n)(Y(n[s])||e.style&&Y(e.style[s])||$(s,t))&&(i[s]=n[s]);return i}function Ut(t,e){const n=It(t,e);for(const i in t)if(Y(t[i])||Y(e[i])){n[-1!==z.indexOf(i)?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i]=t[i]}return n}function Wt(t,e,n,i={},s={}){return"function"==typeof e&&(e=e(void 0!==n?n:t.custom,i,s)),"string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e&&(e=e(void 0!==n?n:t.custom,i,s)),e}function Nt(t){const n=e.useRef(null);return null===n.current&&(n.current=t()),n.current}const zt=t=>Array.isArray(t);function Ht(t){const e=Y(t)?t.get():t;return n=e,Boolean(n&&"object"==typeof n&&n.mix&&n.toValue)?e.toValue():e;var n}const $t=t=>(n,i)=>{const s=e.useContext(a),o=e.useContext(l),r=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},i,s,o){const r={latestValues:Yt(i,s,o,t),renderState:e()};return n&&(r.mount=t=>n(i,t,r)),r}(t,n,s,o);return i?r():Nt(r)};function Yt(t,e,n,i){const s={},o=i(t,{});for(const t in o)s[t]=Ht(o[t]);let{initial:r,animate:a}=t;const l=S(t),u=T(t);e&&u&&!l&&!1!==t.inherit&&(void 0===r&&(r=e.initial),void 0===a&&(a=e.animate));let c=!!n&&!1===n.initial;c=c||!1===r;const h=c?a:r;if(h&&"boolean"!=typeof h&&!E(h)){(Array.isArray(h)?h:[h]).forEach(e=>{const n=Wt(t,e);if(!n)return;const{transitionEnd:i,transition:o,...r}=n;for(const t in r){let e=r[t];if(Array.isArray(e)){e=e[c?e.length-1:0]}null!==e&&(s[t]=e)}for(const t in i)s[t]=i[t]})}return s}const Xt=t=>t,{schedule:Gt,cancel:qt,state:Zt,steps:Kt}=y("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:Xt,!0),_t={useVisualState:$t({scrapeMotionValuesFromProps:Ut,createRenderState:Dt,onMount:(t,e,{renderState:n,latestValues:i})=>{Gt.read(()=>{try{n.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(t){n.dimensions={x:0,y:0,width:0,height:0}}}),Gt.render(()=>{Rt(n,i,{enableHardwareAcceleration:!1},Lt(e.tagName),t.transformTemplate),Ot(e,n)})}})},Jt={useVisualState:$t({scrapeMotionValuesFromProps:It,createRenderState:vt})};function Qt(t,{forwardMotionProps:e=!1},n,i){return{...U(t)?_t:Jt,preloadedFeatures:n,useRender:Bt(e),createVisualElement:i,Component:t}}function te(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}const ee=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function ne(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const ie=t=>e=>ee(e)&&t(e,ne(e));function se(t,e,n,i){return te(t,e,ie(n),i)}const oe=(t,e)=>n=>e(t(n)),re=(...t)=>t.reduce(oe);function ae(t){let e=null;return()=>{const n=()=>{e=null};return null===e&&(e=t,n)}}const le=ae("dragHorizontal"),ue=ae("dragVertical");function ce(t){let e=!1;if("y"===t)e=ue();else if("x"===t)e=le();else{const t=le(),n=ue();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}function he(){const t=ce(!0);return!t||(t(),!1)}class de{constructor(t){this.isMounted=!1,this.node=t}update(){}}function pe(t,e){const n="pointer"+(e?"enter":"leave"),i="onHover"+(e?"Start":"End");return se(t.current,n,(n,s)=>{if("touch"===n.pointerType||he())return;const o=t.getProps();t.animationState&&o.whileHover&&t.animationState.setActive("whileHover",e),o[i]&&Gt.update(()=>o[i](n,s))},{passive:!t.getProps()[i]})}const me=(t,e)=>!!e&&(t===e||me(t,e.parentElement));function fe(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,ne(n))}const ge=new WeakMap,ye=new WeakMap,ve=t=>{const e=ge.get(t.target);e&&e(t)},xe=t=>{t.forEach(ve)};function Pe(t,e,n){const i=function({root:t,...e}){const n=t||document;ye.has(n)||ye.set(n,{});const i=ye.get(n),s=JSON.stringify(e);return i[s]||(i[s]=new IntersectionObserver(xe,{root:t,...e})),i[s]}(e);return ge.set(t,n),i.observe(t),()=>{ge.delete(t),i.unobserve(t)}}const we={some:0,all:1};const Ee={inView:{Feature:class extends de{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:i="some",once:s}=t,o={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof i?i:we[i]};return Pe(this.node.current,o,t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,s&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),o=e?n:i;o&&o(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends de{constructor(){super(...arguments),this.removeStartListeners=Xt,this.removeEndListeners=Xt,this.removeAccessibleListeners=Xt,this.startPointerPress=(t,e)=>{if(this.isPressing)return;this.removeEndListeners();const n=this.node.getProps(),i=se(window,"pointerup",(t,e)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:i,globalTapTarget:s}=this.node.getProps();Gt.update(()=>{s||me(this.node.current,t.target)?n&&n(t,e):i&&i(t,e)})},{passive:!(n.onTap||n.onPointerUp)}),s=se(window,"pointercancel",(t,e)=>this.cancelPress(t,e),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=re(i,s),this.startPress(t,e)},this.startAccessiblePress=()=>{const t=te(this.node.current,"keydown",t=>{if("Enter"!==t.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=te(this.node.current,"keyup",t=>{"Enter"===t.key&&this.checkPressEnd()&&fe("up",(t,e)=>{const{onTap:n}=this.node.getProps();n&&Gt.update(()=>n(t,e))})}),fe("down",(t,e)=>{this.startPress(t,e)})}),e=te(this.node.current,"blur",()=>{this.isPressing&&fe("cancel",(t,e)=>this.cancelPress(t,e))});this.removeAccessibleListeners=re(t,e)}}startPress(t,e){this.isPressing=!0;const{onTapStart:n,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&Gt.update(()=>n(t,e))}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!he()}cancelPress(t,e){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&Gt.update(()=>n(t,e))}mount(){const t=this.node.getProps(),e=se(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),n=te(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=re(e,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends de{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=re(te(this.node.current,"focus",()=>this.onFocus()),te(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends de{mount(){this.unmount=re(pe(this.node,!0),pe(this.node,!1))}unmount(){}}}};function be(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}function Ae(t,e,n){const i=t.getProps();return Wt(i,e,void 0!==n?n:i.custom,function(t){const e={};return t.values.forEach((t,n)=>e[n]=t.get()),e}(t),function(t){const e={};return t.values.forEach((t,n)=>e[n]=t.getVelocity()),e}(t))}let Se=Xt,Te=Xt;const Ce=t=>1e3*t,Ve=t=>t/1e3,Me={current:!1},Re=t=>Array.isArray(t)&&"number"==typeof t[0];function De(t){return Boolean(!t||"string"==typeof t&&ke[t]||Re(t)||Array.isArray(t)&&t.every(De))}const Le=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,ke={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Le([0,.65,.55,1]),circOut:Le([.55,0,1,.45]),backIn:Le([.31,.01,.66,-.59]),backOut:Le([.33,1.53,.69,.99])};function Be(t){if(t)return Re(t)?Le(t):Array.isArray(t)?t.map(Be):ke[t]}function je(t,e,n,{delay:i=0,duration:s,repeat:o=0,repeatType:r="loop",ease:a,times:l}={}){const u={[e]:n};l&&(u.offset=l);const c=Be(a);return Array.isArray(c)&&(u.easing=c),t.animate(u,{delay:i,duration:s,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"})}const Fe=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function Oe(t,e,n,i){if(t===e&&n===i)return Xt;const s=e=>function(t,e,n,i,s){let o,r,a=0;do{r=e+(n-e)/2,o=Fe(r,i,s)-t,o>0?n=r:e=r}while(Math.abs(o)>1e-7&&++a<12);return r}(e,0,1,t,n);return t=>0===t||1===t?t:Fe(s(t),e,i)}const Ie=Oe(.42,0,1,1),Ue=Oe(0,0,.58,1),We=Oe(.42,0,.58,1),Ne=t=>Array.isArray(t)&&"number"!=typeof t[0],ze=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,He=t=>e=>1-t(1-e),$e=t=>1-Math.sin(Math.acos(t)),Ye=He($e),Xe=ze($e),Ge=Oe(.33,1.53,.69,.99),qe=He(Ge),Ze=ze(qe),Ke=t=>(t*=2)<1?.5*qe(t):.5*(2-Math.pow(2,-10*(t-1))),_e={linear:Xt,easeIn:Ie,easeInOut:We,easeOut:Ue,circIn:$e,circInOut:Xe,circOut:Ye,backIn:qe,backInOut:Ze,backOut:Ge,anticipate:Ke},Je=t=>{if(Array.isArray(t)){Te(4===t.length);const[e,n,i,s]=t;return Oe(e,n,i,s)}return"string"==typeof t?(Te(void 0!==_e[t]),_e[t]):t},Qe=(t,e)=>n=>Boolean(at(n)&&rt.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),tn=(t,e,n)=>i=>{if(!at(i))return i;const[s,o,r,a]=i.match(st);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},en={...tt,transform:t=>Math.round((t=>Q(0,255,t))(t))},nn={test:Qe("rgb","red"),parse:tn("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+en.transform(t)+", "+en.transform(e)+", "+en.transform(n)+", "+it(et.transform(i))+")"};const sn={test:Qe("#"),parse:function(t){let e="",n="",i="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}},transform:nn.transform},on={test:Qe("hsl","hue"),parse:tn("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+ct.transform(it(e))+", "+ct.transform(it(n))+", "+it(et.transform(i))+")"},rn={test:t=>nn.test(t)||sn.test(t)||on.test(t),parse:t=>nn.test(t)?nn.parse(t):on.test(t)?on.parse(t):sn.parse(t),transform:t=>at(t)?t:t.hasOwnProperty("red")?nn.transform(t):on.transform(t)},an=(t,e,n)=>-n*t+n*e+t;function ln(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}const un=(t,e,n)=>{const i=t*t;return Math.sqrt(Math.max(0,n*(e*e-i)+i))},cn=[sn,nn,on];function hn(t){const e=(n=t,cn.find(t=>t.test(n)));var n;Te(Boolean(e));let i=e.parse(t);return e===on&&(i=function({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let s=0,o=0,r=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;s=ln(a,i,t+1/3),o=ln(a,i,t),r=ln(a,i,t-1/3)}else s=o=r=n;return{red:Math.round(255*s),green:Math.round(255*o),blue:Math.round(255*r),alpha:i}}(i)),i}const dn=(t,e)=>{const n=hn(t),i=hn(e),s={...n};return t=>(s.red=un(n.red,i.red,t),s.green=un(n.green,i.green,t),s.blue=un(n.blue,i.blue,t),s.alpha=an(n.alpha,i.alpha,t),nn.transform(s))};const pn={regex:/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,countKey:"Vars",token:"${v}",parse:Xt},mn={regex:ot,countKey:"Colors",token:"${c}",parse:rn.parse},fn={regex:st,countKey:"Numbers",token:"${n}",parse:tt.parse};function gn(t,{regex:e,countKey:n,token:i,parse:s}){const o=t.tokenised.match(e);o&&(t["num"+n]=o.length,t.tokenised=t.tokenised.replace(e,i),t.values.push(...o.map(s)))}function yn(t){const e=t.toString(),n={value:e,tokenised:e,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&gn(n,pn),gn(n,mn),gn(n,fn),n}function vn(t){return yn(t).values}function xn(t){const{values:e,numColors:n,numVars:i,tokenised:s}=yn(t),o=e.length;return t=>{let e=s;for(let s=0;s<o;s++)e=s<i?e.replace(pn.token,t[s]):s<i+n?e.replace(mn.token,rn.transform(t[s])):e.replace(fn.token,it(t[s]));return e}}const Pn=t=>"number"==typeof t?0:t;const wn={test:function(t){var e,n;return isNaN(t)&&at(t)&&((null===(e=t.match(st))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(ot))||void 0===n?void 0:n.length)||0)>0},parse:vn,createTransformer:xn,getAnimatableNone:function(t){const e=vn(t);return xn(t)(e.map(Pn))}},En=(t,e)=>n=>""+(n>0?e:t);function bn(t,e){return"number"==typeof t?n=>an(t,e,n):rn.test(t)?dn(t,e):t.startsWith("var(")?En(t,e):Tn(t,e)}const An=(t,e)=>{const n=[...t],i=n.length,s=t.map((t,n)=>bn(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=s[e](t);return n}},Sn=(t,e)=>{const n={...t,...e},i={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(i[s]=bn(t[s],e[s]));return t=>{for(const e in i)n[e]=i[e](t);return n}},Tn=(t,e)=>{const n=wn.createTransformer(e),i=yn(t),s=yn(e);return i.numVars===s.numVars&&i.numColors===s.numColors&&i.numNumbers>=s.numNumbers?re(An(i.values,s.values),n):(Se(!0),En(t,e))},Cn=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i},Vn=(t,e)=>n=>an(t,e,n);function Mn(t,e,n){const i=[],s=n||("number"==typeof(o=t[0])?Vn:"string"==typeof o?rn.test(o)?dn:Tn:Array.isArray(o)?An:"object"==typeof o?Sn:Vn);var o;const r=t.length-1;for(let n=0;n<r;n++){let o=s(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||Xt:e;o=re(t,o)}i.push(o)}return i}function Rn(t,e,{clamp:n=!0,ease:i,mixer:s}={}){const o=t.length;if(Te(o===e.length),1===o)return()=>e[0];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const r=Mn(e,i,s),a=r.length,l=e=>{let n=0;if(a>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const i=Cn(t[n],t[n+1],e);return r[n](i)};return n?e=>l(Q(t[0],t[o-1],e)):l}function Dn(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=Cn(0,e,i);t.push(an(n,1,s))}}function Ln(t){const e=[0];return Dn(e,t.length-1),e}function kn({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=Ne(i)?i.map(Je):Je(i),o={done:!1,value:e[0]},r=Rn(function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:Ln(e),t),e,{ease:Array.isArray(s)?s:(a=e,l=s,a.map(()=>l||We).splice(0,a.length-1))});var a,l;return{calculatedDuration:t,next:e=>(o.value=r(e),o.done=e>=t,o)}}function Bn(t,e){return e?t*(1e3/e):0}function jn(t,e,n){const i=Math.max(e-5,0);return Bn(n-t(i),e-i)}function Fn({duration:t=800,bounce:e=.25,velocity:n=0,mass:i=1}){let s,o;Se(t<=Ce(10));let r=1-e;r=Q(.05,1,r),t=Q(.01,10,Ve(t)),r<1?(s=e=>{const i=e*r,s=i*t;return.001-(i-n)/On(e,r)*Math.exp(-s)},o=e=>{const i=e*r*t,o=i*n+n,a=Math.pow(r,2)*Math.pow(e,2)*t,l=Math.exp(-i),u=On(Math.pow(e,2),r);return(.001-s(e)>0?-1:1)*((o-a)*l)/u}):(s=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,o=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let i=n;for(let n=1;n<12;n++)i-=t(i)/e(i);return i}(s,o,5/t);if(t=Ce(t),isNaN(a))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(a,2)*i;return{stiffness:e,damping:2*r*Math.sqrt(i*e),duration:t}}}function On(t,e){return t*Math.sqrt(1-e*e)}const In=["duration","bounce"],Un=["stiffness","damping","mass"];function Wn(t,e){return e.some(e=>void 0!==t[e])}function Nn({keyframes:t,restDelta:e,restSpeed:n,...i}){const s=t[0],o=t[t.length-1],r={done:!1,value:s},{stiffness:a,damping:l,mass:u,duration:c,velocity:h,isResolvedFromDuration:d}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!Wn(t,Un)&&Wn(t,In)){const n=Fn(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}({...i,velocity:-Ve(i.velocity||0)}),p=h||0,m=l/(2*Math.sqrt(a*u)),f=o-s,g=Ve(Math.sqrt(a/u)),y=Math.abs(f)<5;let v;if(n||(n=y?.01:2),e||(e=y?.005:.5),m<1){const t=On(g,m);v=e=>{const n=Math.exp(-m*g*e);return o-n*((p+m*g*f)/t*Math.sin(t*e)+f*Math.cos(t*e))}}else if(1===m)v=t=>o-Math.exp(-g*t)*(f+(p+g*f)*t);else{const t=g*Math.sqrt(m*m-1);v=e=>{const n=Math.exp(-m*g*e),i=Math.min(t*e,300);return o-n*((p+m*g*f)*Math.sinh(i)+t*f*Math.cosh(i))/t}}return{calculatedDuration:d&&c||null,next:t=>{const i=v(t);if(d)r.done=t>=c;else{let s=p;0!==t&&(s=m<1?jn(v,t,i):0);const a=Math.abs(s)<=n,l=Math.abs(o-i)<=e;r.done=a&&l}return r.value=r.done?o:i,r}}}function zn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,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 m=n*e;const f=h+m,g=void 0===r?f:r(f);g!==f&&(m=g-h);const y=t=>-m*Math.exp(-t/i),v=t=>g+y(t),x=t=>{const e=y(t),n=v(t);d.done=Math.abs(e)<=u,d.value=d.done?g:n};let P,w;const E=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(P=t,w=Nn({keyframes:[d.value,p(d.value)],velocity:jn(v,t,d.value),damping:s,stiffness:o,restDelta:u,restSpeed:c}))};return E(0),{calculatedDuration:null,next:t=>{let e=!1;return w||void 0!==P||(e=!0,x(t),E(t)),void 0!==P&&t>P?w.next(t-P):(!e&&x(t),d)}}}let Hn;function $n(){Hn=void 0}const Yn={now:()=>(void 0===Hn&&Yn.set(Zt.isProcessing||m.useManualTiming?Zt.timestamp:performance.now()),Hn),set:t=>{Hn=t,queueMicrotask($n)}},Xn=t=>{const e=({timestamp:e})=>t(e);return{start:()=>Gt.update(e,!0),stop:()=>qt(e),now:()=>Zt.isProcessing?Zt.timestamp:Yn.now()}};function Gn(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}const qn={decay:zn,inertia:zn,tween:kn,keyframes:kn,spring:Nn};function Zn({autoplay:t=!0,delay:e=0,driver:n=Xn,keyframes:i,type:s="keyframes",repeat:o=0,repeatDelay:r=0,repeatType:a="loop",onPlay:l,onStop:u,onComplete:c,onUpdate:h,...d}){let p,m,f=1,g=!1;const y=()=>{m=new Promise(t=>{p=t})};let v;y();const x=qn[s]||kn;let P;x!==kn&&"number"!=typeof i[0]&&(P=Rn([0,100],i,{clamp:!1}),i=[0,100]);const w=x({...d,keyframes:i});let E;"mirror"===a&&(E=x({...d,keyframes:[...i].reverse(),velocity:-(d.velocity||0)}));let b="idle",A=null,S=null,T=null;null===w.calculatedDuration&&o&&(w.calculatedDuration=Gn(w));const{calculatedDuration:C}=w;let V=1/0,M=1/0;null!==C&&(V=C+r,M=V*(o+1)-r);let R=0;const D=t=>{if(null===S)return;f>0&&(S=Math.min(S,t)),f<0&&(S=Math.min(t-M/f,S)),R=null!==A?A:Math.round(t-S)*f;const n=R-e*(f>=0?1:-1),s=f>=0?n<0:n>M;R=Math.max(n,0),"finished"===b&&null===A&&(R=M);let l=R,u=w;if(o){const t=Math.min(R,M)/V;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,o+1);Boolean(e%2)&&("reverse"===a?(n=1-n,r&&(n-=r/V)):"mirror"===a&&(u=E)),l=Q(0,1,n)*V}const c=s?{done:!1,value:i[0]}:u.next(l);P&&(c.value=P(c.value));let{done:d}=c;s||null===C||(d=f>=0?R>=M:R<=0);const p=null===A&&("finished"===b||"running"===b&&d);return h&&h(c.value),p&&B(),c},L=()=>{v&&v.stop(),v=void 0},k=()=>{b="idle",L(),p(),y(),S=T=null},B=()=>{b="finished",c&&c(),L(),p()},j=()=>{if(g)return;v||(v=n(D));const t=v.now();l&&l(),null!==A?S=t-A:S&&"finished"!==b||(S=t),"finished"===b&&y(),T=S,A=null,b="running",v.start()};t&&j();const F={then:(t,e)=>m.then(t,e),get time(){return Ve(R)},set time(t){t=Ce(t),R=t,null===A&&v&&0!==f?S=v.now()-t/f:A=t},get duration(){const t=null===w.calculatedDuration?Gn(w):w.calculatedDuration;return Ve(t)},get speed(){return f},set speed(t){t!==f&&v&&(f=t,F.time=Ve(R))},get state(){return b},play:j,pause:()=>{b="paused",A=R},stop:()=>{g=!0,"idle"!==b&&(b="idle",u&&u(),k())},cancel:()=>{null!==T&&D(T),k()},complete:()=>{b="finished"},sample:t=>(S=0,D(t))};return F}function Kn(t){let e;return()=>(void 0===e&&(e=t()),e)}const _n=Kn(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Jn=new Set(["opacity","clipPath","filter","transform","backgroundColor"]);function Qn(t,e,{onUpdate:n,onComplete:i,...s}){if(!(_n()&&Jn.has(e)&&!s.repeatDelay&&"mirror"!==s.repeatType&&0!==s.damping&&"inertia"!==s.type))return!1;let o,r,a=!1,l=!1;const u=()=>{r=new Promise(t=>{o=t})};u();let{keyframes:c,duration:h=300,ease:d,times:p}=s;if(((t,e)=>"spring"===e.type||"backgroundColor"===t||!De(e.ease))(e,s)){const t=Zn({...s,repeat:0,delay:0});let e={done:!1,value:c[0]};const n=[];let i=0;for(;!e.done&&i<2e4;)e=t.sample(i),n.push(e.value),i+=10;p=void 0,c=n,h=i-10,d="linear"}const m=je(t.owner.current,e,c,{...s,duration:h,ease:d,times:p}),f=()=>{l=!1,m.cancel()},g=()=>{l=!0,Gt.update(f),o(),u()};m.onfinish=()=>{l||(t.set(function(t,{repeat:e,repeatType:n="loop"}){return t[e&&"loop"!==n&&e%2==1?0:t.length-1]}(c,s)),i&&i(),g())};return{then:(t,e)=>r.then(t,e),attachTimeline:t=>(m.timeline=t,m.onfinish=null,Xt),get time(){return Ve(m.currentTime||0)},set time(t){m.currentTime=Ce(t)},get speed(){return m.playbackRate},set speed(t){m.playbackRate=t},get duration(){return Ve(h)},play:()=>{a||(m.play(),qt(f))},pause:()=>m.pause(),stop:()=>{if(a=!0,"idle"===m.playState)return;const{currentTime:e}=m;if(e){const n=Zn({...s,autoplay:!1});t.setWithVelocity(n.sample(e-10).value,n.sample(e).value,10)}g()},complete:()=>{l||m.finish()},cancel:g}}const ti={type:"spring",stiffness:500,damping:25,restSpeed:10},ei={type:"keyframes",duration:.8},ni={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ii=(t,{keyframes:e})=>e.length>2?ei:H.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:ti:ni,si=(t,e)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!wn.test(e)&&"0"!==e||e.startsWith("url("))),oi=new Set(["brightness","contrast","saturate","opacity"]);function ri(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(st)||[];if(!i)return t;const s=n.replace(i,"");let o=oi.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const ai=/([a-z-]*)\(.*?\)/g,li={...wn,getAnimatableNone:t=>{const e=t.match(ai);return e?e.map(ri).join(" "):t}},ui={...gt,color:rn,backgroundColor:rn,outlineColor:rn,fill:rn,stroke:rn,borderColor:rn,borderTopColor:rn,borderRightColor:rn,borderBottomColor:rn,borderLeftColor:rn,filter:li,WebkitFilter:li},ci=t=>ui[t];function hi(t,e){let n=ci(t);return n!==li&&(n=wn),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const di=t=>/^0[^.\s]+$/.test(t);function pi(t){return"number"==typeof t?0===t:null!==t?"none"===t||"0"===t||di(t):void 0}function mi(t,e){return t[e]||t.default||t}const fi=(t,e,n,i={})=>s=>{const o=mi(i,t)||{},r=o.delay||i.delay||0;let{elapsed:a=0}=i;a-=Ce(r);const l=function(t,e,n,i){const s=si(e,n);let o;o=Array.isArray(n)?[...n]:[null,n];const r=void 0!==i.from?i.from:t.get();let a=void 0;const l=[];for(let t=0;t<o.length;t++)null===o[t]&&(o[t]=0===t?r:o[t-1]),pi(o[t])&&l.push(t),"string"==typeof o[t]&&"none"!==o[t]&&"0"!==o[t]&&(a=o[t]);if(s&&l.length&&a)for(let t=0;t<l.length;t++){o[l[t]]=hi(e,a)}return o}(e,t,n,o),u=l[0],c=l[l.length-1],h=si(t,u),d=si(t,c);Se(h===d);let p={keyframes:l,velocity:e.getVelocity(),ease:"easeOut",...o,delay:-a,onUpdate:t=>{e.set(t),o.onUpdate&&o.onUpdate(t)},onComplete:()=>{s(),o.onComplete&&o.onComplete()}};if(function({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}(o)||(p={...p,...ii(t,p)}),p.duration&&(p.duration=Ce(p.duration)),p.repeatDelay&&(p.repeatDelay=Ce(p.repeatDelay)),!h||!d||Me.current||!1===o.type||m.skipAnimations)return function({keyframes:t,delay:e,onUpdate:n,onComplete:i}){const s=()=>(n&&n(t[t.length-1]),i&&i(),{time:0,speed:1,duration:0,play:Xt,pause:Xt,stop:Xt,then:t=>(t(),Promise.resolve()),cancel:Xt,complete:Xt});return e?Zn({keyframes:[0,1],duration:0,delay:e,onComplete:s}):s()}(Me.current?{...p,delay:0}:p);if(!i.isHandoff&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const n=Qn(e,t,p);if(n)return n}return Zn(p)};function gi(t){return Boolean(Y(t)&&t.add)}const yi=t=>/^\-?\d*\.?\d+$/.test(t);function vi(t,e){-1===t.indexOf(e)&&t.push(e)}function xi(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class Pi{constructor(){this.subscriptions=[]}add(t){return vi(this.subscriptions,t),()=>xi(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(let s=0;s<i;s++){const i=this.subscriptions[s];i&&i(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const wi={current:void 0};class Ei{constructor(t,e={}){var n;this.version="11.0.2",this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=Yn.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.canTrackVelocity=(n=this.current,!isNaN(parseFloat(n))),this.owner=e.owner}setCurrent(t){this.current=t,this.updatedAt=Yn.now()}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 Pi);const n=this.events[t].add(e);return"change"===t?()=>{n(),Gt.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){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return wi.current&&wi.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Yn.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return Bn(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 bi(t,e){return new Ei(t,e)}const Ai=t=>e=>e.test(t),Si=[tt,ht,ct,ut,pt,dt,{test:t=>"auto"===t,parse:t=>t}],Ti=t=>Si.find(Ai(t)),Ci=[...Si,rn,wn];function Vi(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,bi(n))}function Mi(t,e){const n=Ae(t,e);let{transitionEnd:i={},transition:s={},...o}=n?t.makeTargetAnimatable(n,!1):{};o={...o,...i};for(const e in o){Vi(t,e,(r=o[e],zt(r)?r[r.length-1]||0:r))}var r}function Ri(t,e){[...e].reverse().forEach(n=>{const i=t.getVariant(n);i&&Mi(t,i),t.variantChildren&&t.variantChildren.forEach(t=>{Ri(t,e)})})}function Di(t,e,n){var i,s;const o=Object.keys(e).filter(e=>!t.hasValue(e)),r=o.length;var a;if(r)for(let l=0;l<r;l++){const r=o[l],u=e[r];let c=null;Array.isArray(u)&&(c=u[0]),null===c&&(c=null!==(s=null!==(i=n[r])&&void 0!==i?i:t.readValue(r))&&void 0!==s?s:e[r]),null!=c&&("string"==typeof c&&(yi(c)||di(c))?c=parseFloat(c):(a=c,!Ci.find(Ai(a))&&wn.test(u)&&(c=hi(r,u))),t.addValue(r,bi(c,{owner:t})),void 0===n[r]&&(n[r]=c),null!==c&&t.setBaseTarget(r,c))}}function Li(t,e){if(!e)return;return(e[t]||e.default||e).from}function ki(t,e,n){const i={};for(const s in t){const t=Li(s,e);if(void 0!==t)i[s]=t;else{const t=n.getValue(s);t&&(i[s]=t.get())}}return i}function Bi({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function ji(t,e){const n=t.get();if(!Array.isArray(e))return n!==e;for(let t=0;t<e.length;t++)if(e[t]!==n)return!0}function Fi(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=t.makeTargetAnimatable(e);const l=t.getValue("willChange");i&&(o=i);const u=[],c=s&&t.animationState&&t.animationState.getState()[s];for(const e in a){const i=t.getValue(e),s=a[e];if(!i||void 0===s||c&&Bi(c,e))continue;const r={delay:n,elapsed:0,...mi(o||{},e)};if(window.HandoffAppearAnimations){const n=t.getProps()[p];if(n){const t=window.HandoffAppearAnimations(n,e,i,Gt);null!==t&&(r.elapsed=t,r.isHandoff=!0)}}let h=!r.isHandoff&&!ji(i,s);if("spring"===r.type&&(i.getVelocity()||r.velocity)&&(h=!1),i.animation&&(h=!1),h)continue;i.start(fi(e,i,s,t.shouldReduceMotion&&H.has(e)?{type:!1}:r));const d=i.animation;gi(l)&&(l.add(e),d.then(()=>l.remove(e))),u.push(d)}return r&&Promise.all(u).then(()=>{r&&Mi(t,r)}),u}function Oi(t,e,n={}){const i=Ae(t,e,n.custom);let{transition:s=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Promise.all(Fi(t,i,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:o=0,staggerChildren:r,staggerDirection:a}=s;return function(t,e,n=0,i=0,s=1,o){const r=[],a=(t.variantChildren.size-1)*i,l=1===s?(t=0)=>t*i:(t=0)=>a-t*i;return Array.from(t.variantChildren).sort(Ii).forEach((t,i)=>{t.notify("AnimationStart",e),r.push(Oi(t,e,{...o,delay:n+l(i)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(r)}(t,e,o+i,r,a,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[t,e]="beforeChildren"===a?[o,r]:[r,o];return t().then(()=>e())}return Promise.all([o(),r(n.delay)])}function Ii(t,e){return t.sortNodePosition(e)}function Ui(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const s=e.map(e=>Oi(t,e,n));i=Promise.all(s)}else if("string"==typeof e)i=Oi(t,e,n);else{const s="function"==typeof e?Ae(t,e,n.custom):e;i=Promise.all(Fi(t,s,n))}return i.then(()=>t.notify("AnimationComplete",e))}const Wi=[...b].reverse(),Ni=b.length;function zi(t){let e=function(t){return e=>Promise.all(e.map(({animation:e,options:n})=>Ui(t,e,n)))}(t);const n={animate:$i(!0),whileInView:$i(),whileHover:$i(),whileTap:$i(),whileDrag:$i(),whileFocus:$i(),exit:$i()};let i=!0;const s=(e,n)=>{const i=Ae(t,n);if(i){const{transition:t,transitionEnd:n,...s}=i;e={...e,...s,...n}}return e};function o(o,r){const a=t.getProps(),l=t.getVariantContext(!0)||{},u=[],c=new Set;let h={},d=1/0;for(let e=0;e<Ni;e++){const p=Wi[e],m=n[p],f=void 0!==a[p]?a[p]:l[p],g=w(f),y=p===r?m.isActive:null;!1===y&&(d=e);let v=f===l[p]&&f!==a[p]&&g;if(v&&i&&t.manuallyAnimateOnMount&&(v=!1),m.protectedKeys={...h},!m.isActive&&null===y||!f&&!m.prevProp||E(f)||"boolean"==typeof f)continue;let x=Hi(m.prevProp,f)||p===r&&m.isActive&&!v&&g||e>d&&g,P=!1;const b=Array.isArray(f)?f:[f];let A=b.reduce(s,{});!1===y&&(A={});const{prevResolvedValues:S={}}=m,T={...S,...A},C=t=>{x=!0,c.has(t)&&(P=!0,c.delete(t)),m.needsAnimating[t]=!0};for(const t in T){const e=A[t],n=S[t];if(h.hasOwnProperty(t))continue;let i=!1;i=zt(e)&&zt(n)?!be(e,n):e!==n,i?void 0!==e?C(t):c.add(t):void 0!==e&&c.has(t)?C(t):m.protectedKeys[t]=!0}m.prevProp=f,m.prevResolvedValues=A,m.isActive&&(h={...h,...A}),i&&t.blockInitialAnimation&&(x=!1),!x||v&&!P||u.push(...b.map(t=>({animation:t,options:{type:p,...o}})))}if(c.size){const e={};c.forEach(n=>{const i=t.getBaseTarget(n);void 0!==i&&(e[n]=i)}),u.push({animation:e})}let p=Boolean(u.length);return!i||!1!==a.initial&&a.initial!==a.animate||t.manuallyAnimateOnMount||(p=!1),i=!1,p?e(u):Promise.resolve()}return{animateChanges:o,setActive:function(e,i,s){var r;if(n[e].isActive===i)return Promise.resolve();null===(r=t.variantChildren)||void 0===r||r.forEach(t=>{var n;return null===(n=t.animationState)||void 0===n?void 0:n.setActive(e,i)}),n[e].isActive=i;const a=o(s,e);for(const t in n)n[t].protectedKeys={};return a},setAnimateFunction:function(n){e=n(t)},getState:()=>n}}function Hi(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!be(e,t)}function $i(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}let Yi=0;const Xi={animation:{Feature:class extends de{constructor(t){super(t),t.animationState||(t.animationState=zi(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),E(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){}}},exit:{Feature:class extends de{constructor(){super(...arguments),this.id=Yi++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e,custom:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const s=this.node.animationState.setActive("exit",!t,{custom:null!=n?n:this.node.getProps().custom});e&&!t&&s.then(()=>e(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}}},Gi=(t,e)=>Math.abs(t-e);function qi(t,e){const n=Gi(t.x,e.x),i=Gi(t.y,e.y);return Math.sqrt(n**2+i**2)}class Zi{constructor(t,e,{transformPagePoint:n,contextWindow:i,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const t=Ji(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=qi(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:i}=t,{timestamp:s}=Zt;this.history.push({...i,timestamp:s});const{onStart:o,onMove:r}=this.handlers;e||(o&&o(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),r&&r(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=Ki(e,this.transformPagePoint),Gt.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:n,onSessionEnd:i,resumeAnimation:s}=this.handlers;if(this.dragSnapToOrigin&&s&&s(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=Ji("pointercancel"===t.type?this.lastMoveEventInfo:Ki(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,o),i&&i(t,o)},!ee(t))return;this.dragSnapToOrigin=s,this.handlers=e,this.transformPagePoint=n,this.contextWindow=i||window;const o=Ki(ne(t),this.transformPagePoint),{point:r}=o,{timestamp:a}=Zt;this.history=[{...r,timestamp:a}];const{onSessionStart:l}=e;l&&l(t,Ji(o,this.history)),this.removeListeners=re(se(this.contextWindow,"pointermove",this.handlePointerMove),se(this.contextWindow,"pointerup",this.handlePointerUp),se(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),qt(this.updatePoint)}}function Ki(t,e){return e?{point:e(t.point)}:t}function _i(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Ji({point:t},e){return{point:t,delta:_i(t,ts(e)),offset:_i(t,Qi(e)),velocity:es(e,.1)}}function Qi(t){return t[0]}function ts(t){return t[t.length-1]}function es(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const s=ts(t);for(;n>=0&&(i=t[n],!(s.timestamp-i.timestamp>Ce(e)));)n--;if(!i)return{x:0,y:0};const o=Ve(s.timestamp-i.timestamp);if(0===o)return{x:0,y:0};const r={x:(s.x-i.x)/o,y:(s.y-i.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function ns(t){return t.max-t.min}function is(t,e=0,n=.01){return Math.abs(t-e)<=n}function ss(t,e,n,i=.5){t.origin=i,t.originPoint=an(e.min,e.max,t.origin),t.scale=ns(n)/ns(e),(is(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=an(n.min,n.max,t.origin)-t.originPoint,(is(t.translate)||isNaN(t.translate))&&(t.translate=0)}function os(t,e,n,i){ss(t.x,e.x,n.x,i?i.originX:void 0),ss(t.y,e.y,n.y,i?i.originY:void 0)}function rs(t,e,n){t.min=n.min+e.min,t.max=t.min+ns(e)}function as(t,e,n){t.min=e.min-n.min,t.max=t.min+ns(e)}function ls(t,e,n){as(t.x,e.x,n.x),as(t.y,e.y,n.y)}function us(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function cs(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,i]=[i,n]),{min:n,max:i}}const hs=.35;function ds(t,e,n){return{min:ps(t,e),max:ps(t,n)}}function ps(t,e){return"number"==typeof t?t:t[e]||0}const ms=()=>({x:{min:0,max:0},y:{min:0,max:0}});function fs(t){return[t("x"),t("y")]}function gs({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function ys(t){return void 0===t||1===t}function vs({scale:t,scaleX:e,scaleY:n}){return!ys(t)||!ys(e)||!ys(n)}function xs(t){return vs(t)||Ps(t)||t.z||t.rotate||t.rotateX||t.rotateY}function Ps(t){return ws(t.x)||ws(t.y)}function ws(t){return t&&"0%"!==t}function Es(t,e,n){return n+e*(t-n)}function bs(t,e,n,i,s){return void 0!==s&&(t=Es(t,s,i)),Es(t,n,i)+e}function As(t,e=0,n=1,i,s){t.min=bs(t.min,e,n,i,s),t.max=bs(t.max,e,n,i,s)}function Ss(t,{x:e,y:n}){As(t.x,e.translate,e.scale,e.originPoint),As(t.y,n.translate,n.scale,n.originPoint)}function Ts(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function Cs(t,e){t.min=t.min+e,t.max=t.max+e}function Vs(t,e,[n,i,s]){const o=void 0!==e[s]?e[s]:.5,r=an(t.min,t.max,o);As(t,e[n],e[i],r,e.scale)}const Ms=["x","scaleX","originX"],Rs=["y","scaleY","originY"];function Ds(t,e){Vs(t.x,e,Ms),Vs(t.y,e,Rs)}function Ls(t,e){return gs(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}(t.getBoundingClientRect(),e))}const ks=({current:t})=>t?t.ownerDocument.defaultView:null,Bs=new WeakMap;class js{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=t}start(t,{snapToCursor:e=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:i}=this.getProps();this.panSession=new Zi(t,{onSessionStart:t=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(ne(t,"page").point)},onStart:(t,e)=>{const{drag:n,dragPropagation:i,onDragStart:s}=this.getProps();if(n&&!i&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=ce(n),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),fs(t=>{let e=this.getAxisMotionValue(t).get()||0;if(ct.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const i=n.layout.layoutBox[t];if(i){e=ns(i)*(parseFloat(e)/100)}}}this.originPoint[t]=e}),s&&Gt.update(()=>s(t,e),!1,!0);const{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:s,onDrag:o}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:r}=e;if(i&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(r),void(null!==this.currentDirection&&s&&s(this.currentDirection));this.updateAxis("x",e.point,r),this.updateAxis("y",e.point,r),this.visualElement.render(),o&&o(t,e)},onSessionEnd:(t,e)=>this.stop(t,e),resumeAnimation:()=>fs(t=>{var e;return"paused"===this.getAnimationState(t)&&(null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.play())})},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:i,contextWindow:ks(this.visualElement)})}stop(t,e){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:i}=e;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&Gt.update(()=>s(t,e))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,n){const{drag:i}=this.getProps();if(!n||!Fs(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=function(t,{min:e,max:n},i){return void 0!==e&&t<e?t=i?an(e,t,i.min):Math.max(t,e):void 0!==n&&t>n&&(t=i?an(n,t,i.max):Math.min(t,n)),t}(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){var t;const{dragConstraints:e,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(t=this.visualElement.projection)||void 0===t?void 0:t.layout,s=this.constraints;e&&P(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!i)&&function(t,{top:e,left:n,bottom:i,right:s}){return{x:us(t.x,n,s),y:us(t.y,e,i)}}(i.layoutBox,e),this.elastic=function(t=hs){return!1===t?t=0:!0===t&&(t=hs),{x:ds(t,"left","right"),y:ds(t,"top","bottom")}}(n),s!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&fs(t=>{this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(i.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!P(t))return!1;const n=t.current;Te(null!==n);const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=function(t,e,n){const i=Ls(t,n),{scroll:s}=e;return s&&(Cs(i.x,s.offset.x),Cs(i.y,s.offset.y)),i}(n,i.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:cs(t.x,e.x),y:cs(t.y,e.y)}}(i.layout.layoutBox,s);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=gs(t))}return o}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},l=fs(r=>{if(!Fs(r,e,this.currentDirection))return;let l=a&&a[r]||{};o&&(l={min:0,max:0});const u=i?200:1e6,c=i?40:1e7,h={type:"inertia",velocity:n?t[r]:0,bounceStiffness:u,bounceDamping:c,timeConstant:750,restDelta:1,restSpeed:10,...s,...l};return this.startAxisValueAnimation(r,h)});return Promise.all(l).then(r)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return n.start(fi(t,n,0,e))}stopAnimation(){fs(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){fs(t=>{var e;return null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.pause()})}getAnimationState(t){var e;return null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.state}getAxisMotionValue(t){const e="_drag"+t.toUpperCase(),n=this.visualElement.getProps(),i=n[e];return i||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){fs(e=>{const{drag:n}=this.getProps();if(!Fs(e,n,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(e);if(i&&i.layout){const{min:n,max:o}=i.layout.layoutBox[e];s.set(t[e]-an(n,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!P(e)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};fs(t=>{const e=this.getAxisMotionValue(t);if(e){const n=e.get();i[t]=function(t,e){let n=.5;const i=ns(t),s=ns(e);return s>i?n=Cn(e.min,e.max-i,t.min):i>s&&(n=Cn(t.min,t.max-s,e.min)),Q(0,1,n)}({min:n,max:n},this.constraints[t])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),fs(e=>{if(!Fs(e,t,null))return;const n=this.getAxisMotionValue(e),{min:s,max:o}=this.constraints[e];n.set(an(s,o,i[e]))})}addListeners(){if(!this.visualElement.current)return;Bs.set(this.visualElement,this);const t=se(this.visualElement.current,"pointerdown",t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)}),e=()=>{const{dragConstraints:t}=this.getProps();P(t)&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,i=n.addEventListener("measure",e);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),e();const s=te(window,"resize",()=>this.scalePositionWithinConstraints()),o=n.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(fs(e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))}),this.visualElement.render())});return()=>{s(),t(),i(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=hs,dragMomentum:r=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:r}}}function Fs(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const Os=t=>(e,n)=>{t&&Gt.update(()=>t(e,n))};const Is=["TopLeft","TopRight","BottomLeft","BottomRight"],Us=Is.length,Ws=t=>"string"==typeof t?parseFloat(t):t,Ns=t=>"number"==typeof t||ht.test(t);function zs(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const Hs=Ys(0,.5,Ye),$s=Ys(.5,.95,Xt);function Ys(t,e,n){return i=>i<t?0:i>e?1:n(Cn(t,e,i))}function Xs(t,e){t.min=e.min,t.max=e.max}function Gs(t,e){Xs(t.x,e.x),Xs(t.y,e.y)}function qs(t,e,n,i,s){return t=Es(t-=e,1/n,i),void 0!==s&&(t=Es(t,1/s,i)),t}function Zs(t,e,[n,i,s],o,r){!function(t,e=0,n=1,i=.5,s,o=t,r=t){if(ct.test(e)){e=parseFloat(e);e=an(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=an(o.min,o.max,i);t===o&&(a-=e),t.min=qs(t.min,e,n,a,s),t.max=qs(t.max,e,n,a,s)}(t,e[n],e[i],e[s],e.scale,o,r)}const Ks=["x","scaleX","originX"],_s=["y","scaleY","originY"];function Js(t,e,n,i){Zs(t.x,e,Ks,n?n.x:void 0,i?i.x:void 0),Zs(t.y,e,_s,n?n.y:void 0,i?i.y:void 0)}function Qs(t){return 0===t.translate&&1===t.scale}function to(t){return Qs(t.x)&&Qs(t.y)}function eo(t,e){return Math.round(t.x.min)===Math.round(e.x.min)&&Math.round(t.x.max)===Math.round(e.x.max)&&Math.round(t.y.min)===Math.round(e.y.min)&&Math.round(t.y.max)===Math.round(e.y.max)}function no(t){return ns(t.x)/ns(t.y)}class io{constructor(){this.members=[]}add(t){vi(this.members,t),t.scheduleRender()}remove(t){if(xi(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){const e=this.members.findIndex(e=>t===e);if(0===e)return!1;let n;for(let t=e;t>=0;t--){const e=this.members[t];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,e&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;!1===i&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:e,resumingFrom:n}=t;e.onExitComplete&&e.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function so(t,e,n){let i="";const s=t.x.translate/e.x,o=t.y.translate/e.y;if((s||o)&&(i=`translate3d(${s}px, ${o}px, 0) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{rotate:t,rotateX:e,rotateY:s}=n;t&&(i+=`rotate(${t}deg) `),e&&(i+=`rotateX(${e}deg) `),s&&(i+=`rotateY(${s}deg) `)}const r=t.x.scale*e.x,a=t.y.scale*e.y;return 1===r&&1===a||(i+=`scale(${r}, ${a})`),i||"none"}const oo=(t,e)=>t.depth-e.depth;class ro{constructor(){this.children=[],this.isDirty=!1}add(t){vi(this.children,t),this.isDirty=!0}remove(t){xi(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(oo),this.isDirty=!1,this.children.forEach(t)}}const ao={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function lo(t,e){const n=Yn.now(),i=({timestamp:s})=>{const o=s-n;o>=e&&(qt(i),t(o-e))};return Gt.read(i,!0),()=>qt(i)}function uo(t,e,n){var i;if("string"==typeof t){let s=document;e&&(Te(Boolean(e.current)),s=e.current),n?(null!==(i=n[t])&&void 0!==i||(n[t]=s.querySelectorAll(t)),t=n[t]):t=s.querySelectorAll(t)}else t instanceof Element&&(t=[t]);return Array.from(t||[])}const co=new WeakMap;function ho(t,e){let n;const i=()=>{const{currentTime:i}=e,s=(null===i?0:i.value)/100;n!==s&&t(s),n=s};return Gt.update(i,!0),()=>qt(i)}const po=Kn(()=>void 0!==window.ScrollTimeline);class mo{constructor(t){this.animations=t.filter(Boolean)}then(t,e){return Promise.all(this.animations).then(t).catch(e)}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){const e=this.animations.map(e=>{if(!po()||!e.attachTimeline)return e.pause(),ho(t=>{e.time=e.duration*t},t);e.attachTimeline(t)});return()=>{e.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 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]())}play(){this.runAll("play")}pause(){this.runAll("pause")}stop(){this.runAll("stop")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function fo(t){return t instanceof SVGElement&&"svg"!==t.tagName}const go=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function yo(t,e,n=1){Te(n<=4);const[i,s]=function(t){const e=go.exec(t);if(!e)return[,];const[,n,i]=e;return[n,i]}(t);if(!i)return;const o=window.getComputedStyle(e).getPropertyValue(i);if(o){const t=o.trim();return yi(t)?parseFloat(t):t}return _(s)?yo(s,e,n+1):s}const vo=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),xo=t=>vo.has(t),Po=t=>t===tt||t===ht,wo=(t,e)=>parseFloat(t.split(", ")[e]),Eo=(t,e)=>(n,{transform:i})=>{if("none"===i||!i)return 0;const s=i.match(/^matrix3d\((.+)\)$/);if(s)return wo(s[1],e);{const e=i.match(/^matrix\((.+)\)$/);return e?wo(e[1],t):0}},bo=new Set(["x","y","z"]),Ao=z.filter(t=>!bo.has(t));const So={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:Eo(4,13),y:Eo(5,14)};So.translateX=So.x,So.translateY=So.y;const To=(t,e,n={},i={})=>{e={...e},i={...i};const s=Object.keys(e).filter(xo);let o=[],r=!1;const a=[];if(s.forEach(s=>{const l=t.getValue(s);if(!t.hasValue(s))return;let u=n[s],c=Ti(u);const h=e[s];let d;if(zt(h)){const t=h.length,e=null===h[0]?1:0;u=h[e],c=Ti(u);for(let n=e;n<t&&null!==h[n];n++)d?Te(Ti(h[n])===d):(d=Ti(h[n]),Te(d===c||Po(c)&&Po(d)))}else d=Ti(h);if(c!==d)if(Po(c)&&Po(d)){const t=l.get();"string"==typeof t&&l.set(parseFloat(t)),"string"==typeof h?e[s]=parseFloat(h):Array.isArray(h)&&d===ht&&(e[s]=h.map(parseFloat))}else(null==c?void 0:c.transform)&&(null==d?void 0:d.transform)&&(0===u||0===h)?0===u?l.set(d.transform(u)):e[s]=c.transform(h):(r||(o=function(t){const e=[];return Ao.forEach(n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e.length&&t.render(),e}(t),r=!0),a.push(s),i[s]=void 0!==i[s]?i[s]:e[s],l.jump(h))}),a.length){const n=a.indexOf("height")>=0?window.pageYOffset:null,s=((t,e,n)=>{const i=e.measureViewportBox(),s=e.current,o=getComputedStyle(s),{display:r}=o,a={};"none"===r&&e.setStaticValue("display",t.display||"block"),n.forEach(t=>{a[t]=So[t](i,o)}),e.render();const l=e.measureViewportBox();return n.forEach(n=>{const i=e.getValue(n);i&&i.jump(a[n]),t[n]=So[n](l,o)}),t})(e,t,a);return o.length&&o.forEach(([e,n])=>{t.getValue(e).set(n)}),t.render(),u&&null!==n&&window.scrollTo({top:n}),{target:s,transitionEnd:i}}return{target:e,transitionEnd:i}};function Co(t,e,n,i){return(t=>Object.keys(t).some(xo))(e)?To(t,e,n,i):{target:e,transitionEnd:i}}const Vo=(t,e,n,i)=>{const s=function(t,{...e},n){const i=t.current;if(!(i instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.values.forEach(t=>{const e=t.get();if(!_(e))return;const n=yo(e,i);n&&t.set(n)});for(const t in e){const s=e[t];if(!_(s))continue;const o=yo(s,i);o&&(e[t]=o,n||(n={}),void 0===n[t]&&(n[t]=s))}return{target:e,transitionEnd:n}}(t,e,i);return Co(t,e=s.target,n,i=s.transitionEnd)},Mo={current:null},Ro={current:!1};function Do(){if(Ro.current=!0,u)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Mo.current=t.matches;t.addListener(e),e()}else Mo.current=!1}const Lo=Object.keys(R),ko=Lo.length,Bo=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],jo=A.length;class Fo{constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,visualState:s},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,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.scheduleRender=()=>Gt.render(this.render,!1,!0);const{latestValues:r,renderState:a}=s;this.latestValues=r,this.baseTarget={...r},this.initialValues=e.initial?{...r}:{},this.renderState=a,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=o,this.isControllingVariants=S(e),this.isVariantNode=T(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:l,...u}=this.scrapeMotionValuesFromProps(e,{});for(const t in u){const e=u[t];void 0!==r[t]&&Y(e)&&(e.set(r[t],!1),gi(l)&&l.add(t))}}scrapeMotionValuesFromProps(t,e){return{}}mount(t){this.current=t,co.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)),Ro.current||Do(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Mo.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){co.delete(this.current),this.projection&&this.projection.unmount(),qt(this.notifyUpdate),qt(this.render),this.valueSubscriptions.forEach(t=>t()),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)this.features[t].unmount();this.current=null}bindToMotionValue(t,e){const n=H.has(t),i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&Gt.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),s=e.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),s()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}loadFeatures({children:t,...e},n,i,s){let o,r;for(let t=0;t<ko;t++){const n=Lo[t],{isEnabled:i,Feature:s,ProjectionNode:a,MeasureLayout:l}=R[n];a&&(o=a),i(e)&&(!this.features[n]&&s&&(this.features[n]=new s(this)),l&&(r=l))}if(("html"===this.type||"svg"===this.type)&&!this.projection&&o){this.projection=new o(this.latestValues,this.parent&&this.parent.projection);const{layoutId:t,layout:n,drag:i,dragConstraints:r,layoutScroll:a,layoutRoot:l}=e;this.projection.setOptions({layoutId:t,layout:n,alwaysMeasureLayout:Boolean(i)||r&&P(r),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:s,layoutScroll:a,layoutRoot:l})}return r}updateFeatures(){for(const t in this.features){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,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}makeTargetAnimatable(t,e=!0){return this.makeTargetAnimatableFromInstance(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<Bo.length;e++){const n=Bo[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const i=t["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=function(t,e,n){const{willChange:i}=e;for(const s in e){const o=e[s],r=n[s];if(Y(o))t.addValue(s,o),gi(i)&&i.add(s);else if(Y(r))t.addValue(s,bi(o,{owner:t})),gi(i)&&i.remove(s);else if(r!==o)if(t.hasValue(s)){const e=t.getValue(s);!e.hasAnimated&&e.set(o)}else{const e=t.getStaticValue(s);t.addValue(s,bi(void 0!==e?e:o,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}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}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const t=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(t.initial=this.props.initial),t}const e={};for(let t=0;t<jo;t++){const n=A[t],i=this.props[n];(w(i)||!1===i)&&(e[n]=i)}return e}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){e!==this.values.get(t)&&(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=bi(e,{owner:this}),this.addValue(t,n)),n}readValue(t){var e;return void 0===this.latestValues[t]&&this.current?null!==(e=this.getBaseTargetFromProps(this.props,t))&&void 0!==e?e:this.readValueFromInstance(this.current,t,this.options):this.latestValues[t]}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props,i="string"==typeof n||"object"==typeof n?null===(e=Wt(this.props,n))||void 0===e?void 0:e[t]:void 0;if(n&&void 0!==i)return i;const s=this.getBaseTargetFromProps(this.props,t);return void 0===s||Y(s)?void 0!==this.initialValues[t]&&void 0===i?void 0:this.baseTarget[t]:s}on(t,e){return this.events[t]||(this.events[t]=new Pi),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class Oo extends Fo{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]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:e,...n},i){const s=ki(n,t||{},this);if(i){Di(this,n,s);const t=Vo(this,n,s,e);e=t.transitionEnd,n=t.target}return{transition:t,transitionEnd:e,...n}}}class Io extends Oo{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(H.has(e)){const t=ci(e);return t&&t.default||0}return e=Ft.has(e)?e:d(e),t.getAttribute(e)}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}scrapeMotionValuesFromProps(t,e){return Ut(t,e)}build(t,e,n,i){Rt(t,e,n,this.isSVGTag,i.transformTemplate)}renderInstance(t,e,n,i){Ot(t,e,0,i)}mount(t){this.isSVGTag=Lt(t.tagName),super.mount(t)}}class Uo extends Oo{constructor(){super(...arguments),this.type="html"}readValueFromInstance(t,e){if(H.has(e)){const t=ci(e);return t&&t.default||0}{const i=(n=t,window.getComputedStyle(n)),s=(K(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return Ls(t,e)}build(t,e,n,i){yt(t,e,n,i.transformTemplate)}scrapeMotionValuesFromProps(t,e){return It(t,e)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Y(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=""+t)}))}renderInstance(t,e,n,i){jt(t,e,n,i)}}function Wo(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=fo(t)?new Io(e,{enableHardwareAcceleration:!1}):new Uo(e,{enableHardwareAcceleration:!0});n.mount(t),co.set(t,n)}function No(t,e,n){const i=Y(t)?t:bi(t);return i.start(fi("",i,e,n)),i.animation}function zo(t,e=100){const n=Nn({keyframes:[0,e],...t}),i=Math.min(Gn(n),2e4);return{type:"keyframes",ease:t=>n.next(i*t).value/e,duration:Ve(i)}}function Ho(t,e,n,i){var s;return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:null!==(s=i.get(e))&&void 0!==s?s:t}const $o=(t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t};function Yo(t,e){return Ne(t)?t[$o(0,t.length,e)]:t}function Xo(t,e,n,i,s,o){!function(t,e,n){for(let i=0;i<t.length;i++){const s=t[i];s.at>e&&s.at<n&&(xi(t,s),i--)}}(t,s,o);for(let r=0;r<e.length;r++)t.push({value:e[r],at:an(s,o,i[r]),easing:Yo(n,r)})}function Go(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function qo(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function Zo(t,e){return e[t]||(e[t]=[]),e[t]}function Ko(t){return Array.isArray(t)?t:[t]}function _o(t,e){return t[e]?{...t,...t[e]}:{...t}}const Jo=t=>"number"==typeof t,Qo=t=>t.every(Jo);function tr(t,e,n,i){const s=uo(t,i),o=s.length;Te(Boolean(o));const r=[];for(let t=0;t<o;t++){const i=s[t];co.has(i)||Wo(i);const a=co.get(i),l={...n};"function"==typeof l.delay&&(l.delay=l.delay(t,o)),r.push(...Fi(a,{...e,transition:l},{}))}return new mo(r)}function er(t,e,n){const i=[];return function(t,{defaultTransition:e={},...n}={},i){const s=e.duration||.3,o=new Map,r=new Map,a={},l=new Map;let u=0,c=0,h=0;for(let n=0;n<t.length;n++){const o=t[n];if("string"==typeof o){l.set(o,c);continue}if(!Array.isArray(o)){l.set(o.name,Ho(c,o.at,u,l));continue}let[d,p,m={}]=o;void 0!==m.at&&(c=Ho(c,m.at,u,l));let f=0;const g=(t,n,i,o=0,r=0)=>{const a=Ko(t),{delay:l=0,times:u=Ln(a),type:d="keyframes",...p}=n;let{ease:m=e.ease||"easeOut",duration:g}=n;const y="function"==typeof l?l(o,r):l,v=a.length;if(v<=2&&"spring"===d){let t=100;if(2===v&&Qo(a)){const e=a[1]-a[0];t=Math.abs(e)}const e={...p};void 0!==g&&(e.duration=Ce(g));const n=zo(e,t);m=n.ease,g=n.duration}null!=g||(g=s);const x=c+y,P=x+g;1===u.length&&0===u[0]&&(u[1]=1);const w=u.length-a.length;w>0&&Dn(u,w),1===a.length&&a.unshift(null),Xo(i,a,m,u,x,P),f=Math.max(y+g,f),h=Math.max(P,h)};if(Y(d)){g(p,m,Zo("default",qo(d,r)))}else{const t=uo(d,i,a),e=t.length;for(let n=0;n<e;n++){p=p,m=m;const i=qo(t[n],r);for(const t in p)g(p[t],_o(m,t),Zo(t,i),n,e)}}u=c,c+=f}return r.forEach((t,i)=>{for(const s in t){const r=t[s];r.sort(Go);const a=[],l=[],u=[];for(let t=0;t<r.length;t++){const{at:e,value:n,easing:i}=r[t];a.push(n),l.push(Cn(0,h,e)),u.push(i||"easeOut")}0!==l[0]&&(l.unshift(0),a.unshift(a[0]),u.unshift("easeInOut")),1!==l[l.length-1]&&(l.push(1),a.push(null)),o.has(i)||o.set(i,{keyframes:{},transition:{}});const c=o.get(i);c.keyframes[s]=a,c.transition[s]={...e,duration:h,ease:u,times:l,...n}}}),o}(t,e,n).forEach(({keyframes:t,transition:e},n)=>{let s;s=Y(n)?No(n,t.default,e.default):tr(n,t,e),i.push(s)}),new mo(i)}const nr=t=>function(e,n,i){let s;var o;return o=e,s=Array.isArray(o)&&Array.isArray(o[0])?er(e,n,t):function(t){return"object"==typeof t&&!Array.isArray(t)}(n)?tr(e,n,i,t):No(e,n,i),t&&t.animations.push(s),s},ir=nr(),sr=new WeakMap;let or;function rr({target:t,contentRect:e,borderBoxSize:n}){var i;null===(i=sr.get(t))||void 0===i||i.forEach(i=>{i({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 ar(t){t.forEach(rr)}function lr(t,e){or||"undefined"!=typeof ResizeObserver&&(or=new ResizeObserver(ar));const n=uo(t);return n.forEach(t=>{let n=sr.get(t);n||(n=new Set,sr.set(t,n)),n.add(e),null==or||or.observe(t)}),()=>{n.forEach(t=>{const n=sr.get(t);null==n||n.delete(e),(null==n?void 0:n.size)||null==or||or.unobserve(t)})}}const ur=new Set;let cr;function hr(t){return ur.add(t),cr||(cr=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};ur.forEach(t=>t(e))},window.addEventListener("resize",cr)),()=>{ur.delete(t),!ur.size&&cr&&(cr=void 0)}}const dr={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function pr(t,e,n,i){const s=n[e],{length:o,position:r}=dr[e],a=s.current,l=n.time;s.current=t["scroll"+r],s.scrollLength=t["scroll"+o]-t["client"+o],s.offset.length=0,s.offset[0]=0,s.offset[1]=s.scrollLength,s.progress=Cn(0,s.scrollLength,s.current);const u=i-l;s.velocity=u>50?0:Bn(s.current-a,u)}const mr={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},fr={start:0,center:.5,end:1};function gr(t,e,n=0){let i=0;if(void 0!==fr[t]&&(t=fr[t]),"string"==typeof t){const e=parseFloat(t);t.endsWith("px")?i=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?i=e/100*document.documentElement.clientWidth:t.endsWith("vh")?i=e/100*document.documentElement.clientHeight:t=e}return"number"==typeof t&&(i=e*t),n+i}const yr=[0,0];function vr(t,e,n,i){let s=Array.isArray(t)?t:yr,o=0,r=0;return"number"==typeof t?s=[t,t]:"string"==typeof t&&(s=(t=t.trim()).includes(" ")?t.split(" "):[t,fr[t]?t:"0"]),o=gr(s[0],n,i),r=gr(s[1],e),o-r}const xr={x:0,y:0};function Pr(t,e,n){let{offset:i=mr.All}=n;const{target:s=t,axis:o="y"}=n,r="y"===o?"height":"width",a=s!==t?function(t,e){const n={x:0,y:0};let i=t;for(;i&&i!==e;)if(i instanceof HTMLElement)n.x+=i.offsetLeft,n.y+=i.offsetTop,i=i.offsetParent;else if("svg"===i.tagName){const t=i.getBoundingClientRect();i=i.parentElement;const e=i.getBoundingClientRect();n.x+=t.left-e.left,n.y+=t.top-e.top}else{if(!(i instanceof SVGGraphicsElement))break;{const{x:t,y:e}=i.getBBox();n.x+=t,n.y+=e;let s=null,o=i.parentNode;for(;!s;)"svg"===o.tagName&&(s=o),o=i.parentNode;i=s}}return n}(s,t):xr,l=s===t?{width:t.scrollWidth,height:t.scrollHeight}:function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(s),u={width:t.clientWidth,height:t.clientHeight};e[o].offset.length=0;let c=!e[o].interpolate;const h=i.length;for(let t=0;t<h;t++){const n=vr(i[t],u[r],l[r],a[o]);c||n===e[o].interpolatorOffsets[t]||(c=!0),e[o].offset[t]=n}c&&(e[o].interpolate=Rn(e[o].offset,Ln(i)),e[o].interpolatorOffsets=[...e[o].offset]),e[o].progress=e[o].interpolate(e[o].current)}function wr(t,e,n,i={}){return{measure:()=>function(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let i=e;for(;i&&i!==t;)n.x.targetOffset+=i.offsetLeft,n.y.targetOffset+=i.offsetTop,i=i.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,i.target,n),update:e=>{!function(t,e,n){pr(t,"x",e,n),pr(t,"y",e,n),e.time=n}(t,n,e),(i.offset||i.target)&&Pr(t,n,i)},notify:()=>e(n)}}const Er=new WeakMap,br=new WeakMap,Ar=new WeakMap,Sr=t=>t===document.documentElement?window:t;function Tr(t,{container:e=document.documentElement,...n}={}){let i=Ar.get(e);i||(i=new Set,Ar.set(e,i));const s=wr(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(i.add(s),!Er.has(e)){const t=()=>{for(const t of i)t.measure()},n=()=>{for(const t of i)t.update(Zt.timestamp)},s=()=>{for(const t of i)t.notify()},a=()=>{Gt.read(t,!1,!0),Gt.read(n,!1,!0),Gt.update(s,!1,!0)};Er.set(e,a);const l=Sr(e);window.addEventListener("resize",a,{passive:!0}),e!==document.documentElement&&br.set(e,(r=a,"function"==typeof(o=e)?hr(o):lr(o,r))),l.addEventListener("scroll",a,{passive:!0})}var o,r;const a=Er.get(e);return Gt.read(a,!1,!0),()=>{var t;qt(a);const n=Ar.get(e);if(!n)return;if(n.delete(s),n.size)return;const i=Er.get(e);Er.delete(e),i&&(Sr(e).removeEventListener("scroll",i),null===(t=br.get(e))||void 0===t||t(),window.removeEventListener("resize",i))}}const Cr=new Map;function Vr({source:t=document.documentElement,axis:e="y"}={}){Cr.has(t)||Cr.set(t,{});const n=Cr.get(t);return n[e]||(n[e]=po()?new ScrollTimeline({source:t,axis:e}):function({source:t,axis:e="y"}){const n={value:0},i=Tr(t=>{n.value=100*t[e].progress},{container:t,axis:e});return{currentTime:n,cancel:i}}({source:t,axis:e})),n[e]}const Mr={some:0,all:1};function Rr(t,e,{root:n,margin:i,amount:s="some"}={}){const o=uo(t),r=new WeakMap,a=new IntersectionObserver(t=>{t.forEach(t=>{const n=r.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){const n=e(t);"function"==typeof n?r.set(t.target,n):a.unobserve(t.target)}else n&&(n(t),r.delete(t.target))})},{root:n,rootMargin:i,threshold:"number"==typeof s?s:Mr[s]});return o.forEach(t=>a.observe(t)),()=>a.disconnect()}function Dr(...t){const e=!Array.isArray(t[0]),n=e?0:-1,i=t[0+n],s=t[1+n],o=t[2+n],r=t[3+n],a=Rn(s,o,{mixer:(l=o[0],(t=>t&&"object"==typeof t&&t.mix)(l)?l.mix:void 0),...r});var l;return e?a(i):a}const Lr=Gt,kr=g.reduce((t,e)=>(t[e]=t=>qt(t),t),{}),Br=["","X","Y","Z"],jr={visibility:"hidden"};let Fr=0;const Or={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function Ir({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(t={},n=(null==e?void 0:e())){this.id=Fr++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{var t;this.projectionUpdateScheduled=!1,Or.totalNodes=Or.resolvedTargetDeltas=Or.recalculatedProjection=0,this.nodes.forEach(Nr),this.nodes.forEach(qr),this.nodes.forEach(Zr),this.nodes.forEach(zr),t=Or,window.MotionDebug&&window.MotionDebug.record(t)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new ro)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new Pi),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e,n=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=fo(e),this.instance=e;const{layoutId:i,layout:s,visualElement:o}=this.options;if(o&&!o.current&&o.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(s||i)&&(this.isLayoutDirty=!0),t){let n;const i=()=>this.root.updateBlockedByResize=!1;t(e,()=>{this.root.updateBlockedByResize=!0,n&&n(),n=lo(i,250),ao.hasAnimatedSinceResize&&(ao.hasAnimatedSinceResize=!1,this.nodes.forEach(Gr))})}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&o&&(i||s)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeTargetChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const s=this.options.transition||o.getDefaultTransition()||ea,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=o.getProps(),l=!this.targetLayout||!eo(this.targetLayout,i)||n,u=!e&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||u||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(t,u);const e={...mi(s,"layout"),onPlay:r,onComplete:a};(o.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e)}else e||Gr(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,qt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Kr),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach($r);this.isUpdating||this.nodes.forEach(Yr),this.isUpdating=!1,this.nodes.forEach(Xr),this.nodes.forEach(Ur),this.nodes.forEach(Wr),this.clearAllSnapshots();const t=Yn.now();Zt.delta=Q(0,1e3/60,t-Zt.timestamp),Zt.timestamp=t,Zt.isProcessing=!0,Kt.update.process(Zt),Kt.preRender.process(Zt),Kt.render.process(Zt),Zt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,v.read(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach(Hr),this.sharedNodes.forEach(_r)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Gt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Gt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++){this.path[t].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=Boolean(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&(this.scroll={animationId:this.root.animationId,phase:t,isRoot:i(this.instance),offset:n(this.instance)})}resetTransform(){if(!s)return;const t=this.isLayoutDirty||this.shouldResetTransform,e=this.projectionDelta&&!to(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,o=i!==this.prevTransformTemplateValue;t&&(e||xs(this.latestValues)||o)&&(s(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);var i;return t&&(n=this.removeTransform(n)),sa((i=n).x),sa(i.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const e=t.measureViewportBox(),{scroll:n}=this.root;return n&&(Cs(e.x,n.offset.x),Cs(e.y,n.offset.y)),e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};Gs(e,t);for(let n=0;n<this.path.length;n++){const i=this.path[n],{scroll:s,options:o}=i;if(i!==this.root&&s&&o.layoutScroll){if(s.isRoot){Gs(e,t);const{scroll:n}=this.root;n&&(Cs(e.x,-n.offset.x),Cs(e.y,-n.offset.y))}Cs(e.x,s.offset.x),Cs(e.y,s.offset.y)}}return e}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};Gs(n,t);for(let t=0;t<this.path.length;t++){const i=this.path[t];!e&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Ds(n,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),xs(i.latestValues)&&Ds(n,i.latestValues)}return xs(this.latestValues)&&Ds(n,this.latestValues),n}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};Gs(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!n.instance)continue;if(!xs(n.latestValues))continue;vs(n.latestValues)&&n.updateSnapshot();const i={x:{min:0,max:0},y:{min:0,max:0}};Gs(i,n.measurePageBox()),Js(e,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,i)}return xs(this.latestValues)&&Js(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Zt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){var e;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const i=Boolean(this.resumingFrom)||this!==n;if(!(t||i&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty)||this.attemptToResolveRelativeTarget))return;const{layout:s,layoutId:o}=this.options;if(this.layout&&(s||o)){if(this.resolvedRelativeTargetAt=Zt.timestamp,!this.targetDelta&&!this.relativeTarget){const t=this.getClosestProjectingParent();t&&t.layout&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},ls(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),Gs(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var r,a,l;if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),r=this.target,a=this.relativeTarget,l=this.relativeParent.target,rs(r.x,a.x,l.x),rs(r.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Gs(this.target,this.layout.layoutBox),Ss(this.target,this.targetDelta)):Gs(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const t=this.getClosestProjectingParent();t&&Boolean(t.resumingFrom)===Boolean(this.resumingFrom)&&!t.options.layoutScroll&&t.target&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},ls(this.relativeTargetOrigin,this.target,t.target),Gs(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Or.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!vs(this.parent.latestValues)&&!Ps(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var t;const e=this.getLead(),n=Boolean(this.resumingFrom)||this!==e;let i=!0;if((this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty))&&(i=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(i=!1),this.resolvedRelativeTargetAt===Zt.timestamp&&(i=!1),i)return;const{layout:s,layoutId:o}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!s&&!o)return;Gs(this.layoutCorrected,this.layout.layoutBox);const r=this.treeScale.x,a=this.treeScale.y;!function(t,e,n,i=!1){const s=n.length;if(!s)return;let o,r;e.x=e.y=1;for(let a=0;a<s;a++){o=n[a],r=o.projectionDelta;const s=o.instance;s&&s.style&&"contents"===s.style.display||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Ds(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Ss(t,r)),i&&xs(o.latestValues)&&Ds(t,o.latestValues))}e.x=Ts(e.x),e.y=Ts(e.y)}(this.layoutCorrected,this.treeScale,this.path,n),!e.layout||e.target||1===this.treeScale.x&&1===this.treeScale.y||(e.target=e.layout.layoutBox);const{target:l}=e;if(!l)return void(this.projectionTransform&&(this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionTransform="none",this.scheduleRender()));this.projectionDelta||(this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}});const u=this.projectionTransform;os(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.projectionTransform=so(this.projectionDelta,this.treeScale),this.projectionTransform===u&&this.treeScale.x===r&&this.treeScale.y===a||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),Or.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(t,e=!1){const n=this.snapshot,i=n?n.latestValues:{},s={...this.latestValues},o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const r={x:{min:0,max:0},y:{min:0,max:0}},a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,c=Boolean(a&&!u&&!0===this.options.crossfade&&!this.path.some(ta));let h;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var l,d,p,m,f,g;Jr(o.x,t.x,n),Jr(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ls(r,this.layout.layoutBox,this.relativeParent.layout.layoutBox),p=this.relativeTarget,m=this.relativeTargetOrigin,f=r,g=n,Qr(p.x,m.x,f.x,g),Qr(p.y,m.y,f.y,g),h&&(l=this.relativeTarget,d=h,l.x.min===d.x.min&&l.x.max===d.x.max&&l.y.min===d.y.min&&l.y.max===d.y.max)&&(this.isProjectionDirty=!1),h||(h={x:{min:0,max:0},y:{min:0,max:0}}),Gs(h,this.relativeTarget)),a&&(this.animationValues=s,function(t,e,n,i,s,o){s?(t.opacity=an(0,void 0!==n.opacity?n.opacity:1,Hs(i)),t.opacityExit=an(void 0!==e.opacity?e.opacity:1,0,$s(i))):o&&(t.opacity=an(void 0!==e.opacity?e.opacity:1,void 0!==n.opacity?n.opacity:1,i));for(let s=0;s<Us;s++){const o=`border${Is[s]}Radius`;let r=zs(e,o),a=zs(n,o);if(void 0===r&&void 0===a)continue;r||(r=0),a||(a=0);0===r||0===a||Ns(r)===Ns(a)?(t[o]=Math.max(an(Ws(r),Ws(a),i),0),(ct.test(a)||ct.test(r))&&(t[o]+="%")):t[o]=a}(e.rotate||n.rotate)&&(t.rotate=an(e.rotate||0,n.rotate||0,i))}(s,i,this.latestValues,n,c,u)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(qt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Gt.update(()=>{ao.hasAnimatedSinceResize=!0,this.currentAnimation=No(0,1e3,{...t,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onComplete:()=>{t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:i,latestValues:s}=t;if(e&&n&&i){if(this!==t&&this.layout&&i&&oa(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=ns(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=ns(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}Gs(e,n),Ds(e,s),os(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new io);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){var t;const{layoutId:e}=this.options;return e&&(null===(t=this.getStack())||void 0===t?void 0:t.lead)||this}getPrevLead(){var t;const{layoutId:e}=this.options;return e?null===(t=this.getStack())||void 0===t?void 0:t.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.rotate||n.rotateX||n.rotateY||n.rotateZ)&&(e=!0),!e)return;const i={};for(let e=0;e<Br.length;e++){const s="rotate"+Br[e];n[s]&&(i[s]=n[s],t.setStaticValue(s,0))}t.render();for(const e in i)t.setStaticValue(e,i[e]);t.scheduleRender()}getProjectionStyles(t){var e,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return jr;const i={visibility:""},s=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,i.opacity="",i.pointerEvents=Ht(null==t?void 0:t.pointerEvents)||"",i.transform=s?s(this.latestValues,""):"none",i;const o=this.getLead();if(!this.projectionDelta||!this.layout||!o.target){const e={};return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=Ht(null==t?void 0:t.pointerEvents)||""),this.hasProjected&&!xs(this.latestValues)&&(e.transform=s?s({},""):"none",this.hasProjected=!1),e}const r=o.animationValues||o.latestValues;this.applyTransformsToTarget(),i.transform=so(this.projectionDeltaWithTransform,this.treeScale,r),s&&(i.transform=s(r,i.transform));const{x:a,y:l}=this.projectionDelta;i.transformOrigin=`${100*a.origin}% ${100*l.origin}% 0`,o.animationValues?i.opacity=o===this?null!==(n=null!==(e=r.opacity)&&void 0!==e?e:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:r.opacityExit:i.opacity=o===this?void 0!==r.opacity?r.opacity:"":void 0!==r.opacityExit?r.opacityExit:0;for(const t in W){if(void 0===r[t])continue;const{correct:e,applyTo:n}=W[t],s="none"===i.transform?r[t]:e(r[t],o);if(n){const t=n.length;for(let e=0;e<t;e++)i[n[e]]=s}else i[t]=s}return this.options.layoutId&&(i.pointerEvents=o===this?Ht(null==t?void 0:t.pointerEvents)||"":"none"),i}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>{var e;return null===(e=t.currentAnimation)||void 0===e?void 0:e.stop()}),this.root.nodes.forEach($r),this.root.sharedNodes.clear()}}}function Ur(t){t.updateLayout()}function Wr(t){var e;const n=(null===(e=t.resumeFrom)||void 0===e?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:e,measuredBox:i}=t.layout,{animationType:s}=t.options,o=n.source!==t.layout.source;"size"===s?fs(t=>{const i=o?n.measuredBox[t]:n.layoutBox[t],s=ns(i);i.min=e[t].min,i.max=i.min+s}):oa(s,n.layoutBox,e)&&fs(i=>{const s=o?n.measuredBox[i]:n.layoutBox[i],r=ns(e[i]);s.max=s.min+r,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[i].max=t.relativeTarget[i].min+r)});const r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};os(r,e,n.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?os(a,t.applyTransform(i,!0),n.measuredBox):os(a,e,n.layoutBox);const l=!to(r);let u=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:s,layout:o}=i;if(s&&o){const r={x:{min:0,max:0},y:{min:0,max:0}};ls(r,n.layoutBox,s.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};ls(a,e,o.layoutBox),eo(r,a)||(u=!0),i.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=r,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:e,snapshot:n,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeTargetChanged:u})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function Nr(t){Or.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function zr(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Hr(t){t.clearSnapshot()}function $r(t){t.clearMeasurements()}function Yr(t){t.isLayoutDirty=!1}function Xr(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Gr(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function qr(t){t.resolveTargetDelta()}function Zr(t){t.calcProjection()}function Kr(t){t.resetRotation()}function _r(t){t.removeLeadSnapshot()}function Jr(t,e,n){t.translate=an(e.translate,0,n),t.scale=an(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Qr(t,e,n,i){t.min=an(e.min,n.min,i),t.max=an(e.max,n.max,i)}function ta(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const ea={duration:.45,ease:[.4,0,.1,1]},na=t=>"undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().includes(t),ia=na("applewebkit/")&&!na("chrome/")?Math.round:Xt;function sa(t){t.min=ia(t.min),t.max=ia(t.max)}function oa(t,e,n){return"position"===t||"preserve-aspect"===t&&!is(no(e),no(n),.2)}const ra=Ir({attachResizeListener:(t,e)=>te(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),aa={current:void 0},la=Ir({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!aa.current){const t=new ra({});t.mount(window),t.setOptions({layoutScroll:!0}),aa.current=t}return aa.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),ua=t=>!t.isLayoutDirty&&t.willUpdate(!1);function ca(){const t=new Set,e=new WeakMap,n=()=>t.forEach(ua);return{add:i=>{t.add(i),e.set(i,i.addEventListener("willUpdate",n))},remove:i=>{t.delete(i);const s=e.get(i);s&&(s(),e.delete(i)),n()},dirty:n}}function ha(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const da={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!ht.test(t))return t;t=parseFloat(t)}return`${ha(t,e.target.x)}% ${ha(t,e.target.y)}%`}},pa={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=wn.parse(t);if(s.length>5)return i;const o=wn.createTransformer(t),r="number"!=typeof s[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;s[0+r]/=a,s[1+r]/=l;const u=an(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=u),"number"==typeof s[3+r]&&(s[3+r]/=u),o(s)}};function ma(){const t=e.useContext(l);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:i,register:s}=t,o=e.useId();e.useEffect(()=>s(o),[]);return!n&&i?[!1,()=>i&&i(o)]:[!0]}class fa extends o.default.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:i}=this.props,{projection:s}=t;N(ya),s&&(e.group&&e.group.add(s),n&&n.register&&i&&n.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),ao.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:i,isPresent:s}=this.props,o=n.projection;return o?(o.isPresent=s,i||t.layoutDependency!==e||void 0===e?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||Gt.postRender(()=>{const t=o.getStack();t&&t.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),v.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function ga(t){const[n,i]=ma(),s=e.useContext(L);return o.default.createElement(fa,{...t,layoutGroup:s,switchLayoutGroup:e.useContext(k),isPresent:n,safeToRemove:i})}const ya={borderRadius:{...da,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:da,borderTopRightRadius:da,borderBottomLeftRadius:da,borderBottomRightRadius:da,boxShadow:pa},va={pan:{Feature:class extends de{constructor(){super(...arguments),this.removePointerDownListener=Xt}onPointerDown(t){this.session=new Zi(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ks(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:Os(t),onStart:Os(e),onMove:n,onEnd:(t,e)=>{delete this.session,i&&Gt.update(()=>i(t,e))}}}mount(){this.removePointerDownListener=se(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends de{constructor(t){super(t),this.removeGroupControls=Xt,this.removeListeners=Xt,this.controls=new js(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Xt}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:la,MeasureLayout:ga}},xa=(t,e)=>U(t)?new Io(e,{enableHardwareAcceleration:!1}):new Uo(e,{enableHardwareAcceleration:!0}),Pa={layout:{ProjectionNode:la,MeasureLayout:ga}},wa={...Xi,...Ee,...va,...Pa},Ea=O((t,e)=>Qt(t,e,wa,xa));const ba=O(Qt);function Aa(){const t=e.useRef(!1);return c(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function Sa(){const t=Aa(),[n,i]=e.useState(0),s=e.useCallback(()=>{t.current&&i(n+1)},[n]);return[e.useCallback(()=>Gt.postRender(s),[s]),n]}class Ta extends s.Component{getSnapshotBeforeUpdate(t){const e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent){const t=this.props.sizeRef.current;t.height=e.offsetHeight||0,t.width=e.offsetWidth||0,t.top=e.offsetTop,t.left=e.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Ca({children:t,isPresent:n}){const i=e.useId(),o=e.useRef(null),r=e.useRef({width:0,height:0,top:0,left:0});return e.useInsertionEffect(()=>{const{width:t,height:e,top:s,left:a}=r.current;if(n||!o.current||!t||!e)return;o.current.dataset.motionPopId=i;const l=document.createElement("style");return document.head.appendChild(l),l.sheet&&l.sheet.insertRule(`\n [data-motion-pop-id="${i}"] {\n position: absolute !important;\n width: ${t}px !important;\n height: ${e}px !important;\n top: ${s}px !important;\n left: ${a}px !important;\n }\n `),()=>{document.head.removeChild(l)}},[n]),s.createElement(Ta,{isPresent:n,childRef:o,sizeRef:r},s.cloneElement(t,{ref:o}))}const Va=({children:t,initial:n,isPresent:i,onExitComplete:o,custom:r,presenceAffectsLayout:a,mode:u})=>{const c=Nt(Ma),h=e.useId(),d=e.useMemo(()=>({id:h,initial:n,isPresent:i,custom:r,onExitComplete:t=>{c.set(t,!0);for(const t of c.values())if(!t)return;o&&o()},register:t=>(c.set(t,!1),()=>c.delete(t))}),a?void 0:[i]);return e.useMemo(()=>{c.forEach((t,e)=>c.set(e,!1))},[i]),s.useEffect(()=>{!i&&!c.size&&o&&o()},[i]),"popLayout"===u&&(t=s.createElement(Ca,{isPresent:i},t)),s.createElement(l.Provider,{value:d},t)};function Ma(){return new Map}function Ra(t){return e.useEffect(()=>()=>t(),[])}const Da=t=>t.key||"";function La(t){return"function"==typeof t}const ka=e.createContext(null),Ba=t=>!0===t,ja=({children:t,id:n,inherit:i=!0})=>{const o=e.useContext(L),r=e.useContext(ka),[a,l]=Sa(),u=e.useRef(null),c=o.id||r;null===u.current&&((t=>Ba(!0===t)||"id"===t)(i)&&c&&(n=n?c+"-"+n:c),u.current={id:n,group:Ba(i)&&o.group||ca()});const h=e.useMemo(()=>({...u.current,forceRender:a}),[l]);return s.createElement(L.Provider,{value:h},t)},Fa=e.createContext(null);function Oa(t){return t.value}function Ia(t,e){return t.layout.min-e.layout.min}function Ua(t){const n=Nt(()=>bi(t)),{isStatic:i}=e.useContext(r);if(i){const[,i]=e.useState(t);e.useEffect(()=>n.on("change",i),[])}return n}function Wa(t,e){const n=Ua(e()),i=()=>n.set(e());return i(),c(()=>{const e=()=>Gt.update(i,!1,!0),n=t.map(t=>t.on("change",e));return()=>{n.forEach(t=>t()),qt(i)}}),n}function Na(t,e,n,i){if("function"==typeof t)return function(t){wi.current=[],t();const e=Wa(wi.current,t);return wi.current=void 0,e}(t);const s="function"==typeof e?e:Dr(e,n,i);return Array.isArray(t)?za(t,s):za([t],([t])=>s(t))}function za(t,e){const n=Nt(()=>[]);return Wa(t,()=>{n.length=0;const i=t.length;for(let e=0;e<i;e++)n[e]=t[e].get();return e(n)})}function Ha(t,e=0){return Y(t)?t:Ua(e)}const $a={Group:e.forwardRef((function({children:t,as:n="ul",axis:i="y",onReorder:o,values:r,...a},l){const u=Nt(()=>Ea(n)),c=[],h=e.useRef(!1);Te(Boolean(r));const d={axis:i,registerItem:(t,e)=>{const n=c.findIndex(e=>t===e.value);-1!==n?c[n].layout=e[i]:c.push({value:t,layout:e[i]}),c.sort(Ia)},updateOrder:(t,e,n)=>{if(h.current)return;const i=function(t,e,n,i){if(!i)return t;const s=t.findIndex(t=>t.value===e);if(-1===s)return t;const o=i>0?1:-1,r=t[s+o];if(!r)return t;const a=t[s],l=r.layout,u=an(l.min,l.max,.5);return 1===o&&a.layout.max+n>u||-1===o&&a.layout.min+n<u?function([...t],e,n){const i=e<0?t.length+e:e;if(i>=0&&i<t.length){const i=n<0?t.length+n:n,[s]=t.splice(e,1);t.splice(i,0,s)}return t}(t,s,s+o):t}(c,t,e,n);c!==i&&(h.current=!0,o(i.map(Oa).filter(t=>-1!==r.indexOf(t))))}};return e.useEffect(()=>{h.current=!1}),s.createElement(u,{...a,ref:l,ignoreStrict:!0},s.createElement(Fa.Provider,{value:d},t))})),Item:e.forwardRef((function({children:t,style:n={},value:i,as:o="li",onDrag:r,layout:a=!0,...l},u){const c=Nt(()=>Ea(o)),h=e.useContext(Fa),d={x:Ha(n.x),y:Ha(n.y)},p=Na([d.x,d.y],([t,e])=>t||e?1:"unset");Te(Boolean(h));const{axis:m,registerItem:f,updateOrder:g}=h;return s.createElement(c,{drag:m,...l,dragSnapToOrigin:!0,style:{...n,x:d.x,y:d.y,zIndex:p},layout:a,onDrag:(t,e)=>{const{velocity:n}=e;n[m]&&g(i,d[m].get(),n[m]),r&&r(t,e)},onLayoutMeasure:t=>f(i,t),ref:u,ignoreStrict:!0},t)}))},Ya={renderer:xa,...Xi,...Ee},Xa={...Ya,...va,...Pa};function Ga(t,n,i){e.useInsertionEffect(()=>t.on(n,i),[t,n,i])}function qa(t,e){Se(Boolean(!e||e.current))}const Za=()=>({scrollX:bi(0),scrollY:bi(0),scrollXProgress:bi(0),scrollYProgress:bi(0)});function Ka({container:t,target:n,layoutEffect:i=!0,...s}={}){const o=Nt(Za);return(i?c:e.useEffect)(()=>(qa(0,n),qa(0,t),Tr(({x:t,y:e})=>{o.scrollX.set(t.current),o.scrollXProgress.set(t.progress),o.scrollY.set(e.current),o.scrollYProgress.set(e.progress)},{...s,container:(null==t?void 0:t.current)||void 0,target:(null==n?void 0:n.current)||void 0})),[t,n,JSON.stringify(s.offset)]),o}function _a(t){const n=e.useRef(0),{isStatic:i}=e.useContext(r);e.useEffect(()=>{if(i)return;const e=({timestamp:e,delta:i})=>{n.current||(n.current=e),t(e-n.current,i)};return Gt.update(e,!0),()=>qt(e)},[t])}class Ja extends Ei{constructor(){super(...arguments),this.members=[],this.transforms=new Set}add(t){let e;H.has(t)?(this.transforms.add(t),e="transform"):t.startsWith("origin")||K(t)||"willChange"===t||(e=d(t)),e&&(vi(this.members,e),this.update())}remove(t){H.has(t)?(this.transforms.delete(t),this.transforms.size||xi(this.members,"transform")):xi(this.members,d(t)),this.update()}update(){this.set(this.members.length?this.members.join(", "):"auto")}}function Qa(){!Ro.current&&Do();const[t]=e.useState(Mo.current);return t}function tl(){let t=!1;const e=new Set,n={subscribe:t=>(e.add(t),()=>{e.delete(t)}),start(n,i){Te(t);const s=[];return e.forEach(t=>{s.push(Ui(t,n,{transitionOverride:i}))}),Promise.all(s)},set:n=>(Te(t),e.forEach(t=>{!function(t,e){Array.isArray(e)?Ri(t,e):"string"==typeof e?Ri(t,[e]):Mi(t,e)}(t,n)})),stop(){e.forEach(t=>{!function(t){t.values.forEach(t=>t.stop())}(t)})},mount:()=>(t=!0,()=>{t=!1,n.stop()})};return n}function el(){const t=Nt(tl);return c(t.mount,[]),t}const nl=el;class il{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,e){this.componentControls.forEach(n=>{n.start(t.nativeEvent||t,e)})}}const sl=()=>new il;function ol(t){return null!==t&&"object"==typeof t&&B in t}function rl(){return al}function al(t){aa.current&&(aa.current.isUpdating=!1,aa.current.blockUpdate(),t&&t())}const ll=(t,e)=>`${t}: ${e}`,ul=new Map;let cl,hl,dl;function pl(t,e,n,i){const s=H.has(e)?"transform":e,o=ll(t,s),r=ul.get(o);if(!r)return null;const{animation:a,startTime:l}=r;return null===l||window.HandoffComplete?((()=>{ul.delete(o);try{a.cancel()}catch(t){}})(),null):(void 0===cl&&(cl=performance.now()),cl-l||0)}const ml=()=>({});class fl extends Fo{build(){}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}resetTransform(){}restoreTransform(){}removeValueFromRenderState(){}renderInstance(){}scrapeMotionValuesFromProps(){return{}}getBaseTargetFromProps(){}readValueFromInstance(t,e,n){return n.initialState[e]||0}sortInstanceNodePosition(){return 0}makeTargetAnimatableFromInstance({transition:t,transitionEnd:e,...n}){return Di(this,n,ki(n,t||{},this)),{transition:t,transitionEnd:e,...n}}}const gl=$t({scrapeMotionValuesFromProps:ml,createRenderState:ml});const yl=t=>t>.001?1/t:1e5;let vl=!1;let xl=0;t.AnimatePresence=({children:t,custom:n,initial:i=!0,onExitComplete:o,exitBeforeEnter:r,presenceAffectsLayout:a=!0,mode:l="sync"})=>{Te(!r);const u=e.useContext(L).forceRender||Sa()[0],h=Aa(),d=function(t){const n=[];return e.Children.forEach(t,t=>{e.isValidElement(t)&&n.push(t)}),n}(t);let p=d;const m=e.useRef(new Map).current,f=e.useRef(p),g=e.useRef(new Map).current,y=e.useRef(!0);if(c(()=>{y.current=!1,function(t,e){t.forEach(t=>{const n=Da(t);e.set(n,t)})}(d,g),f.current=p}),Ra(()=>{y.current=!0,g.clear(),m.clear()}),y.current)return s.createElement(s.Fragment,null,p.map(t=>s.createElement(Va,{key:Da(t),isPresent:!0,initial:!!i&&void 0,presenceAffectsLayout:a,mode:l},t)));p=[...p];const v=f.current.map(Da),x=d.map(Da),P=v.length;for(let t=0;t<P;t++){const e=v[t];-1!==x.indexOf(e)||m.has(e)||m.set(e,void 0)}return"wait"===l&&m.size&&(p=[]),m.forEach((t,e)=>{if(-1!==x.indexOf(e))return;const i=g.get(e);if(!i)return;const r=v.indexOf(e);let c=t;if(!c){const t=()=>{m.delete(e);const t=Array.from(g.keys()).filter(t=>!x.includes(t));if(t.forEach(t=>g.delete(t)),f.current=d.filter(n=>{const i=Da(n);return i===e||t.includes(i)}),!m.size){if(!1===h.current)return;u(),o&&o()}};c=s.createElement(Va,{key:Da(i),isPresent:!1,onExitComplete:t,custom:n,presenceAffectsLayout:a,mode:l},i),m.set(e,c)}p.splice(r,0,c)}),p=p.map(t=>{const e=t.key;return m.has(e)?t:s.createElement(Va,{key:Da(t),isPresent:!0,presenceAffectsLayout:a,mode:l},t)}),s.createElement(s.Fragment,null,m.size?p:p.map(t=>e.cloneElement(t)))},t.AnimateSharedLayout=({children:t})=>(s.useEffect(()=>{Te(!1)},[]),s.createElement(ja,{id:Nt(()=>"asl-"+xl++)},t)),t.DeprecatedLayoutGroupContext=ka,t.DragControls=il,t.FlatTree=ro,t.LayoutGroup=ja,t.LayoutGroupContext=L,t.LazyMotion=function({children:t,features:n,strict:i=!1}){const[,o]=e.useState(!La(n)),r=e.useRef(void 0);if(!La(n)){const{renderer:t,...e}=n;r.current=t,D(e)}return e.useEffect(()=>{La(n)&&n().then(({renderer:t,...e})=>{D(e),r.current=t,o(!0)})},[]),s.createElement(h.Provider,{value:{renderer:r.current,strict:i}},t)},t.MotionConfig=function({children:t,isValidProp:n,...i}){n&&St(n),(i={...e.useContext(r),...i}).isStatic=Nt(()=>i.isStatic);const o=e.useMemo(()=>i,[JSON.stringify(i.transition),i.transformPagePoint,i.reducedMotion]);return s.createElement(r.Provider,{value:o},t)},t.MotionConfigContext=r,t.MotionContext=a,t.MotionGlobalConfig=m,t.MotionValue=Ei,t.PresenceContext=l,t.Reorder=$a,t.SwitchLayoutGroupContext=k,t.VisualElement=Fo,t.addPointerEvent=se,t.addPointerInfo=ie,t.addScaleCorrector=N,t.animate=ir,t.animateValue=Zn,t.animateVisualElement=Ui,t.animationControls=tl,t.animations=Xi,t.anticipate=Ke,t.backIn=qe,t.backInOut=Ze,t.backOut=Ge,t.buildTransform=q,t.calcLength=ns,t.cancelFrame=qt,t.cancelSync=kr,t.checkTargetForNewValues=Di,t.circIn=$e,t.circInOut=Xe,t.circOut=Ye,t.clamp=Q,t.color=rn,t.complex=wn,t.createBox=ms,t.createDomMotionComponent=function(t){return j(Qt(t,{forwardMotionProps:!1},wa,xa))},t.createMotionComponent=j,t.createScopedAnimate=nr,t.cubicBezier=Oe,t.delay=lo,t.disableInstantTransitions=function(){Me.current=!1},t.distance=Gi,t.distance2D=qi,t.domAnimation=Ya,t.domMax=Xa,t.easeIn=Ie,t.easeInOut=We,t.easeOut=Ue,t.filterProps=Tt,t.frame=Gt,t.frameData=Zt,t.inView=Rr,t.interpolate=Rn,t.invariant=Te,t.isBrowser=u,t.isDragActive=he,t.isMotionComponent=ol,t.isMotionValue=Y,t.isValidMotionProp=bt,t.m=ba,t.makeUseVisualState=$t,t.mirrorEasing=ze,t.mix=an,t.motion=Ea,t.motionValue=bi,t.optimizedAppearDataAttribute=p,t.pipe=re,t.progress=Cn,t.px=ht,t.resolveMotionValue=Ht,t.reverseEasing=He,t.scroll=function(t,e){const n=Vr(e);return"function"==typeof t?ho(t,n):t.attachTimeline(n)},t.scrollInfo=Tr,t.spring=Nn,t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:i}={}){return(s,o)=>{const r="number"==typeof n?n:function(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}(n,o),a=Math.abs(r-s);let l=t*a;if(i){const e=o*t;l=Je(i)(l/e)*e}return e+l}},t.startOptimizedAppearAnimation=function(t,e,n,i,s){if(window.HandoffComplete)return void(window.HandoffAppearAnimations=void 0);const o=t.dataset.framerAppearId;if(!o)return;window.HandoffAppearAnimations=pl;const r=ll(o,e);dl||(dl=je(t,e,[n[0],n[0]],{duration:1e4,ease:"linear"}),ul.set(r,{animation:dl,startTime:null}));const a=()=>{dl.cancel();const o=je(t,e,n,i);void 0===hl&&(hl=performance.now()),o.startTime=hl,ul.set(r,{animation:o,startTime:hl}),s&&s(o)};dl.ready?dl.ready.then(a).catch(Xt):a()},t.steps=Kt,t.sync=Lr,t.transform=Dr,t.unwrapMotionComponent=function(t){if(ol(t))return t[B]},t.useAnimate=function(){const t=Nt(()=>({current:null,animations:[]})),e=Nt(()=>nr(t));return Ra(()=>{t.animations.forEach(t=>t.stop())}),[t,e]},t.useAnimation=nl,t.useAnimationControls=el,t.useAnimationFrame=_a,t.useCycle=function(...t){const n=e.useRef(0),[i,s]=e.useState(t[n.current]);return[i,e.useCallback(e=>{n.current="number"!=typeof e?$o(0,t.length,n.current+1):e,s(t[n.current])},[t.length,...t])]},t.useDeprecatedAnimatedState=function(t){const[n,i]=e.useState(t),s=gl({},!1),o=Nt(()=>new fl({props:{},visualState:s,presenceContext:null},{initialState:t}));return e.useEffect(()=>(o.mount({}),()=>o.unmount()),[o]),e.useEffect(()=>{o.update({onUpdate:t=>{i({...t})}},null)},[i,o]),[n,Nt(()=>t=>Ui(o,t))]},t.useDeprecatedInvertedScale=function(t){let n=Ua(1),i=Ua(1);const{visualElement:s}=e.useContext(a);return Te(!(!t&&!s)),Se(vl),vl=!0,t?(n=t.scaleX||n,i=t.scaleY||i):s&&(n=s.getValue("scaleX",1),i=s.getValue("scaleY",1)),{scaleX:Na(n,yl),scaleY:Na(i,yl)}},t.useDomEvent=function(t,n,i,s){e.useEffect(()=>{const e=t.current;if(i&&e)return te(e,n,i,s)},[t,n,i,s])},t.useDragControls=function(){return Nt(sl)},t.useElementScroll=function(t){return Ka({container:t})},t.useForceUpdate=Sa,t.useInView=function(t,{root:n,margin:i,amount:s,once:o=!1}={}){const[r,a]=e.useState(!1);return e.useEffect(()=>{if(!t.current||o&&r)return;const e={root:n&&n.current||void 0,margin:i,amount:s};return Rr(t.current,()=>(a(!0),o?void 0:()=>a(!1)),e)},[n,t,i,o,s]),r},t.useInstantLayoutTransition=rl,t.useInstantTransition=function(){const[t,n]=Sa(),i=rl(),s=e.useRef();return e.useEffect(()=>{Gt.postRender(()=>Gt.postRender(()=>{n===s.current&&(Me.current=!1)}))},[n]),e=>{i(()=>{Me.current=!0,t(),e(),s.current=n+1})}},t.useIsPresent=function(){return null===(t=e.useContext(l))||t.isPresent;var t},t.useIsomorphicLayoutEffect=c,t.useMotionTemplate=function(t,...e){const n=t.length;return Wa(e.filter(Y),(function(){let i="";for(let s=0;s<n;s++){i+=t[s];const n=e[s];n&&(i+=Y(n)?n.get():n)}return i}))},t.useMotionValue=Ua,t.useMotionValueEvent=Ga,t.usePresence=ma,t.useReducedMotion=Qa,t.useReducedMotionConfig=function(){const t=Qa(),{reducedMotion:n}=e.useContext(r);return"never"!==n&&("always"===n||t)},t.useResetProjection=function(){return s.useCallback(()=>{const t=aa.current;t&&t.resetTree()},[])},t.useScroll=Ka,t.useSpring=function(t,n={}){const{isStatic:i}=e.useContext(r),s=e.useRef(null),o=Ua(Y(t)?t.get():t),a=()=>{s.current&&s.current.stop()};return e.useInsertionEffect(()=>o.attach((t,e)=>{if(i)return e(t);const r=s.current;return r&&0===r.time&&r.sample(Zt.delta),a(),s.current=Zn({keyframes:[o.get(),t],velocity:o.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:e}),o.get()},a),[JSON.stringify(n)]),c(()=>{if(Y(t))return t.on("change",t=>o.set(parseFloat(t)))},[o]),o},t.useTime=function(){const t=Ua(0);return _a(e=>t.set(e)),t},t.useTransform=Na,t.useUnmountEffect=Ra,t.useVelocity=function(t){const e=Ua(t.getVelocity()),n=()=>{const i=t.getVelocity();e.set(i),i&&Gt.update(n)};return Ga(t,"change",()=>{Gt.update(n,!1,!0)}),e},t.useViewportScroll=function(){return Ka()},t.useWillChange=function(){return Nt(()=>new Ja("auto"))},t.visualElementStore=co,t.warning=Se,t.wrap=$o,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={},t.React)}(this,(function(t,e){"use strict";function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}function i(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}})),e.default=t,Object.freeze(e)}var s=i(e),o=n(e);const r=e.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),a=e.createContext({}),l=e.createContext(null),u="undefined"!=typeof document,c=u?e.useLayoutEffect:e.useEffect,h=e.createContext({strict:!1}),d=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),p="data-"+d("framerAppearId"),m={skipAnimations:!1,useManualTiming:!1};class f{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const e=this.order.indexOf(t);-1!==e&&(this.order.splice(e,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}const g=["prepare","read","update","preRender","render","postRender"];function y(t,e){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=g.reduce((t,e)=>(t[e]=function(t){let e=new f,n=new f,i=0,s=!1,o=!1;const r=new WeakSet,a={schedule:(t,o=!1,a=!1)=>{const l=a&&s,u=l?e:n;return o&&r.add(t),u.add(t)&&l&&s&&(i=e.order.length),t},cancel:t=>{n.remove(t),r.delete(t)},process:l=>{if(s)o=!0;else{if(s=!0,[e,n]=[n,e],n.clear(),i=e.order.length,i)for(let n=0;n<i;n++){const i=e.order[n];r.has(i)&&(a.schedule(i),t()),i(l)}s=!1,o&&(o=!1,a.process(l))}}};return a}(()=>n=!0),t),{}),r=t=>{o[t].process(s)},a=()=>{const o=m.useManualTiming?s.timestamp:performance.now();n=!1,s.delta=i?1e3/60:Math.max(Math.min(o-s.timestamp,40),1),s.timestamp=o,s.isProcessing=!0,g.forEach(r),s.isProcessing=!1,n&&e&&(i=!1,t(a))};return{schedule:g.reduce((e,r)=>{const l=o[r];return e[r]=(e,o=!1,r=!1)=>(n||(n=!0,i=!0,s.isProcessing||t(a)),l.schedule(e,o,r)),e},{}),cancel:t=>g.forEach(e=>o[e].cancel(t)),state:s,steps:o}}const{schedule:v,cancel:x}=y(queueMicrotask,!1);function P(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function w(t){return"string"==typeof t||Array.isArray(t)}function E(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}const b=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],A=["initial",...b];function T(t){return E(t.animate)||A.some(e=>w(t[e]))}function S(t){return Boolean(T(t)||t.variants)}function C(t){const{initial:n,animate:i}=function(t,e){if(T(t)){const{initial:e,animate:n}=t;return{initial:!1===e||w(e)?e:void 0,animate:w(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,e.useContext(a));return e.useMemo(()=>({initial:n,animate:i}),[V(n),V(i)])}function V(t){return Array.isArray(t)?t.join(" "):t}const M={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"]},R={};for(const t in M)R[t]={isEnabled:e=>M[t].some(t=>!!e[t])};function D(t){for(const e in t)R[e]={...R[e],...t[e]}}const L=e.createContext({}),k=e.createContext({}),B=Symbol.for("motionComponentSymbol");function j({preloadedFeatures:t,createVisualElement:n,useRender:i,useVisualState:o,Component:d}){t&&D(t);const m=e.forwardRef((function(m,f){let g;const y={...e.useContext(r),...m,layoutId:F(m)},{isStatic:x}=y,w=C(m),E=o(m,x);if(!x&&u){w.visualElement=function(t,n,i,s){const{visualElement:o}=e.useContext(a),u=e.useContext(h),d=e.useContext(l),m=e.useContext(r).reducedMotion,f=e.useRef();s=s||u.renderer,!f.current&&s&&(f.current=s(t,{visualState:n,parent:o,props:i,presenceContext:d,blockInitialAnimation:!!d&&!1===d.initial,reducedMotionConfig:m}));const g=f.current;e.useInsertionEffect(()=>{g&&g.update(i,d)});const y=e.useRef(Boolean(i[p]&&!window.HandoffComplete));return c(()=>{g&&(v.postRender(g.render),y.current&&g.animationState&&g.animationState.animateChanges())}),e.useEffect(()=>{g&&(g.updateFeatures(),!y.current&&g.animationState&&g.animationState.animateChanges(),y.current&&(y.current=!1,window.HandoffComplete=!0))}),g}(d,E,y,n);const i=e.useContext(k),s=e.useContext(h).strict;w.visualElement&&(g=w.visualElement.loadFeatures(y,s,t,i))}return s.createElement(a.Provider,{value:w},g&&w.visualElement?s.createElement(g,{visualElement:w.visualElement,...y}):null,i(d,m,function(t,n,i){return e.useCallback(e=>{e&&t.mount&&t.mount(e),n&&(e?n.mount(e):n.unmount()),i&&("function"==typeof i?i(e):P(i)&&(i.current=e))},[n])}(E,w.visualElement,f),E,x,w.visualElement))}));return m[B]=d,m}function F({layoutId:t}){const n=e.useContext(L).id;return n&&void 0!==t?n+"-"+t:t}function O(t){function e(e,n={}){return j(t(e,n))}if("undefined"==typeof Proxy)return e;const n=new Map;return new Proxy(e,{get:(t,i)=>(n.has(i)||n.set(i,e(i)),n.get(i))})}const I=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function U(t){return"string"==typeof t&&!t.includes("-")&&!!(I.indexOf(t)>-1||/[A-Z]/.test(t))}const W={};function N(t){Object.assign(W,t)}const z=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],H=new Set(z);function $(t,{layout:e,layoutId:n}){return H.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!W[t]||"opacity"===t)}const Y=t=>Boolean(t&&t.getVelocity),X={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},G=z.length;function q(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},i,s){let o="";for(let e=0;e<G;e++){const n=z[e];if(void 0!==t[n]){o+=`${X[n]||n}(${t[n]}) `}}return e&&!t.z&&(o+="translateZ(0)"),o=o.trim(),s?o=s(t,i?"":o):n&&i&&(o="none"),o}const Z=t=>e=>"string"==typeof e&&e.startsWith(t),K=Z("--"),_=Z("var(--"),J=(t,e)=>e&&"number"==typeof t?e.transform(t):t,Q=(t,e,n)=>Math.min(Math.max(n,t),e),tt={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},et={...tt,transform:t=>Q(0,1,t)},nt={...tt,default:1},it=t=>Math.round(1e5*t)/1e5,st=/(-)?([\d]*\.?[\d])+/g,ot=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,rt=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function at(t){return"string"==typeof t}const lt=t=>({test:e=>at(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),ut=lt("deg"),ct=lt("%"),ht=lt("px"),dt=lt("vh"),pt=lt("vw"),mt={...ct,parse:t=>ct.parse(t)/100,transform:t=>ct.transform(100*t)},ft={...tt,transform:Math.round},gt={borderWidth:ht,borderTopWidth:ht,borderRightWidth:ht,borderBottomWidth:ht,borderLeftWidth:ht,borderRadius:ht,radius:ht,borderTopLeftRadius:ht,borderTopRightRadius:ht,borderBottomRightRadius:ht,borderBottomLeftRadius:ht,width:ht,maxWidth:ht,height:ht,maxHeight:ht,size:ht,top:ht,right:ht,bottom:ht,left:ht,padding:ht,paddingTop:ht,paddingRight:ht,paddingBottom:ht,paddingLeft:ht,margin:ht,marginTop:ht,marginRight:ht,marginBottom:ht,marginLeft:ht,rotate:ut,rotateX:ut,rotateY:ut,rotateZ:ut,scale:nt,scaleX:nt,scaleY:nt,scaleZ:nt,skew:ut,skewX:ut,skewY:ut,distance:ht,translateX:ht,translateY:ht,translateZ:ht,x:ht,y:ht,z:ht,perspective:ht,transformPerspective:ht,opacity:et,originX:mt,originY:mt,originZ:ht,zIndex:ft,fillOpacity:et,strokeOpacity:et,numOctaves:ft};function yt(t,e,n,i){const{style:s,vars:o,transform:r,transformOrigin:a}=t;let l=!1,u=!1,c=!0;for(const t in e){const n=e[t];if(K(t)){o[t]=n;continue}const i=gt[t],h=J(n,i);if(H.has(t)){if(l=!0,r[t]=h,!c)continue;n!==(i.default||0)&&(c=!1)}else t.startsWith("origin")?(u=!0,a[t]=h):s[t]=h}if(e.transform||(l||i?s.transform=q(t.transform,n,c,i):s.transform&&(s.transform="none")),u){const{originX:t="50%",originY:e="50%",originZ:n=0}=a;s.transformOrigin=`${t} ${e} ${n}`}}const vt=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function xt(t,e,n){for(const i in e)Y(e[i])||$(i,n)||(t[i]=e[i])}function Pt(t,n,i){const s={};return xt(s,t.style||{},t),Object.assign(s,function({transformTemplate:t},n,i){return e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{}};return yt(e,n,{enableHardwareAcceleration:!i},t),Object.assign({},e.vars,e.style)},[n])}(t,n,i)),s}function wt(t,e,n){const i={},s=Pt(t,e,n);return t.drag&&!1!==t.dragListener&&(i.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(i.tabIndex=0),i.style=s,i}const Et=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function bt(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Et.has(t)}let At=t=>!bt(t);function Tt(t){t&&(At=e=>e.startsWith("on")?!bt(e):t(e))}try{Tt(require("@emotion/is-prop-valid").default)}catch(t){}function St(t,e,n){const i={};for(const s in t)"values"===s&&"object"==typeof t.values||(At(s)||!0===n&&bt(s)||!e&&!bt(s)||t.draggable&&s.startsWith("onDrag"))&&(i[s]=t[s]);return i}function Ct(t,e,n){return"string"==typeof t?t:ht.transform(e+n*t)}const Vt={offset:"stroke-dashoffset",array:"stroke-dasharray"},Mt={offset:"strokeDashoffset",array:"strokeDasharray"};function Rt(t,{attrX:e,attrY:n,attrScale:i,originX:s,originY:o,pathLength:r,pathSpacing:a=1,pathOffset:l=0,...u},c,h,d){if(yt(t,u,c,d),h)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:p,style:m,dimensions:f}=t;p.transform&&(f&&(m.transform=p.transform),delete p.transform),f&&(void 0!==s||void 0!==o||m.transform)&&(m.transformOrigin=function(t,e,n){return`${Ct(e,t.x,t.width)} ${Ct(n,t.y,t.height)}`}(f,void 0!==s?s:.5,void 0!==o?o:.5)),void 0!==e&&(p.x=e),void 0!==n&&(p.y=n),void 0!==i&&(p.scale=i),void 0!==r&&function(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?Vt:Mt;t[o.offset]=ht.transform(-i);const r=ht.transform(e),a=ht.transform(n);t[o.array]=`${r} ${a}`}(p,r,a,l,!1)}const Dt=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),Lt=t=>"string"==typeof t&&"svg"===t.toLowerCase();function kt(t,n,i,s){const o=e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Rt(e,n,{enableHardwareAcceleration:!1},Lt(s),t.transformTemplate),{...e.attrs,style:{...e.style}}},[n]);if(t.style){const e={};xt(e,t.style,t),o.style={...e,...o.style}}return o}function Bt(t=!1){return(n,i,s,{latestValues:o},r)=>{const a=(U(n)?kt:wt)(i,o,r,n),l={...St(i,"string"==typeof n,t),...a,ref:s},{children:u}=i,c=e.useMemo(()=>Y(u)?u.get():u,[u]);return e.createElement(n,{...l,children:c})}}function jt(t,{style:e,vars:n},i,s){Object.assign(t.style,e,s&&s.getProjectionStyles(i));for(const e in n)t.style.setProperty(e,n[e])}const Ft=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 Ot(t,e,n,i){jt(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(Ft.has(n)?n:d(n),e.attrs[n])}function It(t,e){const{style:n}=t,i={};for(const s in n)(Y(n[s])||e.style&&Y(e.style[s])||$(s,t))&&(i[s]=n[s]);return i}function Ut(t,e){const n=It(t,e);for(const i in t)if(Y(t[i])||Y(e[i])){n[-1!==z.indexOf(i)?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i]=t[i]}return n}function Wt(t,e,n,i={},s={}){return"function"==typeof e&&(e=e(void 0!==n?n:t.custom,i,s)),"string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e&&(e=e(void 0!==n?n:t.custom,i,s)),e}function Nt(t){const n=e.useRef(null);return null===n.current&&(n.current=t()),n.current}const zt=t=>Array.isArray(t);function Ht(t){const e=Y(t)?t.get():t;return n=e,Boolean(n&&"object"==typeof n&&n.mix&&n.toValue)?e.toValue():e;var n}const $t=t=>(n,i)=>{const s=e.useContext(a),o=e.useContext(l),r=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},i,s,o){const r={latestValues:Yt(i,s,o,t),renderState:e()};return n&&(r.mount=t=>n(i,t,r)),r}(t,n,s,o);return i?r():Nt(r)};function Yt(t,e,n,i){const s={},o=i(t,{});for(const t in o)s[t]=Ht(o[t]);let{initial:r,animate:a}=t;const l=T(t),u=S(t);e&&u&&!l&&!1!==t.inherit&&(void 0===r&&(r=e.initial),void 0===a&&(a=e.animate));let c=!!n&&!1===n.initial;c=c||!1===r;const h=c?a:r;if(h&&"boolean"!=typeof h&&!E(h)){(Array.isArray(h)?h:[h]).forEach(e=>{const n=Wt(t,e);if(!n)return;const{transitionEnd:i,transition:o,...r}=n;for(const t in r){let e=r[t];if(Array.isArray(e)){e=e[c?e.length-1:0]}null!==e&&(s[t]=e)}for(const t in i)s[t]=i[t]})}return s}const Xt=t=>t,{schedule:Gt,cancel:qt,state:Zt,steps:Kt}=y("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:Xt,!0),_t={useVisualState:$t({scrapeMotionValuesFromProps:Ut,createRenderState:Dt,onMount:(t,e,{renderState:n,latestValues:i})=>{Gt.read(()=>{try{n.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(t){n.dimensions={x:0,y:0,width:0,height:0}}}),Gt.render(()=>{Rt(n,i,{enableHardwareAcceleration:!1},Lt(e.tagName),t.transformTemplate),Ot(e,n)})}})},Jt={useVisualState:$t({scrapeMotionValuesFromProps:It,createRenderState:vt})};function Qt(t,{forwardMotionProps:e=!1},n,i){return{...U(t)?_t:Jt,preloadedFeatures:n,useRender:Bt(e),createVisualElement:i,Component:t}}function te(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}const ee=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function ne(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const ie=t=>e=>ee(e)&&t(e,ne(e));function se(t,e,n,i){return te(t,e,ie(n),i)}const oe=(t,e)=>n=>e(t(n)),re=(...t)=>t.reduce(oe);function ae(t){let e=null;return()=>{const n=()=>{e=null};return null===e&&(e=t,n)}}const le=ae("dragHorizontal"),ue=ae("dragVertical");function ce(t){let e=!1;if("y"===t)e=ue();else if("x"===t)e=le();else{const t=le(),n=ue();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}function he(){const t=ce(!0);return!t||(t(),!1)}class de{constructor(t){this.isMounted=!1,this.node=t}update(){}}function pe(t,e){const n="pointer"+(e?"enter":"leave"),i="onHover"+(e?"Start":"End");return se(t.current,n,(n,s)=>{if("touch"===n.pointerType||he())return;const o=t.getProps();t.animationState&&o.whileHover&&t.animationState.setActive("whileHover",e),o[i]&&Gt.update(()=>o[i](n,s))},{passive:!t.getProps()[i]})}const me=(t,e)=>!!e&&(t===e||me(t,e.parentElement));function fe(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,ne(n))}const ge=new WeakMap,ye=new WeakMap,ve=t=>{const e=ge.get(t.target);e&&e(t)},xe=t=>{t.forEach(ve)};function Pe(t,e,n){const i=function({root:t,...e}){const n=t||document;ye.has(n)||ye.set(n,{});const i=ye.get(n),s=JSON.stringify(e);return i[s]||(i[s]=new IntersectionObserver(xe,{root:t,...e})),i[s]}(e);return ge.set(t,n),i.observe(t),()=>{ge.delete(t),i.unobserve(t)}}const we={some:0,all:1};const Ee={inView:{Feature:class extends de{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:i="some",once:s}=t,o={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof i?i:we[i]};return Pe(this.node.current,o,t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,s&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),o=e?n:i;o&&o(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends de{constructor(){super(...arguments),this.removeStartListeners=Xt,this.removeEndListeners=Xt,this.removeAccessibleListeners=Xt,this.startPointerPress=(t,e)=>{if(this.isPressing)return;this.removeEndListeners();const n=this.node.getProps(),i=se(window,"pointerup",(t,e)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:i,globalTapTarget:s}=this.node.getProps();Gt.update(()=>{s||me(this.node.current,t.target)?n&&n(t,e):i&&i(t,e)})},{passive:!(n.onTap||n.onPointerUp)}),s=se(window,"pointercancel",(t,e)=>this.cancelPress(t,e),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=re(i,s),this.startPress(t,e)},this.startAccessiblePress=()=>{const t=te(this.node.current,"keydown",t=>{if("Enter"!==t.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=te(this.node.current,"keyup",t=>{"Enter"===t.key&&this.checkPressEnd()&&fe("up",(t,e)=>{const{onTap:n}=this.node.getProps();n&&Gt.update(()=>n(t,e))})}),fe("down",(t,e)=>{this.startPress(t,e)})}),e=te(this.node.current,"blur",()=>{this.isPressing&&fe("cancel",(t,e)=>this.cancelPress(t,e))});this.removeAccessibleListeners=re(t,e)}}startPress(t,e){this.isPressing=!0;const{onTapStart:n,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&Gt.update(()=>n(t,e))}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!he()}cancelPress(t,e){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&Gt.update(()=>n(t,e))}mount(){const t=this.node.getProps(),e=se(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),n=te(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=re(e,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends de{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=re(te(this.node.current,"focus",()=>this.onFocus()),te(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends de{mount(){this.unmount=re(pe(this.node,!0),pe(this.node,!1))}unmount(){}}}};function be(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}function Ae(t,e,n){const i=t.getProps();return Wt(i,e,void 0!==n?n:i.custom,function(t){const e={};return t.values.forEach((t,n)=>e[n]=t.get()),e}(t),function(t){const e={};return t.values.forEach((t,n)=>e[n]=t.getVelocity()),e}(t))}let Te=Xt,Se=Xt;const Ce=t=>1e3*t,Ve=t=>t/1e3,Me={current:!1},Re=t=>Array.isArray(t)&&"number"==typeof t[0];function De(t){return Boolean(!t||"string"==typeof t&&ke[t]||Re(t)||Array.isArray(t)&&t.every(De))}const Le=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,ke={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Le([0,.65,.55,1]),circOut:Le([.55,0,1,.45]),backIn:Le([.31,.01,.66,-.59]),backOut:Le([.33,1.53,.69,.99])};function Be(t){if(t)return Re(t)?Le(t):Array.isArray(t)?t.map(Be):ke[t]}function je(t,e,n,{delay:i=0,duration:s,repeat:o=0,repeatType:r="loop",ease:a,times:l}={}){const u={[e]:n};l&&(u.offset=l);const c=Be(a);return Array.isArray(c)&&(u.easing=c),t.animate(u,{delay:i,duration:s,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"})}const Fe=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function Oe(t,e,n,i){if(t===e&&n===i)return Xt;const s=e=>function(t,e,n,i,s){let o,r,a=0;do{r=e+(n-e)/2,o=Fe(r,i,s)-t,o>0?n=r:e=r}while(Math.abs(o)>1e-7&&++a<12);return r}(e,0,1,t,n);return t=>0===t||1===t?t:Fe(s(t),e,i)}const Ie=Oe(.42,0,1,1),Ue=Oe(0,0,.58,1),We=Oe(.42,0,.58,1),Ne=t=>Array.isArray(t)&&"number"!=typeof t[0],ze=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,He=t=>e=>1-t(1-e),$e=t=>1-Math.sin(Math.acos(t)),Ye=He($e),Xe=ze($e),Ge=Oe(.33,1.53,.69,.99),qe=He(Ge),Ze=ze(qe),Ke=t=>(t*=2)<1?.5*qe(t):.5*(2-Math.pow(2,-10*(t-1))),_e={linear:Xt,easeIn:Ie,easeInOut:We,easeOut:Ue,circIn:$e,circInOut:Xe,circOut:Ye,backIn:qe,backInOut:Ze,backOut:Ge,anticipate:Ke},Je=t=>{if(Array.isArray(t)){Se(4===t.length);const[e,n,i,s]=t;return Oe(e,n,i,s)}return"string"==typeof t?(Se(void 0!==_e[t]),_e[t]):t},Qe=(t,e)=>n=>Boolean(at(n)&&rt.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),tn=(t,e,n)=>i=>{if(!at(i))return i;const[s,o,r,a]=i.match(st);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},en={...tt,transform:t=>Math.round((t=>Q(0,255,t))(t))},nn={test:Qe("rgb","red"),parse:tn("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+en.transform(t)+", "+en.transform(e)+", "+en.transform(n)+", "+it(et.transform(i))+")"};const sn={test:Qe("#"),parse:function(t){let e="",n="",i="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}},transform:nn.transform},on={test:Qe("hsl","hue"),parse:tn("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+ct.transform(it(e))+", "+ct.transform(it(n))+", "+it(et.transform(i))+")"},rn={test:t=>nn.test(t)||sn.test(t)||on.test(t),parse:t=>nn.test(t)?nn.parse(t):on.test(t)?on.parse(t):sn.parse(t),transform:t=>at(t)?t:t.hasOwnProperty("red")?nn.transform(t):on.transform(t)},an=(t,e,n)=>-n*t+n*e+t;function ln(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}const un=(t,e,n)=>{const i=t*t;return Math.sqrt(Math.max(0,n*(e*e-i)+i))},cn=[sn,nn,on];function hn(t){const e=(n=t,cn.find(t=>t.test(n)));var n;Se(Boolean(e));let i=e.parse(t);return e===on&&(i=function({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let s=0,o=0,r=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;s=ln(a,i,t+1/3),o=ln(a,i,t),r=ln(a,i,t-1/3)}else s=o=r=n;return{red:Math.round(255*s),green:Math.round(255*o),blue:Math.round(255*r),alpha:i}}(i)),i}const dn=(t,e)=>{const n=hn(t),i=hn(e),s={...n};return t=>(s.red=un(n.red,i.red,t),s.green=un(n.green,i.green,t),s.blue=un(n.blue,i.blue,t),s.alpha=an(n.alpha,i.alpha,t),nn.transform(s))};const pn={regex:/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,countKey:"Vars",token:"${v}",parse:Xt},mn={regex:ot,countKey:"Colors",token:"${c}",parse:rn.parse},fn={regex:st,countKey:"Numbers",token:"${n}",parse:tt.parse};function gn(t,{regex:e,countKey:n,token:i,parse:s}){const o=t.tokenised.match(e);o&&(t["num"+n]=o.length,t.tokenised=t.tokenised.replace(e,i),t.values.push(...o.map(s)))}function yn(t){const e=t.toString(),n={value:e,tokenised:e,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&gn(n,pn),gn(n,mn),gn(n,fn),n}function vn(t){return yn(t).values}function xn(t){const{values:e,numColors:n,numVars:i,tokenised:s}=yn(t),o=e.length;return t=>{let e=s;for(let s=0;s<o;s++)e=s<i?e.replace(pn.token,t[s]):s<i+n?e.replace(mn.token,rn.transform(t[s])):e.replace(fn.token,it(t[s]));return e}}const Pn=t=>"number"==typeof t?0:t;const wn={test:function(t){var e,n;return isNaN(t)&&at(t)&&((null===(e=t.match(st))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(ot))||void 0===n?void 0:n.length)||0)>0},parse:vn,createTransformer:xn,getAnimatableNone:function(t){const e=vn(t);return xn(t)(e.map(Pn))}},En=(t,e)=>n=>""+(n>0?e:t);function bn(t,e){return"number"==typeof t?n=>an(t,e,n):rn.test(t)?dn(t,e):t.startsWith("var(")?En(t,e):Sn(t,e)}const An=(t,e)=>{const n=[...t],i=n.length,s=t.map((t,n)=>bn(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=s[e](t);return n}},Tn=(t,e)=>{const n={...t,...e},i={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(i[s]=bn(t[s],e[s]));return t=>{for(const e in i)n[e]=i[e](t);return n}},Sn=(t,e)=>{const n=wn.createTransformer(e),i=yn(t),s=yn(e);return i.numVars===s.numVars&&i.numColors===s.numColors&&i.numNumbers>=s.numNumbers?re(An(i.values,s.values),n):(Te(!0),En(t,e))},Cn=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i},Vn=(t,e)=>n=>an(t,e,n);function Mn(t,e,n){const i=[],s=n||("number"==typeof(o=t[0])?Vn:"string"==typeof o?rn.test(o)?dn:Sn:Array.isArray(o)?An:"object"==typeof o?Tn:Vn);var o;const r=t.length-1;for(let n=0;n<r;n++){let o=s(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||Xt:e;o=re(t,o)}i.push(o)}return i}function Rn(t,e,{clamp:n=!0,ease:i,mixer:s}={}){const o=t.length;if(Se(o===e.length),1===o)return()=>e[0];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const r=Mn(e,i,s),a=r.length,l=e=>{let n=0;if(a>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const i=Cn(t[n],t[n+1],e);return r[n](i)};return n?e=>l(Q(t[0],t[o-1],e)):l}function Dn(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=Cn(0,e,i);t.push(an(n,1,s))}}function Ln(t){const e=[0];return Dn(e,t.length-1),e}function kn({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=Ne(i)?i.map(Je):Je(i),o={done:!1,value:e[0]},r=Rn(function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:Ln(e),t),e,{ease:Array.isArray(s)?s:(a=e,l=s,a.map(()=>l||We).splice(0,a.length-1))});var a,l;return{calculatedDuration:t,next:e=>(o.value=r(e),o.done=e>=t,o)}}function Bn(t,e){return e?t*(1e3/e):0}function jn(t,e,n){const i=Math.max(e-5,0);return Bn(n-t(i),e-i)}function Fn({duration:t=800,bounce:e=.25,velocity:n=0,mass:i=1}){let s,o;Te(t<=Ce(10));let r=1-e;r=Q(.05,1,r),t=Q(.01,10,Ve(t)),r<1?(s=e=>{const i=e*r,s=i*t;return.001-(i-n)/On(e,r)*Math.exp(-s)},o=e=>{const i=e*r*t,o=i*n+n,a=Math.pow(r,2)*Math.pow(e,2)*t,l=Math.exp(-i),u=On(Math.pow(e,2),r);return(.001-s(e)>0?-1:1)*((o-a)*l)/u}):(s=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,o=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let i=n;for(let n=1;n<12;n++)i-=t(i)/e(i);return i}(s,o,5/t);if(t=Ce(t),isNaN(a))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(a,2)*i;return{stiffness:e,damping:2*r*Math.sqrt(i*e),duration:t}}}function On(t,e){return t*Math.sqrt(1-e*e)}const In=["duration","bounce"],Un=["stiffness","damping","mass"];function Wn(t,e){return e.some(e=>void 0!==t[e])}function Nn({keyframes:t,restDelta:e,restSpeed:n,...i}){const s=t[0],o=t[t.length-1],r={done:!1,value:s},{stiffness:a,damping:l,mass:u,duration:c,velocity:h,isResolvedFromDuration:d}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!Wn(t,Un)&&Wn(t,In)){const n=Fn(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}({...i,velocity:-Ve(i.velocity||0)}),p=h||0,m=l/(2*Math.sqrt(a*u)),f=o-s,g=Ve(Math.sqrt(a/u)),y=Math.abs(f)<5;let v;if(n||(n=y?.01:2),e||(e=y?.005:.5),m<1){const t=On(g,m);v=e=>{const n=Math.exp(-m*g*e);return o-n*((p+m*g*f)/t*Math.sin(t*e)+f*Math.cos(t*e))}}else if(1===m)v=t=>o-Math.exp(-g*t)*(f+(p+g*f)*t);else{const t=g*Math.sqrt(m*m-1);v=e=>{const n=Math.exp(-m*g*e),i=Math.min(t*e,300);return o-n*((p+m*g*f)*Math.sinh(i)+t*f*Math.cosh(i))/t}}return{calculatedDuration:d&&c||null,next:t=>{const i=v(t);if(d)r.done=t>=c;else{let s=p;0!==t&&(s=m<1?jn(v,t,i):0);const a=Math.abs(s)<=n,l=Math.abs(o-i)<=e;r.done=a&&l}return r.value=r.done?o:i,r}}}function zn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,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 m=n*e;const f=h+m,g=void 0===r?f:r(f);g!==f&&(m=g-h);const y=t=>-m*Math.exp(-t/i),v=t=>g+y(t),x=t=>{const e=y(t),n=v(t);d.done=Math.abs(e)<=u,d.value=d.done?g:n};let P,w;const E=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(P=t,w=Nn({keyframes:[d.value,p(d.value)],velocity:jn(v,t,d.value),damping:s,stiffness:o,restDelta:u,restSpeed:c}))};return E(0),{calculatedDuration:null,next:t=>{let e=!1;return w||void 0!==P||(e=!0,x(t),E(t)),void 0!==P&&t>P?w.next(t-P):(!e&&x(t),d)}}}let Hn;function $n(){Hn=void 0}const Yn={now:()=>(void 0===Hn&&Yn.set(Zt.isProcessing||m.useManualTiming?Zt.timestamp:performance.now()),Hn),set:t=>{Hn=t,queueMicrotask($n)}},Xn=t=>{const e=({timestamp:e})=>t(e);return{start:()=>Gt.update(e,!0),stop:()=>qt(e),now:()=>Zt.isProcessing?Zt.timestamp:Yn.now()}};function Gn(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}const qn={decay:zn,inertia:zn,tween:kn,keyframes:kn,spring:Nn};function Zn({autoplay:t=!0,delay:e=0,driver:n=Xn,keyframes:i,type:s="keyframes",repeat:o=0,repeatDelay:r=0,repeatType:a="loop",onPlay:l,onStop:u,onComplete:c,onUpdate:h,...d}){let p,m,f=1,g=!1;const y=()=>{m=new Promise(t=>{p=t})};let v;y();const x=qn[s]||kn;let P;x!==kn&&"number"!=typeof i[0]&&(P=Rn([0,100],i,{clamp:!1}),i=[0,100]);const w=x({...d,keyframes:i});let E;"mirror"===a&&(E=x({...d,keyframes:[...i].reverse(),velocity:-(d.velocity||0)}));let b="idle",A=null,T=null,S=null;null===w.calculatedDuration&&o&&(w.calculatedDuration=Gn(w));const{calculatedDuration:C}=w;let V=1/0,M=1/0;null!==C&&(V=C+r,M=V*(o+1)-r);let R=0;const D=t=>{if(null===T)return;f>0&&(T=Math.min(T,t)),f<0&&(T=Math.min(t-M/f,T)),R=null!==A?A:Math.round(t-T)*f;const n=R-e*(f>=0?1:-1),s=f>=0?n<0:n>M;R=Math.max(n,0),"finished"===b&&null===A&&(R=M);let l=R,u=w;if(o){const t=Math.min(R,M)/V;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,o+1);Boolean(e%2)&&("reverse"===a?(n=1-n,r&&(n-=r/V)):"mirror"===a&&(u=E)),l=Q(0,1,n)*V}const c=s?{done:!1,value:i[0]}:u.next(l);P&&(c.value=P(c.value));let{done:d}=c;s||null===C||(d=f>=0?R>=M:R<=0);const p=null===A&&("finished"===b||"running"===b&&d);return h&&h(c.value),p&&B(),c},L=()=>{v&&v.stop(),v=void 0},k=()=>{b="idle",L(),p(),y(),T=S=null},B=()=>{b="finished",c&&c(),L(),p()},j=()=>{if(g)return;v||(v=n(D));const t=v.now();l&&l(),null!==A?T=t-A:T&&"finished"!==b||(T=t),"finished"===b&&y(),S=T,A=null,b="running",v.start()};t&&j();const F={then:(t,e)=>m.then(t,e),get time(){return Ve(R)},set time(t){t=Ce(t),R=t,null===A&&v&&0!==f?T=v.now()-t/f:A=t},get duration(){const t=null===w.calculatedDuration?Gn(w):w.calculatedDuration;return Ve(t)},get speed(){return f},set speed(t){t!==f&&v&&(f=t,F.time=Ve(R))},get state(){return b},play:j,pause:()=>{b="paused",A=R},stop:()=>{g=!0,"idle"!==b&&(b="idle",u&&u(),k())},cancel:()=>{null!==S&&D(S),k()},complete:()=>{b="finished"},sample:t=>(T=0,D(t))};return F}function Kn(t){let e;return()=>(void 0===e&&(e=t()),e)}const _n=Kn(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Jn=new Set(["opacity","clipPath","filter","transform"]);function Qn(t,e,{onUpdate:n,onComplete:i,...s}){if(!(_n()&&Jn.has(e)&&!s.repeatDelay&&"mirror"!==s.repeatType&&0!==s.damping&&"inertia"!==s.type))return!1;let o,r,a=!1,l=!1;const u=()=>{r=new Promise(t=>{o=t})};u();let{keyframes:c,duration:h=300,ease:d,times:p}=s;if(((t,e)=>"spring"===e.type||"backgroundColor"===t||!De(e.ease))(e,s)){const t=Zn({...s,repeat:0,delay:0});let e={done:!1,value:c[0]};const n=[];let i=0;for(;!e.done&&i<2e4;)e=t.sample(i),n.push(e.value),i+=10;p=void 0,c=n,h=i-10,d="linear"}const m=je(t.owner.current,e,c,{...s,duration:h,ease:d,times:p}),f=()=>{l=!1,m.cancel()},g=()=>{l=!0,Gt.update(f),o(),u()};m.onfinish=()=>{l||(t.set(function(t,{repeat:e,repeatType:n="loop"}){return t[e&&"loop"!==n&&e%2==1?0:t.length-1]}(c,s)),i&&i(),g())};return{then:(t,e)=>r.then(t,e),attachTimeline:t=>(m.timeline=t,m.onfinish=null,Xt),get time(){return Ve(m.currentTime||0)},set time(t){m.currentTime=Ce(t)},get speed(){return m.playbackRate},set speed(t){m.playbackRate=t},get duration(){return Ve(h)},play:()=>{a||(m.play(),qt(f))},pause:()=>m.pause(),stop:()=>{if(a=!0,"idle"===m.playState)return;const{currentTime:e}=m;if(e){const n=Zn({...s,autoplay:!1});t.setWithVelocity(n.sample(e-10).value,n.sample(e).value,10)}g()},complete:()=>{l||m.finish()},cancel:g}}const ti={type:"spring",stiffness:500,damping:25,restSpeed:10},ei={type:"keyframes",duration:.8},ni={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ii=(t,{keyframes:e})=>e.length>2?ei:H.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:ti:ni,si=(t,e)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!wn.test(e)&&"0"!==e||e.startsWith("url("))),oi=new Set(["brightness","contrast","saturate","opacity"]);function ri(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(st)||[];if(!i)return t;const s=n.replace(i,"");let o=oi.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const ai=/([a-z-]*)\(.*?\)/g,li={...wn,getAnimatableNone:t=>{const e=t.match(ai);return e?e.map(ri).join(" "):t}},ui={...gt,color:rn,backgroundColor:rn,outlineColor:rn,fill:rn,stroke:rn,borderColor:rn,borderTopColor:rn,borderRightColor:rn,borderBottomColor:rn,borderLeftColor:rn,filter:li,WebkitFilter:li},ci=t=>ui[t];function hi(t,e){let n=ci(t);return n!==li&&(n=wn),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const di=t=>/^0[^.\s]+$/.test(t);function pi(t){return"number"==typeof t?0===t:null!==t?"none"===t||"0"===t||di(t):void 0}function mi(t,e){return t[e]||t.default||t}const fi=(t,e,n,i={})=>s=>{const o=mi(i,t)||{},r=o.delay||i.delay||0;let{elapsed:a=0}=i;a-=Ce(r);const l=function(t,e,n,i){const s=si(e,n);let o;o=Array.isArray(n)?[...n]:[null,n];const r=void 0!==i.from?i.from:t.get();let a=void 0;const l=[];for(let t=0;t<o.length;t++)null===o[t]&&(o[t]=0===t?r:o[t-1]),pi(o[t])&&l.push(t),"string"==typeof o[t]&&"none"!==o[t]&&"0"!==o[t]&&(a=o[t]);if(s&&l.length&&a)for(let t=0;t<l.length;t++){o[l[t]]=hi(e,a)}return o}(e,t,n,o),u=l[0],c=l[l.length-1],h=si(t,u),d=si(t,c);Te(h===d);let p={keyframes:l,velocity:e.getVelocity(),ease:"easeOut",...o,delay:-a,onUpdate:t=>{e.set(t),o.onUpdate&&o.onUpdate(t)},onComplete:()=>{s(),o.onComplete&&o.onComplete()}};if(function({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}(o)||(p={...p,...ii(t,p)}),p.duration&&(p.duration=Ce(p.duration)),p.repeatDelay&&(p.repeatDelay=Ce(p.repeatDelay)),!h||!d||Me.current||!1===o.type||m.skipAnimations)return function({keyframes:t,delay:e,onUpdate:n,onComplete:i}){const s=()=>(n&&n(t[t.length-1]),i&&i(),{time:0,speed:1,duration:0,play:Xt,pause:Xt,stop:Xt,then:t=>(t(),Promise.resolve()),cancel:Xt,complete:Xt});return e?Zn({keyframes:[0,1],duration:0,delay:e,onComplete:s}):s()}(Me.current?{...p,delay:0}:p);if(!i.isHandoff&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const n=Qn(e,t,p);if(n)return n}return Zn(p)};function gi(t){return Boolean(Y(t)&&t.add)}const yi=t=>/^\-?\d*\.?\d+$/.test(t);function vi(t,e){-1===t.indexOf(e)&&t.push(e)}function xi(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class Pi{constructor(){this.subscriptions=[]}add(t){return vi(this.subscriptions,t),()=>xi(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(let s=0;s<i;s++){const i=this.subscriptions[s];i&&i(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const wi={current:void 0};class Ei{constructor(t,e={}){var n;this.version="11.0.4",this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=Yn.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.canTrackVelocity=(n=this.current,!isNaN(parseFloat(n))),this.owner=e.owner}setCurrent(t){this.current=t,this.updatedAt=Yn.now()}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 Pi);const n=this.events[t].add(e);return"change"===t?()=>{n(),Gt.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){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return wi.current&&wi.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Yn.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return Bn(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 bi(t,e){return new Ei(t,e)}const Ai=t=>e=>e.test(t),Ti=[tt,ht,ct,ut,pt,dt,{test:t=>"auto"===t,parse:t=>t}],Si=t=>Ti.find(Ai(t)),Ci=[...Ti,rn,wn];function Vi(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,bi(n))}function Mi(t,e){const n=Ae(t,e);let{transitionEnd:i={},transition:s={},...o}=n?t.makeTargetAnimatable(n,!1):{};o={...o,...i};for(const e in o){Vi(t,e,(r=o[e],zt(r)?r[r.length-1]||0:r))}var r}function Ri(t,e){[...e].reverse().forEach(n=>{const i=t.getVariant(n);i&&Mi(t,i),t.variantChildren&&t.variantChildren.forEach(t=>{Ri(t,e)})})}function Di(t,e,n){var i,s;const o=Object.keys(e).filter(e=>!t.hasValue(e)),r=o.length;var a;if(r)for(let l=0;l<r;l++){const r=o[l],u=e[r];let c=null;Array.isArray(u)&&(c=u[0]),null===c&&(c=null!==(s=null!==(i=n[r])&&void 0!==i?i:t.readValue(r))&&void 0!==s?s:e[r]),null!=c&&("string"==typeof c&&(yi(c)||di(c))?c=parseFloat(c):(a=c,!Ci.find(Ai(a))&&wn.test(u)&&(c=hi(r,u))),t.addValue(r,bi(c,{owner:t})),void 0===n[r]&&(n[r]=c),null!==c&&t.setBaseTarget(r,c))}}function Li(t,e){if(!e)return;return(e[t]||e.default||e).from}function ki(t,e,n){const i={};for(const s in t){const t=Li(s,e);if(void 0!==t)i[s]=t;else{const t=n.getValue(s);t&&(i[s]=t.get())}}return i}function Bi({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function ji(t,e){const n=t.get();if(!Array.isArray(e))return n!==e;for(let t=0;t<e.length;t++)if(e[t]!==n)return!0}function Fi(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=t.makeTargetAnimatable(e);const l=t.getValue("willChange");i&&(o=i);const u=[],c=s&&t.animationState&&t.animationState.getState()[s];for(const e in a){const i=t.getValue(e),s=a[e];if(!i||void 0===s||c&&Bi(c,e))continue;const r={delay:n,elapsed:0,...mi(o||{},e)};if(window.HandoffAppearAnimations){const n=t.getProps()[p];if(n){const t=window.HandoffAppearAnimations(n,e,i,Gt);null!==t&&(r.elapsed=t,r.isHandoff=!0)}}let h=!r.isHandoff&&!ji(i,s);if("spring"===r.type&&(i.getVelocity()||r.velocity)&&(h=!1),i.animation&&(h=!1),h)continue;i.start(fi(e,i,s,t.shouldReduceMotion&&H.has(e)?{type:!1}:r));const d=i.animation;gi(l)&&(l.add(e),d.then(()=>l.remove(e))),u.push(d)}return r&&Promise.all(u).then(()=>{r&&Mi(t,r)}),u}function Oi(t,e,n={}){const i=Ae(t,e,n.custom);let{transition:s=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Promise.all(Fi(t,i,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:o=0,staggerChildren:r,staggerDirection:a}=s;return function(t,e,n=0,i=0,s=1,o){const r=[],a=(t.variantChildren.size-1)*i,l=1===s?(t=0)=>t*i:(t=0)=>a-t*i;return Array.from(t.variantChildren).sort(Ii).forEach((t,i)=>{t.notify("AnimationStart",e),r.push(Oi(t,e,{...o,delay:n+l(i)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(r)}(t,e,o+i,r,a,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[t,e]="beforeChildren"===a?[o,r]:[r,o];return t().then(()=>e())}return Promise.all([o(),r(n.delay)])}function Ii(t,e){return t.sortNodePosition(e)}function Ui(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const s=e.map(e=>Oi(t,e,n));i=Promise.all(s)}else if("string"==typeof e)i=Oi(t,e,n);else{const s="function"==typeof e?Ae(t,e,n.custom):e;i=Promise.all(Fi(t,s,n))}return i.then(()=>t.notify("AnimationComplete",e))}const Wi=[...b].reverse(),Ni=b.length;function zi(t){let e=function(t){return e=>Promise.all(e.map(({animation:e,options:n})=>Ui(t,e,n)))}(t);const n={animate:$i(!0),whileInView:$i(),whileHover:$i(),whileTap:$i(),whileDrag:$i(),whileFocus:$i(),exit:$i()};let i=!0;const s=(e,n)=>{const i=Ae(t,n);if(i){const{transition:t,transitionEnd:n,...s}=i;e={...e,...s,...n}}return e};function o(o,r){const a=t.getProps(),l=t.getVariantContext(!0)||{},u=[],c=new Set;let h={},d=1/0;for(let e=0;e<Ni;e++){const p=Wi[e],m=n[p],f=void 0!==a[p]?a[p]:l[p],g=w(f),y=p===r?m.isActive:null;!1===y&&(d=e);let v=f===l[p]&&f!==a[p]&&g;if(v&&i&&t.manuallyAnimateOnMount&&(v=!1),m.protectedKeys={...h},!m.isActive&&null===y||!f&&!m.prevProp||E(f)||"boolean"==typeof f)continue;let x=Hi(m.prevProp,f)||p===r&&m.isActive&&!v&&g||e>d&&g,P=!1;const b=Array.isArray(f)?f:[f];let A=b.reduce(s,{});!1===y&&(A={});const{prevResolvedValues:T={}}=m,S={...T,...A},C=t=>{x=!0,c.has(t)&&(P=!0,c.delete(t)),m.needsAnimating[t]=!0};for(const t in S){const e=A[t],n=T[t];if(h.hasOwnProperty(t))continue;let i=!1;i=zt(e)&&zt(n)?!be(e,n):e!==n,i?void 0!==e?C(t):c.add(t):void 0!==e&&c.has(t)?C(t):m.protectedKeys[t]=!0}m.prevProp=f,m.prevResolvedValues=A,m.isActive&&(h={...h,...A}),i&&t.blockInitialAnimation&&(x=!1),!x||v&&!P||u.push(...b.map(t=>({animation:t,options:{type:p,...o}})))}if(c.size){const e={};c.forEach(n=>{const i=t.getBaseTarget(n);void 0!==i&&(e[n]=i)}),u.push({animation:e})}let p=Boolean(u.length);return!i||!1!==a.initial&&a.initial!==a.animate||t.manuallyAnimateOnMount||(p=!1),i=!1,p?e(u):Promise.resolve()}return{animateChanges:o,setActive:function(e,i,s){var r;if(n[e].isActive===i)return Promise.resolve();null===(r=t.variantChildren)||void 0===r||r.forEach(t=>{var n;return null===(n=t.animationState)||void 0===n?void 0:n.setActive(e,i)}),n[e].isActive=i;const a=o(s,e);for(const t in n)n[t].protectedKeys={};return a},setAnimateFunction:function(n){e=n(t)},getState:()=>n}}function Hi(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!be(e,t)}function $i(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}let Yi=0;const Xi={animation:{Feature:class extends de{constructor(t){super(t),t.animationState||(t.animationState=zi(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),E(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){}}},exit:{Feature:class extends de{constructor(){super(...arguments),this.id=Yi++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e,custom:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const s=this.node.animationState.setActive("exit",!t,{custom:null!=n?n:this.node.getProps().custom});e&&!t&&s.then(()=>e(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}}},Gi=(t,e)=>Math.abs(t-e);function qi(t,e){const n=Gi(t.x,e.x),i=Gi(t.y,e.y);return Math.sqrt(n**2+i**2)}class Zi{constructor(t,e,{transformPagePoint:n,contextWindow:i,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const t=Ji(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=qi(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:i}=t,{timestamp:s}=Zt;this.history.push({...i,timestamp:s});const{onStart:o,onMove:r}=this.handlers;e||(o&&o(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),r&&r(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=Ki(e,this.transformPagePoint),Gt.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:n,onSessionEnd:i,resumeAnimation:s}=this.handlers;if(this.dragSnapToOrigin&&s&&s(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=Ji("pointercancel"===t.type?this.lastMoveEventInfo:Ki(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,o),i&&i(t,o)},!ee(t))return;this.dragSnapToOrigin=s,this.handlers=e,this.transformPagePoint=n,this.contextWindow=i||window;const o=Ki(ne(t),this.transformPagePoint),{point:r}=o,{timestamp:a}=Zt;this.history=[{...r,timestamp:a}];const{onSessionStart:l}=e;l&&l(t,Ji(o,this.history)),this.removeListeners=re(se(this.contextWindow,"pointermove",this.handlePointerMove),se(this.contextWindow,"pointerup",this.handlePointerUp),se(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),qt(this.updatePoint)}}function Ki(t,e){return e?{point:e(t.point)}:t}function _i(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Ji({point:t},e){return{point:t,delta:_i(t,ts(e)),offset:_i(t,Qi(e)),velocity:es(e,.1)}}function Qi(t){return t[0]}function ts(t){return t[t.length-1]}function es(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const s=ts(t);for(;n>=0&&(i=t[n],!(s.timestamp-i.timestamp>Ce(e)));)n--;if(!i)return{x:0,y:0};const o=Ve(s.timestamp-i.timestamp);if(0===o)return{x:0,y:0};const r={x:(s.x-i.x)/o,y:(s.y-i.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function ns(t){return t.max-t.min}function is(t,e=0,n=.01){return Math.abs(t-e)<=n}function ss(t,e,n,i=.5){t.origin=i,t.originPoint=an(e.min,e.max,t.origin),t.scale=ns(n)/ns(e),(is(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=an(n.min,n.max,t.origin)-t.originPoint,(is(t.translate)||isNaN(t.translate))&&(t.translate=0)}function os(t,e,n,i){ss(t.x,e.x,n.x,i?i.originX:void 0),ss(t.y,e.y,n.y,i?i.originY:void 0)}function rs(t,e,n){t.min=n.min+e.min,t.max=t.min+ns(e)}function as(t,e,n){t.min=e.min-n.min,t.max=t.min+ns(e)}function ls(t,e,n){as(t.x,e.x,n.x),as(t.y,e.y,n.y)}function us(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function cs(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,i]=[i,n]),{min:n,max:i}}const hs=.35;function ds(t,e,n){return{min:ps(t,e),max:ps(t,n)}}function ps(t,e){return"number"==typeof t?t:t[e]||0}const ms=()=>({x:{min:0,max:0},y:{min:0,max:0}});function fs(t){return[t("x"),t("y")]}function gs({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function ys(t){return void 0===t||1===t}function vs({scale:t,scaleX:e,scaleY:n}){return!ys(t)||!ys(e)||!ys(n)}function xs(t){return vs(t)||Ps(t)||t.z||t.rotate||t.rotateX||t.rotateY}function Ps(t){return ws(t.x)||ws(t.y)}function ws(t){return t&&"0%"!==t}function Es(t,e,n){return n+e*(t-n)}function bs(t,e,n,i,s){return void 0!==s&&(t=Es(t,s,i)),Es(t,n,i)+e}function As(t,e=0,n=1,i,s){t.min=bs(t.min,e,n,i,s),t.max=bs(t.max,e,n,i,s)}function Ts(t,{x:e,y:n}){As(t.x,e.translate,e.scale,e.originPoint),As(t.y,n.translate,n.scale,n.originPoint)}function Ss(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function Cs(t,e){t.min=t.min+e,t.max=t.max+e}function Vs(t,e,[n,i,s]){const o=void 0!==e[s]?e[s]:.5,r=an(t.min,t.max,o);As(t,e[n],e[i],r,e.scale)}const Ms=["x","scaleX","originX"],Rs=["y","scaleY","originY"];function Ds(t,e){Vs(t.x,e,Ms),Vs(t.y,e,Rs)}function Ls(t,e){return gs(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}(t.getBoundingClientRect(),e))}const ks=({current:t})=>t?t.ownerDocument.defaultView:null,Bs=new WeakMap;class js{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=t}start(t,{snapToCursor:e=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:i}=this.getProps();this.panSession=new Zi(t,{onSessionStart:t=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(ne(t,"page").point)},onStart:(t,e)=>{const{drag:n,dragPropagation:i,onDragStart:s}=this.getProps();if(n&&!i&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=ce(n),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),fs(t=>{let e=this.getAxisMotionValue(t).get()||0;if(ct.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const i=n.layout.layoutBox[t];if(i){e=ns(i)*(parseFloat(e)/100)}}}this.originPoint[t]=e}),s&&Gt.update(()=>s(t,e),!1,!0);const{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:s,onDrag:o}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:r}=e;if(i&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(r),void(null!==this.currentDirection&&s&&s(this.currentDirection));this.updateAxis("x",e.point,r),this.updateAxis("y",e.point,r),this.visualElement.render(),o&&o(t,e)},onSessionEnd:(t,e)=>this.stop(t,e),resumeAnimation:()=>fs(t=>{var e;return"paused"===this.getAnimationState(t)&&(null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.play())})},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:i,contextWindow:ks(this.visualElement)})}stop(t,e){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:i}=e;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&Gt.update(()=>s(t,e))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,n){const{drag:i}=this.getProps();if(!n||!Fs(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=function(t,{min:e,max:n},i){return void 0!==e&&t<e?t=i?an(e,t,i.min):Math.max(t,e):void 0!==n&&t>n&&(t=i?an(n,t,i.max):Math.min(t,n)),t}(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){var t;const{dragConstraints:e,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(t=this.visualElement.projection)||void 0===t?void 0:t.layout,s=this.constraints;e&&P(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!i)&&function(t,{top:e,left:n,bottom:i,right:s}){return{x:us(t.x,n,s),y:us(t.y,e,i)}}(i.layoutBox,e),this.elastic=function(t=hs){return!1===t?t=0:!0===t&&(t=hs),{x:ds(t,"left","right"),y:ds(t,"top","bottom")}}(n),s!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&fs(t=>{this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(i.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!P(t))return!1;const n=t.current;Se(null!==n);const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=function(t,e,n){const i=Ls(t,n),{scroll:s}=e;return s&&(Cs(i.x,s.offset.x),Cs(i.y,s.offset.y)),i}(n,i.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:cs(t.x,e.x),y:cs(t.y,e.y)}}(i.layout.layoutBox,s);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=gs(t))}return o}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},l=fs(r=>{if(!Fs(r,e,this.currentDirection))return;let l=a&&a[r]||{};o&&(l={min:0,max:0});const u=i?200:1e6,c=i?40:1e7,h={type:"inertia",velocity:n?t[r]:0,bounceStiffness:u,bounceDamping:c,timeConstant:750,restDelta:1,restSpeed:10,...s,...l};return this.startAxisValueAnimation(r,h)});return Promise.all(l).then(r)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return n.start(fi(t,n,0,e))}stopAnimation(){fs(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){fs(t=>{var e;return null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.pause()})}getAnimationState(t){var e;return null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.state}getAxisMotionValue(t){const e="_drag"+t.toUpperCase(),n=this.visualElement.getProps(),i=n[e];return i||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){fs(e=>{const{drag:n}=this.getProps();if(!Fs(e,n,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(e);if(i&&i.layout){const{min:n,max:o}=i.layout.layoutBox[e];s.set(t[e]-an(n,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!P(e)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};fs(t=>{const e=this.getAxisMotionValue(t);if(e){const n=e.get();i[t]=function(t,e){let n=.5;const i=ns(t),s=ns(e);return s>i?n=Cn(e.min,e.max-i,t.min):i>s&&(n=Cn(t.min,t.max-s,e.min)),Q(0,1,n)}({min:n,max:n},this.constraints[t])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),fs(e=>{if(!Fs(e,t,null))return;const n=this.getAxisMotionValue(e),{min:s,max:o}=this.constraints[e];n.set(an(s,o,i[e]))})}addListeners(){if(!this.visualElement.current)return;Bs.set(this.visualElement,this);const t=se(this.visualElement.current,"pointerdown",t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)}),e=()=>{const{dragConstraints:t}=this.getProps();P(t)&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,i=n.addEventListener("measure",e);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),e();const s=te(window,"resize",()=>this.scalePositionWithinConstraints()),o=n.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(fs(e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))}),this.visualElement.render())});return()=>{s(),t(),i(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=hs,dragMomentum:r=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:r}}}function Fs(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const Os=t=>(e,n)=>{t&&Gt.update(()=>t(e,n))};const Is=["TopLeft","TopRight","BottomLeft","BottomRight"],Us=Is.length,Ws=t=>"string"==typeof t?parseFloat(t):t,Ns=t=>"number"==typeof t||ht.test(t);function zs(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const Hs=Ys(0,.5,Ye),$s=Ys(.5,.95,Xt);function Ys(t,e,n){return i=>i<t?0:i>e?1:n(Cn(t,e,i))}function Xs(t,e){t.min=e.min,t.max=e.max}function Gs(t,e){Xs(t.x,e.x),Xs(t.y,e.y)}function qs(t,e,n,i,s){return t=Es(t-=e,1/n,i),void 0!==s&&(t=Es(t,1/s,i)),t}function Zs(t,e,[n,i,s],o,r){!function(t,e=0,n=1,i=.5,s,o=t,r=t){if(ct.test(e)){e=parseFloat(e);e=an(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=an(o.min,o.max,i);t===o&&(a-=e),t.min=qs(t.min,e,n,a,s),t.max=qs(t.max,e,n,a,s)}(t,e[n],e[i],e[s],e.scale,o,r)}const Ks=["x","scaleX","originX"],_s=["y","scaleY","originY"];function Js(t,e,n,i){Zs(t.x,e,Ks,n?n.x:void 0,i?i.x:void 0),Zs(t.y,e,_s,n?n.y:void 0,i?i.y:void 0)}function Qs(t){return 0===t.translate&&1===t.scale}function to(t){return Qs(t.x)&&Qs(t.y)}function eo(t,e){return Math.round(t.x.min)===Math.round(e.x.min)&&Math.round(t.x.max)===Math.round(e.x.max)&&Math.round(t.y.min)===Math.round(e.y.min)&&Math.round(t.y.max)===Math.round(e.y.max)}function no(t){return ns(t.x)/ns(t.y)}class io{constructor(){this.members=[]}add(t){vi(this.members,t),t.scheduleRender()}remove(t){if(xi(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){const e=this.members.findIndex(e=>t===e);if(0===e)return!1;let n;for(let t=e;t>=0;t--){const e=this.members[t];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,e&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;!1===i&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:e,resumingFrom:n}=t;e.onExitComplete&&e.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function so(t,e,n){let i="";const s=t.x.translate/e.x,o=t.y.translate/e.y;if((s||o)&&(i=`translate3d(${s}px, ${o}px, 0) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{rotate:t,rotateX:e,rotateY:s}=n;t&&(i+=`rotate(${t}deg) `),e&&(i+=`rotateX(${e}deg) `),s&&(i+=`rotateY(${s}deg) `)}const r=t.x.scale*e.x,a=t.y.scale*e.y;return 1===r&&1===a||(i+=`scale(${r}, ${a})`),i||"none"}const oo=(t,e)=>t.depth-e.depth;class ro{constructor(){this.children=[],this.isDirty=!1}add(t){vi(this.children,t),this.isDirty=!0}remove(t){xi(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(oo),this.isDirty=!1,this.children.forEach(t)}}const ao={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function lo(t,e){const n=Yn.now(),i=({timestamp:s})=>{const o=s-n;o>=e&&(qt(i),t(o-e))};return Gt.read(i,!0),()=>qt(i)}function uo(t,e,n){var i;if("string"==typeof t){let s=document;e&&(Se(Boolean(e.current)),s=e.current),n?(null!==(i=n[t])&&void 0!==i||(n[t]=s.querySelectorAll(t)),t=n[t]):t=s.querySelectorAll(t)}else t instanceof Element&&(t=[t]);return Array.from(t||[])}const co=new WeakMap;function ho(t,e){let n;const i=()=>{const{currentTime:i}=e,s=(null===i?0:i.value)/100;n!==s&&t(s),n=s};return Gt.update(i,!0),()=>qt(i)}const po=Kn(()=>void 0!==window.ScrollTimeline);class mo{constructor(t){this.animations=t.filter(Boolean)}then(t,e){return Promise.all(this.animations).then(t).catch(e)}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){const e=this.animations.map(e=>{if(!po()||!e.attachTimeline)return e.pause(),ho(t=>{e.time=e.duration*t},t);e.attachTimeline(t)});return()=>{e.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 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]())}play(){this.runAll("play")}pause(){this.runAll("pause")}stop(){this.runAll("stop")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function fo(t){return t instanceof SVGElement&&"svg"!==t.tagName}const go=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function yo(t,e,n=1){Se(n<=4);const[i,s]=function(t){const e=go.exec(t);if(!e)return[,];const[,n,i]=e;return[n,i]}(t);if(!i)return;const o=window.getComputedStyle(e).getPropertyValue(i);if(o){const t=o.trim();return yi(t)?parseFloat(t):t}return _(s)?yo(s,e,n+1):s}const vo=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),xo=t=>vo.has(t),Po=t=>t===tt||t===ht,wo=(t,e)=>parseFloat(t.split(", ")[e]),Eo=(t,e)=>(n,{transform:i})=>{if("none"===i||!i)return 0;const s=i.match(/^matrix3d\((.+)\)$/);if(s)return wo(s[1],e);{const e=i.match(/^matrix\((.+)\)$/);return e?wo(e[1],t):0}},bo=new Set(["x","y","z"]),Ao=z.filter(t=>!bo.has(t));const To={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:Eo(4,13),y:Eo(5,14)};To.translateX=To.x,To.translateY=To.y;const So=(t,e,n={},i={})=>{e={...e},i={...i};const s=Object.keys(e).filter(xo);let o=[],r=!1;const a=[];if(s.forEach(s=>{const l=t.getValue(s);if(!t.hasValue(s))return;let u=n[s],c=Si(u);const h=e[s];let d;if(zt(h)){const t=h.length,e=null===h[0]?1:0;u=h[e],c=Si(u);for(let n=e;n<t&&null!==h[n];n++)d?Se(Si(h[n])===d):(d=Si(h[n]),Se(d===c||Po(c)&&Po(d)))}else d=Si(h);if(c!==d)if(Po(c)&&Po(d)){const t=l.get();"string"==typeof t&&l.set(parseFloat(t)),"string"==typeof h?e[s]=parseFloat(h):Array.isArray(h)&&d===ht&&(e[s]=h.map(parseFloat))}else(null==c?void 0:c.transform)&&(null==d?void 0:d.transform)&&(0===u||0===h)?0===u?l.set(d.transform(u)):e[s]=c.transform(h):(r||(o=function(t){const e=[];return Ao.forEach(n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e.length&&t.render(),e}(t),r=!0),a.push(s),i[s]=void 0!==i[s]?i[s]:e[s],l.jump(h))}),a.length){const n=a.indexOf("height")>=0?window.pageYOffset:null,s=((t,e,n)=>{const i=e.measureViewportBox(),s=e.current,o=getComputedStyle(s),{display:r}=o,a={};"none"===r&&e.setStaticValue("display",t.display||"block"),n.forEach(t=>{a[t]=To[t](i,o)}),e.render();const l=e.measureViewportBox();return n.forEach(n=>{const i=e.getValue(n);i&&i.jump(a[n]),t[n]=To[n](l,o)}),t})(e,t,a);return o.length&&o.forEach(([e,n])=>{t.getValue(e).set(n)}),t.render(),u&&null!==n&&window.scrollTo({top:n}),{target:s,transitionEnd:i}}return{target:e,transitionEnd:i}};function Co(t,e,n,i){return(t=>Object.keys(t).some(xo))(e)?So(t,e,n,i):{target:e,transitionEnd:i}}const Vo=(t,e,n,i)=>{const s=function(t,{...e},n){const i=t.current;if(!(i instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.values.forEach(t=>{const e=t.get();if(!_(e))return;const n=yo(e,i);n&&t.set(n)});for(const t in e){const s=e[t];if(!_(s))continue;const o=yo(s,i);o&&(e[t]=o,n||(n={}),void 0===n[t]&&(n[t]=s))}return{target:e,transitionEnd:n}}(t,e,i);return Co(t,e=s.target,n,i=s.transitionEnd)},Mo={current:null},Ro={current:!1};function Do(){if(Ro.current=!0,u)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Mo.current=t.matches;t.addListener(e),e()}else Mo.current=!1}const Lo=Object.keys(R),ko=Lo.length,Bo=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],jo=A.length;class Fo{constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,visualState:s},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,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.scheduleRender=()=>Gt.render(this.render,!1,!0);const{latestValues:r,renderState:a}=s;this.latestValues=r,this.baseTarget={...r},this.initialValues=e.initial?{...r}:{},this.renderState=a,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=o,this.isControllingVariants=T(e),this.isVariantNode=S(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:l,...u}=this.scrapeMotionValuesFromProps(e,{});for(const t in u){const e=u[t];void 0!==r[t]&&Y(e)&&(e.set(r[t],!1),gi(l)&&l.add(t))}}scrapeMotionValuesFromProps(t,e){return{}}mount(t){this.current=t,co.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)),Ro.current||Do(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Mo.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){co.delete(this.current),this.projection&&this.projection.unmount(),qt(this.notifyUpdate),qt(this.render),this.valueSubscriptions.forEach(t=>t()),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)this.features[t].unmount();this.current=null}bindToMotionValue(t,e){const n=H.has(t),i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&Gt.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),s=e.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),s()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}loadFeatures({children:t,...e},n,i,s){let o,r;for(let t=0;t<ko;t++){const n=Lo[t],{isEnabled:i,Feature:s,ProjectionNode:a,MeasureLayout:l}=R[n];a&&(o=a),i(e)&&(!this.features[n]&&s&&(this.features[n]=new s(this)),l&&(r=l))}if(("html"===this.type||"svg"===this.type)&&!this.projection&&o){this.projection=new o(this.latestValues,this.parent&&this.parent.projection);const{layoutId:t,layout:n,drag:i,dragConstraints:r,layoutScroll:a,layoutRoot:l}=e;this.projection.setOptions({layoutId:t,layout:n,alwaysMeasureLayout:Boolean(i)||r&&P(r),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:s,layoutScroll:a,layoutRoot:l})}return r}updateFeatures(){for(const t in this.features){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,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}makeTargetAnimatable(t,e=!0){return this.makeTargetAnimatableFromInstance(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<Bo.length;e++){const n=Bo[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const i=t["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=function(t,e,n){const{willChange:i}=e;for(const s in e){const o=e[s],r=n[s];if(Y(o))t.addValue(s,o),gi(i)&&i.add(s);else if(Y(r))t.addValue(s,bi(o,{owner:t})),gi(i)&&i.remove(s);else if(r!==o)if(t.hasValue(s)){const e=t.getValue(s);!e.hasAnimated&&e.set(o)}else{const e=t.getStaticValue(s);t.addValue(s,bi(void 0!==e?e:o,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}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}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const t=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(t.initial=this.props.initial),t}const e={};for(let t=0;t<jo;t++){const n=A[t],i=this.props[n];(w(i)||!1===i)&&(e[n]=i)}return e}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){e!==this.values.get(t)&&(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=bi(e,{owner:this}),this.addValue(t,n)),n}readValue(t){var e;return void 0===this.latestValues[t]&&this.current?null!==(e=this.getBaseTargetFromProps(this.props,t))&&void 0!==e?e:this.readValueFromInstance(this.current,t,this.options):this.latestValues[t]}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props,i="string"==typeof n||"object"==typeof n?null===(e=Wt(this.props,n))||void 0===e?void 0:e[t]:void 0;if(n&&void 0!==i)return i;const s=this.getBaseTargetFromProps(this.props,t);return void 0===s||Y(s)?void 0!==this.initialValues[t]&&void 0===i?void 0:this.baseTarget[t]:s}on(t,e){return this.events[t]||(this.events[t]=new Pi),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class Oo extends Fo{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]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:e,...n},i){const s=ki(n,t||{},this);if(i){Di(this,n,s);const t=Vo(this,n,s,e);e=t.transitionEnd,n=t.target}return{transition:t,transitionEnd:e,...n}}}class Io extends Oo{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(H.has(e)){const t=ci(e);return t&&t.default||0}return e=Ft.has(e)?e:d(e),t.getAttribute(e)}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}scrapeMotionValuesFromProps(t,e){return Ut(t,e)}build(t,e,n,i){Rt(t,e,n,this.isSVGTag,i.transformTemplate)}renderInstance(t,e,n,i){Ot(t,e,0,i)}mount(t){this.isSVGTag=Lt(t.tagName),super.mount(t)}}class Uo extends Oo{constructor(){super(...arguments),this.type="html"}readValueFromInstance(t,e){if(H.has(e)){const t=ci(e);return t&&t.default||0}{const i=(n=t,window.getComputedStyle(n)),s=(K(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return Ls(t,e)}build(t,e,n,i){yt(t,e,n,i.transformTemplate)}scrapeMotionValuesFromProps(t,e){return It(t,e)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Y(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=""+t)}))}renderInstance(t,e,n,i){jt(t,e,n,i)}}function Wo(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=fo(t)?new Io(e,{enableHardwareAcceleration:!1}):new Uo(e,{enableHardwareAcceleration:!0});n.mount(t),co.set(t,n)}function No(t,e,n){const i=Y(t)?t:bi(t);return i.start(fi("",i,e,n)),i.animation}function zo(t,e=100){const n=Nn({keyframes:[0,e],...t}),i=Math.min(Gn(n),2e4);return{type:"keyframes",ease:t=>n.next(i*t).value/e,duration:Ve(i)}}function Ho(t,e,n,i){var s;return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:null!==(s=i.get(e))&&void 0!==s?s:t}const $o=(t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t};function Yo(t,e){return Ne(t)?t[$o(0,t.length,e)]:t}function Xo(t,e,n,i,s,o){!function(t,e,n){for(let i=0;i<t.length;i++){const s=t[i];s.at>e&&s.at<n&&(xi(t,s),i--)}}(t,s,o);for(let r=0;r<e.length;r++)t.push({value:e[r],at:an(s,o,i[r]),easing:Yo(n,r)})}function Go(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function qo(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function Zo(t,e){return e[t]||(e[t]=[]),e[t]}function Ko(t){return Array.isArray(t)?t:[t]}function _o(t,e){return t[e]?{...t,...t[e]}:{...t}}const Jo=t=>"number"==typeof t,Qo=t=>t.every(Jo);function tr(t,e,n,i){const s=uo(t,i),o=s.length;Se(Boolean(o));const r=[];for(let t=0;t<o;t++){const i=s[t];co.has(i)||Wo(i);const a=co.get(i),l={...n};"function"==typeof l.delay&&(l.delay=l.delay(t,o)),r.push(...Fi(a,{...e,transition:l},{}))}return new mo(r)}function er(t,e,n){const i=[];return function(t,{defaultTransition:e={},...n}={},i){const s=e.duration||.3,o=new Map,r=new Map,a={},l=new Map;let u=0,c=0,h=0;for(let n=0;n<t.length;n++){const o=t[n];if("string"==typeof o){l.set(o,c);continue}if(!Array.isArray(o)){l.set(o.name,Ho(c,o.at,u,l));continue}let[d,p,m={}]=o;void 0!==m.at&&(c=Ho(c,m.at,u,l));let f=0;const g=(t,n,i,o=0,r=0)=>{const a=Ko(t),{delay:l=0,times:u=Ln(a),type:d="keyframes",...p}=n;let{ease:m=e.ease||"easeOut",duration:g}=n;const y="function"==typeof l?l(o,r):l,v=a.length;if(v<=2&&"spring"===d){let t=100;if(2===v&&Qo(a)){const e=a[1]-a[0];t=Math.abs(e)}const e={...p};void 0!==g&&(e.duration=Ce(g));const n=zo(e,t);m=n.ease,g=n.duration}null!=g||(g=s);const x=c+y,P=x+g;1===u.length&&0===u[0]&&(u[1]=1);const w=u.length-a.length;w>0&&Dn(u,w),1===a.length&&a.unshift(null),Xo(i,a,m,u,x,P),f=Math.max(y+g,f),h=Math.max(P,h)};if(Y(d)){g(p,m,Zo("default",qo(d,r)))}else{const t=uo(d,i,a),e=t.length;for(let n=0;n<e;n++){p=p,m=m;const i=qo(t[n],r);for(const t in p)g(p[t],_o(m,t),Zo(t,i),n,e)}}u=c,c+=f}return r.forEach((t,i)=>{for(const s in t){const r=t[s];r.sort(Go);const a=[],l=[],u=[];for(let t=0;t<r.length;t++){const{at:e,value:n,easing:i}=r[t];a.push(n),l.push(Cn(0,h,e)),u.push(i||"easeOut")}0!==l[0]&&(l.unshift(0),a.unshift(a[0]),u.unshift("easeInOut")),1!==l[l.length-1]&&(l.push(1),a.push(null)),o.has(i)||o.set(i,{keyframes:{},transition:{}});const c=o.get(i);c.keyframes[s]=a,c.transition[s]={...e,duration:h,ease:u,times:l,...n}}}),o}(t,e,n).forEach(({keyframes:t,transition:e},n)=>{let s;s=Y(n)?No(n,t.default,e.default):tr(n,t,e),i.push(s)}),new mo(i)}const nr=t=>function(e,n,i){let s;var o;return o=e,s=Array.isArray(o)&&Array.isArray(o[0])?er(e,n,t):function(t){return"object"==typeof t&&!Array.isArray(t)}(n)?tr(e,n,i,t):No(e,n,i),t&&t.animations.push(s),s},ir=nr(),sr=new WeakMap;let or;function rr({target:t,contentRect:e,borderBoxSize:n}){var i;null===(i=sr.get(t))||void 0===i||i.forEach(i=>{i({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 ar(t){t.forEach(rr)}function lr(t,e){or||"undefined"!=typeof ResizeObserver&&(or=new ResizeObserver(ar));const n=uo(t);return n.forEach(t=>{let n=sr.get(t);n||(n=new Set,sr.set(t,n)),n.add(e),null==or||or.observe(t)}),()=>{n.forEach(t=>{const n=sr.get(t);null==n||n.delete(e),(null==n?void 0:n.size)||null==or||or.unobserve(t)})}}const ur=new Set;let cr;function hr(t){return ur.add(t),cr||(cr=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};ur.forEach(t=>t(e))},window.addEventListener("resize",cr)),()=>{ur.delete(t),!ur.size&&cr&&(cr=void 0)}}const dr={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function pr(t,e,n,i){const s=n[e],{length:o,position:r}=dr[e],a=s.current,l=n.time;s.current=t["scroll"+r],s.scrollLength=t["scroll"+o]-t["client"+o],s.offset.length=0,s.offset[0]=0,s.offset[1]=s.scrollLength,s.progress=Cn(0,s.scrollLength,s.current);const u=i-l;s.velocity=u>50?0:Bn(s.current-a,u)}const mr={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},fr={start:0,center:.5,end:1};function gr(t,e,n=0){let i=0;if(void 0!==fr[t]&&(t=fr[t]),"string"==typeof t){const e=parseFloat(t);t.endsWith("px")?i=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?i=e/100*document.documentElement.clientWidth:t.endsWith("vh")?i=e/100*document.documentElement.clientHeight:t=e}return"number"==typeof t&&(i=e*t),n+i}const yr=[0,0];function vr(t,e,n,i){let s=Array.isArray(t)?t:yr,o=0,r=0;return"number"==typeof t?s=[t,t]:"string"==typeof t&&(s=(t=t.trim()).includes(" ")?t.split(" "):[t,fr[t]?t:"0"]),o=gr(s[0],n,i),r=gr(s[1],e),o-r}const xr={x:0,y:0};function Pr(t,e,n){let{offset:i=mr.All}=n;const{target:s=t,axis:o="y"}=n,r="y"===o?"height":"width",a=s!==t?function(t,e){const n={x:0,y:0};let i=t;for(;i&&i!==e;)if(i instanceof HTMLElement)n.x+=i.offsetLeft,n.y+=i.offsetTop,i=i.offsetParent;else if("svg"===i.tagName){const t=i.getBoundingClientRect();i=i.parentElement;const e=i.getBoundingClientRect();n.x+=t.left-e.left,n.y+=t.top-e.top}else{if(!(i instanceof SVGGraphicsElement))break;{const{x:t,y:e}=i.getBBox();n.x+=t,n.y+=e;let s=null,o=i.parentNode;for(;!s;)"svg"===o.tagName&&(s=o),o=i.parentNode;i=s}}return n}(s,t):xr,l=s===t?{width:t.scrollWidth,height:t.scrollHeight}:function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(s),u={width:t.clientWidth,height:t.clientHeight};e[o].offset.length=0;let c=!e[o].interpolate;const h=i.length;for(let t=0;t<h;t++){const n=vr(i[t],u[r],l[r],a[o]);c||n===e[o].interpolatorOffsets[t]||(c=!0),e[o].offset[t]=n}c&&(e[o].interpolate=Rn(e[o].offset,Ln(i)),e[o].interpolatorOffsets=[...e[o].offset]),e[o].progress=e[o].interpolate(e[o].current)}function wr(t,e,n,i={}){return{measure:()=>function(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let i=e;for(;i&&i!==t;)n.x.targetOffset+=i.offsetLeft,n.y.targetOffset+=i.offsetTop,i=i.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,i.target,n),update:e=>{!function(t,e,n){pr(t,"x",e,n),pr(t,"y",e,n),e.time=n}(t,n,e),(i.offset||i.target)&&Pr(t,n,i)},notify:()=>e(n)}}const Er=new WeakMap,br=new WeakMap,Ar=new WeakMap,Tr=t=>t===document.documentElement?window:t;function Sr(t,{container:e=document.documentElement,...n}={}){let i=Ar.get(e);i||(i=new Set,Ar.set(e,i));const s=wr(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(i.add(s),!Er.has(e)){const t=()=>{for(const t of i)t.measure()},n=()=>{for(const t of i)t.update(Zt.timestamp)},s=()=>{for(const t of i)t.notify()},a=()=>{Gt.read(t,!1,!0),Gt.read(n,!1,!0),Gt.update(s,!1,!0)};Er.set(e,a);const l=Tr(e);window.addEventListener("resize",a,{passive:!0}),e!==document.documentElement&&br.set(e,(r=a,"function"==typeof(o=e)?hr(o):lr(o,r))),l.addEventListener("scroll",a,{passive:!0})}var o,r;const a=Er.get(e);return Gt.read(a,!1,!0),()=>{var t;qt(a);const n=Ar.get(e);if(!n)return;if(n.delete(s),n.size)return;const i=Er.get(e);Er.delete(e),i&&(Tr(e).removeEventListener("scroll",i),null===(t=br.get(e))||void 0===t||t(),window.removeEventListener("resize",i))}}const Cr=new Map;function Vr({source:t=document.documentElement,axis:e="y"}={}){Cr.has(t)||Cr.set(t,{});const n=Cr.get(t);return n[e]||(n[e]=po()?new ScrollTimeline({source:t,axis:e}):function({source:t,axis:e="y"}){const n={value:0},i=Sr(t=>{n.value=100*t[e].progress},{container:t,axis:e});return{currentTime:n,cancel:i}}({source:t,axis:e})),n[e]}const Mr={some:0,all:1};function Rr(t,e,{root:n,margin:i,amount:s="some"}={}){const o=uo(t),r=new WeakMap,a=new IntersectionObserver(t=>{t.forEach(t=>{const n=r.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){const n=e(t);"function"==typeof n?r.set(t.target,n):a.unobserve(t.target)}else n&&(n(t),r.delete(t.target))})},{root:n,rootMargin:i,threshold:"number"==typeof s?s:Mr[s]});return o.forEach(t=>a.observe(t)),()=>a.disconnect()}function Dr(...t){const e=!Array.isArray(t[0]),n=e?0:-1,i=t[0+n],s=t[1+n],o=t[2+n],r=t[3+n],a=Rn(s,o,{mixer:(l=o[0],(t=>t&&"object"==typeof t&&t.mix)(l)?l.mix:void 0),...r});var l;return e?a(i):a}const Lr=Gt,kr=g.reduce((t,e)=>(t[e]=t=>qt(t),t),{}),Br=["","X","Y","Z"],jr={visibility:"hidden"};let Fr=0;const Or={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function Ir({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(t={},n=(null==e?void 0:e())){this.id=Fr++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{var t;this.projectionUpdateScheduled=!1,Or.totalNodes=Or.resolvedTargetDeltas=Or.recalculatedProjection=0,this.nodes.forEach(Nr),this.nodes.forEach(qr),this.nodes.forEach(Zr),this.nodes.forEach(zr),t=Or,window.MotionDebug&&window.MotionDebug.record(t)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new ro)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new Pi),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e,n=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=fo(e),this.instance=e;const{layoutId:i,layout:s,visualElement:o}=this.options;if(o&&!o.current&&o.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(s||i)&&(this.isLayoutDirty=!0),t){let n;const i=()=>this.root.updateBlockedByResize=!1;t(e,()=>{this.root.updateBlockedByResize=!0,n&&n(),n=lo(i,250),ao.hasAnimatedSinceResize&&(ao.hasAnimatedSinceResize=!1,this.nodes.forEach(Gr))})}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&o&&(i||s)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeTargetChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const s=this.options.transition||o.getDefaultTransition()||ea,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=o.getProps(),l=!this.targetLayout||!eo(this.targetLayout,i)||n,u=!e&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||u||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(t,u);const e={...mi(s,"layout"),onPlay:r,onComplete:a};(o.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e)}else e||Gr(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,qt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Kr),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach($r);this.isUpdating||this.nodes.forEach(Yr),this.isUpdating=!1,this.nodes.forEach(Xr),this.nodes.forEach(Ur),this.nodes.forEach(Wr),this.clearAllSnapshots();const t=Yn.now();Zt.delta=Q(0,1e3/60,t-Zt.timestamp),Zt.timestamp=t,Zt.isProcessing=!0,Kt.update.process(Zt),Kt.preRender.process(Zt),Kt.render.process(Zt),Zt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,v.read(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach(Hr),this.sharedNodes.forEach(_r)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Gt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Gt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++){this.path[t].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=Boolean(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&(this.scroll={animationId:this.root.animationId,phase:t,isRoot:i(this.instance),offset:n(this.instance)})}resetTransform(){if(!s)return;const t=this.isLayoutDirty||this.shouldResetTransform,e=this.projectionDelta&&!to(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,o=i!==this.prevTransformTemplateValue;t&&(e||xs(this.latestValues)||o)&&(s(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);var i;return t&&(n=this.removeTransform(n)),sa((i=n).x),sa(i.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const e=t.measureViewportBox(),{scroll:n}=this.root;return n&&(Cs(e.x,n.offset.x),Cs(e.y,n.offset.y)),e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};Gs(e,t);for(let n=0;n<this.path.length;n++){const i=this.path[n],{scroll:s,options:o}=i;if(i!==this.root&&s&&o.layoutScroll){if(s.isRoot){Gs(e,t);const{scroll:n}=this.root;n&&(Cs(e.x,-n.offset.x),Cs(e.y,-n.offset.y))}Cs(e.x,s.offset.x),Cs(e.y,s.offset.y)}}return e}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};Gs(n,t);for(let t=0;t<this.path.length;t++){const i=this.path[t];!e&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Ds(n,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),xs(i.latestValues)&&Ds(n,i.latestValues)}return xs(this.latestValues)&&Ds(n,this.latestValues),n}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};Gs(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!n.instance)continue;if(!xs(n.latestValues))continue;vs(n.latestValues)&&n.updateSnapshot();const i={x:{min:0,max:0},y:{min:0,max:0}};Gs(i,n.measurePageBox()),Js(e,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,i)}return xs(this.latestValues)&&Js(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Zt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){var e;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const i=Boolean(this.resumingFrom)||this!==n;if(!(t||i&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty)||this.attemptToResolveRelativeTarget))return;const{layout:s,layoutId:o}=this.options;if(this.layout&&(s||o)){if(this.resolvedRelativeTargetAt=Zt.timestamp,!this.targetDelta&&!this.relativeTarget){const t=this.getClosestProjectingParent();t&&t.layout&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},ls(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),Gs(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var r,a,l;if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),r=this.target,a=this.relativeTarget,l=this.relativeParent.target,rs(r.x,a.x,l.x),rs(r.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Gs(this.target,this.layout.layoutBox),Ts(this.target,this.targetDelta)):Gs(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const t=this.getClosestProjectingParent();t&&Boolean(t.resumingFrom)===Boolean(this.resumingFrom)&&!t.options.layoutScroll&&t.target&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},ls(this.relativeTargetOrigin,this.target,t.target),Gs(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Or.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!vs(this.parent.latestValues)&&!Ps(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var t;const e=this.getLead(),n=Boolean(this.resumingFrom)||this!==e;let i=!0;if((this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty))&&(i=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(i=!1),this.resolvedRelativeTargetAt===Zt.timestamp&&(i=!1),i)return;const{layout:s,layoutId:o}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!s&&!o)return;Gs(this.layoutCorrected,this.layout.layoutBox);const r=this.treeScale.x,a=this.treeScale.y;!function(t,e,n,i=!1){const s=n.length;if(!s)return;let o,r;e.x=e.y=1;for(let a=0;a<s;a++){o=n[a],r=o.projectionDelta;const s=o.instance;s&&s.style&&"contents"===s.style.display||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Ds(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Ts(t,r)),i&&xs(o.latestValues)&&Ds(t,o.latestValues))}e.x=Ss(e.x),e.y=Ss(e.y)}(this.layoutCorrected,this.treeScale,this.path,n),!e.layout||e.target||1===this.treeScale.x&&1===this.treeScale.y||(e.target=e.layout.layoutBox,e.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:l}=e;if(!l)return void(this.projectionTransform&&(this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionTransform="none",this.scheduleRender()));this.projectionDelta||(this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}});const u=this.projectionTransform;os(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.projectionTransform=so(this.projectionDelta,this.treeScale),this.projectionTransform===u&&this.treeScale.x===r&&this.treeScale.y===a||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),Or.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(t,e=!1){const n=this.snapshot,i=n?n.latestValues:{},s={...this.latestValues},o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const r={x:{min:0,max:0},y:{min:0,max:0}},a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,c=Boolean(a&&!u&&!0===this.options.crossfade&&!this.path.some(ta));let h;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var l,d,p,m,f,g;Jr(o.x,t.x,n),Jr(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ls(r,this.layout.layoutBox,this.relativeParent.layout.layoutBox),p=this.relativeTarget,m=this.relativeTargetOrigin,f=r,g=n,Qr(p.x,m.x,f.x,g),Qr(p.y,m.y,f.y,g),h&&(l=this.relativeTarget,d=h,l.x.min===d.x.min&&l.x.max===d.x.max&&l.y.min===d.y.min&&l.y.max===d.y.max)&&(this.isProjectionDirty=!1),h||(h={x:{min:0,max:0},y:{min:0,max:0}}),Gs(h,this.relativeTarget)),a&&(this.animationValues=s,function(t,e,n,i,s,o){s?(t.opacity=an(0,void 0!==n.opacity?n.opacity:1,Hs(i)),t.opacityExit=an(void 0!==e.opacity?e.opacity:1,0,$s(i))):o&&(t.opacity=an(void 0!==e.opacity?e.opacity:1,void 0!==n.opacity?n.opacity:1,i));for(let s=0;s<Us;s++){const o=`border${Is[s]}Radius`;let r=zs(e,o),a=zs(n,o);if(void 0===r&&void 0===a)continue;r||(r=0),a||(a=0);0===r||0===a||Ns(r)===Ns(a)?(t[o]=Math.max(an(Ws(r),Ws(a),i),0),(ct.test(a)||ct.test(r))&&(t[o]+="%")):t[o]=a}(e.rotate||n.rotate)&&(t.rotate=an(e.rotate||0,n.rotate||0,i))}(s,i,this.latestValues,n,c,u)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(qt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Gt.update(()=>{ao.hasAnimatedSinceResize=!0,this.currentAnimation=No(0,1e3,{...t,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onComplete:()=>{t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:i,latestValues:s}=t;if(e&&n&&i){if(this!==t&&this.layout&&i&&oa(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=ns(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=ns(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}Gs(e,n),Ds(e,s),os(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new io);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){var t;const{layoutId:e}=this.options;return e&&(null===(t=this.getStack())||void 0===t?void 0:t.lead)||this}getPrevLead(){var t;const{layoutId:e}=this.options;return e?null===(t=this.getStack())||void 0===t?void 0:t.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.rotate||n.rotateX||n.rotateY||n.rotateZ)&&(e=!0),!e)return;const i={};for(let e=0;e<Br.length;e++){const s="rotate"+Br[e];n[s]&&(i[s]=n[s],t.setStaticValue(s,0))}t.render();for(const e in i)t.setStaticValue(e,i[e]);t.scheduleRender()}getProjectionStyles(t){var e,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return jr;const i={visibility:""},s=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,i.opacity="",i.pointerEvents=Ht(null==t?void 0:t.pointerEvents)||"",i.transform=s?s(this.latestValues,""):"none",i;const o=this.getLead();if(!this.projectionDelta||!this.layout||!o.target){const e={};return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=Ht(null==t?void 0:t.pointerEvents)||""),this.hasProjected&&!xs(this.latestValues)&&(e.transform=s?s({},""):"none",this.hasProjected=!1),e}const r=o.animationValues||o.latestValues;this.applyTransformsToTarget(),i.transform=so(this.projectionDeltaWithTransform,this.treeScale,r),s&&(i.transform=s(r,i.transform));const{x:a,y:l}=this.projectionDelta;i.transformOrigin=`${100*a.origin}% ${100*l.origin}% 0`,o.animationValues?i.opacity=o===this?null!==(n=null!==(e=r.opacity)&&void 0!==e?e:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:r.opacityExit:i.opacity=o===this?void 0!==r.opacity?r.opacity:"":void 0!==r.opacityExit?r.opacityExit:0;for(const t in W){if(void 0===r[t])continue;const{correct:e,applyTo:n}=W[t],s="none"===i.transform?r[t]:e(r[t],o);if(n){const t=n.length;for(let e=0;e<t;e++)i[n[e]]=s}else i[t]=s}return this.options.layoutId&&(i.pointerEvents=o===this?Ht(null==t?void 0:t.pointerEvents)||"":"none"),i}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>{var e;return null===(e=t.currentAnimation)||void 0===e?void 0:e.stop()}),this.root.nodes.forEach($r),this.root.sharedNodes.clear()}}}function Ur(t){t.updateLayout()}function Wr(t){var e;const n=(null===(e=t.resumeFrom)||void 0===e?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:e,measuredBox:i}=t.layout,{animationType:s}=t.options,o=n.source!==t.layout.source;"size"===s?fs(t=>{const i=o?n.measuredBox[t]:n.layoutBox[t],s=ns(i);i.min=e[t].min,i.max=i.min+s}):oa(s,n.layoutBox,e)&&fs(i=>{const s=o?n.measuredBox[i]:n.layoutBox[i],r=ns(e[i]);s.max=s.min+r,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[i].max=t.relativeTarget[i].min+r)});const r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};os(r,e,n.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?os(a,t.applyTransform(i,!0),n.measuredBox):os(a,e,n.layoutBox);const l=!to(r);let u=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:s,layout:o}=i;if(s&&o){const r={x:{min:0,max:0},y:{min:0,max:0}};ls(r,n.layoutBox,s.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};ls(a,e,o.layoutBox),eo(r,a)||(u=!0),i.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=r,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:e,snapshot:n,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeTargetChanged:u})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function Nr(t){Or.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function zr(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Hr(t){t.clearSnapshot()}function $r(t){t.clearMeasurements()}function Yr(t){t.isLayoutDirty=!1}function Xr(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Gr(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function qr(t){t.resolveTargetDelta()}function Zr(t){t.calcProjection()}function Kr(t){t.resetRotation()}function _r(t){t.removeLeadSnapshot()}function Jr(t,e,n){t.translate=an(e.translate,0,n),t.scale=an(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Qr(t,e,n,i){t.min=an(e.min,n.min,i),t.max=an(e.max,n.max,i)}function ta(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const ea={duration:.45,ease:[.4,0,.1,1]},na=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),ia=na("applewebkit/")&&!na("chrome/")?Math.round:Xt;function sa(t){t.min=ia(t.min),t.max=ia(t.max)}function oa(t,e,n){return"position"===t||"preserve-aspect"===t&&!is(no(e),no(n),.2)}const ra=Ir({attachResizeListener:(t,e)=>te(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),aa={current:void 0},la=Ir({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!aa.current){const t=new ra({});t.mount(window),t.setOptions({layoutScroll:!0}),aa.current=t}return aa.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),ua=t=>!t.isLayoutDirty&&t.willUpdate(!1);function ca(){const t=new Set,e=new WeakMap,n=()=>t.forEach(ua);return{add:i=>{t.add(i),e.set(i,i.addEventListener("willUpdate",n))},remove:i=>{t.delete(i);const s=e.get(i);s&&(s(),e.delete(i)),n()},dirty:n}}function ha(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const da={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!ht.test(t))return t;t=parseFloat(t)}return`${ha(t,e.target.x)}% ${ha(t,e.target.y)}%`}},pa={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=wn.parse(t);if(s.length>5)return i;const o=wn.createTransformer(t),r="number"!=typeof s[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;s[0+r]/=a,s[1+r]/=l;const u=an(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=u),"number"==typeof s[3+r]&&(s[3+r]/=u),o(s)}};function ma(){const t=e.useContext(l);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:i,register:s}=t,o=e.useId();e.useEffect(()=>s(o),[]);return!n&&i?[!1,()=>i&&i(o)]:[!0]}class fa extends o.default.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:i}=this.props,{projection:s}=t;N(ya),s&&(e.group&&e.group.add(s),n&&n.register&&i&&n.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),ao.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:i,isPresent:s}=this.props,o=n.projection;return o?(o.isPresent=s,i||t.layoutDependency!==e||void 0===e?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||Gt.postRender(()=>{const t=o.getStack();t&&t.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),v.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function ga(t){const[n,i]=ma(),s=e.useContext(L);return o.default.createElement(fa,{...t,layoutGroup:s,switchLayoutGroup:e.useContext(k),isPresent:n,safeToRemove:i})}const ya={borderRadius:{...da,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:da,borderTopRightRadius:da,borderBottomLeftRadius:da,borderBottomRightRadius:da,boxShadow:pa},va={pan:{Feature:class extends de{constructor(){super(...arguments),this.removePointerDownListener=Xt}onPointerDown(t){this.session=new Zi(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ks(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:Os(t),onStart:Os(e),onMove:n,onEnd:(t,e)=>{delete this.session,i&&Gt.update(()=>i(t,e))}}}mount(){this.removePointerDownListener=se(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends de{constructor(t){super(t),this.removeGroupControls=Xt,this.removeListeners=Xt,this.controls=new js(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Xt}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:la,MeasureLayout:ga}},xa=(t,e)=>U(t)?new Io(e,{enableHardwareAcceleration:!1}):new Uo(e,{enableHardwareAcceleration:!0}),Pa={layout:{ProjectionNode:la,MeasureLayout:ga}},wa={...Xi,...Ee,...va,...Pa},Ea=O((t,e)=>Qt(t,e,wa,xa));const ba=O(Qt);function Aa(){const t=e.useRef(!1);return c(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function Ta(){const t=Aa(),[n,i]=e.useState(0),s=e.useCallback(()=>{t.current&&i(n+1)},[n]);return[e.useCallback(()=>Gt.postRender(s),[s]),n]}class Sa extends s.Component{getSnapshotBeforeUpdate(t){const e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent){const t=this.props.sizeRef.current;t.height=e.offsetHeight||0,t.width=e.offsetWidth||0,t.top=e.offsetTop,t.left=e.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Ca({children:t,isPresent:n}){const i=e.useId(),o=e.useRef(null),r=e.useRef({width:0,height:0,top:0,left:0});return e.useInsertionEffect(()=>{const{width:t,height:e,top:s,left:a}=r.current;if(n||!o.current||!t||!e)return;o.current.dataset.motionPopId=i;const l=document.createElement("style");return document.head.appendChild(l),l.sheet&&l.sheet.insertRule(`\n [data-motion-pop-id="${i}"] {\n position: absolute !important;\n width: ${t}px !important;\n height: ${e}px !important;\n top: ${s}px !important;\n left: ${a}px !important;\n }\n `),()=>{document.head.removeChild(l)}},[n]),s.createElement(Sa,{isPresent:n,childRef:o,sizeRef:r},s.cloneElement(t,{ref:o}))}const Va=({children:t,initial:n,isPresent:i,onExitComplete:o,custom:r,presenceAffectsLayout:a,mode:u})=>{const c=Nt(Ma),h=e.useId(),d=e.useMemo(()=>({id:h,initial:n,isPresent:i,custom:r,onExitComplete:t=>{c.set(t,!0);for(const t of c.values())if(!t)return;o&&o()},register:t=>(c.set(t,!1),()=>c.delete(t))}),a?void 0:[i]);return e.useMemo(()=>{c.forEach((t,e)=>c.set(e,!1))},[i]),s.useEffect(()=>{!i&&!c.size&&o&&o()},[i]),"popLayout"===u&&(t=s.createElement(Ca,{isPresent:i},t)),s.createElement(l.Provider,{value:d},t)};function Ma(){return new Map}function Ra(t){return e.useEffect(()=>()=>t(),[])}const Da=t=>t.key||"";function La(t){return"function"==typeof t}const ka=e.createContext(null),Ba=t=>!0===t,ja=({children:t,id:n,inherit:i=!0})=>{const o=e.useContext(L),r=e.useContext(ka),[a,l]=Ta(),u=e.useRef(null),c=o.id||r;null===u.current&&((t=>Ba(!0===t)||"id"===t)(i)&&c&&(n=n?c+"-"+n:c),u.current={id:n,group:Ba(i)&&o.group||ca()});const h=e.useMemo(()=>({...u.current,forceRender:a}),[l]);return s.createElement(L.Provider,{value:h},t)},Fa=e.createContext(null);function Oa(t){return t.value}function Ia(t,e){return t.layout.min-e.layout.min}function Ua(t){const n=Nt(()=>bi(t)),{isStatic:i}=e.useContext(r);if(i){const[,i]=e.useState(t);e.useEffect(()=>n.on("change",i),[])}return n}function Wa(t,e){const n=Ua(e()),i=()=>n.set(e());return i(),c(()=>{const e=()=>Gt.update(i,!1,!0),n=t.map(t=>t.on("change",e));return()=>{n.forEach(t=>t()),qt(i)}}),n}function Na(t,e,n,i){if("function"==typeof t)return function(t){wi.current=[],t();const e=Wa(wi.current,t);return wi.current=void 0,e}(t);const s="function"==typeof e?e:Dr(e,n,i);return Array.isArray(t)?za(t,s):za([t],([t])=>s(t))}function za(t,e){const n=Nt(()=>[]);return Wa(t,()=>{n.length=0;const i=t.length;for(let e=0;e<i;e++)n[e]=t[e].get();return e(n)})}function Ha(t,e=0){return Y(t)?t:Ua(e)}const $a={Group:e.forwardRef((function({children:t,as:n="ul",axis:i="y",onReorder:o,values:r,...a},l){const u=Nt(()=>Ea(n)),c=[],h=e.useRef(!1);Se(Boolean(r));const d={axis:i,registerItem:(t,e)=>{const n=c.findIndex(e=>t===e.value);-1!==n?c[n].layout=e[i]:c.push({value:t,layout:e[i]}),c.sort(Ia)},updateOrder:(t,e,n)=>{if(h.current)return;const i=function(t,e,n,i){if(!i)return t;const s=t.findIndex(t=>t.value===e);if(-1===s)return t;const o=i>0?1:-1,r=t[s+o];if(!r)return t;const a=t[s],l=r.layout,u=an(l.min,l.max,.5);return 1===o&&a.layout.max+n>u||-1===o&&a.layout.min+n<u?function([...t],e,n){const i=e<0?t.length+e:e;if(i>=0&&i<t.length){const i=n<0?t.length+n:n,[s]=t.splice(e,1);t.splice(i,0,s)}return t}(t,s,s+o):t}(c,t,e,n);c!==i&&(h.current=!0,o(i.map(Oa).filter(t=>-1!==r.indexOf(t))))}};return e.useEffect(()=>{h.current=!1}),s.createElement(u,{...a,ref:l,ignoreStrict:!0},s.createElement(Fa.Provider,{value:d},t))})),Item:e.forwardRef((function({children:t,style:n={},value:i,as:o="li",onDrag:r,layout:a=!0,...l},u){const c=Nt(()=>Ea(o)),h=e.useContext(Fa),d={x:Ha(n.x),y:Ha(n.y)},p=Na([d.x,d.y],([t,e])=>t||e?1:"unset");Se(Boolean(h));const{axis:m,registerItem:f,updateOrder:g}=h;return s.createElement(c,{drag:m,...l,dragSnapToOrigin:!0,style:{...n,x:d.x,y:d.y,zIndex:p},layout:a,onDrag:(t,e)=>{const{velocity:n}=e;n[m]&&g(i,d[m].get(),n[m]),r&&r(t,e)},onLayoutMeasure:t=>f(i,t),ref:u,ignoreStrict:!0},t)}))},Ya={renderer:xa,...Xi,...Ee},Xa={...Ya,...va,...Pa};function Ga(t,n,i){e.useInsertionEffect(()=>t.on(n,i),[t,n,i])}function qa(t,e){Te(Boolean(!e||e.current))}const Za=()=>({scrollX:bi(0),scrollY:bi(0),scrollXProgress:bi(0),scrollYProgress:bi(0)});function Ka({container:t,target:n,layoutEffect:i=!0,...s}={}){const o=Nt(Za);return(i?c:e.useEffect)(()=>(qa(0,n),qa(0,t),Sr(({x:t,y:e})=>{o.scrollX.set(t.current),o.scrollXProgress.set(t.progress),o.scrollY.set(e.current),o.scrollYProgress.set(e.progress)},{...s,container:(null==t?void 0:t.current)||void 0,target:(null==n?void 0:n.current)||void 0})),[t,n,JSON.stringify(s.offset)]),o}function _a(t){const n=e.useRef(0),{isStatic:i}=e.useContext(r);e.useEffect(()=>{if(i)return;const e=({timestamp:e,delta:i})=>{n.current||(n.current=e),t(e-n.current,i)};return Gt.update(e,!0),()=>qt(e)},[t])}class Ja extends Ei{constructor(){super(...arguments),this.members=[],this.transforms=new Set}add(t){let e;H.has(t)?(this.transforms.add(t),e="transform"):t.startsWith("origin")||K(t)||"willChange"===t||(e=d(t)),e&&(vi(this.members,e),this.update())}remove(t){H.has(t)?(this.transforms.delete(t),this.transforms.size||xi(this.members,"transform")):xi(this.members,d(t)),this.update()}update(){this.set(this.members.length?this.members.join(", "):"auto")}}function Qa(){!Ro.current&&Do();const[t]=e.useState(Mo.current);return t}function tl(){let t=!1;const e=new Set,n={subscribe:t=>(e.add(t),()=>{e.delete(t)}),start(n,i){Se(t);const s=[];return e.forEach(t=>{s.push(Ui(t,n,{transitionOverride:i}))}),Promise.all(s)},set:n=>(Se(t),e.forEach(t=>{!function(t,e){Array.isArray(e)?Ri(t,e):"string"==typeof e?Ri(t,[e]):Mi(t,e)}(t,n)})),stop(){e.forEach(t=>{!function(t){t.values.forEach(t=>t.stop())}(t)})},mount:()=>(t=!0,()=>{t=!1,n.stop()})};return n}function el(){const t=Nt(tl);return c(t.mount,[]),t}const nl=el;class il{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,e){this.componentControls.forEach(n=>{n.start(t.nativeEvent||t,e)})}}const sl=()=>new il;function ol(t){return null!==t&&"object"==typeof t&&B in t}function rl(){return al}function al(t){aa.current&&(aa.current.isUpdating=!1,aa.current.blockUpdate(),t&&t())}const ll=(t,e)=>`${t}: ${e}`,ul=new Map;let cl,hl,dl;function pl(t,e,n,i){const s=H.has(e)?"transform":e,o=ll(t,s),r=ul.get(o);if(!r)return null;const{animation:a,startTime:l}=r;return null===l||window.HandoffComplete?((()=>{ul.delete(o);try{a.cancel()}catch(t){}})(),null):(void 0===cl&&(cl=performance.now()),cl-l||0)}const ml=()=>({});class fl extends Fo{build(){}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}resetTransform(){}restoreTransform(){}removeValueFromRenderState(){}renderInstance(){}scrapeMotionValuesFromProps(){return{}}getBaseTargetFromProps(){}readValueFromInstance(t,e,n){return n.initialState[e]||0}sortInstanceNodePosition(){return 0}makeTargetAnimatableFromInstance({transition:t,transitionEnd:e,...n}){return Di(this,n,ki(n,t||{},this)),{transition:t,transitionEnd:e,...n}}}const gl=$t({scrapeMotionValuesFromProps:ml,createRenderState:ml});const yl=t=>t>.001?1/t:1e5;let vl=!1;let xl=0;t.AnimatePresence=({children:t,custom:n,initial:i=!0,onExitComplete:o,exitBeforeEnter:r,presenceAffectsLayout:a=!0,mode:l="sync"})=>{Se(!r);const u=e.useContext(L).forceRender||Ta()[0],h=Aa(),d=function(t){const n=[];return e.Children.forEach(t,t=>{e.isValidElement(t)&&n.push(t)}),n}(t);let p=d;const m=e.useRef(new Map).current,f=e.useRef(p),g=e.useRef(new Map).current,y=e.useRef(!0);if(c(()=>{y.current=!1,function(t,e){t.forEach(t=>{const n=Da(t);e.set(n,t)})}(d,g),f.current=p}),Ra(()=>{y.current=!0,g.clear(),m.clear()}),y.current)return s.createElement(s.Fragment,null,p.map(t=>s.createElement(Va,{key:Da(t),isPresent:!0,initial:!!i&&void 0,presenceAffectsLayout:a,mode:l},t)));p=[...p];const v=f.current.map(Da),x=d.map(Da),P=v.length;for(let t=0;t<P;t++){const e=v[t];-1!==x.indexOf(e)||m.has(e)||m.set(e,void 0)}return"wait"===l&&m.size&&(p=[]),m.forEach((t,e)=>{if(-1!==x.indexOf(e))return;const i=g.get(e);if(!i)return;const r=v.indexOf(e);let c=t;if(!c){const t=()=>{m.delete(e);const t=Array.from(g.keys()).filter(t=>!x.includes(t));if(t.forEach(t=>g.delete(t)),f.current=d.filter(n=>{const i=Da(n);return i===e||t.includes(i)}),!m.size){if(!1===h.current)return;u(),o&&o()}};c=s.createElement(Va,{key:Da(i),isPresent:!1,onExitComplete:t,custom:n,presenceAffectsLayout:a,mode:l},i),m.set(e,c)}p.splice(r,0,c)}),p=p.map(t=>{const e=t.key;return m.has(e)?t:s.createElement(Va,{key:Da(t),isPresent:!0,presenceAffectsLayout:a,mode:l},t)}),s.createElement(s.Fragment,null,m.size?p:p.map(t=>e.cloneElement(t)))},t.AnimateSharedLayout=({children:t})=>(s.useEffect(()=>{Se(!1)},[]),s.createElement(ja,{id:Nt(()=>"asl-"+xl++)},t)),t.DeprecatedLayoutGroupContext=ka,t.DragControls=il,t.FlatTree=ro,t.LayoutGroup=ja,t.LayoutGroupContext=L,t.LazyMotion=function({children:t,features:n,strict:i=!1}){const[,o]=e.useState(!La(n)),r=e.useRef(void 0);if(!La(n)){const{renderer:t,...e}=n;r.current=t,D(e)}return e.useEffect(()=>{La(n)&&n().then(({renderer:t,...e})=>{D(e),r.current=t,o(!0)})},[]),s.createElement(h.Provider,{value:{renderer:r.current,strict:i}},t)},t.MotionConfig=function({children:t,isValidProp:n,...i}){n&&Tt(n),(i={...e.useContext(r),...i}).isStatic=Nt(()=>i.isStatic);const o=e.useMemo(()=>i,[JSON.stringify(i.transition),i.transformPagePoint,i.reducedMotion]);return s.createElement(r.Provider,{value:o},t)},t.MotionConfigContext=r,t.MotionContext=a,t.MotionGlobalConfig=m,t.MotionValue=Ei,t.PresenceContext=l,t.Reorder=$a,t.SwitchLayoutGroupContext=k,t.VisualElement=Fo,t.addPointerEvent=se,t.addPointerInfo=ie,t.addScaleCorrector=N,t.animate=ir,t.animateValue=Zn,t.animateVisualElement=Ui,t.animationControls=tl,t.animations=Xi,t.anticipate=Ke,t.backIn=qe,t.backInOut=Ze,t.backOut=Ge,t.buildTransform=q,t.calcLength=ns,t.cancelFrame=qt,t.cancelSync=kr,t.checkTargetForNewValues=Di,t.circIn=$e,t.circInOut=Xe,t.circOut=Ye,t.clamp=Q,t.color=rn,t.complex=wn,t.createBox=ms,t.createDomMotionComponent=function(t){return j(Qt(t,{forwardMotionProps:!1},wa,xa))},t.createMotionComponent=j,t.createScopedAnimate=nr,t.cubicBezier=Oe,t.delay=lo,t.disableInstantTransitions=function(){Me.current=!1},t.distance=Gi,t.distance2D=qi,t.domAnimation=Ya,t.domMax=Xa,t.easeIn=Ie,t.easeInOut=We,t.easeOut=Ue,t.filterProps=St,t.frame=Gt,t.frameData=Zt,t.inView=Rr,t.interpolate=Rn,t.invariant=Se,t.isBrowser=u,t.isDragActive=he,t.isMotionComponent=ol,t.isMotionValue=Y,t.isValidMotionProp=bt,t.m=ba,t.makeUseVisualState=$t,t.mirrorEasing=ze,t.mix=an,t.motion=Ea,t.motionValue=bi,t.optimizedAppearDataAttribute=p,t.pipe=re,t.progress=Cn,t.px=ht,t.resolveMotionValue=Ht,t.reverseEasing=He,t.scroll=function(t,e){const n=Vr(e);return"function"==typeof t?ho(t,n):t.attachTimeline(n)},t.scrollInfo=Sr,t.spring=Nn,t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:i}={}){return(s,o)=>{const r="number"==typeof n?n:function(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}(n,o),a=Math.abs(r-s);let l=t*a;if(i){const e=o*t;l=Je(i)(l/e)*e}return e+l}},t.startOptimizedAppearAnimation=function(t,e,n,i,s){if(window.HandoffComplete)return void(window.HandoffAppearAnimations=void 0);const o=t.dataset.framerAppearId;if(!o)return;window.HandoffAppearAnimations=pl;const r=ll(o,e);dl||(dl=je(t,e,[n[0],n[0]],{duration:1e4,ease:"linear"}),ul.set(r,{animation:dl,startTime:null}));const a=()=>{dl.cancel();const o=je(t,e,n,i);void 0===hl&&(hl=performance.now()),o.startTime=hl,ul.set(r,{animation:o,startTime:hl}),s&&s(o)};dl.ready?dl.ready.then(a).catch(Xt):a()},t.steps=Kt,t.sync=Lr,t.transform=Dr,t.unwrapMotionComponent=function(t){if(ol(t))return t[B]},t.useAnimate=function(){const t=Nt(()=>({current:null,animations:[]})),e=Nt(()=>nr(t));return Ra(()=>{t.animations.forEach(t=>t.stop())}),[t,e]},t.useAnimation=nl,t.useAnimationControls=el,t.useAnimationFrame=_a,t.useCycle=function(...t){const n=e.useRef(0),[i,s]=e.useState(t[n.current]);return[i,e.useCallback(e=>{n.current="number"!=typeof e?$o(0,t.length,n.current+1):e,s(t[n.current])},[t.length,...t])]},t.useDeprecatedAnimatedState=function(t){const[n,i]=e.useState(t),s=gl({},!1),o=Nt(()=>new fl({props:{},visualState:s,presenceContext:null},{initialState:t}));return e.useEffect(()=>(o.mount({}),()=>o.unmount()),[o]),e.useEffect(()=>{o.update({onUpdate:t=>{i({...t})}},null)},[i,o]),[n,Nt(()=>t=>Ui(o,t))]},t.useDeprecatedInvertedScale=function(t){let n=Ua(1),i=Ua(1);const{visualElement:s}=e.useContext(a);return Se(!(!t&&!s)),Te(vl),vl=!0,t?(n=t.scaleX||n,i=t.scaleY||i):s&&(n=s.getValue("scaleX",1),i=s.getValue("scaleY",1)),{scaleX:Na(n,yl),scaleY:Na(i,yl)}},t.useDomEvent=function(t,n,i,s){e.useEffect(()=>{const e=t.current;if(i&&e)return te(e,n,i,s)},[t,n,i,s])},t.useDragControls=function(){return Nt(sl)},t.useElementScroll=function(t){return Ka({container:t})},t.useForceUpdate=Ta,t.useInView=function(t,{root:n,margin:i,amount:s,once:o=!1}={}){const[r,a]=e.useState(!1);return e.useEffect(()=>{if(!t.current||o&&r)return;const e={root:n&&n.current||void 0,margin:i,amount:s};return Rr(t.current,()=>(a(!0),o?void 0:()=>a(!1)),e)},[n,t,i,o,s]),r},t.useInstantLayoutTransition=rl,t.useInstantTransition=function(){const[t,n]=Ta(),i=rl(),s=e.useRef();return e.useEffect(()=>{Gt.postRender(()=>Gt.postRender(()=>{n===s.current&&(Me.current=!1)}))},[n]),e=>{i(()=>{Me.current=!0,t(),e(),s.current=n+1})}},t.useIsPresent=function(){return null===(t=e.useContext(l))||t.isPresent;var t},t.useIsomorphicLayoutEffect=c,t.useMotionTemplate=function(t,...e){const n=t.length;return Wa(e.filter(Y),(function(){let i="";for(let s=0;s<n;s++){i+=t[s];const n=e[s];n&&(i+=Y(n)?n.get():n)}return i}))},t.useMotionValue=Ua,t.useMotionValueEvent=Ga,t.usePresence=ma,t.useReducedMotion=Qa,t.useReducedMotionConfig=function(){const t=Qa(),{reducedMotion:n}=e.useContext(r);return"never"!==n&&("always"===n||t)},t.useResetProjection=function(){return s.useCallback(()=>{const t=aa.current;t&&t.resetTree()},[])},t.useScroll=Ka,t.useSpring=function(t,n={}){const{isStatic:i}=e.useContext(r),s=e.useRef(null),o=Ua(Y(t)?t.get():t),a=()=>{s.current&&s.current.stop()};return e.useInsertionEffect(()=>o.attach((t,e)=>{if(i)return e(t);const r=s.current;return r&&0===r.time&&r.sample(Zt.delta),a(),s.current=Zn({keyframes:[o.get(),t],velocity:o.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:e}),o.get()},a),[JSON.stringify(n)]),c(()=>{if(Y(t))return t.on("change",t=>o.set(parseFloat(t)))},[o]),o},t.useTime=function(){const t=Ua(0);return _a(e=>t.set(e)),t},t.useTransform=Na,t.useUnmountEffect=Ra,t.useVelocity=function(t){const e=Ua(t.getVelocity()),n=()=>{const i=t.getVelocity();e.set(i),i&&Gt.update(n)};return Ga(t,"change",()=>{Gt.update(n,!1,!0)}),e},t.useViewportScroll=function(){return Ka()},t.useWillChange=function(){return Nt(()=>new Ja("auto"))},t.visualElementStore=co,t.warning=Te,t.wrap=$o,Object.defineProperty(t,"__esModule",{value:!0})}));
|
package/dist/projection.dev.js
CHANGED
|
@@ -1004,7 +1004,7 @@
|
|
|
1004
1004
|
* This will be replaced by the build step with the latest version number.
|
|
1005
1005
|
* When MotionValues are provided to motion components, warn if versions are mixed.
|
|
1006
1006
|
*/
|
|
1007
|
-
this.version = "11.0.
|
|
1007
|
+
this.version = "11.0.4";
|
|
1008
1008
|
/**
|
|
1009
1009
|
* Tracks whether this value can output a velocity. Currently this is only true
|
|
1010
1010
|
* if the value is numerical, but we might be able to widen the scope here and support
|
|
@@ -2622,7 +2622,6 @@
|
|
|
2622
2622
|
"clipPath",
|
|
2623
2623
|
"filter",
|
|
2624
2624
|
"transform",
|
|
2625
|
-
"backgroundColor",
|
|
2626
2625
|
]);
|
|
2627
2626
|
/**
|
|
2628
2627
|
* 10ms is chosen here as it strikes a balance between smooth
|
|
@@ -3748,7 +3747,7 @@
|
|
|
3748
3747
|
* and warn against mismatches.
|
|
3749
3748
|
*/
|
|
3750
3749
|
{
|
|
3751
|
-
warnOnce(nextValue.version === "11.0.
|
|
3750
|
+
warnOnce(nextValue.version === "11.0.4", `Attempting to mix Framer Motion versions ${nextValue.version} with 11.0.4 may not work as expected.`);
|
|
3752
3751
|
}
|
|
3753
3752
|
}
|
|
3754
3753
|
else if (isMotionValue(prevValue)) {
|
|
@@ -5380,6 +5379,7 @@
|
|
|
5380
5379
|
!lead.target &&
|
|
5381
5380
|
(this.treeScale.x !== 1 || this.treeScale.y !== 1)) {
|
|
5382
5381
|
lead.target = lead.layout.layoutBox;
|
|
5382
|
+
lead.targetWithTransforms = createBox();
|
|
5383
5383
|
}
|
|
5384
5384
|
const { target } = lead;
|
|
5385
5385
|
if (!target) {
|
|
@@ -5992,6 +5992,7 @@
|
|
|
5992
5992
|
ease: [0.4, 0, 0.1, 1],
|
|
5993
5993
|
};
|
|
5994
5994
|
const userAgentContains = (string) => typeof navigator !== "undefined" &&
|
|
5995
|
+
navigator.userAgent &&
|
|
5995
5996
|
navigator.userAgent.toLowerCase().includes(string);
|
|
5996
5997
|
/**
|
|
5997
5998
|
* Measured bounding boxes must be rounded in Safari and
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "framer-motion",
|
|
3
|
-
"version": "11.0.
|
|
3
|
+
"version": "11.0.4",
|
|
4
4
|
"description": "A simple and powerful JavaScript animation library",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/es/index.mjs",
|
|
@@ -116,5 +116,5 @@
|
|
|
116
116
|
"maxSize": "32.05 kB"
|
|
117
117
|
}
|
|
118
118
|
],
|
|
119
|
-
"gitHead": "
|
|
119
|
+
"gitHead": "20090f5a879143ae92de3d50ffba3eb762b350df"
|
|
120
120
|
}
|