"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[290],{7196:function(t,e,i){i.d(e,{oO:function(){return usePresence}});var n=i(2265),s=i(8243);function usePresence(t=!0){let e=(0,n.useContext)(s.O);if(null===e)return[!0,null];let{isPresent:i,onExitComplete:r,register:a}=e,o=(0,n.useId)();(0,n.useEffect)(()=>{if(t)return a(o)},[t]);let l=(0,n.useCallback)(()=>t&&r&&r(o),[o,r,t]);return!i&&r?[!1,l]:[!0]}},781:function(t,e,i){i.d(e,{p:function(){return s}});var n=i(2265);let s=(0,n.createContext)({})},5968:function(t,e,i){i.d(e,{_:function(){return s}});var n=i(2265);let s=(0,n.createContext)({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"})},8243:function(t,e,i){i.d(e,{O:function(){return s}});var n=i(2265);let s=(0,n.createContext)(null)},7290:function(t,e,i){function isAnimationControls(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function getValueState(t){let e=[{},{}];return t?.values.forEach((t,i)=>{e[0][i]=t.get(),e[1][i]=t.getVelocity()}),e}function resolveVariantFromProps(t,e,i,n){if("function"==typeof e){let[s,r]=getValueState(n);e=e(void 0!==i?i:t.custom,s,r)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){let[s,r]=getValueState(n);e=e(void 0!==i?i:t.custom,s,r)}return e}function resolveVariant(t,e,i){let n=t.getProps();return resolveVariantFromProps(n,e,void 0!==i?i:n.custom,t)}function getValueTransition(t,e){return t?.[e]??t?.default??t}i.d(e,{E:function(){return ej}});var n,s,r,a=i(4386);let o=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],l=new Set(o),u=new Set(["width","height","top","left","right","bottom",...o]);var h=i(4761);let isKeyframesTarget=t=>Array.isArray(t);var c=i(8573);let isMotionValue=t=>!!(t&&t.getVelocity);function addValueToWillChange(t,e){let i=t.getValue("willChange");if(isMotionValue(i)&&i.add)return i.add(e);if(!i&&c.c.WillChange){let i=new c.c.WillChange("auto");t.addValue("willChange",i),i.add(e)}}let camelToDash=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),d="data-"+camelToDash("framerAppearId"),combineFunctions=(t,e)=>i=>e(t(i)),pipe=(...t)=>t.reduce(combineFunctions),clamp=(t,e,i)=>i>e?e:i1e3*t,millisecondsToSeconds=t=>t/1e3;var m=i(8795);let p={layout:0,mainThread:0,waapi:0},warning=()=>{},invariant=()=>{},checkStringStartsWith=t=>e=>"string"==typeof e&&e.startsWith(t),f=checkStringStartsWith("--"),g=checkStringStartsWith("var(--"),isCSSVariableToken=t=>{let e=g(t);return!!e&&y.test(t.split("/*")[0].trim())},y=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,v={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},x={...v,transform:t=>clamp(0,1,t)},T={...v,default:1},sanitize=t=>Math.round(1e5*t)/1e5,P=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,b=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,isColorString=(t,e)=>i=>!!("string"==typeof i&&b.test(i)&&i.startsWith(t)||e&&null!=i&&Object.prototype.hasOwnProperty.call(i,e)),splitColor=(t,e,i)=>n=>{if("string"!=typeof n)return n;let[s,r,a,o]=n.match(P);return{[t]:parseFloat(s),[e]:parseFloat(r),[i]:parseFloat(a),alpha:void 0!==o?parseFloat(o):1}},clampRgbUnit=t=>clamp(0,255,t),S={...v,transform:t=>Math.round(clampRgbUnit(t))},A={test:isColorString("rgb","red"),parse:splitColor("red","green","blue"),transform:({red:t,green:e,blue:i,alpha:n=1})=>"rgba("+S.transform(t)+", "+S.transform(e)+", "+S.transform(i)+", "+sanitize(x.transform(n))+")"},V={test:isColorString("#"),parse:function(t){let e="",i="",n="",s="";return t.length>5?(e=t.substring(1,3),i=t.substring(3,5),n=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),i=t.substring(2,3),n=t.substring(3,4),s=t.substring(4,5),e+=e,i+=i,n+=n,s+=s),{red:parseInt(e,16),green:parseInt(i,16),blue:parseInt(n,16),alpha:s?parseInt(s,16)/255:1}},transform:A.transform},createUnitType=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),w=createUnitType("deg"),D=createUnitType("%"),M=createUnitType("px"),E=createUnitType("vh"),C=createUnitType("vw"),R={...D,parse:t=>D.parse(t)/100,transform:t=>D.transform(100*t)},k={test:isColorString("hsl","hue"),parse:splitColor("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:i,alpha:n=1})=>"hsla("+Math.round(t)+", "+D.transform(sanitize(e))+", "+D.transform(sanitize(i))+", "+sanitize(x.transform(n))+")"},B={test:t=>A.test(t)||V.test(t)||k.test(t),parse:t=>A.test(t)?A.parse(t):k.test(t)?k.parse(t):V.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?A.transform(t):k.transform(t)},L=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,F="number",j="color",O=/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 analyseComplexValue(t){let e=t.toString(),i=[],n={color:[],number:[],var:[]},s=[],r=0,a=e.replace(O,t=>(B.test(t)?(n.color.push(r),s.push(j),i.push(B.parse(t))):t.startsWith("var(")?(n.var.push(r),s.push("var"),i.push(t)):(n.number.push(r),s.push(F),i.push(parseFloat(t))),++r,"${}")),o=a.split("${}");return{values:i,split:o,indexes:n,types:s}}function parseComplexValue(t){return analyseComplexValue(t).values}function createTransformer(t){let{split:e,types:i}=analyseComplexValue(t),n=e.length;return t=>{let s="";for(let r=0;r"number"==typeof t?0:t,N={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(P)?.length||0)+(t.match(L)?.length||0)>0},parse:parseComplexValue,createTransformer,getAnimatableNone:function(t){let e=parseComplexValue(t),i=createTransformer(t);return i(e.map(convertNumbersToZero))}};function hueToRgb(t,e,i){return(i<0&&(i+=1),i>1&&(i-=1),i<1/6)?t+(e-t)*6*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}function mixImmediate(t,e){return i=>i>0?e:t}let mixNumber=(t,e,i)=>t+(e-t)*i,mixLinearColor=(t,e,i)=>{let n=t*t,s=i*(e*e-n)+n;return s<0?0:Math.sqrt(s)},I=[V,A,k],getColorType=t=>I.find(e=>e.test(t));function asRGBA(t){let e=getColorType(t);if(warning(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`),!e)return!1;let i=e.parse(t);return e===k&&(i=function({hue:t,saturation:e,lightness:i,alpha:n}){t/=360,i/=100;let s=0,r=0,a=0;if(e/=100){let n=i<.5?i*(1+e):i+e-i*e,o=2*i-n;s=hueToRgb(o,n,t+1/3),r=hueToRgb(o,n,t),a=hueToRgb(o,n,t-1/3)}else s=r=a=i;return{red:Math.round(255*s),green:Math.round(255*r),blue:Math.round(255*a),alpha:n}}(i)),i}let mixColor=(t,e)=>{let i=asRGBA(t),n=asRGBA(e);if(!i||!n)return mixImmediate(t,e);let s={...i};return t=>(s.red=mixLinearColor(i.red,n.red,t),s.green=mixLinearColor(i.green,n.green,t),s.blue=mixLinearColor(i.blue,n.blue,t),s.alpha=mixNumber(i.alpha,n.alpha,t),A.transform(s))},U=new Set(["none","hidden"]);function complex_mixNumber(t,e){return i=>mixNumber(t,e,i)}function getMixer(t){return"number"==typeof t?complex_mixNumber:"string"==typeof t?isCSSVariableToken(t)?mixImmediate:B.test(t)?mixColor:mixComplex:Array.isArray(t)?mixArray:"object"==typeof t?B.test(t)?mixColor:mixObject:mixImmediate}function mixArray(t,e){let i=[...t],n=i.length,s=t.map((t,i)=>getMixer(t)(t,e[i]));return t=>{for(let e=0;e{for(let e in n)i[e]=n[e](t);return i}}let mixComplex=(t,e)=>{let i=N.createTransformer(e),n=analyseComplexValue(t),s=analyseComplexValue(e),r=n.indexes.var.length===s.indexes.var.length&&n.indexes.color.length===s.indexes.color.length&&n.indexes.number.length>=s.indexes.number.length;return r?U.has(t)&&!s.values.length||U.has(e)&&!n.values.length?U.has(t)?i=>i<=0?t:e:i=>i>=1?e:t:pipe(mixArray(function(t,e){let i=[],n={color:0,var:0,number:0};for(let s=0;s{let passTimestamp=({timestamp:e})=>t(e);return{start:(t=!0)=>a.Wi.update(passTimestamp,t),stop:()=>(0,a.Pn)(passTimestamp),now:()=>a.frameData.isProcessing?a.frameData.timestamp:m.X.now()}},generateLinearEasing=(t,e,i=10)=>{let n="",s=Math.max(Math.round(e/i),2);for(let e=0;e=2e4?1/0:e}var W=i(6099);function calcGeneratorVelocity(t,e,i){let n=Math.max(e-5,0);return(0,W.R)(i-t(n),e-n)}let _={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function calcAngularFreq(t,e){return t*Math.sqrt(1-e*e)}let $=["duration","bounce"],z=["stiffness","damping","mass"];function isSpringType(t,e){return e.some(e=>void 0!==t[e])}function spring(t=_.visualDuration,e=_.bounce){let i;let n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t,{restSpeed:s,restDelta:r}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],l={done:!1,value:a},{stiffness:u,damping:h,mass:c,duration:d,velocity:m,isResolvedFromDuration:p}=function(t){let e={velocity:_.velocity,stiffness:_.stiffness,damping:_.damping,mass:_.mass,isResolvedFromDuration:!1,...t};if(!isSpringType(t,z)&&isSpringType(t,$)){if(t.visualDuration){let i=t.visualDuration,n=2*Math.PI/(1.2*i),s=n*n,r=2*clamp(.05,1,1-(t.bounce||0))*Math.sqrt(s);e={...e,mass:_.mass,stiffness:s,damping:r}}else{let i=function({duration:t=_.duration,bounce:e=_.bounce,velocity:i=_.velocity,mass:n=_.mass}){let s,r;warning(t<=time_conversion_secondsToMilliseconds(_.maxDuration),"Spring duration must be 10 seconds or less");let a=1-e;a=clamp(_.minDamping,_.maxDamping,a),t=clamp(_.minDuration,_.maxDuration,millisecondsToSeconds(t)),a<1?(s=e=>{let n=e*a,s=n*t,r=calcAngularFreq(e,a);return .001-(n-i)/r*Math.exp(-s)},r=e=>{let n=e*a,r=n*t,o=Math.pow(a,2)*Math.pow(e,2)*t,l=calcAngularFreq(Math.pow(e,2),a),u=-s(e)+.001>0?-1:1;return u*((r*i+i-o)*Math.exp(-r))/l}):(s=e=>{let n=Math.exp(-e*t),s=(e-i)*t+1;return -.001+n*s},r=e=>{let n=Math.exp(-e*t),s=(i-e)*(t*t);return n*s});let o=5/t,l=function(t,e,i){let n=i;for(let i=1;i<12;i++)n-=t(n)/e(n);return n}(s,r,o);if(t=time_conversion_secondsToMilliseconds(t),isNaN(l))return{stiffness:_.stiffness,damping:_.damping,duration:t};{let e=Math.pow(l,2)*n;return{stiffness:e,damping:2*a*Math.sqrt(n*e),duration:t}}}(t);(e={...e,...i,mass:_.mass}).isResolvedFromDuration=!0}}return e}({...n,velocity:-millisecondsToSeconds(n.velocity||0)}),f=m||0,g=h/(2*Math.sqrt(u*c)),y=o-a,v=millisecondsToSeconds(Math.sqrt(u/c)),x=5>Math.abs(y);if(s||(s=x?_.restSpeed.granular:_.restSpeed.default),r||(r=x?_.restDelta.granular:_.restDelta.default),g<1){let t=calcAngularFreq(v,g);i=e=>{let i=Math.exp(-g*v*e);return o-i*((f+g*v*y)/t*Math.sin(t*e)+y*Math.cos(t*e))}}else if(1===g)i=t=>o-Math.exp(-v*t)*(y+(f+v*y)*t);else{let t=v*Math.sqrt(g*g-1);i=e=>{let i=Math.exp(-g*v*e),n=Math.min(t*e,300);return o-i*((f+g*v*y)*Math.sinh(n)+t*y*Math.cosh(n))/t}}let T={calculatedDuration:p&&d||null,next:t=>{let e=i(t);if(p)l.done=t>=d;else{let n=0===t?f:0;g<1&&(n=0===t?time_conversion_secondsToMilliseconds(f):calcGeneratorVelocity(i,t,e));let a=Math.abs(n)<=s,u=Math.abs(o-e)<=r;l.done=a&&u}return l.value=l.done?o:e,l},toString:()=>{let t=Math.min(calcGeneratorDuration(T),2e4),e=generateLinearEasing(e=>T.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return T}function inertia({keyframes:t,velocity:e=0,power:i=.8,timeConstant:n=325,bounceDamping:s=10,bounceStiffness:r=500,modifyTarget:a,min:o,max:l,restDelta:u=.5,restSpeed:h}){let c,d;let m=t[0],p={done:!1,value:m},isOutOfBounds=t=>void 0!==o&&tl,nearestBoundary=t=>void 0===o?l:void 0===l?o:Math.abs(o-t)-f*Math.exp(-t/n),calcLatest=t=>y+calcDelta(t),applyFriction=t=>{let e=calcDelta(t),i=calcLatest(t);p.done=Math.abs(e)<=u,p.value=p.done?y:i},checkCatchBoundary=t=>{isOutOfBounds(p.value)&&(c=t,d=spring({keyframes:[p.value,nearestBoundary(p.value)],velocity:calcGeneratorVelocity(calcLatest,t,p.value),damping:s,stiffness:r,restDelta:u,restSpeed:h}))};return checkCatchBoundary(0),{calculatedDuration:null,next:t=>{let e=!1;return(d||void 0!==c||(e=!0,applyFriction(t),checkCatchBoundary(t)),void 0!==c&&t>=c)?d.next(t-c):(e||applyFriction(t),p)}}}spring.applyToOptions=t=>{let e=function(t,e=100,i){let n=i({...t,keyframes:[0,e]}),s=Math.min(calcGeneratorDuration(n),2e4);return{type:"keyframes",ease:t=>n.next(s*t).value/e,duration:millisecondsToSeconds(s)}}(t,100,spring);return t.ease=e.ease,t.duration=time_conversion_secondsToMilliseconds(e.duration),t.type="keyframes",t};var X=i(3236);let calcBezier=(t,e,i)=>(((1-3*i+3*e)*t+(3*i-6*e))*t+3*e)*t;function cubicBezier(t,e,i,n){if(t===e&&i===n)return X.Z;let getTForX=e=>(function(t,e,i,n,s){let r,a;let o=0;do(r=calcBezier(a=e+(i-e)/2,n,s)-t)>0?i=a:e=a;while(Math.abs(r)>1e-7&&++o<12);return a})(e,0,1,t,i);return t=>0===t||1===t?t:calcBezier(getTForX(t),e,n)}let H=cubicBezier(.42,0,1,1),K=cubicBezier(0,0,.58,1),G=cubicBezier(.42,0,.58,1),isEasingArray=t=>Array.isArray(t)&&"number"!=typeof t[0],mirrorEasing=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,reverseEasing=t=>e=>1-t(1-e),Z=cubicBezier(.33,1.53,.69,.99),q=reverseEasing(Z),Y=mirrorEasing(q),anticipate=t=>(t*=2)<1?.5*q(t):.5*(2-Math.pow(2,-10*(t-1))),circIn=t=>1-Math.sin(Math.acos(t)),J=reverseEasing(circIn),Q=mirrorEasing(circIn),isBezierDefinition=t=>Array.isArray(t)&&"number"==typeof t[0],tt={linear:X.Z,easeIn:H,easeInOut:G,easeOut:K,circIn:circIn,circInOut:Q,circOut:J,backIn:q,backInOut:Y,backOut:Z,anticipate:anticipate},isValidEasing=t=>"string"==typeof t,easingDefinitionToFunction=t=>{if(isBezierDefinition(t)){invariant(4===t.length,"Cubic bezier arrays must contain four numerical values.");let[e,i,n,s]=t;return cubicBezier(e,i,n,s)}return isValidEasing(t)?(invariant(void 0!==tt[t],`Invalid easing type '${t}'`),tt[t]):t},progress=(t,e,i)=>{let n=e-t;return 0===n?1:(i-t)/n};function keyframes({duration:t=300,keyframes:e,times:i,ease:n="easeInOut"}){let s=isEasingArray(n)?n.map(easingDefinitionToFunction):easingDefinitionToFunction(n),r={done:!1,value:e[0]},a=(i&&i.length===e.length?i:function(t){let e=[0];return function(t,e){let i=t[t.length-1];for(let n=1;n<=e;n++){let s=progress(0,e,n);t.push(mixNumber(i,1,s))}}(e,t.length-1),e}(e)).map(e=>e*t),o=function(t,e,{clamp:i=!0,ease:n,mixer:s}={}){let r=t.length;if(invariant(r===e.length,"Both input and output ranges must be the same length"),1===r)return()=>e[0];if(2===r&&e[0]===e[1])return()=>e[1];let a=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());let o=function(t,e,i){let n=[],s=i||c.c.mix||mix,r=t.length-1;for(let i=0;i{if(a&&i1)for(;ninterpolator(clamp(t[0],t[r-1],e)):interpolator}(a,e,{ease:Array.isArray(s)?s:e.map(()=>s||G).splice(0,e.length-1)});return{calculatedDuration:t,next:e=>(r.value=o(e),r.done=e>=t,r)}}let isNotNull=t=>null!==t;function getFinalKeyframe(t,{repeat:e,repeatType:i="loop"},n,s=1){let r=t.filter(isNotNull),a=s<0||e&&"loop"!==i&&e%2==1?0:r.length-1;return a&&void 0!==n?n:r[a]}let te={decay:inertia,inertia:inertia,tween:keyframes,keyframes:keyframes,spring:spring};function replaceTransitionType(t){"string"==typeof t.type&&(t.type=te[t.type])}let WithPromise=class WithPromise{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)}};let percentToProgress=t=>t/100;let JSAnimation=class JSAnimation extends WithPromise{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{let{motionValue:t}=this.options;t&&t.updatedAt!==m.X.now()&&this.tick(m.X.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},p.mainThread++,this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){let{options:t}=this;replaceTransitionType(t);let{type:e=keyframes,repeat:i=0,repeatDelay:n=0,repeatType:s,velocity:r=0}=t,{keyframes:a}=t,o=e||keyframes;o!==keyframes&&"number"!=typeof a[0]&&(this.mixKeyframes=pipe(percentToProgress,mix(a[0],a[1])),a=[0,100]);let l=o({...t,keyframes:a});"mirror"===s&&(this.mirroredGenerator=o({...t,keyframes:[...a].reverse(),velocity:-r})),null===l.calculatedDuration&&(l.calculatedDuration=calcGeneratorDuration(l));let{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+n,this.totalDuration=this.resolvedDuration*(i+1)-n,this.generator=l}updateTime(t){let e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){let{generator:i,totalDuration:n,mixKeyframes:s,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:o}=this;if(null===this.startTime)return i.next(0);let{delay:l=0,keyframes:u,repeat:h,repeatType:c,repeatDelay:d,type:m,onUpdate:p,finalKeyframe:f}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-n/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);let g=this.currentTime-l*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?g<0:g>n;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=n);let v=this.currentTime,x=i;if(h){let t=Math.min(this.currentTime,n)/a,e=Math.floor(t),i=t%1;!i&&t>=1&&(i=1),1===i&&e--,e=Math.min(e,h+1);let s=!!(e%2);s&&("reverse"===c?(i=1-i,d&&(i-=d/a)):"mirror"===c&&(x=r)),v=clamp(0,1,i)*a}let T=y?{done:!1,value:u[0]}:x.next(v);s&&(T.value=s(T.value));let{done:P}=T;y||null===o||(P=this.playbackSpeed>=0?this.currentTime>=n:this.currentTime<=0);let b=null===this.holdTime&&("finished"===this.state||"running"===this.state&&P);return b&&m!==inertia&&(T.value=getFinalKeyframe(u,this.options,f,this.speed)),p&&p(T.value),b&&this.finish(),T}then(t,e){return this.finished.then(t,e)}get duration(){return millisecondsToSeconds(this.calculatedDuration)}get time(){return millisecondsToSeconds(this.currentTime)}set time(t){t=time_conversion_secondsToMilliseconds(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?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(m.X.now());let e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=millisecondsToSeconds(this.currentTime))}play(){if(this.isStopped)return;let{driver:t=frameloopDriver,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();let i=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=i):null!==this.holdTime?this.startTime=i-this.holdTime:this.startTime||(this.startTime=e??i),"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(m.X.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,p.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)}};let radToDeg=t=>180*t/Math.PI,rotate=t=>{let e=radToDeg(Math.atan2(t[1],t[0]));return rebaseAngle(e)},ti={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate,rotateZ:rotate,skewX:t=>radToDeg(Math.atan(t[1])),skewY:t=>radToDeg(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},rebaseAngle=t=>((t%=360)<0&&(t+=360),t),scaleX=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),scaleY=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),tn={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX,scaleY,scale:t=>(scaleX(t)+scaleY(t))/2,rotateX:t=>rebaseAngle(radToDeg(Math.atan2(t[6],t[5]))),rotateY:t=>rebaseAngle(radToDeg(Math.atan2(-t[2],t[0]))),rotateZ:rotate,rotate:rotate,skewX:t=>radToDeg(Math.atan(t[4])),skewY:t=>radToDeg(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function defaultTransformValue(t){return t.includes("scale")?1:0}function parseValueFromTransform(t,e){let i,n;if(!t||"none"===t)return defaultTransformValue(e);let s=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);if(s)i=tn,n=s;else{let e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=ti,n=e}if(!n)return defaultTransformValue(e);let r=i[e],a=n[1].split(",").map(convertTransformToNumber);return"function"==typeof r?r(a):a[r]}let readTransformValue=(t,e)=>{let{transform:i="none"}=getComputedStyle(t);return parseValueFromTransform(i,e)};function convertTransformToNumber(t){return parseFloat(t.trim())}let isNumOrPxType=t=>t===v||t===M,ts=new Set(["x","y","z"]),tr=o.filter(t=>!ts.has(t)),ta={width:({x:t},{paddingLeft:e="0",paddingRight:i="0"})=>t.max-t.min-parseFloat(e)-parseFloat(i),height:({y:t},{paddingTop:e="0",paddingBottom:i="0"})=>t.max-t.min-parseFloat(e)-parseFloat(i),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})=>parseValueFromTransform(e,"x"),y:(t,{transform:e})=>parseValueFromTransform(e,"y")};ta.translateX=ta.x,ta.translateY=ta.y;let to=new Set,tl=!1,tu=!1,th=!1;function measureAllKeyframes(){if(tu){let t=Array.from(to).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),i=new Map;e.forEach(t=>{let e=function(t){let e=[];return tr.forEach(i=>{let n=t.getValue(i);void 0!==n&&(e.push([i,n.get()]),n.set(i.startsWith("scale")?1:0))}),e}(t);e.length&&(i.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();let e=i.get(t);e&&e.forEach(([e,i])=>{t.getValue(e)?.set(i)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}tu=!1,tl=!1,to.forEach(t=>t.complete(th)),to.clear()}function readAllKeyframes(){to.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(tu=!0)})}let KeyframeResolver=class KeyframeResolver{constructor(t,e,i,n,s,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=i,this.motionValue=n,this.element=s,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(to.add(this),tl||(tl=!0,a.Wi.read(readAllKeyframes),a.Wi.resolveKeyframes(measureAllKeyframes))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:t,name:e,element:i,motionValue:n}=this;if(null===t[0]){let s=n?.get(),r=t[t.length-1];if(void 0!==s)t[0]=s;else if(i&&e){let n=i.readValue(e,r);null!=n&&(t[0]=n)}void 0===t[0]&&(t[0]=r),n&&void 0===s&&n.set(t[0])}!function(t){for(let e=1;et.startsWith("--");function memo(t){let e;return()=>(void 0===e&&(e=t()),e)}let tc=memo(()=>void 0!==window.ScrollTimeline);var td=i(2648);let tm={},tp=function(t,e){let i=memo(t);return()=>tm[e]??i()}(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),cubicBezierAsString=([t,e,i,n])=>`cubic-bezier(${t}, ${e}, ${i}, ${n})`,tf={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:cubicBezierAsString([0,.65,.55,1]),circOut:cubicBezierAsString([.55,0,1,.45]),backIn:cubicBezierAsString([.31,.01,.66,-.59]),backOut:cubicBezierAsString([.33,1.53,.69,.99])};function isGenerator(t){return"function"==typeof t&&"applyToOptions"in t}let NativeAnimation=class NativeAnimation extends WithPromise{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;let{element:e,name:i,keyframes:n,pseudoElement:s,allowFlatten:r=!1,finalKeyframe:a,onComplete:o}=t;this.isPseudoElement=!!s,this.allowFlatten=r,this.options=t,invariant("string"!=typeof t.type,'animateMini doesn\'t support "type" as a string. Did you mean to import { spring } from "motion"?');let l=function({type:t,...e}){return isGenerator(t)&&tp()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(t);this.animation=function(t,e,i,{delay:n=0,duration:s=300,repeat:r=0,repeatType:a="loop",ease:o="easeOut",times:l}={},u){let h={[e]:i};l&&(h.offset=l);let c=function mapEasingToNativeEasing(t,e){if(t)return"function"==typeof t?tp()?generateLinearEasing(t,e):"ease-out":isBezierDefinition(t)?cubicBezierAsString(t):Array.isArray(t)?t.map(t=>mapEasingToNativeEasing(t,e)||tf.easeOut):tf[t]}(o,s);Array.isArray(c)&&(h.easing=c),td.f.value&&p.waapi++;let d={delay:n,duration:s,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:r+1,direction:"reverse"===a?"alternate":"normal"};u&&(d.pseudoElement=u);let m=t.animate(h,d);return td.f.value&&m.finished.finally(()=>{p.waapi--}),m}(e,i,n,l,s),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){let t=getFinalKeyframe(n,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(t):isCSSVar(i)?e.style.setProperty(i,t):e.style[i]=t,this.animation.cancel()}o?.(),this.notifyFinished()}}play(){this.isStopped||(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;let{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){let t=this.animation.effect?.getComputedTiming?.().duration||0;return millisecondsToSeconds(Number(t))}get time(){return millisecondsToSeconds(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=time_conversion_secondsToMilliseconds(t)}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 Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:e}){return(this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&tc())?(this.animation.timeline=t,X.Z):e(this)}};let tg={anticipate:anticipate,backInOut:Y,circInOut:Q};let NativeAnimationExtended=class NativeAnimationExtended extends NativeAnimation{constructor(t){"string"==typeof t.ease&&t.ease in tg&&(t.ease=tg[t.ease]),replaceTransitionType(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){let{motionValue:e,onUpdate:i,onComplete:n,element:s,...r}=this.options;if(!e)return;if(void 0!==t){e.set(t);return}let a=new JSAnimation({...r,autoplay:!1}),o=time_conversion_secondsToMilliseconds(this.finishedTime??this.time);e.setWithVelocity(a.sample(o-10).value,a.sample(o).value,10),a.stop()}};let isAnimatable=(t,e)=>"zIndex"!==e&&!!("number"==typeof t||Array.isArray(t)||"string"==typeof t&&(N.test(t)||"0"===t)&&!t.startsWith("url("));var ty=i(6119);let tv=new Set(["opacity","clipPath","filter","transform"]),tx=memo(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));let AsyncMotionValueAnimation=class AsyncMotionValueAnimation extends WithPromise{constructor({autoplay:t=!0,delay:e=0,type:i="keyframes",repeat:n=0,repeatDelay:s=0,repeatType:r="loop",keyframes:a,name:o,motionValue:l,element:u,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=m.X.now();let c={autoplay:t,delay:e,type:i,repeat:n,repeatDelay:s,repeatType:r,name:o,motionValue:l,element:u,...h},d=u?.KeyframeResolver||KeyframeResolver;this.keyframeResolver=new d(a,(t,e,i)=>this.onKeyframesResolved(t,e,c,!i),o,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,e,i,n){this.keyframeResolver=void 0;let{name:s,type:r,velocity:a,delay:o,isHandoff:l,onUpdate:u}=i;this.resolvedAt=m.X.now(),!function(t,e,i,n){let s=t[0];if(null===s)return!1;if("display"===e||"visibility"===e)return!0;let r=t[t.length-1],a=isAnimatable(s,e),o=isAnimatable(r,e);return warning(a===o,`You are trying to animate ${e} from "${s}" to "${r}". ${s} is not an animatable value - to enable this animation set ${s} to a value animatable to ${r} via the \`style\` property.`),!!a&&!!o&&(function(t){let e=t[0];if(1===t.length)return!0;for(let i=0;i40?this.resolvedAt:this.createdAt:void 0,d={startTime:h,finalKeyframe:e,...i,keyframes:t},p=!l&&function(t){let{motionValue:e,name:i,repeatDelay:n,repeatType:s,damping:r,type:a}=t;if(!(0,ty.R)(e?.owner?.current))return!1;let{onUpdate:o,transformTemplate:l}=e.owner.getProps();return tx()&&i&&tv.has(i)&&("transform"!==i||!l)&&!o&&!n&&"mirror"!==s&&0!==r&&"inertia"!==a}(d)?new NativeAnimationExtended({...d,element:d.motionValue.owner.current}):new JSAnimation(d);p.finished.then(()=>this.notifyFinished()).catch(X.Z),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}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(),th=!0,readAllKeyframes(),measureAllKeyframes(),th=!1),this._animation}get duration(){return this.animation.duration}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()}};let get_final_keyframe_isNotNull=t=>null!==t,tT={type:"spring",stiffness:500,damping:25,restSpeed:10},criticallyDampedSpring=t=>({type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restSpeed:10}),tP={type:"keyframes",duration:.8},tb={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},getDefaultTransition=(t,{keyframes:e})=>e.length>2?tP:l.has(t)?t.startsWith("scale")?criticallyDampedSpring(e[1]):tT:tb,animateMotionValue=(t,e,i,n={},s,r)=>o=>{let l=getValueTransition(n,t)||{},u=l.delay||n.delay||0,{elapsed:h=0}=n;h-=time_conversion_secondsToMilliseconds(u);let d={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:e.getVelocity(),...l,delay:-h,onUpdate:t=>{e.set(t),l.onUpdate&&l.onUpdate(t)},onComplete:()=>{o(),l.onComplete&&l.onComplete()},name:t,motionValue:e,element:r?void 0:s};!function({when:t,delay:e,delayChildren:i,staggerChildren:n,staggerDirection:s,repeat:r,repeatType:a,repeatDelay:o,from:l,elapsed:u,...h}){return!!Object.keys(h).length}(l)&&Object.assign(d,getDefaultTransition(t,d)),d.duration&&(d.duration=time_conversion_secondsToMilliseconds(d.duration)),d.repeatDelay&&(d.repeatDelay=time_conversion_secondsToMilliseconds(d.repeatDelay)),void 0!==d.from&&(d.keyframes[0]=d.from);let m=!1;if(!1!==d.type&&(0!==d.duration||d.repeatDelay)||(d.duration=0,0!==d.delay||(m=!0)),(c.c.instantAnimations||c.c.skipAnimations)&&(m=!0,d.duration=0,d.delay=0),d.allowFlatten=!l.type&&!l.ease,m&&!r&&void 0!==e.get()){let t=function(t,{repeat:e,repeatType:i="loop"},n){let s=t.filter(get_final_keyframe_isNotNull),r=e&&"loop"!==i&&e%2==1?0:s.length-1;return r&&void 0!==n?n:s[r]}(d.keyframes,l);if(void 0!==t){a.Wi.update(()=>{d.onUpdate(t),d.onComplete()});return}}return l.isSync?new JSAnimation(d):new AsyncMotionValueAnimation(d)};function animateTarget(t,e,{delay:i=0,transitionOverride:n,type:s}={}){let{transition:r=t.getDefaultTransition(),transitionEnd:o,...l}=e;n&&(r=n);let c=[],m=s&&t.animationState&&t.animationState.getState()[s];for(let e in l){let n=t.getValue(e,t.latestValues[e]??null),s=l[e];if(void 0===s||m&&function({protectedKeys:t,needsAnimating:e},i){let n=t.hasOwnProperty(i)&&!0!==e[i];return e[i]=!1,n}(m,e))continue;let o={delay:i,...getValueTransition(r||{},e)},h=n.get();if(void 0!==h&&!n.isAnimating&&!Array.isArray(s)&&s===h&&!o.velocity)continue;let p=!1;if(window.MotionHandoffAnimation){let i=t.props[d];if(i){let t=window.MotionHandoffAnimation(i,e,a.Wi);null!==t&&(o.startTime=t,p=!0)}}addValueToWillChange(t,e),n.start(animateMotionValue(e,n,s,t.shouldReduceMotion&&u.has(e)?{type:!1}:o,t,p));let f=n.animation;f&&c.push(f)}return o&&Promise.all(c).then(()=>{a.Wi.update(()=>{o&&function(t,e){let i=resolveVariant(t,e),{transitionEnd:n={},transition:s={},...r}=i||{};for(let e in r={...r,...n}){var a;let i=isKeyframesTarget(a=r[e])?a[a.length-1]||0:a;t.hasValue(e)?t.getValue(e).set(i):t.addValue(e,(0,h.BX)(i))}}(t,o)})}),c}function animateVariant(t,e,i={}){let n=resolveVariant(t,e,"exit"===i.type?t.presenceContext?.custom:void 0),{transition:s=t.getDefaultTransition()||{}}=n||{};i.transitionOverride&&(s=i.transitionOverride);let r=n?()=>Promise.all(animateTarget(t,n,i)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(n=0)=>{let{delayChildren:r=0,staggerChildren:a,staggerDirection:o}=s;return function(t,e,i=0,n=0,s=1,r){let a=[],o=(t.variantChildren.size-1)*n,l=1===s?(t=0)=>t*n:(t=0)=>o-t*n;return Array.from(t.variantChildren).sort(sortByTreeOrder).forEach((t,n)=>{t.notify("AnimationStart",e),a.push(animateVariant(t,e,{...r,delay:i+l(n)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(a)}(t,e,r+n,a,o,i)}:()=>Promise.resolve(),{when:o}=s;if(!o)return Promise.all([r(),a(i.delay)]);{let[t,e]="beforeChildren"===o?[r,a]:[a,r];return t().then(()=>e())}}function sortByTreeOrder(t,e){return t.sortNodePosition(e)}function shallowCompare(t,e){if(!Array.isArray(e))return!1;let i=e.length;if(i!==t.length)return!1;for(let n=0;nt.removeEventListener(e,i)}let isPrimaryPointer=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function extractEventInfo(t){return{point:{x:t.pageX,y:t.pageY}}}let addPointerInfo=t=>e=>isPrimaryPointer(e)&&t(e,extractEventInfo(e));function addPointerEvent(t,e,i,n){return addDomEvent(t,e,addPointerInfo(i),n)}function convertBoundingBoxToBox({top:t,left:e,right:i,bottom:n}){return{x:{min:e,max:i},y:{min:t,max:n}}}function calcLength(t){return t.max-t.min}function calcAxisDelta(t,e,i,n=.5){t.origin=n,t.originPoint=mixNumber(e.min,e.max,t.origin),t.scale=calcLength(i)/calcLength(e),t.translate=mixNumber(i.min,i.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 calcBoxDelta(t,e,i,n){calcAxisDelta(t.x,e.x,i.x,n?n.originX:void 0),calcAxisDelta(t.y,e.y,i.y,n?n.originY:void 0)}function calcRelativeAxis(t,e,i){t.min=i.min+e.min,t.max=t.min+calcLength(e)}function calcRelativeAxisPosition(t,e,i){t.min=e.min-i.min,t.max=t.min+calcLength(e)}function calcRelativePosition(t,e,i){calcRelativeAxisPosition(t.x,e.x,i.x),calcRelativeAxisPosition(t.y,e.y,i.y)}let createAxisDelta=()=>({translate:0,scale:1,origin:0,originPoint:0}),createDelta=()=>({x:createAxisDelta(),y:createAxisDelta()}),createAxis=()=>({min:0,max:0}),createBox=()=>({x:createAxis(),y:createAxis()});function eachAxis(t){return[t("x"),t("y")]}function isIdentityScale(t){return void 0===t||1===t}function hasScale({scale:t,scaleX:e,scaleY:i}){return!isIdentityScale(t)||!isIdentityScale(e)||!isIdentityScale(i)}function hasTransform(t){return hasScale(t)||has2DTranslate(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function has2DTranslate(t){var e,i;return(e=t.x)&&"0%"!==e||(i=t.y)&&"0%"!==i}function applyPointDelta(t,e,i,n,s){return void 0!==s&&(t=n+s*(t-n)),n+i*(t-n)+e}function applyAxisDelta(t,e=0,i=1,n,s){t.min=applyPointDelta(t.min,e,i,n,s),t.max=applyPointDelta(t.max,e,i,n,s)}function applyBoxDelta(t,{x:e,y:i}){applyAxisDelta(t.x,e.translate,e.scale,e.originPoint),applyAxisDelta(t.y,i.translate,i.scale,i.originPoint)}function translateAxis(t,e){t.min=t.min+e,t.max=t.max+e}function transformAxis(t,e,i,n,s=.5){let r=mixNumber(t.min,t.max,s);applyAxisDelta(t,e,i,r,n)}function transformBox(t,e){transformAxis(t.x,e.x,e.scaleX,e.scale,e.originX),transformAxis(t.y,e.y,e.scaleY,e.scale,e.originY)}function measureViewportBox(t,e){return convertBoundingBoxToBox(function(t,e){if(!e)return t;let i=e({x:t.left,y:t.top}),n=e({x:t.right,y:t.bottom});return{top:i.y,left:i.x,bottom:n.y,right:n.x}}(t.getBoundingClientRect(),e))}let getContextWindow=({current:t})=>t?t.ownerDocument.defaultView:null;function isRefObject(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}let distance=(t,e)=>Math.abs(t-e);let PanSession=class PanSession{constructor(t,e,{transformPagePoint:i,contextWindow:n,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let t=getPanInfo(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,i=function(t,e){let i=distance(t.x,e.x),n=distance(t.y,e.y);return Math.sqrt(i**2+n**2)}(t.offset,{x:0,y:0})>=3;if(!e&&!i)return;let{point:n}=t,{timestamp:s}=a.frameData;this.history.push({...n,timestamp:s});let{onStart:r,onMove:o}=this.handlers;e||(r&&r(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=transformPoint(e,this.transformPagePoint),a.Wi.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();let{onEnd:i,onSessionEnd:n,resumeAnimation:s}=this.handlers;if(this.dragSnapToOrigin&&s&&s(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let r=getPanInfo("pointercancel"===t.type?this.lastMoveEventInfo:transformPoint(e,this.transformPagePoint),this.history);this.startEvent&&i&&i(t,r),n&&n(t,r)},!isPrimaryPointer(t))return;this.dragSnapToOrigin=s,this.handlers=e,this.transformPagePoint=i,this.contextWindow=n||window;let r=extractEventInfo(t),o=transformPoint(r,this.transformPagePoint),{point:l}=o,{timestamp:u}=a.frameData;this.history=[{...l,timestamp:u}];let{onSessionStart:h}=e;h&&h(t,getPanInfo(o,this.history)),this.removeListeners=pipe(addPointerEvent(this.contextWindow,"pointermove",this.handlePointerMove),addPointerEvent(this.contextWindow,"pointerup",this.handlePointerUp),addPointerEvent(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),(0,a.Pn)(this.updatePoint)}};function transformPoint(t,e){return e?{point:e(t.point)}:t}function subtractPoint(t,e){return{x:t.x-e.x,y:t.y-e.y}}function getPanInfo({point:t},e){return{point:t,delta:subtractPoint(t,lastDevicePoint(e)),offset:subtractPoint(t,e[0]),velocity:function(t,e){if(t.length<2)return{x:0,y:0};let i=t.length-1,n=null,s=lastDevicePoint(t);for(;i>=0&&(n=t[i],!(s.timestamp-n.timestamp>time_conversion_secondsToMilliseconds(.1)));)i--;if(!n)return{x:0,y:0};let r=millisecondsToSeconds(s.timestamp-n.timestamp);if(0===r)return{x:0,y:0};let a={x:(s.x-n.x)/r,y:(s.y-n.y)/r};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}(e,0)}}function lastDevicePoint(t){return t[t.length-1]}function calcRelativeAxisConstraints(t,e,i){return{min:void 0!==e?t.min+e:void 0,max:void 0!==i?t.max+i-(t.max-t.min):void 0}}function calcViewportAxisConstraints(t,e){let i=e.min-t.min,n=e.max-t.max;return e.max-e.min{let{dragSnapToOrigin:i}=this.getProps();i?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(extractEventInfo(t).point)},onStart:(t,e)=>{let{drag:i,dragPropagation:n,onDragStart:s}=this.getProps();if(i&&!n&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===i||"y"===i?tE[i]?null:(tE[i]=!0,()=>{tE[i]=!1}):tE.x||tE.y?null:(tE.x=tE.y=!0,()=>{tE.x=tE.y=!1}),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),eachAxis(t=>{let e=this.getAxisMotionValue(t).get()||0;if(D.test(e)){let{projection:i}=this.visualElement;if(i&&i.layout){let n=i.layout.layoutBox[t];if(n){let t=calcLength(n);e=t*(parseFloat(e)/100)}}}this.originPoint[t]=e}),s&&a.Wi.postRender(()=>s(t,e)),addValueToWillChange(this.visualElement,"transform");let{animationState:r}=this.visualElement;r&&r.setActive("whileDrag",!0)},onMove:(t,e)=>{let{dragPropagation:i,dragDirectionLock:n,onDirectionLock:s,onDrag:r}=this.getProps();if(!i&&!this.openDragLock)return;let{offset:a}=e;if(n&&null===this.currentDirection){this.currentDirection=function(t,e=10){let i=null;return Math.abs(t.y)>e?i="y":Math.abs(t.x)>e&&(i="x"),i}(a),null!==this.currentDirection&&s&&s(this.currentDirection);return}this.updateAxis("x",e.point,a),this.updateAxis("y",e.point,a),this.visualElement.render(),r&&r(t,e)},onSessionEnd:(t,e)=>this.stop(t,e),resumeAnimation:()=>eachAxis(t=>"paused"===this.getAnimationState(t)&&this.getAxisMotionValue(t).animation?.play())},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:n,contextWindow:getContextWindow(this.visualElement)})}stop(t,e){let i=this.isDragging;if(this.cancel(),!i)return;let{velocity:n}=e;this.startAnimation(n);let{onDragEnd:s}=this.getProps();s&&a.Wi.postRender(()=>s(t,e))}cancel(){this.isDragging=!1;let{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,i){let{drag:n}=this.getProps();if(!i||!shouldDrag(t,n,this.currentDirection))return;let s=this.getAxisMotionValue(t),r=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(r=function(t,{min:e,max:i},n){return void 0!==e&&ti&&(t=n?mixNumber(i,t,n.max):Math.min(t,i)),t}(r,this.constraints[t],this.elastic[t])),s.set(r)}resolveConstraints(){let{dragConstraints:t,dragElastic:e}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,n=this.constraints;t&&isRefObject(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=function(t,{top:e,left:i,bottom:n,right:s}){return{x:calcRelativeAxisConstraints(t.x,i,s),y:calcRelativeAxisConstraints(t.y,e,n)}}(i.layoutBox,t):this.constraints=!1,this.elastic=function(t=.35){return!1===t?t=0:!0===t&&(t=.35),{x:resolveAxisElastic(t,"left","right"),y:resolveAxisElastic(t,"top","bottom")}}(e),n!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&eachAxis(t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){let i={};return void 0!==e.min&&(i.min=e.min-t.min),void 0!==e.max&&(i.max=e.max-t.min),i}(i.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){var t;let{dragConstraints:e,onMeasureDragConstraints:i}=this.getProps();if(!e||!isRefObject(e))return!1;let n=e.current;invariant(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");let{projection:s}=this.visualElement;if(!s||!s.layout)return!1;let r=function(t,e,i){let n=measureViewportBox(t,i),{scroll:s}=e;return s&&(translateAxis(n.x,s.offset.x),translateAxis(n.y,s.offset.y)),n}(n,s.root,this.visualElement.getTransformPagePoint()),a={x:calcViewportAxisConstraints((t=s.layout.layoutBox).x,r.x),y:calcViewportAxisConstraints(t.y,r.y)};if(i){let t=i(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(a));this.hasMutatedConstraints=!!t,t&&(a=convertBoundingBoxToBox(t))}return a}startAnimation(t){let{drag:e,dragMomentum:i,dragElastic:n,dragTransition:s,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),o=this.constraints||{},l=eachAxis(a=>{if(!shouldDrag(a,e,this.currentDirection))return;let l=o&&o[a]||{};r&&(l={min:0,max:0});let u={type:"inertia",velocity:i?t[a]:0,bounceStiffness:n?200:1e6,bounceDamping:n?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...s,...l};return this.startAxisValueAnimation(a,u)});return Promise.all(l).then(a)}startAxisValueAnimation(t,e){let i=this.getAxisMotionValue(t);return addValueToWillChange(this.visualElement,t),i.start(animateMotionValue(t,i,0,e,this.visualElement,!1))}stopAnimation(){eachAxis(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){eachAxis(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){let e=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps(),n=i[e];return n||this.visualElement.getValue(t,(i.initial?i.initial[t]:void 0)||0)}snapToCursor(t){eachAxis(e=>{let{drag:i}=this.getProps();if(!shouldDrag(e,i,this.currentDirection))return;let{projection:n}=this.visualElement,s=this.getAxisMotionValue(e);if(n&&n.layout){let{min:i,max:r}=n.layout.layoutBox[e];s.set(t[e]-mixNumber(i,r,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:t,dragConstraints:e}=this.getProps(),{projection:i}=this.visualElement;if(!isRefObject(e)||!i||!this.constraints)return;this.stopAnimation();let n={x:0,y:0};eachAxis(t=>{let e=this.getAxisMotionValue(t);if(e&&!1!==this.constraints){let i=e.get();n[t]=function(t,e){let i=.5,n=calcLength(t),s=calcLength(e);return s>n?i=progress(e.min,e.max-n,t.min):n>s&&(i=progress(t.min,t.max-s,e.min)),clamp(0,1,i)}({min:i,max:i},this.constraints[t])}});let{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),eachAxis(e=>{if(!shouldDrag(e,t,null))return;let i=this.getAxisMotionValue(e),{min:s,max:r}=this.constraints[e];i.set(mixNumber(s,r,n[e]))})}addListeners(){if(!this.visualElement.current)return;tC.set(this.visualElement,this);let t=this.visualElement.current,e=addPointerEvent(t,"pointerdown",t=>{let{drag:e,dragListener:i=!0}=this.getProps();e&&i&&this.start(t)}),measureDragConstraints=()=>{let{dragConstraints:t}=this.getProps();isRefObject(t)&&t.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,n=i.addEventListener("measure",measureDragConstraints);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),a.Wi.read(measureDragConstraints);let s=addDomEvent(window,"resize",()=>this.scalePositionWithinConstraints()),r=i.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(eachAxis(e=>{let i=this.getAxisMotionValue(e);i&&(this.originPoint[e]+=t[e].translate,i.set(i.get()+t[e].translate))}),this.visualElement.render())});return()=>{s(),e(),n(),r&&r()}}getProps(){let t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:i=!1,dragPropagation:n=!1,dragConstraints:s=!1,dragElastic:r=.35,dragMomentum:a=!0}=t;return{...t,drag:e,dragDirectionLock:i,dragPropagation:n,dragConstraints:s,dragElastic:r,dragMomentum:a}}};function shouldDrag(t,e,i){return(!0===e||e===t)&&(null===i||i===t)}let asyncHandler=t=>(e,i)=>{t&&a.Wi.postRender(()=>t(e,i))};var tR=i(7437),tk=i(5794);let{schedule:tB,cancel:tL}=(0,tk.Z)(queueMicrotask,!1);var tF=i(2265),tj=i(7196),tO=i(781);let tN=(0,tF.createContext)({}),tI={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function pixelsToPercent(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}let tU={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!M.test(t))return t;t=parseFloat(t)}let i=pixelsToPercent(t,e.target.x),n=pixelsToPercent(t,e.target.y);return`${i}% ${n}%`}},tW={};let MeasureLayoutWithContext=class MeasureLayoutWithContext extends tF.Component{componentDidMount(){let{visualElement:t,layoutGroup:e,switchLayoutGroup:i,layoutId:n}=this.props,{projection:s}=t;!function(t){for(let e in t)tW[e]=t[e],f(e)&&(tW[e].isCSSVariable=!0)}(t_),s&&(e.group&&e.group.add(s),i&&i.register&&n&&i.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),tI.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){let{layoutDependency:e,visualElement:i,drag:n,isPresent:s}=this.props,{projection:r}=i;return r&&(r.isPresent=s,n||t.layoutDependency!==e||void 0===e||t.isPresent!==s?r.willUpdate():this.safeToRemove(),t.isPresent===s||(s?r.promote():r.relegate()||a.Wi.postRender(()=>{let t=r.getStack();t&&t.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),tB.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:t,layoutGroup:e,switchLayoutGroup:i}=this.props,{projection:n}=t;n&&(n.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(n),i&&i.deregister&&i.deregister(n))}safeToRemove(){let{safeToRemove:t}=this.props;t&&t()}render(){return null}};function MeasureLayout(t){let[e,i]=(0,tj.oO)(),n=(0,tF.useContext)(tO.p);return(0,tR.jsx)(MeasureLayoutWithContext,{...t,layoutGroup:n,switchLayoutGroup:(0,tF.useContext)(tN),isPresent:e,safeToRemove:i})}let t_={borderRadius:{...tU,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:tU,borderTopRightRadius:tU,borderBottomLeftRadius:tU,borderBottomRightRadius:tU,boxShadow:{correct:(t,{treeScale:e,projectionDelta:i})=>{let n=N.parse(t);if(n.length>5)return t;let s=N.createTransformer(t),r="number"!=typeof n[0]?1:0,a=i.x.scale*e.x,o=i.y.scale*e.y;n[0+r]/=a,n[1+r]/=o;let l=mixNumber(a,o,.5);return"number"==typeof n[2+r]&&(n[2+r]/=l),"number"==typeof n[3+r]&&(n[3+r]/=l),s(n)}}};var t$=i(1643);function isSVGElement(t){return(0,t$.K)(t)&&"ownerSVGElement"in t}var tz=i(1960),tX=i(3326);let compareByDepth=(t,e)=>t.depth-e.depth;let FlatTree=class FlatTree{constructor(){this.children=[],this.isDirty=!1}add(t){(0,tX.y4)(this.children,t),this.isDirty=!0}remove(t){(0,tX.cl)(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(compareByDepth),this.isDirty=!1,this.children.forEach(t)}};function resolveMotionValue(t){return isMotionValue(t)?t.get():t}let tH=["TopLeft","TopRight","BottomLeft","BottomRight"],tK=tH.length,asNumber=t=>"string"==typeof t?parseFloat(t):t,isPx=t=>"number"==typeof t||M.test(t);function getRadius(t,e){return void 0!==t[e]?t[e]:t.borderRadius}let tG=compress(0,.5,J),tZ=compress(.5,.95,X.Z);function compress(t,e,i){return n=>ne?1:i(progress(t,e,n))}function copyAxisInto(t,e){t.min=e.min,t.max=e.max}function copyBoxInto(t,e){copyAxisInto(t.x,e.x),copyAxisInto(t.y,e.y)}function copyAxisDeltaInto(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function removePointDelta(t,e,i,n,s){return t-=e,t=n+1/i*(t-n),void 0!==s&&(t=n+1/s*(t-n)),t}function removeAxisTransforms(t,e,[i,n,s],r,a){!function(t,e=0,i=1,n=.5,s,r=t,a=t){if(D.test(e)){e=parseFloat(e);let t=mixNumber(a.min,a.max,e/100);e=t-a.min}if("number"!=typeof e)return;let o=mixNumber(r.min,r.max,n);t===r&&(o-=e),t.min=removePointDelta(t.min,e,i,o,s),t.max=removePointDelta(t.max,e,i,o,s)}(t,e[i],e[n],e[s],e.scale,r,a)}let tq=["x","scaleX","originX"],tY=["y","scaleY","originY"];function removeBoxTransforms(t,e,i,n){removeAxisTransforms(t.x,e,tq,i?i.x:void 0,n?n.x:void 0),removeAxisTransforms(t.y,e,tY,i?i.y:void 0,n?n.y:void 0)}function isAxisDeltaZero(t){return 0===t.translate&&1===t.scale}function isDeltaZero(t){return isAxisDeltaZero(t.x)&&isAxisDeltaZero(t.y)}function axisEquals(t,e){return t.min===e.min&&t.max===e.max}function axisEqualsRounded(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function boxEqualsRounded(t,e){return axisEqualsRounded(t.x,e.x)&&axisEqualsRounded(t.y,e.y)}function aspectRatio(t){return calcLength(t.x)/calcLength(t.y)}function axisDeltaEquals(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}let NodeStack=class NodeStack{constructor(){this.members=[]}add(t){(0,tX.y4)(this.members,t),t.scheduleRender()}remove(t){if((0,tX.cl)(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){let t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){let e;let i=this.members.findIndex(e=>t===e);if(0===i)return!1;for(let t=i;t>=0;t--){let i=this.members[t];if(!1!==i.isPresent){e=i;break}}return!!e&&(this.promote(e),!0)}promote(t,e){let i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,e&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);let{crossfade:n}=t.options;!1===n&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{let{options:e,resumingFrom:i}=t;e.onExitComplete&&e.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}};let tJ={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},tQ=["","X","Y","Z"],t0={visibility:"hidden"},t1=0;function resetDistortingTransform(t,e,i,n){let{latestValues:s}=e;s[t]&&(i[t]=s[t],e.setStaticValue(t,0),n&&(n[t]=0))}function createProjectionNode({attachResizeListener:t,defaultParent:e,measureScroll:i,checkIsScrollRoot:n,resetTransform:s}){return class{constructor(t={},i=e?.()){this.id=t1++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,td.f.value&&(tJ.nodes=tJ.calculatedTargetDeltas=tJ.calculatedProjections=0),this.nodes.forEach(propagateDirtyNodes),this.nodes.forEach(resolveTargetDelta),this.nodes.forEach(calcProjection),this.nodes.forEach(cleanDirtyNodes),td.f.addProjectionMetrics&&td.f.addProjectionMetrics(tJ)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=i?i.root||i:this,this.path=i?[...i.path,i]:[],this.parent=i,this.depth=i?i.depth+1:0;for(let t=0;tthis.root.updateBlockedByResize=!1;t(e,()=>{this.root.updateBlockedByResize=!0,i&&i(),i=function(t,e){let i=m.X.now(),checkElapsed=({timestamp:n})=>{let s=n-i;s>=e&&((0,a.Pn)(checkElapsed),t(s-e))};return a.Wi.setup(checkElapsed,!0),()=>(0,a.Pn)(checkElapsed)}(resizeUnblockUpdate,250),tI.hasAnimatedSinceResize&&(tI.hasAnimatedSinceResize=!1,this.nodes.forEach(finishAnimation))})}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&s&&(i||n)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:i,layout:n})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let r=this.options.transition||s.getDefaultTransition()||t2,{onLayoutAnimationStart:a,onLayoutAnimationComplete:o}=s.getProps(),l=!this.targetLayout||!boxEqualsRounded(this.targetLayout,n),u=!e&&i;if(this.options.layoutRoot||this.resumeFrom||u||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let e={...getValueTransition(r,"layout"),onPlay:a,onComplete:o};(s.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,u)}else e||finishAnimation(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=n})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),(0,a.Pn)(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(resetSkewAndRotation),this.animationId++)}getTransformTemplate(){let{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&function cancelTreeOptimisedTransformAnimations(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;let{visualElement:e}=t.options;if(!e)return;let i=e.props[d];if(window.MotionHasOptimisedAnimation(i,"transform")){let{layout:e,layoutId:n}=t.options;window.MotionCancelOptimisedAnimation(i,"transform",a.Wi,!(e||n))}let{parent:n}=t;n&&!n.hasCheckedOptimisedAppear&&cancelTreeOptimisedTransformAnimations(n)}(this),this.root.isUpdating||this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),!this.snapshot||calcLength(this.snapshot.measuredBox.x)||calcLength(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t.999999999999&&(e.x=1),e.y<1.0000000000001&&e.y>.999999999999&&(e.y=1)}}(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=createBox());let{target:l}=t;if(!l){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}this.projectionDelta&&this.prevProjectionDelta?(copyAxisDeltaInto(this.prevProjectionDelta.x,this.projectionDelta.x),copyAxisDeltaInto(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),calcBoxDelta(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===r&&this.treeScale.y===o&&axisDeltaEquals(this.projectionDelta.x,this.prevProjectionDelta.x)&&axisDeltaEquals(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),td.f.value&&tJ.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.visualElement?.scheduleRender(),t){let t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=createDelta(),this.projectionDelta=createDelta(),this.projectionDeltaWithTransform=createDelta()}setAnimationOrigin(t,e=!1){let i;let n=this.snapshot,s=n?n.latestValues:{},r={...this.latestValues},a=createDelta();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;let o=createBox(),l=n?n.source:void 0,u=this.layout?this.layout.source:void 0,h=l!==u,c=this.getStack(),d=!c||c.members.length<=1,m=!!(h&&!d&&!0===this.options.crossfade&&!this.path.some(hasOpacityCrossfade));this.animationProgress=0,this.mixTargetDelta=e=>{let n=e/1e3;if(mixAxisDelta(a.x,t.x,n),mixAxisDelta(a.y,t.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){var l,u,c,p;calcRelativePosition(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox),c=this.relativeTarget,p=this.relativeTargetOrigin,mixAxis(c.x,p.x,o.x,n),mixAxis(c.y,p.y,o.y,n),i&&(l=this.relativeTarget,u=i,axisEquals(l.x,u.x)&&axisEquals(l.y,u.y))&&(this.isProjectionDirty=!1),i||(i=createBox()),copyBoxInto(i,this.relativeTarget)}h&&(this.animationValues=r,function(t,e,i,n,s,r){s?(t.opacity=mixNumber(0,i.opacity??1,tG(n)),t.opacityExit=mixNumber(e.opacity??1,0,tZ(n))):r&&(t.opacity=mixNumber(e.opacity??1,i.opacity??1,n));for(let s=0;s{tI.hasAnimatedSinceResize=!0,p.layout++,this.motionValue||(this.motionValue=(0,h.BX)(0)),this.currentAnimation=function(t,e,i){let n=isMotionValue(t)?t:(0,h.BX)(t);return n.start(animateMotionValue("",n,e,i)),n.animation}(this.motionValue,[0,1e3],{...t,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onStop:()=>{p.layout--},onComplete:()=>{p.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);let 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(){let t=this.getLead(),{targetWithTransforms:e,target:i,layout:n,latestValues:s}=t;if(e&&i&&n){if(this!==t&&this.layout&&n&&shouldAnimatePositionOnly(this.options.animationType,this.layout.layoutBox,n.layoutBox)){i=this.target||createBox();let e=calcLength(this.layout.layoutBox.x);i.x.min=t.target.x.min,i.x.max=i.x.min+e;let n=calcLength(this.layout.layoutBox.y);i.y.min=t.target.y.min,i.y.max=i.y.min+n}copyBoxInto(e,i),transformBox(e,s),calcBoxDelta(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new NodeStack);let i=this.sharedNodes.get(t);i.add(e);let n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){let t=this.getStack();return!t||t.lead===this}getLead(){let{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:i}={}){let n=this.getStack();n&&n.promote(this,i),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){let t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){let{visualElement:t}=this.options;if(!t)return;let e=!1,{latestValues:i}=t;if((i.z||i.rotate||i.rotateX||i.rotateY||i.rotateZ||i.skewX||i.skewY)&&(e=!0),!e)return;let n={};i.z&&resetDistortingTransform("z",t,n,this.animationValues);for(let e=0;et.currentAnimation?.stop()),this.root.nodes.forEach(clearMeasurements),this.root.sharedNodes.clear()}}}function updateLayout(t){t.updateLayout()}function notifyLayoutUpdate(t){let e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){let{layoutBox:i,measuredBox:n}=t.layout,{animationType:s}=t.options,r=e.source!==t.layout.source;"size"===s?eachAxis(t=>{let n=r?e.measuredBox[t]:e.layoutBox[t],s=calcLength(n);n.min=i[t].min,n.max=n.min+s}):shouldAnimatePositionOnly(s,e.layoutBox,i)&&eachAxis(n=>{let s=r?e.measuredBox[n]:e.layoutBox[n],a=calcLength(i[n]);s.max=s.min+a,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[n].max=t.relativeTarget[n].min+a)});let a=createDelta();calcBoxDelta(a,i,e.layoutBox);let o=createDelta();r?calcBoxDelta(o,t.applyTransform(n,!0),e.measuredBox):calcBoxDelta(o,i,e.layoutBox);let l=!isDeltaZero(a),u=!1;if(!t.resumeFrom){let n=t.getClosestProjectingParent();if(n&&!n.resumeFrom){let{snapshot:s,layout:r}=n;if(s&&r){let a=createBox();calcRelativePosition(a,e.layoutBox,s.layoutBox);let o=createBox();calcRelativePosition(o,i,r.layoutBox),boxEqualsRounded(a,o)||(u=!0),n.options.layoutRoot&&(t.relativeTarget=o,t.relativeTargetOrigin=a,t.relativeParent=n)}}}t.notifyListeners("didUpdate",{layout:i,snapshot:e,delta:o,layoutDelta:a,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(t.isLead()){let{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function propagateDirtyNodes(t){td.f.value&&tJ.nodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function cleanDirtyNodes(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function clearSnapshot(t){t.clearSnapshot()}function clearMeasurements(t){t.clearMeasurements()}function clearIsLayoutDirty(t){t.isLayoutDirty=!1}function resetTransformStyle(t){let{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function finishAnimation(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function resolveTargetDelta(t){t.resolveTargetDelta()}function calcProjection(t){t.calcProjection()}function resetSkewAndRotation(t){t.resetSkewAndRotation()}function removeLeadSnapshots(t){t.removeLeadSnapshot()}function mixAxisDelta(t,e,i){t.translate=mixNumber(e.translate,0,i),t.scale=mixNumber(e.scale,1,i),t.origin=e.origin,t.originPoint=e.originPoint}function mixAxis(t,e,i,n){t.min=mixNumber(e.min,i.min,n),t.max=mixNumber(e.max,i.max,n)}function hasOpacityCrossfade(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}let t2={duration:.45,ease:[.4,0,.1,1]},userAgentContains=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),t5=userAgentContains("applewebkit/")&&!userAgentContains("chrome/")?Math.round:X.Z;function roundAxis(t){t.min=t5(t.min),t.max=t5(t.max)}function shouldAnimatePositionOnly(t,e,i){return"position"===t||"preserve-aspect"===t&&!(.2>=Math.abs(aspectRatio(e)-aspectRatio(i)))}function checkNodeWasScrollRoot(t){return t!==t.root&&t.scroll?.wasRoot}let t3=createProjectionNode({attachResizeListener:(t,e)=>addDomEvent(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),t6={current:void 0},t9=createProjectionNode({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!t6.current){let t=new t3({});t.mount(window),t.setOptions({layoutScroll:!0}),t6.current=t}return t6.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>"fixed"===window.getComputedStyle(t).position});function setupGesture(t,e){let i=function(t,e,i){if(t instanceof EventTarget)return[t];if("string"==typeof t){let i=document;e&&(i=e.current);let n=(void 0)??i.querySelectorAll(t);return n?Array.from(n):[]}return Array.from(t)}(t),n=new AbortController,s={passive:!0,...e,signal:n.signal};return[i,s,()=>n.abort()]}function isValidHover(t){return!("touch"===t.pointerType||tE.x||tE.y)}function handleHoverEvent(t,e,i){let{props:n}=t;t.animationState&&n.whileHover&&t.animationState.setActive("whileHover","Start"===i);let s="onHover"+i,r=n[s];r&&a.Wi.postRender(()=>r(e,extractEventInfo(e)))}let isNodeOrChild=(t,e)=>!!e&&(t===e||isNodeOrChild(t,e.parentElement)),t4=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),t8=new WeakSet;function filterEvents(t){return e=>{"Enter"===e.key&&t(e)}}function firePointerEvent(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}let enableKeyboardPress=(t,e)=>{let i=t.currentTarget;if(!i)return;let n=filterEvents(()=>{if(t8.has(i))return;firePointerEvent(i,"down");let t=filterEvents(()=>{firePointerEvent(i,"up")});i.addEventListener("keyup",t,e),i.addEventListener("blur",()=>firePointerEvent(i,"cancel"),e)});i.addEventListener("keydown",n,e),i.addEventListener("blur",()=>i.removeEventListener("keydown",n),e)};function isValidPressEvent(t){return isPrimaryPointer(t)&&!(tE.x||tE.y)}function handlePressEvent(t,e,i){let{props:n}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&n.whileTap&&t.animationState.setActive("whileTap","Start"===i);let s="onTap"+("End"===i?"":i),r=n[s];r&&a.Wi.postRender(()=>r(e,extractEventInfo(e)))}let t7=new WeakMap,et=new WeakMap,fireObserverCallback=t=>{let e=t7.get(t.target);e&&e(t)},fireAllObserverCallbacks=t=>{t.forEach(fireObserverCallback)},ee={some:0,all:1},ei=(0,tF.createContext)({strict:!1});var en=i(5968);let es=(0,tF.createContext)({});function isControllingVariants(t){return isAnimationControls(t.animate)||tA.some(e=>isVariantLabel(t[e]))}function isVariantNode(t){return!!(isControllingVariants(t)||t.variants)}function variantLabelsAsDependency(t){return Array.isArray(t)?t.join(" "):t}var er=i(6613);let ea={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"]},eo={};for(let t in ea)eo[t]={isEnabled:e=>ea[t].some(t=>!!e[t])};let el=Symbol.for("motionComponentSymbol");var eu=i(8243),eh=i(538);function isForcedMotionValue(t,{layout:e,layoutId:i}){return l.has(t)||t.startsWith("origin")||(e||void 0!==i)&&(!!tW[t]||"opacity"===t)}let getValueAsType=(t,e)=>e&&"number"==typeof t?e.transform(t):t,ec={...v,transform:Math.round},ed={borderWidth:M,borderTopWidth:M,borderRightWidth:M,borderBottomWidth:M,borderLeftWidth:M,borderRadius:M,radius:M,borderTopLeftRadius:M,borderTopRightRadius:M,borderBottomRightRadius:M,borderBottomLeftRadius:M,width:M,maxWidth:M,height:M,maxHeight:M,top:M,right:M,bottom:M,left:M,padding:M,paddingTop:M,paddingRight:M,paddingBottom:M,paddingLeft:M,margin:M,marginTop:M,marginRight:M,marginBottom:M,marginLeft:M,backgroundPositionX:M,backgroundPositionY:M,rotate:w,rotateX:w,rotateY:w,rotateZ:w,scale:T,scaleX:T,scaleY:T,scaleZ:T,skew:w,skewX:w,skewY:w,distance:M,translateX:M,translateY:M,translateZ:M,x:M,y:M,z:M,perspective:M,transformPerspective:M,opacity:x,originX:R,originY:R,originZ:M,zIndex:ec,fillOpacity:x,strokeOpacity:x,numOctaves:ec},em={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ep=o.length;function buildHTMLStyles(t,e,i){let{style:n,vars:s,transformOrigin:r}=t,a=!1,u=!1;for(let t in e){let i=e[t];if(l.has(t)){a=!0;continue}if(f(t)){s[t]=i;continue}{let e=getValueAsType(i,ed[t]);t.startsWith("origin")?(u=!0,r[t]=e):n[t]=e}}if(!e.transform&&(a||i?n.transform=function(t,e,i){let n="",s=!0;for(let r=0;r({style:{},transform:{},transformOrigin:{},vars:{}});function copyRawValuesOnly(t,e,i){for(let n in e)isMotionValue(e[n])||isForcedMotionValue(n,i)||(t[n]=e[n])}function useHTMLProps(t,e){let i={},n=function(t,e){let i=t.style||{},n={};return copyRawValuesOnly(n,i,t),Object.assign(n,function({transformTemplate:t},e){return(0,tF.useMemo)(()=>{let i=createHtmlRenderState();return buildHTMLStyles(i,e,t),Object.assign({},i.vars,i.style)},[e])}(t,e)),n}(t,e);return t.drag&&!1!==t.dragListener&&(i.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=!0===t.drag?"none":`pan-${"x"===t.drag?"y":"x"}`),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(i.tabIndex=0),i.style=n,i}let ef={offset:"stroke-dashoffset",array:"stroke-dasharray"},eg={offset:"strokeDashoffset",array:"strokeDasharray"};function buildSVGAttrs(t,{attrX:e,attrY:i,attrScale:n,pathLength:s,pathSpacing:r=1,pathOffset:a=0,...o},l,u,h){if(buildHTMLStyles(t,o,u),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};let{attrs:c,style:d}=t;c.transform&&(d.transform=c.transform,delete c.transform),(d.transform||c.transformOrigin)&&(d.transformOrigin=c.transformOrigin??"50% 50%",delete c.transformOrigin),d.transform&&(d.transformBox=h?.transformBox??"fill-box",delete c.transformBox),void 0!==e&&(c.x=e),void 0!==i&&(c.y=i),void 0!==n&&(c.scale=n),void 0!==s&&function(t,e,i=1,n=0,s=!0){t.pathLength=1;let r=s?ef:eg;t[r.offset]=M.transform(-n);let a=M.transform(e),o=M.transform(i);t[r.array]=`${a} ${o}`}(c,s,r,a,!1)}let createSvgRenderState=()=>({...createHtmlRenderState(),attrs:{}}),isSVGTag=t=>"string"==typeof t&&"svg"===t.toLowerCase();function useSVGProps(t,e,i,n){let s=(0,tF.useMemo)(()=>{let i=createSvgRenderState();return buildSVGAttrs(i,e,isSVGTag(n),t.transformTemplate,t.style),{...i.attrs,style:{...i.style}}},[e]);if(t.style){let e={};copyRawValuesOnly(e,t.style,t),s.style={...e,...s.style}}return s}let ey=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function isValidMotionProp(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||ey.has(t)}let shouldForward=t=>!isValidMotionProp(t);try{(n=require("@emotion/is-prop-valid").default)&&(shouldForward=t=>t.startsWith("on")?!isValidMotionProp(t):n(t))}catch{}let ev=["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 isSVGComponent(t){if("string"!=typeof t||t.includes("-"));else if(ev.indexOf(t)>-1||/[A-Z]/u.test(t))return!0;return!1}var ex=i(961);let makeUseVisualState=t=>(e,i)=>{let n=(0,tF.useContext)(es),s=(0,tF.useContext)(eu.O),make=()=>(function({scrapeMotionValuesFromProps:t,createRenderState:e},i,n,s){let r={latestValues:function(t,e,i,n){let s={},r=n(t,{});for(let t in r)s[t]=resolveMotionValue(r[t]);let{initial:a,animate:o}=t,l=isControllingVariants(t),u=isVariantNode(t);e&&u&&!l&&!1!==t.inherit&&(void 0===a&&(a=e.initial),void 0===o&&(o=e.animate));let h=!!i&&!1===i.initial;h=h||!1===a;let c=h?o:a;if(c&&"boolean"!=typeof c&&!isAnimationControls(c)){let e=Array.isArray(c)?c:[c];for(let i=0;ie=>e.test(t),eb=[v,M,D,w,C,E,{test:t=>"auto"===t,parse:t=>t}],findDimensionValueType=t=>eb.find(testValueType(t)),isNumericalString=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),eS=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u,isZeroValueString=t=>/^0[^.\s]+$/u.test(t),eA=new Set(["brightness","contrast","saturate","opacity"]);function applyDefaultFilter(t){let[e,i]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;let[n]=i.match(P)||[];if(!n)return t;let s=i.replace(n,""),r=eA.has(e)?1:0;return n!==i&&(r*=100),e+"("+r+s+")"}let eV=/\b([a-z-]*)\(.*?\)/gu,ew={...N,getAnimatableNone:t=>{let e=t.match(eV);return e?e.map(applyDefaultFilter).join(" "):t}},eD={...ed,color:B,backgroundColor:B,outlineColor:B,fill:B,stroke:B,borderColor:B,borderTopColor:B,borderRightColor:B,borderBottomColor:B,borderLeftColor:B,filter:ew,WebkitFilter:ew},getDefaultValueType=t=>eD[t];function animatable_none_getAnimatableNone(t,e){let i=getDefaultValueType(t);return i!==ew&&(i=N),i.getAnimatableNone?i.getAnimatableNone(e):void 0}let eM=new Set(["auto","none","0"]);let DOMKeyframesResolver=class DOMKeyframesResolver extends KeyframeResolver{constructor(t,e,i,n,s){super(t,e,i,n,s,!0)}readKeyframes(){let{unresolvedKeyframes:t,element:e,name:i}=this;if(!e||!e.current)return;super.readKeyframes();for(let i=0;i{t.getValue(e).set(i)}),this.resolveNoneKeyframes()}};let eE=[...eb,B,N],findValueType=t=>eE.find(testValueType(t)),eC={current:null},eR={current:!1},ek=new WeakMap,eB=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let VisualElement=class VisualElement{scrapeMotionValuesFromProps(t,e,i){return{}}constructor({parent:t,props:e,presenceContext:i,reducedMotionConfig:n,blockInitialAnimation:s,visualState:r},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=KeyframeResolver,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let t=m.X.now();this.renderScheduledAtthis.bindToMotionValue(e,t)),eR.current||function(){if(eR.current=!0,er.j){if(window.matchMedia){let t=window.matchMedia("(prefers-reduced-motion)"),setReducedMotionPreferences=()=>eC.current=t.matches;t.addListener(setReducedMotionPreferences),setReducedMotionPreferences()}else eC.current=!1}}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||eC.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){for(let t in this.projection&&this.projection.unmount(),(0,a.Pn)(this.notifyUpdate),(0,a.Pn)(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this),this.events)this.events[t].clear();for(let t in this.features){let e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}bindToMotionValue(t,e){let i;this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();let n=l.has(t);n&&this.onBindTransform&&this.onBindTransform();let s=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&a.Wi.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),r=e.on("renderRequest",this.scheduleRender);window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{s(),r(),i&&i(),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 eo){let e=eo[t];if(!e)continue;let{isEnabled:i,Feature:n}=e;if(!this.features[t]&&n&&i(this.props)&&(this.features[t]=new n(this)),this.features[t]){let 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):createBox()}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;ee.variantChildren.delete(t)}addValue(t,e){let i=this.values.get(t);e!==i&&(i&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);let 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 i=this.values.get(t);return void 0===i&&void 0!==e&&(i=(0,h.BX)(null===e?void 0:e,{owner:this}),this.addValue(t,i)),i}readValue(t,e){let i=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];return null!=i&&("string"==typeof i&&(isNumericalString(i)||isZeroValueString(i))?i=parseFloat(i):!findValueType(i)&&N.test(e)&&(i=animatable_none_getAnimatableNone(t,e)),this.setBaseTarget(t,isMotionValue(i)?i.get():i)),isMotionValue(i)?i.get():i}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){let e;let{initial:i}=this.props;if("string"==typeof i||"object"==typeof i){let n=resolveVariantFromProps(this.props,i,this.presenceContext?.custom);n&&(e=n[t])}if(i&&void 0!==e)return e;let n=this.getBaseTargetFromProps(this.props,t);return void 0===n||isMotionValue(n)?void 0!==this.initialValues[t]&&void 0===e?void 0:this.baseTarget[t]:n}on(t,e){return this.events[t]||(this.events[t]=new tz.L),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}};let DOMVisualElement=class DOMVisualElement extends VisualElement{constructor(){super(...arguments),this.KeyframeResolver=DOMKeyframesResolver}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:i}){delete e[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:t}=this.props;isMotionValue(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}};function renderHTML(t,{style:e,vars:i},n,s){for(let r in Object.assign(t.style,e,s&&s.getProjectionStyles(n)),i)t.style.setProperty(r,i[r])}let HTMLVisualElement=class HTMLVisualElement extends DOMVisualElement{constructor(){super(...arguments),this.type="html",this.renderInstance=renderHTML}readValueFromInstance(t,e){if(l.has(e))return this.projection?.isProjecting?defaultTransformValue(e):readTransformValue(t,e);{let i=window.getComputedStyle(t),n=(f(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof n?n.trim():n}}measureInstanceViewportBox(t,{transformPagePoint:e}){return measureViewportBox(t,e)}build(t,e,i){buildHTMLStyles(t,e,i.transformTemplate)}scrapeMotionValuesFromProps(t,e,i){return scrapeMotionValuesFromProps(t,e,i)}};let eL=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"]);let SVGVisualElement=class SVGVisualElement extends DOMVisualElement{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=createBox}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(l.has(e)){let t=getDefaultValueType(e);return t&&t.default||0}return e=eL.has(e)?e:camelToDash(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,i){return scrape_motion_values_scrapeMotionValuesFromProps(t,e,i)}build(t,e,i){buildSVGAttrs(t,e,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,e,i,n){!function(t,e,i,n){for(let i in renderHTML(t,e,void 0,n),e.attrs)t.setAttribute(eL.has(i)?i:camelToDash(i),e.attrs[i])}(t,e,0,n)}mount(t){this.isSVGTag=isSVGTag(t.tagName),super.mount(t)}};let eF=(s={animation:{Feature:class extends Feature{constructor(t){super(t),t.animationState||(t.animationState=function(t){let animate=e=>Promise.all(e.map(({animation:e,options:i})=>(function(t,e,i={}){let n;if(t.notify("AnimationStart",e),Array.isArray(e)){let s=e.map(e=>animateVariant(t,e,i));n=Promise.all(s)}else if("string"==typeof e)n=animateVariant(t,e,i);else{let s="function"==typeof e?resolveVariant(t,e,i.custom):e;n=Promise.all(animateTarget(t,s,i))}return n.then(()=>{t.notify("AnimationComplete",e)})})(t,e,i))),e=createState(),i=!0,buildResolvedTypeValues=e=>(i,n)=>{let s=resolveVariant(t,n,"exit"===e?t.presenceContext?.custom:void 0);if(s){let{transition:t,transitionEnd:e,...n}=s;i={...i,...n,...e}}return i};function animateChanges(n){let{props:s}=t,r=function getVariantContext(t){if(!t)return;if(!t.isControllingVariants){let e=t.parent&&getVariantContext(t.parent)||{};return void 0!==t.props.initial&&(e.initial=t.props.initial),e}let e={};for(let i=0;iu&&f,T=!1,P=Array.isArray(p)?p:[p],b=P.reduce(buildResolvedTypeValues(d),{});!1===g&&(b={});let{prevResolvedValues:S={}}=m,A={...S,...b},markToAnimate=e=>{x=!0,o.has(e)&&(T=!0,o.delete(e)),m.needsAnimating[e]=!0;let i=t.getValue(e);i&&(i.liveStyle=!1)};for(let t in A){let e=b[t],i=S[t];if(!l.hasOwnProperty(t))(isKeyframesTarget(e)&&isKeyframesTarget(i)?shallowCompare(e,i):e===i)?void 0!==e&&o.has(t)?markToAnimate(t):m.protectedKeys[t]=!0:null!=e?markToAnimate(t):o.add(t)}m.prevProp=p,m.prevResolvedValues=b,m.isActive&&(l={...l,...b}),i&&t.blockInitialAnimation&&(x=!1);let V=y&&v,w=!V||T;x&&w&&a.push(...P.map(t=>({animation:t,options:{type:d}})))}if(o.size){let e={};if("boolean"!=typeof s.initial){let i=resolveVariant(t,Array.isArray(s.initial)?s.initial[0]:s.initial);i&&i.transition&&(e.transition=i.transition)}o.forEach(i=>{let n=t.getBaseTarget(i),s=t.getValue(i);s&&(s.liveStyle=!0),e[i]=n??null}),a.push({animation:e})}let c=!!a.length;return i&&(!1===s.initial||s.initial===s.animate)&&!t.manuallyAnimateOnMount&&(c=!1),i=!1,c?animate(a):Promise.resolve()}return{animateChanges,setActive:function(i,n){if(e[i].isActive===n)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(i,n)),e[i].isActive=n;let s=animateChanges(i);for(let t in e)e[t].protectedKeys={};return s},setAnimateFunction:function(e){animate=e(t)},getState:()=>e,reset:()=>{e=createState(),i=!0}}}(t))}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();isAnimationControls(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{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 Feature{constructor(){super(...arguments),this.id=tM++}update(){if(!this.node.presenceContext)return;let{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;let n=this.node.animationState.setActive("exit",!t);e&&!t&&n.then(()=>{e(this.id)})}mount(){let{register:t,onExitComplete:e}=this.node.presenceContext||{};e&&e(this.id),t&&(this.unmount=t(this.id))}unmount(){}}},inView:{Feature:class extends Feature{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:t={}}=this.node.getProps(),{root:e,margin:i,amount:n="some",once:s}=t,r={root:e?e.current:void 0,rootMargin:i,threshold:"number"==typeof n?n:ee[n]};return function(t,e,i){let n=function({root:t,...e}){let i=t||document;et.has(i)||et.set(i,{});let n=et.get(i),s=JSON.stringify(e);return n[s]||(n[s]=new IntersectionObserver(fireAllObserverCallbacks,{root:t,...e})),n[s]}(e);return t7.set(t,i),n.observe(t),()=>{t7.delete(t),n.unobserve(t)}}(this.node.current,r,t=>{let{isIntersecting:e}=t;if(this.isInView===e||(this.isInView=e,s&&!e&&this.hasEnteredView))return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);let{onViewportEnter:i,onViewportLeave:n}=this.node.getProps(),r=e?i:n;r&&r(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;let{props:t,prevProps:e}=this.node,i=["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return i=>t[i]!==e[i]}(t,e));i&&this.startObserver()}unmount(){}}},tap:{Feature:class extends Feature{mount(){let{current:t}=this.node;t&&(this.unmount=function(t,e,i={}){let[n,s,r]=setupGesture(t,i),startPress=t=>{let n=t.currentTarget;if(!isValidPressEvent(t))return;t8.add(n);let r=e(n,t),onPointerEnd=(t,e)=>{window.removeEventListener("pointerup",onPointerUp),window.removeEventListener("pointercancel",onPointerCancel),t8.has(n)&&t8.delete(n),isValidPressEvent(t)&&"function"==typeof r&&r(t,{success:e})},onPointerUp=t=>{onPointerEnd(t,n===window||n===document||i.useGlobalTarget||isNodeOrChild(n,t.target))},onPointerCancel=t=>{onPointerEnd(t,!1)};window.addEventListener("pointerup",onPointerUp,s),window.addEventListener("pointercancel",onPointerCancel,s)};return n.forEach(t=>{let e=i.useGlobalTarget?window:t;e.addEventListener("pointerdown",startPress,s),(0,ty.R)(t)&&(t.addEventListener("focus",t=>enableKeyboardPress(t,s)),t4.has(t.tagName)||-1!==t.tabIndex||t.hasAttribute("tabindex")||(t.tabIndex=0))}),r}(t,(t,e)=>(handlePressEvent(this.node,e,"Start"),(t,{success:e})=>handlePressEvent(this.node,t,e?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends Feature{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=pipe(addDomEvent(this.node.current,"focus",()=>this.onFocus()),addDomEvent(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends Feature{mount(){let{current:t}=this.node;t&&(this.unmount=function(t,e,i={}){let[n,s,r]=setupGesture(t,i),onPointerEnter=t=>{if(!isValidHover(t))return;let{target:i}=t,n=e(i,t);if("function"!=typeof n||!i)return;let onPointerLeave=t=>{isValidHover(t)&&(n(t),i.removeEventListener("pointerleave",onPointerLeave))};i.addEventListener("pointerleave",onPointerLeave,s)};return n.forEach(t=>{t.addEventListener("pointerenter",onPointerEnter,s)}),r}(t,(t,e)=>(handleHoverEvent(this.node,e,"Start"),t=>handleHoverEvent(this.node,t,"End"))))}unmount(){}}},pan:{Feature:class extends Feature{constructor(){super(...arguments),this.removePointerDownListener=X.Z}onPointerDown(t){this.session=new PanSession(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:getContextWindow(this.node)})}createPanHandlers(){let{onPanSessionStart:t,onPanStart:e,onPan:i,onPanEnd:n}=this.node.getProps();return{onSessionStart:asyncHandler(t),onStart:asyncHandler(e),onMove:i,onEnd:(t,e)=>{delete this.session,n&&a.Wi.postRender(()=>n(t,e))}}}mount(){this.removePointerDownListener=addPointerEvent(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 Feature{constructor(t){super(t),this.removeGroupControls=X.Z,this.removeListeners=X.Z,this.controls=new VisualElementDragControls(t)}mount(){let{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||X.Z}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:t9,MeasureLayout:MeasureLayout},layout:{ProjectionNode:t9,MeasureLayout:MeasureLayout}},r=(t,e)=>isSVGComponent(t)?new SVGVisualElement(e):new HTMLVisualElement(e,{allowProjection:t!==tF.Fragment}),function(t,{forwardMotionProps:e}={forwardMotionProps:!1}){let i=isSVGComponent(t)?eP:eT,n={...i,preloadedFeatures:s,useRender:function(t=!1){return(e,i,n,{latestValues:s},r)=>{let a=isSVGComponent(e)?useSVGProps:useHTMLProps,o=a(i,s,r,e),l=function(t,e,i){let n={};for(let s in t)("values"!==s||"object"!=typeof t.values)&&(shouldForward(s)||!0===i&&isValidMotionProp(s)||!e&&!isValidMotionProp(s)||t.draggable&&s.startsWith("onDrag"))&&(n[s]=t[s]);return n}(i,"string"==typeof e,t),u=e!==tF.Fragment?{...l,...o,ref:n}:{},{children:h}=i,c=(0,tF.useMemo)(()=>isMotionValue(h)?h.get():h,[h]);return(0,tF.createElement)(e,{...u,children:c})}}(e),createVisualElement:r,Component:t};return function({preloadedFeatures:t,createVisualElement:e,useRender:i,useVisualState:n,Component:s}){function MotionComponent(t,r){var a;let o;let l={...(0,tF.useContext)(en._),...t,layoutId:function({layoutId:t}){let e=(0,tF.useContext)(tO.p).id;return e&&void 0!==t?e+"-"+t:t}(t)},{isStatic:u}=l,h=function(t){let{initial:e,animate:i}=function(t,e){if(isControllingVariants(t)){let{initial:e,animate:i}=t;return{initial:!1===e||isVariantLabel(e)?e:void 0,animate:isVariantLabel(i)?i:void 0}}return!1!==t.inherit?e:{}}(t,(0,tF.useContext)(es));return(0,tF.useMemo)(()=>({initial:e,animate:i}),[variantLabelsAsDependency(e),variantLabelsAsDependency(i)])}(t),c=n(t,u);if(!u&&er.j){(0,tF.useContext)(ei).strict;let t=function(t){let{drag:e,layout:i}=eo;if(!e&&!i)return{};let n={...e,...i};return{MeasureLayout:e?.isEnabled(t)||i?.isEnabled(t)?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}(l);o=t.MeasureLayout,h.visualElement=function(t,e,i,n,s){let{visualElement:r}=(0,tF.useContext)(es),a=(0,tF.useContext)(ei),o=(0,tF.useContext)(eu.O),l=(0,tF.useContext)(en._).reducedMotion,u=(0,tF.useRef)(null);n=n||a.renderer,!u.current&&n&&(u.current=n(t,{visualState:e,parent:r,props:i,presenceContext:o,blockInitialAnimation:!!o&&!1===o.initial,reducedMotionConfig:l}));let h=u.current,c=(0,tF.useContext)(tN);h&&!h.projection&&s&&("html"===h.type||"svg"===h.type)&&function(t,e,i,n){let{layoutId:s,layout:r,drag:a,dragConstraints:o,layoutScroll:l,layoutRoot:u,layoutCrossfade:h}=e;t.projection=new i(t.latestValues,e["data-framer-portal-id"]?void 0:function getClosestProjectingNode(t){if(t)return!1!==t.options.allowProjection?t.projection:getClosestProjectingNode(t.parent)}(t.parent)),t.projection.setOptions({layoutId:s,layout:r,alwaysMeasureLayout:!!a||o&&isRefObject(o),visualElement:t,animationType:"string"==typeof r?r:"both",initialPromotionConfig:n,crossfade:h,layoutScroll:l,layoutRoot:u})}(u.current,i,s,c);let m=(0,tF.useRef)(!1);(0,tF.useInsertionEffect)(()=>{h&&m.current&&h.update(i,o)});let p=i[d],f=(0,tF.useRef)(!!p&&!window.MotionHandoffIsComplete?.(p)&&window.MotionHasOptimisedAnimation?.(p));return(0,eh.L)(()=>{h&&(m.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),tB.render(h.render),f.current&&h.animationState&&h.animationState.animateChanges())}),(0,tF.useEffect)(()=>{h&&(!f.current&&h.animationState&&h.animationState.animateChanges(),f.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(p)}),f.current=!1))}),h}(s,c,l,e,t.ProjectionNode)}return(0,tR.jsxs)(es.Provider,{value:h,children:[o&&h.visualElement?(0,tR.jsx)(o,{visualElement:h.visualElement,...l}):null,i(s,t,(a=h.visualElement,(0,tF.useCallback)(t=>{t&&c.onMount&&c.onMount(t),a&&(t?a.mount(t):a.unmount()),r&&("function"==typeof r?r(t):isRefObject(r)&&(r.current=t))},[a])),c,u,h.visualElement)]})}t&&function(t){for(let e in t)eo[e]={...eo[e],...t[e]}}(t),MotionComponent.displayName=`motion.${"string"==typeof s?s:`create(${s.displayName??s.name??""})`}`;let r=(0,tF.forwardRef)(MotionComponent);return r[el]=s,r}(n)}),ej=function(t){if("undefined"==typeof Proxy)return t;let e=new Map;return new Proxy((...e)=>t(...e),{get:(i,n)=>"create"===n?t:(e.has(n)||e.set(n,t(n)),e.get(n))})}(eF)},6613:function(t,e,i){i.d(e,{j:function(){return n}});let n="undefined"!=typeof window},961:function(t,e,i){i.d(e,{h:function(){return useConstant}});var n=i(2265);function useConstant(t){let e=(0,n.useRef)(null);return null===e.current&&(e.current=t()),e.current}},538:function(t,e,i){i.d(e,{L:function(){return r}});var n=i(2265),s=i(6613);let r=s.j?n.useLayoutEffect:n.useEffect},5794:function(t,e,i){i.d(e,{Z:function(){return createRenderBatcher}});var n=i(8573);let s=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];var r=i(2648);function createRenderBatcher(t,e){let i=!1,a=!0,o={delta:0,timestamp:0,isProcessing:!1},flagRunNextFrame=()=>i=!0,l=s.reduce((t,i)=>(t[i]=function(t,e){let i=new Set,n=new Set,s=!1,a=!1,o=new WeakSet,l={delta:0,timestamp:0,isProcessing:!1},u=0;function triggerCallback(e){o.has(e)&&(h.schedule(e),t()),u++,e(l)}let h={schedule:(t,e=!1,r=!1)=>{let a=r&&s,l=a?i:n;return e&&o.add(t),l.has(t)||l.add(t),t},cancel:t=>{n.delete(t),o.delete(t)},process:t=>{if(l=t,s){a=!0;return}s=!0,[i,n]=[n,i],i.forEach(triggerCallback),e&&r.f.value&&r.f.value.frameloop[e].push(u),u=0,i.clear(),s=!1,a&&(a=!1,h.process(t))}};return h}(flagRunNextFrame,e?i:void 0),t),{}),{setup:u,read:h,resolveKeyframes:c,preUpdate:d,update:m,preRender:p,render:f,postRender:g}=l,processBatch=()=>{let s=n.c.useManualTiming?o.timestamp:performance.now();i=!1,n.c.useManualTiming||(o.delta=a?1e3/60:Math.max(Math.min(s-o.timestamp,40),1)),o.timestamp=s,o.isProcessing=!0,u.process(o),h.process(o),c.process(o),d.process(o),m.process(o),p.process(o),f.process(o),g.process(o),o.isProcessing=!1,i&&e&&(a=!1,t(processBatch))},wake=()=>{i=!0,a=!0,o.isProcessing||t(processBatch)},y=s.reduce((t,e)=>{let n=l[e];return t[e]=(t,e=!1,s=!1)=>(i||wake(),n.schedule(t,e,s)),t},{});return{schedule:y,cancel:t=>{for(let e=0;e(void 0===n&&a.set(r.frameData.isProcessing||s.c.useManualTiming?r.frameData.timestamp:performance.now()),n),set:t=>{n=t,queueMicrotask(clearTime)}}},2648:function(t,e,i){i.d(e,{f:function(){return n}});let n={value:null,addProjectionMetrics:null}},6119:function(t,e,i){i.d(e,{R:function(){return isHTMLElement}});var n=i(1643);function isHTMLElement(t){return(0,n.K)(t)&&"offsetHeight"in t}},4761:function(t,e,i){i.d(e,{BX:function(){return motionValue}});var n=i(1960),s=i(6099),r=i(8795),a=i(4386);let isFloat=t=>!isNaN(parseFloat(t)),o={current:void 0};let MotionValue=class MotionValue{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{let i=r.X.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let t of this.dependents)t.dirty();e&&this.events.renderRequest?.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){this.current=t,this.updatedAt=r.X.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=isFloat(this.current))}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 n.L);let i=this.events[t].add(e);return"change"===t?()=>{i(),a.Wi.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(let t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,i){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}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 o.current&&o.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let t=r.X.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;let e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return(0,s.R)(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 motionValue(t,e){return new MotionValue(t,e)}},3326:function(t,e,i){function addUniqueItem(t,e){-1===t.indexOf(e)&&t.push(e)}function removeItem(t,e){let i=t.indexOf(e);i>-1&&t.splice(i,1)}i.d(e,{cl:function(){return removeItem},y4:function(){return addUniqueItem}})},8573:function(t,e,i){i.d(e,{c:function(){return n}});let n={}},1643:function(t,e,i){i.d(e,{K:function(){return isObject}});function isObject(t){return"object"==typeof t&&null!==t}},3236:function(t,e,i){i.d(e,{Z:function(){return noop}});let noop=t=>t},1960:function(t,e,i){i.d(e,{L:function(){return SubscriptionManager}});var n=i(3326);let SubscriptionManager=class SubscriptionManager{constructor(){this.subscriptions=[]}add(t){return(0,n.y4)(this.subscriptions,t),()=>(0,n.cl)(this.subscriptions,t)}notify(t,e,i){let n=this.subscriptions.length;if(n){if(1===n)this.subscriptions[0](t,e,i);else for(let s=0;s