"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9463],{2077:(t,e,i)=>{i.d(e,{xQ:()=>s});var n=i(85556),r=i(14394);function s(t=!0){let e=(0,n.useContext)(r.t);if(null===e)return[!0,null];let{isPresent:i,onExitComplete:o,register:a}=e,l=(0,n.useId)();(0,n.useEffect)(()=>{t&&a(l)},[t]);let u=(0,n.useCallback)(()=>t&&o&&o(l),[l,o,t]);return!i&&o?[!1,u]:[!0]}},14394:(t,e,i)=>{i.d(e,{t:()=>n});let n=(0,i(85556).createContext)(null)},29061:(t,e,i)=>{i.d(e,{E:()=>r});var n=i(85556);let r=i(69069).B?n.useLayoutEffect:n.useEffect},44812:(t,e,i)=>{i.d(e,{UC:()=>N,bL:()=>I,l9:()=>U});var n=i(85556),r=i(84151),s=i(66078),o=i(98892),a=i(6760),l=i(31382),u=i(63490),h=i(88415),d=i(80517),c=(i(42748),i(19026)),p=i(23154),m=i(68987),f=i(19903),v=i(45789),g=i(53045),y=i(10488),x="Popover",[P,w]=(0,o.A)(x,[d.Bk]),T=(0,d.Bk)(),[b,S]=P(x),A=t=>{let{__scopePopover:e,children:i,open:r,defaultOpen:s,onOpenChange:o,modal:a=!1}=t,l=T(e),u=n.useRef(null),[c,p]=n.useState(!1),[m=!1,v]=(0,f.i)({prop:r,defaultProp:s,onChange:o});return(0,y.jsx)(d.bL,{...l,children:(0,y.jsx)(b,{scope:e,contentId:(0,h.B)(),triggerRef:u,open:m,onOpenChange:v,onOpenToggle:n.useCallback(()=>v(t=>!t),[v]),hasCustomAnchor:c,onCustomAnchorAdd:n.useCallback(()=>p(!0),[]),onCustomAnchorRemove:n.useCallback(()=>p(!1),[]),modal:a,children:i})})};A.displayName=x;var C="PopoverAnchor";n.forwardRef((t,e)=>{let{__scopePopover:i,...r}=t,s=S(C,i),o=T(i),{onCustomAnchorAdd:a,onCustomAnchorRemove:l}=s;return n.useEffect(()=>(a(),()=>l()),[a,l]),(0,y.jsx)(d.Mz,{...o,...r,ref:e})}).displayName=C;var E="PopoverTrigger",M=n.forwardRef((t,e)=>{let{__scopePopover:i,...n}=t,o=S(E,i),a=T(i),l=(0,s.s)(e,o.triggerRef),u=(0,y.jsx)(p.sG.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":O(o.open),...n,ref:l,onClick:(0,r.m)(t.onClick,o.onOpenToggle)});return o.hasCustomAnchor?u:(0,y.jsx)(d.Mz,{asChild:!0,...a,children:u})});M.displayName=E;var[k,V]=P("PopoverPortal",{forceMount:void 0}),R="PopoverContent",D=n.forwardRef((t,e)=>{let i=V(R,t.__scopePopover),{forceMount:n=i.forceMount,...r}=t,s=S(R,t.__scopePopover);return(0,y.jsx)(c.C,{present:n||s.open,children:s.modal?(0,y.jsx)(L,{...r,ref:e}):(0,y.jsx)(j,{...r,ref:e})})});D.displayName=R;var L=n.forwardRef((t,e)=>{let i=S(R,t.__scopePopover),o=n.useRef(null),a=(0,s.s)(e,o),l=n.useRef(!1);return n.useEffect(()=>{let t=o.current;if(t)return(0,v.Eq)(t)},[]),(0,y.jsx)(g.A,{as:m.DX,allowPinchZoom:!0,children:(0,y.jsx)(F,{...t,ref:a,trapFocus:i.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,r.m)(t.onCloseAutoFocus,t=>{t.preventDefault(),l.current||i.triggerRef.current?.focus()}),onPointerDownOutside:(0,r.m)(t.onPointerDownOutside,t=>{let e=t.detail.originalEvent,i=0===e.button&&!0===e.ctrlKey;l.current=2===e.button||i},{checkForDefaultPrevented:!1}),onFocusOutside:(0,r.m)(t.onFocusOutside,t=>t.preventDefault(),{checkForDefaultPrevented:!1})})})}),j=n.forwardRef((t,e)=>{let i=S(R,t.__scopePopover),r=n.useRef(!1),s=n.useRef(!1);return(0,y.jsx)(F,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(r.current||i.triggerRef.current?.focus(),e.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(r.current=!0,"pointerdown"!==e.detail.originalEvent.type||(s.current=!0));let n=e.target;i.triggerRef.current?.contains(n)&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&s.current&&e.preventDefault()}})}),F=n.forwardRef((t,e)=>{let{__scopePopover:i,trapFocus:n,onOpenAutoFocus:r,onCloseAutoFocus:s,disableOutsidePointerEvents:o,onEscapeKeyDown:h,onPointerDownOutside:c,onFocusOutside:p,onInteractOutside:m,...f}=t,v=S(R,i),g=T(i);return(0,l.Oh)(),(0,y.jsx)(u.n,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:r,onUnmountAutoFocus:s,children:(0,y.jsx)(a.qW,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:m,onEscapeKeyDown:h,onPointerDownOutside:c,onFocusOutside:p,onDismiss:()=>v.onOpenChange(!1),children:(0,y.jsx)(d.UC,{"data-state":O(v.open),role:"dialog",id:v.contentId,...g,...f,ref:e,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),B="PopoverClose";function O(t){return t?"open":"closed"}n.forwardRef((t,e)=>{let{__scopePopover:i,...n}=t,s=S(B,i);return(0,y.jsx)(p.sG.button,{type:"button",...n,ref:e,onClick:(0,r.m)(t.onClick,()=>s.onOpenChange(!1))})}).displayName=B,n.forwardRef((t,e)=>{let{__scopePopover:i,...n}=t,r=T(i);return(0,y.jsx)(d.i3,{...r,...n,ref:e})}).displayName="PopoverArrow";var I=A,U=M,N=D},48804:(t,e,i)=>{i.d(e,{N:()=>g});var n=i(10488),r=i(85556),s=i(97196),o=i(76740),a=i(14394),l=i(85811);class u extends r.Component{getSnapshotBeforeUpdate(t){let e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent){let t=e.offsetParent,i=t instanceof HTMLElement&&t.offsetWidth||0,n=this.props.sizeRef.current;n.height=e.offsetHeight||0,n.width=e.offsetWidth||0,n.top=e.offsetTop,n.left=e.offsetLeft,n.right=i-n.width-n.left}return null}componentDidUpdate(){}render(){return this.props.children}}function h({children:t,isPresent:e,anchorX:i}){let s=(0,r.useId)(),o=(0,r.useRef)(null),a=(0,r.useRef)({width:0,height:0,top:0,left:0,right:0}),{nonce:h}=(0,r.useContext)(l.Q);return(0,r.useInsertionEffect)(()=>{let{width:t,height:n,top:r,left:l,right:u}=a.current;if(e||!o.current||!t||!n)return;let d="left"===i?`left: ${l}`:`right: ${u}`;o.current.dataset.motionPopId=s;let c=document.createElement("style");return h&&(c.nonce=h),document.head.appendChild(c),c.sheet&&c.sheet.insertRule(` [data-motion-pop-id="${s}"] { position: absolute !important; width: ${t}px !important; height: ${n}px !important; ${d}px !important; top: ${r}px !important; } `),()=>{document.head.removeChild(c)}},[e]),(0,n.jsx)(u,{isPresent:e,childRef:o,sizeRef:a,children:r.cloneElement(t,{ref:o})})}let d=({children:t,initial:e,isPresent:i,onExitComplete:s,custom:l,presenceAffectsLayout:u,mode:d,anchorX:p})=>{let m=(0,o.M)(c),f=(0,r.useId)(),v=(0,r.useCallback)(t=>{for(let e of(m.set(t,!0),m.values()))if(!e)return;s&&s()},[m,s]),g=(0,r.useMemo)(()=>({id:f,initial:e,isPresent:i,custom:l,onExitComplete:v,register:t=>(m.set(t,!1),()=>m.delete(t))}),u?[Math.random(),v]:[i,v]);return(0,r.useMemo)(()=>{m.forEach((t,e)=>m.set(e,!1))},[i]),r.useEffect(()=>{i||m.size||!s||s()},[i]),"popLayout"===d&&(t=(0,n.jsx)(h,{isPresent:i,anchorX:p,children:t})),(0,n.jsx)(a.t.Provider,{value:g,children:t})};function c(){return new Map}var p=i(2077);let m=t=>t.key||"";function f(t){let e=[];return r.Children.forEach(t,t=>{(0,r.isValidElement)(t)&&e.push(t)}),e}var v=i(29061);let g=({children:t,custom:e,initial:i=!0,onExitComplete:a,presenceAffectsLayout:l=!0,mode:u="sync",propagate:h=!1,anchorX:c="left"})=>{let[g,y]=(0,p.xQ)(h),x=(0,r.useMemo)(()=>f(t),[t]),P=h&&!g?[]:x.map(m),w=(0,r.useRef)(!0),T=(0,r.useRef)(x),b=(0,o.M)(()=>new Map),[S,A]=(0,r.useState)(x),[C,E]=(0,r.useState)(x);(0,v.E)(()=>{w.current=!1,T.current=x;for(let t=0;t{let r=m(t),s=(!h||!!g)&&(x===C||P.includes(r));return(0,n.jsx)(d,{isPresent:s,initial:(!w.current||!!i)&&void 0,custom:s?void 0:e,presenceAffectsLayout:l,mode:u,onExitComplete:s?void 0:()=>{if(!b.has(r))return;b.set(r,!0);let t=!0;b.forEach(e=>{e||(t=!1)}),t&&(null==k||k(),E(T.current),h&&(null==y||y()),a&&a())},anchorX:c,children:t},r)})})}},69069:(t,e,i)=>{i.d(e,{B:()=>n});let n="undefined"!=typeof window},76740:(t,e,i)=>{i.d(e,{M:()=>r});var n=i(85556);function r(t){let e=(0,n.useRef)(null);return null===e.current&&(e.current=t()),e.current}},85811:(t,e,i)=>{i.d(e,{Q:()=>n});let n=(0,i(85556).createContext)({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"})},97153:(t,e,i)=>{let n;function r(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function s(t){let e=[{},{}];return null==t||t.values.forEach((t,i)=>{e[0][i]=t.get(),e[1][i]=t.getVelocity()}),e}function o(t,e,i,n){if("function"==typeof e){let[r,o]=s(n);e=e(void 0!==i?i:t.custom,r,o)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){let[r,o]=s(n);e=e(void 0!==i?i:t.custom,r,o)}return e}function a(t,e,i){let n=t.getProps();return o(n,e,void 0!==i?i:n.custom,t)}function l(t){let e;return()=>(void 0===e&&(e=t()),e)}i.d(e,{P:()=>sg});let u=l(()=>void 0!==window.ScrollTimeline);class h{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let i=0;iu()&&i.attachTimeline?i.attachTimeline(t):"function"==typeof e?e(i):void 0);return()=>{i.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;ee[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class d extends h{then(t,e){return Promise.all(this.animations).then(t).catch(e)}}function c(t,e){return t?t[e]||t.default||t:void 0}function p(t){let e=0,i=t.next(e);for(;!i.done&&e<2e4;)e+=50,i=t.next(e);return e>=2e4?1/0:e}function m(t){return"function"==typeof t}function f(t,e){t.timeline=e,t.onfinish=null}let v=t=>Array.isArray(t)&&"number"==typeof t[0],g={linearEasing:void 0},y=function(t,e){let i=l(t);return()=>{var t;return null!==(t=g[e])&&void 0!==t?t:i()}}(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),x=(t,e,i)=>{let n=e-t;return 0===n?1:(i-t)/n},P=(t,e,i=10)=>{let n="",r=Math.max(Math.round(e/i),2);for(let e=0;e`cubic-bezier(${t}, ${e}, ${i}, ${n})`,T={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:w([0,.65,.55,1]),circOut:w([.55,0,1,.45]),backIn:w([.31,.01,.66,-.59]),backOut:w([.33,1.53,.69,.99])},b={x:!1,y:!1};function S(t,e){let i=function(t,e,i){var n;if(t instanceof EventTarget)return[t];if("string"==typeof t){let e=document,i=(n=void 0,e.querySelectorAll(t));return i?Array.from(i):[]}return Array.from(t)}(t),n=new AbortController;return[i,{passive:!0,...e,signal:n.signal},()=>n.abort()]}function A(t){return!("touch"===t.pointerType||b.x||b.y)}function C(t,e){let i=`${e}PointerCapture`;if(t.target instanceof Element&&i in t.target&&void 0!==t.pointerId)try{t.target[i](t.pointerId)}catch(t){}}let E=(t,e)=>!!e&&(t===e||E(t,e.parentElement)),M=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,k=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),V=new WeakSet;function R(t){return e=>{"Enter"===e.key&&t(e)}}function D(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}let L=(t,e)=>{let i=t.currentTarget;if(!i)return;let n=R(()=>{if(V.has(i))return;D(i,"down");let t=R(()=>{D(i,"up")});i.addEventListener("keyup",t,e),i.addEventListener("blur",()=>D(i,"cancel"),e)});i.addEventListener("keydown",n,e),i.addEventListener("blur",()=>i.removeEventListener("keydown",n),e)};function j(t){return M(t)&&!(b.x||b.y)}let F=t=>1e3*t,B=t=>t/1e3,O=t=>t,I=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],U=new Set(I),N=new Set(["width","height","top","left","right","bottom",...I]),$=t=>Array.isArray(t),W=t=>!!(t&&"object"==typeof t&&t.mix&&t.toValue),z=t=>$(t)?t[t.length-1]||0:t,H={skipAnimations:!1,useManualTiming:!1},X=["read","resolveKeyframes","update","preRender","render","postRender"];function Y(t,e){let i=!1,n=!0,r={delta:0,timestamp:0,isProcessing:!1},s=()=>i=!0,o=X.reduce((t,e)=>(t[e]=function(t){let e=new Set,i=new Set,n=!1,r=!1,s=new WeakSet,o={delta:0,timestamp:0,isProcessing:!1};function a(e){s.has(e)&&(l.schedule(e),t()),e(o)}let l={schedule:(t,r=!1,o=!1)=>{let a=o&&n?e:i;return r&&s.add(t),a.has(t)||a.add(t),t},cancel:t=>{i.delete(t),s.delete(t)},process:t=>{if(o=t,n){r=!0;return}n=!0,[e,i]=[i,e],e.forEach(a),e.clear(),n=!1,r&&(r=!1,l.process(t))}};return l}(s),t),{}),{read:a,resolveKeyframes:l,update:u,preRender:h,render:d,postRender:c}=o,p=()=>{let s=H.useManualTiming?r.timestamp:performance.now();i=!1,r.delta=n?1e3/60:Math.max(Math.min(s-r.timestamp,40),1),r.timestamp=s,r.isProcessing=!0,a.process(r),l.process(r),u.process(r),h.process(r),d.process(r),c.process(r),r.isProcessing=!1,i&&e&&(n=!1,t(p))},m=()=>{i=!0,n=!0,r.isProcessing||t(p)};return{schedule:X.reduce((t,e)=>{let n=o[e];return t[e]=(t,e=!1,r=!1)=>(i||m(),n.schedule(t,e,r)),t},{}),cancel:t=>{for(let e=0;e(void 0===n&&Q.set(_.isProcessing||H.useManualTiming?_.timestamp:performance.now()),n),set:t=>{n=t,queueMicrotask(Z)}};function J(t,e){-1===t.indexOf(e)&&t.push(e)}function tt(t,e){let i=t.indexOf(e);i>-1&&t.splice(i,1)}class te{constructor(){this.subscriptions=[]}add(t){return J(this.subscriptions,t),()=>tt(this.subscriptions,t)}notify(t,e,i){let n=this.subscriptions.length;if(n){if(1===n)this.subscriptions[0](t,e,i);else for(let r=0;r!isNaN(parseFloat(t)),tn={current:void 0};class tr{constructor(t,e={}){this.version="12.2.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{let i=Q.now();this.updatedAt!==i&&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){this.current=t,this.updatedAt=Q.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=ti(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new te);let i=this.events[t].add(e);return"change"===t?()=>{i(),q.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(let t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,i){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return tn.current&&tn.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){var t;let e=Q.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;let i=Math.min(this.updatedAt-this.prevUpdatedAt,30);return t=parseFloat(this.current)-parseFloat(this.prevFrameValue),i?1e3/i*t:0}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 ts(t,e){return new tr(t,e)}let to=t=>!!(t&&t.getVelocity);function ta(t,e){let i=t.getValue("willChange");if(to(i)&&i.add)return i.add(e)}let tl=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),tu="data-"+tl("framerAppearId"),th={current:!1},td=(t,e,i)=>(((1-3*i+3*e)*t+(3*i-6*e))*t+3*e)*t;function tc(t,e,i,n){if(t===e&&i===n)return O;let r=e=>(function(t,e,i,n,r){let s,o;let a=0;do(s=td(o=e+(i-e)/2,n,r)-t)>0?i=o:e=o;while(Math.abs(s)>1e-7&&++a<12);return o})(e,0,1,t,i);return t=>0===t||1===t?t:td(r(t),e,n)}let tp=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,tm=t=>e=>1-t(1-e),tf=tc(.33,1.53,.69,.99),tv=tm(tf),tg=tp(tv),ty=t=>(t*=2)<1?.5*tv(t):.5*(2-Math.pow(2,-10*(t-1))),tx=t=>1-Math.sin(Math.acos(t)),tP=tm(tx),tw=tp(tx),tT=t=>/^0[^.\s]+$/u.test(t),tb=(t,e,i)=>i>e?e:i"number"==typeof t,parse:parseFloat,transform:t=>t},tA={...tS,transform:t=>tb(0,1,t)},tC={...tS,default:1},tE=t=>Math.round(1e5*t)/1e5,tM=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,tk=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,tV=(t,e)=>i=>!!("string"==typeof i&&tk.test(i)&&i.startsWith(t)||e&&null!=i&&Object.prototype.hasOwnProperty.call(i,e)),tR=(t,e,i)=>n=>{if("string"!=typeof n)return n;let[r,s,o,a]=n.match(tM);return{[t]:parseFloat(r),[e]:parseFloat(s),[i]:parseFloat(o),alpha:void 0!==a?parseFloat(a):1}},tD=t=>tb(0,255,t),tL={...tS,transform:t=>Math.round(tD(t))},tj={test:tV("rgb","red"),parse:tR("red","green","blue"),transform:({red:t,green:e,blue:i,alpha:n=1})=>"rgba("+tL.transform(t)+", "+tL.transform(e)+", "+tL.transform(i)+", "+tE(tA.transform(n))+")"},tF={test:tV("#"),parse:function(t){let e="",i="",n="",r="";return t.length>5?(e=t.substring(1,3),i=t.substring(3,5),n=t.substring(5,7),r=t.substring(7,9)):(e=t.substring(1,2),i=t.substring(2,3),n=t.substring(3,4),r=t.substring(4,5),e+=e,i+=i,n+=n,r+=r),{red:parseInt(e,16),green:parseInt(i,16),blue:parseInt(n,16),alpha:r?parseInt(r,16)/255:1}},transform:tj.transform},tB=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),tO=tB("deg"),tI=tB("%"),tU=tB("px"),tN=tB("vh"),t$=tB("vw"),tW={...tI,parse:t=>tI.parse(t)/100,transform:t=>tI.transform(100*t)},tz={test:tV("hsl","hue"),parse:tR("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:i,alpha:n=1})=>"hsla("+Math.round(t)+", "+tI.transform(tE(e))+", "+tI.transform(tE(i))+", "+tE(tA.transform(n))+")"},tH={test:t=>tj.test(t)||tF.test(t)||tz.test(t),parse:t=>tj.test(t)?tj.parse(t):tz.test(t)?tz.parse(t):tF.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?tj.transform(t):tz.transform(t)},tX=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,tY="number",tq="color",tK=/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 t_(t){let e=t.toString(),i=[],n={color:[],number:[],var:[]},r=[],s=0,o=e.replace(tK,t=>(tH.test(t)?(n.color.push(s),r.push(tq),i.push(tH.parse(t))):t.startsWith("var(")?(n.var.push(s),r.push("var"),i.push(t)):(n.number.push(s),r.push(tY),i.push(parseFloat(t))),++s,"${}")).split("${}");return{values:i,split:o,indexes:n,types:r}}function tG(t){return t_(t).values}function tZ(t){let{split:e,types:i}=t_(t),n=e.length;return t=>{let r="";for(let s=0;s"number"==typeof t?0:t,tJ={test:function(t){var e,i;return isNaN(t)&&"string"==typeof t&&((null===(e=t.match(tM))||void 0===e?void 0:e.length)||0)+((null===(i=t.match(tX))||void 0===i?void 0:i.length)||0)>0},parse:tG,createTransformer:tZ,getAnimatableNone:function(t){let e=tG(t);return tZ(t)(e.map(tQ))}},t0=new Set(["brightness","contrast","saturate","opacity"]);function t1(t){let[e,i]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;let[n]=i.match(tM)||[];if(!n)return t;let r=i.replace(n,""),s=+!!t0.has(e);return n!==i&&(s*=100),e+"("+s+r+")"}let t5=/\b([a-z-]*)\(.*?\)/gu,t2={...tJ,getAnimatableNone:t=>{let e=t.match(t5);return e?e.map(t1).join(" "):t}},t9={...tS,transform:Math.round},t3={borderWidth:tU,borderTopWidth:tU,borderRightWidth:tU,borderBottomWidth:tU,borderLeftWidth:tU,borderRadius:tU,radius:tU,borderTopLeftRadius:tU,borderTopRightRadius:tU,borderBottomRightRadius:tU,borderBottomLeftRadius:tU,width:tU,maxWidth:tU,height:tU,maxHeight:tU,top:tU,right:tU,bottom:tU,left:tU,padding:tU,paddingTop:tU,paddingRight:tU,paddingBottom:tU,paddingLeft:tU,margin:tU,marginTop:tU,marginRight:tU,marginBottom:tU,marginLeft:tU,backgroundPositionX:tU,backgroundPositionY:tU,rotate:tO,rotateX:tO,rotateY:tO,rotateZ:tO,scale:tC,scaleX:tC,scaleY:tC,scaleZ:tC,skew:tO,skewX:tO,skewY:tO,distance:tU,translateX:tU,translateY:tU,translateZ:tU,x:tU,y:tU,z:tU,perspective:tU,transformPerspective:tU,opacity:tA,originX:tW,originY:tW,originZ:tU,zIndex:t9,size:tU,fillOpacity:tA,strokeOpacity:tA,numOctaves:t9},t6={...t3,color:tH,backgroundColor:tH,outlineColor:tH,fill:tH,stroke:tH,borderColor:tH,borderTopColor:tH,borderRightColor:tH,borderBottomColor:tH,borderLeftColor:tH,filter:t2,WebkitFilter:t2},t4=t=>t6[t];function t8(t,e){let i=t4(t);return i!==t2&&(i=tJ),i.getAnimatableNone?i.getAnimatableNone(e):void 0}let t7=new Set(["auto","none","0"]),et=t=>t===tS||t===tU,ee=(t,e)=>parseFloat(t.split(", ")[e]),ei=(t,e)=>(i,{transform:n})=>{if("none"===n||!n)return 0;let r=n.match(/^matrix3d\((.+)\)$/u);if(r)return ee(r[1],e);{let e=n.match(/^matrix\((.+)\)$/u);return e?ee(e[1],t):0}},en=new Set(["x","y","z"]),er=I.filter(t=>!en.has(t)),es={width:({x:t},{paddingLeft:e="0",paddingRight:i="0"})=>t.max-t.min-parseFloat(e)-parseFloat(i),height:({y:t},{paddingTop:e="0",paddingBottom:i="0"})=>t.max-t.min-parseFloat(e)-parseFloat(i),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:ei(4,13),y:ei(5,14)};es.translateX=es.x,es.translateY=es.y;let eo=new Set,ea=!1,el=!1;function eu(){if(el){let t=Array.from(eo).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),i=new Map;e.forEach(t=>{let e=function(t){let e=[];return er.forEach(i=>{let n=t.getValue(i);void 0!==n&&(e.push([i,n.get()]),n.set(+!!i.startsWith("scale")))}),e}(t);e.length&&(i.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();let e=i.get(t);e&&e.forEach(([e,i])=>{var n;null===(n=t.getValue(e))||void 0===n||n.set(i)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}el=!1,ea=!1,eo.forEach(t=>t.complete()),eo.clear()}function eh(){eo.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(el=!0)})}class ed{constructor(t,e,i,n,r,s=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=i,this.motionValue=n,this.element=r,this.isAsync=s}scheduleResolve(){this.isScheduled=!0,this.isAsync?(eo.add(this),ea||(ea=!0,q.read(eh),q.resolveKeyframes(eu))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:t,name:e,element:i,motionValue:n}=this;for(let r=0;r/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),ep=t=>e=>"string"==typeof e&&e.startsWith(t),em=ep("--"),ef=ep("var(--"),ev=t=>!!ef(t)&&eg.test(t.split("/*")[0].trim()),eg=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,ey=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u,ex=t=>e=>e.test(t),eP=[tS,tU,tI,tO,t$,tN,{test:t=>"auto"===t,parse:t=>t}],ew=t=>eP.find(ex(t));class eT extends ed{constructor(t,e,i,n,r){super(t,e,i,n,r,!0)}readKeyframes(){let{unresolvedKeyframes:t,element:e,name:i}=this;if(!e||!e.current)return;super.readKeyframes();for(let i=0;i{e.getValue(t).set(i)}),this.resolveNoneKeyframes()}}let eb=(t,e)=>"zIndex"!==e&&!!("number"==typeof t||Array.isArray(t)||"string"==typeof t&&(tJ.test(t)||"0"===t)&&!t.startsWith("url(")),eS=t=>null!==t;function eA(t,{repeat:e,repeatType:i="loop"},n){let r=t.filter(eS),s=e&&"loop"!==i&&e%2==1?0:r.length-1;return s&&void 0!==n?n:r[s]}class eC{constructor({autoplay:t=!0,delay:e=0,type:i="keyframes",repeat:n=0,repeatDelay:r=0,repeatType:s="loop",...o}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Q.now(),this.options={autoplay:t,delay:e,type:i,repeat:n,repeatDelay:r,repeatType:s,...o},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(eh(),eu()),this._resolved}onKeyframesResolved(t,e){this.resolvedAt=Q.now(),this.hasAttemptedResolve=!0;let{name:i,type:n,velocity:r,delay:s,onComplete:o,onUpdate:a,isGenerator:l}=this.options;if(!l&&!function(t,e,i,n){let r=t[0];if(null===r)return!1;if("display"===e||"visibility"===e)return!0;let s=t[t.length-1],o=eb(r,e),a=eb(s,e);return O(o===a,`You are trying to animate ${e} from "${r}" to "${s}". ${r} is not an animatable value - to enable this animation set ${r} to a value animatable to ${s} via the \`style\` property.`),!!o&&!!a&&(function(t){let e=t[0];if(1===t.length)return!0;for(let i=0;i{this.resolveFinishedPromise=t})}}let eE=(t,e,i)=>t+(e-t)*i;function eM(t,e,i){return(i<0&&(i+=1),i>1&&(i-=1),i<1/6)?t+(e-t)*6*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}function ek(t,e){return i=>i>0?e:t}let eV=(t,e,i)=>{let n=t*t,r=i*(e*e-n)+n;return r<0?0:Math.sqrt(r)},eR=[tF,tj,tz],eD=t=>eR.find(e=>e.test(t));function eL(t){let e=eD(t);if(O(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`),!e)return!1;let i=e.parse(t);return e===tz&&(i=function({hue:t,saturation:e,lightness:i,alpha:n}){t/=360,i/=100;let r=0,s=0,o=0;if(e/=100){let n=i<.5?i*(1+e):i+e-i*e,a=2*i-n;r=eM(a,n,t+1/3),s=eM(a,n,t),o=eM(a,n,t-1/3)}else r=s=o=i;return{red:Math.round(255*r),green:Math.round(255*s),blue:Math.round(255*o),alpha:n}}(i)),i}let ej=(t,e)=>{let i=eL(t),n=eL(e);if(!i||!n)return ek(t,e);let r={...i};return t=>(r.red=eV(i.red,n.red,t),r.green=eV(i.green,n.green,t),r.blue=eV(i.blue,n.blue,t),r.alpha=eE(i.alpha,n.alpha,t),tj.transform(r))},eF=(t,e)=>i=>e(t(i)),eB=(...t)=>t.reduce(eF),eO=new Set(["none","hidden"]);function eI(t,e){return i=>eE(t,e,i)}function eU(t){return"number"==typeof t?eI:"string"==typeof t?ev(t)?ek:tH.test(t)?ej:eW:Array.isArray(t)?eN:"object"==typeof t?tH.test(t)?ej:e$:ek}function eN(t,e){let i=[...t],n=i.length,r=t.map((t,i)=>eU(t)(t,e[i]));return t=>{for(let e=0;e{for(let e in n)i[e]=n[e](t);return i}}let eW=(t,e)=>{let i=tJ.createTransformer(e),n=t_(t),r=t_(e);return n.indexes.var.length===r.indexes.var.length&&n.indexes.color.length===r.indexes.color.length&&n.indexes.number.length>=r.indexes.number.length?eO.has(t)&&!r.values.length||eO.has(e)&&!n.values.length?function(t,e){return eO.has(t)?i=>i<=0?t:e:i=>i>=1?e:t}(t,e):eB(eN(function(t,e){var i;let n=[],r={color:0,var:0,number:0};for(let s=0;svoid 0!==t[e])}function eG(t=eX.visualDuration,e=eX.bounce){let i;let n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t,{restSpeed:r,restDelta:s}=n,o=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],l={done:!1,value:o},{stiffness:u,damping:h,mass:d,duration:c,velocity:m,isResolvedFromDuration:f}=function(t){let e={velocity:eX.velocity,stiffness:eX.stiffness,damping:eX.damping,mass:eX.mass,isResolvedFromDuration:!1,...t};if(!e_(t,eK)&&e_(t,eq)){if(t.visualDuration){let i=2*Math.PI/(1.2*t.visualDuration),n=i*i,r=2*tb(.05,1,1-(t.bounce||0))*Math.sqrt(n);e={...e,mass:eX.mass,stiffness:n,damping:r}}else{let i=function({duration:t=eX.duration,bounce:e=eX.bounce,velocity:i=eX.velocity,mass:n=eX.mass}){let r,s;O(t<=F(eX.maxDuration),"Spring duration must be 10 seconds or less");let o=1-e;o=tb(eX.minDamping,eX.maxDamping,o),t=tb(eX.minDuration,eX.maxDuration,B(t)),o<1?(r=e=>{let n=e*o,r=n*t;return .001-(n-i)/eY(e,o)*Math.exp(-r)},s=e=>{let n=e*o*t,s=Math.pow(o,2)*Math.pow(e,2)*t,a=Math.exp(-n),l=eY(Math.pow(e,2),o);return(n*i+i-s)*a*(-r(e)+.001>0?-1:1)/l}):(r=e=>-.001+Math.exp(-e*t)*((e-i)*t+1),s=e=>t*t*(i-e)*Math.exp(-e*t));let a=function(t,e,i){let n=i;for(let i=1;i<12;i++)n-=t(n)/e(n);return n}(r,s,5/t);if(t=F(t),isNaN(a))return{stiffness:eX.stiffness,damping:eX.damping,duration:t};{let e=Math.pow(a,2)*n;return{stiffness:e,damping:2*o*Math.sqrt(n*e),duration:t}}}(t);(e={...e,...i,mass:eX.mass}).isResolvedFromDuration=!0}}return e}({...n,velocity:-B(n.velocity||0)}),v=m||0,g=h/(2*Math.sqrt(u*d)),y=a-o,x=B(Math.sqrt(u/d)),w=5>Math.abs(y);if(r||(r=w?eX.restSpeed.granular:eX.restSpeed.default),s||(s=w?eX.restDelta.granular:eX.restDelta.default),g<1){let t=eY(x,g);i=e=>a-Math.exp(-g*x*e)*((v+g*x*y)/t*Math.sin(t*e)+y*Math.cos(t*e))}else if(1===g)i=t=>a-Math.exp(-x*t)*(y+(v+x*y)*t);else{let t=x*Math.sqrt(g*g-1);i=e=>{let i=Math.exp(-g*x*e),n=Math.min(t*e,300);return a-i*((v+g*x*y)*Math.sinh(n)+t*y*Math.cosh(n))/t}}let T={calculatedDuration:f&&c||null,next:t=>{let e=i(t);if(f)l.done=t>=c;else{let n=0;g<1&&(n=0===t?F(v):eH(i,t,e));let o=Math.abs(a-e)<=s;l.done=Math.abs(n)<=r&&o}return l.value=l.done?a:e,l},toString:()=>{let t=Math.min(p(T),2e4),e=P(e=>T.next(t*e).value,t,30);return t+"ms "+e}};return T}function eZ({keyframes:t,velocity:e=0,power:i=.8,timeConstant:n=325,bounceDamping:r=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:h}){let d,c;let p=t[0],m={done:!1,value:p},f=t=>void 0!==a&&tl,v=t=>void 0===a?l:void 0===l?a:Math.abs(a-t)-g*Math.exp(-t/n),w=t=>x+P(t),T=t=>{let e=P(t),i=w(t);m.done=Math.abs(e)<=u,m.value=m.done?x:i},b=t=>{f(m.value)&&(d=t,c=eG({keyframes:[m.value,v(m.value)],velocity:eH(w,t,m.value),damping:r,stiffness:s,restDelta:u,restSpeed:h}))};return b(0),{calculatedDuration:null,next:t=>{let e=!1;return(c||void 0!==d||(e=!0,T(t),b(t)),void 0!==d&&t>=d)?c.next(t-d):(e||T(t),m)}}}let eQ=tc(.42,0,1,1),eJ=tc(0,0,.58,1),e0=tc(.42,0,.58,1),e1=t=>Array.isArray(t)&&"number"!=typeof t[0],e5={linear:O,easeIn:eQ,easeInOut:e0,easeOut:eJ,circIn:tx,circInOut:tw,circOut:tP,backIn:tv,backInOut:tg,backOut:tf,anticipate:ty},e2=t=>{if(v(t)){O(4===t.length,"Cubic bezier arrays must contain four numerical values.");let[e,i,n,r]=t;return tc(e,i,n,r)}return"string"==typeof t?(O(void 0!==e5[t],`Invalid easing type '${t}'`),e5[t]):t};function e9({duration:t=300,keyframes:e,times:i,ease:n="easeInOut"}){let r=e1(n)?n.map(e2):e2(n),s={done:!1,value:e[0]},o=function(t,e,{clamp:i=!0,ease:n,mixer:r}={}){let s=t.length;if(O(s===e.length,"Both input and output ranges must be the same length"),1===s)return()=>e[0];if(2===s&&e[0]===e[1])return()=>e[1];let o=t[0]===t[1];t[0]>t[s-1]&&(t=[...t].reverse(),e=[...e].reverse());let a=function(t,e,i){let n=[],r=i||ez,s=t.length-1;for(let i=0;i{if(o&&i1)for(;nu(tb(t[0],t[s-1],e)):u}((i&&i.length===e.length?i:function(t){let e=[0];return function(t,e){let i=t[t.length-1];for(let n=1;n<=e;n++){let r=x(0,e,n);t.push(eE(i,1,r))}}(e,t.length-1),e}(e)).map(e=>e*t),e,{ease:Array.isArray(r)?r:e.map(()=>r||e0).splice(0,e.length-1)});return{calculatedDuration:t,next:e=>(s.value=o(e),s.done=e>=t,s)}}let e3=t=>{let e=({timestamp:e})=>t(e);return{start:()=>q.update(e,!0),stop:()=>K(e),now:()=>_.isProcessing?_.timestamp:Q.now()}},e6={decay:eZ,inertia:eZ,tween:e9,keyframes:e9,spring:eG},e4=t=>t/100;class e8 extends eC{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();let{onStop:t}=this.options;t&&t()};let{name:e,motionValue:i,element:n,keyframes:r}=this.options,s=(null==n?void 0:n.KeyframeResolver)||ed;this.resolver=new s(r,(t,e)=>this.onKeyframesResolved(t,e),e,i,n),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){let e,i;let{type:n="keyframes",repeat:r=0,repeatDelay:s=0,repeatType:o,velocity:a=0}=this.options,l=m(n)?n:e6[n]||e9;l!==e9&&"number"!=typeof t[0]&&(e=eB(e4,ez(t[0],t[1])),t=[0,100]);let u=l({...this.options,keyframes:t});"mirror"===o&&(i=l({...this.options,keyframes:[...t].reverse(),velocity:-a})),null===u.calculatedDuration&&(u.calculatedDuration=p(u));let{calculatedDuration:h}=u,d=h+s;return{generator:u,mirroredGenerator:i,mapPercentToKeyframes:e,calculatedDuration:h,resolvedDuration:d,totalDuration:d*(r+1)-s}}onPostResolved(){let{autoplay:t=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&t?this.state=this.pendingPlayState:this.pause()}tick(t,e=!1){let{resolved:i}=this;if(!i){let{keyframes:t}=this.options;return{done:!0,value:t[t.length-1]}}let{finalKeyframe:n,generator:r,mirroredGenerator:s,mapPercentToKeyframes:o,keyframes:a,calculatedDuration:l,totalDuration:u,resolvedDuration:h}=i;if(null===this.startTime)return r.next(0);let{delay:d,repeat:c,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-u/this.speed,this.startTime)),e?this.currentTime=t:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;let v=this.currentTime-d*(this.speed>=0?1:-1),g=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=u);let y=this.currentTime,x=r;if(c){let t=Math.min(this.currentTime,u)/h,e=Math.floor(t),i=t%1;!i&&t>=1&&(i=1),1===i&&e--,(e=Math.min(e,c+1))%2&&("reverse"===p?(i=1-i,m&&(i-=m/h)):"mirror"===p&&(x=s)),y=tb(0,1,i)*h}let P=g?{done:!1,value:a[0]}:x.next(y);o&&(P.value=o(P.value));let{done:w}=P;g||null===l||(w=this.speed>=0?this.currentTime>=u:this.currentTime<=0);let T=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return T&&void 0!==n&&(P.value=eA(a,this.options,n)),f&&f(P.value),T&&this.finish(),P}get duration(){let{resolved:t}=this;return t?B(t.calculatedDuration):0}get time(){return B(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){let e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=B(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;let{driver:t=e3,onPlay:e,startTime:i}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),e&&e();let n=this.driver.now();null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=n):this.startTime=null!=i?i:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=null!==(t=this.currentTime)&&void 0!==t?t:0}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";let{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)}}let e7=new Set(["opacity","clipPath","filter","transform"]),it=l(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),ie={anticipate:ty,backInOut:tg,circInOut:tw};class ii extends eC{constructor(t){super(t);let{name:e,motionValue:i,element:n,keyframes:r}=this.options;this.resolver=new eT(r,(t,e)=>this.onKeyframesResolved(t,e),e,i,n),this.resolver.scheduleResolve()}initPlayback(t,e){var i;let{duration:n=300,times:r,ease:s,type:o,motionValue:a,name:l,startTime:u}=this.options;if(!a.owner||!a.owner.current)return!1;if("string"==typeof s&&y()&&s in ie&&(s=ie[s]),m((i=this.options).type)||"spring"===i.type||!function t(e){return!!("function"==typeof e&&y()||!e||"string"==typeof e&&(e in T||y())||v(e)||Array.isArray(e)&&e.every(t))}(i.ease)){let{onComplete:e,onUpdate:i,motionValue:a,element:l,...u}=this.options,h=function(t,e){let i=new e8({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0}),n={done:!1,value:t[0]},r=[],s=0;for(;!n.done&&s<2e4;)r.push((n=i.sample(s)).value),s+=10;return{times:void 0,keyframes:r,duration:s-10,ease:"linear"}}(t,u);1===(t=h.keyframes).length&&(t[1]=t[0]),n=h.duration,r=h.times,s=h.ease,o="keyframes"}let h=function(t,e,i,{delay:n=0,duration:r=300,repeat:s=0,repeatType:o="loop",ease:a="easeInOut",times:l}={}){let u={[e]:i};l&&(u.offset=l);let h=function t(e,i){if(e)return"function"==typeof e&&y()?P(e,i):v(e)?w(e):Array.isArray(e)?e.map(e=>t(e,i)||T.easeOut):T[e]}(a,r);return Array.isArray(h)&&(u.easing=h),t.animate(u,{delay:n,duration:r,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:s+1,direction:"reverse"===o?"alternate":"normal"})}(a.owner.current,l,t,{...this.options,duration:n,times:r,ease:s});return h.startTime=null!=u?u:this.calcStartTime(),this.pendingTimeline?(f(h,this.pendingTimeline),this.pendingTimeline=void 0):h.onfinish=()=>{let{onComplete:i}=this.options;a.set(eA(t,this.options,e)),i&&i(),this.cancel(),this.resolveFinishedPromise()},{animation:h,duration:n,times:r,type:o,ease:s,keyframes:t}}get duration(){let{resolved:t}=this;if(!t)return 0;let{duration:e}=t;return B(e)}get time(){let{resolved:t}=this;if(!t)return 0;let{animation:e}=t;return B(e.currentTime||0)}set time(t){let{resolved:e}=this;if(!e)return;let{animation:i}=e;i.currentTime=F(t)}get speed(){let{resolved:t}=this;if(!t)return 1;let{animation:e}=t;return e.playbackRate}set speed(t){let{resolved:e}=this;if(!e)return;let{animation:i}=e;i.playbackRate=t}get state(){let{resolved:t}=this;if(!t)return"idle";let{animation:e}=t;return e.playState}get startTime(){let{resolved:t}=this;if(!t)return null;let{animation:e}=t;return e.startTime}attachTimeline(t){if(this._resolved){let{resolved:e}=this;if(!e)return O;let{animation:i}=e;f(i,t)}else this.pendingTimeline=t;return O}play(){if(this.isStopped)return;let{resolved:t}=this;if(!t)return;let{animation:e}=t;"finished"===e.playState&&this.updateFinishedPromise(),e.play()}pause(){let{resolved:t}=this;if(!t)return;let{animation:e}=t;e.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();let{resolved:t}=this;if(!t)return;let{animation:e,keyframes:i,duration:n,type:r,ease:s,times:o}=t;if("idle"===e.playState||"finished"===e.playState)return;if(this.time){let{motionValue:t,onUpdate:e,onComplete:a,element:l,...u}=this.options,h=new e8({...u,keyframes:i,duration:n,type:r,ease:s,times:o,isGenerator:!0}),d=F(this.time);t.setWithVelocity(h.sample(d-10).value,h.sample(d).value,10)}let{onStop:a}=this.options;a&&a(),this.cancel()}complete(){let{resolved:t}=this;t&&t.animation.finish()}cancel(){let{resolved:t}=this;t&&t.animation.cancel()}static supports(t){let{motionValue:e,name:i,repeatDelay:n,repeatType:r,damping:s,type:o}=t;if(!e||!e.owner||!(e.owner.current instanceof HTMLElement))return!1;let{onUpdate:a,transformTemplate:l}=e.owner.getProps();return it()&&i&&e7.has(i)&&!a&&!l&&!n&&"mirror"!==r&&0!==s&&"inertia"!==o}}let ir={type:"spring",stiffness:500,damping:25,restSpeed:10},is=t=>({type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restSpeed:10}),io={type:"keyframes",duration:.8},ia={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},il=(t,{keyframes:e})=>e.length>2?io:U.has(t)?t.startsWith("scale")?is(e[1]):ir:ia,iu=(t,e,i,n={},r,s)=>o=>{let a=c(n,t)||{},l=a.delay||n.delay||0,{elapsed:u=0}=n;u-=F(l);let h={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:t=>{e.set(t),a.onUpdate&&a.onUpdate(t)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:s?void 0:r};!function({when:t,delay:e,delayChildren:i,staggerChildren:n,staggerDirection:r,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:u,...h}){return!!Object.keys(h).length}(a)&&(h={...h,...il(t,h)}),h.duration&&(h.duration=F(h.duration)),h.repeatDelay&&(h.repeatDelay=F(h.repeatDelay)),void 0!==h.from&&(h.keyframes[0]=h.from);let p=!1;if(!1!==h.type&&(0!==h.duration||h.repeatDelay)||(h.duration=0,0!==h.delay||(p=!0)),(th.current||H.skipAnimations)&&(p=!0,h.duration=0,h.delay=0),p&&!s&&void 0!==e.get()){let t=eA(h.keyframes,a);if(void 0!==t)return q.update(()=>{h.onUpdate(t),h.onComplete()}),new d([])}return!s&&ii.supports(h)?new ii(h):new e8(h)};function ih(t,e,{delay:i=0,transitionOverride:n,type:r}={}){var s;let{transition:o=t.getDefaultTransition(),transitionEnd:l,...u}=e;n&&(o=n);let h=[],d=r&&t.animationState&&t.animationState.getState()[r];for(let e in u){let n=t.getValue(e,null!==(s=t.latestValues[e])&&void 0!==s?s:null),r=u[e];if(void 0===r||d&&function({protectedKeys:t,needsAnimating:e},i){let n=t.hasOwnProperty(i)&&!0!==e[i];return e[i]=!1,n}(d,e))continue;let a={delay:i,...c(o||{},e)},l=!1;if(window.MotionHandoffAnimation){let i=t.props[tu];if(i){let t=window.MotionHandoffAnimation(i,e,q);null!==t&&(a.startTime=t,l=!0)}}ta(t,e),n.start(iu(e,n,r,t.shouldReduceMotion&&N.has(e)?{type:!1}:a,t,l));let p=n.animation;p&&h.push(p)}return l&&Promise.all(h).then(()=>{q.update(()=>{l&&function(t,e){let{transitionEnd:i={},transition:n={},...r}=a(t,e)||{};for(let e in r={...r,...i}){let i=z(r[e]);t.hasValue(e)?t.getValue(e).set(i):t.addValue(e,ts(i))}}(t,l)})}),h}function id(t,e,i={}){var n;let r=a(t,e,"exit"===i.type?null===(n=t.presenceContext)||void 0===n?void 0:n.custom:void 0),{transition:s=t.getDefaultTransition()||{}}=r||{};i.transitionOverride&&(s=i.transitionOverride);let o=r?()=>Promise.all(ih(t,r,i)):()=>Promise.resolve(),l=t.variantChildren&&t.variantChildren.size?(n=0)=>{let{delayChildren:r=0,staggerChildren:o,staggerDirection:a}=s;return function(t,e,i=0,n=0,r=1,s){let o=[],a=(t.variantChildren.size-1)*n,l=1===r?(t=0)=>t*n:(t=0)=>a-t*n;return Array.from(t.variantChildren).sort(ic).forEach((t,n)=>{t.notify("AnimationStart",e),o.push(id(t,e,{...s,delay:i+l(n)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(o)}(t,e,r+n,o,a,i)}:()=>Promise.resolve(),{when:u}=s;if(!u)return Promise.all([o(),l(i.delay)]);{let[t,e]="beforeChildren"===u?[o,l]:[l,o];return t().then(()=>e())}}function ic(t,e){return t.sortNodePosition(e)}function ip(t,e){if(!Array.isArray(e))return!1;let i=e.length;if(i!==t.length)return!1;for(let n=0;nPromise.all(e.map(({animation:e,options:i})=>(function(t,e,i={}){let n;if(t.notify("AnimationStart",e),Array.isArray(e))n=Promise.all(e.map(e=>id(t,e,i)));else if("string"==typeof e)n=id(t,e,i);else{let r="function"==typeof e?a(t,e,i.custom):e;n=Promise.all(ih(t,r,i))}return n.then(()=>{t.notify("AnimationComplete",e)})})(t,e,i))),i=iT(),n=!0,s=e=>(i,n)=>{var r;let s=a(t,n,"exit"===e?null===(r=t.presenceContext)||void 0===r?void 0:r.custom:void 0);if(s){let{transition:t,transitionEnd:e,...n}=s;i={...i,...n,...e}}return i};function o(o){let{props:a}=t,l=function t(e){if(!e)return;if(!e.isControllingVariants){let i=e.parent&&t(e.parent)||{};return void 0!==e.props.initial&&(i.initial=e.props.initial),i}let i={};for(let t=0;tc&&y,b=!1,S=Array.isArray(g)?g:[g],A=S.reduce(s(f),{});!1===x&&(A={});let{prevResolvedValues:C={}}=v,E={...C,...A},M=e=>{T=!0,h.has(e)&&(b=!0,h.delete(e)),v.needsAnimating[e]=!0;let i=t.getValue(e);i&&(i.liveStyle=!1)};for(let t in E){let e=A[t],i=C[t];if(d.hasOwnProperty(t))continue;let n=!1;($(e)&&$(i)?ip(e,i):e===i)?void 0!==e&&h.has(t)?M(t):v.protectedKeys[t]=!0:null!=e?M(t):h.add(t)}v.prevProp=g,v.prevResolvedValues=A,v.isActive&&(d={...d,...A}),n&&t.blockInitialAnimation&&(T=!1);let k=!(P&&w)||b;T&&k&&u.push(...S.map(t=>({animation:t,options:{type:f}})))}if(h.size){let e={};h.forEach(i=>{let n=t.getBaseTarget(i),r=t.getValue(i);r&&(r.liveStyle=!0),e[i]=null!=n?n:null}),u.push({animation:e})}let f=!!u.length;return n&&(!1===a.initial||a.initial===a.animate)&&!t.manuallyAnimateOnMount&&(f=!1),n=!1,f?e(u):Promise.resolve()}return{animateChanges:o,setActive:function(e,n){var r;if(i[e].isActive===n)return Promise.resolve();null===(r=t.variantChildren)||void 0===r||r.forEach(t=>{var i;return null===(i=t.animationState)||void 0===i?void 0:i.setActive(e,n)}),i[e].isActive=n;let s=o(e);for(let t in i)i[t].protectedKeys={};return s},setAnimateFunction:function(i){e=i(t)},getState:()=>i,reset:()=>{i=iT(),n=!0}}}(t))}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();r(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),null===(t=this.unmountControls)||void 0===t||t.call(this)}}let iA=0;class iC extends ib{constructor(){super(...arguments),this.id=iA++}update(){if(!this.node.presenceContext)return;let{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;let n=this.node.animationState.setActive("exit",!t);e&&!t&&n.then(()=>{e(this.id)})}mount(){let{register:t,onExitComplete:e}=this.node.presenceContext||{};e&&e(this.id),t&&(this.unmount=t(this.id))}unmount(){}}function iE(t,e,i,n={passive:!0}){return t.addEventListener(e,i,n),()=>t.removeEventListener(e,i)}function iM(t){return{point:{x:t.pageX,y:t.pageY}}}let ik=t=>e=>M(e)&&t(e,iM(e));function iV(t,e,i,n){return iE(t,e,ik(i),n)}let iR=(t,e)=>Math.abs(t-e);class iD{constructor(t,e,{transformPagePoint:i,contextWindow:n,dragSnapToOrigin:r=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let t=iF(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,i=function(t,e){return Math.sqrt(iR(t.x,e.x)**2+iR(t.y,e.y)**2)}(t.offset,{x:0,y:0})>=3;if(!e&&!i)return;let{point:n}=t,{timestamp:r}=_;this.history.push({...n,timestamp:r});let{onStart:s,onMove:o}=this.handlers;e||(s&&s(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=iL(e,this.transformPagePoint),q.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();let{onEnd:i,onSessionEnd:n,resumeAnimation:r}=this.handlers;if(this.dragSnapToOrigin&&r&&r(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let s=iF("pointercancel"===t.type?this.lastMoveEventInfo:iL(e,this.transformPagePoint),this.history);this.startEvent&&i&&i(t,s),n&&n(t,s)},!M(t))return;this.dragSnapToOrigin=r,this.handlers=e,this.transformPagePoint=i,this.contextWindow=n||window;let s=iL(iM(t),this.transformPagePoint),{point:o}=s,{timestamp:a}=_;this.history=[{...o,timestamp:a}];let{onSessionStart:l}=e;l&&l(t,iF(s,this.history)),this.removeListeners=eB(iV(this.contextWindow,"pointermove",this.handlePointerMove),iV(this.contextWindow,"pointerup",this.handlePointerUp),iV(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),K(this.updatePoint)}}function iL(t,e){return e?{point:e(t.point)}:t}function ij(t,e){return{x:t.x-e.x,y:t.y-e.y}}function iF({point:t},e){return{point:t,delta:ij(t,iB(e)),offset:ij(t,e[0]),velocity:function(t,e){if(t.length<2)return{x:0,y:0};let i=t.length-1,n=null,r=iB(t);for(;i>=0&&(n=t[i],!(r.timestamp-n.timestamp>F(.1)));)i--;if(!n)return{x:0,y:0};let s=B(r.timestamp-n.timestamp);if(0===s)return{x:0,y:0};let o={x:(r.x-n.x)/s,y:(r.y-n.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}(e,.1)}}function iB(t){return t[t.length-1]}function iO(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function iI(t){return t.max-t.min}function iU(t,e,i,n=.5){t.origin=n,t.originPoint=eE(e.min,e.max,t.origin),t.scale=iI(i)/iI(e),t.translate=eE(i.min,i.max,t.origin)-t.originPoint,(t.scale>=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function iN(t,e,i,n){iU(t.x,e.x,i.x,n?n.originX:void 0),iU(t.y,e.y,i.y,n?n.originY:void 0)}function i$(t,e,i){t.min=i.min+e.min,t.max=t.min+iI(e)}function iW(t,e,i){t.min=e.min-i.min,t.max=t.min+iI(e)}function iz(t,e,i){iW(t.x,e.x,i.x),iW(t.y,e.y,i.y)}function iH(t,e,i){return{min:void 0!==e?t.min+e:void 0,max:void 0!==i?t.max+i-(t.max-t.min):void 0}}function iX(t,e){let i=e.min-t.min,n=e.max-t.max;return e.max-e.min({translate:0,scale:1,origin:0,originPoint:0}),i_=()=>({x:iK(),y:iK()}),iG=()=>({min:0,max:0}),iZ=()=>({x:iG(),y:iG()});function iQ(t){return[t("x"),t("y")]}function iJ({top:t,left:e,right:i,bottom:n}){return{x:{min:e,max:i},y:{min:t,max:n}}}function i0(t){return void 0===t||1===t}function i1({scale:t,scaleX:e,scaleY:i}){return!i0(t)||!i0(e)||!i0(i)}function i5(t){return i1(t)||i2(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function i2(t){var e,i;return(e=t.x)&&"0%"!==e||(i=t.y)&&"0%"!==i}function i9(t,e,i,n,r){return void 0!==r&&(t=n+r*(t-n)),n+i*(t-n)+e}function i3(t,e=0,i=1,n,r){t.min=i9(t.min,e,i,n,r),t.max=i9(t.max,e,i,n,r)}function i6(t,{x:e,y:i}){i3(t.x,e.translate,e.scale,e.originPoint),i3(t.y,i.translate,i.scale,i.originPoint)}function i4(t,e){t.min=t.min+e,t.max=t.max+e}function i8(t,e,i,n,r=.5){let s=eE(t.min,t.max,r);i3(t,e,i,s,n)}function i7(t,e){i8(t.x,e.x,e.scaleX,e.scale,e.originX),i8(t.y,e.y,e.scaleY,e.scale,e.originY)}function nt(t,e){return iJ(function(t,e){if(!e)return t;let i=e({x:t.left,y:t.top}),n=e({x:t.right,y:t.bottom});return{top:i.y,left:i.x,bottom:n.y,right:n.x}}(t.getBoundingClientRect(),e))}let ne=({current:t})=>t?t.ownerDocument.defaultView:null,ni=new WeakMap;class nn{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=iZ(),this.visualElement=t}start(t,{snapToCursor:e=!1}={}){let{presenceContext:i}=this.visualElement;if(i&&!1===i.isPresent)return;let{dragSnapToOrigin:n}=this.getProps();this.panSession=new iD(t,{onSessionStart:t=>{let{dragSnapToOrigin:i}=this.getProps();i?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(iM(t).point)},onStart:(t,e)=>{var i;let{drag:n,dragPropagation:r,onDragStart:s}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(i=n)||"y"===i?b[i]?null:(b[i]=!0,()=>{b[i]=!1}):b.x||b.y?null:(b.x=b.y=!0,()=>{b.x=b.y=!1}),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),iQ(t=>{let e=this.getAxisMotionValue(t).get()||0;if(tI.test(e)){let{projection:i}=this.visualElement;if(i&&i.layout){let n=i.layout.layoutBox[t];n&&(e=iI(n)*(parseFloat(e)/100))}}this.originPoint[t]=e}),s&&q.postRender(()=>s(t,e)),ta(this.visualElement,"transform");let{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},onMove:(t,e)=>{let{dragPropagation:i,dragDirectionLock:n,onDirectionLock:r,onDrag:s}=this.getProps();if(!i&&!this.openDragLock)return;let{offset:o}=e;if(n&&null===this.currentDirection){this.currentDirection=function(t,e=10){let i=null;return Math.abs(t.y)>e?i="y":Math.abs(t.x)>e&&(i="x"),i}(o),null!==this.currentDirection&&r&&r(this.currentDirection);return}this.updateAxis("x",e.point,o),this.updateAxis("y",e.point,o),this.visualElement.render(),s&&s(t,e)},onSessionEnd:(t,e)=>this.stop(t,e),resumeAnimation:()=>iQ(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:n,contextWindow:ne(this.visualElement)})}stop(t,e){let i=this.isDragging;if(this.cancel(),!i)return;let{velocity:n}=e;this.startAnimation(n);let{onDragEnd:r}=this.getProps();r&&q.postRender(()=>r(t,e))}cancel(){this.isDragging=!1;let{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,i){let{drag:n}=this.getProps();if(!i||!nr(t,n,this.currentDirection))return;let r=this.getAxisMotionValue(t),s=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(s=function(t,{min:e,max:i},n){return void 0!==e&&ti&&(t=n?eE(i,t,n.max):Math.min(t,i)),t}(s,this.constraints[t],this.elastic[t])),r.set(s)}resolveConstraints(){var t;let{dragConstraints:e,dragElastic:i}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(t=this.visualElement.projection)||void 0===t?void 0:t.layout,r=this.constraints;e&&iO(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&n?this.constraints=function(t,{top:e,left:i,bottom:n,right:r}){return{x:iH(t.x,i,r),y:iH(t.y,e,n)}}(n.layoutBox,e):this.constraints=!1,this.elastic=function(t=.35){return!1===t?t=0:!0===t&&(t=.35),{x:iY(t,"left","right"),y:iY(t,"top","bottom")}}(i),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&iQ(t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){let i={};return void 0!==e.min&&(i.min=e.min-t.min),void 0!==e.max&&(i.max=e.max-t.min),i}(n.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){var t;let{dragConstraints:e,onMeasureDragConstraints:i}=this.getProps();if(!e||!iO(e))return!1;let n=e.current;O(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");let{projection:r}=this.visualElement;if(!r||!r.layout)return!1;let s=function(t,e,i){let n=nt(t,i),{scroll:r}=e;return r&&(i4(n.x,r.offset.x),i4(n.y,r.offset.y)),n}(n,r.root,this.visualElement.getTransformPagePoint()),o={x:iX((t=r.layout.layoutBox).x,s.x),y:iX(t.y,s.y)};if(i){let t=i(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=iJ(t))}return o}startAnimation(t){let{drag:e,dragMomentum:i,dragElastic:n,dragTransition:r,dragSnapToOrigin:s,onDragTransitionEnd:o}=this.getProps(),a=this.constraints||{};return Promise.all(iQ(o=>{if(!nr(o,e,this.currentDirection))return;let l=a&&a[o]||{};s&&(l={min:0,max:0});let u={type:"inertia",velocity:i?t[o]:0,bounceStiffness:n?200:1e6,bounceDamping:n?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...r,...l};return this.startAxisValueAnimation(o,u)})).then(o)}startAxisValueAnimation(t,e){let i=this.getAxisMotionValue(t);return ta(this.visualElement,t),i.start(iu(t,i,0,e,this.visualElement,!1))}stopAnimation(){iQ(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){iQ(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){let e=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps();return i[e]||this.visualElement.getValue(t,(i.initial?i.initial[t]:void 0)||0)}snapToCursor(t){iQ(e=>{let{drag:i}=this.getProps();if(!nr(e,i,this.currentDirection))return;let{projection:n}=this.visualElement,r=this.getAxisMotionValue(e);if(n&&n.layout){let{min:i,max:s}=n.layout.layoutBox[e];r.set(t[e]-eE(i,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:t,dragConstraints:e}=this.getProps(),{projection:i}=this.visualElement;if(!iO(e)||!i||!this.constraints)return;this.stopAnimation();let n={x:0,y:0};iQ(t=>{let e=this.getAxisMotionValue(t);if(e&&!1!==this.constraints){let i=e.get();n[t]=function(t,e){let i=.5,n=iI(t),r=iI(e);return r>n?i=x(e.min,e.max-n,t.min):n>r&&(i=x(t.min,t.max-r,e.min)),tb(0,1,i)}({min:i,max:i},this.constraints[t])}});let{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),iQ(e=>{if(!nr(e,t,null))return;let i=this.getAxisMotionValue(e),{min:r,max:s}=this.constraints[e];i.set(eE(r,s,n[e]))})}addListeners(){if(!this.visualElement.current)return;ni.set(this.visualElement,this);let t=iV(this.visualElement.current,"pointerdown",t=>{let{drag:e,dragListener:i=!0}=this.getProps();e&&i&&this.start(t)}),e=()=>{let{dragConstraints:t}=this.getProps();iO(t)&&t.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,n=i.addEventListener("measure",e);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),q.read(e);let r=iE(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(iQ(e=>{let i=this.getAxisMotionValue(e);i&&(this.originPoint[e]+=t[e].translate,i.set(i.get()+t[e].translate))}),this.visualElement.render())});return()=>{r(),t(),n(),s&&s()}}getProps(){let t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:i=!1,dragPropagation:n=!1,dragConstraints:r=!1,dragElastic:s=.35,dragMomentum:o=!0}=t;return{...t,drag:e,dragDirectionLock:i,dragPropagation:n,dragConstraints:r,dragElastic:s,dragMomentum:o}}}function nr(t,e,i){return(!0===e||e===t)&&(null===i||i===t)}class ns extends ib{constructor(t){super(t),this.removeGroupControls=O,this.removeListeners=O,this.controls=new nn(t)}mount(){let{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||O}unmount(){this.removeGroupControls(),this.removeListeners()}}let no=t=>(e,i)=>{t&&q.postRender(()=>t(e,i))};class na extends ib{constructor(){super(...arguments),this.removePointerDownListener=O}onPointerDown(t){this.session=new iD(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ne(this.node)})}createPanHandlers(){let{onPanSessionStart:t,onPanStart:e,onPan:i,onPanEnd:n}=this.node.getProps();return{onSessionStart:no(t),onStart:no(e),onMove:i,onEnd:(t,e)=>{delete this.session,n&&q.postRender(()=>n(t,e))}}}mount(){this.removePointerDownListener=iV(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}var nl,nu,nh=i(10488),nd=i(85556),nc=i(2077),np=i(97196);let nm=(0,nd.createContext)({}),nf={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function nv(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}let ng={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!tU.test(t))return t;t=parseFloat(t)}let i=nv(t,e.target.x),n=nv(t,e.target.y);return`${i}% ${n}%`}},ny={},{schedule:nx,cancel:nP}=Y(queueMicrotask,!1);class nw extends nd.Component{componentDidMount(){let{visualElement:t,layoutGroup:e,switchLayoutGroup:i,layoutId:n}=this.props,{projection:r}=t;!function(t){for(let e in t)ny[e]=t[e],em(e)&&(ny[e].isCSSVariable=!0)}(nb),r&&(e.group&&e.group.add(r),i&&i.register&&n&&i.register(r),r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,onExitComplete:()=>this.safeToRemove()})),nf.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){let{layoutDependency:e,visualElement:i,drag:n,isPresent:r}=this.props,s=i.projection;return s&&(s.isPresent=r,n||t.layoutDependency!==e||void 0===e?s.willUpdate():this.safeToRemove(),t.isPresent===r||(r?s.promote():s.relegate()||q.postRender(()=>{let t=s.getStack();t&&t.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),nx.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:t,layoutGroup:e,switchLayoutGroup:i}=this.props,{projection:n}=t;n&&(n.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(n),i&&i.deregister&&i.deregister(n))}safeToRemove(){let{safeToRemove:t}=this.props;t&&t()}render(){return null}}function nT(t){let[e,i]=(0,nc.xQ)(),n=(0,nd.useContext)(np.L);return(0,nh.jsx)(nw,{...t,layoutGroup:n,switchLayoutGroup:(0,nd.useContext)(nm),isPresent:e,safeToRemove:i})}let nb={borderRadius:{...ng,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ng,borderTopRightRadius:ng,borderBottomLeftRadius:ng,borderBottomRightRadius:ng,boxShadow:{correct:(t,{treeScale:e,projectionDelta:i})=>{let n=tJ.parse(t);if(n.length>5)return t;let r=tJ.createTransformer(t),s=+("number"!=typeof n[0]),o=i.x.scale*e.x,a=i.y.scale*e.y;n[0+s]/=o,n[1+s]/=a;let l=eE(o,a,.5);return"number"==typeof n[2+s]&&(n[2+s]/=l),"number"==typeof n[3+s]&&(n[3+s]/=l),r(n)}}},nS=(t,e)=>t.depth-e.depth;class nA{constructor(){this.children=[],this.isDirty=!1}add(t){J(this.children,t),this.isDirty=!0}remove(t){tt(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(nS),this.isDirty=!1,this.children.forEach(t)}}function nC(t){let e=to(t)?t.get():t;return W(e)?e.toValue():e}let nE=["TopLeft","TopRight","BottomLeft","BottomRight"],nM=nE.length,nk=t=>"string"==typeof t?parseFloat(t):t,nV=t=>"number"==typeof t||tU.test(t);function nR(t,e){return void 0!==t[e]?t[e]:t.borderRadius}let nD=nj(0,.5,tP),nL=nj(.5,.95,O);function nj(t,e,i){return n=>ne?1:i(x(t,e,n))}function nF(t,e){t.min=e.min,t.max=e.max}function nB(t,e){nF(t.x,e.x),nF(t.y,e.y)}function nO(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function nI(t,e,i,n,r){return t-=e,t=n+1/i*(t-n),void 0!==r&&(t=n+1/r*(t-n)),t}function nU(t,e,[i,n,r],s,o){!function(t,e=0,i=1,n=.5,r,s=t,o=t){if(tI.test(e)&&(e=parseFloat(e),e=eE(o.min,o.max,e/100)-o.min),"number"!=typeof e)return;let a=eE(s.min,s.max,n);t===s&&(a-=e),t.min=nI(t.min,e,i,a,r),t.max=nI(t.max,e,i,a,r)}(t,e[i],e[n],e[r],e.scale,s,o)}let nN=["x","scaleX","originX"],n$=["y","scaleY","originY"];function nW(t,e,i,n){nU(t.x,e,nN,i?i.x:void 0,n?n.x:void 0),nU(t.y,e,n$,i?i.y:void 0,n?n.y:void 0)}function nz(t){return 0===t.translate&&1===t.scale}function nH(t){return nz(t.x)&&nz(t.y)}function nX(t,e){return t.min===e.min&&t.max===e.max}function nY(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function nq(t,e){return nY(t.x,e.x)&&nY(t.y,e.y)}function nK(t){return iI(t.x)/iI(t.y)}function n_(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class nG{constructor(){this.members=[]}add(t){J(this.members,t),t.scheduleRender()}remove(t){if(tt(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){let t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){let e;let i=this.members.findIndex(e=>t===e);if(0===i)return!1;for(let t=i;t>=0;t--){let i=this.members[t];if(!1!==i.isPresent){e=i;break}}return!!e&&(this.promote(e),!0)}promote(t,e){let i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,e&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);let{crossfade:n}=t.options;!1===n&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{let{options:e,resumingFrom:i}=t;e.onExitComplete&&e.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}let nZ={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},nQ="undefined"!=typeof window&&void 0!==window.MotionDebug,nJ=["","X","Y","Z"],n0={visibility:"hidden"},n1=0;function n5(t,e,i,n){let{latestValues:r}=e;r[t]&&(i[t]=r[t],e.setStaticValue(t,0),n&&(n[t]=0))}function n2({attachResizeListener:t,defaultParent:e,measureScroll:i,checkIsScrollRoot:n,resetTransform:r}){return class{constructor(t={},i=null==e?void 0:e()){this.id=n1++,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,nQ&&(nZ.totalNodes=nZ.resolvedTargetDeltas=nZ.recalculatedProjection=0),this.nodes.forEach(n6),this.nodes.forEach(rn),this.nodes.forEach(rr),this.nodes.forEach(n4),nQ&&window.MotionDebug.record(nZ)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=i?i.root||i:this,this.path=i?[...i.path,i]:[],this.parent=i,this.depth=i?i.depth+1:0;for(let t=0;tthis.root.updateBlockedByResize=!1;t(e,()=>{this.root.updateBlockedByResize=!0,i&&i(),i=function(t,e){let i=Q.now(),n=({timestamp:r})=>{let s=r-i;s>=250&&(K(n),t(s-e))};return q.read(n,!0),()=>K(n)}(n,250),nf.hasAnimatedSinceResize&&(nf.hasAnimatedSinceResize=!1,this.nodes.forEach(ri))})}n&&this.root.registerSharedNode(n,this),!1!==this.options.animate&&s&&(n||r)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:i,layout:n})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let r=this.options.transition||s.getDefaultTransition()||rh,{onLayoutAnimationStart:o,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!nq(this.targetLayout,n),u=!e&&i;if(this.options.layoutRoot||this.resumeFrom||u||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(t,u);let e={...c(r,"layout"),onPlay:o,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e)}else e||ri(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=n})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,K(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(rs),this.animationId++)}getTransformTemplate(){let{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&function t(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:i}=e.options;if(!i)return;let n=i.props[tu];if(window.MotionHasOptimisedAnimation(n,"transform")){let{layout:t,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",q,!(t||i))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&t(r)}(this),this.root.isUpdating||this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),!this.snapshot||iI(this.snapshot.measuredBox.x)||iI(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t.999999999999&&(e.x=1),e.y<1.0000000000001&&e.y>.999999999999&&(e.y=1)}}(this.layoutCorrected,this.treeScale,this.path,i),e.layout&&!e.target&&(1!==this.treeScale.x||1!==this.treeScale.y)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=iZ());let{target:l}=e;if(!l){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}this.projectionDelta&&this.prevProjectionDelta?(nO(this.prevProjectionDelta.x,this.projectionDelta.x),nO(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),iN(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===o&&this.treeScale.y===a&&n_(this.projectionDelta.x,this.prevProjectionDelta.x)&&n_(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),nQ&&nZ.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){var e;if(null===(e=this.options.visualElement)||void 0===e||e.scheduleRender(),t){let t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=i_(),this.projectionDelta=i_(),this.projectionDeltaWithTransform=i_()}setAnimationOrigin(t,e=!1){let i;let n=this.snapshot,r=n?n.latestValues:{},s={...this.latestValues},o=i_();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;let a=iZ(),l=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),u=this.getStack(),h=!u||u.members.length<=1,d=!!(l&&!h&&!0===this.options.crossfade&&!this.path.some(ru));this.animationProgress=0,this.mixTargetDelta=e=>{let n=e/1e3;if(ra(o.x,t.x,n),ra(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){var u,c,p,m,f,v;if(iz(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox),p=this.relativeTarget,m=this.relativeTargetOrigin,f=a,v=n,rl(p.x,m.x,f.x,v),rl(p.y,m.y,f.y,v),i&&(u=this.relativeTarget,c=i,nX(u.x,c.x)&&nX(u.y,c.y)))this.isProjectionDirty=!1;i||(i=iZ()),nB(i,this.relativeTarget)}l&&(this.animationValues=s,function(t,e,i,n,r,s){r?(t.opacity=eE(0,void 0!==i.opacity?i.opacity:1,nD(n)),t.opacityExit=eE(void 0!==e.opacity?e.opacity:1,0,nL(n))):s&&(t.opacity=eE(void 0!==e.opacity?e.opacity:1,void 0!==i.opacity?i.opacity:1,n));for(let r=0;r{nf.hasAnimatedSinceResize=!0,this.currentAnimation=function(t,e,i){let n=to(0)?0:ts(t);return n.start(iu("",n,1e3,i)),n.animation}(0,0,{...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);let t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let t=this.getLead(),{targetWithTransforms:e,target:i,layout:n,latestValues:r}=t;if(e&&i&&n){if(this!==t&&this.layout&&n&&rm(this.options.animationType,this.layout.layoutBox,n.layoutBox)){i=this.target||iZ();let e=iI(this.layout.layoutBox.x);i.x.min=t.target.x.min,i.x.max=i.x.min+e;let n=iI(this.layout.layoutBox.y);i.y.min=t.target.y.min,i.y.max=i.y.min+n}nB(e,i),i7(e,r),iN(this.projectionDeltaWithTransform,this.layoutCorrected,e,r)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new nG),this.sharedNodes.get(t).add(e);let i=e.options.initialPromotionConfig;e.promote({transition:i?i.transition:void 0,preserveFollowOpacity:i&&i.shouldPreserveFollowOpacity?i.shouldPreserveFollowOpacity(e):void 0})}isLead(){let t=this.getStack();return!t||t.lead===this}getLead(){var t;let{layoutId:e}=this.options;return e&&(null===(t=this.getStack())||void 0===t?void 0:t.lead)||this}getPrevLead(){var t;let{layoutId:e}=this.options;return e?null===(t=this.getStack())||void 0===t?void 0:t.prevLead:void 0}getStack(){let{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:i}={}){let n=this.getStack();n&&n.promote(this,i),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){let t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){let{visualElement:t}=this.options;if(!t)return;let e=!1,{latestValues:i}=t;if((i.z||i.rotate||i.rotateX||i.rotateY||i.rotateZ||i.skewX||i.skewY)&&(e=!0),!e)return;let n={};i.z&&n5("z",t,n,this.animationValues);for(let e=0;e{var e;return null===(e=t.currentAnimation)||void 0===e?void 0:e.stop()}),this.root.nodes.forEach(n7),this.root.sharedNodes.clear()}}}function n9(t){t.updateLayout()}function n3(t){var e;let i=(null===(e=t.resumeFrom)||void 0===e?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&i&&t.hasListeners("didUpdate")){let{layoutBox:e,measuredBox:n}=t.layout,{animationType:r}=t.options,s=i.source!==t.layout.source;"size"===r?iQ(t=>{let n=s?i.measuredBox[t]:i.layoutBox[t],r=iI(n);n.min=e[t].min,n.max=n.min+r}):rm(r,i.layoutBox,e)&&iQ(n=>{let r=s?i.measuredBox[n]:i.layoutBox[n],o=iI(e[n]);r.max=r.min+o,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[n].max=t.relativeTarget[n].min+o)});let o=i_();iN(o,e,i.layoutBox);let a=i_();s?iN(a,t.applyTransform(n,!0),i.measuredBox):iN(a,e,i.layoutBox);let l=!nH(o),u=!1;if(!t.resumeFrom){let n=t.getClosestProjectingParent();if(n&&!n.resumeFrom){let{snapshot:r,layout:s}=n;if(r&&s){let o=iZ();iz(o,i.layoutBox,r.layoutBox);let a=iZ();iz(a,e,s.layoutBox),nq(o,a)||(u=!0),n.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=o,t.relativeParent=n)}}}t.notifyListeners("didUpdate",{layout:e,snapshot:i,delta:a,layoutDelta:o,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(t.isLead()){let{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function n6(t){nQ&&nZ.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function n4(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function n8(t){t.clearSnapshot()}function n7(t){t.clearMeasurements()}function rt(t){t.isLayoutDirty=!1}function re(t){let{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function ri(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function rn(t){t.resolveTargetDelta()}function rr(t){t.calcProjection()}function rs(t){t.resetSkewAndRotation()}function ro(t){t.removeLeadSnapshot()}function ra(t,e,i){t.translate=eE(e.translate,0,i),t.scale=eE(e.scale,1,i),t.origin=e.origin,t.originPoint=e.originPoint}function rl(t,e,i,n){t.min=eE(e.min,i.min,n),t.max=eE(e.max,i.max,n)}function ru(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}let rh={duration:.45,ease:[.4,0,.1,1]},rd=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),rc=rd("applewebkit/")&&!rd("chrome/")?Math.round:O;function rp(t){t.min=rc(t.min),t.max=rc(t.max)}function rm(t,e,i){return"position"===t||"preserve-aspect"===t&&!(.2>=Math.abs(nK(e)-nK(i)))}function rf(t){var e;return t!==t.root&&(null===(e=t.scroll)||void 0===e?void 0:e.wasRoot)}let rv=n2({attachResizeListener:(t,e)=>iE(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),rg={current:void 0},ry=n2({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!rg.current){let t=new rv({});t.mount(window),t.setOptions({layoutScroll:!0}),rg.current=t}return rg.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>"fixed"===window.getComputedStyle(t).position});function rx(t,e,i){let{props:n}=t;t.animationState&&n.whileHover&&t.animationState.setActive("whileHover","Start"===i);let r=n["onHover"+i];r&&q.postRender(()=>r(e,iM(e)))}class rP extends ib{mount(){let{current:t}=this.node;t&&(this.unmount=function(t,e,i={}){let[n,r,s]=S(t,i),o=t=>{if(!A(t))return;let{target:i}=t,n=e(i,t);if("function"!=typeof n||!i)return;let s=t=>{A(t)&&(n(t),i.removeEventListener("pointerleave",s))};i.addEventListener("pointerleave",s,r)};return n.forEach(t=>{t.addEventListener("pointerenter",o,r)}),s}(t,(t,e)=>(rx(this.node,e,"Start"),t=>rx(this.node,t,"End"))))}unmount(){}}class rw extends ib{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=eB(iE(this.node.current,"focus",()=>this.onFocus()),iE(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function rT(t,e,i){let{props:n}=t;t.animationState&&n.whileTap&&t.animationState.setActive("whileTap","Start"===i);let r=n["onTap"+("End"===i?"":i)];r&&q.postRender(()=>r(e,iM(e)))}class rb extends ib{mount(){let{current:t}=this.node;t&&(this.unmount=function(t,e,i={}){let[n,r,s]=S(t,i),o=t=>{let i=t.currentTarget;if(!i||!j(t)||V.has(i))return;V.add(i),C(t,"set");let n=e(i,t),s=(t,e)=>{i.removeEventListener("pointerup",o),i.removeEventListener("pointercancel",a),C(t,"release"),j(t)&&V.has(i)&&(V.delete(i),"function"==typeof n&&n(t,{success:e}))},o=t=>{var e,n;t.isTrusted&&(e=t,n=i instanceof Element?i.getBoundingClientRect():{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight},e.clientXn.right||e.clientYn.bottom)?s(t,!1):s(t,!(i instanceof Element)||E(i,t.target))},a=t=>{s(t,!1)};i.addEventListener("pointerup",o,r),i.addEventListener("pointercancel",a,r),i.addEventListener("lostpointercapture",a,r)};return n.forEach(t=>{t=i.useGlobalTarget?window:t;let e=!1;if(t instanceof HTMLElement){var n;e=!0,n=t,!k.has(n.tagName)&&-1===n.tabIndex&&null===t.getAttribute("tabindex")&&(t.tabIndex=0)}t.addEventListener("pointerdown",o,r),e&&t.addEventListener("focus",t=>L(t,r),r)}),s}(t,(t,e)=>(rT(this.node,e,"Start"),(t,{success:e})=>rT(this.node,t,e?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}let rS=new WeakMap,rA=new WeakMap,rC=t=>{let e=rS.get(t.target);e&&e(t)},rE=t=>{t.forEach(rC)},rM={some:0,all:1};class rk extends ib{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:t={}}=this.node.getProps(),{root:e,margin:i,amount:n="some",once:r}=t,s={root:e?e.current:void 0,rootMargin:i,threshold:"number"==typeof n?n:rM[n]};return function(t,e,i){let n=function({root:t,...e}){let i=t||document;rA.has(i)||rA.set(i,{});let n=rA.get(i),r=JSON.stringify(e);return n[r]||(n[r]=new IntersectionObserver(rE,{root:t,...e})),n[r]}(e);return rS.set(t,i),n.observe(t),()=>{rS.delete(t),n.unobserve(t)}}(this.node.current,s,t=>{let{isIntersecting:e}=t;if(this.isInView===e||(this.isInView=e,r&&!e&&this.hasEnteredView))return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);let{onViewportEnter:i,onViewportLeave:n}=this.node.getProps(),s=e?i:n;s&&s(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;let{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return i=>t[i]!==e[i]}(t,e))&&this.startObserver()}unmount(){}}let rV=(0,nd.createContext)({strict:!1});var rR=i(85811);let rD=(0,nd.createContext)({});function rL(t){return r(t.animate)||ig.some(e=>im(t[e]))}function rj(t){return!!(rL(t)||t.variants)}function rF(t){return Array.isArray(t)?t.join(" "):t}var rB=i(69069);let rO={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"]},rI={};for(let t in rO)rI[t]={isEnabled:e=>rO[t].some(t=>!!e[t])};let rU=Symbol.for("motionComponentSymbol");var rN=i(14394),r$=i(29061);function rW(t,{layout:e,layoutId:i}){return U.has(t)||t.startsWith("origin")||(e||void 0!==i)&&(!!ny[t]||"opacity"===t)}let rz=(t,e)=>e&&"number"==typeof t?e.transform(t):t,rH={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},rX=I.length;function rY(t,e,i){let{style:n,vars:r,transformOrigin:s}=t,o=!1,a=!1;for(let t in e){let i=e[t];if(U.has(t)){o=!0;continue}if(em(t)){r[t]=i;continue}{let e=rz(i,t3[t]);t.startsWith("origin")?(a=!0,s[t]=e):n[t]=e}}if(!e.transform&&(o||i?n.transform=function(t,e,i){let n="",r=!0;for(let s=0;s({style:{},transform:{},transformOrigin:{},vars:{}});function rK(t,e,i){for(let n in e)to(e[n])||rW(n,i)||(t[n]=e[n])}let r_=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 rG(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||r_.has(t)}let rZ=t=>!rG(t);try{!function(t){t&&(rZ=e=>e.startsWith("on")?!rG(e):t(e))}(i(97578).A)}catch(t){}let rQ=["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 rJ(t){if("string"!=typeof t||t.includes("-"));else if(rQ.indexOf(t)>-1||/[A-Z]/u.test(t))return!0;return!1}let r0={offset:"stroke-dashoffset",array:"stroke-dasharray"},r1={offset:"strokeDashoffset",array:"strokeDasharray"};function r5(t,e,i){return"string"==typeof t?t:tU.transform(e+i*t)}function r2(t,{attrX:e,attrY:i,attrScale:n,originX:r,originY:s,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},h,d){if(rY(t,u,d),h){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};let{attrs:c,style:p,dimensions:m}=t;c.transform&&(m&&(p.transform=c.transform),delete c.transform),m&&(void 0!==r||void 0!==s||p.transform)&&(p.transformOrigin=function(t,e,i){let n=r5(e,t.x,t.width),r=r5(i,t.y,t.height);return`${n} ${r}`}(m,void 0!==r?r:.5,void 0!==s?s:.5)),void 0!==e&&(c.x=e),void 0!==i&&(c.y=i),void 0!==n&&(c.scale=n),void 0!==o&&function(t,e,i=1,n=0,r=!0){t.pathLength=1;let s=r?r0:r1;t[s.offset]=tU.transform(-n);let o=tU.transform(e),a=tU.transform(i);t[s.array]=`${o} ${a}`}(c,o,a,l,!1)}let r9=()=>({...rq(),attrs:{}}),r3=t=>"string"==typeof t&&"svg"===t.toLowerCase();var r6=i(76740);let r4=t=>(e,i)=>{let n=(0,nd.useContext)(rD),s=(0,nd.useContext)(rN.t),a=()=>(function({scrapeMotionValuesFromProps:t,createRenderState:e,onUpdate:i},n,s,a){let l={latestValues:function(t,e,i,n){let s={},a=n(t,{});for(let t in a)s[t]=nC(a[t]);let{initial:l,animate:u}=t,h=rL(t),d=rj(t);e&&d&&!h&&!1!==t.inherit&&(void 0===l&&(l=e.initial),void 0===u&&(u=e.animate));let c=!!i&&!1===i.initial,p=(c=c||!1===l)?u:l;if(p&&"boolean"!=typeof p&&!r(p)){let e=Array.isArray(p)?p:[p];for(let i=0;ii({props:n,current:t,...l}),l.onUpdate=t=>i(t)),l})(t,e,n,s);return i?a():(0,r6.M)(a)};function r8(t,e,i){var n;let{style:r}=t,s={};for(let o in r)(to(r[o])||e.style&&to(e.style[o])||rW(o,t)||(null===(n=null==i?void 0:i.getValue(o))||void 0===n?void 0:n.liveStyle)!==void 0)&&(s[o]=r[o]);return s}let r7={useVisualState:r4({scrapeMotionValuesFromProps:r8,createRenderState:rq})};function st(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}}}function se(t,{style:e,vars:i},n,r){for(let s in Object.assign(t.style,e,r&&r.getProjectionStyles(n)),i)t.style.setProperty(s,i[s])}let si=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 sn(t,e,i,n){for(let i in se(t,e,void 0,n),e.attrs)t.setAttribute(si.has(i)?i:tl(i),e.attrs[i])}function sr(t,e,i){let n=r8(t,e,i);for(let i in t)(to(t[i])||to(e[i]))&&(n[-1!==I.indexOf(i)?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i]=t[i]);return n}let ss=["x","y","width","height","cx","cy","r"],so={useVisualState:r4({scrapeMotionValuesFromProps:sr,createRenderState:r9,onUpdate:({props:t,prevProps:e,current:i,renderState:n,latestValues:r})=>{if(!i)return;let s=!!t.drag;if(!s){for(let t in r)if(U.has(t)){s=!0;break}}if(!s)return;let o=!e;if(e)for(let i=0;i{st(i,n),q.render(()=>{r2(n,r,r3(i.tagName),t.transformTemplate),sn(i,n)})})}})},sa={current:null},sl={current:!1},su=[...eP,tH,tJ],sh=t=>su.find(ex(t)),sd=new WeakMap,sc=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class sp{scrapeMotionValuesFromProps(t,e,i){return{}}constructor({parent:t,props:e,presenceContext:i,reducedMotionConfig:n,blockInitialAnimation:r,visualState:s},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ed,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let t=Q.now();this.renderScheduledAtthis.bindToMotionValue(e,t)),sl.current||function(){if(sl.current=!0,rB.B){if(window.matchMedia){let t=window.matchMedia("(prefers-reduced-motion)"),e=()=>sa.current=t.matches;t.addListener(e),e()}else sa.current=!1}}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||sa.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){for(let t in this.projection&&this.projection.unmount(),K(this.notifyUpdate),K(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this),this.events)this.events[t].clear();for(let t in this.features){let e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}bindToMotionValue(t,e){let i;this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();let n=U.has(t);n&&this.onBindTransform&&this.onBindTransform();let r=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&q.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),s=e.on("renderRequest",this.scheduleRender);window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{r(),s(),i&&i(),e.owner&&e.stop()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in rI){let e=rI[t];if(!e)continue;let{isEnabled:i,Feature:n}=e;if(!this.features[t]&&n&&i(this.props)&&(this.features[t]=new n(this)),this.features[t]){let e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):iZ()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;ee.variantChildren.delete(t)}addValue(t,e){let i=this.values.get(t);e!==i&&(i&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);let e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let i=this.values.get(t);return void 0===i&&void 0!==e&&(i=ts(null===e?void 0:e,{owner:this}),this.addValue(t,i)),i}readValue(t,e){var i;let n=void 0===this.latestValues[t]&&this.current?null!==(i=this.getBaseTargetFromProps(this.props,t))&&void 0!==i?i:this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];return null!=n&&("string"==typeof n&&(ec(n)||tT(n))?n=parseFloat(n):!sh(n)&&tJ.test(e)&&(n=t8(t,e)),this.setBaseTarget(t,to(n)?n.get():n)),to(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;let i;let{initial:n}=this.props;if("string"==typeof n||"object"==typeof n){let r=o(this.props,n,null===(e=this.presenceContext)||void 0===e?void 0:e.custom);r&&(i=r[t])}if(n&&void 0!==i)return i;let r=this.getBaseTargetFromProps(this.props,t);return void 0===r||to(r)?void 0!==this.initialValues[t]&&void 0===i?void 0:this.baseTarget[t]:r}on(t,e){return this.events[t]||(this.events[t]=new te),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class sm extends sp{constructor(){super(...arguments),this.KeyframeResolver=eT}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:i}){delete e[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:t}=this.props;to(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}class sf extends sm{constructor(){super(...arguments),this.type="html",this.renderInstance=se}readValueFromInstance(t,e){if(U.has(e)){let t=t4(e);return t&&t.default||0}{let i=window.getComputedStyle(t),n=(em(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof n?n.trim():n}}measureInstanceViewportBox(t,{transformPagePoint:e}){return nt(t,e)}build(t,e,i){rY(t,e,i.transformTemplate)}scrapeMotionValuesFromProps(t,e,i){return r8(t,e,i)}}class sv extends sm{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=iZ,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&st(this.current,this.renderState)}}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(U.has(e)){let t=t4(e);return t&&t.default||0}return e=si.has(e)?e:tl(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,i){return sr(t,e,i)}onBindTransform(){this.current&&!this.renderState.dimensions&&q.postRender(this.updateDimensions)}build(t,e,i){r2(t,e,this.isSVGTag,i.transformTemplate)}renderInstance(t,e,i,n){sn(t,e,i,n)}mount(t){this.isSVGTag=r3(t.tagName),super.mount(t)}}let sg=function(t){if("undefined"==typeof Proxy)return t;let e=new Map;return new Proxy((...e)=>t(...e),{get:(i,n)=>"create"===n?t:(e.has(n)||e.set(n,t(n)),e.get(n))})}((nl={animation:{Feature:iS},exit:{Feature:iC},inView:{Feature:rk},tap:{Feature:rb},focus:{Feature:rw},hover:{Feature:rP},pan:{Feature:na},drag:{Feature:ns,ProjectionNode:ry,MeasureLayout:nT},layout:{ProjectionNode:ry,MeasureLayout:nT}},nu=(t,e)=>rJ(t)?new sv(e):new sf(e,{allowProjection:t!==nd.Fragment}),function(t,{forwardMotionProps:e}={forwardMotionProps:!1}){return function({preloadedFeatures:t,createVisualElement:e,useRender:i,useVisualState:n,Component:r}){var s,o;function a(t,s){var o,a,l;let u;let h={...(0,nd.useContext)(rR.Q),...t,layoutId:function({layoutId:t}){let e=(0,nd.useContext)(np.L).id;return e&&void 0!==t?e+"-"+t:t}(t)},{isStatic:d}=h,c=function(t){let{initial:e,animate:i}=function(t,e){if(rL(t)){let{initial:e,animate:i}=t;return{initial:!1===e||im(e)?e:void 0,animate:im(i)?i:void 0}}return!1!==t.inherit?e:{}}(t,(0,nd.useContext)(rD));return(0,nd.useMemo)(()=>({initial:e,animate:i}),[rF(e),rF(i)])}(t),p=n(t,d);if(!d&&rB.B){a=0,l=0,(0,nd.useContext)(rV).strict;let t=function(t){let{drag:e,layout:i}=rI;if(!e&&!i)return{};let n={...e,...i};return{MeasureLayout:(null==e?void 0:e.isEnabled(t))||(null==i?void 0:i.isEnabled(t))?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}(h);u=t.MeasureLayout,c.visualElement=function(t,e,i,n,r){var s,o;let{visualElement:a}=(0,nd.useContext)(rD),l=(0,nd.useContext)(rV),u=(0,nd.useContext)(rN.t),h=(0,nd.useContext)(rR.Q).reducedMotion,d=(0,nd.useRef)(null);n=n||l.renderer,!d.current&&n&&(d.current=n(t,{visualState:e,parent:a,props:i,presenceContext:u,blockInitialAnimation:!!u&&!1===u.initial,reducedMotionConfig:h}));let c=d.current,p=(0,nd.useContext)(nm);c&&!c.projection&&r&&("html"===c.type||"svg"===c.type)&&function(t,e,i,n){let{layoutId:r,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u}=e;t.projection=new i(t.latestValues,e["data-framer-portal-id"]?void 0:function t(e){if(e)return!1!==e.options.allowProjection?e.projection:t(e.parent)}(t.parent)),t.projection.setOptions({layoutId:r,layout:s,alwaysMeasureLayout:!!o||a&&iO(a),visualElement:t,animationType:"string"==typeof s?s:"both",initialPromotionConfig:n,layoutScroll:l,layoutRoot:u})}(d.current,i,r,p);let m=(0,nd.useRef)(!1);(0,nd.useInsertionEffect)(()=>{c&&m.current&&c.update(i,u)});let f=i[tu],v=(0,nd.useRef)(!!f&&!(null===(s=window.MotionHandoffIsComplete)||void 0===s?void 0:s.call(window,f))&&(null===(o=window.MotionHasOptimisedAnimation)||void 0===o?void 0:o.call(window,f)));return(0,r$.E)(()=>{c&&(m.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),nx.render(c.render),v.current&&c.animationState&&c.animationState.animateChanges())}),(0,nd.useEffect)(()=>{c&&(!v.current&&c.animationState&&c.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var t;null===(t=window.MotionHandoffMarkAsComplete)||void 0===t||t.call(window,f)}),v.current=!1))}),c}(r,p,h,e,t.ProjectionNode)}return(0,nh.jsxs)(rD.Provider,{value:c,children:[u&&c.visualElement?(0,nh.jsx)(u,{visualElement:c.visualElement,...h}):null,i(r,t,(o=c.visualElement,(0,nd.useCallback)(t=>{t&&p.onMount&&p.onMount(t),o&&(t?o.mount(t):o.unmount()),s&&("function"==typeof s?s(t):iO(s)&&(s.current=t))},[o])),p,d,c.visualElement)]})}t&&function(t){for(let e in t)rI[e]={...rI[e],...t[e]}}(t),a.displayName=`motion.${"string"==typeof r?r:`create(${null!==(o=null!==(s=r.displayName)&&void 0!==s?s:r.name)&&void 0!==o?o:""})`}`;let l=(0,nd.forwardRef)(a);return l[rU]=r,l}({...rJ(t)?so:r7,preloadedFeatures:nl,useRender:function(t=!1){return(e,i,n,{latestValues:r},s)=>{let o=(rJ(e)?function(t,e,i,n){let r=(0,nd.useMemo)(()=>{let i=r9();return r2(i,e,r3(n),t.transformTemplate),{...i.attrs,style:{...i.style}}},[e]);if(t.style){let e={};rK(e,t.style,t),r.style={...e,...r.style}}return r}:function(t,e){let i={},n=function(t,e){let i=t.style||{},n={};return rK(n,i,t),Object.assign(n,function({transformTemplate:t},e){return(0,nd.useMemo)(()=>{let i=rq();return rY(i,e,t),Object.assign({},i.vars,i.style)},[e])}(t,e)),n}(t,e);return t.drag&&!1!==t.dragListener&&(i.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=!0===t.drag?"none":`pan-${"x"===t.drag?"y":"x"}`),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(i.tabIndex=0),i.style=n,i})(i,r,s,e),a=function(t,e,i){let n={};for(let r in t)("values"!==r||"object"!=typeof t.values)&&(rZ(r)||!0===i&&rG(r)||!e&&!rG(r)||t.draggable&&r.startsWith("onDrag"))&&(n[r]=t[r]);return n}(i,"string"==typeof e,t),l=e!==nd.Fragment?{...a,...o,ref:n}:{},{children:u}=i,h=(0,nd.useMemo)(()=>to(u)?u.get():u,[u]);return(0,nd.createElement)(e,{...l,children:h})}}(e),createVisualElement:nu,Component:t})}))},97196:(t,e,i)=>{i.d(e,{L:()=>n});let n=(0,i(85556).createContext)({})},97578:(t,e,i)=>{i.d(e,{A:()=>r});var n=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/;let r=function(t){var e={};return function(i){return void 0===e[i]&&(e[i]=t(i)),e[i]}}(function(t){return n.test(t)||111===t.charCodeAt(0)&&110===t.charCodeAt(1)&&91>t.charCodeAt(2)})}}]);