vendor: 30,045 bytes, lines 1-9
1import{r as Zo,a as w}from"./glyphs-myXpDwvS.js";var be={exports:{}},Ct={};/** 2 * @license React 3 * react-jsx-runtime.production.min.js 4 * 5 * Copyright (c) Facebook, Inc. and its affiliates. 6 * 7 * This source code is licensed under the MIT license found in the 8 * LICENSE file in the root directory of this source tree. 9 */var Wn;function Jo(){if(Wn)return Ct;Wn=1;var t=Zo(),e=Symbol.for("react.element"),n=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,r={key:!0,ref:!0,__self:!0,__source:!0};function o(a,l,u){var c,h={},f=null,d=null;u!==void 0&&(f=""+u),l.key!==void 0&&(f=""+l.key),l.ref!==void 0&&(d=l.ref);for(c in l)s.call(l,c)&&!r.hasOwnProperty(c)&&(h[c]=l[c]);if(a&&a.defaultProps)for(c in l=a.defaultProps,l)h[c]===void 0&&(h[c]=l[c]);return{$$typeof:e,type:a,key:f,ref:d,props:h,_owner:i.current}}return Ct.Fragment=n,Ct.jsx=o,Ct.jsxs=o,Ct}var Un;function Qo(){return Un||(Un=1,be.exports=Jo()),be.exports}var _=Qo();const pn=w.createContext({});function yt(t){const e=w.useRef(null);return e.current===null&&(e.current=t()),e.current}const tr=typeof window<"u",ge=tr?w.useLayoutEffect:w.useEffect,ye=w.createContext(null);function mn(t,e){t.indexOf(e)===-1&&t.push(e)}function re(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}function er([...t],e,n){const s=e<0?t.length+e:e;if(s>=0&&s<t.length){const i=n<0?t.length+n:n,[r]=t.splice(e,1);t.splice(i,0,r)}return t}const tt=(t,e,n)=>n>e?e:n<t?t:n;let ve=()=>{};const at={},ai=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),li=t=>typeof t=="object"&&t!==null,ci=t=>/^0[^.\s]+$/u.test(t);function ui(t){let e;return()=>(e===void 0&&(e=t()),e)}const z=t=>t,Kt=(...t)=>t.reduce((e,n)=>s=>n(e(s))),jt=(t,e,n)=>{const s=e-t;return s?(n-t)/s:1};class gn{constructor(){this.subscriptions=[]}add(e){return mn(this.subscriptions,e),()=>re(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 U=t=>t*1e3,$=t=>t/1e3,hi=(t,e)=>e?t*(1e3/e):0,fi=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,nr=1e-7,sr=12;function ir(t,e,n,s,i){let r,o,a=0;do o=e+(n-e)/2,r=fi(o,s,i)-t,r>0?n=o:e=o;while(Math.abs(r)>nr&&++a<sr);return o}function $t(t,e,n,s){if(t===e&&n===s)return z;const i=r=>ir(r,0,1,t,n);return r=>r===0||r===1?r:fi(i(r),e,s)}const di=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,pi=t=>e=>1-t(1-e),mi=$t(.33,1.53,.69,.99),yn=pi(mi),gi=di(yn),yi=t=>t>=1?1:(t*=2)<1?.5*yn(t):.5*(2-Math.pow(2,-10*(t-1))),vn=t=>1-Math.sin(Math.acos(t)),vi=pi(vn),xi=di(vn),or=$t(.42,0,1,1),rr=$t(0,0,.58,1),Ti=$t(.42,0,.58,1),ar=t=>Array.isArray(t)&&typeof t[0]!="number",wi=t=>Array.isArray(t)&&typeof t[0]=="number",lr={linear:z,easeIn:or,easeInOut:Ti,easeOut:rr,circIn:vn,circInOut:xi,circOut:vi,backIn:yn,backInOut:gi,backOut:mi,anticipate:yi},cr=t=>typeof t=="string",Kn=t=>{if(wi(t)){ve(t.length===4);const[e,n,s,i]=t;return $t(e,n,s,i)}else if(cr(t))return lr[t];return t},Gt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function ur(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.add(u),u},cancel:u=>{n.delete(u),r.delete(u)},process:u=>{if(o=u,s){i=!0;return}s=!0;const c=e;e=n,n=c,e.forEach(a),e.clear(),s=!1,i&&(i=!1,l.process(u))}};return l}const hr=40;function Si(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=Gt.reduce((v,T)=>(v[T]=ur(r),v),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:h,preRender:f,render:d,postRender:p}=o,y=()=>{const v=at.useManualTiming,T=v?i.timestamp:performance.now();n=!1,v||(i.delta=s?1e3/60:Math.max(Math.min(T-i.timestamp,hr),1)),i.timestamp=T,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),h.process(i),f.process(i),d.process(i),p.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(y))},m=()=>{n=!0,s=!0,i.isProcessing||t(y)};return{schedule:Gt.reduce((v,T)=>{const b=o[T];return v[T]=(M,V=!1,P=!1)=>(n||m(),b.schedule(M,V,P)),v},{}),cancel:v=>{for(let T=0;T<Gt.length;T++)o[Gt[T]].cancel(v)},state:i,steps:o}}const{schedule:E,cancel:it,state:j,steps:Ae}=Si(typeof requestAnimationFrame<"u"?requestAnimationFrame:z,!0);let Jt;function fr(){Jt=void 0}const N={now:()=>(Jt===void 0&&N.set(j.isProcessing||at.useManualTiming?j.timestamp:performance.now()),Jt),set:t=>{Jt=t,queueMicrotask(fr)}},Pi=t=>e=>typeof e=="string"&&e.startsWith(t),bi=Pi("--"),dr=Pi("var(--"),xn=t=>dr(t)?pr.test(t.split("/*")[0].trim()):!1,pr=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function $n(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const bt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Nt={...bt,transform:t=>tt(0,1,t)},Ht={...bt,default:1},Rt=t=>Math.round(t*1e5)/1e5,Tn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function mr(t){return t==null}const gr=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,wn=(t,e)=>n=>!!(typeof n=="string"&&gr.test(n)&&n.startsWith(t)||e&&!mr(n)&&Object.prototype.hasOwnProperty.call(n,e)),Ai=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,r,o,a]=s.match(Tn);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},yr=t=>tt(0,255,t),Ve={...bt,transform:t=>Math.round(yr(t))},ft={test:wn("rgb","red"),parse:Ai("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+Ve.transform(t)+", "+Ve.transform(e)+", "+Ve.transform(n)+", "+Rt(Nt.transform(s))+")"};function vr(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 Ue={test:wn("#"),parse:vr,transform:ft.transform},_t=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),st=_t("deg"),Q=_t("%"),S=_t("px"),xr=_t("vh"),Tr=_t("vw"),_n={...Q,parse:t=>Q.parse(t)/100,transform:t=>Q.transform(t*100)},Tt={test:wn("hsl","hue"),parse:Ai("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+Q.transform(Rt(e))+", "+Q.transform(Rt(n))+", "+Rt(Nt.transform(s))+")"},k={test:t=>ft.test(t)||Ue.test(t)||Tt.test(t),parse:t=>ft.test(t)?ft.parse(t):Tt.test(t)?Tt.parse(t):Ue.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?ft.transform(t):Tt.transform(t),getAnimatableNone:t=>{const e=k.parse(t);return e.alpha=0,k.transform(e)}},wr=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Sr(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(Tn))==null?void 0:e.length)||0)+(((n=t.match(wr))==null?void 0:n.length)||0)>0}const Vi="number",Ci="color",Pr="var",br="var(",zn="${}",Ar=/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 Pt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const a=e.replace(Ar,l=>(k.test(l)?(s.color.push(r),i.push(Ci),n.push(k.parse(l))):l.startsWith(br)?(s.var.push(r),i.push(Pr),n.push(l)):(s.number.push(r),i.push(Vi),n.push(parseFloat(l))),++r,zn)).split(zn);return{values:n,split:a,indexes:s,types:i}}function Vr(t){return Pt(t).values}function Mi({split:t,types:e}){const n=t.length;return s=>{let i="";for(let r=0;r<n;r++)if(i+=t[r],s[r]!==void 0){const o=e[r];o===Vi?i+=Rt(s[r]):o===Ci?i+=k.transform(s[r]):i+=s[r]}return i}}function Cr(t){return Mi(Pt(t))}const Mr=t=>typeof t=="number"?0:k.test(t)?k.getAnimatableNone(t):t,Dr=(t,e)=>typeof t=="number"?e!=null&&e.trim().endsWith("/")?t:0:Mr(t);function Er(t){const e=Pt(t);return Mi(e)(e.values.map((s,i)=>Dr(s,e.split[i])))}const X={test:Sr,parse:Vr,createTransformer:Cr,getAnimatableNone:Er};function Ce(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 Rr({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=Ce(l,a,t+1/3),r=Ce(l,a,t),o=Ce(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}function ae(t,e){return n=>n>0?e:t}const D=(t,e,n)=>t+(e-t)*n,Me=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},Lr=[Ue,ft,Tt],kr=t=>Lr.find(e=>e.test(t));function Gn(t){const e=kr(t);if(!e)return!1;let n=e.parse(t);return e===Tt&&(n=Rr(n)),n}const Hn=(t,e)=>{const n=Gn(t),s=Gn(e);if(!n||!s)return ae(t,e);const i={...n};return r=>(i.red=Me(n.red,s.red,r),i.green=Me(n.green,s.green,r),i.blue=Me(n.blue,s.blue,r),i.alpha=D(n.alpha,s.alpha,r),ft.transform(i))},Ke=new Set(["none","hidden"]);function Ir(t,e){return Ke.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function Br(t,e){return n=>D(t,e,n)}function Sn(t){return typeof t=="number"?Br:typeof t=="string"?xn(t)?ae:k.test(t)?Hn:jr:Array.isArray(t)?Di:typeof t=="object"?k.test(t)?Hn:Fr:ae}function Di(t,e){const n=[...t],s=n.length,i=t.map((r,o)=>Sn(r)(r,e[o]));return r=>{for(let o=0;o<s;o++)n[o]=i[o](r);return n}}function Fr(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=Sn(t[i])(t[i],e[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}}function Or(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const r=e.types[i],o=t.indexes[r][s[r]],a=t.values[o]??0;n[i]=a,s[r]++}return n}const jr=(t,e)=>{const n=X.createTransformer(e),s=Pt(t),i=Pt(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?Ke.has(t)&&!i.values.length||Ke.has(e)&&!s.values.length?Ir(t,e):Kt(Di(Or(s,i),i.values),n):ae(t,e)};function Ei(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?D(t,e,n):Sn(t)(t,e)}const Nr=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>E.update(e,n),stop:()=>it(e),now:()=>j.isProcessing?j.timestamp:N.now()}},Ri=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let r=0;r<i;r++)s+=Math.round(t(r/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},le=2e4;function Pn(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<le;)e+=n,s=t.next(e);return e>=le?1/0:e}function Wr(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(Pn(s),le);return{type:"keyframes",ease:r=>s.next(i*r).value/e,duration:$(i)}}const L={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};function $e(t,e){return t*Math.sqrt(1-e*e)}const Ur=12;function Kr(t,e,n){let s=n;for(let i=1;i<Ur;i++)s=s-t(s)/e(s);return s}const De=.001;function $r({duration:t=L.duration,bounce:e=L.bounce,velocity:n=L.velocity,mass:s=L.mass}){let i,r,o=1-e;o=tt(L.minDamping,L.maxDamping,o),t=tt(L.minDuration,L.maxDuration,$(t)),o<1?(i=u=>{const c=u*o,h=c*t,f=c-n,d=$e(u,o),p=Math.exp(-h);return De-f/d*p},r=u=>{const h=u*o*t,f=h*n+n,d=Math.pow(o,2)*Math.pow(u,2)*t,p=Math.exp(-h),y=$e(Math.pow(u,2),o);return(-i(u)+De>0?-1:1)*((f-d)*p)/y}):(i=u=>{const c=Math.exp(-u*t),h=(u-n)*t+1;return-De+c*h},r=u=>{const c=Math.exp(-u*t),h=(n-u)*(t*t);return c*h});const a=5/t,l=Kr(i,r,a);if(t=U(t),isNaN(l))return{stiffness:L.stiffness,damping:L.damping,duration:t};{const u=Math.pow(l,2)*s;return{stiffness:u,damping:o*2*Math.sqrt(s*u),duration:t}}}const _r=["duration","bounce"],zr=["stiffness","damping","mass"];function Xn(t,e){return e.some(n=>t[n]!==void 0)}function Gr(t){let e={velocity:L.velocity,stiffness:L.stiffness,damping:L.damping,mass:L.mass,isResolvedFromDuration:!1,...t};if(!Xn(t,zr)&&Xn(t,_r))if(e.velocity=0,t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,r=2*tt(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:L.mass,stiffness:i,damping:r}}else{const n=$r({...t,velocity:0});e={...e,...n,mass:L.mass},e.isResolvedFromDuration=!0}return e}function ce(t=L.visualDuration,e=L.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}=Gr({...n,velocity:-$(n.velocity||0)}),p=f||0,y=u/(2*Math.sqrt(l*c)),m=o-r,g=$(Math.sqrt(l/c)),x=Math.abs(m)<5;s||(s=x?L.restSpeed.granular:L.restSpeed.default),i||(i=x?L.restDelta.granular:L.restDelta.default);let v,T,b,M,V,P;if(y<1)b=$e(g,y),M=(p+y*g*m)/b,v=A=>{const R=Math.exp(-y*g*A);return o-R*(M*Math.sin(b*A)+m*Math.cos(b*A))},V=y*g*M+m*b,P=y*g*m-M*b,T=A=>Math.exp(-y*g*A)*(V*Math.sin(b*A)+P*Math.cos(b*A));else if(y===1){v=R=>o-Math.exp(-g*R)*(m+(p+g*m)*R);const A=p+g*m;T=R=>Math.exp(-g*R)*(g*A*R-p)}else{const A=g*Math.sqrt(y*y-1);v=Y=>{const nt=Math.exp(-y*g*Y),q=Math.min(A*Y,300);return o-nt*((p+y*g*m)*Math.sinh(q)+A*m*Math.cosh(q))/A};const R=(p+y*g*m)/A,F=y*g*R-m*A,et=y*g*m-R*A;T=Y=>{const nt=Math.exp(-y*g*Y),q=Math.min(A*Y,300);return nt*(F*Math.sinh(q)+et*Math.cosh(q))}}const C={calculatedDuration:d&&h||null,velocity:A=>U(T(A)),next:A=>{if(!d&&y<1){const F=Math.exp(-y*g*A),et=Math.sin(b*A),Y=Math.cos(b*A),nt=o-F*(M*et+m*Y),q=U(F*(V*et+P*Y));return a.done=Math.abs(q)<=s&&Math.abs(o-nt)<=i,a.value=a.done?o:nt,a}const R=v(A);if(d)a.done=A>=h;else{const F=U(T(A));a.done=Math.abs(F)<=s&&Math.abs(o-R)<=i}return a.value=a.done?o:R,a},toString:()=>{const A=Math.min(Pn(C),le),R=Ri(F=>C.next(A*F).value,A,30);return A+"ms "+R},toTransition:()=>{}};return C}ce.applyToOptions=t=>{const e=Wr(t,100,ce);return t.ease=e.ease,t.duration=U(e.duration),t.type="keyframes",t};const Hr=5;function Li(t,e,n){const s=Math.max(e-Hr,0);return hi(n-t(s),e-s)}function _e({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=P=>a!==void 0&&P<a||l!==void 0&&P>l,p=P=>a===void 0?l:l===void 0||Math.abs(a-P)<Math.abs(l-P)?a:l;let y=n*e;const m=h+y,g=o===void 0?m:o(m);g!==m&&(y=g-h);const x=P=>-y*Math.exp(-P/s),v=P=>g+x(P),T=P=>{const C=x(P),A=v(P);f.done=Math.abs(C)<=u,f.value=f.done?g:A};let b,M;const V=P=>{d(f.value)&&(b=P,M=ce({keyframes:[f.value,p(f.value)],velocity:Li(v,P,f.value),damping:i,stiffness:r,restDelta:u,restSpeed:c}))};return V(0),{calculatedDuration:null,next:P=>{let C=!1;return!M&&b===void 0&&(C=!0,T(P),V(P)),b!==void 0&&P>=b?M.next(P-b):(!C&&T(P),f)}}}function Xr(t,e,n){const s=[],i=n||at.mix||Ei,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]||z:e;a=Kt(l,a)}s.push(a)}return s}function ki(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const r=t.length;if(ve(r===e.length),r===1)return()=>e[0];if(r===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=Xr(e,s,i),l=a.length,u=c=>{if(o&&c<t[0])return e[0];let h=0;if(l>1)for(;h<t.length-2&&!(c<t[h+1]);h++);const f=jt(t[h],t[h+1],c);return a[h](f)};return n?c=>u(tt(t[0],t[r-1],c)):u}function Yr(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=jt(0,e,s);t.push(D(n,1,i))}}function qr(t){const e=[0];return Yr(e,t.length-1),e}function Zr(t,e){return t.map(n=>n*e)}function Jr(t,e){return t.map(()=>e||Ti).splice(0,t.length-1)}function Lt({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=ar(s)?s.map(Kn):Kn(s),r={done:!1,value:e[0]},o=Zr(n&&n.length===e.length?n:qr(e),t),a=ki(o,e,{ease:Array.isArray(i)?i:Jr(e,i)});return{calculatedDuration:t,next:l=>(r.value=a(l),r.done=l>=t,r)}}const Qr=t=>t!==null;function xe(t,{repeat:e,repeatType:n="loop"},s,i=1){const r=t.filter(Qr),a=i<0||e&&n!=="loop"&&e%2===1?0:r.length-1;return!a||s===void 0?r[a]:s}const ta={decay:_e,inertia:_e,tween:Lt,keyframes:Lt,spring:ce};function Ii(t){typeof t.type=="string"&&(t.type=ta[t.type])}class bn{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const ea=t=>t/100;class ue extends bn{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var s,i;const{motionValue:n}=this.options;n&&n.updatedAt!==N.now()&&this.tick(N.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(s=this.options).onStop)==null||i.call(s))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;Ii(e);const{type:n=Lt,repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=e;let{keyframes:a}=e;const l=n||Lt;l!==Lt&&typeof a[0]!="number"&&(this.mixKeyframes=Kt(ea,Ei(a[0],a[1])),a=[0,100]);const u=l({...e,keyframes:a});r==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=Pn(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=u}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:s,totalDuration:i,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return s.next(0);const{delay:u=0,keyframes:c,repeat:h,repeatType:f,repeatDelay:d,type:p,onUpdate:y,finalKeyframe:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const g=this.currentTime-u*(this.playbackSpeed>=0?1:-1),x=this.playbackSpeed>=0?g<0:g>i;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let v=this.currentTime,T=s;if(h){const P=Math.min(this.currentTime,i)/a;let C=Math.floor(P),A=P%1;!A&&P>=1&&(A=1),A===1&&C--,C=Math.min(C,h+1),!!(C%2)&&(f==="reverse"?(A=1-A,d&&(A-=d/a)):f==="mirror"&&(T=o)),v=tt(0,1,A)*a}let b;x?(this.delayState.value=c[0],b=this.delayState):b=T.next(v),r&&!x&&(b.value=r(b.value));let{done:M}=b;!x&&l!==null&&(M=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const V=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&M);return V&&p!==_e&&(b.value=xe(c,this.options,m,this.speed)),y&&y(b.value),V&&this.finish(),b}then(e,n){return this.finished.then(e,n)}get duration(){return $(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+$(e)}get time(){return $(this.currentTime)}set time(e){e=U(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);const n=this.generator.next(e).value;return Li(s=>this.generator.next(s).value,e,n)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;n&&this.driver&&this.updateTime(N.now()),this.playbackSpeed=e,n&&this.driver&&(this.time=$(this.currentTime))}play(){var i,r;if(this.isStopped)return;const{driver:e=Nr,startTime:n}=this.options;this.driver||(this.driver=e(o=>this.tick(o))),(r=(i=this.options).onPlay)==null||r.call(i);const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(N.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(e=this.options).onComplete)==null||n.call(e)}cancel(){var e,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(e=this.options).onCancel)==null||n.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),e.observe(this)}}function na(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const dt=t=>t*180/Math.PI,ze=t=>{const e=dt(Math.atan2(t[1],t[0]));return Ge(e)},sa={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:ze,rotateZ:ze,skewX:t=>dt(Math.atan(t[1])),skewY:t=>dt(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Ge=t=>(t=t%360,t<0&&(t+=360),t),Yn=ze,qn=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Zn=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),ia={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:qn,scaleY:Zn,scale:t=>(qn(t)+Zn(t))/2,rotateX:t=>Ge(dt(Math.atan2(t[6],t[5]))),rotateY:t=>Ge(dt(Math.atan2(-t[2],t[0]))),rotateZ:Yn,rotate:Yn,skewX:t=>dt(Math.atan(t[4])),skewY:t=>dt(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function He(t){return t.includes("scale")?1:0}function Xe(t,e){if(!t||t==="none")return He(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=ia,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=sa,i=a}if(!i)return He(e);const r=s[e],o=i[1].split(",").map(ra);return typeof r=="function"?r(o):o[r]}const oa=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Xe(n,e)};function ra(t){return parseFloat(t.trim())}const At=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Vt=new Set([...At,"pathRotation"]),Jn=t=>t===bt||t===S,aa=new Set(["x","y","z"]),la=At.filter(t=>!aa.has(t));function ca(t){const e=[];return la.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const rt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0",boxSizing:s})=>{const i=t.max-t.min;return s==="border-box"?i:i-parseFloat(e)-parseFloat(n)},height:({y:t},{paddingTop:e="0",paddingBottom:n="0",boxSizing:s})=>{const i=t.max-t.min;return s==="border-box"?i:i-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:(t,{transform:e})=>Xe(e,"x"),y:(t,{transform:e})=>Xe(e,"y")};rt.translateX=rt.x;rt.translateY=rt.y;const pt=new Set;let Ye=!1,qe=!1,Ze=!1;function Bi(){if(qe){const t=Array.from(pt).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=ca(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([r,o])=>{var a;(a=s.getValue(r))==null||a.set(o)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}qe=!1,Ye=!1,pt.forEach(t=>t.complete(Ze)),pt.clear()}function Fi(){pt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(qe=!0)})}function ua(){Ze=!0,Fi(),Bi(),Ze=!1}class An{constructor(e,n,s,i,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(pt.add(this),Ye||(Ye=!0,E.read(Fi),E.resolveKeyframes(Bi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const r=i==null?void 0:i.get(),o=e[e.length-1];if(r!==void 0)e[0]=r;else if(s&&n){const a=s.readValue(n,o);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=o),i&&r===void 0&&i.set(e[0])}na(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),pt.delete(this)}cancel(){this.state==="scheduled"&&(pt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const ha=t=>t.startsWith("--");function Oi(t,e,n){ha(e)?t.style.setProperty(e,n):t.style[e]=n}const fa={};function ji(t,e){const n=ui(t);return()=>fa[e]??n()}const da=ji(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Ni=ji(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Dt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Qn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Dt([0,.65,.55,1]),circOut:Dt([.55,0,1,.45]),backIn:Dt([.31,.01,.66,-.59]),backOut:Dt([.33,1.53,.69,.99])};function Wi(t,e){if(t)return typeof t=="function"?Ni()?Ri(t,e):"ease-out":wi(t)?Dt(t):Array.isArray(t)?t.map(n=>Wi(n,e)||Qn.easeOut):Qn[t]}function pa(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[e]:n};l&&(c.offset=l);const h=Wi(a,i);Array.isArray(h)&&(c.easing=h);const f={delay:s,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),t.animate(c,f)}function Ui(t){return typeof t=="function"&&"applyToOptions"in t}function ma({type:t,...e}){return Ui(t)&&Ni()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Ki extends bn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=e,ve(typeof e.type!="string");const u=ma(e);this.animation=pa(n,s,i,u,r),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const c=xe(i,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(c),Oi(n,s,c),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,n;(n=(e=this.animation).finish)==null||n.call(e)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,s,i;const e=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(e!=null&&e.isConnected)&&((i=(s=this.animation).commitStyles)==null||i.call(s))}get duration(){var n,s;const e=((s=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:s.call(n).duration)||0;return $(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+$(e)}get time(){return $(Number(this.animation.currentTime)||0)}set time(e){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=U(e),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:n,rangeEnd:s,observe:i}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&da()?(this.animation.timeline=e,n&&(this.animation.rangeStart=n),s&&(this.animation.rangeEnd=s),z):i(this)}}const $i={anticipate:yi,backInOut:gi,circInOut:xi};function ga(t){return t in $i}function ya(t){typeof t.ease=="string"&&ga(t.ease)&&(t.ease=$i[t.ease])}const Ee=10;class va extends Ki{constructor(e){ya(e),Ii(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:s,onComplete:i,element:r,...o}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new ue({...o,autoplay:!1}),l=Math.max(Ee,N.now()-this.startTime),u=tt(0,Ee,l-Ee),c=a.sample(l).value,{name:h}=this.options;r&&h&&Oi(r,h,c),n.setWithVelocity(a.sample(Math.max(0,l-u)).value,c,u),a.stop()}}const ts=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(X.test(t)||t==="0")&&!t.startsWith("url("));function xa(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 Ta(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=ts(i,e),a=ts(r,e);return!o||!a?!1:xa(t)||(n==="spring"||Ui(n))&&s}function Je(t){t.duration=0,t.type="keyframes"}const _i=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),wa=/^(?:
9oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Sa(t){for(let e=0;e<t.length;e++)if(typeof t[e]=="string"&&wa.test(t[e]))return!0;return!1}const Pa=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),ba=ui(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Aa(t){var h;const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:r,type:o,keyframes:a}=t,l=(h=e==null?void 0:e.owner)==null?void 0:h.current;if(!(l instanceof HTMLElement)&&!(l instanceof SVGElement))return!1;const{onUpdate:u,transformTemplate:c}=e.owner.getProps();return ba()&&n&&(_i.has(n)||Pa.has(n)&&Sa(a))&&(n!=="transform"||!c)&&!u&&!s&&i!=="mirror"&&r!==0&&o!=="inertia"}const Va=40;class Ca extends bn{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:l,motionValue:u,element:c,...h}){var p;super(),this.stop=()=>{var y,m;this._animation&&(this._animation.stop(),(y=this.stopTimeline)==null||y.call(this)),(m=this.keyframeResolver)==null||m.cancel()},this.createdAt=N.now();const f={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:r,repeatType:o,name:l,motionValue:u,element:c,...h},d=(c==null?void 0:c.KeyframeResolver)||An;this.keyframeResolver=new d(a,(y,m,g)=>this.onKeyframesResolved(y,m,f,!g),l,u,c),(p=this.keyframeResolver)==null||p.scheduleResolve()}onKeyframesResolved(e,n,s,i){var g,x;this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:l,isHandoff:u,onUpdate:c}=s;this.resolvedAt=N.now();let h=!0;Ta(e,r,o,a)||(h=!1,(at.instantAnimations||!l)&&(c==null||c(xe(e,s,n))),e[0]=e[e.length-1],Je(s),s.repeat=0);const d={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Va?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},p=h&&!u&&Aa(d),y=(x=(g=d.motionValue)==null?void 0:g.owner)==null?void 0:x.current;let m;if(p)try{m=new va({...d,element:y})}catch{m=new ue(d)}else m=new ue(d);m.finished.then(()=>{this.notifyFinished()}).catch(z),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),ua()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}}function zi(t,e,n,s=0,i=1){const r=Array.from(t).sort((u,c)=>u.sortNodePosition(c)).indexOf(e),o=t.size,a=(o-1)*s;return typeof n=="function"?n(r,o):i===1?r*s:a-r*s}const es=30,Ma=t=>!isNaN(parseFloat(t)),kt={current:void 0};class Da{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{var r;const i=N.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&((r=this.events.change)==null||r.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=N.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Ma(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 gn);const s=this.events[e].add(n);return e==="change"?()=>{s(),E.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){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}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()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return kt.current&&kt.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=N.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>es)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,es);return hi(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(){var e,n;(e=this.dependents)==null||e.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function gt(t,e){return new Da(t,e)}function Gi(t,e){if(t!=null&&t.inherit&&e){const{inherit:n,...s}=t;return{...e,...s}}return t}function Vn(t,e){const n=(t==null?void 0:t[e])??(t==null?void 0:t.default)??t;return n!==t?Gi(n,t):n}const Ea={type:"spring",stiffness:500,damping:25,restSpeed:10},Ra=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),La={type:"keyframes",duration:.8},ka={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ia=(t,{keyframes:e})=>e.length>2?La:Vt.has(t)?t.startsWith("scale")?Ra(e[1]):Ea:ka,Ba=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function Fa(t){for(const e in t)if(!Ba.has(e))return!0;return!1}const Cn=(t,e,n,s={},i,r)=>
vendor: 6,784 bytes, line 9
9o=>{const a=Vn(s,t)||{},l=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-U(l);const 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};Fa(a)||Object.assign(c,Ia(t,c)),c.duration&&(c.duration=U(c.duration)),c.repeatDelay&&(c.repeatDelay=U(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let h=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(Je(c),c.delay===0&&(h=!0)),(at.instantAnimations||at.skipAnimations||i!=null&&i.shouldSkipAnimations||a.skipAnimations)&&(h=!0,Je(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,h&&!r&&e.get()!==void 0){const f=xe(c.keyframes,a);if(f!==void 0){E.update(()=>{c.onUpdate(f),c.onComplete()});return}}return a.isSync?new ue(c):new Ca(c)},Oa=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ja(t){const e=Oa.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function Hi(t,e,n=1){const[s,i]=ja(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const o=r.trim();return ai(o)?parseFloat(o):o}return xn(i)?Hi(i,e,n+1):i}function ns(t){const e=[{},{}];return t==null||t.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function Mn(t,e,n,s){if(typeof e=="function"){const[i,r]=ns(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]=ns(s);e=e(n!==void 0?n:t.custom,i,r)}return e}function mt(t,e,n){const s=t.getProps();return Mn(s,e,n!==void 0?n:s.custom,t)}const Xi=new Set(["width","height","top","left","right","bottom",...At]),Qe=t=>Array.isArray(t);function Na(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,gt(n))}function Wa(t){return Qe(t)?t[t.length-1]||0:t}function Ua(t,e){const n=mt(t,e);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const o in r){const a=Wa(r[o]);Na(t,o,a)}}const B=t=>!!(t&&t.getVelocity);function Ka(t){return!!(B(t)&&t.add)}function tn(t,e){const n=t.getValue("willChange");if(Ka(n))return n.add(e);if(!n&&at.WillChange){const s=new at.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function Dn(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const $a="framerAppearId",Yi="data-"+Dn($a);function qi(t){return t.props[Yi]}function _a({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Zi(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:r,transitionEnd:o,...a}=e;const l=t.getDefaultTransition();r=r?Gi(r,l):l;const u=r==null?void 0:r.reduceMotion,c=r==null?void 0:r.skipAnimations;s&&(r=s);const h=[],f=i&&t.animationState&&t.animationState.getState()[i],d=r==null?void 0:r.path;d&&d.animateVisualElement(t,a,r,n,h);for(const p in a){const y=t.getValue(p,t.latestValues[p]??null),m=a[p];if(m===void 0||f&&_a(f,p))continue;const g={delay:n,...Vn(r||{},p)};c&&(g.skipAnimations=!0);const x=y.get();if(x!==void 0&&!y.isAnimating()&&!Array.isArray(m)&&m===x&&!g.velocity){E.update(()=>y.set(m));continue}let v=!1;if(window.MotionHandoffAnimation){const M=qi(t);if(M){const V=window.MotionHandoffAnimation(M,p,E);V!==null&&(g.startTime=V,v=!0)}}tn(t,p);const T=u??t.shouldReduceMotion;y.start(Cn(p,y,m,T&&Xi.has(p)?{type:!1}:g,t,v));const b=y.animation;b&&h.push(b)}if(o){const p=()=>E.update(()=>{o&&Ua(t,o)});h.length?Promise.all(h).then(p):p()}return h}function en(t,e,n={}){var l;const s=mt(t,e,n.type==="exit"?(l=t.presenceContext)==null?void 0:l.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const r=s?()=>Promise.all(Zi(t,s,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:h,staggerDirection:f}=i;return za(t,e,u,c,h,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[u,c]=a==="beforeChildren"?[r,o]:[o,r];return u().then(()=>c())}else return Promise.all([r(),o(n.delay)])}function za(t,e,n=0,s=0,i=0,r=1,o){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(en(l,e,{...o,delay:n+(typeof s=="function"?0:s)+zi(t.variantChildren,l,s,i,r)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function Ga(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(r=>en(t,r,n));s=Promise.all(i)}else if(typeof e=="string")s=en(t,e,n);else{const i=typeof e=="function"?mt(t,e,n.custom):e;s=Promise.all(Zi(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}const Ha={test:t=>t==="auto",parse:t=>t},Ji=t=>e=>e.test(t),Qi=[bt,S,Q,st,Tr,xr,Ha],ss=t=>Qi.find(Ji(t));function Xa(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||ci(t):!0}const Ya=new Set(["brightness","contrast","saturate","opacity"]);function qa(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(Tn)||[];if(!s)return t;const i=n.replace(s,"");let r=Ya.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const Za=/\b([a-z-]*)\(.*?\)/gu,nn={...X,getAnimatableNone:t=>{const e=t.match(Za);return e?e.map(qa).join(" "):t}},sn={...X,getAnimatableNone:t=>{const e=X.parse(t);return X.createTransformer(t)(e.map(s=>typeof s=="number"?0:typeof s=="object"?{...s,alpha:1}:s))}},is={...bt,transform:Math.round},Ja={rotate:st,pathRotation:st,rotateX:st,rotateY:st,rotateZ:st,scale:Ht,scaleX:Ht,scaleY:Ht,scaleZ:Ht,skew:st,skewX:st,skewY:st,distance:S,translateX:S,translateY:S,translateZ:S,x:S,y:S,z:S,perspective:S,transformPerspective:S,opacity:Nt,originX:_n,originY:_n,originZ:S},he={borderWidth:S,borderTopWidth:S,borderRightWidth:S,borderBottomWidth:S,borderLeftWidth:S,borderRadius:S,borderTopLeftRadius:S,borderTopRightRadius:S,borderBottomRightRadius:S,borderBottomLeftRadius:S,width:S,maxWidth:S,height:S,maxHeight:S,top:S,right:S,bottom:S,left:S,inset:S,insetBlock:S,insetBlockStart:S,insetBlockEnd:S,insetInline:S,insetInlineStart:S,insetInlineEnd:S,padding:S,paddingTop:S,paddingRight:S,paddingBottom:S,paddingLeft:S,paddingBlock:S,paddingBlockStart:S,paddingBlockEnd:S,paddingInline:S,paddingInlineStart:S,paddingInlineEnd:S,margin:S,marginTop:S,marginRight:S,marginBottom:S,marginLeft:S,marginBlock:S,marginBlockStart:S,marginBlockEnd:S,marginInline:S,marginInlineStart:S,marginInlineEnd:S,fontSize:S,backgroundPositionX:S,backgroundPositionY:S,...Ja,zIndex:is,fillOpacity:Nt,strokeOpacity:Nt,numOctaves:is},Qa={...he,color:k,backgroundColor:k,outlineColor:k,fill:k,stroke:k,borderColor:k,borderTopColor:k,borderRightColor:k,borderBottomColor:k,borderLeftColor:k,filter:nn,WebkitFilter:nn,mask:sn,WebkitMask:sn},to=t=>Qa[t],tl=new Set([nn,sn]);function eo(t,e){let n=to(t);return tl.has(n)||(n=X),n.getAnimatableNone?n.getAnimatableNone(e):void 0}
vendor: 1,717 bytes, line 9
9const el=new Set(["auto","none","0"]);function nl(t,e,n){let s=0,i;for(;s<t.length&&!i;){const r=t[s];typeof r=="string"&&!el.has(r)&&Pt(r).values.length&&(i=t[s]),s++}if(i&&n)for(const r of e)t[r]=eo(n,i)}class sl extends An{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 c=0;c<e.length;c++){let h=e[c];if(typeof h=="string"&&(h=h.trim(),xn(h))){const f=Hi(h,n.current);f!==void 0&&(e[c]=f),c===e.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!Xi.has(s)||e.length!==2)return;const[i,r]=e,o=ss(i),a=ss(r),l=$n(i),u=$n(r);if(l!==u&&rt[s]){this.needsMeasurement=!0;return}if(o!==a)if(Jn(o)&&Jn(a))for(let c=0;c<e.length;c++){const h=e[c];typeof h=="string"&&(e[c]=parseFloat(h))}else rt[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||Xa(e[i]))&&s.push(i);s.length&&nl(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=rt[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 a;const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const r=s.length-1,o=s[r];s[r]=rt[n](e.measureViewportBox(),window.getComputedStyle(e.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEac
vendor: 50,379 bytes, line 9
9h(([l,u])=>{e.getValue(l).set(u)}),this.resolveNoneKeyframes()}}const En=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function no(t,e,n){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let s=document;const i=(n==null?void 0:n[t])??s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t).filter(s=>s!=null)}const on=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function Qt(t){return li(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const{schedule:Rn}=Si(queueMicrotask,!1),H={x:!1,y:!1};function so(){return H.x||H.y}function il(t){return t==="x"||t==="y"?H[t]?null:(H[t]=!0,()=>{H[t]=!1}):H.x||H.y?null:(H.x=H.y=!0,()=>{H.x=H.y=!1})}function io(t,e){const n=no(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function ol(t){return!(t.pointerType==="touch"||so())}function rl(t,e,n={}){const[s,i,r]=io(t,n);return s.forEach(o=>{let a=!1,l=!1,u;const c=()=>{o.removeEventListener("pointerleave",p)},h=m=>{u&&(u(m),u=void 0),c()},f=m=>{a=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),l&&(l=!1,h(m))},d=()=>{a=!0,window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",f,i)},p=m=>{if(m.pointerType!=="touch"){if(a){l=!0;return}h(m)}},y=m=>{if(!ol(m))return;l=!1;const g=e(o,m);typeof g=="function"&&(u=g,o.addEventListener("pointerleave",p,i))};o.addEventListener("pointerenter",y,i),o.addEventListener("pointerdown",d,i)}),r}const oo=(t,e)=>e?t===e?!0:oo(t,e.parentElement):!1,Ln=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,al=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function ll(t){return al.has(t.tagName)||t.isContentEditable===!0}const cl=new Set(["INPUT","SELECT","TEXTAREA"]);function ul(t){return cl.has(t.tagName)||t.isContentEditable===!0}const te=new WeakSet;function os(t){return e=>{e.key==="Enter"&&t(e)}}function Re(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const hl=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=os(()=>{if(te.has(n))return;Re(n,"down");const i=os(()=>{Re(n,"up")}),r=()=>Re(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",r,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function rs(t){return Ln(t)&&!so()}const as=new WeakSet;function fl(t,e,n={}){const[s,i,r]=io(t,n),o=a=>{const l=a.currentTarget;if(!rs(a)||as.has(a))return;te.add(l),n.stopPropagation&&as.add(a);const u=e(l,a),c={...i,capture:!0},h=(p,y)=>{window.removeEventListener("pointerup",f,c),window.removeEventListener("pointercancel",d,c),te.has(l)&&te.delete(l),rs(p)&&typeof u=="function"&&u(p,{success:y})},f=p=>{h(p,l===window||l===document||n.useGlobalTarget||oo(l,p.target))},d=p=>{h(p,!1)};window.addEventListener("pointerup",f,c),window.addEventListener("pointercancel",d,c)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),Qt(a)&&(a.addEventListener("focus",u=>hl(u,i)),!ll(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}function kn(t){return li(t)&&"ownerSVGElement"in t}const ee=new WeakMap;let ot;const ro=(t,e,n)=>(s,i)=>i&&i[0]?i[0][t+"Size"]:kn(s)&&"getBBox"in s?s.getBBox()[e]:s[n],dl=ro("inline","width","offsetWidth"),pl=ro("block","height","offsetHeight");function ml({target:t,borderBoxSize:e}){var n;(n=ee.get(t))==null||n.forEach(s=>{s(t,{get width(){return dl(t,e)},get height(){return pl(t,e)}})})}function gl(t){t.forEach(ml)}function yl(){typeof ResizeObserver>"u"||(ot=new ResizeObserver(gl))}function vl(t,e){ot||yl();const n=no(t);return n.forEach(s=>{let i=ee.get(s);i||(i=new Set,ee.set(s,i)),i.add(e),ot==null||ot.observe(s)}),()=>{n.forEach(s=>{const i=ee.get(s);i==null||i.delete(e),i!=null&&i.size||ot==null||ot.unobserve(s)})}}const ne=new Set;let wt;function xl(){wt=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};ne.forEach(e=>e(t))},window.addEventListener("resize",wt)}function Tl(t){return ne.add(t),wt||xl(),()=>{ne.delete(t),!ne.size&&typeof wt=="function"&&(window.removeEventListener("resize",wt),wt=void 0)}}function ls(t,e){return typeof t=="function"?Tl(t):vl(t,e)}function wl(t){return kn(t)&&t.tagName==="svg"}function Sl(...t){const e=!Array.isArray(t[0]),n=e?0:-1,s=t[0+n],i=t[1+n],r=t[2+n],o=t[3+n],a=ki(i,r,o);return e?a(s):a}const Pl=[...Qi,k,X],bl=t=>Pl.find(Ji(t)),cs=()=>({translate:0,scale:1,origin:0,originPoint:0}),St=()=>({x:cs(),y:cs()}),us=()=>({min:0,max:0}),I=()=>({x:us(),y:us()}),Al=new WeakMap;function Te(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Wt(t){return typeof t=="string"||Array.isArray(t)}const In=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Bn=["initial",...In];function we(t){return Te(t.animate)||Bn.some(e=>Wt(t[e]))}function ao(t){return!!(we(t)||t.variants)}function Vl(t,e,n){for(const s in e){const i=e[s],r=n[s];if(B(i))t.addValue(s,i);else if(B(r))t.addValue(s,gt(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,gt(o!==void 0?o:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const rn={current:null},lo={current:!1},Cl=typeof window<"u";function Ml(){if(lo.current=!0,!!Cl)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>rn.current=t.matches;t.addEventListener("change",e),e()}else rn.current=!1}const hs=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let fe={};function co(t){fe=t}function Dl(){return fe}class El{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,skipAnimations:r,blockInitialAnimation:o,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=An,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const d=N.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,E.render(this.render,!1,!0))};const{latestValues:u,renderState:c}=a;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=r,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=we(n),this.isVariantNode=ao(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:h,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const p=f[d];u[d]!==void 0&&B(p)&&p.set(u[d])}}mount(e){var n,s;if(this.hasBeenMounted)for(const i in this.initialValues)(n=this.values.get(i))==null||n.jump(this.initialValues[i]),this.latestValues[i]=this.initialValues[i];this.current=e,Al.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((i,r)=>this.bindToMotionValue(r,i)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(lo.current||Ml(),this.shouldReduceMotion=rn.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(s=this.parent)==null||s.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var e;this.projection&&this.projection.unmount(),it(this.notifyUpdate),it(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const s=this.features[n];s&&(s.unmount(),s.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),n.accelerate&&_i.has(e)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:l,ease:u,duration:c}=n.accelerate,h=new Ki({element:this.current,name:e,keyframes:a,times:l,ease:u,duration:U(c)}),f=o(h);this.valueSubscriptions.set(e,()=>{f(),h.cancel()});return}const s=Vt.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&E.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;typeof window<"u"&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),r&&r()})}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 fe){const n=fe[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):I()}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<hs.length;s++){const i=hs[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=Vl(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=gt(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(ai(s)||ci(s))?s=parseFloat(s):!bl(s)&&X.test(n)&&(s=eo(e,n)),this.setBaseTarget(e,B(s)?s.get():s)),B(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var r;const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const o=Mn(this.props,n,(r=this.presenceContext)==null?void 0:r.custom);o&&(s=o[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!B(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new gn),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){Rn.render(this.render)}}class uo extends El{constructor(){super(...arguments),this.KeyframeResolver=sl}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){const s=e.style;return s?s[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;B(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class lt{constructor(e){this.isMounted=!1,this.node=e}update(){}}function ho({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function Rl({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Ll(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 Le(t){return t===void 0||t===1}function an({scale:t,scaleX:e,scaleY:n}){return!Le(t)||!Le(e)||!Le(n)}function ht(t){return an(t)||fo(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function fo(t){return fs(t.x)||fs(t.y)}function fs(t){return t&&t!=="0%"}function de(t,e,n){const s=t-n,i=e*s;return n+i}function ds(t,e,n,s,i){return i!==void 0&&(t=de(t,i,s)),de(t,n,s)+e}function ln(t,e=0,n=1,s,i){t.min=ds(t.min,e,n,s,i),t.max=ds(t.max,e,n,s,i)}function po(t,{x:e,y:n}){ln(t.x,e.translate,e.scale,e.originPoint),ln(t.y,n.translate,n.scale,n.originPoint)}const ps=.999999999999,ms=1.0000000000001;function kl(t,e,n,s=!1){var a;const i=n.length;if(!i)return;e.x=e.y=1;let r,o;for(let l=0;l<i;l++){r=n[l],o=r.projectionDelta;const{visualElement:u}=r.options;u&&u.props.style&&u.props.style.display==="contents"||(s&&r.options.layoutScroll&&r.scroll&&r!==r.root&&(J(t.x,-r.scroll.offset.x),J(t.y,-r.scroll.offset.y)),o&&(e.x*=o.x.scale,e.y*=o.y.scale,po(t,o)),s&&ht(r.latestValues)&&se(t,r.latestValues,(a=r.layout)==null?void 0:a.layoutBox))}e.x<ms&&e.x>ps&&(e.x=1),e.y<ms&&e.y>ps&&(e.y=1)}function J(t,e){t.min+=e,t.max+=e}function gs(t,e,n,s,i=.5){const r=D(t.min,t.max,i);ln(t,e,n,r,s)}function ys(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}function se(t,e,n){const s=n??t;gs(t.x,ys(e.x,s.x),e.scaleX,e.scale,e.originX),gs(t.y,ys(e.y,s.y),e.scaleY,e.scale,e.originY)}function mo(t,e){return ho(Ll(t.getBoundingClientRect(),e))}function Il(t,e,n){const s=mo(t,n),{scroll:i}=e;return i&&(J(s.x,i.offset.x),J(s.y,i.offset.y)),s}const Bl={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Fl=At.length;function Ol(t,e,n){let s="",i=!0;for(let o=0;o<Fl;o++){const a=At[o],l=t[a];if(l===void 0)continue;let u=!0;if(typeof l=="number")u=l===(a.startsWith("scale")?1:0);else{const c=parseFloat(l);u=a.startsWith("scale")?c===1:c===0}if(!u||n){const c=on(l,he[a]);if(!u){i=!1;const h=Bl[a]||a;s+=`${h}(${c}) `}n&&(e[a]=c)}}const r=t.pathRotation;return r&&(i=!1,s+=`rotate(${on(r,he.pathRotation)}) `),s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function Fn(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(Vt.has(l)){o=!0;continue}else if(bi(l)){i[l]=u;continue}else{const c=on(u,he[l]);l.startsWith("origin")?(a=!0,r[l]=c):s[l]=c}}if(e.transform||(o||n?s.transform=Ol(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 go(t,{style:e,vars:n},s,i){const r=t.style;let o;for(o in e)r[o]=e[o];i==null||i.applyProjectionStyles(r,s);for(o in n)r.setProperty(o,n[o])}function vs(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Mt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(S.test(t))t=parseFloat(t);else return t;const n=vs(t,e.target.x),s=vs(t,e.target.y);return`${n}% ${s}%`}},jl={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=X.parse(t);if(i.length>5)return s;const r=X.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=D(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),r(i)}},cn={borderRadius:{...Mt,applyTo:[...En]},borderTopLeftRadius:Mt,borderTopRightRadius:Mt,borderBottomLeftRadius:Mt,borderBottomRightRadius:Mt,boxShadow:jl};function yo(t,{layout:e,layoutId:n}){return Vt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!cn[t]||t==="opacity")}function On(t,e,n){var o;const s=t.style,i=e==null?void 0:e.style,r={};if(!s)return r;for(const a in s)(B(s[a])||i&&B(i[a])||yo(a,t)||((o=n==null?void 0:n.getValue(a))==null?void 0:o.liveStyle)!==void 0)&&(r[a]=s[a]);return r}function Nl(t){return window.getComputedStyle(t)}class Wl extends uo{constructor(){super(...arguments),this.type="html",this.renderInstance=go}mount(e){ve(!!e.style),super.mount(e)}readValueFromInstance(e,n){var s;if(Vt.has(n))return(s=this.projection)!=null&&s.isProjecting?He(n):oa(e,n);{const i=Nl(e),r=(bi(n)?i.getPropertyValue(n):i[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:n}){return mo(e,n)}build(e,n,s){Fn(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return On(e,n,s)}}const Ul={offset:"stroke-dashoffset",array:"stroke-dasharray"},Kl={offset:"strokeDashoffset",array:"strokeDasharray"};function $l(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?Ul:Kl;t[r.offset]=`${-s}`,t[r.array]=`${e} ${n}`}const _l=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function vo(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:r=1,pathOffset:o=0,...a},l,u,c){if(Fn(t,a,u),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:f}=t;h.transform&&(f.transform=h.transform,delete h.transform),(f.transform||h.transformOrigin)&&(f.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),f.transform&&(f.transformBox=(c==null?void 0:c.transformBox)??"fill-box",delete h.transformBox);for(const d of _l)h[d]!==void 0&&(f[d]=h[d],delete h[d]);e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),s!==void 0&&(h.scale=s),i!==void 0&&$l(h,i,r,o,!1)}const xo=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"]),To=t=>typeof t=="string"&&t.toLowerCase()==="svg";function zl(t,e,n,s){go(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(xo.has(i)?i:Dn(i),e.attrs[i])}function wo(t,e,n){const s=On(t,e,n);for(const i in t)if(B(t[i])||B(e[i])){const r=At.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=t[i]}return s}class Gl extends uo{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=I}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Vt.has(n)){const s=to(n);return s&&s.default||0}return n=xo.has(n)?n:Dn(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return wo(e,n,s)}build(e,n,s){vo(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){zl(e,n,s,i)}mount(e){this.isSVGTag=To(e.tagName),super.mount(e)}}const Hl=Bn.length;function So(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?So(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<Hl;n++){const s=Bn[n],i=t.props[s];(Wt(i)||i===!1)&&(e[s]=i)}return e}function Po(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}const Xl=[...In].reverse(),Yl=In.length;function ql(t){return e=>Promise.all(e.map(({animation:n,options:s})=>Ga(t,n,s)))}function Zl(t){let e=ql(t),n=xs(),s=!0,i=!1;const r=u=>(c,h)=>{var d;const f=mt(t,h,u==="exit"?(d=t.presenceContext)==null?void 0:d.custom:void 0);if(f){const{transition:p,transitionEnd:y,...m}=f;c={...c,...m,...y}}return c};function o(u){e=u(t)}function a(u){const{props:c}=t,h=So(t.parent)||{},f=[],d=new Set;let p={},y=1/0;for(let g=0;g<Yl;g++){const x=Xl[g],v=n[x],T=c[x]!==void 0?c[x]:h[x],b=Wt(T),M=x===u?v.isActive:null;M===!1&&(y=g);let V=T===h[x]&&T!==c[x]&&b;if(V&&(s||i)&&t.manuallyAnimateOnMount&&(V=!1),v.protectedKeys={...p},!v.isActive&&M===null||!T&&!v.prevProp||Te(T)||typeof T=="boolean")continue;if(x==="exit"&&v.isActive&&M!==!0){v.prevResolvedValues&&(p={...p,...v.prevResolvedValues});continue}const P=Jl(v.prevProp,T);let C=P||x===u&&v.isActive&&!V&&b||g>y&&b,A=!1;const R=Array.isArray(T)?T:[T];let F=R.reduce(r(x),{});M===!1&&(F={});const{prevResolvedValues:et={}}=v,Y={...et,...F},nt=O=>{C=!0,d.has(O)&&(A=!0,d.delete(O)),v.needsAnimating[O]=!0;const K=t.getValue(O);K&&(K.liveStyle=!1)};for(const O in Y){const K=F[O],ct=et[O];if(p.hasOwnProperty(O))continue;let vt=!1;Qe(K)&&Qe(ct)?vt=!Po(K,ct)||P:vt=K!==ct,vt?K!=null?nt(O):d.add(O):K!==void 0&&d.has(O)?nt(O):v.protectedKeys[O]=!0}v.prevProp=T,v.prevResolvedValues=F,v.isActive&&(p={...p,...F}),(s||i)&&t.blockInitialAnimation&&(C=!1);const q=V&&P;C&&(!q||A)&&f.push(...R.map(O=>{const K={type:x};if(typeof O=="string"&&(s||i)&&!q&&t.manuallyAnimateOnMount&&t.parent){const{parent:ct}=t,vt=mt(ct,O);if(ct.enteringChildren&&vt){const{delayChildren:qo}=vt.transition||{};K.delay=zi(ct.enteringChildren,t,qo)}}return{animation:O,options:K}}))}if(d.size){const g={};if(typeof c.initial!="boolean"){const x=mt(t,Array.isArray(c.initial)?c.initial[0]:c.initial);x&&x.transition&&(g.transition=x.transition)}d.forEach(x=>{const v=t.getBaseTarget(x),T=t.getValue(x);T&&(T.liveStyle=!0),g[x]=v??null}),f.push({animation:g})}let m=!!f.length;return s&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(m=!1),s=!1,i=!1,m?e(f):Promise.resolve()}function l(u,c){var f;if(n[u].isActive===c)return Promise.resolve();(f=t.variantChildren)==null||f.forEach(d=>{var p;return(p=d.animationState)==null?void 0:p.setActive(u,c)}),n[u].isActive=c;const h=a(u);for(const d in n)n[d].protectedKeys={};return h}return{animateChanges:a,setActive:l,setAnimateFunction:o,getState:()=>n,reset:()=>{n=xs(),i=!0}}}function Jl(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Po(e,t):!1}function ut(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function xs(){return{animate:ut(!0),whileInView:ut(),whileHover:ut(),whileTap:ut(),whileDrag:ut(),whileFocus:ut(),exit:ut()}}function un(t,e){t.min=e.min,t.max=e.max}function G(t,e){un(t.x,e.x),un(t.y,e.y)}function Ts(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const bo=1e-4,Ql=1-bo,tc=1+bo,Ao=.01,ec=0-Ao,nc=0+Ao;function W(t){return t.max-t.min}function sc(t,e,n){return Math.abs(t-e)<=n}function ws(t,e,n,s=.5){t.origin=s,t.originPoint=D(e.min,e.max,t.origin),t.scale=W(n)/W(e),t.translate=D(n.min,n.max,t.origin)-t.originPoint,(t.scale>=Ql&&t.scale<=tc||isNaN(t.scale))&&(t.scale=1),(t.translate>=ec&&t.translate<=nc||isNaN(t.translate))&&(t.translate=0)}function It(t,e,n,s){ws(t.x,e.x,n.x,s?s.originX:void 0),ws(t.y,e.y,n.y,s?s.originY:void 0)}function Ss(t,e,n,s=0){const i=s?D(n.min,n.max,s):n.min;t.min=i+e.min,t.max=t.min+W(e)}function ic(t,e,n,s){Ss(t.x,e.x,n.x,s==null?void 0:s.x),Ss(t.y,e.y,n.y,s==null?void 0:s.y)}function Ps(t,e,n,s=0){const i=s?D(n.min,n.max,s):n.min;t.min=e.min-i,t.max=t.min+W(e)}function pe(t,e,n,s){Ps(t.x,e.x,n.x,s==null?void 0:s.x),Ps(t.y,e.y,n.y,s==null?void 0:s.y)}function bs(t,e,n,s,i){return t-=e,t=de(t,1/n,s),i!==void 0&&(t=de(t,1/i,s)),t}function oc(t,e=0,n=1,s=.5,i,r=t,o=t){if(Q.test(e)&&(e=parseFloat(e),e=D(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=D(r.min,r.max,s);t===r&&(a-=e),t.min=bs(t.min,e,n,a,i),t.max=bs(t.max,e,n,a,i)}function As(t,e,[n,s,i],r,o){oc(t,e[n],e[s],e[i],e.scale,r,o)}const rc=["x","scaleX","originX"],ac=["y","scaleY","originY"];function Vs(t,e,n,s){As(t.x,e,rc,n?n.x:void 0,s?s.x:void 0),As(t.y,e,ac,n?n.y:void 0,s?s.y:void 0)}function Cs(t){return t.translate===0&&t.scale===1}function Vo(t){return Cs(t.x)&&Cs(t.y)}function Ms(t,e){return t.min===e.min&&t.max===e.max}function lc(t,e){return Ms(t.x,e.x)&&Ms(t.y,e.y)}function Ds(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Co(t,e){return Ds(t.x,e.x)&&Ds(t.y,e.y)}function Es(t){return W(t.x)/W(t.y)}function Rs(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function Z(t){return[t("x"),t("y")]}function cc(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,pathRotation:h,rotateX:f,rotateY:d,skewX:p,skewY:y}=n;u&&(s=`perspective(${u}px) ${s}`),c&&(s+=`rotate(${c}deg) `),h&&(s+=`rotate(${h}deg) `),f&&(s+=`rotateX(${f}deg) `),d&&(s+=`rotateY(${d}deg) `),p&&(s+=`skewX(${p}deg) `),y&&(s+=`skewY(${y}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 uc=En.length,Ls=t=>typeof t=="string"?parseFloat(t):t,ks=t=>typeof t=="number"||S.test(t);function hc(t,e,n,s,i,r){i?(t.opacity=D(0,n.opacity??1,fc(s)),t.opacityExit=D(e.opacity??1,0,dc(s))):r&&(t.opacity=D(e.opacity??1,n.opacity??1,s));for(let o=0;o<uc;o++){const a=En[o];let l=Is(e,a),u=Is(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||ks(l)===ks(u)?(t[a]=Math.max(D(Ls(l),Ls(u),s),0),(Q.test(u)||Q.test(l))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=D(e.rotate||0,n.rotate||0,s))}function Is(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const fc=Mo(0,.5,vi),dc=Mo(.5,.95,z);function Mo(t,e,n){return s=>s<t?0:s>e?1:n(jt(t,e,s))}function pc(t,e,n){const s=B(t)?t:gt(t);return s.start(Cn("",s,e,n)),s.animation}function Ut(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n,s)}const mc=(t,e)=>t.depth-e.depth;class gc{constructor(){this.children=[],this.isDirty=!1}add(e){mn(this.children,e),this.isDirty=!0}remove(e){re(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(mc),this.isDirty=!1,this.children.forEach(e)}}function yc(t,e){const n=N.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(it(s),t(r-e))};return E.setup(s,!0),()=>it(s)}function ie(t){return B(t)?t.get():t}class vc{constructor(){this.members=[]}add(e){mn(this.members,e);for(let n=this.members.length-1;n>=0;n--){const s=this.members[n];if(s===e||s===this.lead||s===this.prevLead)continue;const i=s.instance;(!i||i.isConnected===!1)&&!s.snapshot&&(re(this.members,s),s.unmount())}e.scheduleRender()}remove(e){if(re(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){var n;for(let s=this.members.indexOf(e)-1;s>=0;s--){const i=this.members[s];if(i.isPresent!==!1&&((n=i.instance)==null?void 0:n.isConnected)!==!1)return this.promote(i),!0}return!1}promote(e,n){var i;const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.updateSnapshot(),e.scheduleRender();const{layoutDependency:r}=s.options,{layoutDependency:o}=e.options;(r===void 0||r!==o)&&(e.resumeFrom=s,n&&(s.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),(i=e.root)!=null&&i.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{var n,s,i,r,o;(s=(n=e.options).onExitComplete)==null||s.call(n),(o=(i=e.resumingFrom)==null?void 0:(r=i.options).onExitComplete)==null||o.call(r)})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){var e;(e=this.lead)!=null&&e.snapshot&&(this.lead.snapshot=void 0)}}const oe={hasAnimatedSinceResize:!0,hasEverUpdated:!1},ke=["","X","Y","Z"],xc=1e3;let Tc=0;function Ie(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function Do(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=qi(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",E,!(i||r))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&Do(s)}function Eo({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(o={},a=e==null?void 0:e()){this.id=Tc++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Pc),this.nodes.forEach(Dc),this.nodes.forEach(Ec),this.nodes.forEach(bc)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=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 gc)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new gn),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){if(this.instance)return;this.isSVG=kn(o)&&!wl(o),this.instance=o;const{layoutId:a,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),t){let c,h=0;const f=()=>this.root.updateBlockedByResize=!1;E.read(()=>{h=window.innerWidth}),t(o,()=>{const d=window.innerWidth;d!==h&&(h=d,this.root.updateBlockedByResize=!0,c&&c(),c=yc(f,250),oe.hasAnimatedSinceResize&&(oe.hasAnimatedSinceResize=!1,this.nodes.forEach(Os)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:d})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||u.getDefaultTransition()||Bc,{onLayoutAnimationStart:y,onLayoutAnimationComplete:m}=u.getProps(),g=!this.targetLayout||!Co(this.targetLayout,d),x=!h&&f;if(this.options.layoutRoot||this.resumeFrom||x||h&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...Vn(p,"layout"),onPlay:y,onComplete:m};(u.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(c,x,v.path)}else h||Os(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=d})}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,this.eventHandlers.clear(),it(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(Rc),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&&Do(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,(typeof h.latestValues.x=="string"||typeof h.latestValues.y=="string")&&(h.isLayoutDirty=!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()){const l=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),l&&this.nodes.forEach(Vc),this.nodes.forEach(Bs);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Fs);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Cc),this.nodes.forEach(Mc),this.nodes.forEach(wc),this.nodes.forEach(Sc)):this.nodes.forEach(Fs),this.clearAllSnapshots();const a=N.now();j.delta=tt(0,1e3/60,a-j.timestamp),j.timestamp=a,j.isProcessing=!0,Ae.update.process(j),Ae.preRender.process(j),Ae.render.process(j),j.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Rn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Ac),this.sharedNodes.forEach(Lc)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,E.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){E.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!W(this.snapshot.measuredBox.x)&&!W(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}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.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=I()),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&&this.instance){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&&!Vo(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;o&&this.instance&&(a||ht(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)),Fc(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return I();const a=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(Oc))){const{scroll:c}=this.root;c&&(J(a.x,c.offset.x),J(a.y,c.offset.y))}return a}removeElementScroll(o){var l;const a=I();if(G(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;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&&G(a,o),J(a.x,h.offset.x),J(a.y,h.offset.y))}return a}applyTransform(o,a=!1,l){var c,h;const u=l||I();G(u,o);for(let f=0;f<this.path.length;f++){const d=this.path[f];!a&&d.options.layoutScroll&&d.scroll&&d!==d.root&&(J(u.x,-d.scroll.offset.x),J(u.y,-d.scroll.offset.y)),ht(d.latestValues)&&se(u,d.latestValues,(c=d.layout)==null?void 0:c.layoutBox)}return ht(this.latestValues)&&se(u,this.latestValues,(h=this.layout)==null?void 0:h.layoutBox),u}removeTransform(o){var l;const a=I();G(a,o);for(let u=0;u<this.path.length;u++){const c=this.path[u];if(!ht(c.latestValues))continue;let h;c.instance&&(an(c.latestValues)&&c.updateSnapshot(),h=I(),G(h,c.measurePageBox())),Vs(a,c.latestValues,(l=c.snapshot)==null?void 0:l.layoutBox,h)}return ht(this.latestValues)&&Vs(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!==j.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var d;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(d=this.parent)!=null&&d.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:h}=this.options;if(!this.layout||!(c||h))return;this.resolvedRelativeTargetAt=j.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=I(),this.targetWithTransforms=I()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),ic(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):G(this.target,this.layout.layoutBox),po(this.target,this.targetDelta)):G(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||an(this.parent.latestValues)||fo(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,l){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=I(),this.relativeTargetOrigin=I(),pe(this.relativeTargetOrigin,a,l,this.options.layoutAnchor||void 0),G(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var p;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===j.timestamp&&(l=!1),l)return;const{layout:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;G(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;kl(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=I());const{target:d}=o;if(!d){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ts(this.prevProjectionDelta.x,this.projectionDelta.x),Ts(this.prevProjectionDelta.y,this.projectionDelta.y)),It(this.projectionDelta,this.layoutCorrected,d,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!Rs(this.projectionDelta.x,this.prevProjectionDelta.x)||!Rs(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=St(),this.projectionDelta=St(),this.projectionDeltaWithTransform=St()}setAnimationOrigin(o,a=!1,l){const u=this.snapshot,c=u?u.latestValues:{},h={...this.latestValues},f=St();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=I(),p=u?u.source:void 0,y=this.layout?this.layout.source:void 0,m=p!==y,g=this.getStack(),x=!g||g.members.length<=1,v=!!(m&&!x&&this.options.crossfade===!0&&!this.path.some(Ic));this.animationProgress=0;let T;const b=l==null?void 0:l.interpolateProjection(o);this.mixTargetDelta=M=>{const V=M/1e3,P=b==null?void 0:b(V);P?(f.x.translate=P.x,f.x.scale=D(o.x.scale,1,V),f.x.origin=o.x.origin,f.x.originPoint=o.x.originPoint,f.y.translate=P.y,f.y.scale=D(o.y.scale,1,V),f.y.origin=o.y.origin,f.y.originPoint=o.y.originPoint):(js(f.x,o.x,V),js(f.y,o.y,V)),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(pe(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),kc(this.relativeTarget,this.relativeTargetOrigin,d,V),T&&lc(this.relativeTarget,T)&&(this.isProjectionDirty=!1),T||(T=I()),G(T,this.relativeTarget)),m&&(this.animationValues=h,hc(h,c,this.latestValues,V,v,x)),P&&P.rotate!==void 0&&(this.animationValues||(this.animationValues=h),this.animationValues.pathRotation=P.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=V},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,u;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(u=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||u.stop(),this.pendingAnimation&&(it(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=E.update(()=>{oe.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=gt(0)),this.motionValue.jump(0,!1),this.currentAnimation=pc(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),o.onUpdate&&o.onUpdate(c)},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(xc),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&&Ro(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||I();const h=W(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+h;const f=W(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}G(a,l),se(a,c),It(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new vc),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 a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.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&&Ie("z",o,u,this.animationValues);for(let c=0;c<ke.length;c++)Ie(`rotate${ke[c]}`,o,u,this.animationValues),Ie(`skew${ke[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()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=ie(a==null?void 0:a.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=ie(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!ht(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let h=cc(this.projectionDeltaWithTransform,this.treeScale,c);l&&(h=l(c,h)),o.transform=h;const{x:f,y:d}=this.projectionDelta;o.transformOrigin=`${f.origin*100}% ${d.origin*100}% 0`,u.animationValues?o.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:o.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const p in cn){if(c[p]===void 0)continue;const{correct:y,applyTo:m,isCSSVariable:g}=cn[p],x=h==="none"?c[p]:y(c[p],u);if(m){const v=m.length;for(let T=0;T<v;T++)o[m[T]]=x}else g?this.options.visualElement.renderState.vars[p]=x:o[p]=x}this.options.layoutId&&(o.pointerEvents=u===this?ie(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(Bs),this.root.sharedNodes.clear()}}}function wc(t){t.updateLayout()}function Sc(t){var n;const e=((n=t.resumeFrom)==null?void 0:n.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:r}=t.options,o=e.source!==t.layout.source;if(r==="size")Z(h=>{const f=o?e.measuredBox[h]:e.layoutBox[h],d=W(f);f.min=s[h].min,f.max=f.min+d});else if(r==="x"||r==="y"){const h=r==="x"?"y":"x";un(o?e.measuredBox[h]:e.layoutBox[h],s[h])}else Ro(r,e.layoutBox,s)&&Z(h=>{const f=o?e.measuredBox[h]:e.layoutBox[h],d=W(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=St();It(a,s,e.layoutBox);const l=St();o?It(l,t.applyTransform(i,!0),e.measuredBox):It(l,s,e.layoutBox);const u=!Vo(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 p=t.options.layoutAnchor||void 0,y=I();pe(y,e.layoutBox,f.layoutBox,p);const m=I();pe(m,s,d.layoutBox,p),Co(y,m)||(c=!0),h.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=y,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:e,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function Pc(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.
9isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function bc(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Ac(t){t.clearSnapshot()}function Bs(t){t.clearMeasurements()}function Vc(t){t.isLayoutDirty=!0,t.updateLayout()}function Fs(t){t.isLayoutDirty=!1}function Cc(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function Mc(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 Dc(t){t.resolveTargetDelta()}function Ec(t){t.calcProjection()}function Rc(t){t.resetSkewAndRotation()}function Lc(t){t.removeLeadSnapshot()}function js(t,e,n){t.translate=D(e.translate,0,n),t.scale=D(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Ns(t,e,n,s){t.min=D(e.min,n.min,s),t.max=D(e.max,n.max,s)}function kc(t,e,n,s){Ns(t.x,e.x,n.x,s),Ns(t.y,e.y,n.y,s)}function Ic(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Bc={duration:.45,ease:[.4,0,.1,1]},Ws=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Us=Ws("applewebkit/")&&!Ws("chrome/")?Math.round:z;function Ks(t){t.min=Us(t.min),t.max=Us(t.max)}function Fc(t){Ks(t.x),Ks(t.y)}function Ro(t,e,n){return t==="position"||t==="preserve-aspect"&&!sc(Es(e),Es(n),.2)}function Oc(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const jc=Eo({attachResizeListener:(t,e)=>Ut(t,"resize",e),measureScroll:()=>{var t,e;return{x:document.documentElement.scrollLeft||((t=document.body)==null?void 0:t.scrollLeft)||0,y:document.documentElement.scrollTop||((e=document.body)==null?void 0:e.scrollTop)||0}},checkIsScrollRoot:()=>!0}),Be={current:void 0},Lo=Eo({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Be.current){const t=new jc({});t.mount(window),t.setOptions({layoutScroll:!0}),Be.current=t}return Be.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Se=w.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function $s(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Nc(...t){return e=>{let n=!1;const s=t.map(i=>{const r=$s(i,e);return!n&&typeof r=="function"&&(n=!0),r});if(n)return()=>{for(let i=0;i<s.length;i++){const r=s[i];typeof r=="function"?r():$s(t[i],null)}}}}function Wc(...t){return w.useCallback(Nc(...t),t)}class Uc extends w.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(Qt(n)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const s=n.offsetParent,i=Qt(s)&&s.offsetWidth||0,r=Qt(s)&&s.offsetHeight||0,o=getComputedStyle(n),a=this.props.sizeRef.current;a.height=parseFloat(o.height),a.width=parseFloat(o.width),a.top=n.offsetTop,a.left=n.offsetLeft,a.right=i-a.width-a.left,a.bottom=r-a.height-a.top,a.direction=o.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function Kc({children:t,isPresent:e,anchorX:n,anchorY:s,root:i,pop:r}){var f;const o=w.useId(),a=w.useRef(null),l=w.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:u}=w.useContext(Se),c=r!==!1?((f=t.props)==null?void 0:f.ref)??(t==null?void 0:t.ref):void 0,h=Wc(a,c);return w.useInsertionEffect(()=>{const{width:d,height:p,top:y,left:m,right:g,bottom:x,direction:v}=l.current;if(e||r===!1||!a.current||!d||!p)return;const T=v==="rtl",b=n==="left"?T?`right: ${g}`:`left: ${m}`:T?`left: ${m}`:`right: ${g}`,M=s==="bottom"?`bottom: ${x}`:`top: ${y}`;a.current.dataset.motionPopId=o;const V=document.createElement("style");u&&(V.nonce=u);const P=i??document.head;return P.appendChild(V),V.sheet&&V.sheet.insertRule(` 10 [data-motion-pop-id="${o}"] { 11 position: absolute !important; 12 width: ${d}px !important; 13 height: ${p}px !important; 14 ${b}px !important; 15 ${M}px !important; 16 } 17 `),()=>{var C;(C=a.current)==null||C.removeAttribute("data-motion-pop-id"),P.contains(V)&&P.removeChild(V)}},[e]),_.jsx(Uc,{isPresent:e,childRef:a,sizeRef:l,pop:r,children:r===!1?t:w.cloneElement(t,{ref:h})})}const $c=({children:t,initial:e,isPresent:n,onExitComplete:s,custom:i,presenceAffectsLayout:r,mode:o,anchorX:a,anchorY:l,root:u})=>{const c=yt(_c),h=w.useId(),f=w.useRef(n),d=w.useRef(s);ge(()=>{f.current=n,d.current=s});let p=!0,y=w.useMemo(()=>(p=!1,{id:h,initial:e,isPresent:n,custom:i,onExitComplete:m=>{c.set(m,!0);for(const g of c.values())if(!g)return;s&&s()},register:m=>(c.set(m,!1),()=>{var g;c.delete(m),!f.current&&!c.size&&((g=d.current)==null||g.call(d))})}),[n,c,s]);return r&&p&&(y={...y}),w.useMemo(()=>
vendor: 6,824 bytes, line 17
17{c.forEach((m,g)=>c.set(g,!1))},[n]),w.useEffect(()=>{!n&&!c.size&&s&&s()},[n]),t=_.jsx(Kc,{pop:o==="popLayout",isPresent:n,anchorX:a,anchorY:l,root:u,children:t}),_.jsx(ye.Provider,{value:y,children:t})};function _c(){return new Map}function ko(t=!0){const e=w.useContext(ye);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,r=w.useId();w.useEffect(()=>{if(t)return i(r)},[t]);const o=w.useCallback(()=>t&&s&&s(r),[r,s,t]);return!n&&s?[!1,o]:[!0]}const Xt=t=>t.key||"";function _s(t){const e=[];return w.Children.forEach(t,n=>{w.isValidElement(n)&&e.push(n)}),e}const fh=({children:t,custom:e,initial:n=!0,onExitComplete:s,presenceAffectsLayout:i=!0,mode:r="sync",propagate:o=!1,anchorX:a="left",anchorY:l="top",root:u})=>{const[c,h]=ko(o),f=w.useMemo(()=>_s(t),[t]),d=o&&!c?[]:f.map(Xt),p=w.useRef(!0),y=w.useRef(f),m=yt(()=>new Map),g=w.useRef(new Set),[x,v]=w.useState(f),[T,b]=w.useState(f);ge(()=>{p.current=!1,y.current=f;for(let P=0;P<T.length;P++){const C=Xt(T[P]);d.includes(C)?(m.delete(C),g.current.delete(C)):m.get(C)!==!0&&m.set(C,!1)}},[T,d.length,d.join("-")]);const M=[];if(f!==x){let P=[...f];for(let C=0;C<T.length;C++){const A=T[C],R=Xt(A);d.includes(R)||(P.splice(C,0,A),M.push(A))}return r==="wait"&&M.length&&(P=M),b(_s(P)),v(f),null}const{forceRender:V}=w.useContext(pn);return _.jsx(_.Fragment,{children:T.map(P=>{const C=Xt(P),A=o&&!c?!1:f===T||d.includes(C),R=()=>{if(g.current.has(C))return;if(m.has(C))g.current.add(C),m.set(C,!0);else return;let F=!0;m.forEach(et=>{et||(F=!1)}),F&&(V==null||V(),b(y.current),o&&(h==null||h()),s&&s())};return _.jsx($c,{isPresent:A,initial:!p.current||n?void 0:!1,custom:e,presenceAffectsLayout:i,mode:r,root:u,onExitComplete:A?void 0:R,anchorX:a,anchorY:l,children:P},C)})})},Io=w.createContext({strict:!1}),zs={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"]};let Gs=!1;function zc(){if(Gs)return;const t={};for(const e in zs)t[e]={isEnabled:n=>zs[e].some(s=>!!n[s])};co(t),Gs=!0}function Bo(){return zc(),Dl()}function Gc(t){const e=Bo();for(const n in t)e[n]={...e[n],...t[n]};co(e)}const Hc=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","propagate","ignoreStrict","viewport"]);function me(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Hc.has(t)}let Fo=t=>!me(t);function Xc(t){typeof t=="function"&&(Fo=e=>e.startsWith("on")?!me(e):t(e))}try{Xc(require("@emotion/is-prop-valid").default)}catch{}function Yc(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||B(t[i])||(Fo(i)||n===!0&&me(i)||!e&&!me(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const Pe=w.createContext({});function qc(t,e){if(we(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Wt(n)?n:void 0,animate:Wt(s)?s:void 0}}return t.inherit!==!1?e:{}}function Zc(t){const{initial:e,animate:n}=qc(t,w.useContext(Pe));return w.useMemo(()=>({initial:e,animate:n}),[Hs(e),Hs(n)])}function Hs(t){return Array.isArray(t)?t.join(" "):t}const jn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Oo(t,e,n){for(const s in e)!B(e[s])&&!yo(s,n)&&(t[s]=e[s])}function Jc({transformTemplate:t},e){return w.useMemo(()=>{const n=jn();return Fn(n,e,t),Object.assign({},n.vars,n.style)},[e])}function Qc(t,e){const n=t.style||{},s={};return Oo(s,n,t),Object.assign(s,Jc(t,e)),s}function tu(t,e){const n={},s=Qc(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 jo=()=>({...jn(),attrs:{}});function eu(t,e,n,s){const i=w.useMemo(()=>{const r=jo();return vo(r,e,To(s),t.transformTemplate,t.style),{...r.attrs,style:{...r.style}}},[e]);if(t.style){const r={};Oo(r,t.style,t),i.style={...r,...i.style}}return i}const nu=["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 Nn(t){return typeof t!="string"||t.includes("-")?!1:!!(nu.indexOf(t)>-1||/[A-Z]/u.test(t))}function su(t,e,n,{latestValues:s},i,r=!1,o){const l=(o??Nn(t)?eu:tu)(e,s,i,t),u=Yc(e,typeof t=="string",r),c=t!==w.Fragment?{...u,...l,ref:n}:{},{children:h}=e,f=w.useMemo(()=>B(h)?h.get():h,[h]);return w.createElement(t,{...c,children:f})}function iu({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:ou(n,s,i,t),renderState:e()}}function ou(t,e,n,s){const i={},r=s(t,{});for(const f in r)i[f]=ie(r[f]);let{initial:o,animate:a}=t;const l=we(t),u=ao(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"&&!Te(h)){const f=Array.isArray(h)?h:[h];for(let d=0;d<f.length;d++){const p=Mn(t,f[d]);if(p){const{transitionEnd:y,transition:m,...g}=p;for(const x in g){let v=g[x];if(Array.isArray(v)){const T=c?v.length-1:0;v=v[T]}v!==null&&(i[x]=v)}for(const x in y)i[x]=y[x]}}}return i}const No=t=>(e,n)=>{const s=w.useContext(Pe),i=w.useContext(ye),r=()=>iu(t,e,s,i);return n?r():yt(r)},ru=No({scrapeMotionValuesFromProps:On,createRenderState:jn}),au=No({scrapeMotionValuesFromProps:wo,createRenderState:jo}),lu=Symbol.for("motionComponentSymbol");function cu(t,e,n){const s=w.useRef(n);w.useInsertionEffect(()=>{s.current=n});const i=w.useRef(null);return w.useCallback(r=>{var a;r&&((a=t.onMount)==null||a.call(t,r)),e&&(r?e.mount(r):e.unmount());const o=s.current;if(typeof o=="function")if(r){const l=o(r);typeof l=="function"&&(i.current=l)}else i.current?(i.current(),i.current=null):o(r);else o&&(o.current=r)},[e])}const Wo=w.createContext({});function xt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function uu(t,e,n,s,i,r){var v,T;const{visualElement:o}=w.useContext(Pe),a=w.useContext(Io),l=w.useContext(ye),u=w.useContext(Se),c=u.reducedMotion,h=u.ski
vendor: 23,065 bytes, line 17
17pAnimations,f=w.useRef(null),d=w.useRef(!1);s=s||a.renderer,!f.current&&s&&(f.current=s(t,{visualState:e,parent:o,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c,skipAnimations:h,isSVG:r}),d.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const p=f.current,y=w.useContext(Wo);p&&!p.projection&&i&&(p.type==="html"||p.type==="svg")&&hu(f.current,n,i,y);const m=w.useRef(!1);w.useInsertionEffect(()=>{p&&m.current&&p.update(n,l)});const g=n[Yi],x=w.useRef(!!g&&typeof window<"u"&&!((v=window.MotionHandoffIsComplete)!=null&&v.call(window,g))&&((T=window.MotionHasOptimisedAnimation)==null?void 0:T.call(window,g)));return ge(()=>{d.current=!0,p&&(m.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),p.scheduleRenderMicrotask(),x.current&&p.animationState&&p.animationState.animateChanges())}),w.useEffect(()=>{p&&(!x.current&&p.animationState&&p.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{var b;(b=window.MotionHandoffMarkAsComplete)==null||b.call(window,g)}),x.current=!1),p.enteringChildren=void 0)}),p}function hu(t,e,n,s){const{layoutId:i,layout:r,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutAnchor:c,layoutCrossfade:h}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Uo(t.parent)),t.projection.setOptions({layoutId:i,layout:r,alwaysMeasureLayout:!!o||a&&xt(a),visualElement:t,animationType:typeof r=="string"?r:"both",initialPromotionConfig:s,crossfade:h,layoutScroll:l,layoutRoot:u,layoutAnchor:c})}function Uo(t){if(t)return t.options.allowProjection!==!1?t.projection:Uo(t.parent)}function Fe(t,{forwardMotionProps:e=!1,type:n}={},s,i){s&&Gc(s);const r=n?n==="svg":Nn(t),o=r?au:ru;function a(u,c){let h;const f={...w.useContext(Se),...u,layoutId:fu(u)},{isStatic:d}=f,p=Zc(u),y=o(u,d);if(!d&&typeof window<"u"){du();const m=pu(f);h=m.MeasureLayout,p.visualElement=uu(t,y,f,i,m.ProjectionNode,r)}return _.jsxs(Pe.Provider,{value:p,children:[h&&p.visualElement?_.jsx(h,{visualElement:p.visualElement,...f}):null,su(t,u,cu(y,p.visualElement,c),y,d,e,r)]})}a.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const l=w.forwardRef(a);return l[lu]=t,l}function fu({layoutId:t}){const e=w.useContext(pn).id;return e&&t!==void 0?e+"-"+t:t}function du(t,e){w.useContext(Io).strict}function pu(t){const e=Bo(),{drag:n,layout:s}=e;if(!n&&!s)return{};const i={...n,...s};return{MeasureLayout:n!=null&&n.isEnabled(t)||s!=null&&s.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function mu(t,e){if(typeof Proxy>"u")return Fe;const n=new Map,s=(r,o)=>Fe(r,o,t,e),i=(r,o)=>s(r,o);return new Proxy(i,{get:(r,o)=>o==="create"?s:(n.has(o)||n.set(o,Fe(o,void 0,t,e)),n.get(o))})}const gu=(t,e)=>e.isSVG??Nn(t)?new Gl(e):new Wl(e,{allowProjection:t!==w.Fragment});class yu extends lt{constructor(e){super(e),e.animationState||(e.animationState=Zl(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Te(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.call(this)}}let vu=0;class xu extends lt{constructor(){super(...arguments),this.id=vu++,this.isExitComplete=!1}update(){var r;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;if(e&&s===!1){if(this.isExitComplete){const{initial:o,custom:a}=this.node.getProps();if(typeof o=="string"||typeof o=="object"&&o!==null&&!Array.isArray(o)){const l=mt(this.node,o,a);if(l){const{transition:u,transitionEnd:c,...h}=l;for(const f in h)(r=this.node.getValue(f))==null||r.jump(h[f])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const Tu={animation:{Feature:yu},exit:{Feature:xu}};function zt(t){return{point:{x:t.pageX,y:t.pageY}}}const wu=t=>e=>Ln(e)&&t(e,zt(e));function Bt(t,e,n,s){return Ut(t,e,wu(n),s)}const Ko=({current:t})=>t?t.ownerDocument.defaultView:null,Xs=(t,e)=>Math.abs(t-e);function Su(t,e){const n=Xs(t.x,e.x),s=Xs(t.y,e.y);return Math.sqrt(n**2+s**2)}const Ys=new Set(["auto","scroll"]);class $o{constructor(e,n,{transformPagePoint:s,contextWindow:i=window,dragSnapToOrigin:r=!1,distanceThreshold:o=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=p=>{this.handleScroll(p.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Yt(this.lastRawMoveEventInfo,this.transformPagePoint));const p=Oe(this.lastMoveEventInfo,this.history),y=this.startEvent!==null,m=Su(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!y&&!m)return;const{point:g}=p,{timestamp:x}=j;this.history.push({...g,timestamp:x});const{onStart:v,onMove:T}=this.handlers;y||(v&&v(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),T&&T(this.lastMoveEvent,p)},this.handlePointerMove=(p,y)=>{this.lastMoveEvent=p,this.lastRawMoveEventInfo=y,this.lastMoveEventInfo=Yt(y,this.transformPagePoint),E.update(this.updatePoint,!0)},this.handlePointerUp=(p,y)=>{this.end();const{onEnd:m,onSessionEnd:g,resumeAnimation:x}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Oe(p.type==="pointercancel"?this.lastMoveEventInfo:Yt(y,this.transformPagePoint),this.history);this.startEvent&&m&&m(p,v),g&&g(p,v)},!Ln(e))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=o,this.contextWindow=i||window;const l=zt(e),u=Yt(l,this.transformPagePoint),{point:c}=u,{timestamp:h}=j;this.history=[{...c,timestamp:h}];const{onSessionStart:f}=n;f&&f(e,Oe(u,this.history));const d={passive:!0,capture:!0};this.removeListeners=Kt(Bt(this.contextWindow,"pointermove",this.handlePointerMove,d),Bt(this.contextWindow,"pointerup",this.handlePointerUp,d),Bt(this.contextWindow,"pointercancel",this.handlePointerUp,d)),a&&this.startScrollTracking(a)}startScrollTracking(e){let n=e.parentElement;for(;n;){const s=getComputedStyle(n);(Ys.has(s.overflowX)||Ys.has(s.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const n=this.scrollPositions.get(e);if(!n)return;const s=e===window,i=s?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},r={x:i.x-n.x,y:i.y-n.y};r.x===0&&r.y===0||(s?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=r.x,this.lastMoveEventInfo.point.y+=r.y):this.history.length>0&&(this.history[0].x-=r.x,this.history[0].y-=r.y),this.scrollPositions.set(e,i),E.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),it(this.updatePoint)}}function Yt(t,e){return e?{point:e(t.point)}:t}function qs(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Oe({point:t},e){return{point:t,delta:qs(t,_o(e)),offset:qs(t,Pu(e)),velocity:bu(e,.1)}}function Pu(t){return t[0]}function _o(t){return t[t.length-1]}function bu(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=_o(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>U(e)));)n--;if(!s)return{x:0,y:0};s===t[0]&&t.length>2&&i.timestamp-s.timestamp>U(e)*2&&(s=t[1]);const r=$(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 Au(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?D(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?D(n,t,s.max):Math.min(t,n)),t}function Zs(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 Vu(t,{top:e,left:n,bottom:s,right:i}){return{x:Zs(t.x,n,i),y:Zs(t.y,e,s)}}function Js(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 Cu(t,e){return{x:Js(t.x,e.x),y:Js(t.y,e.y)}}function Mu(t,e){let n=.5;const s=W(t),i=W(e);return i>s?n=jt(e.min,e.max-s,t.min):s>i&&(n=jt(t.min,t.max-i,e.min)),tt(0,1,n)}function Du(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 hn=.35;function Eu(t=hn){return t===!1?t=0:t===!0&&(t=hn),{x:Qs(t,"left","right"),y:Qs(t,"top","bottom")}}function Qs(t,e,n){return{min:ti(t,e),max:ti(t,n)}}function ti(t,e){return typeof t=="number"?t:t[e]||0}const Ru=new WeakMap;class Lu{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=I(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:s}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const r=h=>{n&&this.snapToCursor(zt(h).point),this.stopAnimation()},o=(h,f)=>{const{drag:d,dragPropagation:p,onDragStart:y}=this.getProps();if(d&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=il(d),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Z(g=>{let x=this.getAxisMotionValue(g).get()||0;if(Q.test(x)){const{projection:v}=this.visualElement;if(v&&v.layout){const T=v.layout.layoutBox[g];T&&(x=W(T)*(parseFloat(x)/100))}}this.originPoint[g]=x}),y&&E.update(()=>y(h,f),!1,!0),tn(this.visualElement,"transform");const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},a=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f;const{dragPropagation:d,dragDirectionLock:p,onDirectionLock:y,onDrag:m}=this.getProps();if(!d&&!this.openDragLock)return;const{offset:g}=f;if(p&&this.currentDirection===null){this.currentDirection=Iu(g),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",f.point,g),this.updateAxis("y",f.point,g),this.visualElement.render(),m&&E.update(()=>m(h,f),!1,!0)},l=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f,this.stop(h,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>{const{dragSnapToOrigin:h}=this.getProps();(h||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:c}=this.getProps();this.panSession=new $o(e,{onSessionStart:r,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:s,contextWindow:Ko(this.visualElement),element:this.visualElement.current})}stop(e,n){const s=e||this.latestPointerEvent,i=n||this.latestPanInfo,r=this.isDragging;if(this.cancel(),!r||!i||!s)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&E.postRender(()=>a(s,i))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!qt(e,i,this.currentDirection))return;const r=this.getAxisMotionValue(e);let o=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(o=Au(o,this.constraints[e],this.elastic[e])),r.set(o)}resolveConstraints(){var r;const{dragConstraints:e,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(r=this.visualElement.projection)==null?void 0:r.layout,i=this.constraints;e&&xt(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=Vu(s.layoutBox,e):this.constraints=!1,this.elastic=Eu(n),i!==this.constraints&&!xt(e)&&s&&this.constraints&&!this.hasMutatedConstraints&&Z(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Du(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!xt(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;i.root&&(i.root.scroll=void 0,i.root.updateScroll());const r=Il(s,i.root,this.visualElement.getTransformPagePoint());let o=Cu(i.layout.layoutBox,r);if(n){const a=n(Rl(o));this.hasMutatedConstraints=!!a,a&&(o=ho(a))}return o}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=Z(c=>{if(!qt(c,n,this.currentDirection))return;let h=l&&l[c]||{};(o===!0||o===c)&&(h={min:0,max:0});const f=i?200:1e6,d=i?40:1e7,p={type:"inertia",velocity:s?e[c]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...r,...h};return this.startAxisValueAnimation(c,p)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return tn(this.visualElement,e),s.start(Cn(e,s,0,n,this.visualElement,!1))}stopAnimation(){Z(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,i=this.visualElement.getProps()[n];return i||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){Z(n=>{const{drag:s}=this.getProps();if(!qt(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],l=r.get()||0;r.set(e[n]-D(o,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!xt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Z(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=Mu({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.constraints=!1,this.resolveConstraints(),Z(o=>{if(!qt(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(D(l,u,i[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Ru.set(this.visualElement,this);const e=this.visualElement.current,n=Bt(e,"pointerdown",u=>{const{drag:c,dragListener:h=!0}=this.getProps(),f=u.target,d=f!==e&&ul(f);c&&h&&!d&&this.start(u)});let s;const i=()=>{const{dragConstraints:u}=this.getProps();xt(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),s||(s=ku(e,u.current,()=>this.scalePositionWithinConstraints())))},{projection:r}=this.visualElement,o=r.addEventListener("measure",i);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),E.read(i);const a=Ut(window,"resize",()=>this.scalePositionWithinConstraints()),l=r.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:c})=>{this.isDragging&&c&&(Z(h=>{const f=this.getAxisMotionValue(h);f&&(this.originPoint[h]+=u[h].translate,f.set(f.get()+u[h].translate))}),this.visualElement.render())}));return()=>{a(),n(),o(),l&&l(),s&&s()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:o=hn,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:a}}}function ei(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function ku(t,e,n){const s=ls(t,ei(n)),i=ls(e,ei(n));return()=>{s(),i()}}function qt(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Iu(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class Bu extends lt{constructor(e){super(e),this.removeGroupControls=z,this.removeListeners=z,this.controls=new Lu(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||z}update(){const{dragControls:e}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};e!==n&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const je=t=>(e,n)=>{t&&E.update(()=>t(e,n),!1,!0)};class Fu extends lt{constructor(){super(...arguments),this.removePointerDownListener=z}onPointerDown(e){this.session=new $o(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ko(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:je(e),onStart:je(n),onMove:je(s),onEnd:(r,o)=>{delete this.session,i&&E.postRender(()=>i(r,o))}}}mount(){this.removePointerDownListener=Bt(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Ne=!1;class Ou extends w.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:r}=e;r&&(n.group&&n.group.add(r),s&&s.register&&i&&s.register(r),Ne&&r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),oe.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:r}=this.props,{projection:o}=s;return o&&(o.isPresent=r,e.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),Ne=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==r?o.willUpdate():this.safeToRemove(),e.isPresent!==r&&(r?o.promote():o.relegate()||E.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:e,layoutAnchor:n}=this.props,{projection:s}=e;s&&(s.options.layoutAnchor=n,s.root.didUpdate(),Rn.postRender(()=>{!s.currentAnimation&&s.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;Ne=!0,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 zo(t){const[e,n]=ko(),s=w.useContext(pn);return _.jsx(Ou,{...t,layoutGroup:s,switchLayoutGroup:w.useContext(Wo),isPresent:e,safeToRemove:n})}const ju={pan:{Feature:Fu},drag:{Feature:Bu,ProjectionNode:Lo,MeasureLayout:zo}};function ni(t,e,n){const{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,r=s[i];r&&E.postRender(()=>r(e,zt(e)))}class Nu extends lt{mount(){const{current:e}=this.node;e&&(this.unmount=rl(e,(n,s)=>(ni(this.node,s,"Start"),i=>ni(this.node,i,"End"))))}unmount(){}}class Wu extends lt{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=Kt(Ut(this.node.current,"focus",()=>this.onFocus()),Ut(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function si(t,e,n){const{props:s}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&s.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),r=s[i];r&&E.postRender(()=>r(e,zt(e)))}class Uu extends lt{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:n,propagate:s}=this.node.props;this.unmount=fl(e,(i,r)=>(si(this.node,r,"Start"),(o,{success:a})=>si(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(s==null?void 0:s.tap)===!1})}unmount(){}}const fn=new WeakMap,We=new WeakMap,Ku=t=>{const e=fn.get(t.target);e&&e(t)},$u=t=>{t.forEach(Ku)};function _u({root:t,...e}){const n=t||document;We.has(n)||We.set(n,{});const s=We.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver($u,{root:t,...e})),s[i]}function zu(t,e,n){const s=_u(e);return fn.set(t,n),s.observe(t),()=>{fn.delete(t),s.unobserve(t)}}const Gu={some:0,all:1};class Hu extends lt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var l;(l=this.stopObserver)==null||l.call(this);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:Gu[i]},a=u=>{const{isIntersecting:c}=u;if(this.isInView===c||(this.isInView=c,r&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:h,onViewportLeave:f}=this.node.getProps(),d=c?h:f;d&&d(u)};this.stopObserver=zu(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(Xu(e,n))&&this.startObserver()}unmount(){var e;(e=this.stopObserver)==null||e.call(this),this.hasEnteredView=!1,this.isInView=!1}}function Xu({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Yu={inView:{Feature:Hu},tap:{Feature:Uu},focus:{Feature:Wu},hover:{Feature:Nu}},qu={layout:{ProjectionNode:Lo,MeasureLayout:zo}},Zu={...Tu,...Yu,...ju,...qu},Go=mu(Zu,gu);function Ho(t){const e=yt(()=>gt(t)),{isStatic:n}=w.useContext(Se);if(n){const[,s]=w.useState(t);w.useEffect(()=>e.on("change",s),[])}return e}function Xo(t,e){const n=Ho(e()),s=()=>n.set(e());return s(),ge(()=>{const i=()=>E.preRender(s,!1,!0),r=t.map(o=>
17o.on("change",i));return()=>{r.forEach(o=>o()),it(s)}}),n}function Ju(t){kt.current=[],t();const e=Xo(kt.current,t);return kt.current=void 0,e}function Qu(t,e,n,s){if(typeof t=="function")return Ju(t);const r=typeof e=="function"?e:Sl(e,n,s),o=Array.isArray(t)?ii(t,r):ii([t],([l])=>r(l)),a=Array.isArray(t)?void 0:t.accelerate;return a&&!a.isTransformed&&typeof e!="function"&&Array.isArray(n)&&(s==null?void 0:s.clamp)!==!1&&(o.accelerate={...a,times:e,keyframes:n,isTransformed:!0}),o}function ii(t,e){const n=yt(()=>[]);return Xo(t,()=>{n.length=0;const s=t.length;for(let i=0;i<s;i++)n[i]=t[i].get();return e(n)})}const Yo=w.createContext(null);function th(t,e,n,s){if(!s)return t;const i=t.findIndex(c=>c.value===e);if(i===-1)return t;const r=s>0?1:-1,o=t[i+r];if(!o)return t;const a=t[i],l=o.layout,u=D(l.min,l.max,.5);return r===1&&a.layout.max+n>u||r===-1&&a.layout.min+n<u?er(t,i,i+r):t}function eh({children:t,as:e="ul",axis:n="y",onReorder:s,values:i,...r},o){const a=yt(()=>Go[e]),l=[],u=w.useRef(!1),c=w.useRef(null),h={axis:n,groupRef:c,registerItem:(p,y)=>{const m=l.findIndex(g=>p===g.value);m!==-1?l[m].layout=y[n]:l.push({value:p,layout:y[n]}),l.sort(nh)},updateOrder:(p,y,m)=>{if(u.current)return;const g=th(l,p,y,m);if(l!==g){u.current=!0;const x=[...i];for(let v=0;v<g.length;v++)if(l[v].value!==g[v].value){const T=i.indexOf(l[v].value),b=i.indexOf(g[v].value);T!==-1&&b!==-1&&([x[T],x[b]]=[x[b],x[T]]);break}s(x)}}};w.useEffect(()=>{u.current=!1});const f=p=>{c.current=p,typeof o=="function"?o(p):o&&(o.current=p)},d={overflowAnchor:"none",...r.style};return _.jsx(a,{...r,style:d,ref:f,ignoreStrict:!0,children:_.jsx(Yo.Provider,{value:h,children:t})})}const dh=w.forwardRef(eh);function nh(t,e){return t.layout.min-e.layout.min}const Zt=50,oi=25,sh=new Set(["auto","scroll"]),Ft=new WeakMap,Ot=new WeakMap;let Et=null;function ih(){if(Et){const t=dn(Et,"y");t&&(Ot.delete(t),Ft.delete(t));const e=dn(Et,"x");e&&e!==t&&(Ot.delete(e),Ft.delete(e)),Et=null}}function oh(t,e){const n=getComputedStyle(t),s=e==="x"?n.overflowX:n.overflowY,i=t===document.body||t===document.documentElement;return sh.has(s)||i}function dn(t,e){let n=t==null?void 0:t.parentElement;for(;n;){if(oh(n,e))return n;n=n.parentElement}return null}function rh(t,e,n){const s=e.getBoundingClientRect(),i=n==="x"?Math.max(0,s.left):Math.max(0,s.top),r=n==="x"?Math.min(window.innerWidth,s.right):Math.min(window.innerHeight,s.bottom),o=t-i,a=r-t;if(o<Zt){const l=1-o/Zt;return{amount:-oi*l*l,edge:"start"}}else if(a<Zt){const l=1-a/Zt;return{amount:oi*l*l,edge:"end"}}return{amount:0,edge:null}}function ah(t,e,n,s){if(!t)return;Et=t;const i=dn(t,n);if(!i)return;const r=e-(n==="x"?window.scrollX:window.scrollY),{amount:o,edge:a}=rh(r,i,n);if(a===null){Ot.delete(i),Ft.delete(i);return}const l=Ot.get(i),u=i===document.body||i===document.documentElement;if(l!==a){if(!(a==="start"&&s<0||a==="end"&&s>0))return;Ot.set(i,a);const h=n==="x"?i.scrollWidth-(u?window.innerWidth:i.clientWidth):i.scrollHeight-(u?window.innerHeight:i.clientHeight);Ft.set(i,h)}if(o>0){const c=Ft.get(i);if((n==="x"?u?window.scrollX:i.scrollLeft:u?window.scrollY:i.scrollTop)>=c)return}n==="x"?u?window.scrollBy({left:o}):i.scrollLeft+=o:u?window.scrollBy({top:o}):i.scrollTop+=o}function ri(t,e=0){return B(t)?t:Ho(e)}function lh({children:t,style:e={},value:n,as:s="li",onDrag:i,onDragEnd:r,layout:o=!0,...a},l){const u=yt(()=>Go[s]),c=w.useContext(Yo),h={x:ri(e.x),y:ri(e.y)},f=Qu([h.x,h.y],([g,x])=>g||x?1:"unset"),{axis:d,registerItem:p,updateOrder:y,groupRef:m}=c;return _.jsx(u,{drag:d,...a,dragSnapToOrigin:!0,style:{...e,x:h.x,y:h.y,zIndex:f},layout:o,onDrag:(g,x)=>{const{velocity:v,point:T}=x,b=h[d].get();y(n,b,v[d]),ah(m.current,T[d],d,v[d]),i&&i(g,x)},onDragEnd:(g,x)=>{ih(),r&&r(g,x)},onLayoutMeasure:g=>{p(n,g)},ref:l,ignoreStrict:!0,children:t})}const ph=w.forwardRef(lh);export{fh as A,dh as R,ph as a,_ as j,Go 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.