mainstack-design-system 1.14.1 → 1.14.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/MotionConfigContext-CY9MWLbl.cjs +2 -0
- package/dist/MotionConfigContext-SYEZVO_k.js +18 -0
- package/dist/assets/styles.css +1 -1
- package/dist/index.d.ts +30 -5
- package/dist/mainstack-design-system.cjs +1 -1
- package/dist/mainstack-design-system.js +333 -331
- package/dist/mainstack-design-system18.cjs +1 -1
- package/dist/mainstack-design-system18.js +1 -1
- package/dist/mainstack-design-system19.cjs +1 -1
- package/dist/mainstack-design-system19.js +1 -1
- package/dist/mainstack-design-system24.cjs +1 -1
- package/dist/mainstack-design-system24.js +1 -1
- package/dist/mainstack-design-system34.cjs +1 -1
- package/dist/mainstack-design-system34.js +1 -1
- package/dist/mainstack-design-system368.cjs +1 -1
- package/dist/mainstack-design-system368.js +13 -11
- package/dist/mainstack-design-system371.cjs +1 -1
- package/dist/mainstack-design-system371.js +2 -2
- package/dist/mainstack-design-system377.cjs +1 -1
- package/dist/mainstack-design-system377.js +2 -2
- package/dist/mainstack-design-system474.cjs +1 -1
- package/dist/mainstack-design-system474.js +40 -7
- package/dist/mainstack-design-system476.cjs +1 -1
- package/dist/mainstack-design-system476.js +46 -13
- package/dist/mainstack-design-system477.cjs +1 -1
- package/dist/mainstack-design-system477.js +59 -13
- package/dist/mainstack-design-system517.cjs +1 -1
- package/dist/mainstack-design-system517.js +2 -2
- package/dist/mainstack-design-system567.cjs +1 -1
- package/dist/mainstack-design-system567.js +1 -1
- package/dist/mainstack-design-system599.cjs +1 -1
- package/dist/mainstack-design-system599.js +8 -6
- package/dist/mainstack-design-system600.cjs +1 -1
- package/dist/mainstack-design-system600.js +12 -16
- package/dist/mainstack-design-system616.cjs +1 -1
- package/dist/mainstack-design-system616.js +2 -2
- package/dist/mainstack-design-system619.cjs +10 -5
- package/dist/mainstack-design-system619.js +158 -2143
- package/dist/mainstack-design-system620.cjs +5 -10
- package/dist/mainstack-design-system620.js +2143 -166
- package/dist/mainstack-design-system621.cjs +1 -41
- package/dist/mainstack-design-system621.js +387 -23677
- package/dist/mainstack-design-system622.cjs +41 -3
- package/dist/mainstack-design-system622.js +23491 -7196
- package/dist/mainstack-design-system623.cjs +3 -1
- package/dist/mainstack-design-system623.js +7193 -2605
- package/dist/mainstack-design-system624.cjs +2 -1
- package/dist/mainstack-design-system624.js +2195 -58
- package/dist/mainstack-design-system625.cjs +1 -1
- package/dist/mainstack-design-system625.js +61 -1
- package/dist/mainstack-design-system626.cjs +1 -1
- package/dist/mainstack-design-system626.js +1 -24
- package/dist/mainstack-design-system627.cjs +1 -1
- package/dist/mainstack-design-system627.js +22 -11
- package/dist/mainstack-design-system628.cjs +1 -0
- package/dist/mainstack-design-system628.js +13 -0
- package/dist/single-value-DEX77ciI.js +2561 -0
- package/dist/single-value-U71henX8.cjs +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const $t=require("./use-presence-DO2ahDUQ.cjs");function Lt(e,t){e.indexOf(t)===-1&&e.push(t)}function _t(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const I=(e,t,n)=>n>t?t:n<e?e:n;function Ve(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}exports.warning=()=>{};exports.invariant=()=>{};process.env.NODE_ENV!=="production"&&(exports.warning=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(Ve(t,n))},exports.invariant=(e,t,n)=>{if(!e)throw new Error(Ve(t,n))});const k={},Wt=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Gt=e=>/^0[^.\s]+$/u.test(e);function $e(e){let t;return()=>(t===void 0&&(t=e()),t)}const G=e=>e,is=(e,t)=>n=>t(e(n)),pe=(...e)=>e.reduce(is),Le=(e,t,n)=>{const s=t-e;return s===0?1:(n-e)/s};class _e{constructor(){this.subscriptions=[]}add(t){return Lt(this.subscriptions,t),()=>_t(this.subscriptions,t)}notify(t,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,s);else for(let r=0;r<i;r++){const a=this.subscriptions[r];a&&a(t,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const R=e=>e*1e3,P=e=>e/1e3;function Ut(e,t){return t?e*(1e3/t):0}const ft=new Set;function We(e,t,n){e||ft.has(t)||(console.warn(Ve(t,n)),ft.add(t))}const jt=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,rs=1e-7,as=12;function os(e,t,n,s,i){let r,a,o=0;do a=t+(n-t)/2,r=jt(a,s,i)-e,r>0?n=a:t=a;while(Math.abs(r)>rs&&++o<as);return a}function ie(e,t,n,s){if(e===t&&n===s)return G;const i=r=>os(r,0,1,e,n);return r=>r===0||r===1?r:jt(i(r),t,s)}const Yt=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Xt=e=>t=>1-e(1-t),zt=ie(.33,1.53,.69,.99),Ge=Xt(zt),qt=Yt(Ge),Ht=e=>(e*=2)<1?.5*Ge(e):.5*(2-Math.pow(2,-10*(e-1))),Ue=e=>1-Math.sin(Math.acos(e)),Zt=Xt(Ue),Jt=Yt(Ue),ls=ie(.42,0,1,1),us=ie(0,0,.58,1),Qt=ie(.42,0,.58,1),en=e=>Array.isArray(e)&&typeof e[0]!="number",tn=e=>Array.isArray(e)&&typeof e[0]=="number",ht={linear:G,easeIn:ls,easeInOut:Qt,easeOut:us,circIn:Ue,circInOut:Jt,circOut:Zt,backIn:Ge,backInOut:qt,backOut:zt,anticipate:Ht},cs=e=>typeof e=="string",dt=e=>{if(tn(e)){exports.invariant(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,s,i]=e;return ie(t,n,s,i)}else if(cs(e))return exports.invariant(ht[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),ht[e];return e},ae=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function fs(e,t){let n=new Set,s=new Set,i=!1,r=!1;const a=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function u(l){a.has(l)&&(c.schedule(l),e()),l(o)}const c={schedule:(l,f=!1,h=!1)=>{const T=h&&i?n:s;return f&&a.add(l),T.has(l)||T.add(l),l},cancel:l=>{s.delete(l),a.delete(l)},process:l=>{if(o=l,i){r=!0;return}i=!0,[n,s]=[s,n],n.forEach(u),n.clear(),i=!1,r&&(r=!1,c.process(l))}};return c}const hs=40;function nn(e,t){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,a=ae.reduce((V,M)=>(V[M]=fs(r),V),{}),{setup:o,read:u,resolveKeyframes:c,preUpdate:l,update:f,preRender:h,render:g,postRender:T}=a,y=()=>{const V=k.useManualTiming?i.timestamp:performance.now();n=!1,k.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(V-i.timestamp,hs),1)),i.timestamp=V,i.isProcessing=!0,o.process(i),u.process(i),c.process(i),l.process(i),f.process(i),h.process(i),g.process(i),T.process(i),i.isProcessing=!1,n&&t&&(s=!1,e(y))},v=()=>{n=!0,s=!0,i.isProcessing||e(y)};return{schedule:ae.reduce((V,M)=>{const p=a[M];return V[M]=(w,A=!1,m=!1)=>(n||v(),p.schedule(w,A,m)),V},{}),cancel:V=>{for(let M=0;M<ae.length;M++)a[ae[M]].cancel(V)},state:i,steps:a}}const{schedule:O,cancel:ue,state:ee,steps:ds}=nn(typeof requestAnimationFrame<"u"?requestAnimationFrame:G,!0);let le;function ps(){le=void 0}const D={now:()=>(le===void 0&&D.set(ee.isProcessing||k.useManualTiming?ee.timestamp:performance.now()),le),set:e=>{le=e,queueMicrotask(ps)}},sn=e=>t=>typeof t=="string"&&t.startsWith(e),je=sn("--"),ms=sn("var(--"),Ye=e=>ms(e)?gs.test(e.split("/*")[0].trim()):!1,gs=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,z={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},te={...z,transform:e=>I(0,1,e)},oe={...z,default:1},Q=e=>Math.round(e*1e5)/1e5,Xe=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function ys(e){return e==null}const Ts=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ze=(e,t)=>n=>!!(typeof n=="string"&&Ts.test(n)&&n.startsWith(e)||t&&!ys(n)&&Object.prototype.hasOwnProperty.call(n,t)),rn=(e,t,n)=>s=>{if(typeof s!="string")return s;const[i,r,a,o]=s.match(Xe);return{[e]:parseFloat(i),[t]:parseFloat(r),[n]:parseFloat(a),alpha:o!==void 0?parseFloat(o):1}},bs=e=>I(0,255,e),me={...z,transform:e=>Math.round(bs(e))},K={test:ze("rgb","red"),parse:rn("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:s=1})=>"rgba("+me.transform(e)+", "+me.transform(t)+", "+me.transform(n)+", "+Q(te.transform(s))+")"};function Vs(e){let t="",n="",s="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),s=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),s=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,s+=s,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const ve={test:ze("#"),parse:Vs,transform:K.transform},re=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),N=re("deg"),L=re("%"),d=re("px"),vs=re("vh"),xs=re("vw"),pt={...L,parse:e=>L.parse(e)/100,transform:e=>L.transform(e*100)},j={test:ze("hsl","hue"),parse:rn("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:s=1})=>"hsla("+Math.round(e)+", "+L.transform(Q(t))+", "+L.transform(Q(n))+", "+Q(te.transform(s))+")"},S={test:e=>K.test(e)||ve.test(e)||j.test(e),parse:e=>K.test(e)?K.parse(e):j.test(e)?j.parse(e):ve.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?K.transform(e):j.transform(e),getAnimatableNone:e=>{const t=S.parse(e);return t.alpha=0,S.transform(t)}},ws=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Ss(e){return isNaN(e)&&typeof e=="string"&&(e.match(Xe)?.length||0)+(e.match(ws)?.length||0)>0}const an="number",on="color",Ms="var",As="var(",mt="${}",Cs=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ne(e){const t=e.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const o=t.replace(Cs,u=>(S.test(u)?(s.color.push(r),i.push(on),n.push(S.parse(u))):u.startsWith(As)?(s.var.push(r),i.push(Ms),n.push(u)):(s.number.push(r),i.push(an),n.push(parseFloat(u))),++r,mt)).split(mt);return{values:n,split:o,indexes:s,types:i}}function ln(e){return ne(e).values}function un(e){const{split:t,types:n}=ne(e),s=t.length;return i=>{let r="";for(let a=0;a<s;a++)if(r+=t[a],i[a]!==void 0){const o=n[a];o===an?r+=Q(i[a]):o===on?r+=S.transform(i[a]):r+=i[a]}return r}}const Ds=e=>typeof e=="number"?0:S.test(e)?S.getAnimatableNone(e):e;function Fs(e){const t=ln(e);return un(e)(t.map(Ds))}const U={test:Ss,parse:ln,createTransformer:un,getAnimatableNone:Fs};function ge(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Ps({hue:e,saturation:t,lightness:n,alpha:s}){e/=360,t/=100,n/=100;let i=0,r=0,a=0;if(!t)i=r=a=n;else{const o=n<.5?n*(1+t):n+t-n*t,u=2*n-o;i=ge(u,o,e+1/3),r=ge(u,o,e),a=ge(u,o,e-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(a*255),alpha:s}}function ce(e,t){return n=>n>0?t:e}const q=(e,t,n)=>e+(t-e)*n,ye=(e,t,n)=>{const s=e*e,i=n*(t*t-s)+s;return i<0?0:Math.sqrt(i)},Es=[ve,K,j],Rs=e=>Es.find(t=>t.test(e));function gt(e){const t=Rs(e);if(exports.warning(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===j&&(n=Ps(n)),n}const yt=(e,t)=>{const n=gt(e),s=gt(t);if(!n||!s)return ce(e,t);const i={...n};return r=>(i.red=ye(n.red,s.red,r),i.green=ye(n.green,s.green,r),i.blue=ye(n.blue,s.blue,r),i.alpha=q(n.alpha,s.alpha,r),K.transform(i))},xe=new Set(["none","hidden"]);function Os(e,t){return xe.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Bs(e,t){return n=>q(e,t,n)}function qe(e){return typeof e=="number"?Bs:typeof e=="string"?Ye(e)?ce:S.test(e)?yt:Is:Array.isArray(e)?cn:typeof e=="object"?S.test(e)?yt:ks:ce}function cn(e,t){const n=[...e],s=n.length,i=e.map((r,a)=>qe(r)(r,t[a]));return r=>{for(let a=0;a<s;a++)n[a]=i[a](r);return n}}function ks(e,t){const n={...e,...t},s={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(s[i]=qe(e[i])(e[i],t[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}}function Ns(e,t){const n=[],s={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const r=t.types[i],a=e.indexes[r][s[r]],o=e.values[a]??0;n[i]=o,s[r]++}return n}const Is=(e,t)=>{const n=U.createTransformer(t),s=ne(e),i=ne(t);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?xe.has(e)&&!i.values.length||xe.has(t)&&!s.values.length?Os(e,t):pe(cn(Ns(s,i),i.values),n):(exports.warning(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),ce(e,t))};function fn(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?q(e,t,n):qe(e)(e,t)}const Ks=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>O.update(t,n),stop:()=>ue(t),now:()=>ee.isProcessing?ee.timestamp:D.now()}},hn=(e,t,n=10)=>{let s="";const i=Math.max(Math.round(t/n),2);for(let r=0;r<i;r++)s+=Math.round(e(r/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},fe=2e4;function He(e){let t=0;const n=50;let s=e.next(t);for(;!s.done&&t<fe;)t+=n,s=e.next(t);return t>=fe?1/0:t}function dn(e,t=100,n){const s=n({...e,keyframes:[0,t]}),i=Math.min(He(s),fe);return{type:"keyframes",ease:r=>s.next(i*r).value/t,duration:P(i)}}const $s=5;function pn(e,t,n){const s=Math.max(t-$s,0);return Ut(n-e(s),t-s)}const b={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Te=.001;function Ls({duration:e=b.duration,bounce:t=b.bounce,velocity:n=b.velocity,mass:s=b.mass}){let i,r;exports.warning(e<=R(b.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let a=1-t;a=I(b.minDamping,b.maxDamping,a),e=I(b.minDuration,b.maxDuration,P(e)),a<1?(i=c=>{const l=c*a,f=l*e,h=l-n,g=we(c,a),T=Math.exp(-f);return Te-h/g*T},r=c=>{const f=c*a*e,h=f*n+n,g=Math.pow(a,2)*Math.pow(c,2)*e,T=Math.exp(-f),y=we(Math.pow(c,2),a);return(-i(c)+Te>0?-1:1)*((h-g)*T)/y}):(i=c=>{const l=Math.exp(-c*e),f=(c-n)*e+1;return-Te+l*f},r=c=>{const l=Math.exp(-c*e),f=(n-c)*(e*e);return l*f});const o=5/e,u=Ws(i,r,o);if(e=R(e),isNaN(u))return{stiffness:b.stiffness,damping:b.damping,duration:e};{const c=Math.pow(u,2)*s;return{stiffness:c,damping:a*2*Math.sqrt(s*c),duration:e}}}const _s=12;function Ws(e,t,n){let s=n;for(let i=1;i<_s;i++)s=s-e(s)/t(s);return s}function we(e,t){return e*Math.sqrt(1-t*t)}const Gs=["duration","bounce"],Us=["stiffness","damping","mass"];function Tt(e,t){return t.some(n=>e[n]!==void 0)}function js(e){let t={velocity:b.velocity,stiffness:b.stiffness,damping:b.damping,mass:b.mass,isResolvedFromDuration:!1,...e};if(!Tt(e,Us)&&Tt(e,Gs))if(e.visualDuration){const n=e.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,r=2*I(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:b.mass,stiffness:i,damping:r}}else{const n=Ls(e);t={...t,...n,mass:b.mass},t.isResolvedFromDuration=!0}return t}function se(e=b.visualDuration,t=b.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:s,restDelta:i}=n;const r=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],o={done:!1,value:r},{stiffness:u,damping:c,mass:l,duration:f,velocity:h,isResolvedFromDuration:g}=js({...n,velocity:-P(n.velocity||0)}),T=h||0,y=c/(2*Math.sqrt(u*l)),v=a-r,x=P(Math.sqrt(u/l)),F=Math.abs(v)<5;s||(s=F?b.restSpeed.granular:b.restSpeed.default),i||(i=F?b.restDelta.granular:b.restDelta.default);let V;if(y<1){const p=we(x,y);V=w=>{const A=Math.exp(-y*x*w);return a-A*((T+y*x*v)/p*Math.sin(p*w)+v*Math.cos(p*w))}}else if(y===1)V=p=>a-Math.exp(-x*p)*(v+(T+x*v)*p);else{const p=x*Math.sqrt(y*y-1);V=w=>{const A=Math.exp(-y*x*w),m=Math.min(p*w,300);return a-A*((T+y*x*v)*Math.sinh(m)+p*v*Math.cosh(m))/p}}const M={calculatedDuration:g&&f||null,next:p=>{const w=V(p);if(g)o.done=p>=f;else{let A=p===0?T:0;y<1&&(A=p===0?R(T):pn(V,p,w));const m=Math.abs(A)<=s,E=Math.abs(a-w)<=i;o.done=m&&E}return o.value=o.done?a:w,o},toString:()=>{const p=Math.min(He(M),fe),w=hn(A=>M.next(p*A).value,p,30);return p+"ms "+w},toTransition:()=>{}};return M}se.applyToOptions=e=>{const t=dn(e,100,se);return e.ease=t.ease,e.duration=R(t.duration),e.type="keyframes",e};function Se({keyframes:e,velocity:t=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:a,min:o,max:u,restDelta:c=.5,restSpeed:l}){const f=e[0],h={done:!1,value:f},g=m=>o!==void 0&&m<o||u!==void 0&&m>u,T=m=>o===void 0?u:u===void 0||Math.abs(o-m)<Math.abs(u-m)?o:u;let y=n*t;const v=f+y,x=a===void 0?v:a(v);x!==v&&(y=x-f);const F=m=>-y*Math.exp(-m/s),V=m=>x+F(m),M=m=>{const E=F(m),B=V(m);h.done=Math.abs(E)<=c,h.value=h.done?x:B};let p,w;const A=m=>{g(h.value)&&(p=m,w=se({keyframes:[h.value,T(h.value)],velocity:pn(V,m,h.value),damping:i,stiffness:r,restDelta:c,restSpeed:l}))};return A(0),{calculatedDuration:null,next:m=>{let E=!1;return!w&&p===void 0&&(E=!0,M(m),A(m)),p!==void 0&&m>=p?w.next(m-p):(!E&&M(m),h)}}}function Ys(e,t,n){const s=[],i=n||k.mix||fn,r=e.length-1;for(let a=0;a<r;a++){let o=i(e[a],e[a+1]);if(t){const u=Array.isArray(t)?t[a]||G:t;o=pe(u,o)}s.push(o)}return s}function Xs(e,t,{clamp:n=!0,ease:s,mixer:i}={}){const r=e.length;if(exports.invariant(r===t.length,"Both input and output ranges must be the same length","range-length"),r===1)return()=>t[0];if(r===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[r-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=Ys(t,s,i),u=o.length,c=l=>{if(a&&l<e[0])return t[0];let f=0;if(u>1)for(;f<e.length-2&&!(l<e[f+1]);f++);const h=Le(e[f],e[f+1],l);return o[f](h)};return n?l=>c(I(e[0],e[r-1],l)):c}function mn(e,t){const n=e[e.length-1];for(let s=1;s<=t;s++){const i=Le(0,t,s);e.push(q(n,1,i))}}function gn(e){const t=[0];return mn(t,e.length-1),t}function zs(e,t){return e.map(n=>n*t)}function qs(e,t){return e.map(()=>t||Qt).splice(0,e.length-1)}function Y({duration:e=300,keyframes:t,times:n,ease:s="easeInOut"}){const i=en(s)?s.map(dt):dt(s),r={done:!1,value:t[0]},a=zs(n&&n.length===t.length?n:gn(t),e),o=Xs(a,t,{ease:Array.isArray(i)?i:qs(t,i)});return{calculatedDuration:e,next:u=>(r.value=o(u),r.done=u>=e,r)}}const Hs=e=>e!==null;function Ze(e,{repeat:t,repeatType:n="loop"},s,i=1){const r=e.filter(Hs),o=i<0||t&&n!=="loop"&&t%2===1?0:r.length-1;return!o||s===void 0?r[o]:s}const Zs={decay:Se,inertia:Se,tween:Y,keyframes:Y,spring:se};function yn(e){typeof e.type=="string"&&(e.type=Zs[e.type])}class Je{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const Js=e=>e/100;class Qe extends Je{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==D.now()&&this.tick(D.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;yn(t);const{type:n=Y,repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:a=0}=t;let{keyframes:o}=t;const u=n||Y;process.env.NODE_ENV!=="production"&&u!==Y&&exports.invariant(o.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`,"spring-two-frames"),u!==Y&&typeof o[0]!="number"&&(this.mixKeyframes=pe(Js,fn(o[0],o[1])),o=[0,100]);const c=u({...t,keyframes:o});r==="mirror"&&(this.mirroredGenerator=u({...t,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=He(c));const{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=c}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:s,totalDuration:i,mixKeyframes:r,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:u}=this;if(this.startTime===null)return s.next(0);const{delay:c=0,keyframes:l,repeat:f,repeatType:h,repeatDelay:g,type:T,onUpdate:y,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const x=this.currentTime-c*(this.playbackSpeed>=0?1:-1),F=this.playbackSpeed>=0?x<0:x>i;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let V=this.currentTime,M=s;if(f){const m=Math.min(this.currentTime,i)/o;let E=Math.floor(m),B=m%1;!B&&m>=1&&(B=1),B===1&&E--,E=Math.min(E,f+1),!!(E%2)&&(h==="reverse"?(B=1-B,g&&(B-=g/o)):h==="mirror"&&(M=a)),V=I(0,1,B)*o}const p=F?{done:!1,value:l[0]}:M.next(V);r&&(p.value=r(p.value));let{done:w}=p;!F&&u!==null&&(w=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const A=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&w);return A&&T!==Se&&(p.value=Ze(l,this.options,v,this.speed)),y&&y(p.value),A&&this.finish(),p}then(t,n){return this.finished.then(t,n)}get duration(){return P(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+P(t)}get time(){return P(this.currentTime)}set time(t){t=R(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(D.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=P(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Ks,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),this.options.onPlay?.();const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(D.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&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.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}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)}}function Qs(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const $=e=>e*180/Math.PI,Me=e=>{const t=$(Math.atan2(e[1],e[0]));return Ae(t)},ei={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Me,rotateZ:Me,skewX:e=>$(Math.atan(e[1])),skewY:e=>$(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Ae=e=>(e=e%360,e<0&&(e+=360),e),bt=Me,Vt=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),vt=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),ti={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Vt,scaleY:vt,scale:e=>(Vt(e)+vt(e))/2,rotateX:e=>Ae($(Math.atan2(e[6],e[5]))),rotateY:e=>Ae($(Math.atan2(-e[2],e[0]))),rotateZ:bt,rotate:bt,skewX:e=>$(Math.atan(e[4])),skewY:e=>$(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Ce(e){return e.includes("scale")?1:0}function De(e,t){if(!e||e==="none")return Ce(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=ti,i=n;else{const o=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=ei,i=o}if(!i)return Ce(t);const r=s[t],a=i[1].split(",").map(si);return typeof r=="function"?r(a):a[r]}const ni=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return De(n,t)};function si(e){return parseFloat(e.trim())}const H=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Z=new Set(H),xt=e=>e===z||e===d,ii=new Set(["x","y","z"]),ri=H.filter(e=>!ii.has(e));function ai(e){const t=[];return ri.forEach(n=>{const s=e.getValue(n);s!==void 0&&(t.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),t}const _={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>De(t,"x"),y:(e,{transform:t})=>De(t,"y")};_.translateX=_.x;_.translateY=_.y;const W=new Set;let Fe=!1,Pe=!1,Ee=!1;function Tn(){if(Pe){const e=Array.from(W).filter(s=>s.needsMeasurement),t=new Set(e.map(s=>s.element)),n=new Map;t.forEach(s=>{const i=ai(s);i.length&&(n.set(s,i),s.render())}),e.forEach(s=>s.measureInitialState()),t.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([r,a])=>{s.getValue(r)?.set(a)})}),e.forEach(s=>s.measureEndState()),e.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Pe=!1,Fe=!1,W.forEach(e=>e.complete(Ee)),W.clear()}function bn(){W.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Pe=!0)})}function oi(){Ee=!0,bn(),Tn(),Ee=!1}class et{constructor(t,n,s,i,r,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=s,this.motionValue=i,this.element=r,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(W.add(this),Fe||(Fe=!0,O.read(bn),O.resolveKeyframes(Tn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:s,motionValue:i}=this;if(t[0]===null){const r=i?.get(),a=t[t.length-1];if(r!==void 0)t[0]=r;else if(s&&n){const o=s.readValue(n,a);o!=null&&(t[0]=o)}t[0]===void 0&&(t[0]=a),i&&r===void 0&&i.set(t[0])}Qs(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),W.delete(this)}cancel(){this.state==="scheduled"&&(W.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const li=e=>e.startsWith("--");function ui(e,t,n){li(t)?e.style.setProperty(t,n):e.style[t]=n}const ci=$e(()=>window.ScrollTimeline!==void 0),fi={};function hi(e,t){const n=$e(e);return()=>fi[t]??n()}const Vn=hi(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),J=([e,t,n,s])=>`cubic-bezier(${e}, ${t}, ${n}, ${s})`,wt={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:J([0,.65,.55,1]),circOut:J([.55,0,1,.45]),backIn:J([.31,.01,.66,-.59]),backOut:J([.33,1.53,.69,.99])};function vn(e,t){if(e)return typeof e=="function"?Vn()?hn(e,t):"ease-out":tn(e)?J(e):Array.isArray(e)?e.map(n=>vn(n,t)||wt.easeOut):wt[e]}function di(e,t,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:a="loop",ease:o="easeOut",times:u}={},c=void 0){const l={[t]:n};u&&(l.offset=u);const f=vn(o,i);Array.isArray(f)&&(l.easing=f);const h={delay:s,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:r+1,direction:a==="reverse"?"alternate":"normal"};return c&&(h.pseudoElement=c),e.animate(l,h)}function tt(e){return typeof e=="function"&&"applyToOptions"in e}function pi({type:e,...t}){return tt(e)&&Vn()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class mi extends Je{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:s,keyframes:i,pseudoElement:r,allowFlatten:a=!1,finalKeyframe:o,onComplete:u}=t;this.isPseudoElement=!!r,this.allowFlatten=a,this.options=t,exports.invariant(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=pi(t);this.animation=di(n,s,i,c,r),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const l=Ze(i,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(l):ui(n,s,l),this.animation.cancel()}u?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return P(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+P(t)}get time(){return P(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=R(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&ci()?(this.animation.timeline=t,G):n(this)}}const xn={anticipate:Ht,backInOut:qt,circInOut:Jt};function gi(e){return e in xn}function yi(e){typeof e.ease=="string"&&gi(e.ease)&&(e.ease=xn[e.ease])}const St=10;class Ti extends mi{constructor(t){yi(t),yn(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:s,onComplete:i,element:r,...a}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const o=new Qe({...a,autoplay:!1}),u=R(this.finishedTime??this.time);n.setWithVelocity(o.sample(u-St).value,o.sample(u).value,St),o.stop()}}const Mt=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(U.test(e)||e==="0")&&!e.startsWith("url("));function bi(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Vi(e,t,n,s){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const r=e[e.length-1],a=Mt(i,t),o=Mt(r,t);return exports.warning(a===o,`You are trying to animate ${t} from "${i}" to "${r}". "${a?r:i}" is not an animatable value.`,"value-not-animatable"),!a||!o?!1:bi(e)||(n==="spring"||tt(n))&&s}function Re(e){e.duration=0,e.type="keyframes"}const vi=new Set(["opacity","clipPath","filter","transform"]),xi=$e(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function wi(e){const{motionValue:t,name:n,repeatDelay:s,repeatType:i,damping:r,type:a}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:c}=t.owner.getProps();return xi()&&n&&vi.has(n)&&(n!=="transform"||!c)&&!u&&!s&&i!=="mirror"&&r!==0&&a!=="inertia"}const Si=40;class Mi extends Je{constructor({autoplay:t=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:a="loop",keyframes:o,name:u,motionValue:c,element:l,...f}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=D.now();const h={autoplay:t,delay:n,type:s,repeat:i,repeatDelay:r,repeatType:a,name:u,motionValue:c,element:l,...f},g=l?.KeyframeResolver||et;this.keyframeResolver=new g(o,(T,y,v)=>this.onKeyframesResolved(T,y,h,!v),u,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,s,i){this.keyframeResolver=void 0;const{name:r,type:a,velocity:o,delay:u,isHandoff:c,onUpdate:l}=s;this.resolvedAt=D.now(),Vi(t,r,a,o)||((k.instantAnimations||!u)&&l?.(Ze(t,s,n)),t[0]=t[t.length-1],Re(s),s.repeat=0);const h={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Si?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:t},g=!c&&wi(h)?new Ti({...h,element:h.motionValue.owner.current}):new Qe(h);g.finished.then(()=>this.notifyFinished()).catch(G),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),oi()),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&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const Ai=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ci(e){const t=Ai.exec(e);if(!t)return[,];const[,n,s,i]=t;return[`--${n??s}`,i]}const Di=4;function wn(e,t,n=1){exports.invariant(n<=Di,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,i]=Ci(e);if(!s)return;const r=window.getComputedStyle(t).getPropertyValue(s);if(r){const a=r.trim();return Wt(a)?parseFloat(a):a}return Ye(i)?wn(i,t,n+1):i}function nt(e,t){return e?.[t]??e?.default??e}const Sn=new Set(["width","height","top","left","right","bottom",...H]),Fi={test:e=>e==="auto",parse:e=>e},Mn=e=>t=>t.test(e),An=[z,d,L,N,xs,vs,Fi],At=e=>An.find(Mn(e));function Pi(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Gt(e):!0}const Ei=new Set(["brightness","contrast","saturate","opacity"]);function Ri(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[s]=n.match(Xe)||[];if(!s)return e;const i=n.replace(s,"");let r=Ei.has(t)?1:0;return s!==n&&(r*=100),t+"("+r+i+")"}const Oi=/\b([a-z-]*)\(.*?\)/gu,Oe={...U,getAnimatableNone:e=>{const t=e.match(Oi);return t?t.map(Ri).join(" "):e}},Ct={...z,transform:Math.round},Bi={rotate:N,rotateX:N,rotateY:N,rotateZ:N,scale:oe,scaleX:oe,scaleY:oe,scaleZ:oe,skew:N,skewX:N,skewY:N,distance:d,translateX:d,translateY:d,translateZ:d,x:d,y:d,z:d,perspective:d,transformPerspective:d,opacity:te,originX:pt,originY:pt,originZ:d},st={borderWidth:d,borderTopWidth:d,borderRightWidth:d,borderBottomWidth:d,borderLeftWidth:d,borderRadius:d,radius:d,borderTopLeftRadius:d,borderTopRightRadius:d,borderBottomRightRadius:d,borderBottomLeftRadius:d,width:d,maxWidth:d,height:d,maxHeight:d,top:d,right:d,bottom:d,left:d,padding:d,paddingTop:d,paddingRight:d,paddingBottom:d,paddingLeft:d,margin:d,marginTop:d,marginRight:d,marginBottom:d,marginLeft:d,backgroundPositionX:d,backgroundPositionY:d,...Bi,zIndex:Ct,fillOpacity:te,strokeOpacity:te,numOctaves:Ct},ki={...st,color:S,backgroundColor:S,outlineColor:S,fill:S,stroke:S,borderColor:S,borderTopColor:S,borderRightColor:S,borderBottomColor:S,borderLeftColor:S,filter:Oe,WebkitFilter:Oe},Cn=e=>ki[e];function Dn(e,t){let n=Cn(e);return n!==Oe&&(n=U),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Ni=new Set(["auto","none","0"]);function Ii(e,t,n){let s=0,i;for(;s<e.length&&!i;){const r=e[s];typeof r=="string"&&!Ni.has(r)&&ne(r).values.length&&(i=e[s]),s++}if(i&&n)for(const r of t)e[r]=Dn(n,i)}class Ki extends et{constructor(t,n,s,i,r){super(t,n,s,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let c=t[u];if(typeof c=="string"&&(c=c.trim(),Ye(c))){const l=wn(c,n.current);l!==void 0&&(t[u]=l),u===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!Sn.has(s)||t.length!==2)return;const[i,r]=t,a=At(i),o=At(r);if(a!==o)if(xt(a)&&xt(o))for(let u=0;u<t.length;u++){const c=t[u];typeof c=="string"&&(t[u]=parseFloat(c))}else _[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,s=[];for(let i=0;i<t.length;i++)(t[i]===null||Pi(t[i]))&&s.push(i);s.length&&Ii(t,s,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:s}=this;if(!t||!t.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=_[s](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(s,i).jump(i,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:s}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const r=s.length-1,a=s[r];s[r]=_[n](t.measureViewportBox(),window.getComputedStyle(t.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([o,u])=>{t.getValue(o).set(u)}),this.resolveNoneKeyframes()}}function $i(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let s=document;t&&(s=t.current);const i=n?.[e]??s.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}const Fn=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Dt=30,Li=e=>!isNaN(parseFloat(e));class _i{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=D.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=D.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Li(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&We(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new _e);const s=this.events[t].add(n);return t==="change"?()=>{s(),O.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=D.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Dt)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Dt);return Ut(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function X(e,t){return new _i(e,t)}const{schedule:Pn}=nn(queueMicrotask,!1);function En(e){return $t.isObject(e)&&"ownerSVGElement"in e}function Wi(e){return En(e)&&e.tagName==="svg"}const C=e=>!!(e&&e.getVelocity),Gi=[...An,S,U],Ui=e=>Gi.find(Mn(e)),Ft={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},he={};for(const e in Ft)he[e]={isEnabled:t=>Ft[e].some(n=>!!t[n])};function Rn(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function On(e){return typeof e=="string"||Array.isArray(e)}const Bn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],kn=["initial",...Bn];function it(e){return Rn(e.animate)||kn.some(t=>On(e[t]))}function Nn(e){return!!(it(e)||e.variants)}const de={};function ji(e){for(const t in e)de[t]=e[t],je(t)&&(de[t].isCSSVariable=!0)}function In(e,{layout:t,layoutId:n}){return Z.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!de[e]||e==="opacity")}const Yi={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Xi=H.length;function zi(e,t,n){let s="",i=!0;for(let r=0;r<Xi;r++){const a=H[r],o=e[a];if(o===void 0)continue;let u=!0;if(typeof o=="number"?u=o===(a.startsWith("scale")?1:0):u=parseFloat(o)===0,!u||n){const c=Fn(o,st[a]);if(!u){i=!1;const l=Yi[a]||a;s+=`${l}(${c}) `}n&&(t[a]=c)}}return s=s.trim(),n?s=n(t,i?"":s):i&&(s="none"),s}function rt(e,t,n){const{style:s,vars:i,transformOrigin:r}=e;let a=!1,o=!1;for(const u in t){const c=t[u];if(Z.has(u)){a=!0;continue}else if(je(u)){i[u]=c;continue}else{const l=Fn(c,st[u]);u.startsWith("origin")?(o=!0,r[u]=l):s[u]=l}}if(t.transform||(a||n?s.transform=zi(t,e.transform,n):s.transform&&(s.transform="none")),o){const{originX:u="50%",originY:c="50%",originZ:l=0}=r;s.transformOrigin=`${u} ${c} ${l}`}}const qi={offset:"stroke-dashoffset",array:"stroke-dasharray"},Hi={offset:"strokeDashoffset",array:"strokeDasharray"};function Zi(e,t,n=1,s=0,i=!0){e.pathLength=1;const r=i?qi:Hi;e[r.offset]=d.transform(-s);const a=d.transform(t),o=d.transform(n);e[r.array]=`${a} ${o}`}function Kn(e,{attrX:t,attrY:n,attrScale:s,pathLength:i,pathSpacing:r=1,pathOffset:a=0,...o},u,c,l){if(rt(e,o,c),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:h}=e;f.transform&&(h.transform=f.transform,delete f.transform),(h.transform||f.transformOrigin)&&(h.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),h.transform&&(h.transformBox=l?.transformBox??"fill-box",delete f.transformBox),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),s!==void 0&&(f.scale=s),i!==void 0&&Zi(f,i,r,a,!1)}const $n=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Pt(e){const t=[{},{}];return e?.values.forEach((n,s)=>{t[0][s]=n.get(),t[1][s]=n.getVelocity()}),t}function at(e,t,n,s){if(typeof t=="function"){const[i,r]=Pt(s);t=t(n!==void 0?n:e.custom,i,r)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,r]=Pt(s);t=t(n!==void 0?n:e.custom,i,r)}return t}function ot(e,t,n){const{style:s}=e,i={};for(const r in s)(C(s[r])||t.style&&C(t.style[r])||In(r,e)||n?.getValue(r)?.liveStyle!==void 0)&&(i[r]=s[r]);return i}function Ln(e,t,n){const s=ot(e,t,n);for(const i in e)if(C(e[i])||C(t[i])){const r=H.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=e[i]}return s}const lt=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Ji="framerAppearId",_n="data-"+lt(Ji);function Wn({top:e,left:t,right:n,bottom:s}){return{x:{min:t,max:n},y:{min:e,max:s}}}function Qi({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function er(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),s=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function be(e){return e===void 0||e===1}function Gn({scale:e,scaleX:t,scaleY:n}){return!be(e)||!be(t)||!be(n)}function Un(e){return Gn(e)||jn(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function jn(e){return Et(e.x)||Et(e.y)}function Et(e){return e&&e!=="0%"}function Be(e,t,n){const s=e-n,i=t*s;return n+i}function Rt(e,t,n,s,i){return i!==void 0&&(e=Be(e,i,s)),Be(e,n,s)+t}function ke(e,t=0,n=1,s,i){e.min=Rt(e.min,t,n,s,i),e.max=Rt(e.max,t,n,s,i)}function Yn(e,{x:t,y:n}){ke(e.x,t.translate,t.scale,t.originPoint),ke(e.y,n.translate,n.scale,n.originPoint)}const Ot=.999999999999,Bt=1.0000000000001;function tr(e,t,n,s=!1){const i=n.length;if(!i)return;t.x=t.y=1;let r,a;for(let o=0;o<i;o++){r=n[o],a=r.projectionDelta;const{visualElement:u}=r.options;u&&u.props.style&&u.props.style.display==="contents"||(s&&r.options.layoutScroll&&r.scroll&&r!==r.root&&Ie(e,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Yn(e,a)),s&&Un(r.latestValues)&&Ie(e,r.latestValues))}t.x<Bt&&t.x>Ot&&(t.x=1),t.y<Bt&&t.y>Ot&&(t.y=1)}function Ne(e,t){e.min=e.min+t,e.max=e.max+t}function kt(e,t,n,s,i=.5){const r=q(e.min,e.max,i);ke(e,t,n,r,s)}function Ie(e,t){kt(e.x,t.x,t.scaleX,t.scale,t.originX),kt(e.y,t.y,t.scaleY,t.scale,t.originY)}function Xn(e,t){return Wn(er(e.getBoundingClientRect(),t))}function nr(e,t,n){const s=Xn(e,n),{scroll:i}=t;return i&&(Ne(s.x,i.offset.x),Ne(s.y,i.offset.y)),s}const Nt=()=>({translate:0,scale:1,origin:0,originPoint:0}),sr=()=>({x:Nt(),y:Nt()}),It=()=>({min:0,max:0}),ut=()=>({x:It(),y:It()}),Ke={current:null},zn={current:!1};function ir(){if(zn.current=!0,!!$t.isBrowser)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ke.current=e.matches;e.addEventListener("change",t),t()}else Ke.current=!1}const qn=new WeakMap;function rr(e,t,n){for(const s in t){const i=t[s],r=n[s];if(C(i))e.addValue(s,i);else if(C(r))e.addValue(s,X(i,{owner:e}));else if(r!==i)if(e.hasValue(s)){const a=e.getValue(s);a.liveStyle===!0?a.jump(i):a.hasAnimated||a.set(i)}else{const a=e.getStaticValue(s);e.addValue(s,X(a!==void 0?a:i,{owner:e}))}}for(const s in n)t[s]===void 0&&e.removeValue(s);return t}const Kt=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Hn{scrapeMotionValuesFromProps(t,n,s){return{}}constructor({parent:t,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:r,visualState:a},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=et,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=D.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,O.render(this.render,!1,!0))};const{latestValues:u,renderState:c}=a;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=s,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=o,this.blockInitialAnimation=!!r,this.isControllingVariants=it(n),this.isVariantNode=Nn(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:l,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in f){const g=f[h];u[h]!==void 0&&C(g)&&g.set(u[h])}}mount(t){this.current=t,qn.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),zn.current||ir(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ke.current,process.env.NODE_ENV!=="production"&&We(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),ue(this.notifyUpdate),ue(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const s=Z.has(t);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&O.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),r&&r(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in he){const n=he[t];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[t]&&i&&s(this.props)&&(this.features[t]=new i(this)),this.features[t]){const r=this.features[t];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ut()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<Kt.length;s++){const i=Kt[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r="on"+i,a=t[r];a&&(this.propEventSubscriptions[i]=this.on(i,a))}this.prevMotionValues=rr(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const s=this.values.get(t);n!==s&&(s&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let s=this.values.get(t);return s===void 0&&n!==void 0&&(s=X(n===null?void 0:n,{owner:this}),this.addValue(t,s)),s}readValue(t,n){let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(Wt(s)||Gt(s))?s=parseFloat(s):!Ui(s)&&U.test(n)&&(s=Dn(t,n)),this.setBaseTarget(t,C(s)?s.get():s)),C(s)?s.get():s}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const r=at(this.props,n,this.presenceContext?.custom);r&&(s=r[t])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!C(i)?i:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new _e),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Pn.render(this.render)}}class Zn extends Hn{constructor(){super(...arguments),this.KeyframeResolver=Ki}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:s}){delete n[t],delete s[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;C(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Jn(e,{style:t,vars:n},s,i){const r=e.style;let a;for(a in t)r[a]=t[a];i?.applyProjectionStyles(r,s);for(a in n)r.setProperty(a,n[a])}function ar(e){return window.getComputedStyle(e)}class or extends Zn{constructor(){super(...arguments),this.type="html",this.renderInstance=Jn}readValueFromInstance(t,n){if(Z.has(n))return this.projection?.isProjecting?Ce(n):ni(t,n);{const s=ar(t),i=(je(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Xn(t,n)}build(t,n,s){rt(t,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,n,s){return ot(t,n,s)}}const Qn=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function lr(e,t,n,s){Jn(e,t,void 0,s);for(const i in t.attrs)e.setAttribute(Qn.has(i)?i:lt(i),t.attrs[i])}class ur extends Zn{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ut}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Z.has(n)){const s=Cn(n);return s&&s.default||0}return n=Qn.has(n)?n:lt(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,s){return Ln(t,n,s)}build(t,n,s){Kn(t,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(t,n,s,i){lr(t,n,s,i)}mount(t){this.isSVGTag=$n(t.tagName),super.mount(t)}}function es(e,t,n){const s=e.getProps();return at(s,t,n!==void 0?n:s.custom,e)}const ts=e=>Array.isArray(e);function cr(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,X(n))}function fr(e){return ts(e)?e[e.length-1]||0:e}function hr(e,t){const n=es(e,t);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const a in r){const o=fr(r[a]);cr(e,a,o)}}function dr(e){return!!(C(e)&&e.add)}function ns(e,t){const n=e.getValue("willChange");if(dr(n))return n.add(t);if(!n&&k.WillChange){const s=new k.WillChange("auto");e.addValue("willChange",s),s.add(t)}}function ss(e){return e.props[_n]}const pr=e=>e!==null;function mr(e,{repeat:t,repeatType:n="loop"},s){const i=e.filter(pr),r=t&&n!=="loop"&&t%2===1?0:i.length-1;return i[r]}const gr={type:"spring",stiffness:500,damping:25,restSpeed:10},yr=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Tr={type:"keyframes",duration:.8},br={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Vr=(e,{keyframes:t})=>t.length>2?Tr:Z.has(e)?e.startsWith("scale")?yr(t[1]):gr:br;function vr({when:e,delay:t,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:r,repeatType:a,repeatDelay:o,from:u,elapsed:c,...l}){return!!Object.keys(l).length}const ct=(e,t,n,s={},i,r)=>a=>{const o=nt(s,e)||{},u=o.delay||s.delay||0;let{elapsed:c=0}=s;c=c-R(u);const l={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...o,delay:-c,onUpdate:h=>{t.set(h),o.onUpdate&&o.onUpdate(h)},onComplete:()=>{a(),o.onComplete&&o.onComplete()},name:e,motionValue:t,element:r?void 0:i};vr(o)||Object.assign(l,Vr(e,l)),l.duration&&(l.duration=R(l.duration)),l.repeatDelay&&(l.repeatDelay=R(l.repeatDelay)),l.from!==void 0&&(l.keyframes[0]=l.from);let f=!1;if((l.type===!1||l.duration===0&&!l.repeatDelay)&&(Re(l),l.delay===0&&(f=!0)),(k.instantAnimations||k.skipAnimations)&&(f=!0,Re(l),l.delay=0),l.allowFlatten=!o.type&&!o.ease,f&&!r&&t.get()!==void 0){const h=mr(l.keyframes,o);if(h!==void 0){O.update(()=>{l.onUpdate(h),l.onComplete()});return}}return o.isSync?new Qe(l):new Mi(l)};function xr({protectedKeys:e,needsAnimating:t},n){const s=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,s}function wr(e,t,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:r=e.getDefaultTransition(),transitionEnd:a,...o}=t;s&&(r=s);const u=[],c=i&&e.animationState&&e.animationState.getState()[i];for(const l in o){const f=e.getValue(l,e.latestValues[l]??null),h=o[l];if(h===void 0||c&&xr(c,l))continue;const g={delay:n,...nt(r||{},l)},T=f.get();if(T!==void 0&&!f.isAnimating&&!Array.isArray(h)&&h===T&&!g.velocity)continue;let y=!1;if(window.MotionHandoffAnimation){const x=ss(e);if(x){const F=window.MotionHandoffAnimation(x,l,O);F!==null&&(g.startTime=F,y=!0)}}ns(e,l),f.start(ct(l,f,h,e.shouldReduceMotion&&Sn.has(l)?{type:!1}:g,e,y));const v=f.animation;v&&u.push(v)}return a&&Promise.all(u).then(()=>{O.update(()=>{a&&hr(e,a)})}),u}function Sr(e,t,n){const s=C(e)?e:X(e);return s.start(ct("",s,t,n)),s.animation}exports.HTMLVisualElement=or;exports.SVGVisualElement=ur;exports.SubscriptionManager=_e;exports.VisualElement=Hn;exports.addScaleCorrector=ji;exports.addUniqueItem=Lt;exports.addValueToWillChange=ns;exports.animateMotionValue=ct;exports.animateSingleValue=Sr;exports.animateTarget=wr;exports.applyBoxDelta=Yn;exports.applyTreeDeltas=tr;exports.buildHTMLStyles=rt;exports.buildSVGAttrs=Kn;exports.cancelFrame=ue;exports.circOut=Zt;exports.clamp=I;exports.complex=U;exports.convertBoundingBoxToBox=Wn;exports.convertBoxToBoundingBox=Qi;exports.createBox=ut;exports.createDelta=sr;exports.createGeneratorEasing=dn;exports.defaultOffset=gn;exports.featureDefinitions=he;exports.fillOffset=mn;exports.frame=O;exports.frameData=ee;exports.frameSteps=ds;exports.getOptimisedAppearId=ss;exports.getValueTransition=nt;exports.has2DTranslate=jn;exports.hasScale=Gn;exports.hasTransform=Un;exports.isAnimationControls=Rn;exports.isControllingVariants=it;exports.isEasingArray=en;exports.isForcedMotionValue=In;exports.isGenerator=tt;exports.isKeyframesTarget=ts;exports.isMotionValue=C;exports.isSVGElement=En;exports.isSVGSVGElement=Wi;exports.isSVGTag=$n;exports.isVariantLabel=On;exports.isVariantNode=Nn;exports.measurePageBox=nr;exports.microtask=Pn;exports.millisecondsToSeconds=P;exports.mixNumber=q;exports.motionValue=X;exports.noop=G;exports.optimizedAppearDataAttribute=_n;exports.percent=L;exports.pipe=pe;exports.progress=Le;exports.px=d;exports.removeItem=_t;exports.resolveElements=$i;exports.resolveVariant=es;exports.resolveVariantFromProps=at;exports.scaleCorrectors=de;exports.scalePoint=Be;exports.scrapeMotionValuesFromProps=ot;exports.scrapeMotionValuesFromProps$1=Ln;exports.secondsToMilliseconds=R;exports.spring=se;exports.time=D;exports.transformBox=Ie;exports.translateAxis=Ne;exports.variantPriorityOrder=Bn;exports.variantProps=kn;exports.visualElementStore=qn;exports.warnOnce=We;
|