(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,46932,60140,31178,37806,21476,47414,74008,64978,72846,t=>{"use strict";let e,i,s,n=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","scaleZ","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],r=new Set([...n,"pathRotation"]),o=(t,e,i)=>i>e?e:i"number"==typeof t,parse:parseFloat,transform:t=>t},l={...a,transform:t=>o(0,1,t)},h={...a,default:1},u=t=>Math.round(1e5*t)/1e5,d=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,c=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,p=(t,e)=>i=>!!("string"==typeof i&&c.test(i)&&i.startsWith(t)||e&&null!=i&&Object.prototype.hasOwnProperty.call(i,e)),m=(t,e,i)=>s=>{if("string"!=typeof s)return s;let[n,r,o,a]=s.match(d);return{[t]:parseFloat(n),[e]:parseFloat(r),[i]:parseFloat(o),alpha:void 0!==a?parseFloat(a):1}},f={...a,transform:t=>Math.round(o(0,255,t))},y={test:p("rgb","red"),parse:m("red","green","blue"),transform:({red:t,green:e,blue:i,alpha:s=1})=>"rgba("+f.transform(t)+", "+f.transform(e)+", "+f.transform(i)+", "+u(l.transform(s))+")"},g=(t,e,i)=>{let s=t.substring(1+e*i,1+(e+1)*i);return i>1?s:s+s},v={test:p("#"),parse:function(t){let e=t.length>5?2:1,i=g(t,3,e);return{red:parseInt(g(t,0,e),16),green:parseInt(g(t,1,e),16),blue:parseInt(g(t,2,e),16),alpha:i?parseInt(i,16)/255:1}},transform:y.transform},x=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),S=x("deg"),w=x("%"),b=x("px"),T=x("vh"),P=x("vw"),A={...w,parse:t=>w.parse(t)/100,transform:t=>w.transform(100*t)},M={test:p("hsl","hue"),parse:m("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:i,alpha:s=1})=>"hsla("+Math.round(t)+", "+w.transform(u(e))+", "+w.transform(u(i))+", "+u(l.transform(s))+")"},E={test:t=>y.test(t)||v.test(t)||M.test(t),parse:t=>y.test(t)?y.parse(t):M.test(t)?M.parse(t):v.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?y.transform(t):M.transform(t),getAnimatableNone:t=>{let e=E.parse(t);return e.alpha=0,E.transform(e)}},k=new RegExp(d.source),C=RegExp(/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu.source,"i"),V="number",R="color",D=/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+)(?![a-z]*\()/giu;function F(t){let e=t.toString(),i=[],s={color:[],number:[],var:[]},n=[],r=0,o=e.replace(D,t=>(E.test(t)?(s.color.push(r),n.push(R),i.push(E.parse(t))):t.startsWith("var(")?(s.var.push(r),n.push("var"),i.push(t)):(s.number.push(r),n.push(V),i.push(parseFloat(t))),++r,"${}")).split("${}");return{values:i,split:o,indexes:s,types:n}}function L({split:t,types:e}){let i=t.length;return s=>{let n="";for(let r=0;r((t,e)=>"number"==typeof t?e?.trim().endsWith("/")?t:0:"number"==typeof t?0:E.test(t)?E.getAnimatableNone(t):t)(t,e.split[i])))}},_=new Set(["brightness","contrast","saturate","opacity"]);function B(t){let[e,i]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;let[s]=i.match(d)||[];if(!s)return t;let n=i.replace(s,""),r=+!!_.has(e);return s!==i&&(r*=100),e+"("+r+n+")"}let O=/\b([a-z-]*)\(.*?\)/gu,I={...j,getAnimatableNone:t=>{let e=t.match(O);return e?e.map(B).join(" "):t}},U={...j,getAnimatableNone:t=>{let e=j.parse(t);return j.createTransformer(t)(e.map(t=>"number"==typeof t?0:"object"==typeof t?{...t,alpha:1}:t))}},N={...a,transform:Math.round},z={rotate:S,pathRotation:S,rotateX:S,rotateY:S,rotateZ:S,scale:h,scaleX:h,scaleY:h,scaleZ:h,skew:S,skewX:S,skewY:S,distance:b,translateX:b,translateY:b,translateZ:b,x:b,y:b,z:b,perspective:b,transformPerspective:b,opacity:l,originX:A,originY:A,originZ:b},W={borderWidth:b,borderTopWidth:b,borderRightWidth:b,borderBottomWidth:b,borderLeftWidth:b,borderRadius:b,borderTopLeftRadius:b,borderTopRightRadius:b,borderBottomRightRadius:b,borderBottomLeftRadius:b,width:b,maxWidth:b,height:b,maxHeight:b,top:b,right:b,bottom:b,left:b,inset:b,insetBlock:b,insetBlockStart:b,insetBlockEnd:b,insetInline:b,insetInlineStart:b,insetInlineEnd:b,padding:b,paddingTop:b,paddingRight:b,paddingBottom:b,paddingLeft:b,paddingBlock:b,paddingBlockStart:b,paddingBlockEnd:b,paddingInline:b,paddingInlineStart:b,paddingInlineEnd:b,margin:b,marginTop:b,marginRight:b,marginBottom:b,marginLeft:b,marginBlock:b,marginBlockStart:b,marginBlockEnd:b,marginInline:b,marginInlineStart:b,marginInlineEnd:b,fontSize:b,backgroundPositionX:b,backgroundPositionY:b,...z,zIndex:N,fillOpacity:l,strokeOpacity:l,numOctaves:N},$={...W,color:E,backgroundColor:E,outlineColor:E,fill:E,stroke:E,borderColor:E,borderTopColor:E,borderRightColor:E,borderBottomColor:E,borderLeftColor:E,filter:I,WebkitFilter:I,mask:U,WebkitMask:U},H=t=>$[t],Y=()=>({translate:0,scale:1,origin:0,originPoint:0}),X=()=>({x:Y(),y:Y()}),K=()=>({min:0,max:0}),G=()=>({x:K(),y:K()}),q=t=>!!(t&&t.getVelocity),Z=new Set(["width","height","top","left","right","bottom",...n]),J=[a,b,w,S,P,T,{test:t=>"auto"===t,parse:t=>t}],Q=t=>J.find(e=>e.test(t));var tt=t.i(47167);let te=t=>e=>"string"==typeof e&&e.startsWith(t),ti=te("--"),ts=te("var(--"),tn=t=>!!ts(t)&&tr.test(t.split("/*")[0].trim()),tr=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function to(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}let ta=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function tl(t,e,i=1){let[s,n]=function(t){let e=ta.exec(t);if(!e)return[,];let[,i,s,n]=e;return[`--${i??s}`,n]}(t);if(!s)return;let r=window.getComputedStyle(e).getPropertyValue(s);if(r){let t=r.trim();return/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t)?parseFloat(t):t}return tn(n)?tl(n,e,i+1):n}let th=new Set([I,U]);function tu(t,e){let i=H(t);return th.has(i)||(i=j),i.getAnimatableNone?i.getAnimatableNone(e):void 0}let td=t=>180*t/Math.PI,tc=t=>tm(td(Math.atan2(t[1],t[0]))),tp={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scaleZ:()=>1,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:tc,rotateZ:tc,skewX:t=>td(Math.atan(t[1])),skewY:t=>td(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},tm=t=>((t%=360)<0&&(t+=360),t),tf=t=>Math.hypot(t[0],t[1]),ty=t=>Math.hypot(t[4],t[5]),tg={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:tf,scaleY:ty,scaleZ:t=>Math.hypot(t[8],t[9],t[10]),scale:t=>(tf(t)+ty(t))/2,rotateX:t=>tm(td(Math.atan2(t[6],t[5]))),rotateY:t=>tm(td(Math.atan2(-t[2],t[0]))),rotateZ:tc,rotate:tc,skewX:t=>td(Math.atan(t[4])),skewY:t=>td(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function tv(t){return+!!t.includes("scale")}function tx(t,e){if(!t||"none"===t)return tv(e);let i=t.match(/^matrix(3d)?\(([-\d.e\s,]+)\)$/u);if(!i)return tv(e);let s=(i[1]?tg:tp)[e],n=i[2].split(",").map(t=>parseFloat(t));return"function"==typeof s?s(n):n[s]}let tS=t=>t===a||t===b,tw=new Set(["x","y","z"]),tb=n.filter(t=>!tw.has(t)),tT=new Set(["bottom","right"]);function tP(t,e,i,s,n,r){let o=parseFloat(t);if(!isNaN(o))return o;let{min:a,max:l}=e()[i],h=l-a;return"border-box"===r?h:h-parseFloat(s)-parseFloat(n)}let tA=({transform:t})=>tx(t,"x"),tM=({transform:t})=>tx(t,"y"),tE={width:({width:t,paddingLeft:e="0",paddingRight:i="0",boxSizing:s},n)=>tP(t,n,"x",e,i,s),height:({height:t,paddingTop:e="0",paddingBottom:i="0",boxSizing:s},n)=>tP(t,n,"y",e,i,s),top:({top:t})=>parseFloat(t),left:({left:t})=>parseFloat(t),bottom:({top:t},e)=>{let{y:i}=e();return parseFloat(t)+(i.max-i.min)},right:({left:t},e)=>{let{x:i}=e();return parseFloat(t)+(i.max-i.min)},x:tA,y:tM,translateX:tA,translateY:tM},tk=t=>t,tC={},tV=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function tR(t,e,i={delta:0,timestamp:0,isProcessing:!1}){let s=!1,n=!0,r=()=>s=!0,o=tV.reduce((t,e)=>(t[e]=function(t){let e,i=new Set,s=new Set,n=!1,r=!1,o=new Set,a={delta:0,timestamp:0,isProcessing:!1};function l(i){o.has(i)&&(s.add(i),t()),(e=i)(a)}let h={schedule:(t,r=!1,a=!1)=>{let l=a&&n,h=l?i:s;return r&&o.add(t),l&&t!==e&&h.delete(t),h.add(t),t},cancel:t=>{s.delete(t),o.delete(t)},process:t=>{if(a=t,n){r=!0;return}n=!0;let o=i;i=s,s=o,i.forEach(l),i.clear(),e=void 0,n=!1,r&&(r=!1,h.process(t))}};return h}(r),t),{}),{setup:a,read:l,resolveKeyframes:h,preUpdate:u,update:d,preRender:c,render:p,postRender:m}=o,f=()=>{let r=tC.useManualTiming,o=r?i.timestamp:performance.now();s=!1,r||(i.delta=n?1e3/60:Math.max(Math.min(o-i.timestamp,40),1)),i.timestamp=o,i.isProcessing=!0,a.process(i),l.process(i),h.process(i),u.process(i),d.process(i),c.process(i),p.process(i),m.process(i),i.isProcessing=!1,s&&e&&(n=!1,t(f))};return{schedule:tV.reduce((e,r)=>{let a=o[r];return e[r]=(e,r=!1,o=!1)=>(!s&&(s=!0,n=!0,i.isProcessing||t(f)),a.schedule(e,r,o)),e},{}),cancel:t=>{for(let e=0;etypeof requestAnimationFrame?requestAnimationFrame:tk,!0,tD),t_=new Set,tB=!1,tO=!1,tI=!1;function tU(){if(tO){let t=[],e=new Set,i=new Set;t_.forEach(s=>{s.needsMeasurement&&(t.push(s),e.add(s.element),tT.has(s.name)&&i.add(s.element))});let s=new Map;i.forEach(t=>{let e,i=(e=[],tb.forEach(i=>{let s=t.getValue(i);if(void 0!==s){let t=s.get(),n=+!!i.startsWith("scale");if(t===n)return;e.push([i,t]),s.set(n)}}),e);i.length&&(s.set(t,i),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();let e=s.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)})}tO=!1,tB=!1,t_.forEach(t=>t.complete(tI)),t_.clear()}function tN(){t_.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(tO=!0)})}class tz{constructor(t,e,i,s,n,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=i,this.motionValue=s,this.element=n,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(t_.add(this),tB||(tB=!0,tF.read(tN),tF.resolveKeyframes(tU))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:t,name:e,element:i,motionValue:s}=this;if(null===t[0]){let n=s?.get(),r=t[t.length-1];if(void 0!==n)t[0]=n;else if(i&&e){let s=function(t,e,i){if("string"==typeof t){if(/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t)||/^0[^.\s]+$/u.test(t))return parseFloat(t);if(!j.test(t)&&j.test(i))return tu(e,i)}return t??void 0}(i.readValue(e,r),e,r);void 0!==s&&(t[0]=s)}void 0===t[0]&&(t[0]=r),s&&void 0===n&&s.set(t[0])}for(let e=1;et.measureViewportBox())}measureInitialState(){let{element:t,unresolvedKeyframes:e,name:i}=this;if(!t?.current)return;"height"===i&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=this.measure(),e[0]=this.measuredOrigin;let s=e[e.length-1];void 0!==s&&this.motionValue?.jump(s,!1)}measureEndState(){let{element:t,unresolvedKeyframes:e}=this;if(!t?.current)return;this.motionValue?.jump(this.measuredOrigin,!1);let i=e.length-1,s=e[i];e[i]=this.measure(),null!==s&&void 0===this.finalKeyframe&&(this.finalKeyframe=s),this.resolveNoneKeyframes()}}let tH=t=>1e3*t;function tY(t,e){-1===t.indexOf(e)&&t.push(e)}function tX(t,e){let i=t.indexOf(e);i>-1&&t.splice(i,1)}class tK{constructor(){this.subscriptions=[]}add(t){return tY(this.subscriptions,t),()=>this.remove(t)}remove(t){tX(this.subscriptions,t)}notify(t,e,i){let s=this.subscriptions.length;if(s)if(1===s)this.subscriptions[0](t,e,i);else for(let n=0;n(void 0===i&&(i=t()),i);return()=>tq[e]??s()}let tJ=tZ(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),tQ=t=>null!==t;function t0(t,{repeat:e,repeatType:i="loop"},s,n=1){let r=t.filter(tQ),o=n<0||e&&"loop"!==i&&e%2==1?0:r.length-1;return o&&void 0!==s?s:r[o]}class t1{constructor(){this.isResolved=!1}get finished(){return this._finished||(this._finished=this.isResolved?Promise.resolve():new Promise(t=>{this._resolve=t})),this._finished}updateFinished(){this._finished=this._resolve=void 0,this.isResolved=!1}notifyFinished(){this.isResolved=!0,this._resolve?.()}then(t,e){return this.finished.then(t,e)}}function t2(){e=void 0}let t3={now:()=>(void 0===e&&t3.set(tD.isProcessing||tC.useManualTiming?tD.timestamp:performance.now()),e),set:t=>{e=t,queueMicrotask(t2)}};function t5(t,e){return{kind:t,animation:e,timestamp:t3.now(),frameTimestamp:tD.timestamp,frameIsProcessing:tD.isProcessing}}function t4(t,e,i){let s=globalThis.__MOTION_INSPECT__;if(s)try{s({...t5("animation-start",t),options:i?{...e,...i}:e})}catch{}}let t9=t=>Array.isArray(t)&&"number"==typeof t[0],t6=tZ(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),t7=(t,e,i=10)=>{let s="",n=Math.max(Math.round(e/i),2);for(let e=0;e`cubic-bezier(${t}, ${e}, ${i}, ${s})`,et={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:t8([0,.65,.55,1]),circOut:t8([.55,0,1,.45]),backIn:t8([.31,.01,.66,-.59]),backOut:t8([.33,1.53,.69,.99])};function ee(t){return"function"==typeof t&&"applyToOptions"in t}class ei extends t1{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;let{element:e,name:i,keyframes:s,pseudoElement:n,allowFlatten:r=!1,finalKeyframe:o,onComplete:a}=t;this.isPseudoElement=!!n,this.allowFlatten=r,this.options=t,tt.default;let l=function({type:t,...e}){return ee(t)&&t6()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(t);this.animation=function(t,e,i,{delay:s=0,duration:n=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:l}={},h){let u={[e]:i};l&&(u.offset=l);let d=function t(e,i){if(e)return"function"==typeof e?t6()?t7(e,i):"ease-out":t9(e)?t8(e):Array.isArray(e)?e.map(e=>t(e,i)||et.easeOut):et[e]}(a,n);Array.isArray(d)&&(u.easing=d);let c={delay:s,duration:n,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:r+1,direction:"reverse"===o?"alternate":"normal"};return h&&(c.pseudoElement=h),t.animate(u,c)}(e,i,s,l,n),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!n){let t=t0(s,this.options,o,this.speed);this.updateMotionValue?.(t),tG(e,i,t),this.animation.cancel()}a?.(),this.notifyFinished()},t4(this,t,l)}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){this.isStopped||(this.isStopped=!0,"idle"!==this.state&&null===this.finishedTime&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||(this.animation.onfinish=null,this.cancel())))}commitStyles(){let t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){return Number(this.animation.effect?.getComputedTiming?.().duration||0)/1e3}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+t/1e3}get time(){return(Number(this.animation.currentTime)||0)/1e3}set time(t){let e=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=tH(t),e&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,onAttach:e,observe:i}){return(this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&tJ())?(this.animation.timeline=t,e?.(this.animation),tk):i(this)}}let es=new Set(["opacity","clipPath","filter","transform"]),en=new WeakMap,{schedule:er}=tR(queueMicrotask,!1);t.s(["f",0,er],60140);let eo=(t,e)=>e?1e3/e*t:0,ea;class el{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{let e=t3.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.dirty(),this.dependents))for(let t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){this.current=t,this.updatedAt=t3.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=!isNaN(parseFloat(this.current)))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){var i;return"change"===t?this.onChangeSubscribe(e):((i=this.events)[t]||(i[t]=new tK)).add(e)}onChangeSubscribe(t){let{events:e}=this;return e.change||this.changeSubscriber?(e.change||(e.change=new tK,e.change.add(this.changeSubscriber),this.changeSubscriber=void 0),e.change.add(t)):this.changeSubscriber=t,()=>{this.changeSubscriber===t?this.changeSubscriber=void 0:e.change?.remove(t),this.stopIfUnobserved()}}stopIfUnobserved(){tF.read(()=>{this.changeSubscriber||this.events.change?.getSize()||this.stop()})}clearListeners(){for(let t in this.changeSubscriber=void 0,this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,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?.()}dirty(){let{current:t,changeSubscriber:e}=this;e?e(t):this.events.change?.notify(t)}addDependent(t){(this.dependents||(this.dependents=new Set)).add(t)}removeDependent(t){this.dependents?.delete(t)}get(){ea?.push(this);let t=this.animation?.liveValue?.();return void 0===t?this.current:t}getCurrent(){return this.current}getPrevious(){return this.prev}getVelocity(){let t=t3.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;let e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return eo(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{let i;this.hasAnimated=!0;let s=!1;i=t(()=>{s=!0,this.events.animationComplete?.notify(),this.animation===i&&(this.animation=void 0),e()}),s||(this.animation=i),this.events.animationStart?.notify()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel?.notify()),this.animation=void 0}isAnimating(){return!!this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect?.()}}function eh(t,e){return new el(t,e)}let eu=new WeakMap;function ed(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function ec(t){return"string"==typeof t||Array.isArray(t)}let ep=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],em=["initial"].concat(ep);function ef(t){if(ed(t.animate))return!0;for(let e=0;etypeof window,eS=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],ew={};class eb{scrapeMotionValuesFromProps(t,e,i){return{}}constructor({parent:t,props:e,presenceContext:i,reducedMotionConfig:s,skipAnimations:n,blockInitialAnimation:r,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=tz,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let t=t3.now();this.renderScheduledAte.delete(this)}}this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(ev.current||function(){if(ev.current=!0,ex)if(window.matchMedia){let t=window.matchMedia("(prefers-reduced-motion)"),e=()=>eg.current=t.matches;t.addEventListener("change",e),e()}else eg.current=!1}(),this.shouldReduceMotion=eg.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){for(let t in this.projection?.unmount(),tL(this.notifyUpdate),tL(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree?.(),this.parent?.removeChild(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}addChild(t){this.children.add(t),(this.enteringChildren||(this.enteringChildren=new Set)).add(t)}removeChild(t){this.children.delete(t),this.enteringChildren?.delete(t)}bindToMotionValue(t,e){let i;if(this.valueSubscriptions.get(t)?.(),e.accelerate&&es.has(t)&&this.current instanceof HTMLElement){let{factory:i,keyframes:s,times:n,ease:r,duration:o}=e.accelerate,a=new ei({element:this.current,name:t,keyframes:s,times:n,ease:r,duration:tH(o)}),l=i(a);this.valueSubscriptions.set(t,()=>{l(),a.cancel()});return}let s=r.has(t);s&&this.onBindTransform&&this.onBindTransform();let n=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&tF.preRender(this.notifyUpdate),s&&(this.projection&&(this.projection.isTransformDirty=!0),en.get(this.current)?.check()),this.scheduleRender()});"u">typeof window&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{n(),i?.()})}sortNodePosition(t){return this.current&&t.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in ew){let e=ew[t];if(!e)continue;let{isEnabled:i,Feature:s}=e;if(!this.features[t]&&s&&i(this.props)&&(this.features[t]=new s(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):G()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){let{transformTemplate:i,onUpdate:s}=this.props;(t.transformTemplate||i)&&this.scheduleRender(),(t.transformTemplate&&!i||t.onUpdate&&!s)&&en.get(this.current)?.demote(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e{this.current&&(this.current.textContent=`${t}`)}))}}function eP(t){return t.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}let eA=(t,e)=>e&&"number"==typeof t?e.transform(t):t,eM={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},eE=n.length,ek={},eC=(t,e,i=eA(e,z[t]))=>(ek[t]||(ek[t]=(eM[t]||t)+"("))+i+")",eV=(t,e)=>("number"==typeof e?e:parseFloat(e))===+!!t.startsWith("scale");function eR(t,e,i){let{style:s,vars:o,transformOrigin:a}=t,l=!1,h=!1;for(let t in e){let i=e[t];if(r.has(t)){l=!0;continue}if(ti(t)){o[t]=i;continue}{let e=eA(i,W[t]);t.startsWith("origin")?(h=!0,a[t]=e):s[t]=e}}if(!e.transform&&(l||i?s.transform=function(t,e,i){let s="";for(let r=0;r"string"==typeof t&&"svg"===t.toLowerCase();function eO(t,{style:e,vars:i},s,n){let r,o=t.style;for(r in e)o[r]=e[r];for(r in n?.applyProjectionStyles(o,s),i)o.setProperty(r,i[r])}let eI={};function eU(t,{layout:e,layoutId:i}){return r.has(t)||t.startsWith("origin")||(e||void 0!==i)&&(!!eI[t]||"opacity"===t)}function eN(t,e,i){let s=t.style,n=e?.style,r={};if(!s)return r;for(let e in s)(q(s[e])||n&&q(n[e])||eU(e,t)||i?.getValue(e)?.liveStyle!==void 0)&&(r[e]=s[e]);return r}function ez(t,e,i){let s=eN(t,e,i);for(let i in t)"children"!==i&&(q(t[i])||q(e[i]))&&(s[-1!==n.indexOf(i)?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i]=t[i]);return s}class eW extends eT{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=G}getBaseTargetFromProps(t,e){return r.has(e)?super.getBaseTargetFromProps(t,e)??tv(e):t[e]}getDefaultValue(t){return r.has(t)?this.latestValues[t]??tv(t):void 0}readValueFromInstance(t,e){if(r.has(e)){let t=H(e);return t&&t.default||0}if(eL.includes(e)){let i=getComputedStyle(t)[e];if("string"==typeof i&&i)return i.trim()}return e=e_.has(e)?e:eP(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,i){return ez(t,e,i)}build(t,e,i){ej(t,e,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,e,i,s){for(let i in eO(t,e,void 0,s),e.attrs)t.setAttribute(e_.has(i)?i:eP(i),e.attrs[i])}mount(t){this.isSVGTag=eB(t.tagName),super.mount(t)}}function e$({top:t,left:e,right:i,bottom:s}){return{x:{min:e,max:i},y:{min:t,max:s}}}let eH=(t,e,i)=>t+(e-t)*i;function eY(t){return void 0===t||1===t}function eX({scale:t,scaleX:e,scaleY:i}){return!eY(t)||!eY(e)||!eY(i)}let eK=["rotate","rotateX","rotateY","rotateZ","skewX","skewY"];function eG(t){return eX(t)||eZ(t)||eq(t)}function eq(t){return t.z||t.rotate||t.rotateX||t.rotateY||t.rotateZ||t.skewX||t.skewY}function eZ(t){var e,i;return(e=t.x)&&"0%"!==e||(i=t.y)&&"0%"!==i}function eJ(t,e,i,s,n){return void 0!==n&&(t=s+n*(t-s)),s+i*(t-s)+e}function eQ(t,e=0,i=1,s,n){t.min=eJ(t.min,e,i,s,n),t.max=eJ(t.max,e,i,s,n)}function e0(t,{x:e,y:i}){eQ(t.x,e.translate,e.scale,e.originPoint),eQ(t.y,i.translate,i.scale,i.originPoint)}function e1(t,e){t.min+=e,t.max+=e}function e2(t,e,i,s,n=.5){let r=eH(t.min,t.max,n);eQ(t,e,i,r,s)}function e3(t,e){return"string"==typeof t?parseFloat(t)/100*(e.max-e.min):t}function e5(t,e,i){let s=i??t;e2(t.x,e3(e.x,s.x),e.scaleX,e.scale,e.originX),e2(t.y,e3(e.y,s.y),e.scaleY,e.scale,e.originY)}function e4(t,e){return e$(function(t,e){if(!e)return t;let i=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:i.y,left:i.x,bottom:s.y,right:s.x}}(t.getBoundingClientRect(),e))}class e9 extends eT{constructor(){super(...arguments),this.type="html",this.renderInstance=eO}mount(t){super.mount(t)}readValueFromInstance(t,e){if(r.has(e))return this.projection?.isProjecting?tv(e):((t,e)=>{let{transform:i="none"}=getComputedStyle(t);return tx(i,e)})(t,e);{let i=window.getComputedStyle(t),s=(ti(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:e}){return e4(t,e)}build(t,e,i){eR(t,e,i.transformTemplate)}scrapeMotionValuesFromProps(t,e,i){return eN(t,e,i)}}var e6=t.i(71645);let e7=["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 e8(t){if("string"!=typeof t||t.includes("-"));else if(e7.indexOf(t)>-1||/[A-Z]/u.test(t))return!0;return!1}var it=t.i(43476);let ie={current:void 0},ii=(0,e6.createContext)({});t.s(["f",0,ii],31178);let is=(0,e6.createContext)({strict:!1}),ir=(0,e6.createContext)({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});t.s(["f",0,ir],37806);let io=(0,e6.createContext)({});function ia(t){return Array.isArray(t)?t.join(" "):t}let il=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ih(t,e,i){for(let s in e)q(e[s])||eU(s,i)||(t[s]=e[s])}let iu=()=>({...il(),attrs:{}}),id=new Set(["animate","exit","variants","initial","style","values","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function ic(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||id.has(t)}function ip(t){return q(t)?t.get():t}function im(t,e,i,s){let n=e=>{let n;return"function"==typeof e?e(void 0!==i?i:t.custom,...(n=[{},{}],s?.values.forEach((t,e)=>{n[0][e]=t.get(),n[1][e]=t.getVelocity()}),n)):e};return"string"==typeof(e=n(e))&&(e=t.variants&&t.variants[e]),n(e)}let iy=(0,e6.createContext)(null);function ig(t){let e=(0,e6.useRef)(null);return null===e.current&&(e.current=t()),e.current}t.s(["f",0,iy],21476),t.s(["f",0,ig],47414);let iv=t=>(e,i)=>{let s=(0,e6.useContext)(io),n=(0,e6.useContext)(iy),r=()=>(function({scrapeMotionValuesFromProps:t,createRenderState:e},i,s,n){return{latestValues:function(t,e,i,s){let n={},r=s(t,{});for(let t in r)n[t]=ip(r[t]);let{initial:o,animate:a}=t,l=ef(t),h=ey(t);e&&h&&!l&&!1!==t.inherit&&(void 0===o&&(o=e.initial),void 0===a&&(a=e.animate));let u=!!i&&!1===i.initial,d=(u=u||!1===o)?a:o;if(d&&"boolean"!=typeof d&&!ed(d)){let e=Array.isArray(d)?d:[d];for(let i=0;iiw[e].some(e=>!!t[e])};ew=t,ib=!0}(),ew}let iP=Symbol.for("motionComponentSymbol"),iA="data-framer-appear-id",iM=(0,e6.createContext)({}),iE="u">typeof window?e6.useLayoutEffect:e6.useEffect;function ik(t,{forwardMotionProps:e=!1,type:i}={},s,n){s&&function(t){let e=iT();for(let i in t)e[i]={...e[i],...t[i]};ew=e}(s);let r=i?"svg"===i:e8(t),o=r?iS:ix;function a(i,s){var a;let l,h,u,d=function({layoutId:t}){let e=(0,e6.useContext)(ii).id;return e&&void 0!==t?e+"-"+t:t}(i);ig(()=>!!ie.current?.sharedNodes.get(d)?.lead&&i.initial)&&(i={...i,initial:!1});let c={...(0,e6.useContext)(ir),...i,layoutId:d},{isStatic:p,isValidProp:m}=c,f=function(t){let{initial:e,animate:i}=function(t,e){if(ef(t)){let{initial:e,animate:i}=t;return{initial:!1===e||ec(e)?e:void 0,animate:ec(i)?i:void 0}}return!1!==t.inherit?e:{}}(t,(0,e6.useContext)(io));return(0,e6.useMemo)(()=>({initial:e,animate:i}),[ia(e),ia(i)])}(i),y=o(i,p);if(!p&&"u">typeof window){(0,e6.useContext)(is).strict;let e=function(t){let{drag:e,layout:i}=iT();if(!e&&!i)return{};let s={...e,...i};return{MeasureLayout:s.MeasureLayout,isEnabled:e?.isEnabled(t)||i?.isEnabled(t),ProjectionNode:s.ProjectionNode}}(c);f.visualElement=function(t,e,i,s,n,r){let{visualElement:o}=(0,e6.useContext)(io),a=(0,e6.useContext)(is),l=(0,e6.useContext)(iy),h=(0,e6.useContext)(ir),u=h.reducedMotion,d=h.skipAnimations,c=(0,e6.useRef)(null),p=(0,e6.useRef)(!1);s=s||a.renderer,!c.current&&s&&(c.current=s(t,{visualState:e,parent:o,props:i,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:u,skipAnimations:d,isSVG:r}),p.current&&c.current&&(c.current.manuallyAnimateOnMount=!0));let m=c.current,f=(0,e6.useContext)(iM);m&&!m.projection&&n&&("html"===m.type||"svg"===m.type)&&function(t,e,i,s){var n;let{layoutId:r,layout:o,drag:a,dragConstraints:l,layoutScroll:h,layoutRoot:u,layoutAnchor:d,layoutCrossfade:c}=e,p=t.projection=new i(t.latestValues,e["data-framer-portal-id"]?void 0:function t(e){if(e)return!1!==e.options.allowProjection?e.projection:t(e.parent)}(t.parent));p.setOptions({layoutId:r,layout:o,alwaysMeasureLayout:!!a||l&&(n=l)&&"object"==typeof n&&Object.prototype.hasOwnProperty.call(n,"current"),visualElement:t,animationType:"string"==typeof o?o:"both",initialPromotionConfig:s,crossfade:c,layoutScroll:h,layoutRoot:u,layoutAnchor:d});let m=p.getStack()?.lead;m&&!p.root.isUpdateBlocked()&&(m.willUpdate(),m.scheduleCheckAfterUnmount())}(c.current,i,n,f),(0,e6.useInsertionEffect)(()=>{m&&m.props!==i&&m.update(i,l)});let y=i[iA],g=(0,e6.useRef)(!!y&&"u">typeof window&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return iE(()=>{p.current&&m&&(m.animationState?.animateChanges(),m.enteringChildren=void 0)},[]),iE(()=>{p.current=!0,m&&(window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),g.current&&m.animationState&&m.animationState.animateChanges())}),(0,e6.useEffect)(()=>{m&&(!g.current&&m.animationState&&m.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(y)}),g.current=!1),m.enteringChildren=void 0)}),m}(t,y,c,n,e.ProjectionNode,r),(e.isEnabled||f.visualElement?.projection?.options.layoutId)&&(l=e.MeasureLayout)}return(0,it.jsxs)(io.Provider,{value:f,children:[l&&f.visualElement?(0,it.jsx)(l,{visualElement:f.visualElement,...c}):null,function(t,e,i,{latestValues:s},n,r=!1,o,a){let l=(o??e8(t)?function(t,e,i,s){let n=(0,e6.useMemo)(()=>{let i=iu();return ej(i,e,eB(s),t.transformTemplate,t.style),{...i.attrs,style:{...i.style}}},[e]);if(t.style){let e={};return ih(e,t.style,t),{...n,style:{...e,...n.style}}}return n}:function(t,e){let i,s,n={},r=(i=t.style||{},ih(s={},i,t),Object.assign(s,function({transformTemplate:t},e){return(0,e6.useMemo)(()=>{let i=il();return eR(i,e,t),Object.assign({},i.vars,i.style)},[e])}(t,e)),s);return t.drag&&!1!==t.dragListener&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===t.drag?"none":`pan-${"x"===t.drag?"y":"x"}`),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=r,n})(e,s,n,t),h=function(t,e,i,s){let n={};for(let r in t)("values"!==r||"object"!=typeof t.values)&&!q(t[r])&&((r.startsWith("on")?!ic(r):s?.(r)??!ic(r))||!0===i&&ic(r)||!e&&!ic(r)||t.draggable&&r.startsWith("onDrag"))&&(n[r]=t[r]);return n}(e,"string"==typeof t,r,a),u=t!==e6.Fragment?{...h,...l,ref:i}:{},{children:d}=e,c=(0,e6.useMemo)(()=>q(d)?d.get():d,[d]);return(0,e6.createElement)(t,{...u,children:c})}(t,i,(a=f.visualElement,h=(0,e6.useRef)(s),(0,e6.useInsertionEffect)(()=>{h.current=s}),u=(0,e6.useRef)(null),(0,e6.useCallback)(t=>{t&&y.onMount?.(t),a&&(t?a.mount(t):a.unmount());let e=h.current;if("function"==typeof e)if(t){let i=e(t);"function"==typeof i&&(u.current=i)}else u.current?(u.current(),u.current=null):e(t);else e&&(e.current=t)},[a])),y,p,e,r,m)]})}a.displayName=`motion.${"string"==typeof t?t:`create(${t.displayName??t.name??""})`}`;let l=(0,e6.forwardRef)(a);return l[iP]=t,l}t.s(["f",0,iE],74008);class iC{constructor(t){this.isMounted=!1,this.node=t}update(){}}function iV(t,e,i){return im(t.getProps(),e,i,t)}let iR=(t,e)=>"exit"===e?t.presenceContext?.custom:void 0;function iD(t,e){if(t?.inherit&&e){let{inherit:i,...s}=t;return{...e,...s}}return t}function iF(t,e){let i=t?.[e]??t?.default??t;return i!==t?iD(i,t):i}function iL(t,e){let i=t.getValue("willChange");if(q(i)&&i.add)return i.add(e);if(!i&&tC.WillChange){let i=new tC.WillChange("auto");t.addValue("willChange",i),i.add(e)}}let ij=(...t)=>t.reduce((t,e)=>i=>e(t(i)));function i_(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 iB(t,e){return i=>i>0?e:t}let iO=(t,e,i)=>{let s=t*t,n=i*(e*e-s)+s;return n<0?0:Math.sqrt(n)},iI=[v,y,M];function iU(t){let e=iI.find(e=>e.test(t));if(!e)return!1;let i=e.parse(t);return e===M&&(i=function({hue:t,saturation:e,lightness:i,alpha:s}){t/=360,i/=100;let n=0,r=0,o=0;if(e/=100){let s=i<.5?i*(1+e):i+e-i*e,a=2*i-s;n=i_(a,s,t+1/3),r=i_(a,s,t),o=i_(a,s,t-1/3)}else n=r=o=i;return{red:Math.round(255*n),green:Math.round(255*r),blue:Math.round(255*o),alpha:s}}(i)),i}let iN=(t,e)=>{let i=iU(t),s=iU(e);if(!i||!s)return iB(t,e);let n={...i};return t=>(n.red=iO(i.red,s.red,t),n.green=iO(i.green,s.green,t),n.blue=iO(i.blue,s.blue,t),n.alpha=eH(i.alpha,s.alpha,t),y.transform(n))},iz=new Set(["none","hidden"]);function iW(t,e){return i=>eH(t,e,i)}function i$(t){return"number"==typeof t?iW:"string"==typeof t?tn(t)?iB:E.test(t)?iN:iX:Array.isArray(t)?iH:"object"==typeof t?E.test(t)?iN:iY:iB}function iH(t,e){let i=[...t],s=i.length,n=t.map((t,i)=>i$(t)(t,e[i]));return t=>{for(let e=0;e{for(let e in s)i[e]=s[e](t);return i}}let iX=(t,e)=>{let i=F(t),s=F(e);if(!(i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length))return iB(t,e);if(iz.has(t)&&!s.values.length||iz.has(e)&&!i.values.length)return iz.has(t)?i=>i<=0?t:e:i=>i>=1?e:t;return ij(iH(function(t,e){let i=[],s={color:0,var:0,number:0};for(let n=0;nu(eH(r,o,t))+n}(t,e);if(i)return i}return i$(t)(t,e)}let iq=t=>{let e=({timestamp:e})=>t(e);return{start:(t=!0)=>tF.update(e,t),stop:()=>tL(e),now:()=>tD.isProcessing?tD.timestamp:t3.now()}};function iZ(t,e=50,i=2e4,s){let n=0,r=t.next(n);for(s?.push(r.value);!r.done&&n=i?1/0:n}let iJ=t=>t<0?1/Math.max(1+t,.05):Math.max(1-t,.05);function iQ(t,e){if(!(t>1))return 1;let i=Math.sqrt(t*t-1),s=t-i,n=t+i,r=2*i*Math.exp(-e)*(1+e);return i1(t=>n*Math.exp(-s*t)-s*Math.exp(-n*t)-r,t=>Math.exp(-n*t)-Math.exp(-s*t),e)/e}function i0(t,e){return t*Math.sqrt(1-e*e)}function i1(t,e,i){let s=i;for(let i=1;i<12;i++)s-=t(s)/e(s);return s}let i2=(t,e)=>(e?t>=0:t>0)&&t<1/0;function i3(t,e){if(i2(t,e))return t}function i5(t=.3,e=.3){let i,s,n,r="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t,a=r.keyframes[0],l=r.keyframes[r.keyframes.length-1],h={done:!1,value:a},{stiffness:u,damping:d,mass:c,duration:p,isResolvedFromDuration:m,isTimeDefined:f}=function(t){let e=i3(t.stiffness),i=i3(t.damping,!0),s=i3(t.mass),n={...t,stiffness:e??100,damping:i??10,mass:s??1,isResolvedFromDuration:!1,isTimeDefined:(e??i??s)===void 0&&(void 0!==t.duration||void 0!==t.bounce)};if(n.isTimeDefined){if(t.visualDuration){let e=iJ(t.bounce||0),i=2*Math.PI/(1.2*t.visualDuration)*iQ(e,2*Math.PI/1.2);n.stiffness=i*i,n.damping=2*e*Math.sqrt(n.stiffness)}else Object.assign(n,function({duration:t=800,bounce:e=.3}){let i,s,n=iJ(e);t=o(.01,10,t/1e3),n<1?(i=e=>{let i=e*n,s=i*t;return .001-i/i0(e,n)*Math.exp(-s)},s=e=>{let s=e*n*t,r=n*n*e*e*t,o=Math.exp(-s),a=i0(e*e,n);return-((-i(e)+.001>0?-1:1)*r)*o/a}):(i=e=>-.001+Math.exp(-e*t)*(e*t+1),s=e=>-(t*t*e*Math.exp(-e*t)));let r=i1(i,s,5/t),a=r*iQ(n,r*t),l=a*a;return{stiffness:l,damping:2*n*Math.sqrt(l),duration:tH(t)}}(n)),n.isResolvedFromDuration=!0;i2(n.stiffness)&&i2(n.damping,!0)||(n.stiffness=100,n.damping=10)}return n}({...r}),y=t=>f?0:-(t/1e3),g=d/(2*Math.sqrt(u*c)),v=Math.sqrt(u/c)/1e3,x=g*v,S={target:l,delta:l-a,velocity:y(r.velocity||0)||0,restSpeed:0,restDelta:0},w=()=>{let t=5>Math.abs(S.delta);S.restSpeed=r.restSpeed||(t?.01:2),S.restDelta=r.restDelta||(t?.005:.5)};if(w(),g<1){let t=i0(v,g),e={A:0,sinC:0,cosC:0,t:-1,env:0,sin:0,cos:0};n=()=>{e.A=(S.velocity+x*S.delta)/t,e.sinC=x*e.A+S.delta*t,e.cosC=x*S.delta-e.A*t};let r=i=>{i!==e.t&&(e.t=i,e.env=Math.exp(-x*i),e.sin=Math.sin(t*i),e.cos=Math.cos(t*i))};i=t=>(r(t),S.target-e.env*(e.A*e.sin+S.delta*e.cos)),s=t=>(r(t),e.env*(e.sinC*e.sin+e.cosC*e.cos))}else if(1===g){i=t=>S.target-Math.exp(-v*t)*(S.delta+(S.velocity+v*S.delta)*t);let t={C:0};n=()=>{t.C=S.velocity+v*S.delta},s=e=>Math.exp(-v*e)*(v*t.C*e-S.velocity)}else{let t=v*Math.sqrt(g*g-1),e=x-t,r=x+t,o=t<1||f?1/0:300/t,a=(t,e)=>Math.exp(e>o?(x-t)*o-x*e:-t*e),l={S:0,F:0};n=()=>{let e=(S.velocity+x*S.delta)/t;l.S=(S.delta+e)/2,l.F=(S.delta-e)/2},i=t=>S.target-l.S*a(e,t)-l.F*a(r,t),s=t=>e*l.S*a(e,t)+r*l.F*a(r,t)}n();let b=m&&p||null,T={calculatedDuration:b,retarget:(t,e)=>{S.target=t[t.length-1],S.delta=S.target-t[0],S.velocity=y(e),r.restSpeed&&r.restDelta||w(),T.calculatedDuration=b,h.done=!1,n()},velocity:t=>tH(s(t)),next:t=>{let e=i(t);return m?h.done=t>=p:h.done=Math.abs(tH(s(t)))<=S.restSpeed&&Math.abs(S.target-e)<=S.restDelta,h.value=h.done?S.target:e,h},toString:()=>{let t=Math.min(iZ(T),2e4),e=t7(e=>T.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return T}let i4=Object.assign(i5,{applyToOptions:t=>{let e=function(t,e=100,i){let{keyframes:s,velocity:n}=t,r=s&&s[s.length-1]-s[0],o=i({...t,velocity:n&&r?n*e/r:n,keyframes:[0,e]}),a=Math.min(iZ(o),2e4);return{type:"keyframes",ease:t=>o.next(a*t).value/e,duration:a/1e3}}(t,100,i5);return t.ease=e.ease,t.duration=tH(e.duration),t.type="keyframes",t}});function i9({keyframes:t,velocity:e=0,power:i=.8,timeConstant:s=325,bounceDamping:n=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:h=.5,restSpeed:u}){let d,c,p=t[0],m={done:!1,value:p},f=i*e,y=p+f,g=o?o(y):y;g!==y&&(f=g-p);let v=t=>-f*Math.exp(-t/s),x=t=>{let e=v(t);m.done=Math.abs(e)<=h,m.value=m.done?g:t?g+e:p},S=t=>{let e;if((e=m.value)l){var i;d=t,c=i4({keyframes:[m.value,(i=m.value,void 0===a?l:void 0===l||Math.abs(a-i){let e=!1;return(c||void 0!==d||(e=!0,x(t),S(t)),void 0!==d&&t>=d)?c.next(t-d):(e||x(t),m)}}}let i6=(t,e,i)=>t*(3*(1-t)*((1-t)*e+t*i)+t*t);function i7(t,e,i,s){return t===e&&i===s?tk:n=>{let r=0,o=1,a=n;for(let e=0;;e++){a>=r&&a<=o||(a=(r+o)/2);let s=i6(a,t,i)-n;if(s*s<1e-28||40===e)break;s>0?o=a:r=a,a-=1e-7*s/(i6(a+1e-7,t,i)-n-s)}return i6(a,e,s)}}let i8=i7(.42,0,1,1),st=i7(0,0,.58,1),se=i7(.42,0,.58,1),si=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,ss=t=>e=>1-t(1-e),sn=i7(.33,1.53,.69,.99),sr=ss(sn),so=si(sr),sa=t=>t>=1?1:(t*=2)<1?.5*sr(t):.5*(2-Math.pow(2,-10*(t-1))),sl=t=>1-Math.sin(Math.acos(t)),sh=ss(sl),su=si(sl),sd={linear:tk,easeIn:i8,easeInOut:se,easeOut:st,circIn:sl,circInOut:su,circOut:sh,backIn:sr,backInOut:so,backOut:sn,anticipate:sa},sc=t=>{if(t9(t)){tt.default;let[e,i,s,n]=t;return i7(e,i,s,n)}return"string"==typeof t?(tt.default,sd[t]):t},sp=(t,e,i)=>{let s=e-t;return s?(i-t)/s:1};function sm(t){let e=[0];return!function(t,e){let i=t[t.length-1];for(let s=1;s<=e;s++){let n=sp(0,e,s);t.push(eH(i,1,n))}}(e,t.length-1),e}function sf({duration:t=300,keyframes:e,times:i,ease:s="easeInOut"}){var n;let r=Array.isArray(s)&&"number"!=typeof s[0]?s.map(sc):sc(s)||se,a={done:!1,value:e[0]};if(2===e.length&&!Array.isArray(r)&&(!i||2!==i.length||0===i[0]&&1===i[1])){let[i,s]=e,n=i===s?void 0:(tC.mix||iG)(i,s);return{calculatedDuration:t,next:e=>(a.value=n?n(r(t>0?o(0,1,e/t):1)):s,a.done=e>=t,a)}}let l=function(t,e,{clamp:i=!0,ease:s,mixer:n}={}){let r=t.length;if(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 l=function(t,e,i){let s=[],n=i||tC.mix||iG,r=t.length-1;for(let i=0;i{if(a&&i1)for(;su(o(t[0],t[r-1],e)):u}((n=i&&i.length===e.length?i:sm(e),n.map(e=>e*t)),e,{ease:Array.isArray(r)?r:e.map(()=>r||se).splice(0,e.length-1)});return{calculatedDuration:t,next:e=>(a.value=l(e),a.done=e>=t,a)}}let sy={decay:i9,inertia:i9,tween:sf,keyframes:sf,spring:i4};function sg(t){"string"==typeof t.type&&(t.type=sy[t.type])}let sv=(t,e)=>e-t>40&&!tC.useManualTiming?e:t,sx=t=>t/100,sS=t=>Math.round(1e4*t)/1e4;class sw extends t1{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:t}=this.options;t&&t.updatedAt!==t3.now()&&this.tick(t3.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause(),t4(this,this.options)}initAnimation(){let{options:t}=this;sg(t);let{type:e=sf,repeat:i=0,repeatDelay:s=0,repeatType:n,velocity:r=0}=t,{keyframes:o}=t,a=e||sf;a!==sf&&"number"!=typeof o[0]&&(this.mixKeyframes=ij(sx,iG(o[0],o[1])),o=[0,100]);let l=a(o===t.keyframes?t:{...t,keyframes:o});"mirror"===n&&(this.mirroredGenerator=a({...t,keyframes:[...o].reverse(),velocity:-r})),null===l.calculatedDuration&&(l.calculatedDuration=iZ(l));let{calculatedDuration:h}=l;this.calculatedDuration=h,this.resolvedDuration=h+s,this.totalDuration=this.resolvedDuration*(i+1)-s,this.generator=l}updateTime(t){this.currentTime=this.holdTime??Math.round(t-this.startTime)*this.playbackSpeed}tick(t,e=!1){let{generator:i,totalDuration:s,calculatedDuration:n}=this;if(null===this.startTime)return i.next(0);let{delay:r=0,keyframes:o,type:a,onUpdate:l,finalKeyframe:h}=this.options;this.startTime===this.pendingStartTime&&(this.startTime=sv(this.startTime,t)),this.pendingStartTime=void 0,this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);let u=this.currentTime-r*(this.playbackSpeed>=0?1:-1),d=this.playbackSpeed>=0?u<0:u>s;this.currentTime=Math.max(u,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=s);let c=this.generate(this.currentTime,d),{done:p}=c;d||(p=this.playbackSpeed>=0?n<1/0?this.currentTime>=s:p:this.currentTime<=0);let m=null===this.holdTime&&("finished"===this.state||"running"===this.state&&p);return m&&a!==i9&&(c.value=t0(o,this.options,h,this.speed)),l&&l(c.value),m&&this.finish(),c}at(t){return this.holdTime??sS((t-this.startTime)*this.playbackSpeed)}sampleAt(t,e){let{options:i,totalDuration:s}=this,n=this.at(t)-(i.delay||0);return n>=s&&i.type!==i9?t0(i.keyframes,i,e?void 0:i.finalKeyframe):this.generate(Math.max(n,0),n<0).value}generate(t,e){let i,{generator:s,totalDuration:n,mixKeyframes:r,mirroredGenerator:a,resolvedDuration:l}=this,{keyframes:h,repeat:u,repeatType:d,repeatDelay:c}=this.options,p=t,m=s;if(u){let e=Math.min(t,n)/l,i=Math.floor(e),s=e%1;!s&&e>=1&&(s=1),1===s&&i--,(i=Math.min(i,u+1))%2&&("reverse"===d?(s=1-s,c&&(s-=c/l)):"mirror"===d&&(m=a)),p=o(0,1,s)*l}return e?(this.delayState.value=h[0],i=this.delayState):i=m.next(p),r&&!e&&(i.value=r(i.value)),i}get duration(){return this.calculatedDuration/1e3}get iterationDuration(){return this.duration+(this.options.delay??0)/1e3}get time(){return this.currentTime/1e3}set time(t){t=tH(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){return function(t,e,i=0){var s,n;let r;return e<=0?i:t.velocity?t.velocity(e):(s=e=>t.next(e).value,n=t.next(e).value,eo(n-s(r=Math.max(e-5,0)),e-r))}(this.generator,this.currentTime,this.options.velocity)}get speed(){return this.playbackSpeed}set speed(t){let e=this.playbackSpeed!==t;e&&this.driver&&this.updateTime(t3.now()),this.playbackSpeed=t,e&&this.driver&&(this.time=this.currentTime/1e3)}play(){if(this.isStopped)return;let{driver:t=iq,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.playbackSpeed||1):this.startTime||(this.startTime=e??(this.pendingStartTime=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(t3.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.driver?.stop(),this.driver=void 0,this.startTime=this.holdTime=null}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 sb={anticipate:sa,backInOut:so,circInOut:su};class sT extends ei{constructor(t){"string"==typeof t.ease&&t.ease in sb&&(t.ease=sb[t.ease]),sg(t),super(t),void 0!==t.startTime&&!1!==t.autoplay&&(this.startTime=t.startTime),this.options=t}elapsed(){return"running"===this.state?(t3.now()-this.startTime)*this.speed:1e3*this.time}sample(t){if(!this.sampler){let{motionValue:t,onUpdate:e,onComplete:i,onPlay:s,onStop:n,element:r,...o}=this.options;this.sampler=new sw({...o,autoplay:!1}),this.sampler.stop()}return this.sampler.sample(Math.max(0,t)).value}liveValue(){let{state:t}=this;if("running"===t||"paused"===t)return this.sample(this.elapsed())}updateMotionValue(t){let{motionValue:e,element:i,name:s}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);let{speed:n}=this,r=this.elapsed(),a="running"===this.state&&n?o(0,10,r):0,l=this.sample(r);i&&s&&tG(i,s,l),e.setWithVelocity(this.sample(r-a*Math.sign(n)),l,a/Math.abs(n||1))}}let sP=(t,e)=>"zIndex"!==e&&!!("number"==typeof t||Array.isArray(t)||"string"==typeof t&&(j.test(t)||"0"===t)&&!t.startsWith("url("));function sA(t){t.duration=0,t.type="keyframes"}let sM=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/,sE=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),sk=()=>!tC.useManualTiming&&Object.hasOwnProperty.call(Element.prototype,"animate"),sC=(t,e)=>t-e,sV=(t,e,i)=>{let s=[];for(let n=0;n<=i;n++)s.push(eH(t,e,n/i));return s},sR=(t,e)=>t.latestValues?t.latestValues[e]:t.getValue(e)?.get();class sD extends sw{constructor(t){let e,i=t.motionValue.owner.current,{driver:s=iq}=t,n=function(t){let e=t.motionValue.owner,{onUpdate:i,transformTemplate:s}=e.getProps();return!t.isHandoff&&!i&&!t.hasOnUpdate&&!s&&"inertia"!==t.type&&"none"===(sR(e,"transform")||"none")&&!sR(e,"pathRotation")&&!e.projection?.isProjecting()}(t);t.driver=t=>{let n=s(t);return{js:n,now:n.now,start:(t=!0)=>{let e=en.get(i);!e||e.isJS?n.start(t):e.schedule(!1,!t)},stop:()=>{n.stop();let t=en.get(i);t&&!t.isFinishing&&t.release(e)}}},super(t),e=this,this.canAccelerate=n;let{stop:r}=this;this.stop=()=>{this.isAccelerated()&&this.sync(),r()}}get group(){let t;return t=this.options.motionValue.owner.current,en.get(t)}get js(){return this.driver?.js}get name(){return this.options.name}timing(){let{startTime:t,speed:e,totalDuration:i}=this,{delay:s=0,repeatType:n}=this.options;return null!==this.holdTime?[1/0,0]:1/0===i?[t+s/e,this.resolvedDuration*("loop"===n?1:2)/e||1]:[t+(s+i)/e,0]}isAccelerated(){let{group:t,state:e}=this;return t?.tracks.has(this)&&!t.isJS&&this.canAccelerate&&("running"===e||"paused"===e)}liveValue(){return this.isAccelerated()?this.sampleAt(t3.now()):void 0}tween(){let{keyframes:t,type:e,ease:i,times:s,repeat:n,delay:r=0}=this.options,o=t9(i)?t8(i):/^(linear|ease(In|Out|InOut))$/.test(i)&&et[i];if(o&&!n&&!s&&2===t.length&&e===sf&&null===this.holdTime){let t=this.startTime+r/this.speed;return[t,t+this.resolvedDuration/this.speed,o]}}boundaries(t,e){let{startTime:i,speed:s,resolvedDuration:n,options:r}=this,{delay:o=0,repeat:a=0,repeatDelay:l=0,repeatType:h,times:u,keyframes:d,type:c}=r,p=(c||sf)===sf?u||sm(d):[0,1],m=i+o/s,f=[];if(null!==this.holdTime||!(n>0))return f;for(let i=Math.max(0,Math.floor((t-m)*s/n));i<=a;i++){let r=m+i*n/s;if(r>e)break;for(let o of p){let a=r+(i%2&&h&&"loop"!==h?1-o:o)*(n-l)/s;a>t&&a{for(let e of i)if(e.name===t)return!0},f=(e,i)=>{let a={};for(let l of void 0===e?n:o){let n=s.get(l),o=void 0===e?sR(t,l):n?n.sampleAt(i>e&&!n.timing()[1]?i:e):r[l];void 0!==o&&(a[l]=o)}return a},y=(t,e)=>{let i="";for(let s in t){let n=t[s];e&&eV(s,n)||(i+=eC(s,n)+" ")}return(e?i.trim():i)||"none"},g=(t=f())=>{e.style.transform=y(t,!0)},v=(t=!0)=>{t&&g(),l.forEach(({animation:t})=>t.cancel()),l=[]},x=(t,i)=>new Animation(new KeyframeEffect(e,t,i)),S=(t,e,i=1/0)=>{let s={animation:t,offset:e,end:i};t.startTime=t3.now()+e,i<1/0&&(t.onfinish=()=>{s.isDone=!0,l.some(t=>1/0===t.end)&&(t.cancel(),l=l.filter(t=>t!==s)),A.schedule(!1)}),t.oncancel=()=>l.includes(s)&&A.demote(),l.push(s)},w=(t,e,i)=>{let s=(e,i)=>Math.abs(t(i)-t(e)),n=s(e,i);for(;i-e>.01;){let t=(e+i)/2;s(e,t)>s(t,i)?i=t:e=t}return s(e,i)>n/2?[e,i]:[]},b=(t,e,i,s={fill:"both"},n,r)=>{let o=t.flatMap(t=>t.boundaries(e,i)),a=r||((t,e,i,s)=>{let n,r,o=Math.min(200,Math.max(2,Math.ceil((i-e)/10)));if(4*s.length>o)return;let a=sV(e,i,o).concat(s).sort(sC);for(let e of t){let t=a.map(t=>e.numberAt(t)),[i]=t,s=t.map(t=>t-i),o=s[s.length-1],l=s.some(t=>.001*Math.abs(t)>Math.abs(o))?0:o,h=s.map(t=>l?t/l:t);if(l)if(n){if(h.some((t,e)=>!(.001>=Math.abs(t-n[e]))))return}else n=h,r=t=>(e.numberAt(t)-i)/l;else if(h.some(t=>!(.001>=Math.abs(t))))return}if(!n||n.every((t,s)=>.001>=Math.abs(t-sp(e,i,a[s]))))return"linear";let l=[],h=(t,s=r(t))=>l.push(sS(s)+" "+sS(100*sp(e,i,t))+"%");return n.forEach((t,e)=>{e&&Math.abs(t-n[e-1])>.2&&w(r,a[e-1],a[e]).forEach(t=>h(t)),h(a[e],t)}),"linear("+l+")"})(t,e,i,o),l=a?[e,i]:((t,e,i,s)=>{let n=[e],r=(e,i,s)=>{if(i-e<1||t.every(t=>!(Math.abs(t.numberAt((e+i)/2)-(t.numberAt(e)+t.numberAt(i))/2)>(t.name.startsWith("scale")?.001:.1))))n.push(i);else if(s<4)r(e,(e+i)/2,s+1),r((e+i)/2,i,s+1);else{for(let s of t)n.push(...w(t=>s.numberAt(t),e,i));n.push(i)}},o=sV(e,i,Math.ceil((i-e)/100));for(let t of s)o.push(t,Math.min(t+.01,i));let a=e;for(let t of o.sort(sC))t>a&&r(a,t,0),a=t;return n.sort(sC)})(t,e,i,o),h=l.map(t=>y(f(t,n))),u={transform:h};return a||(u.offset=l.map(t=>sp(e,i,t))),h.every(t=>t===h[0])&&(g(f(e,n)),u=null),x(u,{...s,duration:i-e,easing:a||"linear"})},T=()=>!i.size&&(d=!0,en.get(e)===A&&en.delete(e),A.isJS||v(),!0),P=()=>{let e=t3.now();if(A.isJS||(A.isFinishing=!0,i.forEach(i=>{let[s,n]=i.timing();"running"===i.state&&i.speed>0&&!n&&s<=e+1&&(i.complete(),r[i.name]=sR(t,i.name),a.has(i)||(h=!0))}),A.isFinishing=!1),u=!1,d||(i.forEach(({state:t},e)=>{("idle"===t||"finished"===t)&&i.delete(e)}),T()))return;for(let t of i)if(!t.canAccelerate)return A.demote(!0);A.isJS&&(A.isJS=!1,h=!0,i.forEach(t=>t.js?.stop()));let m=h,f=c;if(h=c=!1,m||!(t=>{let e,s=0;for(let n of i){let i=a.get(n);if(!i)return!1;let[r,o,l]=i,h=n.at(t),u=1/0===n.timing()[0];if(l){if(u&&h===r)continue;return!1}let d=(h-r)/o,c=u?0:n.speed/o;if(void 0===e)e=d,s=c;else if(Math.abs(d-e)>1||c!==s)return!1}if(void 0===e)return!0;if(!l.length)return!1;for(let{offset:t,end:i,isDone:s}of l){let n=e-t;if(i<1/0&&(s?n=i))return!1}for(let{animation:i,offset:n,isDone:r}of l){if(r)continue;let o=e-n;s&&i.updatePlaybackRate&&"running"===i.playState&&20>Math.abs(Number(i.currentTime)-o)?i.playbackRate!==s&&i.updatePlaybackRate(s):s?(i.playbackRate=s,i.startTime=t-o/s):(i.startTime=null,i.currentTime=o)}return!0})(e)){if(f){if(e-p<100)return A.demote();p=e}if(!(e=>{let h=e,u=0,d=0,c=[],p=[],m=new Set;for(let t of(s.clear(),a=new Map,i)){s.set(t.name,t);let[i,n]=t.timing(),r=1/0===i;if(a.set(t,[t.at(e),t.speed,r]),r){t.sync();continue}if(t.speed<0)return;if(n){if(u){let t=(i-d)/n;if(Math.abs(n-u)>1||Math.abs(t-Math.round(t))*u>1)return}else u=n,d=i;p.push(t)}else m.add(i);c.push(t),h=Math.max(h,i)}r={},o=n.filter(e=>{if(s.has(e))return!0;let i=r[e]=sR(t,e);return void 0!==i&&parseFloat(i)!==+!!e.startsWith("scale")}),v(!1);let f=!u&&(t=>{let e;for(let i of t){let t=i.tween();if(!t||e?.some((e,i)=>i<2?Math.abs(t[i]-e)>1:t[i]!==e))return;e=t}return e})(c);try{if(f&&f[1]>e){let[t,i,s]=f;S(b(c,t,i,void 0,void 0,s),t-e,i-t)}else h>e&&(S(b(c,e,h),0,h-e),m.forEach(t=>t{e.isAccelerated()&&e.sync(),t||(e.canAccelerate=!1)}),A.isJS=!0,a=new Map,v(),i.forEach(t=>"running"===t.state&&t.js?.start()),!0}},en.set(e,A),A)).tracks.add(this),super.play())}pause(){super.pause(),this.isAccelerated()&&(this.sync(),this.group.schedule(!1))}complete(){super.complete();let{group:t}=this;t&&!t.isJS&&this.canAccelerate&&this.tick(t3.now())}get time(){return this.isAccelerated()?o(0,this.totalDuration,this.at(t3.now())-(this.options.delay||0))/1e3:super.time}set time(t){super.time=t,this.isAccelerated()&&this.sync()}attachTimeline(t){return this.canAccelerate=!1,this.group?.demote(!0),super.attachTimeline(t)}}class sF extends t1{constructor(t){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=t3.now();let{keyframes:e,name:i,motionValue:s,element:n}=t;t.autoplay??(t.autoplay=!0),t.delay??(t.delay=0),t.type??(t.type="keyframes"),t.repeat??(t.repeat=0),t.repeatDelay??(t.repeatDelay=0),t.repeatType??(t.repeatType="loop");let r=n?.KeyframeResolver||tz;this.keyframeResolver=new r(e,(e,i,s)=>this.onKeyframesResolved(e,i,t,!s),i,s,n),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,e,i,s){let r;this.keyframeResolver=void 0;let{name:o,type:a,velocity:l,delay:h,isHandoff:u,onUpdate:d}=i;this.resolvedAt=t3.now();let c=function(t,e,i,s){let n=t[0];if(null===n)return!1;if("display"===e||"visibility"===e)return!0;let r=t[t.length-1],o=sP(n,e),a=sP(r,e);return!!o&&!!a&&(function(t){let e=t[0];if(1===t.length)return!0;for(let i=0;i{p?.(),this.notifyFinished()};let m=c&&!u&&function(t){let{motionValue:e,name:i,repeatDelay:s,repeatType:n,damping:r,type:o,keyframes:a}=t;if(!i||!(es.has(i)||sE.has(i)))return!1;let l=e?.owner?.current;if(!(l instanceof HTMLElement)&&!(l instanceof SVGElement))return!1;let{onUpdate:h,transformTemplate:u}=e.owner.getProps();return sk()&&(es.has(i)||sE.has(i)&&function(t){for(let e=0;et&&n.includes(t)&&e?.owner?.current instanceof HTMLElement&&sk()&&t6())(i);if(s&&(m||f||this.resolvedAt!==this.createdAt)&&(i.startTime??(i.startTime=sv(this.createdAt,this.resolvedAt))),m){i.element=i.motionValue?.owner?.current;try{r=new sT(i)}catch{r=new sw(i)}}else r=f?new sD(i):new sw(i);this.pendingTimeline&&(this.stopTimeline=r.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=r}get finished(){return this._animation?this._animation.finished:super.finished}then(t,e){return this.finished.finally(t).then(()=>{})}liveValue(){return this._animation?.liveValue?.()}get animation(){return this._animation||(this.keyframeResolver?.resume(),tI=!0,tN(),tU(),tI=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation?.cancel(),this.keyframeResolver?.cancel()}}let sL={type:"spring",stiffness:500,damping:25,restSpeed:10},sj={type:"keyframes",duration:.8},s_={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},sB=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed","out"]),sO=(t,e,i,s={},n,o)=>a=>{let l=iF(s,t)||{},h=l.delay||s.delay||0,{elapsed:u=0}=s;u-=tH(h);let d={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:e.getVelocity(),...l,delay:-u,onUpdate:t=>{e.set(t),l.onUpdate&&l.onUpdate(t)},onComplete:()=>{a(),l.onComplete&&l.onComplete()},name:t,motionValue:e,element:o?void 0:n,hasOnUpdate:!!l.onUpdate};!function(t){for(let e in t)if(!sB.has(e))return!0;return!1}(l)&&Object.assign(d,((t,{keyframes:e})=>e.length>2?sj:r.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:sL:s_)(t,d)),d.duration&&(d.duration=tH(d.duration)),d.repeatDelay&&(d.repeatDelay=tH(d.repeatDelay)),void 0!==d.from&&(d.keyframes[0]=d.from);let c=!1;if(!1!==d.type&&(0!==d.duration||d.repeatDelay)||(sA(d),0===d.delay&&(c=!0)),(tC.instantAnimations||tC.skipAnimations||n?.shouldSkipAnimations||l.skipAnimations)&&(c=!0,sA(d),d.delay=0),d.allowFlatten=!l.type&&!l.ease,c&&!o&&void 0!==e.get()){let t=t0(d.keyframes,l);if(void 0!==t)return void tF.update(()=>{d.onUpdate(t),d.onComplete()})}return l.isSync?new sw(d):new sF(d)},sI="u">typeof window;function sU(t,e,{delay:i=0,transitionOverride:s,type:n}={}){let{transition:r,transitionEnd:o,...a}=e,l=t.getDefaultTransition();r=r?iD(r,l):l;let h=r?.reduceMotion,u=r?.skipAnimations;s&&(r=s);let d=[],c=n&&t.animationState?.getState()[n],p=r?.path;for(let e in p&&(p.animateValues?p.animateValues(e=>t.getValue(e,t.latestValues[e]??0),a,r,i,d):p.animateVisualElement?.(t,a,r,i,d)),a){let s=t.getValue(e,t.latestValues[e]??null),n=a[e];if(void 0===n||c&&function({protectedKeys:t,needsAnimating:e},i){let s=i in t&&!e[i];return e[i]=!1,s}(c,e))continue;let o={delay:i,...iF(c?.out[e]||r||{},e)};u&&(o.skipAnimations=!0);let l=s.get();if(void 0!==l&&!s.isAnimating()&&!Array.isArray(n)&&n===l&&!o.velocity){tF.update(()=>s.set(n));continue}let p=!1;if(sI&&window.MotionHandoffAnimation){let i=t.props[iA];if(i){let t=window.MotionHandoffAnimation(i,e,tF);null!==t&&(o.startTime=t,p=!0)}}iL(t,e);let m=h??t.shouldReduceMotion;s.start(sO(e,s,n,m&&Z.has(e)?{type:!1}:o,t,p));let f=s.animation;f&&d.push(f)}if(o){let e=()=>tF.update(()=>{o&&function(t,e){let{transitionEnd:i={},transition:s={},...n}=iV(t,e)||{};for(let e in n={...n,...i}){var r;let i=Array.isArray(r=n[e])?r[r.length-1]||0:r;t.hasValue(e)?t.getValue(e).set(i):t.addValue(e,eh(i))}}(t,o)});d.length?Promise.all(d).then(e):e()}return d}function sN(t,e,i,s=0,n=1){let r=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),o=t.size,a=(o-1)*s;return"function"==typeof i?i(r,o):1===n?r*s:a-r*s}function sz(t,e,i={}){let s=iV(t,e,iR(t,i.type)),n=i.transitionOverride||(s?.transition??(t.getDefaultTransition()||{})),r=()=>Promise.all(s?sU(t,s,i):[]),o=(s=0)=>{let{variantChildren:r}=t,{delayChildren:o=0,staggerChildren:a,staggerDirection:l}=n,h=[];return r?.forEach(t=>{t.notify("AnimationStart",e),h.push(sz(t,e,{...i,delay:s+("function"==typeof o?0:o)+sN(r,t,o,a,l)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(h)},{when:a}=n;return a?"beforeChildren"===a?r().then(()=>o()):o().then(r):Promise.all([r(),o(i.delay)])}function sW(t,e){if(!Array.isArray(e))return!1;let i=e.length;if(i!==t.length)return!1;for(let s=0;st?.out===!0?t:t?.out;function sY(){let t={};for(let e of ep)t[e]={isActive:"animate"===e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{},out:{}};return t}let sX=0;function sK(t,e,i,s={passive:!0}){return t.addEventListener(e,i,s),()=>t.removeEventListener(e,i,s)}let sG=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function sq(t){return{point:{x:t.pageX,y:t.pageY}}}function sZ(t,e,i,s){return sK(t,e,t=>sG(t)&&i(t,sq(t)),s)}function sJ(t){return t.max-t.min}function sQ(t,e,i,s=.5){t.origin=s,t.originPoint=eH(e.min,e.max,t.origin),t.scale=sJ(i)/sJ(e),t.translate=eH(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 s0(t,e,i,s){sQ(t.x,e.x,i.x,s?.originX),sQ(t.y,e.y,i.y,s?.originY)}function s1(t,e,i,s=0){t.min=(s?eH(i.min,i.max,s):i.min)+e.min,t.max=t.min+sJ(e)}function s2(t,e,i,s=0){let n=s?eH(i.min,i.max,s):i.min;t.min=e.min-n,t.max=t.min+sJ(e)}function s3(t,e,i,s){s2(t.x,e.x,i.x,s?.x),s2(t.y,e.y,i.y,s?.y)}function s5(t){return[t("x"),t("y")]}let s4={};function s9(t){return s4.current?.add(t),t}let s6=t=>s4.current?s4.current.bind(t):t,s7=t=>"object"==typeof t&&null!==t;function s8(t){return s7(t)&&"ownerSVGElement"in t}function nt(t,e,i){if(null==t)return[];if(t instanceof EventTarget)return[t];if("string"==typeof t){let s=e?e.current:s4.current?.root||document,n=i?.[t]??s.querySelectorAll(t);return n?Array.from(n):[]}return Array.from(t).filter(t=>null!=t)}let ne=new WeakMap,ni=(t,e,i)=>(s,n)=>n&&n[0]?n[0][t+"Size"]:s8(s)&&"getBBox"in s?s.getBBox()[e]:s[i],ns=ni("inline","width","offsetWidth"),nn=ni("block","height","offsetHeight");function nr({target:t,borderBoxSize:e}){ne.get(t)?.forEach(i=>{i(t,{get width(){return ns(t,e)},get height(){return nn(t,e)}})})}function no(t){t.forEach(nr)}let na=new Set;function nl(t,e){let n;return s9("function"==typeof t?(na.add(t),s||(s=()=>{let t={get width(){return window.innerWidth},get height(){return window.innerHeight}};na.forEach(e=>e(t))},window.addEventListener("resize",s)),()=>{na.delete(t),na.size||"function"!=typeof s||(window.removeEventListener("resize",s),s=void 0)}):(!i&&"u">typeof ResizeObserver&&(i=new ResizeObserver(no)),(n=nt(t)).forEach(t=>{let s=ne.get(t);s||(s=new Set,ne.set(t,s)),s.add(e),i?.observe(t)}),()=>{n.forEach(t=>{let s=ne.get(t);s?.delete(e),s?.size||i?.unobserve(t)})}))}let nh=(t,e)=>Math.abs(t-e),nu=new Set(["auto","scroll"]);class nd{constructor(t,e,{transformPagePoint:i,contextWindow:s=window,dragSnapToOrigin:n=!1,distanceThreshold:r=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.onElementScroll=t=>{this.handleScroll(t.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{var t,e;if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.hasPendingMove=!1,this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=np(this.lastRawMoveEventInfo,this.transformPagePoint));let i=nf(this.lastMoveEventInfo,this.history),s=null!==this.startEvent,n=(t=i.offset,e={x:0,y:0},Math.sqrt(nh(t.x,e.x)**2+nh(t.y,e.y)**2)>=this.distanceThreshold);if(!s&&!n)return;let{point:r}=i;this.history.push({...r,timestamp:t3.now()});let{onStart:o,onMove:a}=this.handlers;s||(o?.(this.lastMoveEvent,i),this.startEvent=this.lastMoveEvent),a?.(this.lastMoveEvent,i)},this.handlePointerMove=(t,e)=>{this.handleScroll(window),this.lastMoveEvent=t,this.lastRawMoveEventInfo=e,this.lastMoveEventInfo=np(e,this.transformPagePoint),this.hasPendingMove=!0,tF.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.hasPendingMove&&this.updatePoint(),this.end();let{onEnd:i,onSessionEnd:s,resumeAnimation:n}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&n?.(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let r=nf("pointercancel"===t.type?this.lastMoveEventInfo:np(e,this.transformPagePoint),this.history);this.startEvent&&i?.(t,r),s?.(t,r)},!sG(t))return;this.dragSnapToOrigin=n,this.handlers=e,this.transformPagePoint=i,this.distanceThreshold=r,this.contextWindow=s||window;let a=np(sq(t),this.transformPagePoint),{point:l}=a;this.history=[{...l,timestamp:t3.now()}];let{onSessionStart:h}=e;h&&h(t,nf(a,this.history));let u={passive:!0,capture:!0};this.removeListeners=ij(sZ(this.contextWindow,"pointermove",this.handlePointerMove,u),sZ(this.contextWindow,"pointerup",this.handlePointerUp,u),sZ(this.contextWindow,"pointercancel",this.handlePointerUp,u)),o&&this.startScrollTracking(o)}startScrollTracking(t){let e=t.parentElement;for(;e;){let t=getComputedStyle(e);(nu.has(t.overflowX)||nu.has(t.overflowY))&&this.scrollPositions.set(e,nc(e)),e=e.parentElement}this.scrollPositions.set(window,nc(window)),this.removeScrollListeners=ij(sK(window,"scroll",this.onElementScroll,{capture:!0}),sK(window,"scroll",this.onWindowScroll,{}))}handleScroll(t){let e=this.scrollPositions.get(t);if(!e)return;let i=t===window,s=nc(t),n={x:s.x-e.x,y:s.y-e.y};(0!==n.x||0!==n.y)&&(i?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=n.x,this.lastMoveEventInfo.point.y+=n.y):this.history.length>0&&(this.history[0].x-=n.x,this.history[0].y-=n.y),this.scrollPositions.set(t,s),tF.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners?.(),this.removeScrollListeners?.(),this.scrollPositions.clear(),tL(this.updatePoint)}}let nc=t=>t===window?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop};function np(t,e){return e?{point:e(t.point)}:t}function nm(t,e){return{x:t.x-e.x,y:t.y-e.y}}function nf({point:t},e){return{point:t,delta:nm(t,ny(e)),offset:nm(t,e[0]),velocity:function(t){if(t.length<2)return{x:0,y:0};let e=t.length-1,i=null,s=ny(t);for(;e>=0&&(i=t[e],!(s.timestamp-i.timestamp>tH(.1)));)e--;if(!i)return{x:0,y:0};i===t[0]&&t.length>2&&s.timestamp-i.timestamp>2*tH(.1)&&(i=t[1]);let n=(s.timestamp-i.timestamp)/1e3;if(0===n)return{x:0,y:0};let r={x:(s.x-i.x)/n,y:(s.y-i.y)/n};return 1/0===r.x&&(r.x=0),1/0===r.y&&(r.y=0),r}(e)}}function ny(t){return t[t.length-1]}let ng=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),nv=new Set(["INPUT","SELECT","TEXTAREA"]),nx={x:!1,y:!1};function nS(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 nw(t,e){let i=e.min-t.min,s=e.max-t.max;return e.max-e.mint.getProps()){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=G(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t,this.readProps=e}start(t,{snapToCursor:e=!1,distanceThreshold:i}={}){if(this.visualElement.presenceContext?.isPresent===!1)return;let s=t=>{e&&this.snapToCursor(t),this.stopAnimation()},n=(t,e)=>{let{drag:i,dragPropagation:s,onDragStart:n}=this.getProps();if(i&&!s&&(this.openDragLock?.(),this.openDragLock=function(t){if("x"===t||"y"===t)if(nx[t])return null;else return nx[t]=!0,()=>{nx[t]=!1};return nx.x||nx.y?null:(nx.x=nx.y=!0,()=>{nx.x=nx.y=!1})}(i),!this.openDragLock))return;this.latestPointerEvent=t,this.latestPanInfo=e,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints();let{projection:r}=this.visualElement;r&&(r.isAnimationBlocked=!0,r.target=void 0),s5(t=>{let e=this.getAxisMotionValue(t).get()||0;if(tn(e)&&(e=tl(e,this.visualElement.current)||0),b.test(e))e=parseFloat(e);else if(w.test(e)){let i=r?.layout?.layoutBox[t];i&&(e=sJ(i)*(parseFloat(e)/100))}this.originPoint[t]=e}),n&&tF.update(()=>n(t,e),!1,!0),iL(this.visualElement,"transform"),this.visualElement.animationState?.setActive("whileDrag",!0)},r=(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e;let{dragPropagation:i,dragDirectionLock:s,onDirectionLock:n,onDrag:r}=this.getProps();if(!i&&!this.openDragLock)return;let{offset:o}=e;if(s&&null===this.currentDirection){if(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}(o),null===this.currentDirection)return;n&&n(this.currentDirection)}this.updateAxis("x",o),this.updateAxis("y",o),this.visualElement.render(),r&&tF.update(()=>r(t,e),!1,!0)},o=(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e,this.stop(t,e),this.latestPointerEvent=null,this.latestPanInfo=null},a=()=>{let{dragSnapToOrigin:t}=this.getProps();(t||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new nd(t,{onSessionStart:s,onStart:n,onMove:r,onSessionEnd:o,resumeAnimation:a},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:i,contextWindow:this.visualElement.current?.ownerDocument.defaultView,element:this.visualElement.current})}stop(t,e,i){let s=t||this.latestPointerEvent,n=e||this.latestPanInfo,r=this.isDragging;if(this.cancel(),!r||!n||!s)return;let{velocity:o}=n;this.startAnimation(o,i);let{onDragEnd:a}=this.getProps();a&&tF.postRender(()=>a(s,n))}cancel(){this.isDragging=!1;let{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession(),!this.getProps().dragPropagation&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e?.setActive("whileDrag",!1)}endPanSession(){this.panSession?.end(),this.panSession=void 0}updateAxis(t,e){let{drag:i}=this.readProps();if(!e||!nV(t,i,this.currentDirection))return;let s=this.getAxisMotionValue(t),n=this.originPoint[t]+e[t],r=this.constraints&&this.constraints[t];r&&(n=function(t,{min:e,max:i},s){return void 0!==e&&ti&&(t=s?eH(i,t,s.max):Math.min(t,i)),t}(n,r,this.elastic[t])),s.set(n)}resolveConstraints(){let{dragConstraints:t,dragElastic:e}=this.getProps(),{projection:i}=this.visualElement,s=i&&(i.layout||i.measure(!1)),n=this.constraints;nE(t)?this.constraints&&this.scroll===nP(i)||(this.constraints=this.resolveRefConstraints()):t&&s?this.constraints=function(t,{top:e,left:i,bottom:s,right:n}){return{x:nS(t.x,i,n),y:nS(t.y,e,s)}}(s.layoutBox,t):this.constraints=!1,this.elastic=function(t=.35){return!1===t?t=0:!0===t&&(t=.35),{x:nb(t,"left","right"),y:nb(t,"top","bottom")}}(e),n!==this.constraints&&!nE(t)&&s&&this.constraints&&!this.hasMutatedConstraints&&s5(t=>{var e,i;let n;!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=(e=s.layoutBox[t],i=this.constraints[t],n={},void 0!==i.min&&(n.min=i.min-e.min),void 0!==i.max&&(n.max=i.max-e.min),n))})}resolveRefConstraints(){var t,e;let{dragConstraints:i,onMeasureDragConstraints:s}=this.getProps();if(!nE(i))return!1;let n=nk(i),{projection:r}=this.visualElement;if(!r||!r.layout)return!1;this.scroll=nP(r);let o=function(t,e,i){let s=e4(t,i),{scroll:n}=e;return n&&(e1(s.x,n.offset.x),e1(s.y,n.offset.y)),s}(n,r.root,this.visualElement.getTransformPagePoint()),a=(t=r.layout.layoutBox,e=r.removeElementScroll(o),{x:nw(t.x,e.x),y:nw(t.y,e.y)});if(s){let t=s(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(a));this.hasMutatedConstraints=!!t,t&&(a=e$(t))}return a}startAnimation(t,e){let{drag:i,dragMomentum:s,dragElastic:n,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{};return Promise.all(s5(a=>{if(!nV(a,e||i,this.currentDirection))return;let h=l[a]||{};(!0===o||o===a)&&(h={min:0,max:0});let u={type:"inertia",velocity:s?t[a]:0,bounceStiffness:n?200:1e6,bounceDamping:n?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...r,...h};return this.startAxisValueAnimation(a,u)})).then(a)}startAxisValueAnimation(t,e){let i=this.getAxisMotionValue(t);return iL(this.visualElement,t),i.start(sO(t,i,0,e,this.visualElement,!1))}stopAnimation(){s5(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){let e=`_drag${t.toUpperCase()}`;return this.readProps()[e]||this.visualElement.getValue(t,this.visualElement.latestValues[t]??0)}snapToCursor({clientX:t,clientY:e}){let{drag:i}=this.getProps(),s={x:t,y:e},n=this.visualElement.getTransformPagePoint()?.(s)||s,r=this.visualElement.measureViewportBox();s5(t=>{if(!nV(t,i,this.currentDirection))return;let e=this.getAxisMotionValue(t),{min:s,max:o}=r[t];e.set((e.get()||0)+n[t]-eH(s,o,.5))})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:t,dragConstraints:e}=this.getProps(),{projection:i}=this.visualElement;if(!nE(e)||!i||!this.constraints)return;this.stopAnimation();let s=this.constraints,n={x:0,y:0};s5(t=>{var e,i;let r,a,l,h=this.getAxisMotionValue(t).get();n[t]=(e={min:h,max:h},i=s[t],r=.5,a=sJ(e),(l=sJ(i))>a?r=sp(i.min,i.max-a,e.min):a>l&&(r=sp(e.min,e.max-l,i.min)),o(0,1,r))});let{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",i.root?.updateScroll(),i.updateLayout(),this.constraints=!1,this.resolveConstraints(),s5(e=>{let i=this.getAxisMotionValue(e);if(!nV(e,t,null)||!i.get())return;let{min:s,max:r}=this.constraints[e];i.set(eH(s,r,n[e]))}),this.visualElement.render()}addListeners(){let t;if(!this.visualElement.current)return;nA.set(this.visualElement,this);let e=this.visualElement.current,i=sZ(e,"pointerdown",t=>{let{drag:i,dragListener:s=!0}=this.getProps(),n=t.target,r=n!==e&&(nv.has(n.tagName)||!0===n.isContentEditable);i&&s&&!r&&this.start(t)}),s=()=>{var i,s,n;let r,o,{dragConstraints:a}=this.getProps(),l=nE(a)&&nk(a);l&&(this.constraints=this.resolveRefConstraints(),t||(i=e,s=l,r=nl(i,nC(n=()=>this.scalePositionWithinConstraints())),o=nl(s,nC(n)),t=()=>{r(),o()}))},{projection:n}=this.visualElement,r=n.addEventListener("measure",s);n.layout||(n.root?.updateScroll(),n.updateLayout()),tF.read(s);let o=sK(window,"resize",()=>this.scalePositionWithinConstraints()),a=n.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(s5(e=>{if(!nV(e,this.getProps().drag,this.currentDirection))return;let i=this.getAxisMotionValue(e);this.originPoint[e]+=t[e].translate,i.set(i.get()+t[e].translate)}),this.visualElement.render())});return()=>{o(),i(),r(),a(),t?.()}}getProps(){let t=this.readProps(),{dragElastic:e=.35,dragMomentum:i=!0}=t;return{...t,dragElastic:e,dragMomentum:i}}}function nE(t){return!!t&&"object"==typeof t&&("current"in t||"nodeType"in t)}let nk=t=>"current"in t?t.current:t;function nC(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function nV(t,e,i){return(!0===e||e===t)&&(null===i||i===t)}let nR=t=>(e,i)=>{t&&tF.update(()=>t(e,i),!1,!0)},nD={hasAnimatedSinceResize:!0,hasEverUpdated:!1};var nF=e6;function nL(t=!0){let e=(0,e6.useContext)(iy);if(null===e)return[!0,null];let{isPresent:i,onExitComplete:s,register:n}=e,r=(0,e6.useId)();(0,e6.useEffect)(()=>{if(t)return n(r)},[t]);let o=(0,e6.useCallback)(()=>t&&s&&s(r),[r,s,t]);return!i&&s?[!1,o]:[!0]}t.s(["f",0,nL],64978);let nj=!1,n_=({layout:t,layoutDependency:e,layoutAnchor:i})=>({layout:t,layoutDependency:e,layoutAnchor:i,animationType:"string"==typeof t?t:"both"}),nB=(t,e)=>{let{snapshot:i}=t,s=t.getStack();s?.remove(t);let n=s?.lead;if(s?.prevLead===t&&n.resumeFrom===t&&(n.resumeFrom=n.currentAnimation=t.resumingFrom=void 0),t.options.layoutId=e,!e){t.needsShow=!0;return}return t.root.registerSharedNode(e,t),()=>{let{resumeFrom:e}=t;e?.isPresent!==!1&&t.getStack().members.includes(e)&&(e.hide(),t.resumeFrom=void 0,t.snapshot=i)}};class nO extends nF.Component{componentDidMount(){let{visualElement:t,layoutGroup:e,switchLayoutGroup:i,layoutId:s}=this.props,{projection:n}=t;n&&(e.group?.add(n),s&&i?.register?.(n),nj&&n.root.didUpdate(),n.options.layoutId!==s&&nB(n,s)?.(),n.addEventListener("animationComplete",()=>this.safeToRemove()),n.setOptions({...n.options,...n_(this.props),onExitComplete:()=>this.safeToRemove()})),nD.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){let{layoutDependency:e,layoutId:i,visualElement:s,drag:n,isPresent:r}=this.props,{projection:o}=s;return o&&(o.isPresent=r,this.takeOver=t.layoutId!==i?(o.willUpdate(),nB(o,i)):void 0,o.setOptions({...o.options,...n_(this.props)}),nj=!0,n||t.layoutDependency!==e||void 0===e||t.isPresent!==r?o.willUpdate():this.safeToRemove(),t.isPresent!==r&&(r?o.promote():o.relegate()||tF.postRender(()=>{o.getStack()?.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{projection:t}=this.props.visualElement;t&&(this.takeOver?.(),t.root.didUpdate(),er.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:t,layoutGroup:e,switchLayoutGroup:i}=this.props,{projection:s}=t;nj=!0,s&&(s.scheduleCheckAfterUnmount(),e.group?.remove(s),i?.deregister?.(s))}safeToRemove(){this.props.safeToRemove?.()}render(){return null}}function nI(t){let[e,i]=nL(),s=(0,nF.useContext)(ii);return(0,it.jsx)(nO,{...t,layoutGroup:s,switchLayoutGroup:(0,nF.useContext)(iM),isPresent:e,safeToRemove:i})}let nU=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],nN=t=>"number"==typeof t?t:parseFloat(t),nz=nU.length,nW=t=>"number"==typeof t||b.test(t);function n$(t,e){return void 0!==t[e]?t[e]:t.borderRadius}let nH=nX(0,.5,sh),nY=nX(.5,.95,tk);function nX(t,e,i){return s=>se?1:i(sp(t,e,s))}function nK(t,e){t.min=e.min,t.max=e.max}function nG(t,e){nK(t.x,e.x),nK(t.y,e.y)}function nq(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function nZ(t,e,i,s,n){return t-=e,t=s+1/i*(t-s),void 0!==n&&(t=s+1/n*(t-s)),t}function nJ(t,e,[i,s,n],r,o){!function(t,e=0,i=1,s=.5,n,r=t,o=t){if(w.test(e)&&(e=parseFloat(e),e=eH(o.min,o.max,e/100)-o.min),"number"!=typeof e)return;let a=eH(r.min,r.max,s);t===r&&(a-=e),t.min=nZ(t.min,e,i,a,n),t.max=nZ(t.max,e,i,a,n)}(t,e[i],e[s],e[n],e.scale,r,o)}let nQ=["x","scaleX","originX"],n0=["y","scaleY","originY"];function n1(t,e,i,s){nJ(t.x,e,nQ,i?.x,s?.x),nJ(t.y,e,n0,i?.y,s?.y)}function n2(t){return 0===t.translate&&1===t.scale}function n3(t){return n2(t.x)&&n2(t.y)}function n5(t,e){return t.min===e.min&&t.max===e.max}function n4(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function n9(t,e){return n4(t.x,e.x)&&n4(t.y,e.y)}function n6(t){return sJ(t.x)/sJ(t.y)}function n7(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class n8{constructor(){this.members=[]}add(t){tY(this.members,t);for(let e=this.members.length-1;e>=0;e--){let i=this.members[e];if(i===t||i===this.lead||i===this.prevLead)continue;let s=i.instance;s&&!1!==s.isConnected||i.snapshot||(tX(this.members,i),i.unmount())}t.scheduleRender()}remove(t){if(tX(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){for(let e=this.members.indexOf(t)-1;e>=0;e--){let t=this.members[e];if(!1!==t.isPresent&&t.instance?.isConnected!==!1)return this.promote(t),!0}return!1}promote(t,e){let i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.updateSnapshot(),t.scheduleRender();let{layoutDependency:s}=i.options,{layoutDependency:n}=t.options;(void 0===s||s!==n)&&(t.resumeFrom=i,e&&(i.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),!1===t.options.crossfade&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}function rt(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}let re={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t)if(!b.test(t))return t;else t=parseFloat(t);let i=rt(t,e.target.x),s=rt(t,e.target.y);return`${i}% ${s}%`}},ri={borderRadius:Object.assign({},re,{applyTo:nU.slice()}),borderTopLeftRadius:re,borderTopRightRadius:re,borderBottomLeftRadius:re,borderBottomRightRadius:re,boxShadow:{correct:(t,{treeScale:e,projectionDelta:i})=>{let s=j.parse(t);if(s.length>5)return t;let n=j.createTransformer(t),r=+("number"!=typeof s[0]),o=i.x.scale*e.x,a=i.y.scale*e.y;s[0+r]/=o,s[1+r]/=a;let l=eH(o,a,.5);return"number"==typeof s[2+r]&&(s[2+r]/=l),"number"==typeof s[3+r]&&(s[3+r]/=l),n(s)}}},rs=(t,e)=>t.depth-e.depth;class rn{constructor(){this.children=[],this.isDirty=!1}add(t){tY(this.children,t),this.isDirty=!0}remove(t){tX(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(rs),this.isDirty=!1,this.children.forEach(t)}}let rr=["z","skew","skewZ"],ro=0;function ra(t,e,i,s){let{latestValues:n}=e;n[t]&&(i[t]=n[t],e.setStaticValue(t,0),s&&(s[t]=0))}let rl=t=>t.instance&&en.get(t.instance)?.demote()&&t.resetSkewAndRotation();function rh({attachResizeListener:t,defaultParent:e,measureScroll:i,checkIsScrollRoot:s,resetTransform:n}){return Object.assign(eI,{...ri,...eI}),class{constructor(t={},i=e?.()){this.id=ro++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(rc),this.nodes.forEach(rb),this.nodes.forEach(rT),this.nodes.forEach(rp)},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;tF.read(()=>{s=window.innerWidth}),t(e,()=>{let t=window.innerWidth;if(t!==s){var e;let r,o;s=t,this.root.updateBlockedByResize=!0,i?.(),e=n,r=t3.now(),e=s6(e),o=({timestamp:t})=>{let i=t-r;i>=250&&(tL(o),e(i-250))},tF.setup(o,!0),i=s9(()=>tL(o)),nD.hasAnimatedSinceResize&&(nD.hasAnimatedSinceResize=!1,this.nodes.forEach(rw))}})}i&&this.root.registerSharedNode(i,this),this.addLayoutListener()}addLayoutListener(){let{layoutId:t,layout:e,visualElement:i,animate:s}=this.options;this.instance&&!this.hasLayoutListener&&!1!==s&&i&&(t||e)&&(this.hasLayoutListener=!0,this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:s,layout:n})=>{if(this.isAnimationBlocked){this.target=void 0,this.relativeTarget=void 0;return}let r=this.options.transition||i.getDefaultTransition()||rk,{onLayoutAnimationStart:o,onLayoutAnimationComplete:a}=i.getProps(),l=!this.targetLayout||!n9(this.targetLayout,n),h=!e&&s;if(this.options.layoutRoot||this.resumeFrom||h||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let e={...iF(r,"layout"),onPlay:o,onComplete:a};(i.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,h,e.path)}else e||rw(this),this.isLead()&&this.options.onExitComplete?.();this.targetLayout=n}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),this.getStack()?.remove(this),this.parent?.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),this.hasLayoutListener=!1,tL(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}startUpdate(){!this.isUpdateBlocked()&&(this.isUpdating=!0,this.nodes?.forEach(rP),this.animationId++)}getTransformTemplate(){let{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void this.options.onExitComplete?.();if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&function t(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:i}=e.options;if(!i)return;let s=i.props[iA];if(window.MotionHasOptimisedAnimation(s,"transform")){let{layout:t,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(s,"transform",tF,!(t||i))}let{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&t(n)}(this),this.root.isUpdating||this.root.startUpdate(),this.isLayoutDirty)return;rl(this),this.isLayoutDirty=!0;for(let t=0;tt.members.length?t.removeLeadSnapshot():this.sharedNodes.delete(e))}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,tF.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){tF.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||sJ(this.snapshot.measuredBox.x)||sJ(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.relativeTarget||!!t.relativeParent.resumingFrom||t.relativeParent)),t.layout&&!t.target&&(1!==this.treeScale.x||1!==this.treeScale.y)&&(t.target=t.layout.layoutBox,t.targetWithTransforms=G());let{target:a}=t;if(!a){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}this.projectionDelta&&this.prevProjectionDelta?(nq(this.prevProjectionDelta.x,this.projectionDelta.x),nq(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),s0(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.treeScale.x===r&&this.treeScale.y===o&&n7(this.projectionDelta.x,this.prevProjectionDelta.x)&&n7(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",a))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){this.options.visualElement?.scheduleRender(),t&&this.getStack()?.scheduleRender(),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=X(),this.projectionDelta=X(),this.projectionDeltaWithTransform=X()}setAnimationOrigin(t,e=!1,i){let s,n=this.snapshot,r=n?n.latestValues:{},o={...this.latestValues},a=X();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;let l=G(),h=n?.source!==this.layout?.source,u=this.getStack(),d=!u||u.members.length<=1,c=!!(h&&!d&&!0===this.options.crossfade&&!this.path.some(rE));this.animationProgress=0;let p=i?.interpolateProjection(t);this.mixTargetDelta=e=>{let i=e/1e3,n=p?.(i);if(rA(a.x,t.x,i),rA(a.y,t.y,i),n&&(a.x.translate=n.x,a.y.translate=n.y),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){var u,m,f,y,g,v;s3(l,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),f=this.relativeTarget,y=this.relativeTargetOrigin,g=l,v=i,rM(f.x,y.x,g.x,v),rM(f.y,y.y,g.y,v),s&&(u=this.relativeTarget,m=s,n5(u.x,m.x)&&n5(u.y,m.y))&&(this.isProjectionDirty=!1),s||(s=G()),nG(s,this.relativeTarget)}h&&(this.animationValues=o,function(t,e,i,s,n,r){n?(t.opacity=eH(0,i.opacity??1,nH(s)),t.opacityExit=eH(e.opacity??1,0,nY(s))):r&&(t.opacity=eH(e.opacity??1,i.opacity??1,s));for(let n=0;n{var e,i,s;let n;nD.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=eh(0)),this.motionValue.jump(0,!1),this.currentAnimation=(e=this.motionValue,i=[0,1e3],s={...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onComplete:()=>{t.onComplete&&t.onComplete(),this.completeAnimation()}},(n=q(e)?e:eh(e)).start(sO("",n,i,s)),n.animation),function(t,e){let i=globalThis.__MOTION_INSPECT__;if(i)try{i({...t5("layout-animation-start",t),node:e})}catch{}}(this.currentAnimation,this),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?.(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let t=this.getLead(),{targetWithTransforms:e,layout:i,latestValues:s}=t,{target:n}=t;if(e&&n&&i){if(this!==t&&this.layout&&i&&rF(this.options.animationType,this.layout.layoutBox,i.layoutBox)){let{layoutBox:t}=this.layout,e=n;rD((n=this.target||G()).x,e.x,t.x),rD(n.y,e.y,t.y)}nG(e,n),e5(e,s),s0(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new n8),this.sharedNodes.get(t).add(e);let i=e.options.initialPromotionConfig;e.promote({transition:i?.transition,preserveFollowOpacity:i?.shouldPreserveFollowOpacity?i.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}={}){this.getStack()?.promote(this,i),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){return this.getStack()?.relegate(this)||!1}resetSkewAndRotation(){let{visualElement:t}=this.options;if(!t)return;let{latestValues:e}=t;if(!eq(e))return;let i={};for(let e=0;et.currentAnimation?.stop()),this.root.nodes.forEach(rf),this.root.sharedNodes.clear()}}}function ru(t){t.updateLayout(),function(t){let{snapshot:e,dragAncestor:i}=t,s=i?.isAnimationBlocked&&i.layout;if(!e||!s||t.resumeFrom||t.isAnimationBlocked)return;let n=i.dragSnapshot;s5(t=>e1(e.layoutBox[t],s.layoutBox[t].min-n.layoutBox[t].min))}(t)}function rd(t){let e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){let{layoutBox:i,measuredBox:s}=t.layout,{animationType:n}=t.options,r=e.source!==t.layout.source,o=(s,r)=>{if("size"===n)s5(t=>{let e=sJ(s[t]);s[t].min=r[t].min,s[t].max=s[t].min+e});else if("x"===n||"y"===n){let t="x"===n?"y":"x";nK(s[t],r[t])}else rF(n,e.layoutBox,i)&&s5(e=>{let i=sJ(r[e]);s[e].max=s[e].min+i,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[e].max=t.relativeTarget[e].min+i)})},a=r?e.measuredBox:e.layoutBox;o(a,i);let l=X();s0(l,i,e.layoutBox);let h=X();s0(h,r?t.applyTransform(s,!0):i,a);let u=!n3(l),d=!1,c=t.getClosestProjectingParent();if((!t.resumeFrom||c?.options.layoutRoot&&t.resumeFrom.path.includes(c))&&c&&!c.resumeFrom){let{snapshot:s,layout:n}=c;if(s&&n){let a=t.options.layoutAnchor||void 0,l=G();s3(l,r?t.resumeFrom.applyTransform(e.layoutBox,!0,void 0,!0,c.depth+1):e.layoutBox,s.layoutBox,a);let h=G();s3(h,i,n.layoutBox,a),r&&o(l,h),n9(l,h)||(d=!0),c.options.layoutRoot&&(t.relativeTarget=h,t.relativeTargetOrigin=l,t.relativeParent=c)}}t.notifyListeners("didUpdate",{layout:i,snapshot:e,delta:h,layoutDelta:l,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else t.isLead()&&t.options.onExitComplete?.();t.options.transition=void 0}function rc(t){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 rp(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function rm(t){t.clearSnapshot()}function rf(t){t.clearMeasurements()}function ry(t){t.isLayoutDirty=!0,t.updateLayout()}function rg(t){t.isLayoutDirty=!1}function rv(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.dragSnapshot||t.layout,t.isLayoutDirty=!0)}function rx(t){t.relativeTarget&&t.relativeParent?.isLayoutDirty&&(t.currentAnimation?t.isLayoutDirty=!0:(t.targetDelta=void 0,t.removeRelativeTarget()))}function rS(t){let{visualElement:e}=t.options;e?.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function rw(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function rb(t){t.resolveTargetDelta()}function rT(t){t.calcProjection()}function rP(t){t.resetSkewAndRotation()}function rA(t,e,i){t.translate=eH(e.translate,0,i),t.scale=eH(e.scale,1,i),t.origin=e.origin,t.originPoint=e.originPoint}function rM(t,e,i,s){t.min=eH(e.min,i.min,s),t.max=eH(e.max,i.max,s)}function rE(t){return t.animationValues?.opacityExit!==void 0}let rk={duration:.45,ease:[.4,0,.1,1]},rC=t=>"u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),rV=rC("applewebkit/")&&!rC("chrome/")?Math.round:tk;function rR(t){t.min=rV(t.min),t.max=rV(t.max)}function rD(t,e,i){t.max=sJ(i)+(t.min=e.min)}function rF(t,e,i){return"position"===t||"preserve-aspect"===t&&!(.2>=Math.abs(n6(e)-n6(i)))}function rL(t){return t!==t.root&&t.scroll?.wasRoot}let rj=rh({attachResizeListener:(t,e)=>sK(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),r_=rh({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!ie.current){let t=new rj({});t.mount(window),t.setOptions({layoutScroll:!0}),ie.current=t}return ie.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>"fixed"===window.getComputedStyle(t).position});function rB(t,e){let i=nt(t),s=new AbortController;return[i,{passive:!0,...e,signal:s.signal},s9(()=>s.abort())]}function rO(t,e,i,s){let{props:n}=t,r="while"+i;t.animationState&&n[r]&&t.animationState.setActive(r,"Start"===s);let o=n["on"+i+s];o&&tF.postRender(()=>o(e,sq(e)))}function rI(t){return s7(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}t.s(["f",0,rI],72846);let rU=(t,e)=>!!e&&(t===e||rU(t,e.parentElement)),rN=new WeakSet;function rz(t){return e=>{"Enter"===e.key&&t(e)}}function rW(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function r$(t){return sG(t)&&!(nx.x||nx.y)}let rH=new WeakSet;function rY(t,e,i){t.current instanceof HTMLButtonElement&&t.current.disabled||rO(t,e,"Tap",i)}let rX=new WeakMap,rK=new WeakMap,rG=t=>{let e=rX.get(t.target);e&&e(t)},rq=t=>{t.forEach(rG)},rZ={some:0,all:1},rJ=function(t,e){if("u"ik(i,s,t,e);return new Proxy((t,e)=>s(t,e),{get:(n,r)=>"create"===r?s:(i.has(r)||i.set(r,ik(r,void 0,t,e)),i.get(r))})}(Object.assign({},{animation:{Feature:class extends iC{constructor(t){super(t),t.animationState||(t.animationState=function(t){let e=e=>Promise.all(e.map(({animation:e,options:i})=>(function(t,e,i={}){return t.notify("AnimationStart",e),(Array.isArray(e)?Promise.all(e.map(e=>sz(t,e,i))):"string"==typeof e?sz(t,e,i):Promise.all(sU(t,iV(t,e,i.custom),i))).then(()=>{t.notify("AnimationComplete",e)})})(t,e,i))),i=sY(),s=!0,n=!1;function r(r){let{props:o,parent:a,manuallyAnimateOnMount:l}=t,{initial:h}=o,u=s||n,d=[],c=(e=h)=>"boolean"!=typeof e&&iV(t,Array.isArray(e)?e[0]:e,t.presenceContext?.custom)||void 0,p=new Map,m={},f=1/0,y=t;do y=!1!==y.props.inherit&&y.parent;while(y&&!y.isControllingVariants)let g=u&&sH(c(h??(y&&y.props.initial))?.transition);if(s$.forEach((e,s)=>{var n,h;let c,v=i[e],x=o[e],S=y&&y.props[e],w=void 0!==x?x:ec(S)||!1===S?S:void 0,b=ec(w),T=e===r?v.isActive:null,P=b&&void 0===x&&!(u&&l);if(v.protectedKeys={...m},!v.isActive&&null===T||!w&&!v.prevProp||ed(w)||"boolean"==typeof w)return;if(!1===T&&(f=s),"exit"===e&&v.isActive&&!0!==T){m={...m,...v.prevResolvedValues};return}let A=(n=v.prevProp,"string"==typeof(h=w)?h!==n:!!Array.isArray(h)&&!sW(h,n)),M=A||b&&(T&&!P||s>f),E=!1,k=Array.isArray(w)?w:[w],C={};if(!1!==T)for(let i of k){let{transition:s,transitionEnd:n,...r}=iV(t,i,iR(t,e))||{};C={...C,...r,...n},c=sH(s)||c}let{prevResolvedValues:V}=v;for(let e in{...V,...C}){let i;if(e in m)continue;let s=C[e],n=V[e],r=Array.isArray(s)&&Array.isArray(n)?!sW(s,n)||A:s!==n;if(r&&null==s)p.has(e)||p.set(e,v.prevOut);else if(r||void 0!==s&&p.has(e)){M=!0,i=p.get(e)||g,p.delete(e)&&(E=!0),v.needsAnimating[e]=!0;let s=t.getValue(e);s&&(s.liveStyle=!1)}else v.protectedKeys[e]=!0;v.out[e]=i}if(v.prevProp=w,v.prevResolvedValues=C,v.prevOut=c,v.isActive&&(m={...m,...C}),M&&(!(P&&A)||E))for(let i of k){let s={type:e};if("string"==typeof i&&u&&l&&a?.enteringChildren){let e=iV(a,i)?.transition?.delayChildren;s.delay=sN(a.enteringChildren,t,e)}d.push({animation:i,options:s})}}),p.size){let e={},i=c(),s=i?.transition;p.forEach((n,r)=>{n&&(s={...s||t.getDefaultTransition(),[r]:n});let a=t.getValue(r);a&&(a.liveStyle=!0);let l=i&&!Array.isArray(h)?i[r]:void 0,u=t.getBaseTargetFromProps(o,r);e[r]=(void 0!==l?l:void 0===u||q(u)?void 0===t.initialValues[r]?t.baseTarget[r]:void 0:u)??null}),s&&(e.transition=s),d.push({animation:e})}let v=u&&t.blockInitialAnimation||s&&!l&&(!1===o.initial||o.initial===o.animate);return s=n=!1,!v&&d.length?e(d):Promise.resolve()}return{animateChanges:r,setActive:function(e,s){if(i[e].isActive===s)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,s)),i[e].isActive=s;let n=r(e);for(let t in i)i[t].protectedKeys={};return n},setAnimateFunction:i=>{e=i(t)},getState:()=>i,reset:()=>{i=sY(),n=!0}}}(t))}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();ed(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){this.node.getProps().animate!==this.node.prevProps?.animate&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends iC{constructor(){super(...arguments),this.id=sX++}update(){let{presenceContext:t,prevPresenceContext:e,animationState:i}=this.node;if(!t||!i)return;let{isPresent:s,onExitComplete:n}=t,r=e?.isPresent;if(s===r)return;if(s&&!1===r){if(!0===this.exit){let{initial:t}=this.node.getProps();if(t&&!Array.isArray(t)){let{transition:e,transitionEnd:i,...s}=iV(this.node,t)||{};for(let t in s)this.node.getValue(t)?.jump(s[t])}this.node.blockInitialAnimation=!1,i.reset(),i.animateChanges()}else i.setActive("exit",!1);this.exit=void 0;return}let o=this.exit=i.setActive("exit",!s);n&&!s&&o.then(()=>{this.exit===o&&(this.exit=!0,n(this.id))})}mount(){let{register:t,onExitComplete:e}=this.node.presenceContext||{};e&&e(this.id),t&&(this.unmount=t(this.id,this.node))}unmount(){}}}},{inView:{Feature:class extends iC{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var t;let e;this.stopObserver?.();let{viewport:i={}}=this.node.getProps(),{root:s,margin:n,amount:r="some",once:o}=i,a={root:s?s.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:rZ[r]},l=t=>{let{isIntersecting:e}=t;if(this.isInView===e||(this.isInView=e,o&&!e&&this.hasEnteredView))return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);let{onViewportEnter:i,onViewportLeave:s}=this.node.getProps(),n=e?i:s;n&&n(t)};this.stopObserver=(t=this.node.current,e=function({root:t,...e}){let i=t||document;rK.has(i)||rK.set(i,{});let s=rK.get(i),n=JSON.stringify(e);return s[n]||(s[n]=new IntersectionObserver(rq,{root:t,...e})),s[n]}(a),rX.set(t,l),e.observe(t),()=>{rX.delete(t),e.unobserve(t)})}mount(){this.startObserver()}update(){if("u"t[i]!==e[i]}(t,e))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}},tap:{Feature:class extends iC{mount(){let{current:t}=this.node;if(!t)return;let{globalTapTarget:e,propagate:i}=this.node.props;this.unmount=function(t,e,i={}){e=s6(e);let[s,n,r]=rB(t,i),o=t=>{let s=t.currentTarget;if(!r$(t)||rH.has(t))return;rN.add(s),i.stopPropagation&&rH.add(t);let r=e(s,t),o={...n,capture:!0},a=(t,e)=>{window.removeEventListener("pointerup",l,o),window.removeEventListener("pointercancel",h,o),rN.has(s)&&rN.delete(s),r$(t)&&"function"==typeof r&&r(t,{success:e})},l=t=>{a(t,s===window||s===document||i.useGlobalTarget||rU(s,t.target))},h=t=>{a(t,!1)};window.addEventListener("pointerup",l,o),window.addEventListener("pointercancel",h,o)};return s.forEach(t=>{((i.useGlobalTarget?window:t).addEventListener("pointerdown",o,n),rI(t))&&(t.addEventListener("focus",()=>{let e,i,s;return e=!1,i=rz(()=>{rN.has(t)||(e=!0,rW(t,"down"))}),s=rz(()=>{e&&(e=!1,rW(t,"up"))}),void(t.addEventListener("keydown",i,n),t.addEventListener("keyup",s,n),t.addEventListener("blur",()=>{t.removeEventListener("keydown",i),t.removeEventListener("keyup",s),e&&rW(t,"cancel")},{...n,once:!0}))},n),ng.has(t.tagName)||!0===t.isContentEditable||t.hasAttribute("tabindex")||(t.tabIndex=0))}),r}(t,(t,e)=>(rY(this.node,e,"Start"),(t,{success:e})=>rY(this.node,t,e?"":"Cancel")),{useGlobalTarget:e,stopPropagation:i?.tap===!1})}unmount(){}}},focus:{Feature:class extends iC{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=ij(sK(this.node.current,"focus",()=>this.onFocus()),sK(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends iC{mount(){let{current:t}=this.node;t&&(this.unmount=function(t,e,i={}){e=s6(e);let[s,n,r]=rB(t,i);return s.forEach(t=>{let i,s=!1,r=!1,o=e=>{i&&(i(e),i=void 0),t.removeEventListener("pointerleave",l)},a=t=>{s=!1,window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",a),r&&(r=!1,o(t))},l=t=>{if("touch"!==t.pointerType){if(s){r=!0;return}o(t)}};t.addEventListener("pointerenter",s=>{if("touch"===s.pointerType||nx.x||nx.y)return;r=!1;let o=e(t,s);"function"==typeof o&&(i=o,t.addEventListener("pointerleave",l,n))},n),t.addEventListener("pointerdown",()=>{s=!0,window.addEventListener("pointerup",a,n),window.addEventListener("pointercancel",a,n)},n)}),r}(t,(t,e)=>(rO(this.node,e,"Hover","Start"),t=>rO(this.node,t,"Hover","End"))))}unmount(){}}}},{pan:{Feature:class extends iC{constructor(){super(...arguments),this.removePointerDownListener=tk}onPointerDown(t){this.session=new nd(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:this.node.current?.ownerDocument.defaultView})}createPanHandlers(){let{onPanSessionStart:t,onPanStart:e,onPan:i,onPanEnd:s}=this.node.getProps();return{onSessionStart:nR(t),onStart:nR(e),onMove:nR(i),onEnd:(t,e)=>{delete this.session,s&&tF.postRender(()=>s(t,e))}}}mount(){this.removePointerDownListener=sZ(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session?.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session?.end()}}},drag:{Feature:class extends iC{constructor(t){super(t),this.removeGroupControls=tk,this.removeListeners=tk,this.controls=new nM(t)}mount(){let{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||tk}update(){let{dragControls:t,drag:e}=this.node.getProps(),{dragControls:i,drag:s}=this.node.prevProps||{};t!==i&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls))),s&&!e&&this.controls.stop(void 0,void 0,s)}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},ProjectionNode:r_,MeasureLayout:nI}},{layout:{ProjectionNode:r_,MeasureLayout:nI}}),(t,e)=>e.isSVG??e8(t)?new eW(e):new e9(e,{allowProjection:t!==e6.Fragment}));t.s(["f",0,rJ],46932)},16015,(t,e,i)=>{},98547,(t,e,i)=>{var s=t.i(47167);t.r(16015);var n=t.r(71645),r=n&&"object"==typeof n&&"default"in n?n:{default:n},o=void 0!==s.default&&s.default.env&&!0,a=function(t){return"[object String]"===Object.prototype.toString.call(t)},l=function(){function t(t){var e=void 0===t?{}:t,i=e.name,s=void 0===i?"stylesheet":i,n=e.optimizeForSpeed,r=void 0===n?o:n;h(a(s),"`name` must be a string"),this._name=s,this._deletedRulePlaceholder="#"+s+"-deleted-rule____{}",h("boolean"==typeof r,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=r,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0;var l="u">typeof window&&document.querySelector('meta[property="csp-nonce"]');this._nonce=l?l.getAttribute("content"):null}var e,i=t.prototype;return i.setOptimizeForSpeed=function(t){h("boolean"==typeof t,"`setOptimizeForSpeed` accepts a boolean"),h(0===this._rulesCount,"optimizeForSpeed cannot be when rules have already been inserted"),this.flush(),this._optimizeForSpeed=t,this.inject()},i.isOptimizeForSpeed=function(){return this._optimizeForSpeed},i.inject=function(){var t=this;if(h(!this._injected,"sheet already injected"),this._injected=!0,"u">typeof window&&this._optimizeForSpeed){this._tags[0]=this.makeStyleTag(this._name),this._optimizeForSpeed="insertRule"in this.getSheet(),this._optimizeForSpeed||(o||console.warn("StyleSheet: optimizeForSpeed mode not supported falling back to standard mode."),this.flush(),this._injected=!0);return}this._serverSheet={cssRules:[],insertRule:function(e,i){return"number"==typeof i?t._serverSheet.cssRules[i]={cssText:e}:t._serverSheet.cssRules.push({cssText:e}),i},deleteRule:function(e){t._serverSheet.cssRules[e]=null}}},i.getSheetForTag=function(t){if(t.sheet)return t.sheet;for(var e=0;etypeof window?this.getSheet():this._serverSheet;if(e.trim()||(e=this._deletedRulePlaceholder),!i.cssRules[t])return t;i.deleteRule(t);try{i.insertRule(e,t)}catch(s){o||console.warn("StyleSheet: illegal rule: \n\n"+e+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),i.insertRule(this._deletedRulePlaceholder,t)}}else{var s=this._tags[t];h(s,"old rule at index `"+t+"` not found"),s.textContent=e}return t},i.deleteRule=function(t){if("u"typeof window?(this._tags.forEach(function(t){return t&&t.parentNode.removeChild(t)}),this._tags=[]):this._serverSheet.cssRules=[]},i.cssRules=function(){var t=this;return"u">>0},d={};function c(t,e){if(!e)return"jsx-"+t;var i=String(e),s=t+i;return d[s]||(d[s]="jsx-"+u(t+"-"+i)),d[s]}function p(t,e){"u"typeof window&&!this._fromServer&&(this._fromServer=this.selectFromServer(),this._instancesCounts=Object.keys(this._fromServer).reduce(function(t,e){return t[e]=0,t},{}));var i=this.getIdAndRules(t),s=i.styleId,n=i.rules;if(s in this._instancesCounts){this._instancesCounts[s]+=1;return}var r=n.map(function(t){return e._sheet.insertRule(t)}).filter(function(t){return -1!==t});this._indices[s]=r,this._instancesCounts[s]=1},e.remove=function(t){var e=this,i=this.getIdAndRules(t).styleId;if(function(t,e){if(!t)throw Error("StyleSheetRegistry: "+e+".")}(i in this._instancesCounts,"styleId: `"+i+"` not found"),this._instancesCounts[i]-=1,this._instancesCounts[i]<1){var s=this._fromServer&&this._fromServer[i];s?(s.parentNode.removeChild(s),delete this._fromServer[i]):(this._indices[i].forEach(function(t){return e._sheet.deleteRule(t)}),delete this._indices[i]),delete this._instancesCounts[i]}},e.update=function(t,e){this.add(e),this.remove(t)},e.flush=function(){this._sheet.flush(),this._sheet.inject(),this._fromServer=void 0,this._indices={},this._instancesCounts={}},e.cssRules=function(){var t=this,e=this._fromServer?Object.keys(this._fromServer).map(function(e){return[e,t._fromServer[e]]}):[],i=this._sheet.cssRules();return e.concat(Object.keys(this._indices).map(function(e){return[e,t._indices[e].map(function(t){return i[t].cssText}).join(t._optimizeForSpeed?"":"\n")]}).filter(function(t){return!!t[1]}))},e.styles=function(t){var e,i;return e=this.cssRules(),void 0===(i=t)&&(i={}),e.map(function(t){var e=t[0],s=t[1];return r.default.createElement("style",{id:"__"+e,key:"__"+e,nonce:i.nonce?i.nonce:void 0,dangerouslySetInnerHTML:{__html:s}})})},e.getIdAndRules=function(t){var e=t.children,i=t.dynamic,s=t.id;if(i){var n=c(s,i);return{styleId:n,rules:Array.isArray(e)?e.map(function(t){return p(n,t)}):[p(n,e)]}}return{styleId:c(s),rules:Array.isArray(e)?e:[e]}},e.selectFromServer=function(){return Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]')).reduce(function(t,e){return t[e.id.slice(2)]=e,t},{})},t}(),f=n.createContext(null);function y(){return new m}function g(){return n.useContext(f)}f.displayName="StyleSheetContext";var v=r.default.useInsertionEffect||r.default.useLayoutEffect,x="u">typeof window?y():void 0;function S(t){var e=x||g();return e&&("u"{e.exports=t.r(98547).style}]);