motion 14.7.0 → 14.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/motion.dev.js +10 -1
- package/dist/motion.js +1 -1
- package/package.json +3 -3
package/dist/motion.dev.js
CHANGED
|
@@ -4360,6 +4360,7 @@
|
|
|
4360
4360
|
built = new Map();
|
|
4361
4361
|
stop();
|
|
4362
4362
|
tracks.forEach((track) => track.state === "running" && track.js?.start());
|
|
4363
|
+
return true;
|
|
4363
4364
|
},
|
|
4364
4365
|
};
|
|
4365
4366
|
transformGroups.set(element, group);
|
|
@@ -7646,7 +7647,15 @@
|
|
|
7646
7647
|
}
|
|
7647
7648
|
}
|
|
7648
7649
|
}
|
|
7649
|
-
|
|
7650
|
+
/**
|
|
7651
|
+
* Move accelerated transforms back to the main thread. The WAAPI animation
|
|
7652
|
+
* hid startUpdate()'s reset of rotations, skews and z, and moving off it
|
|
7653
|
+
* writes the whole transform back, so reset them again before this node
|
|
7654
|
+
* is measured.
|
|
7655
|
+
*/
|
|
7656
|
+
const demoteTransforms = (node) => node.instance &&
|
|
7657
|
+
transformGroups.get(node.instance)?.demote() &&
|
|
7658
|
+
node.resetSkewAndRotation();
|
|
7650
7659
|
function cancelTreeOptimisedTransformAnimations(projectionNode) {
|
|
7651
7660
|
projectionNode.hasCheckedOptimisedAppear = true;
|
|
7652
7661
|
if (projectionNode.root === projectionNode)
|
package/dist/motion.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={})}(this,function(t){"use strict";function e(t,e){-1===t.indexOf(e)&&t.push(e)}function n(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const i=(t,e,n)=>n>e?e:n<t?t:n;const s={},o=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),r=t=>"object"==typeof t&&null!==t,a=t=>/^0[^.\s]+$/u.test(t);function l(t){let e;return()=>(void 0===e&&(e=t()),e)}const c=t=>t,u=(...t)=>t.reduce((t,e)=>n=>e(t(n))),h=(t,e,n)=>{const i=e-t;return i?(n-t)/i:1};class d{constructor(){this.subscriptions=[]}add(t){return e(this.subscriptions,t),()=>this.remove(t)}remove(t){n(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 p=t=>1e3*t,m=t=>t/1e3,f=(t,e)=>e?t*(1e3/e):0,g=new Set;function y(t,e,n){t||g.has(e)||(console.warn(function(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}(e,n)),g.add(e))}const v=(t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t},x=(t,e,n)=>t*(3*(1-t)*((1-t)*e+t*n)+t*t);function w(t,e,n,i){return t===e&&n===i?c:s=>{let o=0,r=1,a=s;for(let e=0;;e++){a>=o&&a<=r||(a=(o+r)/2);const i=x(a,t,n)-s;if(i*i<1e-28||40===e)break;i>0?r=a:o=a,a-=1e-7*i/(x(a+1e-7,t,n)-s-i)}return x(a,e,i)}}const T=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,b=t=>e=>1-t(1-e),S=w(.33,1.53,.69,.99),A=b(S),P=T(A),M=t=>t>=1?1:(t*=2)<1?.5*A(t):.5*(2-Math.pow(2,-10*(t-1))),E=t=>1-Math.sin(Math.acos(t)),V=b(E),k=T(E),D=w(.42,0,1,1),C=w(0,0,.58,1),R=w(.42,0,.58,1);const L=t=>Array.isArray(t)&&"number"!=typeof t[0];function B(t,e){return L(t)?t[v(0,t.length,e)]:t}const j=t=>Array.isArray(t)&&"number"==typeof t[0],O={linear:c,easeIn:D,easeInOut:R,easeOut:C,circIn:E,circInOut:k,circOut:V,backIn:A,backInOut:P,backOut:S,anticipate:M},F=t=>{if(j(t)){const[e,n,i,s]=t;return w(e,n,i,s)}return"string"==typeof t?O[t]:t},I={delta:0,timestamp:0,isProcessing:!1};let W;function N(){W=void 0}const U={now:()=>(void 0===W&&U.set(I.isProcessing||s.useManualTiming?I.timestamp:performance.now()),W),set:t=>{W=t,queueMicrotask(N)}},$=t=>Math.round(1e5*t)/1e5,z=t=>e=>"string"==typeof e&&e.startsWith(t),K=z("--"),G=z("var(--"),Y=t=>!!G(t)&&X.test(t.split("/*")[0].trim()),X=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function H(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}const q={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},_={...q,transform:t=>i(0,1,t)},Z={...q,default:1},J=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const Q=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,tt=(t,e)=>n=>Boolean("string"==typeof n&&Q.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),et=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[s,o,r,a]=i.match(J);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},nt={...q,transform:t=>Math.round((t=>i(0,255,t))(t))},it={test:tt("rgb","red"),parse:et("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+nt.transform(t)+", "+nt.transform(e)+", "+nt.transform(n)+", "+$(_.transform(i))+")"},st=(t,e,n)=>{const i=t.substring(1+e*n,1+(e+1)*n);return n>1?i:i+i};const ot={test:tt("#"),parse:function(t){const e=t.length>5?2:1,n=st(t,3,e);return{red:parseInt(st(t,0,e),16),green:parseInt(st(t,1,e),16),blue:parseInt(st(t,2,e),16),alpha:n?parseInt(n,16)/255:1}},transform:it.transform},rt=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),at=rt("deg"),lt=rt("%"),ct=rt("px"),ut=rt("vh"),ht=rt("vw"),dt=(()=>({...lt,parse:t=>lt.parse(t)/100,transform:t=>lt.transform(100*t)}))(),pt={test:tt("hsl","hue"),parse:et("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+lt.transform($(e))+", "+lt.transform($(n))+", "+$(_.transform(i))+")"},mt={test:t=>it.test(t)||ot.test(t)||pt.test(t),parse:t=>it.test(t)?it.parse(t):pt.test(t)?pt.parse(t):ot.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?it.transform(t):pt.transform(t),getAnimatableNone:t=>{const e=mt.parse(t);return e.alpha=0,mt.transform(e)}},ft=new RegExp(J.source),gt=new RegExp(/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu.source,"i");const yt="number",vt="color",xt=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)(?![a-z]*\()/giu;function wt(t){const e=t.toString();return ft.test(e)||gt.test(e)}function Tt(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const r=e.replace(xt,t=>(mt.test(t)?(i.color.push(o),s.push(vt),n.push(mt.parse(t))):t.startsWith("var(")?(i.var.push(o),s.push("var"),n.push(t)):(i.number.push(o),s.push(yt),n.push(parseFloat(t))),++o,"${}")).split("${}");return{values:n,split:r,indexes:i,types:s}}function bt({split:t,types:e}){const n=t.length;return i=>{let s="";for(let o=0;o<n;o++)if(s+=t[o],void 0!==i[o]){const t=e[o];s+=t===yt?$(i[o]):t===vt?mt.transform(i[o]):i[o]}return s}}const St=(t,e)=>{return"number"==typeof t?e?.trim().endsWith("/")?t:0:"number"==typeof(n=t)?0:mt.test(n)?mt.getAnimatableNone(n):n;var n};const At={test:function(t){return isNaN(t)&&"string"==typeof t&&(ft.test(t)||gt.test(t))},parse:function(t){return Tt(t).values},createTransformer:function(t){return bt(Tt(t))},getAnimatableNone:function(t){const e=Tt(t);return bt(e)(e.values.map((t,n)=>St(t,e.split[n])))}};function Pt(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Mt({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=Pt(a,i,t+1/3),o=Pt(a,i,t),r=Pt(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}}function Et(t,e){return n=>n>0?e:t}const Vt=(t,e,n)=>t+(e-t)*n,kt=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},Dt=[ot,it,pt];function Ct(t){const e=(n=t,Dt.find(t=>t.test(n)));var n;if(!e)return!1;let i=e.parse(t);return e===pt&&(i=Mt(i)),i}const Rt=(t,e)=>{const n=Ct(t),i=Ct(e);if(!n||!i)return Et(t,e);const s={...n};return t=>(s.red=kt(n.red,i.red,t),s.green=kt(n.green,i.green,t),s.blue=kt(n.blue,i.blue,t),s.alpha=Vt(n.alpha,i.alpha,t),it.transform(s))},Lt=new Set(["none","hidden"]);function Bt(t,e){return Lt.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function jt(t,e){return n=>Vt(t,e,n)}function Ot(t){return"number"==typeof t?jt:"string"==typeof t?Y(t)?Et:mt.test(t)?Rt:Wt:Array.isArray(t)?Ft:"object"==typeof t?mt.test(t)?Rt:It:Et}function Ft(t,e){const n=[...t],i=n.length,s=t.map((t,n)=>Ot(t)(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=s[e](t);return n}}function It(t,e){const n={...t,...e},i={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(i[s]=Ot(t[s])(t[s],e[s]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const Wt=(t,e)=>{const n=Tt(t),i=Tt(e);return n.indexes.var.length===i.indexes.var.length&&n.indexes.color.length===i.indexes.color.length&&n.indexes.number.length>=i.indexes.number.length?Lt.has(t)&&!i.values.length||Lt.has(e)&&!n.values.length?Bt(t,e):u(Ft(function(t,e){const n=[],i={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const o=e.types[s],r=t.indexes[o][i[o]],a=t.values[r]??0;n[s]=a,i[o]++}return n}(n,i),i.values),bt(i)):Et(t,e)},Nt=/^(-?(?:\d+(?:\.\d*)?|\.\d+))([a-z%]*)$/iu;function Ut(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return Vt(t,e,n);if("string"==typeof t&&"string"==typeof e){const n=function(t,e){const n=Nt.exec(t);if(!n)return;const i=Nt.exec(e);if(!i||n[2]!==i[2])return;const s=n[2],o=parseFloat(n[1]),r=parseFloat(i[1]);return t=>$(Vt(o,r,t))+s}(t,e);if(n)return n}return Ot(t)(t,e)}const $t=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function zt(t,e,n={delta:0,timestamp:0,isProcessing:!1}){let i=!1,o=!0;const r=()=>i=!0,a=$t.reduce((t,e)=>(t[e]=function(t){let e,n=new Set,i=new Set,s=!1,o=!1;const r=new Set;let a={delta:0,timestamp:0,isProcessing:!1};function l(n){r.has(n)&&(i.add(n),t()),(e=n)(a)}const c={schedule:(t,o=!1,a=!1)=>{const l=a&&s,c=l?n:i;return o&&r.add(t),l&&t!==e&&c.delete(t),c.add(t),t},cancel:t=>{i.delete(t),r.delete(t)},process:t=>{if(a=t,s)return void(o=!0);s=!0;const r=n;n=i,i=r,n.forEach(l),n.clear(),e=void 0,s=!1,o&&(o=!1,c.process(t))}};return c}(r),t),{}),{setup:l,read:c,resolveKeyframes:u,preUpdate:h,update:d,preRender:p,render:m,postRender:f}=a,g=()=>{const r=s.useManualTiming,a=r?n.timestamp:performance.now();i=!1,r||(n.delta=o?1e3/60:Math.max(Math.min(a-n.timestamp,40),1)),n.timestamp=a,n.isProcessing=!0,l.process(n),c.process(n),u.process(n),h.process(n),d.process(n),p.process(n),m.process(n),f.process(n),n.isProcessing=!1,i&&e&&(o=!1,t(g))};return{schedule:$t.reduce((e,s)=>{const r=a[s];return e[s]=(e,s=!1,a=!1)=>(i||(i=!0,o=!0,n.isProcessing||t(g)),r.schedule(e,s,a)),e},{}),cancel:t=>{for(let e=0;e<$t.length;e++)a[$t[e]].cancel(t)},state:n,steps:a}}const{schedule:Kt,cancel:Gt,steps:Yt}=zt("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:c,!0,I),Xt=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>Kt.update(e,t),stop:()=>Gt(e),now:()=>I.isProcessing?I.timestamp:U.now()}},Ht=(t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let e=0;e<s;e++)i+=Math.round(1e4*t(e/(s-1)))/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},qt=2e4;function _t(t,e=50,n=2e4,i){let s=0,o=t.next(s);for(i?.push(o.value);!o.done&&s<n;)s+=e,o=t.next(s),i?.push(o.value);return s>=n?1/0:s}function Zt(t,e=100,n){const{keyframes:i,velocity:s}=t,o=i&&i[i.length-1]-i[0],r=n({...t,velocity:s&&o?s*e/o:s,keyframes:[0,e]}),a=Math.min(_t(r),qt);return{type:"keyframes",ease:t=>r.next(a*t).value/e,duration:m(a)}}const Jt=t=>t<0?1/Math.max(1+t,.05):Math.max(1-t,.05);function Qt(t,e){if(!(t>1))return 1;const n=Math.sqrt(t*t-1),i=t-n,s=t+n,o=2*n*Math.exp(-e)*(1+e);return ne(t=>s*Math.exp(-i*t)-i*Math.exp(-s*t)-o,t=>Math.exp(-s*t)-Math.exp(-i*t),e)/e}function te(t,e){return t*Math.sqrt(1-e*e)}const ee=12;function ne(t,e,n){let i=n;for(let n=1;n<ee;n++)i-=t(i)/e(i);return i}const ie=.001;const se=(t,e)=>(e?t>=0:t>0)&&t<1/0;function oe(t,e){if(se(t,e))return t}function re(t){const e=oe(t.stiffness),n=oe(t.damping,!0),s=oe(t.mass),o={...t,stiffness:e??100,damping:n??10,mass:s??1,isResolvedFromDuration:!1,isTimeDefined:void 0===(e??n??s)&&(void 0!==t.duration||void 0!==t.bounce)};if(o.isTimeDefined){if(t.visualDuration){const e=Jt(t.bounce||0),n=2*Math.PI/(1.2*t.visualDuration)*Qt(e,2*Math.PI/1.2);o.stiffness=n*n,o.damping=2*e*Math.sqrt(o.stiffness)}else Object.assign(o,function({duration:t=800,bounce:e=.3}){let n,s;const o=Jt(e);t=i(.01,10,m(t)),o<1?(n=e=>{const n=e*o,i=n*t,s=te(e,o),r=Math.exp(-i);return ie-n/s*r},s=e=>{const i=e*o*t,s=o*o*e*e*t,r=Math.exp(-i),a=te(e*e,o);return(-n(e)+ie>0?-1:1)*-s*r/a}):(n=e=>Math.exp(-e*t)*(e*t+1)-.001,s=e=>Math.exp(-e*t)*(t*t*-e));const r=ne(n,s,5/t),a=r*Qt(o,r*t),l=a*a;return{stiffness:l,damping:2*o*Math.sqrt(l),duration:p(t)}}(o)),o.isResolvedFromDuration=!0;se(o.stiffness)&&se(o.damping,!0)||(o.stiffness=100,o.damping=10)}return o}function ae(t=.3,e=.3){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t,i=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],o={done:!1,value:i},{stiffness:r,damping:a,mass:l,duration:c,isResolvedFromDuration:u,isTimeDefined:h}=re({...n}),d=t=>h?0:-m(t),f=a/(2*Math.sqrt(r*l)),g=m(Math.sqrt(r/l)),y=f*g,v={target:s,delta:s-i,velocity:d(n.velocity||0)||0,restSpeed:0,restDelta:0},x=()=>{const t=Math.abs(v.delta)<5;v.restSpeed=n.restSpeed||(t?.01:2),v.restDelta=n.restDelta||(t?.005:.5)};let w,T,b;if(x(),f<1){const t=te(g,f),e={A:0,sinC:0,cosC:0,t:-1,env:0,sin:0,cos:0};b=()=>{e.A=(v.velocity+y*v.delta)/t,e.sinC=y*e.A+v.delta*t,e.cosC=y*v.delta-e.A*t};const n=n=>{n!==e.t&&(e.t=n,e.env=Math.exp(-y*n),e.sin=Math.sin(t*n),e.cos=Math.cos(t*n))};w=t=>(n(t),v.target-e.env*(e.A*e.sin+v.delta*e.cos)),T=t=>(n(t),e.env*(e.sinC*e.sin+e.cosC*e.cos))}else if(1===f){w=t=>v.target-Math.exp(-g*t)*(v.delta+(v.velocity+g*v.delta)*t);const t={C:0};b=()=>{t.C=v.velocity+g*v.delta},T=e=>Math.exp(-g*e)*(g*t.C*e-v.velocity)}else{const t=g*Math.sqrt(f*f-1),e=y-t,n=y+t,i=t<1||h?1/0:300/t,s=(t,e)=>Math.exp(e>i?(y-t)*i-y*e:-t*e),o={S:0,F:0};b=()=>{const e=(v.velocity+y*v.delta)/t;o.S=(v.delta+e)/2,o.F=(v.delta-e)/2},w=t=>v.target-o.S*s(e,t)-o.F*s(n,t),T=t=>e*o.S*s(e,t)+n*o.F*s(n,t)}b();const S=u&&c||null,A={calculatedDuration:S,retarget:(t,e)=>{v.target=t[t.length-1],v.delta=v.target-t[0],v.velocity=d(e),n.restSpeed&&n.restDelta||x(),A.calculatedDuration=S,o.done=!1,b()},velocity:t=>p(T(t)),next:t=>{const e=w(t);if(u)o.done=t>=c;else{const n=p(T(t));o.done=Math.abs(n)<=v.restSpeed&&Math.abs(v.target-e)<=v.restDelta}return o.value=o.done?v.target:e,o},toString:()=>{const t=Math.min(_t(A),qt),e=Ht(e=>A.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return A}const le=Object.assign(ae,{applyToOptions:t=>{const e=Zt(t,100,ae);return t.ease=e.ease,t.duration=p(e.duration),t.type="keyframes",t}});function ce({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){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=r?r(f):f;g!==f&&(m=g-h);const y=t=>-m*Math.exp(-t/i),v=t=>{const e=y(t);d.done=Math.abs(e)<=c,d.value=d.done?g:t?g+e:h};let x,w;const T=t=>{var e;((e=d.value)<a||e>l)&&(x=t,w=le({keyframes:[d.value,p(d.value)],velocity:-y(t)/i*1e3,damping:s,stiffness:o,restDelta:c,restSpeed:u}))};return T(0),{calculatedDuration:null,next:t=>{let e=!1;return w||void 0!==x||(e=!0,v(t),T(t)),void 0!==x&&t>=x?w.next(t-x):(!e&&v(t),d)}}}function ue(t,e,{clamp:n=!0,ease:o,mixer:r}={}){const a=t.length;if(1===a)return()=>e[0];if(2===a&&e[0]===e[1])return()=>e[1];const l=t[0]===t[1];t[0]>t[a-1]&&(t=[...t].reverse(),e=[...e].reverse());const d=function(t,e,n){const i=[],o=n||s.mix||Ut,r=t.length-1;for(let n=0;n<r;n++){let s=o(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||c:e;s=u(t,s)}i.push(s)}return i}(e,o,r),p=d.length,m=n=>{if(l&&n<t[0])return e[0];let i=0;if(p>1)for(;i<t.length-2&&!(n<t[i+1]);i++);const s=h(t[i],t[i+1],n);return d[i](s)};return n?e=>m(i(t[0],t[a-1],e)):m}function he(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=h(0,e,i);t.push(Vt(n,1,s))}}function de(t){const e=[0];return he(e,t.length-1),e}function pe(t,e){return t.map(t=>t*e)}function me(t,e){return t.map(()=>e||R).splice(0,t.length-1)}function fe({duration:t=300,keyframes:e,times:n,ease:o="easeInOut"}){const r=L(o)?o.map(F):F(o)||R,a={done:!1,value:e[0]};if(2===e.length&&!Array.isArray(r)&&(!n||2!==n.length||0===n[0]&&1===n[1])){const[n,o]=e,l=n===o?void 0:(s.mix||Ut)(n,o);return{calculatedDuration:t,next:e=>(a.value=l?l(r(t>0?i(0,1,e/t):1)):o,a.done=e>=t,a)}}const l=ue(pe(n&&n.length===e.length?n:de(e),t),e,{ease:Array.isArray(r)?r:me(e,r)});return{calculatedDuration:t,next:e=>(a.value=l(e),a.done=e>=t,a)}}function ge(t,e,n=0){return e<=0?n:t.velocity?t.velocity(e):function(t,e,n){const i=Math.max(e-5,0);return f(n-t(i),e-i)}(e=>t.next(e).value,e,t.next(e).value)}const ye=t=>null!==t;function ve(t,{repeat:e,repeatType:n="loop"},i,s=1){const o=t.filter(ye),r=s<0||e&&"loop"!==n&&e%2==1?0:o.length-1;return r&&void 0!==i?i:o[r]}const xe={decay:ce,inertia:ce,tween:fe,keyframes:fe,spring:le};function we(t){"string"==typeof t.type&&(t.type=xe[t.type])}const Te=(t,e)=>e-t>40&&!s.useManualTiming?e:t;function be(t,e){return{kind:t,animation:e,timestamp:U.now(),frameTimestamp:I.timestamp,frameIsProcessing:I.isProcessing}}function Se(t,e,n){const i=globalThis.__MOTION_INSPECT__;if(i)try{i({...be("animation-start",t),options:n?{...e,...n}:e})}catch{}}class Ae{constructor(){this.isResolved=!1}get finished(){return this._finished||(this._finished=this.isResolved?Promise.resolve():new Promise(t=>{this._resolve=t})),this._finished}updateFinished(){this._finished=this._resolve=void 0,this.isResolved=!1}notifyFinished(){this.isResolved=!0,this._resolve?.()}then(t,e){return this.finished.then(t,e)}}const Pe=t=>t/100,Me=t=>Math.round(1e4*t)/1e4;class Ee extends Ae{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==U.now()&&this.tick(U.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause(),Se(this,this.options)}initAnimation(){const{options:t}=this;we(t);const{type:e=fe,repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=t;let{keyframes:r}=t;const a=e||fe;a!==fe&&"number"!=typeof r[0]&&(this.mixKeyframes=u(Pe,Ut(r[0],r[1])),r=[0,100]);const l=a(r===t.keyframes?t:{...t,keyframes:r});"mirror"===s&&(this.mirroredGenerator=a({...t,keyframes:[...r].reverse(),velocity:-o})),null===l.calculatedDuration&&(l.calculatedDuration=_t(l));const{calculatedDuration:c}=l;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=l}updateTime(t){this.currentTime=this.holdTime??Math.round(t-this.startTime)*this.playbackSpeed}tick(t,e=!1){const{generator:n,totalDuration:i,calculatedDuration:s}=this;if(null===this.startTime)return n.next(0);const{delay:o=0,keyframes:r,type:a,onUpdate:l,finalKeyframe:c}=this.options;this.startTime===this.pendingStartTime&&(this.startTime=Te(this.startTime,t)),this.pendingStartTime=void 0,this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const u=this.currentTime-o*(this.playbackSpeed>=0?1:-1),h=this.playbackSpeed>=0?u<0:u>i;this.currentTime=Math.max(u,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=i);const d=this.generate(this.currentTime,h);let{done:p}=d;h||(p=this.playbackSpeed>=0?s<1/0?this.currentTime>=i:p:this.currentTime<=0);const m=null===this.holdTime&&("finished"===this.state||"running"===this.state&&p);return m&&a!==ce&&(d.value=ve(r,this.options,c,this.speed)),l&&l(d.value),m&&this.finish(),d}at(t){return this.holdTime??Me((t-this.startTime)*this.playbackSpeed)}sampleAt(t,e){const{options:n,totalDuration:i}=this,s=this.at(t)-(n.delay||0);return s>=i&&n.type!==ce?ve(n.keyframes,n,e?void 0:n.finalKeyframe):this.generate(Math.max(s,0),s<0).value}generate(t,e){const{generator:n,totalDuration:s,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:a}=this,{keyframes:l,repeat:c,repeatType:u,repeatDelay:h}=this.options;let d,p=t,m=n;if(c){const e=Math.min(t,s)/a;let n=Math.floor(e),o=e%1;!o&&e>=1&&(o=1),1===o&&n--,n=Math.min(n,c+1);Boolean(n%2)&&("reverse"===u?(o=1-o,h&&(o-=h/a)):"mirror"===u&&(m=r)),p=i(0,1,o)*a}return e?(this.delayState.value=l[0],d=this.delayState):d=m.next(p),o&&!e&&(d.value=o(d.value)),d}get duration(){return m(this.calculatedDuration)}get iterationDuration(){return this.duration+m(this.options.delay??0)}get time(){return m(this.currentTime)}set time(t){t=p(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){return ge(this.generator,this.currentTime,this.options.velocity)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;e&&this.driver&&this.updateTime(U.now()),this.playbackSpeed=t,e&&this.driver&&(this.time=m(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Xt,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime/(this.playbackSpeed||1):this.startTime||(this.startTime=e??(this.pendingStartTime=n)),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(U.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.driver?.stop(),this.driver=void 0,this.startTime=this.holdTime=null}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}const Ve=new Set(["brightness","contrast","saturate","opacity"]);function ke(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(J)||[];if(!i)return t;const s=n.replace(i,"");let o=Ve.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const De=/\b([a-z-]*)\(.*?\)/gu,Ce={...At,getAnimatableNone:t=>{const e=t.match(De);return e?e.map(ke).join(" "):t}},Re={...At,getAnimatableNone:t=>{const e=At.parse(t);return At.createTransformer(t)(e.map(t=>"number"==typeof t?0:"object"==typeof t?{...t,alpha:1}:t))}},Le={...q,transform:Math.round},Be={rotate:at,pathRotation:at,rotateX:at,rotateY:at,rotateZ:at,scale:Z,scaleX:Z,scaleY:Z,scaleZ:Z,skew:at,skewX:at,skewY:at,distance:ct,translateX:ct,translateY:ct,translateZ:ct,x:ct,y:ct,z:ct,perspective:ct,transformPerspective:ct,opacity:_,originX:dt,originY:dt,originZ:ct},je={borderWidth:ct,borderTopWidth:ct,borderRightWidth:ct,borderBottomWidth:ct,borderLeftWidth:ct,borderRadius:ct,borderTopLeftRadius:ct,borderTopRightRadius:ct,borderBottomRightRadius:ct,borderBottomLeftRadius:ct,width:ct,maxWidth:ct,height:ct,maxHeight:ct,top:ct,right:ct,bottom:ct,left:ct,inset:ct,insetBlock:ct,insetBlockStart:ct,insetBlockEnd:ct,insetInline:ct,insetInlineStart:ct,insetInlineEnd:ct,padding:ct,paddingTop:ct,paddingRight:ct,paddingBottom:ct,paddingLeft:ct,paddingBlock:ct,paddingBlockStart:ct,paddingBlockEnd:ct,paddingInline:ct,paddingInlineStart:ct,paddingInlineEnd:ct,margin:ct,marginTop:ct,marginRight:ct,marginBottom:ct,marginLeft:ct,marginBlock:ct,marginBlockStart:ct,marginBlockEnd:ct,marginInline:ct,marginInlineStart:ct,marginInlineEnd:ct,fontSize:ct,backgroundPositionX:ct,backgroundPositionY:ct,...Be,zIndex:Le,fillOpacity:_,strokeOpacity:_,numOctaves:Le},Oe={...je,color:mt,backgroundColor:mt,outlineColor:mt,fill:mt,stroke:mt,borderColor:mt,borderTopColor:mt,borderRightColor:mt,borderBottomColor:mt,borderLeftColor:mt,filter:Ce,WebkitFilter:Ce,mask:Re,WebkitMask:Re},Fe=t=>Oe[t],Ie=new Set([Ce,Re]);function We(t,e){let n=Fe(t);return Ie.has(n)||(n=At),n.getAnimatableNone?n.getAnimatableNone(e):void 0}function Ne(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Ue=t=>180*t/Math.PI,$e=t=>{const e=Ue(Math.atan2(t[1],t[0]));return Ke(e)},ze={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scaleZ:()=>1,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:$e,rotateZ:$e,skewX:t=>Ue(Math.atan(t[1])),skewY:t=>Ue(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Ke=t=>((t%=360)<0&&(t+=360),t),Ge=t=>Math.hypot(t[0],t[1]),Ye=t=>Math.hypot(t[4],t[5]),Xe={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ge,scaleY:Ye,scaleZ:t=>Math.hypot(t[8],t[9],t[10]),scale:t=>(Ge(t)+Ye(t))/2,rotateX:t=>Ke(Ue(Math.atan2(t[6],t[5]))),rotateY:t=>Ke(Ue(Math.atan2(-t[2],t[0]))),rotateZ:$e,rotate:$e,skewX:t=>Ue(Math.atan(t[4])),skewY:t=>Ue(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function He(t){return t.includes("scale")?1:0}function qe(t,e){if(!t||"none"===t)return He(e);const n=t.match(/^matrix(3d)?\(([-\d.e\s,]+)\)$/u);if(!n)return He(e);const i=(n[1]?Xe:ze)[e],s=n[2].split(",").map(t=>parseFloat(t));return"function"==typeof i?i(s):s[i]}const _e=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return qe(n,e)},Ze=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","scaleZ","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Je=(()=>new Set([...Ze,"pathRotation"]))(),Qe=t=>t===q||t===ct,tn=new Set(["x","y","z"]),en=Ze.filter(t=>!tn.has(t));const nn=new Set(["bottom","right"]);function sn(t,e,n,i,s,o){const r=parseFloat(t);if(!isNaN(r))return r;const{min:a,max:l}=e()[n],c=l-a;return"border-box"===o?c:c-parseFloat(i)-parseFloat(s)}const on=({transform:t})=>qe(t,"x"),rn=({transform:t})=>qe(t,"y"),an={width:({width:t,paddingLeft:e="0",paddingRight:n="0",boxSizing:i},s)=>sn(t,s,"x",e,n,i),height:({height:t,paddingTop:e="0",paddingBottom:n="0",boxSizing:i},s)=>sn(t,s,"y",e,n,i),top:({top:t})=>parseFloat(t),left:({left:t})=>parseFloat(t),bottom:({top:t},e)=>{const{y:n}=e();return parseFloat(t)+(n.max-n.min)},right:({left:t},e)=>{const{x:n}=e();return parseFloat(t)+(n.max-n.min)},x:on,y:rn,translateX:on,translateY:rn},ln=new Set;let cn=!1,un=!1,hn=!1;function dn(){if(un){const t=[],e=new Set,n=new Set;ln.forEach(i=>{i.needsMeasurement&&(t.push(i),e.add(i.element),nn.has(i.name)&&n.add(i.element))});const i=new Map;n.forEach(t=>{const e=function(t){const e=[];return en.forEach(n=>{const i=t.getValue(n);if(void 0!==i){const t=i.get(),s=n.startsWith("scale")?1:0;if(t===s)return;e.push([n,t]),i.set(s)}}),e}(t);e.length&&(i.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=i.get(t);e&&e.forEach(([e,n])=>{t.getValue(e)?.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}un=!1,cn=!1,ln.forEach(t=>t.complete(hn)),ln.clear()}function pn(){ln.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(un=!0)})}function mn(){hn=!0,pn(),dn(),hn=!1}class fn{constructor(t,e,n,i,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(ln.add(this),cn||(cn=!0,Kt.read(pn),Kt.resolveKeyframes(dn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;if(null===t[0]){const s=i?.get(),r=t[t.length-1];if(void 0!==s)t[0]=s;else if(n&&e){const i=function(t,e,n){if("string"==typeof t){if(o(t)||a(t))return parseFloat(t);if(!At.test(t)&&At.test(n))return We(e,n)}return t??void 0}(n.readValue(e,r),e,r);void 0!==i&&(t[0]=i)}void 0===t[0]&&(t[0]=r),i&&void 0===s&&i.set(t[0])}Ne(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),ln.delete(this)}cancel(){"scheduled"===this.state&&(ln.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const gn=t=>t.startsWith("--");function yn(t,e,n){gn(e)?t.style.setProperty(e,n):t.style[e]=n}const vn={};function xn(t,e){const n=l(t);return()=>vn[e]??n()}const wn=xn(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),Tn=xn(()=>void 0!==window.ViewTimeline,"viewTimeline"),bn=xn(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),Sn=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,An={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Sn([0,.65,.55,1]),circOut:Sn([.55,0,1,.45]),backIn:Sn([.31,.01,.66,-.59]),backOut:Sn([.33,1.53,.69,.99])};function Pn(t,e){return t?"function"==typeof t?bn()?Ht(t,e):"ease-out":j(t)?Sn(t):Array.isArray(t)?t.map(t=>Pn(t,e)||An.easeOut):An[t]:void 0}function Mn(t,e,n,{delay:i=0,duration:s=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[e]:n};l&&(u.offset=l);const h=Pn(a,s);Array.isArray(h)&&(u.easing=h);const d={delay:i,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"};return c&&(d.pseudoElement=c),t.animate(u,d)}function En(t){return"function"==typeof t&&"applyToOptions"in t}function Vn({type:t,...e}){return En(t)&&bn()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class kn extends Ae{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:e,name:n,keyframes:i,pseudoElement:s,allowFlatten:o=!1,finalKeyframe:r,onComplete:a}=t;this.isPseudoElement=Boolean(s),this.allowFlatten=o,this.options=t;const l=Vn(t);this.animation=Mn(e,n,i,l,s),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const t=ve(i,this.options,r,this.speed);this.updateMotionValue?.(t),yn(e,n,t),this.animation.cancel()}a?.(),this.notifyFinished()},Se(this,t,l)}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){this.isStopped||(this.isStopped=!0,"idle"!==this.state&&null===this.finishedTime&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||(this.animation.onfinish=null,this.cancel())))}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return m(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+m(t)}get time(){return m(Number(this.animation.currentTime)||0)}set time(t){const e=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=p(t),e&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,onAttach:e,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&wn()?(this.animation.timeline=t,e?.(this.animation),c):n(this)}}const Dn={anticipate:M,backInOut:P,circInOut:k};function Cn(t){"string"==typeof t.ease&&t.ease in Dn&&(t.ease=Dn[t.ease])}const Rn=10;class Ln extends kn{constructor(t){Cn(t),we(t),super(t),void 0!==t.startTime&&!1!==t.autoplay&&(this.startTime=t.startTime),this.options=t}elapsed(){return"running"===this.state?(U.now()-this.startTime)*this.speed:1e3*this.time}sample(t){if(!this.sampler){const{motionValue:t,onUpdate:e,onComplete:n,onPlay:i,onStop:s,element:o,...r}=this.options;this.sampler=new Ee({...r,autoplay:!1}),this.sampler.stop()}return this.sampler.sample(Math.max(0,t)).value}liveValue(){const{state:t}=this;if("running"===t||"paused"===t)return this.sample(this.elapsed())}updateMotionValue(t){const{motionValue:e,element:n,name:s}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);const{speed:o}=this,r=this.elapsed(),a="running"===this.state&&o?i(0,10,r):0,l=this.sample(r);n&&s&&yn(n,s,l),e.setWithVelocity(this.sample(r-a*Math.sign(o)),l,a/Math.abs(o||1))}}const Bn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!At.test(t)&&"0"!==t||t.startsWith("url(")));function jn(t){t.duration=0,t.type="keyframes"}const On=new Set(["opacity","clipPath","filter","transform"]),Fn=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;const In=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Wn=()=>!s.useManualTiming&&Object.hasOwnProperty.call(Element.prototype,"animate");function Nn(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:o,type:r,keyframes:a}=t;if(!n||!On.has(n)&&!In.has(n))return!1;const l=e?.owner?.current;if(!(l instanceof HTMLElement||l instanceof SVGElement))return!1;const{onUpdate:c,transformTemplate:u}=e.owner.getProps();return Wn()&&(On.has(n)||In.has(n)&&function(t){for(let e=0;e<t.length;e++)if("string"==typeof t[e]&&Fn.test(t[e]))return!0;return!1}(a))&&("transform"!==n||!u)&&!c&&!i&&"mirror"!==s&&0!==o&&"inertia"!==r}const Un=(t,e)=>e&&"number"==typeof t?e.transform(t):t,$n={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},zn=Ze.length,Kn={},Gn=(t,e,n=Un(e,Be[t]))=>(Kn[t]||(Kn[t]=($n[t]||t)+"("))+n+")",Yn=(t,e)=>("number"==typeof e?e:parseFloat(e))===(t.startsWith("scale")?1:0);function Xn(t,e,n){let i="";for(let s=0;s<zn;s++){const o=Ze[s],r=t[o];if(void 0===r)continue;const a=n&&(e[o]=Un(r,je[o]));Yn(o,r)||(i+=Gn(o,r,a||void 0)+" ")}const s=t.pathRotation;return s&&(i+=Gn("rotate",s)),i=i.trim(),n?n(e,i):i||"none"}const Hn=new WeakMap,qn=.001,_n=(t,e)=>t-e,Zn=(t,e,n)=>{const i=[];for(let s=0;s<=n;s++)i.push(Vt(t,e,s/n));return i},Jn=t=>t.motionValue.owner,Qn=t=>Hn.get(t),ti=(t,e)=>t.latestValues?t.latestValues[e]:t.getValue(e)?.get();class ei extends Ee{constructor(t){const e=Jn(t).current,{driver:n=Xt}=t;let i;const s=function(t){const e=Jn(t),{onUpdate:n,transformTemplate:i}=e.getProps();return!(t.isHandoff||n||t.hasOnUpdate||i||"inertia"===t.type||"none"!==(ti(e,"transform")||"none")||ti(e,"pathRotation")||e.projection?.isProjecting())}(t);t.driver=t=>{const s=n(t);return{js:s,now:s.now,start:(t=!0)=>{const n=Qn(e);!n||n.isJS?s.start(t):n.schedule(!1,!t)},stop:()=>{s.stop();const t=Qn(e);t&&!t.isFinishing&&t.release(i)}}},super(t),i=this,this.canAccelerate=s;const{stop:o}=this;this.stop=()=>{this.isAccelerated()&&this.sync(),o()}}get group(){return Qn(Jn(this.options).current)}get js(){return this.driver?.js}get name(){return this.options.name}timing(){const{startTime:t,speed:e,totalDuration:n}=this,{delay:i=0,repeatType:s}=this.options;return null!==this.holdTime?[1/0,0]:n===1/0?[t+i/e,this.resolvedDuration*("loop"===s?1:2)/e||1]:[t+(i+n)/e,0]}isAccelerated(){const{group:t,state:e}=this;return t?.tracks.has(this)&&!t.isJS&&this.canAccelerate&&("running"===e||"paused"===e)}liveValue(){return this.isAccelerated()?this.sampleAt(U.now()):void 0}tween(){const{keyframes:t,type:e,ease:n,times:i,repeat:s,delay:o=0}=this.options,r=j(n)?Sn(n):(t=>/^(linear|ease(In|Out|InOut))$/.test(t))(n)&&An[n];if(r&&!s&&!i&&2===t.length&&e===fe&&null===this.holdTime){const t=this.startTime+o/this.speed;return[t,t+this.resolvedDuration/this.speed,r]}}boundaries(t,e){const{startTime:n,speed:i,resolvedDuration:s,options:o}=this,{delay:r=0,repeat:a=0,repeatDelay:l=0,repeatType:c,times:u,keyframes:h,type:d}=o,p=(d||fe)===fe?u||de(h):[0,1],m=n+r/i,f=[];if(null!==this.holdTime||!(s>0))return f;for(let n=Math.max(0,Math.floor((t-m)*i/s));n<=a;n++){const o=m+n*s/i;if(o>e)break;for(const r of p){const a=o+(n%2&&c&&"loop"!==c?1-r:r)*(s-l)/i;a>t&&a<e&&f.push(a)}}return f}numberAt(t){return parseFloat(this.sampleAt(t,!0))}sync(){const t=U.now();this.options.motionValue.setWithVelocity(this.sampleAt(t-10,!0),this.sampleAt(t,!0),10)}play(){this.isStopped||((this.group||function(t){const e=t.current,n=new Set,i=new Map;let s={},o=[],r=new Map,a=[],l=!1,c=!1,u=!1,d=!1,p=-1/0;const m=t=>{for(const e of n)if(e.name===t)return!0},f=(e,n)=>{const r={};for(const a of void 0===e?Ze:o){const o=i.get(a),l=void 0===e?ti(t,a):o?o.sampleAt(n>e&&!o.timing()[1]?n:e):s[a];void 0!==l&&(r[a]=l)}return r},g=(t,e)=>{let n="";for(const i in t){const s=t[i];e&&Yn(i,s)||(n+=Gn(i,s)+" ")}return(e?n.trim():n)||"none"},y=(t,e)=>g(f(t,e)),v=(t=f())=>{e.style.transform=g(t,!0)},x=(t=!0)=>{t&&v(),a.forEach(({animation:t})=>t.cancel()),a=[]},w=(t,n)=>new Animation(new KeyframeEffect(e,t,n)),T=(t,e,n=1/0)=>{const i={animation:t,offset:e,end:n};t.startTime=U.now()+e,n<1/0&&(t.onfinish=()=>{i.isDone=!0,a.some(t=>t.end===1/0)&&(t.cancel(),a=a.filter(t=>t!==i)),C.schedule(!1)}),t.oncancel=()=>a.includes(i)&&C.demote(),a.push(i)},b=(t,e,n)=>{const i=(e,n)=>Math.abs(t(n)-t(e)),s=i(e,n);for(;n-e>.01;){const t=(e+n)/2;i(e,t)>i(t,n)?n=t:e=t}return i(e,n)>s/2?[e,n]:[]},S=(t,e,n,i)=>{const s=Math.min(200,Math.max(2,Math.ceil((n-e)/Rn)));if(4*i.length>s)return;const o=Zn(e,n,s).concat(i).sort(_n),r=t=>h(e,n,t);let a,l;for(const e of t){const t=o.map(t=>e.numberAt(t)),[n]=t,i=t.map(t=>t-n),s=i[i.length-1],r=i.some(t=>Math.abs(t)*qn>Math.abs(s))?0:s,c=i.map(t=>r?t/r:t);if(r)if(a){if(c.some((t,e)=>!(Math.abs(t-a[e])<=qn)))return}else a=c,l=t=>(e.numberAt(t)-n)/r;else if(c.some(t=>!(Math.abs(t)<=qn)))return}if(!a||a.every((t,e)=>Math.abs(t-r(o[e]))<=qn))return"linear";const c=[],u=(t,e=l(t))=>c.push(Me(e)+" "+Me(100*r(t))+"%");return a.forEach((t,e)=>{e&&Math.abs(t-a[e-1])>.2&&b(l,o[e-1],o[e]).forEach(t=>u(t)),u(o[e],t)}),"linear("+c+")"},A=(t,e,n,i)=>{const s=[e],o=(e,n)=>t.every(t=>!(Math.abs(t.numberAt((e+n)/2)-(t.numberAt(e)+t.numberAt(n))/2)>(t.name.startsWith("scale")?.001:.1))),r=(e,n,i)=>{if(n-e<1||o(e,n))s.push(n);else if(i<4)r(e,(e+n)/2,i+1),r((e+n)/2,n,i+1);else{for(const i of t)s.push(...b(t=>i.numberAt(t),e,n));s.push(n)}},a=Zn(e,n,Math.ceil((n-e)/100));for(const t of i)a.push(t,Math.min(t+.01,n));let l=e;for(const t of a.sort(_n))t>l&&r(l,t,0),l=t;return s.sort(_n)},P=t=>{let e;for(const n of t){const t=n.tween();if(!t||e?.some((e,n)=>n<2?Math.abs(t[n]-e)>1:t[n]!==e))return;e=t}return e},M=(t,e,n,i={fill:"both"},s,o)=>{const r=t.flatMap(t=>t.boundaries(e,n)),a=o||S(t,e,n,r),l=a?[e,n]:A(t,e,n,r),c=l.map(t=>y(t,s));let u={transform:c};return a||(u.offset=l.map(t=>h(e,n,t))),c.every(t=>t===c[0])&&(v(f(e,s)),u=null),w(u,{...i,duration:n-e,easing:a||"linear"})},E=e=>{let l=e,c=0,u=0;const h=[],d=[],p=new Set;i.clear(),r=new Map;for(const t of n){i.set(t.name,t);const[n,s]=t.timing(),o=n===1/0;if(r.set(t,[t.at(e),t.speed,o]),o)t.sync();else{if(t.speed<0)return;if(s){if(c){const t=(n-u)/s;if(Math.abs(s-c)>1||Math.abs(t-Math.round(t))*c>1)return}else c=s,u=n;d.push(t)}else p.add(n);h.push(t),l=Math.max(l,n)}}s={},o=Ze.filter(e=>{if(i.has(e))return!0;const n=s[e]=ti(t,e);return void 0!==n&&parseFloat(n)!==(e.startsWith("scale")?1:0)}),x(!1);const m=!c&&P(h);try{if(m&&m[1]>e){const[t,n,i]=m;T(M(h,t,n,void 0,void 0,i),t-e,n-t)}else l>e&&(T(M(h,e,l),0,l-e),p.forEach(t=>t<l-1&&T(w(null,{duration:t-e}),0,t-e)));if(c){const t=u+Math.floor((l-u)/c)*c;T(M(d,t,t+c,{iterations:1/0,iterationStart:(l-t)/c,fill:"forwards"},l),l-e)}}catch{return}return a.length||x(),!0},V=t=>{let e,i=0;for(const s of n){const n=r.get(s);if(!n)return!1;const[o,a,l]=n,c=s.at(t),u=s.timing()[0]===1/0;if(l){if(u&&c===o)continue;return!1}const h=(c-o)/a,d=u?0:s.speed/a;if(void 0===e)e=h,i=d;else if(Math.abs(h-e)>1||d!==i)return!1}if(void 0===e)return!0;if(!a.length)return!1;for(const{offset:t,end:n,isDone:i}of a){const s=e-t;if(n<1/0&&(i?s<n-1:s<0||s>=n))return!1}for(const{animation:n,offset:s,isDone:o}of a){if(o)continue;const r=e-s;i&&n.updatePlaybackRate&&"running"===n.playState&&Math.abs(Number(n.currentTime)-r)<20?n.playbackRate!==i&&n.updatePlaybackRate(i):i?(n.playbackRate=i,n.startTime=t-r/i):(n.startTime=null,n.currentTime=r)}return!0},k=()=>!n.size&&(u=!0,Qn(e)===C&&Hn.delete(e),C.isJS||x(),!0),D=()=>{const e=U.now();if(C.isJS||(C.isFinishing=!0,n.forEach(n=>{const[i,o]=n.timing();"running"===n.state&&n.speed>0&&!o&&i<=e+1&&(n.complete(),s[n.name]=ti(t,n.name),r.has(n)||(l=!0))}),C.isFinishing=!1),c=!1,u)return;if(n.forEach(({state:t},e)=>{"idle"!==t&&"finished"!==t||n.delete(e)}),k())return;for(const t of n)if(!t.canAccelerate)return C.demote(!0);C.isJS&&(C.isJS=!1,l=!0,n.forEach(t=>t.js?.stop()));const i=l,o=d;if(l=d=!1,i||!V(e)){if(o){if(e-p<100)return C.demote();p=e}if(!E(e))return C.demote()}},C={tracks:n,isJS:!1,isFinishing:!1,schedule(t,e){u||(l||(l=t),d||(d=!!e),c||(c=!0,I.isProcessing?Kt.render(D,!1,!0):queueMicrotask(D)))},release(t){const{state:e}=t;"idle"!==e&&"finished"!==e||n.delete(t),k()||C.schedule(!0)},check(){if(!C.isJS)for(const e in s)if(ti(t,e)!==s[e]&&!m(e))return C.schedule(!0,!0)},demote(t){C.isJS||u||(n.forEach(e=>{e.isAccelerated()&&e.sync(),t||(e.canAccelerate=!1)}),C.isJS=!0,r=new Map,x(),n.forEach(t=>"running"===t.state&&t.js?.start()))}};return Hn.set(e,C),C}(Jn(this.options))).tracks.add(this),super.play())}pause(){super.pause(),this.isAccelerated()&&(this.sync(),this.group.schedule(!1))}complete(){super.complete();const{group:t}=this;t&&!t.isJS&&this.canAccelerate&&this.tick(U.now())}get time(){return this.isAccelerated()?m(i(0,this.totalDuration,this.at(U.now())-(this.options.delay||0))):super.time}set time(t){super.time=t,this.isAccelerated()&&this.sync()}attachTimeline(t){return this.canAccelerate=!1,this.group?.demote(!0),super.attachTimeline(t)}}class ni extends Ae{constructor(t){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=U.now();const{keyframes:e,name:n,motionValue:i,element:s}=t,o=t;o.autoplay??(o.autoplay=!0),o.delay??(o.delay=0),o.type??(o.type="keyframes"),o.repeat??(o.repeat=0),o.repeatDelay??(o.repeatDelay=0),o.repeatType??(o.repeatType="loop");const r=s?.KeyframeResolver||fn;this.keyframeResolver=new r(e,(t,e,n)=>this.onKeyframesResolved(t,e,o,!n),n,i,s),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,e,n,i){this.keyframeResolver=void 0;const{name:o,type:r,velocity:a,delay:l,isHandoff:c,onUpdate:u}=n;this.resolvedAt=U.now();const h=function(t,e,n,i){const s=t[0];if(null===s)return!1;if("display"===e||"visibility"===e)return!0;const o=t[t.length-1],r=Bn(s,e),a=Bn(o,e);return!(!r||!a)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(t)||("spring"===n||En(n))&&i)}(t,o,r,a);h||(!s.instantAnimations&&l||u?.(ve(t,n,e)),t[0]=t[t.length-1],jn(n),n.repeat=0);const{onComplete:d}=n;n.finalKeyframe=e,n.keyframes=t,n.onComplete=()=>{d?.(),this.notifyFinished()};const p=h&&!c&&Nn(n),m=!p&&(({name:t,motionValue:e})=>t&&Ze.includes(t)&&e?.owner?.current instanceof HTMLElement&&Wn()&&bn())(n);let f;if(i&&(p||m||this.resolvedAt!==this.createdAt)&&(n.startTime??(n.startTime=Te(this.createdAt,this.resolvedAt))),p){n.element=n.motionValue?.owner?.current;try{f=new Ln(n)}catch{f=new Ee(n)}}else f=m?new ei(n):new Ee(n);this.pendingTimeline&&(this.stopTimeline=f.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=f}get finished(){return this._animation?this._animation.finished:super.finished}then(t,e){return this.finished.finally(t).then(()=>{})}liveValue(){return this._animation?.liveValue?.()}get animation(){return this._animation||(this.keyframeResolver?.resume(),mn()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation?.cancel(),this.keyframeResolver?.cancel()}}class ii{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}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=>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 state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return si(this.animations,"duration")}get iterationDuration(){return si(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function si(t,e){let n=0;for(let i=0;i<t.length;i++){const s=t[i][e];null!==s&&s>n&&(n=s)}return n}class oi extends ii{then(t,e){return this.finished.finally(t).then(()=>{})}}class ri extends kn{constructor(t){super(),this.animation=t,t.onfinish=()=>{this.finishedTime=this.time,this.notifyFinished()},Se(this,{})}}const ai=new WeakMap,li=(t,e="")=>`${t}:${e}`;function ci(t){let e=ai.get(t);return e||(e=new Map,ai.set(t,e)),e}function ui(t,e,n,i=0,s=1){const o=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),r=t.size,a=(r-1)*i;return"function"==typeof n?n(o,r):1===s?o*i:a-o*i}const hi={current:void 0};class di{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=U.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.dirty(),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=U.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){var n;return"change"===t?this.onChangeSubscribe(e):((n=this.events)[t]||(n[t]=new d)).add(e)}onChangeSubscribe(t){const{events:e}=this;return e.change||this.changeSubscriber?(e.change||(e.change=new d,e.change.add(this.changeSubscriber),this.changeSubscriber=void 0),e.change.add(t)):this.changeSubscriber=t,()=>{this.changeSubscriber===t?this.changeSubscriber=void 0:e.change?.remove(t),this.stopIfUnobserved()}}stopIfUnobserved(){Kt.read(()=>{this.changeSubscriber||this.events.change?.getSize()||this.stop()})}clearListeners(){this.changeSubscriber=void 0;for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect?.()}dirty(){const{current:t,changeSubscriber:e}=this;e?e(t):this.events.change?.notify(t)}addDependent(t){(this.dependents||(this.dependents=new Set)).add(t)}removeDependent(t){this.dependents?.delete(t)}get(){hi.current?.push(this);const t=this.animation?.liveValue?.();return void 0===t?this.current:t}getCurrent(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=U.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return f(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0;let n,i=!1;n=t(()=>{i=!0,this.events.animationComplete?.notify(),this.animation===n&&(this.animation=void 0),e()}),i||(this.animation=n),this.events.animationStart?.notify()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel?.notify()),this.animation=void 0}isAnimating(){return!!this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect?.()}}function pi(t,e){return new di(t,e)}function mi(t,e){if(t?.inherit&&e){const{inherit:n,...i}=t;return{...e,...i}}return t}function fi(t,e){const n=t?.[e]??t?.default??t;return n!==t?mi(n,t):n}const gi={type:"spring",stiffness:500,damping:25,restSpeed:10},yi={type:"keyframes",duration:.8},vi={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},xi=(t,{keyframes:e})=>e.length>2?yi:Je.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:gi:vi,wi=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed","out"]);function Ti(t){for(const e in t)if(!wi.has(e))return!0;return!1}const bi=(t,e,n,i={},o,r)=>a=>{const l=fi(i,t)||{},c=l.delay||i.delay||0;let{elapsed:u=0}=i;u-=p(c);const h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...l,delay:-u,onUpdate:t=>{e.set(t),l.onUpdate&&l.onUpdate(t)},onComplete:()=>{a(),l.onComplete&&l.onComplete()},name:t,motionValue:e,element:r?void 0:o,hasOnUpdate:!!l.onUpdate};Ti(l)||Object.assign(h,xi(t,h)),h.duration&&(h.duration=p(h.duration)),h.repeatDelay&&(h.repeatDelay=p(h.repeatDelay)),void 0!==h.from&&(h.keyframes[0]=h.from);let d=!1;if((!1===h.type||0===h.duration&&!h.repeatDelay)&&(jn(h),0===h.delay&&(d=!0)),(s.instantAnimations||s.skipAnimations||o?.shouldSkipAnimations||l.skipAnimations)&&(d=!0,jn(h),h.delay=0),h.allowFlatten=!l.type&&!l.ease,d&&!r&&void 0!==e.get()){const t=ve(h.keyframes,l);if(void 0!==t)return void Kt.update(()=>{h.onUpdate(t),h.onComplete()})}return l.isSync?new Ee(h):new ni(h)};function Si(t,e,n,i){const s=1-t;return s*s*e+2*s*t*n+t*t*i}function Ai(t,e,n,i,s,o,r){const a=2*(1-t)*(n-e)+2*t*(i-n),l=2*(1-t)*(o-s)+2*t*(r-o);return Math.atan2(l,a)*(180/Math.PI)}function Pi(t,e,n,i,s,o){const r=n-t,a=i-e,l=Math.sqrt(r*r+a*a);if(l>0){const n=s*l;return{x:t+r*o+-a/l*n,y:e+a*o+r/l*n}}return{x:t,y:e}}const Mi=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ei(t){const e=Mi.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}function Vi(t,e,n=1){const[i,s]=Ei(t);if(!i)return;const r=window.getComputedStyle(e).getPropertyValue(i);if(r){const t=r.trim();return o(t)?parseFloat(t):t}return Y(s)?Vi(s,e,n+1):s}function ki(t,e,n,i){const s=e=>"function"==typeof e?e(void 0!==n?n:t.custom,...function(t){const e=[{},{}];return t?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}(i)):e;return"string"==typeof(e=s(e))&&(e=t.variants&&t.variants[e]),s(e)}function Di(t,e,n){return ki(t.getProps(),e,n,t)}const Ci=(t,e)=>"exit"===e?t.presenceContext?.custom:void 0,Ri=new Set(["width","height","top","left","right","bottom",...Ze]),Li=t=>Array.isArray(t);function Bi(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,pi(n))}function ji(t){return Li(t)?t[t.length-1]||0:t}function Oi(t,e){const n=Di(t,e);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const e in o){Bi(t,e,ji(o[e]))}}const Fi=t=>Boolean(t&&t.getVelocity);function Ii(t){return Boolean(Fi(t)&&t.add)}function Wi(t,e){const n=t.getValue("willChange");if(Ii(n))return n.add(e);if(!n&&s.WillChange){const n=new s.WillChange("auto");t.addValue("willChange",n),n.add(e)}}const Ni="data-framer-appear-id";function Ui(t){return t.props[Ni]}const $i="undefined"!=typeof window;function zi({protectedKeys:t,needsAnimating:e},n){const i=n in t&&!e[n];return e[n]=!1,i}function Ki(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:o,transitionEnd:r,...a}=e;const l=t.getDefaultTransition();o=o?mi(o,l):l;const c=o?.reduceMotion,u=o?.skipAnimations;i&&(o=i);const h=[],d=s&&t.animationState?.getState()[s],p=o?.path;p&&(p.animateValues?p.animateValues(e=>t.getValue(e,t.latestValues[e]??0),a,o,n,h):p.animateVisualElement?.(t,a,o,n,h));for(const e in a){const i=t.getValue(e,t.latestValues[e]??null),s=a[e];if(void 0===s||d&&zi(d,e))continue;const r={delay:n,...fi(d?.out[e]||o||{},e)};u&&(r.skipAnimations=!0);const l=i.get();if(void 0!==l&&!i.isAnimating()&&!Array.isArray(s)&&s===l&&!r.velocity){Kt.update(()=>i.set(s));continue}let p=!1;if($i&&window.MotionHandoffAnimation){const n=Ui(t);if(n){const t=window.MotionHandoffAnimation(n,e,Kt);null!==t&&(r.startTime=t,p=!0)}}Wi(t,e);const m=c??t.shouldReduceMotion;i.start(bi(e,i,s,m&&Ri.has(e)?{type:!1}:r,t,p));const f=i.animation;f&&h.push(f)}if(r){const e=()=>Kt.update(()=>{r&&Oi(t,r)});h.length?Promise.all(h).then(e):e()}return h}function Gi(t,e,n={}){const i=Di(t,e,Ci(t,n.type)),s=n.transitionOverride||(i?.transition??(t.getDefaultTransition()||{})),o=()=>Promise.all(i?Ki(t,i,n):[]),r=(i=0)=>{const{variantChildren:o}=t,{delayChildren:r=0,staggerChildren:a,staggerDirection:l}=s,c=[];return o?.forEach(t=>{t.notify("AnimationStart",e),c.push(Gi(t,e,{...n,delay:i+("function"==typeof r?0:r)+ui(o,t,r,a,l)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(c)},{when:a}=s;return a?"beforeChildren"===a?o().then(()=>r()):r().then(o):Promise.all([o(),r(n.delay)])}function Yi(t,e,n={}){t.notify("AnimationStart",e);return(Array.isArray(e)?Promise.all(e.map(e=>Gi(t,e,n))):"string"==typeof e?Gi(t,e,n):Promise.all(Ki(t,Di(t,e,n.custom),n))).then(()=>{t.notify("AnimationComplete",e)})}const Xi=t=>e=>e.test(t),Hi=[q,ct,lt,at,ht,ut,{test:t=>"auto"===t,parse:t=>t}],qi=t=>Hi.find(Xi(t));function _i(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||a(t))}const Zi=new Set(["auto","none","0"]);class Ji extends fn{constructor(){super(...arguments),this.isAsync=!0}scheduleResolve(){if(this.canReadNow()&&(this.readKeyframes(),!this.needsMeasurement))return this.complete();super.scheduleResolve()}canReadNow(){const{unresolvedKeyframes:t,element:e,motionValue:n}=this,i=t[0]??n?.get();if(!e?.current||void 0===i)return!1;for(let e=0;e<t.length;e++)if(H(e?t[e]:i))return!1;return!0}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e?.current)return;super.readKeyframes();for(let n=0;n<t.length;n++){let i=t[n];if("string"==typeof i&&(i=i.trim(),Y(i))){const s=Vi(i,e.current);void 0!==s&&(t[n]=s),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!Ri.has(n)||2!==t.length)return;const[i,s]=t;if("number"==typeof i&&"number"==typeof s)return;const o=qi(i),r=qi(s);if(H(i)!==H(s)&&an[n])this.needsMeasurement=!0;else if(o!==r)if(Qe(o)&&Qe(r))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else an[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)(null===t[e]||_i(t[e]))&&n.push(e);n.length&&function(t,e,n){let i,s=0;for(;s<t.length&&!i;){const e=t[s];"string"==typeof e&&!Zi.has(e)&&wt(e)&&(i=t[s]),s++}if(i&&n)for(const s of e)t[s]!==i&&(t[s]=We(n,i))}(t,n,e)}measure(){const{element:t,name:e}=this;return an[e](window.getComputedStyle(t.current),()=>t.measureViewportBox())}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t?.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=this.measure(),e[0]=this.measuredOrigin;const i=e[e.length-1];void 0!==i&&this.motionValue?.jump(i,!1)}measureEndState(){const{element:t,unresolvedKeyframes:e}=this;if(!t?.current)return;this.motionValue?.jump(this.measuredOrigin,!1);const n=e.length-1,i=e[n];e[n]=this.measure(),null!==i&&void 0===this.finalKeyframe&&(this.finalKeyframe=i),this.resolveNoneKeyframes()}}const Qi=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],ts=new Set(["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius",...Qi,"width","maxWidth","height","maxHeight","top","right","bottom","left","inset","insetBlock","insetBlockStart","insetBlockEnd","insetInline","insetInlineStart","insetInlineEnd","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingBlock","paddingBlockStart","paddingBlockEnd","paddingInline","paddingInlineStart","paddingInlineEnd","margin","marginTop","marginRight","marginBottom","marginLeft","marginBlock","marginBlockStart","marginBlockEnd","marginInline","marginInlineStart","marginInlineEnd","fontSize","backgroundPositionX","backgroundPositionY"]);function es(t,e){for(let n=0;n<t.length;n++)"number"==typeof t[n]&&ts.has(e)&&(t[n]=t[n]+"px")}const ns=l(()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0}),is=[];function ss(t){os(t),is.unshift(t)}function os(t){n(is,t)}function rs(t){return is.find(e=>e.test(t))}function as(t,e,n={},i){const s=[],{velocity:o,path:r}=n,a=n.reduceMotion??i?.shouldReduceMotion;r?.animateValues&&i&&(e={...e},r.animateValues(t,e,n,0,s));for(const r in e){if("transition"===r||"transitionEnd"===r)continue;const l=e[r];if(void 0===l)continue;const c=t(r),u=c.get();void 0===u||c.isAnimating()||Array.isArray(l)||l!==u||o?(c.start(bi(r,c,l,a&&Ri.has(r)?{type:!1}:n,i)),c.animation&&s.push(c.animation)):Kt.update(()=>c.set(l))}const{transitionEnd:l}=e;if(l){const e=()=>Kt.update(()=>{for(const e in l)t(e).set(l[e])});s.length?Promise.all(s).then(e):e()}return s}function ls(t,e,n,i,s){return as(i=>{let o=t.get(e,i);if(!o){let r;if(!s){const s=n[i];r=function(t){const e=Array.isArray(t)?t[0]:void 0;return null===e?void 0:e}(s)??t.read(e,i,s)}o=pi(r,{owner:s}),t(e,{[i]:o})}return o},n,i,s)}function cs(t){return r(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}function us(t){return r(t)&&"ownerSVGElement"in t}const hs={};function ds(t){return hs.current?.add(t),t}function ps(t){const e=hs.current;if(!e)return;let n,i=!1;const s=e.add(()=>{i=!0,n?.()});t.then(t=>{t&&(n=()=>t.stop(),i?n():t.finished.then(s))},s)}const ms=t=>hs.current?hs.current.bind(t):t;function fs(t,e,n){if(null==t)return[];if(t instanceof EventTarget)return[t];if("string"==typeof t){const i=e?e.current:hs.current?.root||document,s=n?.[t]??i.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t).filter(t=>null!=t)}function gs(t){const{test:e,read:n,get:i,flush:s,state:o}=t;return Object.assign((e,n)=>{const i=fs(e),s=[];for(const e of i){const i=t(e,n);s.push(i)}return()=>{for(const t of s)t()}},{test:e,read:n,get:i,flush:s,state:o})}class ys{constructor(t=Kt.render){this.step=t,this.values=new Map,this.pending=[],this.numPending=0,this.flush=()=>{const{pending:t,numPending:e}=this;this.numPending=0;for(let n=0;n<e;n++)t[n]()}}set(t,e,n,i){if(this.values.get(t)?.onRemove(),i)for(const t of this.values.values())t.value===i&&(n=t.render);const s=()=>n&&this.schedule(n);void 0!==e.get()&&s();const o=e.on("change",s),r=()=>{o(),n&&!i&&this.cancel(n),this.values.get(t)?.onRemove===r&&this.values.delete(t)};return this.values.set(t,{value:e,render:i?void 0:n,onRemove:r}),r}get(t){return this.values.get(t)?.value}release(){const t=new Map;return this.values.forEach((e,n)=>{t.set(n,e.value),e.onRemove()}),this.transformKeys=this.transformValues=void 0,t}schedule(t){const{pending:e,numPending:n}=this;for(let i=0;i<n;i++)if(e[i]===t)return;n||this.step(this.flush),e[this.numPending++]=t}cancel(t){const{pending:e}=this;for(let n=0;n<this.numPending;n++)if(e[n]===t)return void(e[n]=e[--this.numPending])}}function vs(t,{step:e,...n}={}){const i=new WeakMap;return Object.assign((n,s)=>{const o=i.get(n)??new ys(e);i.set(n,o);const r=[];for(const e in s){const i=s[e],a=t(n,o,e,i);r.push(a)}return()=>{for(const t of r)t()}},n,{get:(t,e)=>i.get(t)?.get(e),flush:t=>i.get(t)?.flush(),state:t=>i.get(t)})}const xs=new Set(["originX","originY","originZ"]),ws=(t,e)=>Un(t.get(e)?.get(),je[e]),Ts=(t,e,n,i)=>{let s,o;if(Je.has(n)){if("pathRotation"!==n){const t=e.transformKeys??(e.transformKeys=[]);(e.transformValues??(e.transformValues={}))[n]=i,t.includes(n)||(t.push(n),t.sort((t,e)=>Ze.indexOf(t)-Ze.indexOf(e)))}e.get("transform")||(cs(t)||e.get("transformBox")||Ts(t,e,"transformBox",new di("fill-box")),e.set("transform",new di("none"),()=>{Hn.get(t)?.check(),t.style.transform=function(t){let e="";const{transformKeys:n=[],transformValues:i={}}=t;for(let t=0;t<n.length;t++){const s=n[t],o=i[s].getCurrent();void 0!==o&&(Yn(s,o)||(e+=(e&&" ")+Gn(s,o)))}const s=t.get("pathRotation")?.get();return s&&(e+=(e&&" ")+Gn("rotate",s)),e||"none"}(e)})),o=e.get("transform")}else xs.has(n)?(e.get("transformOrigin")||e.set("transformOrigin",new di(""),()=>{const n=ws(e,"originX")??"50%",i=ws(e,"originY")??"50%",s=ws(e,"originZ")??0;t.style.transformOrigin=`${n} ${i} ${s}`}),o=e.get("transformOrigin")):s=gn(n)?()=>{t.style.setProperty(n,i.getCurrent())}:()=>{t.style[n]=Un(i.getCurrent(),je[n])};return e.set(n,i,s,o)},bs=(t,e)=>{if(Je.has(e))return _e(t,e);const n=getComputedStyle(t),i=gn(e)?n.getPropertyValue(e):n[e];return"string"==typeof i&&i.trim()||0},Ss=vs(Ts,{test:t=>cs(t)||us(t),read:bs}),As=gs(Ss);function Ps(t){return t.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}function Ms(t,e,n){const{style:i,vars:s,transformOrigin:o}=t;let r=!1,a=!1;for(const t in e){const n=e[t];if(Je.has(t))r=!0;else if(K(t))s[t]=n;else{const e=Un(n,je[t]);t.startsWith("origin")?(a=!0,o[t]=e):i[t]=e}}if(e.transform||(r||n?i.transform=Xn(e,t.transform,n):i.transform&&(i.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=o;i.transformOrigin=`${t} ${e} ${n}`}}const Es={offset:"stroke-dashoffset",array:"stroke-dasharray"},Vs={offset:"strokeDashoffset",array:"strokeDasharray"};function ks(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?Es:Vs;t[o.offset]=""+-i,t[o.array]=`${e} ${n}`}const Ds=["transform","opacity","clipPath","filter","offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Cs(t,{attrX:e,attrY:n,attrScale:i,pathLength:s,pathSpacing:o=1,pathOffset:r=0,...a},l,c,u){if(Ms(t,a,c),l)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:h,style:d}=t;for(const t of Ds)void 0!==h[t]&&(d[t]=h[t],delete h[t]);(d.transform||h.transformOrigin)&&(d.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),d.transform&&(d.transformBox=u?.transformBox??"fill-box",delete h.transformBox),void 0!==e&&(h.x=e),void 0!==n&&(h.y=n),void 0!==i&&(h.scale=i),void 0!==s&&ks(h,s,o,r,!1)}const Rs=(t,e,n,i,s=n)=>{const o=function(t,e){if(!(e in t))return!1;const n=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),e)||Object.getOwnPropertyDescriptor(t,e);return n&&"function"==typeof n.set}(t,s);o||!s.startsWith("data")&&!s.startsWith("aria")||(s=Ps(s));const r=je[n]||je[s],a=o?()=>{t[s]=Un(i.get(),je[n])}:()=>{const e=Un(i.get(),r);null==e?t.removeAttribute(s):t.setAttribute(s,String(e))};return e.set(n,i,a)},Ls=gs(vs(Rs));const Bs=(t,e,n,i)=>{if(n.startsWith("path")&&!Je.has(n))return function(t,e,n,i){return Kt.render(()=>t.setAttribute("pathLength","1")),"pathOffset"===n?e.set(n,i,()=>{const e=i.get();t.setAttribute("stroke-dashoffset",""+-e)}):(e.get("stroke-dasharray")||e.set("stroke-dasharray",new di("1 1"),()=>{const n=e.get("pathLength")?.get()??1,i=e.get("pathSpacing")?.get();t.setAttribute("stroke-dasharray",`${n} ${i??1-Number(n)}`)}),e.set(n,i,void 0,e.get("stroke-dasharray")))}(t,e,n,i);if(n.startsWith("attr"))return Rs(t,e,n,i,Is(n));return(Je.has(n)||xs.has(n)||gn(n)||n in t.style?Ts:Rs)(t,e,n,i)},js=(t,e)=>Je.has(e)?je[e]?.default||0:gn(e)||Ds.includes(e)?bs(t,e)||t.getAttribute(Ps(e))||0:(e=Is(e),t.getAttribute(Ps(e))??t.getAttribute(e)??void 0),Os=vs(Bs,{test:us,read:js}),Fs=gs(Os);function Is(t){return t.replace(/^attr([A-Z])/,(t,e)=>e.toLowerCase())}function Ws({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function Ns({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Us(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}}function $s(t){return void 0===t||1===t}function zs({scale:t,scaleX:e,scaleY:n}){return!$s(t)||!$s(e)||!$s(n)}const Ks=["rotate","rotateX","rotateY","rotateZ","skewX","skewY"];function Gs(t){return zs(t)||Xs(t)||Ys(t)}function Ys(t){return t.z||t.rotate||t.rotateX||t.rotateY||t.rotateZ||t.skewX||t.skewY}function Xs(t){return Hs(t.x)||Hs(t.y)}function Hs(t){return t&&"0%"!==t}function qs(t,e,n){return n+e*(t-n)}function _s(t,e,n,i,s){return void 0!==s&&(t=qs(t,s,i)),qs(t,n,i)+e}function Zs(t,e=0,n=1,i,s){t.min=_s(t.min,e,n,i,s),t.max=_s(t.max,e,n,i,s)}function Js(t,{x:e,y:n}){Zs(t.x,e.translate,e.scale,e.originPoint),Zs(t.y,n.translate,n.scale,n.originPoint)}const Qs=.999999999999,to=1.0000000000001;function eo(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,"contents"!==o.options.visualElement?.props.style?.display&&(!0===i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&(no(t.x,-o.scroll.offset.x),no(t.y,-o.scroll.offset.y)),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Js(t,r)),i&&(i.path?.[a]||i)!==o&&Gs(o.latestValues)&&oo(t,o.latestValues,o.layout?.layoutBox));e.x<to&&e.x>Qs&&(e.x=1),e.y<to&&e.y>Qs&&(e.y=1)}function no(t,e){t.min+=e,t.max+=e}function io(t,e,n,i,s=.5){Zs(t,e,n,Vt(t.min,t.max,s),i)}function so(t,e){return"string"==typeof t?parseFloat(t)/100*(e.max-e.min):t}function oo(t,e,n){const i=n??t;io(t.x,so(e.x,i.x),e.scaleX,e.scale,e.originX),io(t.y,so(e.y,i.y),e.scaleY,e.scale,e.originY)}function ro(t,e){return Ws(Us(t.getBoundingClientRect(),e))}function ao(t,e,n){const i=ro(t,n),{scroll:s}=e;return s&&(no(i.x,s.offset.x),no(i.y,s.offset.y)),i}const lo={},co=t=>us(t)?Os:Ss;class uo{constructor(t,e){this.effect=t,this.current=e,this.KeyframeResolver=Ji}getValue(t){return this.effect.get(this.current,t)}readValue(t,e){return this.effect.read(this.current,t,e)}render(){this.effect.flush(this.current)}measureViewportBox(){return ro(this.current)}getProps(){return lo}}function ho(t,e,n,i){if(hs.current?.track(t),i)return as(t=>i.getValue(t,null),e,n,i);const s=co(t);return ls(s,t,e,n,new uo(s,t))}const po=t=>co(t).state(t)?.release();function mo(t,e){const n=co(t).state(t);if(!n)return;const i=Hn.get(t);i&&(i.demote(),Hn.delete(t));const{transformKeys:s}=n;n.release().forEach((t,n)=>{"transformBox"===n||"transform"===n&&s?.length||(t.owner=e,e.addValue(n,t))})}const fo=vs((t,e,n,i)=>e.set(n,i,()=>{t[n]=i.get()}),{test:t=>r(t),read:(t,e)=>{const n=t[e];return"string"==typeof n||"number"==typeof n?n:void 0}}),{schedule:go,cancel:yo}=zt(queueMicrotask,!1);function vo(t,e,n){const i=Fi(t)?t:pi(t);return i.start(bi("",i,e,n)),i.animation}const xo={};const wo={value:null,addProjectionMetrics:null};function To(t,e){const n=U.now();t=ms(t);const i=({timestamp:s})=>{const o=s-n;o>=e&&(Gt(i),t(o-e))};return Kt.setup(i,!0),ds(()=>Gt(i))}function bo(t,e){return To(t,p(e))}function So(t){return us(t)&&"svg"===t.tagName}function Ao(t){return Fi(t)?t.get():t}const Po=t=>"number"==typeof t?t:parseFloat(t),Mo=Qi.length,Eo=t=>"number"==typeof t||ct.test(t);function Vo(t,e,n,i,s,o){s?(t.opacity=Vt(0,n.opacity??1,Do(i)),t.opacityExit=Vt(e.opacity??1,0,Co(i))):o&&(t.opacity=Vt(e.opacity??1,n.opacity??1,i));for(let s=0;s<Mo;s++){const o=Qi[s];let r=ko(e,o),a=ko(n,o);if(void 0===r&&void 0===a)continue;r||(r=0),a||(a=0);0===r||0===a||Eo(r)===Eo(a)?(t[o]=Math.max(Vt(Po(r),Po(a),i),0),(lt.test(a)||lt.test(r))&&(t[o]+="%")):t[o]=a}for(let s=0;s<Ks.length;s++){const o=Ks[s];(e[o]||n[o])&&(t[o]=Vt(e[o]||0,n[o]||0,i))}}function ko(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const Do=Ro(0,.5,V),Co=Ro(.5,.95,c);function Ro(t,e,n){return i=>i<t?0:i>e?1:n(h(t,e,i))}function Lo(t,e){t.min=e.min,t.max=e.max}function Bo(t,e){Lo(t.x,e.x),Lo(t.y,e.y)}function jo(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Oo(t){return t.max-t.min}function Fo(t,e,n){return Math.abs(t-e)<=n}function Io(t,e,n,i=.5){t.origin=i,t.originPoint=Vt(e.min,e.max,t.origin),t.scale=Oo(n)/Oo(e),t.translate=Vt(n.min,n.max,t.origin)-t.originPoint,(t.scale>=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function Wo(t,e,n,i){Io(t.x,e.x,n.x,i?.originX),Io(t.y,e.y,n.y,i?.originY)}function No(t,e,n,i=0){const s=i?Vt(n.min,n.max,i):n.min;t.min=s+e.min,t.max=t.min+Oo(e)}function Uo(t,e,n,i){No(t.x,e.x,n.x,i?.x),No(t.y,e.y,n.y,i?.y)}function $o(t,e,n,i=0){const s=i?Vt(n.min,n.max,i):n.min;t.min=e.min-s,t.max=t.min+Oo(e)}function zo(t,e,n,i){$o(t.x,e.x,n.x,i?.x),$o(t.y,e.y,n.y,i?.y)}function Ko(t,e,n,i,s){return t=qs(t-=e,1/n,i),void 0!==s&&(t=qs(t,1/s,i)),t}function Go(t,e=0,n=1,i=.5,s,o=t,r=t){if(lt.test(e)){e=parseFloat(e);e=Vt(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=Vt(o.min,o.max,i);t===o&&(a-=e),t.min=Ko(t.min,e,n,a,s),t.max=Ko(t.max,e,n,a,s)}function Yo(t,e,[n,i,s],o,r){Go(t,e[n],e[i],e[s],e.scale,o,r)}const Xo=["x","scaleX","originX"],Ho=["y","scaleY","originY"];function qo(t,e,n,i){Yo(t.x,e,Xo,n?.x,i?.x),Yo(t.y,e,Ho,n?.y,i?.y)}const _o=()=>({translate:0,scale:1,origin:0,originPoint:0}),Zo=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),Jo=()=>({min:0,max:0}),Qo=()=>({x:{min:0,max:0},y:{min:0,max:0}});function tr(t){return 0===t.translate&&1===t.scale}function er(t){return tr(t.x)&&tr(t.y)}function nr(t,e){return t.min===e.min&&t.max===e.max}function ir(t,e){return nr(t.x,e.x)&&nr(t.y,e.y)}function sr(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function or(t,e){return sr(t.x,e.x)&&sr(t.y,e.y)}function rr(t){return Oo(t.x)/Oo(t.y)}function ar(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class lr{constructor(){this.members=[]}add(t){e(this.members,t);for(let e=this.members.length-1;e>=0;e--){const i=this.members[e];if(i===t||i===this.lead||i===this.prevLead)continue;const s=i.instance;s&&!1!==s.isConnected||i.snapshot||(n(this.members,i),i.unmount())}t.scheduleRender()}remove(t){if(n(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){for(let e=this.members.indexOf(t)-1;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent&&!1!==t.instance?.isConnected)return this.promote(t),!0}return!1}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.updateSnapshot(),t.scheduleRender();const{layoutDependency:i}=n.options,{layoutDependency:s}=t.options;void 0!==i&&i===s||(t.resumeFrom=n,e&&(n.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),!1===t.options.crossfade&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}function cr(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const ur={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!ct.test(t))return t;t=parseFloat(t)}return`${cr(t,e.target.x)}% ${cr(t,e.target.y)}%`}},hr={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=At.parse(t);if(s.length>5)return i;const o=At.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 c=Vt(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=c),"number"==typeof s[3+r]&&(s[3+r]/=c),o(s)}},dr={borderRadius:Object.assign({},ur,{applyTo:Qi.slice()}),borderTopLeftRadius:ur,borderTopRightRadius:ur,borderBottomLeftRadius:ur,borderBottomRightRadius:ur,boxShadow:hr};function pr(t,e,n){let i="";const s=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;if((s||o||r)&&(i=`translate3d(${s}px, ${o}px, ${r}px) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t}=n;t&&(i=`perspective(${t}px) ${i}`);for(let t=0;t<Ks.length;t++){const e=Ks[t],s=n[e];s&&(i+=`${e}(${s}deg) `),!t&&n.pathRotation&&(i+=`rotate(${n.pathRotation}deg) `)}}const a=t.x.scale*e.x,l=t.y.scale*e.y;return 1===a&&1===l||(i+=`scale(${a}, ${l})`),i||"none"}function mr(t){return[t("x"),t("y")]}const fr=(t,e)=>t.depth-e.depth;class gr{constructor(){this.children=[],this.isDirty=!1}add(t){e(this.children,t),this.isDirty=!0}remove(t){n(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(fr),this.isDirty=!1,this.children.forEach(t)}}const yr={hasAnimatedSinceResize:!0,hasEverUpdated:!1},vr={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},xr=["z","skew","skewZ"];let wr=0;function Tr(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}const br=({instance:t})=>t&&Hn.get(t)?.demote();function Sr(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Ui(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",Kt,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&Sr(i)}function Ar({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:o}){return Object.assign(xo,{...dr,...xo}),class{constructor(t={},n=e?.()){this.id=wr++,this.animationId=0,this.animationCommitId=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.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,wo.value&&(vr.nodes=vr.calculatedTargetDeltas=vr.calculatedProjections=0),this.nodes.forEach(Er),this.nodes.forEach(Fr),this.nodes.forEach(Ir),this.nodes.forEach(Vr),wo.addProjectionMetrics&&wo.addProjectionMetrics(vr)},this.resolvedRelativeTargetAt=0,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 gr)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new d),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){this.eventHandlers.get(t)?.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e){if(this.instance)return;this.isSVG=us(e)&&!So(e),this.instance=e;const{layoutId:n,layout:i,visualElement:s}=this.options;if(s&&!s.current&&s.mount(e),this.root.nodes.add(this),this.parent?.children.add(this),this.root.hasTreeAnimated&&(i||n)&&(this.isLayoutDirty=!0),t){let n,i=0;const s=()=>this.root.updateBlockedByResize=!1;Kt.read(()=>{i=window.innerWidth}),t(e,()=>{const t=window.innerWidth;t!==i&&(i=t,this.root.updateBlockedByResize=!0,n?.(),n=To(s,250),yr.hasAnimatedSinceResize&&(yr.hasAnimatedSinceResize=!1,this.nodes.forEach(Or)))})}n&&this.root.registerSharedNode(n,this),this.addLayoutListener()}addLayoutListener(){const{layoutId:t,layout:e,visualElement:n,animate:i}=this.options;this.instance&&!this.hasLayoutListener&&!1!==i&&n&&(t||e)&&(this.hasLayoutListener=!0,this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:i,layout:s})=>{if(this.isAnimationBlocked)return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||n.getDefaultTransition()||zr,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=n.getProps(),l=!this.targetLayout||!or(this.targetLayout,s),c=!e&&i;if(this.options.layoutRoot||this.resumeFrom||c||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const e={...fi(o,"layout"),onPlay:r,onComplete:a};(n.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,c,e.path)}else e||Or(this),this.isLead()&&this.options.onExitComplete?.();this.targetLayout=s}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),this.getStack()?.remove(this),this.parent?.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),this.hasLayoutListener=!1,Gt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes?.forEach(Wr),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?.();if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Sr(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;br(this),this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,br(e),"string"!=typeof e.latestValues.x&&"string"!=typeof e.latestValues.y||(e.isLayoutDirty=!0),e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1),e.isAnimationBlocked&&(e.dragSnapshot||(e.dragSnapshot=e.measure()),this.dragAncestor=e)}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()){const t=this.updateBlockedByResize;return this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),t&&this.nodes.forEach(Cr),void this.nodes.forEach(Dr)}if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(Rr);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Lr),this.nodes.forEach(Br),this.nodes.forEach(jr),this.nodes.forEach(Pr),this.nodes.forEach(Mr)):this.nodes.forEach(Rr),this.clearAllSnapshots();const t=U.now();I.delta=i(0,1e3/60,t-I.timestamp),I.timestamp=t,I.isProcessing=!0,Yt.update.process(I),Yt.preRender.process(I),Yt.render.process(I),I.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,go.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(kr),this.sharedNodes.forEach((t,e)=>t.members.length?t.removeLeadSnapshot():this.sharedNodes.delete(e))}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Kt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Kt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||Oo(this.snapshot.measuredBox.x)||Oo(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}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||(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?.notify("LayoutMeasure",this.layout.layoutBox,t?.layoutBox)}updateScroll(t="measure"){const{scroll:e,instance:i}=this,{animationId:o}=this.root;if(this.options.layoutScroll&&i&&(!e||e.animationId!==o||e.phase!==t)){const r=s(i);this.scroll={animationId:o,phase:t,isRoot:r,offset:n(i),wasRoot:e?e.isRoot:r}}}resetTransform(){if(!o)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout;t&&br(this);const e=this.projectionDelta&&!er(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,s=i!==this.prevTransformTemplateValue;t&&this.instance&&(e||Gs(this.latestValues)||s)&&(o(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)),Yr((i=n).x),Yr(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();if(!(this.scroll?.wasRoot||this.path.some(qr))){const{scroll:t}=this.root;t&&(no(e.x,t.offset.x),no(e.y,t.offset.y))}return e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};if(Bo(e,t),this.scroll?.wasRoot)return e;for(let n=0;n<this.path.length;n++){const i=this.path[n],{scroll:s,options:o}=i;i!==this.root&&s&&o.layoutScroll&&(s.wasRoot&&Bo(e,t),no(e.x,s.offset.x),no(e.y,s.offset.y))}return e}applyTransform(t,e=!1,n,i,s=0){const o=n||{x:{min:0,max:0},y:{min:0,max:0}};Bo(o,t);for(let t=s;t<this.path.length;t++){const n=this.path[t];!e&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(no(o.x,-n.scroll.offset.x),no(o.y,-n.scroll.offset.y)),Gs(n.latestValues)&&oo(o,n.latestValues,n.layout?.layoutBox)}return!i&&Gs(this.latestValues)&&oo(o,this.latestValues,this.layout?.layoutBox),o}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};Bo(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!Gs(n.latestValues))continue;let i;n.instance&&(zs(n.latestValues)&&n.updateSnapshot(),i=Qo(),Bo(i,n.measurePageBox())),qo(e,n.latestValues,n.snapshot?.layoutBox,i)}return Gs(this.latestValues)&&qo(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},this.addLayoutListener()}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!==I.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){const e=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=e.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=e.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=e.isSharedProjectionDirty);const n=Boolean(this.resumingFrom)||this!==e;if(!(t||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:i,layoutId:s}=this.options;if(!this.layout||!i&&!s)return;this.resolvedRelativeTargetAt=I.timestamp;const o=this.getClosestProjectingParent();this.targetDelta||this.relativeTarget||(!1!==this.options.layoutAnchor&&o&&o.layout?this.createRelativeTarget(o,this.layout.layoutBox,o.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(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(),Uo(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(Boolean(this.resumingFrom)?this.applyTransform(this.layout.layoutBox,!1,this.target,!0):Bo(this.target,this.layout.layoutBox),Js(this.target,this.targetDelta)):Bo(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,!1!==this.options.layoutAnchor&&o&&(!o.resumingFrom==!this.resumingFrom||o.options.layoutRoot&&!o.resumingFrom)&&!o.options.layoutScroll&&o.target&&1!==this.animationProgress?this.createRelativeTarget(o,this.target,o.target):this.relativeParent=this.relativeTarget=void 0),wo.value&&vr.calculatedTargetDeltas++)}getClosestProjectingParent(){if(this.parent&&!zs(this.parent.latestValues)&&!Xs(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(t,e,n){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}},zo(this.relativeTargetOrigin,e,n,this.options.layoutAnchor||void 0),Bo(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const t=this.getLead(),e=Boolean(this.resumingFrom)||this!==t;let n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),e&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===I.timestamp&&(n=!1),n)return;const{layout:i,layoutId:s}=this.options;if(this.isTreeAnimating=Boolean(this.parent?.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!i&&!s)return;Bo(this.layoutCorrected,this.layout.layoutBox);const o=this.treeScale.x,r=this.treeScale.y;eo(this.layoutCorrected,this.treeScale,this.path,e&&(!(t.relativeTarget&&!t.relativeParent.resumingFrom)||t.relativeParent)),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:a}=t;a?(this.projectionDelta&&this.prevProjectionDelta?(jo(this.prevProjectionDelta.x,this.projectionDelta.x),jo(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Wo(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.treeScale.x===o&&this.treeScale.y===r&&ar(this.projectionDelta.x,this.prevProjectionDelta.x)&&ar(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",a)),wo.value&&vr.calculatedProjections++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){this.options.visualElement?.scheduleRender(),t&&this.getStack()?.scheduleRender(),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},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}}}setAnimationOrigin(t,e=!1,n){const i=this.snapshot,s=i?i.latestValues:{},o={...this.latestValues},r={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 a={x:{min:0,max:0},y:{min:0,max:0}},l=i?.source!==this.layout?.source,c=this.getStack(),u=!c||c.members.length<=1,h=Boolean(l&&!u&&!0===this.options.crossfade&&!this.path.some($r));let d;this.animationProgress=0;const p=n?.interpolateProjection(t);this.mixTargetDelta=e=>{const n=e/1e3,i=p?.(n);var c,m,f,g;Nr(r.x,t.x,n),Nr(r.y,t.y,n),i&&(r.x.translate=i.x,r.y.translate=i.y),this.setTargetDelta(r),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(zo(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),c=this.relativeTarget,m=this.relativeTargetOrigin,f=a,g=n,Ur(c.x,m.x,f.x,g),Ur(c.y,m.y,f.y,g),d&&ir(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),Bo(d,this.relativeTarget)),l&&(this.animationValues=o,Vo(o,s,this.latestValues,n,h,u)),void 0!==i?.rotate&&(this.animationValues||(this.animationValues=o),this.animationValues.pathRotation=i.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Gt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Kt.update(()=>{yr.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=pi(0)),this.motionValue.jump(0,!1),this.currentAnimation=vo(this.motionValue,[0,1e3],{...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onComplete:()=>{t.onComplete&&t.onComplete(),this.completeAnimation()}}),function(t,e){const n=globalThis.__MOTION_INSPECT__;if(n)try{n({...be("layout-animation-start",t),node:e})}catch{}}(this.currentAnimation,this),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?.(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead(),{targetWithTransforms:e,layout:n,latestValues:i}=t;let{target:s}=t;if(e&&s&&n){if(this!==t&&this.layout&&n&&Hr(this.options.animationType,this.layout.layoutBox,n.layoutBox)){const{layoutBox:t}=this.layout,e=s;s=this.target||{x:{min:0,max:0},y:{min:0,max:0}},Xr(s.x,e.x,t.x),Xr(s.y,e.y,t.y)}Bo(e,s),oo(e,i),Wo(this.projectionDeltaWithTransform,this.layoutCorrected,e,i)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new lr);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?.transition,preserveFollowOpacity:n?.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){const{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){this.getStack()?.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){return this.getStack()?.relegate(this)||!1}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;const{latestValues:e}=t;if(!Ys(e))return;const n={};for(let e=0;e<xr.length;e++)Tr(xr[e],t,n,this.animationValues);for(let e=0;e<Ks.length;e++)Tr(Ks[e],t,n,this.animationValues);t.render();for(const e in n)t.setStaticValue(e,n[e]),this.animationValues&&(this.animationValues[e]=n[e]);t.scheduleRender()}applyProjectionStyles(t,e){if(!this.instance||this.isSVG)return;const n=this.getLead();if(!this.isVisible&&n!==this)return void(t.visibility="hidden");const i=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,t.visibility="",t.opacity="",t.pointerEvents=Ao(e?.pointerEvents)||"",void(t.transform=i?i(this.latestValues,""):"none");if(!this.projectionDelta||!this.layout||!n.target)return(this.options.layoutId||this.needsShow)&&(this.needsShow=!1,t.visibility="",t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=Ao(e?.pointerEvents)||""),void(this.hasProjected&&!Gs(this.latestValues)&&(t.transform=i?i({},""):"none",this.hasProjected=!1));t.visibility="";const s=n.animationValues||n.latestValues;this.applyTransformsToTarget();let o=pr(this.projectionDeltaWithTransform,this.treeScale,s);i&&(o=i(s,o)),t.transform=o;const{x:r,y:a}=this.projectionDelta;t.transformOrigin=`${100*r.origin}% ${100*a.origin}% 0`,n.animationValues?t.opacity=n===this?s.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:t.opacity=n===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const e in xo){if(void 0===s[e])continue;const{correct:i,applyTo:r,isCSSVariable:a}=xo[e],l="none"===o?s[e]:i(s[e],n);if(r){const e=r.length;for(let n=0;n<e;n++)t[r[n]]=l}else a?this.options.visualElement.renderState.vars[e]=l:t[e]=l}this.options.layoutId&&(t.pointerEvents=n===this?Ao(e?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=this.dragSnapshot=this.dragAncestor=void 0}resetTree(){this.root.nodes.forEach(t=>t.currentAnimation?.stop()),this.root.nodes.forEach(Dr),this.root.sharedNodes.clear()}}}function Pr(t){t.updateLayout(),function(t){const{snapshot:e,dragAncestor:n}=t,i=n?.isAnimationBlocked&&n.layout;if(!e||!i||t.resumeFrom||t.isAnimationBlocked)return;const s=n.dragSnapshot;mr(t=>no(e.layoutBox[t],i.layoutBox[t].min-s.layoutBox[t].min))}(t)}function Mr(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=t.layout,{animationType:s}=t.options,o=e.source!==t.layout.source,r=(i,o)=>{if("size"===s)mr(t=>{const e=Oo(i[t]);i[t].min=o[t].min,i[t].max=i[t].min+e});else if("x"===s||"y"===s){const t="x"===s?"y":"x";Lo(i[t],o[t])}else Hr(s,e.layoutBox,n)&&mr(e=>{const n=Oo(o[e]);i[e].max=i[e].min+n,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[e].max=t.relativeTarget[e].min+n)})},a=o?e.measuredBox:e.layoutBox;r(a,n);const l={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Wo(l,n,e.layoutBox);const c={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Wo(c,o?t.applyTransform(i,!0):n,a);const u=!er(l);let h=!1;const d=t.getClosestProjectingParent();if((!t.resumeFrom||d?.options.layoutRoot&&t.resumeFrom.path.includes(d))&&d&&!d.resumeFrom){const{snapshot:i,layout:s}=d;if(i&&s){const a=t.options.layoutAnchor||void 0,l={x:{min:0,max:0},y:{min:0,max:0}};zo(l,o?t.resumeFrom.applyTransform(e.layoutBox,!0,void 0,!0,d.depth+1):e.layoutBox,i.layoutBox,a);const c={x:{min:0,max:0},y:{min:0,max:0}};zo(c,n,s.layoutBox,a),o&&r(l,c),or(l,c)||(h=!0),d.options.layoutRoot&&(t.relativeTarget=c,t.relativeTargetOrigin=l,t.relativeParent=d)}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeLayoutChanged:h})}else t.isLead()&&t.options.onExitComplete?.();t.options.transition=void 0}function Er(t){wo.value&&vr.nodes++,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 Vr(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function kr(t){t.clearSnapshot()}function Dr(t){t.clearMeasurements()}function Cr(t){t.isLayoutDirty=!0,t.updateLayout()}function Rr(t){t.isLayoutDirty=!1}function Lr(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.dragSnapshot||t.layout,t.isLayoutDirty=!0)}function Br(t){t.relativeTarget&&t.relativeParent?.isLayoutDirty&&(t.currentAnimation?t.isLayoutDirty=!0:(t.targetDelta=void 0,t.removeRelativeTarget()))}function jr(t){const{visualElement:e}=t.options;e?.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Or(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Fr(t){t.resolveTargetDelta()}function Ir(t){t.calcProjection()}function Wr(t){t.resetSkewAndRotation()}function Nr(t,e,n){t.translate=Vt(e.translate,0,n),t.scale=Vt(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Ur(t,e,n,i){t.min=Vt(e.min,n.min,i),t.max=Vt(e.max,n.max,i)}function $r(t){return void 0!==t.animationValues?.opacityExit}const zr={duration:.45,ease:[.4,0,.1,1]},Kr=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Gr=Kr("applewebkit/")&&!Kr("chrome/")?Math.round:c;function Yr(t){t.min=Gr(t.min),t.max=Gr(t.max)}function Xr(t,e,n){t.max=Oo(n)+(t.min=e.min)}function Hr(t,e,n){return"position"===t||"preserve-aspect"===t&&!Fo(rr(e),rr(n),.2)}function qr(t){return t!==t.root&&t.scroll?.wasRoot}function _r(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n,i)}const Zr=Ar({attachResizeListener:(t,e)=>_r(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Jr={current:void 0},Qr=Ar({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Jr.current){const t=new Zr({});t.mount(window),t.setOptions({layoutScroll:!0}),Jr.current=t}return Jr.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>"fixed"===window.getComputedStyle(t).position}),ta=new WeakMap;function ea(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function na(t){return"string"==typeof t||Array.isArray(t)}const ia=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],sa=["initial"].concat(ia);function oa(t){if(ea(t.animate))return!0;for(let e=0;e<sa.length;e++)if(na(t[sa[e]]))return!0;return!1}function ra(t){return Boolean(oa(t)||t.variants)}function aa(t,e,n){for(const i in e){const s=e[i],o=n[i];if(Fi(s))t.addValue(i,s);else if(Fi(o))t.addValue(i,pi(s,{owner:t}));else if(o!==s)if(t.hasValue(i)){const e=t.getValue(i);!0===e.liveStyle?e.jump(s):e.hasAnimated||e.set(s)}else{const e=t.getStaticValue(i);t.addValue(i,pi(void 0!==e?e:s,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}const la={current:null},ca={current:!1},ua="undefined"!=typeof window;function ha(){if(ca.current=!0,ua)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>la.current=t.matches;t.addEventListener("change",e),e()}else la.current=!1}const da=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let pa={};class ma{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,skipAnimations:s,blockInitialAnimation:o,visualState:r},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=fn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=U.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,Kt.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=e.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=s,this.options=a,this.blockInitialAnimation=Boolean(o),this.isControllingVariants=oa(e),this.isVariantNode=ra(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:u,...h}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in h){const e=h[t];void 0!==l[t]&&Fi(e)&&e.set(l[t])}}mount(t){if(this.hasBeenMounted)for(const t in this.initialValues)this.values.get(t)?.jump(this.initialValues[t]),this.latestValues[t]=this.initialValues[t];if(this.current=t,ta.set(t,this),this.projection?.instance||this.projection?.mount(t),this.isVariantNode&&!this.isControllingVariants){let t=this;do{t=!1!==t.props.inherit&&t.parent}while(t&&!t.isVariantNode);if(t){const{variantChildren:e}=t;e.add(this),this.removeFromVariantTree=()=>e.delete(this)}}this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(ca.current||ha(),this.shouldReduceMotion=la.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection?.unmount(),Gt(this.notifyUpdate),Gt(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree?.(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),(this.enteringChildren||(this.enteringChildren=new Set)).add(t)}removeChild(t){this.children.delete(t),this.enteringChildren?.delete(t)}bindToMotionValue(t,e){if(this.valueSubscriptions.get(t)?.(),e.accelerate&&On.has(t)&&this.current instanceof HTMLElement){const{factory:n,keyframes:i,times:s,ease:o,duration:r}=e.accelerate,a=new kn({element:this.current,name:t,keyframes:i,times:s,ease:o,duration:p(r)}),l=n(a);return void this.valueSubscriptions.set(t,()=>{l(),a.cancel()})}const n=Je.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&Kt.preRender(this.notifyUpdate),n&&(this.projection&&(this.projection.isTransformDirty=!0),Hn.get(this.current)?.check()),this.scheduleRender()});let s;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{i(),s?.()})}sortNodePosition(t){return this.current&&t.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in pa){const e=pa[t];if(!e)continue;const{isEnabled:n,Feature:i}=e;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){const{transformTemplate:n,onUpdate:i}=this.props;(t.transformTemplate||n)&&this.scheduleRender(),(t.transformTemplate&&!n||t.onUpdate&&!i)&&Hn.get(this.current)?.demote(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<da.length;e++){const n=da[e];this.propEventSubscriptions[n]?.(),delete this.propEventSubscriptions[n];const i=t["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=aa(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue?.()}getProps(){return this.props}getVariant(t){return this.props.variants?.[t]}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}addValue(t,e){const n=this.values.get(t);if(e!==n){n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e);const i=e.get();void 0!==i&&(this.latestValues[t]=i)}}removeValue(t){this.values.delete(t),this.valueSubscriptions.get(t)?.(),this.valueSubscriptions.delete(t),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){let n=this.props.values?.[t];return n||(n=this.values.get(t),void 0===n&&void 0!==e&&(n=pi(e??this.getDefaultValue?.(t),{owner:this}),this.addValue(t,n)),n)}readValue(t,e){let n=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];return null!=n&&("string"==typeof n&&(o(n)||a(n))?n=parseFloat(n):"number"!=typeof n&&!At.test(n)&&At.test(e)&&(n=We(t,e)),this.setBaseTarget(t,Fi(n)?n.get():n)),Fi(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}on(t,e){return(this.events[t]||(this.events[t]=new d)).add(e)}notify(t,...e){this.events[t]?.notify(...e)}scheduleRenderMicrotask(){go.render(this.render)}}class fa extends ma{constructor(){super(...arguments),this.KeyframeResolver=Ji}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){const n=t.style;return n?n[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Fi(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}function ga(t,{style:e,vars:n},i,s){const o=t.style;let r;for(r in e)o[r]=e[r];for(r in s?.applyProjectionStyles(o,i),n)o.setProperty(r,n[r])}function ya(t,{layout:e,layoutId:n}){return Je.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!xo[t]||"opacity"===t)}function va(t,e,n){const i=t.style,s=e?.style,o={};if(!i)return o;for(const e in i)(Fi(i[e])||s&&Fi(s[e])||ya(e,t)||void 0!==n?.getValue(e)?.liveStyle)&&(o[e]=i[e]);return o}class xa extends fa{constructor(){super(...arguments),this.type="html",this.renderInstance=ga}mount(t){super.mount(t)}readValueFromInstance(t,e){if(Je.has(e))return this.projection?.isProjecting?He(e):_e(t,e);{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 ro(t,e)}build(t,e,n){Ms(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return va(t,e,n)}}const wa="[data-layout],[data-layout-id]",Ta=new WeakMap;let ba;function Sa(t){const e=[];return t instanceof HTMLElement&&t.matches(wa)&&e.push(t),t.querySelectorAll(wa).forEach(t=>{t instanceof HTMLElement&&e.push(t)}),e}function Aa(t,e){const n=t.getAttribute("data-layout");return{layoutId:t.getAttribute("data-layout-id")??void 0,layout:null!==n||void 0,animationType:n&&"true"!==n?n:"both",transition:e}}function Pa(t,e){let n=Ta.get(t);if(n)n.setOptions(Aa(t,e));else{let i=ta.get(t);i||(i=new xa({props:{},presenceContext:null,visualState:{latestValues:{},renderState:{transform:{},transformOrigin:{},style:{},vars:{}}}},{allowProjection:!0}),mo(t,i)),t.style.transform&&!Gs(i.latestValues)&&(t.style.transform=""),n=new Qr(i.latestValues,function(t){let e=t.parentElement;for(;e;){const t=Ta.get(e);if(t?.instance)return t;e=e.parentElement}}(t)),i.projection=n,n.setOptions({...Aa(t,e),visualElement:i}),n.mount(t),Ta.set(t,n)}return n.isPresent=!0,n.options.onExitComplete&&n.setOptions({onExitComplete:void 0}),n}function Ma(t,e){e.setOptions({onExitComplete:void 0});e.getStack()&&!e.isLead()||e.currentAnimation?.stop(),e.unmount(),Ta.delete(t)}function Ea(){const t=ba;ba=void 0,function(){if(I.isProcessing)return;const t=U.now();I.delta=i(0,1e3/60,t-I.timestamp),I.timestamp=t,I.isProcessing=!0,Yt.update.process(I),Yt.preRender.process(I),Yt.render.process(I),I.isProcessing=!1}();const e=new Map;for(const n of t)for(const t of n.collectTargets()){const i=e.get(t);i?i.push(n):e.set(t,[n])}const n=new Map;for(const t of(s=e.keys(),[...s].sort((t,e)=>t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1))){const i=e.get(t),s=Pa(t,i[i.length-1].transitionFor(t));for(const e of i)e.adopt(t,s);n.set(t,s)}var s;n.forEach(t=>{t.isLayoutDirty=!1,t.willUpdate()});const o=[];for(const e of t){const t=e.runUpdate();t&&o.push(t)}const r=()=>{const e=new Set;for(const n of t)n.reconcileAdditions(e);for(const n of t)n.reconcileRemovals(e);let i;n.forEach(t=>i||(i=t.root));for(const e of t)i||(i=e.getRoot());i?.didUpdate(),go.render(()=>{for(const e of t)e.finalize()})};o.length?Promise.all(o).then(r):r()}class Va{constructor(t,e,n){this.scope=t,this.updateDom=e,this.defaultOptions=n,this.sharedTransitions=new Map,this.notifyReady=()=>{},this.rejectReady=()=>{},this.tracked=new Map,this.restorePoints=new Map,this.readyPromise=new Promise((t,e)=>{this.notifyReady=t,this.rejectReady=e}),ba||(ba=[],queueMicrotask(Ea)),ba.push(this)}shared(t,e){return this.sharedTransitions.set(t,e),this}then(t,e){return this.readyPromise.then(t,e)}transitionFor(t){const e=t.getAttribute("data-layout-id");return e&&this.sharedTransitions.get(e)||this.defaultOptions}adopt(t,e){this.tracked.set(t,e),this.restorePoints.set(t,{parent:t.parentElement,next:t.nextSibling})}collectTargets(){return Sa(this.scope)}runUpdate(){try{const t=this.updateDom();if(t&&"function"==typeof t.then)return t.then(void 0,t=>{this.updateError=t})}catch(t){this.updateError=t}}reconcileAdditions(t){for(const e of Sa(this.scope)){if(this.tracked.has(e))continue;const n=Pa(e,this.transitionFor(e));this.adopt(e,n),n.options.layoutId&&t.add(n.options.layoutId)}}reconcileRemovals(t){this.tracked.forEach((e,n)=>{if(n.isConnected)return;const i=this.restorePoints.get(n);this.restorePoints.delete(n);const{layoutId:s}=e.options,o=e.getStack(),r=o&&o.members.some(t=>t!==e&&t.instance?.isConnected);if(s&&e.isLead()&&r&&!t.has(s)&&i&&i.parent.isConnected){if(i.parent.insertBefore(n,i.next?.parentNode===i.parent?i.next:null),e.isPresent=!1,e.setOptions({onExitComplete:()=>{n.remove(),Ma(n,e)}}),e.relegate())return;n.remove()}Ma(n,e),this.tracked.delete(n)})}getRoot(){let t;return this.tracked.forEach(e=>t||(t=e.root)),t}finalize(){if(this.updateError)return void this.rejectReady(this.updateError);const t=new Set;this.tracked.forEach(e=>{e.instance&&e.currentAnimation&&t.add(e.currentAnimation)}),this.notifyReady(new ii([...t]))}}function ka(t,e,n){if("function"==typeof t)return{scope:hs.current?.root||document,updateDom:t,defaultOptions:e};return{scope:t instanceof Document?t:fs(t)[0]??document,updateDom:e,defaultOptions:n}}const Da=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function Ca(t){return{point:{x:t.pageX,y:t.pageY}}}const Ra=t=>e=>Da(e)&&t(e,Ca(e));function La(t,e,n,i){return _r(t,e,Ra(n),i)}const Ba=new WeakMap;let ja;const Oa=(t,e,n)=>(i,s)=>s&&s[0]?s[0][t+"Size"]:us(i)&&"getBBox"in i?i.getBBox()[e]:i[n],Fa=Oa("inline","width","offsetWidth"),Ia=Oa("block","height","offsetHeight");function Wa({target:t,borderBoxSize:e}){Ba.get(t)?.forEach(n=>{n(t,{get width(){return Fa(t,e)},get height(){return Ia(t,e)}})})}function Na(t){t.forEach(Wa)}function Ua(t,e){ja||"undefined"!=typeof ResizeObserver&&(ja=new ResizeObserver(Na));const n=fs(t);return n.forEach(t=>{let n=Ba.get(t);n||(n=new Set,Ba.set(t,n)),n.add(e),ja?.observe(t)}),()=>{n.forEach(t=>{const n=Ba.get(t);n?.delete(e),n?.size||ja?.unobserve(t)})}}const $a=new Set;let za;function Ka(t){return $a.add(t),za||(za=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};$a.forEach(e=>e(t))},window.addEventListener("resize",za)),()=>{$a.delete(t),$a.size||"function"!=typeof za||(window.removeEventListener("resize",za),za=void 0)}}function Ga(t,e){return ds("function"==typeof t?Ka(t):Ua(t,e))}const Ya=(t,e)=>Math.abs(t-e);function Xa(t,e){const n=Ya(t.x,e.x),i=Ya(t.y,e.y);return Math.sqrt(n**2+i**2)}const Ha=new Set(["auto","scroll"]);class qa{constructor(t,e,{transformPagePoint:n,contextWindow:i=window,dragSnapToOrigin:s=!1,distanceThreshold:o=3,element:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.onElementScroll=t=>{this.handleScroll(t.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;this.hasPendingMove=!1,this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Za(this.lastRawMoveEventInfo,this.transformPagePoint));const t=Qa(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=Xa(t.offset,{x:0,y:0})>=this.distanceThreshold;if(!e&&!n)return;const{point:i}=t;this.history.push({...i,timestamp:U.now()});const{onStart:s,onMove:o}=this.handlers;e||(s?.(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),o?.(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.handleScroll(window),this.lastMoveEvent=t,this.lastRawMoveEventInfo=e,this.lastMoveEventInfo=Za(e,this.transformPagePoint),this.hasPendingMove=!0,Kt.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.hasPendingMove&&this.updatePoint(),this.end();const{onEnd:n,onSessionEnd:i,resumeAnimation:s}=this.handlers;if(!this.dragSnapToOrigin&&this.startEvent||s?.(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=Qa("pointercancel"===t.type?this.lastMoveEventInfo:Za(e,this.transformPagePoint),this.history);this.startEvent&&n?.(t,o),i?.(t,o)},!Da(t))return;this.dragSnapToOrigin=s,this.handlers=e,this.transformPagePoint=n,this.distanceThreshold=o,this.contextWindow=i||window;const a=Za(Ca(t),this.transformPagePoint),{point:l}=a;this.history=[{...l,timestamp:U.now()}];const{onSessionStart:c}=e;c&&c(t,Qa(a,this.history));const h={passive:!0,capture:!0};this.removeListeners=u(La(this.contextWindow,"pointermove",this.handlePointerMove,h),La(this.contextWindow,"pointerup",this.handlePointerUp,h),La(this.contextWindow,"pointercancel",this.handlePointerUp,h)),r&&this.startScrollTracking(r)}startScrollTracking(t){let e=t.parentElement;for(;e;){const t=getComputedStyle(e);(Ha.has(t.overflowX)||Ha.has(t.overflowY))&&this.scrollPositions.set(e,_a(e)),e=e.parentElement}this.scrollPositions.set(window,_a(window)),this.removeScrollListeners=u(_r(window,"scroll",this.onElementScroll,{capture:!0}),_r(window,"scroll",this.onWindowScroll,{}))}handleScroll(t){const e=this.scrollPositions.get(t);if(!e)return;const n=t===window,i=_a(t),s=i.x-e.x,o=i.y-e.y;0===s&&0===o||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s,this.lastMoveEventInfo.point.y+=o):this.history.length>0&&(this.history[0].x-=s,this.history[0].y-=o),this.scrollPositions.set(t,i),Kt.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners?.(),this.removeScrollListeners?.(),this.scrollPositions.clear(),Gt(this.updatePoint)}}const _a=t=>t===window?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop};function Za(t,e){return e?{point:e(t.point)}:t}function Ja(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Qa({point:t},e){return{point:t,delta:Ja(t,el(e)),offset:Ja(t,tl(e)),velocity:nl(e,.1)}}function tl(t){return t[0]}function el(t){return t[t.length-1]}function nl(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const s=el(t);for(;n>=0&&(i=t[n],!(s.timestamp-i.timestamp>p(e)));)n--;if(!i)return{x:0,y:0};i===t[0]&&t.length>2&&s.timestamp-i.timestamp>2*p(e)&&(i=t[1]);const o=m(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}const il=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function sl(t){return il.has(t.tagName)||!0===t.isContentEditable}const ol=new Set(["INPUT","SELECT","TEXTAREA"]);function rl(t){return ol.has(t.tagName)||!0===t.isContentEditable}const al={x:!1,y:!1};function ll(){return al.x||al.y}function cl(t){return"x"===t||"y"===t?al[t]?null:(al[t]=!0,()=>{al[t]=!1}):al.x||al.y?null:(al.x=al.y=!0,()=>{al.x=al.y=!1})}function ul(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 hl(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 dl=.35;function pl(t,e,n){return{min:ml(t,e),max:ml(t,n)}}function ml(t,e){return"number"==typeof t?t:t[e]||0}function fl(t){let e="";for(const n of t.path){n.scroll=void 0,n.updateScroll();const{scroll:i}=n;n!==t.root&&i&&(e+=i.offset.x+","+i.offset.y+",")}return e}const gl=new WeakMap;class yl{constructor(t,e=()=>t.getProps()){this.openDragLock=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.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t,this.readProps=e}start(t,{snapToCursor:e=!1,distanceThreshold:n}={}){if(!1===this.visualElement.presenceContext?.isPresent)return;const{dragSnapToOrigin:i}=this.getProps();this.panSession=new qa(t,{onSessionStart:t=>{e&&this.snapToCursor(t),this.stopAnimation()},onStart:(t,e)=>{const{drag:n,dragPropagation:i,onDragStart:s}=this.getProps();if(n&&!i&&(this.openDragLock?.(),this.openDragLock=cl(n),!this.openDragLock))return;this.latestPointerEvent=t,this.latestPanInfo=e,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints();const{projection:o}=this.visualElement;o&&(o.isAnimationBlocked=!0,o.target=void 0),mr(t=>{let e=this.getAxisMotionValue(t).get()||0;if(Y(e)&&(e=Vi(e,this.visualElement.current)||0),ct.test(e))e=parseFloat(e);else if(lt.test(e)){const n=o?.layout?.layoutBox[t];n&&(e=Oo(n)*(parseFloat(e)/100))}this.originPoint[t]=e}),s&&Kt.update(()=>s(t,e),!1,!0),Wi(this.visualElement,"transform"),this.visualElement.animationState?.setActive("whileDrag",!0)},onMove:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e;const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:s,onDrag:o}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:r}=e;if(i&&null===this.currentDirection){if(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),null===this.currentDirection)return;s&&s(this.currentDirection)}this.updateAxis("x",r),this.updateAxis("y",r),this.visualElement.render(),o&&Kt.update(()=>o(t,e),!1,!0)},onSessionEnd:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e,this.stop(t,e),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>{const{dragSnapToOrigin:t}=this.getProps();(t||this.constraints)&&this.startAnimation({x:0,y:0})}},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:i,distanceThreshold:n,contextWindow:this.visualElement.current?.ownerDocument.defaultView,element:this.visualElement.current})}stop(t,e,n){const i=t||this.latestPointerEvent,s=e||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!s||!i)return;const{velocity:r}=s;this.startAnimation(r,n);const{onDragEnd:a}=this.getProps();a&&Kt.postRender(()=>a(i,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession(),!this.getProps().dragPropagation&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e?.setActive("whileDrag",!1)}endPanSession(){this.panSession?.end(),this.panSession=void 0}updateAxis(t,e){const{drag:n}=this.readProps();if(!e||!Tl(t,n,this.currentDirection))return;const i=this.getAxisMotionValue(t);let s=this.originPoint[t]+e[t];const o=this.constraints&&this.constraints[t];o&&(s=function(t,{min:e,max:n},i){return void 0!==e&&t<e?t=i?Vt(e,t,i.min):Math.max(t,e):void 0!==n&&t>n&&(t=i?Vt(n,t,i.max):Math.min(t,n)),t}(s,o,this.elastic[t])),i.set(s)}resolveConstraints(){const{dragConstraints:t,dragElastic:e}=this.getProps(),{projection:n}=this.visualElement,i=n&&(n.layout||n.measure(!1)),s=this.constraints;vl(t)?this.constraints&&this.scroll===fl(n)||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!i)&&function(t,{top:e,left:n,bottom:i,right:s}){return{x:ul(t.x,n,s),y:ul(t.y,e,i)}}(i.layoutBox,t),this.elastic=function(t=dl){return!1===t?t=0:!0===t&&(t=dl),{x:pl(t,"left","right"),y:pl(t,"top","bottom")}}(e),s!==this.constraints&&!vl(t)&&i&&this.constraints&&!this.hasMutatedConstraints&&mr(t=>{!1!==this.constraints&&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(!vl(t))return!1;const n=xl(t),{projection:i}=this.visualElement;if(!i||!i.layout)return!1;this.scroll=fl(i);const s=ao(n,i.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:hl(t.x,e.x),y:hl(t.y,e.y)}}(i.layout.layoutBox,i.removeElementScroll(s));if(e){const t=e(Ns(o));this.hasMutatedConstraints=!!t,t&&(o=Ws(t))}return o}startAnimation(t,e){const{drag:n,dragMomentum:i,dragElastic:s,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=mr(a=>{if(!Tl(a,e||n,this.currentDirection))return;let c=l[a]||{};!0!==r&&r!==a||(c={min:0,max:0});const u=s?200:1e6,h=s?40:1e7,d={type:"inertia",velocity:i?t[a]:0,bounceStiffness:u,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...o,...c};return this.startAxisValueAnimation(a,d)});return Promise.all(c).then(a)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return Wi(this.visualElement,t),n.start(bi(t,n,0,e,this.visualElement,!1))}stopAnimation(){mr(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const e=`_drag${t.toUpperCase()}`,n=this.readProps()[e];return n||this.visualElement.getValue(t,this.visualElement.latestValues[t]??0)}snapToCursor({clientX:t,clientY:e}){const{drag:n}=this.getProps(),i={x:t,y:e},s=this.visualElement.getTransformPagePoint()?.(i)||i,o=this.visualElement.measureViewportBox();mr(t=>{if(!Tl(t,n,this.currentDirection))return;const e=this.getAxisMotionValue(t),{min:i,max:r}=o[t];e.set((e.get()||0)+s[t]-Vt(i,r,.5))})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!vl(e)||!n||!this.constraints)return;this.stopAnimation();const s=this.constraints,o={x:0,y:0};mr(t=>{const e=this.getAxisMotionValue(t).get();o[t]=function(t,e){let n=.5;const s=Oo(t),o=Oo(e);return o>s?n=h(e.min,e.max-s,t.min):s>o&&(n=h(t.min,t.max-o,e.min)),i(0,1,n)}({min:e,max:e},s[t])});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",n.root?.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),mr(e=>{const n=this.getAxisMotionValue(e);if(!Tl(e,t,null)||!n.get())return;const{min:i,max:s}=this.constraints[e];n.set(Vt(i,s,o[e]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;gl.set(this.visualElement,this);const t=this.visualElement.current,e=La(t,"pointerdown",e=>{const{drag:n,dragListener:i=!0}=this.getProps(),s=e.target,o=s!==t&&rl(s);n&&i&&!o&&this.start(e)});let n;const i=()=>{const{dragConstraints:e}=this.getProps(),i=vl(e)&&xl(e);i&&(this.constraints=this.resolveRefConstraints(),n||(n=function(t,e,n){const i=Ga(t,wl(n)),s=Ga(e,wl(n));return()=>{i(),s()}}(t,i,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,o=s.addEventListener("measure",i);s.layout||(s.root?.updateScroll(),s.updateLayout()),Kt.read(i);const r=_r(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(mr(e=>{if(!Tl(e,this.getProps().drag,this.currentDirection))return;const n=this.getAxisMotionValue(e);this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate)}),this.visualElement.render())});return()=>{r(),e(),o(),a(),n?.()}}getProps(){const t=this.readProps(),{dragElastic:e=dl,dragMomentum:n=!0}=t;return{...t,dragElastic:e,dragMomentum:n}}}function vl(t){return!!t&&"object"==typeof t&&("current"in t||"nodeType"in t)}const xl=t=>"current"in t?t.current:t;function wl(t){let e=!0;return()=>{e?e=!1:t()}}function Tl(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const bl=["user-select","-webkit-user-select","-webkit-touch-callout","touch-action"];function Sl(t,e){const n=fs(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},ds(()=>i.abort())]}const Al=(t,e)=>!!e&&(t===e||Al(t,e.parentElement)),Pl=new WeakSet;function Ml(t){return e=>{"Enter"===e.key&&t(e)}}function El(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function Vl(t){return Da(t)&&!ll()}const kl=new WeakSet;function Dl(t,e){const n=window.getComputedStyle(t);return gn(e)?n.getPropertyValue(e):n[e]}const Cl={reducedMotion:"(prefers-reduced-motion: reduce)",motion:"(prefers-reduced-motion: no-preference)",dark:"(prefers-color-scheme: dark)",light:"(prefers-color-scheme: light)",hover:"(hover: hover) and (pointer: fine)",touch:"(pointer: coarse)",portrait:"(orientation: portrait)",landscape:"(orientation: landscape)"};function Rl(t){return t.includes("(")?t:t.replace(/([<>!]=?)\s+/g,"$1").trim().split(/\s+/).map(t=>{const e="!"===t[0];e&&(t=t.slice(1));const n=/^([<>]=?)([\d.]+)([a-z]*)$/.exec(t),i=n?`(width ${n[1]} ${n[2]}${n[3]||"px"})`:Cl[t]||t;return e?`(not (${i}))`:i}).join(" and ")}function Ll(...t){const e=!Array.isArray(t[0]),n=e?0:-1,i=t[0+n],s=ue(t[1+n],t[2+n],t[3+n]);return e?s(i):s}const Bl=new Set,jl=({timestamp:t})=>{Bl.forEach(e=>e.tick(t))};class Ol extends Ae{constructor(t){super(),this.state="idle",this.startTime=0,this.currentTime=0,this.started=!1,this.hasNextTarget=!1,this.nextTarget=0,this.stop=()=>{"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=t,this.factory=t.type,this.generator=this.factory(t);const{driver:e}=t;e&&(this.driver=e(t=>this.tick(t))),this.startTime=this.now(),this.state="running",this.driver?this.driver.start():(Bl.size||Kt.update(jl,!0),Bl.add(this))}setTarget(t,e){this.nextTarget=t,this.nextVelocity=e,this.hasNextTarget=!0}retarget(t,e){const{options:n,generator:i}=this;n.keyframes=t,n.velocity=e,this.startTime=this.now(),this.currentTime=0,i.retarget?i.retarget(t,e):this.generator=this.factory(n)}tick(t){const{options:e,hasNextTarget:n}=this,{delay:i=0,onUpdate:s,onPlay:o}=e;this.started||(this.startTime=Te(this.startTime,t));const r=Math.round(t-this.startTime)-i,a=this.currentTime=Math.max(0,r),l=this.generator.next(a),c=r<0?e.keyframes[0]:l.value;if(n){this.hasNextTarget=!1;const{keyframes:t}=e;t[0]=c,t[1]=this.nextTarget,this.retarget(t,this.nextVelocity??this.getGeneratorVelocity())}!n&&this.started||(this.started=!0,o?.()),"running"===this.state&&(s?.(c),l.done&&r>=0&&!n&&!this.hasNextTarget&&"running"===this.state&&(this.notifyFinished(),this.teardown(),this.state="finished",e.onComplete?.()))}getGeneratorVelocity(){return ge(this.generator,this.currentTime,this.options.velocity)}now(){return this.driver?this.driver.now():U.now()}teardown(){this.state="idle",this.driver?this.driver.stop():(Bl.delete(this),Bl.size||Gt(jl))}}function Fl(t,e,n){const i=t.get();let s,o=null;const r="string"==typeof i?i.replace(/[\d.-]/g,""):void 0,a=t=>s(r?t+r:t),l=()=>t.events.animationStart?.notify(),c=()=>{o&&(o.stop(),o=null),t.animation=void 0};if(t.attach((e,i)=>{s=i;const r=Po(e);if("running"===o?.state)return void o.setTarget(r,n.velocity);const u=Po(t.get()),h=o?o.getGeneratorVelocity():t.getVelocity();if(c(),u===r)return;const d={keyframes:[u,r],velocity:h,restDelta:.001,restSpeed:.01,...n,onUpdate:a},p=o=new Ol({...d,onPlay:l});t.animation=p,p.then(()=>{o===p&&(o=null,t.animation=void 0,t.events.animationComplete?.notify())})},c),Fi(e)){let i=!0===n.skipInitialAnimation;const s=e=>{i?(i=!1,t.jump(Il(e,r),!1)):t.set(Il(e,r))},o=e.on("change",s),a=e.get();Po(a)-Po(t.get())&&s(a);const l=t.on("destroy",o);return()=>{o(),l(),c()}}return c}function Il(t,e){return e?t+e:t}function Wl(t,e,n={}){const i={type:"spring",...n};return we(i),i.type=i.type||fe,Fl(t,e,i)}function Nl(t){const e=[];hi.current=e;const n=t();hi.current=void 0;const i=pi(n);return function(t,e,n){const i=()=>e.set(n()),s=()=>Kt.preRender(i,!1,!0),o=t.map(t=>t.on("change",s));e.on("destroy",()=>{o.forEach(t=>t()),Gt(i)})}(e,i,t),i}function Ul(t,e,n){return Fl(t,e,{...n,type:le})}const $l=[...Hi,mt,At];let zl=0;const Kl=()=>"motion-view-"+zl++;function Gl(t,e,n){e&&(t.style?.setProperty("view-transition-class",e),n.push(t))}function Yl(t,e,n,i,s){if(n&&(t.style?.setProperty("view-transition-group",n),i.push(t),"none"!==n&&s)){const n=getComputedStyle(t);"visible"===n.overflowX&&"visible"===n.overflowY||s.add(e)}}function Xl(t,e,n,i,s,o=[],r,a=[],l){const c=fs(t);if(i)return c.map((t,c)=>{const u=e.get(t);if(u)return u;const h=i[c]??Kl();return t.style?.setProperty("view-transition-name",h),n.push(t),e.set(t,h),Gl(t,s,o),Yl(t,h,r,a,l),h});const u=c.map(t=>e.has(t)?void 0:getComputedStyle(t).getPropertyValue("view-transition-name"));return c.map((t,i)=>{const c=e.get(t);if(c)return c;const h=u[i];let d;return h&&"none"!==h&&"auto"!==h&&"match-element"!==h&&!(t=>t.startsWith("motion-view-"))(h)?d=h:(d=Kl(),t.style?.setProperty("view-transition-name",d),n.push(t)),e.set(t,d),Gl(t,s,o),Yl(t,d,r,a,l),d})}function Hl(t){return"layout"===t?"group":"enter"===t||"new"===t?"new":"old"}let ql={},_l=null;const Zl=(t,e)=>{ql[t]=e},Jl=()=>{_l||(_l=document.createElement("style"),_l.id="motion-view");let t="";for(const e in ql){const n=ql[e];t+=`${e} {\n`;for(const[e,i]of Object.entries(n))t+=` ${e}: ${i};\n`;t+="}\n"}_l.textContent=t,document.head.appendChild(_l),ql={}},Ql=()=>{_l&&_l.parentElement&&_l.parentElement.removeChild(_l)};function tc(t){const e=t.match(/::view-transition-(old|new|group-children|group|image-pair)\((.*?)\)/);return e?{layer:e[2],type:e[1]}:null}function ec(){return document.getAnimations().filter(t=>{const{effect:e}=t;return!!e&&e.target===document.documentElement&&e.pseudoElement?.startsWith("::view-transition")})}const nc=["layout","enter","exit","new","old"],ic=t=>t.split(" ").every(t=>0===parseFloat(t)),sc={group:["layout"],new:["new","enter"],old:["old","exit"]},oc={new:{opacity:0,scale:.85},old:{opacity:1,scale:1}};function rc(t){const{update:e,targets:n,resolveDefs:i,cropOverride:s,pairs:o,classNames:r,flatGroups:a,options:l}=t;if(!document.startViewTransition)return(async()=>(await e(),new ii([])))();const c=new Map,u=[],h=[],d=[],m=new Set,f=new Map,g=new Set,v=new Map,x=new Map,w=new Map,T=new Map,b=t=>{n.forEach((e,n)=>{const l=r.get(n),p="root"!==n&&i.has(n)?a.has(n)?"none":"contain":void 0;let g;if("root"!==n&&i.has(n))if(o.has(n))if("old"===t)T.set(n,fs(n)),g=Xl(n,c,u,void 0,l,h,p,d,m),w.set(n,g);else{for(const t of T.get(n)??[])t.style?.removeProperty("view-transition-name"),c.delete(t);g=Xl(o.get(n),c,u,w.get(n),l,h,p,d,m)}else g=Xl(n,c,u,void 0,l,h,p,d,m);else g=[n];const y=s.get(n);g.forEach((n,i)=>{const s=f.get(n);f.set(n,s&&s!==e?{...s,...e}:e),void 0!==y&&v.set(n,y);const o=x.get(n)??{};o[t]=[i,g.length],x.set(n,o)})})},S=(t,e)=>{const n=x.get(t);return("old"===e?n?.old:"new"===e?n?.new:n?.new??n?.old)??[-1,1]},A=(t,e,n,i,s)=>{const o=ac(fi(l,n),fi(function(t,e){for(const n of sc[e]??[]){const e=t?.[n]?.options;if(e)return e}}(t,e)??{},n));return"function"==typeof o.delay&&(o.delay=o.delay(i,s)),o},P=t=>{const[e,n]=S(t,"group"),i=A(f.get(t),"group","layout",-1===e?0:e,n);i.duration&&(i.duration=p(i.duration));const{delay:s=0,duration:o,ease:r}=Vn(i);return{delay:p(s),duration:o,ease:r}},M=new Map,E=t=>c.forEach((e,n)=>{const i=n,s=i.getBoundingClientRect?.();if(s&&s.height){const n=getComputedStyle(i),o={};for(const t of Qi)o[t]=n[t];const r=M.get(e)??{};r[t]={width:s.width,height:s.height,radii:o},M.set(e,r)}}),V=t=>{const e=M.get(t);return!!(e?.old&&e?.new&&e.old.height&&e.new.height)&&Math.abs(e.old.width/e.old.height-e.new.width/e.new.height)>.2},k=()=>{(function(t,e){return e.has(t)&&Object.keys(e.get(t)).length>0})("root",n)||Zl(":root",{"view-transition-name":"none"}),Zl("::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)",{"animation-timing-function":"linear !important"}),g.forEach(t=>{Zl(`::view-transition-group(${t})`,{overflow:"clip"}),Zl(`::view-transition-old(${t}), ::view-transition-new(${t})`,{width:"100%",height:"100%","object-fit":"cover"})}),m.forEach(t=>{Zl(`::view-transition-group-children(${t})`,{overflow:"clip"})}),Jl()},D=()=>{!function(t,e=[],n=[]){for(const e of t)e.style?.removeProperty("view-transition-name");for(const t of e)t.style?.removeProperty("view-transition-class");for(const t of n)t.style?.removeProperty("view-transition-group")}(u,h,d),Ql()},C=async()=>{await e(),b("new"),E("new"),(()=>{g.clear();for(const t of x.keys())"root"!==t&&(v.get(t)??V(t))&&g.add(t)})(),k()};let R;try{b("old"),E("old"),k(),R=document.startViewTransition(C)}catch(t){return D(),Promise.reject(t)}return R.finished.finally(D),new Promise((t,e)=>{R.ready.then(()=>{const e=ec(),n=[],i=new Set,s=new Set;f.forEach((t,e)=>{const o=x.get(e),r=!!o?.new&&!o?.old,a=!!o?.old&&!o?.new;for(const o of nc){if(!t[o])continue;if("enter"===o&&!r)continue;if("exit"===o&&!a)continue;const c=Hl(o),[u,h]=S(e,c);if(-1===u)continue;const{keyframes:d,options:m}=t[o];for(let[f,g]of Object.entries(d)){if(null==g)continue;if("x"===f||"y"===f){y(!1,`animateView() animates view-transition layers with CSS properties; the "${f}" shorthand has no effect - use transform, e.g. { transform: "translateX(40px)" }.`);continue}if("new"===o&&r&&null!=t.enter?.keyframes[f])continue;if("old"===o&&a&&null!=t.exit?.keyframes[f])continue;const d=ac(fi(l,f),fi(m,f));if(!Array.isArray(g)){const e="enter"===o?t.exit?.keyframes[f]:void 0,n="opacity"===f||("new"===c?r:a),i=null!=e?Array.isArray(e)?e[e.length-1]:e:n?oc[c]?.[f]:void 0;void 0!==i&&(g=[i,g])}"function"==typeof d.delay&&(d.delay=d.delay(u,h)),d.duration&&(d.duration=p(d.duration)),d.delay&&(d.delay=p(d.delay)),n.push(new kn({...d,element:document.documentElement,name:f,pseudoElement:`::view-transition-${c}(${e})`,keyframes:g})),i.add(`${e}:${c}`),"opacity"===f&&s.add(`${e}:${c}`)}}});for(const t of e){if("finished"===t.playState)continue;const{effect:e}=t;if(!(e&&e instanceof KeyframeEffect))continue;const{pseudoElement:o}=e;if(!o)continue;const r=tc(o);if(!r)continue;const a=f.get(r.layer);if(i.has(`${r.layer}:${r.type}`)){s.has(`${r.layer}:new`)&&s.has(`${r.layer}:old`)&&e.getKeyframes().some(t=>t.mixBlendMode)?n.push(new ri(t)):t.cancel();continue}const l="old"===r.type?"new":"new"===r.type?"old":void 0;if(l&&i.has(`${r.layer}:${l}`)&&!s.has(`${r.layer}:${l}`)){t.cancel();continue}const c=x.get(r.layer),u=!("old"!==r.type&&"new"!==r.type||!c?.old||!c?.new);let h;if(r.type.startsWith("group")){const{delay:t,duration:e,ease:n}=P(r.layer);h={delay:t,duration:e,easing:Pn(n,e)}}else{const t=u?"group":r.type,[e,n]=S(r.layer,t);let i=A(a,t,"group"===t?"layout":"",-1===e?0:e,n);const s=i.visualDuration;i.duration&&(i.duration=p(i.duration)),i=Vn(i),h={delay:p(i.delay??0),duration:u&&void 0!==s?p(s):i.duration,easing:u?"linear":Pn(i.ease,i.duration)}}e.updateTiming(h),n.push(new ri(t))}M.forEach((t,e)=>{if(!g.has(e))return;const{delay:i,duration:s,ease:o}=P(e);for(const r of Qi){const a=t.old?.radii[r]||t.new?.radii[r]||"0px",l=t.new?.radii[r]||t.old?.radii[r]||"0px";ic(a)&&ic(l)||n.push(new kn({element:document.documentElement,name:r,pseudoElement:`::view-transition-group(${e})`,keyframes:[a,l],delay:i,duration:s,ease:o}))}}),t(new ii(n))}).catch(()=>R.updateCallbackDone.then(()=>t(new ii([])),e))})}function ac(t,e){const n={...t,...e};return void 0!==e.duration&&(void 0===e.visualDuration&&delete n.visualDuration,void 0===e.type&&delete n.type),n}let lc=[],cc=null;function uc(){cc=null;const[t]=lc;var e;t&&(n(lc,e=t),cc=e,rc(e).then(t=>(e.notifyReady(t),t.finished)).catch(t=>e.notifyReject(t)).finally(uc))}function hc(){for(let t=lc.length-1;t>=0;t--){const e=lc[t],{interrupt:n}=e.options;if("immediate"===n){const n=lc.slice(0,t+1).map(t=>t.update),i=lc.slice(t+1);e.update=()=>{n.forEach(t=>t())},lc=[e,...i];break}}cc&&"immediate"!==lc[0]?.options.interrupt||uc()}class dc{constructor(t,e={}){var n;this.currentSubject="root",this.targets=new Map,this.resolveDefs=new Set,this.cropOverride=new Map,this.pairs=new Map,this.classNames=new Map,this.flatGroups=new Set,this.notifyReady=c,this.notifyReject=c,this.readyPromise=new Promise((t,e)=>{this.notifyReady=t,this.notifyReject=e}),this.update=t,this.options={interrupt:"wait",...e},this.readyPromise.catch(c),n=this,lc.push(n),go.render(hc)}add(t,e){return this.currentSubject=t,this.resolveDefs.add(t),void 0!==e&&this.pairs.set(t,e),this.targets.has(t)||this.targets.set(t,{}),this}crop(t=!0){return this.cropOverride.set(this.currentSubject,t),this}group(t=!0){return t?this.flatGroups.delete(this.currentSubject):this.flatGroups.add(this.currentSubject),this}class(t){return this.classNames.set(this.currentSubject,t),this}layout(t={}){return this.updateTarget("layout",{},t),this}enter(t,e){return this.updateTarget("enter",t,e),this}exit(t,e){return this.updateTarget("exit",t,e),this}new(t,e){return this.updateTarget("new",t,e),this}old(t,e){return this.updateTarget("old",t,e),this}updateTarget(t,e,n={}){const{currentSubject:i,targets:s}=this;s.has(i)||s.set(i,{});s.get(i)[t]={keyframes:e,options:n}}then(t,e){return this.readyPromise.then(t,e)}}const pc=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"]),mc=t=>"string"==typeof t&&"svg"===t.toLowerCase();function fc(t,e,n,i){ga(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(pc.has(n)?n:Ps(n),e.attrs[n])}function gc(t,e,n){const i=va(t,e,n);for(const n in t)if("children"!==n&&(Fi(t[n])||Fi(e[n]))){i[-1!==Ze.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}function yc(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}const vc=[...ia].reverse(),xc=t=>!0===t?.out?t:t?.out;function wc(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!yc(e,t)}function Tc(){const t={};for(const e of ia)t[e]={isActive:"animate"===e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{},out:{}};return t}const bc=sa.length;const Sc=t=>!t.isLayoutDirty&&t.willUpdate(!1);const Ac=Kt,Pc=$t.reduce((t,e)=>(t[e]=t=>Gt(t),t),{});function Mc(t){return"object"==typeof t&&!Array.isArray(t)}function Ec(t,e,n,i){return null==t?[]:"string"==typeof t&&Mc(e)?fs(t,n,i):t instanceof NodeList?Array.from(t):Array.isArray(t)?t.filter(t=>null!=t):[t]}function Vc(t,e,n){return t*(e+1)+n*e}function kc(t,e){if(e.has(t))return e.get(t);const[,n,i]=t.match(/^(.+?)([+-][\d.]+)$/)||[];return e.has(n)?Math.max(0,e.get(n)+parseFloat(i)):void 0}function Dc(t,e,i,s,o,r){!function(t,e,i){for(let s=0;s<t.length;s++){const o=t[s];o.at>e&&o.at<i&&(n(t,o),s--)}}(t,o,r);for(let n=0;n<e.length;n++)t.push({value:e[n],at:Vt(o,r,s[n]),easing:B(i,n)})}function Cc(t,e,n=0){const i=e+1+e*n;for(let e=0;e<t.length;e++)t[e]=t[e]/i}function Rc(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function Lc(t,{defaultTransition:e={},...n}={},i,s,o){const r=e.duration||.3,a=new Map,l=new Map,c={},u=new Map;let d=0,m=0,f=0;const g=(t,n)=>{let o=n;const a=t=>"number"==typeof t?n+t:function(t,e,n,i){return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:e.startsWith("<")?Math.max(0,n+parseFloat(e.slice(1))):kc(e,i)??t}(m,t,d,u);for(let n=0;n<t.length;n++){const h=t[n];if("string"==typeof h){u.set(h,m);continue}if(!Array.isArray(h)){const t=void 0===h.at?m:a(h.at);"sequence"in h?(d=m=t,m=g(h.sequence,t),d=t,o=Math.max(o,m)):u.set(h.name,t);continue}let[y,v,x={}]=h;void 0!==x.at&&(m=a(x.at));let w=0;const T=(t,n,i,o=0,a=0)=>{const l=Oc(t),{delay:c=0,times:u=de(l),type:h=e.type||"keyframes",repeat:d,repeatType:g,repeatDelay:y=0,...v}=n;let{ease:x=e.ease||"easeOut",duration:T}=n;const S="function"==typeof c?c(o,a):c,A=l.length,P=En(h)?h:s?.[h||"keyframes"];if(A<=2&&P){let t=100;if(2===A&&Wc(l)){const e=l[1]-l[0];t=Math.abs(e)}const n={...e,...v};void 0!==T&&(n.duration=p(T));const i=Zt(n,t,P);x=i.ease,T=i.duration}T??(T=r);const M=m+S;1===u.length&&0===u[0]&&(u[1]=1);const E=u.length-l.length;if(E>0&&he(u,E),1===l.length&&l.unshift(null),d&&d<20){const t=T>0?y/T:0;T=Vc(T,d,y);const e=[...l],n=[...u];x=Array.isArray(x)?[...x]:[x];const i=[...x],s="reverse"===g||"mirror"===g;let o=e,r=i;s&&(o=[...e].reverse(),"reverse"===g&&(r=[...i].reverse().map(t=>"function"==typeof t?b(t):t)));for(let a=0;a<d;a++){const c=s&&a%2==0,h=c?o:e,d=c?r:i,p=(a+1)*(1+t);t>0&&(l.push(l[l.length-1]),u.push(p),x.push("linear")),l.push(...h);for(let t=0;t<h.length;t++)u.push(n[t]+p),x.push(0===t?"linear":B(d,t-1))}Cc(u,d,t)}const V=M+T;Dc(i,l,x,u,M,V),w=Math.max(S+T,w),f=Math.max(V,f)};if(Fi(y)){T(v,x,jc("default",Bc(y,l)))}else{const t=Ec(y,v,i,c),e=t.length;for(let n=0;n<e;n++){const i=Bc(t[n],l);for(const t in v)T(v[t],Fc(x,t),jc(t,i),n,e)}}d=m,m+=w,o=Math.max(o,m)}return o};return g(t,0),o&&(o.duration=f,o.labels=u),l.forEach((t,i)=>{for(const s in t){const o=t[s];o.sort(Rc);const r=[],l=[],c=[];for(let t=0;t<o.length;t++){const{at:e,value:n,easing:i}=o[t];r.push(n),l.push(h(0,f,e)),c.push(i||"easeOut")}0!==l[0]&&(l.unshift(0),r.unshift(r[0]),c.unshift("easeInOut")),1!==l[l.length-1]&&(l.push(1),r.push(null)),a.has(i)||a.set(i,{keyframes:{},transition:{}});const u=a.get(i);u.keyframes[s]=r;const{type:d,...p}=e;u.transition[s]={...p,duration:f,ease:c,times:l,...n}}}),a}function Bc(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function jc(t,e){return e[t]||(e[t]=[]),e[t]}function Oc(t){return Array.isArray(t)?t:[t]}function Fc(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const Ic=t=>"number"==typeof t,Wc=t=>t.every(Ic);function Nc(t,e,n,i){const s=[];if(function(t,e){return Fi(t)||"number"==typeof t||"string"==typeof t&&!Mc(e)}(t,e))s.push(vo(t,Mc(e)&&e.default||e,n&&n.default||n));else{if(null==t)return s;const o=Ec(t,e,i),r=o.length;for(let t=0;t<r;t++){const i=o[t],a={...n};"delay"in a&&"function"==typeof a.delay&&(a.delay=a.delay(t,r)),i instanceof Element?s.push(...ho(i,e,a,ta.get(i))):s.push(...ls(rs(i)??fo,i,e,a))}}return s}let Uc=0;const $c=(t,e)=>void 0===e?t:{name:t,at:e};function zc(t){t.pause(),t.time=0,t.stop()}class Kc{constructor(t=[],e={},i){this.options=e,this.entries=[],this.repeatIndex=0,this.prevTime=0,this.markers=[],this.labels=new Map,this.totalDuration=0,this.isDirty=!1,this.isDone=!1,this.isRebuilding=!1,this.playbackSpeed=1,this.isWrapped=!1,this.stop=()=>{this.flush(),this.group?.stop()},this.isPaused=!1===e.autoplay,this.newFinished(),t.forEach(t=>this.add(t)),i?(this.isDirty=!1,this.isWrapped=!0,this.group=new oi(i),this.watch()):(this.invalidate(),this.flush());const{scope:s}=e;s&&(s.animations.push(this),this.finished.then(()=>n(s.animations,this)))}add(t,e){return t instanceof Kc&&t.adopt(this),this.push({item:t,at:e})}call(t,e){return this.push({item:t,at:e,marker:{name:"_m"+Uc++,time:0,callback:t}})}addPause(t,e){return this.push({item:e||{},at:t,marker:{name:"_m"+Uc++,time:0,callback:e,pause:!0}})}move(t,e){return this.entries.forEach(n=>{n.item===t&&(n.at=e)}),this.invalidate()}remove(t){return t instanceof Kc&&(t.parent=void 0),this.entries=this.entries.filter(e=>e.item!==t),this.invalidate()}clear(){return this.entries=[],this.invalidate()}getLabelTime(t){return this.flush(),this.labels.get(t)}seek(t){return this.time=this.resolve(t),this}playTo(t){const e=this.resolve(t),n=Math.abs(this.speed);return this.speed=e<this.time?-n:n,this.stopAt=e,this.clock||this.invalidate(),this.play(),this}reverse(){return this.speed=-this.speed,this.play(),this}get progress(){return this.duration?this.time/this.duration:0}set progress(t){this.time=t*this.duration}get time(){return this.active()?.time??0}set time(t){this.flush(),this.prevTime=t,this.group&&(this.group.time=t),this.repeatIndex=this.currentRepeat()}get speed(){return this.playbackSpeed}set speed(t){this.playbackSpeed=t,this.group&&(this.group.speed=t)}get duration(){return this.flush(),this.isWrapped?this.group.duration:this.totalDuration}get iterationDuration(){return this.flush(),this.isWrapped?this.group.iterationDuration:this.totalDuration}get state(){return this.active()?.state??"idle"}get startTime(){return this.active()?.startTime??null}play(){this.flush(),this.isPaused=!1,this.group?.play(),this.isDone&&(this.newFinished(),this.watch())}pause(){this.flush(),this.isPaused=!0,this.group?.pause()}cancel(){this.flush(),this.group?.cancel()}complete(){this.flush(),this.group?.complete()}attachTimeline(t){return this.flush(),this.scrollTimeline=t,this.detachScroll=this.group?.attachTimeline(t),()=>{this.scrollTimeline=void 0,this.detachScroll?.()}}then(t,e){return this.finished.then(t,e)}active(){return this.flush(),this.group?.animations.length?this.group:void 0}push(t){return this.entries.push(t),this.invalidate()}invalidate(){return this.parent?this.parent.invalidate():this.isDirty||(this.isDirty=!0,queueMicrotask(()=>this.flush())),this}flush(){this.isDirty&&!this.parent&&this.build()}adopt(t){this.group&&(zc(this.group),this.group=void 0),this.isDirty=!1,this.parent=t}build(){this.isDirty=!1,this.isWrapped=!1;const t=this.group;let e=0;t&&(this.isRebuilding=!0,this.scrollTimeline?(this.detachScroll?.(),t.cancel()):(e=t.animations.length?t.time:0,zc(t)),this.isRebuilding=!1);const{defaultTransition:n,onComplete:i,onUpdate:s,onRepeat:o,onReverseComplete:r,autoplay:a,scope:l,...c}=this.options,u={};void 0!==l?.reduceMotion&&(u.reduceMotion=l.reduceMotion),void 0!==l?.skipAnimations&&(u.skipAnimations=l.skipAnimations),Object.assign(u,c);const h=new Map,d={},p=function(t,e,n,i){const s=[];return Lc(t.map(t=>{if(Array.isArray(t)&&"function"==typeof t[0]){const e=t[0],n=pi(0);return n.on("change",e),1===t.length?[n,[0,1]]:2===t.length?[n,[0,1],t[1]]:[n,t[1],t[2]]}return t}),e,n,{spring:le},i).forEach(({keyframes:t,transition:e},n)=>{s.push(...Nc(n,t,e))}),s}(this.toSequence(h),{defaultTransition:n,...u},l,d),m=d.labels;let f=u.duration??d.duration;const g=d.duration?f/d.duration:1;if(m.forEach((t,e)=>m.set(e,t*g)),this.markers=[],h.forEach((t,e)=>{t.time=m.get(e),m.delete(e),f=Math.max(f,t.time),this.markers.push(t)}),this.markers.sort((t,e)=>t.time-e.time),this.labels=m,this.totalDuration=f,this.clock=this.clockAnimation=void 0,this.markers.length||void 0!==this.stopAt||s||o){const t=this.clock=pi(0);t.on("change",e=>t===this.clock&&this.onClock(e)),p.unshift(this.clockAnimation=vo(t,[0,f],{...u,duration:f,ease:"linear"}))}const y=this.group=new oi(p);e=Math.min(e,f),this.isDone&&e<f&&this.newFinished(),this.scrollTimeline?this.detachScroll=y.attachTimeline(this.scrollTimeline):(y.speed=this.playbackSpeed,this.isPaused&&y.pause(),e&&(y.time=e)),this.repeatIndex=this.currentRepeat(),this.prevTime=e||-1,this.watch()}toSequence(t){return this.entries.map(({item:e,at:n,marker:i})=>i?(t.set(i.name,i),$c(i.name,n)):e instanceof Kc?{sequence:e.toSequence(t),at:n}:"string"==typeof e?$c(e,n):void 0===n?e:Array.isArray(e)?function(t,e){const n=[...t],i="function"==typeof n[0]?Math.max(1,n.length-1):2;return n[i]={...n[i],at:e},n}(e,n):{...e,at:n})}resolve(t){return this.flush(),"number"==typeof t?t:kc(t,this.labels)??this.time}currentRepeat(){const{repeat:t=0,repeatDelay:e=0,delay:n=0}=this.options,i=this.totalDuration+e,s=(this.clockAnimation?.time??0)-n;return i&&s>0?Math.min(t,Math.floor(s/i)):0}onClock(t){let e=this.prevTime;if(this.prevTime=t,this.isRebuilding)return;const{onUpdate:n,onRepeat:i,repeatType:s="loop"}=this.options;n?.(t);const o=this.currentRepeat();if(o!==this.repeatIndex&&(this.repeatIndex=o,i?.(),"loop"===s)){const t=this.speed>0;if(this.cross(e,t?this.totalDuration:0))return;e=t?-1:1/0}this.cross(e,t)}cross(t,e){if(t===e)return;const n=e>t,i=i=>n?i>t&&i<=e:i<t&&i>=e,s=n?this.markers:[...this.markers].reverse();for(const t of s)if(i(t.time)&&(t.callback?.(n?1:-1),t.pause))return this.pauseAt(t.time);return void 0!==this.stopAt&&i(this.stopAt)?(this.pauseAt(this.stopAt),this.stopAt=void 0,!0):void 0}pauseAt(t){return this.pause(),this.time=t,!0}watch(){const t=this.group;t.finished.then(()=>{if(t!==this.group||this.isDone)return;this.isDone=!0;const{onComplete:e,onReverseComplete:n}=this.options,i=this.speed<0&&n||e;i?.(),this.resolveFinished()})}newFinished(){this.isDone=!1,this.finished=new Promise(t=>{this.resolveFinished=t})}}function Gc(t={}){const{scope:e,reduceMotion:n,skipAnimations:i}=t;return function(t,s,o){const r=hs.current,a=r?.transition,l={};let c;if(void 0!==n&&(l.reduceMotion=n),void 0!==i&&(l.skipAnimations=i),u=t,Array.isArray(u)&&u.some(Array.isArray)){const n={...l,...s,scope:e};a&&(n.defaultTransition={...a,...n.defaultTransition}),c=new Kc(t,n)}else{const{onComplete:n,...i}=o||{},r={...l,...a,...i},{onUpdate:u}=i,h="number"==typeof t||"string"==typeof t&&("string"==typeof s||Array.isArray(s))?[u||(()=>{}),Array.isArray(s)?s:[t,s],{...r,onUpdate:void 0}]:[t,s,r];c=new Kc([h],{...l,onComplete:n,scope:e},Nc(t,s,r,e))}var u;return r&&c.finished.then(r.add(()=>c.stop())),c}}const Yc=Object.assign(Gc(),{addEffect:ss,removeEffect:os});const Xc=t=>function(e,n,i){return new oi(function(t,e,n,i){if(null==t)return[];const s=fs(t,i),o=s.length,r=[];for(let t=0;t<o;t++){const i=s[t],a={...n};"function"==typeof a.delay&&(a.delay=a.delay(t,o));for(const t in e){let n=e[t];Array.isArray(n)||(n=[n]);const s={...fi(a,t)};s.duration&&(s.duration=p(s.duration)),s.delay&&(s.delay=p(s.delay));const o=ci(i),l=li(t,s.pseudoElement||""),c=o.get(l);c&&c.stop(),r.push({map:o,key:l,unresolvedKeyframes:n,options:{...s,element:i,name:t,allowFlatten:!a.type&&!a.ease}})}}for(let t=0;t<r.length;t++){const{unresolvedKeyframes:e,options:n}=r[t],{element:i,name:s,pseudoElement:o}=n;o||null!==e[0]||(e[0]=Dl(i,s)),Ne(e),es(e,s),!o&&e.length<2&&e.unshift(Dl(i,s)),n.keyframes=e}const a=[];for(let t=0;t<r.length;t++){const{map:e,key:n,options:i}=r[t],s=new kn(i);e.set(n,s),s.finished.finally(()=>e.delete(n)),a.push(s)}return a}(e,n,i,t))},Hc=Xc(),qc={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}},_c=new WeakMap;function Zc(t,e,n,s){const o=n[e],{length:r,position:a}=qc[e],l=o.current,c=n.time,u=t[`scroll${a}`];o.current=function(t,e){const n=t===document.scrollingElement,i=n&&document.body||t;let s=_c.get(i);s||_c.set(i,s=getComputedStyle(i));const{writingMode:o,flexDirection:r}=s,a="x"===e!==/^[vs]/.test(o);return(a?"rtl"===s.direction!=("sideways-lr"===o):o.endsWith("rl"))!==(!n&&s.display.includes("flex")&&(a!==("c"===r[0])?r:s.flexWrap).endsWith("reverse"))}(t,e)?-u||0:u,o.containerLength=t[`client${r}`],o.targetLength=t[`scroll${r}`],o.scrollLength=o.targetLength-o.containerLength,o.offset.length=0,o.offset[0]=0,o.offset[1]=o.scrollLength,o.progress=i(0,1,h(0,o.scrollLength,o.current));const d=s-c;o.velocity=d>50?0:f(o.current-l,d)}const Jc={start:0,center:.5,end:1};function Qc(t,e,n=0){let i=0;if(t in Jc&&(t=Jc[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 tu=[0,0];function eu(t,e,n,i){let s=Array.isArray(t)?t:tu,o=0,r=0;return"number"==typeof t?s=[t,t]:"string"==typeof t&&(s=(t=t.trim()).includes(" ")?t.split(" "):[t,Jc[t]?t:"0"]),o=Qc(s[0],n,i),r=Qc(s[1],e),o-r}const nu=[[0,0],[1,1]];function iu(t,e){const n=t.length-1;if(n<1)return 0;const i=t[0]>t[n],s=e=>t[i?n-e:e];if(t[0]===t[1]&&e<s(0))return i?1:0;let o=0;for(;o<n-1&&e>=s(o+1);)o++;const r=(o+h(s(o),s(o+1),e))/n;return i?1-r:r}function su(t,e,n,s={}){const{target:o}=s,r=o||s.offset;return{measure:e=>{if(r){n.time=e.time;for(const t in qc){const i=t,{offset:s}=n[i];Object.assign(n[i],e[i]),n[i].offset=s}if(o&&o!==t){const e=function(t,e){const n={x:0,y:0};let i=t;for(;i&&i!==e;)if(cs(i))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}(o,t),i=function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(o);n.x.targetOffset=e.x,n.y.targetOffset=e.y,n.x.targetLength=i.width,n.y.targetLength=i.height}!function(t,{offset:e=nu}){for(const n in qc){const s=t[n];s.offset.length=0;for(let t=0;t<e.length;t++)s.offset[t]=eu(e[t],s.containerLength,s.targetLength,s.targetOffset);s.progress=i(0,1,iu(s.offset,s.current))}}(n,s)}},notify:t=>e(r?n:t)}}const ou=new WeakMap,ru=new WeakMap,au=new WeakMap,lu=new WeakMap,cu=t=>t===document.scrollingElement?window:t;function uu(t,{container:e=document.scrollingElement,trackContentSize:n=!1,...i}={}){if(!e)return c;let s=au.get(e);s||(s=new Set,au.set(e,s));const o=su(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}},i);if(s.add(o),!ou.has(e)){const 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=()=>{!function(t,e,n){for(const i in qc)Zc(t,i,e,n);e.time=n}(e,t,I.timestamp);for(const e of s)e.measure(t);Kt.preUpdate(i)},i=()=>{for(const e of s)e.notify(t)},o=()=>Kt.read(n);ou.set(e,o);const r=cu(e);window.addEventListener("resize",o),e!==document.documentElement&&ru.set(e,Ga(e,o)),r.addEventListener("scroll",o),o()}if(n&&!lu.has(e)){const t=ou.get(e),n={width:e.scrollWidth,height:e.scrollHeight},i=()=>{const i=e.scrollWidth,s=e.scrollHeight;n.width===i&&n.height===s||(t(),n.width=i,n.height=s)},s=Kt.read(i,!0);lu.set(e,s)}const r=ou.get(e);return Kt.read(r,!1,!0),()=>{Gt(r);const t=au.get(e);if(!t)return;if(t.delete(o),t.size)return;au.delete(e);const n=ou.get(e);ou.delete(e),n&&(cu(e).removeEventListener("scroll",n),ru.get(e)?.(),window.removeEventListener("resize",n));const i=lu.get(e);i&&(Gt(i),lu.delete(e))}}const hu=new Map;const du=t=>{if(/v/u.test(t))return[];const e=eu(t,0,0,0);return[eu(t,0,1,0)-e,e-eu(t,1,0,0),e]},pu=([t,e,n])=>!n&&(0===e||1===e)&&`${e?"entry":"exit"}-crossing ${100*t}%`;function mu(t,e){const{target:n,container:i,axis:s}=e,o=n&&function(t=nu){if(2!==t.length)return;const[e,n]=t.map(du),i=[pu(e),pu(n)],s=n[0]-e[0],o=e[1]-n[1];return i[0]&&i[1]&&(s||o)?{points:i,a:s,b:o,cover:!e[0]&&1===s&&1===o}:void 0}(e.offset),r=function(t){return"undefined"!=typeof window&&(t?Tn():wn())}(n)&&(n?!!o:!e.offset),a=new Map,l=new Set;let c,u=!1;const h=(t,e)=>{const[n,i]=o.points;e.effect.updateTiming({direction:u?"normal"===t?"reverse":"alternate-reverse":t}),Object.assign(e,{rangeStart:u?i:n,rangeEnd:u?n:i}),e.play()},d=[t.attachTimeline({get timeline(){return r?function({container:t,target:e,axis:n}){let i=hu.get(t);i||(i=new Map,hu.set(t,i));const s=e??"self";let o=i.get(s);return o||(o={},i.set(s,o)),o[n]||(o[n]=e?new ViewTimeline({subject:e,axis:n}):new ScrollTimeline({source:t,axis:n}))}(e):void 0},onAttach:o&&(t=>{const e=t.effect.getTiming().direction;a.set(t,e),h(e,t)}),observe:t=>(t.pause(),l.add(t),c||(c=uu(t=>{l.forEach(e=>{e.time=e.iterationDuration*t[s].progress})},e)),()=>l.delete(t))})];if(r&&o){const{a:t,b:e}=o,r="y"===s?"clientHeight":"clientWidth",l=()=>{u!==(u=t*n[r]+e*i[r]<0)&&a.forEach(h)};l(),t*e<0&&d.push(Ga(l),Ga([n,i],l))}return()=>{d.forEach(t=>t()),c?.()}}const fu={some:0,all:1};t.AsyncMotionValueAnimation=ni,t.DOMKeyframesResolver=Ji,t.DOMVisualElement=fa,t.DocumentProjectionNode=Zr,t.Feature=class{constructor(t){this.isMounted=!1,this.node=t}update(){}},t.FlatTree=gr,t.GroupAnimation=ii,t.GroupAnimationWithThen=oi,t.HTMLProjectionNode=Qr,t.HTMLVisualElement=xa,t.JSAnimation=Ee,t.KeyframeResolver=fn,t.LayoutAnimationBuilder=Va,t.MotionGlobalConfig=s,t.MotionValue=di,t.MotionValueState=ys,t.NativeAnimation=kn,t.NativeAnimationExtended=Ln,t.NativeAnimationWrapper=ri,t.NodeStack=lr,t.ObjectVisualElement=class extends ma{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(function(t,e){return t in e}(e,t)){const n=t[e];if("string"==typeof n||"number"==typeof n)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}},t.PanSession=qa,t.SVGVisualElement=class extends fa{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Qo}getBaseTargetFromProps(t,e){return Je.has(e)?super.getBaseTargetFromProps(t,e)??He(e):t[e]}getDefaultValue(t){return Je.has(t)?this.latestValues[t]??He(t):void 0}readValueFromInstance(t,e){if(Je.has(e)){const t=Fe(e);return t&&t.default||0}if(Ds.includes(e)){const n=getComputedStyle(t)[e];if("string"==typeof n&&n)return n.trim()}return e=pc.has(e)?e:Ps(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return gc(t,e,n)}build(t,e,n){Cs(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){fc(t,e,0,i)}mount(t){this.isSVGTag=mc(t.tagName),super.mount(t)}},t.SubscriptionManager=d,t.ViewTransitionBuilder=dc,t.VisualElement=ma,t.VisualElementDragControls=yl,t.acceleratedValues=On,t.activeScope=hs,t.addAttrValue=Rs,t.addBuilderToScope=ps,t.addDomEvent=_r,t.addEffect=ss,t.addPointerEvent=La,t.addPointerInfo=Ra,t.addSVGValue=Bs,t.addScaleCorrector=function(t){for(const e in t)xo[e]=t[e],K(e)&&(xo[e].isCSSVariable=!0)},t.addStyleValue=Ts,t.addToScope=ds,t.addUniqueItem=e,t.addValueToWillChange=Wi,t.alpha=_,t.analyseComplexValue=Tt,t.animate=Yc,t.animateEffectSubject=ls,t.animateElement=ho,t.animateLayout=function(t,e,n){const{scope:i,updateDom:s,defaultOptions:o}=ka(t,e,n),r=new Va(i,s,{...hs.current?.transition,...o});return ps(r),r},t.animateMini=Hc,t.animateMotionValue=bi,t.animateSingleValue=vo,t.animateTarget=Ki,t.animateValue=function(t){return new Ee(t)},t.animateValues=as,t.animateVariant=Gi,t.animateView=function(t,e={}){const n=new dc(t,e);return ps(n),n},t.animateVisualElement=Yi,t.animationMapKey=li,t.anticipate=M,t.applyAxisDelta=Zs,t.applyBoxDelta=Js,t.applyGeneratorOptions=Vn,t.applyPointDelta=_s,t.applyPxDefaults=es,t.applyTreeDeltas=eo,t.arc=function(t={}){const e=function({strength:t=.5,peak:e=.5,direction:n,rotate:i=!1}={}){const s=!0===i?1:"number"==typeof i?i:0;let o;return(i,r)=>{const a=r.x-i.x,l=r.y-i.y;let c;c="cw"===n?-t:"ccw"===n?t:(Math.abs(a)>=Math.abs(l)?a:l)<0?-t:t;let u=Pi(i.x,i.y,r.x,r.y,c,e);if(void 0===n){const t=Math.abs(a)<Math.abs(l),n=i.x+a*e,s=i.y+l*e,h=t?Math.sign(u.x-n):Math.sign(u.y-s);void 0!==o&&0!==h&&h!==o?(c=-c,u=Pi(i.x,i.y,r.x,r.y,c,e)):0!==h&&(o=h)}const h=s?Ai(0,i.x,u.x,r.x,i.y,u.y,r.y):0,d=s?Ai(1,i.x,u.x,r.x,i.y,u.y,r.y):0,p=s?v(-180,180,d-h):0;return t=>{const e={x:Si(t,i.x,u.x,r.x),y:Si(t,i.y,u.y,r.y)};if(s){const n=Ai(t,i.x,u.x,r.x,i.y,u.y,r.y),o=h+p*t;e.rotate=v(-180,180,n-o)*s}return e}}}(t),n={interpolateProjection(t){const n=t.x.translate,i=t.y.translate;if(!(Math.sqrt(n*n+i*i)<20))return e({x:n,y:i},{x:0,y:0})},animateValues(t,n,i,s,o){if(!("x"in n)&&!("y"in n))return;const r=t("x"),a=t("y"),l=n.x,c=n.y,u=(Array.isArray(l)&&null!=l[0]?l[0]:r?.get())??0,h=(Array.isArray(c)&&null!=c[0]?c[0]:a?.get())??0,d=Array.isArray(l)?l[l.length-1]:l??u,p=Array.isArray(c)?c[c.length-1]:c??h,m=e({x:u,y:h},{x:d,y:p}),f=void 0!==m(0).rotate?t("pathRotation"):void 0,g={delay:s,...fi(i||{},"x")};delete g.path;const y=pi(0);y.start(bi("",y,[0,1e3],{...g,isSync:!0,velocity:0,onUpdate:t=>{const e=m(t/1e3);r?.set(e.x),a?.set(e.y),f&&void 0!==e.rotate&&f.set(e.rotate)},onComplete:()=>{r?.set(d),a?.set(p),f?.set(0)},onStop:()=>f?.set(0),onCancel:()=>f?.set(0)})),y.animation&&o.push(y.animation),delete n.x,delete n.y}};return n},t.aspectRatio=rr,t.attachFollow=Wl,t.attachSpring=Ul,t.attrEffect=Ls,t.axisDeltaEquals=ar,t.axisEquals=nr,t.axisEqualsRounded=sr,t.backIn=A,t.backInOut=P,t.backOut=S,t.bindToScope=ms,t.boxEquals=ir,t.boxEqualsRounded=or,t.buildHTMLStyles=Ms,t.buildProjectionTransform=pr,t.buildSVGAttrs=Cs,t.buildSVGPath=ks,t.buildTransform=Xn,t.buildTransformer=bt,t.calcAxisDelta=Io,t.calcBoxDelta=Wo,t.calcChildStagger=ui,t.calcGeneratorDuration=_t,t.calcLength=Oo,t.calcRelativeAxis=No,t.calcRelativeAxisPosition=$o,t.calcRelativeBox=Uo,t.calcRelativePosition=zo,t.camelCaseAttributes=pc,t.camelToDash=Ps,t.cancelFrame=Gt,t.cancelMicrotask=yo,t.cancelSync=Pc,t.checkVariantsDidChange=wc,t.circIn=E,t.circInOut=k,t.circOut=V,t.clamp=i,t.cleanDirtyNodes=Vr,t.collectMotionValues=hi,t.color=mt,t.compareByDepth=fr,t.complex=At,t.containsCSSVariable=H,t.convertBoundingBoxToBox=Ws,t.convertBoxToBoundingBox=Ns,t.convertOffsetToTimes=pe,t.copyAxisDeltaInto=jo,t.copyAxisInto=Lo,t.copyBoxInto=Bo,t.correctBorderRadius=ur,t.correctBoxShadow=hr,t.createAnimationState=function(t){let e=e=>Promise.all(e.map(({animation:e,options:n})=>Yi(t,e,n))),n=Tc(),i=!0,s=!1;function o(o){const{props:r,parent:a,manuallyAnimateOnMount:l}=t,{initial:c}=r,u=i||s,h=[],d=(e=c)=>"boolean"!=typeof e&&Di(t,Array.isArray(e)?e[0]:e,t.presenceContext?.custom)||void 0,p=new Map;let m={},f=1/0,g=t;do{g=!1!==g.props.inherit&&g.parent}while(g&&!g.isControllingVariants);const y=u&&xc(d(c??(g&&g.props.initial))?.transition);if(vc.forEach((e,i)=>{const s=n[e],c=r[e],d=g&&g.props[e],v=void 0!==c?c:na(d)||!1===d?d:void 0,x=na(v),w=e===o?s.isActive:null,T=x&&void 0===c&&!(u&&l);if(s.protectedKeys={...m},!s.isActive&&null===w||!v&&!s.prevProp||ea(v)||"boolean"==typeof v)return;if(!1===w&&(f=i),"exit"===e&&s.isActive&&!0!==w)return void(m={...m,...s.prevResolvedValues});const b=wc(s.prevProp,v);let S=b||x&&(w&&!T||i>f),A=!1;const P=Array.isArray(v)?v:[v];let M,E={};if(!1!==w)for(const n of P){const{transition:i,transitionEnd:s,...o}=Di(t,n,Ci(t,e))||{};E={...E,...o,...s},M=xc(i)||M}const{prevResolvedValues:V}=s;for(const e in{...V,...E}){if(e in m)continue;const n=E[e],i=V[e],o=Array.isArray(n)&&Array.isArray(i)?!yc(n,i)||b:n!==i;let r;if(o&&null==n)p.has(e)||p.set(e,s.prevOut);else if(o||void 0!==n&&p.has(e)){S=!0,r=p.get(e)||y,p.delete(e)&&(A=!0),s.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)}else s.protectedKeys[e]=!0;s.out[e]=r}if(s.prevProp=v,s.prevResolvedValues=E,s.prevOut=M,s.isActive&&(m={...m,...E}),S&&(!T||!b||A))for(const n of P){const i={type:e};if("string"==typeof n&&u&&l&&a?.enteringChildren){const e=Di(a,n)?.transition?.delayChildren;i.delay=ui(a.enteringChildren,t,e)}h.push({animation:n,options:i})}}),p.size){const e={},n=d();let i=n?.transition;p.forEach((s,o)=>{s&&(i={...i||t.getDefaultTransition(),[o]:s});const a=t.getValue(o);a&&(a.liveStyle=!0);const l=n&&!Array.isArray(c)?n[o]:void 0,u=t.getBaseTargetFromProps(r,o);e[o]=(void 0!==l?l:void 0===u||Fi(u)?void 0===t.initialValues[o]?t.baseTarget[o]:void 0:u)??null}),i&&(e.transition=i),h.push({animation:e})}const v=u&&t.blockInitialAnimation||i&&!l&&(!1===r.initial||r.initial===r.animate);return i=s=!1,!v&&h.length?e(h):Promise.resolve()}return{animateChanges:o,setActive:function(e,i){if(n[e].isActive===i)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,i)),n[e].isActive=i;const s=o(e);for(const t in n)n[t].protectedKeys={};return s},setAnimateFunction:n=>{e=n(t)},getState:()=>n,reset:()=>{n=Tc(),s=!0}}},t.createAxis=Jo,t.createAxisDelta=_o,t.createBox=Qo,t.createDelta=Zo,t.createEffect=vs,t.createGeneratorEasing=Zt,t.createProjectionNode=Ar,t.createRenderBatcher=zt,t.createScopedAnimate=Gc,t.cubicBezier=w,t.cubicBezierAsString=Sn,t.defaultEasing=me,t.defaultOffset=de,t.defaultTransformValue=He,t.defaultValueTypes=Oe,t.degrees=at,t.delay=bo,t.delayInSeconds=bo,t.dimensionValueTypes=Hi,t.distance=Ya,t.distance2D=Xa,t.drag=function(t,e={}){const n=(({axis:t,constraints:e,elastic:n,momentum:i,transition:s,snapToOrigin:o,directionLock:r,propagation:a,onStart:l,onMove:c,onEnd:u,onDirectionLock:h,onTransitionEnd:d,onMeasureConstraints:p})=>({drag:t||!0,dragConstraints:e,dragElastic:n,dragMomentum:i,dragTransition:s,dragSnapToOrigin:o,dragDirectionLock:r,dragPropagation:a,onDragStart:l,onDrag:c,onDragEnd:u,onDirectionLock:h,onDragTransitionEnd:d,onMeasureDragConstraints:p}))(e),i=hs.current;if(i)for(const t in n){const e=n[t];"function"==typeof e&&(n[t]=i.bind(e))}const s=fs(t).map(t=>{i?.track(t);const[s,o]=function(t){const e=Ta.get(t)||ta.get(t)?.projection;if(e?.instance)return[e,()=>{}];const n=Pa(t);return[n,()=>Ta.get(t)===n&&Ma(t,n)]}(t);s.setOptions({alwaysMeasureLayout:!0});const r=new yl(s.options.visualElement,()=>n),a=r.addListeners(),l=function(t,e){const{style:n}=t,i=t.getAttribute("draggable"),s=bl.map(t=>n.getPropertyValue(t)),o=e?"pan-"+("x"===e?"y":"x"):"none";return bl.forEach((t,e)=>n.setProperty(t,e<3?"none":o)),t.setAttribute("draggable","false"),()=>{bl.forEach((t,e)=>n.setProperty(t,s[e])),null===i?t.removeAttribute("draggable"):t.setAttribute("draggable",i)}}(t,e.axis);return()=>{l(),a?.(),r.cancel(),r.stopAnimation(),o()}});return ds(()=>s.forEach(t=>t()))},t.eachAxis=mr,t.easeIn=D,t.easeInOut=R,t.easeOut=C,t.easingDefinitionToFunction=F,t.elementDragControls=gl,t.expectsResolvedDragConstraints=function({dragConstraints:t,onMeasureDragConstraints:e}){return vl(t)&&!!e},t.extractEventInfo=Ca,t.fillOffset=he,t.fillWildcards=Ne,t.findDimensionValueType=qi,t.findEffect=rs,t.findValueType=t=>$l.find(Xi(t)),t.flushKeyframeResolvers=mn,t.followValue=function(t,e){const n=pi(Fi(t)?t.get():t);return Wl(n,t,e),n},t.frame=Kt,t.frameData=I,t.frameSteps=Yt,t.generateLinearEasing=Ht,t.getAnimatableNone=We,t.getAnimationMap=ci,t.getComputedStyle=Dl,t.getDefaultTransition=xi,t.getDefaultValueType=Fe,t.getEasingForSegment=B,t.getFeatureDefinitions=function(){return pa},t.getFinalKeyframe=ve,t.getMixer=Ot,t.getOptimisedAppearId=Ui,t.getOriginIndex=function(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}},t.getValueAsType=Un,t.getValueTransition=fi,t.getVariableValue=Vi,t.getVariantContext=function t(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent&&t(e.parent)||{};return void 0!==e.props.initial&&(n.initial=e.props.initial),n}const n={};for(let t=0;t<bc;t++){const i=sa[t],s=e.props[i];(na(s)||!1===s)&&(n[i]=s)}return n},t.getViewAnimationLayerInfo=tc,t.getViewAnimations=ec,t.globalProjectionState=yr,t.handOffElementState=mo,t.has2DTranslate=Xs,t.hasComplexValues=wt,t.hasReducedMotionListener=ca,t.hasScale=zs,t.hasTransform=Gs,t.hasWarned=function(t){return g.has(t)},t.hex=ot,t.hover=function(t,e,n={}){e=ms(e);const[i,s,o]=Sl(t,n);return i.forEach(t=>{let n,i=!1,o=!1;const r=e=>{n&&(n(e),n=void 0),t.removeEventListener("pointerleave",l)},a=t=>{i=!1,window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",a),o&&(o=!1,r(t))},l=t=>{"touch"!==t.pointerType&&(i?o=!0:r(t))};t.addEventListener("pointerenter",i=>{if("touch"===i.pointerType||ll())return;o=!1;const r=e(t,i);"function"==typeof r&&(n=r,t.addEventListener("pointerleave",l,s))},s),t.addEventListener("pointerdown",()=>{i=!0,window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",a,s)},s)}),o},t.hsla=pt,t.hslaToRgba=Mt,t.inView=function(t,e,{root:n,margin:i,amount:s="some"}={}){const o=fs(t);e=ms(e);const 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.target,t);"function"==typeof n?r.set(t.target,n):a.unobserve(t.target)}else"function"==typeof n&&(n(t),r.delete(t.target))})},{root:n,rootMargin:i,threshold:"number"==typeof s?s:fu[s]});return o.forEach(t=>a.observe(t)),ds(()=>a.disconnect())},t.inertia=ce,t.initPrefersReducedMotion=ha,t.interpolate=ue,t.invariant=()=>{},t.invisibleValues=Lt,t.isAnimationControls=ea,t.isBezierDefinition=j,t.isCSSVariableName=K,t.isCSSVariableToken=Y,t.isControllingVariants=oa,t.isDeltaZero=er,t.isDragActive=ll,t.isDragging=al,t.isEasingArray=L,t.isElementKeyboardAccessible=sl,t.isElementTextInput=rl,t.isForcedMotionValue=ya,t.isGenerator=En,t.isHTMLElement=cs,t.isKeyframesTarget=Li,t.isMotionValue=Fi,t.isNear=Fo,t.isNodeOrChild=Al,t.isNumericalString=o,t.isObject=r,t.isPrimaryPointer=Da,t.isSVGElement=us,t.isSVGSVGElement=So,t.isSVGTag=mc,t.isTransitionDefined=Ti,t.isVariantLabel=na,t.isVariantNode=ra,t.isWaapiSupportedEasing=function t(e){return Boolean("function"==typeof e&&bn()||!e||"string"==typeof e&&(e in An||bn())||j(e)||Array.isArray(e)&&e.every(t))},t.isWillChangeMotionValue=Ii,t.isZeroValueString=a,t.keyframes=fe,t.makeAnimationInstant=jn,t.mapEasingToNativeEasing=Pn,t.mapValue=function(t,e,n,i){const s=Ll(e,n,i);return Nl(()=>s(t.get()))},t.maxGeneratorDuration=qt,t.measurePageBox=ao,t.measureViewportBox=ro,t.memo=l,t.microtask=go,t.millisecondsToSeconds=m,t.mirrorEasing=T,t.mix=Ut,t.mixArray=Ft,t.mixColor=Rt,t.mixComplex=Wt,t.mixImmediate=Et,t.mixLinearColor=kt,t.mixNumber=Vt,t.mixObject=It,t.mixValues=Vo,t.mixVisibility=Bt,t.motionValue=pi,t.moveItem=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.nodeGroup=function(){const t=new Set,e=new WeakMap,n=()=>t.forEach(Sc);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}},t.noop=c,t.number=q,t.numberValueTypes=je,t.optimizedAppearDataAttribute=Ni,t.optimizedAppearDataId="framerAppearId",t.originProps=xs,t.parseAnimateLayoutArgs=ka,t.parseCSSVariable=Ei,t.parseValueFromTransform=qe,t.percent=lt,t.pipe=u,t.pixelsToPercent=cr,t.positionalKeys=Ri,t.prefersReducedMotion=la,t.press=function(t,e,n={}){e=ms(e);const[i,s,o]=Sl(t,n),r=t=>{const i=t.currentTarget;if(!Vl(t))return;if(kl.has(t))return;Pl.add(i),n.stopPropagation&&kl.add(t);const o=e(i,t),r={...s,capture:!0},a=(t,e)=>{window.removeEventListener("pointerup",l,r),window.removeEventListener("pointercancel",c,r),Pl.has(i)&&Pl.delete(i),Vl(t)&&"function"==typeof o&&o(t,{success:e})},l=t=>{a(t,i===window||i===document||n.useGlobalTarget||Al(i,t.target))},c=t=>{a(t,!1)};window.addEventListener("pointerup",l,r),window.addEventListener("pointercancel",c,r)};return i.forEach(t=>{(n.useGlobalTarget?window:t).addEventListener("pointerdown",r,s),cs(t)&&(t.addEventListener("focus",()=>((t,e)=>{let n=!1;const i=Ml(()=>{Pl.has(t)||(n=!0,El(t,"down"))}),s=Ml(()=>{n&&(n=!1,El(t,"up"))});t.addEventListener("keydown",i,e),t.addEventListener("keyup",s,e),t.addEventListener("blur",()=>{t.removeEventListener("keydown",i),t.removeEventListener("keyup",s),n&&El(t,"cancel")},{...e,once:!0})})(t,s),s),sl(t)||t.hasAttribute("tabindex")||(t.tabIndex=0))}),o},t.processFrame=(t=U.now())=>{if(I.isProcessing)return;const e=t-I.timestamp;I.delta=s.useManualTiming?e:Math.max(Math.min(e,40),1),U.set(I.timestamp=t),I.isProcessing=!0;for(const t in Yt)Yt[t].process(I);I.isProcessing=!1},t.progress=h,t.progressPercentage=dt,t.propEffect=fo,t.propagateDirtyNodes=Er,t.px=ct,t.readSVGValue=js,t.readStyleValue=bs,t.readTransformValue=_e,t.recordStats=function(){if(wo.value)throw wo.value=null,wo.addProjectionMetrics=null,new Error("Stats are already being measured");const t=wo;t.value={layoutProjection:{nodes:[],calculatedTargetDeltas:[],calculatedProjections:[]}},t.addProjectionMetrics=e=>{const{layoutProjection:n}=t.value;n.nodes.push(e.nodes),n.calculatedTargetDeltas.push(e.calculatedTargetDeltas),n.calculatedProjections.push(e.calculatedProjections)}},t.releaseElement=po,t.removeAxisDelta=Go,t.removeAxisTransforms=Yo,t.removeBoxTransforms=qo,t.removeEffect=os,t.removeItem=n,t.removePointDelta=Ko,t.renderHTML=ga,t.renderSVG=fc,t.resize=Ga,t.resolveElements=fs,t.resolveMotionValue=Ao,t.resolveTransition=mi,t.resolveVariant=Di,t.resolveVariantFromProps=ki,t.reverseEasing=b,t.rgbUnit=nt,t.rgba=it,t.rootProjectionNode=Jr,t.round=Me,t.sampleDelta=Rn,t.scale=Z,t.scaleCorrectors=xo,t.scalePoint=qs,t.scopeMotion=function(...t){const e="function"==typeof t[0]?void 0:t.shift(),[i,s={}]=t,{transition:o,matchMedia:r}=s,a=[],l=new Map;let c=[],u=!1;const h={root:fs(e)[0],transition:o,add:t=>(c.push(t),()=>n(c,t)),bind:t=>(...e)=>{const n=y.run(()=>t(...e));return"function"==typeof n?h.bind(n):n},track(t){l.has(t)||l.set(t,t.getAttribute("style"))}},d=t=>{const e=c;c=[];for(let t=e.length-1;t>=0;t--)e[t]();t&&l.forEach((t,e)=>{po(e),null===t?e.removeAttribute("style"):e.setAttribute("style",t)}),l.clear()},p=()=>{y.state="active";let t=!a.length;y.media={};for(const[e,n]of a)t=(y.media[e]=n.matches)||t;if(t&&i){const t=y.run(()=>i(y));"function"==typeof t&&h.add(t)}},m=()=>{u||(u=!0,queueMicrotask(()=>{u=!1,a.length&&y.refresh()}))},f=t=>{y.state=t?"cancelled":"stopped";for(const[,t]of a)t.removeEventListener("change",m);a.length=0,d(t)},g=(t,e)=>{const n=hs.current;hs.current=t;try{return e()}finally{hs.current=n}},y={state:"active",media:{},run:t=>g(h,t),ignore:t=>g(void 0,t),bind:h.bind,stop:()=>f(),cancel:()=>f(!0),refresh(){d(!0),p()}};if(r&&"undefined"!=typeof window){const t="string"==typeof r?{matches:r}:r;for(const e in t){const n=window.matchMedia(Rl(t[e]));n.addEventListener("change",m),a.push([e,n])}}return ds(y.cancel),p(),y},t.scrapeHTMLMotionValuesFromProps=va,t.scrapeSVGMotionValuesFromProps=gc,t.scroll=function(t,{axis:e="y",source:n,container:i=document.scrollingElement,...s}={}){if(!i)return c;const o={axis:e,container:n||i,...s};if("function"==typeof t){const n=ms(t);return ds(uu(t=>n(t[e].progress,t),o))}return ds(mu(t,o))},t.scrollInfo=uu,t.secondsToMilliseconds=p,t.setDragLock=cl,t.setFeatureDefinitions=function(t){pa=t},t.setStyle=yn,t.setTarget=Oi,t.spring=le,t.springValue=function(t,e){const n=pi(Fi(t)?t.get():t);return Ul(n,t,e),n},t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:i,grid:s}={}){const o={};return(r,a)=>{let l=o[a];if(!l){const[t,e]=s||[1/0,1],i=Math.min(t,a)-1,r=Math.max(e,Math.ceil(a/t))-1,c="number"==typeof n,u="first"===n?0:"last"===n?1:.5,h=c?n%t:i*u,d=c?Math.floor(n/t):r*u;l=o[a]=[];for(let e=0;e<a;e++){const s=e%t,o=Math.floor(e/t),a=Math.min(s,i-s),c=Math.min(o,r-o);if("random"===n){const t=Math.random()*(e+1)|0;l[e]=l[t],l[t]=e}else l[e]="edges"===n?Math.min(i?a:c,r?c:a):Math.hypot(s-h,o-d)}l.push(s?Math.max(...l):a)}let c=t*l[r];const u=t*l[a];if(i&&u){c=F(i)(c/u)*u}return e+c}},t.startWaapiAnimation=Mn,t.statsBuffer=wo,t.steps=function(t,e="end"){return n=>{const s=(n="end"===e?Math.min(n,.999):Math.max(n,.001))*t,o="end"===e?Math.floor(s):Math.ceil(s);return i(0,1,o/t)}},t.styleEffect=As,t.styleSubjectEffect=Ss,t.supportedWaapiEasing=An,t.supportsBrowserAnimation=Nn,t.supportsFlags=vn,t.supportsLinearEasing=bn,t.supportsPartialKeyframes=ns,t.supportsScrollTimeline=wn,t.supportsViewTimeline=Tn,t.supportsWaapi=Wn,t.svgEffect=Fs,t.svgSubjectEffect=Os,t.sync=Ac,t.testValueType=Xi,t.time=U,t.toMediaQuery=Rl,t.transform=Ll,t.transformAxis=io,t.transformBox=oo,t.transformBoxPoints=Us,t.transformPropOrder=Ze,t.transformProps=Je,t.transformValue=Nl,t.transformValueTypes=Be,t.translateAxis=no,t.updateMotionValuesFromProps=aa,t.variantPriorityOrder=ia,t.variantProps=sa,t.velocityPerSecond=f,t.vh=ut,t.visualElementStore=ta,t.vw=ht,t.warnOnce=y,t.warning=()=>{},t.wrap=v});
|
|
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";function e(t,e){-1===t.indexOf(e)&&t.push(e)}function n(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const i=(t,e,n)=>n>e?e:n<t?t:n;const s={},o=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),r=t=>"object"==typeof t&&null!==t,a=t=>/^0[^.\s]+$/u.test(t);function l(t){let e;return()=>(void 0===e&&(e=t()),e)}const c=t=>t,u=(...t)=>t.reduce((t,e)=>n=>e(t(n))),h=(t,e,n)=>{const i=e-t;return i?(n-t)/i:1};class d{constructor(){this.subscriptions=[]}add(t){return e(this.subscriptions,t),()=>this.remove(t)}remove(t){n(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 p=t=>1e3*t,m=t=>t/1e3,f=(t,e)=>e?t*(1e3/e):0,g=new Set;function y(t,e,n){t||g.has(e)||(console.warn(function(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}(e,n)),g.add(e))}const v=(t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t},x=(t,e,n)=>t*(3*(1-t)*((1-t)*e+t*n)+t*t);function w(t,e,n,i){return t===e&&n===i?c:s=>{let o=0,r=1,a=s;for(let e=0;;e++){a>=o&&a<=r||(a=(o+r)/2);const i=x(a,t,n)-s;if(i*i<1e-28||40===e)break;i>0?r=a:o=a,a-=1e-7*i/(x(a+1e-7,t,n)-s-i)}return x(a,e,i)}}const T=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,b=t=>e=>1-t(1-e),S=w(.33,1.53,.69,.99),A=b(S),P=T(A),M=t=>t>=1?1:(t*=2)<1?.5*A(t):.5*(2-Math.pow(2,-10*(t-1))),E=t=>1-Math.sin(Math.acos(t)),k=b(E),V=T(E),D=w(.42,0,1,1),C=w(0,0,.58,1),R=w(.42,0,.58,1);const L=t=>Array.isArray(t)&&"number"!=typeof t[0];function B(t,e){return L(t)?t[v(0,t.length,e)]:t}const j=t=>Array.isArray(t)&&"number"==typeof t[0],O={linear:c,easeIn:D,easeInOut:R,easeOut:C,circIn:E,circInOut:V,circOut:k,backIn:A,backInOut:P,backOut:S,anticipate:M},F=t=>{if(j(t)){const[e,n,i,s]=t;return w(e,n,i,s)}return"string"==typeof t?O[t]:t},I={delta:0,timestamp:0,isProcessing:!1};let W;function N(){W=void 0}const U={now:()=>(void 0===W&&U.set(I.isProcessing||s.useManualTiming?I.timestamp:performance.now()),W),set:t=>{W=t,queueMicrotask(N)}},$=t=>Math.round(1e5*t)/1e5,z=t=>e=>"string"==typeof e&&e.startsWith(t),K=z("--"),G=z("var(--"),Y=t=>!!G(t)&&X.test(t.split("/*")[0].trim()),X=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function H(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}const q={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},_={...q,transform:t=>i(0,1,t)},Z={...q,default:1},J=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const Q=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,tt=(t,e)=>n=>Boolean("string"==typeof n&&Q.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),et=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[s,o,r,a]=i.match(J);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},nt={...q,transform:t=>Math.round((t=>i(0,255,t))(t))},it={test:tt("rgb","red"),parse:et("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+nt.transform(t)+", "+nt.transform(e)+", "+nt.transform(n)+", "+$(_.transform(i))+")"},st=(t,e,n)=>{const i=t.substring(1+e*n,1+(e+1)*n);return n>1?i:i+i};const ot={test:tt("#"),parse:function(t){const e=t.length>5?2:1,n=st(t,3,e);return{red:parseInt(st(t,0,e),16),green:parseInt(st(t,1,e),16),blue:parseInt(st(t,2,e),16),alpha:n?parseInt(n,16)/255:1}},transform:it.transform},rt=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),at=rt("deg"),lt=rt("%"),ct=rt("px"),ut=rt("vh"),ht=rt("vw"),dt=(()=>({...lt,parse:t=>lt.parse(t)/100,transform:t=>lt.transform(100*t)}))(),pt={test:tt("hsl","hue"),parse:et("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+lt.transform($(e))+", "+lt.transform($(n))+", "+$(_.transform(i))+")"},mt={test:t=>it.test(t)||ot.test(t)||pt.test(t),parse:t=>it.test(t)?it.parse(t):pt.test(t)?pt.parse(t):ot.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?it.transform(t):pt.transform(t),getAnimatableNone:t=>{const e=mt.parse(t);return e.alpha=0,mt.transform(e)}},ft=new RegExp(J.source),gt=new RegExp(/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu.source,"i");const yt="number",vt="color",xt=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)(?![a-z]*\()/giu;function wt(t){const e=t.toString();return ft.test(e)||gt.test(e)}function Tt(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const r=e.replace(xt,t=>(mt.test(t)?(i.color.push(o),s.push(vt),n.push(mt.parse(t))):t.startsWith("var(")?(i.var.push(o),s.push("var"),n.push(t)):(i.number.push(o),s.push(yt),n.push(parseFloat(t))),++o,"${}")).split("${}");return{values:n,split:r,indexes:i,types:s}}function bt({split:t,types:e}){const n=t.length;return i=>{let s="";for(let o=0;o<n;o++)if(s+=t[o],void 0!==i[o]){const t=e[o];s+=t===yt?$(i[o]):t===vt?mt.transform(i[o]):i[o]}return s}}const St=(t,e)=>{return"number"==typeof t?e?.trim().endsWith("/")?t:0:"number"==typeof(n=t)?0:mt.test(n)?mt.getAnimatableNone(n):n;var n};const At={test:function(t){return isNaN(t)&&"string"==typeof t&&(ft.test(t)||gt.test(t))},parse:function(t){return Tt(t).values},createTransformer:function(t){return bt(Tt(t))},getAnimatableNone:function(t){const e=Tt(t);return bt(e)(e.values.map((t,n)=>St(t,e.split[n])))}};function Pt(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Mt({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=Pt(a,i,t+1/3),o=Pt(a,i,t),r=Pt(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}}function Et(t,e){return n=>n>0?e:t}const kt=(t,e,n)=>t+(e-t)*n,Vt=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},Dt=[ot,it,pt];function Ct(t){const e=(n=t,Dt.find(t=>t.test(n)));var n;if(!e)return!1;let i=e.parse(t);return e===pt&&(i=Mt(i)),i}const Rt=(t,e)=>{const n=Ct(t),i=Ct(e);if(!n||!i)return Et(t,e);const s={...n};return t=>(s.red=Vt(n.red,i.red,t),s.green=Vt(n.green,i.green,t),s.blue=Vt(n.blue,i.blue,t),s.alpha=kt(n.alpha,i.alpha,t),it.transform(s))},Lt=new Set(["none","hidden"]);function Bt(t,e){return Lt.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function jt(t,e){return n=>kt(t,e,n)}function Ot(t){return"number"==typeof t?jt:"string"==typeof t?Y(t)?Et:mt.test(t)?Rt:Wt:Array.isArray(t)?Ft:"object"==typeof t?mt.test(t)?Rt:It:Et}function Ft(t,e){const n=[...t],i=n.length,s=t.map((t,n)=>Ot(t)(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=s[e](t);return n}}function It(t,e){const n={...t,...e},i={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(i[s]=Ot(t[s])(t[s],e[s]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const Wt=(t,e)=>{const n=Tt(t),i=Tt(e);return n.indexes.var.length===i.indexes.var.length&&n.indexes.color.length===i.indexes.color.length&&n.indexes.number.length>=i.indexes.number.length?Lt.has(t)&&!i.values.length||Lt.has(e)&&!n.values.length?Bt(t,e):u(Ft(function(t,e){const n=[],i={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const o=e.types[s],r=t.indexes[o][i[o]],a=t.values[r]??0;n[s]=a,i[o]++}return n}(n,i),i.values),bt(i)):Et(t,e)},Nt=/^(-?(?:\d+(?:\.\d*)?|\.\d+))([a-z%]*)$/iu;function Ut(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return kt(t,e,n);if("string"==typeof t&&"string"==typeof e){const n=function(t,e){const n=Nt.exec(t);if(!n)return;const i=Nt.exec(e);if(!i||n[2]!==i[2])return;const s=n[2],o=parseFloat(n[1]),r=parseFloat(i[1]);return t=>$(kt(o,r,t))+s}(t,e);if(n)return n}return Ot(t)(t,e)}const $t=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function zt(t,e,n={delta:0,timestamp:0,isProcessing:!1}){let i=!1,o=!0;const r=()=>i=!0,a=$t.reduce((t,e)=>(t[e]=function(t){let e,n=new Set,i=new Set,s=!1,o=!1;const r=new Set;let a={delta:0,timestamp:0,isProcessing:!1};function l(n){r.has(n)&&(i.add(n),t()),(e=n)(a)}const c={schedule:(t,o=!1,a=!1)=>{const l=a&&s,c=l?n:i;return o&&r.add(t),l&&t!==e&&c.delete(t),c.add(t),t},cancel:t=>{i.delete(t),r.delete(t)},process:t=>{if(a=t,s)return void(o=!0);s=!0;const r=n;n=i,i=r,n.forEach(l),n.clear(),e=void 0,s=!1,o&&(o=!1,c.process(t))}};return c}(r),t),{}),{setup:l,read:c,resolveKeyframes:u,preUpdate:h,update:d,preRender:p,render:m,postRender:f}=a,g=()=>{const r=s.useManualTiming,a=r?n.timestamp:performance.now();i=!1,r||(n.delta=o?1e3/60:Math.max(Math.min(a-n.timestamp,40),1)),n.timestamp=a,n.isProcessing=!0,l.process(n),c.process(n),u.process(n),h.process(n),d.process(n),p.process(n),m.process(n),f.process(n),n.isProcessing=!1,i&&e&&(o=!1,t(g))};return{schedule:$t.reduce((e,s)=>{const r=a[s];return e[s]=(e,s=!1,a=!1)=>(i||(i=!0,o=!0,n.isProcessing||t(g)),r.schedule(e,s,a)),e},{}),cancel:t=>{for(let e=0;e<$t.length;e++)a[$t[e]].cancel(t)},state:n,steps:a}}const{schedule:Kt,cancel:Gt,steps:Yt}=zt("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:c,!0,I),Xt=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>Kt.update(e,t),stop:()=>Gt(e),now:()=>I.isProcessing?I.timestamp:U.now()}},Ht=(t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let e=0;e<s;e++)i+=Math.round(1e4*t(e/(s-1)))/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},qt=2e4;function _t(t,e=50,n=2e4,i){let s=0,o=t.next(s);for(i?.push(o.value);!o.done&&s<n;)s+=e,o=t.next(s),i?.push(o.value);return s>=n?1/0:s}function Zt(t,e=100,n){const{keyframes:i,velocity:s}=t,o=i&&i[i.length-1]-i[0],r=n({...t,velocity:s&&o?s*e/o:s,keyframes:[0,e]}),a=Math.min(_t(r),qt);return{type:"keyframes",ease:t=>r.next(a*t).value/e,duration:m(a)}}const Jt=t=>t<0?1/Math.max(1+t,.05):Math.max(1-t,.05);function Qt(t,e){if(!(t>1))return 1;const n=Math.sqrt(t*t-1),i=t-n,s=t+n,o=2*n*Math.exp(-e)*(1+e);return ne(t=>s*Math.exp(-i*t)-i*Math.exp(-s*t)-o,t=>Math.exp(-s*t)-Math.exp(-i*t),e)/e}function te(t,e){return t*Math.sqrt(1-e*e)}const ee=12;function ne(t,e,n){let i=n;for(let n=1;n<ee;n++)i-=t(i)/e(i);return i}const ie=.001;const se=(t,e)=>(e?t>=0:t>0)&&t<1/0;function oe(t,e){if(se(t,e))return t}function re(t){const e=oe(t.stiffness),n=oe(t.damping,!0),s=oe(t.mass),o={...t,stiffness:e??100,damping:n??10,mass:s??1,isResolvedFromDuration:!1,isTimeDefined:void 0===(e??n??s)&&(void 0!==t.duration||void 0!==t.bounce)};if(o.isTimeDefined){if(t.visualDuration){const e=Jt(t.bounce||0),n=2*Math.PI/(1.2*t.visualDuration)*Qt(e,2*Math.PI/1.2);o.stiffness=n*n,o.damping=2*e*Math.sqrt(o.stiffness)}else Object.assign(o,function({duration:t=800,bounce:e=.3}){let n,s;const o=Jt(e);t=i(.01,10,m(t)),o<1?(n=e=>{const n=e*o,i=n*t,s=te(e,o),r=Math.exp(-i);return ie-n/s*r},s=e=>{const i=e*o*t,s=o*o*e*e*t,r=Math.exp(-i),a=te(e*e,o);return(-n(e)+ie>0?-1:1)*-s*r/a}):(n=e=>Math.exp(-e*t)*(e*t+1)-.001,s=e=>Math.exp(-e*t)*(t*t*-e));const r=ne(n,s,5/t),a=r*Qt(o,r*t),l=a*a;return{stiffness:l,damping:2*o*Math.sqrt(l),duration:p(t)}}(o)),o.isResolvedFromDuration=!0;se(o.stiffness)&&se(o.damping,!0)||(o.stiffness=100,o.damping=10)}return o}function ae(t=.3,e=.3){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t,i=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],o={done:!1,value:i},{stiffness:r,damping:a,mass:l,duration:c,isResolvedFromDuration:u,isTimeDefined:h}=re({...n}),d=t=>h?0:-m(t),f=a/(2*Math.sqrt(r*l)),g=m(Math.sqrt(r/l)),y=f*g,v={target:s,delta:s-i,velocity:d(n.velocity||0)||0,restSpeed:0,restDelta:0},x=()=>{const t=Math.abs(v.delta)<5;v.restSpeed=n.restSpeed||(t?.01:2),v.restDelta=n.restDelta||(t?.005:.5)};let w,T,b;if(x(),f<1){const t=te(g,f),e={A:0,sinC:0,cosC:0,t:-1,env:0,sin:0,cos:0};b=()=>{e.A=(v.velocity+y*v.delta)/t,e.sinC=y*e.A+v.delta*t,e.cosC=y*v.delta-e.A*t};const n=n=>{n!==e.t&&(e.t=n,e.env=Math.exp(-y*n),e.sin=Math.sin(t*n),e.cos=Math.cos(t*n))};w=t=>(n(t),v.target-e.env*(e.A*e.sin+v.delta*e.cos)),T=t=>(n(t),e.env*(e.sinC*e.sin+e.cosC*e.cos))}else if(1===f){w=t=>v.target-Math.exp(-g*t)*(v.delta+(v.velocity+g*v.delta)*t);const t={C:0};b=()=>{t.C=v.velocity+g*v.delta},T=e=>Math.exp(-g*e)*(g*t.C*e-v.velocity)}else{const t=g*Math.sqrt(f*f-1),e=y-t,n=y+t,i=t<1||h?1/0:300/t,s=(t,e)=>Math.exp(e>i?(y-t)*i-y*e:-t*e),o={S:0,F:0};b=()=>{const e=(v.velocity+y*v.delta)/t;o.S=(v.delta+e)/2,o.F=(v.delta-e)/2},w=t=>v.target-o.S*s(e,t)-o.F*s(n,t),T=t=>e*o.S*s(e,t)+n*o.F*s(n,t)}b();const S=u&&c||null,A={calculatedDuration:S,retarget:(t,e)=>{v.target=t[t.length-1],v.delta=v.target-t[0],v.velocity=d(e),n.restSpeed&&n.restDelta||x(),A.calculatedDuration=S,o.done=!1,b()},velocity:t=>p(T(t)),next:t=>{const e=w(t);if(u)o.done=t>=c;else{const n=p(T(t));o.done=Math.abs(n)<=v.restSpeed&&Math.abs(v.target-e)<=v.restDelta}return o.value=o.done?v.target:e,o},toString:()=>{const t=Math.min(_t(A),qt),e=Ht(e=>A.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return A}const le=Object.assign(ae,{applyToOptions:t=>{const e=Zt(t,100,ae);return t.ease=e.ease,t.duration=p(e.duration),t.type="keyframes",t}});function ce({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){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=r?r(f):f;g!==f&&(m=g-h);const y=t=>-m*Math.exp(-t/i),v=t=>{const e=y(t);d.done=Math.abs(e)<=c,d.value=d.done?g:t?g+e:h};let x,w;const T=t=>{var e;((e=d.value)<a||e>l)&&(x=t,w=le({keyframes:[d.value,p(d.value)],velocity:-y(t)/i*1e3,damping:s,stiffness:o,restDelta:c,restSpeed:u}))};return T(0),{calculatedDuration:null,next:t=>{let e=!1;return w||void 0!==x||(e=!0,v(t),T(t)),void 0!==x&&t>=x?w.next(t-x):(!e&&v(t),d)}}}function ue(t,e,{clamp:n=!0,ease:o,mixer:r}={}){const a=t.length;if(1===a)return()=>e[0];if(2===a&&e[0]===e[1])return()=>e[1];const l=t[0]===t[1];t[0]>t[a-1]&&(t=[...t].reverse(),e=[...e].reverse());const d=function(t,e,n){const i=[],o=n||s.mix||Ut,r=t.length-1;for(let n=0;n<r;n++){let s=o(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||c:e;s=u(t,s)}i.push(s)}return i}(e,o,r),p=d.length,m=n=>{if(l&&n<t[0])return e[0];let i=0;if(p>1)for(;i<t.length-2&&!(n<t[i+1]);i++);const s=h(t[i],t[i+1],n);return d[i](s)};return n?e=>m(i(t[0],t[a-1],e)):m}function he(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=h(0,e,i);t.push(kt(n,1,s))}}function de(t){const e=[0];return he(e,t.length-1),e}function pe(t,e){return t.map(t=>t*e)}function me(t,e){return t.map(()=>e||R).splice(0,t.length-1)}function fe({duration:t=300,keyframes:e,times:n,ease:o="easeInOut"}){const r=L(o)?o.map(F):F(o)||R,a={done:!1,value:e[0]};if(2===e.length&&!Array.isArray(r)&&(!n||2!==n.length||0===n[0]&&1===n[1])){const[n,o]=e,l=n===o?void 0:(s.mix||Ut)(n,o);return{calculatedDuration:t,next:e=>(a.value=l?l(r(t>0?i(0,1,e/t):1)):o,a.done=e>=t,a)}}const l=ue(pe(n&&n.length===e.length?n:de(e),t),e,{ease:Array.isArray(r)?r:me(e,r)});return{calculatedDuration:t,next:e=>(a.value=l(e),a.done=e>=t,a)}}function ge(t,e,n=0){return e<=0?n:t.velocity?t.velocity(e):function(t,e,n){const i=Math.max(e-5,0);return f(n-t(i),e-i)}(e=>t.next(e).value,e,t.next(e).value)}const ye=t=>null!==t;function ve(t,{repeat:e,repeatType:n="loop"},i,s=1){const o=t.filter(ye),r=s<0||e&&"loop"!==n&&e%2==1?0:o.length-1;return r&&void 0!==i?i:o[r]}const xe={decay:ce,inertia:ce,tween:fe,keyframes:fe,spring:le};function we(t){"string"==typeof t.type&&(t.type=xe[t.type])}const Te=(t,e)=>e-t>40&&!s.useManualTiming?e:t;function be(t,e){return{kind:t,animation:e,timestamp:U.now(),frameTimestamp:I.timestamp,frameIsProcessing:I.isProcessing}}function Se(t,e,n){const i=globalThis.__MOTION_INSPECT__;if(i)try{i({...be("animation-start",t),options:n?{...e,...n}:e})}catch{}}class Ae{constructor(){this.isResolved=!1}get finished(){return this._finished||(this._finished=this.isResolved?Promise.resolve():new Promise(t=>{this._resolve=t})),this._finished}updateFinished(){this._finished=this._resolve=void 0,this.isResolved=!1}notifyFinished(){this.isResolved=!0,this._resolve?.()}then(t,e){return this.finished.then(t,e)}}const Pe=t=>t/100,Me=t=>Math.round(1e4*t)/1e4;class Ee extends Ae{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==U.now()&&this.tick(U.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause(),Se(this,this.options)}initAnimation(){const{options:t}=this;we(t);const{type:e=fe,repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=t;let{keyframes:r}=t;const a=e||fe;a!==fe&&"number"!=typeof r[0]&&(this.mixKeyframes=u(Pe,Ut(r[0],r[1])),r=[0,100]);const l=a(r===t.keyframes?t:{...t,keyframes:r});"mirror"===s&&(this.mirroredGenerator=a({...t,keyframes:[...r].reverse(),velocity:-o})),null===l.calculatedDuration&&(l.calculatedDuration=_t(l));const{calculatedDuration:c}=l;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=l}updateTime(t){this.currentTime=this.holdTime??Math.round(t-this.startTime)*this.playbackSpeed}tick(t,e=!1){const{generator:n,totalDuration:i,calculatedDuration:s}=this;if(null===this.startTime)return n.next(0);const{delay:o=0,keyframes:r,type:a,onUpdate:l,finalKeyframe:c}=this.options;this.startTime===this.pendingStartTime&&(this.startTime=Te(this.startTime,t)),this.pendingStartTime=void 0,this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const u=this.currentTime-o*(this.playbackSpeed>=0?1:-1),h=this.playbackSpeed>=0?u<0:u>i;this.currentTime=Math.max(u,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=i);const d=this.generate(this.currentTime,h);let{done:p}=d;h||(p=this.playbackSpeed>=0?s<1/0?this.currentTime>=i:p:this.currentTime<=0);const m=null===this.holdTime&&("finished"===this.state||"running"===this.state&&p);return m&&a!==ce&&(d.value=ve(r,this.options,c,this.speed)),l&&l(d.value),m&&this.finish(),d}at(t){return this.holdTime??Me((t-this.startTime)*this.playbackSpeed)}sampleAt(t,e){const{options:n,totalDuration:i}=this,s=this.at(t)-(n.delay||0);return s>=i&&n.type!==ce?ve(n.keyframes,n,e?void 0:n.finalKeyframe):this.generate(Math.max(s,0),s<0).value}generate(t,e){const{generator:n,totalDuration:s,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:a}=this,{keyframes:l,repeat:c,repeatType:u,repeatDelay:h}=this.options;let d,p=t,m=n;if(c){const e=Math.min(t,s)/a;let n=Math.floor(e),o=e%1;!o&&e>=1&&(o=1),1===o&&n--,n=Math.min(n,c+1);Boolean(n%2)&&("reverse"===u?(o=1-o,h&&(o-=h/a)):"mirror"===u&&(m=r)),p=i(0,1,o)*a}return e?(this.delayState.value=l[0],d=this.delayState):d=m.next(p),o&&!e&&(d.value=o(d.value)),d}get duration(){return m(this.calculatedDuration)}get iterationDuration(){return this.duration+m(this.options.delay??0)}get time(){return m(this.currentTime)}set time(t){t=p(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){return ge(this.generator,this.currentTime,this.options.velocity)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;e&&this.driver&&this.updateTime(U.now()),this.playbackSpeed=t,e&&this.driver&&(this.time=m(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Xt,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime/(this.playbackSpeed||1):this.startTime||(this.startTime=e??(this.pendingStartTime=n)),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(U.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.driver?.stop(),this.driver=void 0,this.startTime=this.holdTime=null}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}const ke=new Set(["brightness","contrast","saturate","opacity"]);function Ve(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(J)||[];if(!i)return t;const s=n.replace(i,"");let o=ke.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const De=/\b([a-z-]*)\(.*?\)/gu,Ce={...At,getAnimatableNone:t=>{const e=t.match(De);return e?e.map(Ve).join(" "):t}},Re={...At,getAnimatableNone:t=>{const e=At.parse(t);return At.createTransformer(t)(e.map(t=>"number"==typeof t?0:"object"==typeof t?{...t,alpha:1}:t))}},Le={...q,transform:Math.round},Be={rotate:at,pathRotation:at,rotateX:at,rotateY:at,rotateZ:at,scale:Z,scaleX:Z,scaleY:Z,scaleZ:Z,skew:at,skewX:at,skewY:at,distance:ct,translateX:ct,translateY:ct,translateZ:ct,x:ct,y:ct,z:ct,perspective:ct,transformPerspective:ct,opacity:_,originX:dt,originY:dt,originZ:ct},je={borderWidth:ct,borderTopWidth:ct,borderRightWidth:ct,borderBottomWidth:ct,borderLeftWidth:ct,borderRadius:ct,borderTopLeftRadius:ct,borderTopRightRadius:ct,borderBottomRightRadius:ct,borderBottomLeftRadius:ct,width:ct,maxWidth:ct,height:ct,maxHeight:ct,top:ct,right:ct,bottom:ct,left:ct,inset:ct,insetBlock:ct,insetBlockStart:ct,insetBlockEnd:ct,insetInline:ct,insetInlineStart:ct,insetInlineEnd:ct,padding:ct,paddingTop:ct,paddingRight:ct,paddingBottom:ct,paddingLeft:ct,paddingBlock:ct,paddingBlockStart:ct,paddingBlockEnd:ct,paddingInline:ct,paddingInlineStart:ct,paddingInlineEnd:ct,margin:ct,marginTop:ct,marginRight:ct,marginBottom:ct,marginLeft:ct,marginBlock:ct,marginBlockStart:ct,marginBlockEnd:ct,marginInline:ct,marginInlineStart:ct,marginInlineEnd:ct,fontSize:ct,backgroundPositionX:ct,backgroundPositionY:ct,...Be,zIndex:Le,fillOpacity:_,strokeOpacity:_,numOctaves:Le},Oe={...je,color:mt,backgroundColor:mt,outlineColor:mt,fill:mt,stroke:mt,borderColor:mt,borderTopColor:mt,borderRightColor:mt,borderBottomColor:mt,borderLeftColor:mt,filter:Ce,WebkitFilter:Ce,mask:Re,WebkitMask:Re},Fe=t=>Oe[t],Ie=new Set([Ce,Re]);function We(t,e){let n=Fe(t);return Ie.has(n)||(n=At),n.getAnimatableNone?n.getAnimatableNone(e):void 0}function Ne(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Ue=t=>180*t/Math.PI,$e=t=>{const e=Ue(Math.atan2(t[1],t[0]));return Ke(e)},ze={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scaleZ:()=>1,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:$e,rotateZ:$e,skewX:t=>Ue(Math.atan(t[1])),skewY:t=>Ue(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Ke=t=>((t%=360)<0&&(t+=360),t),Ge=t=>Math.hypot(t[0],t[1]),Ye=t=>Math.hypot(t[4],t[5]),Xe={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ge,scaleY:Ye,scaleZ:t=>Math.hypot(t[8],t[9],t[10]),scale:t=>(Ge(t)+Ye(t))/2,rotateX:t=>Ke(Ue(Math.atan2(t[6],t[5]))),rotateY:t=>Ke(Ue(Math.atan2(-t[2],t[0]))),rotateZ:$e,rotate:$e,skewX:t=>Ue(Math.atan(t[4])),skewY:t=>Ue(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function He(t){return t.includes("scale")?1:0}function qe(t,e){if(!t||"none"===t)return He(e);const n=t.match(/^matrix(3d)?\(([-\d.e\s,]+)\)$/u);if(!n)return He(e);const i=(n[1]?Xe:ze)[e],s=n[2].split(",").map(t=>parseFloat(t));return"function"==typeof i?i(s):s[i]}const _e=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return qe(n,e)},Ze=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","scaleZ","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Je=(()=>new Set([...Ze,"pathRotation"]))(),Qe=t=>t===q||t===ct,tn=new Set(["x","y","z"]),en=Ze.filter(t=>!tn.has(t));const nn=new Set(["bottom","right"]);function sn(t,e,n,i,s,o){const r=parseFloat(t);if(!isNaN(r))return r;const{min:a,max:l}=e()[n],c=l-a;return"border-box"===o?c:c-parseFloat(i)-parseFloat(s)}const on=({transform:t})=>qe(t,"x"),rn=({transform:t})=>qe(t,"y"),an={width:({width:t,paddingLeft:e="0",paddingRight:n="0",boxSizing:i},s)=>sn(t,s,"x",e,n,i),height:({height:t,paddingTop:e="0",paddingBottom:n="0",boxSizing:i},s)=>sn(t,s,"y",e,n,i),top:({top:t})=>parseFloat(t),left:({left:t})=>parseFloat(t),bottom:({top:t},e)=>{const{y:n}=e();return parseFloat(t)+(n.max-n.min)},right:({left:t},e)=>{const{x:n}=e();return parseFloat(t)+(n.max-n.min)},x:on,y:rn,translateX:on,translateY:rn},ln=new Set;let cn=!1,un=!1,hn=!1;function dn(){if(un){const t=[],e=new Set,n=new Set;ln.forEach(i=>{i.needsMeasurement&&(t.push(i),e.add(i.element),nn.has(i.name)&&n.add(i.element))});const i=new Map;n.forEach(t=>{const e=function(t){const e=[];return en.forEach(n=>{const i=t.getValue(n);if(void 0!==i){const t=i.get(),s=n.startsWith("scale")?1:0;if(t===s)return;e.push([n,t]),i.set(s)}}),e}(t);e.length&&(i.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=i.get(t);e&&e.forEach(([e,n])=>{t.getValue(e)?.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}un=!1,cn=!1,ln.forEach(t=>t.complete(hn)),ln.clear()}function pn(){ln.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(un=!0)})}function mn(){hn=!0,pn(),dn(),hn=!1}class fn{constructor(t,e,n,i,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(ln.add(this),cn||(cn=!0,Kt.read(pn),Kt.resolveKeyframes(dn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;if(null===t[0]){const s=i?.get(),r=t[t.length-1];if(void 0!==s)t[0]=s;else if(n&&e){const i=function(t,e,n){if("string"==typeof t){if(o(t)||a(t))return parseFloat(t);if(!At.test(t)&&At.test(n))return We(e,n)}return t??void 0}(n.readValue(e,r),e,r);void 0!==i&&(t[0]=i)}void 0===t[0]&&(t[0]=r),i&&void 0===s&&i.set(t[0])}Ne(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),ln.delete(this)}cancel(){"scheduled"===this.state&&(ln.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const gn=t=>t.startsWith("--");function yn(t,e,n){gn(e)?t.style.setProperty(e,n):t.style[e]=n}const vn={};function xn(t,e){const n=l(t);return()=>vn[e]??n()}const wn=xn(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),Tn=xn(()=>void 0!==window.ViewTimeline,"viewTimeline"),bn=xn(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),Sn=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,An={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Sn([0,.65,.55,1]),circOut:Sn([.55,0,1,.45]),backIn:Sn([.31,.01,.66,-.59]),backOut:Sn([.33,1.53,.69,.99])};function Pn(t,e){return t?"function"==typeof t?bn()?Ht(t,e):"ease-out":j(t)?Sn(t):Array.isArray(t)?t.map(t=>Pn(t,e)||An.easeOut):An[t]:void 0}function Mn(t,e,n,{delay:i=0,duration:s=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[e]:n};l&&(u.offset=l);const h=Pn(a,s);Array.isArray(h)&&(u.easing=h);const d={delay:i,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"};return c&&(d.pseudoElement=c),t.animate(u,d)}function En(t){return"function"==typeof t&&"applyToOptions"in t}function kn({type:t,...e}){return En(t)&&bn()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Vn extends Ae{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:e,name:n,keyframes:i,pseudoElement:s,allowFlatten:o=!1,finalKeyframe:r,onComplete:a}=t;this.isPseudoElement=Boolean(s),this.allowFlatten=o,this.options=t;const l=kn(t);this.animation=Mn(e,n,i,l,s),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const t=ve(i,this.options,r,this.speed);this.updateMotionValue?.(t),yn(e,n,t),this.animation.cancel()}a?.(),this.notifyFinished()},Se(this,t,l)}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){this.isStopped||(this.isStopped=!0,"idle"!==this.state&&null===this.finishedTime&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||(this.animation.onfinish=null,this.cancel())))}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return m(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+m(t)}get time(){return m(Number(this.animation.currentTime)||0)}set time(t){const e=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=p(t),e&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,onAttach:e,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&wn()?(this.animation.timeline=t,e?.(this.animation),c):n(this)}}const Dn={anticipate:M,backInOut:P,circInOut:V};function Cn(t){"string"==typeof t.ease&&t.ease in Dn&&(t.ease=Dn[t.ease])}const Rn=10;class Ln extends Vn{constructor(t){Cn(t),we(t),super(t),void 0!==t.startTime&&!1!==t.autoplay&&(this.startTime=t.startTime),this.options=t}elapsed(){return"running"===this.state?(U.now()-this.startTime)*this.speed:1e3*this.time}sample(t){if(!this.sampler){const{motionValue:t,onUpdate:e,onComplete:n,onPlay:i,onStop:s,element:o,...r}=this.options;this.sampler=new Ee({...r,autoplay:!1}),this.sampler.stop()}return this.sampler.sample(Math.max(0,t)).value}liveValue(){const{state:t}=this;if("running"===t||"paused"===t)return this.sample(this.elapsed())}updateMotionValue(t){const{motionValue:e,element:n,name:s}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);const{speed:o}=this,r=this.elapsed(),a="running"===this.state&&o?i(0,10,r):0,l=this.sample(r);n&&s&&yn(n,s,l),e.setWithVelocity(this.sample(r-a*Math.sign(o)),l,a/Math.abs(o||1))}}const Bn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!At.test(t)&&"0"!==t||t.startsWith("url(")));function jn(t){t.duration=0,t.type="keyframes"}const On=new Set(["opacity","clipPath","filter","transform"]),Fn=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;const In=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Wn=()=>!s.useManualTiming&&Object.hasOwnProperty.call(Element.prototype,"animate");function Nn(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:o,type:r,keyframes:a}=t;if(!n||!On.has(n)&&!In.has(n))return!1;const l=e?.owner?.current;if(!(l instanceof HTMLElement||l instanceof SVGElement))return!1;const{onUpdate:c,transformTemplate:u}=e.owner.getProps();return Wn()&&(On.has(n)||In.has(n)&&function(t){for(let e=0;e<t.length;e++)if("string"==typeof t[e]&&Fn.test(t[e]))return!0;return!1}(a))&&("transform"!==n||!u)&&!c&&!i&&"mirror"!==s&&0!==o&&"inertia"!==r}const Un=(t,e)=>e&&"number"==typeof t?e.transform(t):t,$n={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},zn=Ze.length,Kn={},Gn=(t,e,n=Un(e,Be[t]))=>(Kn[t]||(Kn[t]=($n[t]||t)+"("))+n+")",Yn=(t,e)=>("number"==typeof e?e:parseFloat(e))===(t.startsWith("scale")?1:0);function Xn(t,e,n){let i="";for(let s=0;s<zn;s++){const o=Ze[s],r=t[o];if(void 0===r)continue;const a=n&&(e[o]=Un(r,je[o]));Yn(o,r)||(i+=Gn(o,r,a||void 0)+" ")}const s=t.pathRotation;return s&&(i+=Gn("rotate",s)),i=i.trim(),n?n(e,i):i||"none"}const Hn=new WeakMap,qn=.001,_n=(t,e)=>t-e,Zn=(t,e,n)=>{const i=[];for(let s=0;s<=n;s++)i.push(kt(t,e,s/n));return i},Jn=t=>t.motionValue.owner,Qn=t=>Hn.get(t),ti=(t,e)=>t.latestValues?t.latestValues[e]:t.getValue(e)?.get();class ei extends Ee{constructor(t){const e=Jn(t).current,{driver:n=Xt}=t;let i;const s=function(t){const e=Jn(t),{onUpdate:n,transformTemplate:i}=e.getProps();return!(t.isHandoff||n||t.hasOnUpdate||i||"inertia"===t.type||"none"!==(ti(e,"transform")||"none")||ti(e,"pathRotation")||e.projection?.isProjecting())}(t);t.driver=t=>{const s=n(t);return{js:s,now:s.now,start:(t=!0)=>{const n=Qn(e);!n||n.isJS?s.start(t):n.schedule(!1,!t)},stop:()=>{s.stop();const t=Qn(e);t&&!t.isFinishing&&t.release(i)}}},super(t),i=this,this.canAccelerate=s;const{stop:o}=this;this.stop=()=>{this.isAccelerated()&&this.sync(),o()}}get group(){return Qn(Jn(this.options).current)}get js(){return this.driver?.js}get name(){return this.options.name}timing(){const{startTime:t,speed:e,totalDuration:n}=this,{delay:i=0,repeatType:s}=this.options;return null!==this.holdTime?[1/0,0]:n===1/0?[t+i/e,this.resolvedDuration*("loop"===s?1:2)/e||1]:[t+(i+n)/e,0]}isAccelerated(){const{group:t,state:e}=this;return t?.tracks.has(this)&&!t.isJS&&this.canAccelerate&&("running"===e||"paused"===e)}liveValue(){return this.isAccelerated()?this.sampleAt(U.now()):void 0}tween(){const{keyframes:t,type:e,ease:n,times:i,repeat:s,delay:o=0}=this.options,r=j(n)?Sn(n):(t=>/^(linear|ease(In|Out|InOut))$/.test(t))(n)&&An[n];if(r&&!s&&!i&&2===t.length&&e===fe&&null===this.holdTime){const t=this.startTime+o/this.speed;return[t,t+this.resolvedDuration/this.speed,r]}}boundaries(t,e){const{startTime:n,speed:i,resolvedDuration:s,options:o}=this,{delay:r=0,repeat:a=0,repeatDelay:l=0,repeatType:c,times:u,keyframes:h,type:d}=o,p=(d||fe)===fe?u||de(h):[0,1],m=n+r/i,f=[];if(null!==this.holdTime||!(s>0))return f;for(let n=Math.max(0,Math.floor((t-m)*i/s));n<=a;n++){const o=m+n*s/i;if(o>e)break;for(const r of p){const a=o+(n%2&&c&&"loop"!==c?1-r:r)*(s-l)/i;a>t&&a<e&&f.push(a)}}return f}numberAt(t){return parseFloat(this.sampleAt(t,!0))}sync(){const t=U.now();this.options.motionValue.setWithVelocity(this.sampleAt(t-10,!0),this.sampleAt(t,!0),10)}play(){this.isStopped||((this.group||function(t){const e=t.current,n=new Set,i=new Map;let s={},o=[],r=new Map,a=[],l=!1,c=!1,u=!1,d=!1,p=-1/0;const m=t=>{for(const e of n)if(e.name===t)return!0},f=(e,n)=>{const r={};for(const a of void 0===e?Ze:o){const o=i.get(a),l=void 0===e?ti(t,a):o?o.sampleAt(n>e&&!o.timing()[1]?n:e):s[a];void 0!==l&&(r[a]=l)}return r},g=(t,e)=>{let n="";for(const i in t){const s=t[i];e&&Yn(i,s)||(n+=Gn(i,s)+" ")}return(e?n.trim():n)||"none"},y=(t,e)=>g(f(t,e)),v=(t=f())=>{e.style.transform=g(t,!0)},x=(t=!0)=>{t&&v(),a.forEach(({animation:t})=>t.cancel()),a=[]},w=(t,n)=>new Animation(new KeyframeEffect(e,t,n)),T=(t,e,n=1/0)=>{const i={animation:t,offset:e,end:n};t.startTime=U.now()+e,n<1/0&&(t.onfinish=()=>{i.isDone=!0,a.some(t=>t.end===1/0)&&(t.cancel(),a=a.filter(t=>t!==i)),C.schedule(!1)}),t.oncancel=()=>a.includes(i)&&C.demote(),a.push(i)},b=(t,e,n)=>{const i=(e,n)=>Math.abs(t(n)-t(e)),s=i(e,n);for(;n-e>.01;){const t=(e+n)/2;i(e,t)>i(t,n)?n=t:e=t}return i(e,n)>s/2?[e,n]:[]},S=(t,e,n,i)=>{const s=Math.min(200,Math.max(2,Math.ceil((n-e)/Rn)));if(4*i.length>s)return;const o=Zn(e,n,s).concat(i).sort(_n),r=t=>h(e,n,t);let a,l;for(const e of t){const t=o.map(t=>e.numberAt(t)),[n]=t,i=t.map(t=>t-n),s=i[i.length-1],r=i.some(t=>Math.abs(t)*qn>Math.abs(s))?0:s,c=i.map(t=>r?t/r:t);if(r)if(a){if(c.some((t,e)=>!(Math.abs(t-a[e])<=qn)))return}else a=c,l=t=>(e.numberAt(t)-n)/r;else if(c.some(t=>!(Math.abs(t)<=qn)))return}if(!a||a.every((t,e)=>Math.abs(t-r(o[e]))<=qn))return"linear";const c=[],u=(t,e=l(t))=>c.push(Me(e)+" "+Me(100*r(t))+"%");return a.forEach((t,e)=>{e&&Math.abs(t-a[e-1])>.2&&b(l,o[e-1],o[e]).forEach(t=>u(t)),u(o[e],t)}),"linear("+c+")"},A=(t,e,n,i)=>{const s=[e],o=(e,n)=>t.every(t=>!(Math.abs(t.numberAt((e+n)/2)-(t.numberAt(e)+t.numberAt(n))/2)>(t.name.startsWith("scale")?.001:.1))),r=(e,n,i)=>{if(n-e<1||o(e,n))s.push(n);else if(i<4)r(e,(e+n)/2,i+1),r((e+n)/2,n,i+1);else{for(const i of t)s.push(...b(t=>i.numberAt(t),e,n));s.push(n)}},a=Zn(e,n,Math.ceil((n-e)/100));for(const t of i)a.push(t,Math.min(t+.01,n));let l=e;for(const t of a.sort(_n))t>l&&r(l,t,0),l=t;return s.sort(_n)},P=t=>{let e;for(const n of t){const t=n.tween();if(!t||e?.some((e,n)=>n<2?Math.abs(t[n]-e)>1:t[n]!==e))return;e=t}return e},M=(t,e,n,i={fill:"both"},s,o)=>{const r=t.flatMap(t=>t.boundaries(e,n)),a=o||S(t,e,n,r),l=a?[e,n]:A(t,e,n,r),c=l.map(t=>y(t,s));let u={transform:c};return a||(u.offset=l.map(t=>h(e,n,t))),c.every(t=>t===c[0])&&(v(f(e,s)),u=null),w(u,{...i,duration:n-e,easing:a||"linear"})},E=e=>{let l=e,c=0,u=0;const h=[],d=[],p=new Set;i.clear(),r=new Map;for(const t of n){i.set(t.name,t);const[n,s]=t.timing(),o=n===1/0;if(r.set(t,[t.at(e),t.speed,o]),o)t.sync();else{if(t.speed<0)return;if(s){if(c){const t=(n-u)/s;if(Math.abs(s-c)>1||Math.abs(t-Math.round(t))*c>1)return}else c=s,u=n;d.push(t)}else p.add(n);h.push(t),l=Math.max(l,n)}}s={},o=Ze.filter(e=>{if(i.has(e))return!0;const n=s[e]=ti(t,e);return void 0!==n&&parseFloat(n)!==(e.startsWith("scale")?1:0)}),x(!1);const m=!c&&P(h);try{if(m&&m[1]>e){const[t,n,i]=m;T(M(h,t,n,void 0,void 0,i),t-e,n-t)}else l>e&&(T(M(h,e,l),0,l-e),p.forEach(t=>t<l-1&&T(w(null,{duration:t-e}),0,t-e)));if(c){const t=u+Math.floor((l-u)/c)*c;T(M(d,t,t+c,{iterations:1/0,iterationStart:(l-t)/c,fill:"forwards"},l),l-e)}}catch{return}return a.length||x(),!0},k=t=>{let e,i=0;for(const s of n){const n=r.get(s);if(!n)return!1;const[o,a,l]=n,c=s.at(t),u=s.timing()[0]===1/0;if(l){if(u&&c===o)continue;return!1}const h=(c-o)/a,d=u?0:s.speed/a;if(void 0===e)e=h,i=d;else if(Math.abs(h-e)>1||d!==i)return!1}if(void 0===e)return!0;if(!a.length)return!1;for(const{offset:t,end:n,isDone:i}of a){const s=e-t;if(n<1/0&&(i?s<n-1:s<0||s>=n))return!1}for(const{animation:n,offset:s,isDone:o}of a){if(o)continue;const r=e-s;i&&n.updatePlaybackRate&&"running"===n.playState&&Math.abs(Number(n.currentTime)-r)<20?n.playbackRate!==i&&n.updatePlaybackRate(i):i?(n.playbackRate=i,n.startTime=t-r/i):(n.startTime=null,n.currentTime=r)}return!0},V=()=>!n.size&&(u=!0,Qn(e)===C&&Hn.delete(e),C.isJS||x(),!0),D=()=>{const e=U.now();if(C.isJS||(C.isFinishing=!0,n.forEach(n=>{const[i,o]=n.timing();"running"===n.state&&n.speed>0&&!o&&i<=e+1&&(n.complete(),s[n.name]=ti(t,n.name),r.has(n)||(l=!0))}),C.isFinishing=!1),c=!1,u)return;if(n.forEach(({state:t},e)=>{"idle"!==t&&"finished"!==t||n.delete(e)}),V())return;for(const t of n)if(!t.canAccelerate)return C.demote(!0);C.isJS&&(C.isJS=!1,l=!0,n.forEach(t=>t.js?.stop()));const i=l,o=d;if(l=d=!1,i||!k(e)){if(o){if(e-p<100)return C.demote();p=e}if(!E(e))return C.demote()}},C={tracks:n,isJS:!1,isFinishing:!1,schedule(t,e){u||(l||(l=t),d||(d=!!e),c||(c=!0,I.isProcessing?Kt.render(D,!1,!0):queueMicrotask(D)))},release(t){const{state:e}=t;"idle"!==e&&"finished"!==e||n.delete(t),V()||C.schedule(!0)},check(){if(!C.isJS)for(const e in s)if(ti(t,e)!==s[e]&&!m(e))return C.schedule(!0,!0)},demote(t){if(!C.isJS&&!u)return n.forEach(e=>{e.isAccelerated()&&e.sync(),t||(e.canAccelerate=!1)}),C.isJS=!0,r=new Map,x(),n.forEach(t=>"running"===t.state&&t.js?.start()),!0}};return Hn.set(e,C),C}(Jn(this.options))).tracks.add(this),super.play())}pause(){super.pause(),this.isAccelerated()&&(this.sync(),this.group.schedule(!1))}complete(){super.complete();const{group:t}=this;t&&!t.isJS&&this.canAccelerate&&this.tick(U.now())}get time(){return this.isAccelerated()?m(i(0,this.totalDuration,this.at(U.now())-(this.options.delay||0))):super.time}set time(t){super.time=t,this.isAccelerated()&&this.sync()}attachTimeline(t){return this.canAccelerate=!1,this.group?.demote(!0),super.attachTimeline(t)}}class ni extends Ae{constructor(t){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=U.now();const{keyframes:e,name:n,motionValue:i,element:s}=t,o=t;o.autoplay??(o.autoplay=!0),o.delay??(o.delay=0),o.type??(o.type="keyframes"),o.repeat??(o.repeat=0),o.repeatDelay??(o.repeatDelay=0),o.repeatType??(o.repeatType="loop");const r=s?.KeyframeResolver||fn;this.keyframeResolver=new r(e,(t,e,n)=>this.onKeyframesResolved(t,e,o,!n),n,i,s),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,e,n,i){this.keyframeResolver=void 0;const{name:o,type:r,velocity:a,delay:l,isHandoff:c,onUpdate:u}=n;this.resolvedAt=U.now();const h=function(t,e,n,i){const s=t[0];if(null===s)return!1;if("display"===e||"visibility"===e)return!0;const o=t[t.length-1],r=Bn(s,e),a=Bn(o,e);return!(!r||!a)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(t)||("spring"===n||En(n))&&i)}(t,o,r,a);h||(!s.instantAnimations&&l||u?.(ve(t,n,e)),t[0]=t[t.length-1],jn(n),n.repeat=0);const{onComplete:d}=n;n.finalKeyframe=e,n.keyframes=t,n.onComplete=()=>{d?.(),this.notifyFinished()};const p=h&&!c&&Nn(n),m=!p&&(({name:t,motionValue:e})=>t&&Ze.includes(t)&&e?.owner?.current instanceof HTMLElement&&Wn()&&bn())(n);let f;if(i&&(p||m||this.resolvedAt!==this.createdAt)&&(n.startTime??(n.startTime=Te(this.createdAt,this.resolvedAt))),p){n.element=n.motionValue?.owner?.current;try{f=new Ln(n)}catch{f=new Ee(n)}}else f=m?new ei(n):new Ee(n);this.pendingTimeline&&(this.stopTimeline=f.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=f}get finished(){return this._animation?this._animation.finished:super.finished}then(t,e){return this.finished.finally(t).then(()=>{})}liveValue(){return this._animation?.liveValue?.()}get animation(){return this._animation||(this.keyframeResolver?.resume(),mn()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation?.cancel(),this.keyframeResolver?.cancel()}}class ii{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}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=>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 state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return si(this.animations,"duration")}get iterationDuration(){return si(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function si(t,e){let n=0;for(let i=0;i<t.length;i++){const s=t[i][e];null!==s&&s>n&&(n=s)}return n}class oi extends ii{then(t,e){return this.finished.finally(t).then(()=>{})}}class ri extends Vn{constructor(t){super(),this.animation=t,t.onfinish=()=>{this.finishedTime=this.time,this.notifyFinished()},Se(this,{})}}const ai=new WeakMap,li=(t,e="")=>`${t}:${e}`;function ci(t){let e=ai.get(t);return e||(e=new Map,ai.set(t,e)),e}function ui(t,e,n,i=0,s=1){const o=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),r=t.size,a=(r-1)*i;return"function"==typeof n?n(o,r):1===s?o*i:a-o*i}const hi={current:void 0};class di{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=U.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.dirty(),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=U.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){var n;return"change"===t?this.onChangeSubscribe(e):((n=this.events)[t]||(n[t]=new d)).add(e)}onChangeSubscribe(t){const{events:e}=this;return e.change||this.changeSubscriber?(e.change||(e.change=new d,e.change.add(this.changeSubscriber),this.changeSubscriber=void 0),e.change.add(t)):this.changeSubscriber=t,()=>{this.changeSubscriber===t?this.changeSubscriber=void 0:e.change?.remove(t),this.stopIfUnobserved()}}stopIfUnobserved(){Kt.read(()=>{this.changeSubscriber||this.events.change?.getSize()||this.stop()})}clearListeners(){this.changeSubscriber=void 0;for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect?.()}dirty(){const{current:t,changeSubscriber:e}=this;e?e(t):this.events.change?.notify(t)}addDependent(t){(this.dependents||(this.dependents=new Set)).add(t)}removeDependent(t){this.dependents?.delete(t)}get(){hi.current?.push(this);const t=this.animation?.liveValue?.();return void 0===t?this.current:t}getCurrent(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=U.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return f(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0;let n,i=!1;n=t(()=>{i=!0,this.events.animationComplete?.notify(),this.animation===n&&(this.animation=void 0),e()}),i||(this.animation=n),this.events.animationStart?.notify()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel?.notify()),this.animation=void 0}isAnimating(){return!!this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect?.()}}function pi(t,e){return new di(t,e)}function mi(t,e){if(t?.inherit&&e){const{inherit:n,...i}=t;return{...e,...i}}return t}function fi(t,e){const n=t?.[e]??t?.default??t;return n!==t?mi(n,t):n}const gi={type:"spring",stiffness:500,damping:25,restSpeed:10},yi={type:"keyframes",duration:.8},vi={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},xi=(t,{keyframes:e})=>e.length>2?yi:Je.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:gi:vi,wi=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed","out"]);function Ti(t){for(const e in t)if(!wi.has(e))return!0;return!1}const bi=(t,e,n,i={},o,r)=>a=>{const l=fi(i,t)||{},c=l.delay||i.delay||0;let{elapsed:u=0}=i;u-=p(c);const h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...l,delay:-u,onUpdate:t=>{e.set(t),l.onUpdate&&l.onUpdate(t)},onComplete:()=>{a(),l.onComplete&&l.onComplete()},name:t,motionValue:e,element:r?void 0:o,hasOnUpdate:!!l.onUpdate};Ti(l)||Object.assign(h,xi(t,h)),h.duration&&(h.duration=p(h.duration)),h.repeatDelay&&(h.repeatDelay=p(h.repeatDelay)),void 0!==h.from&&(h.keyframes[0]=h.from);let d=!1;if((!1===h.type||0===h.duration&&!h.repeatDelay)&&(jn(h),0===h.delay&&(d=!0)),(s.instantAnimations||s.skipAnimations||o?.shouldSkipAnimations||l.skipAnimations)&&(d=!0,jn(h),h.delay=0),h.allowFlatten=!l.type&&!l.ease,d&&!r&&void 0!==e.get()){const t=ve(h.keyframes,l);if(void 0!==t)return void Kt.update(()=>{h.onUpdate(t),h.onComplete()})}return l.isSync?new Ee(h):new ni(h)};function Si(t,e,n,i){const s=1-t;return s*s*e+2*s*t*n+t*t*i}function Ai(t,e,n,i,s,o,r){const a=2*(1-t)*(n-e)+2*t*(i-n),l=2*(1-t)*(o-s)+2*t*(r-o);return Math.atan2(l,a)*(180/Math.PI)}function Pi(t,e,n,i,s,o){const r=n-t,a=i-e,l=Math.sqrt(r*r+a*a);if(l>0){const n=s*l;return{x:t+r*o+-a/l*n,y:e+a*o+r/l*n}}return{x:t,y:e}}const Mi=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ei(t){const e=Mi.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}function ki(t,e,n=1){const[i,s]=Ei(t);if(!i)return;const r=window.getComputedStyle(e).getPropertyValue(i);if(r){const t=r.trim();return o(t)?parseFloat(t):t}return Y(s)?ki(s,e,n+1):s}function Vi(t,e,n,i){const s=e=>"function"==typeof e?e(void 0!==n?n:t.custom,...function(t){const e=[{},{}];return t?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}(i)):e;return"string"==typeof(e=s(e))&&(e=t.variants&&t.variants[e]),s(e)}function Di(t,e,n){return Vi(t.getProps(),e,n,t)}const Ci=(t,e)=>"exit"===e?t.presenceContext?.custom:void 0,Ri=new Set(["width","height","top","left","right","bottom",...Ze]),Li=t=>Array.isArray(t);function Bi(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,pi(n))}function ji(t){return Li(t)?t[t.length-1]||0:t}function Oi(t,e){const n=Di(t,e);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const e in o){Bi(t,e,ji(o[e]))}}const Fi=t=>Boolean(t&&t.getVelocity);function Ii(t){return Boolean(Fi(t)&&t.add)}function Wi(t,e){const n=t.getValue("willChange");if(Ii(n))return n.add(e);if(!n&&s.WillChange){const n=new s.WillChange("auto");t.addValue("willChange",n),n.add(e)}}const Ni="data-framer-appear-id";function Ui(t){return t.props[Ni]}const $i="undefined"!=typeof window;function zi({protectedKeys:t,needsAnimating:e},n){const i=n in t&&!e[n];return e[n]=!1,i}function Ki(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:o,transitionEnd:r,...a}=e;const l=t.getDefaultTransition();o=o?mi(o,l):l;const c=o?.reduceMotion,u=o?.skipAnimations;i&&(o=i);const h=[],d=s&&t.animationState?.getState()[s],p=o?.path;p&&(p.animateValues?p.animateValues(e=>t.getValue(e,t.latestValues[e]??0),a,o,n,h):p.animateVisualElement?.(t,a,o,n,h));for(const e in a){const i=t.getValue(e,t.latestValues[e]??null),s=a[e];if(void 0===s||d&&zi(d,e))continue;const r={delay:n,...fi(d?.out[e]||o||{},e)};u&&(r.skipAnimations=!0);const l=i.get();if(void 0!==l&&!i.isAnimating()&&!Array.isArray(s)&&s===l&&!r.velocity){Kt.update(()=>i.set(s));continue}let p=!1;if($i&&window.MotionHandoffAnimation){const n=Ui(t);if(n){const t=window.MotionHandoffAnimation(n,e,Kt);null!==t&&(r.startTime=t,p=!0)}}Wi(t,e);const m=c??t.shouldReduceMotion;i.start(bi(e,i,s,m&&Ri.has(e)?{type:!1}:r,t,p));const f=i.animation;f&&h.push(f)}if(r){const e=()=>Kt.update(()=>{r&&Oi(t,r)});h.length?Promise.all(h).then(e):e()}return h}function Gi(t,e,n={}){const i=Di(t,e,Ci(t,n.type)),s=n.transitionOverride||(i?.transition??(t.getDefaultTransition()||{})),o=()=>Promise.all(i?Ki(t,i,n):[]),r=(i=0)=>{const{variantChildren:o}=t,{delayChildren:r=0,staggerChildren:a,staggerDirection:l}=s,c=[];return o?.forEach(t=>{t.notify("AnimationStart",e),c.push(Gi(t,e,{...n,delay:i+("function"==typeof r?0:r)+ui(o,t,r,a,l)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(c)},{when:a}=s;return a?"beforeChildren"===a?o().then(()=>r()):r().then(o):Promise.all([o(),r(n.delay)])}function Yi(t,e,n={}){t.notify("AnimationStart",e);return(Array.isArray(e)?Promise.all(e.map(e=>Gi(t,e,n))):"string"==typeof e?Gi(t,e,n):Promise.all(Ki(t,Di(t,e,n.custom),n))).then(()=>{t.notify("AnimationComplete",e)})}const Xi=t=>e=>e.test(t),Hi=[q,ct,lt,at,ht,ut,{test:t=>"auto"===t,parse:t=>t}],qi=t=>Hi.find(Xi(t));function _i(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||a(t))}const Zi=new Set(["auto","none","0"]);class Ji extends fn{constructor(){super(...arguments),this.isAsync=!0}scheduleResolve(){if(this.canReadNow()&&(this.readKeyframes(),!this.needsMeasurement))return this.complete();super.scheduleResolve()}canReadNow(){const{unresolvedKeyframes:t,element:e,motionValue:n}=this,i=t[0]??n?.get();if(!e?.current||void 0===i)return!1;for(let e=0;e<t.length;e++)if(H(e?t[e]:i))return!1;return!0}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e?.current)return;super.readKeyframes();for(let n=0;n<t.length;n++){let i=t[n];if("string"==typeof i&&(i=i.trim(),Y(i))){const s=ki(i,e.current);void 0!==s&&(t[n]=s),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!Ri.has(n)||2!==t.length)return;const[i,s]=t;if("number"==typeof i&&"number"==typeof s)return;const o=qi(i),r=qi(s);if(H(i)!==H(s)&&an[n])this.needsMeasurement=!0;else if(o!==r)if(Qe(o)&&Qe(r))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else an[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)(null===t[e]||_i(t[e]))&&n.push(e);n.length&&function(t,e,n){let i,s=0;for(;s<t.length&&!i;){const e=t[s];"string"==typeof e&&!Zi.has(e)&&wt(e)&&(i=t[s]),s++}if(i&&n)for(const s of e)t[s]!==i&&(t[s]=We(n,i))}(t,n,e)}measure(){const{element:t,name:e}=this;return an[e](window.getComputedStyle(t.current),()=>t.measureViewportBox())}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t?.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=this.measure(),e[0]=this.measuredOrigin;const i=e[e.length-1];void 0!==i&&this.motionValue?.jump(i,!1)}measureEndState(){const{element:t,unresolvedKeyframes:e}=this;if(!t?.current)return;this.motionValue?.jump(this.measuredOrigin,!1);const n=e.length-1,i=e[n];e[n]=this.measure(),null!==i&&void 0===this.finalKeyframe&&(this.finalKeyframe=i),this.resolveNoneKeyframes()}}const Qi=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],ts=new Set(["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius",...Qi,"width","maxWidth","height","maxHeight","top","right","bottom","left","inset","insetBlock","insetBlockStart","insetBlockEnd","insetInline","insetInlineStart","insetInlineEnd","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingBlock","paddingBlockStart","paddingBlockEnd","paddingInline","paddingInlineStart","paddingInlineEnd","margin","marginTop","marginRight","marginBottom","marginLeft","marginBlock","marginBlockStart","marginBlockEnd","marginInline","marginInlineStart","marginInlineEnd","fontSize","backgroundPositionX","backgroundPositionY"]);function es(t,e){for(let n=0;n<t.length;n++)"number"==typeof t[n]&&ts.has(e)&&(t[n]=t[n]+"px")}const ns=l(()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0}),is=[];function ss(t){os(t),is.unshift(t)}function os(t){n(is,t)}function rs(t){return is.find(e=>e.test(t))}function as(t,e,n={},i){const s=[],{velocity:o,path:r}=n,a=n.reduceMotion??i?.shouldReduceMotion;r?.animateValues&&i&&(e={...e},r.animateValues(t,e,n,0,s));for(const r in e){if("transition"===r||"transitionEnd"===r)continue;const l=e[r];if(void 0===l)continue;const c=t(r),u=c.get();void 0===u||c.isAnimating()||Array.isArray(l)||l!==u||o?(c.start(bi(r,c,l,a&&Ri.has(r)?{type:!1}:n,i)),c.animation&&s.push(c.animation)):Kt.update(()=>c.set(l))}const{transitionEnd:l}=e;if(l){const e=()=>Kt.update(()=>{for(const e in l)t(e).set(l[e])});s.length?Promise.all(s).then(e):e()}return s}function ls(t,e,n,i,s){return as(i=>{let o=t.get(e,i);if(!o){let r;if(!s){const s=n[i];r=function(t){const e=Array.isArray(t)?t[0]:void 0;return null===e?void 0:e}(s)??t.read(e,i,s)}o=pi(r,{owner:s}),t(e,{[i]:o})}return o},n,i,s)}function cs(t){return r(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}function us(t){return r(t)&&"ownerSVGElement"in t}const hs={};function ds(t){return hs.current?.add(t),t}function ps(t){const e=hs.current;if(!e)return;let n,i=!1;const s=e.add(()=>{i=!0,n?.()});t.then(t=>{t&&(n=()=>t.stop(),i?n():t.finished.then(s))},s)}const ms=t=>hs.current?hs.current.bind(t):t;function fs(t,e,n){if(null==t)return[];if(t instanceof EventTarget)return[t];if("string"==typeof t){const i=e?e.current:hs.current?.root||document,s=n?.[t]??i.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t).filter(t=>null!=t)}function gs(t){const{test:e,read:n,get:i,flush:s,state:o}=t;return Object.assign((e,n)=>{const i=fs(e),s=[];for(const e of i){const i=t(e,n);s.push(i)}return()=>{for(const t of s)t()}},{test:e,read:n,get:i,flush:s,state:o})}class ys{constructor(t=Kt.render){this.step=t,this.values=new Map,this.pending=[],this.numPending=0,this.flush=()=>{const{pending:t,numPending:e}=this;this.numPending=0;for(let n=0;n<e;n++)t[n]()}}set(t,e,n,i){if(this.values.get(t)?.onRemove(),i)for(const t of this.values.values())t.value===i&&(n=t.render);const s=()=>n&&this.schedule(n);void 0!==e.get()&&s();const o=e.on("change",s),r=()=>{o(),n&&!i&&this.cancel(n),this.values.get(t)?.onRemove===r&&this.values.delete(t)};return this.values.set(t,{value:e,render:i?void 0:n,onRemove:r}),r}get(t){return this.values.get(t)?.value}release(){const t=new Map;return this.values.forEach((e,n)=>{t.set(n,e.value),e.onRemove()}),this.transformKeys=this.transformValues=void 0,t}schedule(t){const{pending:e,numPending:n}=this;for(let i=0;i<n;i++)if(e[i]===t)return;n||this.step(this.flush),e[this.numPending++]=t}cancel(t){const{pending:e}=this;for(let n=0;n<this.numPending;n++)if(e[n]===t)return void(e[n]=e[--this.numPending])}}function vs(t,{step:e,...n}={}){const i=new WeakMap;return Object.assign((n,s)=>{const o=i.get(n)??new ys(e);i.set(n,o);const r=[];for(const e in s){const i=s[e],a=t(n,o,e,i);r.push(a)}return()=>{for(const t of r)t()}},n,{get:(t,e)=>i.get(t)?.get(e),flush:t=>i.get(t)?.flush(),state:t=>i.get(t)})}const xs=new Set(["originX","originY","originZ"]),ws=(t,e)=>Un(t.get(e)?.get(),je[e]),Ts=(t,e,n,i)=>{let s,o;if(Je.has(n)){if("pathRotation"!==n){const t=e.transformKeys??(e.transformKeys=[]);(e.transformValues??(e.transformValues={}))[n]=i,t.includes(n)||(t.push(n),t.sort((t,e)=>Ze.indexOf(t)-Ze.indexOf(e)))}e.get("transform")||(cs(t)||e.get("transformBox")||Ts(t,e,"transformBox",new di("fill-box")),e.set("transform",new di("none"),()=>{Hn.get(t)?.check(),t.style.transform=function(t){let e="";const{transformKeys:n=[],transformValues:i={}}=t;for(let t=0;t<n.length;t++){const s=n[t],o=i[s].getCurrent();void 0!==o&&(Yn(s,o)||(e+=(e&&" ")+Gn(s,o)))}const s=t.get("pathRotation")?.get();return s&&(e+=(e&&" ")+Gn("rotate",s)),e||"none"}(e)})),o=e.get("transform")}else xs.has(n)?(e.get("transformOrigin")||e.set("transformOrigin",new di(""),()=>{const n=ws(e,"originX")??"50%",i=ws(e,"originY")??"50%",s=ws(e,"originZ")??0;t.style.transformOrigin=`${n} ${i} ${s}`}),o=e.get("transformOrigin")):s=gn(n)?()=>{t.style.setProperty(n,i.getCurrent())}:()=>{t.style[n]=Un(i.getCurrent(),je[n])};return e.set(n,i,s,o)},bs=(t,e)=>{if(Je.has(e))return _e(t,e);const n=getComputedStyle(t),i=gn(e)?n.getPropertyValue(e):n[e];return"string"==typeof i&&i.trim()||0},Ss=vs(Ts,{test:t=>cs(t)||us(t),read:bs}),As=gs(Ss);function Ps(t){return t.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}function Ms(t,e,n){const{style:i,vars:s,transformOrigin:o}=t;let r=!1,a=!1;for(const t in e){const n=e[t];if(Je.has(t))r=!0;else if(K(t))s[t]=n;else{const e=Un(n,je[t]);t.startsWith("origin")?(a=!0,o[t]=e):i[t]=e}}if(e.transform||(r||n?i.transform=Xn(e,t.transform,n):i.transform&&(i.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=o;i.transformOrigin=`${t} ${e} ${n}`}}const Es={offset:"stroke-dashoffset",array:"stroke-dasharray"},ks={offset:"strokeDashoffset",array:"strokeDasharray"};function Vs(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?Es:ks;t[o.offset]=""+-i,t[o.array]=`${e} ${n}`}const Ds=["transform","opacity","clipPath","filter","offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Cs(t,{attrX:e,attrY:n,attrScale:i,pathLength:s,pathSpacing:o=1,pathOffset:r=0,...a},l,c,u){if(Ms(t,a,c),l)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:h,style:d}=t;for(const t of Ds)void 0!==h[t]&&(d[t]=h[t],delete h[t]);(d.transform||h.transformOrigin)&&(d.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),d.transform&&(d.transformBox=u?.transformBox??"fill-box",delete h.transformBox),void 0!==e&&(h.x=e),void 0!==n&&(h.y=n),void 0!==i&&(h.scale=i),void 0!==s&&Vs(h,s,o,r,!1)}const Rs=(t,e,n,i,s=n)=>{const o=function(t,e){if(!(e in t))return!1;const n=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),e)||Object.getOwnPropertyDescriptor(t,e);return n&&"function"==typeof n.set}(t,s);o||!s.startsWith("data")&&!s.startsWith("aria")||(s=Ps(s));const r=je[n]||je[s],a=o?()=>{t[s]=Un(i.get(),je[n])}:()=>{const e=Un(i.get(),r);null==e?t.removeAttribute(s):t.setAttribute(s,String(e))};return e.set(n,i,a)},Ls=gs(vs(Rs));const Bs=(t,e,n,i)=>{if(n.startsWith("path")&&!Je.has(n))return function(t,e,n,i){return Kt.render(()=>t.setAttribute("pathLength","1")),"pathOffset"===n?e.set(n,i,()=>{const e=i.get();t.setAttribute("stroke-dashoffset",""+-e)}):(e.get("stroke-dasharray")||e.set("stroke-dasharray",new di("1 1"),()=>{const n=e.get("pathLength")?.get()??1,i=e.get("pathSpacing")?.get();t.setAttribute("stroke-dasharray",`${n} ${i??1-Number(n)}`)}),e.set(n,i,void 0,e.get("stroke-dasharray")))}(t,e,n,i);if(n.startsWith("attr"))return Rs(t,e,n,i,Is(n));return(Je.has(n)||xs.has(n)||gn(n)||n in t.style?Ts:Rs)(t,e,n,i)},js=(t,e)=>Je.has(e)?je[e]?.default||0:gn(e)||Ds.includes(e)?bs(t,e)||t.getAttribute(Ps(e))||0:(e=Is(e),t.getAttribute(Ps(e))??t.getAttribute(e)??void 0),Os=vs(Bs,{test:us,read:js}),Fs=gs(Os);function Is(t){return t.replace(/^attr([A-Z])/,(t,e)=>e.toLowerCase())}function Ws({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function Ns({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Us(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}}function $s(t){return void 0===t||1===t}function zs({scale:t,scaleX:e,scaleY:n}){return!$s(t)||!$s(e)||!$s(n)}const Ks=["rotate","rotateX","rotateY","rotateZ","skewX","skewY"];function Gs(t){return zs(t)||Xs(t)||Ys(t)}function Ys(t){return t.z||t.rotate||t.rotateX||t.rotateY||t.rotateZ||t.skewX||t.skewY}function Xs(t){return Hs(t.x)||Hs(t.y)}function Hs(t){return t&&"0%"!==t}function qs(t,e,n){return n+e*(t-n)}function _s(t,e,n,i,s){return void 0!==s&&(t=qs(t,s,i)),qs(t,n,i)+e}function Zs(t,e=0,n=1,i,s){t.min=_s(t.min,e,n,i,s),t.max=_s(t.max,e,n,i,s)}function Js(t,{x:e,y:n}){Zs(t.x,e.translate,e.scale,e.originPoint),Zs(t.y,n.translate,n.scale,n.originPoint)}const Qs=.999999999999,to=1.0000000000001;function eo(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,"contents"!==o.options.visualElement?.props.style?.display&&(!0===i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&(no(t.x,-o.scroll.offset.x),no(t.y,-o.scroll.offset.y)),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Js(t,r)),i&&(i.path?.[a]||i)!==o&&Gs(o.latestValues)&&oo(t,o.latestValues,o.layout?.layoutBox));e.x<to&&e.x>Qs&&(e.x=1),e.y<to&&e.y>Qs&&(e.y=1)}function no(t,e){t.min+=e,t.max+=e}function io(t,e,n,i,s=.5){Zs(t,e,n,kt(t.min,t.max,s),i)}function so(t,e){return"string"==typeof t?parseFloat(t)/100*(e.max-e.min):t}function oo(t,e,n){const i=n??t;io(t.x,so(e.x,i.x),e.scaleX,e.scale,e.originX),io(t.y,so(e.y,i.y),e.scaleY,e.scale,e.originY)}function ro(t,e){return Ws(Us(t.getBoundingClientRect(),e))}function ao(t,e,n){const i=ro(t,n),{scroll:s}=e;return s&&(no(i.x,s.offset.x),no(i.y,s.offset.y)),i}const lo={},co=t=>us(t)?Os:Ss;class uo{constructor(t,e){this.effect=t,this.current=e,this.KeyframeResolver=Ji}getValue(t){return this.effect.get(this.current,t)}readValue(t,e){return this.effect.read(this.current,t,e)}render(){this.effect.flush(this.current)}measureViewportBox(){return ro(this.current)}getProps(){return lo}}function ho(t,e,n,i){if(hs.current?.track(t),i)return as(t=>i.getValue(t,null),e,n,i);const s=co(t);return ls(s,t,e,n,new uo(s,t))}const po=t=>co(t).state(t)?.release();function mo(t,e){const n=co(t).state(t);if(!n)return;const i=Hn.get(t);i&&(i.demote(),Hn.delete(t));const{transformKeys:s}=n;n.release().forEach((t,n)=>{"transformBox"===n||"transform"===n&&s?.length||(t.owner=e,e.addValue(n,t))})}const fo=vs((t,e,n,i)=>e.set(n,i,()=>{t[n]=i.get()}),{test:t=>r(t),read:(t,e)=>{const n=t[e];return"string"==typeof n||"number"==typeof n?n:void 0}}),{schedule:go,cancel:yo}=zt(queueMicrotask,!1);function vo(t,e,n){const i=Fi(t)?t:pi(t);return i.start(bi("",i,e,n)),i.animation}const xo={};const wo={value:null,addProjectionMetrics:null};function To(t,e){const n=U.now();t=ms(t);const i=({timestamp:s})=>{const o=s-n;o>=e&&(Gt(i),t(o-e))};return Kt.setup(i,!0),ds(()=>Gt(i))}function bo(t,e){return To(t,p(e))}function So(t){return us(t)&&"svg"===t.tagName}function Ao(t){return Fi(t)?t.get():t}const Po=t=>"number"==typeof t?t:parseFloat(t),Mo=Qi.length,Eo=t=>"number"==typeof t||ct.test(t);function ko(t,e,n,i,s,o){s?(t.opacity=kt(0,n.opacity??1,Do(i)),t.opacityExit=kt(e.opacity??1,0,Co(i))):o&&(t.opacity=kt(e.opacity??1,n.opacity??1,i));for(let s=0;s<Mo;s++){const o=Qi[s];let r=Vo(e,o),a=Vo(n,o);if(void 0===r&&void 0===a)continue;r||(r=0),a||(a=0);0===r||0===a||Eo(r)===Eo(a)?(t[o]=Math.max(kt(Po(r),Po(a),i),0),(lt.test(a)||lt.test(r))&&(t[o]+="%")):t[o]=a}for(let s=0;s<Ks.length;s++){const o=Ks[s];(e[o]||n[o])&&(t[o]=kt(e[o]||0,n[o]||0,i))}}function Vo(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const Do=Ro(0,.5,k),Co=Ro(.5,.95,c);function Ro(t,e,n){return i=>i<t?0:i>e?1:n(h(t,e,i))}function Lo(t,e){t.min=e.min,t.max=e.max}function Bo(t,e){Lo(t.x,e.x),Lo(t.y,e.y)}function jo(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Oo(t){return t.max-t.min}function Fo(t,e,n){return Math.abs(t-e)<=n}function Io(t,e,n,i=.5){t.origin=i,t.originPoint=kt(e.min,e.max,t.origin),t.scale=Oo(n)/Oo(e),t.translate=kt(n.min,n.max,t.origin)-t.originPoint,(t.scale>=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function Wo(t,e,n,i){Io(t.x,e.x,n.x,i?.originX),Io(t.y,e.y,n.y,i?.originY)}function No(t,e,n,i=0){const s=i?kt(n.min,n.max,i):n.min;t.min=s+e.min,t.max=t.min+Oo(e)}function Uo(t,e,n,i){No(t.x,e.x,n.x,i?.x),No(t.y,e.y,n.y,i?.y)}function $o(t,e,n,i=0){const s=i?kt(n.min,n.max,i):n.min;t.min=e.min-s,t.max=t.min+Oo(e)}function zo(t,e,n,i){$o(t.x,e.x,n.x,i?.x),$o(t.y,e.y,n.y,i?.y)}function Ko(t,e,n,i,s){return t=qs(t-=e,1/n,i),void 0!==s&&(t=qs(t,1/s,i)),t}function Go(t,e=0,n=1,i=.5,s,o=t,r=t){if(lt.test(e)){e=parseFloat(e);e=kt(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=kt(o.min,o.max,i);t===o&&(a-=e),t.min=Ko(t.min,e,n,a,s),t.max=Ko(t.max,e,n,a,s)}function Yo(t,e,[n,i,s],o,r){Go(t,e[n],e[i],e[s],e.scale,o,r)}const Xo=["x","scaleX","originX"],Ho=["y","scaleY","originY"];function qo(t,e,n,i){Yo(t.x,e,Xo,n?.x,i?.x),Yo(t.y,e,Ho,n?.y,i?.y)}const _o=()=>({translate:0,scale:1,origin:0,originPoint:0}),Zo=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),Jo=()=>({min:0,max:0}),Qo=()=>({x:{min:0,max:0},y:{min:0,max:0}});function tr(t){return 0===t.translate&&1===t.scale}function er(t){return tr(t.x)&&tr(t.y)}function nr(t,e){return t.min===e.min&&t.max===e.max}function ir(t,e){return nr(t.x,e.x)&&nr(t.y,e.y)}function sr(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function or(t,e){return sr(t.x,e.x)&&sr(t.y,e.y)}function rr(t){return Oo(t.x)/Oo(t.y)}function ar(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class lr{constructor(){this.members=[]}add(t){e(this.members,t);for(let e=this.members.length-1;e>=0;e--){const i=this.members[e];if(i===t||i===this.lead||i===this.prevLead)continue;const s=i.instance;s&&!1!==s.isConnected||i.snapshot||(n(this.members,i),i.unmount())}t.scheduleRender()}remove(t){if(n(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){for(let e=this.members.indexOf(t)-1;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent&&!1!==t.instance?.isConnected)return this.promote(t),!0}return!1}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.updateSnapshot(),t.scheduleRender();const{layoutDependency:i}=n.options,{layoutDependency:s}=t.options;void 0!==i&&i===s||(t.resumeFrom=n,e&&(n.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),!1===t.options.crossfade&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}function cr(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const ur={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!ct.test(t))return t;t=parseFloat(t)}return`${cr(t,e.target.x)}% ${cr(t,e.target.y)}%`}},hr={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=At.parse(t);if(s.length>5)return i;const o=At.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 c=kt(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=c),"number"==typeof s[3+r]&&(s[3+r]/=c),o(s)}},dr={borderRadius:Object.assign({},ur,{applyTo:Qi.slice()}),borderTopLeftRadius:ur,borderTopRightRadius:ur,borderBottomLeftRadius:ur,borderBottomRightRadius:ur,boxShadow:hr};function pr(t,e,n){let i="";const s=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;if((s||o||r)&&(i=`translate3d(${s}px, ${o}px, ${r}px) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t}=n;t&&(i=`perspective(${t}px) ${i}`);for(let t=0;t<Ks.length;t++){const e=Ks[t],s=n[e];s&&(i+=`${e}(${s}deg) `),!t&&n.pathRotation&&(i+=`rotate(${n.pathRotation}deg) `)}}const a=t.x.scale*e.x,l=t.y.scale*e.y;return 1===a&&1===l||(i+=`scale(${a}, ${l})`),i||"none"}function mr(t){return[t("x"),t("y")]}const fr=(t,e)=>t.depth-e.depth;class gr{constructor(){this.children=[],this.isDirty=!1}add(t){e(this.children,t),this.isDirty=!0}remove(t){n(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(fr),this.isDirty=!1,this.children.forEach(t)}}const yr={hasAnimatedSinceResize:!0,hasEverUpdated:!1},vr={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},xr=["z","skew","skewZ"];let wr=0;function Tr(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}const br=t=>t.instance&&Hn.get(t.instance)?.demote()&&t.resetSkewAndRotation();function Sr(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Ui(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",Kt,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&Sr(i)}function Ar({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:o}){return Object.assign(xo,{...dr,...xo}),class{constructor(t={},n=e?.()){this.id=wr++,this.animationId=0,this.animationCommitId=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.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,wo.value&&(vr.nodes=vr.calculatedTargetDeltas=vr.calculatedProjections=0),this.nodes.forEach(Er),this.nodes.forEach(Fr),this.nodes.forEach(Ir),this.nodes.forEach(kr),wo.addProjectionMetrics&&wo.addProjectionMetrics(vr)},this.resolvedRelativeTargetAt=0,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 gr)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new d),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){this.eventHandlers.get(t)?.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e){if(this.instance)return;this.isSVG=us(e)&&!So(e),this.instance=e;const{layoutId:n,layout:i,visualElement:s}=this.options;if(s&&!s.current&&s.mount(e),this.root.nodes.add(this),this.parent?.children.add(this),this.root.hasTreeAnimated&&(i||n)&&(this.isLayoutDirty=!0),t){let n,i=0;const s=()=>this.root.updateBlockedByResize=!1;Kt.read(()=>{i=window.innerWidth}),t(e,()=>{const t=window.innerWidth;t!==i&&(i=t,this.root.updateBlockedByResize=!0,n?.(),n=To(s,250),yr.hasAnimatedSinceResize&&(yr.hasAnimatedSinceResize=!1,this.nodes.forEach(Or)))})}n&&this.root.registerSharedNode(n,this),this.addLayoutListener()}addLayoutListener(){const{layoutId:t,layout:e,visualElement:n,animate:i}=this.options;this.instance&&!this.hasLayoutListener&&!1!==i&&n&&(t||e)&&(this.hasLayoutListener=!0,this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:i,layout:s})=>{if(this.isAnimationBlocked)return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||n.getDefaultTransition()||zr,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=n.getProps(),l=!this.targetLayout||!or(this.targetLayout,s),c=!e&&i;if(this.options.layoutRoot||this.resumeFrom||c||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const e={...fi(o,"layout"),onPlay:r,onComplete:a};(n.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,c,e.path)}else e||Or(this),this.isLead()&&this.options.onExitComplete?.();this.targetLayout=s}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),this.getStack()?.remove(this),this.parent?.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),this.hasLayoutListener=!1,Gt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes?.forEach(Wr),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?.();if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Sr(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;br(this),this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,br(e),"string"!=typeof e.latestValues.x&&"string"!=typeof e.latestValues.y||(e.isLayoutDirty=!0),e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1),e.isAnimationBlocked&&(e.dragSnapshot||(e.dragSnapshot=e.measure()),this.dragAncestor=e)}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()){const t=this.updateBlockedByResize;return this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),t&&this.nodes.forEach(Cr),void this.nodes.forEach(Dr)}if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(Rr);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Lr),this.nodes.forEach(Br),this.nodes.forEach(jr),this.nodes.forEach(Pr),this.nodes.forEach(Mr)):this.nodes.forEach(Rr),this.clearAllSnapshots();const t=U.now();I.delta=i(0,1e3/60,t-I.timestamp),I.timestamp=t,I.isProcessing=!0,Yt.update.process(I),Yt.preRender.process(I),Yt.render.process(I),I.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,go.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Vr),this.sharedNodes.forEach((t,e)=>t.members.length?t.removeLeadSnapshot():this.sharedNodes.delete(e))}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Kt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Kt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||Oo(this.snapshot.measuredBox.x)||Oo(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}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||(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?.notify("LayoutMeasure",this.layout.layoutBox,t?.layoutBox)}updateScroll(t="measure"){const{scroll:e,instance:i}=this,{animationId:o}=this.root;if(this.options.layoutScroll&&i&&(!e||e.animationId!==o||e.phase!==t)){const r=s(i);this.scroll={animationId:o,phase:t,isRoot:r,offset:n(i),wasRoot:e?e.isRoot:r}}}resetTransform(){if(!o)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout;t&&br(this);const e=this.projectionDelta&&!er(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,s=i!==this.prevTransformTemplateValue;t&&this.instance&&(e||Gs(this.latestValues)||s)&&(o(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)),Yr((i=n).x),Yr(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();if(!(this.scroll?.wasRoot||this.path.some(qr))){const{scroll:t}=this.root;t&&(no(e.x,t.offset.x),no(e.y,t.offset.y))}return e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};if(Bo(e,t),this.scroll?.wasRoot)return e;for(let n=0;n<this.path.length;n++){const i=this.path[n],{scroll:s,options:o}=i;i!==this.root&&s&&o.layoutScroll&&(s.wasRoot&&Bo(e,t),no(e.x,s.offset.x),no(e.y,s.offset.y))}return e}applyTransform(t,e=!1,n,i,s=0){const o=n||{x:{min:0,max:0},y:{min:0,max:0}};Bo(o,t);for(let t=s;t<this.path.length;t++){const n=this.path[t];!e&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(no(o.x,-n.scroll.offset.x),no(o.y,-n.scroll.offset.y)),Gs(n.latestValues)&&oo(o,n.latestValues,n.layout?.layoutBox)}return!i&&Gs(this.latestValues)&&oo(o,this.latestValues,this.layout?.layoutBox),o}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};Bo(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!Gs(n.latestValues))continue;let i;n.instance&&(zs(n.latestValues)&&n.updateSnapshot(),i=Qo(),Bo(i,n.measurePageBox())),qo(e,n.latestValues,n.snapshot?.layoutBox,i)}return Gs(this.latestValues)&&qo(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},this.addLayoutListener()}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!==I.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){const e=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=e.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=e.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=e.isSharedProjectionDirty);const n=Boolean(this.resumingFrom)||this!==e;if(!(t||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:i,layoutId:s}=this.options;if(!this.layout||!i&&!s)return;this.resolvedRelativeTargetAt=I.timestamp;const o=this.getClosestProjectingParent();this.targetDelta||this.relativeTarget||(!1!==this.options.layoutAnchor&&o&&o.layout?this.createRelativeTarget(o,this.layout.layoutBox,o.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(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(),Uo(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(Boolean(this.resumingFrom)?this.applyTransform(this.layout.layoutBox,!1,this.target,!0):Bo(this.target,this.layout.layoutBox),Js(this.target,this.targetDelta)):Bo(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,!1!==this.options.layoutAnchor&&o&&(!o.resumingFrom==!this.resumingFrom||o.options.layoutRoot&&!o.resumingFrom)&&!o.options.layoutScroll&&o.target&&1!==this.animationProgress?this.createRelativeTarget(o,this.target,o.target):this.relativeParent=this.relativeTarget=void 0),wo.value&&vr.calculatedTargetDeltas++)}getClosestProjectingParent(){if(this.parent&&!zs(this.parent.latestValues)&&!Xs(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(t,e,n){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}},zo(this.relativeTargetOrigin,e,n,this.options.layoutAnchor||void 0),Bo(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const t=this.getLead(),e=Boolean(this.resumingFrom)||this!==t;let n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),e&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===I.timestamp&&(n=!1),n)return;const{layout:i,layoutId:s}=this.options;if(this.isTreeAnimating=Boolean(this.parent?.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!i&&!s)return;Bo(this.layoutCorrected,this.layout.layoutBox);const o=this.treeScale.x,r=this.treeScale.y;eo(this.layoutCorrected,this.treeScale,this.path,e&&(!(t.relativeTarget&&!t.relativeParent.resumingFrom)||t.relativeParent)),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:a}=t;a?(this.projectionDelta&&this.prevProjectionDelta?(jo(this.prevProjectionDelta.x,this.projectionDelta.x),jo(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Wo(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.treeScale.x===o&&this.treeScale.y===r&&ar(this.projectionDelta.x,this.prevProjectionDelta.x)&&ar(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",a)),wo.value&&vr.calculatedProjections++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){this.options.visualElement?.scheduleRender(),t&&this.getStack()?.scheduleRender(),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},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}}}setAnimationOrigin(t,e=!1,n){const i=this.snapshot,s=i?i.latestValues:{},o={...this.latestValues},r={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 a={x:{min:0,max:0},y:{min:0,max:0}},l=i?.source!==this.layout?.source,c=this.getStack(),u=!c||c.members.length<=1,h=Boolean(l&&!u&&!0===this.options.crossfade&&!this.path.some($r));let d;this.animationProgress=0;const p=n?.interpolateProjection(t);this.mixTargetDelta=e=>{const n=e/1e3,i=p?.(n);var c,m,f,g;Nr(r.x,t.x,n),Nr(r.y,t.y,n),i&&(r.x.translate=i.x,r.y.translate=i.y),this.setTargetDelta(r),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(zo(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),c=this.relativeTarget,m=this.relativeTargetOrigin,f=a,g=n,Ur(c.x,m.x,f.x,g),Ur(c.y,m.y,f.y,g),d&&ir(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),Bo(d,this.relativeTarget)),l&&(this.animationValues=o,ko(o,s,this.latestValues,n,h,u)),void 0!==i?.rotate&&(this.animationValues||(this.animationValues=o),this.animationValues.pathRotation=i.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Gt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Kt.update(()=>{yr.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=pi(0)),this.motionValue.jump(0,!1),this.currentAnimation=vo(this.motionValue,[0,1e3],{...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onComplete:()=>{t.onComplete&&t.onComplete(),this.completeAnimation()}}),function(t,e){const n=globalThis.__MOTION_INSPECT__;if(n)try{n({...be("layout-animation-start",t),node:e})}catch{}}(this.currentAnimation,this),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?.(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead(),{targetWithTransforms:e,layout:n,latestValues:i}=t;let{target:s}=t;if(e&&s&&n){if(this!==t&&this.layout&&n&&Hr(this.options.animationType,this.layout.layoutBox,n.layoutBox)){const{layoutBox:t}=this.layout,e=s;s=this.target||{x:{min:0,max:0},y:{min:0,max:0}},Xr(s.x,e.x,t.x),Xr(s.y,e.y,t.y)}Bo(e,s),oo(e,i),Wo(this.projectionDeltaWithTransform,this.layoutCorrected,e,i)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new lr);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?.transition,preserveFollowOpacity:n?.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){const{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){this.getStack()?.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){return this.getStack()?.relegate(this)||!1}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;const{latestValues:e}=t;if(!Ys(e))return;const n={};for(let e=0;e<xr.length;e++)Tr(xr[e],t,n,this.animationValues);for(let e=0;e<Ks.length;e++)Tr(Ks[e],t,n,this.animationValues);t.render();for(const e in n)t.setStaticValue(e,n[e]),this.animationValues&&(this.animationValues[e]=n[e]);t.scheduleRender()}applyProjectionStyles(t,e){if(!this.instance||this.isSVG)return;const n=this.getLead();if(!this.isVisible&&n!==this)return void(t.visibility="hidden");const i=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,t.visibility="",t.opacity="",t.pointerEvents=Ao(e?.pointerEvents)||"",void(t.transform=i?i(this.latestValues,""):"none");if(!this.projectionDelta||!this.layout||!n.target)return(this.options.layoutId||this.needsShow)&&(this.needsShow=!1,t.visibility="",t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=Ao(e?.pointerEvents)||""),void(this.hasProjected&&!Gs(this.latestValues)&&(t.transform=i?i({},""):"none",this.hasProjected=!1));t.visibility="";const s=n.animationValues||n.latestValues;this.applyTransformsToTarget();let o=pr(this.projectionDeltaWithTransform,this.treeScale,s);i&&(o=i(s,o)),t.transform=o;const{x:r,y:a}=this.projectionDelta;t.transformOrigin=`${100*r.origin}% ${100*a.origin}% 0`,n.animationValues?t.opacity=n===this?s.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:t.opacity=n===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const e in xo){if(void 0===s[e])continue;const{correct:i,applyTo:r,isCSSVariable:a}=xo[e],l="none"===o?s[e]:i(s[e],n);if(r){const e=r.length;for(let n=0;n<e;n++)t[r[n]]=l}else a?this.options.visualElement.renderState.vars[e]=l:t[e]=l}this.options.layoutId&&(t.pointerEvents=n===this?Ao(e?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=this.dragSnapshot=this.dragAncestor=void 0}resetTree(){this.root.nodes.forEach(t=>t.currentAnimation?.stop()),this.root.nodes.forEach(Dr),this.root.sharedNodes.clear()}}}function Pr(t){t.updateLayout(),function(t){const{snapshot:e,dragAncestor:n}=t,i=n?.isAnimationBlocked&&n.layout;if(!e||!i||t.resumeFrom||t.isAnimationBlocked)return;const s=n.dragSnapshot;mr(t=>no(e.layoutBox[t],i.layoutBox[t].min-s.layoutBox[t].min))}(t)}function Mr(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=t.layout,{animationType:s}=t.options,o=e.source!==t.layout.source,r=(i,o)=>{if("size"===s)mr(t=>{const e=Oo(i[t]);i[t].min=o[t].min,i[t].max=i[t].min+e});else if("x"===s||"y"===s){const t="x"===s?"y":"x";Lo(i[t],o[t])}else Hr(s,e.layoutBox,n)&&mr(e=>{const n=Oo(o[e]);i[e].max=i[e].min+n,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[e].max=t.relativeTarget[e].min+n)})},a=o?e.measuredBox:e.layoutBox;r(a,n);const l={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Wo(l,n,e.layoutBox);const c={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Wo(c,o?t.applyTransform(i,!0):n,a);const u=!er(l);let h=!1;const d=t.getClosestProjectingParent();if((!t.resumeFrom||d?.options.layoutRoot&&t.resumeFrom.path.includes(d))&&d&&!d.resumeFrom){const{snapshot:i,layout:s}=d;if(i&&s){const a=t.options.layoutAnchor||void 0,l={x:{min:0,max:0},y:{min:0,max:0}};zo(l,o?t.resumeFrom.applyTransform(e.layoutBox,!0,void 0,!0,d.depth+1):e.layoutBox,i.layoutBox,a);const c={x:{min:0,max:0},y:{min:0,max:0}};zo(c,n,s.layoutBox,a),o&&r(l,c),or(l,c)||(h=!0),d.options.layoutRoot&&(t.relativeTarget=c,t.relativeTargetOrigin=l,t.relativeParent=d)}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeLayoutChanged:h})}else t.isLead()&&t.options.onExitComplete?.();t.options.transition=void 0}function Er(t){wo.value&&vr.nodes++,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 kr(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Vr(t){t.clearSnapshot()}function Dr(t){t.clearMeasurements()}function Cr(t){t.isLayoutDirty=!0,t.updateLayout()}function Rr(t){t.isLayoutDirty=!1}function Lr(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.dragSnapshot||t.layout,t.isLayoutDirty=!0)}function Br(t){t.relativeTarget&&t.relativeParent?.isLayoutDirty&&(t.currentAnimation?t.isLayoutDirty=!0:(t.targetDelta=void 0,t.removeRelativeTarget()))}function jr(t){const{visualElement:e}=t.options;e?.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Or(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Fr(t){t.resolveTargetDelta()}function Ir(t){t.calcProjection()}function Wr(t){t.resetSkewAndRotation()}function Nr(t,e,n){t.translate=kt(e.translate,0,n),t.scale=kt(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Ur(t,e,n,i){t.min=kt(e.min,n.min,i),t.max=kt(e.max,n.max,i)}function $r(t){return void 0!==t.animationValues?.opacityExit}const zr={duration:.45,ease:[.4,0,.1,1]},Kr=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Gr=Kr("applewebkit/")&&!Kr("chrome/")?Math.round:c;function Yr(t){t.min=Gr(t.min),t.max=Gr(t.max)}function Xr(t,e,n){t.max=Oo(n)+(t.min=e.min)}function Hr(t,e,n){return"position"===t||"preserve-aspect"===t&&!Fo(rr(e),rr(n),.2)}function qr(t){return t!==t.root&&t.scroll?.wasRoot}function _r(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n,i)}const Zr=Ar({attachResizeListener:(t,e)=>_r(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Jr={current:void 0},Qr=Ar({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Jr.current){const t=new Zr({});t.mount(window),t.setOptions({layoutScroll:!0}),Jr.current=t}return Jr.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>"fixed"===window.getComputedStyle(t).position}),ta=new WeakMap;function ea(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function na(t){return"string"==typeof t||Array.isArray(t)}const ia=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],sa=["initial"].concat(ia);function oa(t){if(ea(t.animate))return!0;for(let e=0;e<sa.length;e++)if(na(t[sa[e]]))return!0;return!1}function ra(t){return Boolean(oa(t)||t.variants)}function aa(t,e,n){for(const i in e){const s=e[i],o=n[i];if(Fi(s))t.addValue(i,s);else if(Fi(o))t.addValue(i,pi(s,{owner:t}));else if(o!==s)if(t.hasValue(i)){const e=t.getValue(i);!0===e.liveStyle?e.jump(s):e.hasAnimated||e.set(s)}else{const e=t.getStaticValue(i);t.addValue(i,pi(void 0!==e?e:s,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}const la={current:null},ca={current:!1},ua="undefined"!=typeof window;function ha(){if(ca.current=!0,ua)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>la.current=t.matches;t.addEventListener("change",e),e()}else la.current=!1}const da=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let pa={};class ma{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,skipAnimations:s,blockInitialAnimation:o,visualState:r},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=fn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=U.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,Kt.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=e.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=s,this.options=a,this.blockInitialAnimation=Boolean(o),this.isControllingVariants=oa(e),this.isVariantNode=ra(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:u,...h}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in h){const e=h[t];void 0!==l[t]&&Fi(e)&&e.set(l[t])}}mount(t){if(this.hasBeenMounted)for(const t in this.initialValues)this.values.get(t)?.jump(this.initialValues[t]),this.latestValues[t]=this.initialValues[t];if(this.current=t,ta.set(t,this),this.projection?.instance||this.projection?.mount(t),this.isVariantNode&&!this.isControllingVariants){let t=this;do{t=!1!==t.props.inherit&&t.parent}while(t&&!t.isVariantNode);if(t){const{variantChildren:e}=t;e.add(this),this.removeFromVariantTree=()=>e.delete(this)}}this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(ca.current||ha(),this.shouldReduceMotion=la.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection?.unmount(),Gt(this.notifyUpdate),Gt(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree?.(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),(this.enteringChildren||(this.enteringChildren=new Set)).add(t)}removeChild(t){this.children.delete(t),this.enteringChildren?.delete(t)}bindToMotionValue(t,e){if(this.valueSubscriptions.get(t)?.(),e.accelerate&&On.has(t)&&this.current instanceof HTMLElement){const{factory:n,keyframes:i,times:s,ease:o,duration:r}=e.accelerate,a=new Vn({element:this.current,name:t,keyframes:i,times:s,ease:o,duration:p(r)}),l=n(a);return void this.valueSubscriptions.set(t,()=>{l(),a.cancel()})}const n=Je.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&Kt.preRender(this.notifyUpdate),n&&(this.projection&&(this.projection.isTransformDirty=!0),Hn.get(this.current)?.check()),this.scheduleRender()});let s;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{i(),s?.()})}sortNodePosition(t){return this.current&&t.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in pa){const e=pa[t];if(!e)continue;const{isEnabled:n,Feature:i}=e;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){const{transformTemplate:n,onUpdate:i}=this.props;(t.transformTemplate||n)&&this.scheduleRender(),(t.transformTemplate&&!n||t.onUpdate&&!i)&&Hn.get(this.current)?.demote(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<da.length;e++){const n=da[e];this.propEventSubscriptions[n]?.(),delete this.propEventSubscriptions[n];const i=t["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=aa(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue?.()}getProps(){return this.props}getVariant(t){return this.props.variants?.[t]}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}addValue(t,e){const n=this.values.get(t);if(e!==n){n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e);const i=e.get();void 0!==i&&(this.latestValues[t]=i)}}removeValue(t){this.values.delete(t),this.valueSubscriptions.get(t)?.(),this.valueSubscriptions.delete(t),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){let n=this.props.values?.[t];return n||(n=this.values.get(t),void 0===n&&void 0!==e&&(n=pi(e??this.getDefaultValue?.(t),{owner:this}),this.addValue(t,n)),n)}readValue(t,e){let n=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];return null!=n&&("string"==typeof n&&(o(n)||a(n))?n=parseFloat(n):"number"!=typeof n&&!At.test(n)&&At.test(e)&&(n=We(t,e)),this.setBaseTarget(t,Fi(n)?n.get():n)),Fi(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}on(t,e){return(this.events[t]||(this.events[t]=new d)).add(e)}notify(t,...e){this.events[t]?.notify(...e)}scheduleRenderMicrotask(){go.render(this.render)}}class fa extends ma{constructor(){super(...arguments),this.KeyframeResolver=Ji}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){const n=t.style;return n?n[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Fi(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}function ga(t,{style:e,vars:n},i,s){const o=t.style;let r;for(r in e)o[r]=e[r];for(r in s?.applyProjectionStyles(o,i),n)o.setProperty(r,n[r])}function ya(t,{layout:e,layoutId:n}){return Je.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!xo[t]||"opacity"===t)}function va(t,e,n){const i=t.style,s=e?.style,o={};if(!i)return o;for(const e in i)(Fi(i[e])||s&&Fi(s[e])||ya(e,t)||void 0!==n?.getValue(e)?.liveStyle)&&(o[e]=i[e]);return o}class xa extends fa{constructor(){super(...arguments),this.type="html",this.renderInstance=ga}mount(t){super.mount(t)}readValueFromInstance(t,e){if(Je.has(e))return this.projection?.isProjecting?He(e):_e(t,e);{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 ro(t,e)}build(t,e,n){Ms(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return va(t,e,n)}}const wa="[data-layout],[data-layout-id]",Ta=new WeakMap;let ba;function Sa(t){const e=[];return t instanceof HTMLElement&&t.matches(wa)&&e.push(t),t.querySelectorAll(wa).forEach(t=>{t instanceof HTMLElement&&e.push(t)}),e}function Aa(t,e){const n=t.getAttribute("data-layout");return{layoutId:t.getAttribute("data-layout-id")??void 0,layout:null!==n||void 0,animationType:n&&"true"!==n?n:"both",transition:e}}function Pa(t,e){let n=Ta.get(t);if(n)n.setOptions(Aa(t,e));else{let i=ta.get(t);i||(i=new xa({props:{},presenceContext:null,visualState:{latestValues:{},renderState:{transform:{},transformOrigin:{},style:{},vars:{}}}},{allowProjection:!0}),mo(t,i)),t.style.transform&&!Gs(i.latestValues)&&(t.style.transform=""),n=new Qr(i.latestValues,function(t){let e=t.parentElement;for(;e;){const t=Ta.get(e);if(t?.instance)return t;e=e.parentElement}}(t)),i.projection=n,n.setOptions({...Aa(t,e),visualElement:i}),n.mount(t),Ta.set(t,n)}return n.isPresent=!0,n.options.onExitComplete&&n.setOptions({onExitComplete:void 0}),n}function Ma(t,e){e.setOptions({onExitComplete:void 0});e.getStack()&&!e.isLead()||e.currentAnimation?.stop(),e.unmount(),Ta.delete(t)}function Ea(){const t=ba;ba=void 0,function(){if(I.isProcessing)return;const t=U.now();I.delta=i(0,1e3/60,t-I.timestamp),I.timestamp=t,I.isProcessing=!0,Yt.update.process(I),Yt.preRender.process(I),Yt.render.process(I),I.isProcessing=!1}();const e=new Map;for(const n of t)for(const t of n.collectTargets()){const i=e.get(t);i?i.push(n):e.set(t,[n])}const n=new Map;for(const t of(s=e.keys(),[...s].sort((t,e)=>t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1))){const i=e.get(t),s=Pa(t,i[i.length-1].transitionFor(t));for(const e of i)e.adopt(t,s);n.set(t,s)}var s;n.forEach(t=>{t.isLayoutDirty=!1,t.willUpdate()});const o=[];for(const e of t){const t=e.runUpdate();t&&o.push(t)}const r=()=>{const e=new Set;for(const n of t)n.reconcileAdditions(e);for(const n of t)n.reconcileRemovals(e);let i;n.forEach(t=>i||(i=t.root));for(const e of t)i||(i=e.getRoot());i?.didUpdate(),go.render(()=>{for(const e of t)e.finalize()})};o.length?Promise.all(o).then(r):r()}class ka{constructor(t,e,n){this.scope=t,this.updateDom=e,this.defaultOptions=n,this.sharedTransitions=new Map,this.notifyReady=()=>{},this.rejectReady=()=>{},this.tracked=new Map,this.restorePoints=new Map,this.readyPromise=new Promise((t,e)=>{this.notifyReady=t,this.rejectReady=e}),ba||(ba=[],queueMicrotask(Ea)),ba.push(this)}shared(t,e){return this.sharedTransitions.set(t,e),this}then(t,e){return this.readyPromise.then(t,e)}transitionFor(t){const e=t.getAttribute("data-layout-id");return e&&this.sharedTransitions.get(e)||this.defaultOptions}adopt(t,e){this.tracked.set(t,e),this.restorePoints.set(t,{parent:t.parentElement,next:t.nextSibling})}collectTargets(){return Sa(this.scope)}runUpdate(){try{const t=this.updateDom();if(t&&"function"==typeof t.then)return t.then(void 0,t=>{this.updateError=t})}catch(t){this.updateError=t}}reconcileAdditions(t){for(const e of Sa(this.scope)){if(this.tracked.has(e))continue;const n=Pa(e,this.transitionFor(e));this.adopt(e,n),n.options.layoutId&&t.add(n.options.layoutId)}}reconcileRemovals(t){this.tracked.forEach((e,n)=>{if(n.isConnected)return;const i=this.restorePoints.get(n);this.restorePoints.delete(n);const{layoutId:s}=e.options,o=e.getStack(),r=o&&o.members.some(t=>t!==e&&t.instance?.isConnected);if(s&&e.isLead()&&r&&!t.has(s)&&i&&i.parent.isConnected){if(i.parent.insertBefore(n,i.next?.parentNode===i.parent?i.next:null),e.isPresent=!1,e.setOptions({onExitComplete:()=>{n.remove(),Ma(n,e)}}),e.relegate())return;n.remove()}Ma(n,e),this.tracked.delete(n)})}getRoot(){let t;return this.tracked.forEach(e=>t||(t=e.root)),t}finalize(){if(this.updateError)return void this.rejectReady(this.updateError);const t=new Set;this.tracked.forEach(e=>{e.instance&&e.currentAnimation&&t.add(e.currentAnimation)}),this.notifyReady(new ii([...t]))}}function Va(t,e,n){if("function"==typeof t)return{scope:hs.current?.root||document,updateDom:t,defaultOptions:e};return{scope:t instanceof Document?t:fs(t)[0]??document,updateDom:e,defaultOptions:n}}const Da=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function Ca(t){return{point:{x:t.pageX,y:t.pageY}}}const Ra=t=>e=>Da(e)&&t(e,Ca(e));function La(t,e,n,i){return _r(t,e,Ra(n),i)}const Ba=new WeakMap;let ja;const Oa=(t,e,n)=>(i,s)=>s&&s[0]?s[0][t+"Size"]:us(i)&&"getBBox"in i?i.getBBox()[e]:i[n],Fa=Oa("inline","width","offsetWidth"),Ia=Oa("block","height","offsetHeight");function Wa({target:t,borderBoxSize:e}){Ba.get(t)?.forEach(n=>{n(t,{get width(){return Fa(t,e)},get height(){return Ia(t,e)}})})}function Na(t){t.forEach(Wa)}function Ua(t,e){ja||"undefined"!=typeof ResizeObserver&&(ja=new ResizeObserver(Na));const n=fs(t);return n.forEach(t=>{let n=Ba.get(t);n||(n=new Set,Ba.set(t,n)),n.add(e),ja?.observe(t)}),()=>{n.forEach(t=>{const n=Ba.get(t);n?.delete(e),n?.size||ja?.unobserve(t)})}}const $a=new Set;let za;function Ka(t){return $a.add(t),za||(za=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};$a.forEach(e=>e(t))},window.addEventListener("resize",za)),()=>{$a.delete(t),$a.size||"function"!=typeof za||(window.removeEventListener("resize",za),za=void 0)}}function Ga(t,e){return ds("function"==typeof t?Ka(t):Ua(t,e))}const Ya=(t,e)=>Math.abs(t-e);function Xa(t,e){const n=Ya(t.x,e.x),i=Ya(t.y,e.y);return Math.sqrt(n**2+i**2)}const Ha=new Set(["auto","scroll"]);class qa{constructor(t,e,{transformPagePoint:n,contextWindow:i=window,dragSnapToOrigin:s=!1,distanceThreshold:o=3,element:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.onElementScroll=t=>{this.handleScroll(t.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;this.hasPendingMove=!1,this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Za(this.lastRawMoveEventInfo,this.transformPagePoint));const t=Qa(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=Xa(t.offset,{x:0,y:0})>=this.distanceThreshold;if(!e&&!n)return;const{point:i}=t;this.history.push({...i,timestamp:U.now()});const{onStart:s,onMove:o}=this.handlers;e||(s?.(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),o?.(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.handleScroll(window),this.lastMoveEvent=t,this.lastRawMoveEventInfo=e,this.lastMoveEventInfo=Za(e,this.transformPagePoint),this.hasPendingMove=!0,Kt.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.hasPendingMove&&this.updatePoint(),this.end();const{onEnd:n,onSessionEnd:i,resumeAnimation:s}=this.handlers;if(!this.dragSnapToOrigin&&this.startEvent||s?.(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=Qa("pointercancel"===t.type?this.lastMoveEventInfo:Za(e,this.transformPagePoint),this.history);this.startEvent&&n?.(t,o),i?.(t,o)},!Da(t))return;this.dragSnapToOrigin=s,this.handlers=e,this.transformPagePoint=n,this.distanceThreshold=o,this.contextWindow=i||window;const a=Za(Ca(t),this.transformPagePoint),{point:l}=a;this.history=[{...l,timestamp:U.now()}];const{onSessionStart:c}=e;c&&c(t,Qa(a,this.history));const h={passive:!0,capture:!0};this.removeListeners=u(La(this.contextWindow,"pointermove",this.handlePointerMove,h),La(this.contextWindow,"pointerup",this.handlePointerUp,h),La(this.contextWindow,"pointercancel",this.handlePointerUp,h)),r&&this.startScrollTracking(r)}startScrollTracking(t){let e=t.parentElement;for(;e;){const t=getComputedStyle(e);(Ha.has(t.overflowX)||Ha.has(t.overflowY))&&this.scrollPositions.set(e,_a(e)),e=e.parentElement}this.scrollPositions.set(window,_a(window)),this.removeScrollListeners=u(_r(window,"scroll",this.onElementScroll,{capture:!0}),_r(window,"scroll",this.onWindowScroll,{}))}handleScroll(t){const e=this.scrollPositions.get(t);if(!e)return;const n=t===window,i=_a(t),s=i.x-e.x,o=i.y-e.y;0===s&&0===o||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s,this.lastMoveEventInfo.point.y+=o):this.history.length>0&&(this.history[0].x-=s,this.history[0].y-=o),this.scrollPositions.set(t,i),Kt.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners?.(),this.removeScrollListeners?.(),this.scrollPositions.clear(),Gt(this.updatePoint)}}const _a=t=>t===window?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop};function Za(t,e){return e?{point:e(t.point)}:t}function Ja(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Qa({point:t},e){return{point:t,delta:Ja(t,el(e)),offset:Ja(t,tl(e)),velocity:nl(e,.1)}}function tl(t){return t[0]}function el(t){return t[t.length-1]}function nl(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const s=el(t);for(;n>=0&&(i=t[n],!(s.timestamp-i.timestamp>p(e)));)n--;if(!i)return{x:0,y:0};i===t[0]&&t.length>2&&s.timestamp-i.timestamp>2*p(e)&&(i=t[1]);const o=m(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}const il=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function sl(t){return il.has(t.tagName)||!0===t.isContentEditable}const ol=new Set(["INPUT","SELECT","TEXTAREA"]);function rl(t){return ol.has(t.tagName)||!0===t.isContentEditable}const al={x:!1,y:!1};function ll(){return al.x||al.y}function cl(t){return"x"===t||"y"===t?al[t]?null:(al[t]=!0,()=>{al[t]=!1}):al.x||al.y?null:(al.x=al.y=!0,()=>{al.x=al.y=!1})}function ul(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 hl(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 dl=.35;function pl(t,e,n){return{min:ml(t,e),max:ml(t,n)}}function ml(t,e){return"number"==typeof t?t:t[e]||0}function fl(t){let e="";for(const n of t.path){n.scroll=void 0,n.updateScroll();const{scroll:i}=n;n!==t.root&&i&&(e+=i.offset.x+","+i.offset.y+",")}return e}const gl=new WeakMap;class yl{constructor(t,e=()=>t.getProps()){this.openDragLock=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.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t,this.readProps=e}start(t,{snapToCursor:e=!1,distanceThreshold:n}={}){if(!1===this.visualElement.presenceContext?.isPresent)return;const{dragSnapToOrigin:i}=this.getProps();this.panSession=new qa(t,{onSessionStart:t=>{e&&this.snapToCursor(t),this.stopAnimation()},onStart:(t,e)=>{const{drag:n,dragPropagation:i,onDragStart:s}=this.getProps();if(n&&!i&&(this.openDragLock?.(),this.openDragLock=cl(n),!this.openDragLock))return;this.latestPointerEvent=t,this.latestPanInfo=e,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints();const{projection:o}=this.visualElement;o&&(o.isAnimationBlocked=!0,o.target=void 0),mr(t=>{let e=this.getAxisMotionValue(t).get()||0;if(Y(e)&&(e=ki(e,this.visualElement.current)||0),ct.test(e))e=parseFloat(e);else if(lt.test(e)){const n=o?.layout?.layoutBox[t];n&&(e=Oo(n)*(parseFloat(e)/100))}this.originPoint[t]=e}),s&&Kt.update(()=>s(t,e),!1,!0),Wi(this.visualElement,"transform"),this.visualElement.animationState?.setActive("whileDrag",!0)},onMove:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e;const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:s,onDrag:o}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:r}=e;if(i&&null===this.currentDirection){if(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),null===this.currentDirection)return;s&&s(this.currentDirection)}this.updateAxis("x",r),this.updateAxis("y",r),this.visualElement.render(),o&&Kt.update(()=>o(t,e),!1,!0)},onSessionEnd:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e,this.stop(t,e),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>{const{dragSnapToOrigin:t}=this.getProps();(t||this.constraints)&&this.startAnimation({x:0,y:0})}},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:i,distanceThreshold:n,contextWindow:this.visualElement.current?.ownerDocument.defaultView,element:this.visualElement.current})}stop(t,e,n){const i=t||this.latestPointerEvent,s=e||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!s||!i)return;const{velocity:r}=s;this.startAnimation(r,n);const{onDragEnd:a}=this.getProps();a&&Kt.postRender(()=>a(i,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession(),!this.getProps().dragPropagation&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e?.setActive("whileDrag",!1)}endPanSession(){this.panSession?.end(),this.panSession=void 0}updateAxis(t,e){const{drag:n}=this.readProps();if(!e||!Tl(t,n,this.currentDirection))return;const i=this.getAxisMotionValue(t);let s=this.originPoint[t]+e[t];const o=this.constraints&&this.constraints[t];o&&(s=function(t,{min:e,max:n},i){return void 0!==e&&t<e?t=i?kt(e,t,i.min):Math.max(t,e):void 0!==n&&t>n&&(t=i?kt(n,t,i.max):Math.min(t,n)),t}(s,o,this.elastic[t])),i.set(s)}resolveConstraints(){const{dragConstraints:t,dragElastic:e}=this.getProps(),{projection:n}=this.visualElement,i=n&&(n.layout||n.measure(!1)),s=this.constraints;vl(t)?this.constraints&&this.scroll===fl(n)||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!i)&&function(t,{top:e,left:n,bottom:i,right:s}){return{x:ul(t.x,n,s),y:ul(t.y,e,i)}}(i.layoutBox,t),this.elastic=function(t=dl){return!1===t?t=0:!0===t&&(t=dl),{x:pl(t,"left","right"),y:pl(t,"top","bottom")}}(e),s!==this.constraints&&!vl(t)&&i&&this.constraints&&!this.hasMutatedConstraints&&mr(t=>{!1!==this.constraints&&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(!vl(t))return!1;const n=xl(t),{projection:i}=this.visualElement;if(!i||!i.layout)return!1;this.scroll=fl(i);const s=ao(n,i.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:hl(t.x,e.x),y:hl(t.y,e.y)}}(i.layout.layoutBox,i.removeElementScroll(s));if(e){const t=e(Ns(o));this.hasMutatedConstraints=!!t,t&&(o=Ws(t))}return o}startAnimation(t,e){const{drag:n,dragMomentum:i,dragElastic:s,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=mr(a=>{if(!Tl(a,e||n,this.currentDirection))return;let c=l[a]||{};!0!==r&&r!==a||(c={min:0,max:0});const u=s?200:1e6,h=s?40:1e7,d={type:"inertia",velocity:i?t[a]:0,bounceStiffness:u,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...o,...c};return this.startAxisValueAnimation(a,d)});return Promise.all(c).then(a)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return Wi(this.visualElement,t),n.start(bi(t,n,0,e,this.visualElement,!1))}stopAnimation(){mr(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const e=`_drag${t.toUpperCase()}`,n=this.readProps()[e];return n||this.visualElement.getValue(t,this.visualElement.latestValues[t]??0)}snapToCursor({clientX:t,clientY:e}){const{drag:n}=this.getProps(),i={x:t,y:e},s=this.visualElement.getTransformPagePoint()?.(i)||i,o=this.visualElement.measureViewportBox();mr(t=>{if(!Tl(t,n,this.currentDirection))return;const e=this.getAxisMotionValue(t),{min:i,max:r}=o[t];e.set((e.get()||0)+s[t]-kt(i,r,.5))})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!vl(e)||!n||!this.constraints)return;this.stopAnimation();const s=this.constraints,o={x:0,y:0};mr(t=>{const e=this.getAxisMotionValue(t).get();o[t]=function(t,e){let n=.5;const s=Oo(t),o=Oo(e);return o>s?n=h(e.min,e.max-s,t.min):s>o&&(n=h(t.min,t.max-o,e.min)),i(0,1,n)}({min:e,max:e},s[t])});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",n.root?.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),mr(e=>{const n=this.getAxisMotionValue(e);if(!Tl(e,t,null)||!n.get())return;const{min:i,max:s}=this.constraints[e];n.set(kt(i,s,o[e]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;gl.set(this.visualElement,this);const t=this.visualElement.current,e=La(t,"pointerdown",e=>{const{drag:n,dragListener:i=!0}=this.getProps(),s=e.target,o=s!==t&&rl(s);n&&i&&!o&&this.start(e)});let n;const i=()=>{const{dragConstraints:e}=this.getProps(),i=vl(e)&&xl(e);i&&(this.constraints=this.resolveRefConstraints(),n||(n=function(t,e,n){const i=Ga(t,wl(n)),s=Ga(e,wl(n));return()=>{i(),s()}}(t,i,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,o=s.addEventListener("measure",i);s.layout||(s.root?.updateScroll(),s.updateLayout()),Kt.read(i);const r=_r(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(mr(e=>{if(!Tl(e,this.getProps().drag,this.currentDirection))return;const n=this.getAxisMotionValue(e);this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate)}),this.visualElement.render())});return()=>{r(),e(),o(),a(),n?.()}}getProps(){const t=this.readProps(),{dragElastic:e=dl,dragMomentum:n=!0}=t;return{...t,dragElastic:e,dragMomentum:n}}}function vl(t){return!!t&&"object"==typeof t&&("current"in t||"nodeType"in t)}const xl=t=>"current"in t?t.current:t;function wl(t){let e=!0;return()=>{e?e=!1:t()}}function Tl(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const bl=["user-select","-webkit-user-select","-webkit-touch-callout","touch-action"];function Sl(t,e){const n=fs(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},ds(()=>i.abort())]}const Al=(t,e)=>!!e&&(t===e||Al(t,e.parentElement)),Pl=new WeakSet;function Ml(t){return e=>{"Enter"===e.key&&t(e)}}function El(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function kl(t){return Da(t)&&!ll()}const Vl=new WeakSet;function Dl(t,e){const n=window.getComputedStyle(t);return gn(e)?n.getPropertyValue(e):n[e]}const Cl={reducedMotion:"(prefers-reduced-motion: reduce)",motion:"(prefers-reduced-motion: no-preference)",dark:"(prefers-color-scheme: dark)",light:"(prefers-color-scheme: light)",hover:"(hover: hover) and (pointer: fine)",touch:"(pointer: coarse)",portrait:"(orientation: portrait)",landscape:"(orientation: landscape)"};function Rl(t){return t.includes("(")?t:t.replace(/([<>!]=?)\s+/g,"$1").trim().split(/\s+/).map(t=>{const e="!"===t[0];e&&(t=t.slice(1));const n=/^([<>]=?)([\d.]+)([a-z]*)$/.exec(t),i=n?`(width ${n[1]} ${n[2]}${n[3]||"px"})`:Cl[t]||t;return e?`(not (${i}))`:i}).join(" and ")}function Ll(...t){const e=!Array.isArray(t[0]),n=e?0:-1,i=t[0+n],s=ue(t[1+n],t[2+n],t[3+n]);return e?s(i):s}const Bl=new Set,jl=({timestamp:t})=>{Bl.forEach(e=>e.tick(t))};class Ol extends Ae{constructor(t){super(),this.state="idle",this.startTime=0,this.currentTime=0,this.started=!1,this.hasNextTarget=!1,this.nextTarget=0,this.stop=()=>{"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=t,this.factory=t.type,this.generator=this.factory(t);const{driver:e}=t;e&&(this.driver=e(t=>this.tick(t))),this.startTime=this.now(),this.state="running",this.driver?this.driver.start():(Bl.size||Kt.update(jl,!0),Bl.add(this))}setTarget(t,e){this.nextTarget=t,this.nextVelocity=e,this.hasNextTarget=!0}retarget(t,e){const{options:n,generator:i}=this;n.keyframes=t,n.velocity=e,this.startTime=this.now(),this.currentTime=0,i.retarget?i.retarget(t,e):this.generator=this.factory(n)}tick(t){const{options:e,hasNextTarget:n}=this,{delay:i=0,onUpdate:s,onPlay:o}=e;this.started||(this.startTime=Te(this.startTime,t));const r=Math.round(t-this.startTime)-i,a=this.currentTime=Math.max(0,r),l=this.generator.next(a),c=r<0?e.keyframes[0]:l.value;if(n){this.hasNextTarget=!1;const{keyframes:t}=e;t[0]=c,t[1]=this.nextTarget,this.retarget(t,this.nextVelocity??this.getGeneratorVelocity())}!n&&this.started||(this.started=!0,o?.()),"running"===this.state&&(s?.(c),l.done&&r>=0&&!n&&!this.hasNextTarget&&"running"===this.state&&(this.notifyFinished(),this.teardown(),this.state="finished",e.onComplete?.()))}getGeneratorVelocity(){return ge(this.generator,this.currentTime,this.options.velocity)}now(){return this.driver?this.driver.now():U.now()}teardown(){this.state="idle",this.driver?this.driver.stop():(Bl.delete(this),Bl.size||Gt(jl))}}function Fl(t,e,n){const i=t.get();let s,o=null;const r="string"==typeof i?i.replace(/[\d.-]/g,""):void 0,a=t=>s(r?t+r:t),l=()=>t.events.animationStart?.notify(),c=()=>{o&&(o.stop(),o=null),t.animation=void 0};if(t.attach((e,i)=>{s=i;const r=Po(e);if("running"===o?.state)return void o.setTarget(r,n.velocity);const u=Po(t.get()),h=o?o.getGeneratorVelocity():t.getVelocity();if(c(),u===r)return;const d={keyframes:[u,r],velocity:h,restDelta:.001,restSpeed:.01,...n,onUpdate:a},p=o=new Ol({...d,onPlay:l});t.animation=p,p.then(()=>{o===p&&(o=null,t.animation=void 0,t.events.animationComplete?.notify())})},c),Fi(e)){let i=!0===n.skipInitialAnimation;const s=e=>{i?(i=!1,t.jump(Il(e,r),!1)):t.set(Il(e,r))},o=e.on("change",s),a=e.get();Po(a)-Po(t.get())&&s(a);const l=t.on("destroy",o);return()=>{o(),l(),c()}}return c}function Il(t,e){return e?t+e:t}function Wl(t,e,n={}){const i={type:"spring",...n};return we(i),i.type=i.type||fe,Fl(t,e,i)}function Nl(t){const e=[];hi.current=e;const n=t();hi.current=void 0;const i=pi(n);return function(t,e,n){const i=()=>e.set(n()),s=()=>Kt.preRender(i,!1,!0),o=t.map(t=>t.on("change",s));e.on("destroy",()=>{o.forEach(t=>t()),Gt(i)})}(e,i,t),i}function Ul(t,e,n){return Fl(t,e,{...n,type:le})}const $l=[...Hi,mt,At];let zl=0;const Kl=()=>"motion-view-"+zl++;function Gl(t,e,n){e&&(t.style?.setProperty("view-transition-class",e),n.push(t))}function Yl(t,e,n,i,s){if(n&&(t.style?.setProperty("view-transition-group",n),i.push(t),"none"!==n&&s)){const n=getComputedStyle(t);"visible"===n.overflowX&&"visible"===n.overflowY||s.add(e)}}function Xl(t,e,n,i,s,o=[],r,a=[],l){const c=fs(t);if(i)return c.map((t,c)=>{const u=e.get(t);if(u)return u;const h=i[c]??Kl();return t.style?.setProperty("view-transition-name",h),n.push(t),e.set(t,h),Gl(t,s,o),Yl(t,h,r,a,l),h});const u=c.map(t=>e.has(t)?void 0:getComputedStyle(t).getPropertyValue("view-transition-name"));return c.map((t,i)=>{const c=e.get(t);if(c)return c;const h=u[i];let d;return h&&"none"!==h&&"auto"!==h&&"match-element"!==h&&!(t=>t.startsWith("motion-view-"))(h)?d=h:(d=Kl(),t.style?.setProperty("view-transition-name",d),n.push(t)),e.set(t,d),Gl(t,s,o),Yl(t,d,r,a,l),d})}function Hl(t){return"layout"===t?"group":"enter"===t||"new"===t?"new":"old"}let ql={},_l=null;const Zl=(t,e)=>{ql[t]=e},Jl=()=>{_l||(_l=document.createElement("style"),_l.id="motion-view");let t="";for(const e in ql){const n=ql[e];t+=`${e} {\n`;for(const[e,i]of Object.entries(n))t+=` ${e}: ${i};\n`;t+="}\n"}_l.textContent=t,document.head.appendChild(_l),ql={}},Ql=()=>{_l&&_l.parentElement&&_l.parentElement.removeChild(_l)};function tc(t){const e=t.match(/::view-transition-(old|new|group-children|group|image-pair)\((.*?)\)/);return e?{layer:e[2],type:e[1]}:null}function ec(){return document.getAnimations().filter(t=>{const{effect:e}=t;return!!e&&e.target===document.documentElement&&e.pseudoElement?.startsWith("::view-transition")})}const nc=["layout","enter","exit","new","old"],ic=t=>t.split(" ").every(t=>0===parseFloat(t)),sc={group:["layout"],new:["new","enter"],old:["old","exit"]},oc={new:{opacity:0,scale:.85},old:{opacity:1,scale:1}};function rc(t){const{update:e,targets:n,resolveDefs:i,cropOverride:s,pairs:o,classNames:r,flatGroups:a,options:l}=t;if(!document.startViewTransition)return(async()=>(await e(),new ii([])))();const c=new Map,u=[],h=[],d=[],m=new Set,f=new Map,g=new Set,v=new Map,x=new Map,w=new Map,T=new Map,b=t=>{n.forEach((e,n)=>{const l=r.get(n),p="root"!==n&&i.has(n)?a.has(n)?"none":"contain":void 0;let g;if("root"!==n&&i.has(n))if(o.has(n))if("old"===t)T.set(n,fs(n)),g=Xl(n,c,u,void 0,l,h,p,d,m),w.set(n,g);else{for(const t of T.get(n)??[])t.style?.removeProperty("view-transition-name"),c.delete(t);g=Xl(o.get(n),c,u,w.get(n),l,h,p,d,m)}else g=Xl(n,c,u,void 0,l,h,p,d,m);else g=[n];const y=s.get(n);g.forEach((n,i)=>{const s=f.get(n);f.set(n,s&&s!==e?{...s,...e}:e),void 0!==y&&v.set(n,y);const o=x.get(n)??{};o[t]=[i,g.length],x.set(n,o)})})},S=(t,e)=>{const n=x.get(t);return("old"===e?n?.old:"new"===e?n?.new:n?.new??n?.old)??[-1,1]},A=(t,e,n,i,s)=>{const o=ac(fi(l,n),fi(function(t,e){for(const n of sc[e]??[]){const e=t?.[n]?.options;if(e)return e}}(t,e)??{},n));return"function"==typeof o.delay&&(o.delay=o.delay(i,s)),o},P=t=>{const[e,n]=S(t,"group"),i=A(f.get(t),"group","layout",-1===e?0:e,n);i.duration&&(i.duration=p(i.duration));const{delay:s=0,duration:o,ease:r}=kn(i);return{delay:p(s),duration:o,ease:r}},M=new Map,E=t=>c.forEach((e,n)=>{const i=n,s=i.getBoundingClientRect?.();if(s&&s.height){const n=getComputedStyle(i),o={};for(const t of Qi)o[t]=n[t];const r=M.get(e)??{};r[t]={width:s.width,height:s.height,radii:o},M.set(e,r)}}),k=t=>{const e=M.get(t);return!!(e?.old&&e?.new&&e.old.height&&e.new.height)&&Math.abs(e.old.width/e.old.height-e.new.width/e.new.height)>.2},V=()=>{(function(t,e){return e.has(t)&&Object.keys(e.get(t)).length>0})("root",n)||Zl(":root",{"view-transition-name":"none"}),Zl("::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)",{"animation-timing-function":"linear !important"}),g.forEach(t=>{Zl(`::view-transition-group(${t})`,{overflow:"clip"}),Zl(`::view-transition-old(${t}), ::view-transition-new(${t})`,{width:"100%",height:"100%","object-fit":"cover"})}),m.forEach(t=>{Zl(`::view-transition-group-children(${t})`,{overflow:"clip"})}),Jl()},D=()=>{!function(t,e=[],n=[]){for(const e of t)e.style?.removeProperty("view-transition-name");for(const t of e)t.style?.removeProperty("view-transition-class");for(const t of n)t.style?.removeProperty("view-transition-group")}(u,h,d),Ql()},C=async()=>{await e(),b("new"),E("new"),(()=>{g.clear();for(const t of x.keys())"root"!==t&&(v.get(t)??k(t))&&g.add(t)})(),V()};let R;try{b("old"),E("old"),V(),R=document.startViewTransition(C)}catch(t){return D(),Promise.reject(t)}return R.finished.finally(D),new Promise((t,e)=>{R.ready.then(()=>{const e=ec(),n=[],i=new Set,s=new Set;f.forEach((t,e)=>{const o=x.get(e),r=!!o?.new&&!o?.old,a=!!o?.old&&!o?.new;for(const o of nc){if(!t[o])continue;if("enter"===o&&!r)continue;if("exit"===o&&!a)continue;const c=Hl(o),[u,h]=S(e,c);if(-1===u)continue;const{keyframes:d,options:m}=t[o];for(let[f,g]of Object.entries(d)){if(null==g)continue;if("x"===f||"y"===f){y(!1,`animateView() animates view-transition layers with CSS properties; the "${f}" shorthand has no effect - use transform, e.g. { transform: "translateX(40px)" }.`);continue}if("new"===o&&r&&null!=t.enter?.keyframes[f])continue;if("old"===o&&a&&null!=t.exit?.keyframes[f])continue;const d=ac(fi(l,f),fi(m,f));if(!Array.isArray(g)){const e="enter"===o?t.exit?.keyframes[f]:void 0,n="opacity"===f||("new"===c?r:a),i=null!=e?Array.isArray(e)?e[e.length-1]:e:n?oc[c]?.[f]:void 0;void 0!==i&&(g=[i,g])}"function"==typeof d.delay&&(d.delay=d.delay(u,h)),d.duration&&(d.duration=p(d.duration)),d.delay&&(d.delay=p(d.delay)),n.push(new Vn({...d,element:document.documentElement,name:f,pseudoElement:`::view-transition-${c}(${e})`,keyframes:g})),i.add(`${e}:${c}`),"opacity"===f&&s.add(`${e}:${c}`)}}});for(const t of e){if("finished"===t.playState)continue;const{effect:e}=t;if(!(e&&e instanceof KeyframeEffect))continue;const{pseudoElement:o}=e;if(!o)continue;const r=tc(o);if(!r)continue;const a=f.get(r.layer);if(i.has(`${r.layer}:${r.type}`)){s.has(`${r.layer}:new`)&&s.has(`${r.layer}:old`)&&e.getKeyframes().some(t=>t.mixBlendMode)?n.push(new ri(t)):t.cancel();continue}const l="old"===r.type?"new":"new"===r.type?"old":void 0;if(l&&i.has(`${r.layer}:${l}`)&&!s.has(`${r.layer}:${l}`)){t.cancel();continue}const c=x.get(r.layer),u=!("old"!==r.type&&"new"!==r.type||!c?.old||!c?.new);let h;if(r.type.startsWith("group")){const{delay:t,duration:e,ease:n}=P(r.layer);h={delay:t,duration:e,easing:Pn(n,e)}}else{const t=u?"group":r.type,[e,n]=S(r.layer,t);let i=A(a,t,"group"===t?"layout":"",-1===e?0:e,n);const s=i.visualDuration;i.duration&&(i.duration=p(i.duration)),i=kn(i),h={delay:p(i.delay??0),duration:u&&void 0!==s?p(s):i.duration,easing:u?"linear":Pn(i.ease,i.duration)}}e.updateTiming(h),n.push(new ri(t))}M.forEach((t,e)=>{if(!g.has(e))return;const{delay:i,duration:s,ease:o}=P(e);for(const r of Qi){const a=t.old?.radii[r]||t.new?.radii[r]||"0px",l=t.new?.radii[r]||t.old?.radii[r]||"0px";ic(a)&&ic(l)||n.push(new Vn({element:document.documentElement,name:r,pseudoElement:`::view-transition-group(${e})`,keyframes:[a,l],delay:i,duration:s,ease:o}))}}),t(new ii(n))}).catch(()=>R.updateCallbackDone.then(()=>t(new ii([])),e))})}function ac(t,e){const n={...t,...e};return void 0!==e.duration&&(void 0===e.visualDuration&&delete n.visualDuration,void 0===e.type&&delete n.type),n}let lc=[],cc=null;function uc(){cc=null;const[t]=lc;var e;t&&(n(lc,e=t),cc=e,rc(e).then(t=>(e.notifyReady(t),t.finished)).catch(t=>e.notifyReject(t)).finally(uc))}function hc(){for(let t=lc.length-1;t>=0;t--){const e=lc[t],{interrupt:n}=e.options;if("immediate"===n){const n=lc.slice(0,t+1).map(t=>t.update),i=lc.slice(t+1);e.update=()=>{n.forEach(t=>t())},lc=[e,...i];break}}cc&&"immediate"!==lc[0]?.options.interrupt||uc()}class dc{constructor(t,e={}){var n;this.currentSubject="root",this.targets=new Map,this.resolveDefs=new Set,this.cropOverride=new Map,this.pairs=new Map,this.classNames=new Map,this.flatGroups=new Set,this.notifyReady=c,this.notifyReject=c,this.readyPromise=new Promise((t,e)=>{this.notifyReady=t,this.notifyReject=e}),this.update=t,this.options={interrupt:"wait",...e},this.readyPromise.catch(c),n=this,lc.push(n),go.render(hc)}add(t,e){return this.currentSubject=t,this.resolveDefs.add(t),void 0!==e&&this.pairs.set(t,e),this.targets.has(t)||this.targets.set(t,{}),this}crop(t=!0){return this.cropOverride.set(this.currentSubject,t),this}group(t=!0){return t?this.flatGroups.delete(this.currentSubject):this.flatGroups.add(this.currentSubject),this}class(t){return this.classNames.set(this.currentSubject,t),this}layout(t={}){return this.updateTarget("layout",{},t),this}enter(t,e){return this.updateTarget("enter",t,e),this}exit(t,e){return this.updateTarget("exit",t,e),this}new(t,e){return this.updateTarget("new",t,e),this}old(t,e){return this.updateTarget("old",t,e),this}updateTarget(t,e,n={}){const{currentSubject:i,targets:s}=this;s.has(i)||s.set(i,{});s.get(i)[t]={keyframes:e,options:n}}then(t,e){return this.readyPromise.then(t,e)}}const pc=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"]),mc=t=>"string"==typeof t&&"svg"===t.toLowerCase();function fc(t,e,n,i){ga(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(pc.has(n)?n:Ps(n),e.attrs[n])}function gc(t,e,n){const i=va(t,e,n);for(const n in t)if("children"!==n&&(Fi(t[n])||Fi(e[n]))){i[-1!==Ze.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}function yc(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}const vc=[...ia].reverse(),xc=t=>!0===t?.out?t:t?.out;function wc(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!yc(e,t)}function Tc(){const t={};for(const e of ia)t[e]={isActive:"animate"===e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{},out:{}};return t}const bc=sa.length;const Sc=t=>!t.isLayoutDirty&&t.willUpdate(!1);const Ac=Kt,Pc=$t.reduce((t,e)=>(t[e]=t=>Gt(t),t),{});function Mc(t){return"object"==typeof t&&!Array.isArray(t)}function Ec(t,e,n,i){return null==t?[]:"string"==typeof t&&Mc(e)?fs(t,n,i):t instanceof NodeList?Array.from(t):Array.isArray(t)?t.filter(t=>null!=t):[t]}function kc(t,e,n){return t*(e+1)+n*e}function Vc(t,e){if(e.has(t))return e.get(t);const[,n,i]=t.match(/^(.+?)([+-][\d.]+)$/)||[];return e.has(n)?Math.max(0,e.get(n)+parseFloat(i)):void 0}function Dc(t,e,i,s,o,r){!function(t,e,i){for(let s=0;s<t.length;s++){const o=t[s];o.at>e&&o.at<i&&(n(t,o),s--)}}(t,o,r);for(let n=0;n<e.length;n++)t.push({value:e[n],at:kt(o,r,s[n]),easing:B(i,n)})}function Cc(t,e,n=0){const i=e+1+e*n;for(let e=0;e<t.length;e++)t[e]=t[e]/i}function Rc(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function Lc(t,{defaultTransition:e={},...n}={},i,s,o){const r=e.duration||.3,a=new Map,l=new Map,c={},u=new Map;let d=0,m=0,f=0;const g=(t,n)=>{let o=n;const a=t=>"number"==typeof t?n+t:function(t,e,n,i){return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:e.startsWith("<")?Math.max(0,n+parseFloat(e.slice(1))):Vc(e,i)??t}(m,t,d,u);for(let n=0;n<t.length;n++){const h=t[n];if("string"==typeof h){u.set(h,m);continue}if(!Array.isArray(h)){const t=void 0===h.at?m:a(h.at);"sequence"in h?(d=m=t,m=g(h.sequence,t),d=t,o=Math.max(o,m)):u.set(h.name,t);continue}let[y,v,x={}]=h;void 0!==x.at&&(m=a(x.at));let w=0;const T=(t,n,i,o=0,a=0)=>{const l=Oc(t),{delay:c=0,times:u=de(l),type:h=e.type||"keyframes",repeat:d,repeatType:g,repeatDelay:y=0,...v}=n;let{ease:x=e.ease||"easeOut",duration:T}=n;const S="function"==typeof c?c(o,a):c,A=l.length,P=En(h)?h:s?.[h||"keyframes"];if(A<=2&&P){let t=100;if(2===A&&Wc(l)){const e=l[1]-l[0];t=Math.abs(e)}const n={...e,...v};void 0!==T&&(n.duration=p(T));const i=Zt(n,t,P);x=i.ease,T=i.duration}T??(T=r);const M=m+S;1===u.length&&0===u[0]&&(u[1]=1);const E=u.length-l.length;if(E>0&&he(u,E),1===l.length&&l.unshift(null),d&&d<20){const t=T>0?y/T:0;T=kc(T,d,y);const e=[...l],n=[...u];x=Array.isArray(x)?[...x]:[x];const i=[...x],s="reverse"===g||"mirror"===g;let o=e,r=i;s&&(o=[...e].reverse(),"reverse"===g&&(r=[...i].reverse().map(t=>"function"==typeof t?b(t):t)));for(let a=0;a<d;a++){const c=s&&a%2==0,h=c?o:e,d=c?r:i,p=(a+1)*(1+t);t>0&&(l.push(l[l.length-1]),u.push(p),x.push("linear")),l.push(...h);for(let t=0;t<h.length;t++)u.push(n[t]+p),x.push(0===t?"linear":B(d,t-1))}Cc(u,d,t)}const k=M+T;Dc(i,l,x,u,M,k),w=Math.max(S+T,w),f=Math.max(k,f)};if(Fi(y)){T(v,x,jc("default",Bc(y,l)))}else{const t=Ec(y,v,i,c),e=t.length;for(let n=0;n<e;n++){const i=Bc(t[n],l);for(const t in v)T(v[t],Fc(x,t),jc(t,i),n,e)}}d=m,m+=w,o=Math.max(o,m)}return o};return g(t,0),o&&(o.duration=f,o.labels=u),l.forEach((t,i)=>{for(const s in t){const o=t[s];o.sort(Rc);const r=[],l=[],c=[];for(let t=0;t<o.length;t++){const{at:e,value:n,easing:i}=o[t];r.push(n),l.push(h(0,f,e)),c.push(i||"easeOut")}0!==l[0]&&(l.unshift(0),r.unshift(r[0]),c.unshift("easeInOut")),1!==l[l.length-1]&&(l.push(1),r.push(null)),a.has(i)||a.set(i,{keyframes:{},transition:{}});const u=a.get(i);u.keyframes[s]=r;const{type:d,...p}=e;u.transition[s]={...p,duration:f,ease:c,times:l,...n}}}),a}function Bc(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function jc(t,e){return e[t]||(e[t]=[]),e[t]}function Oc(t){return Array.isArray(t)?t:[t]}function Fc(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const Ic=t=>"number"==typeof t,Wc=t=>t.every(Ic);function Nc(t,e,n,i){const s=[];if(function(t,e){return Fi(t)||"number"==typeof t||"string"==typeof t&&!Mc(e)}(t,e))s.push(vo(t,Mc(e)&&e.default||e,n&&n.default||n));else{if(null==t)return s;const o=Ec(t,e,i),r=o.length;for(let t=0;t<r;t++){const i=o[t],a={...n};"delay"in a&&"function"==typeof a.delay&&(a.delay=a.delay(t,r)),i instanceof Element?s.push(...ho(i,e,a,ta.get(i))):s.push(...ls(rs(i)??fo,i,e,a))}}return s}let Uc=0;const $c=(t,e)=>void 0===e?t:{name:t,at:e};function zc(t){t.pause(),t.time=0,t.stop()}class Kc{constructor(t=[],e={},i){this.options=e,this.entries=[],this.repeatIndex=0,this.prevTime=0,this.markers=[],this.labels=new Map,this.totalDuration=0,this.isDirty=!1,this.isDone=!1,this.isRebuilding=!1,this.playbackSpeed=1,this.isWrapped=!1,this.stop=()=>{this.flush(),this.group?.stop()},this.isPaused=!1===e.autoplay,this.newFinished(),t.forEach(t=>this.add(t)),i?(this.isDirty=!1,this.isWrapped=!0,this.group=new oi(i),this.watch()):(this.invalidate(),this.flush());const{scope:s}=e;s&&(s.animations.push(this),this.finished.then(()=>n(s.animations,this)))}add(t,e){return t instanceof Kc&&t.adopt(this),this.push({item:t,at:e})}call(t,e){return this.push({item:t,at:e,marker:{name:"_m"+Uc++,time:0,callback:t}})}addPause(t,e){return this.push({item:e||{},at:t,marker:{name:"_m"+Uc++,time:0,callback:e,pause:!0}})}move(t,e){return this.entries.forEach(n=>{n.item===t&&(n.at=e)}),this.invalidate()}remove(t){return t instanceof Kc&&(t.parent=void 0),this.entries=this.entries.filter(e=>e.item!==t),this.invalidate()}clear(){return this.entries=[],this.invalidate()}getLabelTime(t){return this.flush(),this.labels.get(t)}seek(t){return this.time=this.resolve(t),this}playTo(t){const e=this.resolve(t),n=Math.abs(this.speed);return this.speed=e<this.time?-n:n,this.stopAt=e,this.clock||this.invalidate(),this.play(),this}reverse(){return this.speed=-this.speed,this.play(),this}get progress(){return this.duration?this.time/this.duration:0}set progress(t){this.time=t*this.duration}get time(){return this.active()?.time??0}set time(t){this.flush(),this.prevTime=t,this.group&&(this.group.time=t),this.repeatIndex=this.currentRepeat()}get speed(){return this.playbackSpeed}set speed(t){this.playbackSpeed=t,this.group&&(this.group.speed=t)}get duration(){return this.flush(),this.isWrapped?this.group.duration:this.totalDuration}get iterationDuration(){return this.flush(),this.isWrapped?this.group.iterationDuration:this.totalDuration}get state(){return this.active()?.state??"idle"}get startTime(){return this.active()?.startTime??null}play(){this.flush(),this.isPaused=!1,this.group?.play(),this.isDone&&(this.newFinished(),this.watch())}pause(){this.flush(),this.isPaused=!0,this.group?.pause()}cancel(){this.flush(),this.group?.cancel()}complete(){this.flush(),this.group?.complete()}attachTimeline(t){return this.flush(),this.scrollTimeline=t,this.detachScroll=this.group?.attachTimeline(t),()=>{this.scrollTimeline=void 0,this.detachScroll?.()}}then(t,e){return this.finished.then(t,e)}active(){return this.flush(),this.group?.animations.length?this.group:void 0}push(t){return this.entries.push(t),this.invalidate()}invalidate(){return this.parent?this.parent.invalidate():this.isDirty||(this.isDirty=!0,queueMicrotask(()=>this.flush())),this}flush(){this.isDirty&&!this.parent&&this.build()}adopt(t){this.group&&(zc(this.group),this.group=void 0),this.isDirty=!1,this.parent=t}build(){this.isDirty=!1,this.isWrapped=!1;const t=this.group;let e=0;t&&(this.isRebuilding=!0,this.scrollTimeline?(this.detachScroll?.(),t.cancel()):(e=t.animations.length?t.time:0,zc(t)),this.isRebuilding=!1);const{defaultTransition:n,onComplete:i,onUpdate:s,onRepeat:o,onReverseComplete:r,autoplay:a,scope:l,...c}=this.options,u={};void 0!==l?.reduceMotion&&(u.reduceMotion=l.reduceMotion),void 0!==l?.skipAnimations&&(u.skipAnimations=l.skipAnimations),Object.assign(u,c);const h=new Map,d={},p=function(t,e,n,i){const s=[];return Lc(t.map(t=>{if(Array.isArray(t)&&"function"==typeof t[0]){const e=t[0],n=pi(0);return n.on("change",e),1===t.length?[n,[0,1]]:2===t.length?[n,[0,1],t[1]]:[n,t[1],t[2]]}return t}),e,n,{spring:le},i).forEach(({keyframes:t,transition:e},n)=>{s.push(...Nc(n,t,e))}),s}(this.toSequence(h),{defaultTransition:n,...u},l,d),m=d.labels;let f=u.duration??d.duration;const g=d.duration?f/d.duration:1;if(m.forEach((t,e)=>m.set(e,t*g)),this.markers=[],h.forEach((t,e)=>{t.time=m.get(e),m.delete(e),f=Math.max(f,t.time),this.markers.push(t)}),this.markers.sort((t,e)=>t.time-e.time),this.labels=m,this.totalDuration=f,this.clock=this.clockAnimation=void 0,this.markers.length||void 0!==this.stopAt||s||o){const t=this.clock=pi(0);t.on("change",e=>t===this.clock&&this.onClock(e)),p.unshift(this.clockAnimation=vo(t,[0,f],{...u,duration:f,ease:"linear"}))}const y=this.group=new oi(p);e=Math.min(e,f),this.isDone&&e<f&&this.newFinished(),this.scrollTimeline?this.detachScroll=y.attachTimeline(this.scrollTimeline):(y.speed=this.playbackSpeed,this.isPaused&&y.pause(),e&&(y.time=e)),this.repeatIndex=this.currentRepeat(),this.prevTime=e||-1,this.watch()}toSequence(t){return this.entries.map(({item:e,at:n,marker:i})=>i?(t.set(i.name,i),$c(i.name,n)):e instanceof Kc?{sequence:e.toSequence(t),at:n}:"string"==typeof e?$c(e,n):void 0===n?e:Array.isArray(e)?function(t,e){const n=[...t],i="function"==typeof n[0]?Math.max(1,n.length-1):2;return n[i]={...n[i],at:e},n}(e,n):{...e,at:n})}resolve(t){return this.flush(),"number"==typeof t?t:Vc(t,this.labels)??this.time}currentRepeat(){const{repeat:t=0,repeatDelay:e=0,delay:n=0}=this.options,i=this.totalDuration+e,s=(this.clockAnimation?.time??0)-n;return i&&s>0?Math.min(t,Math.floor(s/i)):0}onClock(t){let e=this.prevTime;if(this.prevTime=t,this.isRebuilding)return;const{onUpdate:n,onRepeat:i,repeatType:s="loop"}=this.options;n?.(t);const o=this.currentRepeat();if(o!==this.repeatIndex&&(this.repeatIndex=o,i?.(),"loop"===s)){const t=this.speed>0;if(this.cross(e,t?this.totalDuration:0))return;e=t?-1:1/0}this.cross(e,t)}cross(t,e){if(t===e)return;const n=e>t,i=i=>n?i>t&&i<=e:i<t&&i>=e,s=n?this.markers:[...this.markers].reverse();for(const t of s)if(i(t.time)&&(t.callback?.(n?1:-1),t.pause))return this.pauseAt(t.time);return void 0!==this.stopAt&&i(this.stopAt)?(this.pauseAt(this.stopAt),this.stopAt=void 0,!0):void 0}pauseAt(t){return this.pause(),this.time=t,!0}watch(){const t=this.group;t.finished.then(()=>{if(t!==this.group||this.isDone)return;this.isDone=!0;const{onComplete:e,onReverseComplete:n}=this.options,i=this.speed<0&&n||e;i?.(),this.resolveFinished()})}newFinished(){this.isDone=!1,this.finished=new Promise(t=>{this.resolveFinished=t})}}function Gc(t={}){const{scope:e,reduceMotion:n,skipAnimations:i}=t;return function(t,s,o){const r=hs.current,a=r?.transition,l={};let c;if(void 0!==n&&(l.reduceMotion=n),void 0!==i&&(l.skipAnimations=i),u=t,Array.isArray(u)&&u.some(Array.isArray)){const n={...l,...s,scope:e};a&&(n.defaultTransition={...a,...n.defaultTransition}),c=new Kc(t,n)}else{const{onComplete:n,...i}=o||{},r={...l,...a,...i},{onUpdate:u}=i,h="number"==typeof t||"string"==typeof t&&("string"==typeof s||Array.isArray(s))?[u||(()=>{}),Array.isArray(s)?s:[t,s],{...r,onUpdate:void 0}]:[t,s,r];c=new Kc([h],{...l,onComplete:n,scope:e},Nc(t,s,r,e))}var u;return r&&c.finished.then(r.add(()=>c.stop())),c}}const Yc=Object.assign(Gc(),{addEffect:ss,removeEffect:os});const Xc=t=>function(e,n,i){return new oi(function(t,e,n,i){if(null==t)return[];const s=fs(t,i),o=s.length,r=[];for(let t=0;t<o;t++){const i=s[t],a={...n};"function"==typeof a.delay&&(a.delay=a.delay(t,o));for(const t in e){let n=e[t];Array.isArray(n)||(n=[n]);const s={...fi(a,t)};s.duration&&(s.duration=p(s.duration)),s.delay&&(s.delay=p(s.delay));const o=ci(i),l=li(t,s.pseudoElement||""),c=o.get(l);c&&c.stop(),r.push({map:o,key:l,unresolvedKeyframes:n,options:{...s,element:i,name:t,allowFlatten:!a.type&&!a.ease}})}}for(let t=0;t<r.length;t++){const{unresolvedKeyframes:e,options:n}=r[t],{element:i,name:s,pseudoElement:o}=n;o||null!==e[0]||(e[0]=Dl(i,s)),Ne(e),es(e,s),!o&&e.length<2&&e.unshift(Dl(i,s)),n.keyframes=e}const a=[];for(let t=0;t<r.length;t++){const{map:e,key:n,options:i}=r[t],s=new Vn(i);e.set(n,s),s.finished.finally(()=>e.delete(n)),a.push(s)}return a}(e,n,i,t))},Hc=Xc(),qc={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}},_c=new WeakMap;function Zc(t,e,n,s){const o=n[e],{length:r,position:a}=qc[e],l=o.current,c=n.time,u=t[`scroll${a}`];o.current=function(t,e){const n=t===document.scrollingElement,i=n&&document.body||t;let s=_c.get(i);s||_c.set(i,s=getComputedStyle(i));const{writingMode:o,flexDirection:r}=s,a="x"===e!==/^[vs]/.test(o);return(a?"rtl"===s.direction!=("sideways-lr"===o):o.endsWith("rl"))!==(!n&&s.display.includes("flex")&&(a!==("c"===r[0])?r:s.flexWrap).endsWith("reverse"))}(t,e)?-u||0:u,o.containerLength=t[`client${r}`],o.targetLength=t[`scroll${r}`],o.scrollLength=o.targetLength-o.containerLength,o.offset.length=0,o.offset[0]=0,o.offset[1]=o.scrollLength,o.progress=i(0,1,h(0,o.scrollLength,o.current));const d=s-c;o.velocity=d>50?0:f(o.current-l,d)}const Jc={start:0,center:.5,end:1};function Qc(t,e,n=0){let i=0;if(t in Jc&&(t=Jc[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 tu=[0,0];function eu(t,e,n,i){let s=Array.isArray(t)?t:tu,o=0,r=0;return"number"==typeof t?s=[t,t]:"string"==typeof t&&(s=(t=t.trim()).includes(" ")?t.split(" "):[t,Jc[t]?t:"0"]),o=Qc(s[0],n,i),r=Qc(s[1],e),o-r}const nu=[[0,0],[1,1]];function iu(t,e){const n=t.length-1;if(n<1)return 0;const i=t[0]>t[n],s=e=>t[i?n-e:e];if(t[0]===t[1]&&e<s(0))return i?1:0;let o=0;for(;o<n-1&&e>=s(o+1);)o++;const r=(o+h(s(o),s(o+1),e))/n;return i?1-r:r}function su(t,e,n,s={}){const{target:o}=s,r=o||s.offset;return{measure:e=>{if(r){n.time=e.time;for(const t in qc){const i=t,{offset:s}=n[i];Object.assign(n[i],e[i]),n[i].offset=s}if(o&&o!==t){const e=function(t,e){const n={x:0,y:0};let i=t;for(;i&&i!==e;)if(cs(i))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}(o,t),i=function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(o);n.x.targetOffset=e.x,n.y.targetOffset=e.y,n.x.targetLength=i.width,n.y.targetLength=i.height}!function(t,{offset:e=nu}){for(const n in qc){const s=t[n];s.offset.length=0;for(let t=0;t<e.length;t++)s.offset[t]=eu(e[t],s.containerLength,s.targetLength,s.targetOffset);s.progress=i(0,1,iu(s.offset,s.current))}}(n,s)}},notify:t=>e(r?n:t)}}const ou=new WeakMap,ru=new WeakMap,au=new WeakMap,lu=new WeakMap,cu=t=>t===document.scrollingElement?window:t;function uu(t,{container:e=document.scrollingElement,trackContentSize:n=!1,...i}={}){if(!e)return c;let s=au.get(e);s||(s=new Set,au.set(e,s));const o=su(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}},i);if(s.add(o),!ou.has(e)){const 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=()=>{!function(t,e,n){for(const i in qc)Zc(t,i,e,n);e.time=n}(e,t,I.timestamp);for(const e of s)e.measure(t);Kt.preUpdate(i)},i=()=>{for(const e of s)e.notify(t)},o=()=>Kt.read(n);ou.set(e,o);const r=cu(e);window.addEventListener("resize",o),e!==document.documentElement&&ru.set(e,Ga(e,o)),r.addEventListener("scroll",o),o()}if(n&&!lu.has(e)){const t=ou.get(e),n={width:e.scrollWidth,height:e.scrollHeight},i=()=>{const i=e.scrollWidth,s=e.scrollHeight;n.width===i&&n.height===s||(t(),n.width=i,n.height=s)},s=Kt.read(i,!0);lu.set(e,s)}const r=ou.get(e);return Kt.read(r,!1,!0),()=>{Gt(r);const t=au.get(e);if(!t)return;if(t.delete(o),t.size)return;au.delete(e);const n=ou.get(e);ou.delete(e),n&&(cu(e).removeEventListener("scroll",n),ru.get(e)?.(),window.removeEventListener("resize",n));const i=lu.get(e);i&&(Gt(i),lu.delete(e))}}const hu=new Map;const du=t=>{if(/v/u.test(t))return[];const e=eu(t,0,0,0);return[eu(t,0,1,0)-e,e-eu(t,1,0,0),e]},pu=([t,e,n])=>!n&&(0===e||1===e)&&`${e?"entry":"exit"}-crossing ${100*t}%`;function mu(t,e){const{target:n,container:i,axis:s}=e,o=n&&function(t=nu){if(2!==t.length)return;const[e,n]=t.map(du),i=[pu(e),pu(n)],s=n[0]-e[0],o=e[1]-n[1];return i[0]&&i[1]&&(s||o)?{points:i,a:s,b:o,cover:!e[0]&&1===s&&1===o}:void 0}(e.offset),r=function(t){return"undefined"!=typeof window&&(t?Tn():wn())}(n)&&(n?!!o:!e.offset),a=new Map,l=new Set;let c,u=!1;const h=(t,e)=>{const[n,i]=o.points;e.effect.updateTiming({direction:u?"normal"===t?"reverse":"alternate-reverse":t}),Object.assign(e,{rangeStart:u?i:n,rangeEnd:u?n:i}),e.play()},d=[t.attachTimeline({get timeline(){return r?function({container:t,target:e,axis:n}){let i=hu.get(t);i||(i=new Map,hu.set(t,i));const s=e??"self";let o=i.get(s);return o||(o={},i.set(s,o)),o[n]||(o[n]=e?new ViewTimeline({subject:e,axis:n}):new ScrollTimeline({source:t,axis:n}))}(e):void 0},onAttach:o&&(t=>{const e=t.effect.getTiming().direction;a.set(t,e),h(e,t)}),observe:t=>(t.pause(),l.add(t),c||(c=uu(t=>{l.forEach(e=>{e.time=e.iterationDuration*t[s].progress})},e)),()=>l.delete(t))})];if(r&&o){const{a:t,b:e}=o,r="y"===s?"clientHeight":"clientWidth",l=()=>{u!==(u=t*n[r]+e*i[r]<0)&&a.forEach(h)};l(),t*e<0&&d.push(Ga(l),Ga([n,i],l))}return()=>{d.forEach(t=>t()),c?.()}}const fu={some:0,all:1};t.AsyncMotionValueAnimation=ni,t.DOMKeyframesResolver=Ji,t.DOMVisualElement=fa,t.DocumentProjectionNode=Zr,t.Feature=class{constructor(t){this.isMounted=!1,this.node=t}update(){}},t.FlatTree=gr,t.GroupAnimation=ii,t.GroupAnimationWithThen=oi,t.HTMLProjectionNode=Qr,t.HTMLVisualElement=xa,t.JSAnimation=Ee,t.KeyframeResolver=fn,t.LayoutAnimationBuilder=ka,t.MotionGlobalConfig=s,t.MotionValue=di,t.MotionValueState=ys,t.NativeAnimation=Vn,t.NativeAnimationExtended=Ln,t.NativeAnimationWrapper=ri,t.NodeStack=lr,t.ObjectVisualElement=class extends ma{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(function(t,e){return t in e}(e,t)){const n=t[e];if("string"==typeof n||"number"==typeof n)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}},t.PanSession=qa,t.SVGVisualElement=class extends fa{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Qo}getBaseTargetFromProps(t,e){return Je.has(e)?super.getBaseTargetFromProps(t,e)??He(e):t[e]}getDefaultValue(t){return Je.has(t)?this.latestValues[t]??He(t):void 0}readValueFromInstance(t,e){if(Je.has(e)){const t=Fe(e);return t&&t.default||0}if(Ds.includes(e)){const n=getComputedStyle(t)[e];if("string"==typeof n&&n)return n.trim()}return e=pc.has(e)?e:Ps(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return gc(t,e,n)}build(t,e,n){Cs(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){fc(t,e,0,i)}mount(t){this.isSVGTag=mc(t.tagName),super.mount(t)}},t.SubscriptionManager=d,t.ViewTransitionBuilder=dc,t.VisualElement=ma,t.VisualElementDragControls=yl,t.acceleratedValues=On,t.activeScope=hs,t.addAttrValue=Rs,t.addBuilderToScope=ps,t.addDomEvent=_r,t.addEffect=ss,t.addPointerEvent=La,t.addPointerInfo=Ra,t.addSVGValue=Bs,t.addScaleCorrector=function(t){for(const e in t)xo[e]=t[e],K(e)&&(xo[e].isCSSVariable=!0)},t.addStyleValue=Ts,t.addToScope=ds,t.addUniqueItem=e,t.addValueToWillChange=Wi,t.alpha=_,t.analyseComplexValue=Tt,t.animate=Yc,t.animateEffectSubject=ls,t.animateElement=ho,t.animateLayout=function(t,e,n){const{scope:i,updateDom:s,defaultOptions:o}=Va(t,e,n),r=new ka(i,s,{...hs.current?.transition,...o});return ps(r),r},t.animateMini=Hc,t.animateMotionValue=bi,t.animateSingleValue=vo,t.animateTarget=Ki,t.animateValue=function(t){return new Ee(t)},t.animateValues=as,t.animateVariant=Gi,t.animateView=function(t,e={}){const n=new dc(t,e);return ps(n),n},t.animateVisualElement=Yi,t.animationMapKey=li,t.anticipate=M,t.applyAxisDelta=Zs,t.applyBoxDelta=Js,t.applyGeneratorOptions=kn,t.applyPointDelta=_s,t.applyPxDefaults=es,t.applyTreeDeltas=eo,t.arc=function(t={}){const e=function({strength:t=.5,peak:e=.5,direction:n,rotate:i=!1}={}){const s=!0===i?1:"number"==typeof i?i:0;let o;return(i,r)=>{const a=r.x-i.x,l=r.y-i.y;let c;c="cw"===n?-t:"ccw"===n?t:(Math.abs(a)>=Math.abs(l)?a:l)<0?-t:t;let u=Pi(i.x,i.y,r.x,r.y,c,e);if(void 0===n){const t=Math.abs(a)<Math.abs(l),n=i.x+a*e,s=i.y+l*e,h=t?Math.sign(u.x-n):Math.sign(u.y-s);void 0!==o&&0!==h&&h!==o?(c=-c,u=Pi(i.x,i.y,r.x,r.y,c,e)):0!==h&&(o=h)}const h=s?Ai(0,i.x,u.x,r.x,i.y,u.y,r.y):0,d=s?Ai(1,i.x,u.x,r.x,i.y,u.y,r.y):0,p=s?v(-180,180,d-h):0;return t=>{const e={x:Si(t,i.x,u.x,r.x),y:Si(t,i.y,u.y,r.y)};if(s){const n=Ai(t,i.x,u.x,r.x,i.y,u.y,r.y),o=h+p*t;e.rotate=v(-180,180,n-o)*s}return e}}}(t),n={interpolateProjection(t){const n=t.x.translate,i=t.y.translate;if(!(Math.sqrt(n*n+i*i)<20))return e({x:n,y:i},{x:0,y:0})},animateValues(t,n,i,s,o){if(!("x"in n)&&!("y"in n))return;const r=t("x"),a=t("y"),l=n.x,c=n.y,u=(Array.isArray(l)&&null!=l[0]?l[0]:r?.get())??0,h=(Array.isArray(c)&&null!=c[0]?c[0]:a?.get())??0,d=Array.isArray(l)?l[l.length-1]:l??u,p=Array.isArray(c)?c[c.length-1]:c??h,m=e({x:u,y:h},{x:d,y:p}),f=void 0!==m(0).rotate?t("pathRotation"):void 0,g={delay:s,...fi(i||{},"x")};delete g.path;const y=pi(0);y.start(bi("",y,[0,1e3],{...g,isSync:!0,velocity:0,onUpdate:t=>{const e=m(t/1e3);r?.set(e.x),a?.set(e.y),f&&void 0!==e.rotate&&f.set(e.rotate)},onComplete:()=>{r?.set(d),a?.set(p),f?.set(0)},onStop:()=>f?.set(0),onCancel:()=>f?.set(0)})),y.animation&&o.push(y.animation),delete n.x,delete n.y}};return n},t.aspectRatio=rr,t.attachFollow=Wl,t.attachSpring=Ul,t.attrEffect=Ls,t.axisDeltaEquals=ar,t.axisEquals=nr,t.axisEqualsRounded=sr,t.backIn=A,t.backInOut=P,t.backOut=S,t.bindToScope=ms,t.boxEquals=ir,t.boxEqualsRounded=or,t.buildHTMLStyles=Ms,t.buildProjectionTransform=pr,t.buildSVGAttrs=Cs,t.buildSVGPath=Vs,t.buildTransform=Xn,t.buildTransformer=bt,t.calcAxisDelta=Io,t.calcBoxDelta=Wo,t.calcChildStagger=ui,t.calcGeneratorDuration=_t,t.calcLength=Oo,t.calcRelativeAxis=No,t.calcRelativeAxisPosition=$o,t.calcRelativeBox=Uo,t.calcRelativePosition=zo,t.camelCaseAttributes=pc,t.camelToDash=Ps,t.cancelFrame=Gt,t.cancelMicrotask=yo,t.cancelSync=Pc,t.checkVariantsDidChange=wc,t.circIn=E,t.circInOut=V,t.circOut=k,t.clamp=i,t.cleanDirtyNodes=kr,t.collectMotionValues=hi,t.color=mt,t.compareByDepth=fr,t.complex=At,t.containsCSSVariable=H,t.convertBoundingBoxToBox=Ws,t.convertBoxToBoundingBox=Ns,t.convertOffsetToTimes=pe,t.copyAxisDeltaInto=jo,t.copyAxisInto=Lo,t.copyBoxInto=Bo,t.correctBorderRadius=ur,t.correctBoxShadow=hr,t.createAnimationState=function(t){let e=e=>Promise.all(e.map(({animation:e,options:n})=>Yi(t,e,n))),n=Tc(),i=!0,s=!1;function o(o){const{props:r,parent:a,manuallyAnimateOnMount:l}=t,{initial:c}=r,u=i||s,h=[],d=(e=c)=>"boolean"!=typeof e&&Di(t,Array.isArray(e)?e[0]:e,t.presenceContext?.custom)||void 0,p=new Map;let m={},f=1/0,g=t;do{g=!1!==g.props.inherit&&g.parent}while(g&&!g.isControllingVariants);const y=u&&xc(d(c??(g&&g.props.initial))?.transition);if(vc.forEach((e,i)=>{const s=n[e],c=r[e],d=g&&g.props[e],v=void 0!==c?c:na(d)||!1===d?d:void 0,x=na(v),w=e===o?s.isActive:null,T=x&&void 0===c&&!(u&&l);if(s.protectedKeys={...m},!s.isActive&&null===w||!v&&!s.prevProp||ea(v)||"boolean"==typeof v)return;if(!1===w&&(f=i),"exit"===e&&s.isActive&&!0!==w)return void(m={...m,...s.prevResolvedValues});const b=wc(s.prevProp,v);let S=b||x&&(w&&!T||i>f),A=!1;const P=Array.isArray(v)?v:[v];let M,E={};if(!1!==w)for(const n of P){const{transition:i,transitionEnd:s,...o}=Di(t,n,Ci(t,e))||{};E={...E,...o,...s},M=xc(i)||M}const{prevResolvedValues:k}=s;for(const e in{...k,...E}){if(e in m)continue;const n=E[e],i=k[e],o=Array.isArray(n)&&Array.isArray(i)?!yc(n,i)||b:n!==i;let r;if(o&&null==n)p.has(e)||p.set(e,s.prevOut);else if(o||void 0!==n&&p.has(e)){S=!0,r=p.get(e)||y,p.delete(e)&&(A=!0),s.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)}else s.protectedKeys[e]=!0;s.out[e]=r}if(s.prevProp=v,s.prevResolvedValues=E,s.prevOut=M,s.isActive&&(m={...m,...E}),S&&(!T||!b||A))for(const n of P){const i={type:e};if("string"==typeof n&&u&&l&&a?.enteringChildren){const e=Di(a,n)?.transition?.delayChildren;i.delay=ui(a.enteringChildren,t,e)}h.push({animation:n,options:i})}}),p.size){const e={},n=d();let i=n?.transition;p.forEach((s,o)=>{s&&(i={...i||t.getDefaultTransition(),[o]:s});const a=t.getValue(o);a&&(a.liveStyle=!0);const l=n&&!Array.isArray(c)?n[o]:void 0,u=t.getBaseTargetFromProps(r,o);e[o]=(void 0!==l?l:void 0===u||Fi(u)?void 0===t.initialValues[o]?t.baseTarget[o]:void 0:u)??null}),i&&(e.transition=i),h.push({animation:e})}const v=u&&t.blockInitialAnimation||i&&!l&&(!1===r.initial||r.initial===r.animate);return i=s=!1,!v&&h.length?e(h):Promise.resolve()}return{animateChanges:o,setActive:function(e,i){if(n[e].isActive===i)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,i)),n[e].isActive=i;const s=o(e);for(const t in n)n[t].protectedKeys={};return s},setAnimateFunction:n=>{e=n(t)},getState:()=>n,reset:()=>{n=Tc(),s=!0}}},t.createAxis=Jo,t.createAxisDelta=_o,t.createBox=Qo,t.createDelta=Zo,t.createEffect=vs,t.createGeneratorEasing=Zt,t.createProjectionNode=Ar,t.createRenderBatcher=zt,t.createScopedAnimate=Gc,t.cubicBezier=w,t.cubicBezierAsString=Sn,t.defaultEasing=me,t.defaultOffset=de,t.defaultTransformValue=He,t.defaultValueTypes=Oe,t.degrees=at,t.delay=bo,t.delayInSeconds=bo,t.dimensionValueTypes=Hi,t.distance=Ya,t.distance2D=Xa,t.drag=function(t,e={}){const n=(({axis:t,constraints:e,elastic:n,momentum:i,transition:s,snapToOrigin:o,directionLock:r,propagation:a,onStart:l,onMove:c,onEnd:u,onDirectionLock:h,onTransitionEnd:d,onMeasureConstraints:p})=>({drag:t||!0,dragConstraints:e,dragElastic:n,dragMomentum:i,dragTransition:s,dragSnapToOrigin:o,dragDirectionLock:r,dragPropagation:a,onDragStart:l,onDrag:c,onDragEnd:u,onDirectionLock:h,onDragTransitionEnd:d,onMeasureDragConstraints:p}))(e),i=hs.current;if(i)for(const t in n){const e=n[t];"function"==typeof e&&(n[t]=i.bind(e))}const s=fs(t).map(t=>{i?.track(t);const[s,o]=function(t){const e=Ta.get(t)||ta.get(t)?.projection;if(e?.instance)return[e,()=>{}];const n=Pa(t);return[n,()=>Ta.get(t)===n&&Ma(t,n)]}(t);s.setOptions({alwaysMeasureLayout:!0});const r=new yl(s.options.visualElement,()=>n),a=r.addListeners(),l=function(t,e){const{style:n}=t,i=t.getAttribute("draggable"),s=bl.map(t=>n.getPropertyValue(t)),o=e?"pan-"+("x"===e?"y":"x"):"none";return bl.forEach((t,e)=>n.setProperty(t,e<3?"none":o)),t.setAttribute("draggable","false"),()=>{bl.forEach((t,e)=>n.setProperty(t,s[e])),null===i?t.removeAttribute("draggable"):t.setAttribute("draggable",i)}}(t,e.axis);return()=>{l(),a?.(),r.cancel(),r.stopAnimation(),o()}});return ds(()=>s.forEach(t=>t()))},t.eachAxis=mr,t.easeIn=D,t.easeInOut=R,t.easeOut=C,t.easingDefinitionToFunction=F,t.elementDragControls=gl,t.expectsResolvedDragConstraints=function({dragConstraints:t,onMeasureDragConstraints:e}){return vl(t)&&!!e},t.extractEventInfo=Ca,t.fillOffset=he,t.fillWildcards=Ne,t.findDimensionValueType=qi,t.findEffect=rs,t.findValueType=t=>$l.find(Xi(t)),t.flushKeyframeResolvers=mn,t.followValue=function(t,e){const n=pi(Fi(t)?t.get():t);return Wl(n,t,e),n},t.frame=Kt,t.frameData=I,t.frameSteps=Yt,t.generateLinearEasing=Ht,t.getAnimatableNone=We,t.getAnimationMap=ci,t.getComputedStyle=Dl,t.getDefaultTransition=xi,t.getDefaultValueType=Fe,t.getEasingForSegment=B,t.getFeatureDefinitions=function(){return pa},t.getFinalKeyframe=ve,t.getMixer=Ot,t.getOptimisedAppearId=Ui,t.getOriginIndex=function(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}},t.getValueAsType=Un,t.getValueTransition=fi,t.getVariableValue=ki,t.getVariantContext=function t(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent&&t(e.parent)||{};return void 0!==e.props.initial&&(n.initial=e.props.initial),n}const n={};for(let t=0;t<bc;t++){const i=sa[t],s=e.props[i];(na(s)||!1===s)&&(n[i]=s)}return n},t.getViewAnimationLayerInfo=tc,t.getViewAnimations=ec,t.globalProjectionState=yr,t.handOffElementState=mo,t.has2DTranslate=Xs,t.hasComplexValues=wt,t.hasReducedMotionListener=ca,t.hasScale=zs,t.hasTransform=Gs,t.hasWarned=function(t){return g.has(t)},t.hex=ot,t.hover=function(t,e,n={}){e=ms(e);const[i,s,o]=Sl(t,n);return i.forEach(t=>{let n,i=!1,o=!1;const r=e=>{n&&(n(e),n=void 0),t.removeEventListener("pointerleave",l)},a=t=>{i=!1,window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",a),o&&(o=!1,r(t))},l=t=>{"touch"!==t.pointerType&&(i?o=!0:r(t))};t.addEventListener("pointerenter",i=>{if("touch"===i.pointerType||ll())return;o=!1;const r=e(t,i);"function"==typeof r&&(n=r,t.addEventListener("pointerleave",l,s))},s),t.addEventListener("pointerdown",()=>{i=!0,window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",a,s)},s)}),o},t.hsla=pt,t.hslaToRgba=Mt,t.inView=function(t,e,{root:n,margin:i,amount:s="some"}={}){const o=fs(t);e=ms(e);const 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.target,t);"function"==typeof n?r.set(t.target,n):a.unobserve(t.target)}else"function"==typeof n&&(n(t),r.delete(t.target))})},{root:n,rootMargin:i,threshold:"number"==typeof s?s:fu[s]});return o.forEach(t=>a.observe(t)),ds(()=>a.disconnect())},t.inertia=ce,t.initPrefersReducedMotion=ha,t.interpolate=ue,t.invariant=()=>{},t.invisibleValues=Lt,t.isAnimationControls=ea,t.isBezierDefinition=j,t.isCSSVariableName=K,t.isCSSVariableToken=Y,t.isControllingVariants=oa,t.isDeltaZero=er,t.isDragActive=ll,t.isDragging=al,t.isEasingArray=L,t.isElementKeyboardAccessible=sl,t.isElementTextInput=rl,t.isForcedMotionValue=ya,t.isGenerator=En,t.isHTMLElement=cs,t.isKeyframesTarget=Li,t.isMotionValue=Fi,t.isNear=Fo,t.isNodeOrChild=Al,t.isNumericalString=o,t.isObject=r,t.isPrimaryPointer=Da,t.isSVGElement=us,t.isSVGSVGElement=So,t.isSVGTag=mc,t.isTransitionDefined=Ti,t.isVariantLabel=na,t.isVariantNode=ra,t.isWaapiSupportedEasing=function t(e){return Boolean("function"==typeof e&&bn()||!e||"string"==typeof e&&(e in An||bn())||j(e)||Array.isArray(e)&&e.every(t))},t.isWillChangeMotionValue=Ii,t.isZeroValueString=a,t.keyframes=fe,t.makeAnimationInstant=jn,t.mapEasingToNativeEasing=Pn,t.mapValue=function(t,e,n,i){const s=Ll(e,n,i);return Nl(()=>s(t.get()))},t.maxGeneratorDuration=qt,t.measurePageBox=ao,t.measureViewportBox=ro,t.memo=l,t.microtask=go,t.millisecondsToSeconds=m,t.mirrorEasing=T,t.mix=Ut,t.mixArray=Ft,t.mixColor=Rt,t.mixComplex=Wt,t.mixImmediate=Et,t.mixLinearColor=Vt,t.mixNumber=kt,t.mixObject=It,t.mixValues=ko,t.mixVisibility=Bt,t.motionValue=pi,t.moveItem=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.nodeGroup=function(){const t=new Set,e=new WeakMap,n=()=>t.forEach(Sc);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}},t.noop=c,t.number=q,t.numberValueTypes=je,t.optimizedAppearDataAttribute=Ni,t.optimizedAppearDataId="framerAppearId",t.originProps=xs,t.parseAnimateLayoutArgs=Va,t.parseCSSVariable=Ei,t.parseValueFromTransform=qe,t.percent=lt,t.pipe=u,t.pixelsToPercent=cr,t.positionalKeys=Ri,t.prefersReducedMotion=la,t.press=function(t,e,n={}){e=ms(e);const[i,s,o]=Sl(t,n),r=t=>{const i=t.currentTarget;if(!kl(t))return;if(Vl.has(t))return;Pl.add(i),n.stopPropagation&&Vl.add(t);const o=e(i,t),r={...s,capture:!0},a=(t,e)=>{window.removeEventListener("pointerup",l,r),window.removeEventListener("pointercancel",c,r),Pl.has(i)&&Pl.delete(i),kl(t)&&"function"==typeof o&&o(t,{success:e})},l=t=>{a(t,i===window||i===document||n.useGlobalTarget||Al(i,t.target))},c=t=>{a(t,!1)};window.addEventListener("pointerup",l,r),window.addEventListener("pointercancel",c,r)};return i.forEach(t=>{(n.useGlobalTarget?window:t).addEventListener("pointerdown",r,s),cs(t)&&(t.addEventListener("focus",()=>((t,e)=>{let n=!1;const i=Ml(()=>{Pl.has(t)||(n=!0,El(t,"down"))}),s=Ml(()=>{n&&(n=!1,El(t,"up"))});t.addEventListener("keydown",i,e),t.addEventListener("keyup",s,e),t.addEventListener("blur",()=>{t.removeEventListener("keydown",i),t.removeEventListener("keyup",s),n&&El(t,"cancel")},{...e,once:!0})})(t,s),s),sl(t)||t.hasAttribute("tabindex")||(t.tabIndex=0))}),o},t.processFrame=(t=U.now())=>{if(I.isProcessing)return;const e=t-I.timestamp;I.delta=s.useManualTiming?e:Math.max(Math.min(e,40),1),U.set(I.timestamp=t),I.isProcessing=!0;for(const t in Yt)Yt[t].process(I);I.isProcessing=!1},t.progress=h,t.progressPercentage=dt,t.propEffect=fo,t.propagateDirtyNodes=Er,t.px=ct,t.readSVGValue=js,t.readStyleValue=bs,t.readTransformValue=_e,t.recordStats=function(){if(wo.value)throw wo.value=null,wo.addProjectionMetrics=null,new Error("Stats are already being measured");const t=wo;t.value={layoutProjection:{nodes:[],calculatedTargetDeltas:[],calculatedProjections:[]}},t.addProjectionMetrics=e=>{const{layoutProjection:n}=t.value;n.nodes.push(e.nodes),n.calculatedTargetDeltas.push(e.calculatedTargetDeltas),n.calculatedProjections.push(e.calculatedProjections)}},t.releaseElement=po,t.removeAxisDelta=Go,t.removeAxisTransforms=Yo,t.removeBoxTransforms=qo,t.removeEffect=os,t.removeItem=n,t.removePointDelta=Ko,t.renderHTML=ga,t.renderSVG=fc,t.resize=Ga,t.resolveElements=fs,t.resolveMotionValue=Ao,t.resolveTransition=mi,t.resolveVariant=Di,t.resolveVariantFromProps=Vi,t.reverseEasing=b,t.rgbUnit=nt,t.rgba=it,t.rootProjectionNode=Jr,t.round=Me,t.sampleDelta=Rn,t.scale=Z,t.scaleCorrectors=xo,t.scalePoint=qs,t.scopeMotion=function(...t){const e="function"==typeof t[0]?void 0:t.shift(),[i,s={}]=t,{transition:o,matchMedia:r}=s,a=[],l=new Map;let c=[],u=!1;const h={root:fs(e)[0],transition:o,add:t=>(c.push(t),()=>n(c,t)),bind:t=>(...e)=>{const n=y.run(()=>t(...e));return"function"==typeof n?h.bind(n):n},track(t){l.has(t)||l.set(t,t.getAttribute("style"))}},d=t=>{const e=c;c=[];for(let t=e.length-1;t>=0;t--)e[t]();t&&l.forEach((t,e)=>{po(e),null===t?e.removeAttribute("style"):e.setAttribute("style",t)}),l.clear()},p=()=>{y.state="active";let t=!a.length;y.media={};for(const[e,n]of a)t=(y.media[e]=n.matches)||t;if(t&&i){const t=y.run(()=>i(y));"function"==typeof t&&h.add(t)}},m=()=>{u||(u=!0,queueMicrotask(()=>{u=!1,a.length&&y.refresh()}))},f=t=>{y.state=t?"cancelled":"stopped";for(const[,t]of a)t.removeEventListener("change",m);a.length=0,d(t)},g=(t,e)=>{const n=hs.current;hs.current=t;try{return e()}finally{hs.current=n}},y={state:"active",media:{},run:t=>g(h,t),ignore:t=>g(void 0,t),bind:h.bind,stop:()=>f(),cancel:()=>f(!0),refresh(){d(!0),p()}};if(r&&"undefined"!=typeof window){const t="string"==typeof r?{matches:r}:r;for(const e in t){const n=window.matchMedia(Rl(t[e]));n.addEventListener("change",m),a.push([e,n])}}return ds(y.cancel),p(),y},t.scrapeHTMLMotionValuesFromProps=va,t.scrapeSVGMotionValuesFromProps=gc,t.scroll=function(t,{axis:e="y",source:n,container:i=document.scrollingElement,...s}={}){if(!i)return c;const o={axis:e,container:n||i,...s};if("function"==typeof t){const n=ms(t);return ds(uu(t=>n(t[e].progress,t),o))}return ds(mu(t,o))},t.scrollInfo=uu,t.secondsToMilliseconds=p,t.setDragLock=cl,t.setFeatureDefinitions=function(t){pa=t},t.setStyle=yn,t.setTarget=Oi,t.spring=le,t.springValue=function(t,e){const n=pi(Fi(t)?t.get():t);return Ul(n,t,e),n},t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:i,grid:s}={}){const o={};return(r,a)=>{let l=o[a];if(!l){const[t,e]=s||[1/0,1],i=Math.min(t,a)-1,r=Math.max(e,Math.ceil(a/t))-1,c="number"==typeof n,u="first"===n?0:"last"===n?1:.5,h=c?n%t:i*u,d=c?Math.floor(n/t):r*u;l=o[a]=[];for(let e=0;e<a;e++){const s=e%t,o=Math.floor(e/t),a=Math.min(s,i-s),c=Math.min(o,r-o);if("random"===n){const t=Math.random()*(e+1)|0;l[e]=l[t],l[t]=e}else l[e]="edges"===n?Math.min(i?a:c,r?c:a):Math.hypot(s-h,o-d)}l.push(s?Math.max(...l):a)}let c=t*l[r];const u=t*l[a];if(i&&u){c=F(i)(c/u)*u}return e+c}},t.startWaapiAnimation=Mn,t.statsBuffer=wo,t.steps=function(t,e="end"){return n=>{const s=(n="end"===e?Math.min(n,.999):Math.max(n,.001))*t,o="end"===e?Math.floor(s):Math.ceil(s);return i(0,1,o/t)}},t.styleEffect=As,t.styleSubjectEffect=Ss,t.supportedWaapiEasing=An,t.supportsBrowserAnimation=Nn,t.supportsFlags=vn,t.supportsLinearEasing=bn,t.supportsPartialKeyframes=ns,t.supportsScrollTimeline=wn,t.supportsViewTimeline=Tn,t.supportsWaapi=Wn,t.svgEffect=Fs,t.svgSubjectEffect=Os,t.sync=Ac,t.testValueType=Xi,t.time=U,t.toMediaQuery=Rl,t.transform=Ll,t.transformAxis=io,t.transformBox=oo,t.transformBoxPoints=Us,t.transformPropOrder=Ze,t.transformProps=Je,t.transformValue=Nl,t.transformValueTypes=Be,t.translateAxis=no,t.updateMotionValuesFromProps=aa,t.variantPriorityOrder=ia,t.variantProps=sa,t.velocityPerSecond=f,t.vh=ut,t.visualElementStore=ta,t.vw=ht,t.warnOnce=y,t.warning=()=>{},t.wrap=v});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "motion",
|
|
3
|
-
"version": "14.7.
|
|
3
|
+
"version": "14.7.1",
|
|
4
4
|
"description": "An animation library for JavaScript and React.",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/es/index.mjs",
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"postpublish": "git push --tags"
|
|
97
97
|
},
|
|
98
98
|
"dependencies": {
|
|
99
|
-
"framer-motion": "14.7.
|
|
99
|
+
"framer-motion": "14.7.1",
|
|
100
100
|
"tslib": "^2.4.0"
|
|
101
101
|
},
|
|
102
102
|
"peerDependencies": {
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
"optional": true
|
|
112
112
|
}
|
|
113
113
|
},
|
|
114
|
-
"gitHead": "
|
|
114
|
+
"gitHead": "9ba8846b6819172cb829e65a9f46433a4de377ab",
|
|
115
115
|
"devDependencies": {
|
|
116
116
|
"concurrently": "^7.3.0",
|
|
117
117
|
"jest": "^29.7.0",
|