import{j as je}from"./core_mui0-BjkrVKz2.js";import{r as P}from"./core_react-CG6RzQpT.js";const fi=P.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),ae=P.createContext({}),ln=P.createContext(null),cn=typeof document<"u",di=cn?P.useLayoutEffect:P.useEffect,pi=P.createContext({strict:!1}),un=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),lo="framerAppearId",mi="data-"+un(lo),co={skipAnimations:!1,useManualTiming:!1};class Kn{constructor(){this.order=[],this.scheduled=new Set}add(e){if(!this.scheduled.has(e))return this.scheduled.add(e),this.order.push(e),!0}remove(e){const n=this.order.indexOf(e);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}function uo(t){let e=new Kn,n=new Kn,s=0,i=!1,o=!1;const r=new WeakSet,a={schedule:(c,u=!1,l=!1)=>{const h=l&&i,f=h?e:n;return u&&r.add(c),f.add(c)&&h&&i&&(s=e.order.length),c},cancel:c=>{n.remove(c),r.delete(c)},process:c=>{if(i){o=!0;return}if(i=!0,[e,n]=[n,e],n.clear(),s=e.order.length,s)for(let u=0;u<s;u++){const l=e.order[u];r.has(l)&&(a.schedule(l),t()),l(c)}i=!1,o&&(o=!1,a.process(c))}};return a}const $t=["read","resolveKeyframes","update","preRender","render","postRender"],ho=40;function gi(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=$t.reduce((h,f)=>(h[f]=uo(()=>n=!0),h),{}),r=h=>{o[h].process(i)},a=()=>{const h=performance.now();n=!1,i.delta=s?1e3/60:Math.max(Math.min(h-i.timestamp,ho),1),i.timestamp=h,i.isProcessing=!0,$t.forEach(r),i.isProcessing=!1,n&&e&&(s=!1,t(a))},c=()=>{n=!0,s=!0,i.isProcessing||t(a)};return{schedule:$t.reduce((h,f)=>{const m=o[f];return h[f]=(d,g=!1,v=!1)=>(n||c(),m.schedule(d,g,v)),h},{}),cancel:h=>$t.forEach(f=>o[f].cancel(h)),state:i,steps:o}}const{schedule:hn,cancel:tf}=gi(queueMicrotask,!1);function yt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}const yi=P.createContext({});let $n=!1;function fo(t,e,n,s,i){const{visualElement:o}=P.useContext(ae),r=P.useContext(pi),a=P.useContext(ln),c=P.useContext(fi).reducedMotion,u=P.useRef();s=s||r.renderer,!u.current&&s&&(u.current=s(t,{visualState:e,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:c}));const l=u.current,h=P.useContext(yi);l&&!l.projection&&i&&(l.type==="html"||l.type==="svg")&&mo(u.current,n,i,h),P.useInsertionEffect(()=>{l&&l.update(n,a)});const f=P.useRef(!!(n[mi]&&!window.HandoffComplete));return di(()=>{l&&(l.updateFeatures(),hn.render(l.render),f.current&&l.animationState&&l.animationState.animateChanges())}),P.useEffect(()=>{l&&(!f.current&&l.animationState&&l.animationState.animateChanges(),f.current&&(f.current=!1,$n||($n=!0,queueMicrotask(po))))}),l}function po(){window.HandoffComplete=!0}function mo(t,e,n,s){const{layoutId:i,layout:o,drag:r,dragConstraints:a,layoutScroll:c,layoutRoot:u}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:vi(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!r||a&&yt(a),visualElement:t,scheduleRender:()=>t.scheduleRender(),animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,layoutScroll:c,layoutRoot:u})}function vi(t){if(t)return t.options.allowProjection!==!1?t.projection:vi(t.parent)}function go(t,e,n){return P.useCallback(s=>{s&&t.mount&&t.mount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):yt(n)&&(n.current=s))},[e])}function Lt(t){return typeof t=="string"||Array.isArray(t)}function le(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const fn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],dn=["initial",...fn];function ce(t){return le(t.animate)||dn.some(e=>Lt(t[e]))}function Ti(t){return!!(ce(t)||t.variants)}function yo(t,e){if(ce(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Lt(n)?n:void 0,animate:Lt(s)?s:void 0}}return t.inherit!==!1?e:{}}function vo(t){const{initial:e,animate:n}=yo(t,P.useContext(ae));return P.useMemo(()=>({initial:e,animate:n}),[Wn(e),Wn(n)])}function Wn(t){return Array.isArray(t)?t.join(" "):t}const zn={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"]},bt={};for(const t in zn)bt[t]={isEnabled:e=>zn[t].some(n=>!!e[n])};function To(t){for(const e in t)bt[e]={...bt[e],...t[e]}}const xi=P.createContext({}),xo=Symbol.for("motionComponentSymbol"),B=t=>t;let Ne=B;function bo({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:s,Component:i}){t&&To(t);function o(a,c){let u;const l={...P.useContext(fi),...a,layoutId:So(a)},{isStatic:h}=l,f=vo(a),m=s(a,h);if(!h&&cn){wo();const d=Po(l);u=d.MeasureLayout,f.visualElement=fo(i,m,l,e,d.ProjectionNode)}return je.jsxs(ae.Provider,{value:f,children:[u&&f.visualElement?je.jsx(u,{visualElement:f.visualElement,...l}):null,n(i,a,go(m,f.visualElement,c),m,h,f.visualElement)]})}const r=P.forwardRef(o);return r[xo]=i,r}function So({layoutId:t}){const e=P.useContext(xi).id;return e&&t!==void 0?e+"-"+t:t}function wo(t,e){P.useContext(pi).strict}function Po(t){const{drag:e,layout:n}=bt;if(!e&&!n)return{};const s={...e,...n};return{MeasureLayout:e!=null&&e.isEnabled(t)||n!=null&&n.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function Ao(t){function e(s,i={}){return bo(t(s,i))}if(typeof Proxy>"u")return e;const n=new Map;return new Proxy(e,{get:(s,i)=>(n.has(i)||n.set(i,e(i)),n.get(i))})}const Ro=["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 pn(t){return typeof t!="string"||t.includes("-")?!1:!!(Ro.indexOf(t)>-1||/[A-Z]/u.test(t))}const Zt={};function Co(t){Object.assign(Zt,t)}const Nt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],mt=new Set(Nt);function bi(t,{layout:e,layoutId:n}){return mt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Zt[t]||t==="opacity")}const F=t=>!!(t&&t.getVelocity),Eo={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Vo=Nt.length;function Do(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},s,i){let o="";for(let r=0;r<Vo;r++){const a=Nt[r];if(t[a]!==void 0){const c=Eo[a]||a;o+=`${c}(${t[a]}) `}}return e&&!t.z&&(o+="translateZ(0)"),o=o.trim(),i?o=i(t,s?"":o):n&&s&&(o="none"),o}const Si=t=>e=>typeof e=="string"&&e.startsWith(t),wi=Si("--"),Oo=Si("var(--"),mn=t=>Oo(t)?Mo.test(t.split("/*")[0].trim()):!1,Mo=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Lo=(t,e)=>e&&typeof t=="number"?e.transform(t):t,rt=(t,e,n)=>n>e?e:n<t?t:n,wt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Vt={...wt,transform:t=>rt(0,1,t)},Wt={...wt,default:1},Dt=t=>Math.round(t*1e5)/1e5,gn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,Fo=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,Bo=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function It(t){return typeof t=="string"}const Ut=t=>({test:e=>It(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),et=Ut("deg"),q=Ut("%"),b=Ut("px"),ko=Ut("vh"),jo=Ut("vw"),qn={...q,parse:t=>q.parse(t)/100,transform:t=>q.transform(t*100)},Gn={...wt,transform:Math.round},Pi={borderWidth:b,borderTopWidth:b,borderRightWidth:b,borderBottomWidth:b,borderLeftWidth:b,borderRadius:b,radius:b,borderTopLeftRadius:b,borderTopRightRadius:b,borderBottomRightRadius:b,borderBottomLeftRadius:b,width:b,maxWidth:b,height:b,maxHeight:b,size:b,top:b,right:b,bottom:b,left:b,padding:b,paddingTop:b,paddingRight:b,paddingBottom:b,paddingLeft:b,margin:b,marginTop:b,marginRight:b,marginBottom:b,marginLeft:b,rotate:et,rotateX:et,rotateY:et,rotateZ:et,scale:Wt,scaleX:Wt,scaleY:Wt,scaleZ:Wt,skew:et,skewX:et,skewY:et,distance:b,translateX:b,translateY:b,translateZ:b,x:b,y:b,z:b,perspective:b,transformPerspective:b,opacity:Vt,originX:qn,originY:qn,originZ:b,zIndex:Gn,backgroundPositionX:b,backgroundPositionY:b,fillOpacity:Vt,strokeOpacity:Vt,numOctaves:Gn};function yn(t,e,n,s){const{style:i,vars:o,transform:r,transformOrigin:a}=t;let c=!1,u=!1,l=!0;for(const h in e){const f=e[h];if(wi(h)){o[h]=f;continue}const m=Pi[h],d=Lo(f,m);if(mt.has(h)){if(c=!0,r[h]=d,!l)continue;f!==(m.default||0)&&(l=!1)}else h.startsWith("origin")?(u=!0,a[h]=d):i[h]=d}if(e.transform||(c||s?i.transform=Do(t.transform,n,l,s):i.transform&&(i.transform="none")),u){const{originX:h="50%",originY:f="50%",originZ:m=0}=a;i.transformOrigin=`${h} ${f} ${m}`}}const vn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Ai(t,e,n){for(const s in e)!F(e[s])&&!bi(s,n)&&(t[s]=e[s])}function No({transformTemplate:t},e,n){return P.useMemo(()=>{const s=vn();return yn(s,e,{enableHardwareAcceleration:!n},t),Object.assign({},s.vars,s.style)},[e])}function Io(t,e,n){const s=t.style||{},i={};return Ai(i,s,t),Object.assign(i,No(t,e,n)),i}function Uo(t,e,n){const s={},i=Io(t,e,n);return t.drag&&t.dragListener!==!1&&(s.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(s.tabIndex=0),s.style=i,s}const _o=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 Qt(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||_o.has(t)}let Ri=t=>!Qt(t);function Ho(t){t&&(Ri=e=>e.startsWith("on")?!Qt(e):t(e))}try{Ho(require("@emotion/is-prop-valid").default)}catch{}function Ko(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(Ri(i)||n===!0&&Qt(i)||!e&&!Qt(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}function Xn(t,e,n){return typeof t=="string"?t:b.transform(e+n*t)}function $o(t,e,n){const s=Xn(e,t.x,t.width),i=Xn(n,t.y,t.height);return`${s} ${i}`}const Wo={offset:"stroke-dashoffset",array:"stroke-dasharray"},zo={offset:"strokeDashoffset",array:"strokeDasharray"};function qo(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?Wo:zo;t[o.offset]=b.transform(-s);const r=b.transform(e),a=b.transform(n);t[o.array]=`${r} ${a}`}function Tn(t,{attrX:e,attrY:n,attrScale:s,originX:i,originY:o,pathLength:r,pathSpacing:a=1,pathOffset:c=0,...u},l,h,f){if(yn(t,u,l,f),h){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:m,style:d,dimensions:g}=t;m.transform&&(g&&(d.transform=m.transform),delete m.transform),g&&(i!==void 0||o!==void 0||d.transform)&&(d.transformOrigin=$o(g,i!==void 0?i:.5,o!==void 0?o:.5)),e!==void 0&&(m.x=e),n!==void 0&&(m.y=n),s!==void 0&&(m.scale=s),r!==void 0&&qo(m,r,a,c,!1)}const Ci=()=>({...vn(),attrs:{}}),xn=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Go(t,e,n,s){const i=P.useMemo(()=>{const o=Ci();return Tn(o,e,{enableHardwareAcceleration:!1},xn(s),t.transformTemplate),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};Ai(o,t.style,t),i.style={...o,...i.style}}return i}function Xo(t=!1){return(n,s,i,{latestValues:o},r)=>{const c=(pn(n)?Go:Uo)(s,o,r,n),u=Ko(s,typeof n=="string",t),l=n!==P.Fragment?{...u,...c,ref:i}:{},{children:h}=s,f=P.useMemo(()=>F(h)?h.get():h,[h]);return P.createElement(n,{...l,children:f})}}function Ei(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const o in n)t.style.setProperty(o,n[o])}const Vi=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 Di(t,e,n,s){Ei(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Vi.has(i)?i:un(i),e.attrs[i])}function bn(t,e,n){var s;const{style:i}=t,o={};for(const r in i)(F(i[r])||e.style&&F(e.style[r])||bi(r,t)||((s=n==null?void 0:n.getValue(r))===null||s===void 0?void 0:s.liveStyle)!==void 0)&&(o[r]=i[r]);return o}function Oi(t,e,n){const s=bn(t,e,n);for(const i in t)if(F(t[i])||F(e[i])){const o=Nt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[o]=t[i]}return s}function Yn(t){const e=[{},{}];return t==null||t.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function Sn(t,e,n,s){if(typeof e=="function"){const[i,o]=Yn(s);e=e(n!==void 0?n:t.custom,i,o)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,o]=Yn(s);e=e(n!==void 0?n:t.custom,i,o)}return e}function Mi(t){const e=P.useRef(null);return e.current===null&&(e.current=t()),e.current}const Ie=t=>Array.isArray(t),Yo=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),Jo=t=>Ie(t)?t[t.length-1]||0:t;function qt(t){const e=F(t)?t.get():t;return Yo(e)?e.toValue():e}function Zo({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},s,i,o){const r={latestValues:Qo(s,i,o,t),renderState:e()};return n&&(r.mount=a=>n(s,a,r)),r}const Li=t=>(e,n)=>{const s=P.useContext(ae),i=P.useContext(ln),o=()=>Zo(t,e,s,i);return n?o():Mi(o)};function Qo(t,e,n,s){const i={},o=s(t,{});for(const f in o)i[f]=qt(o[f]);let{initial:r,animate:a}=t;const c=ce(t),u=Ti(t);e&&u&&!c&&t.inherit!==!1&&(r===void 0&&(r=e.initial),a===void 0&&(a=e.animate));let l=n?n.initial===!1:!1;l=l||r===!1;const h=l?a:r;return h&&typeof h!="boolean"&&!le(h)&&(Array.isArray(h)?h:[h]).forEach(m=>{const d=Sn(t,m);if(!d)return;const{transitionEnd:g,transition:v,...T}=d;for(const x in T){let y=T[x];if(Array.isArray(y)){const w=l?y.length-1:0;y=y[w]}y!==null&&(i[x]=y)}for(const x in g)i[x]=g[x]}),i}const{schedule:C,cancel:Q,state:M,steps:xe}=gi(typeof requestAnimationFrame<"u"?requestAnimationFrame:B,!0),ta={useVisualState:Li({scrapeMotionValuesFromProps:Oi,createRenderState:Ci,onMount:(t,e,{renderState:n,latestValues:s})=>{C.read(()=>{try{n.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),C.render(()=>{Tn(n,s,{enableHardwareAcceleration:!1},xn(e.tagName),t.transformTemplate),Di(e,n)})}})},ea={useVisualState:Li({scrapeMotionValuesFromProps:bn,createRenderState:vn})};function na(t,{forwardMotionProps:e=!1},n,s){return{...pn(t)?ta:ea,preloadedFeatures:n,useRender:Xo(e),createVisualElement:s,Component:t}}function X(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const Fi=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function ue(t,e="page"){return{point:{x:t[`${e}X`],y:t[`${e}Y`]}}}const sa=t=>e=>Fi(e)&&t(e,ue(e));function Y(t,e,n,s){return X(t,e,sa(n),s)}const ia=(t,e)=>n=>e(t(n)),J=(...t)=>t.reduce(ia);function Bi(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}const Jn=Bi("dragHorizontal"),Zn=Bi("dragVertical");function ki(t){let e=!1;if(t==="y")e=Zn();else if(t==="x")e=Jn();else{const n=Jn(),s=Zn();n&&s?e=()=>{n(),s()}:(n&&n(),s&&s())}return e}function ji(){const t=ki(!0);return t?(t(),!1):!0}class at{constructor(e){this.isMounted=!1,this.node=e}update(){}}function Qn(t,e){const n=e?"pointerenter":"pointerleave",s=e?"onHoverStart":"onHoverEnd",i=(o,r)=>{if(o.pointerType==="touch"||ji())return;const a=t.getProps();t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",e);const c=a[s];c&&C.postRender(()=>c(o,r))};return Y(t.current,n,i,{passive:!t.getProps()[s]})}class ra extends at{mount(){this.unmount=J(Qn(this.node,!0),Qn(this.node,!1))}unmount(){}}class oa extends at{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!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=J(X(this.node.current,"focus",()=>this.onFocus()),X(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Ni=(t,e)=>e?t===e?!0:Ni(t,e.parentElement):!1;function be(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,ue(n))}class aa extends at{constructor(){super(...arguments),this.removeStartListeners=B,this.removeEndListeners=B,this.removeAccessibleListeners=B,this.startPointerPress=(e,n)=>{if(this.isPressing)return;this.removeEndListeners();const s=this.node.getProps(),o=Y(window,"pointerup",(a,c)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:l,globalTapTarget:h}=this.node.getProps(),f=!h&&!Ni(this.node.current,a.target)?l:u;f&&C.update(()=>f(a,c))},{passive:!(s.onTap||s.onPointerUp)}),r=Y(window,"pointercancel",(a,c)=>this.cancelPress(a,c),{passive:!(s.onTapCancel||s.onPointerCancel)});this.removeEndListeners=J(o,r),this.startPress(e,n)},this.startAccessiblePress=()=>{const e=o=>{if(o.key!=="Enter"||this.isPressing)return;const r=a=>{a.key!=="Enter"||!this.checkPressEnd()||be("up",(c,u)=>{const{onTap:l}=this.node.getProps();l&&C.postRender(()=>l(c,u))})};this.removeEndListeners(),this.removeEndListeners=X(this.node.current,"keyup",r),be("down",(a,c)=>{this.startPress(a,c)})},n=X(this.node.current,"keydown",e),s=()=>{this.isPressing&&be("cancel",(o,r)=>this.cancelPress(o,r))},i=X(this.node.current,"blur",s);this.removeAccessibleListeners=J(n,i)}}startPress(e,n){this.isPressing=!0;const{onTapStart:s,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),s&&C.postRender(()=>s(e,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!ji()}cancelPress(e,n){if(!this.checkPressEnd())return;const{onTapCancel:s}=this.node.getProps();s&&C.postRender(()=>s(e,n))}mount(){const e=this.node.getProps(),n=Y(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),s=X(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=J(n,s)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Ue=new WeakMap,Se=new WeakMap,la=t=>{const e=Ue.get(t.target);e&&e(t)},ca=t=>{t.forEach(la)};function ua({root:t,...e}){const n=t||document;Se.has(n)||Se.set(n,{});const s=Se.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(ca,{root:t,...e})),s[i]}function ha(t,e,n){const s=ua(e);return Ue.set(t,n),s.observe(t),()=>{Ue.delete(t),s.unobserve(t)}}const fa={some:0,all:1};class da extends at{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:o}=e,r={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:fa[i]},a=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:l,onViewportLeave:h}=this.node.getProps(),f=u?l:h;f&&f(c)};return ha(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(pa(e,n))&&this.startObserver()}unmount(){}}function pa({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const ma={inView:{Feature:da},tap:{Feature:aa},focus:{Feature:oa},hover:{Feature:ra}};function Ii(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}function he(t,e,n){const s=t.getProps();return Sn(s,e,n!==void 0?n:s.custom,t)}const st=t=>t*1e3,Z=t=>t/1e3,ga={type:"spring",stiffness:500,damping:25,restSpeed:10},ya=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),va={type:"keyframes",duration:.8},Ta={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},xa=(t,{keyframes:e})=>e.length>2?va:mt.has(t)?t.startsWith("scale")?ya(e[1]):ga:Ta;function ba({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:c,elapsed:u,...l}){return!!Object.keys(l).length}function wn(t,e){return t[e]||t.default||t}const Sa=t=>t!==null;function fe(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(Sa),o=e&&n!=="loop"&&e%2===1?0:i.length-1;return!o||s===void 0?i[o]:s}let Gt;function wa(){Gt=void 0}const it={now:()=>(Gt===void 0&&it.set(M.isProcessing||co.useManualTiming?M.timestamp:performance.now()),Gt),set:t=>{Gt=t,queueMicrotask(wa)}},Ui=t=>/^0[^.\s]+$/u.test(t);function Pa(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Ui(t):!0}const _i=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),Aa=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ra(t){const e=Aa.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function Hi(t,e,n=1){const[s,i]=Ra(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const r=o.trim();return _i(r)?parseFloat(r):r}return mn(i)?Hi(i,e,n+1):i}const Ca=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),ts=t=>t===wt||t===b,es=(t,e)=>parseFloat(t.split(", ")[e]),ns=(t,e)=>(n,{transform:s})=>{if(s==="none"||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/u);if(i)return es(i[1],e);{const o=s.match(/^matrix\((.+)\)$/u);return o?es(o[1],t):0}},Ea=new Set(["x","y","z"]),Va=Nt.filter(t=>!Ea.has(t));function Da(t){const e=[];return Va.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const St={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:ns(4,13),y:ns(5,14)};St.translateX=St.x;St.translateY=St.y;const Ki=t=>e=>e.test(t),Oa={test:t=>t==="auto",parse:t=>t},$i=[wt,b,q,et,jo,ko,Oa],ss=t=>$i.find(Ki(t)),ft=new Set;let _e=!1,He=!1;function Wi(){if(He){const t=Array.from(ft).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=Da(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([o,r])=>{var a;(a=s.getValue(o))===null||a===void 0||a.set(r)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}He=!1,_e=!1,ft.forEach(t=>t.complete()),ft.clear()}function zi(){ft.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(He=!0)})}function Ma(){zi(),Wi()}class Pn{constructor(e,n,s,i,o,r=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=o,this.isAsync=r}scheduleResolve(){this.isScheduled=!0,this.isAsync?(ft.add(this),_e||(_e=!0,C.read(zi),C.resolveKeyframes(Wi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;for(let o=0;o<e.length;o++)if(e[o]===null)if(o===0){const r=i==null?void 0:i.get(),a=e[e.length-1];if(r!==void 0)e[0]=r;else if(s&&n){const c=s.readValue(n,a);c!=null&&(e[0]=c)}e[0]===void 0&&(e[0]=a),i&&r===void 0&&i.set(e[0])}else e[o]=e[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),ft.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,ft.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const An=(t,e)=>n=>!!(It(n)&&Bo.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),qi=(t,e,n)=>s=>{if(!It(s))return s;const[i,o,r,a]=s.match(gn);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},La=t=>rt(0,255,t),we={...wt,transform:t=>Math.round(La(t))},ht={test:An("rgb","red"),parse:qi("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+we.transform(t)+", "+we.transform(e)+", "+we.transform(n)+", "+Dt(Vt.transform(s))+")"};function Fa(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const Ke={test:An("#"),parse:Fa,transform:ht.transform},vt={test:An("hsl","hue"),parse:qi("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+q.transform(Dt(e))+", "+q.transform(Dt(n))+", "+Dt(Vt.transform(s))+")"},L={test:t=>ht.test(t)||Ke.test(t)||vt.test(t),parse:t=>ht.test(t)?ht.parse(t):vt.test(t)?vt.parse(t):Ke.parse(t),transform:t=>It(t)?t:t.hasOwnProperty("red")?ht.transform(t):vt.transform(t)};function Ba(t){var e,n;return isNaN(t)&&It(t)&&(((e=t.match(gn))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(Fo))===null||n===void 0?void 0:n.length)||0)>0}const Gi="number",Xi="color",ka="var",ja="var(",is="${}",Na=/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 Ft(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(Na,c=>(L.test(c)?(s.color.push(o),i.push(Xi),n.push(L.parse(c))):c.startsWith(ja)?(s.var.push(o),i.push(ka),n.push(c)):(s.number.push(o),i.push(Gi),n.push(parseFloat(c))),++o,is)).split(is);return{values:n,split:a,indexes:s,types:i}}function Yi(t){return Ft(t).values}function Ji(t){const{split:e,types:n}=Ft(t),s=e.length;return i=>{let o="";for(let r=0;r<s;r++)if(o+=e[r],i[r]!==void 0){const a=n[r];a===Gi?o+=Dt(i[r]):a===Xi?o+=L.transform(i[r]):o+=i[r]}return o}}const Ia=t=>typeof t=="number"?0:t;function Ua(t){const e=Yi(t);return Ji(t)(e.map(Ia))}const ot={test:Ba,parse:Yi,createTransformer:Ji,getAnimatableNone:Ua},_a=new Set(["brightness","contrast","saturate","opacity"]);function Ha(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(gn)||[];if(!s)return t;const i=n.replace(s,"");let o=_a.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const Ka=/\b([a-z-]*)\(.*?\)/gu,$e={...ot,getAnimatableNone:t=>{const e=t.match(Ka);return e?e.map(Ha).join(" "):t}},$a={...Pi,color:L,backgroundColor:L,outlineColor:L,fill:L,stroke:L,borderColor:L,borderTopColor:L,borderRightColor:L,borderBottomColor:L,borderLeftColor:L,filter:$e,WebkitFilter:$e},Rn=t=>$a[t];function Zi(t,e){let n=Rn(t);return n!==$e&&(n=ot),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Wa=new Set(["auto","none","0"]);function za(t,e,n){let s=0,i;for(;s<t.length&&!i;){const o=t[s];typeof o=="string"&&!Wa.has(o)&&Ft(o).values.length&&(i=t[s]),s++}if(i&&n)for(const o of e)t[o]=Zi(n,i)}class Qi extends Pn{constructor(e,n,s,i){super(e,n,s,i,i==null?void 0:i.owner,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n.current)return;super.readKeyframes();for(let c=0;c<e.length;c++){let u=e[c];if(typeof u=="string"&&(u=u.trim(),mn(u))){const l=Hi(u,n.current);l!==void 0&&(e[c]=l),c===e.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Ca.has(s)||e.length!==2)return;const[i,o]=e,r=ss(i),a=ss(o);if(r!==a)if(ts(r)&&ts(a))for(let c=0;c<e.length;c++){const u=e[c];typeof u=="string"&&(e[c]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)Pa(e[i])&&s.push(i);s.length&&za(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=St[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){var e;const{element:n,name:s,unresolvedKeyframes:i}=this;if(!n.current)return;const o=n.getValue(s);o&&o.jump(this.measuredOrigin,!1);const r=i.length-1,a=i[r];i[r]=St[s](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((e=this.removedTransforms)===null||e===void 0)&&e.length&&this.removedTransforms.forEach(([c,u])=>{n.getValue(c).set(u)}),this.resolveNoneKeyframes()}}function tr(t){let e;return()=>(e===void 0&&(e=t()),e)}const rs=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(ot.test(t)||t==="0")&&!t.startsWith("url("));function qa(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function Ga(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const o=t[t.length-1],r=rs(i,e),a=rs(o,e);return!r||!a?!1:qa(t)||n==="spring"&&s}class er{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:r="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.options={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:o,repeatType:r,...a},this.updateFinishedPromise()}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&Ma(),this._resolved}onKeyframesResolved(e,n){this.hasAttemptedResolve=!0;const{name:s,type:i,velocity:o,delay:r,onComplete:a,onUpdate:c,isGenerator:u}=this.options;if(!u&&!Ga(e,s,i,o))if(r)this.options.duration=0;else{c==null||c(fe(e,this.options,n)),a==null||a(),this.resolveFinishedPromise();return}const l=this.initPlayback(e,n);l!==!1&&(this._resolved={keyframes:e,finalKeyframe:n,...l},this.onPostResolved())}onPostResolved(){}then(e,n){return this.currentFinishedPromise.then(e,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}function nr(t,e){return e?t*(1e3/e):0}const Xa=5;function sr(t,e,n){const s=Math.max(e-Xa,0);return nr(n-t(s),e-s)}const Pe=.001,Ya=.01,Ja=10,Za=.05,Qa=1;function tl({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let i,o,r=1-e;r=rt(Za,Qa,r),t=rt(Ya,Ja,Z(t)),r<1?(i=u=>{const l=u*r,h=l*t,f=l-n,m=We(u,r),d=Math.exp(-h);return Pe-f/m*d},o=u=>{const h=u*r*t,f=h*n+n,m=Math.pow(r,2)*Math.pow(u,2)*t,d=Math.exp(-h),g=We(Math.pow(u,2),r);return(-i(u)+Pe>0?-1:1)*((f-m)*d)/g}):(i=u=>{const l=Math.exp(-u*t),h=(u-n)*t+1;return-Pe+l*h},o=u=>{const l=Math.exp(-u*t),h=(n-u)*(t*t);return l*h});const a=5/t,c=nl(i,o,a);if(t=st(t),isNaN(c))return{stiffness:100,damping:10,duration:t};{const u=Math.pow(c,2)*s;return{stiffness:u,damping:r*2*Math.sqrt(s*u),duration:t}}}const el=12;function nl(t,e,n){let s=n;for(let i=1;i<el;i++)s=s-t(s)/e(s);return s}function We(t,e){return t*Math.sqrt(1-e*e)}const sl=["duration","bounce"],il=["stiffness","damping","mass"];function os(t,e){return e.some(n=>t[n]!==void 0)}function rl(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!os(t,il)&&os(t,sl)){const n=tl(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}function ir({keyframes:t,restDelta:e,restSpeed:n,...s}){const i=t[0],o=t[t.length-1],r={done:!1,value:i},{stiffness:a,damping:c,mass:u,duration:l,velocity:h,isResolvedFromDuration:f}=rl({...s,velocity:-Z(s.velocity||0)}),m=h||0,d=c/(2*Math.sqrt(a*u)),g=o-i,v=Z(Math.sqrt(a/u)),T=Math.abs(g)<5;n||(n=T?.01:2),e||(e=T?.005:.5);let x;if(d<1){const y=We(v,d);x=w=>{const R=Math.exp(-d*v*w);return o-R*((m+d*v*g)/y*Math.sin(y*w)+g*Math.cos(y*w))}}else if(d===1)x=y=>o-Math.exp(-v*y)*(g+(m+v*g)*y);else{const y=v*Math.sqrt(d*d-1);x=w=>{const R=Math.exp(-d*v*w),E=Math.min(y*w,300);return o-R*((m+d*v*g)*Math.sinh(E)+y*g*Math.cosh(E))/y}}return{calculatedDuration:f&&l||null,next:y=>{const w=x(y);if(f)r.done=y>=l;else{let R=m;y!==0&&(d<1?R=sr(x,y,w):R=0);const E=Math.abs(R)<=n,k=Math.abs(o-w)<=e;r.done=E&&k}return r.value=r.done?o:w,r}}}function as({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:c,restDelta:u=.5,restSpeed:l}){const h=t[0],f={done:!1,value:h},m=A=>a!==void 0&&A<a||c!==void 0&&A>c,d=A=>a===void 0?c:c===void 0||Math.abs(a-A)<Math.abs(c-A)?a:c;let g=n*e;const v=h+g,T=r===void 0?v:r(v);T!==v&&(g=T-h);const x=A=>-g*Math.exp(-A/s),y=A=>T+x(A),w=A=>{const U=x(A),_=y(A);f.done=Math.abs(U)<=u,f.value=f.done?T:_};let R,E;const k=A=>{m(f.value)&&(R=A,E=ir({keyframes:[f.value,d(f.value)],velocity:sr(y,A,f.value),damping:i,stiffness:o,restDelta:u,restSpeed:l}))};return k(0),{calculatedDuration:null,next:A=>{let U=!1;return!E&&R===void 0&&(U=!0,w(A),k(A)),R!==void 0&&A>=R?E.next(A-R):(!U&&w(A),f)}}}const rr=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,ol=1e-7,al=12;function ll(t,e,n,s,i){let o,r,a=0;do r=e+(n-e)/2,o=rr(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>ol&&++a<al);return r}function _t(t,e,n,s){if(t===e&&n===s)return B;const i=o=>ll(o,0,1,t,n);return o=>o===0||o===1?o:rr(i(o),e,s)}const cl=_t(.42,0,1,1),ul=_t(0,0,.58,1),or=_t(.42,0,.58,1),hl=t=>Array.isArray(t)&&typeof t[0]!="number",ar=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,lr=t=>e=>1-t(1-e),Cn=t=>1-Math.sin(Math.acos(t)),cr=lr(Cn),fl=ar(Cn),ur=_t(.33,1.53,.69,.99),En=lr(ur),dl=ar(En),pl=t=>(t*=2)<1?.5*En(t):.5*(2-Math.pow(2,-10*(t-1))),ls={linear:B,easeIn:cl,easeInOut:or,easeOut:ul,circIn:Cn,circInOut:fl,circOut:cr,backIn:En,backInOut:dl,backOut:ur,anticipate:pl},cs=t=>{if(Array.isArray(t)){Ne(t.length===4);const[e,n,s,i]=t;return _t(e,n,s,i)}else if(typeof t=="string")return Ne(ls[t]!==void 0),ls[t];return t},Bt=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s},V=(t,e,n)=>t+(e-t)*n;function Ae(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function ml({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,o=0,r=0;if(!e)i=o=r=n;else{const a=n<.5?n*(1+e):n+e-n*e,c=2*n-a;i=Ae(c,a,t+1/3),o=Ae(c,a,t),r=Ae(c,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}function te(t,e){return n=>n>0?e:t}const Re=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},gl=[Ke,ht,vt],yl=t=>gl.find(e=>e.test(t));function us(t){const e=yl(t);if(!e)return!1;let n=e.parse(t);return e===vt&&(n=ml(n)),n}const hs=(t,e)=>{const n=us(t),s=us(e);if(!n||!s)return te(t,e);const i={...n};return o=>(i.red=Re(n.red,s.red,o),i.green=Re(n.green,s.green,o),i.blue=Re(n.blue,s.blue,o),i.alpha=V(n.alpha,s.alpha,o),ht.transform(i))},ze=new Set(["none","hidden"]);function vl(t,e){return ze.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function Tl(t,e){return n=>V(t,e,n)}function Vn(t){return typeof t=="number"?Tl:typeof t=="string"?mn(t)?te:L.test(t)?hs:Sl:Array.isArray(t)?hr:typeof t=="object"?L.test(t)?hs:xl:te}function hr(t,e){const n=[...t],s=n.length,i=t.map((o,r)=>Vn(o)(o,e[r]));return o=>{for(let r=0;r<s;r++)n[r]=i[r](o);return n}}function xl(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=Vn(t[i])(t[i],e[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}}function bl(t,e){var n;const s=[],i={color:0,var:0,number:0};for(let o=0;o<e.values.length;o++){const r=e.types[o],a=t.indexes[r][i[r]],c=(n=t.values[a])!==null&&n!==void 0?n:0;s[o]=c,i[r]++}return s}const Sl=(t,e)=>{const n=ot.createTransformer(e),s=Ft(t),i=Ft(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?ze.has(t)&&!i.values.length||ze.has(e)&&!s.values.length?vl(t,e):J(hr(bl(s,i),i.values),n):te(t,e)};function fr(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?V(t,e,n):Vn(t)(t,e)}function wl(t,e,n){const s=[],i=n||fr,o=t.length-1;for(let r=0;r<o;r++){let a=i(t[r],t[r+1]);if(e){const c=Array.isArray(e)?e[r]||B:e;a=J(c,a)}s.push(a)}return s}function Pl(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;if(Ne(o===e.length),o===1)return()=>e[0];if(o===2&&t[0]===t[1])return()=>e[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const r=wl(e,s,i),a=r.length,c=u=>{let l=0;if(a>1)for(;l<t.length-2&&!(u<t[l+1]);l++);const h=Bt(t[l],t[l+1],u);return r[l](h)};return n?u=>c(rt(t[0],t[o-1],u)):c}function Al(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=Bt(0,e,s);t.push(V(n,1,i))}}function Rl(t){const e=[0];return Al(e,t.length-1),e}function Cl(t,e){return t.map(n=>n*e)}function El(t,e){return t.map(()=>e||or).splice(0,t.length-1)}function ee({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=hl(s)?s.map(cs):cs(s),o={done:!1,value:e[0]},r=Cl(n&&n.length===e.length?n:Rl(e),t),a=Pl(r,e,{ease:Array.isArray(i)?i:El(e,i)});return{calculatedDuration:t,next:c=>(o.value=a(c),o.done=c>=t,o)}}const fs=2e4;function Vl(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<fs;)e+=n,s=t.next(e);return e>=fs?1/0:e}const Dl=t=>{const e=({timestamp:n})=>t(n);return{start:()=>C.update(e,!0),stop:()=>Q(e),now:()=>M.isProcessing?M.timestamp:it.now()}},Ol={decay:as,inertia:as,tween:ee,keyframes:ee,spring:ir},Ml=t=>t/100;class Dn extends er{constructor({KeyframeResolver:e=Pn,...n}){super(n),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:a}=this.options;a&&a()};const{name:s,motionValue:i,keyframes:o}=this.options,r=(a,c)=>this.onKeyframesResolved(a,c);s&&i&&i.owner?this.resolver=i.owner.resolveKeyframes(o,r,s,i):this.resolver=new e(o,r,s,i),this.resolver.scheduleResolve()}initPlayback(e){const{type:n="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=this.options,a=Ol[n]||ee;let c,u;a!==ee&&typeof e[0]!="number"&&(c=J(Ml,fr(e[0],e[1])),e=[0,100]);const l=a({...this.options,keyframes:e});o==="mirror"&&(u=a({...this.options,keyframes:[...e].reverse(),velocity:-r})),l.calculatedDuration===null&&(l.calculatedDuration=Vl(l));const{calculatedDuration:h}=l,f=h+i,m=f*(s+1)-i;return{generator:l,mirroredGenerator:u,mapPercentToKeyframes:c,calculatedDuration:h,resolvedDuration:f,totalDuration:m}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!e?this.pause():this.state=this.pendingPlayState}tick(e,n=!1){const{resolved:s}=this;if(!s){const{keyframes:A}=this.options;return{done:!0,value:A[A.length-1]}}const{finalKeyframe:i,generator:o,mirroredGenerator:r,mapPercentToKeyframes:a,keyframes:c,calculatedDuration:u,totalDuration:l,resolvedDuration:h}=s;if(this.startTime===null)return o.next(0);const{delay:f,repeat:m,repeatType:d,repeatDelay:g,onUpdate:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-l/this.speed,this.startTime)),n?this.currentTime=e:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const T=this.currentTime-f*(this.speed>=0?1:-1),x=this.speed>=0?T<0:T>l;this.currentTime=Math.max(T,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=l);let y=this.currentTime,w=o;if(m){const A=Math.min(this.currentTime,l)/h;let U=Math.floor(A),_=A%1;!_&&A>=1&&(_=1),_===1&&U--,U=Math.min(U,m+1),!!(U%2)&&(d==="reverse"?(_=1-_,g&&(_-=g/h)):d==="mirror"&&(w=r)),y=rt(0,1,_)*h}const R=x?{done:!1,value:c[0]}:w.next(y);a&&(R.value=a(R.value));let{done:E}=R;!x&&u!==null&&(E=this.speed>=0?this.currentTime>=l:this.currentTime<=0);const k=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return k&&i!==void 0&&(R.value=fe(c,this.options,i)),v&&v(R.value),k&&this.finish(),R}get duration(){const{resolved:e}=this;return e?Z(e.calculatedDuration):0}get time(){return Z(this.currentTime)}set time(e){e=st(e),this.currentTime=e,this.holdTime!==null||this.speed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=Z(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:e=Dl,onPlay:n}=this.options;this.driver||(this.driver=e(i=>this.tick(i))),n&&n();const s=this.driver.now();this.holdTime!==null?this.startTime=s-this.holdTime:(!this.startTime||this.state==="finished")&&(this.startTime=s),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(e=this.currentTime)!==null&&e!==void 0?e:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){this.cancelTime!==null&&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(e){return this.startTime=0,this.tick(e,!0)}}const dr=t=>Array.isArray(t)&&typeof t[0]=="number";function pr(t){return!!(!t||typeof t=="string"&&t in On||dr(t)||Array.isArray(t)&&t.every(pr))}const Et=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,On={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Et([0,.65,.55,1]),circOut:Et([.55,0,1,.45]),backIn:Et([.31,.01,.66,-.59]),backOut:Et([.33,1.53,.69,.99])};function Ll(t){return mr(t)||On.easeOut}function mr(t){if(t)return dr(t)?Et(t):Array.isArray(t)?t.map(Ll):On[t]}function Fl(t,e,n,{delay:s=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:a,times:c}={}){const u={[e]:n};c&&(u.offset=c);const l=mr(a);return Array.isArray(l)&&(u.easing=l),t.animate(u,{delay:s,duration:i,easing:Array.isArray(l)?"linear":l,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"})}const Bl=tr(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),kl=new Set(["opacity","clipPath","filter","transform"]),ne=10,jl=2e4;function Nl(t){return t.type==="spring"||t.name==="backgroundColor"||!pr(t.ease)}function Il(t,e){const n=new Dn({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:t[0]};const i=[];let o=0;for(;!s.done&&o<jl;)s=n.sample(o),i.push(s.value),o+=ne;return{times:void 0,keyframes:i,duration:o-ne,ease:"linear"}}class ds extends er{constructor(e){super(e);const{name:n,motionValue:s,keyframes:i}=this.options;this.resolver=new Qi(i,(o,r)=>this.onKeyframesResolved(o,r),n,s),this.resolver.scheduleResolve()}initPlayback(e,n){var s;let{duration:i=300,times:o,ease:r,type:a,motionValue:c,name:u}=this.options;if(!(!((s=c.owner)===null||s===void 0)&&s.current))return!1;if(Nl(this.options)){const{onComplete:h,onUpdate:f,motionValue:m,...d}=this.options,g=Il(e,d);e=g.keyframes,e.length===1&&(e[1]=e[0]),i=g.duration,o=g.times,r=g.ease,a="keyframes"}const l=Fl(c.owner.current,u,e,{...this.options,duration:i,times:o,ease:r});return l.startTime=it.now(),this.pendingTimeline?(l.timeline=this.pendingTimeline,this.pendingTimeline=void 0):l.onfinish=()=>{const{onComplete:h}=this.options;c.set(fe(e,this.options,n)),h&&h(),this.cancel(),this.resolveFinishedPromise()},{animation:l,duration:i,times:o,type:a,ease:r,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:n}=e;return Z(n)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:n}=e;return Z(n.currentTime||0)}set time(e){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.currentTime=st(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:n}=e;return n.playbackRate}set speed(e){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:n}=e;return n.playState}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{const{resolved:n}=this;if(!n)return B;const{animation:s}=n;s.timeline=e,s.onfinish=null}return B}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;const{resolved:e}=this;if(!e)return;const{animation:n,keyframes:s,duration:i,type:o,ease:r,times:a}=e;if(!(n.playState==="idle"||n.playState==="finished")){if(this.time){const{motionValue:c,onUpdate:u,onComplete:l,...h}=this.options,f=new Dn({...h,keyframes:s,duration:i,type:o,ease:r,times:a,isGenerator:!0}),m=st(this.time);c.setWithVelocity(f.sample(m-ne).value,f.sample(m).value,ne)}this.cancel()}}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:n,name:s,repeatDelay:i,repeatType:o,damping:r,type:a}=e;return Bl()&&s&&kl.has(s)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!i&&o!=="mirror"&&r!==0&&a!=="inertia"}}function Ul(t,e){let n;const s=()=>{const{currentTime:i}=e,r=(i===null?0:i.value)/100;n!==r&&t(r),n=r};return C.update(s,!0),()=>Q(s)}const _l=tr(()=>window.ScrollTimeline!==void 0);class Hl{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}then(e,n){return Promise.all(this.animations).then(e).catch(n)}getAll(e){return this.animations[0][e]}setAll(e,n){for(let s=0;s<this.animations.length;s++)this.animations[s][e]=n}attachTimeline(e){const n=this.animations.map(s=>{if(_l()&&s.attachTimeline)s.attachTimeline(e);else return s.pause(),Ul(i=>{s.time=s.duration*i},e)});return()=>{n.forEach((s,i)=>{s&&s(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get duration(){let e=0;for(let n=0;n<this.animations.length;n++)e=Math.max(e,this.animations[n].duration);return e}runAll(e){this.animations.forEach(n=>n[e]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const Mn=(t,e,n,s={},i,o)=>r=>{const a=wn(s,t)||{},c=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-st(c);let l={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:i};ba(a)||(l={...l,...xa(t,l)}),l.duration&&(l.duration=st(l.duration)),l.repeatDelay&&(l.repeatDelay=st(l.repeatDelay)),l.from!==void 0&&(l.keyframes[0]=l.from);let h=!1;if((l.type===!1||l.duration===0&&!l.repeatDelay)&&(l.duration=0,l.delay===0&&(h=!0)),h&&!o&&e.get()!==void 0){const f=fe(l.keyframes,a);if(f!==void 0)return C.update(()=>{l.onUpdate(f),l.onComplete()}),new Hl([])}return!o&&ds.supports(l)?new ds(l):new Dn(l)};function se(t){return!!(F(t)&&t.add)}function Ln(t,e){t.indexOf(e)===-1&&t.push(e)}function Fn(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class Bn{constructor(){this.subscriptions=[]}add(e){return Ln(this.subscriptions,e),()=>Fn(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let o=0;o<i;o++){const r=this.subscriptions[o];r&&r(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const ps=30,Kl=t=>!isNaN(parseFloat(t));class $l{constructor(e,n={}){this.version="11.2.11",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(s,i=!0)=>{const o=it.now();this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=it.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Kl(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Bn);const s=this.events[e].add(n);return e==="change"?()=>{s(),C.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=it.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>ps)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,ps);return nr(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),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 kt(t,e){return new $l(t,e)}function Wl(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,kt(n))}function kn(t,e){const n=he(t,e);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const r in o){const a=Jo(o[r]);Wl(t,r,a)}}function gr(t){return t.getProps()[mi]}function zl({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function yr(t,e,{delay:n=0,transitionOverride:s,type:i}={}){var o;let{transition:r=t.getDefaultTransition(),transitionEnd:a,...c}=e;const u=t.getValue("willChange");s&&(r=s);const l=[],h=i&&t.animationState&&t.animationState.getState()[i];for(const f in c){const m=t.getValue(f,(o=t.latestValues[f])!==null&&o!==void 0?o:null),d=c[f];if(d===void 0||h&&zl(h,f))continue;const g={delay:n,elapsed:0,...wn(r||{},f)};let v=!1;if(window.HandoffAppearAnimations){const x=gr(t);if(x){const y=window.HandoffAppearAnimations(x,f,m,C);y!==null&&(g.elapsed=y,v=!0)}}m.start(Mn(f,m,d,t.shouldReduceMotion&&mt.has(f)?{type:!1}:g,t,v));const T=m.animation;T&&(se(u)&&(u.add(f),T.then(()=>u.remove(f))),l.push(T))}return a&&Promise.all(l).then(()=>{C.update(()=>{a&&kn(t,a)})}),l}function qe(t,e,n={}){var s;const i=he(t,e,n.type==="exit"?(s=t.presenceContext)===null||s===void 0?void 0:s.custom:void 0);let{transition:o=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const r=i?()=>Promise.all(yr(t,i,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(u=0)=>{const{delayChildren:l=0,staggerChildren:h,staggerDirection:f}=o;return ql(t,e,l+u,h,f,n)}:()=>Promise.resolve(),{when:c}=o;if(c){const[u,l]=c==="beforeChildren"?[r,a]:[a,r];return u().then(()=>l())}else return Promise.all([r(),a(n.delay)])}function ql(t,e,n=0,s=0,i=1,o){const r=[],a=(t.variantChildren.size-1)*s,c=i===1?(u=0)=>u*s:(u=0)=>a-u*s;return Array.from(t.variantChildren).sort(Gl).forEach((u,l)=>{u.notify("AnimationStart",e),r.push(qe(u,e,{...o,delay:n+c(l)}).then(()=>u.notify("AnimationComplete",e)))}),Promise.all(r)}function Gl(t,e){return t.sortNodePosition(e)}function vr(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>qe(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=qe(t,e,n);else{const i=typeof e=="function"?he(t,e,n.custom):e;s=Promise.all(yr(t,i,n))}return s.then(()=>{C.postRender(()=>{t.notify("AnimationComplete",e)})})}const Xl=[...fn].reverse(),Yl=fn.length;function Jl(t){return e=>Promise.all(e.map(({animation:n,options:s})=>vr(t,n,s)))}function Zl(t){let e=Jl(t),n=ms(),s=!0;const i=c=>(u,l)=>{var h;const f=he(t,l,c==="exit"?(h=t.presenceContext)===null||h===void 0?void 0:h.custom:void 0);if(f){const{transition:m,transitionEnd:d,...g}=f;u={...u,...g,...d}}return u};function o(c){e=c(t)}function r(c){const u=t.getProps(),l=t.getVariantContext(!0)||{},h=[],f=new Set;let m={},d=1/0;for(let v=0;v<Yl;v++){const T=Xl[v],x=n[T],y=u[T]!==void 0?u[T]:l[T],w=Lt(y),R=T===c?x.isActive:null;R===!1&&(d=v);let E=y===l[T]&&y!==u[T]&&w;if(E&&s&&t.manuallyAnimateOnMount&&(E=!1),x.protectedKeys={...m},!x.isActive&&R===null||!y&&!x.prevProp||le(y)||typeof y=="boolean")continue;let A=Ql(x.prevProp,y)||T===c&&x.isActive&&!E&&w||v>d&&w,U=!1;const _=Array.isArray(y)?y:[y];let gt=_.reduce(i(T),{});R===!1&&(gt={});const{prevResolvedValues:_n={}}=x,ao={..._n,...gt},Hn=j=>{A=!0,f.has(j)&&(U=!0,f.delete(j)),x.needsAnimating[j]=!0;const G=t.getValue(j);G&&(G.liveStyle=!1)};for(const j in ao){const G=gt[j],ve=_n[j];if(m.hasOwnProperty(j))continue;let Te=!1;Ie(G)&&Ie(ve)?Te=!Ii(G,ve):Te=G!==ve,Te?G!=null?Hn(j):f.add(j):G!==void 0&&f.has(j)?Hn(j):x.protectedKeys[j]=!0}x.prevProp=y,x.prevResolvedValues=gt,x.isActive&&(m={...m,...gt}),s&&t.blockInitialAnimation&&(A=!1),A&&(!E||U)&&h.push(..._.map(j=>({animation:j,options:{type:T}})))}if(f.size){const v={};f.forEach(T=>{const x=t.getBaseTarget(T),y=t.getValue(T);y&&(y.liveStyle=!0),v[T]=x??null}),h.push({animation:v})}let g=!!h.length;return s&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(g=!1),s=!1,g?e(h):Promise.resolve()}function a(c,u){var l;if(n[c].isActive===u)return Promise.resolve();(l=t.variantChildren)===null||l===void 0||l.forEach(f=>{var m;return(m=f.animationState)===null||m===void 0?void 0:m.setActive(c,u)}),n[c].isActive=u;const h=r(c);for(const f in n)n[f].protectedKeys={};return h}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=ms(),s=!0}}}function Ql(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Ii(e,t):!1}function lt(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ms(){return{animate:lt(!0),whileInView:lt(),whileHover:lt(),whileTap:lt(),whileDrag:lt(),whileFocus:lt(),exit:lt()}}class tc extends at{constructor(e){super(e),e.animationState||(e.animationState=Zl(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();le(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)===null||e===void 0||e.call(this)}}let ec=0;class nc extends at{constructor(){super(...arguments),this.id=ec++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const sc={animation:{Feature:tc},exit:{Feature:nc}},gs=(t,e)=>Math.abs(t-e);function ic(t,e){const n=gs(t.x,e.x),s=gs(t.y,e.y);return Math.sqrt(n**2+s**2)}class Tr{constructor(e,n,{transformPagePoint:s,contextWindow:i,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=Ee(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,m=ic(h.offset,{x:0,y:0})>=3;if(!f&&!m)return;const{point:d}=h,{timestamp:g}=M;this.history.push({...d,timestamp:g});const{onStart:v,onMove:T}=this.handlers;f||(v&&v(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),T&&T(this.lastMoveEvent,h)},this.handlePointerMove=(h,f)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=Ce(f,this.transformPagePoint),C.update(this.updatePoint,!0)},this.handlePointerUp=(h,f)=>{this.end();const{onEnd:m,onSessionEnd:d,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Ee(h.type==="pointercancel"?this.lastMoveEventInfo:Ce(f,this.transformPagePoint),this.history);this.startEvent&&m&&m(h,v),d&&d(h,v)},!Fi(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.contextWindow=i||window;const r=ue(e),a=Ce(r,this.transformPagePoint),{point:c}=a,{timestamp:u}=M;this.history=[{...c,timestamp:u}];const{onSessionStart:l}=n;l&&l(e,Ee(a,this.history)),this.removeListeners=J(Y(this.contextWindow,"pointermove",this.handlePointerMove),Y(this.contextWindow,"pointerup",this.handlePointerUp),Y(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Q(this.updatePoint)}}function Ce(t,e){return e?{point:e(t.point)}:t}function ys(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Ee({point:t},e){return{point:t,delta:ys(t,xr(e)),offset:ys(t,rc(e)),velocity:oc(e,.1)}}function rc(t){return t[0]}function xr(t){return t[t.length-1]}function oc(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=xr(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>st(e)));)n--;if(!s)return{x:0,y:0};const o=Z(i.timestamp-s.timestamp);if(o===0)return{x:0,y:0};const r={x:(i.x-s.x)/o,y:(i.y-s.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function I(t){return t.max-t.min}function Ge(t,e=0,n=.01){return Math.abs(t-e)<=n}function vs(t,e,n,s=.5){t.origin=s,t.originPoint=V(e.min,e.max,t.origin),t.scale=I(n)/I(e),(Ge(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=V(n.min,n.max,t.origin)-t.originPoint,(Ge(t.translate)||isNaN(t.translate))&&(t.translate=0)}function Ot(t,e,n,s){vs(t.x,e.x,n.x,s?s.originX:void 0),vs(t.y,e.y,n.y,s?s.originY:void 0)}function Ts(t,e,n){t.min=n.min+e.min,t.max=t.min+I(e)}function ac(t,e,n){Ts(t.x,e.x,n.x),Ts(t.y,e.y,n.y)}function xs(t,e,n){t.min=e.min-n.min,t.max=t.min+I(e)}function Mt(t,e,n){xs(t.x,e.x,n.x),xs(t.y,e.y,n.y)}function lc(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?V(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?V(n,t,s.max):Math.min(t,n)),t}function bs(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function cc(t,{top:e,left:n,bottom:s,right:i}){return{x:bs(t.x,n,i),y:bs(t.y,e,s)}}function Ss(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}function uc(t,e){return{x:Ss(t.x,e.x),y:Ss(t.y,e.y)}}function hc(t,e){let n=.5;const s=I(t),i=I(e);return i>s?n=Bt(e.min,e.max-s,t.min):s>i&&(n=Bt(t.min,t.max-i,e.min)),rt(0,1,n)}function fc(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Xe=.35;function dc(t=Xe){return t===!1?t=0:t===!0&&(t=Xe),{x:ws(t,"left","right"),y:ws(t,"top","bottom")}}function ws(t,e,n){return{min:Ps(t,e),max:Ps(t,n)}}function Ps(t,e){return typeof t=="number"?t:t[e]||0}const As=()=>({translate:0,scale:1,origin:0,originPoint:0}),Tt=()=>({x:As(),y:As()}),Rs=()=>({min:0,max:0}),D=()=>({x:Rs(),y:Rs()});function K(t){return[t("x"),t("y")]}function br({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function pc({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function mc(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function Ve(t){return t===void 0||t===1}function Ye({scale:t,scaleX:e,scaleY:n}){return!Ve(t)||!Ve(e)||!Ve(n)}function ct(t){return Ye(t)||Sr(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Sr(t){return Cs(t.x)||Cs(t.y)}function Cs(t){return t&&t!=="0%"}function ie(t,e,n){const s=t-n,i=e*s;return n+i}function Es(t,e,n,s,i){return i!==void 0&&(t=ie(t,i,s)),ie(t,n,s)+e}function Je(t,e=0,n=1,s,i){t.min=Es(t.min,e,n,s,i),t.max=Es(t.max,e,n,s,i)}function wr(t,{x:e,y:n}){Je(t.x,e.translate,e.scale,e.originPoint),Je(t.y,n.translate,n.scale,n.originPoint)}function gc(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let o,r;for(let a=0;a<i;a++){o=n[a],r=o.projectionDelta;const c=o.instance;c&&c.style&&c.style.display==="contents"||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&&xt(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,wr(t,r)),s&&ct(o.latestValues)&&xt(t,o.latestValues))}e.x=Vs(e.x),e.y=Vs(e.y)}function Vs(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function nt(t,e){t.min=t.min+e,t.max=t.max+e}function Ds(t,e,[n,s,i]){const o=e[i]!==void 0?e[i]:.5,r=V(t.min,t.max,o);Je(t,e[n],e[s],r,e.scale)}const yc=["x","scaleX","originX"],vc=["y","scaleY","originY"];function xt(t,e){Ds(t.x,e,yc),Ds(t.y,e,vc)}function Pr(t,e){return br(mc(t.getBoundingClientRect(),e))}function Tc(t,e,n){const s=Pr(t,n),{scroll:i}=e;return i&&(nt(s.x,i.offset.x),nt(s.y,i.offset.y)),s}const Ar=({current:t})=>t?t.ownerDocument.defaultView:null,xc=new WeakMap;class bc{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=D(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=l=>{const{dragSnapToOrigin:h}=this.getProps();h?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(ue(l,"page").point)},o=(l,h)=>{const{drag:f,dragPropagation:m,onDragStart:d}=this.getProps();if(f&&!m&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=ki(f),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),K(v=>{let T=this.getAxisMotionValue(v).get()||0;if(q.test(T)){const{projection:x}=this.visualElement;if(x&&x.layout){const y=x.layout.layoutBox[v];y&&(T=I(y)*(parseFloat(T)/100))}}this.originPoint[v]=T}),d&&C.postRender(()=>d(l,h));const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},r=(l,h)=>{const{dragPropagation:f,dragDirectionLock:m,onDirectionLock:d,onDrag:g}=this.getProps();if(!f&&!this.openGlobalLock)return;const{offset:v}=h;if(m&&this.currentDirection===null){this.currentDirection=Sc(v),this.currentDirection!==null&&d&&d(this.currentDirection);return}this.updateAxis("x",h.point,v),this.updateAxis("y",h.point,v),this.visualElement.render(),g&&g(l,h)},a=(l,h)=>this.stop(l,h),c=()=>K(l=>{var h;return this.getAnimationState(l)==="paused"&&((h=this.getAxisMotionValue(l).animation)===null||h===void 0?void 0:h.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new Tr(e,{onSessionStart:i,onStart:o,onMove:r,onSessionEnd:a,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:Ar(this.visualElement)})}stop(e,n){const s=this.isDragging;if(this.cancel(),!s)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&C.postRender(()=>o(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!zt(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(r=lc(r,this.constraints[e],this.elastic[e])),o.set(r)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:s}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,o=this.constraints;n&&yt(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=cc(i.layoutBox,n):this.constraints=!1,this.elastic=dc(s),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&K(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=fc(i.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!yt(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=Tc(s,i.root,this.visualElement.getTransformPagePoint());let r=uc(i.layout.layoutBox,o);if(n){const a=n(pc(r));this.hasMutatedConstraints=!!a,a&&(r=br(a))}return r}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},u=K(l=>{if(!zt(l,n,this.currentDirection))return;let h=c&&c[l]||{};r&&(h={min:0,max:0});const f=i?200:1e6,m=i?40:1e7,d={type:"inertia",velocity:s?e[l]:0,bounceStiffness:f,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...o,...h};return this.startAxisValueAnimation(l,d)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return s.start(Mn(e,s,0,n,this.visualElement))}stopAnimation(){K(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){K(e=>{var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){K(n=>{const{drag:s}=this.getProps();if(!zt(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:r,max:a}=i.layout.layoutBox[n];o.set(e[n]-V(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!yt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};K(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const c=a.get();i[r]=hc({min:c,max:c},this.constraints[r])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),K(r=>{if(!zt(r,e,null))return;const a=this.getAxisMotionValue(r),{min:c,max:u}=this.constraints[r];a.set(V(c,u,i[r]))})}addListeners(){if(!this.visualElement.current)return;xc.set(this.visualElement,this);const e=this.visualElement.current,n=Y(e,"pointerdown",c=>{const{drag:u,dragListener:l=!0}=this.getProps();u&&l&&this.start(c)}),s=()=>{const{dragConstraints:c}=this.getProps();yt(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),C.read(s);const r=X(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(K(l=>{const h=this.getAxisMotionValue(l);h&&(this.originPoint[l]+=c[l].translate,h.set(h.get()+c[l].translate))}),this.visualElement.render())});return()=>{r(),n(),o(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=Xe,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function zt(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Sc(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class wc extends at{constructor(e){super(e),this.removeGroupControls=B,this.removeListeners=B,this.controls=new bc(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||B}unmount(){this.removeGroupControls(),this.removeListeners()}}const Os=t=>(e,n)=>{t&&C.postRender(()=>t(e,n))};class Pc extends at{constructor(){super(...arguments),this.removePointerDownListener=B}onPointerDown(e){this.session=new Tr(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ar(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:Os(e),onStart:Os(n),onMove:s,onEnd:(o,r)=>{delete this.session,i&&C.postRender(()=>i(o,r))}}}mount(){this.removePointerDownListener=Y(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function Ac(){const t=P.useContext(ln);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:n,register:s}=t,i=P.useId();return P.useEffect(()=>s(i),[]),!e&&n?[!1,()=>n&&n(i)]:[!0]}const Xt={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Ms(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Rt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(b.test(t))t=parseFloat(t);else return t;const n=Ms(t,e.target.x),s=Ms(t,e.target.y);return`${n}% ${s}%`}},Rc={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=ot.parse(t);if(i.length>5)return s;const o=ot.createTransformer(t),r=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,c=n.y.scale*e.y;i[0+r]/=a,i[1+r]/=c;const u=V(a,c,.5);return typeof i[2+r]=="number"&&(i[2+r]/=u),typeof i[3+r]=="number"&&(i[3+r]/=u),o(i)}};class Cc extends P.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=e;Co(Ec),o&&(n.group&&n.group.add(o),s&&s.register&&i&&s.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Xt.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,r=s.projection;return r&&(r.isPresent=o,i||e.layoutDependency!==n||n===void 0?r.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?r.promote():r.relegate()||C.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),hn.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Rr(t){const[e,n]=Ac(),s=P.useContext(xi);return je.jsx(Cc,{...t,layoutGroup:s,switchLayoutGroup:P.useContext(yi),isPresent:e,safeToRemove:n})}const Ec={borderRadius:{...Rt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Rt,borderTopRightRadius:Rt,borderBottomLeftRadius:Rt,borderBottomRightRadius:Rt,boxShadow:Rc},Cr=["TopLeft","TopRight","BottomLeft","BottomRight"],Vc=Cr.length,Ls=t=>typeof t=="string"?parseFloat(t):t,Fs=t=>typeof t=="number"||b.test(t);function Dc(t,e,n,s,i,o){i?(t.opacity=V(0,n.opacity!==void 0?n.opacity:1,Oc(s)),t.opacityExit=V(e.opacity!==void 0?e.opacity:1,0,Mc(s))):o&&(t.opacity=V(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,s));for(let r=0;r<Vc;r++){const a=`border${Cr[r]}Radius`;let c=Bs(e,a),u=Bs(n,a);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||Fs(c)===Fs(u)?(t[a]=Math.max(V(Ls(c),Ls(u),s),0),(q.test(u)||q.test(c))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=V(e.rotate||0,n.rotate||0,s))}function Bs(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Oc=Er(0,.5,cr),Mc=Er(.5,.95,B);function Er(t,e,n){return s=>s<t?0:s>e?1:n(Bt(t,e,s))}function ks(t,e){t.min=e.min,t.max=e.max}function H(t,e){ks(t.x,e.x),ks(t.y,e.y)}function js(t,e,n,s,i){return t-=e,t=ie(t,1/n,s),i!==void 0&&(t=ie(t,1/i,s)),t}function Lc(t,e=0,n=1,s=.5,i,o=t,r=t){if(q.test(e)&&(e=parseFloat(e),e=V(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=V(o.min,o.max,s);t===o&&(a-=e),t.min=js(t.min,e,n,a,i),t.max=js(t.max,e,n,a,i)}function Ns(t,e,[n,s,i],o,r){Lc(t,e[n],e[s],e[i],e.scale,o,r)}const Fc=["x","scaleX","originX"],Bc=["y","scaleY","originY"];function Is(t,e,n,s){Ns(t.x,e,Fc,n?n.x:void 0,s?s.x:void 0),Ns(t.y,e,Bc,n?n.y:void 0,s?s.y:void 0)}function Us(t){return t.translate===0&&t.scale===1}function Vr(t){return Us(t.x)&&Us(t.y)}function kc(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function Dr(t,e){return Math.round(t.x.min)===Math.round(e.x.min)&&Math.round(t.x.max)===Math.round(e.x.max)&&Math.round(t.y.min)===Math.round(e.y.min)&&Math.round(t.y.max)===Math.round(e.y.max)}function _s(t){return I(t.x)/I(t.y)}class jc{constructor(){this.members=[]}add(e){Ln(this.members,e),e.scheduleRender()}remove(e){if(Fn(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){s=o;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Hs(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y,r=(n==null?void 0:n.z)||0;if((i||o||r)&&(s=`translate3d(${i}px, ${o}px, ${r}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:u,rotate:l,rotateX:h,rotateY:f,skewX:m,skewY:d}=n;u&&(s=`perspective(${u}px) ${s}`),l&&(s+=`rotate(${l}deg) `),h&&(s+=`rotateX(${h}deg) `),f&&(s+=`rotateY(${f}deg) `),m&&(s+=`skewX(${m}deg) `),d&&(s+=`skewY(${d}deg) `)}const a=t.x.scale*e.x,c=t.y.scale*e.y;return(a!==1||c!==1)&&(s+=`scale(${a}, ${c})`),s||"none"}const Nc=(t,e)=>t.depth-e.depth;class Ic{constructor(){this.children=[],this.isDirty=!1}add(e){Ln(this.children,e),this.isDirty=!0}remove(e){Fn(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Nc),this.isDirty=!1,this.children.forEach(e)}}function Uc(t,e){const n=it.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(Q(s),t(o-e))};return C.read(s,!0),()=>Q(s)}function _c(t){window.MotionDebug&&window.MotionDebug.record(t)}function Hc(t){return t instanceof SVGElement&&t.tagName!=="svg"}function Kc(t,e,n){const s=F(t)?t:kt(t);return s.start(Mn("",s,e,n)),s.animation}const De=["","X","Y","Z"],$c={visibility:"hidden"},Ks=1e3;let Wc=0;const ut={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function Oe(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function Or(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return!1;const{visualElement:e}=t.options;return e?gr(e)?!0:t.parent&&!t.parent.hasCheckedOptimisedAppear?Or(t.parent):!1:!1}function Mr({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},a=e==null?void 0:e()){this.id=Wc++,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,ut.totalNodes=ut.resolvedTargetDeltas=ut.recalculatedProjection=0,this.nodes.forEach(Gc),this.nodes.forEach(Qc),this.nodes.forEach(tu),this.nodes.forEach(Xc),_c(ut)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new Ic)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new Bn),this.eventHandlers.get(r).add(a)}notifyListeners(r,...a){const c=this.eventHandlers.get(r);c&&c.notify(...a)}hasListeners(r){return this.eventHandlers.has(r)}mount(r,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Hc(r),this.instance=r;const{layoutId:c,layout:u,visualElement:l}=this.options;if(l&&!l.current&&l.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(u||c)&&(this.isLayoutDirty=!0),t){let h;const f=()=>this.root.updateBlockedByResize=!1;t(r,()=>{this.root.updateBlockedByResize=!0,h&&h(),h=Uc(f,250),Xt.hasAnimatedSinceResize&&(Xt.hasAnimatedSinceResize=!1,this.nodes.forEach(Ws))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&l&&(c||u)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:f,hasRelativeTargetChanged:m,layout:d})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||l.getDefaultTransition()||ru,{onLayoutAnimationStart:v,onLayoutAnimationComplete:T}=l.getProps(),x=!this.targetLayout||!Dr(this.targetLayout,d)||m,y=!f&&m;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||y||f&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(h,y);const w={...wn(g,"layout"),onPlay:v,onComplete:T};(l.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w)}else f||Ws(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=d})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Q(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(eu),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.HandoffCancelAllAnimations&&Or(this)&&window.HandoffCancelAllAnimations(),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let l=0;l<this.path.length;l++){const h=this.path[l];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:c}=this.options;if(a===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach($s);return}this.isUpdating||this.nodes.forEach(Jc),this.isUpdating=!1,this.nodes.forEach(Zc),this.nodes.forEach(zc),this.nodes.forEach(qc),this.clearAllSnapshots();const a=it.now();M.delta=rt(0,1e3/60,a-M.timestamp),M.timestamp=a,M.isProcessing=!0,xe.update.process(M),xe.preRender.process(M),xe.render.process(M),M.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,hn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Yc),this.sharedNodes.forEach(nu)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,C.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){C.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutCorrected=D(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,r?r.layoutBox:void 0)}updateScroll(r="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:r,isRoot:s(this.instance),offset:n(this.instance)})}resetTransform(){if(!i)return;const r=this.isLayoutDirty||this.shouldResetTransform,a=this.projectionDelta&&!Vr(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,l=u!==this.prevTransformTemplateValue;r&&(a||ct(this.latestValues)||l)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return r&&(c=this.removeTransform(c)),ou(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return D();const a=r.measureViewportBox(),{scroll:c}=this.root;return c&&(nt(a.x,c.offset.x),nt(a.y,c.offset.y)),a}removeElementScroll(r){const a=D();H(a,r);for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:l,options:h}=u;if(u!==this.root&&l&&h.layoutScroll){if(l.isRoot){H(a,r);const{scroll:f}=this.root;f&&(nt(a.x,-f.offset.x),nt(a.y,-f.offset.y))}nt(a.x,l.offset.x),nt(a.y,l.offset.y)}}return a}applyTransform(r,a=!1){const c=D();H(c,r);for(let u=0;u<this.path.length;u++){const l=this.path[u];!a&&l.options.layoutScroll&&l.scroll&&l!==l.root&&xt(c,{x:-l.scroll.offset.x,y:-l.scroll.offset.y}),ct(l.latestValues)&&xt(c,l.latestValues)}return ct(this.latestValues)&&xt(c,this.latestValues),c}removeTransform(r){const a=D();H(a,r);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!ct(u.latestValues))continue;Ye(u.latestValues)&&u.updateSnapshot();const l=D(),h=u.measurePageBox();H(l,h),Is(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,l)}return ct(this.latestValues)&&Is(a,this.latestValues),a}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==M.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){var a;const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==c;if(!(r||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:h,layoutId:f}=this.options;if(!(!this.layout||!(h||f))){if(this.resolvedRelativeTargetAt=M.timestamp,!this.targetDelta&&!this.relativeTarget){const m=this.getClosestProjectingParent();m&&m.layout&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=D(),this.relativeTargetOrigin=D(),Mt(this.relativeTargetOrigin,this.layout.layoutBox,m.layout.layoutBox),H(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=D(),this.targetWithTransforms=D()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),ac(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):H(this.target,this.layout.layoutBox),wr(this.target,this.targetDelta)):H(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const m=this.getClosestProjectingParent();m&&!!m.resumingFrom==!!this.resumingFrom&&!m.options.layoutScroll&&m.target&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=D(),this.relativeTargetOrigin=D(),Mt(this.relativeTargetOrigin,this.target,m.target),H(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}ut.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Ye(this.parent.latestValues)||Sr(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var r;const a=this.getLead(),c=!!this.resumingFrom||this!==a;let u=!0;if((this.isProjectionDirty||!((r=this.parent)===null||r===void 0)&&r.isProjectionDirty)&&(u=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===M.timestamp&&(u=!1),u)return;const{layout:l,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(l||h))return;H(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,m=this.treeScale.y;gc(this.layoutCorrected,this.treeScale,this.path,c),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=D());const{target:d}=a;if(!d){this.projectionTransform&&(this.projectionDelta=Tt(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=Tt(),this.projectionDeltaWithTransform=Tt());const g=this.projectionTransform;Ot(this.projectionDelta,this.layoutCorrected,d,this.latestValues),this.projectionTransform=Hs(this.projectionDelta,this.treeScale),(this.projectionTransform!==g||this.treeScale.x!==f||this.treeScale.y!==m)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d)),ut.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),r){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(r,a=!1){const c=this.snapshot,u=c?c.latestValues:{},l={...this.latestValues},h=Tt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=D(),m=c?c.source:void 0,d=this.layout?this.layout.source:void 0,g=m!==d,v=this.getStack(),T=!v||v.members.length<=1,x=!!(g&&!T&&this.options.crossfade===!0&&!this.path.some(iu));this.animationProgress=0;let y;this.mixTargetDelta=w=>{const R=w/1e3;zs(h.x,r.x,R),zs(h.y,r.y,R),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Mt(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),su(this.relativeTarget,this.relativeTargetOrigin,f,R),y&&kc(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=D()),H(y,this.relativeTarget)),g&&(this.animationValues=l,Dc(l,u,this.latestValues,R,x,T)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=R},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Q(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=C.update(()=>{Xt.hasAnimatedSinceResize=!0,this.currentAnimation=Kc(0,Ks,{...r,onUpdate:a=>{this.mixTargetDelta(a),r.onUpdate&&r.onUpdate(a)},onComplete:()=>{r.onComplete&&r.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Ks),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:c,layout:u,latestValues:l}=r;if(!(!a||!c||!u)){if(this!==r&&this.layout&&u&&Lr(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||D();const h=I(this.layout.layoutBox.x);c.x.min=r.target.x.min,c.x.max=c.x.min+h;const f=I(this.layout.layoutBox.y);c.y.min=r.target.y.min,c.y.max=c.y.min+f}H(a,c),xt(a,l),Ot(this.projectionDeltaWithTransform,this.layoutCorrected,a,l)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new jc),this.sharedNodes.get(r).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){var r;const{layoutId:a}=this.options;return a?((r=this.getStack())===null||r===void 0?void 0:r.lead)||this:this}getPrevLead(){var r;const{layoutId:a}=this.options;return a?(r=this.getStack())===null||r===void 0?void 0:r.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:c}=r;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(a=!0),!a)return;const u={};c.z&&Oe("z",r,u,this.animationValues);for(let l=0;l<De.length;l++)Oe(`rotate${De[l]}`,r,u,this.animationValues),Oe(`skew${De[l]}`,r,u,this.animationValues);r.render();for(const l in u)r.setStaticValue(l,u[l]),this.animationValues&&(this.animationValues[l]=u[l]);r.scheduleRender()}getProjectionStyles(r){var a,c;if(!this.instance||this.isSVG)return;if(!this.isVisible)return $c;const u={visibility:""},l=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=qt(r==null?void 0:r.pointerEvents)||"",u.transform=l?l(this.latestValues,""):"none",u;const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){const g={};return this.options.layoutId&&(g.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,g.pointerEvents=qt(r==null?void 0:r.pointerEvents)||""),this.hasProjected&&!ct(this.latestValues)&&(g.transform=l?l({},""):"none",this.hasProjected=!1),g}const f=h.animationValues||h.latestValues;this.applyTransformsToTarget(),u.transform=Hs(this.projectionDeltaWithTransform,this.treeScale,f),l&&(u.transform=l(f,u.transform));const{x:m,y:d}=this.projectionDelta;u.transformOrigin=`${m.origin*100}% ${d.origin*100}% 0`,h.animationValues?u.opacity=h===this?(c=(a=f.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&c!==void 0?c:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:u.opacity=h===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const g in Zt){if(f[g]===void 0)continue;const{correct:v,applyTo:T}=Zt[g],x=u.transform==="none"?f[g]:v(f[g],h);if(T){const y=T.length;for(let w=0;w<y;w++)u[T[w]]=x}else u[g]=x}return this.options.layoutId&&(u.pointerEvents=h===this?qt(r==null?void 0:r.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>{var a;return(a=r.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach($s),this.root.sharedNodes.clear()}}}function zc(t){t.updateLayout()}function qc(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:o}=t.options,r=n.source!==t.layout.source;o==="size"?K(h=>{const f=r?n.measuredBox[h]:n.layoutBox[h],m=I(f);f.min=s[h].min,f.max=f.min+m}):Lr(o,n.layoutBox,s)&&K(h=>{const f=r?n.measuredBox[h]:n.layoutBox[h],m=I(s[h]);f.max=f.min+m,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[h].max=t.relativeTarget[h].min+m)});const a=Tt();Ot(a,s,n.layoutBox);const c=Tt();r?Ot(c,t.applyTransform(i,!0),n.measuredBox):Ot(c,s,n.layoutBox);const u=!Vr(a);let l=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:m}=h;if(f&&m){const d=D();Mt(d,n.layoutBox,f.layoutBox);const g=D();Mt(g,s,m.layoutBox),Dr(d,g)||(l=!0),h.options.layoutRoot&&(t.relativeTarget=g,t.relativeTargetOrigin=d,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:n,delta:c,layoutDelta:a,hasLayoutChanged:u,hasRelativeTargetChanged:l})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function Gc(t){ut.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 Xc(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Yc(t){t.clearSnapshot()}function $s(t){t.clearMeasurements()}function Jc(t){t.isLayoutDirty=!1}function Zc(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Ws(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Qc(t){t.resolveTargetDelta()}function tu(t){t.calcProjection()}function eu(t){t.resetSkewAndRotation()}function nu(t){t.removeLeadSnapshot()}function zs(t,e,n){t.translate=V(e.translate,0,n),t.scale=V(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function qs(t,e,n,s){t.min=V(e.min,n.min,s),t.max=V(e.max,n.max,s)}function su(t,e,n,s){qs(t.x,e.x,n.x,s),qs(t.y,e.y,n.y,s)}function iu(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const ru={duration:.45,ease:[.4,0,.1,1]},Gs=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Xs=Gs("applewebkit/")&&!Gs("chrome/")?Math.round:B;function Ys(t){t.min=Xs(t.min),t.max=Xs(t.max)}function ou(t){Ys(t.x),Ys(t.y)}function Lr(t,e,n){return t==="position"||t==="preserve-aspect"&&!Ge(_s(e),_s(n),.2)}const au=Mr({attachResizeListener:(t,e)=>X(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Me={current:void 0},Fr=Mr({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Me.current){const t=new au({});t.mount(window),t.setOptions({layoutScroll:!0}),Me.current=t}return Me.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),lu={pan:{Feature:Pc},drag:{Feature:wc,ProjectionNode:Fr,MeasureLayout:Rr}},Ze={current:null},Br={current:!1};function cu(){if(Br.current=!0,!!cn)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Ze.current=t.matches;t.addListener(e),e()}else Ze.current=!1}function uu(t,e,n){const{willChange:s}=e;for(const i in e){const o=e[i],r=n[i];if(F(o))t.addValue(i,o),se(s)&&s.add(i);else if(F(r))t.addValue(i,kt(o,{owner:t})),se(s)&&s.remove(i);else if(r!==o)if(t.hasValue(i)){const a=t.getValue(i);a.liveStyle===!0?a.jump(o):a.hasAnimated||a.set(o)}else{const a=t.getStaticValue(i);t.addValue(i,kt(a!==void 0?a:o,{owner:t}))}}for(const i in n)e[i]===void 0&&t.removeValue(i);return e}const Js=new WeakMap,hu=[...$i,L,ot],fu=t=>hu.find(Ki(t)),Zs=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],du=dn.length;class pu{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:o,visualState:r},a={}){this.resolveKeyframes=(f,m,d,g)=>new this.KeyframeResolver(f,m,d,g,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Pn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>C.render(this.render,!1,!0);const{latestValues:c,renderState:u}=r;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=ce(n),this.isVariantNode=Ti(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:l,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in h){const m=h[f];c[f]!==void 0&&F(m)&&(m.set(c[f],!1),se(l)&&l.add(f))}}mount(e){this.current=e,Js.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),Br.current||cu(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ze.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Js.delete(this.current),this.projection&&this.projection.unmount(),Q(this.notifyUpdate),Q(this.render),this.valueSubscriptions.forEach(e=>e()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(e,n){const s=mt.has(e),i=n.on("change",r=>{this.latestValues[e]=r,this.props.onUpdate&&C.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{i(),o(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in bt){const n=bt[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const o=this.features[e];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):D()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<Zs.length;s++){const i=Zs[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,r=e[o];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=uu(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(e=!1){if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const s=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(s.initial=this.props.initial),s}const n={};for(let s=0;s<du;s++){const i=dn[s],o=this.props[i];(Lt(o)||o===!1)&&(n[i]=o)}return n}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=kt(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){var s;let i=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(s=this.getBaseTargetFromProps(this.props,e))!==null&&s!==void 0?s:this.readValueFromInstance(this.current,e,this.options);return i!=null&&(typeof i=="string"&&(_i(i)||Ui(i))?i=parseFloat(i):!fu(i)&&ot.test(n)&&(i=Zi(e,n)),this.setBaseTarget(e,F(i)?i.get():i)),F(i)?i.get():i}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:s}=this.props;let i;if(typeof s=="string"||typeof s=="object"){const r=Sn(this.props,s,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);r&&(i=r[e])}if(s&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,e);return o!==void 0&&!F(o)?o:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Bn),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class kr extends pu{constructor(){super(...arguments),this.KeyframeResolver=Qi}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}}function mu(t){return window.getComputedStyle(t)}class gu extends kr{constructor(){super(...arguments),this.type="html"}readValueFromInstance(e,n){if(mt.has(n)){const s=Rn(n);return s&&s.default||0}else{const s=mu(e),i=(wi(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Pr(e,n)}build(e,n,s,i){yn(e,n,s,i.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return bn(e,n,s)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;F(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(e,n,s,i){Ei(e,n,s,i)}}class yu extends kr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(mt.has(n)){const s=Rn(n);return s&&s.default||0}return n=Vi.has(n)?n:un(n),e.getAttribute(n)}measureInstanceViewportBox(){return D()}scrapeMotionValuesFromProps(e,n,s){return Oi(e,n,s)}build(e,n,s,i){Tn(e,n,s,this.isSVGTag,i.transformTemplate)}renderInstance(e,n,s,i){Di(e,n,s,i)}mount(e){this.isSVGTag=xn(e.tagName),super.mount(e)}}const vu=(t,e)=>pn(t)?new yu(e,{enableHardwareAcceleration:!1}):new gu(e,{allowProjection:t!==P.Fragment,enableHardwareAcceleration:!0}),Tu={layout:{ProjectionNode:Fr,MeasureLayout:Rr}},xu={...sc,...ma,...lu,...Tu},nf=Ao((t,e)=>na(t,e,xu,vu));function bu(t){t.values.forEach(e=>e.stop())}function Qe(t,e){[...e].reverse().forEach(s=>{const i=t.getVariant(s);i&&kn(t,i),t.variantChildren&&t.variantChildren.forEach(o=>{Qe(o,e)})})}function Su(t,e){if(Array.isArray(e))return Qe(t,e);if(typeof e=="string")return Qe(t,[e]);kn(t,e)}function wu(){const t=new Set,e={subscribe(n){return t.add(n),()=>void t.delete(n)},start(n,s){const i=[];return t.forEach(o=>{i.push(vr(o,n,{transitionOverride:s}))}),Promise.all(i)},set(n){return t.forEach(s=>{Su(s,n)})},stop(){t.forEach(n=>{bu(n)})},mount(){return()=>{e.stop()}}};return e}function Pu(){const t=Mi(wu);return di(t.mount,[]),t}const sf=Pu;function jr(t,e){return function(){return t.apply(e,arguments)}}const{toString:Au}=Object.prototype,{getPrototypeOf:jn}=Object,de=(t=>e=>{const n=Au.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),z=t=>(t=t.toLowerCase(),e=>de(e)===t),pe=t=>e=>typeof e===t,{isArray:Pt}=Array,jt=pe("undefined");function Ru(t){return t!==null&&!jt(t)&&t.constructor!==null&&!jt(t.constructor)&&$(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Nr=z("ArrayBuffer");function Cu(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Nr(t.buffer),e}const Eu=pe("string"),$=pe("function"),Ir=pe("number"),me=t=>t!==null&&typeof t=="object",Vu=t=>t===!0||t===!1,Yt=t=>{if(de(t)!=="object")return!1;const e=jn(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Du=z("Date"),Ou=z("File"),Mu=z("Blob"),Lu=z("FileList"),Fu=t=>me(t)&&$(t.pipe),Bu=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||$(t.append)&&((e=de(t))==="formdata"||e==="object"&&$(t.toString)&&t.toString()==="[object FormData]"))},ku=z("URLSearchParams"),[ju,Nu,Iu,Uu]=["ReadableStream","Request","Response","Headers"].map(z),_u=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ht(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let s,i;if(typeof t!="object"&&(t=[t]),Pt(t))for(s=0,i=t.length;s<i;s++)e.call(null,t[s],s,t);else{const o=n?Object.getOwnPropertyNames(t):Object.keys(t),r=o.length;let a;for(s=0;s<r;s++)a=o[s],e.call(null,t[a],a,t)}}function Ur(t,e){e=e.toLowerCase();const n=Object.keys(t);let s=n.length,i;for(;s-- >0;)if(i=n[s],e===i.toLowerCase())return i;return null}const _r=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Hr=t=>!jt(t)&&t!==_r;function tn(){const{caseless:t}=Hr(this)&&this||{},e={},n=(s,i)=>{const o=t&&Ur(e,i)||i;Yt(e[o])&&Yt(s)?e[o]=tn(e[o],s):Yt(s)?e[o]=tn({},s):Pt(s)?e[o]=s.slice():e[o]=s};for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&Ht(arguments[s],n);return e}const Hu=(t,e,n,{allOwnKeys:s}={})=>(Ht(e,(i,o)=>{n&&$(i)?t[o]=jr(i,n):t[o]=i},{allOwnKeys:s}),t),Ku=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),$u=(t,e,n,s)=>{t.prototype=Object.create(e.prototype,s),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},Wu=(t,e,n,s)=>{let i,o,r;const a={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),o=i.length;o-- >0;)r=i[o],(!s||s(r,t,e))&&!a[r]&&(e[r]=t[r],a[r]=!0);t=n!==!1&&jn(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},zu=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const s=t.indexOf(e,n);return s!==-1&&s===n},qu=t=>{if(!t)return null;if(Pt(t))return t;let e=t.length;if(!Ir(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},Gu=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&jn(Uint8Array)),Xu=(t,e)=>{const s=(t&&t[Symbol.iterator]).call(t);let i;for(;(i=s.next())&&!i.done;){const o=i.value;e.call(t,o[0],o[1])}},Yu=(t,e)=>{let n;const s=[];for(;(n=t.exec(e))!==null;)s.push(n);return s},Ju=z("HTMLFormElement"),Zu=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,s,i){return s.toUpperCase()+i}),Qs=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),Qu=z("RegExp"),Kr=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),s={};Ht(n,(i,o)=>{let r;(r=e(i,o,t))!==!1&&(s[o]=r||i)}),Object.defineProperties(t,s)},th=t=>{Kr(t,(e,n)=>{if($(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const s=t[n];if($(s)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},eh=(t,e)=>{const n={},s=i=>{i.forEach(o=>{n[o]=!0})};return Pt(t)?s(t):s(String(t).split(e)),n},nh=()=>{},sh=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,Le="abcdefghijklmnopqrstuvwxyz",ti="0123456789",$r={DIGIT:ti,ALPHA:Le,ALPHA_DIGIT:Le+Le.toUpperCase()+ti},ih=(t=16,e=$r.ALPHA_DIGIT)=>{let n="";const{length:s}=e;for(;t--;)n+=e[Math.random()*s|0];return n};function rh(t){return!!(t&&$(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const oh=t=>{const e=new Array(10),n=(s,i)=>{if(me(s)){if(e.indexOf(s)>=0)return;if(!("toJSON"in s)){e[i]=s;const o=Pt(s)?[]:{};return Ht(s,(r,a)=>{const c=n(r,i+1);!jt(c)&&(o[a]=c)}),e[i]=void 0,o}}return s};return n(t,0)},ah=z("AsyncFunction"),lh=t=>t&&(me(t)||$(t))&&$(t.then)&&$(t.catch),p={isArray:Pt,isArrayBuffer:Nr,isBuffer:Ru,isFormData:Bu,isArrayBufferView:Cu,isString:Eu,isNumber:Ir,isBoolean:Vu,isObject:me,isPlainObject:Yt,isReadableStream:ju,isRequest:Nu,isResponse:Iu,isHeaders:Uu,isUndefined:jt,isDate:Du,isFile:Ou,isBlob:Mu,isRegExp:Qu,isFunction:$,isStream:Fu,isURLSearchParams:ku,isTypedArray:Gu,isFileList:Lu,forEach:Ht,merge:tn,extend:Hu,trim:_u,stripBOM:Ku,inherits:$u,toFlatObject:Wu,kindOf:de,kindOfTest:z,endsWith:zu,toArray:qu,forEachEntry:Xu,matchAll:Yu,isHTMLForm:Ju,hasOwnProperty:Qs,hasOwnProp:Qs,reduceDescriptors:Kr,freezeMethods:th,toObjectSet:eh,toCamelCase:Zu,noop:nh,toFiniteNumber:sh,findKey:Ur,global:_r,isContextDefined:Hr,ALPHABET:$r,generateString:ih,isSpecCompliantForm:rh,toJSONObject:oh,isAsyncFn:ah,isThenable:lh};function S(t,e,n,s,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),s&&(this.request=s),i&&(this.response=i)}p.inherits(S,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:p.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Wr=S.prototype,zr={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{zr[t]={value:t}});Object.defineProperties(S,zr);Object.defineProperty(Wr,"isAxiosError",{value:!0});S.from=(t,e,n,s,i,o)=>{const r=Object.create(Wr);return p.toFlatObject(t,r,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),S.call(r,t.message,e,n,s,i),r.cause=t,r.name=t.name,o&&Object.assign(r,o),r};const ch=null;function en(t){return p.isPlainObject(t)||p.isArray(t)}function qr(t){return p.endsWith(t,"[]")?t.slice(0,-2):t}function ei(t,e,n){return t?t.concat(e).map(function(i,o){return i=qr(i),!n&&o?"["+i+"]":i}).join(n?".":""):e}function uh(t){return p.isArray(t)&&!t.some(en)}const hh=p.toFlatObject(p,{},null,function(e){return/^is[A-Z]/.test(e)});function ge(t,e,n){if(!p.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=p.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,v){return!p.isUndefined(v[g])});const s=n.metaTokens,i=n.visitor||l,o=n.dots,r=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&p.isSpecCompliantForm(e);if(!p.isFunction(i))throw new TypeError("visitor must be a function");function u(d){if(d===null)return"";if(p.isDate(d))return d.toISOString();if(!c&&p.isBlob(d))throw new S("Blob is not supported. Use a Buffer instead.");return p.isArrayBuffer(d)||p.isTypedArray(d)?c&&typeof Blob=="function"?new Blob([d]):Buffer.from(d):d}function l(d,g,v){let T=d;if(d&&!v&&typeof d=="object"){if(p.endsWith(g,"{}"))g=s?g:g.slice(0,-2),d=JSON.stringify(d);else if(p.isArray(d)&&uh(d)||(p.isFileList(d)||p.endsWith(g,"[]"))&&(T=p.toArray(d)))return g=qr(g),T.forEach(function(y,w){!(p.isUndefined(y)||y===null)&&e.append(r===!0?ei([g],w,o):r===null?g:g+"[]",u(y))}),!1}return en(d)?!0:(e.append(ei(v,g,o),u(d)),!1)}const h=[],f=Object.assign(hh,{defaultVisitor:l,convertValue:u,isVisitable:en});function m(d,g){if(!p.isUndefined(d)){if(h.indexOf(d)!==-1)throw Error("Circular reference detected in "+g.join("."));h.push(d),p.forEach(d,function(T,x){(!(p.isUndefined(T)||T===null)&&i.call(e,T,p.isString(x)?x.trim():x,g,f))===!0&&m(T,g?g.concat(x):[x])}),h.pop()}}if(!p.isObject(t))throw new TypeError("data must be an object");return m(t),e}function ni(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(s){return e[s]})}function Nn(t,e){this._pairs=[],t&&ge(t,this,e)}const Gr=Nn.prototype;Gr.append=function(e,n){this._pairs.push([e,n])};Gr.toString=function(e){const n=e?function(s){return e.call(this,s,ni)}:ni;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function fh(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Xr(t,e,n){if(!e)return t;const s=n&&n.encode||fh,i=n&&n.serialize;let o;if(i?o=i(e,n):o=p.isURLSearchParams(e)?e.toString():new Nn(e,n).toString(s),o){const r=t.indexOf("#");r!==-1&&(t=t.slice(0,r)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class si{constructor(){this.handlers=[]}use(e,n,s){return this.handlers.push({fulfilled:e,rejected:n,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){p.forEach(this.handlers,function(s){s!==null&&e(s)})}}const Yr={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},dh=typeof URLSearchParams<"u"?URLSearchParams:Nn,ph=typeof FormData<"u"?FormData:null,mh=typeof Blob<"u"?Blob:null,gh={isBrowser:!0,classes:{URLSearchParams:dh,FormData:ph,Blob:mh},protocols:["http","https","file","blob","url","data"]},In=typeof window<"u"&&typeof document<"u",yh=(t=>In&&["ReactNative","NativeScript","NS"].indexOf(t)<0)(typeof navigator<"u"&&navigator.product),vh=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Th=In&&window.location.href||"http://localhost",xh=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:In,hasStandardBrowserEnv:yh,hasStandardBrowserWebWorkerEnv:vh,origin:Th},Symbol.toStringTag,{value:"Module"})),W={...xh,...gh};function bh(t,e){return ge(t,new W.classes.URLSearchParams,Object.assign({visitor:function(n,s,i,o){return W.isNode&&p.isBuffer(n)?(this.append(s,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function Sh(t){return p.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function wh(t){const e={},n=Object.keys(t);let s;const i=n.length;let o;for(s=0;s<i;s++)o=n[s],e[o]=t[o];return e}function Jr(t){function e(n,s,i,o){let r=n[o++];if(r==="__proto__")return!0;const a=Number.isFinite(+r),c=o>=n.length;return r=!r&&p.isArray(i)?i.length:r,c?(p.hasOwnProp(i,r)?i[r]=[i[r],s]:i[r]=s,!a):((!i[r]||!p.isObject(i[r]))&&(i[r]=[]),e(n,s,i[r],o)&&p.isArray(i[r])&&(i[r]=wh(i[r])),!a)}if(p.isFormData(t)&&p.isFunction(t.entries)){const n={};return p.forEachEntry(t,(s,i)=>{e(Sh(s),i,n,0)}),n}return null}function Ph(t,e,n){if(p.isString(t))try{return(e||JSON.parse)(t),p.trim(t)}catch(s){if(s.name!=="SyntaxError")throw s}return(n||JSON.stringify)(t)}const Kt={transitional:Yr,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const s=n.getContentType()||"",i=s.indexOf("application/json")>-1,o=p.isObject(e);if(o&&p.isHTMLForm(e)&&(e=new FormData(e)),p.isFormData(e))return i?JSON.stringify(Jr(e)):e;if(p.isArrayBuffer(e)||p.isBuffer(e)||p.isStream(e)||p.isFile(e)||p.isBlob(e)||p.isReadableStream(e))return e;if(p.isArrayBufferView(e))return e.buffer;if(p.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(o){if(s.indexOf("application/x-www-form-urlencoded")>-1)return bh(e,this.formSerializer).toString();if((a=p.isFileList(e))||s.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return ge(a?{"files[]":e}:e,c&&new c,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),Ph(e)):e}],transformResponse:[function(e){const n=this.transitional||Kt.transitional,s=n&&n.forcedJSONParsing,i=this.responseType==="json";if(p.isResponse(e)||p.isReadableStream(e))return e;if(e&&p.isString(e)&&(s&&!this.responseType||i)){const r=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(a){if(r)throw a.name==="SyntaxError"?S.from(a,S.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:W.classes.FormData,Blob:W.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};p.forEach(["delete","get","head","post","put","patch"],t=>{Kt.headers[t]={}});const Ah=p.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Rh=t=>{const e={};let n,s,i;return t&&t.split(`
`).forEach(function(r){i=r.indexOf(":"),n=r.substring(0,i).trim().toLowerCase(),s=r.substring(i+1).trim(),!(!n||e[n]&&Ah[n])&&(n==="set-cookie"?e[n]?e[n].push(s):e[n]=[s]:e[n]=e[n]?e[n]+", "+s:s)}),e},ii=Symbol("internals");function Ct(t){return t&&String(t).trim().toLowerCase()}function Jt(t){return t===!1||t==null?t:p.isArray(t)?t.map(Jt):String(t)}function Ch(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=n.exec(t);)e[s[1]]=s[2];return e}const Eh=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Fe(t,e,n,s,i){if(p.isFunction(s))return s.call(this,e,n);if(i&&(e=n),!!p.isString(e)){if(p.isString(s))return e.indexOf(s)!==-1;if(p.isRegExp(s))return s.test(e)}}function Vh(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,s)=>n.toUpperCase()+s)}function Dh(t,e){const n=p.toCamelCase(" "+e);["get","set","has"].forEach(s=>{Object.defineProperty(t,s+n,{value:function(i,o,r){return this[s].call(this,e,i,o,r)},configurable:!0})})}let N=class{constructor(e){e&&this.set(e)}set(e,n,s){const i=this;function o(a,c,u){const l=Ct(c);if(!l)throw new Error("header name must be a non-empty string");const h=p.findKey(i,l);(!h||i[h]===void 0||u===!0||u===void 0&&i[h]!==!1)&&(i[h||c]=Jt(a))}const r=(a,c)=>p.forEach(a,(u,l)=>o(u,l,c));if(p.isPlainObject(e)||e instanceof this.constructor)r(e,n);else if(p.isString(e)&&(e=e.trim())&&!Eh(e))r(Rh(e),n);else if(p.isHeaders(e))for(const[a,c]of e.entries())o(c,a,s);else e!=null&&o(n,e,s);return this}get(e,n){if(e=Ct(e),e){const s=p.findKey(this,e);if(s){const i=this[s];if(!n)return i;if(n===!0)return Ch(i);if(p.isFunction(n))return n.call(this,i,s);if(p.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=Ct(e),e){const s=p.findKey(this,e);return!!(s&&this[s]!==void 0&&(!n||Fe(this,this[s],s,n)))}return!1}delete(e,n){const s=this;let i=!1;function o(r){if(r=Ct(r),r){const a=p.findKey(s,r);a&&(!n||Fe(s,s[a],a,n))&&(delete s[a],i=!0)}}return p.isArray(e)?e.forEach(o):o(e),i}clear(e){const n=Object.keys(this);let s=n.length,i=!1;for(;s--;){const o=n[s];(!e||Fe(this,this[o],o,e,!0))&&(delete this[o],i=!0)}return i}normalize(e){const n=this,s={};return p.forEach(this,(i,o)=>{const r=p.findKey(s,o);if(r){n[r]=Jt(i),delete n[o];return}const a=e?Vh(o):String(o).trim();a!==o&&delete n[o],n[a]=Jt(i),s[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return p.forEach(this,(s,i)=>{s!=null&&s!==!1&&(n[i]=e&&p.isArray(s)?s.join(", "):s)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const s=new this(e);return n.forEach(i=>s.set(i)),s}static accessor(e){const s=(this[ii]=this[ii]={accessors:{}}).accessors,i=this.prototype;function o(r){const a=Ct(r);s[a]||(Dh(i,r),s[a]=!0)}return p.isArray(e)?e.forEach(o):o(e),this}};N.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);p.reduceDescriptors(N.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(s){this[n]=s}}});p.freezeMethods(N);function Be(t,e){const n=this||Kt,s=e||n,i=N.from(s.headers);let o=s.data;return p.forEach(t,function(a){o=a.call(n,o,i.normalize(),e?e.status:void 0)}),i.normalize(),o}function Zr(t){return!!(t&&t.__CANCEL__)}function At(t,e,n){S.call(this,t??"canceled",S.ERR_CANCELED,e,n),this.name="CanceledError"}p.inherits(At,S,{__CANCEL__:!0});function Qr(t,e,n){const s=n.config.validateStatus;!n.status||!s||s(n.status)?t(n):e(new S("Request failed with status code "+n.status,[S.ERR_BAD_REQUEST,S.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Oh(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Mh(t,e){t=t||10;const n=new Array(t),s=new Array(t);let i=0,o=0,r;return e=e!==void 0?e:1e3,function(c){const u=Date.now(),l=s[o];r||(r=u),n[i]=c,s[i]=u;let h=o,f=0;for(;h!==i;)f+=n[h++],h=h%t;if(i=(i+1)%t,i===o&&(o=(o+1)%t),u-r<e)return;const m=l&&u-l;return m?Math.round(f*1e3/m):void 0}}function Lh(t,e){let n=0;const s=1e3/e;let i=null;return function(){const r=this===!0,a=Date.now();if(r||a-n>s)return i&&(clearTimeout(i),i=null),n=a,t.apply(null,arguments);i||(i=setTimeout(()=>(i=null,n=Date.now(),t.apply(null,arguments)),s-(a-n)))}}const re=(t,e,n=3)=>{let s=0;const i=Mh(50,250);return Lh(o=>{const r=o.loaded,a=o.lengthComputable?o.total:void 0,c=r-s,u=i(c),l=r<=a;s=r;const h={loaded:r,total:a,progress:a?r/a:void 0,bytes:c,rate:u||void 0,estimated:u&&a&&l?(a-r)/u:void 0,event:o,lengthComputable:a!=null};h[e?"download":"upload"]=!0,t(h)},n)},Fh=W.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let s;function i(o){let r=o;return e&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return s=i(window.location.href),function(r){const a=p.isString(r)?i(r):r;return a.protocol===s.protocol&&a.host===s.host}}():function(){return function(){return!0}}(),Bh=W.hasStandardBrowserEnv?{write(t,e,n,s,i,o){const r=[t+"="+encodeURIComponent(e)];p.isNumber(n)&&r.push("expires="+new Date(n).toGMTString()),p.isString(s)&&r.push("path="+s),p.isString(i)&&r.push("domain="+i),o===!0&&r.push("secure"),document.cookie=r.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function kh(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function jh(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function to(t,e){return t&&!kh(e)?jh(t,e):e}const ri=t=>t instanceof N?{...t}:t;function pt(t,e){e=e||{};const n={};function s(u,l,h){return p.isPlainObject(u)&&p.isPlainObject(l)?p.merge.call({caseless:h},u,l):p.isPlainObject(l)?p.merge({},l):p.isArray(l)?l.slice():l}function i(u,l,h){if(p.isUndefined(l)){if(!p.isUndefined(u))return s(void 0,u,h)}else return s(u,l,h)}function o(u,l){if(!p.isUndefined(l))return s(void 0,l)}function r(u,l){if(p.isUndefined(l)){if(!p.isUndefined(u))return s(void 0,u)}else return s(void 0,l)}function a(u,l,h){if(h in e)return s(u,l);if(h in t)return s(void 0,u)}const c={url:o,method:o,data:o,baseURL:r,transformRequest:r,transformResponse:r,paramsSerializer:r,timeout:r,timeoutMessage:r,withCredentials:r,withXSRFToken:r,adapter:r,responseType:r,xsrfCookieName:r,xsrfHeaderName:r,onUploadProgress:r,onDownloadProgress:r,decompress:r,maxContentLength:r,maxBodyLength:r,beforeRedirect:r,transport:r,httpAgent:r,httpsAgent:r,cancelToken:r,socketPath:r,responseEncoding:r,validateStatus:a,headers:(u,l)=>i(ri(u),ri(l),!0)};return p.forEach(Object.keys(Object.assign({},t,e)),function(l){const h=c[l]||i,f=h(t[l],e[l],l);p.isUndefined(f)&&h!==a||(n[l]=f)}),n}const eo=t=>{const e=pt({},t);let{data:n,withXSRFToken:s,xsrfHeaderName:i,xsrfCookieName:o,headers:r,auth:a}=e;e.headers=r=N.from(r),e.url=Xr(to(e.baseURL,e.url),t.params,t.paramsSerializer),a&&r.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let c;if(p.isFormData(n)){if(W.hasStandardBrowserEnv||W.hasStandardBrowserWebWorkerEnv)r.setContentType(void 0);else if((c=r.getContentType())!==!1){const[u,...l]=c?c.split(";").map(h=>h.trim()).filter(Boolean):[];r.setContentType([u||"multipart/form-data",...l].join("; "))}}if(W.hasStandardBrowserEnv&&(s&&p.isFunction(s)&&(s=s(e)),s||s!==!1&&Fh(e.url))){const u=i&&o&&Bh.read(o);u&&r.set(i,u)}return e},Nh=typeof XMLHttpRequest<"u",Ih=Nh&&function(t){return new Promise(function(n,s){const i=eo(t);let o=i.data;const r=N.from(i.headers).normalize();let{responseType:a}=i,c;function u(){i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let l=new XMLHttpRequest;l.open(i.method.toUpperCase(),i.url,!0),l.timeout=i.timeout;function h(){if(!l)return;const m=N.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),g={data:!a||a==="text"||a==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:m,config:t,request:l};Qr(function(T){n(T),u()},function(T){s(T),u()},g),l=null}"onloadend"in l?l.onloadend=h:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(h)},l.onabort=function(){l&&(s(new S("Request aborted",S.ECONNABORTED,i,l)),l=null)},l.onerror=function(){s(new S("Network Error",S.ERR_NETWORK,i,l)),l=null},l.ontimeout=function(){let d=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const g=i.transitional||Yr;i.timeoutErrorMessage&&(d=i.timeoutErrorMessage),s(new S(d,g.clarifyTimeoutError?S.ETIMEDOUT:S.ECONNABORTED,i,l)),l=null},o===void 0&&r.setContentType(null),"setRequestHeader"in l&&p.forEach(r.toJSON(),function(d,g){l.setRequestHeader(g,d)}),p.isUndefined(i.withCredentials)||(l.withCredentials=!!i.withCredentials),a&&a!=="json"&&(l.responseType=i.responseType),typeof i.onDownloadProgress=="function"&&l.addEventListener("progress",re(i.onDownloadProgress,!0)),typeof i.onUploadProgress=="function"&&l.upload&&l.upload.addEventListener("progress",re(i.onUploadProgress)),(i.cancelToken||i.signal)&&(c=m=>{l&&(s(!m||m.type?new At(null,t,l):m),l.abort(),l=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));const f=Oh(i.url);if(f&&W.protocols.indexOf(f)===-1){s(new S("Unsupported protocol "+f+":",S.ERR_BAD_REQUEST,t));return}l.send(o||null)})},Uh=(t,e)=>{let n=new AbortController,s;const i=function(c){if(!s){s=!0,r();const u=c instanceof Error?c:this.reason;n.abort(u instanceof S?u:new At(u instanceof Error?u.message:u))}};let o=e&&setTimeout(()=>{i(new S(`timeout ${e} of ms exceeded`,S.ETIMEDOUT))},e);const r=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(c=>{c&&(c.removeEventListener?c.removeEventListener("abort",i):c.unsubscribe(i))}),t=null)};t.forEach(c=>c&&c.addEventListener&&c.addEventListener("abort",i));const{signal:a}=n;return a.unsubscribe=r,[a,()=>{o&&clearTimeout(o),o=null}]},_h=function*(t,e){let n=t.byteLength;if(!e||n<e){yield t;return}let s=0,i;for(;s<n;)i=s+e,yield t.slice(s,i),s=i},Hh=async function*(t,e,n){for await(const s of t)yield*_h(ArrayBuffer.isView(s)?s:await n(String(s)),e)},oi=(t,e,n,s,i)=>{const o=Hh(t,e,i);let r=0;return new ReadableStream({type:"bytes",async pull(a){const{done:c,value:u}=await o.next();if(c){a.close(),s();return}let l=u.byteLength;n&&n(r+=l),a.enqueue(new Uint8Array(u))},cancel(a){return s(a),o.return()}},{highWaterMark:2})},ai=(t,e)=>{const n=t!=null;return s=>setTimeout(()=>e({lengthComputable:n,total:t,loaded:s}))},ye=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",no=ye&&typeof ReadableStream=="function",nn=ye&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),Kh=no&&(()=>{let t=!1;const e=new Request(W.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e})(),li=64*1024,sn=no&&!!(()=>{try{return p.isReadableStream(new Response("").body)}catch{}})(),oe={stream:sn&&(t=>t.body)};ye&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!oe[e]&&(oe[e]=p.isFunction(t[e])?n=>n[e]():(n,s)=>{throw new S(`Response type '${e}' is not supported`,S.ERR_NOT_SUPPORT,s)})})})(new Response);const $h=async t=>{if(t==null)return 0;if(p.isBlob(t))return t.size;if(p.isSpecCompliantForm(t))return(await new Request(t).arrayBuffer()).byteLength;if(p.isArrayBufferView(t))return t.byteLength;if(p.isURLSearchParams(t)&&(t=t+""),p.isString(t))return(await nn(t)).byteLength},Wh=async(t,e)=>{const n=p.toFiniteNumber(t.getContentLength());return n??$h(e)},zh=ye&&(async t=>{let{url:e,method:n,data:s,signal:i,cancelToken:o,timeout:r,onDownloadProgress:a,onUploadProgress:c,responseType:u,headers:l,withCredentials:h="same-origin",fetchOptions:f}=eo(t);u=u?(u+"").toLowerCase():"text";let[m,d]=i||o||r?Uh([i,o],r):[],g,v;const T=()=>{!g&&setTimeout(()=>{m&&m.unsubscribe()}),g=!0};let x;try{if(c&&Kh&&n!=="get"&&n!=="head"&&(x=await Wh(l,s))!==0){let E=new Request(e,{method:"POST",body:s,duplex:"half"}),k;p.isFormData(s)&&(k=E.headers.get("content-type"))&&l.setContentType(k),E.body&&(s=oi(E.body,li,ai(x,re(c)),null,nn))}p.isString(h)||(h=h?"cors":"omit"),v=new Request(e,{...f,signal:m,method:n.toUpperCase(),headers:l.normalize().toJSON(),body:s,duplex:"half",withCredentials:h});let y=await fetch(v);const w=sn&&(u==="stream"||u==="response");if(sn&&(a||w)){const E={};["status","statusText","headers"].forEach(A=>{E[A]=y[A]});const k=p.toFiniteNumber(y.headers.get("content-length"));y=new Response(oi(y.body,li,a&&ai(k,re(a,!0)),w&&T,nn),E)}u=u||"text";let R=await oe[p.findKey(oe,u)||"text"](y,t);return!w&&T(),d&&d(),await new Promise((E,k)=>{Qr(E,k,{data:R,headers:N.from(y.headers),status:y.status,statusText:y.statusText,config:t,request:v})})}catch(y){throw T(),y&&y.name==="TypeError"&&/fetch/i.test(y.message)?Object.assign(new S("Network Error",S.ERR_NETWORK,t,v),{cause:y.cause||y}):S.from(y,y&&y.code,t,v)}}),rn={http:ch,xhr:Ih,fetch:zh};p.forEach(rn,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const ci=t=>`- ${t}`,qh=t=>p.isFunction(t)||t===null||t===!1,so={getAdapter:t=>{t=p.isArray(t)?t:[t];const{length:e}=t;let n,s;const i={};for(let o=0;o<e;o++){n=t[o];let r;if(s=n,!qh(n)&&(s=rn[(r=String(n)).toLowerCase()],s===void 0))throw new S(`Unknown adapter '${r}'`);if(s)break;i[r||"#"+o]=s}if(!s){const o=Object.entries(i).map(([a,c])=>`adapter ${a} `+(c===!1?"is not supported by the environment":"is not available in the build"));let r=e?o.length>1?`since :
`+o.map(ci).join(`
`):" "+ci(o[0]):"as no adapter specified";throw new S("There is no suitable adapter to dispatch the request "+r,"ERR_NOT_SUPPORT")}return s},adapters:rn};function ke(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new At(null,t)}function ui(t){return ke(t),t.headers=N.from(t.headers),t.data=Be.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),so.getAdapter(t.adapter||Kt.adapter)(t).then(function(s){return ke(t),s.data=Be.call(t,t.transformResponse,s),s.headers=N.from(s.headers),s},function(s){return Zr(s)||(ke(t),s&&s.response&&(s.response.data=Be.call(t,t.transformResponse,s.response),s.response.headers=N.from(s.response.headers))),Promise.reject(s)})}const io="1.7.2",Un={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Un[t]=function(s){return typeof s===t||"a"+(e<1?"n ":" ")+t}});const hi={};Un.transitional=function(e,n,s){function i(o,r){return"[Axios v"+io+"] Transitional option '"+o+"'"+r+(s?". "+s:"")}return(o,r,a)=>{if(e===!1)throw new S(i(r," has been removed"+(n?" in "+n:"")),S.ERR_DEPRECATED);return n&&!hi[r]&&(hi[r]=!0,console.warn(i(r," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(o,r,a):!0}};function Gh(t,e,n){if(typeof t!="object")throw new S("options must be an object",S.ERR_BAD_OPTION_VALUE);const s=Object.keys(t);let i=s.length;for(;i-- >0;){const o=s[i],r=e[o];if(r){const a=t[o],c=a===void 0||r(a,o,t);if(c!==!0)throw new S("option "+o+" must be "+c,S.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new S("Unknown option "+o,S.ERR_BAD_OPTION)}}const on={assertOptions:Gh,validators:Un},tt=on.validators;let dt=class{constructor(e){this.defaults=e,this.interceptors={request:new si,response:new si}}async request(e,n){try{return await this._request(e,n)}catch(s){if(s instanceof Error){let i;Error.captureStackTrace?Error.captureStackTrace(i={}):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{s.stack?o&&!String(s.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(s.stack+=`
`+o):s.stack=o}catch{}}throw s}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=pt(this.defaults,n);const{transitional:s,paramsSerializer:i,headers:o}=n;s!==void 0&&on.assertOptions(s,{silentJSONParsing:tt.transitional(tt.boolean),forcedJSONParsing:tt.transitional(tt.boolean),clarifyTimeoutError:tt.transitional(tt.boolean)},!1),i!=null&&(p.isFunction(i)?n.paramsSerializer={serialize:i}:on.assertOptions(i,{encode:tt.function,serialize:tt.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let r=o&&p.merge(o.common,o[n.method]);o&&p.forEach(["delete","get","head","post","put","patch","common"],d=>{delete o[d]}),n.headers=N.concat(r,o);const a=[];let c=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(c=c&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const u=[];this.interceptors.response.forEach(function(g){u.push(g.fulfilled,g.rejected)});let l,h=0,f;if(!c){const d=[ui.bind(this),void 0];for(d.unshift.apply(d,a),d.push.apply(d,u),f=d.length,l=Promise.resolve(n);h<f;)l=l.then(d[h++],d[h++]);return l}f=a.length;let m=n;for(h=0;h<f;){const d=a[h++],g=a[h++];try{m=d(m)}catch(v){g.call(this,v);break}}try{l=ui.call(this,m)}catch(d){return Promise.reject(d)}for(h=0,f=u.length;h<f;)l=l.then(u[h++],u[h++]);return l}getUri(e){e=pt(this.defaults,e);const n=to(e.baseURL,e.url);return Xr(n,e.params,e.paramsSerializer)}};p.forEach(["delete","get","head","options"],function(e){dt.prototype[e]=function(n,s){return this.request(pt(s||{},{method:e,url:n,data:(s||{}).data}))}});p.forEach(["post","put","patch"],function(e){function n(s){return function(o,r,a){return this.request(pt(a||{},{method:e,headers:s?{"Content-Type":"multipart/form-data"}:{},url:o,data:r}))}}dt.prototype[e]=n(),dt.prototype[e+"Form"]=n(!0)});let Xh=class ro{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const s=this;this.promise.then(i=>{if(!s._listeners)return;let o=s._listeners.length;for(;o-- >0;)s._listeners[o](i);s._listeners=null}),this.promise.then=i=>{let o;const r=new Promise(a=>{s.subscribe(a),o=a}).then(i);return r.cancel=function(){s.unsubscribe(o)},r},e(function(o,r,a){s.reason||(s.reason=new At(o,r,a),n(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new ro(function(i){e=i}),cancel:e}}};function Yh(t){return function(n){return t.apply(null,n)}}function Jh(t){return p.isObject(t)&&t.isAxiosError===!0}const an={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(an).forEach(([t,e])=>{an[e]=t});function oo(t){const e=new dt(t),n=jr(dt.prototype.request,e);return p.extend(n,dt.prototype,e,{allOwnKeys:!0}),p.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return oo(pt(t,i))},n}const O=oo(Kt);O.Axios=dt;O.CanceledError=At;O.CancelToken=Xh;O.isCancel=Zr;O.VERSION=io;O.toFormData=ge;O.AxiosError=S;O.Cancel=O.CanceledError;O.all=function(e){return Promise.all(e)};O.spread=Yh;O.isAxiosError=Jh;O.mergeConfig=pt;O.AxiosHeaders=N;O.formToJSON=t=>Jr(p.isHTMLForm(t)?new FormData(t):t);O.getAdapter=so.getAdapter;O.HttpStatusCode=an;O.default=O;const{Axios:af,AxiosError:lf,CanceledError:cf,isCancel:uf,CancelToken:hf,VERSION:ff,all:df,Cancel:pf,isAxiosError:mf,spread:gf,toFormData:yf,AxiosHeaders:vf,HttpStatusCode:Tf,formToJSON:xf,getAdapter:bf,mergeConfig:Sf}=O;export{lf as A,O as a,vf as b,nf as m,sf as u};
