vendor: 6,065 bytes, line 1
1import{n as k,i as ue,s as $i,r as S,j as ce,h as Gi,a as Hi}from"./vendor-iNsoPQka.js";function zi(t){if(typeof Proxy>"u")return t;const e=new Map,n=(...s)=>t(...s);return new Proxy(n,{get:(s,i)=>i==="create"?t:(e.has(i)||e.set(i,t(i)),e.get(i))})}function Wt(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const he=t=>Array.isArray(t);function ys(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}function St(t){return typeof t=="string"||Array.isArray(t)}function an(t){const e=[{},{}];return t==null||t.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function Ce(t,e,n,s){if(typeof e=="function"){const[i,r]=an(s);e=e(n!==void 0?n:t.custom,i,r)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,r]=an(s);e=e(n!==void 0?n:t.custom,i,r)}return e}function $t(t,e,n){const s=t.getProps();return Ce(s,e,n!==void 0?n:s.custom,t)}const De=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Me=["initial",...De],Vt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ot=new Set(Vt),G=t=>t*1e3,H=t=>t/1e3,Xi={type:"spring",stiffness:500,damping:25,restSpeed:10},Yi=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),qi={type:"keyframes",duration:.8},Zi={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ji=(t,{keyframes:e})=>e.length>2?qi:ot.has(t)?t.startsWith("scale")?Yi(e[1]):Xi:Zi;function Re(t,e){return t?t[e]||t.default||t:void 0}const Qi={skipAnimations:!1,useManualTiming:!1},to=t=>t!==null;function Gt(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(to),r=e&&n!=="loop"&&e%2===1?0:i.length-1;return!r||s===void 0?i[r]:s}function eo(t){let e=new Set,n=new Set,s=!1,i=!1;const r=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(u){r.has(u)&&(l.schedule(u),t()),u(o)}const l={schedule:(u,c=!1,h=!1)=>{const d=h&&s?e:n;return c&&r.add(u),d.has(u)||d.add(u),u},cancel:u=>{n.delete(u),r.delete(u)},process:u=>{if(o=u,s){i=!0;return}s=!0,[e,n]=[n,e],n.clear(),e.forEach(a),s=!1,i&&(i=!1,l.process(u))}};return l}const Rt=["read","resolveKeyframes","update","preRender","render","postRender"],no=40;function vs(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=Rt.reduce((p,v)=>(p[v]=eo(r),p),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:h,postRender:f}=o,d=()=>{const p=performance.now();n=!1,i.delta=s?1e3/60:Math.max(Math.min(p-i.timestamp,no),1),i.timestamp=p,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),h.process(i),f.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(d))},m=()=>{n=!0,s=!0,i.isProcessing||t(d)};return{schedule:Rt.reduce((p,v)=>{const x=o[v];return p[v]=(b,P=!1,V=!1)=>(n||m(),x.schedule(b,P,V)),p},{}),cancel:p=>{for(let v=0;v<Rt.length;v++)o[Rt[v]].cancel(p)},state:i,steps:o}}const{schedule:w,cancel:Z,state:E,steps:qt}=vs(typeof requestAnimationFrame<"u"?requestAnimationFrame:k,!0),Ts=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,so=1e-7,io=12;function oo(t,e,n,s,i){let r,o,a=0;do o=e+(n-e)/2,r=Ts(o,s,i)-t,r>0?n=o:e=o;while(Math.abs(r)>so&&++a<io);return o}function Ct(t,e,n,s){if(t===e&&n===s)return k;const i=r=>oo(r,0,1,t,n);return r=>r===0||r===1?r:Ts(i(r),e,s)}const xs=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Ps=t=>e=>1-t(1-e),Ss=Ct(.33,1.53,.69,.99),Ee=Ps(Ss),As=xs(Ee),bs=t=>(t*=2)<1?.5*Ee(t):.5*(2-Math.pow(2,-10*(t-1))),Le=t=>1-Math.sin(Math.acos(t)),ws=Ps(Le),Vs=xs(Le),Cs=t=>/^0[^.\s]+$/u.test(t);function ro(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Cs(t):!0}const Ds=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),Ms=t=>e=>typeof e=="string"&&e.startsWith(t),Rs=Ms("--"),ao=Ms("var(--"),Fe=t=>ao(t)?lo.test(t.split("/*")[0].trim()):!1,lo=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,uo=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function co(t){const e=uo.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function Es(t,e,n=1){const[s,i]=co(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const o=r.trim();return Ds(o)?parseFloat(o):o}return Fe(i)?Es(i,e,n+1):i}const z=(t,e,n)=>n>e?e:n<t?t:n,mt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},At={...mt,transform:t=>z(0,1,t)},Et={...mt,default:1},Dt=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),X=Dt("deg"),_=Dt("%"),T=Dt("px"),ho=Dt("vh"),fo=Dt("vw"),ln={..._,parse:t=>_.parse(t)/100,transform:t=>_.transform(t*100)},po=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),un=t=>t===mt||t===T,cn=(t,e)=>parseFloat(t.split(", ")[e]),hn=(t,e)=>(n,{transform:s})=>{if(s==="none"||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/u);if(i)return cn(i[1],e);{const r=s.match(/^matrix\((.+)\)$/u);return r?cn(r[1],t):0}},mo=new Set(["x","y","z"]),go=Vt.filter(t=>!mo.has(t));function yo(t){const e=[];return go.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const ft={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:hn(4,13),y:hn(5,14)};ft.translateX=ft.x;ft.translateY=ft.y;const Ls=t=>e=>e.test(t),vo={test:t=>t==="auto",parse:t=>t},Fs=[mt,T,_,X,fo,ho,vo],fn=t=>Fs.find(Ls(t)),it=new Set;let fe=!1,de=!1;function Bs(){if(de){const t=Array.from(it).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=yo(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);
vendor: 4,731 bytes, line 1
1i&&i.forEach(([r,o])=>{var a;(a=s.getValue(r))===null||a===void 0||a.set(o)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}de=!1,fe=!1,it.forEach(t=>t.complete()),it.clear()}function ks(){it.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(de=!0)})}function To(){ks(),Bs()}class Be{constructor(e,n,s,i,r,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(it.add(this),fe||(fe=!0,w.read(ks),w.resolveKeyframes(Bs))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;for(let r=0;r<e.length;r++)if(e[r]===null)if(r===0){const o=i==null?void 0:i.get(),a=e[e.length-1];if(o!==void 0)e[0]=o;else if(s&&n){const l=s.readValue(n,a);l!=null&&(e[0]=l)}e[0]===void 0&&(e[0]=a),i&&o===void 0&&i.set(e[0])}else e[r]=e[r-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),it.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,it.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Tt=t=>Math.round(t*1e5)/1e5,ke=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function xo(t){return t==null}const Po=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,je=(t,e)=>n=>!!(typeof n=="string"&&Po.test(n)&&n.startsWith(t)||e&&!xo(n)&&Object.prototype.hasOwnProperty.call(n,e)),js=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,r,o,a]=s.match(ke);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},So=t=>z(0,255,t),Zt={...mt,transform:t=>Math.round(So(t))},st={test:je("rgb","red"),parse:js("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+Zt.transform(t)+", "+Zt.transform(e)+", "+Zt.transform(n)+", "+Tt(At.transform(s))+")"};function Ao(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const pe={test:je("#"),parse:Ao,transform:st.transform},at={test:je("hsl","hue"),parse:js("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+_.transform(Tt(e))+", "+_.transform(Tt(n))+", "+Tt(At.transform(s))+")"},L={test:t=>st.test(t)||pe.test(t)||at.test(t),parse:t=>st.test(t)?st.parse(t):at.test(t)?at.parse(t):pe.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?st.transform(t):at.transform(t)},bo=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function wo(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(ke))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(bo))===null||n===void 0?void 0:n.length)||0)>0}const Os="number",Is="color",Vo="var",Co="var(",dn="${}",Do=/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 bt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const a=e.replace(Do,l=>(L.test(l)?(s.color.push(r),i.push(Is),n.push(L.parse(l))):l.startsWith(Co)?(s.var.push(r),i.push(Vo),n.push(l)):(s.number.push(r),i.push(Os),n.push(parseFloat(l))),++r,dn)).split(dn);return{values:n,split:a,indexes:s,types:i}}function Ns(t){return bt(t).values}function Us(t){const{split:e,types:n}=bt(t),s=e.length;return i=>{let r="";for(let o=0;o<s;o++)if(r+=e[o],i[o]!==void 0){const a=n[o];a===Os?r+=Tt(i[o]):a===Is?r+=L.transform(i[o]):r+=i[o]}return r}}const Mo=t=>typeof t=="number"?0:t;function Ro(t){const e=Ns(t);return Us(t)(e.map(Mo))}const J={test:wo,parse:Ns,createTransformer:Us,getAnimatableNone:Ro},Eo=new Set(["brightness","contrast","saturate","opacity"]);function Lo(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(ke)||[];if(!s)return t;const i=n.replace(s,"");let r=Eo.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const Fo=/\b([a-z-]*)\(.*?\)/gu,me={...J,getAnimatableNone:t=>{const e=t.match(Fo);return e?e.map(Lo).join(" "):t}},Bo={borderWidth:T,borderTopWidth:T,borderRightWidth:T,borderBottomWidth:T,borderLeftWidth:T,borderRadius:T,radiu
vendor: 74,675 bytes, line 1
1s:T,borderTopLeftRadius:T,borderTopRightRadius:T,borderBottomRightRadius:T,borderBottomLeftRadius:T,width:T,maxWidth:T,height:T,maxHeight:T,top:T,right:T,bottom:T,left:T,padding:T,paddingTop:T,paddingRight:T,paddingBottom:T,paddingLeft:T,margin:T,marginTop:T,marginRight:T,marginBottom:T,marginLeft:T,backgroundPositionX:T,backgroundPositionY:T},ko={rotate:X,rotateX:X,rotateY:X,rotateZ:X,scale:Et,scaleX:Et,scaleY:Et,scaleZ:Et,skew:X,skewX:X,skewY:X,distance:T,translateX:T,translateY:T,translateZ:T,x:T,y:T,z:T,perspective:T,transformPerspective:T,opacity:At,originX:ln,originY:ln,originZ:T},pn={...mt,transform:Math.round},Oe={...Bo,...ko,zIndex:pn,size:T,fillOpacity:At,strokeOpacity:At,numOctaves:pn},jo={...Oe,color:L,backgroundColor:L,outlineColor:L,fill:L,stroke:L,borderColor:L,borderTopColor:L,borderRightColor:L,borderBottomColor:L,borderLeftColor:L,filter:me,WebkitFilter:me},Ie=t=>jo[t];function _s(t,e){let n=Ie(t);return n!==me&&(n=J),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Oo=new Set(["auto","none","0"]);function Io(t,e,n){let s=0,i;for(;s<t.length&&!i;){const r=t[s];typeof r=="string"&&!Oo.has(r)&&bt(r).values.length&&(i=t[s]),s++}if(i&&n)for(const r of e)t[r]=_s(n,i)}class Ks extends Be{constructor(e,n,s,i,r){super(e,n,s,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let u=e[l];if(typeof u=="string"&&(u=u.trim(),Fe(u))){const c=Es(u,n.current);c!==void 0&&(e[l]=c),l===e.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!po.has(s)||e.length!==2)return;const[i,r]=e,o=fn(i),a=fn(r);if(o!==a)if(un(o)&&un(a))for(let l=0;l<e.length;l++){const u=e[l];typeof u=="string"&&(e[l]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)ro(e[i])&&s.push(i);s.length&&Io(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e||!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ft[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){var e;const{element:n,name:s,unresolvedKeyframes:i}=this;if(!n||!n.current)return;const r=n.getValue(s);r&&r.jump(this.measuredOrigin,!1);const o=i.length-1,a=i[o];i[o]=ft[s](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((e=this.removedTransforms)===null||e===void 0)&&e.length&&this.removedTransforms.forEach(([l,u])=>{n.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function Ne(t){return typeof t=="function"}let Ft;function No(){Ft=void 0}const K={now:()=>(Ft===void 0&&K.set(E.isProcessing||Qi.useManualTiming?E.timestamp:performance.now()),Ft),set:t=>{Ft=t,queueMicrotask(No)}},mn=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(J.test(t)||t==="0")&&!t.startsWith("url("));function Uo(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function _o(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const r=t[t.length-1],o=mn(i,e),a=mn(r,e);return!o||!a?!1:Uo(t)||(n==="spring"||Ne(n))&&s}const Ko=40;class Ws{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=K.now(),this.options={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:r,repeatType:o,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>Ko?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&To(),this._resolved}onKeyframesResolved(e,n){this.resolvedAt=K.now(),this.hasAttemptedResolve=!0;const{name:s,type:i,velocity:r,delay:o,onComplete:a,onUpdate:l,isGenerator:u}=this.options;if(!u&&!_o(e,s,i,r))if(o)this.options.duration=0;else{l==null||l(Gt(e,this.options,n)),a==null||a(),this.resolveFinishedPromise();return}const c=this.initPlayback(e,n);c!==!1&&(this._resolved={keyframes:e,finalKeyframe:n,...c},this.onPostResolved())}onPostResolved(){}then(e,n){return this.currentFinishedPromise.then(e,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}const dt=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s},$s=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let r=0;r<i;r++)s+=t(dt(0,i-1,r))+", ";return`linear(${s.substring(0,s.length-2)})`};function Gs(t,e){return e?t*(1e3/e):0}const Wo=5;function Hs(t,e,n){const s=Math.max(e-Wo,0);return Gs(n-t(s),e-s)}const D={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},Jt=.001;function $o({duration:t=D.duration,bounce:e=D.bounce,velocity:n=D.velocity,mass:s=D.mass}){let i,r,o=1-e;o=z(D.minDamping,D.maxDamping,o),t=z(D.minDuration,D.maxDuration,H(t)),o<1?(i=u=>{const c=u*o,h=c*t,f=c-n,d=ge(u,o),m=Math.exp(-h);return Jt-f/d*m},r=u=>{const h=u*o*t,f=h*n+n,d=Math.pow(o,2)*Math.pow(u,2)*t,m=Math.exp(-h),g=ge(Math.pow(u,2),o);return(-i(u)+Jt>0?-1:1)*((f-d)*m)/g}):(i=u=>{const c=Math.exp(-u*t),h=(u-n)*t+1;return-Jt+c*h},r=u=>{const c=Math.exp(-u*t),h=(n-u)*(t*t);return c*h});const a=5/t,l=Ho(i,r,a);if(t=G(t),isNaN(l))return{stiffness:D.stiffness,damping:D.damping,duration:t};{const u=Math.pow(l,2)*s;return{stiffness:u,damping:o*2*Math.sqrt(s*u),duration:t}}}const Go=12;function Ho(t,e,n){let s=n;for(let i=1;i<Go;i++)s=s-t(s)/e(s);return s}function ge(t,e){return t*Math.sqrt(1-e*e)}const ye=2e4;function zs(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<ye;)e+=n,s=t.next(e);return e>=ye?1/0:e}const zo=["duration","bounce"],Xo=["stiffness","damping","mass"];function gn(t,e){return e.some(n=>t[n]!==void 0)}function Yo(t){let e={velocity:D.velocity,stiffness:D.stiffness,damping:D.damping,mass:D.mass,isResolvedFromDuration:!1,...t};if(!gn(t,Xo)&&gn(t,zo))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,r=2*z(.05,1,1-t.bounce)*Math.sqrt(i);e={...e,mass:D.mass,stiffness:i,damping:r}}else{const n=$o(t);e={...e,...n,mass:D.mass},e.isResolvedFromDuration=!0}return e}function Xs(t=D.visualDuration,e=D.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:l,damping:u,mass:c,duration:h,velocity:f,isResolvedFromDuration:d}=Yo({...n,velocity:-H(n.velocity||0)}),m=f||0,g=u/(2*Math.sqrt(l*c)),y=o-r,p=H(Math.sqrt(l/c)),v=Math.abs(y)<5;s||(s=v?D.restSpeed.granular:D.restSpeed.default),i||(i=v?D.restDelta.granular:D.restDelta.default);let x;if(g<1){const P=ge(p,g);x=V=>{const R=Math.exp(-g*p*V);return o-R*((m+g*p*y)/P*Math.sin(P*V)+y*Math.cos(P*V))}}else if(g===1)x=P=>o-Math.exp(-p*P)*(y+(m+p*y)*P);else{const P=p*Math.sqrt(g*g-1);x=V=>{const R=Math.exp(-g*p*V),A=Math.min(P*V,300);return o-R*((m+g*p*y)*Math.sinh(A)+P*y*Math.cosh(A))/P}}const b={calculatedDuration:d&&h||null,next:P=>{const V=x(P);if(d)a.done=P>=h;else{let R=0;g<1&&(R=P===0?G(m):Hs(x,P,V));const A=Math.abs(R)<=s,j=Math.abs(o-V)<=i;a.done=A&&j}return a.value=a.done?o:V,a},toString:()=>{const P=Math.min(zs(b),ye),V=$s(R=>b.next(P*R).value,P,30);return P+"ms "+V}};return b}function yn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],f={done:!1,value:h},d=A=>a!==void 0&&A<a||l!==void 0&&A>l,m=A=>a===void 0?l:l===void 0||Math.abs(a-A)<Math.abs(l-A)?a:l;let g=n*e;const y=h+g,p=o===void 0?y:o(y);p!==y&&(g=p-h);const v=A=>-g*Math.exp(-A/s),x=A=>p+v(A),b=A=>{const j=v(A),I=x(A);f.done=Math.abs(j)<=u,f.value=f.done?p:I};let P,V;const R=A=>{d(f.value)&&(P=A,V=Xs({keyframes:[f.value,m(f.value)],velocity:Hs(x,A,f.value),damping:i,stiffness:r,restDelta:u,restSpeed:c}))};return R(0),{calculatedDuration:null,next:A=>{let j=!1;return!V&&P===void 0&&(j=!0,b(A),R(A)),P!==void 0&&A>=P?V.next(A-P):(!j&&b(A),f)}}}const qo=Ct(.42,0,1,1),Zo=Ct(0,0,.58,1),Ys=Ct(.42,0,.58,1),Jo=t=>Array.isArray(t)&&typeof t[0]!="number",Ue=t=>Array.isArray(t)&&typeof t[0]=="number",vn={linear:k,easeIn:qo,easeInOut:Ys,easeOut:Zo,circIn:Le,circInOut:Vs,circOut:ws,backIn:Ee,backInOut:As,backOut:Ss,anticipate:bs},Tn=t=>{if(Ue(t)){ue(t.length===4);const[e,n,s,i]=t;return Ct(e,n,s,i)}else if(typeof t=="string")return ue(vn[t]!==void 0),vn[t];return t},Qo=(t,e)=>n=>e(t(n)),Y=(...t)=>t.reduce(Qo),C=(t,e,n)=>t+(e-t)*n;function Qt(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function tr({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,r=0,o=0;if(!e)i=r=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=Qt(l,a,t+1/3),r=Qt(l,a,t),o=Qt(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}function jt(t,e){return n=>n>0?e:t}const te=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},er=[pe,st,at],nr=t=>er.find(e=>e.test(t));function xn(t){const e=nr(t);if(!e)return!1;let n=e.parse(t);return e===at&&(n=tr(n)),n}const Pn=(t,e)=>{const n=xn(t),s=xn(e);if(!n||!s)return jt(t,e);const i={...n};return r=>(i.red=te(n.red,s.red,r),i.green=te(n.green,s.green,r),i.blue=te(n.blue,s.blue,r),i.alpha=C(n.alpha,s.alpha,r),st.transform(i))},ve=new Set(["none","hidden"]);function sr(t,e){return ve.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function ir(t,e){return n=>C(t,e,n)}function _e(t){return typeof t=="number"?ir:typeof t=="string"?Fe(t)?jt:L.test(t)?Pn:ar:Array.isArray(t)?qs:typeof t=="object"?L.test(t)?Pn:or:jt}function qs(t,e){const n=[...t],s=n.length,i=t.map((r,o)=>_e(r)(r,e[o]));return r=>{for(let o=0;o<s;o++)n[o]=i[o](r);return n}}function or(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=_e(t[i])(t[i],e[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}}function rr(t,e){var n;const s=[],i={color:0,var:0,number:0};for(let r=0;r<e.values.length;r++){const o=e.types[r],a=t.indexes[o][i[o]],l=(n=t.values[a])!==null&&n!==void 0?n:0;s[r]=l,i[o]++}return s}const ar=(t,e)=>{const n=J.createTransformer(e),s=bt(t),i=bt(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?ve.has(t)&&!i.values.length||ve.has(e)&&!s.values.length?sr(t,e):Y(qs(rr(s,i),i.values),n):jt(t,e)};function Zs(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?C(t,e,n):_e(t)(t,e)}function lr(t,e,n){const s=[],i=n||Zs,r=t.length-1;for(let o=0;o<r;o++){let a=i(t[o],t[o+1]);if(e){const l=Array.isArray(e)?e[o]||k:e;a=Y(l,a)}s.push(a)}return s}function ur(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const r=t.length;if(ue(r===e.length),r===1)return()=>e[0];if(r===2&&t[0]===t[1])return()=>e[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const o=lr(e,s,i),a=o.length,l=u=>{let c=0;if(a>1)for(;c<t.length-2&&!(u<t[c+1]);c++);const h=dt(t[c],t[c+1],u);return o[c](h)};return n?u=>l(z(t[0],t[r-1],u)):l}function cr(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=dt(0,e,s);t.push(C(n,1,i))}}function hr(t){const e=[0];return cr(e,t.length-1),e}function fr(t,e){return t.map(n=>n*e)}function dr(t,e){return t.map(()=>e||Ys).splice(0,t.length-1)}function Ot({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Jo(s)?s.map(Tn):Tn(s),r={done:!1,value:e[0]},o=fr(n&&n.length===e.length?n:hr(e),t),a=ur(o,e,{ease:Array.isArray(i)?i:dr(e,i)});return{calculatedDuration:t,next:l=>(r.value=a(l),r.done=l>=t,r)}}const pr=t=>{const e=({timestamp:n})=>t(n);return{start:()=>w.update(e,!0),stop:()=>Z(e),now:()=>E.isProcessing?E.timestamp:K.now()}},mr={decay:yn,inertia:yn,tween:Ot,keyframes:Ot,spring:Xs},gr=t=>t/100;class Ke extends Ws{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:s,element:i,keyframes:r}=this.options,o=(i==null?void 0:i.KeyframeResolver)||Be,a=(l,u)=>this.onKeyframesResolved(l,u);this.resolver=new o(r,a,n,s,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(e){const{type:n="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=this.options,a=Ne(n)?n:mr[n]||Ot;let l,u;a!==Ot&&typeof e[0]!="number"&&(l=Y(gr,Zs(e[0],e[1])),e=[0,100]);const c=a({...this.options,keyframes:e});r==="mirror"&&(u=a({...this.options,keyframes:[...e].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=zs(c));const{calculatedDuration:h}=c,f=h+i,d=f*(s+1)-i;return{generator:c,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:h,resolvedDuration:f,totalDuration:d}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!e?this.pause():this.state=this.pendingPlayState}tick(e,n=!1){const{resolved:s}=this;if(!s){const{keyframes:A}=this.options;return{done:!0,value:A[A.length-1]}}const{finalKeyframe:i,generator:r,mirroredGenerator:o,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:u,totalDuration:c,resolvedDuration:h}=s;if(this.startTime===null)return r.next(0);const{delay:f,repeat:d,repeatType:m,repeatDelay:g,onUpdate:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-c/this.speed,this.startTime)),n?this.currentTime=e:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const p=this.currentTime-f*(this.speed>=0?1:-1),v=this.speed>=0?p<0:p>c;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let x=this.currentTime,b=r;if(d){const A=Math.min(this.currentTime,c)/h;let j=Math.floor(A),I=A%1;!I&&A>=1&&(I=1),I===1&&j--,j=Math.min(j,d+1),!!(j%2)&&(m==="reverse"?(I=1-I,g&&(I-=g/h)):m==="mirror"&&(b=o)),x=z(0,1,I)*h}const P=v?{done:!1,value:l[0]}:b.next(x);a&&(P.value=a(P.value));let{done:V}=P;!v&&u!==null&&(V=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const R=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&V);return R&&i!==void 0&&(P.value=Gt(l,this.options,i)),y&&y(P.value),R&&this.finish(),P}get duration(){const{resolved:e}=this;return e?H(e.calculatedDuration):0}get time(){return H(this.currentTime)}set time(e){e=G(e),this.currentTime=e,this.holdTime!==null||this.speed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=H(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:e=pr,onPlay:n,startTime:s}=this.options;this.driver||(this.driver=e(r=>this.tick(r))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=s??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(e=this.currentTime)!==null&&e!==void 0?e:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const yr=new Set(["opacity","clipPath","filter","transform"]);function We(t){let e;return()=>(e===void 0&&(e=t()),e)}const vr={linearEasing:void 0};function Tr(t,e){const n=We(t);return()=>{var s;return(s=vr[e])!==null&&s!==void 0?s:n()}}const It=Tr(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");function Js(t){return!!(typeof t=="function"&&It()||!t||typeof t=="string"&&(t in Te||It())||Ue(t)||Array.isArray(t)&&t.every(Js))}const yt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Te={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:yt([0,.65,.55,1]),circOut:yt([.55,0,1,.45]),backIn:yt([.31,.01,.66,-.59]),backOut:yt([.33,1.53,.69,.99])};function Qs(t,e){if(t)return typeof t=="function"&&It()?$s(t,e):Ue(t)?yt(t):Array.isArray(t)?t.map(n=>Qs(n,e)||Te.easeOut):Te[t]}function xr(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeInOut",times:l}={}){const u={[e]:n};l&&(u.offset=l);const c=Qs(a,i);return Array.isArray(c)&&(u.easing=c),t.animate(u,{delay:s,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"})}function Sn(t,e){t.timeline=e,t.onfinish=null}const Pr=We(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Nt=10,Sr=2e4;function Ar(t){return Ne(t.type)||t.type==="spring"||!Js(t.ease)}function br(t,e){const n=new Ke({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:t[0]};const i=[];let r=0;for(;!s.done&&r<Sr;)s=n.sample(r),i.push(s.value),r+=Nt;return{times:void 0,keyframes:i,duration:r-Nt,ease:"linear"}}const ti={anticipate:bs,backInOut:As,circInOut:Vs};function wr(t){return t in ti}class An extends Ws{constructor(e){super(e);const{name:n,motionValue:s,element:i,keyframes:r}=this.options;this.resolver=new Ks(r,(o,a)=>this.onKeyframesResolved(o,a),n,s,i),this.resolver.scheduleResolve()}initPlayback(e,n){var s;let{duration:i=300,times:r,ease:o,type:a,motionValue:l,name:u,startTime:c}=this.options;if(!(!((s=l.owner)===null||s===void 0)&&s.current))return!1;if(typeof o=="string"&&It()&&wr(o)&&(o=ti[o]),Ar(this.options)){const{onComplete:f,onUpdate:d,motionValue:m,element:g,...y}=this.options,p=br(e,y);e=p.keyframes,e.length===1&&(e[1]=e[0]),i=p.duration,r=p.times,o=p.ease,a="keyframes"}const h=xr(l.owner.current,u,e,{...this.options,duration:i,times:r,ease:o});return h.startTime=c??this.calcStartTime(),this.pendingTimeline?(Sn(h,this.pendingTimeline),this.pendingTimeline=void 0):h.onfinish=()=>{const{onComplete:f}=this.options;l.set(Gt(e,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:h,duration:i,times:r,type:a,ease:o,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:n}=e;return H(n)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:n}=e;return H(n.currentTime||0)}set time(e){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.currentTime=G(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:n}=e;return n.playbackRate}set speed(e){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:n}=e;return n.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:n}=e;return n.startTime}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{const{resolved:n}=this;if(!n)return k;const{animation:s}=n;Sn(s,e)}return k}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:n,keyframes:s,duration:i,type:r,ease:o,times:a}=e;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:c,onComplete:h,element:f,...d}=this.options,m=new Ke({...d,keyframes:s,duration:i,type:r,ease:o,times:a,isGenerator:!0}),g=G(this.time);u.setWithVelocity(m.sample(g-Nt).value,m.sample(g).value,Nt)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:n,name:s,repeatDelay:i,repeatType:r,damping:o,type:a}=e;return Pr()&&s&&yr.has(s)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!i&&r!=="mirror"&&o!==0&&a!=="inertia"}}const Vr=We(()=>window.ScrollTimeline!==void 0);class Cr{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}then(e,n){return Promise.all(this.animations).then(e).catch(n)}getAll(e){return this.animations[0][e]}setAll(e,n){for(let s=0;s<this.animations.length;s++)this.animations[s][e]=n}attachTimeline(e,n){const s=this.animations.map(i=>Vr()&&i.attachTimeline?i.attachTimeline(e):n(i));return()=>{s.forEach((i,r)=>{i&&i(),this.animations[r].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let n=0;n<this.animations.length;n++)e=Math.max(e,this.animations[n].duration);return e}runAll(e){this.animations.forEach(n=>n[e]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function Dr({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:r,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const $e=(t,e,n,s={},i,r)=>o=>{const a=Re(s,t)||{},l=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-G(l);let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:i};Dr(a)||(c={...c,...Ji(t,c)}),c.duration&&(c.duration=G(c.duration)),c.repeatDelay&&(c.repeatDelay=G(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let h=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(c.duration=0,c.delay===0&&(h=!0)),h&&!r&&e.get()!==void 0){const f=Gt(c.keyframes,a);if(f!==void 0)return w.update(()=>{c.onUpdate(f),c.onComplete()}),new Cr([])}return!r&&An.supports(c)?new An(c):new Ke(c)},Mr=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),Rr=t=>he(t)?t[t.length-1]||0:t;function Ge(t,e){t.indexOf(e)===-1&&t.push(e)}function He(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class ze{constructor(){this.subscriptions=[]}add(e){return Ge(this.subscriptions,e),()=>He(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let r=0;r<i;r++){const o=this.subscriptions[r];o&&o(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const bn=30,Er=t=>!isNaN(parseFloat(t));class Lr{constructor(e,n={}){this.version="11.13.1",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(s,i=!0)=>{const r=K.now();this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=K.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Er(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new ze);const s=this.events[e].add(n);return e==="change"?()=>{s(),w.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=K.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>bn)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,bn);return Gs(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(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.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function wt(t,e){return new Lr(t,e)}function Fr(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,wt(n))}function Br(t,e){const n=$t(t,e);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const o in r){const a=Rr(r[o]);Fr(t,o,a)}}const Xe=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),kr="framerAppearId",ei="data-"+Xe(kr);function ni(t){return t.props[ei]}const F=t=>!!(t&&t.getVelocity);function jr(t){return!!(F(t)&&t.add)}function xe(t,e){const n=t.getValue("willChange");if(jr(n))return n.add(e)}function Or({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function si(t,e,{delay:n=0,transitionOverride:s,type:i}={}){var r;let{transition:o=t.getDefaultTransition(),transitionEnd:a,...l}=e;s&&(o=s);const u=[],c=i&&t.animationState&&t.animationState.getState()[i];for(const h in l){const f=t.getValue(h,(r=t.latestValues[h])!==null&&r!==void 0?r:null),d=l[h];if(d===void 0||c&&Or(c,h))continue;const m={delay:n,...Re(o||{},h)};let g=!1;if(window.MotionHandoffAnimation){const p=ni(t);if(p){const v=window.MotionHandoffAnimation(p,h,w);v!==null&&(m.startTime=v,g=!0)}}xe(t,h),f.start($e(h,f,d,t.shouldReduceMotion&&ot.has(h)?{type:!1}:m,t,g));const y=f.animation;y&&u.push(y)}return a&&Promise.all(u).then(()=>{w.update(()=>{a&&Br(t,a)})}),u}function Pe(t,e,n={}){var s;const i=$t(t,e,n.type==="exit"?(s=t.presenceContext)===null||s===void 0?void 0:s.custom:void 0);let{transition:r=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(r=n.transitionOverride);const o=i?()=>Promise.all(si(t,i,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:h,staggerDirection:f}=r;return Ir(t,e,c+u,h,f,n)}:()=>Promise.resolve(),{when:l}=r;if(l){const[u,c]=l==="beforeChildren"?[o,a]:[a,o];return u().then(()=>c())}else return Promise.all([o(),a(n.delay)])}function Ir(t,e,n=0,s=0,i=1,r){const o=[],a=(t.variantChildren.size-1)*s,l=i===1?(u=0)=>u*s:(u=0)=>a-u*s;return Array.from(t.variantChildren).sort(Nr).forEach((u,c)=>{u.notify("AnimationStart",e),o.push(Pe(u,e,{...r,delay:n+l(c)}).then(()=>u.notify("AnimationComplete",e)))}),Promise.all(o)}function Nr(t,e){return t.sortNodePosition(e)}function Ur(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(r=>Pe(t,r,n));s=Promise.all(i)}else if(typeof e=="string")s=Pe(t,e,n);else{const i=typeof e=="function"?$t(t,e,n.custom):e;s=Promise.all(si(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}const _r=Me.length;function ii(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?ii(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<_r;n++){const s=Me[n],i=t.props[s];(St(i)||i===!1)&&(e[s]=i)}return e}const Kr=[...De].reverse(),Wr=De.length;function $r(t){return e=>Promise.all(e.map(({animation:n,options:s})=>Ur(t,n,s)))}function Gr(t){let e=$r(t),n=wn(),s=!0;const i=l=>(u,c)=>{var h;const f=$t(t,c,l==="exit"?(h=t.presenceContext)===null||h===void 0?void 0:h.custom:void 0);if(f){const{transition:d,transitionEnd:m,...g}=f;u={...u,...g,...m}}return u};function r(l){e=l(t)}function o(l){const{props:u}=t,c=ii(t.parent)||{},h=[],f=new Set;let d={},m=1/0;for(let y=0;y<Wr;y++){const p=Kr[y],v=n[p],x=u[p]!==void 0?u[p]:c[p],b=St(x),P=p===l?v.isActive:null;P===!1&&(m=y);let V=x===c[p]&&x!==u[p]&&b;if(V&&s&&t.manuallyAnimateOnMount&&(V=!1),v.protectedKeys={...d},!v.isActive&&P===null||!x&&!v.prevProp||Wt(x)||typeof x=="boolean")continue;const R=Hr(v.prevProp,x);let A=R||p===l&&v.isActive&&!V&&b||y>m&&b,j=!1;const I=Array.isArray(x)?x:[x];let rt=I.reduce(i(p),{});P===!1&&(rt={});const{prevResolvedValues:on={}}=v,Wi={...on,...rt},rn=B=>{A=!0,f.has(B)&&(j=!0,f.delete(B)),v.needsAnimating[B]=!0;const W=t.getValue(B);W&&(W.liveStyle=!1)};for(const B in Wi){const W=rt[B],Xt=on[B];if(d.hasOwnProperty(B))continue;let Yt=!1;he(W)&&he(Xt)?Yt=!ys(W,Xt):Yt=W!==Xt,Yt?W!=null?rn(B):f.add(B):W!==void 0&&f.has(B)?rn(B):v.protectedKeys[B]=!0}v.prevProp=x,v.prevResolvedValues=rt,v.isActive&&(d={...d,...rt}),s&&t.blockInitialAnimation&&(A=!1),A&&(!(V&&R)||j)&&h.push(...I.map(B=>({animation:B,options:{type:p}})))}if(f.size){const y={};f.forEach(p=>{const v=t.getBaseTarget(p),x=t.getValue(p);x&&(x.liveStyle=!0),y[p]=v??null}),h.push({animation:y})}let g=!!h.length;return s&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(g=!1),s=!1,g?e(h):Promise.resolve()}function a(l,u){var c;if(n[l].isActive===u)return Promise.resolve();(c=t.variantChildren)===null||c===void 0||c.forEach(f=>{var d;return(d=f.animationState)===null||d===void 0?void 0:d.setActive(l,u)}),n[l].isActive=u;const h=o(l);for(const f in n)n[f].protectedKeys={};return h}return{animateChanges:o,setActive:a,setAnimateFunction:r,getState:()=>n,reset:()=>{n=wn(),s=!0}}}function Hr(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!ys(e,t):!1}function tt(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function wn(){return{animate:tt(!0),whileInView:tt(),whileHover:tt(),whileTap:tt(),whileDrag:tt(),whileFocus:tt(),exit:tt()}}class Q{constructor(e){this.isMounted=!1,this.node=e}update(){}}class zr extends Q{constructor(e){super(e),e.animationState||(e.animationState=Gr(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Wt(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)===null||e===void 0||e.call(this)}}let Xr=0;class Yr extends Q{constructor(){super(...arguments),this.id=Xr++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const qr={animation:{Feature:zr},exit:{Feature:Yr}},oi=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function Mt(t){return{point:{x:t.pageX,y:t.pageY}}}const Zr=t=>e=>oi(e)&&t(e,Mt(e));function $(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function q(t,e,n,s){return $(t,e,Zr(n),s)}const Vn=(t,e)=>Math.abs(t-e);function Jr(t,e){const n=Vn(t.x,e.x),s=Vn(t.y,e.y);return Math.sqrt(n**2+s**2)}class ri{constructor(e,n,{transformPagePoint:s,contextWindow:i,dragSnapToOrigin:r=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=ne(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,d=Jr(h.offset,{x:0,y:0})>=3;if(!f&&!d)return;const{point:m}=h,{timestamp:g}=E;this.history.push({...m,timestamp:g});const{onStart:y,onMove:p}=this.handlers;f||(y&&y(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),p&&p(this.lastMoveEvent,h)},this.handlePointerMove=(h,f)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=ee(f,this.transformPagePoint),w.update(this.updatePoint,!0)},this.handlePointerUp=(h,f)=>{this.end();const{onEnd:d,onSessionEnd:m,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=ne(h.type==="pointercancel"?this.lastMoveEventInfo:ee(f,this.transformPagePoint),this.history);this.startEvent&&d&&d(h,y),m&&m(h,y)},!oi(e))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=s,this.contextWindow=i||window;const o=Mt(e),a=ee(o,this.transformPagePoint),{point:l}=a,{timestamp:u}=E;this.history=[{...l,timestamp:u}];const{onSessionStart:c}=n;c&&c(e,ne(a,this.history)),this.removeListeners=Y(q(this.contextWindow,"pointermove",this.handlePointerMove),q(this.contextWindow,"pointerup",this.handlePointerUp),q(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Z(this.updatePoint)}}function ee(t,e){return e?{point:e(t.point)}:t}function Cn(t,e){return{x:t.x-e.x,y:t.y-e.y}}function ne({point:t},e){return{point:t,delta:Cn(t,ai(e)),offset:Cn(t,Qr(e)),velocity:ta(e,.1)}}function Qr(t){return t[0]}function ai(t){return t[t.length-1]}function ta(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=ai(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>G(e)));)n--;if(!s)return{x:0,y:0};const r=H(i.timestamp-s.timestamp);if(r===0)return{x:0,y:0};const o={x:(i.x-s.x)/r,y:(i.y-s.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function lt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}const li=1e-4,ea=1-li,na=1+li,ui=.01,sa=0-ui,ia=0+ui;function O(t){return t.max-t.min}function oa(t,e,n){return Math.abs(t-e)<=n}function Dn(t,e,n,s=.5){t.origin=s,t.originPoint=C(e.min,e.max,t.origin),t.scale=O(n)/O(e),t.translate=C(n.min,n.max,t.origin)-t.originPoint,(t.scale>=ea&&t.scale<=na||isNaN(t.scale))&&(t.scale=1),(t.translate>=sa&&t.translate<=ia||isNaN(t.translate))&&(t.translate=0)}function xt(t,e,n,s){Dn(t.x,e.x,n.x,s?s.originX:void 0),Dn(t.y,e.y,n.y,s?s.originY:void 0)}function Mn(t,e,n){t.min=n.min+e.min,t.max=t.min+O(e)}function ra(t,e,n){Mn(t.x,e.x,n.x),Mn(t.y,e.y,n.y)}function Rn(t,e,n){t.min=e.min-n.min,t.max=t.min+O(e)}function Pt(t,e,n){Rn(t.x,e.x,n.x),Rn(t.y,e.y,n.y)}function aa(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?C(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?C(n,t,s.max):Math.min(t,n)),t}function En(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function la(t,{top:e,left:n,bottom:s,right:i}){return{x:En(t.x,n,i),y:En(t.y,e,s)}}function Ln(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}function ua(t,e){return{x:Ln(t.x,e.x),y:Ln(t.y,e.y)}}function ca(t,e){let n=.5;const s=O(t),i=O(e);return i>s?n=dt(e.min,e.max-s,t.min):s>i&&(n=dt(t.min,t.max-i,e.min)),z(0,1,n)}function ha(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Se=.35;function fa(t=Se){return t===!1?t=0:t===!0&&(t=Se),{x:Fn(t,"left","right"),y:Fn(t,"top","bottom")}}function Fn(t,e,n){return{min:Bn(t,e),max:Bn(t,n)}}function Bn(t,e){return typeof t=="number"?t:t[e]||0}const kn=()=>({translate:0,scale:1,origin:0,originPoint:0}),ut=()=>({x:kn(),y:kn()}),jn=()=>({min:0,max:0}),M=()=>({x:jn(),y:jn()});function U(t){return[t("x"),t("y")]}function ci({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function da({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function pa(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function se(t){return t===void 0||t===1}function Ae({scale:t,scaleX:e,scaleY:n}){return!se(t)||!se(e)||!se(n)}function et(t){return Ae(t)||hi(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function hi(t){return On(t.x)||On(t.y)}function On(t){return t&&t!=="0%"}function Ut(t,e,n){const s=t-n,i=e*s;return n+i}function In(t,e,n,s,i){return i!==void 0&&(t=Ut(t,i,s)),Ut(t,n,s)+e}function be(t,e=0,n=1,s,i){t.min=In(t.min,e,n,s,i),t.max=In(t.max,e,n,s,i)}function fi(t,{x:e,y:n}){be(t.x,e.translate,e.scale,e.originPoint),be(t.y,n.translate,n.scale,n.originPoint)}const Nn=.999999999999,Un=1.0000000000001;function ma(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let r,o;for(let a=0;a<i;a++){r=n[a],o=r.projectionDelta;const{visualElement:l}=r.options;l&&l.props.style&&l.props.style.display==="contents"||(s&&r.options.layoutScroll&&r.scroll&&r!==r.root&&ht(t,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,fi(t,o)),s&&et(r.latestValues)&&ht(t,r.latestValues))}e.x<Un&&e.x>Nn&&(e.x=1),e.y<Un&&e.y>Nn&&(e.y=1)}function ct(t,e){t.min=t.min+e,t.max=t.max+e}function _n(t,e,n,s,i=.5){const r=C(t.min,t.max,i);be(t,e,n,r,s)}function ht(t,e){_n(t.x,e.x,e.scaleX,e.scale,e.originX),_n(t.y,e.y,e.scaleY,e.scale,e.originY)}function di(t,e){return ci(pa(t.getBoundingClientRect(),e))}function ga(t,e,n){const s=di(t,n),{scroll:i}=e;return i&&(ct(s.x,i.offset.x),ct(s.y,i.offset.y)),s}const pi=({current:t})=>t?t.ownerDocument.defaultView:null,ya=new WeakMap;class va{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=M(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=c=>{const{dragSnapToOrigin:h}=this.getProps();h?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Mt(c).point)},r=(c,h)=>{const{drag:f,dragPropagation:d,onDragStart:m}=this.getProps();if(f&&!d&&(this.openDragLock&&this.openDragLock(),this.openDragLock=$i(f),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),U(y=>{let p=this.getAxisMotionValue(y).get()||0;if(_.test(p)){const{projection:v}=this.visualElement;if(v&&v.layout){const x=v.layout.layoutBox[y];x&&(p=O(x)*(parseFloat(p)/100))}}this.originPoint[y]=p}),m&&w.postRender(()=>m(c,h)),xe(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},o=(c,h)=>{const{dragPropagation:f,dragDirectionLock:d,onDirectionLock:m,onDrag:g}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:y}=h;if(d&&this.currentDirection===null){this.currentDirection=Ta(y),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",h.point,y),this.updateAxis("y",h.point,y),this.visualElement.render(),g&&g(c,h)},a=(c,h)=>this.stop(c,h),l=()=>U(c=>{var h;return this.getAnimationState(c)==="paused"&&((h=this.getAxisMotionValue(c).animation)===null||h===void 0?void 0:h.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new ri(e,{onSessionStart:i,onStart:r,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:pi(this.visualElement)})}stop(e,n){const s=this.isDragging;if(this.cancel(),!s)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:r}=this.getProps();r&&w.postRender(()=>r(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!Lt(e,i,this.currentDirection))return;const r=this.getAxisMotionValue(e);let o=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(o=aa(o,this.constraints[e],this.elastic[e])),r.set(o)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:s}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,r=this.constraints;n&<(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=la(i.layoutBox,n):this.constraints=!1,this.elastic=fa(s),r!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&U(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=ha(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!lt(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const r=ga(s,i.root,this.visualElement.getTransformPagePoint());let o=ua(i.layout.layoutBox,r);if(n){const a=n(da(o));this.hasMutatedConstraints=!!a,a&&(o=ci(a))}return o}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=U(c=>{if(!Lt(c,n,this.currentDirection))return;let h=l&&l[c]||{};o&&(h={min:0,max:0});const f=i?200:1e6,d=i?40:1e7,m={type:"inertia",velocity:s?e[c]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...r,...h};return this.startAxisValueAnimation(c,m)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return xe(this.visualElement,e),s.start($e(e,s,0,n,this.visualElement,!1))}stopAnimation(){U(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){U(e=>{var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){U(n=>{const{drag:s}=this.getProps();if(!Lt(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];r.set(e[n]-C(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!lt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};U(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=ca({min:l,max:l},this.constraints[o])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),U(o=>{if(!Lt(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(C(l,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;ya.set(this.visualElement,this);const e=this.visualElement.current,n=q(e,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();lt(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,r=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),w.read(s);const o=$(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(U(c=>{const h=this.getAxisMotionValue(c);h&&(this.originPoint[c]+=l[c].translate,h.set(h.get()+l[c].translate))}),this.visualElement.render())});return()=>{o(),n(),r(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:o=Se,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:a}}}function Lt(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Ta(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class xa extends Q{constructor(e){super(e),this.removeGroupControls=k,this.removeListeners=k,this.controls=new va(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||k}unmount(){this.removeGroupControls(),this.removeListeners()}}const Kn=t=>(e,n)=>{t&&w.postRender(()=>t(e,n))};class Pa extends Q{constructor(){super(...arguments),this.removePointerDownListener=k}onPointerDown(e){this.session=new ri(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:pi(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:Kn(e),onStart:Kn(n),onMove:s,onEnd:(r,o)=>{delete this.session,i&&w.postRender(()=>i(r,o))}}}mount(){this.removePointerDownListener=q(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Ye=S.createContext(null);function Sa(){const t=S.useContext(Ye);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:n,register:s}=t,i=S.useId();S.useEffect(()=>s(i),[]);const r=S.useCallback(()=>n&&n(i),[i,n]);return!e&&n?[!1,r]:[!0]}const mi=S.createContext({}),gi=S.createContext({}),Bt={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Wn(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const gt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(T.test(t))t=parseFloat(t);else return t;const n=Wn(t,e.target.x),s=Wn(t,e.target.y);return`${n}% ${s}%`}},Aa={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=J.parse(t);if(i.length>5)return s;const r=J.createTransformer(t),o=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+o]/=a,i[1+o]/=l;const u=C(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),r(i)}},_t={};function ba(t){Object.assign(_t,t)}const{schedule:qe,cancel:du}=vs(queueMicrotask,!1);class wa extends S.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:r}=e;ba(Va),r&&(n.group&&n.group.add(r),s&&s.register&&i&&s.register(r),r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,onExitComplete:()=>this.safeToRemove()})),Bt.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:r}=this.props,o=s.projection;return o&&(o.isPresent=r,i||e.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),e.isPresent!==r&&(r?o.promote():o.relegate()||w.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),qe.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function yi(t){const[e,n]=Sa(),s=S.useContext(mi);return ce.jsx(wa,{...t,layoutGroup:s,switchLayoutGroup:S.useContext(gi),isPresent:e,safeToRemove:n})}const Va={borderRadius:{...gt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:gt,borderTopRightRadius:gt,borderBottomLeftRadius:gt,borderBottomRightRadius:gt,boxShadow:Aa},vi=["TopLeft","TopRight","BottomLeft","BottomRight"],Ca=vi.length,$n=t=>typeof t=="string"?parseFloat(t):t,Gn=t=>typeof t=="number"||T.test(t);function Da(t,e,n,s,i,r){i?(t.opacity=C(0,n.opacity!==void 0?n.opacity:1,Ma(s)),t.opacityExit=C(e.opacity!==void 0?e.opacity:1,0,Ra(s))):r&&(t.opacity=C(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,s));for(let o=0;o<Ca;o++){const a=`border${vi[o]}Radius`;let l=Hn(e,a),u=Hn(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||Gn(l)===Gn(u)?(t[a]=Math.max(C($n(l),$n(u),s),0),(_.test(u)||_.test(l))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=C(e.rotate||0,n.rotate||0,s))}function Hn(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Ma=Ti(0,.5,ws),Ra=Ti(.5,.95,k);function Ti(t,e,n){return s=>s<t?0:s>e?1:n(dt(t,e,s))}function zn(t,e){t.min=e.min,t.max=e.max}function N(t,e){zn(t.x,e.x),zn(t.y,e.y)}function Xn(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Yn(t,e,n,s,i){return t-=e,t=Ut(t,1/n,s),i!==void 0&&(t=Ut(t,1/i,s)),t}function Ea(t,e=0,n=1,s=.5,i,r=t,o=t){if(_.test(e)&&(e=parseFloat(e),e=C(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=C(r.min,r.max,s);t===r&&(a-=e),t.min=Yn(t.min,e,n,a,i),t.max=Yn(t.max,e,n,a,i)}function qn(t,e,[n,s,i],r,o){Ea(t,e[n],e[s],e[i],e.scale,r,o)}const La=["x","scaleX","originX"],Fa=["y","scaleY","originY"];function Zn(t,e,n,s){qn(t.x,e,La,n?n.x:void 0,s?s.x:void 0),qn(t.y,e,Fa,n?n.y:void 0,s?s.y:void 0)}function Jn(t){return t.translate===0&&t.scale===1}function xi(t){return Jn(t.x)&&Jn(t.y)}function Qn(t,e){return t.min===e.min&&t.max===e.max}function Ba(t,e){return Qn(t.x,e.x)&&Qn(t.y,e.y)}function ts(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Pi(t,e){return ts(t.x,e.x)&&ts(t.y,e.y)}function es(t){return O(t.x)/O(t.y)}function ns(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class ka{constructor(){this.members=[]}add(e){Ge(this.members,e),e.scheduleRender()}remove(e){if(He(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const r=this.members[i];if(r.isPresent!==!1){s=r;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function ja(t,e,n){let s="";const i=t.x.translate/e.x,r=t.y.translate/e.y,o=(n==null?void 0:n.z)||0;if((i||r||o)&&(s=`translate3d(${i}px, ${r}px, ${o}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:h,rotateY:f,skewX:d,skewY:m}=n;u&&(s=`perspective(${u}px) ${s}`),c&&(s+=`rotate(${c}deg) `),h&&(s+=`rotateX(${h}deg) `),f&&(s+=`rotateY(${f}deg) `),d&&(s+=`skewX(${d}deg) `),m&&(s+=`skewY(${m}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const Oa=(t,e)=>t.depth-e.depth;class Ia{constructor(){this.children=[],this.isDirty=!1}add(e){Ge(this.children,e),this.isDirty=!0}remove(e){He(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Oa),this.isDirty=!1,this.children.forEach(e)}}function kt(t){const e=F(t)?t.get():t;return Mr(e)?e.toValue():e}function Na(t,e){const n=K.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(Z(s),t(r-e))};return w.read(s,!0),()=>Z(s)}function Ua(t){return t instanceof SVGElement&&t.tagName!=="svg"}function _a(t,e,n){const s=F(t)?t:wt(t);return s.start($e("",s,e,n)),s.animation}const nt={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},vt=typeof window<"u"&&window.MotionDebug!==void 0,ie=["","X","Y","Z"],Ka={visibility:"hidden"},ss=1e3;let Wa=0;function oe(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function Si(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=ni(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",w,!(i||r))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&Si(s)}function Ai({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(o={},a=e==null?void 0:e()){this.id=Wa++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.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,vt&&(nt.totalNodes=nt.resolvedTargetDeltas=nt.recalculatedProjection=0),this.nodes.forEach(Ha),this.nodes.forEach(Za),this.nodes.forEach(Ja),this.nodes.forEach(za),vt&&window.MotionDebug.record(nt)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Ia)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new ze),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Ua(o),this.instance=o;const{layoutId:l,layout:u,visualElement:c}=this.options;if(c&&!c.current&&c.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(u||l)&&(this.isLayoutDirty=!0),t){let h;const f=()=>this.root.updateBlockedByResize=!1;t(o,()=>{this.root.updateBlockedByResize=!0,h&&h(),h=Na(f,250),Bt.hasAnimatedSinceResize&&(Bt.hasAnimatedSinceResize=!1,this.nodes.forEach(os))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:f,hasRelativeTargetChanged:d,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||c.getDefaultTransition()||sl,{onLayoutAnimationStart:y,onLayoutAnimationComplete:p}=c.getProps(),v=!this.targetLayout||!Pi(this.targetLayout,m)||d,x=!f&&d;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||x||f&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(h,x);const b={...Re(g,"layout"),onPlay:y,onComplete:p};(c.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b)}else f||os(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Z(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Qa),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Si(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const h=this.path[c];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(is);return}this.isUpdating||this.nodes.forEach(Ya),this.isUpdating=!1,this.nodes.forEach(qa),this.nodes.forEach($a),this.nodes.forEach(Ga),this.clearAllSnapshots();const a=K.now();E.delta=z(0,1e3/60,a-E.timestamp),E.timestamp=a,E.isProcessing=!0,qt.update.process(E),qt.preRender.process(E),qt.render.process(E),E.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,qe.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Xa),this.sharedNodes.forEach(tl)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,w.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){w.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=M(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a){const l=s(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!xi(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;o&&(a||et(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),il(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var o;const{visualElement:a}=this.options;if(!a)return M();const l=a.measureViewportBox();if(!(((o=this.scroll)===null||o===void 0?void 0:o.wasRoot)||this.path.some(ol))){const{scroll:c}=this.root;c&&(ct(l.x,c.offset.x),ct(l.y,c.offset.y))}return l}removeElementScroll(o){var a;const l=M();if(N(l,o),!((a=this.scroll)===null||a===void 0)&&a.wasRoot)return l;for(let u=0;u<this.path.length;u++){const c=this.path[u],{scroll:h,options:f}=c;c!==this.root&&h&&f.layoutScroll&&(h.wasRoot&&N(l,o),ct(l.x,h.offset.x),ct(l.y,h.offset.y))}return l}applyTransform(o,a=!1){const l=M();N(l,o);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&ht(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),et(c.latestValues)&&ht(l,c.latestValues)}return et(this.latestValues)&&ht(l,this.latestValues),l}removeTransform(o){const a=M();N(a,o);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!et(u.latestValues))continue;Ae(u.latestValues)&&u.updateSnapshot();const c=M(),h=u.measurePageBox();N(c,h),Zn(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return et(this.latestValues)&&Zn(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}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!==E.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==l;if(!(o||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:h,layoutId:f}=this.options;if(!(!this.layout||!(h||f))){if(this.resolvedRelativeTargetAt=E.timestamp,!this.targetDelta&&!this.relativeTarget){const d=this.getClosestProjectingParent();d&&d.layout&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=M(),this.relativeTargetOrigin=M(),Pt(this.relativeTargetOrigin,this.layout.layoutBox,d.layout.layoutBox),N(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=M(),this.targetWithTransforms=M()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),ra(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):N(this.target,this.layout.layoutBox),fi(this.target,this.targetDelta)):N(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const d=this.getClosestProjectingParent();d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=M(),this.relativeTargetOrigin=M(),Pt(this.relativeTargetOrigin,this.target,d.target),N(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}vt&&nt.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Ae(this.parent.latestValues)||hi(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var o;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let u=!0;if((this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty)&&(u=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===E.timestamp&&(u=!1),u)return;const{layout:c,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||h))return;N(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,d=this.treeScale.y;ma(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=M());const{target:m}=a;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Xn(this.prevProjectionDelta.x,this.projectionDelta.x),Xn(this.prevProjectionDelta.y,this.projectionDelta.y)),xt(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==d||!ns(this.projectionDelta.x,this.prevProjectionDelta.x)||!ns(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m)),vt&&nt.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)===null||a===void 0||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ut(),this.projectionDelta=ut(),this.projectionDeltaWithTransform=ut()}setAnimationOrigin(o,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},h=ut();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=M(),d=l?l.source:void 0,m=this.layout?this.layout.source:void 0,g=d!==m,y=this.getStack(),p=!y||y.members.length<=1,v=!!(g&&!p&&this.options.crossfade===!0&&!this.path.some(nl));this.animationProgress=0;let x;this.mixTargetDelta=b=>{const P=b/1e3;rs(h.x,o.x,P),rs(h.y,o.y,P),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Pt(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),el(this.relativeTarget,this.relativeTargetOrigin,f,P),x&&Ba(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=M()),N(x,this.relativeTarget)),g&&(this.animationValues=c,Da(c,u,this.latestValues,P,v,p)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=P},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Z(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=w.update(()=>{Bt.hasAnimatedSinceResize=!0,this.currentAnimation=_a(0,ss,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(ss),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&bi(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||M();const h=O(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+h;const f=O(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}N(a,l),ht(a,c),xt(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new ka),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&oe("z",o,u,this.animationValues);for(let c=0;c<ie.length;c++)oe(`rotate${ie[c]}`,o,u,this.animationValues),oe(`skew${ie[c]}`,o,u,this.animationValues);o.render();for(const c in u)o.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);o.scheduleRender()}getProjectionStyles(o){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Ka;const u={visibility:""},c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=kt(o==null?void 0:o.pointerEvents)||"",u.transform=c?c(this.latestValues,""):"none",u;const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){const g={};return this.options.layoutId&&(g.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,g.pointerEvents=kt(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!et(this.latestValues)&&(g.transform=c?c({},""):"none",this.hasProjected=!1),g}const f=h.animationValues||h.latestValues;this.applyTransformsToTarget(),u.transform=ja(this.projectionDeltaWithTransform,this.treeScale,f),c&&(u.transform=c(f,u.transform));const{x:d,y:m}=this.projectionDelta;u.transformOrigin=`${d.origin*100}% ${m.origin*100}% 0`,h.animationValues?u.opacity=h===this?(l=(a=f.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:u.opacity=h===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const g in _t){if(f[g]===void 0)continue;const{correct:y,applyTo:p}=_t[g],v=u.transform==="none"?f[g]:y(f[g],h);if(p){const x=p.length;for(let b=0;b<x;b++)u[p[b]]=v}else u[g]=v}return this.options.layoutId&&(u.pointerEvents=h===this?kt(o==null?void 0:o.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(is),this.root.sharedNodes.clear()}}}function $a(t){t.updateLayout()}function Ga(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:r}=t.options,o=n.source!==t.layout.source;r==="size"?U(h=>{const f=o?n.measuredBox[h]:n.layoutBox[h],d=O(f);f.min=s[h].min,f.max=f.min+d}):bi(r,n.layoutBox,s)&&U(h=>{const f=o?n.measuredBox[h]:n.layoutBox[h],d=O(s[h]);f.max=f.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[h].max=t.relativeTarget[h].min+d)});const a=ut();xt(a,s,n.layoutBox);const l=ut();o?xt(l,t.applyTransform(i,!0),n.measuredBox):xt(l,s,n.layoutBox);const u=!xi(a);let c=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:d}=h;if(f&&d){const m=M();Pt(m,n.layoutBox,f.layoutBox);const g=M();Pt(g,s,d.layoutBox),Pi(m,g)||(c=!0),h.options.layoutRoot&&(t.relativeTarget=g,t.relativeTargetOrigin=m,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeTargetChanged:c})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function Ha(t){vt&&nt.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function za(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Xa(t){t.clearSnapshot()}function is(t){t.clearMeasurements()}function Ya(t){t.isLayoutDirty=!1}function qa(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function os(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Za(t){t.resolveTargetDelta()}function Ja(t){t.calcProjection()}
1function Qa(t){t.resetSkewAndRotation()}function tl(t){t.removeLeadSnapshot()}function rs(t,e,n){t.translate=C(e.translate,0,n),t.scale=C(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function as(t,e,n,s){t.min=C(e.min,n.min,s),t.max=C(e.max,n.max,s)}function el(t,e,n,s){as(t.x,e.x,n.x,s),as(t.y,e.y,n.y,s)}function nl(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const sl={duration:.45,ease:[.4,0,.1,1]},ls=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),us=ls("applewebkit/")&&!ls("chrome/")?Math.round:k;function cs(t){t.min=us(t.min),t.max=us(t.max)}function il(t){cs(t.x),cs(t.y)}function bi(t,e,n){return t==="position"||t==="preserve-aspect"&&!oa(es(e),es(n),.2)}function ol(t){var e;return t!==t.root&&((e=t.scroll)===null||e===void 0?void 0:e.wasRoot)}const rl=Ai({attachResizeListener:(t,e)=>$(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),re={current:void 0},wi=Ai({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!re.current){const t=new rl({});t.mount(window),t.setOptions({layoutScroll:!0}),re.current=t}return re.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),al={pan:{Feature:Pa},drag:{Feature:xa,ProjectionNode:wi,MeasureLayout:yi}};function hs(t,e,n){const{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",n);const i=s[n?"onHoverStart":"onHoverEnd"];i&&w.postRender(()=>i(e,Mt(e)))}class ll extends Q{mount(){const{current:e,props:n}=this.node;e&&(this.unmount=Gi(e,s=>(hs(this.node,s,!0),i=>hs(this.node,i,!1)),{passive:!n.onHoverStart&&!n.onHoverEnd}))}unmount(){}}class ul extends Q{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Y($(this.node.current,"focus",()=>this.onFocus()),$(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Vi=(t,e)=>e?t===e?!0:Vi(t,e.parentElement):!1;function ae(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,Mt(n))}class cl extends Q{constructor(){super(...arguments),this.removeStartListeners=k,this.removeEndListeners=k,this.removeAccessibleListeners=k,this.startPointerPress=(e,n)=>{if(this.isPressing)return;this.removeEndListeners();const s=this.node.getProps(),r=q(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:c,globalTapTarget:h}=this.node.getProps(),f=!h&&!Vi(this.node.current,a.target)?c:u;f&&w.update(()=>f(a,l))},{passive:!(s.onTap||s.onPointerUp)}),o=q(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(s.onTapCancel||s.onPointerCancel)});this.removeEndListeners=Y(r,o),this.startPress(e,n)},this.startAccessiblePress=()=>{const e=r=>{if(r.key!=="Enter"||this.isPressing)return;const o=a=>{a.key!=="Enter"||!this.checkPressEnd()||ae("up",(l,u)=>{const{onTap:c}=this.node.getProps();c&&w.postRender(()=>c(l,u))})};this.removeEndListeners(),this.removeEndListeners=$(this.node.current,"keyup",o),ae("down",(a,l)=>{this.startPress(a,l)})},n=$(this.node.current,"keydown",e),s=()=>{this.isPressing&&ae("cancel",(r,o)=>this.cancelPress(r,o))},i=$(this.node.current,"blur",s);this.removeAccessibleListeners=Y(n,i)}}startPress(e,n){this.isPressing=!0;const{onTapStart:s,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),s&&w.postRender(()=>s(e,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Hi()}cancelPress(e,n){if(!this.checkPressEnd())return;const{onTapCancel:s}=this.node.getProps();s&&w.postRender(()=>s(e,n))}mount(){const e=this.node.getProps(),n=q(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),s=$(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Y(n,s)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const we=new WeakMap,le=new WeakMap,hl=t=>{const e=we.get(t.target);e&&e(t)}
vendor: 20,392 bytes, line 1
1,fl=t=>{t.forEach(hl)};function dl({root:t,...e}){const n=t||document;le.has(n)||le.set(n,{});const s=le.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(fl,{root:t,...e})),s[i]}function pl(t,e,n){const s=dl(e);return we.set(t,n),s.observe(t),()=>{we.delete(t),s.unobserve(t)}}const ml={some:0,all:1};class gl extends Q{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:r}=e,o={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:ml[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,r&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:h}=this.node.getProps(),f=u?c:h;f&&f(l)};return pl(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(yl(e,n))&&this.startObserver()}unmount(){}}function yl({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const vl={inView:{Feature:gl},tap:{Feature:cl},focus:{Feature:ul},hover:{Feature:ll}},Tl={layout:{ProjectionNode:wi,MeasureLayout:yi}},Ci=S.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),Ht=S.createContext({}),Ze=typeof window<"u",xl=Ze?S.useLayoutEffect:S.useEffect,Di=S.createContext({strict:!1});function Pl(t,e,n,s,i){var r,o;const{visualElement:a}=S.useContext(Ht),l=S.useContext(Di),u=S.useContext(Ye),c=S.useContext(Ci).reducedMotion,h=S.useRef();s=s||l.renderer,!h.current&&s&&(h.current=s(t,{visualState:e,parent:a,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:c}));const f=h.current,d=S.useContext(gi);f&&!f.projection&&i&&(f.type==="html"||f.type==="svg")&&Sl(h.current,n,i,d);const m=S.useRef(!1);S.useInsertionEffect(()=>{f&&m.current&&f.update(n,u)});const g=n[ei],y=S.useRef(!!g&&!(!((r=window.MotionHandoffIsComplete)===null||r===void 0)&&r.call(window,g))&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,g)));return xl(()=>{f&&(m.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),qe.render(f.render),y.current&&f.animationState&&f.animationState.animateChanges())}),S.useEffect(()=>{f&&(!y.current&&f.animationState&&f.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var p;(p=window.MotionHandoffMarkAsComplete)===null||p===void 0||p.call(window,g)}),y.current=!1))}),f}function Sl(t,e,n,s){const{layoutId:i,layout:r,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Mi(t.parent)),t.projection.setOptions({layoutId:i,layout:r,alwaysMeasureLayout:!!o||a&<(a),visualElement:t,animationType:typeof r=="string"?r:"both",initialPromotionConfig:s,layoutScroll:l,layoutRoot:u})}function Mi(t){if(t)return t.options.allowProjection!==!1?t.projection:Mi(t.parent)}function Al(t,e,n){return S.useCallback(s=>{s&&t.mount&&t.mount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):lt(n)&&(n.current=s))},[e])}function zt(t){return Wt(t.animate)||Me.some(e=>St(t[e]))}function Ri(t){return!!(zt(t)||t.variants)}function bl(t,e){if(zt(t)){const{initial:n,animate:s}=t;return{initial:n===!1||St(n)?n:void 0,animate:St(s)?s:void 0}}return t.inherit!==!1?e:{}}function wl(t){const{initial:e,animate:n}=bl(t,S.useContext(Ht));return S.useMemo(()=>({initial:e,animate:n}),[fs(e),fs(n)])}function fs(t){return Array.isArray(t)?t.join(" "):t}const ds={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"]},pt={};for(const t in ds)pt[t]={isEnabled:e=>ds[t].some(n=>!!e[n])};function Vl(t){for(const e in t)pt[e]={...pt[e],...t[e]}}const Cl=Symbol.for("motionComponentSymbol");function Dl({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:s,Component:i}){t&&Vl(t);function r(a,l){let u;const c={...S.useContext(Ci),...a,layoutId:Ml(a)},{isStatic:h}=c,f=wl(a),d=s(a,h);if(!h&&Ze){Rl();const m=El(c);u=m.MeasureLayout,f.visualElement=Pl(i,d,c,e,m.ProjectionNode)}return ce.jsxs(Ht.Provider,{value:f,children:[u&&f.visualElement?ce.jsx(u,{visualElement:f.visualElement,...c}):null,n(i,a,Al(d,f.visualElement,l),d,h,f.visualElement)]})}const o=S.forwardRef(r);return o[Cl]=i,o}function Ml({layoutId:t}){const e=S.useContext(mi).id;return e&&t!==void 0?e+"-"+t:t}function Rl(t,e){S.useContext(Di).strict}function El(t){const{drag:e,layout:n}=pt;if(!e&&!n)return{};const s={...e,...n};return{MeasureLayout:e!=null&&e.isEnabled(t)||n!=null&&n.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}const Ll=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Je(t){return typeof t!="string"||t.includes("-")?!1:!!(Ll.indexOf(t)>-1||/[A-Z]/u.test(t))}function Ei(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const r in n)t.style.setProperty(r,n[r])}const Li=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 Fi(t,e,n,s){Ei(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Li.has(i)?i:Xe(i),e.attrs[i])}function Bi(t,{layout:e,layoutId:n}){return ot.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!_t[t]||t==="opacity")}function Qe(t,e,n){var s;const{style:i}=t,r={};for(const o in i)(F(i[o])||e.style&&F(e.style[o])||Bi(o,t)||((s=n==null?void 0:n.getValue(o))===null||s===void 0?void 0:s.liveStyle)!==void 0)&&(r[o]=i[o]);return r}function ki(t,e,n){const s=Qe(t,e,n);for(const i in t)if(F(t[i])||F(e[i])){const r=Vt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=t[i]}return s}function Fl(t){const e=S.useRef(null);return e.current===null&&(e.current=t()),e.current}function Bl({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},s,i,r){const o={latestValues:kl(s,i,r,t),renderState:e()};return n&&(o.mount=a=>n(s,a,o)),o}const ji=t=>(e,n)=>{const s=S.useContext(Ht),i=S.useContext(Ye),r=()=>Bl(t,e,s,i);return n?r():Fl(r)};function kl(t,e,n,s){const i={},r=s(t,{});for(const f in r)i[f]=kt(r[f]);let{initial:o,animate:a}=t;const l=zt(t),u=Ri(t);e&&u&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const h=c?a:o;if(h&&typeof h!="boolean"&&!Wt(h)){const f=Array.isArray(h)?h:[h];for(let d=0;d<f.length;d++){const m=Ce(t,f[d]);if(m){const{transitionEnd:g,transition:y,...p}=m;for(const v in p){let x=p[v];if(Array.isArray(x)){const b=c?x.length-1:0;x=x[b]}x!==null&&(i[v]=x)}for(const v in g)i[v]=g[v]}}}return i}const tn=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),Oi=()=>({...tn(),attrs:{}}),Ii=(t,e)=>e&&typeof t=="number"?e.transform(t):t,jl={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Ol=Vt.length;function Il(t,e,n){let s="",i=!0;for(let r=0;r<Ol;r++){const o=Vt[r],a=t[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const u=Ii(a,Oe[o]);if(!l){i=!1;const c=jl[o]||o;s+=`${c}(${u}) `}n&&(e[o]=u)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function en(t,e,n){const{style:s,vars:i,transformOrigin:r}=t;let o=!1,a=!1;for(const l in e){const u=e[l];if(ot.has(l)){o=!0;continue}else if(Rs(l)){i[l]=u;continue}else{const c=Ii(u,Oe[l]);l.startsWith("origin")?(a=!0,r[l]=c):s[l]=c}}if(e.transform||(o||n?s.transform=Il(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=r;s.transformOrigin=`${l} ${u} ${c}`}}function ps(t,e,n){return typeof t=="string"?t:T.transform(e+n*t)}function Nl(t,e,n){const s=ps(e,t.x,t.width),i=ps(n,t.y,t.height);return`${s} ${i}`}const Ul={offset:"stroke-dashoffset",array:"stroke-dasharray"},_l={offset:"strokeDashoffset",array:"strokeDasharray"};function Kl(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?Ul:_l;t[r.offset]=T.transform(-s);const o=T.transform(e),a=T.transform(n);t[r.array]=`${o} ${a}`}function nn(t,{attrX:e,attrY:n,attrScale:s,originX:i,originY:r,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},c,h){if(en(t,u,h),c){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:f,style:d,dimensions:m}=t;f.transform&&(m&&(d.transform=f.transform),delete f.transform),m&&(i!==void 0||r!==void 0||d.transform)&&(d.transformOrigin=Nl(m,i!==void 0?i:.5,r!==void 0?r:.5)),e!==void 0&&(f.x=e),n!==void 0&&(f.y=n),s!==void 0&&(f.scale=s),o!==void 0&&Kl(f,o,a,l,!1)}const sn=t=>typeof t=="string"&&t.toLowerCase()==="svg",Wl={useVisualState:ji({scrapeMotionValuesFromProps:ki,createRenderState:Oi,onMount:(t,e,{renderState:n,latestValues:s})=>{w.read(()=>{try{n.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),w.render(()=>{nn(n,s,sn(e.tagName),t.transformTemplate),Fi(e,n)})}})},$l={useVisualState:ji({scrapeMotionValuesFromProps:Qe,createRenderState:tn})};function Ni(t,e,n){for(const s in e)!F(e[s])&&!Bi(s,n)&&(t[s]=e[s])}function Gl({transformTemplate:t},e){return S.useMemo(()=>{const n=tn();return en(n,e,t),Object.assign({},n.vars,n.style)},[e])}function Hl(t,e){const n=t.style||{},s={};return Ni(s,n,t),Object.assign(s,Gl(t,e)),s}function zl(t,e){const n={},s=Hl(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=s,n}const Xl=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Kt(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Xl.has(t)}let Ui=t=>!Kt(t);function Yl(t){t&&(Ui=e=>e.startsWith("on")?!Kt(e):t(e))}try{Yl(require("@emotion/is-prop-valid").default)}catch{}function ql(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(Ui(i)||n===!0&&Kt(i)||!e&&!Kt(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}function Zl(t,e,n,s){const i=S.useMemo(()=>{const r=Oi();return nn(r,e,sn(s),t.transformTemplate),{...r.attrs,style:{...r.style}}},[e]);if(t.style){const r={};Ni(r,t.style,t),i.style={...r,...i.style}}return i}function Jl(t=!1){return(n,s,i,{latestValues:r},o)=>{const l=(Je(n)?Zl:zl)(s,r,o,n),u=ql(s,typeof n=="string",t),c=n!==S.Fragment?{...u,...l,ref:i}:{},{children:h}=s,f=S.useMemo(()=>F(h)?h.get():h,[h]);return S.createElement(n,{...c,children:f})}}function Ql(t,e){return function(s,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...Je(s)?Wl:$l,preloadedFeatures:t,useRender:Jl(i),createVisualElement:e,Component:s};return Dl(o)}}const Ve={current:null},_i={current:!1};function tu(){if(_i.current=!0,!!Ze)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Ve.current=t.matches;t.addListener(e),e()}else Ve.current=!1}function eu(t,e,n){for(const s in e){const i=e[s],r=n[s];if(F(i))t.addValue(s,i);else if(F(r))t.addValue(s,wt(i,{owner:t}));else if(r!==i)if(t.hasValue(s)){const o=t.getValue(s);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=t.getStaticValue(s);t.addValue(s,wt(o!==void 0?o:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const ms=new WeakMap,nu=[...Fs,L,J],su=t=>nu.find(Ls(t)),gs=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class iu{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:r,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Be,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 f=K.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,w.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!r,this.isControllingVariants=zt(n),this.isVariantNode=Ri(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:c,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in h){const d=h[f];l[f]!==void 0&&F(d)&&d.set(l[f],!1)}}mount(e){this.current=e,ms.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),_i.current||tu(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ve.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){ms.delete(this.current),this.projection&&this.projection.unmount(),Z(this.notifyUpdate),Z(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const s=ot.has(e),i=n.on("change",a=>{this.latestValues[e]=a,this.props.onUpdate&&w.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0)}),r=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),r(),o&&o(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in pt){const n=pt[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const r=this.features[e];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):M()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<gs.length;s++){const i=gs[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r="on"+i,o=e[r];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=eu(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]: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(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=wt(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){var s;let i=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(s=this.getBaseTargetFromProps(this.props,e))!==null&&s!==void 0?s:this.readValueFromInstance(this.current,e,this.options);return i!=null&&(typeof i=="string"&&(Ds(i)||Cs(i))?i=parseFloat(i):!su(i)&&J.test(n)&&(i=_s(e,n)),this.setBaseTarget(e,F(i)?i.get():i)),F(i)?i.get():i}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:s}=this.props;let i;if(typeof s=="string"||typeof s=="object"){const o=Ce(this.props,s,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);o&&(i=o[e])}if(s&&i!==void 0)return i;const r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!F(r)?r:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new ze),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class Ki extends iu{constructor(){super(...arguments),this.KeyframeResolver=Ks}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;F(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function ou(t){return window.getComputedStyle(t)}class ru extends Ki{constructor(){super(...arguments),this.type="html",this.renderInstance=Ei}readValueFromInstance(e,n){if(ot.has(n)){const s=Ie(n);return s&&s.default||0}else{const s=ou(e),i=(Rs(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return di(e,n)}build(e,n,s){en(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return Qe(e,n,s)}}class au extends Ki{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=M}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(ot.has(n)){const s=Ie(n);return s&&s.default||0}return n=Li.has(n)?n:Xe(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return ki(e,n,s)}build(e,n,s){nn(e,n,this.isSVGTag,s.transformTemplate)}renderInstance(e,n,s,i){Fi(e,n,s,i)}mount(e){this.isSVGTag=sn(e.tagName),super.mount(e)}}const lu=(t,e)=>Je(t)?new au(e):new ru(e,{allowProjection:t!==S.Fragment}),uu=Ql({...qr,...vl,...al,...Tl},lu),mu=zi(uu);export{mu as m};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.