framer-motion 12.6.3 → 12.6.4-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={},t.React)}(this,(function(t,e){"use strict";function n(t){var e=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}})),e.default=t,Object.freeze(e)}var i=n(e),s=React,o=Symbol.for("react.element"),r=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,u=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(t,e,n){var i,s={},r=null,c=null;for(i in void 0!==n&&(r=""+n),void 0!==e.key&&(r=""+e.key),void 0!==e.ref&&(c=e.ref),e)a.call(e,i)&&!l.hasOwnProperty(i)&&(s[i]=e[i]);if(t&&t.defaultProps)for(i in e=t.defaultProps)void 0===s[i]&&(s[i]=e[i]);return{$$typeof:o,type:t,key:r,ref:c,props:s,_owner:u.current}}const h=r,d=c,p=c,m=e.createContext({});function f(t){const n=e.useRef(null);return null===n.current&&(n.current=t()),n.current}const g="undefined"!=typeof window,y=g?e.useLayoutEffect:e.useEffect,v=e.createContext(null),x=e.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});class w extends i.Component{getSnapshotBeforeUpdate(t){const e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent){const t=e.offsetParent,n=t instanceof HTMLElement&&t.offsetWidth||0,i=this.props.sizeRef.current;i.height=e.offsetHeight||0,i.width=e.offsetWidth||0,i.top=e.offsetTop,i.left=e.offsetLeft,i.right=n-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function P({children:t,isPresent:n,anchorX:s}){const o=e.useId(),r=e.useRef(null),a=e.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:u}=e.useContext(x);return e.useInsertionEffect((()=>{const{width:t,height:e,top:i,left:l,right:c}=a.current;if(n||!r.current||!t||!e)return;const h="left"===s?`left: ${l}`:`right: ${c}`;r.current.dataset.motionPopId=o;const d=document.createElement("style");return u&&(d.nonce=u),document.head.appendChild(d),d.sheet&&d.sheet.insertRule(`\n [data-motion-pop-id="${o}"] {\n position: absolute !important;\n width: ${t}px !important;\n height: ${e}px !important;\n ${h}px !important;\n top: ${i}px !important;\n }\n `),()=>{document.head.removeChild(d)}}),[n]),d(w,{isPresent:n,childRef:r,sizeRef:a,children:i.cloneElement(t,{ref:r})})}const T=({children:t,initial:n,isPresent:s,onExitComplete:o,custom:r,presenceAffectsLayout:a,mode:u,anchorX:l})=>{const c=f(S),h=e.useId(),p=e.useCallback((t=>{c.set(t,!0);for(const t of c.values())if(!t)return;o&&o()}),[c,o]),m=e.useMemo((()=>({id:h,initial:n,isPresent:s,custom:r,onExitComplete:p,register:t=>(c.set(t,!1),()=>c.delete(t))})),a?[Math.random(),p]:[s,p]);return e.useMemo((()=>{c.forEach(((t,e)=>c.set(e,!1)))}),[s]),i.useEffect((()=>{!s&&!c.size&&o&&o()}),[s]),"popLayout"===u&&(t=d(P,{isPresent:s,anchorX:l,children:t})),d(v.Provider,{value:m,children:t})};function S(){return new Map}function b(t=!0){const n=e.useContext(v);if(null===n)return[!0,null];const{isPresent:i,onExitComplete:s,register:o}=n,r=e.useId();e.useEffect((()=>{if(t)return o(r)}),[t]);const a=e.useCallback((()=>t&&s&&s(r)),[r,s,t]);return!i&&s?[!1,a]:[!0]}const A=t=>t.key||"";function E(t){const n=[];return e.Children.forEach(t,(t=>{e.isValidElement(t)&&n.push(t)})),n}const M=e.createContext(null);function C(t,e){-1===t.indexOf(e)&&t.push(e)}function V(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}let R=()=>{};const k={skipAnimations:!1,useManualTiming:!1};function D(t){let e;return()=>(void 0===e&&(e=t()),e)}const L=t=>t,B=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i};class O{constructor(){this.subscriptions=[]}add(t){return C(this.subscriptions,t),()=>V(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(let s=0;s<i;s++){const i=this.subscriptions[s];i&&i(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const F=t=>1e3*t,j=t=>t/1e3;function I(t,e){return e?t*(1e3/e):0}const U=D((()=>void 0!==window.ScrollTimeline));class W{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map((t=>t.finished)))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t,e){const n=this.animations.map((n=>U()&&n.attachTimeline?n.attachTimeline(t):"function"==typeof e?e(n):void 0));return()=>{n.forEach(((t,e)=>{t&&t(),this.animations[e].stop()}))}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let e=0;e<this.animations.length;e++)t=Math.max(t,this.animations[e].duration);return t}runAll(t){this.animations.forEach((e=>e[t]()))}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class N extends W{then(t,e){return this.finished.finally(t).then((()=>{}))}}const $=t=>t.startsWith("--"),z=(t,e,n)=>{$(e)?t.style.setProperty(e,n):t.style[e]=n},H=(t,e)=>$(e)?t.style.getPropertyValue(e):t.style[e],X=t=>null!==t;const Y=D((()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0})),K=new Set(["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","radius","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","width","maxWidth","height","maxHeight","top","right","bottom","left","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","margin","marginTop","marginRight","marginBottom","marginLeft","backgroundPositionX","backgroundPositionY"]);const G={value:null,addProjectionMetrics:null},_=t=>Array.isArray(t)&&"number"==typeof t[0],q={};function Z(t,e){const n=D(t);return()=>q[e]??n()}const J=Z((()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0}),"linearEasing"),Q=(t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let e=0;e<s;e++)i+=t(e/(s-1))+", ";return`linear(${i.substring(0,i.length-2)})`},tt=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,et={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:tt([0,.65,.55,1]),circOut:tt([.55,0,1,.45]),backIn:tt([.31,.01,.66,-.59]),backOut:tt([.33,1.53,.69,.99])};function nt(t,e){return t?"function"==typeof t&&J()?Q(t,e):_(t)?tt(t):Array.isArray(t)?t.map((t=>nt(t,e)||et.easeOut)):et[t]:void 0}function it(t,e,n,{delay:i=0,duration:s=300,repeat:o=0,repeatType:r="loop",ease:a="easeInOut",times:u}={},l=void 0){const c={[e]:n};u&&(c.offset=u);const h=nt(a,s);Array.isArray(h)&&(c.easing=h);return t.animate(c,{delay:i,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal",pseudoElement:l})}function st(t){return"function"==typeof t&&"applyToOptions"in t}const ot=new WeakMap;class rt{constructor(t){if("animation"in t)return void(this.animation=t.animation);const{element:e,name:n,keyframes:i,pseudoElement:s,allowFlatten:o=!1}=t;let{transition:r}=t;this.allowFlatten=o;const a=function(t){const e=ot.get(t)||new Map;return ot.set(t,e),e}(e),u=((t,e)=>`${t}:${e}`)(n,s||""),l=a.get(u);l&&l.stop();const c=function(t,e,n,i){Array.isArray(n)||(n=[n]);for(let s=0;s<n.length;s++)null===n[s]&&(n[s]=0!==s||i?n[s-1]:H(t,e)),"number"==typeof n[s]&&K.has(e)&&(n[s]=n[s]+"px");return!i&&!Y()&&n.length<2&&n.unshift(H(t,e)),n}(e,n,i,s);r.type,r=function({type:t,...e}){return st(t)?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(r),this.animation=it(e,n,c,r,s),!1===r.autoplay&&this.animation.pause(),this.removeAnimation=()=>a.delete(u),this.animation.onfinish=()=>{s?this.commitStyles():z(e,n,function(t,{repeat:e,repeatType:n="loop"},i){const s=t.filter(X),o=e&&"loop"!==n&&e%2==1?0:s.length-1;return o&&void 0!==i?i:s[o]}(c,r)),this.cancel()},a.set(u,this)}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.finish()}cancel(){try{this.animation.cancel()}catch(t){}this.removeAnimation()}stop(){const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.commitStyles(),this.cancel())}commitStyles(){this.animation.commitStyles?.()}get duration(){console.log(this.animation.effect?.getComputedTiming());const t=this.animation.effect?.getComputedTiming().duration||0;return j(Number(t))}get time(){return j(Number(this.animation.currentTime)||0)}set time(t){this.animation.currentTime=F(t)}get speed(){return this.animation.playbackRate}set speed(t){this.animation.playbackRate=t}get state(){return this.animation.playState}get startTime(){return Number(this.animation.startTime)}get finished(){return this.animation.finished}flatten(){this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"})}attachTimeline(t){return this.animation.timeline=t,this.animation.onfinish=null,L}then(t,e){return this.finished.then(t).catch(e)}}function at(t,e){return t?.[e]??t?.default??t}const ut=2e4;function lt(t){let e=0;let n=t.next(e);for(;!n.done&&e<ut;)e+=50,n=t.next(e);return e>=ut?1/0:e}function ct(t,e=100,n){const i=n({...t,keyframes:[0,e]}),s=Math.min(lt(i),ut);return{type:"keyframes",ease:t=>i.next(s*t).value/e,duration:j(s)}}function ht(t){return Boolean("function"==typeof t&&J()||!t||"string"==typeof t&&(t in et||J())||_(t)||Array.isArray(t)&&t.every(ht))}function dt(t,e){t.timeline=e,t.onfinish=null}const pt=["read","resolveKeyframes","update","preRender","render","postRender"];function mt(t,e){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=pt.reduce(((t,n)=>(t[n]=function(t,e){let n=new Set,i=new Set,s=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},u=0;function l(e){r.has(e)&&(c.schedule(e),t()),u++,e(a)}const c={schedule:(t,e=!1,o=!1)=>{const a=o&&s?n:i;return e&&r.add(t),a.has(t)||a.add(t),t},cancel:t=>{i.delete(t),r.delete(t)},process:t=>{a=t,s?o=!0:(s=!0,[n,i]=[i,n],n.forEach(l),e&&G.value&&G.value.frameloop[e].push(u),u=0,n.clear(),s=!1,o&&(o=!1,c.process(t)))}};return c}(o,e?n:void 0),t)),{}),{read:a,resolveKeyframes:u,update:l,preRender:c,render:h,postRender:d}=r,p=()=>{const o=k.useManualTiming?s.timestamp:performance.now();n=!1,k.useManualTiming||(s.delta=i?1e3/60:Math.max(Math.min(o-s.timestamp,40),1)),s.timestamp=o,s.isProcessing=!0,a.process(s),u.process(s),l.process(s),c.process(s),h.process(s),d.process(s),s.isProcessing=!1,n&&e&&(i=!1,t(p))};return{schedule:pt.reduce(((e,o)=>{const a=r[o];return e[o]=(e,o=!1,r=!1)=>(n||(n=!0,i=!0,s.isProcessing||t(p)),a.schedule(e,o,r)),e}),{}),cancel:t=>{for(let e=0;e<pt.length;e++)r[pt[e]].cancel(t)},state:s,steps:r}}const{schedule:ft,cancel:gt,state:yt,steps:vt}=mt("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:L,!0),{schedule:xt,cancel:wt}=mt(queueMicrotask,!1);let Pt;function Tt(){Pt=void 0}const St={now:()=>(void 0===Pt&&St.set(yt.isProcessing||k.useManualTiming?yt.timestamp:performance.now()),Pt),set:t=>{Pt=t,queueMicrotask(Tt)}},bt={x:!1,y:!1};function At(){return bt.x||bt.y}function Et(t,e,n){if(t instanceof EventTarget)return[t];if("string"==typeof t){let i=document;e&&(i=e.current);const s=n?.[t]??i.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t)}function Mt(t,e){const n=Et(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},()=>i.abort()]}function Ct(t){return!("touch"===t.pointerType||At())}function Vt(t,e,n={}){const[i,s,o]=Mt(t,n),r=t=>{if(!Ct(t))return;const{target:n}=t,i=e(n,t);if("function"!=typeof i||!n)return;const o=t=>{Ct(t)&&(i(t),n.removeEventListener("pointerleave",o))};n.addEventListener("pointerleave",o,s)};return i.forEach((t=>{t.addEventListener("pointerenter",r,s)})),o}const Rt=(t,e)=>!!e&&(t===e||Rt(t,e.parentElement)),kt=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,Dt=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const Lt=new WeakSet;function Bt(t){return e=>{"Enter"===e.key&&t(e)}}function Ot(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function Ft(t){return kt(t)&&!At()}function jt(t,e,n={}){const[i,s,o]=Mt(t,n),r=t=>{const i=t.currentTarget;if(!Ft(t)||Lt.has(i))return;Lt.add(i);const o=e(i,t),r=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",u),Ft(t)&&Lt.has(i)&&(Lt.delete(i),"function"==typeof o&&o(t,{success:e}))},a=t=>{r(t,i===window||i===document||n.useGlobalTarget||Rt(i,t.target))},u=t=>{r(t,!1)};window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",u,s)};return i.forEach((t=>{var e;(n.useGlobalTarget?window:t).addEventListener("pointerdown",r,s),t instanceof HTMLElement&&(t.addEventListener("focus",(t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=Bt((()=>{if(Lt.has(n))return;Ot(n,"down");const t=Bt((()=>{Ot(n,"up")}));n.addEventListener("keyup",t,e),n.addEventListener("blur",(()=>Ot(n,"cancel")),e)}));n.addEventListener("keydown",i,e),n.addEventListener("blur",(()=>n.removeEventListener("keydown",i)),e)})(t,s))),e=t,Dt.has(e.tagName)||-1!==e.tabIndex||t.hasAttribute("tabindex")||(t.tabIndex=0))})),o}const It={current:void 0};class Ut{constructor(t,e={}){this.version="12.6.3",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=St.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),e&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=St.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new O);const n=this.events[t].add(e);return"change"===t?()=>{n(),ft.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return It.current&&It.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=St.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return I(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise((e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()})).then((()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()}))}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Wt(t,e){return new Ut(t,e)}const Nt=(t,e,n)=>t+(e-t)*n;function $t(t){return t.max-t.min}function zt(t,e,n,i=.5){t.origin=i,t.originPoint=Nt(e.min,e.max,t.origin),t.scale=$t(n)/$t(e),t.translate=Nt(n.min,n.max,t.origin)-t.originPoint,(t.scale>=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function Ht(t,e,n,i){zt(t.x,e.x,n.x,i?i.originX:void 0),zt(t.y,e.y,n.y,i?i.originY:void 0)}function Xt(t,e,n){t.min=n.min+e.min,t.max=t.min+$t(e)}function Yt(t,e,n){t.min=e.min-n.min,t.max=t.min+$t(e)}function Kt(t,e,n){Yt(t.x,e.x,n.x),Yt(t.y,e.y,n.y)}const Gt=t=>!t.isLayoutDirty&&t.willUpdate(!1);function _t(){const t=new Set,e=new WeakMap,n=()=>t.forEach(Gt);return{add:i=>{t.add(i),e.set(i,i.addEventListener("willUpdate",n))},remove:i=>{t.delete(i);const s=e.get(i);s&&(s(),e.delete(i)),n()},dirty:n}}const qt=t=>Boolean(t&&t.getVelocity),Zt={current:!1},Jt=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function Qt(t,e,n,i){if(t===e&&n===i)return L;const s=e=>function(t,e,n,i,s){let o,r,a=0;do{r=e+(n-e)/2,o=Jt(r,i,s)-t,o>0?n=r:e=r}while(Math.abs(o)>1e-7&&++a<12);return r}(e,0,1,t,n);return t=>0===t||1===t?t:Jt(s(t),e,i)}const te=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,ee=t=>e=>1-t(1-e),ne=Qt(.33,1.53,.69,.99),ie=ee(ne),se=te(ie),oe=t=>(t*=2)<1?.5*ie(t):.5*(2-Math.pow(2,-10*(t-1))),re=t=>1-Math.sin(Math.acos(t)),ae=ee(re),ue=te(re),le=t=>/^0[^.\s]+$/u.test(t);const ce=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],he=new Set(ce),de=new Set(["width","height","top","left","right","bottom",...ce]),pe=(t,e,n)=>n>e?e:n<t?t:n,me={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},fe={...me,transform:t=>pe(0,1,t)},ge={...me,default:1},ye=t=>Math.round(1e5*t)/1e5,ve=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const xe=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,we=(t,e)=>n=>Boolean("string"==typeof n&&xe.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),Pe=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[s,o,r,a]=i.match(ve);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},Te={...me,transform:t=>Math.round((t=>pe(0,255,t))(t))},Se={test:we("rgb","red"),parse:Pe("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+Te.transform(t)+", "+Te.transform(e)+", "+Te.transform(n)+", "+ye(fe.transform(i))+")"};const be={test:we("#"),parse:function(t){let e="",n="",i="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}},transform:Se.transform},Ae=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),Ee=Ae("deg"),Me=Ae("%"),Ce=Ae("px"),Ve=Ae("vh"),Re=Ae("vw"),ke={...Me,parse:t=>Me.parse(t)/100,transform:t=>Me.transform(100*t)},De={test:we("hsl","hue"),parse:Pe("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+Me.transform(ye(e))+", "+Me.transform(ye(n))+", "+ye(fe.transform(i))+")"},Le={test:t=>Se.test(t)||be.test(t)||De.test(t),parse:t=>Se.test(t)?Se.parse(t):De.test(t)?De.parse(t):be.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?Se.transform(t):De.transform(t)},Be=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const Oe="number",Fe="color",je=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Ie(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const r=e.replace(je,(t=>(Le.test(t)?(i.color.push(o),s.push(Fe),n.push(Le.parse(t))):t.startsWith("var(")?(i.var.push(o),s.push("var"),n.push(t)):(i.number.push(o),s.push(Oe),n.push(parseFloat(t))),++o,"${}"))).split("${}");return{values:n,split:r,indexes:i,types:s}}function Ue(t){return Ie(t).values}function We(t){const{split:e,types:n}=Ie(t),i=e.length;return t=>{let s="";for(let o=0;o<i;o++)if(s+=e[o],void 0!==t[o]){const e=n[o];s+=e===Oe?ye(t[o]):e===Fe?Le.transform(t[o]):t[o]}return s}}const Ne=t=>"number"==typeof t?0:t;const $e={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(ve)?.length||0)+(t.match(Be)?.length||0)>0},parse:Ue,createTransformer:We,getAnimatableNone:function(t){const e=Ue(t);return We(t)(e.map(Ne))}},ze=new Set(["brightness","contrast","saturate","opacity"]);function He(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(ve)||[];if(!i)return t;const s=n.replace(i,"");let o=ze.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const Xe=/\b([a-z-]*)\(.*?\)/gu,Ye={...$e,getAnimatableNone:t=>{const e=t.match(Xe);return e?e.map(He).join(" "):t}},Ke={borderWidth:Ce,borderTopWidth:Ce,borderRightWidth:Ce,borderBottomWidth:Ce,borderLeftWidth:Ce,borderRadius:Ce,radius:Ce,borderTopLeftRadius:Ce,borderTopRightRadius:Ce,borderBottomRightRadius:Ce,borderBottomLeftRadius:Ce,width:Ce,maxWidth:Ce,height:Ce,maxHeight:Ce,top:Ce,right:Ce,bottom:Ce,left:Ce,padding:Ce,paddingTop:Ce,paddingRight:Ce,paddingBottom:Ce,paddingLeft:Ce,margin:Ce,marginTop:Ce,marginRight:Ce,marginBottom:Ce,marginLeft:Ce,backgroundPositionX:Ce,backgroundPositionY:Ce},Ge={rotate:Ee,rotateX:Ee,rotateY:Ee,rotateZ:Ee,scale:ge,scaleX:ge,scaleY:ge,scaleZ:ge,skew:Ee,skewX:Ee,skewY:Ee,distance:Ce,translateX:Ce,translateY:Ce,translateZ:Ce,x:Ce,y:Ce,z:Ce,perspective:Ce,transformPerspective:Ce,opacity:fe,originX:ke,originY:ke,originZ:Ce},_e={...me,transform:Math.round},qe={...Ke,...Ge,zIndex:_e,size:Ce,fillOpacity:fe,strokeOpacity:fe,numOctaves:_e},Ze={...qe,color:Le,backgroundColor:Le,outlineColor:Le,fill:Le,stroke:Le,borderColor:Le,borderTopColor:Le,borderRightColor:Le,borderBottomColor:Le,borderLeftColor:Le,filter:Ye,WebkitFilter:Ye},Je=t=>Ze[t];function Qe(t,e){let n=Je(t);return n!==Ye&&(n=$e),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const tn=new Set(["auto","none","0"]);const en=t=>180*t/Math.PI,nn=t=>{const e=en(Math.atan2(t[1],t[0]));return on(e)},sn={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:nn,rotateZ:nn,skewX:t=>en(Math.atan(t[1])),skewY:t=>en(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},on=t=>((t%=360)<0&&(t+=360),t),rn=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),an=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),un={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:rn,scaleY:an,scale:t=>(rn(t)+an(t))/2,rotateX:t=>on(en(Math.atan2(t[6],t[5]))),rotateY:t=>on(en(Math.atan2(-t[2],t[0]))),rotateZ:nn,rotate:nn,skewX:t=>en(Math.atan(t[4])),skewY:t=>en(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function ln(t){return t.includes("scale")?1:0}function cn(t,e){if(!t||"none"===t)return ln(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=un,s=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=sn,s=e}if(!s)return ln(e);const o=i[e],r=s[1].split(",").map(hn);return"function"==typeof o?o(r):r[o]}function hn(t){return parseFloat(t.trim())}const dn=t=>t===me||t===Ce,pn=new Set(["x","y","z"]),mn=ce.filter((t=>!pn.has(t)));const fn={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>cn(e,"x"),y:(t,{transform:e})=>cn(e,"y")};fn.translateX=fn.x,fn.translateY=fn.y;const gn=new Set;let yn=!1,vn=!1;function xn(){if(vn){const t=Array.from(gn).filter((t=>t.needsMeasurement)),e=new Set(t.map((t=>t.element))),n=new Map;e.forEach((t=>{const e=function(t){const e=[];return mn.forEach((n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))})),e}(t);e.length&&(n.set(t,e),t.render())})),t.forEach((t=>t.measureInitialState())),e.forEach((t=>{t.render();const e=n.get(t);e&&e.forEach((([e,n])=>{t.getValue(e)?.set(n)}))})),t.forEach((t=>t.measureEndState())),t.forEach((t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)}))}vn=!1,yn=!1,gn.forEach((t=>t.complete())),gn.clear()}function wn(){gn.forEach((t=>{t.readKeyframes(),t.needsMeasurement&&(vn=!0)}))}class Pn{constructor(t,e,n,i,s,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(gn.add(this),yn||(yn=!0,ft.read(wn),ft.resolveKeyframes(xn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;for(let s=0;s<t.length;s++)if(null===t[s])if(0===s){const s=i?.get(),o=t[t.length-1];if(void 0!==s)t[0]=s;else if(n&&e){const i=n.readValue(e,o);null!=i&&(t[0]=i)}void 0===t[0]&&(t[0]=o),i&&void 0===s&&i.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),gn.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,gn.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Tn=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),Sn=t=>e=>"string"==typeof e&&e.startsWith(t),bn=Sn("--"),An=Sn("var(--"),En=t=>!!An(t)&&Mn.test(t.split("/*")[0].trim()),Mn=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Cn=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Vn(t,e,n=1){const[i,s]=function(t){const e=Cn.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}(t);if(!i)return;const o=window.getComputedStyle(e).getPropertyValue(i);if(o){const t=o.trim();return Tn(t)?parseFloat(t):t}return En(s)?Vn(s,e,n+1):s}const Rn=t=>e=>e.test(t),kn=[me,Ce,Me,Ee,Re,Ve,{test:t=>"auto"===t,parse:t=>t}],Dn=t=>kn.find(Rn(t));class Ln extends Pn{constructor(t,e,n,i,s){super(t,e,n,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let n=0;n<t.length;n++){let i=t[n];if("string"==typeof i&&(i=i.trim(),En(i))){const s=Vn(i,e.current);void 0!==s&&(t[n]=s),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!de.has(n)||2!==t.length)return;const[i,s]=t,o=Dn(i),r=Dn(s);if(o!==r)if(dn(o)&&dn(r))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)("number"==typeof(i=t[e])?0===i:null===i||"none"===i||"0"===i||le(i))&&n.push(e);var i;n.length&&function(t,e,n){let i,s=0;for(;s<t.length&&!i;){const e=t[s];"string"==typeof e&&!tn.has(e)&&Ie(e).values.length&&(i=t[s]),s++}if(i&&n)for(const s of e)t[s]=Qe(n,i)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=fn[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const i=e[e.length-1];void 0!==i&&t.getValue(n,i).jump(i,!1)}measureEndState(){const{element:t,name:e,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const i=t.getValue(e);i&&i.jump(this.measuredOrigin,!1);const s=n.length-1,o=n[s];n[s]=fn[e](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach((([e,n])=>{t.getValue(e).set(n)})),this.resolveNoneKeyframes()}}const Bn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!$e.test(t)&&"0"!==t||t.startsWith("url(")));function On(t,e,n,i){const s=t[0];if(null===s)return!1;if("display"===e||"visibility"===e)return!0;const o=t[t.length-1],r=Bn(s,e),a=Bn(o,e);return!(!r||!a)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(t)||("spring"===n||st(n))&&i)}const Fn=t=>null!==t;function jn(t,{repeat:e,repeatType:n="loop"},i){const s=t.filter(Fn),o=e&&"loop"!==n&&e%2==1?0:s.length-1;return o&&void 0!==i?i:s[o]}class In{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",...r}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=St.now(),this.options={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:s,repeatType:o,...r},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(wn(),xn()),this._resolved}onKeyframesResolved(t,e){this.resolvedAt=St.now(),this.hasAttemptedResolve=!0;const{name:n,type:i,velocity:s,delay:o,onComplete:r,onUpdate:a,isGenerator:u}=this.options;if(!u&&!On(t,n,i,s)){if(Zt.current||!o)return a&&a(jn(t,this.options,e)),r&&r(),void this.resolveFinishedPromise();this.options.duration=0}const l=this.initPlayback(t,e);!1!==l&&(this._resolved={keyframes:t,finalKeyframe:e,...l},this.onPostResolved())}onPostResolved(){}then(t,e){return this.currentFinishedPromise.then(t,e)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise((t=>{this.resolveFinishedPromise=t}))}}function Un(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Wn(t,e){return n=>n>0?e:t}const Nn=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},$n=[be,Se,De];function zn(t){const e=(n=t,$n.find((t=>t.test(n))));var n;if(!Boolean(e))return!1;let i=e.parse(t);return e===De&&(i=function({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let s=0,o=0,r=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;s=Un(a,i,t+1/3),o=Un(a,i,t),r=Un(a,i,t-1/3)}else s=o=r=n;return{red:Math.round(255*s),green:Math.round(255*o),blue:Math.round(255*r),alpha:i}}(i)),i}const Hn=(t,e)=>{const n=zn(t),i=zn(e);if(!n||!i)return Wn(t,e);const s={...n};return t=>(s.red=Nn(n.red,i.red,t),s.green=Nn(n.green,i.green,t),s.blue=Nn(n.blue,i.blue,t),s.alpha=Nt(n.alpha,i.alpha,t),Se.transform(s))},Xn=(t,e)=>n=>e(t(n)),Yn=(...t)=>t.reduce(Xn),Kn=new Set(["none","hidden"]);function Gn(t,e){return n=>Nt(t,e,n)}function _n(t){return"number"==typeof t?Gn:"string"==typeof t?En(t)?Wn:Le.test(t)?Hn:Jn:Array.isArray(t)?qn:"object"==typeof t?Le.test(t)?Hn:Zn:Wn}function qn(t,e){const n=[...t],i=n.length,s=t.map(((t,n)=>_n(t)(t,e[n])));return t=>{for(let e=0;e<i;e++)n[e]=s[e](t);return n}}function Zn(t,e){const n={...t,...e},i={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(i[s]=_n(t[s])(t[s],e[s]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const Jn=(t,e)=>{const n=$e.createTransformer(e),i=Ie(t),s=Ie(e);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?Kn.has(t)&&!s.values.length||Kn.has(e)&&!i.values.length?function(t,e){return Kn.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):Yn(qn(function(t,e){const n=[],i={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const o=e.types[s],r=t.indexes[o][i[o]],a=t.values[r]??0;n[s]=a,i[o]++}return n}(i,s),s.values),n):Wn(t,e)};function Qn(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return Nt(t,e,n);return _n(t)(t,e)}function ti(t,e,n){const i=Math.max(e-5,0);return I(n-t(i),e-i)}const ei=100,ni=10,ii=1,si=0,oi=800,ri=.3,ai=.3,ui={granular:.01,default:2},li={granular:.005,default:.5},ci=.01,hi=10,di=.05,pi=1,mi=.001;function fi({duration:t=oi,bounce:e=ri,velocity:n=si,mass:i=ii}){let s,o,r=1-e;r=pe(di,pi,r),t=pe(ci,hi,j(t)),r<1?(s=e=>{const i=e*r,s=i*t,o=i-n,a=yi(e,r),u=Math.exp(-s);return mi-o/a*u},o=e=>{const i=e*r*t,o=i*n+n,a=Math.pow(r,2)*Math.pow(e,2)*t,u=Math.exp(-i),l=yi(Math.pow(e,2),r);return(-s(e)+mi>0?-1:1)*((o-a)*u)/l}):(s=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,o=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let i=n;for(let n=1;n<gi;n++)i-=t(i)/e(i);return i}(s,o,5/t);if(t=F(t),isNaN(a))return{stiffness:ei,damping:ni,duration:t};{const e=Math.pow(a,2)*i;return{stiffness:e,damping:2*r*Math.sqrt(i*e),duration:t}}}const gi=12;function yi(t,e){return t*Math.sqrt(1-e*e)}const vi=["duration","bounce"],xi=["stiffness","damping","mass"];function wi(t,e){return e.some((e=>void 0!==t[e]))}function Pi(t=ai,e=ri){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:s}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:u,damping:l,mass:c,duration:h,velocity:d,isResolvedFromDuration:p}=function(t){let e={velocity:si,stiffness:ei,damping:ni,mass:ii,isResolvedFromDuration:!1,...t};if(!wi(t,xi)&&wi(t,vi))if(t.visualDuration){const n=t.visualDuration,i=2*Math.PI/(1.2*n),s=i*i,o=2*pe(.05,1,1-(t.bounce||0))*Math.sqrt(s);e={...e,mass:ii,stiffness:s,damping:o}}else{const n=fi(t);e={...e,...n,mass:ii},e.isResolvedFromDuration=!0}return e}({...n,velocity:-j(n.velocity||0)}),m=d||0,f=l/(2*Math.sqrt(u*c)),g=r-o,y=j(Math.sqrt(u/c)),v=Math.abs(g)<5;let x;if(i||(i=v?ui.granular:ui.default),s||(s=v?li.granular:li.default),f<1){const t=yi(y,f);x=e=>{const n=Math.exp(-f*y*e);return r-n*((m+f*y*g)/t*Math.sin(t*e)+g*Math.cos(t*e))}}else if(1===f)x=t=>r-Math.exp(-y*t)*(g+(m+y*g)*t);else{const t=y*Math.sqrt(f*f-1);x=e=>{const n=Math.exp(-f*y*e),i=Math.min(t*e,300);return r-n*((m+f*y*g)*Math.sinh(i)+t*g*Math.cosh(i))/t}}const w={calculatedDuration:p&&h||null,next:t=>{const e=x(t);if(p)a.done=t>=h;else{let n=0;f<1&&(n=0===t?F(m):ti(x,t,e));const o=Math.abs(n)<=i,u=Math.abs(r-e)<=s;a.done=o&&u}return a.value=a.done?r:e,a},toString:()=>{const t=Math.min(lt(w),ut),e=Q((e=>w.next(t*e).value),t,30);return t+"ms "+e},toTransition:()=>{}};return w}function Ti({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:u,restDelta:l=.5,restSpeed:c}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?u:void 0===u||Math.abs(a-t)<Math.abs(u-t)?a:u;let m=n*e;const f=h+m,g=void 0===r?f:r(f);g!==f&&(m=g-h);const y=t=>-m*Math.exp(-t/i),v=t=>g+y(t),x=t=>{const e=y(t),n=v(t);d.done=Math.abs(e)<=l,d.value=d.done?g:n};let w,P;const T=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==u&&e>u)&&(w=t,P=Pi({keyframes:[d.value,p(d.value)],velocity:ti(v,t,d.value),damping:s,stiffness:o,restDelta:l,restSpeed:c}))};return T(0),{calculatedDuration:null,next:t=>{let e=!1;return P||void 0!==w||(e=!0,x(t),T(t)),void 0!==w&&t>=w?P.next(t-w):(!e&&x(t),d)}}}Pi.applyToOptions=t=>{const e=ct(t,100,Pi);return t.ease=J()?e.ease:"easeOut",t.duration=F(e.duration),t.type="keyframes",t};const Si=Qt(.42,0,1,1),bi=Qt(0,0,.58,1),Ai=Qt(.42,0,.58,1),Ei=t=>Array.isArray(t)&&"number"!=typeof t[0],Mi={linear:L,easeIn:Si,easeInOut:Ai,easeOut:bi,circIn:re,circInOut:ue,circOut:ae,backIn:ie,backInOut:se,backOut:ne,anticipate:oe},Ci=t=>{if(_(t)){t.length;const[e,n,i,s]=t;return Qt(e,n,i,s)}return"string"==typeof t?Mi[t]:t};function Vi(t,e,{clamp:n=!0,ease:i,mixer:s}={}){const o=t.length;if(e.length,1===o)return()=>e[0];if(2===o&&e[0]===e[1])return()=>e[1];const r=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=function(t,e,n){const i=[],s=n||Qn,o=t.length-1;for(let n=0;n<o;n++){let o=s(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||L:e;o=Yn(t,o)}i.push(o)}return i}(e,i,s),u=a.length,l=n=>{if(r&&n<t[0])return e[0];let i=0;if(u>1)for(;i<t.length-2&&!(n<t[i+1]);i++);const s=B(t[i],t[i+1],n);return a[i](s)};return n?e=>l(pe(t[0],t[o-1],e)):l}function Ri(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=B(0,e,i);t.push(Nt(n,1,s))}}function ki(t){const e=[0];return Ri(e,t.length-1),e}function Di({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=Ei(i)?i.map(Ci):Ci(i),o={done:!1,value:e[0]},r=function(t,e){return t.map((t=>t*e))}(n&&n.length===e.length?n:ki(e),t),a=Vi(r,e,{ease:Array.isArray(s)?s:(u=e,l=s,u.map((()=>l||Ai)).splice(0,u.length-1))});var u,l;return{calculatedDuration:t,next:e=>(o.value=a(e),o.done=e>=t,o)}}const Li=t=>{const e=({timestamp:e})=>t(e);return{start:()=>ft.update(e,!0),stop:()=>gt(e),now:()=>yt.isProcessing?yt.timestamp:St.now()}},Bi={decay:Ti,inertia:Ti,tween:Di,keyframes:Di,spring:Pi},Oi=t=>t/100;class Fi extends In{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:t}=this.options;t&&t()};const{name:e,motionValue:n,element:i,keyframes:s}=this.options,o=i?.KeyframeResolver||Pn;this.resolver=new o(s,((t,e)=>this.onKeyframesResolved(t,e)),e,n,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:e="keyframes",repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=this.options,r=st(e)?e:Bi[e]||Di;let a,u;r!==Di&&"number"!=typeof t[0]&&(a=Yn(Oi,Qn(t[0],t[1])),t=[0,100]);const l=r({...this.options,keyframes:t});"mirror"===s&&(u=r({...this.options,keyframes:[...t].reverse(),velocity:-o})),null===l.calculatedDuration&&(l.calculatedDuration=lt(l));const{calculatedDuration:c}=l,h=c+i;return{generator:l,mirroredGenerator:u,mapPercentToKeyframes:a,calculatedDuration:c,resolvedDuration:h,totalDuration:h*(n+1)-i}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&t?this.state=this.pendingPlayState:this.pause()}tick(t,e=!1){const{resolved:n}=this;if(!n){const{keyframes:t}=this.options;return{done:!0,value:t[t.length-1]}}const{finalKeyframe:i,generator:s,mirroredGenerator:o,mapPercentToKeyframes:r,keyframes:a,calculatedDuration:u,totalDuration:l,resolvedDuration:c}=n;if(null===this.startTime)return s.next(0);const{delay:h,repeat:d,repeatType:p,repeatDelay:m,onUpdate:f}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-l/this.speed,this.startTime)),e?this.currentTime=t:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const g=this.currentTime-h*(this.speed>=0?1:-1),y=this.speed>=0?g<0:g>l;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=l);let v=this.currentTime,x=s;if(d){const t=Math.min(this.currentTime,l)/c;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,d+1);Boolean(e%2)&&("reverse"===p?(n=1-n,m&&(n-=m/c)):"mirror"===p&&(x=o)),v=pe(0,1,n)*c}const w=y?{done:!1,value:a[0]}:x.next(v);r&&(w.value=r(w.value));let{done:P}=w;y||null===u||(P=this.speed>=0?this.currentTime>=l:this.currentTime<=0);const T=null===this.holdTime&&("finished"===this.state||"running"===this.state&&P);return T&&void 0!==i&&(w.value=jn(a,this.options,i)),f&&f(w.value),T&&this.finish(),w}get duration(){const{resolved:t}=this;return t?j(t.calculatedDuration):0}get time(){return j(this.currentTime)}set time(t){t=F(t),this.currentTime=t,null!==this.holdTime||0===this.speed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=j(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:t=Li,onPlay:e,startTime:n}=this.options;this.driver||(this.driver=t((t=>this.tick(t)))),e&&e();const i=this.driver.now();null!==this.holdTime?this.startTime=i-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=i):this.startTime=n??this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){this._resolved?(this.state="paused",this.holdTime=this.currentTime??0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}get finished(){return this.currentFinishedPromise}}function ji(t){return new Fi(t)}const Ii=new Set(["opacity","clipPath","filter","transform"]),Ui=D((()=>Object.hasOwnProperty.call(Element.prototype,"animate")));const Wi={anticipate:oe,backInOut:se,circInOut:ue};class Ni extends In{constructor(t){super(t);const{name:e,motionValue:n,element:i,keyframes:s}=this.options;this.resolver=new Ln(s,((t,e)=>this.onKeyframesResolved(t,e)),e,n,i),this.resolver.scheduleResolve()}initPlayback(t,e){let{duration:n=300,times:i,ease:s,type:o,motionValue:r,name:a,startTime:u}=this.options;if(!r.owner||!r.owner.current)return!1;var l;if("string"==typeof s&&J()&&s in Wi&&(s=Wi[s]),st((l=this.options).type)||"spring"===l.type||!ht(l.ease)){const{onComplete:e,onUpdate:r,motionValue:a,element:u,...l}=this.options,c=function(t,e){const n=new Fi({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let i={done:!1,value:t[0]};const s=[];let o=0;for(;!i.done&&o<2e4;)i=n.sample(o),s.push(i.value),o+=10;return{times:void 0,keyframes:s,duration:o-10,ease:"linear"}}(t,l);1===(t=c.keyframes).length&&(t[1]=t[0]),n=c.duration,i=c.times,s=c.ease,o="keyframes"}const c=it(r.owner.current,a,t,{...this.options,duration:n,times:i,ease:s});return c.startTime=u??this.calcStartTime(),this.pendingTimeline?(dt(c,this.pendingTimeline),this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:n}=this.options;r.set(jn(t,this.options,e)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:n,times:i,type:o,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:e}=t;return j(e)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:e}=t;return j(e.currentTime||0)}set time(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.currentTime=F(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:e}=t;return e.playbackRate}get finished(){return this.resolved.animation.finished}set speed(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:e}=t;return e.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:e}=t;return e.startTime}attachTimeline(t){if(this._resolved){const{resolved:e}=this;if(!e)return L;const{animation:n}=e;dt(n,t)}else this.pendingTimeline=t;return L}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:e}=t;"finished"===e.playState&&this.updateFinishedPromise(),e.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:e}=t;e.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:e,keyframes:n,duration:i,type:s,ease:o,times:r}=t;if("idle"===e.playState||"finished"===e.playState)return;if(this.time){const{motionValue:t,onUpdate:e,onComplete:a,element:u,...l}=this.options,c=new Fi({...l,keyframes:n,duration:i,type:s,ease:o,times:r,isGenerator:!0}),h=F(this.time);t.setWithVelocity(c.sample(h-10).value,c.sample(h).value,10)}const{onStop:a}=this.options;a&&a(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:o,type:r}=t;if(!(e&&e.owner&&e.owner.current instanceof HTMLElement))return!1;const{onUpdate:a,transformTemplate:u}=e.owner.getProps();return Ui()&&n&&Ii.has(n)&&("transform"!==n||!u)&&!a&&!i&&"mirror"!==s&&0!==o&&"inertia"!==r}}const $i={type:"spring",stiffness:500,damping:25,restSpeed:10},zi={type:"keyframes",duration:.8},Hi={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Xi=(t,{keyframes:e})=>e.length>2?zi:he.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:$i:Hi;const Yi=(t,e,n,i={},s,o)=>r=>{const a=at(i,t)||{},u=a.delay||i.delay||0;let{elapsed:l=0}=i;l-=F(u);let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-l,onUpdate:t=>{e.set(t),a.onUpdate&&a.onUpdate(t)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:s};(function({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:o,repeatType:r,repeatDelay:a,from:u,elapsed:l,...c}){return!!Object.keys(c).length})(a)||(c={...c,...Xi(t,c)}),c.duration&&(c.duration=F(c.duration)),c.repeatDelay&&(c.repeatDelay=F(c.repeatDelay)),void 0!==c.from&&(c.keyframes[0]=c.from);let h=!1;if((!1===c.type||0===c.duration&&!c.repeatDelay)&&(c.duration=0,0===c.delay&&(h=!0)),(Zt.current||k.skipAnimations)&&(h=!0,c.duration=0,c.delay=0),c.allowFlatten=!a.type&&!a.ease,h&&!o&&void 0!==e.get()){const t=jn(c.keyframes,a);if(void 0!==t)return ft.update((()=>{c.onUpdate(t),c.onComplete()})),new N([])}return!o&&Ni.supports(c)?new Ni(c):new Fi(c)};function Ki(t,e,n){const i=qt(t)?t:Wt(t);return i.start(Yi("",i,e,n)),i.animation}const Gi=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),_i="framerAppearId",qi="data-"+Gi(_i);function Zi(t){return t.props[qi]}function Ji(t){return t instanceof SVGElement&&"svg"!==t.tagName}const Qi=(t,e)=>t.depth-e.depth;class ts{constructor(){this.children=[],this.isDirty=!1}add(t){C(this.children,t),this.isDirty=!0}remove(t){V(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Qi),this.isDirty=!1,this.children.forEach(t)}}function es(t,e){const n=St.now(),i=({timestamp:s})=>{const o=s-n;o>=e&&(gt(i),t(o-e))};return ft.read(i,!0),()=>gt(i)}const ns=t=>Array.isArray(t);function is(t){const e=qt(t)?t.get():t;return n=e,Boolean(n&&"object"==typeof n&&n.mix&&n.toValue)?e.toValue():e;var n}const ss=["TopLeft","TopRight","BottomLeft","BottomRight"],os=ss.length,rs=t=>"string"==typeof t?parseFloat(t):t,as=t=>"number"==typeof t||Ce.test(t);function us(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const ls=hs(0,.5,ae),cs=hs(.5,.95,L);function hs(t,e,n){return i=>i<t?0:i>e?1:n(B(t,e,i))}function ds(t,e){t.min=e.min,t.max=e.max}function ps(t,e){ds(t.x,e.x),ds(t.y,e.y)}function ms(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function fs(t){return void 0===t||1===t}function gs({scale:t,scaleX:e,scaleY:n}){return!fs(t)||!fs(e)||!fs(n)}function ys(t){return gs(t)||vs(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function vs(t){return xs(t.x)||xs(t.y)}function xs(t){return t&&"0%"!==t}function ws(t,e,n){return n+e*(t-n)}function Ps(t,e,n,i,s){return void 0!==s&&(t=ws(t,s,i)),ws(t,n,i)+e}function Ts(t,e=0,n=1,i,s){t.min=Ps(t.min,e,n,i,s),t.max=Ps(t.max,e,n,i,s)}function Ss(t,{x:e,y:n}){Ts(t.x,e.translate,e.scale,e.originPoint),Ts(t.y,n.translate,n.scale,n.originPoint)}const bs=.999999999999,As=1.0000000000001;function Es(t,e){t.min=t.min+e,t.max=t.max+e}function Ms(t,e,n,i,s=.5){Ts(t,e,n,Nt(t.min,t.max,s),i)}function Cs(t,e){Ms(t.x,e.x,e.scaleX,e.scale,e.originX),Ms(t.y,e.y,e.scaleY,e.scale,e.originY)}function Vs(t,e,n,i,s){return t=ws(t-=e,1/n,i),void 0!==s&&(t=ws(t,1/s,i)),t}function Rs(t,e,[n,i,s],o,r){!function(t,e=0,n=1,i=.5,s,o=t,r=t){Me.test(e)&&(e=parseFloat(e),e=Nt(r.min,r.max,e/100)-r.min);if("number"!=typeof e)return;let a=Nt(o.min,o.max,i);t===o&&(a-=e),t.min=Vs(t.min,e,n,a,s),t.max=Vs(t.max,e,n,a,s)}(t,e[n],e[i],e[s],e.scale,o,r)}const ks=["x","scaleX","originX"],Ds=["y","scaleY","originY"];function Ls(t,e,n,i){Rs(t.x,e,ks,n?n.x:void 0,i?i.x:void 0),Rs(t.y,e,Ds,n?n.y:void 0,i?i.y:void 0)}const Bs=()=>({x:{min:0,max:0},y:{min:0,max:0}});function Os(t){return 0===t.translate&&1===t.scale}function Fs(t){return Os(t.x)&&Os(t.y)}function js(t,e){return t.min===e.min&&t.max===e.max}function Is(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Us(t,e){return Is(t.x,e.x)&&Is(t.y,e.y)}function Ws(t){return $t(t.x)/$t(t.y)}function Ns(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class $s{constructor(){this.members=[]}add(t){C(this.members,t),t.scheduleRender()}remove(t){if(V(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){const e=this.members.findIndex((e=>t===e));if(0===e)return!1;let n;for(let t=e;t>=0;t--){const e=this.members[t];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,e&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;!1===i&&n.hide()}}exitAnimationComplete(){this.members.forEach((t=>{const{options:e,resumingFrom:n}=t;e.onExitComplete&&e.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()}))}scheduleRender(){this.members.forEach((t=>{t.instance&&t.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const zs={};function Hs(t){for(const e in t)zs[e]=t[e],bn(e)&&(zs[e].isCSSVariable=!0)}function Xs(t){return[t("x"),t("y")]}const Ys={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Ks=["","X","Y","Z"],Gs={visibility:"hidden"};let _s=0;function qs(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}function Zs(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Zi(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",ft,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&Zs(i)}function Js({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(t={},n=e?.()){this.id=_s++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(eo),this.nodes.forEach(uo),this.nodes.forEach(lo),this.nodes.forEach(no)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new ts)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new O),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e,n=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Ji(e),this.instance=e;const{layoutId:i,layout:s,visualElement:o}=this.options;if(o&&!o.current&&o.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(s||i)&&(this.isLayoutDirty=!0),t){let n;const i=()=>this.root.updateBlockedByResize=!1;t(e,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=es(i,250),Ys.hasAnimatedSinceResize&&(Ys.hasAnimatedSinceResize=!1,this.nodes.forEach(ao))}))}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&o&&(i||s)&&this.addEventListener("didUpdate",(({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const s=this.options.transition||o.getDefaultTransition()||go,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=o.getProps(),u=!this.targetLayout||!Us(this.targetLayout,i),l=!e&&n;if(this.options.layoutRoot||this.resumeFrom||l||e&&(u||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(t,l);const e={...at(s,"layout"),onPlay:r,onComplete:a};(o.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e)}else e||ao(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,gt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(co),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Zs(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(so);this.isUpdating||this.nodes.forEach(oo),this.isUpdating=!1,this.nodes.forEach(ro),this.nodes.forEach(Qs),this.nodes.forEach(to),this.clearAllSnapshots();const t=St.now();yt.delta=pe(0,1e3/60,t-yt.timestamp),yt.timestamp=t,yt.isProcessing=!0,vt.update.process(yt),vt.preRender.process(yt),vt.render.process(yt),yt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,xt.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(io),this.sharedNodes.forEach(ho)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ft.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ft.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||$t(this.snapshot.measuredBox.x)||$t(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++){this.path[t].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e){const e=i(this.instance);this.scroll={animationId:this.root.animationId,phase:t,isRoot:e,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:e}}}resetTransform(){if(!s)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,e=this.projectionDelta&&!Fs(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,o=i!==this.prevTransformTemplateValue;t&&(e||ys(this.latestValues)||o)&&(s(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);var i;return t&&(n=this.removeTransform(n)),xo((i=n).x),xo(i.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const e=t.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Po))){const{scroll:t}=this.root;t&&(Es(e.x,t.offset.x),Es(e.y,t.offset.y))}return e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};if(ps(e,t),this.scroll?.wasRoot)return e;for(let n=0;n<this.path.length;n++){const i=this.path[n],{scroll:s,options:o}=i;i!==this.root&&s&&o.layoutScroll&&(s.wasRoot&&ps(e,t),Es(e.x,s.offset.x),Es(e.y,s.offset.y))}return e}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};ps(n,t);for(let t=0;t<this.path.length;t++){const i=this.path[t];!e&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Cs(n,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),ys(i.latestValues)&&Cs(n,i.latestValues)}return ys(this.latestValues)&&Cs(n,this.latestValues),n}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};ps(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!n.instance)continue;if(!ys(n.latestValues))continue;gs(n.latestValues)&&n.updateSnapshot();const i={x:{min:0,max:0},y:{min:0,max:0}};ps(i,n.measurePageBox()),Ls(e,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,i)}return ys(this.latestValues)&&Ls(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==yt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){const e=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=e.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=e.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=e.isSharedProjectionDirty);const n=Boolean(this.resumingFrom)||this!==e;if(!(t||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:i,layoutId:s}=this.options;if(this.layout&&(i||s)){if(this.resolvedRelativeTargetAt=yt.timestamp,!this.targetDelta&&!this.relativeTarget){const t=this.getClosestProjectingParent();t&&t.layout&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Kt(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),ps(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}var o,r,a;if(this.relativeTarget||this.targetDelta)if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),o=this.target,r=this.relativeTarget,a=this.relativeParent.target,Xt(o.x,r.x,a.x),Xt(o.y,r.y,a.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):ps(this.target,this.layout.layoutBox),Ss(this.target,this.targetDelta)):ps(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const t=this.getClosestProjectingParent();t&&Boolean(t.resumingFrom)===Boolean(this.resumingFrom)&&!t.options.layoutScroll&&t.target&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Kt(this.relativeTargetOrigin,this.target,t.target),ps(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(this.parent&&!gs(this.parent.latestValues)&&!vs(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const t=this.getLead(),e=Boolean(this.resumingFrom)||this!==t;let n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),e&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===yt.timestamp&&(n=!1),n)return;const{layout:i,layoutId:s}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!i&&!s)return;ps(this.layoutCorrected,this.layout.layoutBox);const o=this.treeScale.x,r=this.treeScale.y;!function(t,e,n,i=!1){const s=n.length;if(!s)return;let o,r;e.x=e.y=1;for(let a=0;a<s;a++){o=n[a],r=o.projectionDelta;const{visualElement:s}=o.options;s&&s.props.style&&"contents"===s.props.style.display||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Cs(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Ss(t,r)),i&&ys(o.latestValues)&&Cs(t,o.latestValues))}e.x<As&&e.x>bs&&(e.x=1),e.y<As&&e.y>bs&&(e.y=1)}(this.layoutCorrected,this.treeScale,this.path,e),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:a}=t;a?(this.projectionDelta&&this.prevProjectionDelta?(ms(this.prevProjectionDelta.x,this.projectionDelta.x),ms(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Ht(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.treeScale.x===o&&this.treeScale.y===r&&Ns(this.projectionDelta.x,this.prevProjectionDelta.x)&&Ns(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",a))):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.visualElement?.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(t,e=!1){const n=this.snapshot,i=n?n.latestValues:{},s={...this.latestValues},o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const r={x:{min:0,max:0},y:{min:0,max:0}},a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),u=this.getStack(),l=!u||u.members.length<=1,c=Boolean(a&&!l&&!0===this.options.crossfade&&!this.path.some(fo));let h;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var u,d;po(o.x,t.x,n),po(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Kt(r,this.layout.layoutBox,this.relativeParent.layout.layoutBox),function(t,e,n,i){mo(t.x,e.x,n.x,i),mo(t.y,e.y,n.y,i)}(this.relativeTarget,this.relativeTargetOrigin,r,n),h&&(u=this.relativeTarget,d=h,js(u.x,d.x)&&js(u.y,d.y))&&(this.isProjectionDirty=!1),h||(h={x:{min:0,max:0},y:{min:0,max:0}}),ps(h,this.relativeTarget)),a&&(this.animationValues=s,function(t,e,n,i,s,o){s?(t.opacity=Nt(0,void 0!==n.opacity?n.opacity:1,ls(i)),t.opacityExit=Nt(void 0!==e.opacity?e.opacity:1,0,cs(i))):o&&(t.opacity=Nt(void 0!==e.opacity?e.opacity:1,void 0!==n.opacity?n.opacity:1,i));for(let s=0;s<os;s++){const o=`border${ss[s]}Radius`;let r=us(e,o),a=us(n,o);void 0===r&&void 0===a||(r||(r=0),a||(a=0),0===r||0===a||as(r)===as(a)?(t[o]=Math.max(Nt(rs(r),rs(a),i),0),(Me.test(a)||Me.test(r))&&(t[o]+="%")):t[o]=a)}(e.rotate||n.rotate)&&(t.rotate=Nt(e.rotate||0,n.rotate||0,i))}(s,i,this.latestValues,n,c,l)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(gt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ft.update((()=>{Ys.hasAnimatedSinceResize=!0,this.currentAnimation=Ki(0,1e3,{...t,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onStop:()=>{},onComplete:()=>{t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0}))}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:i,latestValues:s}=t;if(e&&n&&i){if(this!==t&&this.layout&&i&&wo(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=$t(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=$t(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}ps(e,n),Cs(e,s),Ht(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new $s);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){const{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(e=!0),!e)return;const i={};n.z&&qs("z",t,i,this.animationValues);for(let e=0;e<Ks.length;e++)qs(`rotate${Ks[e]}`,t,i,this.animationValues),qs(`skew${Ks[e]}`,t,i,this.animationValues);t.render();for(const e in i)t.setStaticValue(e,i[e]),this.animationValues&&(this.animationValues[e]=i[e]);t.scheduleRender()}getProjectionStyles(t){if(!this.instance||this.isSVG)return;if(!this.isVisible)return Gs;const e={visibility:""},n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,e.opacity="",e.pointerEvents=is(t?.pointerEvents)||"",e.transform=n?n(this.latestValues,""):"none",e;const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target){const e={};return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=is(t?.pointerEvents)||""),this.hasProjected&&!ys(this.latestValues)&&(e.transform=n?n({},""):"none",this.hasProjected=!1),e}const s=i.animationValues||i.latestValues;this.applyTransformsToTarget(),e.transform=function(t,e,n){let i="";const s=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;if((s||o||r)&&(i=`translate3d(${s}px, ${o}px, ${r}px) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t,rotate:e,rotateX:s,rotateY:o,skewX:r,skewY:a}=n;t&&(i=`perspective(${t}px) ${i}`),e&&(i+=`rotate(${e}deg) `),s&&(i+=`rotateX(${s}deg) `),o&&(i+=`rotateY(${o}deg) `),r&&(i+=`skewX(${r}deg) `),a&&(i+=`skewY(${a}deg) `)}const a=t.x.scale*e.x,u=t.y.scale*e.y;return 1===a&&1===u||(i+=`scale(${a}, ${u})`),i||"none"}(this.projectionDeltaWithTransform,this.treeScale,s),n&&(e.transform=n(s,e.transform));const{x:o,y:r}=this.projectionDelta;e.transformOrigin=`${100*o.origin}% ${100*r.origin}% 0`,i.animationValues?e.opacity=i===this?s.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:e.opacity=i===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const t in zs){if(void 0===s[t])continue;const{correct:n,applyTo:o,isCSSVariable:r}=zs[t],a="none"===e.transform?s[t]:n(s[t],i);if(o){const t=o.length;for(let n=0;n<t;n++)e[o[n]]=a}else r?this.options.visualElement.renderState.vars[t]=a:e[t]=a}return this.options.layoutId&&(e.pointerEvents=i===this?is(t?.pointerEvents)||"":"none"),e}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach((t=>t.currentAnimation?.stop())),this.root.nodes.forEach(so),this.root.sharedNodes.clear()}}}function Qs(t){t.updateLayout()}function to(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=t.layout,{animationType:s}=t.options,o=e.source!==t.layout.source;"size"===s?Xs((t=>{const i=o?e.measuredBox[t]:e.layoutBox[t],s=$t(i);i.min=n[t].min,i.max=i.min+s})):wo(s,e.layoutBox,n)&&Xs((i=>{const s=o?e.measuredBox[i]:e.layoutBox[i],r=$t(n[i]);s.max=s.min+r,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[i].max=t.relativeTarget[i].min+r)}));const r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Ht(r,n,e.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?Ht(a,t.applyTransform(i,!0),e.measuredBox):Ht(a,n,e.layoutBox);const u=!Fs(r);let l=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:s,layout:o}=i;if(s&&o){const r={x:{min:0,max:0},y:{min:0,max:0}};Kt(r,e.layoutBox,s.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};Kt(a,n,o.layoutBox),Us(r,a)||(l=!0),i.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=r,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:r,hasLayoutChanged:u,hasRelativeLayoutChanged:l})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function eo(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function no(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function io(t){t.clearSnapshot()}function so(t){t.clearMeasurements()}function oo(t){t.isLayoutDirty=!1}function ro(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function ao(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function uo(t){t.resolveTargetDelta()}function lo(t){t.calcProjection()}function co(t){t.resetSkewAndRotation()}function ho(t){t.removeLeadSnapshot()}function po(t,e,n){t.translate=Nt(e.translate,0,n),t.scale=Nt(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function mo(t,e,n,i){t.min=Nt(e.min,n.min,i),t.max=Nt(e.max,n.max,i)}function fo(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const go={duration:.45,ease:[.4,0,.1,1]},yo=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),vo=yo("applewebkit/")&&!yo("chrome/")?Math.round:L;function xo(t){t.min=vo(t.min),t.max=vo(t.max)}function wo(t,e,n){return"position"===t||"preserve-aspect"===t&&(i=Ws(e),s=Ws(n),o=.2,!(Math.abs(i-s)<=o));var i,s,o}function Po(t){return t!==t.root&&t.scroll?.wasRoot}function To(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}const So=Js({attachResizeListener:(t,e)=>To(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),bo={current:void 0},Ao=Js({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!bo.current){const t=new So({});t.mount(window),t.setOptions({layoutScroll:!0}),bo.current=t}return bo.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)});function Eo(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Mo={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!Ce.test(t))return t;t=parseFloat(t)}return`${Eo(t,e.target.x)}% ${Eo(t,e.target.y)}%`}},Co={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=$e.parse(t);if(s.length>5)return i;const o=$e.createTransformer(t),r="number"!=typeof s[0]?1:0,a=n.x.scale*e.x,u=n.y.scale*e.y;s[0+r]/=a,s[1+r]/=u;const l=Nt(a,u,.5);return"number"==typeof s[2+r]&&(s[2+r]/=l),"number"==typeof s[3+r]&&(s[3+r]/=l),o(s)}};function Vo({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function Ro(t,e){return Vo(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}(t.getBoundingClientRect(),e))}const ko={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Do={};for(const t in ko)Do[t]={isEnabled:e=>ko[t].some((t=>!!e[t]))};const Lo={current:null},Bo={current:!1};function Oo(){if(Bo.current=!0,g)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Lo.current=t.matches;t.addListener(e),e()}else Lo.current=!1}const Fo=[...kn,Le,$e],jo=new WeakMap;function Io(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function Uo(t){return"string"==typeof t||Array.isArray(t)}const Wo=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],No=["initial",...Wo];function $o(t){return Io(t.animate)||No.some((e=>Uo(t[e])))}function zo(t){return Boolean($o(t)||t.variants)}function Ho(t){const e=[{},{}];return t?.values.forEach(((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()})),e}function Xo(t,e,n,i){if("function"==typeof e){const[s,o]=Ho(i);e=e(void 0!==n?n:t.custom,s,o)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[s,o]=Ho(i);e=e(void 0!==n?n:t.custom,s,o)}return e}const Yo=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Ko{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},r={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Pn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=St.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,ft.render(this.render,!1,!0))};const{latestValues:a,renderState:u,onUpdate:l}=o;this.onUpdate=l,this.latestValues=a,this.baseTarget={...a},this.initialValues=e.initial?{...a}:{},this.renderState=u,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=r,this.blockInitialAnimation=Boolean(s),this.isControllingVariants=$o(e),this.isVariantNode=zo(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:c,...h}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in h){const e=h[t];void 0!==a[t]&&qt(e)&&e.set(a[t],!1)}}mount(t){this.current=t,jo.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((t,e)=>this.bindToMotionValue(e,t))),Bo.current||Oo(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Lo.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),gt(this.notifyUpdate),gt(this.render),this.valueSubscriptions.forEach((t=>t())),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=he.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=e.on("change",(e=>{this.latestValues[t]=e,this.props.onUpdate&&ft.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)})),s=e.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,(()=>{i(),s(),o&&o(),e.owner&&e.stop()}))}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in Do){const e=Do[t];if(!e)continue;const{isEnabled:n,Feature:i}=e;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<Yo.length;e++){const n=Yo[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const i=t["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=function(t,e,n){for(const i in e){const s=e[i],o=n[i];if(qt(s))t.addValue(i,s);else if(qt(o))t.addValue(i,Wt(s,{owner:t}));else if(o!==s)if(t.hasValue(i)){const e=t.getValue(i);!0===e.liveStyle?e.jump(s):e.hasAnimated||e.set(s)}else{const e=t.getStaticValue(i);t.addValue(i,Wt(void 0!==e?e:s,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=Wt(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){let n=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];var i;return null!=n&&("string"==typeof n&&(Tn(n)||le(n))?n=parseFloat(n):(i=n,!Fo.find(Rn(i))&&$e.test(e)&&(n=Qe(t,e))),this.setBaseTarget(t,qt(n)?n.get():n)),qt(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let n;if("string"==typeof e||"object"==typeof e){const i=Xo(this.props,e,this.presenceContext?.custom);i&&(n=i[t])}if(e&&void 0!==n)return n;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||qt(i)?void 0!==this.initialValues[t]&&void 0===n?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new O),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class Go extends Ko{constructor(){super(...arguments),this.KeyframeResolver=Ln}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;qt(t)&&(this.childSubscription=t.on("change",(t=>{this.current&&(this.current.textContent=`${t}`)})))}}const _o=(t,e)=>e&&"number"==typeof t?e.transform(t):t,qo={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Zo=ce.length;function Jo(t,e,n){let i="",s=!0;for(let o=0;o<Zo;o++){const r=ce[o],a=t[r];if(void 0===a)continue;let u=!0;if(u="number"==typeof a?a===(r.startsWith("scale")?1:0):0===parseFloat(a),!u||n){const t=_o(a,qe[r]);if(!u){s=!1;i+=`${qo[r]||r}(${t}) `}n&&(e[r]=t)}}return i=i.trim(),n?i=n(e,s?"":i):s&&(i="none"),i}function Qo(t,e,n){const{style:i,vars:s,transformOrigin:o}=t;let r=!1,a=!1;for(const t in e){const n=e[t];if(he.has(t))r=!0;else if(bn(t))s[t]=n;else{const e=_o(n,qe[t]);t.startsWith("origin")?(a=!0,o[t]=e):i[t]=e}}if(e.transform||(r||n?i.transform=Jo(e,t.transform,n):i.transform&&(i.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=o;i.transformOrigin=`${t} ${e} ${n}`}}function tr(t,{style:e,vars:n},i,s){Object.assign(t.style,e,s&&s.getProjectionStyles(i));for(const e in n)t.style.setProperty(e,n[e])}function er(t,{layout:e,layoutId:n}){return he.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!zs[t]||"opacity"===t)}function nr(t,e,n){const{style:i}=t,s={};for(const o in i)(qt(i[o])||e.style&&qt(e.style[o])||er(o,t)||void 0!==n?.getValue(o)?.liveStyle)&&(s[o]=i[o]);return s}class ir extends Go{constructor(){super(...arguments),this.type="html",this.renderInstance=tr}readValueFromInstance(t,e){if(he.has(e))return((t,e)=>{const{transform:n="none"}=getComputedStyle(t);return cn(n,e)})(t,e);{const i=(n=t,window.getComputedStyle(n)),s=(bn(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return Ro(t,e)}build(t,e,n){Qo(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return nr(t,e,n)}}function sr(){const t=function(){const t=e.useRef(!1);return y((()=>(t.current=!0,()=>{t.current=!1})),[]),t}(),[n,i]=e.useState(0),s=e.useCallback((()=>{t.current&&i(n+1)}),[n]);return[e.useCallback((()=>ft.postRender(s)),[s]),n]}const or=t=>!0===t,rr=({children:t,id:n,inherit:i=!0})=>{const s=e.useContext(m),o=e.useContext(M),[r,a]=sr(),u=e.useRef(null),l=s.id||o;null===u.current&&((t=>or(!0===t)||"id"===t)(i)&&l&&(n=n?l+"-"+n:l),u.current={id:n,group:or(i)&&s.group||_t()});const c=e.useMemo((()=>({...u.current,forceRender:r})),[a]);return d(m.Provider,{value:c,children:t})},ar=e.createContext({strict:!1});function ur(t){for(const e in t)Do[e]={...Do[e],...t[e]}}function lr(t){return"function"==typeof t}const cr=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function hr(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||cr.has(t)}let dr=t=>!hr(t);function pr(t){t&&(dr=e=>e.startsWith("on")?!hr(e):t(e))}try{pr(require("@emotion/is-prop-valid").default)}catch{}function mr(t,e,n){const i={};for(const s in t)"values"===s&&"object"==typeof t.values||(dr(s)||!0===n&&hr(s)||!e&&!hr(s)||t.draggable&&s.startsWith("onDrag"))&&(i[s]=t[s]);return i}const fr=e.createContext(null);function gr(t){if("undefined"==typeof Proxy)return t;const e=new Map;return new Proxy(((...e)=>t(...e)),{get:(n,i)=>"create"===i?t:(e.has(i)||e.set(i,t(i)),e.get(i))})}function yr(t,e,n){const i=t.getProps();return Xo(i,e,void 0!==n?n:i.custom,t)}function vr(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Wt(n))}function xr(t,e){const n=yr(t,e);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const e in o){vr(t,e,(r=o[e],ns(r)?r[r.length-1]||0:r))}var r}function wr(t,e){const n=t.getValue("willChange");if(i=n,Boolean(qt(i)&&i.add))return n.add(e);var i}function Pr({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function Tr(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=e;i&&(o=i);const u=[],l=s&&t.animationState&&t.animationState.getState()[s];for(const e in a){const i=t.getValue(e,t.latestValues[e]??null),s=a[e];if(void 0===s||l&&Pr(l,e))continue;const r={delay:n,...at(o||{},e)};let c=!1;if(window.MotionHandoffAnimation){const n=Zi(t);if(n){const t=window.MotionHandoffAnimation(n,e,ft);null!==t&&(r.startTime=t,c=!0)}}wr(t,e),i.start(Yi(e,i,s,t.shouldReduceMotion&&de.has(e)?{type:!1}:r,t,c));const h=i.animation;h&&u.push(h)}return r&&Promise.all(u).then((()=>{ft.update((()=>{r&&xr(t,r)}))})),u}function Sr(t,e,n={}){const i=yr(t,e,"exit"===n.type?t.presenceContext?.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Promise.all(Tr(t,i,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:o=0,staggerChildren:r,staggerDirection:a}=s;return function(t,e,n=0,i=0,s=1,o){const r=[],a=(t.variantChildren.size-1)*i,u=1===s?(t=0)=>t*i:(t=0)=>a-t*i;return Array.from(t.variantChildren).sort(br).forEach(((t,i)=>{t.notify("AnimationStart",e),r.push(Sr(t,e,{...o,delay:n+u(i)}).then((()=>t.notify("AnimationComplete",e))))})),Promise.all(r)}(t,e,o+i,r,a,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[t,e]="beforeChildren"===a?[o,r]:[r,o];return t().then((()=>e()))}return Promise.all([o(),r(n.delay)])}function br(t,e){return t.sortNodePosition(e)}function Ar(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const s=e.map((e=>Sr(t,e,n)));i=Promise.all(s)}else if("string"==typeof e)i=Sr(t,e,n);else{const s="function"==typeof e?yr(t,e,n.custom):e;i=Promise.all(Tr(t,s,n))}return i.then((()=>{t.notify("AnimationComplete",e)}))}function Er(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}const Mr=No.length;function Cr(t){if(!t)return;if(!t.isControllingVariants){const e=t.parent&&Cr(t.parent)||{};return void 0!==t.props.initial&&(e.initial=t.props.initial),e}const e={};for(let n=0;n<Mr;n++){const i=No[n],s=t.props[i];(Uo(s)||!1===s)&&(e[i]=s)}return e}const Vr=[...Wo].reverse(),Rr=Wo.length;function kr(t){let e=function(t){return e=>Promise.all(e.map((({animation:e,options:n})=>Ar(t,e,n))))}(t),n=Br(),i=!0;const s=e=>(n,i)=>{const s=yr(t,i,"exit"===e?t.presenceContext?.custom:void 0);if(s){const{transition:t,transitionEnd:e,...i}=s;n={...n,...i,...e}}return n};function o(o){const{props:r}=t,a=Cr(t.parent)||{},u=[],l=new Set;let c={},h=1/0;for(let e=0;e<Rr;e++){const d=Vr[e],p=n[d],m=void 0!==r[d]?r[d]:a[d],f=Uo(m),g=d===o?p.isActive:null;!1===g&&(h=e);let y=m===a[d]&&m!==r[d]&&f;if(y&&i&&t.manuallyAnimateOnMount&&(y=!1),p.protectedKeys={...c},!p.isActive&&null===g||!m&&!p.prevProp||Io(m)||"boolean"==typeof m)continue;const v=Dr(p.prevProp,m);let x=v||d===o&&p.isActive&&!y&&f||e>h&&f,w=!1;const P=Array.isArray(m)?m:[m];let T=P.reduce(s(d),{});!1===g&&(T={});const{prevResolvedValues:S={}}=p,b={...S,...T},A=e=>{x=!0,l.has(e)&&(w=!0,l.delete(e)),p.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in b){const e=T[t],n=S[t];if(c.hasOwnProperty(t))continue;let i=!1;i=ns(e)&&ns(n)?!Er(e,n):e!==n,i?null!=e?A(t):l.add(t):void 0!==e&&l.has(t)?A(t):p.protectedKeys[t]=!0}p.prevProp=m,p.prevResolvedValues=T,p.isActive&&(c={...c,...T}),i&&t.blockInitialAnimation&&(x=!1);x&&(!(y&&v)||w)&&u.push(...P.map((t=>({animation:t,options:{type:d}}))))}if(l.size){const e={};if("boolean"!=typeof r.initial){const n=yr(t,Array.isArray(r.initial)?r.initial[0]:r.initial);n&&n.transition&&(e.transition=n.transition)}l.forEach((n=>{const i=t.getBaseTarget(n),s=t.getValue(n);s&&(s.liveStyle=!0),e[n]=i??null})),u.push({animation:e})}let d=Boolean(u.length);return!i||!1!==r.initial&&r.initial!==r.animate||t.manuallyAnimateOnMount||(d=!1),i=!1,d?e(u):Promise.resolve()}return{animateChanges:o,setActive:function(e,i){if(n[e].isActive===i)return Promise.resolve();t.variantChildren?.forEach((t=>t.animationState?.setActive(e,i))),n[e].isActive=i;const s=o(e);for(const t in n)n[t].protectedKeys={};return s},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=Br(),i=!0}}}function Dr(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!Er(e,t)}function Lr(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Br(){return{animate:Lr(!0),whileInView:Lr(),whileHover:Lr(),whileTap:Lr(),whileDrag:Lr(),whileFocus:Lr(),exit:Lr()}}class Or{constructor(t){this.isMounted=!1,this.node=t}update(){}}let Fr=0;const jr={animation:{Feature:class extends Or{constructor(t){super(t),t.animationState||(t.animationState=kr(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Io(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends Or{constructor(){super(...arguments),this.id=Fr++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const i=this.node.animationState.setActive("exit",!t);e&&!t&&i.then((()=>{e(this.id)}))}mount(){const{register:t,onExitComplete:e}=this.node.presenceContext||{};e&&e(this.id),t&&(this.unmount=t(this.id))}unmount(){}}}};function Ir(t){return{point:{x:t.pageX,y:t.pageY}}}const Ur=t=>e=>kt(e)&&t(e,Ir(e));function Wr(t,e,n,i){return To(t,e,Ur(n),i)}const Nr=({current:t})=>t?t.ownerDocument.defaultView:null;function $r(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}const zr=(t,e)=>Math.abs(t-e);function Hr(t,e){const n=zr(t.x,e.x),i=zr(t.y,e.y);return Math.sqrt(n**2+i**2)}class Xr{constructor(t,e,{transformPagePoint:n,contextWindow:i,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const t=Gr(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=Hr(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:i}=t,{timestamp:s}=yt;this.history.push({...i,timestamp:s});const{onStart:o,onMove:r}=this.handlers;e||(o&&o(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),r&&r(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=Yr(e,this.transformPagePoint),ft.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:n,onSessionEnd:i,resumeAnimation:s}=this.handlers;if(this.dragSnapToOrigin&&s&&s(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=Gr("pointercancel"===t.type?this.lastMoveEventInfo:Yr(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,o),i&&i(t,o)},!kt(t))return;this.dragSnapToOrigin=s,this.handlers=e,this.transformPagePoint=n,this.contextWindow=i||window;const o=Yr(Ir(t),this.transformPagePoint),{point:r}=o,{timestamp:a}=yt;this.history=[{...r,timestamp:a}];const{onSessionStart:u}=e;u&&u(t,Gr(o,this.history)),this.removeListeners=Yn(Wr(this.contextWindow,"pointermove",this.handlePointerMove),Wr(this.contextWindow,"pointerup",this.handlePointerUp),Wr(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),gt(this.updatePoint)}}function Yr(t,e){return e?{point:e(t.point)}:t}function Kr(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Gr({point:t},e){return{point:t,delta:Kr(t,qr(e)),offset:Kr(t,_r(e)),velocity:Zr(e,.1)}}function _r(t){return t[0]}function qr(t){return t[t.length-1]}function Zr(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const s=qr(t);for(;n>=0&&(i=t[n],!(s.timestamp-i.timestamp>F(e)));)n--;if(!i)return{x:0,y:0};const o=j(s.timestamp-i.timestamp);if(0===o)return{x:0,y:0};const r={x:(s.x-i.x)/o,y:(s.y-i.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function Jr(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function Qr(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,i]=[i,n]),{min:n,max:i}}const ta=.35;function ea(t,e,n){return{min:na(t,e),max:na(t,n)}}function na(t,e){return"number"==typeof t?t:t[e]||0}const ia=new WeakMap;class sa{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=t}start(t,{snapToCursor:e=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:i}=this.getProps();this.panSession=new Xr(t,{onSessionStart:t=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(Ir(t).point)},onStart:(t,e)=>{const{drag:n,dragPropagation:i,onDragStart:s}=this.getProps();if(n&&!i&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(o=n)||"y"===o?bt[o]?null:(bt[o]=!0,()=>{bt[o]=!1}):bt.x||bt.y?null:(bt.x=bt.y=!0,()=>{bt.x=bt.y=!1}),!this.openDragLock))return;var o;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Xs((t=>{let e=this.getAxisMotionValue(t).get()||0;if(Me.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const i=n.layout.layoutBox[t];if(i){e=$t(i)*(parseFloat(e)/100)}}}this.originPoint[t]=e})),s&&ft.postRender((()=>s(t,e))),wr(this.visualElement,"transform");const{animationState:r}=this.visualElement;r&&r.setActive("whileDrag",!0)},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:s,onDrag:o}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:r}=e;if(i&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(r),void(null!==this.currentDirection&&s&&s(this.currentDirection));this.updateAxis("x",e.point,r),this.updateAxis("y",e.point,r),this.visualElement.render(),o&&o(t,e)},onSessionEnd:(t,e)=>this.stop(t,e),resumeAnimation:()=>Xs((t=>"paused"===this.getAnimationState(t)&&this.getAxisMotionValue(t).animation?.play()))},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:i,contextWindow:Nr(this.visualElement)})}stop(t,e){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:i}=e;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&ft.postRender((()=>s(t,e)))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,n){const{drag:i}=this.getProps();if(!n||!oa(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=function(t,{min:e,max:n},i){return void 0!==e&&t<e?t=i?Nt(e,t,i.min):Math.max(t,e):void 0!==n&&t>n&&(t=i?Nt(n,t,i.max):Math.min(t,n)),t}(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){const{dragConstraints:t,dragElastic:e}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;t&&$r(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!n)&&function(t,{top:e,left:n,bottom:i,right:s}){return{x:Jr(t.x,n,s),y:Jr(t.y,e,i)}}(n.layoutBox,t),this.elastic=function(t=ta){return!1===t?t=0:!0===t&&(t=ta),{x:ea(t,"left","right"),y:ea(t,"top","bottom")}}(e),i!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&Xs((t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(n.layoutBox[t],this.constraints[t]))}))}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!$r(t))return!1;const n=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=function(t,e,n){const i=Ro(t,n),{scroll:s}=e;return s&&(Es(i.x,s.offset.x),Es(i.y,s.offset.y)),i}(n,i.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:Qr(t.x,e.x),y:Qr(t.y,e.y)}}(i.layout.layoutBox,s);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=Vo(t))}return o}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},u=Xs((r=>{if(!oa(r,e,this.currentDirection))return;let u=a&&a[r]||{};o&&(u={min:0,max:0});const l=i?200:1e6,c=i?40:1e7,h={type:"inertia",velocity:n?t[r]:0,bounceStiffness:l,bounceDamping:c,timeConstant:750,restDelta:1,restSpeed:10,...s,...u};return this.startAxisValueAnimation(r,h)}));return Promise.all(u).then(r)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return wr(this.visualElement,t),n.start(Yi(t,n,0,e,this.visualElement,!1))}stopAnimation(){Xs((t=>this.getAxisMotionValue(t).stop()))}pauseAnimation(){Xs((t=>this.getAxisMotionValue(t).animation?.pause()))}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const e=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps(),i=n[e];return i||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){Xs((e=>{const{drag:n}=this.getProps();if(!oa(e,n,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(e);if(i&&i.layout){const{min:n,max:o}=i.layout.layoutBox[e];s.set(t[e]-Nt(n,o,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!$r(e)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Xs((t=>{const e=this.getAxisMotionValue(t);if(e&&!1!==this.constraints){const n=e.get();i[t]=function(t,e){let n=.5;const i=$t(t),s=$t(e);return s>i?n=B(e.min,e.max-i,t.min):i>s&&(n=B(t.min,t.max-s,e.min)),pe(0,1,n)}({min:n,max:n},this.constraints[t])}}));const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Xs((e=>{if(!oa(e,t,null))return;const n=this.getAxisMotionValue(e),{min:s,max:o}=this.constraints[e];n.set(Nt(s,o,i[e]))}))}addListeners(){if(!this.visualElement.current)return;ia.set(this.visualElement,this);const t=Wr(this.visualElement.current,"pointerdown",(t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)})),e=()=>{const{dragConstraints:t}=this.getProps();$r(t)&&t.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,i=n.addEventListener("measure",e);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),ft.read(e);const s=To(window,"resize",(()=>this.scalePositionWithinConstraints())),o=n.addEventListener("didUpdate",(({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(Xs((e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))})),this.visualElement.render())}));return()=>{s(),t(),i(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=ta,dragMomentum:r=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:r}}}function oa(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const ra=t=>(e,n)=>{t&&ft.postRender((()=>t(e,n)))};const aa=e.createContext({});class ua extends e.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:i}=this.props,{projection:s}=t;Hs(ca),s&&(e.group&&e.group.add(s),n&&n.register&&i&&n.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",(()=>{this.safeToRemove()})),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Ys.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:i,isPresent:s}=this.props,o=n.projection;return o?(o.isPresent=s,i||t.layoutDependency!==e||void 0===e||t.isPresent!==s?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||ft.postRender((()=>{const t=o.getStack();t&&t.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),xt.postRender((()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()})))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function la(t){const[n,i]=b(),s=e.useContext(m);return d(ua,{...t,layoutGroup:s,switchLayoutGroup:e.useContext(aa),isPresent:n,safeToRemove:i})}const ca={borderRadius:{...Mo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Mo,borderTopRightRadius:Mo,borderBottomLeftRadius:Mo,borderBottomRightRadius:Mo,boxShadow:Co},ha={pan:{Feature:class extends Or{constructor(){super(...arguments),this.removePointerDownListener=L}onPointerDown(t){this.session=new Xr(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Nr(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:ra(t),onStart:ra(e),onMove:n,onEnd:(t,e)=>{delete this.session,i&&ft.postRender((()=>i(t,e)))}}}mount(){this.removePointerDownListener=Wr(this.node.current,"pointerdown",(t=>this.onPointerDown(t)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends Or{constructor(t){super(t),this.removeGroupControls=L,this.removeListeners=L,this.controls=new sa(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||L}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Ao,MeasureLayout:la}};function da(t,e,n){const{props:i}=t;t.animationState&&i.whileHover&&t.animationState.setActive("whileHover","Start"===n);const s=i["onHover"+n];s&&ft.postRender((()=>s(e,Ir(e))))}function pa(t,e,n){const{props:i}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&i.whileTap&&t.animationState.setActive("whileTap","Start"===n);const s=i["onTap"+("End"===n?"":n)];s&&ft.postRender((()=>s(e,Ir(e))))}const ma=new WeakMap,fa=new WeakMap,ga=t=>{const e=ma.get(t.target);e&&e(t)},ya=t=>{t.forEach(ga)};function va(t,e,n){const i=function({root:t,...e}){const n=t||document;fa.has(n)||fa.set(n,{});const i=fa.get(n),s=JSON.stringify(e);return i[s]||(i[s]=new IntersectionObserver(ya,{root:t,...e})),i[s]}(e);return ma.set(t,n),i.observe(t),()=>{ma.delete(t),i.unobserve(t)}}const xa={some:0,all:1};const wa={inView:{Feature:class extends Or{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:i="some",once:s}=t,o={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof i?i:xa[i]};return va(this.node.current,o,(t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,s&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),o=e?n:i;o&&o(t)}))}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends Or{mount(){const{current:t}=this.node;t&&(this.unmount=jt(t,((t,e)=>(pa(this.node,e,"Start"),(t,{success:e})=>pa(this.node,t,e?"End":"Cancel"))),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends Or{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=Yn(To(this.node.current,"focus",(()=>this.onFocus())),To(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends Or{mount(){const{current:t}=this.node;t&&(this.unmount=Vt(t,((t,e)=>(da(this.node,e,"Start"),t=>da(this.node,t,"End")))))}unmount(){}}}},Pa={layout:{ProjectionNode:Ao,MeasureLayout:la}},Ta=e.createContext({});function Sa(t){const{initial:n,animate:i}=function(t,e){if($o(t)){const{initial:e,animate:n}=t;return{initial:!1===e||Uo(e)?e:void 0,animate:Uo(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,e.useContext(Ta));return e.useMemo((()=>({initial:n,animate:i})),[ba(n),ba(i)])}function ba(t){return Array.isArray(t)?t.join(" "):t}const Aa=Symbol.for("motionComponentSymbol");function Ea(t,n,i){return e.useCallback((e=>{e&&t.onMount&&t.onMount(e),n&&(e?n.mount(e):n.unmount()),i&&("function"==typeof i?i(e):$r(i)&&(i.current=e))}),[n])}function Ma(t,n,i,s,o){const{visualElement:r}=e.useContext(Ta),a=e.useContext(ar),u=e.useContext(v),l=e.useContext(x).reducedMotion,c=e.useRef(null);s=s||a.renderer,!c.current&&s&&(c.current=s(t,{visualState:n,parent:r,props:i,presenceContext:u,blockInitialAnimation:!!u&&!1===u.initial,reducedMotionConfig:l}));const h=c.current,d=e.useContext(aa);!h||h.projection||!o||"html"!==h.type&&"svg"!==h.type||function(t,e,n,i){const{layoutId:s,layout:o,drag:r,dragConstraints:a,layoutScroll:u,layoutRoot:l}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Ca(t.parent)),t.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:Boolean(r)||a&&$r(a),visualElement:t,animationType:"string"==typeof o?o:"both",initialPromotionConfig:i,layoutScroll:u,layoutRoot:l})}(c.current,i,o,d);const p=e.useRef(!1);e.useInsertionEffect((()=>{h&&p.current&&h.update(i,u)}));const m=i[qi],f=e.useRef(Boolean(m)&&!window.MotionHandoffIsComplete?.(m)&&window.MotionHasOptimisedAnimation?.(m));return y((()=>{h&&(p.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),xt.render(h.render),f.current&&h.animationState&&h.animationState.animateChanges())})),e.useEffect((()=>{h&&(!f.current&&h.animationState&&h.animationState.animateChanges(),f.current&&(queueMicrotask((()=>{window.MotionHandoffMarkAsComplete?.(m)})),f.current=!1))})),h}function Ca(t){if(t)return!1!==t.options.allowProjection?t.projection:Ca(t.parent)}function Va({preloadedFeatures:t,createVisualElement:n,useRender:i,useVisualState:s,Component:o}){function r(t,r){let a;const u={...e.useContext(x),...t,layoutId:Ra(t)},{isStatic:l}=u,c=Sa(t),h=s(t,l);if(!l&&g){e.useContext(ar).strict;const t=function(t){const{drag:e,layout:n}=Do;if(!e&&!n)return{};const i={...e,...n};return{MeasureLayout:e?.isEnabled(t)||n?.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}(u);a=t.MeasureLayout,c.visualElement=Ma(o,h,u,n,t.ProjectionNode)}return p(Ta.Provider,{value:c,children:[a&&c.visualElement?d(a,{visualElement:c.visualElement,...u}):null,i(o,t,Ea(h,c.visualElement,r),h,l,c.visualElement)]})}t&&ur(t),r.displayName=`motion.${"string"==typeof o?o:`create(${o.displayName??o.name??""})`}`;const a=e.forwardRef(r);return a[Aa]=o,a}function Ra({layoutId:t}){const n=e.useContext(m).id;return n&&void 0!==t?n+"-"+t:t}const ka=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Da(t,e,n){for(const i in e)qt(e[i])||er(i,n)||(t[i]=e[i])}function La(t,n){const i={};return Da(i,t.style||{},t),Object.assign(i,function({transformTemplate:t},n){return e.useMemo((()=>{const e={style:{},transform:{},transformOrigin:{},vars:{}};return Qo(e,n,t),Object.assign({},e.vars,e.style)}),[n])}(t,n)),i}function Ba(t,e){const n={},i=La(t,e);return t.drag&&!1!==t.dragListener&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=i,n}const Oa=["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 Fa(t){return"string"==typeof t&&!t.includes("-")&&!!(Oa.indexOf(t)>-1||/[A-Z]/u.test(t))}const ja={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ia={offset:"strokeDashoffset",array:"strokeDasharray"};function Ua(t,e,n){return"string"==typeof t?t:Ce.transform(e+n*t)}function Wa(t,{attrX:e,attrY:n,attrScale:i,originX:s,originY:o,pathLength:r,pathSpacing:a=1,pathOffset:u=0,...l},c,h){if(Qo(t,l,h),c)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:d,style:p,dimensions:m}=t;d.transform&&(m&&(p.transform=d.transform),delete d.transform),m&&(void 0!==s||void 0!==o||p.transform)&&(p.transformOrigin=function(t,e,n){return`${Ua(e,t.x,t.width)} ${Ua(n,t.y,t.height)}`}(m,void 0!==s?s:.5,void 0!==o?o:.5)),void 0!==e&&(d.x=e),void 0!==n&&(d.y=n),void 0!==i&&(d.scale=i),void 0!==r&&function(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?ja:Ia;t[o.offset]=Ce.transform(-i);const r=Ce.transform(e),a=Ce.transform(n);t[o.array]=`${r} ${a}`}(d,r,a,u,!1)}const Na=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),$a=t=>"string"==typeof t&&"svg"===t.toLowerCase();function za(t,n,i,s){const o=e.useMemo((()=>{const e={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Wa(e,n,$a(s),t.transformTemplate),{...e.attrs,style:{...e.style}}}),[n]);if(t.style){const e={};Da(e,t.style,t),o.style={...e,...o.style}}return o}function Ha(t=!1){return(n,i,s,{latestValues:o},r)=>{const a=(Fa(n)?za:Ba)(i,o,r,n),u=mr(i,"string"==typeof n,t),l=n!==e.Fragment?{...u,...a,ref:s}:{},{children:c}=i,h=e.useMemo((()=>qt(c)?c.get():c),[c]);return e.createElement(n,{...l,children:h})}}const Xa=t=>(n,i)=>{const s=e.useContext(Ta),o=e.useContext(v),r=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e,onUpdate:n},i,s,o){const r={latestValues:Ya(i,s,o,t),renderState:e()};return n&&(r.onMount=t=>n({props:i,current:t,...r}),r.onUpdate=t=>n(t)),r}(t,n,s,o);return i?r():f(r)};function Ya(t,e,n,i){const s={},o=i(t,{});for(const t in o)s[t]=is(o[t]);let{initial:r,animate:a}=t;const u=$o(t),l=zo(t);e&&l&&!u&&!1!==t.inherit&&(void 0===r&&(r=e.initial),void 0===a&&(a=e.animate));let c=!!n&&!1===n.initial;c=c||!1===r;const h=c?a:r;if(h&&"boolean"!=typeof h&&!Io(h)){const e=Array.isArray(h)?h:[h];for(let n=0;n<e.length;n++){const i=Xo(t,e[n]);if(i){const{transitionEnd:t,transition:e,...n}=i;for(const t in n){let e=n[t];if(Array.isArray(e)){e=e[c?e.length-1:0]}null!==e&&(s[t]=e)}for(const e in t)s[e]=t[e]}}}return s}const Ka={useVisualState:Xa({scrapeMotionValuesFromProps:nr,createRenderState:ka})};function Ga(t,e){try{e.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(t){e.dimensions={x:0,y:0,width:0,height:0}}}const _a=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function qa(t,e,n,i){tr(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(_a.has(n)?n:Gi(n),e.attrs[n])}function Za(t,e,n){const i=nr(t,e,n);for(const n in t)if(qt(t[n])||qt(e[n])){i[-1!==ce.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}const Ja=["x","y","width","height","cx","cy","r"],Qa={useVisualState:Xa({scrapeMotionValuesFromProps:Za,createRenderState:Na,onUpdate:({props:t,prevProps:e,current:n,renderState:i,latestValues:s})=>{if(!n)return;let o=!!t.drag;if(!o)for(const t in s)if(he.has(t)){o=!0;break}if(!o)return;let r=!e;if(e)for(let n=0;n<Ja.length;n++){const i=Ja[n];t[i]!==e[i]&&(r=!0)}r&&ft.read((()=>{Ga(n,i),ft.render((()=>{Wa(i,s,$a(n.tagName),t.transformTemplate),qa(n,i)}))}))}})};function tu(t,e){return function(n,{forwardMotionProps:i}={forwardMotionProps:!1}){return Va({...Fa(n)?Qa:Ka,preloadedFeatures:t,useRender:Ha(i),createVisualElement:e,Component:n})}}class eu extends Go{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Bs,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&Ga(this.current,this.renderState)}}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(he.has(e)){const t=Je(e);return t&&t.default||0}return e=_a.has(e)?e:Gi(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return Za(t,e,n)}onBindTransform(){this.current&&!this.renderState.dimensions&&ft.postRender(this.updateDimensions)}build(t,e,n){Wa(t,e,this.isSVGTag,n.transformTemplate)}renderInstance(t,e,n,i){qa(t,e,0,i)}mount(t){this.isSVGTag=$a(t.tagName),super.mount(t)}}const nu=(t,n)=>Fa(t)?new eu(n):new ir(n,{allowProjection:t!==e.Fragment}),iu=gr(tu({...jr,...wa,...ha,...Pa},nu));function su({children:t,as:n="ul",axis:i="y",onReorder:s,values:o,...r},a){const u=f((()=>iu[n])),l=[],c=e.useRef(!1),h={axis:i,registerItem:(t,e)=>{const n=l.findIndex((e=>t===e.value));-1!==n?l[n].layout=e[i]:l.push({value:t,layout:e[i]}),l.sort(au)},updateOrder:(t,e,n)=>{if(c.current)return;const i=function(t,e,n,i){if(!i)return t;const s=t.findIndex((t=>t.value===e));if(-1===s)return t;const o=i>0?1:-1,r=t[s+o];if(!r)return t;const a=t[s],u=r.layout,l=Nt(u.min,u.max,.5);return 1===o&&a.layout.max+n>l||-1===o&&a.layout.min+n<l?function([...t],e,n){const i=e<0?t.length+e:e;if(i>=0&&i<t.length){const i=n<0?t.length+n:n,[s]=t.splice(e,1);t.splice(i,0,s)}return t}(t,s,s+o):t}(l,t,e,n);l!==i&&(c.current=!0,s(i.map(ru).filter((t=>-1!==o.indexOf(t)))))}};return e.useEffect((()=>{c.current=!1})),d(u,{...r,ref:a,ignoreStrict:!0,children:d(fr.Provider,{value:h,children:t})})}const ou=e.forwardRef(su);function ru(t){return t.value}function au(t,e){return t.layout.min-e.layout.min}function uu(t){const n=f((()=>Wt(t))),{isStatic:i}=e.useContext(x);if(i){const[,i]=e.useState(t);e.useEffect((()=>n.on("change",i)),[])}return n}function lu(...t){const e=!Array.isArray(t[0]),n=e?0:-1,i=t[0+n],s=t[1+n],o=t[2+n],r=t[3+n],a=Vi(s,o,{mixer:(u=o[0],(t=>t&&"object"==typeof t&&t.mix)(u)?u.mix:void 0),...r});var u;return e?a(i):a}function cu(t,e){const n=uu(e()),i=()=>n.set(e());return i(),y((()=>{const e=()=>ft.preRender(i,!1,!0),n=t.map((t=>t.on("change",e)));return()=>{n.forEach((t=>t())),gt(i)}})),n}function hu(t,e,n,i){if("function"==typeof t)return function(t){It.current=[],t();const e=cu(It.current,t);return It.current=void 0,e}(t);const s="function"==typeof e?e:lu(e,n,i);return Array.isArray(t)?du(t,s):du([t],(([t])=>s(t)))}function du(t,e){const n=f((()=>[]));return cu(t,(()=>{n.length=0;const i=t.length;for(let e=0;e<i;e++)n[e]=t[e].get();return e(n)}))}function pu(t,e=0){return qt(t)?t:uu(e)}function mu({children:t,style:n={},value:i,as:s="li",onDrag:o,layout:r=!0,...a},u){const l=f((()=>iu[s])),c=e.useContext(fr),h={x:pu(n.x),y:pu(n.y)},p=hu([h.x,h.y],(([t,e])=>t||e?1:"unset")),{axis:m,registerItem:g,updateOrder:y}=c;return d(l,{drag:m,...a,dragSnapToOrigin:!0,style:{...n,x:h.x,y:h.y,zIndex:p},layout:r,onDrag:(t,e)=>{const{velocity:n}=e;n[m]&&y(i,h[m].get(),n[m]),o&&o(t,e)},onLayoutMeasure:t=>g(i,t),ref:u,ignoreStrict:!0,children:t})}const fu=e.forwardRef(mu);var gu=Object.freeze({__proto__:null,Group:ou,Item:fu});const yu=(t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t};function vu(t,e){return Ei(t)?t[yu(0,t.length,e)]:t}function xu(t){return"object"==typeof t&&!Array.isArray(t)}function wu(t,e,n,i){return"string"==typeof t&&xu(e)?Et(t,n,i):t instanceof NodeList?Array.from(t):Array.isArray(t)?t:[t]}function Pu(t,e,n){return t*(e+1)}function Tu(t,e,n,i){return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:i.get(e)??t}function Su(t,e,n,i,s,o){!function(t,e,n){for(let i=0;i<t.length;i++){const s=t[i];s.at>e&&s.at<n&&(V(t,s),i--)}}(t,s,o);for(let r=0;r<e.length;r++)t.push({value:e[r],at:Nt(s,o,i[r]),easing:vu(n,r)})}function bu(t,e){for(let n=0;n<t.length;n++)t[n]=t[n]/(e+1)}function Au(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function Eu(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function Mu(t,e){return e[t]||(e[t]=[]),e[t]}function Cu(t){return Array.isArray(t)?t:[t]}function Vu(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const Ru=t=>"number"==typeof t,ku=t=>t.every(Ru);class Du extends Ko{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(function(t,e){return t in e}(e,t)){const n=t[e];if("string"==typeof n||"number"==typeof n)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}}function Lu(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Ji(t)?new eu(e):new ir(e);n.mount(t),jo.set(t,n)}function Bu(t){const e=new Du({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});e.mount(t),jo.set(t,e)}function Ou(t,e,n,i){const s=[];if(function(t,e){return qt(t)||"number"==typeof t||"string"==typeof t&&!xu(e)}(t,e))s.push(Ki(t,xu(e)&&e.default||e,n&&n.default||n));else{const o=wu(t,e,i),r=o.length;for(let t=0;t<r;t++){const i=o[t],a=i instanceof Element?Lu:Bu;jo.has(i)||a(i);const u=jo.get(i),l={...n};"delay"in l&&"function"==typeof l.delay&&(l.delay=l.delay(t,r)),s.push(...Tr(u,{...e,transition:l},{}))}}return s}function Fu(t,e,n){const i=[],s=function(t,{defaultTransition:e={},...n}={},i,s){const o=e.duration||.3,r=new Map,a=new Map,u={},l=new Map;let c=0,h=0,d=0;for(let n=0;n<t.length;n++){const r=t[n];if("string"==typeof r){l.set(r,h);continue}if(!Array.isArray(r)){l.set(r.name,Tu(h,r.at,c,l));continue}let[p,m,f={}]=r;void 0!==f.at&&(h=Tu(h,f.at,c,l));let g=0;const y=(t,n,i,r=0,a=0)=>{const u=Cu(t),{delay:l=0,times:c=ki(u),type:p="keyframes",repeat:m,repeatType:f,repeatDelay:y=0,...v}=n;let{ease:x=e.ease||"easeOut",duration:w}=n;const P="function"==typeof l?l(r,a):l,T=u.length,S=st(p)?p:s?.[p];if(T<=2&&S){let t=100;if(2===T&&ku(u)){const e=u[1]-u[0];t=Math.abs(e)}const e={...v};void 0!==w&&(e.duration=F(w));const n=ct(e,t,S);x=n.ease,w=n.duration}w??(w=o);const b=h+P;1===c.length&&0===c[0]&&(c[1]=1);const A=c.length-u.length;if(A>0&&Ri(c,A),1===u.length&&u.unshift(null),m){w=Pu(w,m);const t=[...u],e=[...c];x=Array.isArray(x)?[...x]:[x];const n=[...x];for(let i=0;i<m;i++){u.push(...t);for(let s=0;s<t.length;s++)c.push(e[s]+(i+1)),x.push(0===s?"linear":vu(n,s-1))}bu(c,m)}const E=b+w;Su(i,u,x,c,b,E),g=Math.max(P+w,g),d=Math.max(E,d)};if(qt(p))y(m,f,Mu("default",Eu(p,a)));else{const t=wu(p,m,i,u),e=t.length;for(let n=0;n<e;n++){const i=Eu(t[n],a);for(const t in m)y(m[t],Vu(f,t),Mu(t,i),n,e)}}c=h,h+=g}return a.forEach(((t,i)=>{for(const s in t){const o=t[s];o.sort(Au);const a=[],u=[],l=[];for(let t=0;t<o.length;t++){const{at:e,value:n,easing:i}=o[t];a.push(n),u.push(B(0,d,e)),l.push(i||"easeOut")}0!==u[0]&&(u.unshift(0),a.unshift(a[0]),l.unshift("easeInOut")),1!==u[u.length-1]&&(u.push(1),a.push(null)),r.has(i)||r.set(i,{keyframes:{},transition:{}});const c=r.get(i);c.keyframes[s]=a,c.transition[s]={...e,duration:d,ease:l,times:u,...n}}})),r}(t,e,n,{spring:Pi});return s.forEach((({keyframes:t,transition:e},n)=>{i.push(...Ou(n,t,e))})),i}function ju(t){return function(e,n,i){let s=[];var o;o=e,s=Array.isArray(o)&&o.some(Array.isArray)?Fu(e,n,t):Ou(e,n,i,t);const r=new N(s);return t&&t.animations.push(r),r}}const Iu=ju();const Uu=t=>function(e,n,i){return new N(function(t,e,n,i){const s=Et(t,i),o=s.length,r=[];for(let t=0;t<o;t++){const i=s[t],a={...n};"function"==typeof a.delay&&(a.delay=a.delay(t,o));for(const t in e){const n=e[t],s={...at(a,t)};s.duration&&(s.duration=F(s.duration)),s.delay&&(s.delay=F(s.delay)),r.push(new rt({element:i,name:t,keyframes:n,transition:s,allowFlatten:!a.type&&!a.ease}))}}return r}(e,n,i,t))},Wu=Uu();function Nu(t,e){let n;const i=()=>{const{currentTime:i}=e,s=(null===i?0:i.value)/100;n!==s&&t(s),n=s};return ft.update(i,!0),()=>gt(i)}const $u=new WeakMap;let zu;function Hu({target:t,contentRect:e,borderBoxSize:n}){$u.get(t)?.forEach((i=>{i({target:t,contentSize:e,get size(){return function(t,e){if(e){const{inlineSize:t,blockSize:n}=e[0];return{width:t,height:n}}return t instanceof SVGElement&&"getBBox"in t?t.getBBox():{width:t.offsetWidth,height:t.offsetHeight}}(t,n)}})}))}function Xu(t){t.forEach(Hu)}function Yu(t,e){zu||"undefined"!=typeof ResizeObserver&&(zu=new ResizeObserver(Xu));const n=Et(t);return n.forEach((t=>{let n=$u.get(t);n||(n=new Set,$u.set(t,n)),n.add(e),zu?.observe(t)})),()=>{n.forEach((t=>{const n=$u.get(t);n?.delete(e),n?.size||zu?.unobserve(t)}))}}const Ku=new Set;let Gu;function _u(t){return Ku.add(t),Gu||(Gu=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};Ku.forEach((t=>t(e)))},window.addEventListener("resize",Gu)),()=>{Ku.delete(t),!Ku.size&&Gu&&(Gu=void 0)}}const qu={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function Zu(t,e,n,i){const s=n[e],{length:o,position:r}=qu[e],a=s.current,u=n.time;s.current=t[`scroll${r}`],s.scrollLength=t[`scroll${o}`]-t[`client${o}`],s.offset.length=0,s.offset[0]=0,s.offset[1]=s.scrollLength,s.progress=B(0,s.scrollLength,s.current);const l=i-u;s.velocity=l>50?0:I(s.current-a,l)}const Ju={start:0,center:.5,end:1};function Qu(t,e,n=0){let i=0;if(t in Ju&&(t=Ju[t]),"string"==typeof t){const e=parseFloat(t);t.endsWith("px")?i=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?i=e/100*document.documentElement.clientWidth:t.endsWith("vh")?i=e/100*document.documentElement.clientHeight:t=e}return"number"==typeof t&&(i=e*t),n+i}const tl=[0,0];function el(t,e,n,i){let s=Array.isArray(t)?t:tl,o=0,r=0;return"number"==typeof t?s=[t,t]:"string"==typeof t&&(s=(t=t.trim()).includes(" ")?t.split(" "):[t,Ju[t]?t:"0"]),o=Qu(s[0],n,i),r=Qu(s[1],e),o-r}const nl={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},il={x:0,y:0};function sl(t,e,n){const{offset:i=nl.All}=n,{target:s=t,axis:o="y"}=n,r="y"===o?"height":"width",a=s!==t?function(t,e){const n={x:0,y:0};let i=t;for(;i&&i!==e;)if(i instanceof HTMLElement)n.x+=i.offsetLeft,n.y+=i.offsetTop,i=i.offsetParent;else if("svg"===i.tagName){const t=i.getBoundingClientRect();i=i.parentElement;const e=i.getBoundingClientRect();n.x+=t.left-e.left,n.y+=t.top-e.top}else{if(!(i instanceof SVGGraphicsElement))break;{const{x:t,y:e}=i.getBBox();n.x+=t,n.y+=e;let s=null,o=i.parentNode;for(;!s;)"svg"===o.tagName&&(s=o),o=i.parentNode;i=s}}return n}(s,t):il,u=s===t?{width:t.scrollWidth,height:t.scrollHeight}:function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(s),l={width:t.clientWidth,height:t.clientHeight};e[o].offset.length=0;let c=!e[o].interpolate;const h=i.length;for(let t=0;t<h;t++){const n=el(i[t],l[r],u[r],a[o]);c||n===e[o].interpolatorOffsets[t]||(c=!0),e[o].offset[t]=n}c&&(e[o].interpolate=Vi(e[o].offset,ki(i),{clamp:!1}),e[o].interpolatorOffsets=[...e[o].offset]),e[o].progress=pe(0,1,e[o].interpolate(e[o].current))}function ol(t,e,n,i={}){return{measure:()=>function(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let i=e;for(;i&&i!==t;)n.x.targetOffset+=i.offsetLeft,n.y.targetOffset+=i.offsetTop,i=i.offsetParent}n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight}(t,i.target,n),update:e=>{!function(t,e,n){Zu(t,"x",e,n),Zu(t,"y",e,n),e.time=n}(t,n,e),(i.offset||i.target)&&sl(t,n,i)},notify:()=>e(n)}}const rl=new WeakMap,al=new WeakMap,ul=new WeakMap,ll=t=>t===document.documentElement?window:t;function cl(t,{container:e=document.documentElement,...n}={}){let i=ul.get(e);i||(i=new Set,ul.set(e,i));const s=ol(e,t,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},n);if(i.add(s),!rl.has(e)){const t=()=>{for(const t of i)t.measure()},n=()=>{for(const t of i)t.update(yt.timestamp)},s=()=>{for(const t of i)t.notify()},a=()=>{ft.read(t,!1,!0),ft.read(n,!1,!0),ft.update(s,!1,!0)};rl.set(e,a);const u=ll(e);window.addEventListener("resize",a,{passive:!0}),e!==document.documentElement&&al.set(e,(r=a,"function"==typeof(o=e)?_u(o):Yu(o,r))),u.addEventListener("scroll",a,{passive:!0})}var o,r;const a=rl.get(e);return ft.read(a,!1,!0),()=>{gt(a);const t=ul.get(e);if(!t)return;if(t.delete(s),t.size)return;const n=rl.get(e);rl.delete(e),n&&(ll(e).removeEventListener("scroll",n),al.get(e)?.(),window.removeEventListener("resize",n))}}const hl=new Map;function dl({source:t,container:e=document.documentElement,axis:n="y"}={}){t&&(e=t),hl.has(e)||hl.set(e,{});const i=hl.get(e);return i[n]||(i[n]=U()?new ScrollTimeline({source:e,axis:n}):function({source:t,container:e,axis:n="y"}){t&&(e=t);const i={value:0},s=cl((t=>{i.value=100*t[n].progress}),{container:e,axis:n});return{currentTime:i,cancel:s}}({source:e,axis:n})),i[n]}function pl(t){return t&&(t.target||t.offset)}function ml(t,{axis:e="y",...n}={}){const i={axis:e,...n};return"function"==typeof t?function(t,e){return function(t){return 2===t.length}(t)||pl(e)?cl((n=>{t(n[e.axis].progress,n)}),e):Nu(t,dl(e))}(t,i):function(t,e){if(t.flatten(),pl(e))return t.pause(),cl((n=>{t.time=t.duration*n[e.axis].progress}),e);{const n=dl(e);return t.attachTimeline?t.attachTimeline(n,(t=>(t.pause(),Nu((e=>{t.time=t.duration*e}),n)))):L}}(t,i)}const fl={some:0,all:1};function gl(t,e,{root:n,margin:i,amount:s="some"}={}){const o=Et(t),r=new WeakMap,a=new IntersectionObserver((t=>{t.forEach((t=>{const n=r.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){const n=e(t.target,t);"function"==typeof n?r.set(t.target,n):a.unobserve(t.target)}else"function"==typeof n&&(n(t),r.delete(t.target))}))}),{root:n,rootMargin:i,threshold:"number"==typeof s?s:fl[s]});return o.forEach((t=>a.observe(t))),()=>a.disconnect()}const yl=gr(tu());function vl(t){return e.useEffect((()=>()=>t()),[])}const xl={renderer:nu,...jr,...wa},wl={...xl,...ha,...Pa},Pl={renderer:nu,...jr};function Tl(t,n,i){e.useInsertionEffect((()=>t.on(n,i)),[t,n,i])}function Sl(t,e){Boolean(!e||e.current)}const bl=()=>({scrollX:Wt(0),scrollY:Wt(0),scrollXProgress:Wt(0),scrollYProgress:Wt(0)});function Al({container:t,target:n,layoutEffect:i=!0,...s}={}){const o=f(bl);return(i?y:e.useEffect)((()=>(Sl(0,n),Sl(0,t),ml(((t,{x:e,y:n})=>{o.scrollX.set(e.current),o.scrollXProgress.set(e.progress),o.scrollY.set(n.current),o.scrollYProgress.set(n.progress)}),{...s,container:t?.current||void 0,target:n?.current||void 0}))),[t,n,JSON.stringify(s.offset)]),o}function El(t,e){return e?t+e:t}function Ml(t){return"number"==typeof t?t:parseFloat(t)}function Cl(t){const n=e.useRef(0),{isStatic:i}=e.useContext(x);e.useEffect((()=>{if(i)return;const e=({timestamp:e,delta:i})=>{n.current||(n.current=e),t(e-n.current,i)};return ft.update(e,!0),()=>gt(e)}),[t])}class Vl extends Ut{constructor(){super(...arguments),this.values=[]}add(t){const e=function(t){return he.has(t)?"transform":Ii.has(t)?Gi(t):void 0}(t);e&&(C(this.values,e),this.update())}update(){this.set(this.values.length?this.values.join(", "):"auto")}}function Rl(){!Bo.current&&Oo();const[t]=e.useState(Lo.current);return t}function kl(t,e){[...e].reverse().forEach((n=>{const i=t.getVariant(n);i&&xr(t,i),t.variantChildren&&t.variantChildren.forEach((t=>{kl(t,e)}))}))}function Dl(){const t=new Set,e={subscribe:e=>(t.add(e),()=>{t.delete(e)}),start(e,n){const i=[];return t.forEach((t=>{i.push(Ar(t,e,{transitionOverride:n}))})),Promise.all(i)},set:e=>t.forEach((t=>{!function(t,e){Array.isArray(e)?kl(t,e):"string"==typeof e?kl(t,[e]):xr(t,e)}(t,e)})),stop(){t.forEach((t=>{!function(t){t.values.forEach((t=>t.stop()))}(t)}))},mount:()=>()=>{e.stop()}};return e}function Ll(){const t=f(Dl);return y(t.mount,[]),t}const Bl=Ll;class Ol{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,e){this.componentControls.forEach((n=>{n.start(t.nativeEvent||t,e)}))}}const Fl=()=>new Ol;function jl(t){return null!==t&&"object"==typeof t&&Aa in t}function Il(){return Ul}function Ul(t){bo.current&&(bo.current.isUpdating=!1,bo.current.blockUpdate(),t&&t())}const Wl=new Map,Nl=new Map,$l=(t,e)=>`${t}: ${he.has(e)?"transform":e}`;function zl(t,e,n){const i=$l(t,e),s=Wl.get(i);if(!s)return null;const{animation:o,startTime:r}=s;function a(){window.MotionCancelOptimisedAnimation?.(t,e,n)}return o.onfinish=a,null===r||window.MotionHandoffIsComplete?.(t)?(a(),null):r}let Hl,Xl;const Yl=new Set;function Kl(){Yl.forEach((t=>{t.animation.play(),t.animation.startTime=t.startTime})),Yl.clear()}const Gl=()=>({});class _l extends Ko{constructor(){super(...arguments),this.measureInstanceViewportBox=Bs}build(){}resetTransform(){}restoreTransform(){}removeValueFromRenderState(){}renderInstance(){}scrapeMotionValuesFromProps(){return{}}getBaseTargetFromProps(){}readValueFromInstance(t,e,n){return n.initialState[e]||0}sortInstanceNodePosition(){return 0}}const ql=Xa({scrapeMotionValuesFromProps:Gl,createRenderState:Gl});let Zl=0;const Jl=t=>t>.001?1/t:1e5;t.AcceleratedAnimation=Ni,t.AnimatePresence=({children:t,custom:n,initial:i=!0,onExitComplete:s,presenceAffectsLayout:o=!0,mode:r="sync",propagate:a=!1,anchorX:u="left"})=>{const[l,c]=b(a),p=e.useMemo((()=>E(t)),[t]),g=a&&!l?[]:p.map(A),v=e.useRef(!0),x=e.useRef(p),w=f((()=>new Map)),[P,S]=e.useState(p),[M,C]=e.useState(p);y((()=>{v.current=!1,x.current=p;for(let t=0;t<M.length;t++){const e=A(M[t]);g.includes(e)?w.delete(e):!0!==w.get(e)&&w.set(e,!1)}}),[M,g.length,g.join("-")]);const V=[];if(p!==P){let t=[...p];for(let e=0;e<M.length;e++){const n=M[e],i=A(n);g.includes(i)||(t.splice(e,0,n),V.push(n))}return"wait"===r&&V.length&&(t=V),C(E(t)),S(p),null}const{forceRender:R}=e.useContext(m);return d(h,{children:M.map((t=>{const e=A(t),h=!(a&&!l)&&(p===M||g.includes(e));return d(T,{isPresent:h,initial:!(v.current&&!i)&&void 0,custom:n,presenceAffectsLayout:o,mode:r,onExitComplete:h?void 0:()=>{if(!w.has(e))return;w.set(e,!0);let t=!0;w.forEach((e=>{e||(t=!1)})),t&&(R?.(),C(x.current),a&&c?.(),s&&s())},anchorX:u,children:t},e)}))})},t.AnimateSharedLayout=({children:t})=>(i.useEffect((()=>{}),[]),d(rr,{id:f((()=>"asl-"+Zl++)),children:t})),t.DeprecatedLayoutGroupContext=M,t.DragControls=Ol,t.FlatTree=ts,t.LayoutGroup=rr,t.LayoutGroupContext=m,t.LazyMotion=function({children:t,features:n,strict:i=!1}){const[,s]=e.useState(!lr(n)),o=e.useRef(void 0);if(!lr(n)){const{renderer:t,...e}=n;o.current=t,ur(e)}return e.useEffect((()=>{lr(n)&&n().then((({renderer:t,...e})=>{ur(e),o.current=t,s(!0)}))}),[]),d(ar.Provider,{value:{renderer:o.current,strict:i},children:t})},t.MotionConfig=function({children:t,isValidProp:n,...i}){n&&pr(n),(i={...e.useContext(x),...i}).isStatic=f((()=>i.isStatic));const s=e.useMemo((()=>i),[JSON.stringify(i.transition),i.transformPagePoint,i.reducedMotion]);return d(x.Provider,{value:s,children:t})},t.MotionConfigContext=x,t.MotionContext=Ta,t.MotionGlobalConfig=k,t.MotionValue=Ut,t.PresenceContext=v,t.Reorder=gu,t.SwitchLayoutGroupContext=aa,t.VisualElement=Ko,t.addPointerEvent=Wr,t.addPointerInfo=Ur,t.addScaleCorrector=Hs,t.animate=Iu,t.animateMini=Wu,t.animateValue=ji,t.animateVisualElement=Ar,t.animationControls=Dl,t.animations=jr,t.anticipate=oe,t.backIn=ie,t.backInOut=se,t.backOut=ne,t.buildTransform=Jo,t.calcLength=$t,t.cancelFrame=gt,t.circIn=re,t.circInOut=ue,t.circOut=ae,t.clamp=pe,t.color=Le,t.complex=$e,t.createBox=Bs,t.createRendererMotionComponent=Va,t.createScopedAnimate=ju,t.cubicBezier=Qt,t.delay=es,t.disableInstantTransitions=function(){Zt.current=!1},t.distance=zr,t.distance2D=Hr,t.domAnimation=xl,t.domMax=wl,t.domMin=Pl,t.easeIn=Si,t.easeInOut=Ai,t.easeOut=bi,t.filterProps=mr,t.findSpring=fi,t.frame=ft,t.frameData=yt,t.hover=Vt,t.inView=gl,t.inertia=Ti,t.interpolate=Vi,t.invariant=R,t.isBrowser=g,t.isDragActive=At,t.isMotionComponent=jl,t.isMotionValue=qt,t.isValidMotionProp=hr,t.keyframes=Di,t.m=yl,t.makeUseVisualState=Xa,t.mirrorEasing=te,t.mix=Qn,t.motion=iu,t.motionValue=Wt,t.noop=L,t.optimizedAppearDataAttribute=qi,t.pipe=Yn,t.press=jt,t.progress=B,t.px=Ce,t.resolveMotionValue=is,t.reverseEasing=ee,t.scroll=ml,t.scrollInfo=cl,t.spring=Pi,t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:i}={}){return(s,o)=>{const r="number"==typeof n?n:function(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}(n,o),a=Math.abs(r-s);let u=t*a;if(i){const e=o*t;u=Ci(i)(u/e)*e}return e+u}},t.startOptimizedAppearAnimation=function(t,e,n,i,s){if(window.MotionIsMounted)return;const o=t.dataset[_i];if(!o)return;window.MotionHandoffAnimation=zl;const r=$l(o,e);Xl||(Xl=it(t,e,[n[0],n[0]],{duration:1e4,ease:"linear"}),Wl.set(r,{animation:Xl,startTime:null}),window.MotionHandoffAnimation=zl,window.MotionHasOptimisedAnimation=(t,e)=>{if(!t)return!1;if(!e)return Nl.has(t);const n=$l(t,e);return Boolean(Wl.get(n))},window.MotionHandoffMarkAsComplete=t=>{Nl.has(t)&&Nl.set(t,!0)},window.MotionHandoffIsComplete=t=>!0===Nl.get(t),window.MotionCancelOptimisedAnimation=(t,e,n,i)=>{const s=$l(t,e),o=Wl.get(s);o&&(n&&void 0===i?n.postRender((()=>{n.postRender((()=>{o.animation.cancel()}))})):o.animation.cancel(),n&&i?(Yl.add(o),n.render(Kl)):(Wl.delete(s),Wl.size||(window.MotionCancelOptimisedAnimation=void 0)))},window.MotionCheckAppearSync=(t,e,n)=>{const i=Zi(t);if(!i)return;const s=window.MotionHasOptimisedAnimation?.(i,e),o=t.props.values?.[e];if(!s||!o)return;const r=n.on("change",(t=>{o.get()!==t&&(window.MotionCancelOptimisedAnimation?.(i,e),r())}));return r});const a=()=>{Xl.cancel();const o=it(t,e,n,i);void 0===Hl&&(Hl=performance.now()),o.startTime=Hl,Wl.set(r,{animation:o,startTime:Hl}),s&&s(o)};Nl.set(o,!1),Xl.ready?Xl.ready.then(a).catch(L):a()},t.steps=function(t,e="end"){return n=>{const i=(n="end"===e?Math.min(n,.999):Math.max(n,.001))*t,s="end"===e?Math.floor(i):Math.ceil(i);return pe(0,1,s/t)}},t.time=St,t.transform=lu,t.unwrapMotionComponent=function(t){if(jl(t))return t[Aa]},t.useAnimate=function(){const t=f((()=>({current:null,animations:[]}))),e=f((()=>ju(t)));return vl((()=>{t.animations.forEach((t=>t.stop()))})),[t,e]},t.useAnimateMini=function(){const t=f((()=>({current:null,animations:[]}))),e=f((()=>Uu(t)));return vl((()=>{t.animations.forEach((t=>t.stop()))})),[t,e]},t.useAnimation=Bl,t.useAnimationControls=Ll,t.useAnimationFrame=Cl,t.useCycle=function(...t){const n=e.useRef(0),[i,s]=e.useState(t[n.current]);return[i,e.useCallback((e=>{n.current="number"!=typeof e?yu(0,t.length,n.current+1):e,s(t[n.current])}),[t.length,...t])]},t.useDeprecatedAnimatedState=function(t){const[n,i]=e.useState(t),s=ql({},!1),o=f((()=>new _l({props:{onUpdate:t=>{i({...t})}},visualState:s,presenceContext:null},{initialState:t})));return e.useLayoutEffect((()=>(o.mount({}),()=>o.unmount())),[o]),[n,f((()=>t=>Ar(o,t)))]},t.useDeprecatedInvertedScale=function(t){let n=uu(1),i=uu(1);const{visualElement:s}=e.useContext(Ta);return t?(n=t.scaleX||n,i=t.scaleY||i):s&&(n=s.getValue("scaleX",1),i=s.getValue("scaleY",1)),{scaleX:hu(n,Jl),scaleY:hu(i,Jl)}},t.useDomEvent=function(t,n,i,s){e.useEffect((()=>{const e=t.current;if(i&&e)return To(e,n,i,s)}),[t,n,i,s])},t.useDragControls=function(){return f(Fl)},t.useElementScroll=function(t){return Al({container:t})},t.useForceUpdate=sr,t.useInView=function(t,{root:n,margin:i,amount:s,once:o=!1,initial:r=!1}={}){const[a,u]=e.useState(r);return e.useEffect((()=>{if(!t.current||o&&a)return;const e={root:n&&n.current||void 0,margin:i,amount:s};return gl(t.current,(()=>(u(!0),o?void 0:()=>u(!1))),e)}),[n,t,i,o,s]),a},t.useInstantLayoutTransition=Il,t.useInstantTransition=function(){const[t,n]=sr(),i=Il(),s=e.useRef(-1);return e.useEffect((()=>{ft.postRender((()=>ft.postRender((()=>{n===s.current&&(Zt.current=!1)}))))}),[n]),e=>{i((()=>{Zt.current=!0,t(),e(),s.current=n+1}))}},t.useIsPresent=function(){return null===(t=e.useContext(v))||t.isPresent;var t},t.useIsomorphicLayoutEffect=y,t.useMotionTemplate=function(t,...e){const n=t.length;return cu(e.filter(qt),(function(){let i="";for(let s=0;s<n;s++){i+=t[s];const n=e[s];n&&(i+=qt(n)?n.get():n)}return i}))},t.useMotionValue=uu,t.useMotionValueEvent=Tl,t.usePresence=b,t.usePresenceData=function(){const t=e.useContext(v);return t?t.custom:void 0},t.useReducedMotion=Rl,t.useReducedMotionConfig=function(){const t=Rl(),{reducedMotion:n}=e.useContext(x);return"never"!==n&&("always"===n||t)},t.useResetProjection=function(){return e.useCallback((()=>{const t=bo.current;t&&t.resetTree()}),[])},t.useScroll=Al,t.useSpring=function(t,n={}){const{isStatic:i}=e.useContext(x),s=e.useRef(null),o=f((()=>qt(t)?t.get():t)),r=f((()=>"string"==typeof o?o.replace(/[\d.-]/g,""):void 0)),a=uu(o),u=e.useRef(o),l=e.useRef(L),c=()=>{h(),s.current=ji({keyframes:[Ml(a.get()),Ml(u.current)],velocity:a.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:l.current})},h=()=>{s.current&&s.current.stop()};return e.useInsertionEffect((()=>a.attach(((t,e)=>i?e(t):(u.current=t,l.current=t=>e(El(t,r)),ft.postRender(c),a.get())),h)),[JSON.stringify(n)]),y((()=>{if(qt(t))return t.on("change",(t=>a.set(El(t,r))))}),[a,r]),a},t.useTime=function(){const t=uu(0);return Cl((e=>t.set(e))),t},t.useTransform=hu,t.useUnmountEffect=vl,t.useVelocity=function(t){const e=uu(t.getVelocity()),n=()=>{const i=t.getVelocity();e.set(i),i&&ft.update(n)};return Tl(t,"change",(()=>{ft.update(n,!1,!0)})),e},t.useViewportScroll=function(){return Al()},t.useWillChange=function(){return f((()=>new Vl("auto")))},t.visualElementStore=jo,t.wrap=yu}));
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={},t.React)}(this,(function(t,e){"use strict";function n(t){var e=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}})),e.default=t,Object.freeze(e)}var i=n(e),s=React,o=Symbol.for("react.element"),r=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,u=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(t,e,n){var i,s={},r=null,c=null;for(i in void 0!==n&&(r=""+n),void 0!==e.key&&(r=""+e.key),void 0!==e.ref&&(c=e.ref),e)a.call(e,i)&&!l.hasOwnProperty(i)&&(s[i]=e[i]);if(t&&t.defaultProps)for(i in e=t.defaultProps)void 0===s[i]&&(s[i]=e[i]);return{$$typeof:o,type:t,key:r,ref:c,props:s,_owner:u.current}}const h=r,d=c,p=c,m=e.createContext({});function f(t){const n=e.useRef(null);return null===n.current&&(n.current=t()),n.current}const g="undefined"!=typeof window,y=g?e.useLayoutEffect:e.useEffect,v=e.createContext(null),x=e.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});class w extends i.Component{getSnapshotBeforeUpdate(t){const e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent){const t=e.offsetParent,n=t instanceof HTMLElement&&t.offsetWidth||0,i=this.props.sizeRef.current;i.height=e.offsetHeight||0,i.width=e.offsetWidth||0,i.top=e.offsetTop,i.left=e.offsetLeft,i.right=n-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function P({children:t,isPresent:n,anchorX:s}){const o=e.useId(),r=e.useRef(null),a=e.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:u}=e.useContext(x);return e.useInsertionEffect((()=>{const{width:t,height:e,top:i,left:l,right:c}=a.current;if(n||!r.current||!t||!e)return;const h="left"===s?`left: ${l}`:`right: ${c}`;r.current.dataset.motionPopId=o;const d=document.createElement("style");return u&&(d.nonce=u),document.head.appendChild(d),d.sheet&&d.sheet.insertRule(`\n [data-motion-pop-id="${o}"] {\n position: absolute !important;\n width: ${t}px !important;\n height: ${e}px !important;\n ${h}px !important;\n top: ${i}px !important;\n }\n `),()=>{document.head.removeChild(d)}}),[n]),d(w,{isPresent:n,childRef:r,sizeRef:a,children:i.cloneElement(t,{ref:r})})}const T=({children:t,initial:n,isPresent:s,onExitComplete:o,custom:r,presenceAffectsLayout:a,mode:u,anchorX:l})=>{const c=f(S),h=e.useId(),p=e.useCallback((t=>{c.set(t,!0);for(const t of c.values())if(!t)return;o&&o()}),[c,o]),m=e.useMemo((()=>({id:h,initial:n,isPresent:s,custom:r,onExitComplete:p,register:t=>(c.set(t,!1),()=>c.delete(t))})),a?[Math.random(),p]:[s,p]);return e.useMemo((()=>{c.forEach(((t,e)=>c.set(e,!1)))}),[s]),i.useEffect((()=>{!s&&!c.size&&o&&o()}),[s]),"popLayout"===u&&(t=d(P,{isPresent:s,anchorX:l,children:t})),d(v.Provider,{value:m,children:t})};function S(){return new Map}function b(t=!0){const n=e.useContext(v);if(null===n)return[!0,null];const{isPresent:i,onExitComplete:s,register:o}=n,r=e.useId();e.useEffect((()=>{if(t)return o(r)}),[t]);const a=e.useCallback((()=>t&&s&&s(r)),[r,s,t]);return!i&&s?[!1,a]:[!0]}const A=t=>t.key||"";function E(t){const n=[];return e.Children.forEach(t,(t=>{e.isValidElement(t)&&n.push(t)})),n}const M=e.createContext(null);function C(t,e){-1===t.indexOf(e)&&t.push(e)}function V(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}let R=()=>{};const k={};function D(t){let e;return()=>(void 0===e&&(e=t()),e)}const L=t=>t,B=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i};class O{constructor(){this.subscriptions=[]}add(t){return C(this.subscriptions,t),()=>V(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(let s=0;s<i;s++){const i=this.subscriptions[s];i&&i(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const F=t=>1e3*t,j=t=>t/1e3;function I(t,e){return e?t*(1e3/e):0}const U=D((()=>void 0!==window.ScrollTimeline));class W{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map((t=>t.finished)))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t,e){const n=this.animations.map((n=>U()&&n.attachTimeline?n.attachTimeline(t):"function"==typeof e?e(n):void 0));return()=>{n.forEach(((t,e)=>{t&&t(),this.animations[e].stop()}))}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let e=0;e<this.animations.length;e++)t=Math.max(t,this.animations[e].duration);return t}runAll(t){this.animations.forEach((e=>e[t]()))}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class N extends W{then(t,e){return this.finished.finally(t).then((()=>{}))}}const $=t=>t.startsWith("--"),z=(t,e,n)=>{$(e)?t.style.setProperty(e,n):t.style[e]=n},H=(t,e)=>$(e)?t.style.getPropertyValue(e):t.style[e],X=t=>null!==t;const Y=D((()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0})),K=new Set(["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","radius","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","width","maxWidth","height","maxHeight","top","right","bottom","left","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","margin","marginTop","marginRight","marginBottom","marginLeft","backgroundPositionX","backgroundPositionY"]);const G={value:null,addProjectionMetrics:null},_=t=>Array.isArray(t)&&"number"==typeof t[0],q={};function Z(t,e){const n=D(t);return()=>q[e]??n()}const J=Z((()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0}),"linearEasing"),Q=(t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let e=0;e<s;e++)i+=t(e/(s-1))+", ";return`linear(${i.substring(0,i.length-2)})`},tt=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,et={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:tt([0,.65,.55,1]),circOut:tt([.55,0,1,.45]),backIn:tt([.31,.01,.66,-.59]),backOut:tt([.33,1.53,.69,.99])};function nt(t,e){return t?"function"==typeof t&&J()?Q(t,e):_(t)?tt(t):Array.isArray(t)?t.map((t=>nt(t,e)||et.easeOut)):et[t]:void 0}function it(t,e,n,{delay:i=0,duration:s=300,repeat:o=0,repeatType:r="loop",ease:a="easeInOut",times:u}={},l=void 0){const c={[e]:n};u&&(c.offset=u);const h=nt(a,s);Array.isArray(h)&&(c.easing=h);return t.animate(c,{delay:i,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal",pseudoElement:l})}function st(t){return"function"==typeof t&&"applyToOptions"in t}const ot=new WeakMap;class rt{constructor(t){if("animation"in t)return void(this.animation=t.animation);const{element:e,name:n,keyframes:i,pseudoElement:s,allowFlatten:o=!1}=t;let{transition:r}=t;this.allowFlatten=o;const a=function(t){const e=ot.get(t)||new Map;return ot.set(t,e),e}(e),u=((t,e)=>`${t}:${e}`)(n,s||""),l=a.get(u);l&&l.stop();const c=function(t,e,n,i){Array.isArray(n)||(n=[n]);for(let s=0;s<n.length;s++)null===n[s]&&(n[s]=0!==s||i?n[s-1]:H(t,e)),"number"==typeof n[s]&&K.has(e)&&(n[s]=n[s]+"px");return!i&&!Y()&&n.length<2&&n.unshift(H(t,e)),n}(e,n,i,s);r.type,r=function({type:t,...e}){return st(t)?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(r),this.animation=it(e,n,c,r,s),!1===r.autoplay&&this.animation.pause(),this.removeAnimation=()=>a.delete(u),this.animation.onfinish=()=>{s?this.commitStyles():z(e,n,function(t,{repeat:e,repeatType:n="loop"},i){const s=t.filter(X),o=e&&"loop"!==n&&e%2==1?0:s.length-1;return o&&void 0!==i?i:s[o]}(c,r)),this.cancel()},a.set(u,this)}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.finish()}cancel(){try{this.animation.cancel()}catch(t){}this.removeAnimation()}stop(){const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.commitStyles(),this.cancel())}commitStyles(){this.animation.commitStyles?.()}get duration(){console.log(this.animation.effect?.getComputedTiming());const t=this.animation.effect?.getComputedTiming().duration||0;return j(Number(t))}get time(){return j(Number(this.animation.currentTime)||0)}set time(t){this.animation.currentTime=F(t)}get speed(){return this.animation.playbackRate}set speed(t){this.animation.playbackRate=t}get state(){return this.animation.playState}get startTime(){return Number(this.animation.startTime)}get finished(){return this.animation.finished}flatten(){this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"})}attachTimeline(t){return this.animation.timeline=t,this.animation.onfinish=null,L}then(t,e){return this.finished.then(t).catch(e)}}function at(t,e){return t?.[e]??t?.default??t}const ut=2e4;function lt(t){let e=0;let n=t.next(e);for(;!n.done&&e<ut;)e+=50,n=t.next(e);return e>=ut?1/0:e}function ct(t,e=100,n){const i=n({...t,keyframes:[0,e]}),s=Math.min(lt(i),ut);return{type:"keyframes",ease:t=>i.next(s*t).value/e,duration:j(s)}}function ht(t){return Boolean("function"==typeof t&&J()||!t||"string"==typeof t&&(t in et||J())||_(t)||Array.isArray(t)&&t.every(ht))}function dt(t,e){t.timeline=e,t.onfinish=null}const pt=["read","resolveKeyframes","update","preRender","render","postRender"];function mt(t,e){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=pt.reduce(((t,n)=>(t[n]=function(t,e){let n=new Set,i=new Set,s=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},u=0;function l(e){r.has(e)&&(c.schedule(e),t()),u++,e(a)}const c={schedule:(t,e=!1,o=!1)=>{const a=o&&s?n:i;return e&&r.add(t),a.has(t)||a.add(t),t},cancel:t=>{i.delete(t),r.delete(t)},process:t=>{a=t,s?o=!0:(s=!0,[n,i]=[i,n],n.forEach(l),e&&G.value&&G.value.frameloop[e].push(u),u=0,n.clear(),s=!1,o&&(o=!1,c.process(t)))}};return c}(o,e?n:void 0),t)),{}),{read:a,resolveKeyframes:u,update:l,preRender:c,render:h,postRender:d}=r,p=()=>{const o=k.useManualTiming?s.timestamp:performance.now();n=!1,k.useManualTiming||(s.delta=i?1e3/60:Math.max(Math.min(o-s.timestamp,40),1)),s.timestamp=o,s.isProcessing=!0,a.process(s),u.process(s),l.process(s),c.process(s),h.process(s),d.process(s),s.isProcessing=!1,n&&e&&(i=!1,t(p))};return{schedule:pt.reduce(((e,o)=>{const a=r[o];return e[o]=(e,o=!1,r=!1)=>(n||(n=!0,i=!0,s.isProcessing||t(p)),a.schedule(e,o,r)),e}),{}),cancel:t=>{for(let e=0;e<pt.length;e++)r[pt[e]].cancel(t)},state:s,steps:r}}const{schedule:ft,cancel:gt,state:yt,steps:vt}=mt("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:L,!0),{schedule:xt,cancel:wt}=mt(queueMicrotask,!1);let Pt;function Tt(){Pt=void 0}const St={now:()=>(void 0===Pt&&St.set(yt.isProcessing||k.useManualTiming?yt.timestamp:performance.now()),Pt),set:t=>{Pt=t,queueMicrotask(Tt)}},bt={x:!1,y:!1};function At(){return bt.x||bt.y}function Et(t,e,n){if(t instanceof EventTarget)return[t];if("string"==typeof t){let i=document;e&&(i=e.current);const s=n?.[t]??i.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t)}function Mt(t,e){const n=Et(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},()=>i.abort()]}function Ct(t){return!("touch"===t.pointerType||At())}function Vt(t,e,n={}){const[i,s,o]=Mt(t,n),r=t=>{if(!Ct(t))return;const{target:n}=t,i=e(n,t);if("function"!=typeof i||!n)return;const o=t=>{Ct(t)&&(i(t),n.removeEventListener("pointerleave",o))};n.addEventListener("pointerleave",o,s)};return i.forEach((t=>{t.addEventListener("pointerenter",r,s)})),o}const Rt=(t,e)=>!!e&&(t===e||Rt(t,e.parentElement)),kt=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,Dt=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const Lt=new WeakSet;function Bt(t){return e=>{"Enter"===e.key&&t(e)}}function Ot(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function Ft(t){return kt(t)&&!At()}function jt(t,e,n={}){const[i,s,o]=Mt(t,n),r=t=>{const i=t.currentTarget;if(!Ft(t)||Lt.has(i))return;Lt.add(i);const o=e(i,t),r=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",u),Ft(t)&&Lt.has(i)&&(Lt.delete(i),"function"==typeof o&&o(t,{success:e}))},a=t=>{r(t,i===window||i===document||n.useGlobalTarget||Rt(i,t.target))},u=t=>{r(t,!1)};window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",u,s)};return i.forEach((t=>{var e;(n.useGlobalTarget?window:t).addEventListener("pointerdown",r,s),t instanceof HTMLElement&&(t.addEventListener("focus",(t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=Bt((()=>{if(Lt.has(n))return;Ot(n,"down");const t=Bt((()=>{Ot(n,"up")}));n.addEventListener("keyup",t,e),n.addEventListener("blur",(()=>Ot(n,"cancel")),e)}));n.addEventListener("keydown",i,e),n.addEventListener("blur",(()=>n.removeEventListener("keydown",i)),e)})(t,s))),e=t,Dt.has(e.tagName)||-1!==e.tabIndex||t.hasAttribute("tabindex")||(t.tabIndex=0))})),o}const It={current:void 0};class Ut{constructor(t,e={}){this.version="12.6.4-alpha.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=St.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),e&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=St.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new O);const n=this.events[t].add(e);return"change"===t?()=>{n(),ft.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return It.current&&It.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=St.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return I(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise((e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()})).then((()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()}))}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Wt(t,e){return new Ut(t,e)}const Nt=(t,e,n)=>t+(e-t)*n;function $t(t){return t.max-t.min}function zt(t,e,n,i=.5){t.origin=i,t.originPoint=Nt(e.min,e.max,t.origin),t.scale=$t(n)/$t(e),t.translate=Nt(n.min,n.max,t.origin)-t.originPoint,(t.scale>=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function Ht(t,e,n,i){zt(t.x,e.x,n.x,i?i.originX:void 0),zt(t.y,e.y,n.y,i?i.originY:void 0)}function Xt(t,e,n){t.min=n.min+e.min,t.max=t.min+$t(e)}function Yt(t,e,n){t.min=e.min-n.min,t.max=t.min+$t(e)}function Kt(t,e,n){Yt(t.x,e.x,n.x),Yt(t.y,e.y,n.y)}const Gt=t=>!t.isLayoutDirty&&t.willUpdate(!1);function _t(){const t=new Set,e=new WeakMap,n=()=>t.forEach(Gt);return{add:i=>{t.add(i),e.set(i,i.addEventListener("willUpdate",n))},remove:i=>{t.delete(i);const s=e.get(i);s&&(s(),e.delete(i)),n()},dirty:n}}const qt=t=>Boolean(t&&t.getVelocity),Zt={current:!1},Jt=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function Qt(t,e,n,i){if(t===e&&n===i)return L;const s=e=>function(t,e,n,i,s){let o,r,a=0;do{r=e+(n-e)/2,o=Jt(r,i,s)-t,o>0?n=r:e=r}while(Math.abs(o)>1e-7&&++a<12);return r}(e,0,1,t,n);return t=>0===t||1===t?t:Jt(s(t),e,i)}const te=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,ee=t=>e=>1-t(1-e),ne=Qt(.33,1.53,.69,.99),ie=ee(ne),se=te(ie),oe=t=>(t*=2)<1?.5*ie(t):.5*(2-Math.pow(2,-10*(t-1))),re=t=>1-Math.sin(Math.acos(t)),ae=ee(re),ue=te(re),le=t=>/^0[^.\s]+$/u.test(t);const ce=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],he=new Set(ce),de=new Set(["width","height","top","left","right","bottom",...ce]),pe=(t,e,n)=>n>e?e:n<t?t:n,me={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},fe={...me,transform:t=>pe(0,1,t)},ge={...me,default:1},ye=t=>Math.round(1e5*t)/1e5,ve=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const xe=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,we=(t,e)=>n=>Boolean("string"==typeof n&&xe.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),Pe=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[s,o,r,a]=i.match(ve);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},Te={...me,transform:t=>Math.round((t=>pe(0,255,t))(t))},Se={test:we("rgb","red"),parse:Pe("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+Te.transform(t)+", "+Te.transform(e)+", "+Te.transform(n)+", "+ye(fe.transform(i))+")"};const be={test:we("#"),parse:function(t){let e="",n="",i="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}},transform:Se.transform},Ae=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),Ee=Ae("deg"),Me=Ae("%"),Ce=Ae("px"),Ve=Ae("vh"),Re=Ae("vw"),ke={...Me,parse:t=>Me.parse(t)/100,transform:t=>Me.transform(100*t)},De={test:we("hsl","hue"),parse:Pe("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+Me.transform(ye(e))+", "+Me.transform(ye(n))+", "+ye(fe.transform(i))+")"},Le={test:t=>Se.test(t)||be.test(t)||De.test(t),parse:t=>Se.test(t)?Se.parse(t):De.test(t)?De.parse(t):be.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?Se.transform(t):De.transform(t)},Be=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const Oe="number",Fe="color",je=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Ie(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const r=e.replace(je,(t=>(Le.test(t)?(i.color.push(o),s.push(Fe),n.push(Le.parse(t))):t.startsWith("var(")?(i.var.push(o),s.push("var"),n.push(t)):(i.number.push(o),s.push(Oe),n.push(parseFloat(t))),++o,"${}"))).split("${}");return{values:n,split:r,indexes:i,types:s}}function Ue(t){return Ie(t).values}function We(t){const{split:e,types:n}=Ie(t),i=e.length;return t=>{let s="";for(let o=0;o<i;o++)if(s+=e[o],void 0!==t[o]){const e=n[o];s+=e===Oe?ye(t[o]):e===Fe?Le.transform(t[o]):t[o]}return s}}const Ne=t=>"number"==typeof t?0:t;const $e={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(ve)?.length||0)+(t.match(Be)?.length||0)>0},parse:Ue,createTransformer:We,getAnimatableNone:function(t){const e=Ue(t);return We(t)(e.map(Ne))}},ze=new Set(["brightness","contrast","saturate","opacity"]);function He(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(ve)||[];if(!i)return t;const s=n.replace(i,"");let o=ze.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const Xe=/\b([a-z-]*)\(.*?\)/gu,Ye={...$e,getAnimatableNone:t=>{const e=t.match(Xe);return e?e.map(He).join(" "):t}},Ke={borderWidth:Ce,borderTopWidth:Ce,borderRightWidth:Ce,borderBottomWidth:Ce,borderLeftWidth:Ce,borderRadius:Ce,radius:Ce,borderTopLeftRadius:Ce,borderTopRightRadius:Ce,borderBottomRightRadius:Ce,borderBottomLeftRadius:Ce,width:Ce,maxWidth:Ce,height:Ce,maxHeight:Ce,top:Ce,right:Ce,bottom:Ce,left:Ce,padding:Ce,paddingTop:Ce,paddingRight:Ce,paddingBottom:Ce,paddingLeft:Ce,margin:Ce,marginTop:Ce,marginRight:Ce,marginBottom:Ce,marginLeft:Ce,backgroundPositionX:Ce,backgroundPositionY:Ce},Ge={rotate:Ee,rotateX:Ee,rotateY:Ee,rotateZ:Ee,scale:ge,scaleX:ge,scaleY:ge,scaleZ:ge,skew:Ee,skewX:Ee,skewY:Ee,distance:Ce,translateX:Ce,translateY:Ce,translateZ:Ce,x:Ce,y:Ce,z:Ce,perspective:Ce,transformPerspective:Ce,opacity:fe,originX:ke,originY:ke,originZ:Ce},_e={...me,transform:Math.round},qe={...Ke,...Ge,zIndex:_e,size:Ce,fillOpacity:fe,strokeOpacity:fe,numOctaves:_e},Ze={...qe,color:Le,backgroundColor:Le,outlineColor:Le,fill:Le,stroke:Le,borderColor:Le,borderTopColor:Le,borderRightColor:Le,borderBottomColor:Le,borderLeftColor:Le,filter:Ye,WebkitFilter:Ye},Je=t=>Ze[t];function Qe(t,e){let n=Je(t);return n!==Ye&&(n=$e),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const tn=new Set(["auto","none","0"]);const en=t=>180*t/Math.PI,nn=t=>{const e=en(Math.atan2(t[1],t[0]));return on(e)},sn={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:nn,rotateZ:nn,skewX:t=>en(Math.atan(t[1])),skewY:t=>en(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},on=t=>((t%=360)<0&&(t+=360),t),rn=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),an=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),un={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:rn,scaleY:an,scale:t=>(rn(t)+an(t))/2,rotateX:t=>on(en(Math.atan2(t[6],t[5]))),rotateY:t=>on(en(Math.atan2(-t[2],t[0]))),rotateZ:nn,rotate:nn,skewX:t=>en(Math.atan(t[4])),skewY:t=>en(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function ln(t){return t.includes("scale")?1:0}function cn(t,e){if(!t||"none"===t)return ln(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=un,s=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=sn,s=e}if(!s)return ln(e);const o=i[e],r=s[1].split(",").map(hn);return"function"==typeof o?o(r):r[o]}function hn(t){return parseFloat(t.trim())}const dn=t=>t===me||t===Ce,pn=new Set(["x","y","z"]),mn=ce.filter((t=>!pn.has(t)));const fn={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>cn(e,"x"),y:(t,{transform:e})=>cn(e,"y")};fn.translateX=fn.x,fn.translateY=fn.y;const gn=new Set;let yn=!1,vn=!1;function xn(){if(vn){const t=Array.from(gn).filter((t=>t.needsMeasurement)),e=new Set(t.map((t=>t.element))),n=new Map;e.forEach((t=>{const e=function(t){const e=[];return mn.forEach((n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))})),e}(t);e.length&&(n.set(t,e),t.render())})),t.forEach((t=>t.measureInitialState())),e.forEach((t=>{t.render();const e=n.get(t);e&&e.forEach((([e,n])=>{t.getValue(e)?.set(n)}))})),t.forEach((t=>t.measureEndState())),t.forEach((t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)}))}vn=!1,yn=!1,gn.forEach((t=>t.complete())),gn.clear()}function wn(){gn.forEach((t=>{t.readKeyframes(),t.needsMeasurement&&(vn=!0)}))}class Pn{constructor(t,e,n,i,s,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(gn.add(this),yn||(yn=!0,ft.read(wn),ft.resolveKeyframes(xn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;for(let s=0;s<t.length;s++)if(null===t[s])if(0===s){const s=i?.get(),o=t[t.length-1];if(void 0!==s)t[0]=s;else if(n&&e){const i=n.readValue(e,o);null!=i&&(t[0]=i)}void 0===t[0]&&(t[0]=o),i&&void 0===s&&i.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),gn.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,gn.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Tn=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),Sn=t=>e=>"string"==typeof e&&e.startsWith(t),bn=Sn("--"),An=Sn("var(--"),En=t=>!!An(t)&&Mn.test(t.split("/*")[0].trim()),Mn=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Cn=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Vn(t,e,n=1){const[i,s]=function(t){const e=Cn.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}(t);if(!i)return;const o=window.getComputedStyle(e).getPropertyValue(i);if(o){const t=o.trim();return Tn(t)?parseFloat(t):t}return En(s)?Vn(s,e,n+1):s}const Rn=t=>e=>e.test(t),kn=[me,Ce,Me,Ee,Re,Ve,{test:t=>"auto"===t,parse:t=>t}],Dn=t=>kn.find(Rn(t));class Ln extends Pn{constructor(t,e,n,i,s){super(t,e,n,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let n=0;n<t.length;n++){let i=t[n];if("string"==typeof i&&(i=i.trim(),En(i))){const s=Vn(i,e.current);void 0!==s&&(t[n]=s),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!de.has(n)||2!==t.length)return;const[i,s]=t,o=Dn(i),r=Dn(s);if(o!==r)if(dn(o)&&dn(r))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)("number"==typeof(i=t[e])?0===i:null===i||"none"===i||"0"===i||le(i))&&n.push(e);var i;n.length&&function(t,e,n){let i,s=0;for(;s<t.length&&!i;){const e=t[s];"string"==typeof e&&!tn.has(e)&&Ie(e).values.length&&(i=t[s]),s++}if(i&&n)for(const s of e)t[s]=Qe(n,i)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=fn[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const i=e[e.length-1];void 0!==i&&t.getValue(n,i).jump(i,!1)}measureEndState(){const{element:t,name:e,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const i=t.getValue(e);i&&i.jump(this.measuredOrigin,!1);const s=n.length-1,o=n[s];n[s]=fn[e](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach((([e,n])=>{t.getValue(e).set(n)})),this.resolveNoneKeyframes()}}const Bn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!$e.test(t)&&"0"!==t||t.startsWith("url(")));function On(t,e,n,i){const s=t[0];if(null===s)return!1;if("display"===e||"visibility"===e)return!0;const o=t[t.length-1],r=Bn(s,e),a=Bn(o,e);return!(!r||!a)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(t)||("spring"===n||st(n))&&i)}const Fn=t=>null!==t;function jn(t,{repeat:e,repeatType:n="loop"},i){const s=t.filter(Fn),o=e&&"loop"!==n&&e%2==1?0:s.length-1;return o&&void 0!==i?i:s[o]}class In{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",...r}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=St.now(),this.options={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:s,repeatType:o,...r},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(wn(),xn()),this._resolved}onKeyframesResolved(t,e){this.resolvedAt=St.now(),this.hasAttemptedResolve=!0;const{name:n,type:i,velocity:s,delay:o,onComplete:r,onUpdate:a,isGenerator:u}=this.options;if(!u&&!On(t,n,i,s)){if(Zt.current||!o)return a&&a(jn(t,this.options,e)),r&&r(),void this.resolveFinishedPromise();this.options.duration=0}const l=this.initPlayback(t,e);!1!==l&&(this._resolved={keyframes:t,finalKeyframe:e,...l},this.onPostResolved())}onPostResolved(){}then(t,e){return this.currentFinishedPromise.then(t,e)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise((t=>{this.resolveFinishedPromise=t}))}}function Un(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Wn({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let s=0,o=0,r=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;s=Un(a,i,t+1/3),o=Un(a,i,t),r=Un(a,i,t-1/3)}else s=o=r=n;return{red:Math.round(255*s),green:Math.round(255*o),blue:Math.round(255*r),alpha:i}}function Nn(t,e){return n=>n>0?e:t}const $n=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},zn=[be,Se,De];function Hn(t){const e=(n=t,zn.find((t=>t.test(n))));var n;if(!Boolean(e))return!1;let i=e.parse(t);return e===De&&(i=Wn(i)),i}const Xn=(t,e)=>{const n=Hn(t),i=Hn(e);if(!n||!i)return Nn(t,e);const s={...n};return t=>(s.red=$n(n.red,i.red,t),s.green=$n(n.green,i.green,t),s.blue=$n(n.blue,i.blue,t),s.alpha=Nt(n.alpha,i.alpha,t),Se.transform(s))},Yn=(t,e)=>n=>e(t(n)),Kn=(...t)=>t.reduce(Yn),Gn=new Set(["none","hidden"]);function _n(t,e){return n=>Nt(t,e,n)}function qn(t){return"number"==typeof t?_n:"string"==typeof t?En(t)?Nn:Le.test(t)?Xn:Qn:Array.isArray(t)?Zn:"object"==typeof t?Le.test(t)?Xn:Jn:Nn}function Zn(t,e){const n=[...t],i=n.length,s=t.map(((t,n)=>qn(t)(t,e[n])));return t=>{for(let e=0;e<i;e++)n[e]=s[e](t);return n}}function Jn(t,e){const n={...t,...e},i={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(i[s]=qn(t[s])(t[s],e[s]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const Qn=(t,e)=>{const n=$e.createTransformer(e),i=Ie(t),s=Ie(e);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?Gn.has(t)&&!s.values.length||Gn.has(e)&&!i.values.length?function(t,e){return Gn.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):Kn(Zn(function(t,e){const n=[],i={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const o=e.types[s],r=t.indexes[o][i[o]],a=t.values[r]??0;n[s]=a,i[o]++}return n}(i,s),s.values),n):Nn(t,e)};function ti(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return Nt(t,e,n);return qn(t)(t,e)}function ei(t,e,n){const i=Math.max(e-5,0);return I(n-t(i),e-i)}const ni=100,ii=10,si=1,oi=0,ri=800,ai=.3,ui=.3,li={granular:.01,default:2},ci={granular:.005,default:.5},hi=.01,di=10,pi=.05,mi=1,fi=.001;function gi({duration:t=ri,bounce:e=ai,velocity:n=oi,mass:i=si}){let s,o,r=1-e;r=pe(pi,mi,r),t=pe(hi,di,j(t)),r<1?(s=e=>{const i=e*r,s=i*t,o=i-n,a=vi(e,r),u=Math.exp(-s);return fi-o/a*u},o=e=>{const i=e*r*t,o=i*n+n,a=Math.pow(r,2)*Math.pow(e,2)*t,u=Math.exp(-i),l=vi(Math.pow(e,2),r);return(-s(e)+fi>0?-1:1)*((o-a)*u)/l}):(s=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,o=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let i=n;for(let n=1;n<yi;n++)i-=t(i)/e(i);return i}(s,o,5/t);if(t=F(t),isNaN(a))return{stiffness:ni,damping:ii,duration:t};{const e=Math.pow(a,2)*i;return{stiffness:e,damping:2*r*Math.sqrt(i*e),duration:t}}}const yi=12;function vi(t,e){return t*Math.sqrt(1-e*e)}const xi=["duration","bounce"],wi=["stiffness","damping","mass"];function Pi(t,e){return e.some((e=>void 0!==t[e]))}function Ti(t=ui,e=ai){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:s}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:u,damping:l,mass:c,duration:h,velocity:d,isResolvedFromDuration:p}=function(t){let e={velocity:oi,stiffness:ni,damping:ii,mass:si,isResolvedFromDuration:!1,...t};if(!Pi(t,wi)&&Pi(t,xi))if(t.visualDuration){const n=t.visualDuration,i=2*Math.PI/(1.2*n),s=i*i,o=2*pe(.05,1,1-(t.bounce||0))*Math.sqrt(s);e={...e,mass:si,stiffness:s,damping:o}}else{const n=gi(t);e={...e,...n,mass:si},e.isResolvedFromDuration=!0}return e}({...n,velocity:-j(n.velocity||0)}),m=d||0,f=l/(2*Math.sqrt(u*c)),g=r-o,y=j(Math.sqrt(u/c)),v=Math.abs(g)<5;let x;if(i||(i=v?li.granular:li.default),s||(s=v?ci.granular:ci.default),f<1){const t=vi(y,f);x=e=>{const n=Math.exp(-f*y*e);return r-n*((m+f*y*g)/t*Math.sin(t*e)+g*Math.cos(t*e))}}else if(1===f)x=t=>r-Math.exp(-y*t)*(g+(m+y*g)*t);else{const t=y*Math.sqrt(f*f-1);x=e=>{const n=Math.exp(-f*y*e),i=Math.min(t*e,300);return r-n*((m+f*y*g)*Math.sinh(i)+t*g*Math.cosh(i))/t}}const w={calculatedDuration:p&&h||null,next:t=>{const e=x(t);if(p)a.done=t>=h;else{let n=0;f<1&&(n=0===t?F(m):ei(x,t,e));const o=Math.abs(n)<=i,u=Math.abs(r-e)<=s;a.done=o&&u}return a.value=a.done?r:e,a},toString:()=>{const t=Math.min(lt(w),ut),e=Q((e=>w.next(t*e).value),t,30);return t+"ms "+e},toTransition:()=>{}};return w}function Si({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:u,restDelta:l=.5,restSpeed:c}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?u:void 0===u||Math.abs(a-t)<Math.abs(u-t)?a:u;let m=n*e;const f=h+m,g=void 0===r?f:r(f);g!==f&&(m=g-h);const y=t=>-m*Math.exp(-t/i),v=t=>g+y(t),x=t=>{const e=y(t),n=v(t);d.done=Math.abs(e)<=l,d.value=d.done?g:n};let w,P;const T=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==u&&e>u)&&(w=t,P=Ti({keyframes:[d.value,p(d.value)],velocity:ei(v,t,d.value),damping:s,stiffness:o,restDelta:l,restSpeed:c}))};return T(0),{calculatedDuration:null,next:t=>{let e=!1;return P||void 0!==w||(e=!0,x(t),T(t)),void 0!==w&&t>=w?P.next(t-w):(!e&&x(t),d)}}}Ti.applyToOptions=t=>{const e=ct(t,100,Ti);return t.ease=J()?e.ease:"easeOut",t.duration=F(e.duration),t.type="keyframes",t};const bi=Qt(.42,0,1,1),Ai=Qt(0,0,.58,1),Ei=Qt(.42,0,.58,1),Mi=t=>Array.isArray(t)&&"number"!=typeof t[0],Ci={linear:L,easeIn:bi,easeInOut:Ei,easeOut:Ai,circIn:re,circInOut:ue,circOut:ae,backIn:ie,backInOut:se,backOut:ne,anticipate:oe},Vi=t=>{if(_(t)){t.length;const[e,n,i,s]=t;return Qt(e,n,i,s)}return"string"==typeof t?Ci[t]:t};function Ri(t,e,{clamp:n=!0,ease:i,mixer:s}={}){const o=t.length;if(e.length,1===o)return()=>e[0];if(2===o&&e[0]===e[1])return()=>e[1];const r=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=function(t,e,n){const i=[],s=n||k.mix||ti,o=t.length-1;for(let n=0;n<o;n++){let o=s(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||L:e;o=Kn(t,o)}i.push(o)}return i}(e,i,s),u=a.length,l=n=>{if(r&&n<t[0])return e[0];let i=0;if(u>1)for(;i<t.length-2&&!(n<t[i+1]);i++);const s=B(t[i],t[i+1],n);return a[i](s)};return n?e=>l(pe(t[0],t[o-1],e)):l}function ki(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=B(0,e,i);t.push(Nt(n,1,s))}}function Di(t){const e=[0];return ki(e,t.length-1),e}function Li({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=Mi(i)?i.map(Vi):Vi(i),o={done:!1,value:e[0]},r=function(t,e){return t.map((t=>t*e))}(n&&n.length===e.length?n:Di(e),t),a=Ri(r,e,{ease:Array.isArray(s)?s:(u=e,l=s,u.map((()=>l||Ei)).splice(0,u.length-1))});var u,l;return{calculatedDuration:t,next:e=>(o.value=a(e),o.done=e>=t,o)}}const Bi=t=>{const e=({timestamp:e})=>t(e);return{start:()=>ft.update(e,!0),stop:()=>gt(e),now:()=>yt.isProcessing?yt.timestamp:St.now()}},Oi={decay:Si,inertia:Si,tween:Li,keyframes:Li,spring:Ti},Fi=t=>t/100;class ji extends In{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:t}=this.options;t&&t()};const{name:e,motionValue:n,element:i,keyframes:s}=this.options,o=i?.KeyframeResolver||Pn;this.resolver=new o(s,((t,e)=>this.onKeyframesResolved(t,e)),e,n,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:e="keyframes",repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=this.options,r=st(e)?e:Oi[e]||Li;let a,u;r!==Li&&"number"!=typeof t[0]&&(a=Kn(Fi,ti(t[0],t[1])),t=[0,100]);const l=r({...this.options,keyframes:t});"mirror"===s&&(u=r({...this.options,keyframes:[...t].reverse(),velocity:-o})),null===l.calculatedDuration&&(l.calculatedDuration=lt(l));const{calculatedDuration:c}=l,h=c+i;return{generator:l,mirroredGenerator:u,mapPercentToKeyframes:a,calculatedDuration:c,resolvedDuration:h,totalDuration:h*(n+1)-i}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&t?this.state=this.pendingPlayState:this.pause()}tick(t,e=!1){const{resolved:n}=this;if(!n){const{keyframes:t}=this.options;return{done:!0,value:t[t.length-1]}}const{finalKeyframe:i,generator:s,mirroredGenerator:o,mapPercentToKeyframes:r,keyframes:a,calculatedDuration:u,totalDuration:l,resolvedDuration:c}=n;if(null===this.startTime)return s.next(0);const{delay:h,repeat:d,repeatType:p,repeatDelay:m,onUpdate:f}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-l/this.speed,this.startTime)),e?this.currentTime=t:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const g=this.currentTime-h*(this.speed>=0?1:-1),y=this.speed>=0?g<0:g>l;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=l);let v=this.currentTime,x=s;if(d){const t=Math.min(this.currentTime,l)/c;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,d+1);Boolean(e%2)&&("reverse"===p?(n=1-n,m&&(n-=m/c)):"mirror"===p&&(x=o)),v=pe(0,1,n)*c}const w=y?{done:!1,value:a[0]}:x.next(v);r&&(w.value=r(w.value));let{done:P}=w;y||null===u||(P=this.speed>=0?this.currentTime>=l:this.currentTime<=0);const T=null===this.holdTime&&("finished"===this.state||"running"===this.state&&P);return T&&void 0!==i&&(w.value=jn(a,this.options,i)),f&&f(w.value),T&&this.finish(),w}get duration(){const{resolved:t}=this;return t?j(t.calculatedDuration):0}get time(){return j(this.currentTime)}set time(t){t=F(t),this.currentTime=t,null!==this.holdTime||0===this.speed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=j(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:t=Bi,onPlay:e,startTime:n}=this.options;this.driver||(this.driver=t((t=>this.tick(t)))),e&&e();const i=this.driver.now();null!==this.holdTime?this.startTime=i-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=i):this.startTime=n??this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){this._resolved?(this.state="paused",this.holdTime=this.currentTime??0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}get finished(){return this.currentFinishedPromise}}function Ii(t){return new ji(t)}const Ui=new Set(["opacity","clipPath","filter","transform"]),Wi=D((()=>Object.hasOwnProperty.call(Element.prototype,"animate")));const Ni={anticipate:oe,backInOut:se,circInOut:ue};class $i extends In{constructor(t){super(t);const{name:e,motionValue:n,element:i,keyframes:s}=this.options;this.resolver=new Ln(s,((t,e)=>this.onKeyframesResolved(t,e)),e,n,i),this.resolver.scheduleResolve()}initPlayback(t,e){let{duration:n=300,times:i,ease:s,type:o,motionValue:r,name:a,startTime:u}=this.options;if(!r.owner||!r.owner.current)return!1;var l;if("string"==typeof s&&J()&&s in Ni&&(s=Ni[s]),st((l=this.options).type)||"spring"===l.type||!ht(l.ease)){const{onComplete:e,onUpdate:r,motionValue:a,element:u,...l}=this.options,c=function(t,e){const n=new ji({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let i={done:!1,value:t[0]};const s=[];let o=0;for(;!i.done&&o<2e4;)i=n.sample(o),s.push(i.value),o+=10;return{times:void 0,keyframes:s,duration:o-10,ease:"linear"}}(t,l);1===(t=c.keyframes).length&&(t[1]=t[0]),n=c.duration,i=c.times,s=c.ease,o="keyframes"}const c=it(r.owner.current,a,t,{...this.options,duration:n,times:i,ease:s});return c.startTime=u??this.calcStartTime(),this.pendingTimeline?(dt(c,this.pendingTimeline),this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:n}=this.options;r.set(jn(t,this.options,e)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:n,times:i,type:o,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:e}=t;return j(e)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:e}=t;return j(e.currentTime||0)}set time(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.currentTime=F(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:e}=t;return e.playbackRate}get finished(){return this.resolved.animation.finished}set speed(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:e}=t;return e.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:e}=t;return e.startTime}attachTimeline(t){if(this._resolved){const{resolved:e}=this;if(!e)return L;const{animation:n}=e;dt(n,t)}else this.pendingTimeline=t;return L}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:e}=t;"finished"===e.playState&&this.updateFinishedPromise(),e.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:e}=t;e.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:e,keyframes:n,duration:i,type:s,ease:o,times:r}=t;if("idle"===e.playState||"finished"===e.playState)return;if(this.time){const{motionValue:t,onUpdate:e,onComplete:a,element:u,...l}=this.options,c=new ji({...l,keyframes:n,duration:i,type:s,ease:o,times:r,isGenerator:!0}),h=F(this.time);t.setWithVelocity(c.sample(h-10).value,c.sample(h).value,10)}const{onStop:a}=this.options;a&&a(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:o,type:r}=t;if(!(e&&e.owner&&e.owner.current instanceof HTMLElement))return!1;const{onUpdate:a,transformTemplate:u}=e.owner.getProps();return Wi()&&n&&Ui.has(n)&&("transform"!==n||!u)&&!a&&!i&&"mirror"!==s&&0!==o&&"inertia"!==r}}const zi={type:"spring",stiffness:500,damping:25,restSpeed:10},Hi={type:"keyframes",duration:.8},Xi={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Yi=(t,{keyframes:e})=>e.length>2?Hi:he.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:zi:Xi;const Ki=(t,e,n,i={},s,o)=>r=>{const a=at(i,t)||{},u=a.delay||i.delay||0;let{elapsed:l=0}=i;l-=F(u);let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-l,onUpdate:t=>{e.set(t),a.onUpdate&&a.onUpdate(t)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:s};(function({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:o,repeatType:r,repeatDelay:a,from:u,elapsed:l,...c}){return!!Object.keys(c).length})(a)||(c={...c,...Yi(t,c)}),c.duration&&(c.duration=F(c.duration)),c.repeatDelay&&(c.repeatDelay=F(c.repeatDelay)),void 0!==c.from&&(c.keyframes[0]=c.from);let h=!1;if((!1===c.type||0===c.duration&&!c.repeatDelay)&&(c.duration=0,0===c.delay&&(h=!0)),(Zt.current||k.skipAnimations)&&(h=!0,c.duration=0,c.delay=0),c.allowFlatten=!a.type&&!a.ease,h&&!o&&void 0!==e.get()){const t=jn(c.keyframes,a);if(void 0!==t)return ft.update((()=>{c.onUpdate(t),c.onComplete()})),new N([])}return!o&&$i.supports(c)?new $i(c):new ji(c)};function Gi(t,e,n){const i=qt(t)?t:Wt(t);return i.start(Ki("",i,e,n)),i.animation}const _i=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),qi="framerAppearId",Zi="data-"+_i(qi);function Ji(t){return t.props[Zi]}function Qi(t){return t instanceof SVGElement&&"svg"!==t.tagName}const ts=(t,e)=>t.depth-e.depth;class es{constructor(){this.children=[],this.isDirty=!1}add(t){C(this.children,t),this.isDirty=!0}remove(t){V(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(ts),this.isDirty=!1,this.children.forEach(t)}}function ns(t,e){const n=St.now(),i=({timestamp:s})=>{const o=s-n;o>=e&&(gt(i),t(o-e))};return ft.read(i,!0),()=>gt(i)}const is=t=>Array.isArray(t);function ss(t){const e=qt(t)?t.get():t;return n=e,Boolean(n&&"object"==typeof n&&n.mix&&n.toValue)?e.toValue():e;var n}const os=["TopLeft","TopRight","BottomLeft","BottomRight"],rs=os.length,as=t=>"string"==typeof t?parseFloat(t):t,us=t=>"number"==typeof t||Ce.test(t);function ls(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const cs=ds(0,.5,ae),hs=ds(.5,.95,L);function ds(t,e,n){return i=>i<t?0:i>e?1:n(B(t,e,i))}function ps(t,e){t.min=e.min,t.max=e.max}function ms(t,e){ps(t.x,e.x),ps(t.y,e.y)}function fs(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function gs(t){return void 0===t||1===t}function ys({scale:t,scaleX:e,scaleY:n}){return!gs(t)||!gs(e)||!gs(n)}function vs(t){return ys(t)||xs(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function xs(t){return ws(t.x)||ws(t.y)}function ws(t){return t&&"0%"!==t}function Ps(t,e,n){return n+e*(t-n)}function Ts(t,e,n,i,s){return void 0!==s&&(t=Ps(t,s,i)),Ps(t,n,i)+e}function Ss(t,e=0,n=1,i,s){t.min=Ts(t.min,e,n,i,s),t.max=Ts(t.max,e,n,i,s)}function bs(t,{x:e,y:n}){Ss(t.x,e.translate,e.scale,e.originPoint),Ss(t.y,n.translate,n.scale,n.originPoint)}const As=.999999999999,Es=1.0000000000001;function Ms(t,e){t.min=t.min+e,t.max=t.max+e}function Cs(t,e,n,i,s=.5){Ss(t,e,n,Nt(t.min,t.max,s),i)}function Vs(t,e){Cs(t.x,e.x,e.scaleX,e.scale,e.originX),Cs(t.y,e.y,e.scaleY,e.scale,e.originY)}function Rs(t,e,n,i,s){return t=Ps(t-=e,1/n,i),void 0!==s&&(t=Ps(t,1/s,i)),t}function ks(t,e,[n,i,s],o,r){!function(t,e=0,n=1,i=.5,s,o=t,r=t){Me.test(e)&&(e=parseFloat(e),e=Nt(r.min,r.max,e/100)-r.min);if("number"!=typeof e)return;let a=Nt(o.min,o.max,i);t===o&&(a-=e),t.min=Rs(t.min,e,n,a,s),t.max=Rs(t.max,e,n,a,s)}(t,e[n],e[i],e[s],e.scale,o,r)}const Ds=["x","scaleX","originX"],Ls=["y","scaleY","originY"];function Bs(t,e,n,i){ks(t.x,e,Ds,n?n.x:void 0,i?i.x:void 0),ks(t.y,e,Ls,n?n.y:void 0,i?i.y:void 0)}const Os=()=>({x:{min:0,max:0},y:{min:0,max:0}});function Fs(t){return 0===t.translate&&1===t.scale}function js(t){return Fs(t.x)&&Fs(t.y)}function Is(t,e){return t.min===e.min&&t.max===e.max}function Us(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Ws(t,e){return Us(t.x,e.x)&&Us(t.y,e.y)}function Ns(t){return $t(t.x)/$t(t.y)}function $s(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class zs{constructor(){this.members=[]}add(t){C(this.members,t),t.scheduleRender()}remove(t){if(V(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){const e=this.members.findIndex((e=>t===e));if(0===e)return!1;let n;for(let t=e;t>=0;t--){const e=this.members[t];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,e&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;!1===i&&n.hide()}}exitAnimationComplete(){this.members.forEach((t=>{const{options:e,resumingFrom:n}=t;e.onExitComplete&&e.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()}))}scheduleRender(){this.members.forEach((t=>{t.instance&&t.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Hs={};function Xs(t){for(const e in t)Hs[e]=t[e],bn(e)&&(Hs[e].isCSSVariable=!0)}function Ys(t){return[t("x"),t("y")]}const Ks={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Gs=["","X","Y","Z"],_s={visibility:"hidden"};let qs=0;function Zs(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}function Js(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Ji(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",ft,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&Js(i)}function Qs({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(t={},n=e?.()){this.id=qs++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(no),this.nodes.forEach(lo),this.nodes.forEach(co),this.nodes.forEach(io)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new es)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new O),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e,n=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Qi(e),this.instance=e;const{layoutId:i,layout:s,visualElement:o}=this.options;if(o&&!o.current&&o.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(s||i)&&(this.isLayoutDirty=!0),t){let n;const i=()=>this.root.updateBlockedByResize=!1;t(e,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=ns(i,250),Ks.hasAnimatedSinceResize&&(Ks.hasAnimatedSinceResize=!1,this.nodes.forEach(uo))}))}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&o&&(i||s)&&this.addEventListener("didUpdate",(({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const s=this.options.transition||o.getDefaultTransition()||yo,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=o.getProps(),u=!this.targetLayout||!Ws(this.targetLayout,i),l=!e&&n;if(this.options.layoutRoot||this.resumeFrom||l||e&&(u||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(t,l);const e={...at(s,"layout"),onPlay:r,onComplete:a};(o.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e)}else e||uo(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,gt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(ho),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Js(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(oo);this.isUpdating||this.nodes.forEach(ro),this.isUpdating=!1,this.nodes.forEach(ao),this.nodes.forEach(to),this.nodes.forEach(eo),this.clearAllSnapshots();const t=St.now();yt.delta=pe(0,1e3/60,t-yt.timestamp),yt.timestamp=t,yt.isProcessing=!0,vt.update.process(yt),vt.preRender.process(yt),vt.render.process(yt),yt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,xt.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(so),this.sharedNodes.forEach(po)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ft.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ft.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||$t(this.snapshot.measuredBox.x)||$t(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++){this.path[t].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e){const e=i(this.instance);this.scroll={animationId:this.root.animationId,phase:t,isRoot:e,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:e}}}resetTransform(){if(!s)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,e=this.projectionDelta&&!js(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,o=i!==this.prevTransformTemplateValue;t&&(e||vs(this.latestValues)||o)&&(s(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);var i;return t&&(n=this.removeTransform(n)),wo((i=n).x),wo(i.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const e=t.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(To))){const{scroll:t}=this.root;t&&(Ms(e.x,t.offset.x),Ms(e.y,t.offset.y))}return e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};if(ms(e,t),this.scroll?.wasRoot)return e;for(let n=0;n<this.path.length;n++){const i=this.path[n],{scroll:s,options:o}=i;i!==this.root&&s&&o.layoutScroll&&(s.wasRoot&&ms(e,t),Ms(e.x,s.offset.x),Ms(e.y,s.offset.y))}return e}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};ms(n,t);for(let t=0;t<this.path.length;t++){const i=this.path[t];!e&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Vs(n,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),vs(i.latestValues)&&Vs(n,i.latestValues)}return vs(this.latestValues)&&Vs(n,this.latestValues),n}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};ms(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!n.instance)continue;if(!vs(n.latestValues))continue;ys(n.latestValues)&&n.updateSnapshot();const i={x:{min:0,max:0},y:{min:0,max:0}};ms(i,n.measurePageBox()),Bs(e,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,i)}return vs(this.latestValues)&&Bs(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==yt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){const e=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=e.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=e.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=e.isSharedProjectionDirty);const n=Boolean(this.resumingFrom)||this!==e;if(!(t||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:i,layoutId:s}=this.options;if(this.layout&&(i||s)){if(this.resolvedRelativeTargetAt=yt.timestamp,!this.targetDelta&&!this.relativeTarget){const t=this.getClosestProjectingParent();t&&t.layout&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Kt(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),ms(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}var o,r,a;if(this.relativeTarget||this.targetDelta)if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),o=this.target,r=this.relativeTarget,a=this.relativeParent.target,Xt(o.x,r.x,a.x),Xt(o.y,r.y,a.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):ms(this.target,this.layout.layoutBox),bs(this.target,this.targetDelta)):ms(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const t=this.getClosestProjectingParent();t&&Boolean(t.resumingFrom)===Boolean(this.resumingFrom)&&!t.options.layoutScroll&&t.target&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Kt(this.relativeTargetOrigin,this.target,t.target),ms(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(this.parent&&!ys(this.parent.latestValues)&&!xs(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const t=this.getLead(),e=Boolean(this.resumingFrom)||this!==t;let n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),e&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===yt.timestamp&&(n=!1),n)return;const{layout:i,layoutId:s}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!i&&!s)return;ms(this.layoutCorrected,this.layout.layoutBox);const o=this.treeScale.x,r=this.treeScale.y;!function(t,e,n,i=!1){const s=n.length;if(!s)return;let o,r;e.x=e.y=1;for(let a=0;a<s;a++){o=n[a],r=o.projectionDelta;const{visualElement:s}=o.options;s&&s.props.style&&"contents"===s.props.style.display||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Vs(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,bs(t,r)),i&&vs(o.latestValues)&&Vs(t,o.latestValues))}e.x<Es&&e.x>As&&(e.x=1),e.y<Es&&e.y>As&&(e.y=1)}(this.layoutCorrected,this.treeScale,this.path,e),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:a}=t;a?(this.projectionDelta&&this.prevProjectionDelta?(fs(this.prevProjectionDelta.x,this.projectionDelta.x),fs(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Ht(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.treeScale.x===o&&this.treeScale.y===r&&$s(this.projectionDelta.x,this.prevProjectionDelta.x)&&$s(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",a))):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.visualElement?.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(t,e=!1){const n=this.snapshot,i=n?n.latestValues:{},s={...this.latestValues},o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const r={x:{min:0,max:0},y:{min:0,max:0}},a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),u=this.getStack(),l=!u||u.members.length<=1,c=Boolean(a&&!l&&!0===this.options.crossfade&&!this.path.some(go));let h;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var u,d;mo(o.x,t.x,n),mo(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Kt(r,this.layout.layoutBox,this.relativeParent.layout.layoutBox),function(t,e,n,i){fo(t.x,e.x,n.x,i),fo(t.y,e.y,n.y,i)}(this.relativeTarget,this.relativeTargetOrigin,r,n),h&&(u=this.relativeTarget,d=h,Is(u.x,d.x)&&Is(u.y,d.y))&&(this.isProjectionDirty=!1),h||(h={x:{min:0,max:0},y:{min:0,max:0}}),ms(h,this.relativeTarget)),a&&(this.animationValues=s,function(t,e,n,i,s,o){s?(t.opacity=Nt(0,void 0!==n.opacity?n.opacity:1,cs(i)),t.opacityExit=Nt(void 0!==e.opacity?e.opacity:1,0,hs(i))):o&&(t.opacity=Nt(void 0!==e.opacity?e.opacity:1,void 0!==n.opacity?n.opacity:1,i));for(let s=0;s<rs;s++){const o=`border${os[s]}Radius`;let r=ls(e,o),a=ls(n,o);void 0===r&&void 0===a||(r||(r=0),a||(a=0),0===r||0===a||us(r)===us(a)?(t[o]=Math.max(Nt(as(r),as(a),i),0),(Me.test(a)||Me.test(r))&&(t[o]+="%")):t[o]=a)}(e.rotate||n.rotate)&&(t.rotate=Nt(e.rotate||0,n.rotate||0,i))}(s,i,this.latestValues,n,c,l)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(gt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ft.update((()=>{Ks.hasAnimatedSinceResize=!0,this.currentAnimation=Gi(0,1e3,{...t,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onStop:()=>{},onComplete:()=>{t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0}))}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:i,latestValues:s}=t;if(e&&n&&i){if(this!==t&&this.layout&&i&&Po(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=$t(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=$t(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}ms(e,n),Vs(e,s),Ht(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new zs);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){const{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(e=!0),!e)return;const i={};n.z&&Zs("z",t,i,this.animationValues);for(let e=0;e<Gs.length;e++)Zs(`rotate${Gs[e]}`,t,i,this.animationValues),Zs(`skew${Gs[e]}`,t,i,this.animationValues);t.render();for(const e in i)t.setStaticValue(e,i[e]),this.animationValues&&(this.animationValues[e]=i[e]);t.scheduleRender()}getProjectionStyles(t){if(!this.instance||this.isSVG)return;if(!this.isVisible)return _s;const e={visibility:""},n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,e.opacity="",e.pointerEvents=ss(t?.pointerEvents)||"",e.transform=n?n(this.latestValues,""):"none",e;const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target){const e={};return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=ss(t?.pointerEvents)||""),this.hasProjected&&!vs(this.latestValues)&&(e.transform=n?n({},""):"none",this.hasProjected=!1),e}const s=i.animationValues||i.latestValues;this.applyTransformsToTarget(),e.transform=function(t,e,n){let i="";const s=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;if((s||o||r)&&(i=`translate3d(${s}px, ${o}px, ${r}px) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t,rotate:e,rotateX:s,rotateY:o,skewX:r,skewY:a}=n;t&&(i=`perspective(${t}px) ${i}`),e&&(i+=`rotate(${e}deg) `),s&&(i+=`rotateX(${s}deg) `),o&&(i+=`rotateY(${o}deg) `),r&&(i+=`skewX(${r}deg) `),a&&(i+=`skewY(${a}deg) `)}const a=t.x.scale*e.x,u=t.y.scale*e.y;return 1===a&&1===u||(i+=`scale(${a}, ${u})`),i||"none"}(this.projectionDeltaWithTransform,this.treeScale,s),n&&(e.transform=n(s,e.transform));const{x:o,y:r}=this.projectionDelta;e.transformOrigin=`${100*o.origin}% ${100*r.origin}% 0`,i.animationValues?e.opacity=i===this?s.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:e.opacity=i===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const t in Hs){if(void 0===s[t])continue;const{correct:n,applyTo:o,isCSSVariable:r}=Hs[t],a="none"===e.transform?s[t]:n(s[t],i);if(o){const t=o.length;for(let n=0;n<t;n++)e[o[n]]=a}else r?this.options.visualElement.renderState.vars[t]=a:e[t]=a}return this.options.layoutId&&(e.pointerEvents=i===this?ss(t?.pointerEvents)||"":"none"),e}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach((t=>t.currentAnimation?.stop())),this.root.nodes.forEach(oo),this.root.sharedNodes.clear()}}}function to(t){t.updateLayout()}function eo(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=t.layout,{animationType:s}=t.options,o=e.source!==t.layout.source;"size"===s?Ys((t=>{const i=o?e.measuredBox[t]:e.layoutBox[t],s=$t(i);i.min=n[t].min,i.max=i.min+s})):Po(s,e.layoutBox,n)&&Ys((i=>{const s=o?e.measuredBox[i]:e.layoutBox[i],r=$t(n[i]);s.max=s.min+r,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[i].max=t.relativeTarget[i].min+r)}));const r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Ht(r,n,e.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?Ht(a,t.applyTransform(i,!0),e.measuredBox):Ht(a,n,e.layoutBox);const u=!js(r);let l=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:s,layout:o}=i;if(s&&o){const r={x:{min:0,max:0},y:{min:0,max:0}};Kt(r,e.layoutBox,s.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};Kt(a,n,o.layoutBox),Ws(r,a)||(l=!0),i.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=r,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:r,hasLayoutChanged:u,hasRelativeLayoutChanged:l})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function no(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function io(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function so(t){t.clearSnapshot()}function oo(t){t.clearMeasurements()}function ro(t){t.isLayoutDirty=!1}function ao(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function uo(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function lo(t){t.resolveTargetDelta()}function co(t){t.calcProjection()}function ho(t){t.resetSkewAndRotation()}function po(t){t.removeLeadSnapshot()}function mo(t,e,n){t.translate=Nt(e.translate,0,n),t.scale=Nt(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function fo(t,e,n,i){t.min=Nt(e.min,n.min,i),t.max=Nt(e.max,n.max,i)}function go(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const yo={duration:.45,ease:[.4,0,.1,1]},vo=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),xo=vo("applewebkit/")&&!vo("chrome/")?Math.round:L;function wo(t){t.min=xo(t.min),t.max=xo(t.max)}function Po(t,e,n){return"position"===t||"preserve-aspect"===t&&(i=Ns(e),s=Ns(n),o=.2,!(Math.abs(i-s)<=o));var i,s,o}function To(t){return t!==t.root&&t.scroll?.wasRoot}function So(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}const bo=Qs({attachResizeListener:(t,e)=>So(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ao={current:void 0},Eo=Qs({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Ao.current){const t=new bo({});t.mount(window),t.setOptions({layoutScroll:!0}),Ao.current=t}return Ao.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)});function Mo(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Co={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!Ce.test(t))return t;t=parseFloat(t)}return`${Mo(t,e.target.x)}% ${Mo(t,e.target.y)}%`}},Vo={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=$e.parse(t);if(s.length>5)return i;const o=$e.createTransformer(t),r="number"!=typeof s[0]?1:0,a=n.x.scale*e.x,u=n.y.scale*e.y;s[0+r]/=a,s[1+r]/=u;const l=Nt(a,u,.5);return"number"==typeof s[2+r]&&(s[2+r]/=l),"number"==typeof s[3+r]&&(s[3+r]/=l),o(s)}};function Ro({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function ko(t,e){return Ro(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}(t.getBoundingClientRect(),e))}const Do={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Lo={};for(const t in Do)Lo[t]={isEnabled:e=>Do[t].some((t=>!!e[t]))};const Bo={current:null},Oo={current:!1};function Fo(){if(Oo.current=!0,g)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Bo.current=t.matches;t.addListener(e),e()}else Bo.current=!1}const jo=[...kn,Le,$e],Io=new WeakMap;function Uo(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function Wo(t){return"string"==typeof t||Array.isArray(t)}const No=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],$o=["initial",...No];function zo(t){return Uo(t.animate)||$o.some((e=>Wo(t[e])))}function Ho(t){return Boolean(zo(t)||t.variants)}function Xo(t){const e=[{},{}];return t?.values.forEach(((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()})),e}function Yo(t,e,n,i){if("function"==typeof e){const[s,o]=Xo(i);e=e(void 0!==n?n:t.custom,s,o)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[s,o]=Xo(i);e=e(void 0!==n?n:t.custom,s,o)}return e}const Ko=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Go{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},r={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Pn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=St.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,ft.render(this.render,!1,!0))};const{latestValues:a,renderState:u,onUpdate:l}=o;this.onUpdate=l,this.latestValues=a,this.baseTarget={...a},this.initialValues=e.initial?{...a}:{},this.renderState=u,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=r,this.blockInitialAnimation=Boolean(s),this.isControllingVariants=zo(e),this.isVariantNode=Ho(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:c,...h}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in h){const e=h[t];void 0!==a[t]&&qt(e)&&e.set(a[t],!1)}}mount(t){this.current=t,Io.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((t,e)=>this.bindToMotionValue(e,t))),Oo.current||Fo(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Bo.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),gt(this.notifyUpdate),gt(this.render),this.valueSubscriptions.forEach((t=>t())),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=he.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=e.on("change",(e=>{this.latestValues[t]=e,this.props.onUpdate&&ft.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)})),s=e.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,(()=>{i(),s(),o&&o(),e.owner&&e.stop()}))}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in Lo){const e=Lo[t];if(!e)continue;const{isEnabled:n,Feature:i}=e;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<Ko.length;e++){const n=Ko[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const i=t["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=function(t,e,n){for(const i in e){const s=e[i],o=n[i];if(qt(s))t.addValue(i,s);else if(qt(o))t.addValue(i,Wt(s,{owner:t}));else if(o!==s)if(t.hasValue(i)){const e=t.getValue(i);!0===e.liveStyle?e.jump(s):e.hasAnimated||e.set(s)}else{const e=t.getStaticValue(i);t.addValue(i,Wt(void 0!==e?e:s,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=Wt(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){let n=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];var i;return null!=n&&("string"==typeof n&&(Tn(n)||le(n))?n=parseFloat(n):(i=n,!jo.find(Rn(i))&&$e.test(e)&&(n=Qe(t,e))),this.setBaseTarget(t,qt(n)?n.get():n)),qt(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let n;if("string"==typeof e||"object"==typeof e){const i=Yo(this.props,e,this.presenceContext?.custom);i&&(n=i[t])}if(e&&void 0!==n)return n;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||qt(i)?void 0!==this.initialValues[t]&&void 0===n?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new O),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class _o extends Go{constructor(){super(...arguments),this.KeyframeResolver=Ln}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;qt(t)&&(this.childSubscription=t.on("change",(t=>{this.current&&(this.current.textContent=`${t}`)})))}}const qo=(t,e)=>e&&"number"==typeof t?e.transform(t):t,Zo={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Jo=ce.length;function Qo(t,e,n){let i="",s=!0;for(let o=0;o<Jo;o++){const r=ce[o],a=t[r];if(void 0===a)continue;let u=!0;if(u="number"==typeof a?a===(r.startsWith("scale")?1:0):0===parseFloat(a),!u||n){const t=qo(a,qe[r]);if(!u){s=!1;i+=`${Zo[r]||r}(${t}) `}n&&(e[r]=t)}}return i=i.trim(),n?i=n(e,s?"":i):s&&(i="none"),i}function tr(t,e,n){const{style:i,vars:s,transformOrigin:o}=t;let r=!1,a=!1;for(const t in e){const n=e[t];if(he.has(t))r=!0;else if(bn(t))s[t]=n;else{const e=qo(n,qe[t]);t.startsWith("origin")?(a=!0,o[t]=e):i[t]=e}}if(e.transform||(r||n?i.transform=Qo(e,t.transform,n):i.transform&&(i.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=o;i.transformOrigin=`${t} ${e} ${n}`}}function er(t,{style:e,vars:n},i,s){Object.assign(t.style,e,s&&s.getProjectionStyles(i));for(const e in n)t.style.setProperty(e,n[e])}function nr(t,{layout:e,layoutId:n}){return he.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!Hs[t]||"opacity"===t)}function ir(t,e,n){const{style:i}=t,s={};for(const o in i)(qt(i[o])||e.style&&qt(e.style[o])||nr(o,t)||void 0!==n?.getValue(o)?.liveStyle)&&(s[o]=i[o]);return s}class sr extends _o{constructor(){super(...arguments),this.type="html",this.renderInstance=er}readValueFromInstance(t,e){if(he.has(e))return((t,e)=>{const{transform:n="none"}=getComputedStyle(t);return cn(n,e)})(t,e);{const i=(n=t,window.getComputedStyle(n)),s=(bn(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return ko(t,e)}build(t,e,n){tr(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return ir(t,e,n)}}function or(){const t=function(){const t=e.useRef(!1);return y((()=>(t.current=!0,()=>{t.current=!1})),[]),t}(),[n,i]=e.useState(0),s=e.useCallback((()=>{t.current&&i(n+1)}),[n]);return[e.useCallback((()=>ft.postRender(s)),[s]),n]}const rr=t=>!0===t,ar=({children:t,id:n,inherit:i=!0})=>{const s=e.useContext(m),o=e.useContext(M),[r,a]=or(),u=e.useRef(null),l=s.id||o;null===u.current&&((t=>rr(!0===t)||"id"===t)(i)&&l&&(n=n?l+"-"+n:l),u.current={id:n,group:rr(i)&&s.group||_t()});const c=e.useMemo((()=>({...u.current,forceRender:r})),[a]);return d(m.Provider,{value:c,children:t})},ur=e.createContext({strict:!1});function lr(t){for(const e in t)Lo[e]={...Lo[e],...t[e]}}function cr(t){return"function"==typeof t}const hr=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function dr(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||hr.has(t)}let pr=t=>!dr(t);function mr(t){t&&(pr=e=>e.startsWith("on")?!dr(e):t(e))}try{mr(require("@emotion/is-prop-valid").default)}catch{}function fr(t,e,n){const i={};for(const s in t)"values"===s&&"object"==typeof t.values||(pr(s)||!0===n&&dr(s)||!e&&!dr(s)||t.draggable&&s.startsWith("onDrag"))&&(i[s]=t[s]);return i}const gr=e.createContext(null);function yr(t){if("undefined"==typeof Proxy)return t;const e=new Map;return new Proxy(((...e)=>t(...e)),{get:(n,i)=>"create"===i?t:(e.has(i)||e.set(i,t(i)),e.get(i))})}function vr(t,e,n){const i=t.getProps();return Yo(i,e,void 0!==n?n:i.custom,t)}function xr(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Wt(n))}function wr(t,e){const n=vr(t,e);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const e in o){xr(t,e,(r=o[e],is(r)?r[r.length-1]||0:r))}var r}function Pr(t,e){const n=t.getValue("willChange");if(i=n,Boolean(qt(i)&&i.add))return n.add(e);var i}function Tr({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function Sr(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=e;i&&(o=i);const u=[],l=s&&t.animationState&&t.animationState.getState()[s];for(const e in a){const i=t.getValue(e,t.latestValues[e]??null),s=a[e];if(void 0===s||l&&Tr(l,e))continue;const r={delay:n,...at(o||{},e)};let c=!1;if(window.MotionHandoffAnimation){const n=Ji(t);if(n){const t=window.MotionHandoffAnimation(n,e,ft);null!==t&&(r.startTime=t,c=!0)}}Pr(t,e),i.start(Ki(e,i,s,t.shouldReduceMotion&&de.has(e)?{type:!1}:r,t,c));const h=i.animation;h&&u.push(h)}return r&&Promise.all(u).then((()=>{ft.update((()=>{r&&wr(t,r)}))})),u}function br(t,e,n={}){const i=vr(t,e,"exit"===n.type?t.presenceContext?.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Promise.all(Sr(t,i,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:o=0,staggerChildren:r,staggerDirection:a}=s;return function(t,e,n=0,i=0,s=1,o){const r=[],a=(t.variantChildren.size-1)*i,u=1===s?(t=0)=>t*i:(t=0)=>a-t*i;return Array.from(t.variantChildren).sort(Ar).forEach(((t,i)=>{t.notify("AnimationStart",e),r.push(br(t,e,{...o,delay:n+u(i)}).then((()=>t.notify("AnimationComplete",e))))})),Promise.all(r)}(t,e,o+i,r,a,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[t,e]="beforeChildren"===a?[o,r]:[r,o];return t().then((()=>e()))}return Promise.all([o(),r(n.delay)])}function Ar(t,e){return t.sortNodePosition(e)}function Er(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const s=e.map((e=>br(t,e,n)));i=Promise.all(s)}else if("string"==typeof e)i=br(t,e,n);else{const s="function"==typeof e?vr(t,e,n.custom):e;i=Promise.all(Sr(t,s,n))}return i.then((()=>{t.notify("AnimationComplete",e)}))}function Mr(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}const Cr=$o.length;function Vr(t){if(!t)return;if(!t.isControllingVariants){const e=t.parent&&Vr(t.parent)||{};return void 0!==t.props.initial&&(e.initial=t.props.initial),e}const e={};for(let n=0;n<Cr;n++){const i=$o[n],s=t.props[i];(Wo(s)||!1===s)&&(e[i]=s)}return e}const Rr=[...No].reverse(),kr=No.length;function Dr(t){let e=function(t){return e=>Promise.all(e.map((({animation:e,options:n})=>Er(t,e,n))))}(t),n=Or(),i=!0;const s=e=>(n,i)=>{const s=vr(t,i,"exit"===e?t.presenceContext?.custom:void 0);if(s){const{transition:t,transitionEnd:e,...i}=s;n={...n,...i,...e}}return n};function o(o){const{props:r}=t,a=Vr(t.parent)||{},u=[],l=new Set;let c={},h=1/0;for(let e=0;e<kr;e++){const d=Rr[e],p=n[d],m=void 0!==r[d]?r[d]:a[d],f=Wo(m),g=d===o?p.isActive:null;!1===g&&(h=e);let y=m===a[d]&&m!==r[d]&&f;if(y&&i&&t.manuallyAnimateOnMount&&(y=!1),p.protectedKeys={...c},!p.isActive&&null===g||!m&&!p.prevProp||Uo(m)||"boolean"==typeof m)continue;const v=Lr(p.prevProp,m);let x=v||d===o&&p.isActive&&!y&&f||e>h&&f,w=!1;const P=Array.isArray(m)?m:[m];let T=P.reduce(s(d),{});!1===g&&(T={});const{prevResolvedValues:S={}}=p,b={...S,...T},A=e=>{x=!0,l.has(e)&&(w=!0,l.delete(e)),p.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in b){const e=T[t],n=S[t];if(c.hasOwnProperty(t))continue;let i=!1;i=is(e)&&is(n)?!Mr(e,n):e!==n,i?null!=e?A(t):l.add(t):void 0!==e&&l.has(t)?A(t):p.protectedKeys[t]=!0}p.prevProp=m,p.prevResolvedValues=T,p.isActive&&(c={...c,...T}),i&&t.blockInitialAnimation&&(x=!1);x&&(!(y&&v)||w)&&u.push(...P.map((t=>({animation:t,options:{type:d}}))))}if(l.size){const e={};if("boolean"!=typeof r.initial){const n=vr(t,Array.isArray(r.initial)?r.initial[0]:r.initial);n&&n.transition&&(e.transition=n.transition)}l.forEach((n=>{const i=t.getBaseTarget(n),s=t.getValue(n);s&&(s.liveStyle=!0),e[n]=i??null})),u.push({animation:e})}let d=Boolean(u.length);return!i||!1!==r.initial&&r.initial!==r.animate||t.manuallyAnimateOnMount||(d=!1),i=!1,d?e(u):Promise.resolve()}return{animateChanges:o,setActive:function(e,i){if(n[e].isActive===i)return Promise.resolve();t.variantChildren?.forEach((t=>t.animationState?.setActive(e,i))),n[e].isActive=i;const s=o(e);for(const t in n)n[t].protectedKeys={};return s},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=Or(),i=!0}}}function Lr(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!Mr(e,t)}function Br(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Or(){return{animate:Br(!0),whileInView:Br(),whileHover:Br(),whileTap:Br(),whileDrag:Br(),whileFocus:Br(),exit:Br()}}class Fr{constructor(t){this.isMounted=!1,this.node=t}update(){}}let jr=0;const Ir={animation:{Feature:class extends Fr{constructor(t){super(t),t.animationState||(t.animationState=Dr(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Uo(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends Fr{constructor(){super(...arguments),this.id=jr++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const i=this.node.animationState.setActive("exit",!t);e&&!t&&i.then((()=>{e(this.id)}))}mount(){const{register:t,onExitComplete:e}=this.node.presenceContext||{};e&&e(this.id),t&&(this.unmount=t(this.id))}unmount(){}}}};function Ur(t){return{point:{x:t.pageX,y:t.pageY}}}const Wr=t=>e=>kt(e)&&t(e,Ur(e));function Nr(t,e,n,i){return So(t,e,Wr(n),i)}const $r=({current:t})=>t?t.ownerDocument.defaultView:null;function zr(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}const Hr=(t,e)=>Math.abs(t-e);function Xr(t,e){const n=Hr(t.x,e.x),i=Hr(t.y,e.y);return Math.sqrt(n**2+i**2)}class Yr{constructor(t,e,{transformPagePoint:n,contextWindow:i,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const t=_r(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=Xr(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:i}=t,{timestamp:s}=yt;this.history.push({...i,timestamp:s});const{onStart:o,onMove:r}=this.handlers;e||(o&&o(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),r&&r(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=Kr(e,this.transformPagePoint),ft.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:n,onSessionEnd:i,resumeAnimation:s}=this.handlers;if(this.dragSnapToOrigin&&s&&s(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=_r("pointercancel"===t.type?this.lastMoveEventInfo:Kr(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,o),i&&i(t,o)},!kt(t))return;this.dragSnapToOrigin=s,this.handlers=e,this.transformPagePoint=n,this.contextWindow=i||window;const o=Kr(Ur(t),this.transformPagePoint),{point:r}=o,{timestamp:a}=yt;this.history=[{...r,timestamp:a}];const{onSessionStart:u}=e;u&&u(t,_r(o,this.history)),this.removeListeners=Kn(Nr(this.contextWindow,"pointermove",this.handlePointerMove),Nr(this.contextWindow,"pointerup",this.handlePointerUp),Nr(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),gt(this.updatePoint)}}function Kr(t,e){return e?{point:e(t.point)}:t}function Gr(t,e){return{x:t.x-e.x,y:t.y-e.y}}function _r({point:t},e){return{point:t,delta:Gr(t,Zr(e)),offset:Gr(t,qr(e)),velocity:Jr(e,.1)}}function qr(t){return t[0]}function Zr(t){return t[t.length-1]}function Jr(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const s=Zr(t);for(;n>=0&&(i=t[n],!(s.timestamp-i.timestamp>F(e)));)n--;if(!i)return{x:0,y:0};const o=j(s.timestamp-i.timestamp);if(0===o)return{x:0,y:0};const r={x:(s.x-i.x)/o,y:(s.y-i.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function Qr(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function ta(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,i]=[i,n]),{min:n,max:i}}const ea=.35;function na(t,e,n){return{min:ia(t,e),max:ia(t,n)}}function ia(t,e){return"number"==typeof t?t:t[e]||0}const sa=new WeakMap;class oa{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=t}start(t,{snapToCursor:e=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:i}=this.getProps();this.panSession=new Yr(t,{onSessionStart:t=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(Ur(t).point)},onStart:(t,e)=>{const{drag:n,dragPropagation:i,onDragStart:s}=this.getProps();if(n&&!i&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(o=n)||"y"===o?bt[o]?null:(bt[o]=!0,()=>{bt[o]=!1}):bt.x||bt.y?null:(bt.x=bt.y=!0,()=>{bt.x=bt.y=!1}),!this.openDragLock))return;var o;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ys((t=>{let e=this.getAxisMotionValue(t).get()||0;if(Me.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const i=n.layout.layoutBox[t];if(i){e=$t(i)*(parseFloat(e)/100)}}}this.originPoint[t]=e})),s&&ft.postRender((()=>s(t,e))),Pr(this.visualElement,"transform");const{animationState:r}=this.visualElement;r&&r.setActive("whileDrag",!0)},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:s,onDrag:o}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:r}=e;if(i&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(r),void(null!==this.currentDirection&&s&&s(this.currentDirection));this.updateAxis("x",e.point,r),this.updateAxis("y",e.point,r),this.visualElement.render(),o&&o(t,e)},onSessionEnd:(t,e)=>this.stop(t,e),resumeAnimation:()=>Ys((t=>"paused"===this.getAnimationState(t)&&this.getAxisMotionValue(t).animation?.play()))},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:i,contextWindow:$r(this.visualElement)})}stop(t,e){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:i}=e;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&ft.postRender((()=>s(t,e)))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,n){const{drag:i}=this.getProps();if(!n||!ra(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=function(t,{min:e,max:n},i){return void 0!==e&&t<e?t=i?Nt(e,t,i.min):Math.max(t,e):void 0!==n&&t>n&&(t=i?Nt(n,t,i.max):Math.min(t,n)),t}(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){const{dragConstraints:t,dragElastic:e}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;t&&zr(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!n)&&function(t,{top:e,left:n,bottom:i,right:s}){return{x:Qr(t.x,n,s),y:Qr(t.y,e,i)}}(n.layoutBox,t),this.elastic=function(t=ea){return!1===t?t=0:!0===t&&(t=ea),{x:na(t,"left","right"),y:na(t,"top","bottom")}}(e),i!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&Ys((t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(n.layoutBox[t],this.constraints[t]))}))}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!zr(t))return!1;const n=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=function(t,e,n){const i=ko(t,n),{scroll:s}=e;return s&&(Ms(i.x,s.offset.x),Ms(i.y,s.offset.y)),i}(n,i.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:ta(t.x,e.x),y:ta(t.y,e.y)}}(i.layout.layoutBox,s);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=Ro(t))}return o}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},u=Ys((r=>{if(!ra(r,e,this.currentDirection))return;let u=a&&a[r]||{};o&&(u={min:0,max:0});const l=i?200:1e6,c=i?40:1e7,h={type:"inertia",velocity:n?t[r]:0,bounceStiffness:l,bounceDamping:c,timeConstant:750,restDelta:1,restSpeed:10,...s,...u};return this.startAxisValueAnimation(r,h)}));return Promise.all(u).then(r)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return Pr(this.visualElement,t),n.start(Ki(t,n,0,e,this.visualElement,!1))}stopAnimation(){Ys((t=>this.getAxisMotionValue(t).stop()))}pauseAnimation(){Ys((t=>this.getAxisMotionValue(t).animation?.pause()))}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const e=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps(),i=n[e];return i||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){Ys((e=>{const{drag:n}=this.getProps();if(!ra(e,n,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(e);if(i&&i.layout){const{min:n,max:o}=i.layout.layoutBox[e];s.set(t[e]-Nt(n,o,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!zr(e)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Ys((t=>{const e=this.getAxisMotionValue(t);if(e&&!1!==this.constraints){const n=e.get();i[t]=function(t,e){let n=.5;const i=$t(t),s=$t(e);return s>i?n=B(e.min,e.max-i,t.min):i>s&&(n=B(t.min,t.max-s,e.min)),pe(0,1,n)}({min:n,max:n},this.constraints[t])}}));const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Ys((e=>{if(!ra(e,t,null))return;const n=this.getAxisMotionValue(e),{min:s,max:o}=this.constraints[e];n.set(Nt(s,o,i[e]))}))}addListeners(){if(!this.visualElement.current)return;sa.set(this.visualElement,this);const t=Nr(this.visualElement.current,"pointerdown",(t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)})),e=()=>{const{dragConstraints:t}=this.getProps();zr(t)&&t.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,i=n.addEventListener("measure",e);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),ft.read(e);const s=So(window,"resize",(()=>this.scalePositionWithinConstraints())),o=n.addEventListener("didUpdate",(({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(Ys((e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))})),this.visualElement.render())}));return()=>{s(),t(),i(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=ea,dragMomentum:r=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:r}}}function ra(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const aa=t=>(e,n)=>{t&&ft.postRender((()=>t(e,n)))};const ua=e.createContext({});class la extends e.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:i}=this.props,{projection:s}=t;Xs(ha),s&&(e.group&&e.group.add(s),n&&n.register&&i&&n.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",(()=>{this.safeToRemove()})),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Ks.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:i,isPresent:s}=this.props,o=n.projection;return o?(o.isPresent=s,i||t.layoutDependency!==e||void 0===e||t.isPresent!==s?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||ft.postRender((()=>{const t=o.getStack();t&&t.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),xt.postRender((()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()})))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function ca(t){const[n,i]=b(),s=e.useContext(m);return d(la,{...t,layoutGroup:s,switchLayoutGroup:e.useContext(ua),isPresent:n,safeToRemove:i})}const ha={borderRadius:{...Co,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Co,borderTopRightRadius:Co,borderBottomLeftRadius:Co,borderBottomRightRadius:Co,boxShadow:Vo},da={pan:{Feature:class extends Fr{constructor(){super(...arguments),this.removePointerDownListener=L}onPointerDown(t){this.session=new Yr(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:$r(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:aa(t),onStart:aa(e),onMove:n,onEnd:(t,e)=>{delete this.session,i&&ft.postRender((()=>i(t,e)))}}}mount(){this.removePointerDownListener=Nr(this.node.current,"pointerdown",(t=>this.onPointerDown(t)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends Fr{constructor(t){super(t),this.removeGroupControls=L,this.removeListeners=L,this.controls=new oa(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||L}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Eo,MeasureLayout:ca}};function pa(t,e,n){const{props:i}=t;t.animationState&&i.whileHover&&t.animationState.setActive("whileHover","Start"===n);const s=i["onHover"+n];s&&ft.postRender((()=>s(e,Ur(e))))}function ma(t,e,n){const{props:i}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&i.whileTap&&t.animationState.setActive("whileTap","Start"===n);const s=i["onTap"+("End"===n?"":n)];s&&ft.postRender((()=>s(e,Ur(e))))}const fa=new WeakMap,ga=new WeakMap,ya=t=>{const e=fa.get(t.target);e&&e(t)},va=t=>{t.forEach(ya)};function xa(t,e,n){const i=function({root:t,...e}){const n=t||document;ga.has(n)||ga.set(n,{});const i=ga.get(n),s=JSON.stringify(e);return i[s]||(i[s]=new IntersectionObserver(va,{root:t,...e})),i[s]}(e);return fa.set(t,n),i.observe(t),()=>{fa.delete(t),i.unobserve(t)}}const wa={some:0,all:1};const Pa={inView:{Feature:class extends Fr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:i="some",once:s}=t,o={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof i?i:wa[i]};return xa(this.node.current,o,(t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,s&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),o=e?n:i;o&&o(t)}))}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends Fr{mount(){const{current:t}=this.node;t&&(this.unmount=jt(t,((t,e)=>(ma(this.node,e,"Start"),(t,{success:e})=>ma(this.node,t,e?"End":"Cancel"))),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends Fr{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=Kn(So(this.node.current,"focus",(()=>this.onFocus())),So(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends Fr{mount(){const{current:t}=this.node;t&&(this.unmount=Vt(t,((t,e)=>(pa(this.node,e,"Start"),t=>pa(this.node,t,"End")))))}unmount(){}}}},Ta={layout:{ProjectionNode:Eo,MeasureLayout:ca}},Sa=e.createContext({});function ba(t){const{initial:n,animate:i}=function(t,e){if(zo(t)){const{initial:e,animate:n}=t;return{initial:!1===e||Wo(e)?e:void 0,animate:Wo(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,e.useContext(Sa));return e.useMemo((()=>({initial:n,animate:i})),[Aa(n),Aa(i)])}function Aa(t){return Array.isArray(t)?t.join(" "):t}const Ea=Symbol.for("motionComponentSymbol");function Ma(t,n,i){return e.useCallback((e=>{e&&t.onMount&&t.onMount(e),n&&(e?n.mount(e):n.unmount()),i&&("function"==typeof i?i(e):zr(i)&&(i.current=e))}),[n])}function Ca(t,n,i,s,o){const{visualElement:r}=e.useContext(Sa),a=e.useContext(ur),u=e.useContext(v),l=e.useContext(x).reducedMotion,c=e.useRef(null);s=s||a.renderer,!c.current&&s&&(c.current=s(t,{visualState:n,parent:r,props:i,presenceContext:u,blockInitialAnimation:!!u&&!1===u.initial,reducedMotionConfig:l}));const h=c.current,d=e.useContext(ua);!h||h.projection||!o||"html"!==h.type&&"svg"!==h.type||function(t,e,n,i){const{layoutId:s,layout:o,drag:r,dragConstraints:a,layoutScroll:u,layoutRoot:l}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Va(t.parent)),t.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:Boolean(r)||a&&zr(a),visualElement:t,animationType:"string"==typeof o?o:"both",initialPromotionConfig:i,layoutScroll:u,layoutRoot:l})}(c.current,i,o,d);const p=e.useRef(!1);e.useInsertionEffect((()=>{h&&p.current&&h.update(i,u)}));const m=i[Zi],f=e.useRef(Boolean(m)&&!window.MotionHandoffIsComplete?.(m)&&window.MotionHasOptimisedAnimation?.(m));return y((()=>{h&&(p.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),xt.render(h.render),f.current&&h.animationState&&h.animationState.animateChanges())})),e.useEffect((()=>{h&&(!f.current&&h.animationState&&h.animationState.animateChanges(),f.current&&(queueMicrotask((()=>{window.MotionHandoffMarkAsComplete?.(m)})),f.current=!1))})),h}function Va(t){if(t)return!1!==t.options.allowProjection?t.projection:Va(t.parent)}function Ra({preloadedFeatures:t,createVisualElement:n,useRender:i,useVisualState:s,Component:o}){function r(t,r){let a;const u={...e.useContext(x),...t,layoutId:ka(t)},{isStatic:l}=u,c=ba(t),h=s(t,l);if(!l&&g){e.useContext(ur).strict;const t=function(t){const{drag:e,layout:n}=Lo;if(!e&&!n)return{};const i={...e,...n};return{MeasureLayout:e?.isEnabled(t)||n?.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}(u);a=t.MeasureLayout,c.visualElement=Ca(o,h,u,n,t.ProjectionNode)}return p(Sa.Provider,{value:c,children:[a&&c.visualElement?d(a,{visualElement:c.visualElement,...u}):null,i(o,t,Ma(h,c.visualElement,r),h,l,c.visualElement)]})}t&&lr(t),r.displayName=`motion.${"string"==typeof o?o:`create(${o.displayName??o.name??""})`}`;const a=e.forwardRef(r);return a[Ea]=o,a}function ka({layoutId:t}){const n=e.useContext(m).id;return n&&void 0!==t?n+"-"+t:t}const Da=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function La(t,e,n){for(const i in e)qt(e[i])||nr(i,n)||(t[i]=e[i])}function Ba(t,n){const i={};return La(i,t.style||{},t),Object.assign(i,function({transformTemplate:t},n){return e.useMemo((()=>{const e={style:{},transform:{},transformOrigin:{},vars:{}};return tr(e,n,t),Object.assign({},e.vars,e.style)}),[n])}(t,n)),i}function Oa(t,e){const n={},i=Ba(t,e);return t.drag&&!1!==t.dragListener&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=i,n}const Fa=["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 ja(t){return"string"==typeof t&&!t.includes("-")&&!!(Fa.indexOf(t)>-1||/[A-Z]/u.test(t))}const Ia={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ua={offset:"strokeDashoffset",array:"strokeDasharray"};function Wa(t,e,n){return"string"==typeof t?t:Ce.transform(e+n*t)}function Na(t,{attrX:e,attrY:n,attrScale:i,originX:s,originY:o,pathLength:r,pathSpacing:a=1,pathOffset:u=0,...l},c,h){if(tr(t,l,h),c)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:d,style:p,dimensions:m}=t;d.transform&&(m&&(p.transform=d.transform),delete d.transform),m&&(void 0!==s||void 0!==o||p.transform)&&(p.transformOrigin=function(t,e,n){return`${Wa(e,t.x,t.width)} ${Wa(n,t.y,t.height)}`}(m,void 0!==s?s:.5,void 0!==o?o:.5)),void 0!==e&&(d.x=e),void 0!==n&&(d.y=n),void 0!==i&&(d.scale=i),void 0!==r&&function(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?Ia:Ua;t[o.offset]=Ce.transform(-i);const r=Ce.transform(e),a=Ce.transform(n);t[o.array]=`${r} ${a}`}(d,r,a,u,!1)}const $a=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),za=t=>"string"==typeof t&&"svg"===t.toLowerCase();function Ha(t,n,i,s){const o=e.useMemo((()=>{const e={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Na(e,n,za(s),t.transformTemplate),{...e.attrs,style:{...e.style}}}),[n]);if(t.style){const e={};La(e,t.style,t),o.style={...e,...o.style}}return o}function Xa(t=!1){return(n,i,s,{latestValues:o},r)=>{const a=(ja(n)?Ha:Oa)(i,o,r,n),u=fr(i,"string"==typeof n,t),l=n!==e.Fragment?{...u,...a,ref:s}:{},{children:c}=i,h=e.useMemo((()=>qt(c)?c.get():c),[c]);return e.createElement(n,{...l,children:h})}}const Ya=t=>(n,i)=>{const s=e.useContext(Sa),o=e.useContext(v),r=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e,onUpdate:n},i,s,o){const r={latestValues:Ka(i,s,o,t),renderState:e()};return n&&(r.onMount=t=>n({props:i,current:t,...r}),r.onUpdate=t=>n(t)),r}(t,n,s,o);return i?r():f(r)};function Ka(t,e,n,i){const s={},o=i(t,{});for(const t in o)s[t]=ss(o[t]);let{initial:r,animate:a}=t;const u=zo(t),l=Ho(t);e&&l&&!u&&!1!==t.inherit&&(void 0===r&&(r=e.initial),void 0===a&&(a=e.animate));let c=!!n&&!1===n.initial;c=c||!1===r;const h=c?a:r;if(h&&"boolean"!=typeof h&&!Uo(h)){const e=Array.isArray(h)?h:[h];for(let n=0;n<e.length;n++){const i=Yo(t,e[n]);if(i){const{transitionEnd:t,transition:e,...n}=i;for(const t in n){let e=n[t];if(Array.isArray(e)){e=e[c?e.length-1:0]}null!==e&&(s[t]=e)}for(const e in t)s[e]=t[e]}}}return s}const Ga={useVisualState:Ya({scrapeMotionValuesFromProps:ir,createRenderState:Da})};function _a(t,e){try{e.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(t){e.dimensions={x:0,y:0,width:0,height:0}}}const qa=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Za(t,e,n,i){er(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(qa.has(n)?n:_i(n),e.attrs[n])}function Ja(t,e,n){const i=ir(t,e,n);for(const n in t)if(qt(t[n])||qt(e[n])){i[-1!==ce.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}const Qa=["x","y","width","height","cx","cy","r"],tu={useVisualState:Ya({scrapeMotionValuesFromProps:Ja,createRenderState:$a,onUpdate:({props:t,prevProps:e,current:n,renderState:i,latestValues:s})=>{if(!n)return;let o=!!t.drag;if(!o)for(const t in s)if(he.has(t)){o=!0;break}if(!o)return;let r=!e;if(e)for(let n=0;n<Qa.length;n++){const i=Qa[n];t[i]!==e[i]&&(r=!0)}r&&ft.read((()=>{_a(n,i),ft.render((()=>{Na(i,s,za(n.tagName),t.transformTemplate),Za(n,i)}))}))}})};function eu(t,e){return function(n,{forwardMotionProps:i}={forwardMotionProps:!1}){return Ra({...ja(n)?tu:Ga,preloadedFeatures:t,useRender:Xa(i),createVisualElement:e,Component:n})}}class nu extends _o{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Os,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&_a(this.current,this.renderState)}}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(he.has(e)){const t=Je(e);return t&&t.default||0}return e=qa.has(e)?e:_i(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return Ja(t,e,n)}onBindTransform(){this.current&&!this.renderState.dimensions&&ft.postRender(this.updateDimensions)}build(t,e,n){Na(t,e,this.isSVGTag,n.transformTemplate)}renderInstance(t,e,n,i){Za(t,e,0,i)}mount(t){this.isSVGTag=za(t.tagName),super.mount(t)}}const iu=(t,n)=>ja(t)?new nu(n):new sr(n,{allowProjection:t!==e.Fragment}),su=yr(eu({...Ir,...Pa,...da,...Ta},iu));function ou({children:t,as:n="ul",axis:i="y",onReorder:s,values:o,...r},a){const u=f((()=>su[n])),l=[],c=e.useRef(!1),h={axis:i,registerItem:(t,e)=>{const n=l.findIndex((e=>t===e.value));-1!==n?l[n].layout=e[i]:l.push({value:t,layout:e[i]}),l.sort(uu)},updateOrder:(t,e,n)=>{if(c.current)return;const i=function(t,e,n,i){if(!i)return t;const s=t.findIndex((t=>t.value===e));if(-1===s)return t;const o=i>0?1:-1,r=t[s+o];if(!r)return t;const a=t[s],u=r.layout,l=Nt(u.min,u.max,.5);return 1===o&&a.layout.max+n>l||-1===o&&a.layout.min+n<l?function([...t],e,n){const i=e<0?t.length+e:e;if(i>=0&&i<t.length){const i=n<0?t.length+n:n,[s]=t.splice(e,1);t.splice(i,0,s)}return t}(t,s,s+o):t}(l,t,e,n);l!==i&&(c.current=!0,s(i.map(au).filter((t=>-1!==o.indexOf(t)))))}};return e.useEffect((()=>{c.current=!1})),d(u,{...r,ref:a,ignoreStrict:!0,children:d(gr.Provider,{value:h,children:t})})}const ru=e.forwardRef(ou);function au(t){return t.value}function uu(t,e){return t.layout.min-e.layout.min}function lu(t){const n=f((()=>Wt(t))),{isStatic:i}=e.useContext(x);if(i){const[,i]=e.useState(t);e.useEffect((()=>n.on("change",i)),[])}return n}function cu(...t){const e=!Array.isArray(t[0]),n=e?0:-1,i=t[0+n],s=t[1+n],o=t[2+n],r=t[3+n],a=Ri(s,o,{mixer:(u=o[0],(t=>t&&"object"==typeof t&&t.mix)(u)?u.mix:void 0),...r});var u;return e?a(i):a}function hu(t,e){const n=lu(e()),i=()=>n.set(e());return i(),y((()=>{const e=()=>ft.preRender(i,!1,!0),n=t.map((t=>t.on("change",e)));return()=>{n.forEach((t=>t())),gt(i)}})),n}function du(t,e,n,i){if("function"==typeof t)return function(t){It.current=[],t();const e=hu(It.current,t);return It.current=void 0,e}(t);const s="function"==typeof e?e:cu(e,n,i);return Array.isArray(t)?pu(t,s):pu([t],(([t])=>s(t)))}function pu(t,e){const n=f((()=>[]));return hu(t,(()=>{n.length=0;const i=t.length;for(let e=0;e<i;e++)n[e]=t[e].get();return e(n)}))}function mu(t,e=0){return qt(t)?t:lu(e)}function fu({children:t,style:n={},value:i,as:s="li",onDrag:o,layout:r=!0,...a},u){const l=f((()=>su[s])),c=e.useContext(gr),h={x:mu(n.x),y:mu(n.y)},p=du([h.x,h.y],(([t,e])=>t||e?1:"unset")),{axis:m,registerItem:g,updateOrder:y}=c;return d(l,{drag:m,...a,dragSnapToOrigin:!0,style:{...n,x:h.x,y:h.y,zIndex:p},layout:r,onDrag:(t,e)=>{const{velocity:n}=e;n[m]&&y(i,h[m].get(),n[m]),o&&o(t,e)},onLayoutMeasure:t=>g(i,t),ref:u,ignoreStrict:!0,children:t})}const gu=e.forwardRef(fu);var yu=Object.freeze({__proto__:null,Group:ru,Item:gu});const vu=(t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t};function xu(t,e){return Mi(t)?t[vu(0,t.length,e)]:t}function wu(t){return"object"==typeof t&&!Array.isArray(t)}function Pu(t,e,n,i){return"string"==typeof t&&wu(e)?Et(t,n,i):t instanceof NodeList?Array.from(t):Array.isArray(t)?t:[t]}function Tu(t,e,n){return t*(e+1)}function Su(t,e,n,i){return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:i.get(e)??t}function bu(t,e,n,i,s,o){!function(t,e,n){for(let i=0;i<t.length;i++){const s=t[i];s.at>e&&s.at<n&&(V(t,s),i--)}}(t,s,o);for(let r=0;r<e.length;r++)t.push({value:e[r],at:Nt(s,o,i[r]),easing:xu(n,r)})}function Au(t,e){for(let n=0;n<t.length;n++)t[n]=t[n]/(e+1)}function Eu(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function Mu(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function Cu(t,e){return e[t]||(e[t]=[]),e[t]}function Vu(t){return Array.isArray(t)?t:[t]}function Ru(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const ku=t=>"number"==typeof t,Du=t=>t.every(ku);class Lu extends Go{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(function(t,e){return t in e}(e,t)){const n=t[e];if("string"==typeof n||"number"==typeof n)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}}function Bu(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Qi(t)?new nu(e):new sr(e);n.mount(t),Io.set(t,n)}function Ou(t){const e=new Lu({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});e.mount(t),Io.set(t,e)}function Fu(t,e,n,i){const s=[];if(function(t,e){return qt(t)||"number"==typeof t||"string"==typeof t&&!wu(e)}(t,e))s.push(Gi(t,wu(e)&&e.default||e,n&&n.default||n));else{const o=Pu(t,e,i),r=o.length;for(let t=0;t<r;t++){const i=o[t],a=i instanceof Element?Bu:Ou;Io.has(i)||a(i);const u=Io.get(i),l={...n};"delay"in l&&"function"==typeof l.delay&&(l.delay=l.delay(t,r)),s.push(...Sr(u,{...e,transition:l},{}))}}return s}function ju(t,e,n){const i=[],s=function(t,{defaultTransition:e={},...n}={},i,s){const o=e.duration||.3,r=new Map,a=new Map,u={},l=new Map;let c=0,h=0,d=0;for(let n=0;n<t.length;n++){const r=t[n];if("string"==typeof r){l.set(r,h);continue}if(!Array.isArray(r)){l.set(r.name,Su(h,r.at,c,l));continue}let[p,m,f={}]=r;void 0!==f.at&&(h=Su(h,f.at,c,l));let g=0;const y=(t,n,i,r=0,a=0)=>{const u=Vu(t),{delay:l=0,times:c=Di(u),type:p="keyframes",repeat:m,repeatType:f,repeatDelay:y=0,...v}=n;let{ease:x=e.ease||"easeOut",duration:w}=n;const P="function"==typeof l?l(r,a):l,T=u.length,S=st(p)?p:s?.[p];if(T<=2&&S){let t=100;if(2===T&&Du(u)){const e=u[1]-u[0];t=Math.abs(e)}const e={...v};void 0!==w&&(e.duration=F(w));const n=ct(e,t,S);x=n.ease,w=n.duration}w??(w=o);const b=h+P;1===c.length&&0===c[0]&&(c[1]=1);const A=c.length-u.length;if(A>0&&ki(c,A),1===u.length&&u.unshift(null),m){w=Tu(w,m);const t=[...u],e=[...c];x=Array.isArray(x)?[...x]:[x];const n=[...x];for(let i=0;i<m;i++){u.push(...t);for(let s=0;s<t.length;s++)c.push(e[s]+(i+1)),x.push(0===s?"linear":xu(n,s-1))}Au(c,m)}const E=b+w;bu(i,u,x,c,b,E),g=Math.max(P+w,g),d=Math.max(E,d)};if(qt(p))y(m,f,Cu("default",Mu(p,a)));else{const t=Pu(p,m,i,u),e=t.length;for(let n=0;n<e;n++){const i=Mu(t[n],a);for(const t in m)y(m[t],Ru(f,t),Cu(t,i),n,e)}}c=h,h+=g}return a.forEach(((t,i)=>{for(const s in t){const o=t[s];o.sort(Eu);const a=[],u=[],l=[];for(let t=0;t<o.length;t++){const{at:e,value:n,easing:i}=o[t];a.push(n),u.push(B(0,d,e)),l.push(i||"easeOut")}0!==u[0]&&(u.unshift(0),a.unshift(a[0]),l.unshift("easeInOut")),1!==u[u.length-1]&&(u.push(1),a.push(null)),r.has(i)||r.set(i,{keyframes:{},transition:{}});const c=r.get(i);c.keyframes[s]=a,c.transition[s]={...e,duration:d,ease:l,times:u,...n}}})),r}(t,e,n,{spring:Ti});return s.forEach((({keyframes:t,transition:e},n)=>{i.push(...Fu(n,t,e))})),i}function Iu(t){return function(e,n,i){let s=[];var o;o=e,s=Array.isArray(o)&&o.some(Array.isArray)?ju(e,n,t):Fu(e,n,i,t);const r=new N(s);return t&&t.animations.push(r),r}}const Uu=Iu();const Wu=t=>function(e,n,i){return new N(function(t,e,n,i){const s=Et(t,i),o=s.length,r=[];for(let t=0;t<o;t++){const i=s[t],a={...n};"function"==typeof a.delay&&(a.delay=a.delay(t,o));for(const t in e){const n=e[t],s={...at(a,t)};s.duration&&(s.duration=F(s.duration)),s.delay&&(s.delay=F(s.delay)),r.push(new rt({element:i,name:t,keyframes:n,transition:s,allowFlatten:!a.type&&!a.ease}))}}return r}(e,n,i,t))},Nu=Wu();function $u(t,e){let n;const i=()=>{const{currentTime:i}=e,s=(null===i?0:i.value)/100;n!==s&&t(s),n=s};return ft.update(i,!0),()=>gt(i)}const zu=new WeakMap;let Hu;function Xu({target:t,contentRect:e,borderBoxSize:n}){zu.get(t)?.forEach((i=>{i({target:t,contentSize:e,get size(){return function(t,e){if(e){const{inlineSize:t,blockSize:n}=e[0];return{width:t,height:n}}return t instanceof SVGElement&&"getBBox"in t?t.getBBox():{width:t.offsetWidth,height:t.offsetHeight}}(t,n)}})}))}function Yu(t){t.forEach(Xu)}function Ku(t,e){Hu||"undefined"!=typeof ResizeObserver&&(Hu=new ResizeObserver(Yu));const n=Et(t);return n.forEach((t=>{let n=zu.get(t);n||(n=new Set,zu.set(t,n)),n.add(e),Hu?.observe(t)})),()=>{n.forEach((t=>{const n=zu.get(t);n?.delete(e),n?.size||Hu?.unobserve(t)}))}}const Gu=new Set;let _u;function qu(t){return Gu.add(t),_u||(_u=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};Gu.forEach((t=>t(e)))},window.addEventListener("resize",_u)),()=>{Gu.delete(t),!Gu.size&&_u&&(_u=void 0)}}const Zu={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function Ju(t,e,n,i){const s=n[e],{length:o,position:r}=Zu[e],a=s.current,u=n.time;s.current=t[`scroll${r}`],s.scrollLength=t[`scroll${o}`]-t[`client${o}`],s.offset.length=0,s.offset[0]=0,s.offset[1]=s.scrollLength,s.progress=B(0,s.scrollLength,s.current);const l=i-u;s.velocity=l>50?0:I(s.current-a,l)}const Qu={start:0,center:.5,end:1};function tl(t,e,n=0){let i=0;if(t in Qu&&(t=Qu[t]),"string"==typeof t){const e=parseFloat(t);t.endsWith("px")?i=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?i=e/100*document.documentElement.clientWidth:t.endsWith("vh")?i=e/100*document.documentElement.clientHeight:t=e}return"number"==typeof t&&(i=e*t),n+i}const el=[0,0];function nl(t,e,n,i){let s=Array.isArray(t)?t:el,o=0,r=0;return"number"==typeof t?s=[t,t]:"string"==typeof t&&(s=(t=t.trim()).includes(" ")?t.split(" "):[t,Qu[t]?t:"0"]),o=tl(s[0],n,i),r=tl(s[1],e),o-r}const il={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},sl={x:0,y:0};function ol(t,e,n){const{offset:i=il.All}=n,{target:s=t,axis:o="y"}=n,r="y"===o?"height":"width",a=s!==t?function(t,e){const n={x:0,y:0};let i=t;for(;i&&i!==e;)if(i instanceof HTMLElement)n.x+=i.offsetLeft,n.y+=i.offsetTop,i=i.offsetParent;else if("svg"===i.tagName){const t=i.getBoundingClientRect();i=i.parentElement;const e=i.getBoundingClientRect();n.x+=t.left-e.left,n.y+=t.top-e.top}else{if(!(i instanceof SVGGraphicsElement))break;{const{x:t,y:e}=i.getBBox();n.x+=t,n.y+=e;let s=null,o=i.parentNode;for(;!s;)"svg"===o.tagName&&(s=o),o=i.parentNode;i=s}}return n}(s,t):sl,u=s===t?{width:t.scrollWidth,height:t.scrollHeight}:function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(s),l={width:t.clientWidth,height:t.clientHeight};e[o].offset.length=0;let c=!e[o].interpolate;const h=i.length;for(let t=0;t<h;t++){const n=nl(i[t],l[r],u[r],a[o]);c||n===e[o].interpolatorOffsets[t]||(c=!0),e[o].offset[t]=n}c&&(e[o].interpolate=Ri(e[o].offset,Di(i),{clamp:!1}),e[o].interpolatorOffsets=[...e[o].offset]),e[o].progress=pe(0,1,e[o].interpolate(e[o].current))}function rl(t,e,n,i={}){return{measure:()=>function(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let i=e;for(;i&&i!==t;)n.x.targetOffset+=i.offsetLeft,n.y.targetOffset+=i.offsetTop,i=i.offsetParent}n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight}(t,i.target,n),update:e=>{!function(t,e,n){Ju(t,"x",e,n),Ju(t,"y",e,n),e.time=n}(t,n,e),(i.offset||i.target)&&ol(t,n,i)},notify:()=>e(n)}}const al=new WeakMap,ul=new WeakMap,ll=new WeakMap,cl=t=>t===document.documentElement?window:t;function hl(t,{container:e=document.documentElement,...n}={}){let i=ll.get(e);i||(i=new Set,ll.set(e,i));const s=rl(e,t,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},n);if(i.add(s),!al.has(e)){const t=()=>{for(const t of i)t.measure()},n=()=>{for(const t of i)t.update(yt.timestamp)},s=()=>{for(const t of i)t.notify()},a=()=>{ft.read(t,!1,!0),ft.read(n,!1,!0),ft.update(s,!1,!0)};al.set(e,a);const u=cl(e);window.addEventListener("resize",a,{passive:!0}),e!==document.documentElement&&ul.set(e,(r=a,"function"==typeof(o=e)?qu(o):Ku(o,r))),u.addEventListener("scroll",a,{passive:!0})}var o,r;const a=al.get(e);return ft.read(a,!1,!0),()=>{gt(a);const t=ll.get(e);if(!t)return;if(t.delete(s),t.size)return;const n=al.get(e);al.delete(e),n&&(cl(e).removeEventListener("scroll",n),ul.get(e)?.(),window.removeEventListener("resize",n))}}const dl=new Map;function pl({source:t,container:e=document.documentElement,axis:n="y"}={}){t&&(e=t),dl.has(e)||dl.set(e,{});const i=dl.get(e);return i[n]||(i[n]=U()?new ScrollTimeline({source:e,axis:n}):function({source:t,container:e,axis:n="y"}){t&&(e=t);const i={value:0},s=hl((t=>{i.value=100*t[n].progress}),{container:e,axis:n});return{currentTime:i,cancel:s}}({source:e,axis:n})),i[n]}function ml(t){return t&&(t.target||t.offset)}function fl(t,{axis:e="y",...n}={}){const i={axis:e,...n};return"function"==typeof t?function(t,e){return function(t){return 2===t.length}(t)||ml(e)?hl((n=>{t(n[e.axis].progress,n)}),e):$u(t,pl(e))}(t,i):function(t,e){if(t.flatten(),ml(e))return t.pause(),hl((n=>{t.time=t.duration*n[e.axis].progress}),e);{const n=pl(e);return t.attachTimeline?t.attachTimeline(n,(t=>(t.pause(),$u((e=>{t.time=t.duration*e}),n)))):L}}(t,i)}const gl={some:0,all:1};function yl(t,e,{root:n,margin:i,amount:s="some"}={}){const o=Et(t),r=new WeakMap,a=new IntersectionObserver((t=>{t.forEach((t=>{const n=r.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){const n=e(t.target,t);"function"==typeof n?r.set(t.target,n):a.unobserve(t.target)}else"function"==typeof n&&(n(t),r.delete(t.target))}))}),{root:n,rootMargin:i,threshold:"number"==typeof s?s:gl[s]});return o.forEach((t=>a.observe(t))),()=>a.disconnect()}const vl=yr(eu());function xl(t){return e.useEffect((()=>()=>t()),[])}const wl={renderer:iu,...Ir,...Pa},Pl={...wl,...da,...Ta},Tl={renderer:iu,...Ir};function Sl(t,n,i){e.useInsertionEffect((()=>t.on(n,i)),[t,n,i])}function bl(t,e){Boolean(!e||e.current)}const Al=()=>({scrollX:Wt(0),scrollY:Wt(0),scrollXProgress:Wt(0),scrollYProgress:Wt(0)});function El({container:t,target:n,layoutEffect:i=!0,...s}={}){const o=f(Al);return(i?y:e.useEffect)((()=>(bl(0,n),bl(0,t),fl(((t,{x:e,y:n})=>{o.scrollX.set(e.current),o.scrollXProgress.set(e.progress),o.scrollY.set(n.current),o.scrollYProgress.set(n.progress)}),{...s,container:t?.current||void 0,target:n?.current||void 0}))),[t,n,JSON.stringify(s.offset)]),o}function Ml(t,e){return e?t+e:t}function Cl(t){return"number"==typeof t?t:parseFloat(t)}function Vl(t){const n=e.useRef(0),{isStatic:i}=e.useContext(x);e.useEffect((()=>{if(i)return;const e=({timestamp:e,delta:i})=>{n.current||(n.current=e),t(e-n.current,i)};return ft.update(e,!0),()=>gt(e)}),[t])}class Rl extends Ut{constructor(){super(...arguments),this.values=[]}add(t){const e=function(t){return he.has(t)?"transform":Ui.has(t)?_i(t):void 0}(t);e&&(C(this.values,e),this.update())}update(){this.set(this.values.length?this.values.join(", "):"auto")}}function kl(){!Oo.current&&Fo();const[t]=e.useState(Bo.current);return t}function Dl(t,e){[...e].reverse().forEach((n=>{const i=t.getVariant(n);i&&wr(t,i),t.variantChildren&&t.variantChildren.forEach((t=>{Dl(t,e)}))}))}function Ll(){const t=new Set,e={subscribe:e=>(t.add(e),()=>{t.delete(e)}),start(e,n){const i=[];return t.forEach((t=>{i.push(Er(t,e,{transitionOverride:n}))})),Promise.all(i)},set:e=>t.forEach((t=>{!function(t,e){Array.isArray(e)?Dl(t,e):"string"==typeof e?Dl(t,[e]):wr(t,e)}(t,e)})),stop(){t.forEach((t=>{!function(t){t.values.forEach((t=>t.stop()))}(t)}))},mount:()=>()=>{e.stop()}};return e}function Bl(){const t=f(Ll);return y(t.mount,[]),t}const Ol=Bl;class Fl{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,e){this.componentControls.forEach((n=>{n.start(t.nativeEvent||t,e)}))}}const jl=()=>new Fl;function Il(t){return null!==t&&"object"==typeof t&&Ea in t}function Ul(){return Wl}function Wl(t){Ao.current&&(Ao.current.isUpdating=!1,Ao.current.blockUpdate(),t&&t())}const Nl=new Map,$l=new Map,zl=(t,e)=>`${t}: ${he.has(e)?"transform":e}`;function Hl(t,e,n){const i=zl(t,e),s=Nl.get(i);if(!s)return null;const{animation:o,startTime:r}=s;function a(){window.MotionCancelOptimisedAnimation?.(t,e,n)}return o.onfinish=a,null===r||window.MotionHandoffIsComplete?.(t)?(a(),null):r}let Xl,Yl;const Kl=new Set;function Gl(){Kl.forEach((t=>{t.animation.play(),t.animation.startTime=t.startTime})),Kl.clear()}const _l=()=>({});class ql extends Go{constructor(){super(...arguments),this.measureInstanceViewportBox=Os}build(){}resetTransform(){}restoreTransform(){}removeValueFromRenderState(){}renderInstance(){}scrapeMotionValuesFromProps(){return{}}getBaseTargetFromProps(){}readValueFromInstance(t,e,n){return n.initialState[e]||0}sortInstanceNodePosition(){return 0}}const Zl=Ya({scrapeMotionValuesFromProps:_l,createRenderState:_l});let Jl=0;const Ql=t=>t>.001?1/t:1e5;t.AcceleratedAnimation=$i,t.AnimatePresence=({children:t,custom:n,initial:i=!0,onExitComplete:s,presenceAffectsLayout:o=!0,mode:r="sync",propagate:a=!1,anchorX:u="left"})=>{const[l,c]=b(a),p=e.useMemo((()=>E(t)),[t]),g=a&&!l?[]:p.map(A),v=e.useRef(!0),x=e.useRef(p),w=f((()=>new Map)),[P,S]=e.useState(p),[M,C]=e.useState(p);y((()=>{v.current=!1,x.current=p;for(let t=0;t<M.length;t++){const e=A(M[t]);g.includes(e)?w.delete(e):!0!==w.get(e)&&w.set(e,!1)}}),[M,g.length,g.join("-")]);const V=[];if(p!==P){let t=[...p];for(let e=0;e<M.length;e++){const n=M[e],i=A(n);g.includes(i)||(t.splice(e,0,n),V.push(n))}return"wait"===r&&V.length&&(t=V),C(E(t)),S(p),null}const{forceRender:R}=e.useContext(m);return d(h,{children:M.map((t=>{const e=A(t),h=!(a&&!l)&&(p===M||g.includes(e));return d(T,{isPresent:h,initial:!(v.current&&!i)&&void 0,custom:n,presenceAffectsLayout:o,mode:r,onExitComplete:h?void 0:()=>{if(!w.has(e))return;w.set(e,!0);let t=!0;w.forEach((e=>{e||(t=!1)})),t&&(R?.(),C(x.current),a&&c?.(),s&&s())},anchorX:u,children:t},e)}))})},t.AnimateSharedLayout=({children:t})=>(i.useEffect((()=>{}),[]),d(ar,{id:f((()=>"asl-"+Jl++)),children:t})),t.DeprecatedLayoutGroupContext=M,t.DragControls=Fl,t.FlatTree=es,t.LayoutGroup=ar,t.LayoutGroupContext=m,t.LazyMotion=function({children:t,features:n,strict:i=!1}){const[,s]=e.useState(!cr(n)),o=e.useRef(void 0);if(!cr(n)){const{renderer:t,...e}=n;o.current=t,lr(e)}return e.useEffect((()=>{cr(n)&&n().then((({renderer:t,...e})=>{lr(e),o.current=t,s(!0)}))}),[]),d(ur.Provider,{value:{renderer:o.current,strict:i},children:t})},t.MotionConfig=function({children:t,isValidProp:n,...i}){n&&mr(n),(i={...e.useContext(x),...i}).isStatic=f((()=>i.isStatic));const s=e.useMemo((()=>i),[JSON.stringify(i.transition),i.transformPagePoint,i.reducedMotion]);return d(x.Provider,{value:s,children:t})},t.MotionConfigContext=x,t.MotionContext=Sa,t.MotionGlobalConfig=k,t.MotionValue=Ut,t.PresenceContext=v,t.Reorder=yu,t.SwitchLayoutGroupContext=ua,t.VisualElement=Go,t.addPointerEvent=Nr,t.addPointerInfo=Wr,t.addScaleCorrector=Xs,t.animate=Uu,t.animateMini=Nu,t.animateValue=Ii,t.animateVisualElement=Er,t.animationControls=Ll,t.animations=Ir,t.anticipate=oe,t.backIn=ie,t.backInOut=se,t.backOut=ne,t.buildTransform=Qo,t.calcLength=$t,t.cancelFrame=gt,t.circIn=re,t.circInOut=ue,t.circOut=ae,t.clamp=pe,t.color=Le,t.complex=$e,t.createBox=Os,t.createRendererMotionComponent=Ra,t.createScopedAnimate=Iu,t.cubicBezier=Qt,t.delay=ns,t.disableInstantTransitions=function(){Zt.current=!1},t.distance=Hr,t.distance2D=Xr,t.domAnimation=wl,t.domMax=Pl,t.domMin=Tl,t.easeIn=bi,t.easeInOut=Ei,t.easeOut=Ai,t.filterProps=fr,t.findSpring=gi,t.frame=ft,t.frameData=yt,t.hover=Vt,t.hslaToRgba=Wn,t.inView=yl,t.inertia=Si,t.interpolate=Ri,t.invariant=R,t.isBrowser=g,t.isDragActive=At,t.isMotionComponent=Il,t.isMotionValue=qt,t.isValidMotionProp=dr,t.keyframes=Li,t.m=vl,t.makeUseVisualState=Ya,t.mirrorEasing=te,t.mix=ti,t.motion=su,t.motionValue=Wt,t.noop=L,t.optimizedAppearDataAttribute=Zi,t.pipe=Kn,t.press=jt,t.progress=B,t.px=Ce,t.resolveMotionValue=ss,t.reverseEasing=ee,t.scroll=fl,t.scrollInfo=hl,t.spring=Ti,t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:i}={}){return(s,o)=>{const r="number"==typeof n?n:function(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}(n,o),a=Math.abs(r-s);let u=t*a;if(i){const e=o*t;u=Vi(i)(u/e)*e}return e+u}},t.startOptimizedAppearAnimation=function(t,e,n,i,s){if(window.MotionIsMounted)return;const o=t.dataset[qi];if(!o)return;window.MotionHandoffAnimation=Hl;const r=zl(o,e);Yl||(Yl=it(t,e,[n[0],n[0]],{duration:1e4,ease:"linear"}),Nl.set(r,{animation:Yl,startTime:null}),window.MotionHandoffAnimation=Hl,window.MotionHasOptimisedAnimation=(t,e)=>{if(!t)return!1;if(!e)return $l.has(t);const n=zl(t,e);return Boolean(Nl.get(n))},window.MotionHandoffMarkAsComplete=t=>{$l.has(t)&&$l.set(t,!0)},window.MotionHandoffIsComplete=t=>!0===$l.get(t),window.MotionCancelOptimisedAnimation=(t,e,n,i)=>{const s=zl(t,e),o=Nl.get(s);o&&(n&&void 0===i?n.postRender((()=>{n.postRender((()=>{o.animation.cancel()}))})):o.animation.cancel(),n&&i?(Kl.add(o),n.render(Gl)):(Nl.delete(s),Nl.size||(window.MotionCancelOptimisedAnimation=void 0)))},window.MotionCheckAppearSync=(t,e,n)=>{const i=Ji(t);if(!i)return;const s=window.MotionHasOptimisedAnimation?.(i,e),o=t.props.values?.[e];if(!s||!o)return;const r=n.on("change",(t=>{o.get()!==t&&(window.MotionCancelOptimisedAnimation?.(i,e),r())}));return r});const a=()=>{Yl.cancel();const o=it(t,e,n,i);void 0===Xl&&(Xl=performance.now()),o.startTime=Xl,Nl.set(r,{animation:o,startTime:Xl}),s&&s(o)};$l.set(o,!1),Yl.ready?Yl.ready.then(a).catch(L):a()},t.steps=function(t,e="end"){return n=>{const i=(n="end"===e?Math.min(n,.999):Math.max(n,.001))*t,s="end"===e?Math.floor(i):Math.ceil(i);return pe(0,1,s/t)}},t.time=St,t.transform=cu,t.unwrapMotionComponent=function(t){if(Il(t))return t[Ea]},t.useAnimate=function(){const t=f((()=>({current:null,animations:[]}))),e=f((()=>Iu(t)));return xl((()=>{t.animations.forEach((t=>t.stop()))})),[t,e]},t.useAnimateMini=function(){const t=f((()=>({current:null,animations:[]}))),e=f((()=>Wu(t)));return xl((()=>{t.animations.forEach((t=>t.stop()))})),[t,e]},t.useAnimation=Ol,t.useAnimationControls=Bl,t.useAnimationFrame=Vl,t.useCycle=function(...t){const n=e.useRef(0),[i,s]=e.useState(t[n.current]);return[i,e.useCallback((e=>{n.current="number"!=typeof e?vu(0,t.length,n.current+1):e,s(t[n.current])}),[t.length,...t])]},t.useDeprecatedAnimatedState=function(t){const[n,i]=e.useState(t),s=Zl({},!1),o=f((()=>new ql({props:{onUpdate:t=>{i({...t})}},visualState:s,presenceContext:null},{initialState:t})));return e.useLayoutEffect((()=>(o.mount({}),()=>o.unmount())),[o]),[n,f((()=>t=>Er(o,t)))]},t.useDeprecatedInvertedScale=function(t){let n=lu(1),i=lu(1);const{visualElement:s}=e.useContext(Sa);return t?(n=t.scaleX||n,i=t.scaleY||i):s&&(n=s.getValue("scaleX",1),i=s.getValue("scaleY",1)),{scaleX:du(n,Ql),scaleY:du(i,Ql)}},t.useDomEvent=function(t,n,i,s){e.useEffect((()=>{const e=t.current;if(i&&e)return So(e,n,i,s)}),[t,n,i,s])},t.useDragControls=function(){return f(jl)},t.useElementScroll=function(t){return El({container:t})},t.useForceUpdate=or,t.useInView=function(t,{root:n,margin:i,amount:s,once:o=!1,initial:r=!1}={}){const[a,u]=e.useState(r);return e.useEffect((()=>{if(!t.current||o&&a)return;const e={root:n&&n.current||void 0,margin:i,amount:s};return yl(t.current,(()=>(u(!0),o?void 0:()=>u(!1))),e)}),[n,t,i,o,s]),a},t.useInstantLayoutTransition=Ul,t.useInstantTransition=function(){const[t,n]=or(),i=Ul(),s=e.useRef(-1);return e.useEffect((()=>{ft.postRender((()=>ft.postRender((()=>{n===s.current&&(Zt.current=!1)}))))}),[n]),e=>{i((()=>{Zt.current=!0,t(),e(),s.current=n+1}))}},t.useIsPresent=function(){return null===(t=e.useContext(v))||t.isPresent;var t},t.useIsomorphicLayoutEffect=y,t.useMotionTemplate=function(t,...e){const n=t.length;return hu(e.filter(qt),(function(){let i="";for(let s=0;s<n;s++){i+=t[s];const n=e[s];n&&(i+=qt(n)?n.get():n)}return i}))},t.useMotionValue=lu,t.useMotionValueEvent=Sl,t.usePresence=b,t.usePresenceData=function(){const t=e.useContext(v);return t?t.custom:void 0},t.useReducedMotion=kl,t.useReducedMotionConfig=function(){const t=kl(),{reducedMotion:n}=e.useContext(x);return"never"!==n&&("always"===n||t)},t.useResetProjection=function(){return e.useCallback((()=>{const t=Ao.current;t&&t.resetTree()}),[])},t.useScroll=El,t.useSpring=function(t,n={}){const{isStatic:i}=e.useContext(x),s=e.useRef(null),o=f((()=>qt(t)?t.get():t)),r=f((()=>"string"==typeof o?o.replace(/[\d.-]/g,""):void 0)),a=lu(o),u=e.useRef(o),l=e.useRef(L),c=()=>{h(),s.current=Ii({keyframes:[Cl(a.get()),Cl(u.current)],velocity:a.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:l.current})},h=()=>{s.current&&s.current.stop()};return e.useInsertionEffect((()=>a.attach(((t,e)=>i?e(t):(u.current=t,l.current=t=>e(Ml(t,r)),ft.postRender(c),a.get())),h)),[JSON.stringify(n)]),y((()=>{if(qt(t))return t.on("change",(t=>a.set(Ml(t,r))))}),[a,r]),a},t.useTime=function(){const t=lu(0);return Vl((e=>t.set(e))),t},t.useTransform=du,t.useUnmountEffect=xl,t.useVelocity=function(t){const e=lu(t.getVelocity()),n=()=>{const i=t.getVelocity();e.set(i),i&&ft.update(n)};return Sl(t,"change",(()=>{ft.update(n,!1,!0)})),e},t.useViewportScroll=function(){return El()},t.useWillChange=function(){return f((()=>new Rl("auto")))},t.visualElementStore=Io,t.wrap=vu}));