unis_crm/frontend/node_modules/framer-motion/dist/framer-motion.js

2 lines
176 KiB
JavaScript

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={},t.React)}(this,function(t,e){"use strict";function n(t){var e=Object.create(null);return t&&Object.keys(t).forEach(function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}}),e.default=t,Object.freeze(e)}var i=n(e),o=React,s=Symbol.for("react.element"),r=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,l=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function c(t,e,n){var i,o={},r=null,c=null;for(i in void 0!==n&&(r=""+n),void 0!==e.key&&(r=""+e.key),void 0!==e.ref&&(c=e.ref),e)a.call(e,i)&&!u.hasOwnProperty(i)&&(o[i]=e[i]);if(t&&t.defaultProps)for(i in e=t.defaultProps)void 0===o[i]&&(o[i]=e[i]);return{$$typeof:s,type:t,key:r,ref:c,props:o,_owner:l.current}}const h=r,d=c,p=c,m=e.createContext({});function f(t){const n=e.useRef(null);return null===n.current&&(n.current=t()),n.current}const g="undefined"!=typeof window,y=g?e.useLayoutEffect:e.useEffect,v=e.createContext(null);function x(t,e){-1===t.indexOf(e)&&t.push(e)}function w(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}function T([...t],e,n){const i=e<0?t.length+e:e;if(i>=0&&i<t.length){const i=n<0?t.length+n:n,[o]=t.splice(e,1);t.splice(i,0,o)}return t}const S=(t,e,n)=>n>e?e:n<t?t:n;function b(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}t.warning=()=>{},t.invariant=()=>{},"undefined"!=typeof process&&"production"!==process.env?.NODE_ENV&&(t.warning=(t,e,n)=>{t||"undefined"==typeof console||console.warn(b(e,n))},t.invariant=(t,e,n)=>{if(!t)throw new Error(b(e,n))});const P={},E=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function A(t){return"object"==typeof t&&null!==t}const M=t=>/^0[^.\s]+$/u.test(t);function V(t){let e;return()=>(void 0===e&&(e=t()),e)}const C=t=>t,k=(t,e)=>n=>e(t(n)),R=(...t)=>t.reduce(k),D=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i};class L{constructor(){this.subscriptions=[]}add(t){return x(this.subscriptions,t),()=>w(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(let o=0;o<i;o++){const i=this.subscriptions[o];i&&i(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const B=t=>1e3*t,j=t=>t/1e3;function I(t,e){return e?t*(1e3/e):0}const O=new Set;const F=(t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t},W=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function U(t,e,n,i){if(t===e&&n===i)return C;const o=e=>function(t,e,n,i,o){let s,r,a=0;do{r=e+(n-e)/2,s=W(r,i,o)-t,s>0?n=r:e=r}while(Math.abs(s)>1e-7&&++a<12);return r}(e,0,1,t,n);return t=>0===t||1===t?t:W(o(t),e,i)}const N=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,$=t=>e=>1-t(1-e),Y=U(.33,1.53,.69,.99),z=$(Y),H=N(z),X=t=>t>=1?1:(t*=2)<1?.5*z(t):.5*(2-Math.pow(2,-10*(t-1))),G=t=>1-Math.sin(Math.acos(t)),K=$(G),_=N(G),q=U(.42,0,1,1),Z=U(0,0,.58,1),J=U(.42,0,.58,1);const Q=t=>Array.isArray(t)&&"number"!=typeof t[0];function tt(t,e){return Q(t)?t[F(0,t.length,e)]:t}const et=t=>Array.isArray(t)&&"number"==typeof t[0],nt={linear:C,easeIn:q,easeInOut:J,easeOut:Z,circIn:G,circInOut:_,circOut:K,backIn:z,backInOut:H,backOut:Y,anticipate:X},it=e=>{if(et(e)){t.invariant(4===e.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[n,i,o,s]=e;return U(n,i,o,s)}return"string"==typeof e?(t.invariant(void 0!==nt[e],`Invalid easing type '${e}'`,"invalid-easing-type"),nt[e]):e},ot=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],st={value:null,addProjectionMetrics:null};function rt(t,e){let n=!1,i=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,r=ot.reduce((t,n)=>(t[n]=function(t,e){let n=new Set,i=new Set,o=!1,s=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function u(e){r.has(e)&&(c.schedule(e),t()),l++,e(a)}const c={schedule:(t,e=!1,s=!1)=>{const a=s&&o?n:i;return e&&r.add(t),a.add(t),t},cancel:t=>{i.delete(t),r.delete(t)},process:t=>{if(a=t,o)return void(s=!0);o=!0;const r=n;n=i,i=r,n.forEach(u),e&&st.value&&st.value.frameloop[e].push(l),l=0,n.clear(),o=!1,s&&(s=!1,c.process(t))}};return c}(s,e?n:void 0),t),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:h,preRender:d,render:p,postRender:m}=r,f=()=>{const s=P.useManualTiming,r=s?o.timestamp:performance.now();n=!1,s||(o.delta=i?1e3/60:Math.max(Math.min(r-o.timestamp,40),1)),o.timestamp=r,o.isProcessing=!0,a.process(o),l.process(o),u.process(o),c.process(o),h.process(o),d.process(o),p.process(o),m.process(o),o.isProcessing=!1,n&&e&&(i=!1,t(f))};return{schedule:ot.reduce((e,s)=>{const a=r[s];return e[s]=(e,s=!1,r=!1)=>(n||(n=!0,i=!0,o.isProcessing||t(f)),a.schedule(e,s,r)),e},{}),cancel:t=>{for(let e=0;e<ot.length;e++)r[ot[e]].cancel(t)},state:o,steps:r}}const{schedule:at,cancel:lt,state:ut,steps:ct}=rt("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:C,!0);let ht;function dt(){ht=void 0}const pt={now:()=>(void 0===ht&&pt.set(ut.isProcessing||P.useManualTiming?ut.timestamp:performance.now()),ht),set:t=>{ht=t,queueMicrotask(dt)}},mt={layout:0,mainThread:0,waapi:0},ft=t=>e=>"string"==typeof e&&e.startsWith(t),gt=ft("--"),yt=ft("var(--"),vt=t=>!!yt(t)&&xt.test(t.split("/*")[0].trim()),xt=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function wt(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}const Tt={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},St={...Tt,transform:t=>S(0,1,t)},bt={...Tt,default:1},Pt=t=>Math.round(1e5*t)/1e5,Et=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const At=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Mt=(t,e)=>n=>Boolean("string"==typeof n&&At.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),Vt=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[o,s,r,a]=i.match(Et);return{[t]:parseFloat(o),[e]:parseFloat(s),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},Ct={...Tt,transform:t=>Math.round((t=>S(0,255,t))(t))},kt={test:Mt("rgb","red"),parse:Vt("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+Ct.transform(t)+", "+Ct.transform(e)+", "+Ct.transform(n)+", "+Pt(St.transform(i))+")"};const Rt={test:Mt("#"),parse:function(t){let e="",n="",i="",o="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),o=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),o=t.substring(4,5),e+=e,n+=n,i+=i,o+=o),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:o?parseInt(o,16)/255:1}},transform:kt.transform},Dt=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),Lt=Dt("deg"),Bt=Dt("%"),jt=Dt("px"),It=Dt("vh"),Ot=Dt("vw"),Ft=(()=>({...Bt,parse:t=>Bt.parse(t)/100,transform:t=>Bt.transform(100*t)}))(),Wt={test:Mt("hsl","hue"),parse:Vt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+Bt.transform(Pt(e))+", "+Bt.transform(Pt(n))+", "+Pt(St.transform(i))+")"},Ut={test:t=>kt.test(t)||Rt.test(t)||Wt.test(t),parse:t=>kt.test(t)?kt.parse(t):Wt.test(t)?Wt.parse(t):Rt.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?kt.transform(t):Wt.transform(t),getAnimatableNone:t=>{const e=Ut.parse(t);return e.alpha=0,Ut.transform(e)}},Nt=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const $t="number",Yt="color",zt=/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 Ht(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},o=[];let s=0;const r=e.replace(zt,t=>(Ut.test(t)?(i.color.push(s),o.push(Yt),n.push(Ut.parse(t))):t.startsWith("var(")?(i.var.push(s),o.push("var"),n.push(t)):(i.number.push(s),o.push($t),n.push(parseFloat(t))),++s,"${}")).split("${}");return{values:n,split:r,indexes:i,types:o}}function Xt({split:t,types:e}){const n=t.length;return i=>{let o="";for(let s=0;s<n;s++)if(o+=t[s],void 0!==i[s]){const t=e[s];o+=t===$t?Pt(i[s]):t===Yt?Ut.transform(i[s]):i[s]}return o}}const Gt=(t,e)=>{return"number"==typeof t?e?.trim().endsWith("/")?t:0:"number"==typeof(n=t)?0:Ut.test(n)?Ut.getAnimatableNone(n):n;var n};const Kt={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(Et)?.length||0)+(t.match(Nt)?.length||0)>0},parse:function(t){return Ht(t).values},createTransformer:function(t){return Xt(Ht(t))},getAnimatableNone:function(t){const e=Ht(t);return Xt(e)(e.values.map((t,n)=>Gt(t,e.split[n])))}};function _t(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function qt({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let o=0,s=0,r=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;o=_t(a,i,t+1/3),s=_t(a,i,t),r=_t(a,i,t-1/3)}else o=s=r=n;return{red:Math.round(255*o),green:Math.round(255*s),blue:Math.round(255*r),alpha:i}}function Zt(t,e){return n=>n>0?e:t}const Jt=(t,e,n)=>t+(e-t)*n,Qt=(t,e,n)=>{const i=t*t,o=n*(e*e-i)+i;return o<0?0:Math.sqrt(o)},te=[Rt,kt,Wt];function ee(e){const n=(i=e,te.find(t=>t.test(i)));var i;if(t.warning(Boolean(n),`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!Boolean(n))return!1;let o=n.parse(e);return n===Wt&&(o=qt(o)),o}const ne=(t,e)=>{const n=ee(t),i=ee(e);if(!n||!i)return Zt(t,e);const o={...n};return t=>(o.red=Qt(n.red,i.red,t),o.green=Qt(n.green,i.green,t),o.blue=Qt(n.blue,i.blue,t),o.alpha=Jt(n.alpha,i.alpha,t),kt.transform(o))},ie=new Set(["none","hidden"]);function oe(t,e){return ie.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function se(t,e){return n=>Jt(t,e,n)}function re(t){return"number"==typeof t?se:"string"==typeof t?vt(t)?Zt:Ut.test(t)?ne:ue:Array.isArray(t)?ae:"object"==typeof t?Ut.test(t)?ne:le:Zt}function ae(t,e){const n=[...t],i=n.length,o=t.map((t,n)=>re(t)(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=o[e](t);return n}}function le(t,e){const n={...t,...e},i={};for(const o in n)void 0!==t[o]&&void 0!==e[o]&&(i[o]=re(t[o])(t[o],e[o]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const ue=(e,n)=>{const i=Kt.createTransformer(n),o=Ht(e),s=Ht(n);return o.indexes.var.length===s.indexes.var.length&&o.indexes.color.length===s.indexes.color.length&&o.indexes.number.length>=s.indexes.number.length?ie.has(e)&&!s.values.length||ie.has(n)&&!o.values.length?oe(e,n):R(ae(function(t,e){const n=[],i={color:0,var:0,number:0};for(let o=0;o<e.values.length;o++){const s=e.types[o],r=t.indexes[s][i[s]],a=t.values[r]??0;n[o]=a,i[s]++}return n}(o,s),s.values),i):(t.warning(!0,`Complex values '${e}' and '${n}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Zt(e,n))};function ce(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return Jt(t,e,n);return re(t)(t,e)}const he=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>at.update(e,t),stop:()=>lt(e),now:()=>ut.isProcessing?ut.timestamp:pt.now()}},de=(t,e,n=10)=>{let i="";const o=Math.max(Math.round(e/n),2);for(let e=0;e<o;e++)i+=Math.round(1e4*t(e/(o-1)))/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},pe=2e4;function me(t){let e=0;let n=t.next(e);for(;!n.done&&e<pe;)e+=50,n=t.next(e);return e>=pe?1/0:e}function fe(t,e=100,n){const i=n({...t,keyframes:[0,e]}),o=Math.min(me(i),pe);return{type:"keyframes",ease:t=>i.next(o*t).value/e,duration:j(o)}}const ge=100,ye=10,ve=1,xe=0,we=800,Te=.3,Se=.3,be={granular:.01,default:2},Pe={granular:.005,default:.5},Ee=.01,Ae=10,Me=.05,Ve=1;function Ce(t,e){return t*Math.sqrt(1-e*e)}const ke=.001;const Re=["duration","bounce"],De=["stiffness","damping","mass"];function Le(t,e){return e.some(e=>void 0!==t[e])}function Be(e){let n={velocity:xe,stiffness:ge,damping:ye,mass:ve,isResolvedFromDuration:!1,...e};if(!Le(e,De)&&Le(e,Re))if(n.velocity=0,e.visualDuration){const t=e.visualDuration,i=2*Math.PI/(1.2*t),o=i*i,s=2*S(.05,1,1-(e.bounce||0))*Math.sqrt(o);n={...n,mass:ve,stiffness:o,damping:s}}else{const i=function({duration:e=we,bounce:n=Te,velocity:i=xe,mass:o=ve}){let s,r;t.warning(e<=B(Ae),"Spring duration must be 10 seconds or less","spring-duration-limit");let a=1-n;a=S(Me,Ve,a),e=S(Ee,Ae,j(e)),a<1?(s=t=>{const n=t*a,o=n*e,s=n-i,r=Ce(t,a),l=Math.exp(-o);return ke-s/r*l},r=t=>{const n=t*a*e,o=n*i+i,r=Math.pow(a,2)*Math.pow(t,2)*e,l=Math.exp(-n),u=Ce(Math.pow(t,2),a);return(-s(t)+ke>0?-1:1)*((o-r)*l)/u}):(s=t=>Math.exp(-t*e)*((t-i)*e+1)-.001,r=t=>Math.exp(-t*e)*(e*e*(i-t)));const l=function(t,e,n){let i=n;for(let n=1;n<12;n++)i-=t(i)/e(i);return i}(s,r,5/e);if(e=B(e),isNaN(l))return{stiffness:ge,damping:ye,duration:e};{const t=Math.pow(l,2)*o;return{stiffness:t,damping:2*a*Math.sqrt(o*t),duration:e}}}({...e,velocity:0});n={...n,...i,mass:ve},n.isResolvedFromDuration=!0}return n}function je(t=Se,e=Te){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:o}=n;const s=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:u,mass:c,duration:h,velocity:d,isResolvedFromDuration:p}=Be({...n,velocity:-j(n.velocity||0)}),m=d||0,f=u/(2*Math.sqrt(l*c)),g=r-s,y=j(Math.sqrt(l/c)),v=Math.abs(g)<5;let x,w,T,S,b,P;if(i||(i=v?be.granular:be.default),o||(o=v?Pe.granular:Pe.default),f<1)T=Ce(y,f),S=(m+f*y*g)/T,x=t=>{const e=Math.exp(-f*y*t);return r-e*(S*Math.sin(T*t)+g*Math.cos(T*t))},b=f*y*S+g*T,P=f*y*g-S*T,w=t=>Math.exp(-f*y*t)*(b*Math.sin(T*t)+P*Math.cos(T*t));else if(1===f){x=t=>r-Math.exp(-y*t)*(g+(m+y*g)*t);const t=m+y*g;w=e=>Math.exp(-y*e)*(y*t*e-m)}else{const t=y*Math.sqrt(f*f-1);x=e=>{const n=Math.exp(-f*y*e),i=Math.min(t*e,300);return r-n*((m+f*y*g)*Math.sinh(i)+t*g*Math.cosh(i))/t};const e=(m+f*y*g)/t,n=f*y*e-g*t,i=f*y*g-e*t;w=e=>{const o=Math.exp(-f*y*e),s=Math.min(t*e,300);return o*(n*Math.sinh(s)+i*Math.cosh(s))}}const E={calculatedDuration:p&&h||null,velocity:t=>B(w(t)),next:t=>{if(!p&&f<1){const e=Math.exp(-f*y*t),n=Math.sin(T*t),s=Math.cos(T*t),l=r-e*(S*n+g*s),u=B(e*(b*n+P*s));return a.done=Math.abs(u)<=i&&Math.abs(r-l)<=o,a.value=a.done?r:l,a}const e=x(t);if(p)a.done=t>=h;else{const n=B(w(t));a.done=Math.abs(n)<=i&&Math.abs(r-e)<=o}return a.value=a.done?r:e,a},toString:()=>{const t=Math.min(me(E),pe),e=de(e=>E.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return E}je.applyToOptions=t=>{const e=fe(t,100,je);return t.ease=e.ease,t.duration=B(e.duration),t.type="keyframes",t};function Ie(t,e,n){const i=Math.max(e-5,0);return I(n-t(i),e-i)}function Oe({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:r,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let m=n*e;const f=h+m,g=void 0===r?f:r(f);g!==f&&(m=g-h);const y=t=>-m*Math.exp(-t/i),v=t=>g+y(t),x=t=>{const e=y(t),n=v(t);d.done=Math.abs(e)<=u,d.value=d.done?g:n};let w,T;const S=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(w=t,T=je({keyframes:[d.value,p(d.value)],velocity:Ie(v,t,d.value),damping:o,stiffness:s,restDelta:u,restSpeed:c}))};return S(0),{calculatedDuration:null,next:t=>{let e=!1;return T||void 0!==w||(e=!0,x(t),S(t)),void 0!==w&&t>=w?T.next(t-w):(!e&&x(t),d)}}}function Fe(e,n,{clamp:i=!0,ease:o,mixer:s}={}){const r=e.length;if(t.invariant(r===n.length,"Both input and output ranges must be the same length","range-length"),1===r)return()=>n[0];if(2===r&&n[0]===n[1])return()=>n[1];const a=e[0]===e[1];e[0]>e[r-1]&&(e=[...e].reverse(),n=[...n].reverse());const l=function(t,e,n){const i=[],o=n||P.mix||ce,s=t.length-1;for(let n=0;n<s;n++){let s=o(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||C:e;s=R(t,s)}i.push(s)}return i}(n,o,s),u=l.length,c=t=>{if(a&&t<e[0])return n[0];let i=0;if(u>1)for(;i<e.length-2&&!(t<e[i+1]);i++);const o=D(e[i],e[i+1],t);return l[i](o)};return i?t=>c(S(e[0],e[r-1],t)):c}function We(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const o=D(0,e,i);t.push(Jt(n,1,o))}}function Ue(t){const e=[0];return We(e,t.length-1),e}function Ne(t,e){return t.map(t=>t*e)}function $e(t,e){return t.map(()=>e||J).splice(0,t.length-1)}function Ye({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const o=Q(i)?i.map(it):it(i),s={done:!1,value:e[0]},r=Fe(Ne(n&&n.length===e.length?n:Ue(e),t),e,{ease:Array.isArray(o)?o:$e(e,o)});return{calculatedDuration:t,next:e=>(s.value=r(e),s.done=e>=t,s)}}const ze=t=>null!==t;function He(t,{repeat:e,repeatType:n="loop"},i,o=1){const s=t.filter(ze),r=o<0||e&&"loop"!==n&&e%2==1?0:s.length-1;return r&&void 0!==i?i:s[r]}const Xe={decay:Oe,inertia:Oe,tween:Ye,keyframes:Ye,spring:je};function Ge(t){"string"==typeof t.type&&(t.type=Xe[t.type])}class Ke{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const _e=t=>t/100;class qe extends Ke{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==pt.now()&&this.tick(pt.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},mt.mainThread++,this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){const{options:t}=this;Ge(t);const{type:e=Ye,repeat:n=0,repeatDelay:i=0,repeatType:o,velocity:s=0}=t;let{keyframes:r}=t;const a=e||Ye;a!==Ye&&"number"!=typeof r[0]&&(this.mixKeyframes=R(_e,ce(r[0],r[1])),r=[0,100]);const l=a({...t,keyframes:r});"mirror"===o&&(this.mirroredGenerator=a({...t,keyframes:[...r].reverse(),velocity:-s})),null===l.calculatedDuration&&(l.calculatedDuration=me(l));const{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=l}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:n,totalDuration:i,mixKeyframes:o,mirroredGenerator:s,resolvedDuration:r,calculatedDuration:a}=this;if(null===this.startTime)return n.next(0);const{delay:l=0,keyframes:u,repeat:c,repeatType:h,repeatDelay:d,type:p,onUpdate:m,finalKeyframe:f}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const g=this.currentTime-l*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?g<0:g>i;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=i);let v=this.currentTime,x=n;if(c){const t=Math.min(this.currentTime,i)/r;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,c+1);Boolean(e%2)&&("reverse"===h?(n=1-n,d&&(n-=d/r)):"mirror"===h&&(x=s)),v=S(0,1,n)*r}const w=y?{done:!1,value:u[0]}:x.next(v);o&&!y&&(w.value=o(w.value));let{done:T}=w;y||null===a||(T=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const b=null===this.holdTime&&("finished"===this.state||"running"===this.state&&T);return b&&p!==Oe&&(w.value=He(u,this.options,f,this.speed)),m&&m(w.value),b&&this.finish(),w}then(t,e){return this.finished.then(t,e)}get duration(){return j(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+j(t)}get time(){return j(this.currentTime)}set time(t){t=B(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);return Ie(t=>this.generator.next(t).value,t,this.generator.next(t).value)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;e&&this.driver&&this.updateTime(pt.now()),this.playbackSpeed=t,e&&this.driver&&(this.time=j(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=he,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=e??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(pt.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,mt.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function Ze(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Je=t=>180*t/Math.PI,Qe=t=>{const e=Je(Math.atan2(t[1],t[0]));return en(e)},tn={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Qe,rotateZ:Qe,skewX:t=>Je(Math.atan(t[1])),skewY:t=>Je(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},en=t=>((t%=360)<0&&(t+=360),t),nn=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),on=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),sn={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:nn,scaleY:on,scale:t=>(nn(t)+on(t))/2,rotateX:t=>en(Je(Math.atan2(t[6],t[5]))),rotateY:t=>en(Je(Math.atan2(-t[2],t[0]))),rotateZ:Qe,rotate:Qe,skewX:t=>Je(Math.atan(t[4])),skewY:t=>Je(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function rn(t){return t.includes("scale")?1:0}function an(t,e){if(!t||"none"===t)return rn(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,o;if(n)i=sn,o=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=tn,o=e}if(!o)return rn(e);const s=i[e],r=o[1].split(",").map(un);return"function"==typeof s?s(r):r[s]}const ln=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return an(n,e)};function un(t){return parseFloat(t.trim())}const cn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],hn=(()=>new Set(cn))(),dn=t=>t===Tt||t===jt,pn=new Set(["x","y","z"]),mn=cn.filter(t=>!pn.has(t));const fn={width:({x:t},{paddingLeft:e="0",paddingRight:n="0",boxSizing:i})=>{const o=t.max-t.min;return"border-box"===i?o:o-parseFloat(e)-parseFloat(n)},height:({y:t},{paddingTop:e="0",paddingBottom:n="0",boxSizing:i})=>{const o=t.max-t.min;return"border-box"===i?o:o-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})=>an(e,"x"),y:(t,{transform:e})=>an(e,"y")};fn.translateX=fn.x,fn.translateY=fn.y;const gn=new Set;let yn=!1,vn=!1,xn=!1;function wn(){if(vn){const t=Array.from(gn).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),n=new Map;e.forEach(t=>{const e=function(t){const e=[];return mn.forEach(n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e}(t);e.length&&(n.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=n.get(t);e&&e.forEach(([e,n])=>{t.getValue(e)?.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}vn=!1,yn=!1,gn.forEach(t=>t.complete(xn)),gn.clear()}function Tn(){gn.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(vn=!0)})}function Sn(){xn=!0,Tn(),wn(),xn=!1}class bn{constructor(t,e,n,i,o,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=o,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(gn.add(this),yn||(yn=!0,at.read(Tn),at.resolveKeyframes(wn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;if(null===t[0]){const o=i?.get(),s=t[t.length-1];if(void 0!==o)t[0]=o;else if(n&&e){const i=n.readValue(e,s);null!=i&&(t[0]=i)}void 0===t[0]&&(t[0]=s),i&&void 0===o&&i.set(t[0])}Ze(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),gn.delete(this)}cancel(){"scheduled"===this.state&&(gn.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const Pn=t=>t.startsWith("--");function En(t,e,n){Pn(e)?t.style.setProperty(e,n):t.style[e]=n}const An={};function Mn(t,e){const n=V(t);return()=>An[e]??n()}const Vn=Mn(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),Cn=Mn(()=>void 0!==window.ViewTimeline,"viewTimeline"),kn=Mn(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),Rn=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,Dn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Rn([0,.65,.55,1]),circOut:Rn([.55,0,1,.45]),backIn:Rn([.31,.01,.66,-.59]),backOut:Rn([.33,1.53,.69,.99])};function Ln(t,e){return t?"function"==typeof t?kn()?de(t,e):"ease-out":et(t)?Rn(t):Array.isArray(t)?t.map(t=>Ln(t,e)||Dn.easeOut):Dn[t]:void 0}function Bn(t,e,n,{delay:i=0,duration:o=300,repeat:s=0,repeatType:r="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[e]:n};l&&(c.offset=l);const h=Ln(a,o);Array.isArray(h)&&(c.easing=h),st.value&&mt.waapi++;const d={delay:i,duration:o,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:s+1,direction:"reverse"===r?"alternate":"normal"};u&&(d.pseudoElement=u);const p=t.animate(c,d);return st.value&&p.finished.finally(()=>{mt.waapi--}),p}function jn(t){return"function"==typeof t&&"applyToOptions"in t}function In({type:t,...e}){return jn(t)&&kn()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class On extends Ke{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:i,keyframes:o,pseudoElement:s,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=Boolean(s),this.allowFlatten=r,this.options=e,t.invariant("string"!=typeof e.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const u=In(e);this.animation=Bn(n,i,o,u,s),!1===u.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const t=He(o,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(t),En(n,i,t),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return j(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+j(t)}get time(){return j(Number(this.animation.currentTime)||0)}set time(t){const e=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=B(t),e&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:e,rangeEnd:n,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&Vn()?(this.animation.timeline=t,e&&(this.animation.rangeStart=e),n&&(this.animation.rangeEnd=n),C):i(this)}}const Fn={anticipate:X,backInOut:H,circInOut:_};function Wn(t){"string"==typeof t.ease&&t.ease in Fn&&(t.ease=Fn[t.ease])}class Un extends On{constructor(t){Wn(t),Ge(t),super(t),void 0!==t.startTime&&!1!==t.autoplay&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:e,onUpdate:n,onComplete:i,element:o,...s}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);const r=new qe({...s,autoplay:!1}),a=Math.max(10,pt.now()-this.startTime),l=S(0,10,a-10),u=r.sample(a).value,{name:c}=this.options;o&&c&&En(o,c,u),e.setWithVelocity(r.sample(Math.max(0,a-l)).value,u,l),r.stop()}}const Nn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Kt.test(t)&&"0"!==t||t.startsWith("url(")));function $n(t){t.duration=0,t.type="keyframes"}const Yn=new Set(["opacity","clipPath","filter","transform"]),zn=V(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Hn(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:o,damping:s,type:r}=t,a=e?.owner?.current;if(!(a instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=e.owner.getProps();return zn()&&n&&Yn.has(n)&&("transform"!==n||!u)&&!l&&!i&&"mirror"!==o&&0!==s&&"inertia"!==r}class Xn extends Ke{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:s="loop",keyframes:r,name:a,motionValue:l,element:u,...c}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=pt.now();const h={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:o,repeatType:s,name:a,motionValue:l,element:u,...c},d=u?.KeyframeResolver||bn;this.keyframeResolver=new d(r,(t,e,n)=>this.onKeyframesResolved(t,e,h,!n),a,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,i,o){this.keyframeResolver=void 0;const{name:s,type:r,velocity:a,delay:l,isHandoff:u,onUpdate:c}=i;this.resolvedAt=pt.now();let h=!0;(function(e,n,i,o){const s=e[0];if(null===s)return!1;if("display"===n||"visibility"===n)return!0;const r=e[e.length-1],a=Nn(s,n),l=Nn(r,n);return t.warning(a===l,`You are trying to animate ${n} from "${s}" to "${r}". "${a?r:s}" is not an animatable value.`,"value-not-animatable"),!(!a||!l)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(e)||("spring"===i||jn(i))&&o)})(e,s,r,a)||(h=!1,!P.instantAnimations&&l||c?.(He(e,i,n)),e[0]=e[e.length-1],$n(i),i.repeat=0);const d={startTime:o?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:e},p=h&&!u&&Hn(d),m=d.motionValue?.owner?.current,f=p?new Un({...d,element:m}):new qe(d);f.finished.then(()=>{this.notifyFinished()}).catch(C),this.pendingTimeline&&(this.stopTimeline=f.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=f}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Sn()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class Gn{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t){const e=this.animations.map(e=>e.attachTimeline(t));return()=>{e.forEach((t,e)=>{t&&t(),this.animations[e].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return Kn(this.animations,"duration")}get iterationDuration(){return Kn(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function Kn(t,e){let n=0;for(let i=0;i<t.length;i++){const o=t[i][e];null!==o&&o>n&&(n=o)}return n}class _n extends Gn{then(t,e){return this.finished.finally(t).then(()=>{})}}class qn extends On{constructor(t){super(),this.animation=t,t.onfinish=()=>{this.finishedTime=this.time,this.notifyFinished()}}}const Zn=new WeakMap,Jn=(t,e="")=>`${t}:${e}`;function Qn(t){const e=Zn.get(t)||new Map;return Zn.set(t,e),e}function ti(t,e,n,i=0,o=1){const s=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),r=t.size,a=(r-1)*i;return"function"==typeof n?n(s,r):1===o?s*i:a-s*i}const ei=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ni(t){const e=ei.exec(t);if(!e)return[,];const[,n,i,o]=e;return[`--${n??i}`,o]}function ii(e,n,i=1){t.invariant(i<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[o,s]=ni(e);if(!o)return;const r=window.getComputedStyle(n).getPropertyValue(o);if(r){const t=r.trim();return E(t)?parseFloat(t):t}return vt(s)?ii(s,n,i+1):s}const oi={type:"spring",stiffness:500,damping:25,restSpeed:10},si={type:"keyframes",duration:.8},ri={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ai=(t,{keyframes:e})=>e.length>2?si:hn.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:oi:ri,li=t=>null!==t;function ui(t,{repeat:e,repeatType:n="loop"},i){const o=t.filter(li),s=e&&"loop"!==n&&e%2==1?0:o.length-1;return s&&void 0!==i?i:o[s]}function ci(t,e){if(t?.inherit&&e){const{inherit:n,...i}=t;return{...e,...i}}return t}function hi(t,e){const n=t?.[e]??t?.default??t;return n!==t?ci(n,t):n}function di({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:o,repeat:s,repeatType:r,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const pi=(t,e,n,i={},o,s)=>r=>{const a=hi(i,t)||{},l=a.delay||i.delay||0;let{elapsed:u=0}=i;u-=B(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:t=>{e.set(t),a.onUpdate&&a.onUpdate(t)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:s?void 0:o};di(a)||Object.assign(c,ai(t,c)),c.duration&&(c.duration=B(c.duration)),c.repeatDelay&&(c.repeatDelay=B(c.repeatDelay)),void 0!==c.from&&(c.keyframes[0]=c.from);let h=!1;if((!1===c.type||0===c.duration&&!c.repeatDelay)&&($n(c),0===c.delay&&(h=!0)),(P.instantAnimations||P.skipAnimations||o?.shouldSkipAnimations)&&(h=!0,$n(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,h&&!s&&void 0!==e.get()){const t=ui(c.keyframes,a);if(void 0!==t)return void at.update(()=>{c.onUpdate(t),c.onComplete()})}return a.isSync?new qe(c):new Xn(c)};function mi(t){const e=[{},{}];return t?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function fi(t,e,n,i){if("function"==typeof e){const[o,s]=mi(i);e=e(void 0!==n?n:t.custom,o,s)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[o,s]=mi(i);e=e(void 0!==n?n:t.custom,o,s)}return e}function gi(t,e,n){const i=t.getProps();return fi(i,e,void 0!==n?n:i.custom,t)}const yi=new Set(["width","height","top","left","right","bottom",...cn]),vi={current:void 0};class xi{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=pt.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=pt.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new L);const n=this.events[t].add(e);return"change"===t?()=>{n(),at.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return vi.current&&vi.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=pt.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return I(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function wi(t,e){return new xi(t,e)}const Ti=t=>Array.isArray(t);function Si(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,wi(n))}function bi(t){return Ti(t)?t[t.length-1]||0:t}function Pi(t,e){const n=gi(t,e);let{transitionEnd:i={},transition:o={},...s}=n||{};s={...s,...i};for(const e in s){Si(t,e,bi(s[e]))}}const Ei=t=>Boolean(t&&t.getVelocity);function Ai(t){return Boolean(Ei(t)&&t.add)}function Mi(t,e){const n=t.getValue("willChange");if(Ai(n))return n.add(e);if(!n&&P.WillChange){const n=new P.WillChange("auto");t.addValue("willChange",n),n.add(e)}}function Vi(t){return t.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Ci="framerAppearId",ki="data-"+Vi(Ci);function Ri(t){return t.props[ki]}function Di({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function Li(t,e,{delay:n=0,transitionOverride:i,type:o}={}){let{transition:s,transitionEnd:r,...a}=e;const l=t.getDefaultTransition();s=s?ci(s,l):l;const u=s?.reduceMotion;i&&(s=i);const c=[],h=o&&t.animationState&&t.animationState.getState()[o];for(const e in a){const i=t.getValue(e,t.latestValues[e]??null),o=a[e];if(void 0===o||h&&Di(h,e))continue;const r={delay:n,...hi(s||{},e)},l=i.get();if(void 0!==l&&!i.isAnimating&&!Array.isArray(o)&&o===l&&!r.velocity)continue;let d=!1;if(window.MotionHandoffAnimation){const n=Ri(t);if(n){const t=window.MotionHandoffAnimation(n,e,at);null!==t&&(r.startTime=t,d=!0)}}Mi(t,e);const p=u??t.shouldReduceMotion;i.start(pi(e,i,o,p&&yi.has(e)?{type:!1}:r,t,d));const m=i.animation;m&&c.push(m)}if(r){const e=()=>at.update(()=>{r&&Pi(t,r)});c.length?Promise.all(c).then(e):e()}return c}function Bi(t,e,n={}){const i=gi(t,e,"exit"===n.type?t.presenceContext?.custom:void 0);let{transition:o=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const s=i?()=>Promise.all(Li(t,i,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:s=0,staggerChildren:r,staggerDirection:a}=o;return function(t,e,n=0,i=0,o=0,s=1,r){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(Bi(l,e,{...r,delay:n+("function"==typeof i?0:i)+ti(t.variantChildren,l,i,o,s)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}(t,e,i,s,r,a,n)}:()=>Promise.resolve(),{when:a}=o;if(a){const[t,e]="beforeChildren"===a?[s,r]:[r,s];return t().then(()=>e())}return Promise.all([s(),r(n.delay)])}function ji(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const o=e.map(e=>Bi(t,e,n));i=Promise.all(o)}else if("string"==typeof e)i=Bi(t,e,n);else{const o="function"==typeof e?gi(t,e,n.custom):e;i=Promise.all(Li(t,o,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}const Ii=t=>e=>e.test(t),Oi=[Tt,jt,Bt,Lt,Ot,It,{test:t=>"auto"===t,parse:t=>t}],Fi=t=>Oi.find(Ii(t));function Wi(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||M(t))}const Ui=new Set(["brightness","contrast","saturate","opacity"]);function Ni(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(Et)||[];if(!i)return t;const o=n.replace(i,"");let s=Ui.has(e)?1:0;return i!==n&&(s*=100),e+"("+s+o+")"}const $i=/\b([a-z-]*)\(.*?\)/gu,Yi={...Kt,getAnimatableNone:t=>{const e=t.match($i);return e?e.map(Ni).join(" "):t}},zi={...Kt,getAnimatableNone:t=>{const e=Kt.parse(t);return Kt.createTransformer(t)(e.map(t=>"number"==typeof t?0:"object"==typeof t?{...t,alpha:1}:t))}},Hi={...Tt,transform:Math.round},Xi={rotate:Lt,rotateX:Lt,rotateY:Lt,rotateZ:Lt,scale:bt,scaleX:bt,scaleY:bt,scaleZ:bt,skew:Lt,skewX:Lt,skewY:Lt,distance:jt,translateX:jt,translateY:jt,translateZ:jt,x:jt,y:jt,z:jt,perspective:jt,transformPerspective:jt,opacity:St,originX:Ft,originY:Ft,originZ:jt},Gi={borderWidth:jt,borderTopWidth:jt,borderRightWidth:jt,borderBottomWidth:jt,borderLeftWidth:jt,borderRadius:jt,borderTopLeftRadius:jt,borderTopRightRadius:jt,borderBottomRightRadius:jt,borderBottomLeftRadius:jt,width:jt,maxWidth:jt,height:jt,maxHeight:jt,top:jt,right:jt,bottom:jt,left:jt,inset:jt,insetBlock:jt,insetBlockStart:jt,insetBlockEnd:jt,insetInline:jt,insetInlineStart:jt,insetInlineEnd:jt,padding:jt,paddingTop:jt,paddingRight:jt,paddingBottom:jt,paddingLeft:jt,paddingBlock:jt,paddingBlockStart:jt,paddingBlockEnd:jt,paddingInline:jt,paddingInlineStart:jt,paddingInlineEnd:jt,margin:jt,marginTop:jt,marginRight:jt,marginBottom:jt,marginLeft:jt,marginBlock:jt,marginBlockStart:jt,marginBlockEnd:jt,marginInline:jt,marginInlineStart:jt,marginInlineEnd:jt,fontSize:jt,backgroundPositionX:jt,backgroundPositionY:jt,...Xi,zIndex:Hi,fillOpacity:St,strokeOpacity:St,numOctaves:Hi},Ki={...Gi,color:Ut,backgroundColor:Ut,outlineColor:Ut,fill:Ut,stroke:Ut,borderColor:Ut,borderTopColor:Ut,borderRightColor:Ut,borderBottomColor:Ut,borderLeftColor:Ut,filter:Yi,WebkitFilter:Yi,mask:zi,WebkitMask:zi},_i=t=>Ki[t],qi=new Set([Yi,zi]);function Zi(t,e){let n=_i(t);return qi.has(n)||(n=Kt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Ji=new Set(["auto","none","0"]);class Qi extends bn{constructor(t,e,n,i,o){super(t,e,n,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let n=0;n<t.length;n++){let i=t[n];if("string"==typeof i&&(i=i.trim(),vt(i))){const o=ii(i,e.current);void 0!==o&&(t[n]=o),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!yi.has(n)||2!==t.length)return;const[i,o]=t,s=Fi(i),r=Fi(o);if(wt(i)!==wt(o)&&fn[n])this.needsMeasurement=!0;else if(s!==r)if(dn(s)&&dn(r))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else fn[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)(null===t[e]||Wi(t[e]))&&n.push(e);n.length&&function(t,e,n){let i,o=0;for(;o<t.length&&!i;){const e=t[o];"string"==typeof e&&!Ji.has(e)&&Ht(e).values.length&&(i=t[o]),o++}if(i&&n)for(const o of e)t[o]=Zi(n,i)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=fn[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const i=e[e.length-1];void 0!==i&&t.getValue(n,i).jump(i,!1)}measureEndState(){const{element:t,name:e,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const i=t.getValue(e);i&&i.jump(this.measuredOrigin,!1);const o=n.length-1,s=n[o];n[o]=fn[e](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==s&&void 0===this.finalKeyframe&&(this.finalKeyframe=s),this.removedTransforms?.length&&this.removedTransforms.forEach(([e,n])=>{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}const to=new Set(["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","width","maxWidth","height","maxHeight","top","right","bottom","left","inset","insetBlock","insetBlockStart","insetBlockEnd","insetInline","insetInlineStart","insetInlineEnd","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingBlock","paddingBlockStart","paddingBlockEnd","paddingInline","paddingInlineStart","paddingInlineEnd","margin","marginTop","marginRight","marginBottom","marginLeft","marginBlock","marginBlockStart","marginBlockEnd","marginInline","marginInlineStart","marginInlineEnd","fontSize","backgroundPositionX","backgroundPositionY"]);function eo(t,e){for(let n=0;n<t.length;n++)"number"==typeof t[n]&&to.has(e)&&(t[n]=t[n]+"px")}const no=V(()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0}),io=new Set(["opacity","clipPath","filter","transform"]);function oo(t,e,n){if(null==t)return[];if(t instanceof EventTarget)return[t];if("string"==typeof t){let i=document;e&&(i=e.current);const o=n?.[t]??i.querySelectorAll(t);return o?Array.from(o):[]}return Array.from(t).filter(t=>null!=t)}function so(t){return(e,n)=>{const i=oo(e),o=[];for(const e of i){const i=t(e,n);o.push(i)}return()=>{for(const t of o)t()}}}const ro=(t,e)=>e&&"number"==typeof t?e.transform(t):t;class ao{constructor(){this.latest={},this.values=new Map}set(t,e,n,i,o=!0){const s=this.values.get(t);s&&s.onRemove();const r=()=>{const i=e.get();this.latest[t]=o?ro(i,Gi[t]):i,n&&at.render(n)};r();const a=e.on("change",r);i&&e.addDependent(i);const l=()=>{a(),n&&lt(n),this.values.delete(t),i&&e.removeDependent(i)};return this.values.set(t,{value:e,onRemove:l}),l}get(t){return this.values.get(t)?.value}}function lo(t){const e=new WeakMap;return(n,i)=>{const o=e.get(n)??new ao;e.set(n,o);const s=[];for(const e in i){const r=i[e],a=t(n,o,e,r);s.push(a)}return()=>{for(const t of s)t()}}}const uo=(t,e,n,i)=>{const o=function(t,e){if(!(e in t))return!1;const n=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),e)||Object.getOwnPropertyDescriptor(t,e);return n&&"function"==typeof n.set}(t,n),s=o?n:n.startsWith("data")||n.startsWith("aria")?Vi(n):n,r=o?()=>{t[s]=e.latest[n]}:()=>{const i=e.latest[n];null==i?t.removeAttribute(s):t.setAttribute(s,String(i))};return e.set(n,i,r)},co=so(lo(uo)),ho=lo((t,e,n,i)=>e.set(n,i,()=>{t[n]=e.latest[n]},void 0,!1));function po(t){return A(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const mo={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};const fo=new Set(["originX","originY","originZ"]),go=(t,e,n,i)=>{let o,s;return hn.has(n)?(e.get("transform")||(po(t)||e.get("transformBox")||go(t,e,"transformBox",new xi("fill-box")),e.set("transform",new xi("none"),()=>{t.style.transform=function(t){let e="",n=!0;for(let i=0;i<cn.length;i++){const o=cn[i],s=t.latest[o];if(void 0===s)continue;let r=!0;if("number"==typeof s)r=s===(o.startsWith("scale")?1:0);else{const t=parseFloat(s);r=o.startsWith("scale")?1===t:0===t}r||(n=!1,e+=`${mo[o]||o}(${s}) `)}return n?"none":e.trim()}(e)})),s=e.get("transform")):fo.has(n)?(e.get("transformOrigin")||e.set("transformOrigin",new xi(""),()=>{const n=e.latest.originX??"50%",i=e.latest.originY??"50%",o=e.latest.originZ??0;t.style.transformOrigin=`${n} ${i} ${o}`}),s=e.get("transformOrigin")):o=Pn(n)?()=>{t.style.setProperty(n,e.latest[n])}:()=>{t.style[n]=e.latest[n]},e.set(n,i,o,s)},yo=so(lo(go));const vo=so(lo((t,e,n,i)=>{if(n.startsWith("path"))return function(t,e,n,i){return at.render(()=>t.setAttribute("pathLength","1")),"pathOffset"===n?e.set(n,i,()=>{const i=e.latest[n];t.setAttribute("stroke-dashoffset",""+-i)}):(e.get("stroke-dasharray")||e.set("stroke-dasharray",new xi("1 1"),()=>{const{pathLength:n=1,pathSpacing:i}=e.latest;t.setAttribute("stroke-dasharray",`${n} ${i??1-Number(n)}`)}),e.set(n,i,void 0,e.get("stroke-dasharray")))}(t,e,n,i);if(n.startsWith("attr"))return uo(t,e,function(t){return t.replace(/^attr([A-Z])/,(t,e)=>e.toLowerCase())}(n),i);return(n in t.style?go:uo)(t,e,n,i)}));const{schedule:xo,cancel:wo}=rt(queueMicrotask,!1),To={x:!1,y:!1};function So(){return To.x||To.y}function bo(t){return"x"===t||"y"===t?To[t]?null:(To[t]=!0,()=>{To[t]=!1}):To.x||To.y?null:(To.x=To.y=!0,()=>{To.x=To.y=!1})}function Po(t,e){const n=oo(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},()=>i.abort()]}function Eo(t,e,n={}){const[i,o,s]=Po(t,n);return i.forEach(t=>{let n,i=!1,s=!1;const r=e=>{n&&(n(e),n=void 0),t.removeEventListener("pointerleave",l)},a=t=>{i=!1,window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",a),s&&(s=!1,r(t))},l=t=>{"touch"!==t.pointerType&&(i?s=!0:r(t))};t.addEventListener("pointerenter",i=>{if("touch"===i.pointerType||So())return;s=!1;const r=e(t,i);"function"==typeof r&&(n=r,t.addEventListener("pointerleave",l,o))},o),t.addEventListener("pointerdown",()=>{i=!0,window.addEventListener("pointerup",a,o),window.addEventListener("pointercancel",a,o)},o)}),s}const Ao=(t,e)=>!!e&&(t===e||Ao(t,e.parentElement)),Mo=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,Vo=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Co(t){return Vo.has(t.tagName)||!0===t.isContentEditable}const ko=new Set(["INPUT","SELECT","TEXTAREA"]);function Ro(t){return ko.has(t.tagName)||!0===t.isContentEditable}const Do=new WeakSet;function Lo(t){return e=>{"Enter"===e.key&&t(e)}}function Bo(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function jo(t){return Mo(t)&&!So()}const Io=new WeakSet;function Oo(t,e,n={}){const[i,o,s]=Po(t,n),r=t=>{const i=t.currentTarget;if(!jo(t))return;if(Io.has(t))return;Do.add(i),n.stopPropagation&&Io.add(t);const s=e(i,t),r=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),Do.has(i)&&Do.delete(i),jo(t)&&"function"==typeof s&&s(t,{success:e})},a=t=>{r(t,i===window||i===document||n.useGlobalTarget||Ao(i,t.target))},l=t=>{r(t,!1)};window.addEventListener("pointerup",a,o),window.addEventListener("pointercancel",l,o)};return i.forEach(t=>{(n.useGlobalTarget?window:t).addEventListener("pointerdown",r,o),po(t)&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=Lo(()=>{if(Do.has(n))return;Bo(n,"down");const t=Lo(()=>{Bo(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>Bo(n,"cancel"),e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)})(t,o)),Co(t)||t.hasAttribute("tabindex")||(t.tabIndex=0))}),s}function Fo(t,e){const n=window.getComputedStyle(t);return Pn(e)?n.getPropertyValue(e):n[e]}function Wo(t){return A(t)&&"ownerSVGElement"in t}const Uo=new WeakMap;let No;const $o=(t,e,n)=>(i,o)=>o&&o[0]?o[0][t+"Size"]:Wo(i)&&"getBBox"in i?i.getBBox()[e]:i[n],Yo=$o("inline","width","offsetWidth"),zo=$o("block","height","offsetHeight");function Ho({target:t,borderBoxSize:e}){Uo.get(t)?.forEach(n=>{n(t,{get width(){return Yo(t,e)},get height(){return zo(t,e)}})})}function Xo(t){t.forEach(Ho)}function Go(t,e){No||"undefined"!=typeof ResizeObserver&&(No=new ResizeObserver(Xo));const n=oo(t);return n.forEach(t=>{let n=Uo.get(t);n||(n=new Set,Uo.set(t,n)),n.add(e),No?.observe(t)}),()=>{n.forEach(t=>{const n=Uo.get(t);n?.delete(e),n?.size||No?.unobserve(t)})}}const Ko=new Set;let _o;function qo(t){return Ko.add(t),_o||(_o=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};Ko.forEach(e=>e(t))},window.addEventListener("resize",_o)),()=>{Ko.delete(t),Ko.size||"function"!=typeof _o||(window.removeEventListener("resize",_o),_o=void 0)}}function Zo(t,e){return"function"==typeof t?qo(t):Go(t,e)}function Jo(t,e){let n;const i=()=>{const{currentTime:i}=e,o=(null===i?0:i.value)/100;n!==o&&t(o),n=o};return at.preUpdate(i,!0),()=>lt(i)}function Qo(){const{value:t}=st;null!==t?(t.frameloop.rate.push(ut.delta),t.animations.mainThread.push(mt.mainThread),t.animations.waapi.push(mt.waapi),t.animations.layout.push(mt.layout)):lt(Qo)}function ts(t){return t.reduce((t,e)=>t+e,0)/t.length}function es(t,e=ts){return 0===t.length?{min:0,max:0,avg:0}:{min:Math.min(...t),max:Math.max(...t),avg:e(t)}}const ns=t=>Math.round(1e3/t);function is(){st.value=null,st.addProjectionMetrics=null}function os(){const{value:t}=st;if(!t)throw new Error("Stats are not being measured");is(),lt(Qo);const e={frameloop:{setup:es(t.frameloop.setup),rate:es(t.frameloop.rate),read:es(t.frameloop.read),resolveKeyframes:es(t.frameloop.resolveKeyframes),preUpdate:es(t.frameloop.preUpdate),update:es(t.frameloop.update),preRender:es(t.frameloop.preRender),render:es(t.frameloop.render),postRender:es(t.frameloop.postRender)},animations:{mainThread:es(t.animations.mainThread),waapi:es(t.animations.waapi),layout:es(t.animations.layout)},layoutProjection:{nodes:es(t.layoutProjection.nodes),calculatedTargetDeltas:es(t.layoutProjection.calculatedTargetDeltas),calculatedProjections:es(t.layoutProjection.calculatedProjections)}},{rate:n}=e.frameloop;return n.min=ns(n.min),n.max=ns(n.max),n.avg=ns(n.avg),[n.min,n.max]=[n.max,n.min],e}function ss(t){return Wo(t)&&"svg"===t.tagName}function rs(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}function as(...t){const e=!Array.isArray(t[0]),n=e?0:-1,i=t[0+n],o=Fe(t[1+n],t[2+n],t[3+n]);return e?o(i):o}function ls(t,e){const n=wi(Ei(t)?t.get():t);return us(n,t,e),n}function us(t,e,n={}){const i=t.get();let o,s=null,r=i;const a="string"==typeof i?i.replace(/[\d.-]/g,""):void 0,l=()=>{s&&(s.stop(),s=null)},u=()=>{(()=>{const e=hs(t.get()),i=hs(r);if(e===i)return void l();const a=s?s.getGeneratorVelocity():t.getVelocity();l(),s=new qe({keyframes:[e,i],velocity:a,type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:o})})(),t.events.animationStart?.notify(),s?.then(()=>{t.events.animationComplete?.notify()})};if(t.attach((t,e)=>{r=t,o=t=>e(cs(t,a)),at.postRender(u)},l),Ei(e)){let i=!0===n.skipInitialAnimation;const o=e.on("change",e=>{i?(i=!1,t.jump(cs(e,a),!1)):t.set(cs(e,a))}),s=t.on("destroy",o);return()=>{o(),s()}}return l}function cs(t,e){return e?t+e:t}function hs(t){return"number"==typeof t?t:parseFloat(t)}function ds(t){const e=[];vi.current=e;const n=t();vi.current=void 0;const i=wi(n);return function(t,e,n){const i=()=>e.set(n()),o=()=>at.preRender(i,!1,!0),s=t.map(t=>t.on("change",o));e.on("destroy",()=>{s.forEach(t=>t()),lt(i)})}(e,i,t),i}const ps=[...Oi,Ut,Kt],ms=t=>ps.find(Ii(t));function fs(t){return"layout"===t?"group":"enter"===t||"new"===t?"new":"exit"===t||"old"===t?"old":"group"}let gs={},ys=null;const vs=(t,e)=>{gs[t]=e},xs=()=>{ys||(ys=document.createElement("style"),ys.id="motion-view");let t="";for(const e in gs){const n=gs[e];t+=`${e} {\n`;for(const[e,i]of Object.entries(n))t+=` ${e}: ${i};\n`;t+="}\n"}ys.textContent=t,document.head.appendChild(ys),gs={}},ws=()=>{ys&&ys.parentElement&&ys.parentElement.removeChild(ys)};function Ts(t){const e=t.match(/::view-transition-(old|new|group|image-pair)\((.*?)\)/);return e?{layer:e[2],type:e[1]}:null}function Ss(t){const{effect:e}=t;return!!e&&(e.target===document.documentElement&&e.pseudoElement?.startsWith("::view-transition"))}function bs(){return document.getAnimations().filter(Ss)}const Ps=["layout","enter","exit","new","old"];function Es(t){const{update:e,targets:n,options:i}=t;if(!document.startViewTransition)return new Promise(async t=>{await e(),t(new Gn([]))});(function(t,e){return e.has(t)&&Object.keys(e.get(t)).length>0})("root",n)||vs(":root",{"view-transition-name":"none"}),vs("::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)",{"animation-timing-function":"linear !important"}),xs();const o=document.startViewTransition(async()=>{await e()});return o.finished.finally(()=>{ws()}),new Promise(t=>{o.ready.then(()=>{const e=bs(),o=[];n.forEach((t,e)=>{for(const n of Ps){if(!t[n])continue;const{keyframes:s,options:r}=t[n];for(let[t,a]of Object.entries(s)){if(!a)continue;const s={...hi(i,t),...hi(r,t)},l=fs(n);if("opacity"===t&&!Array.isArray(a)){a=["new"===l?0:1,a]}"function"==typeof s.delay&&(s.delay=s.delay(0,1)),s.duration&&(s.duration=B(s.duration)),s.delay&&(s.delay=B(s.delay));const u=new On({...s,element:document.documentElement,name:t,pseudoElement:`::view-transition-${l}(${e})`,keyframes:a});o.push(u)}}});for(const t of e){if("finished"===t.playState)continue;const{effect:e}=t;if(!(e&&e instanceof KeyframeEffect))continue;const{pseudoElement:s}=e;if(!s)continue;const r=Ts(s);if(!r)continue;const a=n.get(r.layer);if(a)As(a,"enter")&&As(a,"exit")&&e.getKeyframes().some(t=>t.mixBlendMode)?o.push(new qn(t)):t.cancel();else{const n="group"===r.type?"layout":"";let s={...hi(i,n)};s.duration&&(s.duration=B(s.duration)),s=In(s);const a=Ln(s.ease,s.duration);e.updateTiming({delay:B(s.delay??0),duration:s.duration,easing:a}),o.push(new qn(t))}}t(new Gn(o))})})}function As(t,e){return t?.[e]?.keyframes.opacity}let Ms=[],Vs=null;function Cs(){Vs=null;const[t]=Ms;var e;t&&(w(Ms,e=t),Vs=e,Es(e).then(t=>{e.notifyReady(t),t.finished.finally(Cs)}))}function ks(){for(let t=Ms.length-1;t>=0;t--){const e=Ms[t],{interrupt:n}=e.options;if("immediate"===n){const n=Ms.slice(0,t+1).map(t=>t.update),i=Ms.slice(t+1);e.update=()=>{n.forEach(t=>t())},Ms=[e,...i];break}}Vs&&"immediate"!==Ms[0]?.options.interrupt||Cs()}class Rs{constructor(t,e={}){var n;this.currentSubject="root",this.targets=new Map,this.notifyReady=C,this.readyPromise=new Promise(t=>{this.notifyReady=t}),this.update=t,this.options={interrupt:"wait",...e},n=this,Ms.push(n),xo.render(ks)}get(t){return this.currentSubject=t,this}layout(t,e){return this.updateTarget("layout",t,e),this}new(t,e){return this.updateTarget("new",t,e),this}old(t,e){return this.updateTarget("old",t,e),this}enter(t,e){return this.updateTarget("enter",t,e),this}exit(t,e){return this.updateTarget("exit",t,e),this}crossfade(t){return this.updateTarget("enter",{opacity:1},t),this.updateTarget("exit",{opacity:0},t),this}updateTarget(t,e,n={}){const{currentSubject:i,targets:o}=this;o.has(i)||o.set(i,{});o.get(i)[t]={keyframes:e,options:n}}then(t,e){return this.readyPromise.then(t,e)}}const Ds=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ls=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),Bs=()=>({min:0,max:0}),js=()=>({x:{min:0,max:0},y:{min:0,max:0}}),Is=new WeakMap;function Os(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function Fs(t){return"string"==typeof t||Array.isArray(t)}const Ws=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Us=["initial",...Ws];function Ns(t){return Os(t.animate)||Us.some(e=>Fs(t[e]))}function $s(t){return Boolean(Ns(t)||t.variants)}function Ys(t,e,n){for(const i in e){const o=e[i],s=n[i];if(Ei(o))t.addValue(i,o);else if(Ei(s))t.addValue(i,wi(o,{owner:t}));else if(s!==o)if(t.hasValue(i)){const e=t.getValue(i);!0===e.liveStyle?e.jump(o):e.hasAnimated||e.set(o)}else{const e=t.getStaticValue(i);t.addValue(i,wi(void 0!==e?e:o,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}const zs={current:null},Hs={current:!1},Xs="undefined"!=typeof window;function Gs(){if(Hs.current=!0,Xs)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>zs.current=t.matches;t.addEventListener("change",e),e()}else zs.current=!1}const Ks=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let _s={};function qs(t){_s=t}function Zs(){return _s}class Js{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,skipAnimations:o,blockInitialAnimation:s,visualState:r},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=bn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=pt.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,at.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=e.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=o,this.options=a,this.blockInitialAnimation=Boolean(s),this.isControllingVariants=Ns(e),this.isVariantNode=$s(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:c,...h}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in h){const e=h[t];void 0!==l[t]&&Ei(e)&&e.set(l[t])}}mount(t){if(this.hasBeenMounted)for(const t in this.initialValues)this.values.get(t)?.jump(this.initialValues[t]),this.latestValues[t]=this.initialValues[t];this.current=t,Is.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(Hs.current||Gs(),this.shouldReduceMotion=zs.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),lt(this.notifyUpdate),lt(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,e){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),e.accelerate&&io.has(t)&&this.current instanceof HTMLElement){const{factory:n,keyframes:i,times:o,ease:s,duration:r}=e.accelerate,a=new On({element:this.current,name:t,keyframes:i,times:o,ease:s,duration:B(r)}),l=n(a);return void this.valueSubscriptions.set(t,()=>{l(),a.cancel()})}const n=hn.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&at.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{i(),o&&o(),e.owner&&e.stop()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in _s){const e=_s[t];if(!e)continue;const{isEnabled:n,Feature:i}=e;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<Ks.length;e++){const n=Ks[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const i=t["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=Ys(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=wi(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){let n=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];return null!=n&&("string"==typeof n&&(E(n)||M(n))?n=parseFloat(n):!ms(n)&&Kt.test(e)&&(n=Zi(t,e)),this.setBaseTarget(t,Ei(n)?n.get():n)),Ei(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let n;if("string"==typeof e||"object"==typeof e){const i=fi(this.props,e,this.presenceContext?.custom);i&&(n=i[t])}if(e&&void 0!==n)return n;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||Ei(i)?void 0!==this.initialValues[t]&&void 0===n?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new L),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){xo.render(this.render)}}class Qs extends Js{constructor(){super(...arguments),this.KeyframeResolver=Qi}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){const n=t.style;return n?n[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Ei(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}class tr{constructor(t){this.isMounted=!1,this.node=t}update(){}}function er({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function nr({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function ir(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function or(t){return void 0===t||1===t}function sr({scale:t,scaleX:e,scaleY:n}){return!or(t)||!or(e)||!or(n)}function rr(t){return sr(t)||ar(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function ar(t){return lr(t.x)||lr(t.y)}function lr(t){return t&&"0%"!==t}function ur(t,e,n){return n+e*(t-n)}function cr(t,e,n,i,o){return void 0!==o&&(t=ur(t,o,i)),ur(t,n,i)+e}function hr(t,e=0,n=1,i,o){t.min=cr(t.min,e,n,i,o),t.max=cr(t.max,e,n,i,o)}function dr(t,{x:e,y:n}){hr(t.x,e.translate,e.scale,e.originPoint),hr(t.y,n.translate,n.scale,n.originPoint)}const pr=.999999999999,mr=1.0000000000001;function fr(t,e,n,i=!1){const o=n.length;if(!o)return;let s,r;e.x=e.y=1;for(let a=0;a<o;a++){s=n[a],r=s.projectionDelta;const{visualElement:o}=s.options;o&&o.props.style&&"contents"===o.props.style.display||(i&&s.options.layoutScroll&&s.scroll&&s!==s.root&&xr(t,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,dr(t,r)),i&&rr(s.latestValues)&&xr(t,s.latestValues,s.layout?.layoutBox))}e.x<mr&&e.x>pr&&(e.x=1),e.y<mr&&e.y>pr&&(e.y=1)}function gr(t,e){t.min=t.min+e,t.max=t.max+e}function yr(t,e,n,i,o=.5){hr(t,e,n,Jt(t.min,t.max,o),i)}function vr(t,e){return"string"==typeof t?parseFloat(t)/100*(e.max-e.min):t}function xr(t,e,n){const i=n??t;yr(t.x,vr(e.x,i.x),e.scaleX,e.scale,e.originX),yr(t.y,vr(e.y,i.y),e.scaleY,e.scale,e.originY)}function wr(t,e){return er(ir(t.getBoundingClientRect(),e))}function Tr(t,e,n){const i=wr(t,n),{scroll:o}=e;return o&&(gr(i.x,o.offset.x),gr(i.y,o.offset.y)),i}const Sr={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},br=cn.length;function Pr(t,e,n){let i="",o=!0;for(let s=0;s<br;s++){const r=cn[s],a=t[r];if(void 0===a)continue;let l=!0;if("number"==typeof a)l=a===(r.startsWith("scale")?1:0);else{const t=parseFloat(a);l=r.startsWith("scale")?1===t:0===t}if(!l||n){const t=ro(a,Gi[r]);if(!l){o=!1;i+=`${Sr[r]||r}(${t}) `}n&&(e[r]=t)}}return i=i.trim(),n?i=n(e,o?"":i):o&&(i="none"),i}function Er(t,e,n){const{style:i,vars:o,transformOrigin:s}=t;let r=!1,a=!1;for(const t in e){const n=e[t];if(hn.has(t))r=!0;else if(gt(t))o[t]=n;else{const e=ro(n,Gi[t]);t.startsWith("origin")?(a=!0,s[t]=e):i[t]=e}}if(e.transform||(r||n?i.transform=Pr(e,t.transform,n):i.transform&&(i.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=s;i.transformOrigin=`${t} ${e} ${n}`}}function Ar(t,{style:e,vars:n},i,o){const s=t.style;let r;for(r in e)s[r]=e[r];for(r in o?.applyProjectionStyles(s,i),n)s.setProperty(r,n[r])}function Mr(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Vr={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!jt.test(t))return t;t=parseFloat(t)}return`${Mr(t,e.target.x)}% ${Mr(t,e.target.y)}%`}},Cr={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,o=Kt.parse(t);if(o.length>5)return i;const s=Kt.createTransformer(t),r="number"!=typeof o[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;o[0+r]/=a,o[1+r]/=l;const u=Jt(a,l,.5);return"number"==typeof o[2+r]&&(o[2+r]/=u),"number"==typeof o[3+r]&&(o[3+r]/=u),s(o)}},kr={borderRadius:{...Vr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Vr,borderTopRightRadius:Vr,borderBottomLeftRadius:Vr,borderBottomRightRadius:Vr,boxShadow:Cr};function Rr(t,{layout:e,layoutId:n}){return hn.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!kr[t]||"opacity"===t)}function Dr(t,e,n){const i=t.style,o=e?.style,s={};if(!i)return s;for(const e in i)(Ei(i[e])||o&&Ei(o[e])||Rr(e,t)||void 0!==n?.getValue(e)?.liveStyle)&&(s[e]=i[e]);return s}class Lr extends Qs{constructor(){super(...arguments),this.type="html",this.renderInstance=Ar}readValueFromInstance(t,e){if(hn.has(e))return this.projection?.isProjecting?rn(e):ln(t,e);{const i=(n=t,window.getComputedStyle(n)),o=(gt(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof o?o.trim():o}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return wr(t,e)}build(t,e,n){Er(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return Dr(t,e,n)}}class Br extends Js{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(function(t,e){return t in e}(e,t)){const n=t[e];if("string"==typeof n||"number"==typeof n)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}}const jr={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ir={offset:"strokeDashoffset",array:"strokeDasharray"};function Or(t,e,n=1,i=0,o=!0){t.pathLength=1;const s=o?jr:Ir;t[s.offset]=""+-i,t[s.array]=`${e} ${n}`}const Fr=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Wr(t,{attrX:e,attrY:n,attrScale:i,pathLength:o,pathSpacing:s=1,pathOffset:r=0,...a},l,u,c){if(Er(t,a,u),l)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:h,style:d}=t;h.transform&&(d.transform=h.transform,delete h.transform),(d.transform||h.transformOrigin)&&(d.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),d.transform&&(d.transformBox=c?.transformBox??"fill-box",delete h.transformBox);for(const t of Fr)void 0!==h[t]&&(d[t]=h[t],delete h[t]);void 0!==e&&(h.x=e),void 0!==n&&(h.y=n),void 0!==i&&(h.scale=i),void 0!==o&&Or(h,o,s,r,!1)}const Ur=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"]),Nr=t=>"string"==typeof t&&"svg"===t.toLowerCase();function $r(t,e,n,i){Ar(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(Ur.has(n)?n:Vi(n),e.attrs[n])}function Yr(t,e,n){const i=Dr(t,e,n);for(const n in t)if(Ei(t[n])||Ei(e[n])){i[-1!==cn.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}class zr extends Qs{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=js}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(hn.has(e)){const t=_i(e);return t&&t.default||0}return e=Ur.has(e)?e:Vi(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return Yr(t,e,n)}build(t,e,n){Wr(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){$r(t,e,0,i)}mount(t){this.isSVGTag=Nr(t.tagName),super.mount(t)}}const Hr=Us.length;function Xr(t){if(!t)return;if(!t.isControllingVariants){const e=t.parent&&Xr(t.parent)||{};return void 0!==t.props.initial&&(e.initial=t.props.initial),e}const e={};for(let n=0;n<Hr;n++){const i=Us[n],o=t.props[i];(Fs(o)||!1===o)&&(e[i]=o)}return e}function Gr(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}const Kr=[...Ws].reverse(),_r=Ws.length;function qr(t){let e=function(t){return e=>Promise.all(e.map(({animation:e,options:n})=>ji(t,e,n)))}(t),n=Qr(),i=!0,o=!1;const s=e=>(n,i)=>{const o=gi(t,i,"exit"===e?t.presenceContext?.custom:void 0);if(o){const{transition:t,transitionEnd:e,...i}=o;n={...n,...i,...e}}return n};function r(r){const{props:a}=t,l=Xr(t.parent)||{},u=[],c=new Set;let h={},d=1/0;for(let e=0;e<_r;e++){const p=Kr[e],m=n[p],f=void 0!==a[p]?a[p]:l[p],g=Fs(f),y=p===r?m.isActive:null;!1===y&&(d=e);let v=f===l[p]&&f!==a[p]&&g;if(v&&(i||o)&&t.manuallyAnimateOnMount&&(v=!1),m.protectedKeys={...h},!m.isActive&&null===y||!f&&!m.prevProp||Os(f)||"boolean"==typeof f)continue;if("exit"===p&&m.isActive&&!0!==y){m.prevResolvedValues&&(h={...h,...m.prevResolvedValues});continue}const x=Zr(m.prevProp,f);let w=x||p===r&&m.isActive&&!v&&g||e>d&&g,T=!1;const S=Array.isArray(f)?f:[f];let b=S.reduce(s(p),{});!1===y&&(b={});const{prevResolvedValues:P={}}=m,E={...P,...b},A=e=>{w=!0,c.has(e)&&(T=!0,c.delete(e)),m.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in E){const e=b[t],n=P[t];if(h.hasOwnProperty(t))continue;let i=!1;i=Ti(e)&&Ti(n)?!Gr(e,n):e!==n,i?null!=e?A(t):c.add(t):void 0!==e&&c.has(t)?A(t):m.protectedKeys[t]=!0}m.prevProp=f,m.prevResolvedValues=b,m.isActive&&(h={...h,...b}),(i||o)&&t.blockInitialAnimation&&(w=!1);const M=v&&x;w&&(!M||T)&&u.push(...S.map(e=>{const n={type:p};if("string"==typeof e&&(i||o)&&!M&&t.manuallyAnimateOnMount&&t.parent){const{parent:i}=t,o=gi(i,e);if(i.enteringChildren&&o){const{delayChildren:e}=o.transition||{};n.delay=ti(i.enteringChildren,t,e)}}return{animation:e,options:n}}))}if(c.size){const e={};if("boolean"!=typeof a.initial){const n=gi(t,Array.isArray(a.initial)?a.initial[0]:a.initial);n&&n.transition&&(e.transition=n.transition)}c.forEach(n=>{const i=t.getBaseTarget(n),o=t.getValue(n);o&&(o.liveStyle=!0),e[n]=i??null}),u.push({animation:e})}let p=Boolean(u.length);return!i||!1!==a.initial&&a.initial!==a.animate||t.manuallyAnimateOnMount||(p=!1),i=!1,o=!1,p?e(u):Promise.resolve()}return{animateChanges:r,setActive:function(e,i){if(n[e].isActive===i)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,i)),n[e].isActive=i;const o=r(e);for(const t in n)n[t].protectedKeys={};return o},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=Qr(),o=!0}}}function Zr(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!Gr(e,t)}function Jr(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Qr(){return{animate:Jr(!0),whileInView:Jr(),whileHover:Jr(),whileTap:Jr(),whileDrag:Jr(),whileFocus:Jr(),exit:Jr()}}function ta(t,e){t.min=e.min,t.max=e.max}function ea(t,e){ta(t.x,e.x),ta(t.y,e.y)}function na(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function ia(t){return t.max-t.min}function oa(t,e,n){return Math.abs(t-e)<=n}function sa(t,e,n,i=.5){t.origin=i,t.originPoint=Jt(e.min,e.max,t.origin),t.scale=ia(n)/ia(e),t.translate=Jt(n.min,n.max,t.origin)-t.originPoint,(t.scale>=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function ra(t,e,n,i){sa(t.x,e.x,n.x,i?i.originX:void 0),sa(t.y,e.y,n.y,i?i.originY:void 0)}function aa(t,e,n){t.min=n.min+e.min,t.max=t.min+ia(e)}function la(t,e,n){aa(t.x,e.x,n.x),aa(t.y,e.y,n.y)}function ua(t,e,n){t.min=e.min-n.min,t.max=t.min+ia(e)}function ca(t,e,n){ua(t.x,e.x,n.x),ua(t.y,e.y,n.y)}function ha(t,e,n,i,o){return t=ur(t-=e,1/n,i),void 0!==o&&(t=ur(t,1/o,i)),t}function da(t,e=0,n=1,i=.5,o,s=t,r=t){if(Bt.test(e)){e=parseFloat(e);e=Jt(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=Jt(s.min,s.max,i);t===s&&(a-=e),t.min=ha(t.min,e,n,a,o),t.max=ha(t.max,e,n,a,o)}function pa(t,e,[n,i,o],s,r){da(t,e[n],e[i],e[o],e.scale,s,r)}const ma=["x","scaleX","originX"],fa=["y","scaleY","originY"];function ga(t,e,n,i){pa(t.x,e,ma,n?n.x:void 0,i?i.x:void 0),pa(t.y,e,fa,n?n.y:void 0,i?i.y:void 0)}function ya(t){return 0===t.translate&&1===t.scale}function va(t){return ya(t.x)&&ya(t.y)}function xa(t,e){return t.min===e.min&&t.max===e.max}function wa(t,e){return xa(t.x,e.x)&&xa(t.y,e.y)}function Ta(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Sa(t,e){return Ta(t.x,e.x)&&Ta(t.y,e.y)}function ba(t){return ia(t.x)/ia(t.y)}function Pa(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function Ea(t){return[t("x"),t("y")]}function Aa(t,e,n){let i="";const o=t.x.translate/e.x,s=t.y.translate/e.y,r=n?.z||0;if((o||s||r)&&(i=`translate3d(${o}px, ${s}px, ${r}px) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t,rotate:e,rotateX:o,rotateY:s,skewX:r,skewY:a}=n;t&&(i=`perspective(${t}px) ${i}`),e&&(i+=`rotate(${e}deg) `),o&&(i+=`rotateX(${o}deg) `),s&&(i+=`rotateY(${s}deg) `),r&&(i+=`skewX(${r}deg) `),a&&(i+=`skewY(${a}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return 1===a&&1===l||(i+=`scale(${a}, ${l})`),i||"none"}const Ma=["TopLeft","TopRight","BottomLeft","BottomRight"],Va=Ma.length,Ca=t=>"string"==typeof t?parseFloat(t):t,ka=t=>"number"==typeof t||jt.test(t);function Ra(t,e,n,i,o,s){o?(t.opacity=Jt(0,n.opacity??1,La(i)),t.opacityExit=Jt(e.opacity??1,0,Ba(i))):s&&(t.opacity=Jt(e.opacity??1,n.opacity??1,i));for(let o=0;o<Va;o++){const s=`border${Ma[o]}Radius`;let r=Da(e,s),a=Da(n,s);if(void 0===r&&void 0===a)continue;r||(r=0),a||(a=0);0===r||0===a||ka(r)===ka(a)?(t[s]=Math.max(Jt(Ca(r),Ca(a),i),0),(Bt.test(a)||Bt.test(r))&&(t[s]+="%")):t[s]=a}(e.rotate||n.rotate)&&(t.rotate=Jt(e.rotate||0,n.rotate||0,i))}function Da(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const La=ja(0,.5,K),Ba=ja(.5,.95,C);function ja(t,e,n){return i=>i<t?0:i>e?1:n(D(t,e,i))}function Ia(t,e,n){const i=Ei(t)?t:wi(t);return i.start(pi("",i,e,n)),i.animation}function Oa(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}const Fa=(t,e)=>t.depth-e.depth;class Wa{constructor(){this.children=[],this.isDirty=!1}add(t){x(this.children,t),this.isDirty=!0}remove(t){w(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Fa),this.isDirty=!1,this.children.forEach(t)}}function Ua(t,e){const n=pt.now(),i=({timestamp:o})=>{const s=o-n;s>=e&&(lt(i),t(s-e))};return at.setup(i,!0),()=>lt(i)}function Na(t){return Ei(t)?t.get():t}class $a{constructor(){this.members=[]}add(t){x(this.members,t);for(let e=this.members.length-1;e>=0;e--){const n=this.members[e];if(n===t||n===this.lead||n===this.prevLead)continue;const i=n.instance;i&&!1!==i.isConnected||n.snapshot||(w(this.members,n),n.unmount())}t.scheduleRender()}remove(t){if(w(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){for(let e=this.members.indexOf(t)-1;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent&&!1!==t.instance?.isConnected)return this.promote(t),!0}return!1}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.updateSnapshot(),t.scheduleRender();const{layoutDependency:i}=n.options,{layoutDependency:o}=t.options;void 0!==i&&i===o||(t.resumeFrom=n,e&&(n.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),!1===t.options.crossfade&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const Ya={hasAnimatedSinceResize:!0,hasEverUpdated:!1},za={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},Ha=["","X","Y","Z"];let Xa=0;function Ga(t,e,n,i){const{latestValues:o}=e;o[t]&&(n[t]=o[t],e.setStaticValue(t,0),i&&(i[t]=0))}function Ka(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Ri(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",at,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&Ka(i)}function _a({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:o}){return class{constructor(t={},n=e?.()){this.id=Xa++,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,st.value&&(za.nodes=za.calculatedTargetDeltas=za.calculatedProjections=0),this.nodes.forEach(Ja),this.nodes.forEach(sl),this.nodes.forEach(rl),this.nodes.forEach(Qa),st.addProjectionMetrics&&st.addProjectionMetrics(za)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new Wa)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new L),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e){if(this.instance)return;this.isSVG=Wo(e)&&!ss(e),this.instance=e;const{layoutId:n,layout:i,visualElement:o}=this.options;if(o&&!o.current&&o.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(i||n)&&(this.isLayoutDirty=!0),t){let n,i=0;const o=()=>this.root.updateBlockedByResize=!1;at.read(()=>{i=window.innerWidth}),t(e,()=>{const t=window.innerWidth;t!==i&&(i=t,this.root.updateBlockedByResize=!0,n&&n(),n=Ua(o,250),Ya.hasAnimatedSinceResize&&(Ya.hasAnimatedSinceResize=!1,this.nodes.forEach(ol)))})}n&&this.root.registerSharedNode(n,this),!1!==this.options.animate&&o&&(n||i)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const s=this.options.transition||o.getDefaultTransition()||dl,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=o.getProps(),l=!this.targetLayout||!Sa(this.targetLayout,i),u=!e&&n;if(this.options.layoutRoot||this.resumeFrom||u||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const e={...hi(s,"layout"),onPlay:r,onComplete:a};(o.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,u)}else e||ol(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),lt(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(al),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ka(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,"string"!=typeof e.latestValues.x&&"string"!=typeof e.latestValues.y||(e.isLayoutDirty=!0),e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(el);if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(nl);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(il),this.nodes.forEach(qa),this.nodes.forEach(Za)):this.nodes.forEach(nl),this.clearAllSnapshots();const t=pt.now();ut.delta=S(0,1e3/60,t-ut.timestamp),ut.timestamp=t,ut.isProcessing=!0,ct.update.process(ut),ct.preRender.process(ut),ct.render.process(ut),ut.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,xo.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(tl),this.sharedNodes.forEach(ll)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,at.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){at.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||ia(this.snapshot.measuredBox.x)||ia(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++){this.path[t].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&this.instance){const e=i(this.instance);this.scroll={animationId:this.root.animationId,phase:t,isRoot:e,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:e}}}resetTransform(){if(!o)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,e=this.projectionDelta&&!va(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,s=i!==this.prevTransformTemplateValue;t&&this.instance&&(e||rr(this.latestValues)||s)&&(o(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);var i;return t&&(n=this.removeTransform(n)),fl((i=n).x),fl(i.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const e=t.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(yl))){const{scroll:t}=this.root;t&&(gr(e.x,t.offset.x),gr(e.y,t.offset.y))}return e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};if(ea(e,t),this.scroll?.wasRoot)return e;for(let n=0;n<this.path.length;n++){const i=this.path[n],{scroll:o,options:s}=i;i!==this.root&&o&&s.layoutScroll&&(o.wasRoot&&ea(e,t),gr(e.x,o.offset.x),gr(e.y,o.offset.y))}return e}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};ea(n,t);for(let t=0;t<this.path.length;t++){const i=this.path[t];!e&&i.options.layoutScroll&&i.scroll&&i!==i.root&&xr(n,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),rr(i.latestValues)&&xr(n,i.latestValues,i.layout?.layoutBox)}return rr(this.latestValues)&&xr(n,this.latestValues,this.layout?.layoutBox),n}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};ea(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!rr(n.latestValues))continue;let i;n.instance&&(sr(n.latestValues)&&n.updateSnapshot(),i=js(),ea(i,n.measurePageBox())),ga(e,n.latestValues,n.snapshot?.layoutBox,i)}return rr(this.latestValues)&&ga(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==ut.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){const e=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=e.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=e.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=e.isSharedProjectionDirty);const n=Boolean(this.resumingFrom)||this!==e;if(!(t||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:i,layoutId:o}=this.options;if(!this.layout||!i&&!o)return;this.resolvedRelativeTargetAt=ut.timestamp;const s=this.getClosestProjectingParent();s&&this.linkedParentVersion!==s.layoutVersion&&!s.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(s&&s.layout?this.createRelativeTarget(s,this.layout.layoutBox,s.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),la(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):ea(this.target,this.layout.layoutBox),dr(this.target,this.targetDelta)):ea(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,s&&Boolean(s.resumingFrom)===Boolean(this.resumingFrom)&&!s.options.layoutScroll&&s.target&&1!==this.animationProgress?this.createRelativeTarget(s,this.target,s.target):this.relativeParent=this.relativeTarget=void 0),st.value&&za.calculatedTargetDeltas++)}getClosestProjectingParent(){if(this.parent&&!sr(this.parent.latestValues)&&!ar(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(t,e,n){this.relativeParent=t,this.linkedParentVersion=t.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},ca(this.relativeTargetOrigin,e,n),ea(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const t=this.getLead(),e=Boolean(this.resumingFrom)||this!==t;let n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),e&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===ut.timestamp&&(n=!1),n)return;const{layout:i,layoutId:o}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!i&&!o)return;ea(this.layoutCorrected,this.layout.layoutBox);const s=this.treeScale.x,r=this.treeScale.y;fr(this.layoutCorrected,this.treeScale,this.path,e),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:a}=t;a?(this.projectionDelta&&this.prevProjectionDelta?(na(this.prevProjectionDelta.x,this.projectionDelta.x),na(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),ra(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.treeScale.x===s&&this.treeScale.y===r&&Pa(this.projectionDelta.x,this.prevProjectionDelta.x)&&Pa(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",a)),st.value&&za.calculatedProjections++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.visualElement?.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(t,e=!1){const n=this.snapshot,i=n?n.latestValues:{},o={...this.latestValues},s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const r={x:{min:0,max:0},y:{min:0,max:0}},a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,c=Boolean(a&&!u&&!0===this.options.crossfade&&!this.path.some(hl));let h;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;ul(s.x,t.x,n),ul(s.y,t.y,n),this.setTargetDelta(s),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ca(r,this.layout.layoutBox,this.relativeParent.layout.layoutBox),function(t,e,n,i){cl(t.x,e.x,n.x,i),cl(t.y,e.y,n.y,i)}(this.relativeTarget,this.relativeTargetOrigin,r,n),h&&wa(this.relativeTarget,h)&&(this.isProjectionDirty=!1),h||(h={x:{min:0,max:0},y:{min:0,max:0}}),ea(h,this.relativeTarget)),a&&(this.animationValues=o,Ra(o,i,this.latestValues,n,c,u)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(lt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=at.update(()=>{Ya.hasAnimatedSinceResize=!0,mt.layout++,this.motionValue||(this.motionValue=wi(0)),this.motionValue.jump(0,!1),this.currentAnimation=Ia(this.motionValue,[0,1e3],{...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onStop:()=>{mt.layout--},onComplete:()=>{mt.layout--,t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:i,latestValues:o}=t;if(e&&n&&i){if(this!==t&&this.layout&&i&&gl(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=ia(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=ia(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}ea(e,n),xr(e,o),ra(this.projectionDeltaWithTransform,this.layoutCorrected,e,o)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new $a);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){const{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(e=!0),!e)return;const i={};n.z&&Ga("z",t,i,this.animationValues);for(let e=0;e<Ha.length;e++)Ga(`rotate${Ha[e]}`,t,i,this.animationValues),Ga(`skew${Ha[e]}`,t,i,this.animationValues);t.render();for(const e in i)t.setStaticValue(e,i[e]),this.animationValues&&(this.animationValues[e]=i[e]);t.scheduleRender()}applyProjectionStyles(t,e){if(!this.instance||this.isSVG)return;if(!this.isVisible)return void(t.visibility="hidden");const n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,t.visibility="",t.opacity="",t.pointerEvents=Na(e?.pointerEvents)||"",void(t.transform=n?n(this.latestValues,""):"none");const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target)return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=Na(e?.pointerEvents)||""),void(this.hasProjected&&!rr(this.latestValues)&&(t.transform=n?n({},""):"none",this.hasProjected=!1));t.visibility="";const o=i.animationValues||i.latestValues;this.applyTransformsToTarget();let s=Aa(this.projectionDeltaWithTransform,this.treeScale,o);n&&(s=n(o,s)),t.transform=s;const{x:r,y:a}=this.projectionDelta;t.transformOrigin=`${100*r.origin}% ${100*a.origin}% 0`,i.animationValues?t.opacity=i===this?o.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:o.opacityExit:t.opacity=i===this?void 0!==o.opacity?o.opacity:"":void 0!==o.opacityExit?o.opacityExit:0;for(const e in kr){if(void 0===o[e])continue;const{correct:n,applyTo:r,isCSSVariable:a}=kr[e],l="none"===s?o[e]:n(o[e],i);if(r){const e=r.length;for(let n=0;n<e;n++)t[r[n]]=l}else a?this.options.visualElement.renderState.vars[e]=l:t[e]=l}this.options.layoutId&&(t.pointerEvents=i===this?Na(e?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>t.currentAnimation?.stop()),this.root.nodes.forEach(el),this.root.sharedNodes.clear()}}}function qa(t){t.updateLayout()}function Za(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=t.layout,{animationType:o}=t.options,s=e.source!==t.layout.source;if("size"===o)Ea(t=>{const i=s?e.measuredBox[t]:e.layoutBox[t],o=ia(i);i.min=n[t].min,i.max=i.min+o});else if("x"===o||"y"===o){const t="x"===o?"y":"x";ta(s?e.measuredBox[t]:e.layoutBox[t],n[t])}else gl(o,e.layoutBox,n)&&Ea(i=>{const o=s?e.measuredBox[i]:e.layoutBox[i],r=ia(n[i]);o.max=o.min+r,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[i].max=t.relativeTarget[i].min+r)});const r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};ra(r,n,e.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};s?ra(a,t.applyTransform(i,!0),e.measuredBox):ra(a,n,e.layoutBox);const l=!va(r);let u=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:o,layout:s}=i;if(o&&s){const r={x:{min:0,max:0},y:{min:0,max:0}};ca(r,e.layoutBox,o.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};ca(a,n,s.layoutBox),Sa(r,a)||(u=!0),i.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=r,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function Ja(t){st.value&&za.nodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Qa(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function tl(t){t.clearSnapshot()}function el(t){t.clearMeasurements()}function nl(t){t.isLayoutDirty=!1}function il(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function ol(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function sl(t){t.resolveTargetDelta()}function rl(t){t.calcProjection()}function al(t){t.resetSkewAndRotation()}function ll(t){t.removeLeadSnapshot()}function ul(t,e,n){t.translate=Jt(e.translate,0,n),t.scale=Jt(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function cl(t,e,n,i){t.min=Jt(e.min,n.min,i),t.max=Jt(e.max,n.max,i)}function hl(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const dl={duration:.45,ease:[.4,0,.1,1]},pl=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),ml=pl("applewebkit/")&&!pl("chrome/")?Math.round:C;function fl(t){t.min=ml(t.min),t.max=ml(t.max)}function gl(t,e,n){return"position"===t||"preserve-aspect"===t&&!oa(ba(e),ba(n),.2)}function yl(t){return t!==t.root&&t.scroll?.wasRoot}const vl=_a({attachResizeListener:(t,e)=>Oa(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),xl=t=>!t.isLayoutDirty&&t.willUpdate(!1);function wl(){const t=new Set,e=new WeakMap,n=()=>t.forEach(xl);return{add:i=>{t.add(i),e.set(i,i.addEventListener("willUpdate",n))},remove:i=>{t.delete(i);const o=e.get(i);o&&(o(),e.delete(i)),n()},dirty:n}}const Tl={current:void 0},Sl=_a({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Tl.current){const t=new vl({});t.mount(window),t.setOptions({layoutScroll:!0}),Tl.current=t}return Tl.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),bl="[data-layout], [data-layout-id]",Pl=()=>{};function El(t){const e=Array.from(t.querySelectorAll(bl));return t instanceof Element&&t.matches(bl)&&(e.includes(t)||e.unshift(t)),e}function Al(t){const e=t.getAttribute("data-layout-id")||void 0,n=t.getAttribute("data-layout");let i;return""===n||"true"===n?i=!0:n&&(i=n),{layout:i,layoutId:e}}function Ml(t,e,n){const i=Is.get(t),o=i??new Lr({props:{},presenceContext:null,visualState:{latestValues:{},renderState:{transform:{},transformOrigin:{},style:{},vars:{}}}},{allowProjection:!0});return i&&o.projection||(o.projection=new Sl(o.latestValues,e)),o.projection.setOptions({...n,visualElement:o}),o.current?o.projection.instance||o.projection.mount(t):o.mount(t),i||Is.set(t,o),{element:t,visualElement:o,projection:o.projection}}function Vl(t,e,n){let i=t.parentElement;for(;i;){const t=e.get(i);if(t)return t;if(i===n)break;i=i.parentElement}}const Cl=at,kl=ot.reduce((t,e)=>(t[e]=t=>lt(t),t),{}),Rl=e.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function Dl(t,e){if("function"==typeof t)return t(e);null!=t&&(t.current=e)}function Ll(...t){return i.useCallback(function(...t){return e=>{let n=!1;const i=t.map(t=>{const i=Dl(t,e);return n||"function"!=typeof i||(n=!0),i});if(n)return()=>{for(let e=0;e<i.length;e++){const n=i[e];"function"==typeof n?n():Dl(t[e],null)}}}}(...t),t)}class Bl extends i.Component{getSnapshotBeforeUpdate(t){const e=this.props.childRef.current;if(po(e)&&t.isPresent&&!this.props.isPresent&&!1!==this.props.pop){const t=e.offsetParent,n=po(t)&&t.offsetWidth||0,i=po(t)&&t.offsetHeight||0,o=getComputedStyle(e),s=this.props.sizeRef.current;s.height=parseFloat(o.height),s.width=parseFloat(o.width),s.top=e.offsetTop,s.left=e.offsetLeft,s.right=n-s.width-s.left,s.bottom=i-s.height-s.top}return null}componentDidUpdate(){}render(){return this.props.children}}function jl({children:t,isPresent:n,anchorX:o,anchorY:s,root:r,pop:a}){const l=e.useId(),u=e.useRef(null),c=e.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:h}=e.useContext(Rl),p=t.props?.ref??t?.ref,m=Ll(u,p);return e.useInsertionEffect(()=>{const{width:t,height:e,top:i,left:d,right:p,bottom:m}=c.current;if(n||!1===a||!u.current||!t||!e)return;const f="left"===o?`left: ${d}`:`right: ${p}`,g="bottom"===s?`bottom: ${m}`:`top: ${i}`;u.current.dataset.motionPopId=l;const y=document.createElement("style");h&&(y.nonce=h);const v=r??document.head;return v.appendChild(y),y.sheet&&y.sheet.insertRule(`\n [data-motion-pop-id="${l}"] {\n position: absolute !important;\n width: ${t}px !important;\n height: ${e}px !important;\n ${f}px !important;\n ${g}px !important;\n }\n `),()=>{u.current?.removeAttribute("data-motion-pop-id"),v.contains(y)&&v.removeChild(y)}},[n]),d(Bl,{isPresent:n,childRef:u,sizeRef:c,pop:a,children:!1===a?t:i.cloneElement(t,{ref:m})})}const Il=({children:t,initial:n,isPresent:o,onExitComplete:s,custom:r,presenceAffectsLayout:a,mode:l,anchorX:u,anchorY:c,root:h})=>{const p=f(Ol),m=e.useId();let g=!0,y=e.useMemo(()=>(g=!1,{id:m,initial:n,isPresent:o,custom:r,onExitComplete:t=>{p.set(t,!0);for(const t of p.values())if(!t)return;s&&s()},register:t=>(p.set(t,!1),()=>p.delete(t))}),[o,p,s]);return a&&g&&(y={...y}),e.useMemo(()=>{p.forEach((t,e)=>p.set(e,!1))},[o]),i.useEffect(()=>{!o&&!p.size&&s&&s()},[o]),t=d(jl,{pop:"popLayout"===l,isPresent:o,anchorX:u,anchorY:c,root:h,children:t}),d(v.Provider,{value:y,children:t})};function Ol(){return new Map}function Fl(t=!0){const n=e.useContext(v);if(null===n)return[!0,null];const{isPresent:i,onExitComplete:o,register:s}=n,r=e.useId();e.useEffect(()=>{if(t)return s(r)},[t]);const a=e.useCallback(()=>t&&o&&o(r),[r,o,t]);return!i&&o?[!1,a]:[!0]}const Wl=t=>t.key||"";function Ul(t){const n=[];return e.Children.forEach(t,t=>{e.isValidElement(t)&&n.push(t)}),n}const Nl=e.createContext(null);function $l(){const t=function(){const t=e.useRef(!1);return y(()=>(t.current=!0,()=>{t.current=!1}),[]),t}(),[n,i]=e.useState(0),o=e.useCallback(()=>{t.current&&i(n+1)},[n]);return[e.useCallback(()=>at.postRender(o),[o]),n]}const Yl=t=>!0===t,zl=({children:t,id:n,inherit:i=!0})=>{const o=e.useContext(m),s=e.useContext(Nl),[r,a]=$l(),l=e.useRef(null),u=o.id||s;null===l.current&&((t=>Yl(!0===t)||"id"===t)(i)&&u&&(n=n?u+"-"+n:u),l.current={id:n,group:Yl(i)&&o.group||wl()});const c=e.useMemo(()=>({...l.current,forceRender:r}),[a]);return d(m.Provider,{value:c,children:t})},Hl=e.createContext({strict:!1}),Xl={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 Gl=!1;function Kl(){return function(){if(Gl)return;const t={};for(const e in Xl)t[e]={isEnabled:t=>Xl[e].some(e=>!!t[e])};qs(t),Gl=!0}(),Zs()}function _l(t){const e=Kl();for(const n in t)e[n]={...e[n],...t[n]};qs(e)}function ql(t){return"function"==typeof t}const Zl=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 Jl(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Zl.has(t)}let Ql=t=>!Jl(t);function tu(t){"function"==typeof t&&(Ql=e=>e.startsWith("on")?!Jl(e):t(e))}try{tu(require("@emotion/is-prop-valid").default)}catch{}function eu(t,e,n){const i={};for(const o in t)"values"===o&&"object"==typeof t.values||Ei(t[o])||(Ql(o)||!0===n&&Jl(o)||!e&&!Jl(o)||t.draggable&&o.startsWith("onDrag"))&&(i[o]=t[o]);return i}const nu=e.createContext(null),iu=["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 ou(t){return"string"==typeof t&&!t.includes("-")&&!!(iu.indexOf(t)>-1||/[A-Z]/u.test(t))}const su=(t,n)=>n.isSVG??ou(t)?new zr(n):new Lr(n,{allowProjection:t!==e.Fragment}),ru=e.createContext({});function au(t){const{initial:n,animate:i}=function(t,e){if(Ns(t)){const{initial:e,animate:n}=t;return{initial:!1===e||Fs(e)?e:void 0,animate:Fs(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,e.useContext(ru));return e.useMemo(()=>({initial:n,animate:i}),[lu(n),lu(i)])}function lu(t){return Array.isArray(t)?t.join(" "):t}const uu=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function cu(t,e,n){for(const i in e)Ei(e[i])||Rr(i,n)||(t[i]=e[i])}function hu(t,n){const i={};return cu(i,t.style||{},t),Object.assign(i,function({transformTemplate:t},n){return e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{}};return Er(e,n,t),Object.assign({},e.vars,e.style)},[n])}(t,n)),i}function du(t,e){const n={},i=hu(t,e);return t.drag&&!1!==t.dragListener&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=i,n}const pu=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}});function mu(t,n,i,o){const s=e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Wr(e,n,Nr(o),t.transformTemplate,t.style),{...e.attrs,style:{...e.style}}},[n]);if(t.style){const e={};cu(e,t.style,t),s.style={...e,...s.style}}return s}function fu(t,n,i,{latestValues:o},s,r=!1,a){const l=(a??ou(t)?mu:du)(n,o,s,t),u=eu(n,"string"==typeof t,r),c=t!==e.Fragment?{...u,...l,ref:i}:{},{children:h}=n,d=e.useMemo(()=>Ei(h)?h.get():h,[h]);return e.createElement(t,{...c,children:d})}function gu(t,e,n,i){const o={},s=i(t,{});for(const t in s)o[t]=Na(s[t]);let{initial:r,animate:a}=t;const l=Ns(t),u=$s(t);e&&u&&!l&&!1!==t.inherit&&(void 0===r&&(r=e.initial),void 0===a&&(a=e.animate));let c=!!n&&!1===n.initial;c=c||!1===r;const h=c?a:r;if(h&&"boolean"!=typeof h&&!Os(h)){const e=Array.isArray(h)?h:[h];for(let n=0;n<e.length;n++){const i=fi(t,e[n]);if(i){const{transitionEnd:t,transition:e,...n}=i;for(const t in n){let e=n[t];if(Array.isArray(e)){e=e[c?e.length-1:0]}null!==e&&(o[t]=e)}for(const e in t)o[e]=t[e]}}}return o}const yu=t=>(n,i)=>{const o=e.useContext(ru),s=e.useContext(v),r=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e},n,i,o){return{latestValues:gu(n,i,o,t),renderState:e()}}(t,n,o,s);return i?r():f(r)},vu=yu({scrapeMotionValuesFromProps:Dr,createRenderState:uu}),xu=yu({scrapeMotionValuesFromProps:Yr,createRenderState:pu}),wu=Symbol.for("motionComponentSymbol");function Tu(t,n,i){const o=e.useRef(i);e.useInsertionEffect(()=>{o.current=i});const s=e.useRef(null);return e.useCallback(e=>{e&&t.onMount?.(e);const i=o.current;if("function"==typeof i)if(e){const t=i(e);"function"==typeof t&&(s.current=t)}else s.current?(s.current(),s.current=null):i(e);else i&&(i.current=e);n&&(e?n.mount(e):n.unmount())},[n])}const Su=e.createContext({});function bu(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function Pu(t,n,i,o,s,r){const{visualElement:a}=e.useContext(ru),l=e.useContext(Hl),u=e.useContext(v),c=e.useContext(Rl),h=c.reducedMotion,d=c.skipAnimations,p=e.useRef(null),m=e.useRef(!1);o=o||l.renderer,!p.current&&o&&(p.current=o(t,{visualState:n,parent:a,props:i,presenceContext:u,blockInitialAnimation:!!u&&!1===u.initial,reducedMotionConfig:h,skipAnimations:d,isSVG:r}),m.current&&p.current&&(p.current.manuallyAnimateOnMount=!0));const f=p.current,g=e.useContext(Su);!f||f.projection||!s||"html"!==f.type&&"svg"!==f.type||function(t,e,n,i){const{layoutId:o,layout:s,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Eu(t.parent)),t.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:Boolean(r)||a&&bu(a),visualElement:t,animationType:"string"==typeof s?s:"both",initialPromotionConfig:i,crossfade:c,layoutScroll:l,layoutRoot:u})}(p.current,i,s,g);const x=e.useRef(!1);e.useInsertionEffect(()=>{f&&x.current&&f.update(i,u)});const w=i[ki],T=e.useRef(Boolean(w)&&"undefined"!=typeof window&&!window.MotionHandoffIsComplete?.(w)&&window.MotionHasOptimisedAnimation?.(w));return y(()=>{m.current=!0,f&&(x.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),f.scheduleRenderMicrotask(),T.current&&f.animationState&&f.animationState.animateChanges())}),e.useEffect(()=>{f&&(!T.current&&f.animationState&&f.animationState.animateChanges(),T.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(w)}),T.current=!1),f.enteringChildren=void 0)}),f}function Eu(t){if(t)return!1!==t.options.allowProjection?t.projection:Eu(t.parent)}function Au(t,{forwardMotionProps:n=!1,type:i}={},o,s){o&&_l(o);const r=i?"svg"===i:ou(t),a=r?xu:vu;function l(i,o){let l;const u={...e.useContext(Rl),...i,layoutId:Mu(i)},{isStatic:c}=u,h=au(i),m=a(i,c);if(!c&&"undefined"!=typeof window){e.useContext(Hl).strict;const n=function(t){const e=Kl(),{drag:n,layout:i}=e;if(!n&&!i)return{};const o={...n,...i};return{MeasureLayout:n?.isEnabled(t)||i?.isEnabled(t)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}(u);l=n.MeasureLayout,h.visualElement=Pu(t,m,u,s,n.ProjectionNode,r)}return p(ru.Provider,{value:h,children:[l&&h.visualElement?d(l,{visualElement:h.visualElement,...u}):null,fu(t,i,Tu(m,h.visualElement,o),m,c,n,r)]})}l.displayName=`motion.${"string"==typeof t?t:`create(${t.displayName??t.name??""})`}`;const u=e.forwardRef(l);return u[wu]=t,u}function Mu({layoutId:t}){const n=e.useContext(m).id;return n&&void 0!==t?n+"-"+t:t}function Vu(t,e){if("undefined"==typeof Proxy)return Au;const n=new Map,i=(n,i)=>Au(n,i,t,e);return new Proxy((t,e)=>i(t,e),{get:(o,s)=>"create"===s?i:(n.has(s)||n.set(s,Au(s,void 0,t,e)),n.get(s))})}let Cu=0;const ku={animation:{Feature:class extends tr{constructor(t){super(t),t.animationState||(t.animationState=qr(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Os(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends tr{constructor(){super(...arguments),this.id=Cu++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;if(t&&!1===n){if(this.isExitComplete){const{initial:t,custom:e}=this.node.getProps();if("string"==typeof t){const n=gi(this.node,t,e);if(n){const{transition:t,transitionEnd:e,...i}=n;for(const t in i)this.node.getValue(t)?.jump(i[t])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);return void(this.isExitComplete=!1)}const i=this.node.animationState.setActive("exit",!t);e&&!t&&i.then(()=>{this.isExitComplete=!0,e(this.id)})}mount(){const{register:t,onExitComplete:e}=this.node.presenceContext||{};e&&e(this.id),t&&(this.unmount=t(this.id))}unmount(){}}}};function Ru(t){return{point:{x:t.pageX,y:t.pageY}}}const Du=t=>e=>Mo(e)&&t(e,Ru(e));function Lu(t,e,n,i){return Oa(t,e,Du(n),i)}const Bu=({current:t})=>t?t.ownerDocument.defaultView:null,ju=(t,e)=>Math.abs(t-e);function Iu(t,e){const n=ju(t.x,e.x),i=ju(t.y,e.y);return Math.sqrt(n**2+i**2)}const Ou=new Set(["auto","scroll"]);class Fu{constructor(t,e,{transformPagePoint:n,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:s=3,element:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=t=>{this.handleScroll(t.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Wu(this.lastRawMoveEventInfo,this.transformPagePoint));const t=Nu(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=Iu(t.offset,{x:0,y:0})>=this.distanceThreshold;if(!e&&!n)return;const{point:i}=t,{timestamp:o}=ut;this.history.push({...i,timestamp:o});const{onStart:s,onMove:r}=this.handlers;e||(s&&s(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),r&&r(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastRawMoveEventInfo=e,this.lastMoveEventInfo=Wu(e,this.transformPagePoint),at.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:n,onSessionEnd:i,resumeAnimation:o}=this.handlers;if(!this.dragSnapToOrigin&&this.startEvent||o&&o(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const s=Nu("pointercancel"===t.type?this.lastMoveEventInfo:Wu(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,s),i&&i(t,s)},!Mo(t))return;this.dragSnapToOrigin=o,this.handlers=e,this.transformPagePoint=n,this.distanceThreshold=s,this.contextWindow=i||window;const a=Wu(Ru(t),this.transformPagePoint),{point:l}=a,{timestamp:u}=ut;this.history=[{...l,timestamp:u}];const{onSessionStart:c}=e;c&&c(t,Nu(a,this.history)),this.removeListeners=R(Lu(this.contextWindow,"pointermove",this.handlePointerMove),Lu(this.contextWindow,"pointerup",this.handlePointerUp),Lu(this.contextWindow,"pointercancel",this.handlePointerUp)),r&&this.startScrollTracking(r)}startScrollTracking(t){let e=t.parentElement;for(;e;){const t=getComputedStyle(e);(Ou.has(t.overflowX)||Ou.has(t.overflowY))&&this.scrollPositions.set(e,{x:e.scrollLeft,y:e.scrollTop}),e=e.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(t){const e=this.scrollPositions.get(t);if(!e)return;const n=t===window,i=n?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},o=i.x-e.x,s=i.y-e.y;0===o&&0===s||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=o,this.lastMoveEventInfo.point.y+=s):this.history.length>0&&(this.history[0].x-=o,this.history[0].y-=s),this.scrollPositions.set(t,i),at.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),lt(this.updatePoint)}}function Wu(t,e){return e?{point:e(t.point)}:t}function Uu(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Nu({point:t},e){return{point:t,delta:Uu(t,Yu(e)),offset:Uu(t,$u(e)),velocity:zu(e,.1)}}function $u(t){return t[0]}function Yu(t){return t[t.length-1]}function zu(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const o=Yu(t);for(;n>=0&&(i=t[n],!(o.timestamp-i.timestamp>B(e)));)n--;if(!i)return{x:0,y:0};i===t[0]&&t.length>2&&o.timestamp-i.timestamp>2*B(e)&&(i=t[1]);const s=j(o.timestamp-i.timestamp);if(0===s)return{x:0,y:0};const r={x:(o.x-i.x)/s,y:(o.y-i.y)/s};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function Hu(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function Xu(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,i]=[i,n]),{min:n,max:i}}const Gu=.35;function Ku(t,e,n){return{min:_u(t,e),max:_u(t,n)}}function _u(t,e){return"number"==typeof t?t:t[e]||0}const qu=new WeakMap;class Zu{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:e=!1,distanceThreshold:n}={}){const{presenceContext:i}=this.visualElement;if(i&&!1===i.isPresent)return;const{dragSnapToOrigin:o}=this.getProps();this.panSession=new Fu(t,{onSessionStart:t=>{e&&this.snapToCursor(Ru(t).point),this.stopAnimation()},onStart:(t,e)=>{const{drag:n,dragPropagation:i,onDragStart:o}=this.getProps();if(n&&!i&&(this.openDragLock&&this.openDragLock(),this.openDragLock=bo(n),!this.openDragLock))return;this.latestPointerEvent=t,this.latestPanInfo=e,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ea(t=>{let e=this.getAxisMotionValue(t).get()||0;if(Bt.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const i=n.layout.layoutBox[t];if(i){e=ia(i)*(parseFloat(e)/100)}}}this.originPoint[t]=e}),o&&at.update(()=>o(t,e),!1,!0),Mi(this.visualElement,"transform");const{animationState:s}=this.visualElement;s&&s.setActive("whileDrag",!0)},onMove:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e;const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:o,onDrag:s}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:r}=e;if(i&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(r),void(null!==this.currentDirection&&o&&o(this.currentDirection));this.updateAxis("x",e.point,r),this.updateAxis("y",e.point,r),this.visualElement.render(),s&&at.update(()=>s(t,e),!1,!0)},onSessionEnd:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e,this.stop(t,e),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>{const{dragSnapToOrigin:t}=this.getProps();(t||this.constraints)&&this.startAnimation({x:0,y:0})}},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:o,distanceThreshold:n,contextWindow:Bu(this.visualElement),element:this.visualElement.current})}stop(t,e){const n=t||this.latestPointerEvent,i=e||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!i||!n)return;const{velocity:s}=i;this.startAnimation(s);const{onDragEnd:r}=this.getProps();r&&at.postRender(()=>r(n,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e&&e.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,e,n){const{drag:i}=this.getProps();if(!n||!Qu(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let s=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(s=function(t,{min:e,max:n},i){return void 0!==e&&t<e?t=i?Jt(e,t,i.min):Math.max(t,e):void 0!==n&&t>n&&(t=i?Jt(n,t,i.max):Math.min(t,n)),t}(s,this.constraints[t],this.elastic[t])),o.set(s)}resolveConstraints(){const{dragConstraints:t,dragElastic:e}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;t&&bu(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!n)&&function(t,{top:e,left:n,bottom:i,right:o}){return{x:Hu(t.x,n,o),y:Hu(t.y,e,i)}}(n.layoutBox,t),this.elastic=function(t=Gu){return!1===t?t=0:!0===t&&(t=Gu),{x:Ku(t,"left","right"),y:Ku(t,"top","bottom")}}(e),i!==this.constraints&&!bu(t)&&n&&this.constraints&&!this.hasMutatedConstraints&&Ea(t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(n.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!bu(e))return!1;const i=e.current;t.invariant(null!==i,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=Tr(i,o.root,this.visualElement.getTransformPagePoint());let r=function(t,e){return{x:Xu(t.x,e.x),y:Xu(t.y,e.y)}}(o.layout.layoutBox,s);if(n){const t=n(nr(r));this.hasMutatedConstraints=!!t,t&&(r=er(t))}return r}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:i,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},l=Ea(r=>{if(!Qu(r,e,this.currentDirection))return;let l=a&&a[r]||{};!0!==s&&s!==r||(l={min:0,max:0});const u=i?200:1e6,c=i?40:1e7,h={type:"inertia",velocity:n?t[r]:0,bounceStiffness:u,bounceDamping:c,timeConstant:750,restDelta:1,restSpeed:10,...o,...l};return this.startAxisValueAnimation(r,h)});return Promise.all(l).then(r)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return Mi(this.visualElement,t),n.start(pi(t,n,0,e,this.visualElement,!1))}stopAnimation(){Ea(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const e=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps(),i=n[e];return i||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){Ea(e=>{const{drag:n}=this.getProps();if(!Qu(e,n,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(e);if(i&&i.layout){const{min:n,max:s}=i.layout.layoutBox[e],r=o.get()||0;o.set(t[e]-Jt(n,s,.5)+r)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!bu(e)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Ea(t=>{const e=this.getAxisMotionValue(t);if(e&&!1!==this.constraints){const n=e.get();i[t]=function(t,e){let n=.5;const i=ia(t),o=ia(e);return o>i?n=D(e.min,e.max-i,t.min):i>o&&(n=D(t.min,t.max-o,e.min)),S(0,1,n)}({min:n,max:n},this.constraints[t])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),Ea(e=>{if(!Qu(e,t,null))return;const n=this.getAxisMotionValue(e),{min:o,max:s}=this.constraints[e];n.set(Jt(o,s,i[e]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;qu.set(this.visualElement,this);const t=this.visualElement.current,e=Lu(t,"pointerdown",e=>{const{drag:n,dragListener:i=!0}=this.getProps(),o=e.target,s=o!==t&&Ro(o);n&&i&&!s&&this.start(e)});let n;const i=()=>{const{dragConstraints:e}=this.getProps();bu(e)&&e.current&&(this.constraints=this.resolveRefConstraints(),n||(n=function(t,e,n){const i=Zo(t,Ju(n)),o=Zo(e,Ju(n));return()=>{i(),o()}}(t,e.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,s=o.addEventListener("measure",i);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),at.read(i);const r=Oa(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(Ea(e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))}),this.visualElement.render())});return()=>{r(),e(),s(),a&&a(),n&&n()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:s=Gu,dragMomentum:r=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:i,dragConstraints:o,dragElastic:s,dragMomentum:r}}}function Ju(t){let e=!0;return()=>{e?e=!1:t()}}function Qu(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const tc=t=>(e,n)=>{t&&at.update(()=>t(e,n),!1,!0)};let ec=!1;class nc extends e.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:i}=this.props,{projection:o}=t;o&&(e.group&&e.group.add(o),n&&n.register&&i&&n.register(o),ec&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Ya.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:i,isPresent:o}=this.props,{projection:s}=n;return s?(s.isPresent=o,t.layoutDependency!==e&&s.setOptions({...s.options,layoutDependency:e}),ec=!0,i||t.layoutDependency!==e||void 0===e||t.isPresent!==o?s.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?s.promote():s.relegate()||at.postRender(()=>{const t=s.getStack();t&&t.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),xo.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:i}=t;ec=!0,i&&(i.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function ic(t){const[n,i]=Fl(),o=e.useContext(m);return d(nc,{...t,layoutGroup:o,switchLayoutGroup:e.useContext(Su),isPresent:n,safeToRemove:i})}const oc={pan:{Feature:class extends tr{constructor(){super(...arguments),this.removePointerDownListener=C}onPointerDown(t){this.session=new Fu(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Bu(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:tc(t),onStart:tc(e),onMove:tc(n),onEnd:(t,e)=>{delete this.session,i&&at.postRender(()=>i(t,e))}}}mount(){this.removePointerDownListener=Lu(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends tr{constructor(t){super(t),this.removeGroupControls=C,this.removeListeners=C,this.controls=new Zu(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||C}update(){const{dragControls:t}=this.node.getProps(),{dragControls:e}=this.node.prevProps||{};t!==e&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},ProjectionNode:Sl,MeasureLayout:ic}};function sc(t,e,n){const{props:i}=t;t.animationState&&i.whileHover&&t.animationState.setActive("whileHover","Start"===n);const o=i["onHover"+n];o&&at.postRender(()=>o(e,Ru(e)))}function rc(t,e,n){const{props:i}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&i.whileTap&&t.animationState.setActive("whileTap","Start"===n);const o=i["onTap"+("End"===n?"":n)];o&&at.postRender(()=>o(e,Ru(e)))}const ac=new WeakMap,lc=new WeakMap,uc=t=>{const e=ac.get(t.target);e&&e(t)},cc=t=>{t.forEach(uc)};function hc(t,e,n){const i=function({root:t,...e}){const n=t||document;lc.has(n)||lc.set(n,{});const i=lc.get(n),o=JSON.stringify(e);return i[o]||(i[o]=new IntersectionObserver(cc,{root:t,...e})),i[o]}(e);return ac.set(t,n),i.observe(t),()=>{ac.delete(t),i.unobserve(t)}}const dc={some:0,all:1};const pc={inView:{Feature:class extends tr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:i="some",once:o}=t,s={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof i?i:dc[i]};return hc(this.node.current,s,t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,o&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),s=e?n:i;s&&s(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends tr{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:e,propagate:n}=this.node.props;this.unmount=Oo(t,(t,e)=>(rc(this.node,e,"Start"),(t,{success:e})=>rc(this.node,t,e?"End":"Cancel")),{useGlobalTarget:e,stopPropagation:!1===n?.tap})}unmount(){}}},focus:{Feature:class extends tr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=R(Oa(this.node.current,"focus",()=>this.onFocus()),Oa(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends tr{mount(){const{current:t}=this.node;t&&(this.unmount=Eo(t,(t,e)=>(sc(this.node,e,"Start"),t=>sc(this.node,t,"End"))))}unmount(){}}}},mc={layout:{ProjectionNode:Sl,MeasureLayout:ic}},fc=Vu({...ku,...pc,...oc,...mc},su);function gc({children:n,as:i="ul",axis:o="y",onReorder:s,values:r,...a},l){const u=f(()=>fc[i]),c=[],h=e.useRef(!1),p=e.useRef(null);t.invariant(Boolean(r),"Reorder.Group must be provided a values prop","reorder-values");const m={axis:o,groupRef:p,registerItem:(t,e)=>{const n=c.findIndex(e=>t===e.value);-1!==n?c[n].layout=e[o]:c.push({value:t,layout:e[o]}),c.sort(xc)},updateOrder:(t,e,n)=>{if(h.current)return;const i=function(t,e,n,i){if(!i)return t;const o=t.findIndex(t=>t.value===e);if(-1===o)return t;const s=i>0?1:-1,r=t[o+s];if(!r)return t;const a=t[o],l=r.layout,u=Jt(l.min,l.max,.5);return 1===s&&a.layout.max+n>u||-1===s&&a.layout.min+n<u?T(t,o,o+s):t}(c,t,e,n);c!==i&&(h.current=!0,s(i.map(vc).filter(t=>-1!==r.indexOf(t))))}};e.useEffect(()=>{h.current=!1});const g={overflowAnchor:"none",...a.style};return d(u,{...a,style:g,ref:t=>{p.current=t,"function"==typeof l?l(t):l&&(l.current=t)},ignoreStrict:!0,children:d(nu.Provider,{value:m,children:n})})}const yc=e.forwardRef(gc);function vc(t){return t.value}function xc(t,e){return t.layout.min-e.layout.min}function wc(t){const n=f(()=>wi(t)),{isStatic:i}=e.useContext(Rl);if(i){const[,i]=e.useState(t);e.useEffect(()=>n.on("change",i),[])}return n}function Tc(t,e){const n=wc(e()),i=()=>n.set(e());return i(),y(()=>{const e=()=>at.preRender(i,!1,!0),n=t.map(t=>t.on("change",e));return()=>{n.forEach(t=>t()),lt(i)}}),n}function Sc(t,e,n,i){if("function"==typeof t)return function(t){vi.current=[],t();const e=Tc(vi.current,t);return vi.current=void 0,e}(t);if(void 0!==n&&!Array.isArray(n)&&"function"!=typeof e)return function(t,e,n,i){const o=f(()=>Object.keys(n)),s=f(()=>({}));for(const r of o)s[r]=Sc(t,e,n[r],i);return s}(t,e,n,i);const o="function"==typeof e?e:as(e,n,i),s=Array.isArray(t)?bc(t,o):bc([t],([t])=>o(t)),r=Array.isArray(t)?void 0:t.accelerate;return r&&!r.isTransformed&&"function"!=typeof e&&Array.isArray(n)&&!1!==i?.clamp&&(s.accelerate={...r,times:e,keyframes:n,isTransformed:!0,...i?.ease?{ease:i.ease}:{}}),s}function bc(t,e){const n=f(()=>[]);return Tc(t,()=>{n.length=0;const i=t.length;for(let e=0;e<i;e++)n[e]=t[e].get();return e(n)})}const Pc=new Set(["auto","scroll"]),Ec=new WeakMap,Ac=new WeakMap;let Mc=null;function Vc(t,e){const n=getComputedStyle(t),i="x"===e?n.overflowX:n.overflowY,o=t===document.body||t===document.documentElement;return Pc.has(i)||o}function Cc(t,e){let n=t?.parentElement;for(;n;){if(Vc(n,e))return n;n=n.parentElement}return null}function kc(t,e,n,i){if(!t)return;Mc=t;const o=Cc(t,n);if(!o)return;const s=e-("x"===n?window.scrollX:window.scrollY),{amount:r,edge:a}=function(t,e,n){const i=e.getBoundingClientRect(),o=t-("x"===n?Math.max(0,i.left):Math.max(0,i.top)),s=("x"===n?Math.min(window.innerWidth,i.right):Math.min(window.innerHeight,i.bottom))-t;if(o<50){const t=1-o/50;return{amount:-25*t*t,edge:"start"}}if(s<50){const t=1-s/50;return{amount:25*t*t,edge:"end"}}return{amount:0,edge:null}}(s,o,n);if(null===a)return Ac.delete(o),void Ec.delete(o);const l=Ac.get(o),u=o===document.body||o===document.documentElement;if(l!==a){if(!("start"===a&&i<0||"end"===a&&i>0))return;Ac.set(o,a);const t="x"===n?o.scrollWidth-(u?window.innerWidth:o.clientWidth):o.scrollHeight-(u?window.innerHeight:o.clientHeight);Ec.set(o,t)}if(r>0){const t=Ec.get(o);if(("x"===n?u?window.scrollX:o.scrollLeft:u?window.scrollY:o.scrollTop)>=t)return}"x"===n?u?window.scrollBy({left:r}):o.scrollLeft+=r:u?window.scrollBy({top:r}):o.scrollTop+=r}function Rc(t,e=0){return Ei(t)?t:wc(e)}function Dc({children:n,style:i={},value:o,as:s="li",onDrag:r,onDragEnd:a,layout:l=!0,...u},c){const h=f(()=>fc[s]),p=e.useContext(nu),m={x:Rc(i.x),y:Rc(i.y)},g=Sc([m.x,m.y],([t,e])=>t||e?1:"unset");t.invariant(Boolean(p),"Reorder.Item must be a child of Reorder.Group","reorder-item-child");const{axis:y,registerItem:v,updateOrder:x,groupRef:w}=p;return d(h,{drag:y,...u,dragSnapToOrigin:!0,style:{...i,x:m.x,y:m.y,zIndex:g},layout:l,onDrag:(t,e)=>{const{velocity:n,point:i}=e,s=m[y].get();x(o,s,n[y]),kc(w.current,i[y],y,n[y]),r&&r(t,e)},onDragEnd:(t,e)=>{!function(){if(Mc){const t=Cc(Mc,"y");t&&(Ac.delete(t),Ec.delete(t));const e=Cc(Mc,"x");e&&e!==t&&(Ac.delete(e),Ec.delete(e)),Mc=null}}(),a&&a(t,e)},onLayoutMeasure:t=>{v(o,t)},ref:c,ignoreStrict:!0,children:n})}const Lc=e.forwardRef(Dc);var Bc=Object.freeze({__proto__:null,Group:yc,Item:Lc});function jc(t){return"object"==typeof t&&!Array.isArray(t)}function Ic(t,e,n,i){return null==t?[]:"string"==typeof t&&jc(e)?oo(t,n,i):t instanceof NodeList?Array.from(t):Array.isArray(t)?t.filter(t=>null!=t):[t]}function Oc(t,e,n){return t*(e+1)}function Fc(t,e,n,i){return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:e.startsWith("<")?Math.max(0,n+parseFloat(e.slice(1))):i.get(e)??t}function Wc(t,e,n,i,o,s){!function(t,e,n){for(let i=0;i<t.length;i++){const o=t[i];o.at>e&&o.at<n&&(w(t,o),i--)}}(t,o,s);for(let r=0;r<e.length;r++)t.push({value:e[r],at:Jt(o,s,i[r]),easing:tt(n,r)})}function Uc(t,e){for(let n=0;n<t.length;n++)t[n]=t[n]/(e+1)}function Nc(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function $c(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function Yc(t,e){return e[t]||(e[t]=[]),e[t]}function zc(t){return Array.isArray(t)?t:[t]}function Hc(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const Xc=t=>"number"==typeof t,Gc=t=>t.every(Xc);function Kc(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Wo(t)&&!ss(t)?new zr(e):new Lr(e);n.mount(t),Is.set(t,n)}function _c(t){const e=new Br({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});e.mount(t),Is.set(t,e)}function qc(e,n,i,o){const s=[];if(function(t,e){return Ei(t)||"number"==typeof t||"string"==typeof t&&!jc(e)}(e,n))s.push(Ia(e,jc(n)&&n.default||n,i&&i.default||i));else{if(null==e)return s;const r=Ic(e,n,o),a=r.length;t.invariant(Boolean(a),"No valid elements provided.","no-valid-elements");for(let t=0;t<a;t++){const e=r[t],o=e instanceof Element?Kc:_c;Is.has(e)||o(e);const l=Is.get(e),u={...i};"delay"in u&&"function"==typeof u.delay&&(u.delay=u.delay(t,a)),s.push(...Li(l,{...n,transition:u},{}))}}return s}function Zc(e,n,i){const o=[],s=function(e,{defaultTransition:n={},...i}={},o,s){const r=n.duration||.3,a=new Map,l=new Map,u={},c=new Map;let h=0,d=0,p=0;for(let i=0;i<e.length;i++){const a=e[i];if("string"==typeof a){c.set(a,d);continue}if(!Array.isArray(a)){c.set(a.name,Fc(d,a.at,h,c));continue}let[m,f,g={}]=a;void 0!==g.at&&(d=Fc(d,g.at,h,c));let y=0;const v=(e,i,o,a=0,l=0)=>{const u=zc(e),{delay:c=0,times:h=Ue(u),type:m=n.type||"keyframes",repeat:f,repeatType:g,repeatDelay:v=0,...x}=i;let{ease:w=n.ease||"easeOut",duration:T}=i;const S="function"==typeof c?c(a,l):c,b=u.length,P=jn(m)?m:s?.[m||"keyframes"];if(b<=2&&P){let t=100;if(2===b&&Gc(u)){const e=u[1]-u[0];t=Math.abs(e)}const e={...n,...x};void 0!==T&&(e.duration=B(T));const i=fe(e,t,P);w=i.ease,T=i.duration}T??(T=r);const E=d+S;1===h.length&&0===h[0]&&(h[1]=1);const A=h.length-u.length;if(A>0&&We(h,A),1===u.length&&u.unshift(null),f){t.invariant(f<20,"Repeat count too high, must be less than 20","repeat-count-high"),T=Oc(T,f);const e=[...u],n=[...h];w=Array.isArray(w)?[...w]:[w];const i=[...w];for(let t=0;t<f;t++){u.push(...e);for(let o=0;o<e.length;o++)h.push(n[o]+(t+1)),w.push(0===o?"linear":tt(i,o-1))}Uc(h,f)}const M=E+T;Wc(o,u,w,h,E,M),y=Math.max(S+T,y),p=Math.max(M,p)};if(Ei(m))v(f,g,Yc("default",$c(m,l)));else{const t=Ic(m,f,o,u),e=t.length;for(let n=0;n<e;n++){const i=$c(t[n],l);for(const t in f)v(f[t],Hc(g,t),Yc(t,i),n,e)}}h=d,d+=y}return l.forEach((t,e)=>{for(const o in t){const s=t[o];s.sort(Nc);const r=[],l=[],u=[];for(let t=0;t<s.length;t++){const{at:e,value:n,easing:i}=s[t];r.push(n),l.push(D(0,p,e)),u.push(i||"easeOut")}0!==l[0]&&(l.unshift(0),r.unshift(r[0]),u.unshift("easeInOut")),1!==l[l.length-1]&&(l.push(1),r.push(null)),a.has(e)||a.set(e,{keyframes:{},transition:{}});const c=a.get(e);c.keyframes[o]=r;const{type:h,...d}=n;c.transition[o]={...d,duration:p,ease:u,times:l,...i}}}),a}(e.map(t=>{if(Array.isArray(t)&&"function"==typeof t[0]){const e=t[0],n=wi(0);return n.on("change",e),1===t.length?[n,[0,1]]:2===t.length?[n,[0,1],t[1]]:[n,t[1],t[2]]}return t}),n,i,{spring:je});return s.forEach(({keyframes:t,transition:e},n)=>{o.push(...qc(n,t,e))}),o}function Jc(t={}){const{scope:e,reduceMotion:n}=t;return function(t,i,o){let s,r=[];if(a=t,Array.isArray(a)&&a.some(Array.isArray)){const{onComplete:o,...a}=i||{};"function"==typeof o&&(s=o),r=Zc(t,void 0!==n?{reduceMotion:n,...a}:a,e)}else{const{onComplete:a,...l}=o||{};"function"==typeof a&&(s=a),r=qc(t,i,void 0!==n?{reduceMotion:n,...l}:l,e)}var a;const l=new _n(r);return s&&l.finished.then(s),e&&(e.animations.push(l),l.finished.then(()=>{w(e.animations,l)})),l}}const Qc=Jc();const th=e=>function(n,i,o){return new _n(function(e,n,i,o){if(null==e)return[];const s=oo(e,o),r=s.length;t.invariant(Boolean(r),"No valid elements provided.","no-valid-elements");const a=[];for(let t=0;t<r;t++){const e=s[t],o={...i};"function"==typeof o.delay&&(o.delay=o.delay(t,r));for(const t in n){let i=n[t];Array.isArray(i)||(i=[i]);const s={...hi(o,t)};s.duration&&(s.duration=B(s.duration)),s.delay&&(s.delay=B(s.delay));const r=Qn(e),l=Jn(t,s.pseudoElement||""),u=r.get(l);u&&u.stop(),a.push({map:r,key:l,unresolvedKeyframes:i,options:{...s,element:e,name:t,allowFlatten:!o.type&&!o.ease}})}}for(let t=0;t<a.length;t++){const{unresolvedKeyframes:e,options:n}=a[t],{element:i,name:o,pseudoElement:s}=n;s||null!==e[0]||(e[0]=Fo(i,o)),Ze(e),eo(e,o),!s&&e.length<2&&e.unshift(Fo(i,o)),n.keyframes=e}const l=[];for(let t=0;t<a.length;t++){const{map:e,key:n,options:i}=a[t],o=new On(i);e.set(n,o),o.finished.finally(()=>e.delete(n)),l.push(o)}return l}(n,i,o,e))},eh=th();function nh(t){return"undefined"!=typeof window&&(t?Cn():Vn())}const ih={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function oh(t,e,n,i){const o=n[e],{length:s,position:r}=ih[e],a=o.current,l=n.time;o.current=Math.abs(t[`scroll${r}`]),o.scrollLength=t[`scroll${s}`]-t[`client${s}`],o.offset.length=0,o.offset[0]=0,o.offset[1]=o.scrollLength,o.progress=D(0,o.scrollLength,o.current);const u=i-l;o.velocity=u>50?0:I(o.current-a,u)}const sh={start:0,center:.5,end:1};function rh(t,e,n=0){let i=0;if(t in sh&&(t=sh[t]),"string"==typeof t){const e=parseFloat(t);t.endsWith("px")?i=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?i=e/100*document.documentElement.clientWidth:t.endsWith("vh")?i=e/100*document.documentElement.clientHeight:t=e}return"number"==typeof t&&(i=e*t),n+i}const ah=[0,0];function lh(t,e,n,i){let o=Array.isArray(t)?t:ah,s=0,r=0;return"number"==typeof t?o=[t,t]:"string"==typeof t&&(o=(t=t.trim()).includes(" ")?t.split(" "):[t,sh[t]?t:"0"]),s=rh(o[0],n,i),r=rh(o[1],e),s-r}const uh={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},ch={x:0,y:0};function hh(t,e,n){const{offset:i=uh.All}=n,{target:o=t,axis:s="y"}=n,r="y"===s?"height":"width",a=o!==t?function(t,e){const n={x:0,y:0};let i=t;for(;i&&i!==e;)if(po(i))n.x+=i.offsetLeft,n.y+=i.offsetTop,i=i.offsetParent;else if("svg"===i.tagName){const t=i.getBoundingClientRect();i=i.parentElement;const e=i.getBoundingClientRect();n.x+=t.left-e.left,n.y+=t.top-e.top}else{if(!(i instanceof SVGGraphicsElement))break;{const{x:t,y:e}=i.getBBox();n.x+=t,n.y+=e;let o=null,s=i.parentNode;for(;!o;)"svg"===s.tagName&&(o=s),s=i.parentNode;i=o}}return n}(o,t):ch,l=o===t?{width:t.scrollWidth,height:t.scrollHeight}:function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(o),u={width:t.clientWidth,height:t.clientHeight};e[s].offset.length=0;let c=!e[s].interpolate;const h=i.length;for(let t=0;t<h;t++){const n=lh(i[t],u[r],l[r],a[s]);c||n===e[s].interpolatorOffsets[t]||(c=!0),e[s].offset[t]=n}c&&(e[s].interpolate=Fe(e[s].offset,Ue(i),{clamp:!1}),e[s].interpolatorOffsets=[...e[s].offset]),e[s].progress=S(0,1,e[s].interpolate(e[s].current))}function dh(t,e,n,i={}){return{measure:e=>{!function(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let i=e;for(;i&&i!==t;)n.x.targetOffset+=i.offsetLeft,n.y.targetOffset+=i.offsetTop,i=i.offsetParent}n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight}(t,i.target,n),function(t,e,n){oh(t,"x",e,n),oh(t,"y",e,n),e.time=n}(t,n,e),(i.offset||i.target)&&hh(t,n,i)},notify:()=>e(n)}}const ph=new WeakMap,mh=new WeakMap,fh=new WeakMap,gh=new WeakMap,yh=new WeakMap,vh=t=>t===document.scrollingElement?window:t;function xh(t,{container:e=document.scrollingElement,trackContentSize:n=!1,...i}={}){if(!e)return C;let o=fh.get(e);o||(o=new Set,fh.set(e,o));const s=dh(e,t,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},i);if(o.add(s),!ph.has(e)){const t=()=>{for(const t of o)t.measure(ut.timestamp);at.preUpdate(n)},n=()=>{for(const t of o)t.notify()},i=()=>at.read(t);ph.set(e,i);const s=vh(e);window.addEventListener("resize",i),e!==document.documentElement&&mh.set(e,Zo(e,i)),s.addEventListener("scroll",i),i()}if(n&&!yh.has(e)){const t=ph.get(e),n={width:e.scrollWidth,height:e.scrollHeight};gh.set(e,n);const i=()=>{const i=e.scrollWidth,o=e.scrollHeight;n.width===i&&n.height===o||(t(),n.width=i,n.height=o)},o=at.read(i,!0);yh.set(e,o)}const r=ph.get(e);return at.read(r,!1,!0),()=>{lt(r);const t=fh.get(e);if(!t)return;if(t.delete(s),t.size)return;const n=ph.get(e);ph.delete(e),n&&(vh(e).removeEventListener("scroll",n),mh.get(e)?.(),window.removeEventListener("resize",n));const i=yh.get(e);i&&(lt(i),yh.delete(e)),gh.delete(e)}}const wh=[[uh.Enter,"entry"],[uh.Exit,"exit"],[uh.Any,"cover"],[uh.All,"contain"]];function Th(t,e){if(2!==t.length)return!1;for(let n=0;n<2;n++){const i=t[n],o=e[n];if(!Array.isArray(i)||2!==i.length||i[0]!==o[0]||i[1]!==o[1])return!1}return!0}function Sh(t){if(!t)return{rangeStart:"contain 0%",rangeEnd:"contain 100%"};for(const[e,n]of wh)if(Th(t,e))return{rangeStart:`${n} 0%`,rangeEnd:`${n} 100%`}}const bh=new Map;function Ph(t){const e={value:0},n=xh(n=>{e.value=100*n[t.axis].progress},t);return{currentTime:e,cancel:n}}function Eh({source:t,container:e,...n}){const{axis:i}=n;t&&(e=t);let o=bh.get(e);o||(o=new Map,bh.set(e,o));const s=n.target??"self";let r=o.get(s);r||(r={},o.set(s,r));const a=i+(n.offset??[]).join(",");if(!r[a])if(n.target&&nh(n.target)){const t=Sh(n.offset);r[a]=t?new ViewTimeline({subject:n.target,axis:i}):Ph({container:e,...n})}else nh()?r[a]=new ScrollTimeline({source:e,axis:i}):r[a]=Ph({container:e,...n});return r[a]}function Ah(t,{axis:e="y",container:n=document.scrollingElement,...i}={}){if(!n)return C;const o={axis:e,container:n,...i};return"function"==typeof t?function(t,e){return function(t){return 2===t.length}(t)?xh(n=>{t(n[e.axis].progress,n)},e):Jo(t,Eh(e))}(t,o):function(t,e){const n=Eh(e),i=e.target?Sh(e.offset):void 0,o=e.target?nh(e.target)&&!!i:nh();return t.attachTimeline({timeline:o?n:void 0,...i&&o&&{rangeStart:i.rangeStart,rangeEnd:i.rangeEnd},observe:t=>(t.pause(),Jo(e=>{t.time=t.iterationDuration*e},n))})}(t,o)}const Mh={some:0,all:1};function Vh(t,e,{root:n,margin:i,amount:o="some"}={}){const s=oo(t),r=new WeakMap,a=new IntersectionObserver(t=>{t.forEach(t=>{const n=r.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){const n=e(t.target,t);"function"==typeof n?r.set(t.target,n):a.unobserve(t.target)}else"function"==typeof n&&(n(t),r.delete(t.target))})},{root:n,rootMargin:i,threshold:"number"==typeof o?o:Mh[o]});return s.forEach(t=>a.observe(t)),()=>a.disconnect()}const Ch=Vu();function kh(t){return e.useEffect(()=>()=>t(),[])}const Rh={renderer:su,...ku,...pc},Dh={...Rh,...oc,...mc},Lh={renderer:su,...ku};function Bh(t,n,i){e.useInsertionEffect(()=>t.on(n,i),[t,n,i])}const jh=()=>({scrollX:wi(0),scrollY:wi(0),scrollXProgress:wi(0),scrollYProgress:wi(0)}),Ih=t=>!!t&&!t.current;function Oh(t,e,n,i){return{factory:o=>Ah(o,{...e,axis:t,container:n?.current||void 0,target:i?.current||void 0}),times:[0,1],keyframes:[0,1],ease:t=>t,duration:1}}function Fh({container:n,target:i,...o}={}){const s=f(jh);(function(t,e){return"undefined"!=typeof window&&(t?Cn()&&!!Sh(e):Vn())})(i,o.offset)&&(s.scrollXProgress.accelerate=Oh("x",o,n,i),s.scrollYProgress.accelerate=Oh("y",o,n,i));const r=e.useRef(null),a=e.useRef(!1),l=e.useCallback(()=>(r.current=Ah((t,{x:e,y:n})=>{s.scrollX.set(e.current),s.scrollXProgress.set(e.progress),s.scrollY.set(n.current),s.scrollYProgress.set(n.progress)},{...o,container:n?.current||void 0,target:i?.current||void 0}),()=>{r.current?.()}),[n,i,JSON.stringify(o.offset)]);return y(()=>(a.current=!1,Ih(n)||Ih(i)?void(a.current=!0):l()),[l]),e.useEffect(()=>a.current?(t.invariant(!Ih(n),"Container ref is defined but not hydrated","use-scroll-ref"),t.invariant(!Ih(i),"Target ref is defined but not hydrated","use-scroll-ref"),l()):void 0,[l]),s}function Wh(t,n={}){const{isStatic:i}=e.useContext(Rl),o=()=>Ei(t)?t.get():t;if(i)return Sc(o);const s=wc(o());return e.useInsertionEffect(()=>us(s,t,n),[s,JSON.stringify(n)]),s}function Uh(t){const n=e.useRef(0),{isStatic:i}=e.useContext(Rl);e.useEffect(()=>{if(i)return;const e=({timestamp:e,delta:i})=>{n.current||(n.current=e),t(e-n.current,i)};return at.update(e,!0),()=>lt(e)},[t])}class Nh extends xi{constructor(){super(...arguments),this.isEnabled=!1}add(t){(hn.has(t)||io.has(t))&&(this.isEnabled=!0,this.update())}update(){this.set(this.isEnabled?"transform":"auto")}}function $h(){!Hs.current&&Gs();const[t]=e.useState(zs.current);return t}function Yh(){const t=$h(),{reducedMotion:n}=e.useContext(Rl);return"never"!==n&&("always"===n||t)}function zh(t,e){[...e].reverse().forEach(n=>{const i=t.getVariant(n);i&&Pi(t,i),t.variantChildren&&t.variantChildren.forEach(t=>{zh(t,e)})})}function Hh(){let e=!1;const n=new Set,i={subscribe:t=>(n.add(t),()=>{n.delete(t)}),start(i,o){t.invariant(e,"controls.start() should only be called after a component has mounted. Consider calling within a useEffect hook.");const s=[];return n.forEach(t=>{s.push(ji(t,i,{transitionOverride:o}))}),Promise.all(s)},set:i=>(t.invariant(e,"controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook."),n.forEach(t=>{!function(t,e){Array.isArray(e)?zh(t,e):"string"==typeof e?zh(t,[e]):Pi(t,e)}(t,i)})),stop(){n.forEach(t=>{!function(t){t.values.forEach(t=>t.stop())}(t)})},mount:()=>(e=!0,()=>{e=!1,i.stop()})};return i}function Xh(){const t=f(Hh);return y(t.mount,[]),t}const Gh=Xh;class Kh{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,e){this.componentControls.forEach(n=>{n.start(t.nativeEvent||t,e)})}cancel(){this.componentControls.forEach(t=>{t.cancel()})}stop(){this.componentControls.forEach(t=>{t.stop()})}}const _h=()=>new Kh;function qh(t){return null!==t&&"object"==typeof t&&wu in t}function Zh(){return Jh}function Jh(t){Tl.current&&(Tl.current.isUpdating=!1,Tl.current.blockUpdate(),t&&t())}const Qh=new Map,td=new Map,ed=(t,e)=>`${t}: ${hn.has(e)?"transform":e}`;function nd(t,e,n){const i=ed(t,e),o=Qh.get(i);if(!o)return null;const{animation:s,startTime:r}=o;function a(){window.MotionCancelOptimisedAnimation?.(t,e,n)}return s.onfinish=a,null===r||window.MotionHandoffIsComplete?.(t)?(a(),null):r}let id,od;const sd=new Set;function rd(){sd.forEach(t=>{t.animation.play(),t.animation.startTime=t.startTime}),sd.clear()}const ad=()=>({});class ld extends Js{constructor(){super(...arguments),this.measureInstanceViewportBox=js}build(){}resetTransform(){}restoreTransform(){}removeValueFromRenderState(){}renderInstance(){}scrapeMotionValuesFromProps(){return{}}getBaseTargetFromProps(){}readValueFromInstance(t,e,n){return n.initialState[e]||0}sortInstanceNodePosition(){return 0}}const ud=yu({scrapeMotionValuesFromProps:ad,createRenderState:ad});let cd=0;const hd=t=>t>.001?1/t:1e5;let dd=!1;t.AnimatePresence=({children:t,custom:n,initial:i=!0,onExitComplete:o,presenceAffectsLayout:s=!0,mode:r="sync",propagate:a=!1,anchorX:l="left",anchorY:u="top",root:c})=>{const[p,g]=Fl(a),v=e.useMemo(()=>Ul(t),[t]),x=a&&!p?[]:v.map(Wl),w=e.useRef(!0),T=e.useRef(v),S=f(()=>new Map),b=e.useRef(new Set),[P,E]=e.useState(v),[A,M]=e.useState(v);y(()=>{w.current=!1,T.current=v;for(let t=0;t<A.length;t++){const e=Wl(A[t]);x.includes(e)?(S.delete(e),b.current.delete(e)):!0!==S.get(e)&&S.set(e,!1)}},[A,x.length,x.join("-")]);const V=[];if(v!==P){let t=[...v];for(let e=0;e<A.length;e++){const n=A[e],i=Wl(n);x.includes(i)||(t.splice(e,0,n),V.push(n))}return"wait"===r&&V.length&&(t=V),M(Ul(t)),E(v),null}const{forceRender:C}=e.useContext(m);return d(h,{children:A.map(t=>{const e=Wl(t),h=!(a&&!p)&&(v===A||x.includes(e));return d(Il,{isPresent:h,initial:!(w.current&&!i)&&void 0,custom:n,presenceAffectsLayout:s,mode:r,root:c,onExitComplete:h?void 0:()=>{if(b.current.has(e))return;if(!S.has(e))return;b.current.add(e),S.set(e,!0);let t=!0;S.forEach(e=>{e||(t=!1)}),t&&(C?.(),M(T.current),a&&g?.(),o&&o())},anchorX:l,anchorY:u,children:t},e)})})},t.AnimateSharedLayout=({children:e})=>(i.useEffect(()=>{t.invariant(!1,"AnimateSharedLayout is deprecated: https://www.framer.com/docs/guide-upgrade/##shared-layout-animations")},[]),d(zl,{id:f(()=>"asl-"+cd++),children:e})),t.AsyncMotionValueAnimation=Xn,t.DOMKeyframesResolver=Qi,t.DOMVisualElement=Qs,t.DeprecatedLayoutGroupContext=Nl,t.DocumentProjectionNode=vl,t.DragControls=Kh,t.Feature=tr,t.FlatTree=Wa,t.GroupAnimation=Gn,t.GroupAnimationWithThen=_n,t.HTMLProjectionNode=Sl,t.HTMLVisualElement=Lr,t.JSAnimation=qe,t.KeyframeResolver=bn,t.LayoutAnimationBuilder=class{constructor(t,e,n){this.sharedTransitions=new Map,this.notifyReady=Pl,this.rejectReady=Pl,this.scope=t,this.updateDom=e,this.defaultOptions=n,this.readyPromise=new Promise((t,e)=>{this.notifyReady=t,this.rejectReady=e}),at.postRender(()=>{this.start().then(this.notifyReady).catch(this.rejectReady)})}shared(t,e){return this.sharedTransitions.set(t,e),this}then(t,e){return this.readyPromise.then(t,e)}async start(){const t=El(this.scope),e=this.buildRecords(t);e.forEach(({projection:t})=>{const e=Boolean(t.currentAnimation),n=Boolean(t.options.layoutId);if(e&&n){const e=function(t){const e=t.targetWithTransforms||t.target;if(!e)return;const n={x:{min:0,max:0},y:{min:0,max:0}},i={x:{min:0,max:0},y:{min:0,max:0}};return ea(n,e),ea(i,e),{animationId:t.root?.animationId??0,measuredBox:n,layoutBox:i,latestValues:t.animationValues||t.latestValues||{},source:t.id}}(t);e?t.snapshot=e:t.snapshot&&(t.snapshot=void 0)}else t.snapshot&&(t.currentAnimation||t.isProjecting())&&(t.snapshot=void 0);t.isPresent=!0,t.willUpdate()}),await this.updateDom();const n=El(this.scope),i=this.buildRecords(n);this.handleExitingElements(e,i),i.forEach(({projection:t})=>{const e=t.instance,n=t.resumeFrom?.instance;if(!e||!n)return;if(!("style"in e))return;const i=e.style.transform,o=n.style.transform;i&&o&&i===o&&(e.style.transform="",e.style.transformOrigin="")}),i.forEach(({projection:t})=>{t.isPresent=!0});const o=function(t,e){const n=t[0]||e[0];return n?.projection.root}(i,e);o?.didUpdate(),await new Promise(t=>{at.postRender(()=>t())});const s=function(t){const e=new Set;return t.forEach(t=>{const n=t.projection.currentAnimation;n&&e.add(n)}),Array.from(e)}(i);return new Gn(s)}buildRecords(t){const e=[],n=new Map;for(const i of t){const t=Vl(i,n,this.scope),{layout:o,layoutId:s}=Al(i),r=(s?this.sharedTransitions.get(s):void 0)||this.defaultOptions,a=Ml(i,t?.projection,{layout:o,layoutId:s,animationType:"string"==typeof o?o:"both",transition:r});n.set(i,a),e.push(a)}return e}handleExitingElements(t,e){const n=new Set(e.map(t=>t.element));t.forEach(t=>{n.has(t.element)||(t.projection.options.layoutId&&(t.projection.isPresent=!1,t.projection.relegate()),t.visualElement.unmount(),Is.delete(t.element))});const i=new Set(t.map(t=>t.element));e.forEach(({element:t,projection:e})=>{i.has(t)&&e.resumeFrom&&!e.resumeFrom.instance&&!e.isLead()&&(e.resumeFrom=void 0,e.snapshot=void 0)})}},t.LayoutGroup=zl,t.LayoutGroupContext=m,t.LazyMotion=function({children:t,features:n,strict:i=!1}){const[,o]=e.useState(!ql(n)),s=e.useRef(void 0);if(!ql(n)){const{renderer:t,...e}=n;s.current=t,_l(e)}return e.useEffect(()=>{ql(n)&&n().then(({renderer:t,...e})=>{_l(e),s.current=t,o(!0)})},[]),d(Hl.Provider,{value:{renderer:s.current,strict:i},children:t})},t.MotionConfig=function({children:t,isValidProp:n,...i}){n&&tu(n);const o=e.useContext(Rl);(i={...o,...i}).transition=ci(i.transition,o.transition),i.isStatic=f(()=>i.isStatic);const s=e.useMemo(()=>i,[JSON.stringify(i.transition),i.transformPagePoint,i.reducedMotion,i.skipAnimations]);return d(Rl.Provider,{value:s,children:t})},t.MotionConfigContext=Rl,t.MotionContext=ru,t.MotionGlobalConfig=P,t.MotionValue=xi,t.NativeAnimation=On,t.NativeAnimationExtended=Un,t.NativeAnimationWrapper=qn,t.NodeStack=$a,t.ObjectVisualElement=Br,t.PopChild=jl,t.PresenceChild=Il,t.PresenceContext=v,t.Reorder=Bc,t.SVGVisualElement=zr,t.SubscriptionManager=L,t.SwitchLayoutGroupContext=Su,t.ViewTransitionBuilder=Rs,t.VisualElement=Js,t.WillChangeMotionValue=Nh,t.acceleratedValues=io,t.activeAnimations=mt,t.addAttrValue=uo,t.addDomEvent=Oa,t.addPointerEvent=Lu,t.addPointerInfo=Du,t.addScaleCorrector=function(t){for(const e in t)kr[e]=t[e],gt(e)&&(kr[e].isCSSVariable=!0)},t.addStyleValue=go,t.addUniqueItem=x,t.addValueToWillChange=Mi,t.alpha=St,t.analyseComplexValue=Ht,t.animate=Qc,t.animateMini=eh,t.animateMotionValue=pi,t.animateSingleValue=Ia,t.animateTarget=Li,t.animateValue=function(t){return new qe(t)},t.animateVariant=Bi,t.animateView=function(t,e={}){return new Rs(t,e)},t.animateVisualElement=ji,t.animationControls=Hh,t.animationMapKey=Jn,t.animations=ku,t.anticipate=X,t.applyAxisDelta=hr,t.applyBoxDelta=dr,t.applyGeneratorOptions=In,t.applyPointDelta=cr,t.applyPxDefaults=eo,t.applyTreeDeltas=fr,t.aspectRatio=ba,t.attachFollow=us,t.attachSpring=function(t,e,n){return us(t,e,{type:"spring",...n})},t.attrEffect=co,t.axisDeltaEquals=Pa,t.axisEquals=xa,t.axisEqualsRounded=Ta,t.backIn=z,t.backInOut=H,t.backOut=Y,t.boxEquals=wa,t.boxEqualsRounded=Sa,t.buildHTMLStyles=Er,t.buildProjectionTransform=Aa,t.buildSVGAttrs=Wr,t.buildSVGPath=Or,t.buildTransform=Pr,t.calcAxisDelta=sa,t.calcBoxDelta=ra,t.calcChildStagger=ti,t.calcGeneratorDuration=me,t.calcLength=ia,t.calcRelativeAxis=aa,t.calcRelativeAxisPosition=ua,t.calcRelativeBox=la,t.calcRelativePosition=ca,t.camelCaseAttributes=Ur,t.camelToDash=Vi,t.cancelFrame=lt,t.cancelMicrotask=wo,t.cancelSync=kl,t.checkVariantsDidChange=Zr,t.circIn=G,t.circInOut=_,t.circOut=K,t.clamp=S,t.cleanDirtyNodes=Qa,t.collectMotionValues=vi,t.color=Ut,t.compareByDepth=Fa,t.complex=Kt,t.containsCSSVariable=wt,t.convertBoundingBoxToBox=er,t.convertBoxToBoundingBox=nr,t.convertOffsetToTimes=Ne,t.copyAxisDeltaInto=na,t.copyAxisInto=ta,t.copyBoxInto=ea,t.correctBorderRadius=Vr,t.correctBoxShadow=Cr,t.correctParentTransform=function(t){return e=>{const n=t.current;if(!n)return e;const i=function(t){const{transform:e}=getComputedStyle(t);if(!e||"none"===e)return null;const n=e.match(/^matrix3d\((.*)\)$/u)||e.match(/^matrix\((.*)\)$/u);if(!n)return null;const i=n[1].split(",").map(Number),o=e.startsWith("matrix3d"),s=i[0],r=i[1],a=o?i[4]:i[2],l=o?i[5]:i[3],u=s*l-r*a;return Math.abs(u)<1e-10?null:{a:l/u,b:-r/u,c:-a/u,d:s/u}}(n);if(!i)return e;const o=n.getBoundingClientRect(),s=o.left+window.scrollX+o.width/2,r=o.top+window.scrollY+o.height/2,a=e.x-s,l=e.y-r;return{x:s+i.a*a+i.c*l,y:r+i.b*a+i.d*l}}},t.createAnimationState=qr,t.createAxis=Bs,t.createAxisDelta=Ds,t.createBox=js,t.createDelta=Ls,t.createGeneratorEasing=fe,t.createProjectionNode=_a,t.createRenderBatcher=rt,t.createScopedAnimate=Jc,t.cubicBezier=U,t.cubicBezierAsString=Rn,t.defaultEasing=$e,t.defaultOffset=Ue,t.defaultTransformValue=rn,t.defaultValueTypes=Ki,t.degrees=Lt,t.delay=Ua,t.delayInSeconds=function(t,e){return Ua(t,B(e))},t.dimensionValueTypes=Oi,t.disableInstantTransitions=function(){P.instantAnimations=!1},t.distance=ju,t.distance2D=Iu,t.domAnimation=Rh,t.domMax=Dh,t.domMin=Lh,t.eachAxis=Ea,t.easeIn=q,t.easeInOut=J,t.easeOut=Z,t.easingDefinitionToFunction=it,t.fillOffset=We,t.fillWildcards=Ze,t.filterProps=eu,t.findDimensionValueType=Fi,t.findValueType=ms,t.flushKeyframeResolvers=Sn,t.followValue=ls,t.frame=at,t.frameData=ut,t.frameSteps=ct,t.generateLinearEasing=de,t.getAnimatableNone=Zi,t.getAnimationMap=Qn,t.getComputedStyle=Fo,t.getDefaultTransition=ai,t.getDefaultValueType=_i,t.getEasingForSegment=tt,t.getFeatureDefinitions=Zs,t.getFinalKeyframe=ui,t.getMixer=re,t.getOptimisedAppearId=Ri,t.getOriginIndex=rs,t.getValueAsType=ro,t.getValueTransition=hi,t.getVariableValue=ii,t.getVariantContext=Xr,t.getViewAnimationLayerInfo=Ts,t.getViewAnimations=bs,t.globalProjectionState=Ya,t.has2DTranslate=ar,t.hasReducedMotionListener=Hs,t.hasScale=sr,t.hasTransform=rr,t.hasWarned=function(t){return O.has(t)},t.hex=Rt,t.hover=Eo,t.hsla=Wt,t.hslaToRgba=qt,t.inView=Vh,t.inertia=Oe,t.initPrefersReducedMotion=Gs,t.interpolate=Fe,t.invisibleValues=ie,t.isAnimationControls=Os,t.isBezierDefinition=et,t.isBrowser=g,t.isCSSVariableName=gt,t.isCSSVariableToken=vt,t.isControllingVariants=Ns,t.isDeltaZero=va,t.isDragActive=So,t.isDragging=To,t.isEasingArray=Q,t.isElementKeyboardAccessible=Co,t.isElementTextInput=Ro,t.isForcedMotionValue=Rr,t.isGenerator=jn,t.isHTMLElement=po,t.isKeyframesTarget=Ti,t.isMotionComponent=qh,t.isMotionValue=Ei,t.isNear=oa,t.isNodeOrChild=Ao,t.isNumericalString=E,t.isObject=A,t.isPrimaryPointer=Mo,t.isSVGElement=Wo,t.isSVGSVGElement=ss,t.isSVGTag=Nr,t.isTransitionDefined=di,t.isValidMotionProp=Jl,t.isVariantLabel=Fs,t.isVariantNode=$s,t.isWaapiSupportedEasing=function t(e){return Boolean("function"==typeof e&&kn()||!e||"string"==typeof e&&(e in Dn||kn())||et(e)||Array.isArray(e)&&e.every(t))},t.isWillChangeMotionValue=Ai,t.isZeroValueString=M,t.keyframes=Ye,t.m=Ch,t.makeAnimationInstant=$n,t.makeUseVisualState=yu,t.mapEasingToNativeEasing=Ln,t.mapValue=function(t,e,n,i){const o=as(e,n,i);return ds(()=>o(t.get()))},t.maxGeneratorDuration=pe,t.measurePageBox=Tr,t.measureViewportBox=wr,t.memo=V,t.microtask=xo,t.millisecondsToSeconds=j,t.mirrorEasing=N,t.mix=ce,t.mixArray=ae,t.mixColor=ne,t.mixComplex=ue,t.mixImmediate=Zt,t.mixLinearColor=Qt,t.mixNumber=Jt,t.mixObject=le,t.mixValues=Ra,t.mixVisibility=oe,t.motion=fc,t.motionValue=wi,t.moveItem=T,t.nodeGroup=wl,t.noop=C,t.number=Tt,t.numberValueTypes=Gi,t.observeTimeline=Jo,t.optimizedAppearDataAttribute=ki,t.optimizedAppearDataId=Ci,t.parseAnimateLayoutArgs=function(t,e,n){return"function"==typeof t?{scope:document,updateDom:t,defaultOptions:e}:{scope:oo(t)[0]||document,updateDom:e,defaultOptions:n}},t.parseCSSVariable=ni,t.parseValueFromTransform=an,t.percent=Bt,t.pipe=R,t.pixelsToPercent=Mr,t.positionalKeys=yi,t.prefersReducedMotion=zs,t.press=Oo,t.progress=D,t.progressPercentage=Ft,t.propEffect=ho,t.propagateDirtyNodes=Ja,t.px=jt,t.readTransformValue=ln,t.recordStats=function(){if(st.value)throw is(),new Error("Stats are already being measured");const t=st;return t.value={frameloop:{setup:[],rate:[],read:[],resolveKeyframes:[],preUpdate:[],update:[],preRender:[],render:[],postRender:[]},animations:{mainThread:[],waapi:[],layout:[]},layoutProjection:{nodes:[],calculatedTargetDeltas:[],calculatedProjections:[]}},t.addProjectionMetrics=e=>{const{layoutProjection:n}=t.value;n.nodes.push(e.nodes),n.calculatedTargetDeltas.push(e.calculatedTargetDeltas),n.calculatedProjections.push(e.calculatedProjections)},at.postRender(Qo,!0),os},t.removeAxisDelta=da,t.removeAxisTransforms=pa,t.removeBoxTransforms=ga,t.removeItem=w,t.removePointDelta=ha,t.renderHTML=Ar,t.renderSVG=$r,t.resize=Zo,t.resolveElements=oo,t.resolveMotionValue=Na,t.resolveTransition=ci,t.resolveVariant=gi,t.resolveVariantFromProps=fi,t.reverseEasing=$,t.rgbUnit=Ct,t.rgba=kt,t.rootProjectionNode=Tl,t.scale=bt,t.scaleCorrectors=kr,t.scalePoint=ur,t.scrapeHTMLMotionValuesFromProps=Dr,t.scrapeSVGMotionValuesFromProps=Yr,t.scroll=Ah,t.scrollInfo=xh,t.secondsToMilliseconds=B,t.setDragLock=bo,t.setFeatureDefinitions=qs,t.setStyle=En,t.setTarget=Pi,t.spring=je,t.springValue=function(t,e){return ls(t,{type:"spring",...e})},t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:i}={}){return(o,s)=>{const r="number"==typeof n?n:rs(n,s),a=Math.abs(r-o);let l=t*a;if(i){const e=s*t;l=it(i)(l/e)*e}return e+l}},t.startOptimizedAppearAnimation=function(t,e,n,i,o){if(window.MotionIsMounted)return;const s=t.dataset[Ci];if(!s)return;window.MotionHandoffAnimation=nd;const r=ed(s,e);od||(od=Bn(t,e,[n[0],n[0]],{duration:1e4,ease:"linear"}),Qh.set(r,{animation:od,startTime:null}),window.MotionHandoffAnimation=nd,window.MotionHasOptimisedAnimation=(t,e)=>{if(!t)return!1;if(!e)return td.has(t);const n=ed(t,e);return Boolean(Qh.get(n))},window.MotionHandoffMarkAsComplete=t=>{td.has(t)&&td.set(t,!0)},window.MotionHandoffIsComplete=t=>!0===td.get(t),window.MotionCancelOptimisedAnimation=(t,e,n,i)=>{const o=ed(t,e),s=Qh.get(o);s&&(n&&void 0===i?n.postRender(()=>{n.postRender(()=>{s.animation.cancel()})}):s.animation.cancel(),n&&i?(sd.add(s),n.render(rd)):(Qh.delete(o),Qh.size||(window.MotionCancelOptimisedAnimation=void 0)))},window.MotionCheckAppearSync=(t,e,n)=>{const i=Ri(t);if(!i)return;const o=window.MotionHasOptimisedAnimation?.(i,e),s=t.props.values?.[e];if(!o||!s)return;const r=n.on("change",t=>{s.get()!==t&&(window.MotionCancelOptimisedAnimation?.(i,e),r())});return r});const a=()=>{od.cancel();const s=Bn(t,e,n,i);void 0===id&&(id=performance.now()),s.startTime=id,Qh.set(r,{animation:s,startTime:id}),o&&o(s)};td.set(s,!1),od.ready?od.ready.then(a).catch(C):a()},t.startWaapiAnimation=Bn,t.statsBuffer=st,t.steps=function(t,e="end"){return n=>{const i=(n="end"===e?Math.min(n,.999):Math.max(n,.001))*t,o="end"===e?Math.floor(i):Math.ceil(i);return S(0,1,o/t)}},t.styleEffect=yo,t.supportedWaapiEasing=Dn,t.supportsBrowserAnimation=Hn,t.supportsFlags=An,t.supportsLinearEasing=kn,t.supportsPartialKeyframes=no,t.supportsScrollTimeline=Vn,t.supportsViewTimeline=Cn,t.svgEffect=vo,t.sync=Cl,t.testValueType=Ii,t.time=pt,t.transform=as,t.transformAxis=yr,t.transformBox=xr,t.transformBoxPoints=ir,t.transformPropOrder=cn,t.transformProps=hn,t.transformValue=ds,t.transformValueTypes=Xi,t.transformViewBoxPoint=function(t){return e=>{const n=t.current;if(!n)return e;const i=n.viewBox?.baseVal;if(!i||0===i.width&&0===i.height)return e;const o=n.getBoundingClientRect();if(0===o.width||0===o.height)return e;const s=i.width/o.width,r=i.height/o.height,a=o.left+window.scrollX,l=o.top+window.scrollY;return{x:(e.x-a)*s+a,y:(e.y-l)*r+l}}},t.translateAxis=gr,t.unwrapMotionComponent=function(t){if(qh(t))return t[wu]},t.updateMotionValuesFromProps=Ys,t.useAnimate=function(){const t=f(()=>({current:null,animations:[]})),n=Yh()??void 0,i=e.useMemo(()=>Jc({scope:t,reduceMotion:n}),[t,n]);return kh(()=>{t.animations.forEach(t=>t.stop()),t.animations.length=0}),[t,i]},t.useAnimateMini=function(){const t=f(()=>({current:null,animations:[]})),e=f(()=>th(t));return kh(()=>{t.animations.forEach(t=>t.stop())}),[t,e]},t.useAnimation=Gh,t.useAnimationControls=Xh,t.useAnimationFrame=Uh,t.useComposedRefs=Ll,t.useCycle=function(...t){const n=e.useRef(0),[i,o]=e.useState(t[n.current]),s=e.useCallback(e=>{n.current="number"!=typeof e?F(0,t.length,n.current+1):e,o(t[n.current])},[t.length,...t]);return[i,s]},t.useDeprecatedAnimatedState=function(t){const[n,i]=e.useState(t),o=ud({},!1),s=f(()=>new ld({props:{onUpdate:t=>{i({...t})}},visualState:o,presenceContext:null},{initialState:t}));return e.useLayoutEffect(()=>(s.mount({}),()=>s.unmount()),[s]),[n,f(()=>t=>ji(s,t))]},t.useDeprecatedInvertedScale=function(n){let i=wc(1),o=wc(1);const{visualElement:s}=e.useContext(ru);return t.invariant(!(!n&&!s),"If no scale values are provided, useInvertedScale must be used within a child of another motion component."),t.warning(dd,"useInvertedScale is deprecated and will be removed in 3.0. Use the layout prop instead."),dd=!0,n?(i=n.scaleX||i,o=n.scaleY||o):s&&(i=s.getValue("scaleX",1),o=s.getValue("scaleY",1)),{scaleX:Sc(i,hd),scaleY:Sc(o,hd)}},t.useDomEvent=function(t,n,i,o){e.useEffect(()=>{const e=t.current;if(i&&e)return Oa(e,n,i,o)},[t,n,i,o])},t.useDragControls=function(){return f(_h)},t.useElementScroll=function(t){return Fh({container:t})},t.useFollowValue=Wh,t.useForceUpdate=$l,t.useInView=function(t,{root:n,margin:i,amount:o,once:s=!1,initial:r=!1}={}){const[a,l]=e.useState(r);return e.useEffect(()=>{if(!t.current||s&&a)return;const e={root:n&&n.current||void 0,margin:i,amount:o};return Vh(t.current,()=>(l(!0),s?void 0:()=>l(!1)),e)},[n,t,i,s,o]),a},t.useInstantLayoutTransition=Zh,t.useInstantTransition=function(){const[t,n]=$l(),i=Zh(),o=e.useRef(-1);return e.useEffect(()=>{at.postRender(()=>at.postRender(()=>{n===o.current&&(P.instantAnimations=!1)}))},[n]),e=>{i(()=>{P.instantAnimations=!0,t(),e(),o.current=n+1})}},t.useIsPresent=function(){return null===(t=e.useContext(v))||t.isPresent;var t},t.useIsomorphicLayoutEffect=y,t.useMotionTemplate=function(t,...e){const n=t.length;return Tc(e.filter(Ei),function(){let i="";for(let o=0;o<n;o++){i+=t[o];const n=e[o];n&&(i+=Ei(n)?n.get():n)}return i})},t.useMotionValue=wc,t.useMotionValueEvent=Bh,t.usePageInView=function(){const[t,n]=e.useState(!0);return e.useEffect(()=>{const t=()=>n(!document.hidden);return document.hidden&&t(),document.addEventListener("visibilitychange",t),()=>{document.removeEventListener("visibilitychange",t)}},[]),t},t.usePresence=Fl,t.usePresenceData=function(){const t=e.useContext(v);return t?t.custom:void 0},t.useReducedMotion=$h,t.useReducedMotionConfig=Yh,t.useResetProjection=function(){return e.useCallback(()=>{const t=Tl.current;t&&t.resetTree()},[])},t.useScroll=Fh,t.useSpring=function(t,e={}){return Wh(t,{type:"spring",...e})},t.useTime=function(){const t=wc(0);return Uh(e=>t.set(e)),t},t.useTransform=Sc,t.useUnmountEffect=kh,t.useVelocity=function(t){const e=wc(t.getVelocity()),n=()=>{const i=t.getVelocity();e.set(i),i&&at.update(n)};return Bh(t,"change",()=>{at.update(n,!1,!0)}),e},t.useViewportScroll=function(){return Fh()},t.useWillChange=function(){return f(()=>new Nh("auto"))},t.variantPriorityOrder=Ws,t.variantProps=Us,t.velocityPerSecond=I,t.vh=It,t.visualElementStore=Is,t.vw=Ot,t.warnOnce=function(t,e,n){t||O.has(e)||(console.warn(b(e,n)),O.add(e))},t.wrap=F});