"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[507],{53316:function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var i=n(52322),o=n(2784),s=n(30251);function r(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 a=r(o);const c=o.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),l=o.createContext({}),u=o.createContext(null),h=s.isBrowser?o.useLayoutEffect:o.useEffect,d=o.createContext({strict:!1}),{schedule:m,cancel:p}=s.createRenderBatcher(queueMicrotask,!1);function f(t,e,n){return o.useCallback((i=>{i&&t.mount&&t.mount(i),e&&(i?e.mount(i):e.unmount()),n&&("function"===typeof n?n(i):s.isRefObject(n)&&(n.current=i))}),[e])}function g(t){const{initial:e,animate:n}=function(t,e){if(s.isControllingVariants(t)){const{initial:e,animate:n}=t;return{initial:!1===e||s.isVariantLabel(e)?e:void 0,animate:s.isVariantLabel(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,o.useContext(l));return o.useMemo((()=>({initial:e,animate:n})),[v(e),v(n)])}function v(t){return Array.isArray(t)?t.join(" "):t}function y(t){for(const e in t)s.featureDefinitions[e]={...s.featureDefinitions[e],...t[e]}}const x=o.createContext({}),P=o.createContext({}),S=Symbol.for("motionComponentSymbol");function T({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:r,Component:a}){t&&y(t);const p=o.forwardRef((function(p,v){let y;const x={...o.useContext(c),...p,layoutId:E(p)},{isStatic:S}=x,T=g(p),A=r(p,S);if(!S&&s.isBrowser){T.visualElement=function(t,e,n,i){const{visualElement:r}=o.useContext(l),a=o.useContext(d),p=o.useContext(u),f=o.useContext(c).reducedMotion,g=o.useRef();i=i||a.renderer,!g.current&&i&&(g.current=i(t,{visualState:e,parent:r,props:n,presenceContext:p,blockInitialAnimation:!!p&&!1===p.initial,reducedMotionConfig:f}));const v=g.current;o.useInsertionEffect((()=>{v&&v.update(n,p)}));const y=o.useRef(Boolean(n[s.optimizedAppearDataAttribute]&&!window.HandoffComplete));return h((()=>{v&&(m.postRender(v.render),y.current&&v.animationState&&v.animationState.animateChanges())})),o.useEffect((()=>{v&&(v.updateFeatures(),!y.current&&v.animationState&&v.animationState.animateChanges(),y.current&&(y.current=!1,window.HandoffComplete=!0))})),v}(a,A,x,e);const n=o.useContext(P),i=o.useContext(d).strict;T.visualElement&&(y=T.visualElement.loadFeatures(x,i,t,n))}return i.jsxs(l.Provider,{value:T,children:[y&&T.visualElement?i.jsx(y,{visualElement:T.visualElement,...x}):null,n(a,p,f(A,T.visualElement,v),A,S,T.visualElement)]})}));return p[S]=a,p}function E({layoutId:t}){const e=o.useContext(x).id;return e&&void 0!==t?e+"-"+t:t}function A(t){function e(e,n={}){return T(t(e,n))}if("undefined"===typeof Proxy)return e;const n=new Map;return new Proxy(e,{get:(t,i)=>(n.has(i)||n.set(i,e(i)),n.get(i))})}const w=["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 C(t){return"string"===typeof t&&!t.includes("-")&&!!(w.indexOf(t)>-1||/[A-Z]/u.test(t))}const b=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function D(t,e,n){for(const i in e)s.isMotionValue(e[i])||s.isForcedMotionValue(i,n)||(t[i]=e[i])}function V(t,e,n){const i={};return D(i,t.style||{},t),Object.assign(i,function({transformTemplate:t},e,n){return o.useMemo((()=>{const i={style:{},transform:{},transformOrigin:{},vars:{}};return s.buildHTMLStyles(i,e,{enableHardwareAcceleration:!n},t),Object.assign({},i.vars,i.style)}),[e])}(t,e,n)),i}function R(t,e,n){const i={},o=V(t,e,n);return t.drag&&!1!==t.dragListener&&(i.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(i.tabIndex=0),i.style=o,i}const M=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 L(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||M.has(t)}let B=t=>!L(t);function j(t){t&&(B=e=>e.startsWith("on")?!L(e):t(e))}try{j(n(86015).Z)}catch(ui){}function k(t,e,n){const i={};for(const o in t)"values"===o&&"object"===typeof t.values||(B(o)||!0===n&&L(o)||!e&&!L(o)||t.draggable&&o.startsWith("onDrag"))&&(i[o]=t[o]);return i}const I=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}});function O(t,e,n,i){const r=o.useMemo((()=>{const n={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return s.buildSVGAttrs(n,e,{enableHardwareAcceleration:!1},s.isSVGTag(i),t.transformTemplate),{...n.attrs,style:{...n.style}}}),[e]);if(t.style){const e={};D(e,t.style,t),r.style={...e,...r.style}}return r}function F(t=!1){return(e,n,i,{latestValues:r},a)=>{const c=(C(e)?O:R)(n,r,a,e),l=k(n,"string"===typeof e,t),u=e!==o.Fragment?{...l,...c,ref:i}:{},{children:h}=n,d=o.useMemo((()=>s.isMotionValue(h)?h.get():h),[h]);return o.createElement(e,{...u,children:d})}}function U(t){const e=o.useRef(null);return null===e.current&&(e.current=t()),e.current}function N(t){const e=s.isMotionValue(t)?t.get():t;return s.isCustomValue(e)?e.toValue():e}const z=t=>(e,n)=>{const i=o.useContext(l),s=o.useContext(u),r=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},i,o,s){const r={latestValues:H(i,o,s,t),renderState:e()};return n&&(r.mount=t=>n(i,t,r)),r}(t,e,i,s);return n?r():U(r)};function H(t,e,n,i){const o={},r=i(t,{});for(const s in r)o[s]=N(r[s]);let{initial:a,animate:c}=t;const l=s.isControllingVariants(t),u=s.isVariantNode(t);e&&u&&!l&&!1!==t.inherit&&(void 0===a&&(a=e.initial),void 0===c&&(c=e.animate));let h=!!n&&!1===n.initial;h=h||!1===a;const d=h?c:a;if(d&&"boolean"!==typeof d&&!s.isAnimationControls(d)){(Array.isArray(d)?d:[d]).forEach((e=>{const n=s.resolveVariantFromProps(t,e);if(!n)return;const{transitionEnd:i,transition:r,...a}=n;for(const t in a){let e=a[t];if(Array.isArray(e)){e=e[h?e.length-1:0]}null!==e&&(o[t]=e)}for(const t in i)o[t]=i[t]}))}return o}const G={useVisualState:z({scrapeMotionValuesFromProps:s.scrapeMotionValuesFromProps,createRenderState:I,onMount:(t,e,{renderState:n,latestValues:i})=>{s.frame.read((()=>{try{n.dimensions="function"===typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(t){n.dimensions={x:0,y:0,width:0,height:0}}})),s.frame.render((()=>{s.buildSVGAttrs(n,i,{enableHardwareAcceleration:!1},s.isSVGTag(e.tagName),t.transformTemplate),s.renderSVG(e,n)}))}})},W={useVisualState:z({scrapeMotionValuesFromProps:s.scrapeMotionValuesFromProps$1,createRenderState:b})};function $(t,{forwardMotionProps:e=!1},n,i){return{...C(t)?G:W,preloadedFeatures:n,useRender:F(e),createVisualElement:i,Component:t}}function Y(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}const X=t=>"mouse"===t.pointerType?"number"!==typeof t.button||t.button<=0:!1!==t.isPrimary;function _(t,e="page"){return{point:{x:t[`${e}X`],y:t[`${e}Y`]}}}const K=t=>e=>X(e)&&t(e,_(e));function q(t,e,n,i){return Y(t,e,K(n),i)}function J(t){let e=null;return()=>{const n=()=>{e=null};return null===e&&(e=t,n)}}const Z=J("dragHorizontal"),Q=J("dragVertical");function tt(t){let e=!1;if("y"===t)e=Q();else if("x"===t)e=Z();else{const t=Z(),n=Q();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}function et(){const t=tt(!0);return!t||(t(),!1)}class nt{constructor(t){this.isMounted=!1,this.node=t}update(){}}function it(t,e){const n=e?"pointerenter":"pointerleave",i=e?"onHoverStart":"onHoverEnd";return q(t.current,n,((n,o)=>{if("touch"===n.pointerType||et())return;const s=t.getProps();t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",e);const r=s[i];r&&r(n,o)}),{passive:!t.getProps()[i]})}const ot=(t,e)=>!!e&&(t===e||ot(t,e.parentElement));function st(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,_(n))}const rt=new WeakMap,at=new WeakMap,ct=t=>{const e=rt.get(t.target);e&&e(t)},lt=t=>{t.forEach(ct)};function ut(t,e,n){const i=function({root:t,...e}){const n=t||document;at.has(n)||at.set(n,{});const i=at.get(n),o=JSON.stringify(e);return i[o]||(i[o]=new IntersectionObserver(lt,{root:t,...e})),i[o]}(e);return rt.set(t,n),i.observe(t),()=>{rt.delete(t),i.unobserve(t)}}const ht={some:0,all:1};const dt={inView:{Feature:class extends nt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:i="some",once:o}=t,s={root:e?e.current:void 0,rootMargin:n,threshold:"number"===typeof i?i:ht[i]};return ut(this.node.current,s,(t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,o&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),s=e?n:i;s&&s(t)}))}mount(){this.startObserver()}update(){if("undefined"===typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends nt{constructor(){super(...arguments),this.removeStartListeners=s.noop,this.removeEndListeners=s.noop,this.removeAccessibleListeners=s.noop,this.startPointerPress=(t,e)=>{if(this.isPressing)return;this.removeEndListeners();const n=this.node.getProps(),i=q(window,"pointerup",((t,e)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:i,globalTapTarget:o}=this.node.getProps();o||ot(this.node.current,t.target)?n&&n(t,e):i&&i(t,e)}),{passive:!(n.onTap||n.onPointerUp)}),o=q(window,"pointercancel",((t,e)=>this.cancelPress(t,e)),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=s.pipe(i,o),this.startPress(t,e)},this.startAccessiblePress=()=>{const t=Y(this.node.current,"keydown",(t=>{if("Enter"!==t.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=Y(this.node.current,"keyup",(t=>{"Enter"===t.key&&this.checkPressEnd()&&st("up",((t,e)=>{const{onTap:n}=this.node.getProps();n&&n(t,e)}))})),st("down",((t,e)=>{this.startPress(t,e)}))})),e=Y(this.node.current,"blur",(()=>{this.isPressing&&st("cancel",((t,e)=>this.cancelPress(t,e)))}));this.removeAccessibleListeners=s.pipe(t,e)}}startPress(t,e){this.isPressing=!0;const{onTapStart:n,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&n(t,e)}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!et()}cancelPress(t,e){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&n(t,e)}mount(){const t=this.node.getProps(),e=q(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),n=Y(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=s.pipe(e,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends nt{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=s.pipe(Y(this.node.current,"focus",(()=>this.onFocus())),Y(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends nt{mount(){this.unmount=s.pipe(it(this.node,!0),it(this.node,!1))}unmount(){}}}};function mt(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;iPromise.all(s.animateTarget(t,o,n)):()=>Promise.resolve(),c=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:o=0,staggerChildren:s,staggerDirection:a}=r;return function(t,e,n=0,i=0,o=1,s){const r=[],a=(t.variantChildren.size-1)*i,c=1===o?(t=0)=>t*i:(t=0)=>a-t*i;return Array.from(t.variantChildren).sort(ft).forEach(((t,i)=>{t.notify("AnimationStart",e),r.push(pt(t,e,{...s,delay:n+c(i)}).then((()=>t.notify("AnimationComplete",e))))})),Promise.all(r)}(t,e,o+i,s,a,n)}:()=>Promise.resolve(),{when:l}=r;if(l){const[t,e]="beforeChildren"===l?[a,c]:[c,a];return t().then((()=>e()))}return Promise.all([a(),c(n.delay)])}function ft(t,e){return t.sortNodePosition(e)}function gt(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const o=e.map((e=>pt(t,e,n)));i=Promise.all(o)}else if("string"===typeof e)i=pt(t,e,n);else{const o="function"===typeof e?s.resolveVariant(t,e,n.custom):e;i=Promise.all(s.animateTarget(t,o,n))}return i.then((()=>{s.frame.postRender((()=>{t.notify("AnimationComplete",e)}))}))}const vt=[...s.variantPriorityOrder].reverse(),yt=s.variantPriorityOrder.length;function xt(t){let e=function(t){return e=>Promise.all(e.map((({animation:e,options:n})=>gt(t,e,n))))}(t);const n={animate:St(!0),whileInView:St(),whileHover:St(),whileTap:St(),whileDrag:St(),whileFocus:St(),exit:St()};let i=!0;const o=e=>(n,i)=>{var o;const r=s.resolveVariant(t,i,"exit"===e?null===(o=t.presenceContext)||void 0===o?void 0:o.custom:void 0);if(r){const{transition:t,transitionEnd:e,...i}=r;n={...n,...i,...e}}return n};function r(r){const a=t.getProps(),c=t.getVariantContext(!0)||{},l=[],u=new Set;let h={},d=1/0;for(let e=0;ed&&g,P=!1;const S=Array.isArray(f)?f:[f];let T=S.reduce(o(m),{});!1===v&&(T={});const{prevResolvedValues:E={}}=p,A={...E,...T},w=e=>{x=!0,u.has(e)&&(P=!0,u.delete(e)),p.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in A){const e=T[t],n=E[t];if(h.hasOwnProperty(t))continue;let i=!1;i=s.isKeyframesTarget(e)&&s.isKeyframesTarget(n)?!mt(e,n):e!==n,i?void 0!==e&&null!==e?w(t):u.add(t):void 0!==e&&u.has(t)?w(t):p.protectedKeys[t]=!0}p.prevProp=f,p.prevResolvedValues=T,p.isActive&&(h={...h,...T}),i&&t.blockInitialAnimation&&(x=!1),!x||y&&!P||l.push(...S.map((t=>({animation:t,options:{type:m}}))))}if(u.size){const e={};u.forEach((n=>{const i=t.getBaseTarget(n),o=t.getValue(n);o&&(o.liveStyle=!0),e[n]=null!==i&&void 0!==i?i:null})),l.push({animation:e})}let m=Boolean(l.length);return!i||!1!==a.initial&&a.initial!==a.animate||t.manuallyAnimateOnMount||(m=!1),i=!1,m?e(l):Promise.resolve()}return{animateChanges:r,setActive:function(e,i){var o;if(n[e].isActive===i)return Promise.resolve();null===(o=t.variantChildren)||void 0===o||o.forEach((t=>{var n;return null===(n=t.animationState)||void 0===n?void 0:n.setActive(e,i)})),n[e].isActive=i;const s=r(e);for(const t in n)n[t].protectedKeys={};return s},setAnimateFunction:function(n){e=n(t)},getState:()=>n}}function Pt(t,e){return"string"===typeof e?e!==t:!!Array.isArray(e)&&!mt(e,t)}function St(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}let Tt=0;const Et={animation:{Feature:class extends nt{constructor(t){super(t),t.animationState||(t.animationState=xt(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),s.isAnimationControls(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){}}},exit:{Feature:class extends nt{constructor(){super(...arguments),this.id=Tt++}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}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}}};class At{constructor(t,e,{transformPagePoint:n,contextWindow:i,dragSnapToOrigin:o=!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=bt(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=s.distance2D(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:i}=t,{timestamp:o}=s.frameData;this.history.push({...i,timestamp:o});const{onStart:r,onMove:a}=this.handlers;e||(r&&r(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=wt(e,this.transformPagePoint),s.frame.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:n,onSessionEnd:i,resumeAnimation:o}=this.handlers;if(this.dragSnapToOrigin&&o&&o(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const s=bt("pointercancel"===t.type?this.lastMoveEventInfo:wt(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,s),i&&i(t,s)},!X(t))return;this.dragSnapToOrigin=o,this.handlers=e,this.transformPagePoint=n,this.contextWindow=i||window;const r=wt(_(t),this.transformPagePoint),{point:a}=r,{timestamp:c}=s.frameData;this.history=[{...a,timestamp:c}];const{onSessionStart:l}=e;l&&l(t,bt(r,this.history)),this.removeListeners=s.pipe(q(this.contextWindow,"pointermove",this.handlePointerMove),q(this.contextWindow,"pointerup",this.handlePointerUp),q(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),s.cancelFrame(this.updatePoint)}}function wt(t,e){return e?{point:e(t.point)}:t}function Ct(t,e){return{x:t.x-e.x,y:t.y-e.y}}function bt({point:t},e){return{point:t,delta:Ct(t,Vt(e)),offset:Ct(t,Dt(e)),velocity:Rt(e,.1)}}function Dt(t){return t[0]}function Vt(t){return t[t.length-1]}function Rt(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const o=Vt(t);for(;n>=0&&(i=t[n],!(o.timestamp-i.timestamp>s.secondsToMilliseconds(e)));)n--;if(!i)return{x:0,y:0};const r=s.millisecondsToSeconds(o.timestamp-i.timestamp);if(0===r)return{x:0,y:0};const a={x:(o.x-i.x)/r,y:(o.y-i.y)/r};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Mt(t){return t.max-t.min}function Lt(t,e=0,n=.01){return Math.abs(t-e)<=n}function Bt(t,e,n,i=.5){t.origin=i,t.originPoint=s.mixNumber(e.min,e.max,t.origin),t.scale=Mt(n)/Mt(e),(Lt(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=s.mixNumber(n.min,n.max,t.origin)-t.originPoint,(Lt(t.translate)||isNaN(t.translate))&&(t.translate=0)}function jt(t,e,n,i){Bt(t.x,e.x,n.x,i?i.originX:void 0),Bt(t.y,e.y,n.y,i?i.originY:void 0)}function kt(t,e,n){t.min=n.min+e.min,t.max=t.min+Mt(e)}function It(t,e,n){t.min=e.min-n.min,t.max=t.min+Mt(e)}function Ot(t,e,n){It(t.x,e.x,n.x),It(t.y,e.y,n.y)}function Ft(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 Ut(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.mint?t.ownerDocument.defaultView:null,$t=new WeakMap;class Yt{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=s.createBox(),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 At(t,{onSessionStart:t=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(_(t,"page").point)},onStart:(t,e)=>{const{drag:n,dragPropagation:i,onDragStart:o}=this.getProps();if(n&&!i&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=tt(n),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Gt((t=>{let e=this.getAxisMotionValue(t).get()||0;if(s.percent.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const i=n.layout.layoutBox[t];if(i){e=Mt(i)*(parseFloat(e)/100)}}}this.originPoint[t]=e})),o&&o(t,e);const{animationState:r}=this.visualElement;r&&r.setActive("whileDrag",!0)},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:o,onDrag:s}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:r}=e;if(i&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(r),void(null!==this.currentDirection&&o&&o(this.currentDirection));this.updateAxis("x",e.point,r),this.updateAxis("y",e.point,r),this.visualElement.render(),s&&s(t,e)},onSessionEnd:(t,e)=>this.stop(t,e),resumeAnimation:()=>Gt((t=>{var e;return"paused"===this.getAnimationState(t)&&(null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.play())}))},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:i,contextWindow:Wt(this.visualElement)})}stop(t,e){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:i}=e;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&o(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.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,n){const{drag:i}=this.getProps();if(!n||!Xt(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let r=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(r=function(t,{min:e,max:n},i){return void 0!==e&&tn&&(t=i?s.mixNumber(n,t,i.max):Math.min(t,n)),t}(r,this.constraints[t],this.elastic[t])),o.set(r)}resolveConstraints(){var t;const{dragConstraints:e,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(t=this.visualElement.projection)||void 0===t?void 0:t.layout,o=this.constraints;e&&s.isRefObject(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!i)&&function(t,{top:e,left:n,bottom:i,right:o}){return{x:Ft(t.x,n,o),y:Ft(t.y,e,i)}}(i.layoutBox,e),this.elastic=function(t=Nt){return!1===t?t=0:!0===t&&(t=Nt),{x:zt(t,"left","right"),y:zt(t,"top","bottom")}}(n),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Gt((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}(i.layoutBox[t],this.constraints[t]))}))}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!s.isRefObject(t))return!1;const n=t.current;s.invariant(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=s.measurePageBox(n,i.root,this.visualElement.getTransformPagePoint());let r=function(t,e){return{x:Ut(t.x,e.x),y:Ut(t.y,e.y)}}(i.layout.layoutBox,o);if(e){const t=e(s.convertBoxToBoundingBox(r));this.hasMutatedConstraints=!!t,t&&(r=s.convertBoundingBoxToBox(t))}return r}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:i,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},c=Gt((r=>{if(!Xt(r,e,this.currentDirection))return;let c=a&&a[r]||{};s&&(c={min:0,max:0});const l=i?200:1e6,u=i?40:1e7,h={type:"inertia",velocity:n?t[r]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...o,...c};return this.startAxisValueAnimation(r,h)}));return Promise.all(c).then(r)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return n.start(s.animateMotionValue(t,n,0,e,this.visualElement))}stopAnimation(){Gt((t=>this.getAxisMotionValue(t).stop()))}pauseAnimation(){Gt((t=>{var e;return null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.pause()}))}getAnimationState(t){var e;return null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.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){Gt((e=>{const{drag:n}=this.getProps();if(!Xt(e,n,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(e);if(i&&i.layout){const{min:n,max:r}=i.layout.layoutBox[e];o.set(t[e]-s.mixNumber(n,r,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!s.isRefObject(e)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Gt((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=Mt(t),o=Mt(e);return o>i?n=s.progress(e.min,e.max-i,t.min):i>o&&(n=s.progress(t.min,t.max-o,e.min)),s.clamp(0,1,n)}({min:n,max:n},this.constraints[t])}}));const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Gt((e=>{if(!Xt(e,t,null))return;const n=this.getAxisMotionValue(e),{min:o,max:r}=this.constraints[e];n.set(s.mixNumber(o,r,i[e]))}))}addListeners(){if(!this.visualElement.current)return;$t.set(this.visualElement,this);const t=q(this.visualElement.current,"pointerdown",(t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)})),e=()=>{const{dragConstraints:t}=this.getProps();s.isRefObject(t)&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,i=n.addEventListener("measure",e);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),e();const o=Y(window,"resize",(()=>this.scalePositionWithinConstraints())),r=n.addEventListener("didUpdate",(({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(Gt((e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))})),this.visualElement.render())}));return()=>{o(),t(),i(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:s=Nt,dragMomentum:r=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:i,dragConstraints:o,dragElastic:s,dragMomentum:r}}}function Xt(t,e,n){return(!0===e||e===t)&&(null===n||n===t)}const _t=t=>(e,n)=>{t&&t(e,n)};const Kt=["TopLeft","TopRight","BottomLeft","BottomRight"],qt=Kt.length,Jt=t=>"string"===typeof t?parseFloat(t):t,Zt=t=>"number"===typeof t||s.px.test(t);function Qt(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const te=ne(0,.5,s.circOut),ee=ne(.5,.95,s.noop);function ne(t,e,n){return i=>ie?1:n(s.progress(t,e,i))}function ie(t,e){t.min=e.min,t.max=e.max}function oe(t,e){ie(t.x,e.x),ie(t.y,e.y)}function se(t,e,n,i,o){return t-=e,t=s.scalePoint(t,1/n,i),void 0!==o&&(t=s.scalePoint(t,1/o,i)),t}function re(t,e,[n,i,o],r,a){!function(t,e=0,n=1,i=.5,o,r=t,a=t){s.percent.test(e)&&(e=parseFloat(e),e=s.mixNumber(a.min,a.max,e/100)-a.min);if("number"!==typeof e)return;let c=s.mixNumber(r.min,r.max,i);t===r&&(c-=e),t.min=se(t.min,e,n,c,o),t.max=se(t.max,e,n,c,o)}(t,e[n],e[i],e[o],e.scale,r,a)}const ae=["x","scaleX","originX"],ce=["y","scaleY","originY"];function le(t,e,n,i){re(t.x,e,ae,n?n.x:void 0,i?i.x:void 0),re(t.y,e,ce,n?n.y:void 0,i?i.y:void 0)}function ue(t){return 0===t.translate&&1===t.scale}function he(t){return ue(t.x)&&ue(t.y)}function de(t,e){return Math.round(t.x.min)===Math.round(e.x.min)&&Math.round(t.x.max)===Math.round(e.x.max)&&Math.round(t.y.min)===Math.round(e.y.min)&&Math.round(t.y.max)===Math.round(e.y.max)}function me(t){return Mt(t.x)/Mt(t.y)}class pe{constructor(){this.members=[]}add(t){s.addUniqueItem(this.members,t),t.scheduleRender()}remove(t){if(s.removeItem(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 i=e;i>=0;i--){const t=this.members[i];if(!1!==t.isPresent){n=t;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)}}function fe(t,e,n){let i="";const o=t.x.translate/e.x,s=t.y.translate/e.y,r=(null===n||void 0===n?void 0:n.z)||0;if((o||s||r)&&(i=`translate3d(${o}px, ${s}px, ${r}px) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t,rotate:e,rotateX:o,rotateY:s,skewX:r,skewY:a}=n;t&&(i=`perspective(${t}px) ${i}`),e&&(i+=`rotate(${e}deg) `),o&&(i+=`rotateX(${o}deg) `),s&&(i+=`rotateY(${s}deg) `),r&&(i+=`skewX(${r}deg) `),a&&(i+=`skewY(${a}deg) `)}const a=t.x.scale*e.x,c=t.y.scale*e.y;return 1===a&&1===c||(i+=`scale(${a}, ${c})`),i||"none"}const ge=(t,e)=>t.depth-e.depth;class ve{constructor(){this.children=[],this.isDirty=!1}add(t){s.addUniqueItem(this.children,t),this.isDirty=!0}remove(t){s.removeItem(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(ge),this.isDirty=!1,this.children.forEach(t)}}const ye={hasAnimatedSinceResize:!0,hasEverUpdated:!1};const xe=["","X","Y","Z"],Pe={visibility:"hidden"};let Se=0;const Te={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function Ee(t,e,n,i){const{latestValues:o}=e;o[t]&&(n[t]=o[t],e.setStaticValue(t,0),i&&(i[t]=0))}function Ae({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:o}){return class{constructor(t={},n=(null===e||void 0===e?void 0:e())){this.id=Se++,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.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{var t;this.projectionUpdateScheduled=!1,Te.totalNodes=Te.resolvedTargetDeltas=Te.recalculatedProjection=0,this.nodes.forEach(be),this.nodes.forEach(je),this.nodes.forEach(ke),this.nodes.forEach(De),t=Te,window.MotionDebug&&window.MotionDebug.record(t)},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 e=0;ethis.root.updateBlockedByResize=!1;t(e,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=s.delay(i,250),ye.hasAnimatedSinceResize&&(ye.hasAnimatedSinceResize=!1,this.nodes.forEach(Be))}))}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&r&&(i||o)&&this.addEventListener("didUpdate",(({delta:t,hasLayoutChanged:e,hasRelativeTargetChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||r.getDefaultTransition()||ze,{onLayoutAnimationStart:a,onLayoutAnimationComplete:c}=r.getProps(),l=!this.targetLayout||!de(this.targetLayout,i)||n,u=!e&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||u||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(t,u);const e={...s.getValueTransition(o,"layout"),onPlay:a,onComplete:c};(r.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e)}else e||Be(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,s.cancelFrame(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(Ie),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(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let o=0;othis.update())))}clearAllSnapshots(){this.nodes.forEach(Ve),this.sharedNodes.forEach(Oe)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,s.frame.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){s.frame.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),(!this.options.alwaysMeasureLayout||!this.isLead())&&!this.isLayoutDirty)return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let n=0;n{const n=e/1e3;var l,m,p,f,g,v;Fe(r.x,t.x,n),Fe(r.y,t.y,n),this.setTargetDelta(r),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ot(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox),p=this.relativeTarget,f=this.relativeTargetOrigin,g=a,v=n,Ue(p.x,f.x,g.x,v),Ue(p.y,f.y,g.y,v),d&&(l=this.relativeTarget,m=d,l.x.min===m.x.min&&l.x.max===m.x.max&&l.y.min===m.y.min&&l.y.max===m.y.max)&&(this.isProjectionDirty=!1),d||(d=s.createBox()),oe(d,this.relativeTarget)),c&&(this.animationValues=o,function(t,e,n,i,o,r){o?(t.opacity=s.mixNumber(0,void 0!==n.opacity?n.opacity:1,te(i)),t.opacityExit=s.mixNumber(void 0!==e.opacity?e.opacity:1,0,ee(i))):r&&(t.opacity=s.mixNumber(void 0!==e.opacity?e.opacity:1,void 0!==n.opacity?n.opacity:1,i));for(let a=0;a{ye.hasAnimatedSinceResize=!0,this.currentAnimation=s.animateSingleValue(0,1e3,{...t,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},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:o}=t;if(e&&n&&i){if(this!==t&&this.layout&&i&&$e(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||s.createBox();const e=Mt(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=Mt(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}oe(e,n),s.transformBox(e,o),jt(this.projectionDeltaWithTransform,this.layoutCorrected,e,o)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new pe);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(){var t;const{layoutId:e}=this.options;return e&&(null===(t=this.getStack())||void 0===t?void 0:t.lead)||this}getPrevLead(){var t;const{layoutId:e}=this.options;return e?null===(t=this.getStack())||void 0===t?void 0:t.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&&Ee("z",t,i,this.animationValues);for(let o=0;o{var e;return null===(e=t.currentAnimation)||void 0===e?void 0:e.stop()})),this.root.nodes.forEach(Re),this.root.sharedNodes.clear()}}}function we(t){t.updateLayout()}function Ce(t){var e;const n=(null===(e=t.resumeFrom)||void 0===e?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:e,measuredBox:i}=t.layout,{animationType:o}=t.options,r=n.source!==t.layout.source;"size"===o?Gt((t=>{const i=r?n.measuredBox[t]:n.layoutBox[t],o=Mt(i);i.min=e[t].min,i.max=i.min+o})):$e(o,n.layoutBox,e)&&Gt((i=>{const o=r?n.measuredBox[i]:n.layoutBox[i],s=Mt(e[i]);o.max=o.min+s,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[i].max=t.relativeTarget[i].min+s)}));const a=s.createDelta();jt(a,e,n.layoutBox);const c=s.createDelta();r?jt(c,t.applyTransform(i,!0),n.measuredBox):jt(c,e,n.layoutBox);const l=!he(a);let u=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:o,layout:r}=i;if(o&&r){const a=s.createBox();Ot(a,n.layoutBox,o.layoutBox);const c=s.createBox();Ot(c,e,r.layoutBox),de(a,c)||(u=!0),i.options.layoutRoot&&(t.relativeTarget=c,t.relativeTargetOrigin=a,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:e,snapshot:n,delta:c,layoutDelta:a,hasLayoutChanged:l,hasRelativeTargetChanged:u})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function be(t){Te.totalNodes++,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 De(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Ve(t){t.clearSnapshot()}function Re(t){t.clearMeasurements()}function Me(t){t.isLayoutDirty=!1}function Le(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Be(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function je(t){t.resolveTargetDelta()}function ke(t){t.calcProjection()}function Ie(t){t.resetSkewAndRotation()}function Oe(t){t.removeLeadSnapshot()}function Fe(t,e,n){t.translate=s.mixNumber(e.translate,0,n),t.scale=s.mixNumber(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Ue(t,e,n,i){t.min=s.mixNumber(e.min,n.min,i),t.max=s.mixNumber(e.max,n.max,i)}function Ne(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const ze={duration:.45,ease:[.4,0,.1,1]},He=t=>"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Ge=He("applewebkit/")&&!He("chrome/")?Math.round:s.noop;function We(t){t.min=Ge(t.min),t.max=Ge(t.max)}function $e(t,e,n){return"position"===t||"preserve-aspect"===t&&!Lt(me(e),me(n),.2)}const Ye=Ae({attachResizeListener:(t,e)=>Y(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Xe={current:void 0},_e=Ae({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Xe.current){const t=new Ye({});t.mount(window),t.setOptions({layoutScroll:!0}),Xe.current=t}return Xe.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),Ke=t=>!t.isLayoutDirty&&t.willUpdate(!1);function qe(){const t=new Set,e=new WeakMap,n=()=>t.forEach(Ke);return{add:i=>{t.add(i),e.set(i,i.addEventListener("willUpdate",n))},remove:i=>{t.delete(i);const o=e.get(i);o&&(o(),e.delete(i)),n()},dirty:n}}function Je(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Ze={correct:(t,e)=>{if(!e.target)return t;if("string"===typeof t){if(!s.px.test(t))return t;t=parseFloat(t)}return`${Je(t,e.target.x)}% ${Je(t,e.target.y)}%`}},Qe={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,o=s.complex.parse(t);if(o.length>5)return i;const r=s.complex.createTransformer(t),a="number"!==typeof o[0]?1:0,c=n.x.scale*e.x,l=n.y.scale*e.y;o[0+a]/=c,o[1+a]/=l;const u=s.mixNumber(c,l,.5);return"number"===typeof o[2+a]&&(o[2+a]/=u),"number"===typeof o[3+a]&&(o[3+a]/=u),r(o)}};function tn(){const t=o.useContext(u);if(null===t)return[!0,null];const{isPresent:e,onExitComplete:n,register:i}=t,s=o.useId();o.useEffect((()=>i(s)),[]);return!e&&n?[!1,()=>n&&n(s)]:[!0]}class en extends o.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:i}=this.props,{projection:o}=t;s.addScaleCorrector(on),o&&(e.group&&e.group.add(o),n&&n.register&&i&&n.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",(()=>{this.safeToRemove()})),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),ye.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:i,isPresent:o}=this.props,r=n.projection;return r?(r.isPresent=o,i||t.layoutDependency!==e||void 0===e?r.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?r.promote():r.relegate()||s.frame.postRender((()=>{const t=r.getStack();t&&t.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),m.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 nn(t){const[e,n]=tn(),s=o.useContext(x);return i.jsx(en,{...t,layoutGroup:s,switchLayoutGroup:o.useContext(P),isPresent:e,safeToRemove:n})}const on={borderRadius:{...Ze,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ze,borderTopRightRadius:Ze,borderBottomLeftRadius:Ze,borderBottomRightRadius:Ze,boxShadow:Qe},sn={pan:{Feature:class extends nt{constructor(){super(...arguments),this.removePointerDownListener=s.noop}onPointerDown(t){this.session=new At(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Wt(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:_t(t),onStart:_t(e),onMove:n,onEnd:(t,e)=>{delete this.session,i&&i(t,e)}}}mount(){this.removePointerDownListener=q(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 nt{constructor(t){super(t),this.removeGroupControls=s.noop,this.removeListeners=s.noop,this.controls=new Yt(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||s.noop}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:_e,MeasureLayout:nn}},rn=(t,e)=>C(t)?new s.SVGVisualElement(e,{enableHardwareAcceleration:!1}):new s.HTMLVisualElement(e,{allowProjection:t!==o.Fragment,enableHardwareAcceleration:!0}),an={layout:{ProjectionNode:_e,MeasureLayout:nn}},cn={...Et,...dt,...sn,...an},ln=A(((t,e)=>$(t,e,cn,rn)));const un=A($);function hn(){const t=o.useRef(!1);return h((()=>(t.current=!0,()=>{t.current=!1})),[]),t}function dn(){const t=hn(),[e,n]=o.useState(0),i=o.useCallback((()=>{t.current&&n(e+1)}),[e]);return[o.useCallback((()=>s.frame.postRender(i)),[i]),e]}class mn extends a.Component{getSnapshotBeforeUpdate(t){const e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent){const t=this.props.sizeRef.current;t.height=e.offsetHeight||0,t.width=e.offsetWidth||0,t.top=e.offsetTop,t.left=e.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function pn({children:t,isPresent:e}){const n=o.useId(),s=o.useRef(null),r=o.useRef({width:0,height:0,top:0,left:0}),{nonce:l}=o.useContext(c);return o.useInsertionEffect((()=>{const{width:t,height:i,top:o,left:a}=r.current;if(e||!s.current||!t||!i)return;s.current.dataset.motionPopId=n;const c=document.createElement("style");return l&&(c.nonce=l),document.head.appendChild(c),c.sheet&&c.sheet.insertRule(`\n [data-motion-pop-id="${n}"] {\n position: absolute !important;\n width: ${t}px !important;\n height: ${i}px !important;\n top: ${o}px !important;\n left: ${a}px !important;\n }\n `),()=>{document.head.removeChild(c)}}),[e]),i.jsx(mn,{isPresent:e,childRef:s,sizeRef:r,children:a.cloneElement(t,{ref:s})})}const fn=({children:t,initial:e,isPresent:n,onExitComplete:s,custom:r,presenceAffectsLayout:c,mode:l})=>{const h=U(gn),d=o.useId(),m=o.useMemo((()=>({id:d,initial:e,isPresent:n,custom:r,onExitComplete:t=>{h.set(t,!0);for(const e of h.values())if(!e)return;s&&s()},register:t=>(h.set(t,!1),()=>h.delete(t))})),c?[Math.random()]:[n]);return o.useMemo((()=>{h.forEach(((t,e)=>h.set(e,!1)))}),[n]),a.useEffect((()=>{!n&&!h.size&&s&&s()}),[n]),"popLayout"===l&&(t=i.jsx(pn,{isPresent:n,children:t})),i.jsx(u.Provider,{value:m,children:t})};function gn(){return new Map}function vn(t){return o.useEffect((()=>()=>t()),[])}const yn=t=>t.key||"";function xn(t){return"function"===typeof t}const Pn=o.createContext(null),Sn=t=>!0===t,Tn=({children:t,id:e,inherit:n=!0})=>{const s=o.useContext(x),r=o.useContext(Pn),[a,c]=dn(),l=o.useRef(null),u=s.id||r;null===l.current&&((t=>Sn(!0===t)||"id"===t)(n)&&u&&(e=e?u+"-"+e:u),l.current={id:e,group:Sn(n)&&s.group||qe()});const h=o.useMemo((()=>({...l.current,forceRender:a})),[c]);return i.jsx(x.Provider,{value:h,children:t})},En=o.createContext(null);const An=o.forwardRef((function({children:t,as:e="ul",axis:n="y",onReorder:r,values:a,...c},l){const u=U((()=>ln(e))),h=[],d=o.useRef(!1);s.invariant(Boolean(a),"Reorder.Group must be provided a values prop");const m={axis:n,registerItem:(t,e)=>{const i=h.findIndex((e=>t===e.value));-1!==i?h[i].layout=e[n]:h.push({value:t,layout:e[n]}),h.sort(Cn)},updateOrder:(t,e,n)=>{if(d.current)return;const i=function(t,e,n,i){if(!i)return t;const o=t.findIndex((t=>t.value===e));if(-1===o)return t;const r=i>0?1:-1,a=t[o+r];if(!a)return t;const c=t[o],l=a.layout,u=s.mixNumber(l.min,l.max,.5);return 1===r&&c.layout.max+n>u||-1===r&&c.layout.min+n-1!==a.indexOf(t)))))}};return o.useEffect((()=>{d.current=!1})),i.jsx(u,{...c,ref:l,ignoreStrict:!0,children:i.jsx(En.Provider,{value:m,children:t})})}));function wn(t){return t.value}function Cn(t,e){return t.layout.min-e.layout.min}function bn(t){const e=U((()=>s.motionValue(t))),{isStatic:n}=o.useContext(c);if(n){const[,n]=o.useState(t);o.useEffect((()=>e.on("change",n)),[])}return e}function Dn(t,e){const n=bn(e()),i=()=>n.set(e());return i(),h((()=>{const e=()=>s.frame.preRender(i,!1,!0),n=t.map((t=>t.on("change",e)));return()=>{n.forEach((t=>t())),s.cancelFrame(i)}})),n}function Vn(t,e,n,i){if("function"===typeof t)return function(t){s.collectMotionValues.current=[],t();const e=Dn(s.collectMotionValues.current,t);return s.collectMotionValues.current=void 0,e}(t);const o="function"===typeof e?e:s.transform(e,n,i);return Array.isArray(t)?Rn(t,o):Rn([t],(([t])=>o(t)))}function Rn(t,e){const n=U((()=>[]));return Dn(t,(()=>{n.length=0;const i=t.length;for(let e=0;eln(r))),d=o.useContext(En),m={x:Mn(e.x),y:Mn(e.y)},p=Vn([m.x,m.y],(([t,e])=>t||e?1:"unset"));s.invariant(Boolean(d),"Reorder.Item must be a child of Reorder.Group");const{axis:f,registerItem:g,updateOrder:v}=d;return i.jsx(h,{drag:f,...l,dragSnapToOrigin:!0,style:{...e,x:m.x,y:m.y,zIndex:p},layout:c,onDrag:(t,e)=>{const{velocity:i}=e;i[f]&&v(n,m[f].get(),i[f]),a&&a(t,e)},onLayoutMeasure:t=>g(n,t),ref:u,ignoreStrict:!0,children:t})})),Bn={Group:An,Item:Ln},jn={renderer:rn,...Et,...dt},kn={...jn,...sn,...an};function In(t,e,n){o.useInsertionEffect((()=>t.on(e,n)),[t,e,n])}function On(t,e){s.warning(Boolean(!e||e.current),`You have defined a ${t} options but the provided ref is not yet hydrated, probably because it's defined higher up the tree. Try calling useScroll() in the same component as the ref, or setting its \`layoutEffect: false\` option.`)}const Fn=()=>({scrollX:s.motionValue(0),scrollY:s.motionValue(0),scrollXProgress:s.motionValue(0),scrollYProgress:s.motionValue(0)});function Un({container:t,target:e,layoutEffect:n=!0,...i}={}){const r=U(Fn);return(n?h:o.useEffect)((()=>(On("target",e),On("container",t),s.scrollInfo((({x:t,y:e})=>{r.scrollX.set(t.current),r.scrollXProgress.set(t.progress),r.scrollY.set(e.current),r.scrollYProgress.set(e.progress)}),{...i,container:(null===t||void 0===t?void 0:t.current)||void 0,target:(null===e||void 0===e?void 0:e.current)||void 0}))),[t,e,JSON.stringify(i.offset)]),r}function Nn(t){const e=o.useRef(0),{isStatic:n}=o.useContext(c);o.useEffect((()=>{if(n)return;const i=({timestamp:n,delta:i})=>{e.current||(e.current=n),t(n-e.current,i)};return s.frame.update(i,!0),()=>s.cancelFrame(i)}),[t])}class zn extends s.MotionValue{constructor(){super(...arguments),this.members=[],this.transforms=new Set}add(t){let e;s.transformProps.has(t)?(this.transforms.add(t),e="transform"):t.startsWith("origin")||s.isCSSVariableName(t)||"willChange"===t||(e=s.camelToDash(t)),e&&(s.addUniqueItem(this.members,e),this.update())}remove(t){s.transformProps.has(t)?(this.transforms.delete(t),this.transforms.size||s.removeItem(this.members,"transform")):s.removeItem(this.members,s.camelToDash(t)),this.update()}update(){this.set(this.members.length?this.members.join(", "):"auto")}}function Hn(){!s.hasReducedMotionListener.current&&s.initPrefersReducedMotion();const[t]=o.useState(s.prefersReducedMotion.current);return t}function Gn(t,e){[...e].reverse().forEach((n=>{const i=t.getVariant(n);i&&s.setTarget(t,i),t.variantChildren&&t.variantChildren.forEach((t=>{Gn(t,e)}))}))}function Wn(){let t=!1;const e=new Set,n={subscribe:t=>(e.add(t),()=>{e.delete(t)}),start(n,i){s.invariant(t,"controls.start() should only be called after a component has mounted. Consider calling within a useEffect hook.");const o=[];return e.forEach((t=>{o.push(gt(t,n,{transitionOverride:i}))})),Promise.all(o)},set:n=>(s.invariant(t,"controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook."),e.forEach((t=>{!function(t,e){Array.isArray(e)?Gn(t,e):"string"===typeof e?Gn(t,[e]):s.setTarget(t,e)}(t,n)}))),stop(){e.forEach((t=>{!function(t){t.values.forEach((t=>t.stop()))}(t)}))},mount:()=>(t=!0,()=>{t=!1,n.stop()})};return n}function $n(){const t=U(Wn);return h(t.mount,[]),t}const Yn=$n;class Xn{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 _n=()=>new Xn;function Kn(t){return null!==t&&"object"===typeof t&&S in t}function qn(){return Jn}function Jn(t){Xe.current&&(Xe.current.isUpdating=!1,Xe.current.blockUpdate(),t&&t())}const Zn=(t,e)=>`${t}: ${e}`,Qn=new Map;let ti,ei,ni;function ii(t,e,n,i){const o=s.transformProps.has(e)?"transform":e,r=Zn(t,o),a=Qn.get(r);if(!a)return null;const{animation:c,startTime:l}=a;return null===l||window.HandoffComplete?((()=>{Qn.delete(r);try{c.cancel()}catch(t){}})(),null):(void 0===ti&&(ti=performance.now()),ti-l||0)}const oi=()=>({});class si extends s.VisualElement{build(){}measureInstanceViewportBox(){return s.createBox()}resetTransform(){}restoreTransform(){}removeValueFromRenderState(){}renderInstance(){}scrapeMotionValuesFromProps(){return{}}getBaseTargetFromProps(){}readValueFromInstance(t,e,n){return n.initialState[e]||0}sortInstanceNodePosition(){return 0}}const ri=z({scrapeMotionValuesFromProps:oi,createRenderState:oi});const ai=t=>t>.001?1/t:1e5;let ci=!1;let li=0;e.AcceleratedAnimation=s.AcceleratedAnimation,e.MotionGlobalConfig=s.MotionGlobalConfig,e.MotionValue=s.MotionValue,e.VisualElement=s.VisualElement,e.addScaleCorrector=s.addScaleCorrector,e.animate=s.animate,e.animateValue=s.animateValue,e.anticipate=s.anticipate,e.backIn=s.backIn,e.backInOut=s.backInOut,e.backOut=s.backOut,e.buildTransform=s.buildTransform,e.cancelFrame=s.cancelFrame,e.cancelSync=s.cancelSync,e.circIn=s.circIn,e.circInOut=s.circInOut,e.circOut=s.circOut,e.clamp=s.clamp,e.color=s.color,e.complex=s.complex,e.createBox=s.createBox,e.createScopedAnimate=s.createScopedAnimate,e.cubicBezier=s.cubicBezier,e.delay=s.delay,e.distance=s.distance,e.distance2D=s.distance2D,e.easeIn=s.easeIn,e.easeInOut=s.easeInOut,e.easeOut=s.easeOut,e.frame=s.frame,e.frameData=s.frameData,e.inView=s.inView,e.interpolate=s.interpolate,Object.defineProperty(e,"invariant",{enumerable:!0,get:function(){return s.invariant}}),e.isBrowser=s.isBrowser,e.isMotionValue=s.isMotionValue,e.mirrorEasing=s.mirrorEasing,e.mix=s.mix,e.motionValue=s.motionValue,e.optimizedAppearDataAttribute=s.optimizedAppearDataAttribute,e.pipe=s.pipe,e.progress=s.progress,e.px=s.px,e.reverseEasing=s.reverseEasing,e.scroll=s.scroll,e.scrollInfo=s.scrollInfo,e.spring=s.spring,e.stagger=s.stagger,e.steps=s.steps,e.sync=s.sync,e.transform=s.transform,e.visualElementStore=s.visualElementStore,Object.defineProperty(e,"warning",{enumerable:!0,get:function(){return s.warning}}),e.wrap=s.wrap,e.AnimatePresence=({children:t,custom:e,initial:n=!0,onExitComplete:r,exitBeforeEnter:a,presenceAffectsLayout:c=!0,mode:l="sync"})=>{s.invariant(!a,"Replace exitBeforeEnter with mode='wait'");const u=o.useContext(x).forceRender||dn()[0],d=hn(),m=function(t){const e=[];return o.Children.forEach(t,(t=>{o.isValidElement(t)&&e.push(t)})),e}(t);let p=m;const f=o.useRef(new Map).current,g=o.useRef(p),v=o.useRef(new Map).current,y=o.useRef(!0);if(h((()=>{y.current=!1,function(t,e){t.forEach((t=>{const n=yn(t);e.set(n,t)}))}(m,v),g.current=p})),vn((()=>{y.current=!0,v.clear(),f.clear()})),y.current)return i.jsx(i.Fragment,{children:p.map((t=>i.jsx(fn,{isPresent:!0,initial:!!n&&void 0,presenceAffectsLayout:c,mode:l,children:t},yn(t))))});p=[...p];const P=g.current.map(yn),S=m.map(yn),T=P.length;for(let i=0;i{if(-1!==S.indexOf(n))return;const o=v.get(n);if(!o)return;const s=P.indexOf(n);let a=t;if(!a){const t=()=>{f.delete(n);const t=Array.from(v.keys()).filter((t=>!S.includes(t)));if(t.forEach((t=>v.delete(t))),g.current=m.filter((e=>{const i=yn(e);return i===n||t.includes(i)})),!f.size){if(!1===d.current)return;u(),r&&r()}};a=i.jsx(fn,{isPresent:!1,onExitComplete:t,custom:e,presenceAffectsLayout:c,mode:l,children:o},yn(o)),f.set(n,a)}p.splice(s,0,a)})),p=p.map((t=>{const e=t.key;return f.has(e)?t:i.jsx(fn,{isPresent:!0,presenceAffectsLayout:c,mode:l,children:t},yn(t))})),i.jsx(i.Fragment,{children:f.size?p:p.map((t=>o.cloneElement(t)))})},e.AnimateSharedLayout=({children:t})=>(a.useEffect((()=>{s.invariant(!1,"AnimateSharedLayout is deprecated: https://www.framer.com/docs/guide-upgrade/##shared-layout-animations")}),[]),i.jsx(Tn,{id:U((()=>"asl-"+li++)),children:t})),e.DeprecatedLayoutGroupContext=Pn,e.DragControls=Xn,e.FlatTree=ve,e.LayoutGroup=Tn,e.LayoutGroupContext=x,e.LazyMotion=function({children:t,features:e,strict:n=!1}){const[,s]=o.useState(!xn(e)),r=o.useRef(void 0);if(!xn(e)){const{renderer:t,...n}=e;r.current=t,y(n)}return o.useEffect((()=>{xn(e)&&e().then((({renderer:t,...e})=>{y(e),r.current=t,s(!0)}))}),[]),i.jsx(d.Provider,{value:{renderer:r.current,strict:n},children:t})},e.MotionConfig=function({children:t,isValidProp:e,...n}){e&&j(e),(n={...o.useContext(c),...n}).isStatic=U((()=>n.isStatic));const s=o.useMemo((()=>n),[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return i.jsx(c.Provider,{value:s,children:t})},e.MotionConfigContext=c,e.MotionContext=l,e.PresenceContext=u,e.Reorder=Bn,e.SwitchLayoutGroupContext=P,e.addPointerEvent=q,e.addPointerInfo=K,e.animateVisualElement=gt,e.animationControls=Wn,e.animations=Et,e.calcLength=Mt,e.createDomMotionComponent=function(t){return T($(t,{forwardMotionProps:!1},cn,rn))},e.createMotionComponent=T,e.disableInstantTransitions=function(){s.instantAnimationState.current=!1},e.domAnimation=jn,e.domMax=kn,e.filterProps=k,e.isDragActive=et,e.isMotionComponent=Kn,e.isValidMotionProp=L,e.m=un,e.makeUseVisualState=z,e.motion=ln,e.resolveMotionValue=N,e.startOptimizedAppearAnimation=function(t,e,n,i,o){if(window.HandoffComplete)return void(window.HandoffAppearAnimations=void 0);const r=t.dataset[s.optimizedAppearDataId];if(!r)return;window.HandoffAppearAnimations=ii;const a=Zn(r,e);ni||(ni=s.animateStyle(t,e,[n[0],n[0]],{duration:1e4,ease:"linear"}),Qn.set(a,{animation:ni,startTime:null}),window.HandoffCancelAllAnimations||(window.HandoffCancelAllAnimations=()=>{Qn.forEach((({animation:t})=>{t.cancel()})),Qn.clear(),window.HandoffCancelAllAnimations=void 0}));const c=()=>{ni.cancel();const r=s.animateStyle(t,e,n,i);void 0===ei&&(ei=performance.now()),r.startTime=ei,Qn.set(a,{animation:r,startTime:ei}),o&&o(r)};ni.ready?ni.ready.then(c).catch(s.noop):c()},e.unwrapMotionComponent=function(t){if(Kn(t))return t[S]},e.useAnimate=function(){const t=U((()=>({current:null,animations:[]}))),e=U((()=>s.createScopedAnimate(t)));return vn((()=>{t.animations.forEach((t=>t.stop()))})),[t,e]},e.useAnimation=Yn,e.useAnimationControls=$n,e.useAnimationFrame=Nn,e.useCycle=function(...t){const e=o.useRef(0),[n,i]=o.useState(t[e.current]);return[n,o.useCallback((n=>{e.current="number"!==typeof n?s.wrap(0,t.length,e.current+1):n,i(t[e.current])}),[t.length,...t])]},e.useDeprecatedAnimatedState=function(t){const[e,n]=o.useState(t),i=ri({},!1),s=U((()=>new si({props:{},visualState:i,presenceContext:null},{initialState:t})));return o.useEffect((()=>(s.mount({}),()=>s.unmount())),[s]),o.useEffect((()=>{s.update({onUpdate:t=>{n({...t})}},null)}),[n,s]),[e,U((()=>t=>gt(s,t)))]},e.useDeprecatedInvertedScale=function(t){let e=bn(1),n=bn(1);const{visualElement:i}=o.useContext(l);return s.invariant(!(!t&&!i),"If no scale values are provided, useInvertedScale must be used within a child of another motion component."),s.warning(ci,"useInvertedScale is deprecated and will be removed in 3.0. Use the layout prop instead."),ci=!0,t?(e=t.scaleX||e,n=t.scaleY||n):i&&(e=i.getValue("scaleX",1),n=i.getValue("scaleY",1)),{scaleX:Vn(e,ai),scaleY:Vn(n,ai)}},e.useDomEvent=function(t,e,n,i){o.useEffect((()=>{const o=t.current;if(n&&o)return Y(o,e,n,i)}),[t,e,n,i])},e.useDragControls=function(){return U(_n)},e.useElementScroll=function(t){return Un({container:t})},e.useForceUpdate=dn,e.useInView=function(t,{root:e,margin:n,amount:i,once:r=!1}={}){const[a,c]=o.useState(!1);return o.useEffect((()=>{if(!t.current||r&&a)return;const o={root:e&&e.current||void 0,margin:n,amount:i};return s.inView(t.current,(()=>(c(!0),r?void 0:()=>c(!1))),o)}),[e,t,n,r,i]),a},e.useInstantLayoutTransition=qn,e.useInstantTransition=function(){const[t,e]=dn(),n=qn(),i=o.useRef();return o.useEffect((()=>{s.frame.postRender((()=>s.frame.postRender((()=>{e===i.current&&(s.instantAnimationState.current=!1)}))))}),[e]),o=>{n((()=>{s.instantAnimationState.current=!0,t(),o(),i.current=e+1}))}},e.useIsPresent=function(){return null===(t=o.useContext(u))||t.isPresent;var t},e.useIsomorphicLayoutEffect=h,e.useMotionTemplate=function(t,...e){const n=t.length;return Dn(e.filter(s.isMotionValue),(function(){let i="";for(let o=0;o{const t=Xe.current;t&&t.resetTree()}),[])},e.useScroll=Un,e.useSpring=function(t,e={}){const{isStatic:n}=o.useContext(c),i=o.useRef(null),r=bn(s.isMotionValue(t)?t.get():t),a=()=>{i.current&&i.current.stop()};return o.useInsertionEffect((()=>r.attach(((t,o)=>{if(n)return o(t);const c=i.current;return c&&0===c.time&&c.sample(s.frameData.delta),a(),i.current=s.animateValue({keyframes:[r.get(),t],velocity:r.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...e,onUpdate:o}),r.get()}),a)),[JSON.stringify(e)]),h((()=>{if(s.isMotionValue(t))return t.on("change",(t=>r.set(parseFloat(t))))}),[r]),r},e.useTime=function(){const t=bn(0);return Nn((e=>t.set(e))),t},e.useTransform=Vn,e.useUnmountEffect=vn,e.useVelocity=function(t){const e=bn(t.getVelocity()),n=()=>{const i=t.getVelocity();e.set(i),i&&s.frame.update(n)};return In(t,"change",(()=>{s.frame.update(n,!1,!0)})),e},e.useViewportScroll=function(){return Un()},e.useWillChange=function(){return U((()=>new zn("auto")))}}}]);