@3sc/common-component 0.0.417 → 0.0.418

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -299,7 +299,7 @@ const theme2 = createTheme({ palette: {
299
299
  ${p}px !important;
300
300
  top: ${u}px !important;
301
301
  }
302
- `),()=>{document.head.removeChild(h)}},[t]),g.jsx(J5,{isPresent:t,childRef:o,sizeRef:i,children:C.cloneElement(e,{ref:o})})}const eI=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a,anchorX:l})=>{const c=kd(tI),u=M.useId(),d=M.useCallback(p=>{c.set(p,!0);for(const h of c.values())if(!h)return;r&&r()},[c,r]),f=M.useMemo(()=>({id:u,initial:t,isPresent:n,custom:o,onExitComplete:d,register:p=>(c.set(p,!1),()=>c.delete(p))}),i?[Math.random(),d]:[n,d]);return M.useMemo(()=>{c.forEach((p,h)=>c.set(h,!1))},[n]),C.useEffect(()=>{!n&&!c.size&&r&&r()},[n]),a==="popLayout"&&(e=g.jsx(Q5,{isPresent:n,anchorX:l,children:e})),g.jsx(Wl.Provider,{value:f,children:e})};function tI(){return new Map}function ry(e=!0){const t=M.useContext(Wl);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=M.useId();M.useEffect(()=>{if(e)return o(i)},[e]);const a=M.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,a]:[!0]}const zl=e=>e.key||"";function oy(e){const t=[];return M.Children.forEach(e,n=>{M.isValidElement(n)&&t.push(n)}),t}const nI=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:a=!1,anchorX:l="left"})=>{const[c,u]=ry(a),d=M.useMemo(()=>oy(e),[e]),f=a&&!c?[]:d.map(zl),p=M.useRef(!0),h=M.useRef(d),y=kd(()=>new Map),[m,v]=M.useState(d),[x,T]=M.useState(d);ny(()=>{p.current=!1,h.current=d;for(let b=0;b<x.length;b++){const O=zl(x[b]);f.includes(O)?y.delete(O):y.get(O)!==!0&&y.set(O,!1)}},[x,f.length,f.join("-")]);const w=[];if(d!==m){let b=[...d];for(let O=0;O<x.length;O++){const E=x[O],P=zl(E);f.includes(P)||(b.splice(O,0,E),w.push(E))}return i==="wait"&&w.length&&(b=w),T(oy(b)),v(d),null}process.env.NODE_ENV!=="production"&&i==="wait"&&x.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:k}=M.useContext(Td);return g.jsx(g.Fragment,{children:x.map(b=>{const O=zl(b),E=a&&!c?!1:d===x||f.includes(O),P=()=>{if(y.has(O))y.set(O,!0);else return;let R=!0;y.forEach(A=>{A||(R=!1)}),R&&(k==null||k(),T(h.current),a&&(u==null||u()),r&&r())};return g.jsx(eI,{isPresent:E,initial:!p.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,onExitComplete:E?void 0:P,anchorX:l,children:b},O)})})};function Pd(e,t){e.indexOf(t)===-1&&e.push(t)}function Md(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}let fs=()=>{},Ur=()=>{};process.env.NODE_ENV!=="production"&&(fs=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Ur=(e,t)=>{if(!e)throw new Error(t)});const Rd={useManualTiming:!1};function Dd(e){let t;return()=>(t===void 0&&(t=e()),t)}const Bn=e=>e,Di=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Id{constructor(){this.subscriptions=[]}add(t){return Pd(this.subscriptions,t),()=>Md(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;i<o;i++){const a=this.subscriptions[i];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const qn=e=>e*1e3,ar=e=>e/1e3;function sy(e,t){return t?e*(1e3/t):0}const iy=new Set;function Ul(e,t,n){e||iy.has(t)||(console.warn(t),iy.add(t))}const rI=Dd(()=>window.ScrollTimeline!==void 0);class oI{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(o=>{if(rI()&&o.attachTimeline)return o.attachTimeline(t);if(typeof n=="function")return n(o)});return()=>{r.forEach((o,i)=>{o&&o(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class sI extends oI{then(t,n){return this.finished.finally(t).then(()=>{})}}const ay={value:null},Ad=e=>Array.isArray(e)&&typeof e[0]=="number",iI={};function aI(e,t){const n=Dd(e);return()=>iI[t]??n()}const Ii=aI(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ly=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let i=0;i<o;i++)r+=e(i/(o-1))+", ";return`linear(${r.substring(0,r.length-2)})`},Ai=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Nd={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ai([0,.65,.55,1]),circOut:Ai([.55,0,1,.45]),backIn:Ai([.31,.01,.66,-.59]),backOut:Ai([.33,1.53,.69,.99])};function cy(e,t){if(e)return typeof e=="function"&&Ii()?ly(e,t):Ad(e)?Ai(e):Array.isArray(e)?e.map(n=>cy(n,t)||Nd.easeOut):Nd[e]}function lI(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:a="loop",ease:l="easeInOut",times:c}={},u=void 0){const d={[t]:n};c&&(d.offset=c);const f=cy(l,o);return Array.isArray(f)&&(d.easing=f),e.animate(d,{delay:r,duration:o,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:i+1,direction:a==="reverse"?"alternate":"normal",pseudoElement:u})}function jd(e){return typeof e=="function"&&"applyToOptions"in e}function Fd(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const Hl=2e4;function _d(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Hl;)t+=n,r=e.next(t);return t>=Hl?1/0:t}function cI(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(_d(r),Hl);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:ar(o)}}function uy(e){return!!(typeof e=="function"&&Ii()||!e||typeof e=="string"&&(e in Nd||Ii())||Ad(e)||Array.isArray(e)&&e.every(uy))}function dy(e,t){e.timeline=t,e.onfinish=null}const ql=["read","resolveKeyframes","update","preRender","render","postRender"];function uI(e,t){let n=new Set,r=new Set,o=!1,i=!1;const a=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1},c=0;function u(f){a.has(f)&&(d.schedule(f),e()),c++,f(l)}const d={schedule:(f,p=!1,h=!1)=>{const m=h&&o?n:r;return p&&a.add(f),m.has(f)||m.add(f),f},cancel:f=>{r.delete(f),a.delete(f)},process:f=>{if(l=f,o){i=!0;return}o=!0,[n,r]=[r,n],n.forEach(u),t&&ay.value&&ay.value.frameloop[t].push(c),c=0,n.clear(),o=!1,i&&(i=!1,d.process(f))}};return d}const dI=40;function fy(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=ql.reduce((x,T)=>(x[T]=uI(i,t?T:void 0),x),{}),{read:l,resolveKeyframes:c,update:u,preRender:d,render:f,postRender:p}=a,h=()=>{const x=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(x-o.timestamp,dI),1),o.timestamp=x,o.isProcessing=!0,l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),p.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(h))},y=()=>{n=!0,r=!0,o.isProcessing||e(h)};return{schedule:ql.reduce((x,T)=>{const w=a[T];return x[T]=(k,b=!1,O=!1)=>(n||y(),w.schedule(k,b,O)),x},{}),cancel:x=>{for(let T=0;T<ql.length;T++)a[ql[T]].cancel(x)},state:o,steps:a}}const{schedule:$d}=fy(queueMicrotask,!1),{schedule:St,cancel:Hr,state:Gt,steps:Bd}=fy(typeof requestAnimationFrame<"u"?requestAnimationFrame:Bn,!0);let Yl;function fI(){Yl=void 0}const lr={now:()=>(Yl===void 0&&lr.set(Gt.isProcessing||Rd.useManualTiming?Gt.timestamp:performance.now()),Yl),set:e=>{Yl=e,queueMicrotask(fI)}},Yn={x:!1,y:!1};function py(){return Yn.x||Yn.y}function pI(e){return e==="x"||e==="y"?Yn[e]?null:(Yn[e]=!0,()=>{Yn[e]=!1}):Yn.x||Yn.y?null:(Yn.x=Yn.y=!0,()=>{Yn.x=Yn.y=!1})}function hI(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const o=(n==null?void 0:n[e])??r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}function hy(e,t){const n=hI(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function my(e){return!(e.pointerType==="touch"||py())}function mI(e,t,n={}){const[r,o,i]=hy(e,n),a=l=>{if(!my(l))return;const{target:c}=l,u=t(c,l);if(typeof u!="function"||!c)return;const d=f=>{my(f)&&(u(f),c.removeEventListener("pointerleave",d))};c.addEventListener("pointerleave",d,o)};return r.forEach(l=>{l.addEventListener("pointerenter",a,o)}),i}const gy=(e,t)=>t?e===t?!0:gy(e,t.parentElement):!1,Ld=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,gI=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function yI(e){return gI.has(e.tagName)||e.tabIndex!==-1}const Ni=new WeakSet;function yy(e){return t=>{t.key==="Enter"&&e(t)}}function Vd(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const bI=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=yy(()=>{if(Ni.has(n))return;Vd(n,"down");const o=yy(()=>{Vd(n,"up")}),i=()=>Vd(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function by(e){return Ld(e)&&!py()}function vI(e,t,n={}){const[r,o,i]=hy(e,n),a=l=>{const c=l.currentTarget;if(!by(l)||Ni.has(c))return;Ni.add(c);const u=t(c,l),d=(h,y)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",p),!(!by(h)||!Ni.has(c))&&(Ni.delete(c),typeof u=="function"&&u(h,{success:y}))},f=h=>{d(h,c===window||c===document||n.useGlobalTarget||gy(c,h.target))},p=h=>{d(h,!1)};window.addEventListener("pointerup",f,o),window.addEventListener("pointercancel",p,o)};return r.forEach(l=>{(n.useGlobalTarget?window:l).addEventListener("pointerdown",a,o),l instanceof HTMLElement&&(l.addEventListener("focus",u=>bI(u,o)),!yI(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),i}const vy=30,xI=e=>!isNaN(parseFloat(e));class wI{constructor(t,n={}){this.version="12.7.3",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const i=lr.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=lr.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=xI(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Ul(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Id);const r=this.events[t].add(n);return t==="change"?()=>{r(),St.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=lr.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>vy)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,vy);return sy(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(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 ji(e,t){return new wI(e,t)}const xy=M.createContext({strict:!1}),wy={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"]},ps={};for(const e in wy)ps[e]={isEnabled:t=>wy[e].some(n=>!!t[n])};function CI(e){for(const t in e)ps[t]={...ps[t],...e[t]}}const SI=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 Gl(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||SI.has(e)}let Cy=e=>!Gl(e);function TI(e){e&&(Cy=t=>t.startsWith("on")?!Gl(t):e(t))}try{TI(require("@emotion/is-prop-valid").default)}catch{}function kI(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(Cy(o)||n===!0&&Gl(o)||!t&&!Gl(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function OI(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&Ul(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,o)=>o==="create"?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}const Kl=M.createContext({});function Xl(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Fi(e){return typeof e=="string"||Array.isArray(e)}const Wd=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],zd=["initial",...Wd];function Zl(e){return Xl(e.animate)||zd.some(t=>Fi(e[t]))}function Sy(e){return!!(Zl(e)||e.variants)}function EI(e,t){if(Zl(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Fi(n)?n:void 0,animate:Fi(r)?r:void 0}}return e.inherit!==!1?t:{}}function PI(e){const{initial:t,animate:n}=EI(e,M.useContext(Kl));return M.useMemo(()=>({initial:t,animate:n}),[Ty(t),Ty(n)])}function Ty(e){return Array.isArray(e)?e.join(" "):e}const MI=Symbol.for("motionComponentSymbol");function hs(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function RI(e,t,n){return M.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):hs(n)&&(n.current=r))},[t])}const Ud=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ky="data-"+Ud("framerAppearId"),Oy=M.createContext({});function DI(e,t,n,r,o){var m,v;const{visualElement:i}=M.useContext(Kl),a=M.useContext(xy),l=M.useContext(Wl),c=M.useContext(Ed).reducedMotion,u=M.useRef(null);r=r||a.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:i,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c}));const d=u.current,f=M.useContext(Oy);d&&!d.projection&&o&&(d.type==="html"||d.type==="svg")&&II(u.current,n,o,f);const p=M.useRef(!1);M.useInsertionEffect(()=>{d&&p.current&&d.update(n,l)});const h=n[ky],y=M.useRef(!!h&&!((m=window.MotionHandoffIsComplete)!=null&&m.call(window,h))&&((v=window.MotionHasOptimisedAnimation)==null?void 0:v.call(window,h)));return ny(()=>{d&&(p.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),$d.render(d.render),y.current&&d.animationState&&d.animationState.animateChanges())}),M.useEffect(()=>{d&&(!y.current&&d.animationState&&d.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var x;(x=window.MotionHandoffMarkAsComplete)==null||x.call(window,h)}),y.current=!1))}),d}function II(e,t,n,r){const{layoutId:o,layout:i,drag:a,dragConstraints:l,layoutScroll:c,layoutRoot:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Ey(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!a||l&&hs(l),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:u})}function Ey(e){if(e)return e.options.allowProjection!==!1?e.projection:Ey(e.parent)}function AI({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&CI(e);function i(l,c){let u;const d={...M.useContext(Ed),...l,layoutId:NI(l)},{isStatic:f}=d,p=PI(l),h=r(l,f);if(!f&&Od){jI(d,e);const y=FI(d);u=y.MeasureLayout,p.visualElement=DI(o,h,d,t,y.ProjectionNode)}return g.jsxs(Kl.Provider,{value:p,children:[u&&p.visualElement?g.jsx(u,{visualElement:p.visualElement,...d}):null,n(o,l,RI(h,p.visualElement,c),h,f,p.visualElement)]})}i.displayName=`motion.${typeof o=="string"?o:`create(${o.displayName??o.name??""})`}`;const a=M.forwardRef(i);return a[MI]=o,a}function NI({layoutId:e}){const t=M.useContext(Td).id;return t&&e!==void 0?t+"-"+e:e}function jI(e,t){const n=M.useContext(xy).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?fs(!1,r):Ur(!1,r)}}function FI(e){const{drag:t,layout:n}=ps;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const Py=e=>t=>typeof t=="string"&&t.startsWith(e),Hd=Py("--"),_I=Py("var(--"),qd=e=>_I(e)?$I.test(e.split("/*")[0].trim()):!1,$I=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,_i={};function BI(e){for(const t in e)_i[t]=e[t],Hd(t)&&(_i[t].isCSSVariable=!0)}const ms=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],fo=new Set(ms);function My(e,{layout:t,layoutId:n}){return fo.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!_i[e]||e==="opacity")}const Jt=e=>!!(e&&e.getVelocity),Ry=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Or=(e,t,n)=>n>t?t:n<e?e:n,gs={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},$i={...gs,transform:e=>Or(0,1,e)},Jl={...gs,default:1},Bi=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),qr=Bi("deg"),cr=Bi("%"),We=Bi("px"),LI=Bi("vh"),VI=Bi("vw"),Dy={...cr,parse:e=>cr.parse(e)/100,transform:e=>cr.transform(e*100)},WI={borderWidth:We,borderTopWidth:We,borderRightWidth:We,borderBottomWidth:We,borderLeftWidth:We,borderRadius:We,radius:We,borderTopLeftRadius:We,borderTopRightRadius:We,borderBottomRightRadius:We,borderBottomLeftRadius:We,width:We,maxWidth:We,height:We,maxHeight:We,top:We,right:We,bottom:We,left:We,padding:We,paddingTop:We,paddingRight:We,paddingBottom:We,paddingLeft:We,margin:We,marginTop:We,marginRight:We,marginBottom:We,marginLeft:We,backgroundPositionX:We,backgroundPositionY:We},zI={rotate:qr,rotateX:qr,rotateY:qr,rotateZ:qr,scale:Jl,scaleX:Jl,scaleY:Jl,scaleZ:Jl,skew:qr,skewX:qr,skewY:qr,distance:We,translateX:We,translateY:We,translateZ:We,x:We,y:We,z:We,perspective:We,transformPerspective:We,opacity:$i,originX:Dy,originY:Dy,originZ:We},Iy={...gs,transform:Math.round},Yd={...WI,...zI,zIndex:Iy,size:We,fillOpacity:$i,strokeOpacity:$i,numOctaves:Iy},UI={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},HI=ms.length;function qI(e,t,n){let r="",o=!0;for(let i=0;i<HI;i++){const a=ms[i],l=e[a];if(l===void 0)continue;let c=!0;if(typeof l=="number"?c=l===(a.startsWith("scale")?1:0):c=parseFloat(l)===0,!c||n){const u=Ry(l,Yd[a]);if(!c){o=!1;const d=UI[a]||a;r+=`${d}(${u}) `}n&&(t[a]=u)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function Gd(e,t,n){const{style:r,vars:o,transformOrigin:i}=e;let a=!1,l=!1;for(const c in t){const u=t[c];if(fo.has(c)){a=!0;continue}else if(Hd(c)){o[c]=u;continue}else{const d=Ry(u,Yd[c]);c.startsWith("origin")?(l=!0,i[c]=d):r[c]=d}}if(t.transform||(a||n?r.transform=qI(t,e.transform,n):r.transform&&(r.transform="none")),l){const{originX:c="50%",originY:u="50%",originZ:d=0}=i;r.transformOrigin=`${c} ${u} ${d}`}}const Kd=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Ay(e,t,n){for(const r in t)!Jt(t[r])&&!My(r,n)&&(e[r]=t[r])}function YI({transformTemplate:e},t){return M.useMemo(()=>{const n=Kd();return Gd(n,t,e),Object.assign({},n.vars,n.style)},[t])}function GI(e,t){const n=e.style||{},r={};return Ay(r,n,e),Object.assign(r,YI(e,t)),r}function KI(e,t){const n={},r=GI(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const XI=["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 Xd(e){return typeof e!="string"||e.includes("-")?!1:!!(XI.indexOf(e)>-1||/[A-Z]/u.test(e))}const ZI={offset:"stroke-dashoffset",array:"stroke-dasharray"},JI={offset:"strokeDashoffset",array:"strokeDasharray"};function QI(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?ZI:JI;e[i.offset]=We.transform(-r);const a=We.transform(t),l=We.transform(n);e[i.array]=`${a} ${l}`}function Ny(e,t,n){return typeof e=="string"?e:We.transform(t+n*e)}function eA(e,t,n){const r=Ny(t,e.x,e.width),o=Ny(n,e.y,e.height);return`${r} ${o}`}function Zd(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:a,pathSpacing:l=1,pathOffset:c=0,...u},d,f){if(Gd(e,u,f),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:h,dimensions:y}=e;p.transform&&(y&&(h.transform=p.transform),delete p.transform),y&&(o!==void 0||i!==void 0||h.transform)&&(h.transformOrigin=eA(y,o!==void 0?o:.5,i!==void 0?i:.5)),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),a!==void 0&&QI(p,a,l,c,!1)}const jy=()=>({...Kd(),attrs:{}}),Jd=e=>typeof e=="string"&&e.toLowerCase()==="svg";function tA(e,t,n,r){const o=M.useMemo(()=>{const i=jy();return Zd(i,t,Jd(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Ay(i,e.style,e),o.style={...i,...o.style}}return o}function nA(e=!1){return(n,r,o,{latestValues:i},a)=>{const c=(Xd(n)?tA:KI)(r,i,a,n),u=kI(r,typeof n=="string",e),d=n!==M.Fragment?{...u,...c,ref:o}:{},{children:f}=r,p=M.useMemo(()=>Jt(f)?f.get():f,[f]);return M.createElement(n,{...d,children:p})}}function Fy(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Qd(e,t,n,r){if(typeof t=="function"){const[o,i]=Fy(r);t=t(n!==void 0?n:e.custom,o,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,i]=Fy(r);t=t(n!==void 0?n:e.custom,o,i)}return t}const ef=e=>Array.isArray(e),rA=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),oA=e=>ef(e)?e[e.length-1]||0:e;function Ql(e){const t=Jt(e)?e.get():e;return rA(t)?t.toValue():t}function sA({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,i){const a={latestValues:iA(r,o,i,e),renderState:t()};return n&&(a.onMount=l=>n({props:r,current:l,...a}),a.onUpdate=l=>n(l)),a}const _y=e=>(t,n)=>{const r=M.useContext(Kl),o=M.useContext(Wl),i=()=>sA(e,t,r,o);return n?i():kd(i)};function iA(e,t,n,r){const o={},i=r(e,{});for(const p in i)o[p]=Ql(i[p]);let{initial:a,animate:l}=e;const c=Zl(e),u=Sy(e);t&&u&&!c&&e.inherit!==!1&&(a===void 0&&(a=t.initial),l===void 0&&(l=t.animate));let d=n?n.initial===!1:!1;d=d||a===!1;const f=d?l:a;if(f&&typeof f!="boolean"&&!Xl(f)){const p=Array.isArray(f)?f:[f];for(let h=0;h<p.length;h++){const y=Qd(e,p[h]);if(y){const{transitionEnd:m,transition:v,...x}=y;for(const T in x){let w=x[T];if(Array.isArray(w)){const k=d?w.length-1:0;w=w[k]}w!==null&&(o[T]=w)}for(const T in m)o[T]=m[T]}}}return o}function tf(e,t,n){var i;const{style:r}=e,o={};for(const a in r)(Jt(r[a])||t.style&&Jt(t.style[a])||My(a,e)||((i=n==null?void 0:n.getValue(a))==null?void 0:i.liveStyle)!==void 0)&&(o[a]=r[a]);return o}const aA={useVisualState:_y({scrapeMotionValuesFromProps:tf,createRenderState:Kd})};function $y(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function By(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const Ly=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 Vy(e,t,n,r){By(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Ly.has(o)?o:Ud(o),t.attrs[o])}function Wy(e,t,n){const r=tf(e,t,n);for(const o in e)if(Jt(e[o])||Jt(t[o])){const i=ms.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}const zy=["x","y","width","height","cx","cy","r"],lA={useVisualState:_y({scrapeMotionValuesFromProps:Wy,createRenderState:jy,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:o})=>{if(!n)return;let i=!!e.drag;if(!i){for(const l in o)if(fo.has(l)){i=!0;break}}if(!i)return;let a=!t;if(t)for(let l=0;l<zy.length;l++){const c=zy[l];e[c]!==t[c]&&(a=!0)}a&&St.read(()=>{$y(n,r),St.render(()=>{Zd(r,o,Jd(n.tagName),e.transformTemplate),Vy(n,r)})})}})};function cA(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const a={...Xd(r)?lA:aA,preloadedFeatures:e,useRender:nA(o),createVisualElement:t,Component:r};return AI(a)}}function Li(e,t,n){const r=e.getProps();return Qd(r,t,n!==void 0?n:r.custom,e)}const Uy=new Set(["width","height","top","left","right","bottom",...ms]);function uA(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,ji(n))}function dA(e,t){const n=Li(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const a in i){const l=oA(i[a]);uA(e,a,l)}}function fA(e){return!!(Jt(e)&&e.add)}function nf(e,t){const n=e.getValue("willChange");if(fA(n))return n.add(t);if(!n&&Rd.WillChange){const r=new Rd.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Hy(e){return e.props[ky]}const qy=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,pA=1e-7,hA=12;function mA(e,t,n,r,o){let i,a,l=0;do a=t+(n-t)/2,i=qy(a,r,o)-e,i>0?n=a:t=a;while(Math.abs(i)>pA&&++l<hA);return a}function Vi(e,t,n,r){if(e===t&&n===r)return Bn;const o=i=>mA(i,0,1,e,n);return i=>i===0||i===1?i:qy(o(i),t,r)}const Yy=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Gy=e=>t=>1-e(1-t),Ky=Vi(.33,1.53,.69,.99),rf=Gy(Ky),Xy=Yy(rf),Zy=e=>(e*=2)<1?.5*rf(e):.5*(2-Math.pow(2,-10*(e-1))),of=e=>1-Math.sin(Math.acos(e)),Jy=Gy(of),Qy=Yy(of),eb=e=>/^0[^.\s]+$/u.test(e);function gA(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||eb(e):!0}const Wi=e=>Math.round(e*1e5)/1e5,sf=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function yA(e){return e==null}const bA=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,af=(e,t)=>n=>!!(typeof n=="string"&&bA.test(n)&&n.startsWith(e)||t&&!yA(n)&&Object.prototype.hasOwnProperty.call(n,t)),tb=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,a,l]=r.match(sf);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:l!==void 0?parseFloat(l):1}},vA=e=>Or(0,255,e),lf={...gs,transform:e=>Math.round(vA(e))},po={test:af("rgb","red"),parse:tb("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+lf.transform(e)+", "+lf.transform(t)+", "+lf.transform(n)+", "+Wi($i.transform(r))+")"};function xA(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const cf={test:af("#"),parse:xA,transform:po.transform},ys={test:af("hsl","hue"),parse:tb("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+cr.transform(Wi(t))+", "+cr.transform(Wi(n))+", "+Wi($i.transform(r))+")"},Qt={test:e=>po.test(e)||cf.test(e)||ys.test(e),parse:e=>po.test(e)?po.parse(e):ys.test(e)?ys.parse(e):cf.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?po.transform(e):ys.transform(e)},wA=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function CA(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(sf))==null?void 0:t.length)||0)+(((n=e.match(wA))==null?void 0:n.length)||0)>0}const nb="number",rb="color",SA="var",TA="var(",ob="${}",kA=/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 zi(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const l=t.replace(kA,c=>(Qt.test(c)?(r.color.push(i),o.push(rb),n.push(Qt.parse(c))):c.startsWith(TA)?(r.var.push(i),o.push(SA),n.push(c)):(r.number.push(i),o.push(nb),n.push(parseFloat(c))),++i,ob)).split(ob);return{values:n,split:l,indexes:r,types:o}}function sb(e){return zi(e).values}function ib(e){const{split:t,types:n}=zi(e),r=t.length;return o=>{let i="";for(let a=0;a<r;a++)if(i+=t[a],o[a]!==void 0){const l=n[a];l===nb?i+=Wi(o[a]):l===rb?i+=Qt.transform(o[a]):i+=o[a]}return i}}const OA=e=>typeof e=="number"?0:e;function EA(e){const t=sb(e);return ib(e)(t.map(OA))}const Yr={test:CA,parse:sb,createTransformer:ib,getAnimatableNone:EA},PA=new Set(["brightness","contrast","saturate","opacity"]);function MA(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(sf)||[];if(!r)return e;const o=n.replace(r,"");let i=PA.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const RA=/\b([a-z-]*)\(.*?\)/gu,uf={...Yr,getAnimatableNone:e=>{const t=e.match(RA);return t?t.map(MA).join(" "):e}},DA={...Yd,color:Qt,backgroundColor:Qt,outlineColor:Qt,fill:Qt,stroke:Qt,borderColor:Qt,borderTopColor:Qt,borderRightColor:Qt,borderBottomColor:Qt,borderLeftColor:Qt,filter:uf,WebkitFilter:uf},ab=e=>DA[e];function lb(e,t){let n=ab(e);return n!==uf&&(n=Yr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const IA=new Set(["auto","none","0"]);function AA(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!IA.has(i)&&zi(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=lb(n,o)}const ho=e=>e*180/Math.PI,df=e=>{const t=ho(Math.atan2(e[1],e[0]));return ff(t)},NA={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:df,rotateZ:df,skewX:e=>ho(Math.atan(e[1])),skewY:e=>ho(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},ff=e=>(e=e%360,e<0&&(e+=360),e),cb=df,ub=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),db=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),jA={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ub,scaleY:db,scale:e=>(ub(e)+db(e))/2,rotateX:e=>ff(ho(Math.atan2(e[6],e[5]))),rotateY:e=>ff(ho(Math.atan2(-e[2],e[0]))),rotateZ:cb,rotate:cb,skewX:e=>ho(Math.atan(e[4])),skewY:e=>ho(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function fb(e){return e.includes("scale")?1:0}function pf(e,t){if(!e||e==="none")return fb(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=jA,o=n;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=NA,o=l}if(!o)return fb(t);const i=r[t],a=o[1].split(",").map(_A);return typeof i=="function"?i(a):a[i]}const FA=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return pf(n,t)};function _A(e){return parseFloat(e.trim())}const pb=e=>e===gs||e===We,$A=new Set(["x","y","z"]),BA=ms.filter(e=>!$A.has(e));function LA(e){const t=[];return BA.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const bs={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>pf(t,"x"),y:(e,{transform:t})=>pf(t,"y")};bs.translateX=bs.x,bs.translateY=bs.y;const mo=new Set;let hf=!1,mf=!1;function hb(){if(mf){const e=Array.from(mo).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=LA(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,a])=>{var l;(l=r.getValue(i))==null||l.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}mf=!1,hf=!1,mo.forEach(e=>e.complete()),mo.clear()}function mb(){mo.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(mf=!0)})}function VA(){mb(),hb()}class gf{constructor(t,n,r,o,i,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(mo.add(this),hf||(hf=!0,St.read(mb),St.resolveKeyframes(hb))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let i=0;i<t.length;i++)if(t[i]===null)if(i===0){const a=o==null?void 0:o.get(),l=t[t.length-1];if(a!==void 0)t[0]=a;else if(r&&n){const c=r.readValue(n,l);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=l),o&&a===void 0&&o.set(t[0])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),mo.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,mo.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const gb=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),WA=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function zA(e){const t=WA.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const UA=4;function yb(e,t,n=1){Ur(n<=UA,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=zA(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const a=i.trim();return gb(a)?parseFloat(a):a}return qd(o)?yb(o,t,n+1):o}const bb=e=>t=>t.test(e),vb=[gs,We,cr,qr,VI,LI,{test:e=>e==="auto",parse:e=>e}],xb=e=>vb.find(bb(e));class wb extends gf{constructor(t,n,r,o,i){super(t,n,r,o,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let u=t[c];if(typeof u=="string"&&(u=u.trim(),qd(u))){const d=yb(u,n.current);d!==void 0&&(t[c]=d),c===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Uy.has(r)||t.length!==2)return;const[o,i]=t,a=xb(o),l=xb(i);if(a!==l)if(pb(a)&&pb(l))for(let c=0;c<t.length;c++){const u=t[c];typeof u=="string"&&(t[c]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)gA(t[o])&&r.push(o);r.length&&AA(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=bs[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var l;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const i=r.length-1,a=r[i];r[i]=bs[n](t.measureViewportBox(),window.getComputedStyle(t.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),(l=this.removedTransforms)!=null&&l.length&&this.removedTransforms.forEach(([c,u])=>{t.getValue(c).set(u)}),this.resolveNoneKeyframes()}}const Cb=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Yr.test(e)||e==="0")&&!e.startsWith("url("));function HA(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function qA(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],a=Cb(o,t),l=Cb(i,t);return fs(a===l,`You are trying to animate ${t} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!a||!l?!1:HA(e)||(n==="spring"||jd(n))&&r}const YA=e=>e!==null;function ec(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(YA),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return!i||r===void 0?o[i]:r}const GA=40;class Sb{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:a="loop",...l}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=lr.now(),this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:a,...l},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>GA?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&VA(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=lr.now(),this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:i,delay:a,onComplete:l,onUpdate:c,isGenerator:u}=this.options;if(!u&&!qA(t,r,o,i))if(a)this.options.duration=0;else{c&&c(ec(t,this.options,n)),l&&l(),this.resolveFinishedPromise();return}const d=this.initPlayback(t,n);d!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...d},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const Pt=(e,t,n)=>e+(t-e)*n;function yf(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function KA({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,a=0;if(!t)o=i=a=n;else{const l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;o=yf(c,l,e+1/3),i=yf(c,l,e),a=yf(c,l,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function tc(e,t){return n=>n>0?t:e}const bf=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},XA=[cf,po,ys],ZA=e=>XA.find(t=>t.test(e));function Tb(e){const t=ZA(e);if(fs(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===ys&&(n=KA(n)),n}const kb=(e,t)=>{const n=Tb(e),r=Tb(t);if(!n||!r)return tc(e,t);const o={...n};return i=>(o.red=bf(n.red,r.red,i),o.green=bf(n.green,r.green,i),o.blue=bf(n.blue,r.blue,i),o.alpha=Pt(n.alpha,r.alpha,i),po.transform(o))},JA=(e,t)=>n=>t(e(n)),Ui=(...e)=>e.reduce(JA),vf=new Set(["none","hidden"]);function QA(e,t){return vf.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function eN(e,t){return n=>Pt(e,t,n)}function xf(e){return typeof e=="number"?eN:typeof e=="string"?qd(e)?tc:Qt.test(e)?kb:rN:Array.isArray(e)?Ob:typeof e=="object"?Qt.test(e)?kb:tN:tc}function Ob(e,t){const n=[...e],r=n.length,o=e.map((i,a)=>xf(i)(i,t[a]));return i=>{for(let a=0;a<r;a++)n[a]=o[a](i);return n}}function tN(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=xf(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function nN(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const i=t.types[o],a=e.indexes[i][r[i]],l=e.values[a]??0;n[o]=l,r[i]++}return n}const rN=(e,t)=>{const n=Yr.createTransformer(t),r=zi(e),o=zi(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?vf.has(e)&&!o.values.length||vf.has(t)&&!r.values.length?QA(e,t):Ui(Ob(nN(r,o),o.values),n):(fs(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),tc(e,t))};function Eb(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Pt(e,t,n):xf(e)(e,t)}const oN=5;function Pb(e,t,n){const r=Math.max(t-oN,0);return sy(n-e(r),t-r)}const Mt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Mb=.001;function sN({duration:e=Mt.duration,bounce:t=Mt.bounce,velocity:n=Mt.velocity,mass:r=Mt.mass}){let o,i;fs(e<=qn(Mt.maxDuration),"Spring duration must be 10 seconds or less");let a=1-t;a=Or(Mt.minDamping,Mt.maxDamping,a),e=Or(Mt.minDuration,Mt.maxDuration,ar(e)),a<1?(o=u=>{const d=u*a,f=d*e,p=d-n,h=wf(u,a),y=Math.exp(-f);return Mb-p/h*y},i=u=>{const f=u*a*e,p=f*n+n,h=Math.pow(a,2)*Math.pow(u,2)*e,y=Math.exp(-f),m=wf(Math.pow(u,2),a);return(-o(u)+Mb>0?-1:1)*((p-h)*y)/m}):(o=u=>{const d=Math.exp(-u*e),f=(u-n)*e+1;return-.001+d*f},i=u=>{const d=Math.exp(-u*e),f=(n-u)*(e*e);return d*f});const l=5/e,c=aN(o,i,l);if(e=qn(e),isNaN(c))return{stiffness:Mt.stiffness,damping:Mt.damping,duration:e};{const u=Math.pow(c,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const iN=12;function aN(e,t,n){let r=n;for(let o=1;o<iN;o++)r=r-e(r)/t(r);return r}function wf(e,t){return e*Math.sqrt(1-t*t)}const lN=["duration","bounce"],cN=["stiffness","damping","mass"];function Rb(e,t){return t.some(n=>e[n]!==void 0)}function uN(e){let t={velocity:Mt.velocity,stiffness:Mt.stiffness,damping:Mt.damping,mass:Mt.mass,isResolvedFromDuration:!1,...e};if(!Rb(e,cN)&&Rb(e,lN))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*Or(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:Mt.mass,stiffness:o,damping:i}}else{const n=sN(e);t={...t,...n,mass:Mt.mass},t.isResolvedFromDuration=!0}return t}function nc(e=Mt.visualDuration,t=Mt.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],l={done:!1,value:i},{stiffness:c,damping:u,mass:d,duration:f,velocity:p,isResolvedFromDuration:h}=uN({...n,velocity:-ar(n.velocity||0)}),y=p||0,m=u/(2*Math.sqrt(c*d)),v=a-i,x=ar(Math.sqrt(c/d)),T=Math.abs(v)<5;r||(r=T?Mt.restSpeed.granular:Mt.restSpeed.default),o||(o=T?Mt.restDelta.granular:Mt.restDelta.default);let w;if(m<1){const b=wf(x,m);w=O=>{const E=Math.exp(-m*x*O);return a-E*((y+m*x*v)/b*Math.sin(b*O)+v*Math.cos(b*O))}}else if(m===1)w=b=>a-Math.exp(-x*b)*(v+(y+x*v)*b);else{const b=x*Math.sqrt(m*m-1);w=O=>{const E=Math.exp(-m*x*O),P=Math.min(b*O,300);return a-E*((y+m*x*v)*Math.sinh(P)+b*v*Math.cosh(P))/b}}const k={calculatedDuration:h&&f||null,next:b=>{const O=w(b);if(h)l.done=b>=f;else{let E=0;m<1&&(E=b===0?qn(y):Pb(w,b,O));const P=Math.abs(E)<=r,R=Math.abs(a-O)<=o;l.done=P&&R}return l.value=l.done?a:O,l},toString:()=>{const b=Math.min(_d(k),Hl),O=ly(E=>k.next(b*E).value,b,30);return b+"ms "+O},toTransition:()=>{}};return k}nc.applyToOptions=e=>{const t=cI(e,100,nc);return e.ease=Ii()?t.ease:"easeOut",e.duration=qn(t.duration),e.type="keyframes",e};function Db({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:a,min:l,max:c,restDelta:u=.5,restSpeed:d}){const f=e[0],p={done:!1,value:f},h=P=>l!==void 0&&P<l||c!==void 0&&P>c,y=P=>l===void 0?c:c===void 0||Math.abs(l-P)<Math.abs(c-P)?l:c;let m=n*t;const v=f+m,x=a===void 0?v:a(v);x!==v&&(m=x-f);const T=P=>-m*Math.exp(-P/r),w=P=>x+T(P),k=P=>{const R=T(P),A=w(P);p.done=Math.abs(R)<=u,p.value=p.done?x:A};let b,O;const E=P=>{h(p.value)&&(b=P,O=nc({keyframes:[p.value,y(p.value)],velocity:Pb(w,P,p.value),damping:o,stiffness:i,restDelta:u,restSpeed:d}))};return E(0),{calculatedDuration:null,next:P=>{let R=!1;return!O&&b===void 0&&(R=!0,k(P),E(P)),b!==void 0&&P>=b?O.next(P-b):(!R&&k(P),p)}}}const dN=Vi(.42,0,1,1),fN=Vi(0,0,.58,1),Ib=Vi(.42,0,.58,1),pN=e=>Array.isArray(e)&&typeof e[0]!="number",Ab={linear:Bn,easeIn:dN,easeInOut:Ib,easeOut:fN,circIn:of,circInOut:Qy,circOut:Jy,backIn:rf,backInOut:Xy,backOut:Ky,anticipate:Zy},Nb=e=>{if(Ad(e)){Ur(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Vi(t,n,r,o)}else if(typeof e=="string")return Ur(Ab[e]!==void 0,`Invalid easing type '${e}'`),Ab[e];return e};function hN(e,t,n){const r=[],o=n||Eb,i=e.length-1;for(let a=0;a<i;a++){let l=o(e[a],e[a+1]);if(t){const c=Array.isArray(t)?t[a]||Bn:t;l=Ui(c,l)}r.push(l)}return r}function mN(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(Ur(i===t.length,"Both input and output ranges must be the same length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=hN(t,r,o),c=l.length,u=d=>{if(a&&d<e[0])return t[0];let f=0;if(c>1)for(;f<e.length-2&&!(d<e[f+1]);f++);const p=Di(e[f],e[f+1],d);return l[f](p)};return n?d=>u(Or(e[0],e[i-1],d)):u}function gN(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Di(0,t,r);e.push(Pt(n,1,o))}}function yN(e){const t=[0];return gN(t,e.length-1),t}function bN(e,t){return e.map(n=>n*t)}function vN(e,t){return e.map(()=>t||Ib).splice(0,e.length-1)}function Hi({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=pN(r)?r.map(Nb):Nb(r),i={done:!1,value:t[0]},a=bN(n&&n.length===t.length?n:yN(t),e),l=mN(a,t,{ease:Array.isArray(o)?o:vN(t,o)});return{calculatedDuration:e,next:c=>(i.value=l(c),i.done=c>=e,i)}}const xN=e=>{const t=({timestamp:n})=>e(n);return{start:()=>St.update(t,!0),stop:()=>Hr(t),now:()=>Gt.isProcessing?Gt.timestamp:lr.now()}},wN={decay:Db,inertia:Db,tween:Hi,keyframes:Hi,spring:nc},CN=e=>e/100;class Cf extends Sb{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:c}=this.options;c&&c()};const{name:n,motionValue:r,element:o,keyframes:i}=this.options,a=(o==null?void 0:o.KeyframeResolver)||gf,l=(c,u)=>this.onKeyframesResolved(c,u);this.resolver=new a(i,l,n,r,o),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:a=0}=this.options,l=jd(n)?n:wN[n]||Hi;let c,u;process.env.NODE_ENV!=="production"&&l!==Hi&&Ur(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),l!==Hi&&typeof t[0]!="number"&&(c=Ui(CN,Eb(t[0],t[1])),t=[0,100]);const d=l({...this.options,keyframes:t});i==="mirror"&&(u=l({...this.options,keyframes:[...t].reverse(),velocity:-a})),d.calculatedDuration===null&&(d.calculatedDuration=_d(d));const{calculatedDuration:f}=d,p=f+o,h=p*(r+1)-o;return{generator:d,mirroredGenerator:u,mapPercentToKeyframes:c,calculatedDuration:f,resolvedDuration:p,totalDuration:h}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:P}=this.options;return{done:!0,value:P[P.length-1]}}const{finalKeyframe:o,generator:i,mirroredGenerator:a,mapPercentToKeyframes:l,keyframes:c,calculatedDuration:u,totalDuration:d,resolvedDuration:f}=r;if(this.startTime===null)return i.next(0);const{delay:p,repeat:h,repeatType:y,repeatDelay:m,onUpdate:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-d/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const x=this.currentTime-p*(this.speed>=0?1:-1),T=this.speed>=0?x<0:x>d;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let w=this.currentTime,k=i;if(h){const P=Math.min(this.currentTime,d)/f;let R=Math.floor(P),A=P%1;!A&&P>=1&&(A=1),A===1&&R--,R=Math.min(R,h+1),!!(R%2)&&(y==="reverse"?(A=1-A,m&&(A-=m/f)):y==="mirror"&&(k=a)),w=Or(0,1,A)*f}const b=T?{done:!1,value:c[0]}:k.next(w);l&&(b.value=l(b.value));let{done:O}=b;!T&&u!==null&&(O=this.speed>=0?this.currentTime>=d:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&O);return E&&o!==void 0&&(b.value=ec(c,this.options,o)),v&&v(b.value),E&&this.finish(),b}get duration(){const{resolved:t}=this;return t?ar(t.calculatedDuration):0}get time(){return ar(this.currentTime)}set time(t){t=qn(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=ar(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=xN,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),n&&n();const o=this.driver.now();this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=o):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=this.currentTime??0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}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(t){return this.startTime=0,this.tick(t,!0)}get finished(){return this.currentFinishedPromise}}const SN=new Set(["opacity","clipPath","filter","transform"]),TN=Dd(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),rc=10,kN=2e4;function ON(e){return jd(e.type)||e.type==="spring"||!uy(e.ease)}function EN(e,t){const n=new Cf({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let i=0;for(;!r.done&&i<kN;)r=n.sample(i),o.push(r.value),i+=rc;return{times:void 0,keyframes:o,duration:i-rc,ease:"linear"}}const jb={anticipate:Zy,backInOut:Xy,circInOut:Qy};function PN(e){return e in jb}class Fb extends Sb{constructor(t){super(t);const{name:n,motionValue:r,element:o,keyframes:i}=this.options;this.resolver=new wb(i,(a,l)=>this.onKeyframesResolved(a,l),n,r,o),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:o,ease:i,type:a,motionValue:l,name:c,startTime:u}=this.options;if(!l.owner||!l.owner.current)return!1;if(typeof i=="string"&&Ii()&&PN(i)&&(i=jb[i]),ON(this.options)){const{onComplete:f,onUpdate:p,motionValue:h,element:y,...m}=this.options,v=EN(t,m);t=v.keyframes,t.length===1&&(t[1]=t[0]),r=v.duration,o=v.times,i=v.ease,a="keyframes"}const d=lI(l.owner.current,c,t,{...this.options,duration:r,times:o,ease:i});return d.startTime=u??this.calcStartTime(),this.pendingTimeline?(dy(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:f}=this.options;l.set(ec(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:r,times:o,type:a,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return ar(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return ar(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=qn(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}get finished(){return this.resolved.animation.finished}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Bn;const{animation:r}=n;dy(r,t)}return Bn}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:o,type:i,ease:a,times:l}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:d,onComplete:f,element:p,...h}=this.options,y=new Cf({...h,keyframes:r,duration:o,type:i,ease:a,times:l,isGenerator:!0}),m=qn(this.time);u.setWithVelocity(y.sample(m-rc).value,y.sample(m).value,rc)}const{onStop:c}=this.options;c&&c(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:o,repeatType:i,damping:a,type:l}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=n.owner.getProps();return TN()&&r&&SN.has(r)&&(r!=="transform"||!u)&&!c&&!o&&i!=="mirror"&&a!==0&&l!=="inertia"}}const MN={type:"spring",stiffness:500,damping:25,restSpeed:10},RN=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),DN={type:"keyframes",duration:.8},IN={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},AN=(e,{keyframes:t})=>t.length>2?DN:fo.has(e)?e.startsWith("scale")?RN(t[1]):MN:IN;function NN({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:a,repeatDelay:l,from:c,elapsed:u,...d}){return!!Object.keys(d).length}const Sf=(e,t,n,r={},o,i)=>a=>{const l=Fd(r,e)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-qn(c);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:p=>{t.set(p),l.onUpdate&&l.onUpdate(p)},onComplete:()=>{a(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:i?void 0:o};NN(l)||(d={...d,...AN(e,d)}),d.duration&&(d.duration=qn(d.duration)),d.repeatDelay&&(d.repeatDelay=qn(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(f=!0)),d.allowFlatten=!l.type&&!l.ease,f&&!i&&t.get()!==void 0){const p=ec(d.keyframes,l);if(p!==void 0)return St.update(()=>{d.onUpdate(p),d.onComplete()}),new sI([])}return!i&&Fb.supports(d)?new Fb(d):new Cf(d)};function jN({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function _b(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(i=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const d in l){const f=e.getValue(d,e.latestValues[d]??null),p=l[d];if(p===void 0||u&&jN(u,d))continue;const h={delay:n,...Fd(i||{},d)};let y=!1;if(window.MotionHandoffAnimation){const v=Hy(e);if(v){const x=window.MotionHandoffAnimation(v,d,St);x!==null&&(h.startTime=x,y=!0)}}nf(e,d),f.start(Sf(d,f,p,e.shouldReduceMotion&&Uy.has(d)?{type:!1}:h,e,y));const m=f.animation;m&&c.push(m)}return a&&Promise.all(c).then(()=>{St.update(()=>{a&&dA(e,a)})}),c}function Tf(e,t,n={}){var c;const r=Li(e,t,n.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const i=r?()=>Promise.all(_b(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:f,staggerDirection:p}=o;return FN(e,t,d+u,f,p,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,d]=l==="beforeChildren"?[i,a]:[a,i];return u().then(()=>d())}else return Promise.all([i(),a(n.delay)])}function FN(e,t,n=0,r=0,o=1,i){const a=[],l=(e.variantChildren.size-1)*r,c=o===1?(u=0)=>u*r:(u=0)=>l-u*r;return Array.from(e.variantChildren).sort(_N).forEach((u,d)=>{u.notify("AnimationStart",t),a.push(Tf(u,t,{...i,delay:n+c(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function _N(e,t){return e.sortNodePosition(t)}function $N(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>Tf(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=Tf(e,t,n);else{const o=typeof t=="function"?Li(e,t,n.custom):t;r=Promise.all(_b(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function $b(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const BN=zd.length;function Bb(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Bb(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<BN;n++){const r=zd[n],o=e.props[r];(Fi(o)||o===!1)&&(t[r]=o)}return t}const LN=[...Wd].reverse(),VN=Wd.length;function WN(e){return t=>Promise.all(t.map(({animation:n,options:r})=>$N(e,n,r)))}function zN(e){let t=WN(e),n=Lb(),r=!0;const o=c=>(u,d)=>{var p;const f=Li(e,d,c==="exit"?(p=e.presenceContext)==null?void 0:p.custom:void 0);if(f){const{transition:h,transitionEnd:y,...m}=f;u={...u,...m,...y}}return u};function i(c){t=c(e)}function a(c){const{props:u}=e,d=Bb(e.parent)||{},f=[],p=new Set;let h={},y=1/0;for(let v=0;v<VN;v++){const x=LN[v],T=n[x],w=u[x]!==void 0?u[x]:d[x],k=Fi(w),b=x===c?T.isActive:null;b===!1&&(y=v);let O=w===d[x]&&w!==u[x]&&k;if(O&&r&&e.manuallyAnimateOnMount&&(O=!1),T.protectedKeys={...h},!T.isActive&&b===null||!w&&!T.prevProp||Xl(w)||typeof w=="boolean")continue;const E=UN(T.prevProp,w);let P=E||x===c&&T.isActive&&!O&&k||v>y&&k,R=!1;const A=Array.isArray(w)?w:[w];let N=A.reduce(o(x),{});b===!1&&(N={});const{prevResolvedValues:D={}}=T,j={...D,...N},V=$=>{P=!0,p.has($)&&(R=!0,p.delete($)),T.needsAnimating[$]=!0;const W=e.getValue($);W&&(W.liveStyle=!1)};for(const $ in j){const W=N[$],q=D[$];if(h.hasOwnProperty($))continue;let L=!1;ef(W)&&ef(q)?L=!$b(W,q):L=W!==q,L?W!=null?V($):p.add($):W!==void 0&&p.has($)?V($):T.protectedKeys[$]=!0}T.prevProp=w,T.prevResolvedValues=N,T.isActive&&(h={...h,...N}),r&&e.blockInitialAnimation&&(P=!1),P&&(!(O&&E)||R)&&f.push(...A.map($=>({animation:$,options:{type:x}})))}if(p.size){const v={};if(typeof u.initial!="boolean"){const x=Li(e,Array.isArray(u.initial)?u.initial[0]:u.initial);x&&x.transition&&(v.transition=x.transition)}p.forEach(x=>{const T=e.getBaseTarget(x),w=e.getValue(x);w&&(w.liveStyle=!0),v[x]=T??null}),f.push({animation:v})}let m=!!f.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(f):Promise.resolve()}function l(c,u){var f;if(n[c].isActive===u)return Promise.resolve();(f=e.variantChildren)==null||f.forEach(p=>{var h;return(h=p.animationState)==null?void 0:h.setActive(c,u)}),n[c].isActive=u;const d=a(c);for(const p in n)n[p].protectedKeys={};return d}return{animateChanges:a,setActive:l,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Lb(),r=!0}}}function UN(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!$b(t,e):!1}function go(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Lb(){return{animate:go(!0),whileInView:go(),whileHover:go(),whileTap:go(),whileDrag:go(),whileFocus:go(),exit:go()}}class Gr{constructor(t){this.isMounted=!1,this.node=t}update(){}}class HN extends Gr{constructor(t){super(t),t.animationState||(t.animationState=zN(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Xl(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let qN=0;class YN extends Gr{constructor(){super(...arguments),this.id=qN++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const GN={animation:{Feature:HN},exit:{Feature:YN}};function qi(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Yi(e){return{point:{x:e.pageX,y:e.pageY}}}const KN=e=>t=>Ld(t)&&e(t,Yi(t));function Gi(e,t,n,r){return qi(e,t,KN(n),r)}function Vb({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function XN({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function ZN(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}const Wb=1e-4,JN=1-Wb,QN=1+Wb,zb=.01,ej=0-zb,tj=0+zb;function an(e){return e.max-e.min}function nj(e,t,n){return Math.abs(e-t)<=n}function Ub(e,t,n,r=.5){e.origin=r,e.originPoint=Pt(t.min,t.max,e.origin),e.scale=an(n)/an(t),e.translate=Pt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=JN&&e.scale<=QN||isNaN(e.scale))&&(e.scale=1),(e.translate>=ej&&e.translate<=tj||isNaN(e.translate))&&(e.translate=0)}function Ki(e,t,n,r){Ub(e.x,t.x,n.x,r?r.originX:void 0),Ub(e.y,t.y,n.y,r?r.originY:void 0)}function Hb(e,t,n){e.min=n.min+t.min,e.max=e.min+an(t)}function rj(e,t,n){Hb(e.x,t.x,n.x),Hb(e.y,t.y,n.y)}function qb(e,t,n){e.min=t.min-n.min,e.max=e.min+an(t)}function Xi(e,t,n){qb(e.x,t.x,n.x),qb(e.y,t.y,n.y)}const Yb=()=>({translate:0,scale:1,origin:0,originPoint:0}),vs=()=>({x:Yb(),y:Yb()}),Gb=()=>({min:0,max:0}),Bt=()=>({x:Gb(),y:Gb()});function Ln(e){return[e("x"),e("y")]}function kf(e){return e===void 0||e===1}function Of({scale:e,scaleX:t,scaleY:n}){return!kf(e)||!kf(t)||!kf(n)}function yo(e){return Of(e)||Kb(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Kb(e){return Xb(e.x)||Xb(e.y)}function Xb(e){return e&&e!=="0%"}function oc(e,t,n){const r=e-n,o=t*r;return n+o}function Zb(e,t,n,r,o){return o!==void 0&&(e=oc(e,o,r)),oc(e,n,r)+t}function Ef(e,t=0,n=1,r,o){e.min=Zb(e.min,t,n,r,o),e.max=Zb(e.max,t,n,r,o)}function Jb(e,{x:t,y:n}){Ef(e.x,t.translate,t.scale,t.originPoint),Ef(e.y,n.translate,n.scale,n.originPoint)}const Qb=.999999999999,ev=1.0000000000001;function oj(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let i,a;for(let l=0;l<o;l++){i=n[l],a=i.projectionDelta;const{visualElement:c}=i.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&ws(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Jb(e,a)),r&&yo(i.latestValues)&&ws(e,i.latestValues))}t.x<ev&&t.x>Qb&&(t.x=1),t.y<ev&&t.y>Qb&&(t.y=1)}function xs(e,t){e.min=e.min+t,e.max=e.max+t}function tv(e,t,n,r,o=.5){const i=Pt(e.min,e.max,o);Ef(e,t,n,i,r)}function ws(e,t){tv(e.x,t.x,t.scaleX,t.scale,t.originX),tv(e.y,t.y,t.scaleY,t.scale,t.originY)}function nv(e,t){return Vb(ZN(e.getBoundingClientRect(),t))}function sj(e,t,n){const r=nv(e,n),{scroll:o}=t;return o&&(xs(r.x,o.offset.x),xs(r.y,o.offset.y)),r}const rv=({current:e})=>e?e.ownerDocument.defaultView:null,ov=(e,t)=>Math.abs(e-t);function ij(e,t){const n=ov(e.x,t.x),r=ov(e.y,t.y);return Math.sqrt(n**2+r**2)}class sv{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:i=!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 f=Mf(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,h=ij(f.offset,{x:0,y:0})>=3;if(!p&&!h)return;const{point:y}=f,{timestamp:m}=Gt;this.history.push({...y,timestamp:m});const{onStart:v,onMove:x}=this.handlers;p||(v&&v(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,f)},this.handlePointerMove=(f,p)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Pf(p,this.transformPagePoint),St.update(this.updatePoint,!0)},this.handlePointerUp=(f,p)=>{this.end();const{onEnd:h,onSessionEnd:y,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Mf(f.type==="pointercancel"?this.lastMoveEventInfo:Pf(p,this.transformPagePoint),this.history);this.startEvent&&h&&h(f,v),y&&y(f,v)},!Ld(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const a=Yi(t),l=Pf(a,this.transformPagePoint),{point:c}=l,{timestamp:u}=Gt;this.history=[{...c,timestamp:u}];const{onSessionStart:d}=n;d&&d(t,Mf(l,this.history)),this.removeListeners=Ui(Gi(this.contextWindow,"pointermove",this.handlePointerMove),Gi(this.contextWindow,"pointerup",this.handlePointerUp),Gi(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Hr(this.updatePoint)}}function Pf(e,t){return t?{point:t(e.point)}:e}function iv(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Mf({point:e},t){return{point:e,delta:iv(e,av(t)),offset:iv(e,aj(t)),velocity:lj(t,.1)}}function aj(e){return e[0]}function av(e){return e[e.length-1]}function lj(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=av(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>qn(t)));)n--;if(!r)return{x:0,y:0};const i=ar(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function cj(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Pt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Pt(n,e,r.max):Math.min(e,n)),e}function lv(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function uj(e,{top:t,left:n,bottom:r,right:o}){return{x:lv(e.x,n,o),y:lv(e.y,t,r)}}function cv(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function dj(e,t){return{x:cv(e.x,t.x),y:cv(e.y,t.y)}}function fj(e,t){let n=.5;const r=an(e),o=an(t);return o>r?n=Di(t.min,t.max-r,e.min):r>o&&(n=Di(e.min,e.max-o,t.min)),Or(0,1,n)}function pj(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Rf=.35;function hj(e=Rf){return e===!1?e=0:e===!0&&(e=Rf),{x:uv(e,"left","right"),y:uv(e,"top","bottom")}}function uv(e,t,n){return{min:dv(e,t),max:dv(e,n)}}function dv(e,t){return typeof e=="number"?e:e[t]||0}const mj=new WeakMap;class gj{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Bt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Yi(d).point)},i=(d,f)=>{const{drag:p,dragPropagation:h,onDragStart:y}=this.getProps();if(p&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=pI(p),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ln(v=>{let x=this.getAxisMotionValue(v).get()||0;if(cr.test(x)){const{projection:T}=this.visualElement;if(T&&T.layout){const w=T.layout.layoutBox[v];w&&(x=an(w)*(parseFloat(x)/100))}}this.originPoint[v]=x}),y&&St.postRender(()=>y(d,f)),nf(this.visualElement,"transform");const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},a=(d,f)=>{const{dragPropagation:p,dragDirectionLock:h,onDirectionLock:y,onDrag:m}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:v}=f;if(h&&this.currentDirection===null){this.currentDirection=yj(v),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",f.point,v),this.updateAxis("y",f.point,v),this.visualElement.render(),m&&m(d,f)},l=(d,f)=>this.stop(d,f),c=()=>Ln(d=>{var f;return this.getAnimationState(d)==="paused"&&((f=this.getAxisMotionValue(d).animation)==null?void 0:f.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new sv(t,{onSessionStart:o,onStart:i,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:rv(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:i}=this.getProps();i&&St.postRender(()=>i(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!sc(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=cj(a,this.constraints[t],this.elastic[t])),i.set(a)}resolveConstraints(){var i;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(i=this.visualElement.projection)==null?void 0:i.layout,o=this.constraints;t&&hs(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=uj(r.layoutBox,t):this.constraints=!1,this.elastic=hj(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Ln(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=pj(r.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!hs(t))return!1;const r=t.current;Ur(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=sj(r,o.root,this.visualElement.getTransformPagePoint());let a=dj(o.layout.layoutBox,i);if(n){const l=n(XN(a));this.hasMutatedConstraints=!!l,l&&(a=Vb(l))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},u=Ln(d=>{if(!sc(d,n,this.currentDirection))return;let f=c&&c[d]||{};a&&(f={min:0,max:0});const p=o?200:1e6,h=o?40:1e7,y={type:"inertia",velocity:r?t[d]:0,bounceStiffness:p,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(d,y)});return Promise.all(u).then(l)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return nf(this.visualElement,t),r.start(Sf(t,r,0,n,this.visualElement,!1))}stopAnimation(){Ln(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Ln(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Ln(n=>{const{drag:r}=this.getProps();if(!sc(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:a,max:l}=o.layout.layoutBox[n];i.set(t[n]-Pt(a,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!hs(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Ln(a=>{const l=this.getAxisMotionValue(a);if(l&&this.constraints!==!1){const c=l.get();o[a]=fj({min:c,max:c},this.constraints[a])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Ln(a=>{if(!sc(a,t,null))return;const l=this.getAxisMotionValue(a),{min:c,max:u}=this.constraints[a];l.set(Pt(c,u,o[a]))})}addListeners(){if(!this.visualElement.current)return;mj.set(this.visualElement,this);const t=this.visualElement.current,n=Gi(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();hs(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),St.read(r);const a=qi(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(Ln(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=c[d].translate,f.set(f.get()+c[d].translate))}),this.visualElement.render())});return()=>{a(),n(),i(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:a=Rf,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:a,dragMomentum:l}}}function sc(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function yj(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class bj extends Gr{constructor(t){super(t),this.removeGroupControls=Bn,this.removeListeners=Bn,this.controls=new gj(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Bn}unmount(){this.removeGroupControls(),this.removeListeners()}}const fv=e=>(t,n)=>{e&&St.postRender(()=>e(t,n))};class vj extends Gr{constructor(){super(...arguments),this.removePointerDownListener=Bn}onPointerDown(t){this.session=new sv(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:rv(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:fv(t),onStart:fv(n),onMove:r,onEnd:(i,a)=>{delete this.session,o&&St.postRender(()=>o(i,a))}}}mount(){this.removePointerDownListener=Gi(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const ic={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function pv(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Zi={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(We.test(e))e=parseFloat(e);else return e;const n=pv(e,t.target.x),r=pv(e,t.target.y);return`${n}% ${r}%`}},xj={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Yr.parse(e);if(o.length>5)return r;const i=Yr.createTransformer(e),a=typeof o[0]!="number"?1:0,l=n.x.scale*t.x,c=n.y.scale*t.y;o[0+a]/=l,o[1+a]/=c;const u=Pt(l,c,.5);return typeof o[2+a]=="number"&&(o[2+a]/=u),typeof o[3+a]=="number"&&(o[3+a]/=u),i(o)}};class wj extends M.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;BI(Cj),i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),ic.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,a=r.projection;return a&&(a.isPresent=i,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?a.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?a.promote():a.relegate()||St.postRender(()=>{const l=a.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),$d.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function hv(e){const[t,n]=ry(),r=M.useContext(Td);return g.jsx(wj,{...e,layoutGroup:r,switchLayoutGroup:M.useContext(Oy),isPresent:t,safeToRemove:n})}const Cj={borderRadius:{...Zi,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Zi,borderTopRightRadius:Zi,borderBottomLeftRadius:Zi,borderBottomRightRadius:Zi,boxShadow:xj};function Sj(e,t,n){const r=Jt(e)?e:ji(e);return r.start(Sf("",r,t,n)),r.animation}function Tj(e){return e instanceof SVGElement&&e.tagName!=="svg"}const kj=(e,t)=>e.depth-t.depth;class Oj{constructor(){this.children=[],this.isDirty=!1}add(t){Pd(this.children,t),this.isDirty=!0}remove(t){Md(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(kj),this.isDirty=!1,this.children.forEach(t)}}function Ej(e,t){const n=lr.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(Hr(r),e(i-t))};return St.read(r,!0),()=>Hr(r)}const mv=["TopLeft","TopRight","BottomLeft","BottomRight"],Pj=mv.length,gv=e=>typeof e=="string"?parseFloat(e):e,yv=e=>typeof e=="number"||We.test(e);function Mj(e,t,n,r,o,i){o?(e.opacity=Pt(0,n.opacity??1,Rj(r)),e.opacityExit=Pt(t.opacity??1,0,Dj(r))):i&&(e.opacity=Pt(t.opacity??1,n.opacity??1,r));for(let a=0;a<Pj;a++){const l=`border${mv[a]}Radius`;let c=bv(t,l),u=bv(n,l);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||yv(c)===yv(u)?(e[l]=Math.max(Pt(gv(c),gv(u),r),0),(cr.test(u)||cr.test(c))&&(e[l]+="%")):e[l]=u}(t.rotate||n.rotate)&&(e.rotate=Pt(t.rotate||0,n.rotate||0,r))}function bv(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Rj=vv(0,.5,Jy),Dj=vv(.5,.95,Bn);function vv(e,t,n){return r=>r<e?0:r>t?1:n(Di(e,t,r))}function xv(e,t){e.min=t.min,e.max=t.max}function Vn(e,t){xv(e.x,t.x),xv(e.y,t.y)}function wv(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Cv(e,t,n,r,o){return e-=t,e=oc(e,1/n,r),o!==void 0&&(e=oc(e,1/o,r)),e}function Ij(e,t=0,n=1,r=.5,o,i=e,a=e){if(cr.test(t)&&(t=parseFloat(t),t=Pt(a.min,a.max,t/100)-a.min),typeof t!="number")return;let l=Pt(i.min,i.max,r);e===i&&(l-=t),e.min=Cv(e.min,t,n,l,o),e.max=Cv(e.max,t,n,l,o)}function Sv(e,t,[n,r,o],i,a){Ij(e,t[n],t[r],t[o],t.scale,i,a)}const Aj=["x","scaleX","originX"],Nj=["y","scaleY","originY"];function Tv(e,t,n,r){Sv(e.x,t,Aj,n?n.x:void 0,r?r.x:void 0),Sv(e.y,t,Nj,n?n.y:void 0,r?r.y:void 0)}function kv(e){return e.translate===0&&e.scale===1}function Ov(e){return kv(e.x)&&kv(e.y)}function Ev(e,t){return e.min===t.min&&e.max===t.max}function jj(e,t){return Ev(e.x,t.x)&&Ev(e.y,t.y)}function Pv(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Mv(e,t){return Pv(e.x,t.x)&&Pv(e.y,t.y)}function Rv(e){return an(e.x)/an(e.y)}function Dv(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Fj{constructor(){this.members=[]}add(t){Pd(this.members,t),t.scheduleRender()}remove(t){if(Md(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function _j(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,a=(n==null?void 0:n.z)||0;if((o||i||a)&&(r=`translate3d(${o}px, ${i}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:f,rotateY:p,skewX:h,skewY:y}=n;u&&(r=`perspective(${u}px) ${r}`),d&&(r+=`rotate(${d}deg) `),f&&(r+=`rotateX(${f}deg) `),p&&(r+=`rotateY(${p}deg) `),h&&(r+=`skewX(${h}deg) `),y&&(r+=`skewY(${y}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(r+=`scale(${l}, ${c})`),r||"none"}const Df=["","X","Y","Z"],$j={visibility:"hidden"},Iv=1e3;let Bj=0;function If(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Av(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Hy(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",St,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Av(r)}function Nv({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(a={},l=t==null?void 0:t()){this.id=Bj++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Wj),this.nodes.forEach(Yj),this.nodes.forEach(Gj),this.nodes.forEach(zj)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new Oj)}addEventListener(a,l){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new Id),this.eventHandlers.get(a).add(l)}notifyListeners(a,...l){const c=this.eventHandlers.get(a);c&&c.notify(...l)}hasListeners(a){return this.eventHandlers.has(a)}mount(a,l=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Tj(a),this.instance=a;const{layoutId:c,layout:u,visualElement:d}=this.options;if(d&&!d.current&&d.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),l&&(u||c)&&(this.isLayoutDirty=!0),e){let f;const p=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=Ej(p,250),ic.hasAnimatedSinceResize&&(ic.hasAnimatedSinceResize=!1,this.nodes.forEach(Fv))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&d&&(c||u)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:p,hasRelativeLayoutChanged:h,layout:y})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||d.getDefaultTransition()||Qj,{onLayoutAnimationStart:v,onLayoutAnimationComplete:x}=d.getProps(),T=!this.targetLayout||!Mv(this.targetLayout,y),w=!p&&h;if(this.options.layoutRoot||this.resumeFrom||w||p&&(T||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,w);const k={...Fd(m,"layout"),onPlay:v,onComplete:x};(d.shouldReduceMotion||this.options.layoutRoot)&&(k.delay=0,k.type=!1),this.startAnimation(k)}else p||Fv(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=y})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Hr(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(Kj),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Av(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const f=this.path[d];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(jv);return}this.isUpdating||this.nodes.forEach(Hj),this.isUpdating=!1,this.nodes.forEach(qj),this.nodes.forEach(Lj),this.nodes.forEach(Vj),this.clearAllSnapshots();const l=lr.now();Gt.delta=Or(0,1e3/60,l-Gt.timestamp),Gt.timestamp=l,Gt.isProcessing=!0,Bd.update.process(Gt),Bd.preRender.process(Gt),Bd.render.process(Gt),Gt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,$d.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Uj),this.sharedNodes.forEach(Xj)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,St.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){St.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!an(this.snapshot.measuredBox.x)&&!an(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Bt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(l=!1),l){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!o)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!Ov(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;a&&(l||yo(this.latestValues)||d)&&(o(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return a&&(c=this.removeTransform(c)),e6(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:a}=this.options;if(!a)return Bt();const l=a.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(t6))){const{scroll:d}=this.root;d&&(xs(l.x,d.offset.x),xs(l.y,d.offset.y))}return l}removeElementScroll(a){var c;const l=Bt();if(Vn(l,a),(c=this.scroll)!=null&&c.wasRoot)return l;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:f,options:p}=d;d!==this.root&&f&&p.layoutScroll&&(f.wasRoot&&Vn(l,a),xs(l.x,f.offset.x),xs(l.y,f.offset.y))}return l}applyTransform(a,l=!1){const c=Bt();Vn(c,a);for(let u=0;u<this.path.length;u++){const d=this.path[u];!l&&d.options.layoutScroll&&d.scroll&&d!==d.root&&ws(c,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),yo(d.latestValues)&&ws(c,d.latestValues)}return yo(this.latestValues)&&ws(c,this.latestValues),c}removeTransform(a){const l=Bt();Vn(l,a);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!yo(u.latestValues))continue;Of(u.latestValues)&&u.updateSnapshot();const d=Bt(),f=u.measurePageBox();Vn(d,f),Tv(l,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return yo(this.latestValues)&&Tv(l,this.latestValues),l}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.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!==Gt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var p;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(a||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=Gt.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Bt(),this.relativeTargetOrigin=Bt(),Xi(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),Vn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Bt(),this.targetWithTransforms=Bt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),rj(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Vn(this.target,this.layout.layoutBox),Jb(this.target,this.targetDelta)):Vn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Bt(),this.relativeTargetOrigin=Bt(),Xi(this.relativeTargetOrigin,this.target,h.target),Vn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Of(this.parent.latestValues)||Kb(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 y;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||(y=this.parent)!=null&&y.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Gt.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;Vn(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,p=this.treeScale.y;oj(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=Bt());const{target:h}=a;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(wv(this.prevProjectionDelta.x,this.projectionDelta.x),wv(this.prevProjectionDelta.y,this.projectionDelta.y)),Ki(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==p||!Dv(this.projectionDelta.x,this.prevProjectionDelta.x)||!Dv(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var l;if((l=this.options.visualElement)==null||l.scheduleRender(),a){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=vs(),this.projectionDelta=vs(),this.projectionDeltaWithTransform=vs()}setAnimationOrigin(a,l=!1){const c=this.snapshot,u=c?c.latestValues:{},d={...this.latestValues},f=vs();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const p=Bt(),h=c?c.source:void 0,y=this.layout?this.layout.source:void 0,m=h!==y,v=this.getStack(),x=!v||v.members.length<=1,T=!!(m&&!x&&this.options.crossfade===!0&&!this.path.some(Jj));this.animationProgress=0;let w;this.mixTargetDelta=k=>{const b=k/1e3;_v(f.x,a.x,b),_v(f.y,a.y,b),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Xi(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Zj(this.relativeTarget,this.relativeTargetOrigin,p,b),w&&jj(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=Bt()),Vn(w,this.relativeTarget)),m&&(this.animationValues=d,Mj(d,u,this.latestValues,b,T,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=b},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Hr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=St.update(()=>{ic.hasAnimatedSinceResize=!0,this.currentAnimation=Sj(0,Iv,{...a,onUpdate:l=>{this.mixTargetDelta(l),a.onUpdate&&a.onUpdate(l)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.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 a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Iv),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:l,target:c,layout:u,latestValues:d}=a;if(!(!l||!c||!u)){if(this!==a&&this.layout&&u&&Wv(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||Bt();const f=an(this.layout.layoutBox.x);c.x.min=a.target.x.min,c.x.max=c.x.min+f;const p=an(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+p}Vn(l,c),ws(l,d),Ki(this.projectionDeltaWithTransform,this.layoutCorrected,l,d)}}registerSharedNode(a,l){this.sharedNodes.has(a)||this.sharedNodes.set(a,new Fj),this.sharedNodes.get(a).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var l;const{layoutId:a}=this.options;return a?((l=this.getStack())==null?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:a}=this.options;return a?(l=this.getStack())==null?void 0:l.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:l,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),a&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let l=!1;const{latestValues:c}=a;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const u={};c.z&&If("z",a,u,this.animationValues);for(let d=0;d<Df.length;d++)If(`rotate${Df[d]}`,a,u,this.animationValues),If(`skew${Df[d]}`,a,u,this.animationValues);a.render();for(const d in u)a.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);a.scheduleRender()}getProjectionStyles(a){if(!this.instance||this.isSVG)return;if(!this.isVisible)return $j;const l={visibility:""},c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,l.opacity="",l.pointerEvents=Ql(a==null?void 0:a.pointerEvents)||"",l.transform=c?c(this.latestValues,""):"none",l;const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){const h={};return this.options.layoutId&&(h.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,h.pointerEvents=Ql(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!yo(this.latestValues)&&(h.transform=c?c({},""):"none",this.hasProjected=!1),h}const d=u.animationValues||u.latestValues;this.applyTransformsToTarget(),l.transform=_j(this.projectionDeltaWithTransform,this.treeScale,d),c&&(l.transform=c(d,l.transform));const{x:f,y:p}=this.projectionDelta;l.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,u.animationValues?l.opacity=u===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:l.opacity=u===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const h in _i){if(d[h]===void 0)continue;const{correct:y,applyTo:m,isCSSVariable:v}=_i[h],x=l.transform==="none"?d[h]:y(d[h],u);if(m){const T=m.length;for(let w=0;w<T;w++)l[m[w]]=x}else v?this.options.visualElement.renderState.vars[h]=x:l[h]=x}return this.options.layoutId&&(l.pointerEvents=u===this?Ql(a==null?void 0:a.pointerEvents)||"":"none"),l}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var l;return(l=a.currentAnimation)==null?void 0:l.stop()}),this.root.nodes.forEach(jv),this.root.sharedNodes.clear()}}}function Lj(e){e.updateLayout()}function Vj(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;i==="size"?Ln(f=>{const p=a?t.measuredBox[f]:t.layoutBox[f],h=an(p);p.min=r[f].min,p.max=p.min+h}):Wv(i,t.layoutBox,r)&&Ln(f=>{const p=a?t.measuredBox[f]:t.layoutBox[f],h=an(r[f]);p.max=p.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+h)});const l=vs();Ki(l,r,t.layoutBox);const c=vs();a?Ki(c,e.applyTransform(o,!0),t.measuredBox):Ki(c,r,t.layoutBox);const u=!Ov(l);let d=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:p,layout:h}=f;if(p&&h){const y=Bt();Xi(y,t.layoutBox,p.layoutBox);const m=Bt();Xi(m,r,h.layoutBox),Mv(y,m)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=y,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function Wj(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function zj(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Uj(e){e.clearSnapshot()}function jv(e){e.clearMeasurements()}function Hj(e){e.isLayoutDirty=!1}function qj(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Fv(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Yj(e){e.resolveTargetDelta()}function Gj(e){e.calcProjection()}function Kj(e){e.resetSkewAndRotation()}function Xj(e){e.removeLeadSnapshot()}function _v(e,t,n){e.translate=Pt(t.translate,0,n),e.scale=Pt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function $v(e,t,n,r){e.min=Pt(t.min,n.min,r),e.max=Pt(t.max,n.max,r)}function Zj(e,t,n,r){$v(e.x,t.x,n.x,r),$v(e.y,t.y,n.y,r)}function Jj(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Qj={duration:.45,ease:[.4,0,.1,1]},Bv=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Lv=Bv("applewebkit/")&&!Bv("chrome/")?Math.round:Bn;function Vv(e){e.min=Lv(e.min),e.max=Lv(e.max)}function e6(e){Vv(e.x),Vv(e.y)}function Wv(e,t,n){return e==="position"||e==="preserve-aspect"&&!nj(Rv(t),Rv(n),.2)}function t6(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const n6=Nv({attachResizeListener:(e,t)=>qi(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Af={current:void 0},zv=Nv({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Af.current){const e=new n6({});e.mount(window),e.setOptions({layoutScroll:!0}),Af.current=e}return Af.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),r6={pan:{Feature:vj},drag:{Feature:bj,ProjectionNode:zv,MeasureLayout:hv}};function Uv(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,i=r[o];i&&St.postRender(()=>i(t,Yi(t)))}class o6 extends Gr{mount(){const{current:t}=this.node;t&&(this.unmount=mI(t,(n,r)=>(Uv(this.node,r,"Start"),o=>Uv(this.node,o,"End"))))}unmount(){}}class s6 extends Gr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Ui(qi(this.node.current,"focus",()=>this.onFocus()),qi(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Hv(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),i=r[o];i&&St.postRender(()=>i(t,Yi(t)))}class i6 extends Gr{mount(){const{current:t}=this.node;t&&(this.unmount=vI(t,(n,r)=>(Hv(this.node,r,"Start"),(o,{success:i})=>Hv(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Nf=new WeakMap,jf=new WeakMap,a6=e=>{const t=Nf.get(e.target);t&&t(e)},l6=e=>{e.forEach(a6)};function c6({root:e,...t}){const n=e||document;jf.has(n)||jf.set(n,{});const r=jf.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(l6,{root:e,...t})),r[o]}function u6(e,t,n){const r=c6(t);return Nf.set(e,n),r.observe(e),()=>{Nf.delete(e),r.unobserve(e)}}const d6={some:0,all:1};class f6 extends Gr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:d6[o]},l=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,i&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:f}=this.node.getProps(),p=u?d:f;p&&p(c)};return u6(this.node.current,a,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(p6(t,n))&&this.startObserver()}unmount(){}}function p6({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const h6={inView:{Feature:f6},tap:{Feature:i6},focus:{Feature:s6},hover:{Feature:o6}},m6={layout:{ProjectionNode:zv,MeasureLayout:hv}},Ff={current:null},qv={current:!1};function g6(){if(qv.current=!0,!!Od)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ff.current=e.matches;e.addListener(t),t()}else Ff.current=!1}const y6=[...vb,Qt,Yr],b6=e=>y6.find(bb(e)),v6=new WeakMap;function x6(e,t,n){for(const r in t){const o=t[r],i=n[r];if(Jt(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&Ul(o.version==="12.7.3",`Attempting to mix Motion versions ${o.version} with 12.7.3 may not work as expected.`);else if(Jt(i))e.addValue(r,ji(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(o):a.hasAnimated||a.set(o)}else{const a=e.getStaticValue(r);e.addValue(r,ji(a!==void 0?a:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Yv=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class w6{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:i,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=gf,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=lr.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,St.render(this.render,!1,!0))};const{latestValues:c,renderState:u,onUpdate:d}=a;this.onUpdate=d,this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=l,this.blockInitialAnimation=!!i,this.isControllingVariants=Zl(n),this.isVariantNode=Sy(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:f,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in p){const y=p[h];c[h]!==void 0&&Jt(y)&&y.set(c[h],!1)}}mount(t){this.current=t,v6.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),qv.current||g6(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ff.current,process.env.NODE_ENV!=="production"&&Ul(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Hr(this.notifyUpdate),Hr(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=fo.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&St.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),i(),a&&a(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in ps){const n=ps[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Bt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Yv.length;r++){const o=Yv[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,a=t[i];a&&(this.propEventSubscriptions[o]=this.on(o,a))}this.prevMotionValues=x6(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=ji(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(gb(r)||eb(r))?r=parseFloat(r):!b6(r)&&Yr.test(n)&&(r=lb(t,n)),this.setBaseTarget(t,Jt(r)?r.get():r)),Jt(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var i;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const a=Qd(this.props,n,(i=this.presenceContext)==null?void 0:i.custom);a&&(r=a[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Jt(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Id),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Gv extends w6{constructor(){super(...arguments),this.KeyframeResolver=wb}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Jt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function C6(e){return window.getComputedStyle(e)}class S6 extends Gv{constructor(){super(...arguments),this.type="html",this.renderInstance=By}readValueFromInstance(t,n){if(fo.has(n))return FA(t,n);{const r=C6(t),o=(Hd(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return nv(t,n)}build(t,n,r){Gd(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return tf(t,n,r)}}class T6 extends Gv{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Bt,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&$y(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(fo.has(n)){const r=ab(n);return r&&r.default||0}return n=Ly.has(n)?n:Ud(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Wy(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&St.postRender(this.updateDimensions)}build(t,n,r){Zd(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){Vy(t,n,r,o)}mount(t){this.isSVGTag=Jd(t.tagName),super.mount(t)}}const k6=(e,t)=>Xd(e)?new T6(t):new S6(t,{allowProjection:e!==M.Fragment}),O6=cA({...GN,...h6,...r6,...m6},k6),Ji=OI(O6),hn=({name:e,size:t=24,url:n,color:r="currentColor",style:o={},...i})=>{const{isPrimary:a}=i,l=n||Je[e],u=At().palette.mode==="dark",d=a?"invert(0%) brightness(200%)":u?"invert(100%) sepia(0%) saturate(0%) hue-rotate(93deg) brightness(103%) contrast(103%)":"invert(48%) sepia(0%) saturate(0%) hue-rotate(181deg) brightness(95%) contrast(90%)";return l?g.jsx("img",{src:l,alt:`${e}-icon`,draggable:!1,style:{filter:d,...o},...i}):null},E6=({showOptions:e,setShowOptions:t,buttonRef:n,options:r,onClick:o})=>{const i=M.useRef(null);return M.useEffect(()=>{let a;return e&&(a=setTimeout(()=>{const l=c=>{i!=null&&i.current&&!(i!=null&&i.current.contains(c.target))&&!(n!=null&&n.contains(c.target))&&t(!1)};document.addEventListener("mousedown",l),document._customLabelClickOutside=l},0)),()=>{clearTimeout(a),document._customLabelClickOutside&&(document.removeEventListener("mousedown",document._customLabelClickOutside),delete document._customLabelClickOutside)}},[e]),g.jsx(ss,{open:e,anchorEl:n,placement:"bottom",transition:!0,modifiers:[{name:"offset",options:{offset:[0,0]}},{name:"sameWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:a})=>{a.styles.popper.width=`${a.rects.reference.width}px`}}],style:{zIndex:1300},ref:i,children:({TransitionProps:a})=>g.jsx($r,{...a,timeout:100,children:g.jsx(Se,{sx:{background:l=>l.palette.primary.appBackground,border:l=>`1px solid ${l.palette.primary.notifyBorderColor}`,borderRadius:"0.7rem",width:"100%",padding:"0.3rem",maxHeight:"20rem",overflowY:"auto"},children:g.jsx(Se,{children:r==null?void 0:r.map((l,c)=>g.jsx(Vr,{sx:{opacity:1,pointerEvents:"auto",padding:"0rem",borderTop:c!==0?u=>`0.1rem solid ${u.palette.primary.notifyBorderColor}`:"none"},onClick:u=>{u.stopPropagation(),o(l)},children:g.jsx(pt,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:{p:"0.5rem"},children:g.jsx(pt,{direction:"row",alignItems:"center",gap:"1rem",children:g.jsx(at,{component:"h3",sx:{color:u=>u.palette.primary.notifyActiveText,fontWeight:"300",fontSize:"1.1rem",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:l.label})})})},c))})})})})},Kv=({styles:e,label:t,disabled:n,onClick:r,...o})=>{var v,x;const i=At();let a=(t==null?void 0:t.length)*((t==null?void 0:t.length)>=10?6.5:7.5)+38||0;a=o!=null&&o.options?a+15:a;const[l,c]=M.useState(!1),u=M.useRef(null),[d,f]=M.useState(!1),[p,h]=M.useState(e==null?void 0:e.isAnimate),[y,m]=M.useState(!1);return g.jsxs(Ji.button,{ref:u,onFocus:()=>m(!0),onBlur:()=>m(!1),onMouseEnter:()=>p&&c(!0),onMouseLeave:()=>p&&c(!1),initial:{width:(e==null?void 0:e.width)||(!p&&t?`${a/10}rem`:"3.2rem"),borderRadius:"0.7rem"},animate:{width:p?`${l?a/10:3.2}rem`:t?`${a/10}rem`:"3.2rem"},whileHover:{backgroundColor:(v=e==null?void 0:e.hover)==null?void 0:v.backgroundColor,color:(x=e==null?void 0:e.hover)==null?void 0:x.color},transition:{duration:.2,ease:"easeInOut"},style:{height:"3.2rem",outline:"none",overflow:"hidden",backgroundColor:(e==null?void 0:e.variant)!=="outlined"?(e==null?void 0:e.colorType)==="secondary"?i.palette.brandColor.blue:(e==null?void 0:e.colorType)==="danger"?i.palette.brandColor.red:(e==null?void 0:e.colorType)==="empty"?i.palette.primary.notifyButtonBackground:i.palette.brandColor.orange:i.palette.primary.notifyBackground,border:(e==null?void 0:e.variant)==="outlined"||(e==null?void 0:e.colorType)==="empty"?y?`0.1rem solid ${i.palette.brandColor.lightBlue}`:`0.1rem solid ${i.palette.primary.notifyBorderColor}`:y?`0.1rem solid ${i.palette.brandColor.lightBlue}`:"none",display:"flex",alignItems:"center",gap:l||!p?"0.5rem":0,color:(e==null?void 0:e.variant)==="outlined"||(e==null?void 0:e.colorType)==="empty"?i.palette.primary.notifyTextColor:"white",justifyContent:l?"flex-start":"center",padding:l||!p?"1.2rem":"0.8rem",whiteSpace:"nowrap",opacity:n?.6:1,cursor:n?"auto":"pointer",...e},disabled:n,layout:!0,onClick:()=>{!(o!=null&&o.options)&&r(),o!=null&&o.options&&(f(T=>!T),h(d))},...o,children:[(e==null?void 0:e.icon)&&(!(e!=null&&e.iconPosition)||(e==null?void 0:e.iconPosition)==="start")&&g.jsx(hn,{url:e==null?void 0:e.icon,isPrimary:e==null?void 0:e.iconPrimary}),t&&g.jsxs(Ji.div,{layout:!0,initial:{opacity:0,width:0},animate:{opacity:l||!p?1:0,width:l||!p?"auto":0},transition:{duration:.2,ease:"easeInOut",delay:l?.1:0},style:{overflow:"hidden",whiteSpace:"nowrap",display:"flex",justifyContent:"center",gap:"0.8rem"},children:[g.jsx(at,{sx:{fontSize:"1.1rem"},children:t}),(o==null?void 0:o.options)&&(d?g.jsx(hn,{url:Je.ArrowUpLight}):g.jsx(hn,{url:Je.ArrowDownLight}))]}),(e==null?void 0:e.iconPosition)==="end"&&g.jsx(hn,{url:e==null?void 0:e.icon,isPrimary:e==null?void 0:e.iconPrimary}),g.jsx(E6,{showOptions:d,buttonRef:u==null?void 0:u.current,setShowOptions:f,options:o==null?void 0:o.options,onClick:r})]})};Kv.propTypes={styles:s.object.isRequired,label:s.string};function Er({...e}){return g.jsx($n,{children:g.jsx(Kv,{...e})})}function ac({...e}){return g.jsx($n,{children:g.jsx(G0,{sx:{p:"0!important"},id:e==null?void 0:e.id,icon:g.jsx(Se,{component:"img",src:Je.Uncheck}),checkedIcon:g.jsx(Se,{component:"img",src:Je.Check}),...e})})}const Xv=new Set;function P6(e,t="warning"){if(process.env.NODE_ENV==="production")return;const n=Array.isArray(e)?e.join(`
302
+ `),()=>{document.head.removeChild(h)}},[t]),g.jsx(J5,{isPresent:t,childRef:o,sizeRef:i,children:C.cloneElement(e,{ref:o})})}const eI=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a,anchorX:l})=>{const c=kd(tI),u=M.useId(),d=M.useCallback(p=>{c.set(p,!0);for(const h of c.values())if(!h)return;r&&r()},[c,r]),f=M.useMemo(()=>({id:u,initial:t,isPresent:n,custom:o,onExitComplete:d,register:p=>(c.set(p,!1),()=>c.delete(p))}),i?[Math.random(),d]:[n,d]);return M.useMemo(()=>{c.forEach((p,h)=>c.set(h,!1))},[n]),C.useEffect(()=>{!n&&!c.size&&r&&r()},[n]),a==="popLayout"&&(e=g.jsx(Q5,{isPresent:n,anchorX:l,children:e})),g.jsx(Wl.Provider,{value:f,children:e})};function tI(){return new Map}function ry(e=!0){const t=M.useContext(Wl);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=M.useId();M.useEffect(()=>{if(e)return o(i)},[e]);const a=M.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,a]:[!0]}const zl=e=>e.key||"";function oy(e){const t=[];return M.Children.forEach(e,n=>{M.isValidElement(n)&&t.push(n)}),t}const nI=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:a=!1,anchorX:l="left"})=>{const[c,u]=ry(a),d=M.useMemo(()=>oy(e),[e]),f=a&&!c?[]:d.map(zl),p=M.useRef(!0),h=M.useRef(d),y=kd(()=>new Map),[m,v]=M.useState(d),[x,T]=M.useState(d);ny(()=>{p.current=!1,h.current=d;for(let b=0;b<x.length;b++){const O=zl(x[b]);f.includes(O)?y.delete(O):y.get(O)!==!0&&y.set(O,!1)}},[x,f.length,f.join("-")]);const w=[];if(d!==m){let b=[...d];for(let O=0;O<x.length;O++){const E=x[O],P=zl(E);f.includes(P)||(b.splice(O,0,E),w.push(E))}return i==="wait"&&w.length&&(b=w),T(oy(b)),v(d),null}process.env.NODE_ENV!=="production"&&i==="wait"&&x.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:k}=M.useContext(Td);return g.jsx(g.Fragment,{children:x.map(b=>{const O=zl(b),E=a&&!c?!1:d===x||f.includes(O),P=()=>{if(y.has(O))y.set(O,!0);else return;let R=!0;y.forEach(A=>{A||(R=!1)}),R&&(k==null||k(),T(h.current),a&&(u==null||u()),r&&r())};return g.jsx(eI,{isPresent:E,initial:!p.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,onExitComplete:E?void 0:P,anchorX:l,children:b},O)})})};function Pd(e,t){e.indexOf(t)===-1&&e.push(t)}function Md(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}let fs=()=>{},Ur=()=>{};process.env.NODE_ENV!=="production"&&(fs=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Ur=(e,t)=>{if(!e)throw new Error(t)});const Rd={useManualTiming:!1};function Dd(e){let t;return()=>(t===void 0&&(t=e()),t)}const Bn=e=>e,Di=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Id{constructor(){this.subscriptions=[]}add(t){return Pd(this.subscriptions,t),()=>Md(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;i<o;i++){const a=this.subscriptions[i];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const qn=e=>e*1e3,ar=e=>e/1e3;function sy(e,t){return t?e*(1e3/t):0}const iy=new Set;function Ul(e,t,n){e||iy.has(t)||(console.warn(t),iy.add(t))}const rI=Dd(()=>window.ScrollTimeline!==void 0);class oI{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(o=>{if(rI()&&o.attachTimeline)return o.attachTimeline(t);if(typeof n=="function")return n(o)});return()=>{r.forEach((o,i)=>{o&&o(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class sI extends oI{then(t,n){return this.finished.finally(t).then(()=>{})}}const ay={value:null},Ad=e=>Array.isArray(e)&&typeof e[0]=="number",iI={};function aI(e,t){const n=Dd(e);return()=>iI[t]??n()}const Ii=aI(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ly=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let i=0;i<o;i++)r+=e(i/(o-1))+", ";return`linear(${r.substring(0,r.length-2)})`},Ai=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Nd={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ai([0,.65,.55,1]),circOut:Ai([.55,0,1,.45]),backIn:Ai([.31,.01,.66,-.59]),backOut:Ai([.33,1.53,.69,.99])};function cy(e,t){if(e)return typeof e=="function"&&Ii()?ly(e,t):Ad(e)?Ai(e):Array.isArray(e)?e.map(n=>cy(n,t)||Nd.easeOut):Nd[e]}function lI(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:a="loop",ease:l="easeInOut",times:c}={},u=void 0){const d={[t]:n};c&&(d.offset=c);const f=cy(l,o);return Array.isArray(f)&&(d.easing=f),e.animate(d,{delay:r,duration:o,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:i+1,direction:a==="reverse"?"alternate":"normal",pseudoElement:u})}function jd(e){return typeof e=="function"&&"applyToOptions"in e}function Fd(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const Hl=2e4;function _d(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Hl;)t+=n,r=e.next(t);return t>=Hl?1/0:t}function cI(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(_d(r),Hl);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:ar(o)}}function uy(e){return!!(typeof e=="function"&&Ii()||!e||typeof e=="string"&&(e in Nd||Ii())||Ad(e)||Array.isArray(e)&&e.every(uy))}function dy(e,t){e.timeline=t,e.onfinish=null}const ql=["read","resolveKeyframes","update","preRender","render","postRender"];function uI(e,t){let n=new Set,r=new Set,o=!1,i=!1;const a=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1},c=0;function u(f){a.has(f)&&(d.schedule(f),e()),c++,f(l)}const d={schedule:(f,p=!1,h=!1)=>{const m=h&&o?n:r;return p&&a.add(f),m.has(f)||m.add(f),f},cancel:f=>{r.delete(f),a.delete(f)},process:f=>{if(l=f,o){i=!0;return}o=!0,[n,r]=[r,n],n.forEach(u),t&&ay.value&&ay.value.frameloop[t].push(c),c=0,n.clear(),o=!1,i&&(i=!1,d.process(f))}};return d}const dI=40;function fy(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=ql.reduce((x,T)=>(x[T]=uI(i,t?T:void 0),x),{}),{read:l,resolveKeyframes:c,update:u,preRender:d,render:f,postRender:p}=a,h=()=>{const x=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(x-o.timestamp,dI),1),o.timestamp=x,o.isProcessing=!0,l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),p.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(h))},y=()=>{n=!0,r=!0,o.isProcessing||e(h)};return{schedule:ql.reduce((x,T)=>{const w=a[T];return x[T]=(k,b=!1,O=!1)=>(n||y(),w.schedule(k,b,O)),x},{}),cancel:x=>{for(let T=0;T<ql.length;T++)a[ql[T]].cancel(x)},state:o,steps:a}}const{schedule:$d}=fy(queueMicrotask,!1),{schedule:St,cancel:Hr,state:Gt,steps:Bd}=fy(typeof requestAnimationFrame<"u"?requestAnimationFrame:Bn,!0);let Yl;function fI(){Yl=void 0}const lr={now:()=>(Yl===void 0&&lr.set(Gt.isProcessing||Rd.useManualTiming?Gt.timestamp:performance.now()),Yl),set:e=>{Yl=e,queueMicrotask(fI)}},Yn={x:!1,y:!1};function py(){return Yn.x||Yn.y}function pI(e){return e==="x"||e==="y"?Yn[e]?null:(Yn[e]=!0,()=>{Yn[e]=!1}):Yn.x||Yn.y?null:(Yn.x=Yn.y=!0,()=>{Yn.x=Yn.y=!1})}function hI(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const o=(n==null?void 0:n[e])??r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}function hy(e,t){const n=hI(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function my(e){return!(e.pointerType==="touch"||py())}function mI(e,t,n={}){const[r,o,i]=hy(e,n),a=l=>{if(!my(l))return;const{target:c}=l,u=t(c,l);if(typeof u!="function"||!c)return;const d=f=>{my(f)&&(u(f),c.removeEventListener("pointerleave",d))};c.addEventListener("pointerleave",d,o)};return r.forEach(l=>{l.addEventListener("pointerenter",a,o)}),i}const gy=(e,t)=>t?e===t?!0:gy(e,t.parentElement):!1,Ld=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,gI=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function yI(e){return gI.has(e.tagName)||e.tabIndex!==-1}const Ni=new WeakSet;function yy(e){return t=>{t.key==="Enter"&&e(t)}}function Vd(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const bI=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=yy(()=>{if(Ni.has(n))return;Vd(n,"down");const o=yy(()=>{Vd(n,"up")}),i=()=>Vd(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function by(e){return Ld(e)&&!py()}function vI(e,t,n={}){const[r,o,i]=hy(e,n),a=l=>{const c=l.currentTarget;if(!by(l)||Ni.has(c))return;Ni.add(c);const u=t(c,l),d=(h,y)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",p),!(!by(h)||!Ni.has(c))&&(Ni.delete(c),typeof u=="function"&&u(h,{success:y}))},f=h=>{d(h,c===window||c===document||n.useGlobalTarget||gy(c,h.target))},p=h=>{d(h,!1)};window.addEventListener("pointerup",f,o),window.addEventListener("pointercancel",p,o)};return r.forEach(l=>{(n.useGlobalTarget?window:l).addEventListener("pointerdown",a,o),l instanceof HTMLElement&&(l.addEventListener("focus",u=>bI(u,o)),!yI(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),i}const vy=30,xI=e=>!isNaN(parseFloat(e));class wI{constructor(t,n={}){this.version="12.7.3",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const i=lr.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=lr.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=xI(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Ul(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Id);const r=this.events[t].add(n);return t==="change"?()=>{r(),St.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=lr.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>vy)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,vy);return sy(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(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 ji(e,t){return new wI(e,t)}const xy=M.createContext({strict:!1}),wy={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"]},ps={};for(const e in wy)ps[e]={isEnabled:t=>wy[e].some(n=>!!t[n])};function CI(e){for(const t in e)ps[t]={...ps[t],...e[t]}}const SI=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 Gl(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||SI.has(e)}let Cy=e=>!Gl(e);function TI(e){e&&(Cy=t=>t.startsWith("on")?!Gl(t):e(t))}try{TI(require("@emotion/is-prop-valid").default)}catch{}function kI(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(Cy(o)||n===!0&&Gl(o)||!t&&!Gl(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function OI(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&Ul(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,o)=>o==="create"?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}const Kl=M.createContext({});function Xl(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Fi(e){return typeof e=="string"||Array.isArray(e)}const Wd=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],zd=["initial",...Wd];function Zl(e){return Xl(e.animate)||zd.some(t=>Fi(e[t]))}function Sy(e){return!!(Zl(e)||e.variants)}function EI(e,t){if(Zl(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Fi(n)?n:void 0,animate:Fi(r)?r:void 0}}return e.inherit!==!1?t:{}}function PI(e){const{initial:t,animate:n}=EI(e,M.useContext(Kl));return M.useMemo(()=>({initial:t,animate:n}),[Ty(t),Ty(n)])}function Ty(e){return Array.isArray(e)?e.join(" "):e}const MI=Symbol.for("motionComponentSymbol");function hs(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function RI(e,t,n){return M.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):hs(n)&&(n.current=r))},[t])}const Ud=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ky="data-"+Ud("framerAppearId"),Oy=M.createContext({});function DI(e,t,n,r,o){var m,v;const{visualElement:i}=M.useContext(Kl),a=M.useContext(xy),l=M.useContext(Wl),c=M.useContext(Ed).reducedMotion,u=M.useRef(null);r=r||a.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:i,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c}));const d=u.current,f=M.useContext(Oy);d&&!d.projection&&o&&(d.type==="html"||d.type==="svg")&&II(u.current,n,o,f);const p=M.useRef(!1);M.useInsertionEffect(()=>{d&&p.current&&d.update(n,l)});const h=n[ky],y=M.useRef(!!h&&!((m=window.MotionHandoffIsComplete)!=null&&m.call(window,h))&&((v=window.MotionHasOptimisedAnimation)==null?void 0:v.call(window,h)));return ny(()=>{d&&(p.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),$d.render(d.render),y.current&&d.animationState&&d.animationState.animateChanges())}),M.useEffect(()=>{d&&(!y.current&&d.animationState&&d.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var x;(x=window.MotionHandoffMarkAsComplete)==null||x.call(window,h)}),y.current=!1))}),d}function II(e,t,n,r){const{layoutId:o,layout:i,drag:a,dragConstraints:l,layoutScroll:c,layoutRoot:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Ey(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!a||l&&hs(l),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:u})}function Ey(e){if(e)return e.options.allowProjection!==!1?e.projection:Ey(e.parent)}function AI({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&CI(e);function i(l,c){let u;const d={...M.useContext(Ed),...l,layoutId:NI(l)},{isStatic:f}=d,p=PI(l),h=r(l,f);if(!f&&Od){jI(d,e);const y=FI(d);u=y.MeasureLayout,p.visualElement=DI(o,h,d,t,y.ProjectionNode)}return g.jsxs(Kl.Provider,{value:p,children:[u&&p.visualElement?g.jsx(u,{visualElement:p.visualElement,...d}):null,n(o,l,RI(h,p.visualElement,c),h,f,p.visualElement)]})}i.displayName=`motion.${typeof o=="string"?o:`create(${o.displayName??o.name??""})`}`;const a=M.forwardRef(i);return a[MI]=o,a}function NI({layoutId:e}){const t=M.useContext(Td).id;return t&&e!==void 0?t+"-"+e:e}function jI(e,t){const n=M.useContext(xy).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?fs(!1,r):Ur(!1,r)}}function FI(e){const{drag:t,layout:n}=ps;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const Py=e=>t=>typeof t=="string"&&t.startsWith(e),Hd=Py("--"),_I=Py("var(--"),qd=e=>_I(e)?$I.test(e.split("/*")[0].trim()):!1,$I=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,_i={};function BI(e){for(const t in e)_i[t]=e[t],Hd(t)&&(_i[t].isCSSVariable=!0)}const ms=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],fo=new Set(ms);function My(e,{layout:t,layoutId:n}){return fo.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!_i[e]||e==="opacity")}const Jt=e=>!!(e&&e.getVelocity),Ry=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Or=(e,t,n)=>n>t?t:n<e?e:n,gs={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},$i={...gs,transform:e=>Or(0,1,e)},Jl={...gs,default:1},Bi=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),qr=Bi("deg"),cr=Bi("%"),We=Bi("px"),LI=Bi("vh"),VI=Bi("vw"),Dy={...cr,parse:e=>cr.parse(e)/100,transform:e=>cr.transform(e*100)},WI={borderWidth:We,borderTopWidth:We,borderRightWidth:We,borderBottomWidth:We,borderLeftWidth:We,borderRadius:We,radius:We,borderTopLeftRadius:We,borderTopRightRadius:We,borderBottomRightRadius:We,borderBottomLeftRadius:We,width:We,maxWidth:We,height:We,maxHeight:We,top:We,right:We,bottom:We,left:We,padding:We,paddingTop:We,paddingRight:We,paddingBottom:We,paddingLeft:We,margin:We,marginTop:We,marginRight:We,marginBottom:We,marginLeft:We,backgroundPositionX:We,backgroundPositionY:We},zI={rotate:qr,rotateX:qr,rotateY:qr,rotateZ:qr,scale:Jl,scaleX:Jl,scaleY:Jl,scaleZ:Jl,skew:qr,skewX:qr,skewY:qr,distance:We,translateX:We,translateY:We,translateZ:We,x:We,y:We,z:We,perspective:We,transformPerspective:We,opacity:$i,originX:Dy,originY:Dy,originZ:We},Iy={...gs,transform:Math.round},Yd={...WI,...zI,zIndex:Iy,size:We,fillOpacity:$i,strokeOpacity:$i,numOctaves:Iy},UI={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},HI=ms.length;function qI(e,t,n){let r="",o=!0;for(let i=0;i<HI;i++){const a=ms[i],l=e[a];if(l===void 0)continue;let c=!0;if(typeof l=="number"?c=l===(a.startsWith("scale")?1:0):c=parseFloat(l)===0,!c||n){const u=Ry(l,Yd[a]);if(!c){o=!1;const d=UI[a]||a;r+=`${d}(${u}) `}n&&(t[a]=u)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function Gd(e,t,n){const{style:r,vars:o,transformOrigin:i}=e;let a=!1,l=!1;for(const c in t){const u=t[c];if(fo.has(c)){a=!0;continue}else if(Hd(c)){o[c]=u;continue}else{const d=Ry(u,Yd[c]);c.startsWith("origin")?(l=!0,i[c]=d):r[c]=d}}if(t.transform||(a||n?r.transform=qI(t,e.transform,n):r.transform&&(r.transform="none")),l){const{originX:c="50%",originY:u="50%",originZ:d=0}=i;r.transformOrigin=`${c} ${u} ${d}`}}const Kd=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Ay(e,t,n){for(const r in t)!Jt(t[r])&&!My(r,n)&&(e[r]=t[r])}function YI({transformTemplate:e},t){return M.useMemo(()=>{const n=Kd();return Gd(n,t,e),Object.assign({},n.vars,n.style)},[t])}function GI(e,t){const n=e.style||{},r={};return Ay(r,n,e),Object.assign(r,YI(e,t)),r}function KI(e,t){const n={},r=GI(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const XI=["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 Xd(e){return typeof e!="string"||e.includes("-")?!1:!!(XI.indexOf(e)>-1||/[A-Z]/u.test(e))}const ZI={offset:"stroke-dashoffset",array:"stroke-dasharray"},JI={offset:"strokeDashoffset",array:"strokeDasharray"};function QI(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?ZI:JI;e[i.offset]=We.transform(-r);const a=We.transform(t),l=We.transform(n);e[i.array]=`${a} ${l}`}function Ny(e,t,n){return typeof e=="string"?e:We.transform(t+n*e)}function eA(e,t,n){const r=Ny(t,e.x,e.width),o=Ny(n,e.y,e.height);return`${r} ${o}`}function Zd(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:a,pathSpacing:l=1,pathOffset:c=0,...u},d,f){if(Gd(e,u,f),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:h,dimensions:y}=e;p.transform&&(y&&(h.transform=p.transform),delete p.transform),y&&(o!==void 0||i!==void 0||h.transform)&&(h.transformOrigin=eA(y,o!==void 0?o:.5,i!==void 0?i:.5)),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),a!==void 0&&QI(p,a,l,c,!1)}const jy=()=>({...Kd(),attrs:{}}),Jd=e=>typeof e=="string"&&e.toLowerCase()==="svg";function tA(e,t,n,r){const o=M.useMemo(()=>{const i=jy();return Zd(i,t,Jd(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Ay(i,e.style,e),o.style={...i,...o.style}}return o}function nA(e=!1){return(n,r,o,{latestValues:i},a)=>{const c=(Xd(n)?tA:KI)(r,i,a,n),u=kI(r,typeof n=="string",e),d=n!==M.Fragment?{...u,...c,ref:o}:{},{children:f}=r,p=M.useMemo(()=>Jt(f)?f.get():f,[f]);return M.createElement(n,{...d,children:p})}}function Fy(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Qd(e,t,n,r){if(typeof t=="function"){const[o,i]=Fy(r);t=t(n!==void 0?n:e.custom,o,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,i]=Fy(r);t=t(n!==void 0?n:e.custom,o,i)}return t}const ef=e=>Array.isArray(e),rA=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),oA=e=>ef(e)?e[e.length-1]||0:e;function Ql(e){const t=Jt(e)?e.get():e;return rA(t)?t.toValue():t}function sA({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,i){const a={latestValues:iA(r,o,i,e),renderState:t()};return n&&(a.onMount=l=>n({props:r,current:l,...a}),a.onUpdate=l=>n(l)),a}const _y=e=>(t,n)=>{const r=M.useContext(Kl),o=M.useContext(Wl),i=()=>sA(e,t,r,o);return n?i():kd(i)};function iA(e,t,n,r){const o={},i=r(e,{});for(const p in i)o[p]=Ql(i[p]);let{initial:a,animate:l}=e;const c=Zl(e),u=Sy(e);t&&u&&!c&&e.inherit!==!1&&(a===void 0&&(a=t.initial),l===void 0&&(l=t.animate));let d=n?n.initial===!1:!1;d=d||a===!1;const f=d?l:a;if(f&&typeof f!="boolean"&&!Xl(f)){const p=Array.isArray(f)?f:[f];for(let h=0;h<p.length;h++){const y=Qd(e,p[h]);if(y){const{transitionEnd:m,transition:v,...x}=y;for(const T in x){let w=x[T];if(Array.isArray(w)){const k=d?w.length-1:0;w=w[k]}w!==null&&(o[T]=w)}for(const T in m)o[T]=m[T]}}}return o}function tf(e,t,n){var i;const{style:r}=e,o={};for(const a in r)(Jt(r[a])||t.style&&Jt(t.style[a])||My(a,e)||((i=n==null?void 0:n.getValue(a))==null?void 0:i.liveStyle)!==void 0)&&(o[a]=r[a]);return o}const aA={useVisualState:_y({scrapeMotionValuesFromProps:tf,createRenderState:Kd})};function $y(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function By(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const Ly=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 Vy(e,t,n,r){By(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Ly.has(o)?o:Ud(o),t.attrs[o])}function Wy(e,t,n){const r=tf(e,t,n);for(const o in e)if(Jt(e[o])||Jt(t[o])){const i=ms.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}const zy=["x","y","width","height","cx","cy","r"],lA={useVisualState:_y({scrapeMotionValuesFromProps:Wy,createRenderState:jy,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:o})=>{if(!n)return;let i=!!e.drag;if(!i){for(const l in o)if(fo.has(l)){i=!0;break}}if(!i)return;let a=!t;if(t)for(let l=0;l<zy.length;l++){const c=zy[l];e[c]!==t[c]&&(a=!0)}a&&St.read(()=>{$y(n,r),St.render(()=>{Zd(r,o,Jd(n.tagName),e.transformTemplate),Vy(n,r)})})}})};function cA(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const a={...Xd(r)?lA:aA,preloadedFeatures:e,useRender:nA(o),createVisualElement:t,Component:r};return AI(a)}}function Li(e,t,n){const r=e.getProps();return Qd(r,t,n!==void 0?n:r.custom,e)}const Uy=new Set(["width","height","top","left","right","bottom",...ms]);function uA(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,ji(n))}function dA(e,t){const n=Li(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const a in i){const l=oA(i[a]);uA(e,a,l)}}function fA(e){return!!(Jt(e)&&e.add)}function nf(e,t){const n=e.getValue("willChange");if(fA(n))return n.add(t);if(!n&&Rd.WillChange){const r=new Rd.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Hy(e){return e.props[ky]}const qy=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,pA=1e-7,hA=12;function mA(e,t,n,r,o){let i,a,l=0;do a=t+(n-t)/2,i=qy(a,r,o)-e,i>0?n=a:t=a;while(Math.abs(i)>pA&&++l<hA);return a}function Vi(e,t,n,r){if(e===t&&n===r)return Bn;const o=i=>mA(i,0,1,e,n);return i=>i===0||i===1?i:qy(o(i),t,r)}const Yy=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Gy=e=>t=>1-e(1-t),Ky=Vi(.33,1.53,.69,.99),rf=Gy(Ky),Xy=Yy(rf),Zy=e=>(e*=2)<1?.5*rf(e):.5*(2-Math.pow(2,-10*(e-1))),of=e=>1-Math.sin(Math.acos(e)),Jy=Gy(of),Qy=Yy(of),eb=e=>/^0[^.\s]+$/u.test(e);function gA(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||eb(e):!0}const Wi=e=>Math.round(e*1e5)/1e5,sf=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function yA(e){return e==null}const bA=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,af=(e,t)=>n=>!!(typeof n=="string"&&bA.test(n)&&n.startsWith(e)||t&&!yA(n)&&Object.prototype.hasOwnProperty.call(n,t)),tb=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,a,l]=r.match(sf);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:l!==void 0?parseFloat(l):1}},vA=e=>Or(0,255,e),lf={...gs,transform:e=>Math.round(vA(e))},po={test:af("rgb","red"),parse:tb("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+lf.transform(e)+", "+lf.transform(t)+", "+lf.transform(n)+", "+Wi($i.transform(r))+")"};function xA(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const cf={test:af("#"),parse:xA,transform:po.transform},ys={test:af("hsl","hue"),parse:tb("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+cr.transform(Wi(t))+", "+cr.transform(Wi(n))+", "+Wi($i.transform(r))+")"},Qt={test:e=>po.test(e)||cf.test(e)||ys.test(e),parse:e=>po.test(e)?po.parse(e):ys.test(e)?ys.parse(e):cf.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?po.transform(e):ys.transform(e)},wA=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function CA(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(sf))==null?void 0:t.length)||0)+(((n=e.match(wA))==null?void 0:n.length)||0)>0}const nb="number",rb="color",SA="var",TA="var(",ob="${}",kA=/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 zi(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const l=t.replace(kA,c=>(Qt.test(c)?(r.color.push(i),o.push(rb),n.push(Qt.parse(c))):c.startsWith(TA)?(r.var.push(i),o.push(SA),n.push(c)):(r.number.push(i),o.push(nb),n.push(parseFloat(c))),++i,ob)).split(ob);return{values:n,split:l,indexes:r,types:o}}function sb(e){return zi(e).values}function ib(e){const{split:t,types:n}=zi(e),r=t.length;return o=>{let i="";for(let a=0;a<r;a++)if(i+=t[a],o[a]!==void 0){const l=n[a];l===nb?i+=Wi(o[a]):l===rb?i+=Qt.transform(o[a]):i+=o[a]}return i}}const OA=e=>typeof e=="number"?0:e;function EA(e){const t=sb(e);return ib(e)(t.map(OA))}const Yr={test:CA,parse:sb,createTransformer:ib,getAnimatableNone:EA},PA=new Set(["brightness","contrast","saturate","opacity"]);function MA(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(sf)||[];if(!r)return e;const o=n.replace(r,"");let i=PA.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const RA=/\b([a-z-]*)\(.*?\)/gu,uf={...Yr,getAnimatableNone:e=>{const t=e.match(RA);return t?t.map(MA).join(" "):e}},DA={...Yd,color:Qt,backgroundColor:Qt,outlineColor:Qt,fill:Qt,stroke:Qt,borderColor:Qt,borderTopColor:Qt,borderRightColor:Qt,borderBottomColor:Qt,borderLeftColor:Qt,filter:uf,WebkitFilter:uf},ab=e=>DA[e];function lb(e,t){let n=ab(e);return n!==uf&&(n=Yr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const IA=new Set(["auto","none","0"]);function AA(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!IA.has(i)&&zi(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=lb(n,o)}const ho=e=>e*180/Math.PI,df=e=>{const t=ho(Math.atan2(e[1],e[0]));return ff(t)},NA={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:df,rotateZ:df,skewX:e=>ho(Math.atan(e[1])),skewY:e=>ho(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},ff=e=>(e=e%360,e<0&&(e+=360),e),cb=df,ub=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),db=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),jA={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ub,scaleY:db,scale:e=>(ub(e)+db(e))/2,rotateX:e=>ff(ho(Math.atan2(e[6],e[5]))),rotateY:e=>ff(ho(Math.atan2(-e[2],e[0]))),rotateZ:cb,rotate:cb,skewX:e=>ho(Math.atan(e[4])),skewY:e=>ho(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function fb(e){return e.includes("scale")?1:0}function pf(e,t){if(!e||e==="none")return fb(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=jA,o=n;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=NA,o=l}if(!o)return fb(t);const i=r[t],a=o[1].split(",").map(_A);return typeof i=="function"?i(a):a[i]}const FA=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return pf(n,t)};function _A(e){return parseFloat(e.trim())}const pb=e=>e===gs||e===We,$A=new Set(["x","y","z"]),BA=ms.filter(e=>!$A.has(e));function LA(e){const t=[];return BA.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const bs={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>pf(t,"x"),y:(e,{transform:t})=>pf(t,"y")};bs.translateX=bs.x,bs.translateY=bs.y;const mo=new Set;let hf=!1,mf=!1;function hb(){if(mf){const e=Array.from(mo).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=LA(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,a])=>{var l;(l=r.getValue(i))==null||l.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}mf=!1,hf=!1,mo.forEach(e=>e.complete()),mo.clear()}function mb(){mo.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(mf=!0)})}function VA(){mb(),hb()}class gf{constructor(t,n,r,o,i,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(mo.add(this),hf||(hf=!0,St.read(mb),St.resolveKeyframes(hb))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let i=0;i<t.length;i++)if(t[i]===null)if(i===0){const a=o==null?void 0:o.get(),l=t[t.length-1];if(a!==void 0)t[0]=a;else if(r&&n){const c=r.readValue(n,l);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=l),o&&a===void 0&&o.set(t[0])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),mo.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,mo.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const gb=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),WA=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function zA(e){const t=WA.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const UA=4;function yb(e,t,n=1){Ur(n<=UA,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=zA(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const a=i.trim();return gb(a)?parseFloat(a):a}return qd(o)?yb(o,t,n+1):o}const bb=e=>t=>t.test(e),vb=[gs,We,cr,qr,VI,LI,{test:e=>e==="auto",parse:e=>e}],xb=e=>vb.find(bb(e));class wb extends gf{constructor(t,n,r,o,i){super(t,n,r,o,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let u=t[c];if(typeof u=="string"&&(u=u.trim(),qd(u))){const d=yb(u,n.current);d!==void 0&&(t[c]=d),c===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Uy.has(r)||t.length!==2)return;const[o,i]=t,a=xb(o),l=xb(i);if(a!==l)if(pb(a)&&pb(l))for(let c=0;c<t.length;c++){const u=t[c];typeof u=="string"&&(t[c]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)gA(t[o])&&r.push(o);r.length&&AA(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=bs[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var l;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const i=r.length-1,a=r[i];r[i]=bs[n](t.measureViewportBox(),window.getComputedStyle(t.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),(l=this.removedTransforms)!=null&&l.length&&this.removedTransforms.forEach(([c,u])=>{t.getValue(c).set(u)}),this.resolveNoneKeyframes()}}const Cb=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Yr.test(e)||e==="0")&&!e.startsWith("url("));function HA(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function qA(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],a=Cb(o,t),l=Cb(i,t);return fs(a===l,`You are trying to animate ${t} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!a||!l?!1:HA(e)||(n==="spring"||jd(n))&&r}const YA=e=>e!==null;function ec(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(YA),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return!i||r===void 0?o[i]:r}const GA=40;class Sb{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:a="loop",...l}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=lr.now(),this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:a,...l},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>GA?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&VA(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=lr.now(),this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:i,delay:a,onComplete:l,onUpdate:c,isGenerator:u}=this.options;if(!u&&!qA(t,r,o,i))if(a)this.options.duration=0;else{c&&c(ec(t,this.options,n)),l&&l(),this.resolveFinishedPromise();return}const d=this.initPlayback(t,n);d!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...d},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const Pt=(e,t,n)=>e+(t-e)*n;function yf(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function KA({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,a=0;if(!t)o=i=a=n;else{const l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;o=yf(c,l,e+1/3),i=yf(c,l,e),a=yf(c,l,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function tc(e,t){return n=>n>0?t:e}const bf=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},XA=[cf,po,ys],ZA=e=>XA.find(t=>t.test(e));function Tb(e){const t=ZA(e);if(fs(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===ys&&(n=KA(n)),n}const kb=(e,t)=>{const n=Tb(e),r=Tb(t);if(!n||!r)return tc(e,t);const o={...n};return i=>(o.red=bf(n.red,r.red,i),o.green=bf(n.green,r.green,i),o.blue=bf(n.blue,r.blue,i),o.alpha=Pt(n.alpha,r.alpha,i),po.transform(o))},JA=(e,t)=>n=>t(e(n)),Ui=(...e)=>e.reduce(JA),vf=new Set(["none","hidden"]);function QA(e,t){return vf.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function eN(e,t){return n=>Pt(e,t,n)}function xf(e){return typeof e=="number"?eN:typeof e=="string"?qd(e)?tc:Qt.test(e)?kb:rN:Array.isArray(e)?Ob:typeof e=="object"?Qt.test(e)?kb:tN:tc}function Ob(e,t){const n=[...e],r=n.length,o=e.map((i,a)=>xf(i)(i,t[a]));return i=>{for(let a=0;a<r;a++)n[a]=o[a](i);return n}}function tN(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=xf(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function nN(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const i=t.types[o],a=e.indexes[i][r[i]],l=e.values[a]??0;n[o]=l,r[i]++}return n}const rN=(e,t)=>{const n=Yr.createTransformer(t),r=zi(e),o=zi(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?vf.has(e)&&!o.values.length||vf.has(t)&&!r.values.length?QA(e,t):Ui(Ob(nN(r,o),o.values),n):(fs(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),tc(e,t))};function Eb(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Pt(e,t,n):xf(e)(e,t)}const oN=5;function Pb(e,t,n){const r=Math.max(t-oN,0);return sy(n-e(r),t-r)}const Mt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Mb=.001;function sN({duration:e=Mt.duration,bounce:t=Mt.bounce,velocity:n=Mt.velocity,mass:r=Mt.mass}){let o,i;fs(e<=qn(Mt.maxDuration),"Spring duration must be 10 seconds or less");let a=1-t;a=Or(Mt.minDamping,Mt.maxDamping,a),e=Or(Mt.minDuration,Mt.maxDuration,ar(e)),a<1?(o=u=>{const d=u*a,f=d*e,p=d-n,h=wf(u,a),y=Math.exp(-f);return Mb-p/h*y},i=u=>{const f=u*a*e,p=f*n+n,h=Math.pow(a,2)*Math.pow(u,2)*e,y=Math.exp(-f),m=wf(Math.pow(u,2),a);return(-o(u)+Mb>0?-1:1)*((p-h)*y)/m}):(o=u=>{const d=Math.exp(-u*e),f=(u-n)*e+1;return-.001+d*f},i=u=>{const d=Math.exp(-u*e),f=(n-u)*(e*e);return d*f});const l=5/e,c=aN(o,i,l);if(e=qn(e),isNaN(c))return{stiffness:Mt.stiffness,damping:Mt.damping,duration:e};{const u=Math.pow(c,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const iN=12;function aN(e,t,n){let r=n;for(let o=1;o<iN;o++)r=r-e(r)/t(r);return r}function wf(e,t){return e*Math.sqrt(1-t*t)}const lN=["duration","bounce"],cN=["stiffness","damping","mass"];function Rb(e,t){return t.some(n=>e[n]!==void 0)}function uN(e){let t={velocity:Mt.velocity,stiffness:Mt.stiffness,damping:Mt.damping,mass:Mt.mass,isResolvedFromDuration:!1,...e};if(!Rb(e,cN)&&Rb(e,lN))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*Or(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:Mt.mass,stiffness:o,damping:i}}else{const n=sN(e);t={...t,...n,mass:Mt.mass},t.isResolvedFromDuration=!0}return t}function nc(e=Mt.visualDuration,t=Mt.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],l={done:!1,value:i},{stiffness:c,damping:u,mass:d,duration:f,velocity:p,isResolvedFromDuration:h}=uN({...n,velocity:-ar(n.velocity||0)}),y=p||0,m=u/(2*Math.sqrt(c*d)),v=a-i,x=ar(Math.sqrt(c/d)),T=Math.abs(v)<5;r||(r=T?Mt.restSpeed.granular:Mt.restSpeed.default),o||(o=T?Mt.restDelta.granular:Mt.restDelta.default);let w;if(m<1){const b=wf(x,m);w=O=>{const E=Math.exp(-m*x*O);return a-E*((y+m*x*v)/b*Math.sin(b*O)+v*Math.cos(b*O))}}else if(m===1)w=b=>a-Math.exp(-x*b)*(v+(y+x*v)*b);else{const b=x*Math.sqrt(m*m-1);w=O=>{const E=Math.exp(-m*x*O),P=Math.min(b*O,300);return a-E*((y+m*x*v)*Math.sinh(P)+b*v*Math.cosh(P))/b}}const k={calculatedDuration:h&&f||null,next:b=>{const O=w(b);if(h)l.done=b>=f;else{let E=0;m<1&&(E=b===0?qn(y):Pb(w,b,O));const P=Math.abs(E)<=r,R=Math.abs(a-O)<=o;l.done=P&&R}return l.value=l.done?a:O,l},toString:()=>{const b=Math.min(_d(k),Hl),O=ly(E=>k.next(b*E).value,b,30);return b+"ms "+O},toTransition:()=>{}};return k}nc.applyToOptions=e=>{const t=cI(e,100,nc);return e.ease=Ii()?t.ease:"easeOut",e.duration=qn(t.duration),e.type="keyframes",e};function Db({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:a,min:l,max:c,restDelta:u=.5,restSpeed:d}){const f=e[0],p={done:!1,value:f},h=P=>l!==void 0&&P<l||c!==void 0&&P>c,y=P=>l===void 0?c:c===void 0||Math.abs(l-P)<Math.abs(c-P)?l:c;let m=n*t;const v=f+m,x=a===void 0?v:a(v);x!==v&&(m=x-f);const T=P=>-m*Math.exp(-P/r),w=P=>x+T(P),k=P=>{const R=T(P),A=w(P);p.done=Math.abs(R)<=u,p.value=p.done?x:A};let b,O;const E=P=>{h(p.value)&&(b=P,O=nc({keyframes:[p.value,y(p.value)],velocity:Pb(w,P,p.value),damping:o,stiffness:i,restDelta:u,restSpeed:d}))};return E(0),{calculatedDuration:null,next:P=>{let R=!1;return!O&&b===void 0&&(R=!0,k(P),E(P)),b!==void 0&&P>=b?O.next(P-b):(!R&&k(P),p)}}}const dN=Vi(.42,0,1,1),fN=Vi(0,0,.58,1),Ib=Vi(.42,0,.58,1),pN=e=>Array.isArray(e)&&typeof e[0]!="number",Ab={linear:Bn,easeIn:dN,easeInOut:Ib,easeOut:fN,circIn:of,circInOut:Qy,circOut:Jy,backIn:rf,backInOut:Xy,backOut:Ky,anticipate:Zy},Nb=e=>{if(Ad(e)){Ur(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Vi(t,n,r,o)}else if(typeof e=="string")return Ur(Ab[e]!==void 0,`Invalid easing type '${e}'`),Ab[e];return e};function hN(e,t,n){const r=[],o=n||Eb,i=e.length-1;for(let a=0;a<i;a++){let l=o(e[a],e[a+1]);if(t){const c=Array.isArray(t)?t[a]||Bn:t;l=Ui(c,l)}r.push(l)}return r}function mN(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(Ur(i===t.length,"Both input and output ranges must be the same length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=hN(t,r,o),c=l.length,u=d=>{if(a&&d<e[0])return t[0];let f=0;if(c>1)for(;f<e.length-2&&!(d<e[f+1]);f++);const p=Di(e[f],e[f+1],d);return l[f](p)};return n?d=>u(Or(e[0],e[i-1],d)):u}function gN(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Di(0,t,r);e.push(Pt(n,1,o))}}function yN(e){const t=[0];return gN(t,e.length-1),t}function bN(e,t){return e.map(n=>n*t)}function vN(e,t){return e.map(()=>t||Ib).splice(0,e.length-1)}function Hi({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=pN(r)?r.map(Nb):Nb(r),i={done:!1,value:t[0]},a=bN(n&&n.length===t.length?n:yN(t),e),l=mN(a,t,{ease:Array.isArray(o)?o:vN(t,o)});return{calculatedDuration:e,next:c=>(i.value=l(c),i.done=c>=e,i)}}const xN=e=>{const t=({timestamp:n})=>e(n);return{start:()=>St.update(t,!0),stop:()=>Hr(t),now:()=>Gt.isProcessing?Gt.timestamp:lr.now()}},wN={decay:Db,inertia:Db,tween:Hi,keyframes:Hi,spring:nc},CN=e=>e/100;class Cf extends Sb{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:c}=this.options;c&&c()};const{name:n,motionValue:r,element:o,keyframes:i}=this.options,a=(o==null?void 0:o.KeyframeResolver)||gf,l=(c,u)=>this.onKeyframesResolved(c,u);this.resolver=new a(i,l,n,r,o),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:a=0}=this.options,l=jd(n)?n:wN[n]||Hi;let c,u;process.env.NODE_ENV!=="production"&&l!==Hi&&Ur(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),l!==Hi&&typeof t[0]!="number"&&(c=Ui(CN,Eb(t[0],t[1])),t=[0,100]);const d=l({...this.options,keyframes:t});i==="mirror"&&(u=l({...this.options,keyframes:[...t].reverse(),velocity:-a})),d.calculatedDuration===null&&(d.calculatedDuration=_d(d));const{calculatedDuration:f}=d,p=f+o,h=p*(r+1)-o;return{generator:d,mirroredGenerator:u,mapPercentToKeyframes:c,calculatedDuration:f,resolvedDuration:p,totalDuration:h}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:P}=this.options;return{done:!0,value:P[P.length-1]}}const{finalKeyframe:o,generator:i,mirroredGenerator:a,mapPercentToKeyframes:l,keyframes:c,calculatedDuration:u,totalDuration:d,resolvedDuration:f}=r;if(this.startTime===null)return i.next(0);const{delay:p,repeat:h,repeatType:y,repeatDelay:m,onUpdate:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-d/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const x=this.currentTime-p*(this.speed>=0?1:-1),T=this.speed>=0?x<0:x>d;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let w=this.currentTime,k=i;if(h){const P=Math.min(this.currentTime,d)/f;let R=Math.floor(P),A=P%1;!A&&P>=1&&(A=1),A===1&&R--,R=Math.min(R,h+1),!!(R%2)&&(y==="reverse"?(A=1-A,m&&(A-=m/f)):y==="mirror"&&(k=a)),w=Or(0,1,A)*f}const b=T?{done:!1,value:c[0]}:k.next(w);l&&(b.value=l(b.value));let{done:O}=b;!T&&u!==null&&(O=this.speed>=0?this.currentTime>=d:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&O);return E&&o!==void 0&&(b.value=ec(c,this.options,o)),v&&v(b.value),E&&this.finish(),b}get duration(){const{resolved:t}=this;return t?ar(t.calculatedDuration):0}get time(){return ar(this.currentTime)}set time(t){t=qn(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=ar(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=xN,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),n&&n();const o=this.driver.now();this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=o):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=this.currentTime??0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}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(t){return this.startTime=0,this.tick(t,!0)}get finished(){return this.currentFinishedPromise}}const SN=new Set(["opacity","clipPath","filter","transform"]),TN=Dd(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),rc=10,kN=2e4;function ON(e){return jd(e.type)||e.type==="spring"||!uy(e.ease)}function EN(e,t){const n=new Cf({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let i=0;for(;!r.done&&i<kN;)r=n.sample(i),o.push(r.value),i+=rc;return{times:void 0,keyframes:o,duration:i-rc,ease:"linear"}}const jb={anticipate:Zy,backInOut:Xy,circInOut:Qy};function PN(e){return e in jb}class Fb extends Sb{constructor(t){super(t);const{name:n,motionValue:r,element:o,keyframes:i}=this.options;this.resolver=new wb(i,(a,l)=>this.onKeyframesResolved(a,l),n,r,o),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:o,ease:i,type:a,motionValue:l,name:c,startTime:u}=this.options;if(!l.owner||!l.owner.current)return!1;if(typeof i=="string"&&Ii()&&PN(i)&&(i=jb[i]),ON(this.options)){const{onComplete:f,onUpdate:p,motionValue:h,element:y,...m}=this.options,v=EN(t,m);t=v.keyframes,t.length===1&&(t[1]=t[0]),r=v.duration,o=v.times,i=v.ease,a="keyframes"}const d=lI(l.owner.current,c,t,{...this.options,duration:r,times:o,ease:i});return d.startTime=u??this.calcStartTime(),this.pendingTimeline?(dy(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:f}=this.options;l.set(ec(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:r,times:o,type:a,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return ar(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return ar(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=qn(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}get finished(){return this.resolved.animation.finished}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Bn;const{animation:r}=n;dy(r,t)}return Bn}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:o,type:i,ease:a,times:l}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:d,onComplete:f,element:p,...h}=this.options,y=new Cf({...h,keyframes:r,duration:o,type:i,ease:a,times:l,isGenerator:!0}),m=qn(this.time);u.setWithVelocity(y.sample(m-rc).value,y.sample(m).value,rc)}const{onStop:c}=this.options;c&&c(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:o,repeatType:i,damping:a,type:l}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=n.owner.getProps();return TN()&&r&&SN.has(r)&&(r!=="transform"||!u)&&!c&&!o&&i!=="mirror"&&a!==0&&l!=="inertia"}}const MN={type:"spring",stiffness:500,damping:25,restSpeed:10},RN=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),DN={type:"keyframes",duration:.8},IN={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},AN=(e,{keyframes:t})=>t.length>2?DN:fo.has(e)?e.startsWith("scale")?RN(t[1]):MN:IN;function NN({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:a,repeatDelay:l,from:c,elapsed:u,...d}){return!!Object.keys(d).length}const Sf=(e,t,n,r={},o,i)=>a=>{const l=Fd(r,e)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-qn(c);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:p=>{t.set(p),l.onUpdate&&l.onUpdate(p)},onComplete:()=>{a(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:i?void 0:o};NN(l)||(d={...d,...AN(e,d)}),d.duration&&(d.duration=qn(d.duration)),d.repeatDelay&&(d.repeatDelay=qn(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(f=!0)),d.allowFlatten=!l.type&&!l.ease,f&&!i&&t.get()!==void 0){const p=ec(d.keyframes,l);if(p!==void 0)return St.update(()=>{d.onUpdate(p),d.onComplete()}),new sI([])}return!i&&Fb.supports(d)?new Fb(d):new Cf(d)};function jN({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function _b(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(i=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const d in l){const f=e.getValue(d,e.latestValues[d]??null),p=l[d];if(p===void 0||u&&jN(u,d))continue;const h={delay:n,...Fd(i||{},d)};let y=!1;if(window.MotionHandoffAnimation){const v=Hy(e);if(v){const x=window.MotionHandoffAnimation(v,d,St);x!==null&&(h.startTime=x,y=!0)}}nf(e,d),f.start(Sf(d,f,p,e.shouldReduceMotion&&Uy.has(d)?{type:!1}:h,e,y));const m=f.animation;m&&c.push(m)}return a&&Promise.all(c).then(()=>{St.update(()=>{a&&dA(e,a)})}),c}function Tf(e,t,n={}){var c;const r=Li(e,t,n.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const i=r?()=>Promise.all(_b(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:f,staggerDirection:p}=o;return FN(e,t,d+u,f,p,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,d]=l==="beforeChildren"?[i,a]:[a,i];return u().then(()=>d())}else return Promise.all([i(),a(n.delay)])}function FN(e,t,n=0,r=0,o=1,i){const a=[],l=(e.variantChildren.size-1)*r,c=o===1?(u=0)=>u*r:(u=0)=>l-u*r;return Array.from(e.variantChildren).sort(_N).forEach((u,d)=>{u.notify("AnimationStart",t),a.push(Tf(u,t,{...i,delay:n+c(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function _N(e,t){return e.sortNodePosition(t)}function $N(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>Tf(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=Tf(e,t,n);else{const o=typeof t=="function"?Li(e,t,n.custom):t;r=Promise.all(_b(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function $b(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const BN=zd.length;function Bb(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Bb(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<BN;n++){const r=zd[n],o=e.props[r];(Fi(o)||o===!1)&&(t[r]=o)}return t}const LN=[...Wd].reverse(),VN=Wd.length;function WN(e){return t=>Promise.all(t.map(({animation:n,options:r})=>$N(e,n,r)))}function zN(e){let t=WN(e),n=Lb(),r=!0;const o=c=>(u,d)=>{var p;const f=Li(e,d,c==="exit"?(p=e.presenceContext)==null?void 0:p.custom:void 0);if(f){const{transition:h,transitionEnd:y,...m}=f;u={...u,...m,...y}}return u};function i(c){t=c(e)}function a(c){const{props:u}=e,d=Bb(e.parent)||{},f=[],p=new Set;let h={},y=1/0;for(let v=0;v<VN;v++){const x=LN[v],T=n[x],w=u[x]!==void 0?u[x]:d[x],k=Fi(w),b=x===c?T.isActive:null;b===!1&&(y=v);let O=w===d[x]&&w!==u[x]&&k;if(O&&r&&e.manuallyAnimateOnMount&&(O=!1),T.protectedKeys={...h},!T.isActive&&b===null||!w&&!T.prevProp||Xl(w)||typeof w=="boolean")continue;const E=UN(T.prevProp,w);let P=E||x===c&&T.isActive&&!O&&k||v>y&&k,R=!1;const A=Array.isArray(w)?w:[w];let N=A.reduce(o(x),{});b===!1&&(N={});const{prevResolvedValues:D={}}=T,j={...D,...N},V=$=>{P=!0,p.has($)&&(R=!0,p.delete($)),T.needsAnimating[$]=!0;const W=e.getValue($);W&&(W.liveStyle=!1)};for(const $ in j){const W=N[$],q=D[$];if(h.hasOwnProperty($))continue;let L=!1;ef(W)&&ef(q)?L=!$b(W,q):L=W!==q,L?W!=null?V($):p.add($):W!==void 0&&p.has($)?V($):T.protectedKeys[$]=!0}T.prevProp=w,T.prevResolvedValues=N,T.isActive&&(h={...h,...N}),r&&e.blockInitialAnimation&&(P=!1),P&&(!(O&&E)||R)&&f.push(...A.map($=>({animation:$,options:{type:x}})))}if(p.size){const v={};if(typeof u.initial!="boolean"){const x=Li(e,Array.isArray(u.initial)?u.initial[0]:u.initial);x&&x.transition&&(v.transition=x.transition)}p.forEach(x=>{const T=e.getBaseTarget(x),w=e.getValue(x);w&&(w.liveStyle=!0),v[x]=T??null}),f.push({animation:v})}let m=!!f.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(f):Promise.resolve()}function l(c,u){var f;if(n[c].isActive===u)return Promise.resolve();(f=e.variantChildren)==null||f.forEach(p=>{var h;return(h=p.animationState)==null?void 0:h.setActive(c,u)}),n[c].isActive=u;const d=a(c);for(const p in n)n[p].protectedKeys={};return d}return{animateChanges:a,setActive:l,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Lb(),r=!0}}}function UN(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!$b(t,e):!1}function go(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Lb(){return{animate:go(!0),whileInView:go(),whileHover:go(),whileTap:go(),whileDrag:go(),whileFocus:go(),exit:go()}}class Gr{constructor(t){this.isMounted=!1,this.node=t}update(){}}class HN extends Gr{constructor(t){super(t),t.animationState||(t.animationState=zN(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Xl(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let qN=0;class YN extends Gr{constructor(){super(...arguments),this.id=qN++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const GN={animation:{Feature:HN},exit:{Feature:YN}};function qi(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Yi(e){return{point:{x:e.pageX,y:e.pageY}}}const KN=e=>t=>Ld(t)&&e(t,Yi(t));function Gi(e,t,n,r){return qi(e,t,KN(n),r)}function Vb({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function XN({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function ZN(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}const Wb=1e-4,JN=1-Wb,QN=1+Wb,zb=.01,ej=0-zb,tj=0+zb;function an(e){return e.max-e.min}function nj(e,t,n){return Math.abs(e-t)<=n}function Ub(e,t,n,r=.5){e.origin=r,e.originPoint=Pt(t.min,t.max,e.origin),e.scale=an(n)/an(t),e.translate=Pt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=JN&&e.scale<=QN||isNaN(e.scale))&&(e.scale=1),(e.translate>=ej&&e.translate<=tj||isNaN(e.translate))&&(e.translate=0)}function Ki(e,t,n,r){Ub(e.x,t.x,n.x,r?r.originX:void 0),Ub(e.y,t.y,n.y,r?r.originY:void 0)}function Hb(e,t,n){e.min=n.min+t.min,e.max=e.min+an(t)}function rj(e,t,n){Hb(e.x,t.x,n.x),Hb(e.y,t.y,n.y)}function qb(e,t,n){e.min=t.min-n.min,e.max=e.min+an(t)}function Xi(e,t,n){qb(e.x,t.x,n.x),qb(e.y,t.y,n.y)}const Yb=()=>({translate:0,scale:1,origin:0,originPoint:0}),vs=()=>({x:Yb(),y:Yb()}),Gb=()=>({min:0,max:0}),Bt=()=>({x:Gb(),y:Gb()});function Ln(e){return[e("x"),e("y")]}function kf(e){return e===void 0||e===1}function Of({scale:e,scaleX:t,scaleY:n}){return!kf(e)||!kf(t)||!kf(n)}function yo(e){return Of(e)||Kb(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Kb(e){return Xb(e.x)||Xb(e.y)}function Xb(e){return e&&e!=="0%"}function oc(e,t,n){const r=e-n,o=t*r;return n+o}function Zb(e,t,n,r,o){return o!==void 0&&(e=oc(e,o,r)),oc(e,n,r)+t}function Ef(e,t=0,n=1,r,o){e.min=Zb(e.min,t,n,r,o),e.max=Zb(e.max,t,n,r,o)}function Jb(e,{x:t,y:n}){Ef(e.x,t.translate,t.scale,t.originPoint),Ef(e.y,n.translate,n.scale,n.originPoint)}const Qb=.999999999999,ev=1.0000000000001;function oj(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let i,a;for(let l=0;l<o;l++){i=n[l],a=i.projectionDelta;const{visualElement:c}=i.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&ws(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Jb(e,a)),r&&yo(i.latestValues)&&ws(e,i.latestValues))}t.x<ev&&t.x>Qb&&(t.x=1),t.y<ev&&t.y>Qb&&(t.y=1)}function xs(e,t){e.min=e.min+t,e.max=e.max+t}function tv(e,t,n,r,o=.5){const i=Pt(e.min,e.max,o);Ef(e,t,n,i,r)}function ws(e,t){tv(e.x,t.x,t.scaleX,t.scale,t.originX),tv(e.y,t.y,t.scaleY,t.scale,t.originY)}function nv(e,t){return Vb(ZN(e.getBoundingClientRect(),t))}function sj(e,t,n){const r=nv(e,n),{scroll:o}=t;return o&&(xs(r.x,o.offset.x),xs(r.y,o.offset.y)),r}const rv=({current:e})=>e?e.ownerDocument.defaultView:null,ov=(e,t)=>Math.abs(e-t);function ij(e,t){const n=ov(e.x,t.x),r=ov(e.y,t.y);return Math.sqrt(n**2+r**2)}class sv{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:i=!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 f=Mf(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,h=ij(f.offset,{x:0,y:0})>=3;if(!p&&!h)return;const{point:y}=f,{timestamp:m}=Gt;this.history.push({...y,timestamp:m});const{onStart:v,onMove:x}=this.handlers;p||(v&&v(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,f)},this.handlePointerMove=(f,p)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Pf(p,this.transformPagePoint),St.update(this.updatePoint,!0)},this.handlePointerUp=(f,p)=>{this.end();const{onEnd:h,onSessionEnd:y,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Mf(f.type==="pointercancel"?this.lastMoveEventInfo:Pf(p,this.transformPagePoint),this.history);this.startEvent&&h&&h(f,v),y&&y(f,v)},!Ld(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const a=Yi(t),l=Pf(a,this.transformPagePoint),{point:c}=l,{timestamp:u}=Gt;this.history=[{...c,timestamp:u}];const{onSessionStart:d}=n;d&&d(t,Mf(l,this.history)),this.removeListeners=Ui(Gi(this.contextWindow,"pointermove",this.handlePointerMove),Gi(this.contextWindow,"pointerup",this.handlePointerUp),Gi(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Hr(this.updatePoint)}}function Pf(e,t){return t?{point:t(e.point)}:e}function iv(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Mf({point:e},t){return{point:e,delta:iv(e,av(t)),offset:iv(e,aj(t)),velocity:lj(t,.1)}}function aj(e){return e[0]}function av(e){return e[e.length-1]}function lj(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=av(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>qn(t)));)n--;if(!r)return{x:0,y:0};const i=ar(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function cj(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Pt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Pt(n,e,r.max):Math.min(e,n)),e}function lv(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function uj(e,{top:t,left:n,bottom:r,right:o}){return{x:lv(e.x,n,o),y:lv(e.y,t,r)}}function cv(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function dj(e,t){return{x:cv(e.x,t.x),y:cv(e.y,t.y)}}function fj(e,t){let n=.5;const r=an(e),o=an(t);return o>r?n=Di(t.min,t.max-r,e.min):r>o&&(n=Di(e.min,e.max-o,t.min)),Or(0,1,n)}function pj(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Rf=.35;function hj(e=Rf){return e===!1?e=0:e===!0&&(e=Rf),{x:uv(e,"left","right"),y:uv(e,"top","bottom")}}function uv(e,t,n){return{min:dv(e,t),max:dv(e,n)}}function dv(e,t){return typeof e=="number"?e:e[t]||0}const mj=new WeakMap;class gj{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Bt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Yi(d).point)},i=(d,f)=>{const{drag:p,dragPropagation:h,onDragStart:y}=this.getProps();if(p&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=pI(p),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ln(v=>{let x=this.getAxisMotionValue(v).get()||0;if(cr.test(x)){const{projection:T}=this.visualElement;if(T&&T.layout){const w=T.layout.layoutBox[v];w&&(x=an(w)*(parseFloat(x)/100))}}this.originPoint[v]=x}),y&&St.postRender(()=>y(d,f)),nf(this.visualElement,"transform");const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},a=(d,f)=>{const{dragPropagation:p,dragDirectionLock:h,onDirectionLock:y,onDrag:m}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:v}=f;if(h&&this.currentDirection===null){this.currentDirection=yj(v),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",f.point,v),this.updateAxis("y",f.point,v),this.visualElement.render(),m&&m(d,f)},l=(d,f)=>this.stop(d,f),c=()=>Ln(d=>{var f;return this.getAnimationState(d)==="paused"&&((f=this.getAxisMotionValue(d).animation)==null?void 0:f.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new sv(t,{onSessionStart:o,onStart:i,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:rv(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:i}=this.getProps();i&&St.postRender(()=>i(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!sc(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=cj(a,this.constraints[t],this.elastic[t])),i.set(a)}resolveConstraints(){var i;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(i=this.visualElement.projection)==null?void 0:i.layout,o=this.constraints;t&&hs(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=uj(r.layoutBox,t):this.constraints=!1,this.elastic=hj(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Ln(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=pj(r.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!hs(t))return!1;const r=t.current;Ur(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=sj(r,o.root,this.visualElement.getTransformPagePoint());let a=dj(o.layout.layoutBox,i);if(n){const l=n(XN(a));this.hasMutatedConstraints=!!l,l&&(a=Vb(l))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},u=Ln(d=>{if(!sc(d,n,this.currentDirection))return;let f=c&&c[d]||{};a&&(f={min:0,max:0});const p=o?200:1e6,h=o?40:1e7,y={type:"inertia",velocity:r?t[d]:0,bounceStiffness:p,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(d,y)});return Promise.all(u).then(l)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return nf(this.visualElement,t),r.start(Sf(t,r,0,n,this.visualElement,!1))}stopAnimation(){Ln(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Ln(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Ln(n=>{const{drag:r}=this.getProps();if(!sc(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:a,max:l}=o.layout.layoutBox[n];i.set(t[n]-Pt(a,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!hs(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Ln(a=>{const l=this.getAxisMotionValue(a);if(l&&this.constraints!==!1){const c=l.get();o[a]=fj({min:c,max:c},this.constraints[a])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Ln(a=>{if(!sc(a,t,null))return;const l=this.getAxisMotionValue(a),{min:c,max:u}=this.constraints[a];l.set(Pt(c,u,o[a]))})}addListeners(){if(!this.visualElement.current)return;mj.set(this.visualElement,this);const t=this.visualElement.current,n=Gi(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();hs(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),St.read(r);const a=qi(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(Ln(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=c[d].translate,f.set(f.get()+c[d].translate))}),this.visualElement.render())});return()=>{a(),n(),i(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:a=Rf,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:a,dragMomentum:l}}}function sc(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function yj(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class bj extends Gr{constructor(t){super(t),this.removeGroupControls=Bn,this.removeListeners=Bn,this.controls=new gj(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Bn}unmount(){this.removeGroupControls(),this.removeListeners()}}const fv=e=>(t,n)=>{e&&St.postRender(()=>e(t,n))};class vj extends Gr{constructor(){super(...arguments),this.removePointerDownListener=Bn}onPointerDown(t){this.session=new sv(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:rv(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:fv(t),onStart:fv(n),onMove:r,onEnd:(i,a)=>{delete this.session,o&&St.postRender(()=>o(i,a))}}}mount(){this.removePointerDownListener=Gi(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const ic={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function pv(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Zi={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(We.test(e))e=parseFloat(e);else return e;const n=pv(e,t.target.x),r=pv(e,t.target.y);return`${n}% ${r}%`}},xj={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Yr.parse(e);if(o.length>5)return r;const i=Yr.createTransformer(e),a=typeof o[0]!="number"?1:0,l=n.x.scale*t.x,c=n.y.scale*t.y;o[0+a]/=l,o[1+a]/=c;const u=Pt(l,c,.5);return typeof o[2+a]=="number"&&(o[2+a]/=u),typeof o[3+a]=="number"&&(o[3+a]/=u),i(o)}};class wj extends M.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;BI(Cj),i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),ic.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,a=r.projection;return a&&(a.isPresent=i,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?a.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?a.promote():a.relegate()||St.postRender(()=>{const l=a.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),$d.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function hv(e){const[t,n]=ry(),r=M.useContext(Td);return g.jsx(wj,{...e,layoutGroup:r,switchLayoutGroup:M.useContext(Oy),isPresent:t,safeToRemove:n})}const Cj={borderRadius:{...Zi,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Zi,borderTopRightRadius:Zi,borderBottomLeftRadius:Zi,borderBottomRightRadius:Zi,boxShadow:xj};function Sj(e,t,n){const r=Jt(e)?e:ji(e);return r.start(Sf("",r,t,n)),r.animation}function Tj(e){return e instanceof SVGElement&&e.tagName!=="svg"}const kj=(e,t)=>e.depth-t.depth;class Oj{constructor(){this.children=[],this.isDirty=!1}add(t){Pd(this.children,t),this.isDirty=!0}remove(t){Md(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(kj),this.isDirty=!1,this.children.forEach(t)}}function Ej(e,t){const n=lr.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(Hr(r),e(i-t))};return St.read(r,!0),()=>Hr(r)}const mv=["TopLeft","TopRight","BottomLeft","BottomRight"],Pj=mv.length,gv=e=>typeof e=="string"?parseFloat(e):e,yv=e=>typeof e=="number"||We.test(e);function Mj(e,t,n,r,o,i){o?(e.opacity=Pt(0,n.opacity??1,Rj(r)),e.opacityExit=Pt(t.opacity??1,0,Dj(r))):i&&(e.opacity=Pt(t.opacity??1,n.opacity??1,r));for(let a=0;a<Pj;a++){const l=`border${mv[a]}Radius`;let c=bv(t,l),u=bv(n,l);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||yv(c)===yv(u)?(e[l]=Math.max(Pt(gv(c),gv(u),r),0),(cr.test(u)||cr.test(c))&&(e[l]+="%")):e[l]=u}(t.rotate||n.rotate)&&(e.rotate=Pt(t.rotate||0,n.rotate||0,r))}function bv(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Rj=vv(0,.5,Jy),Dj=vv(.5,.95,Bn);function vv(e,t,n){return r=>r<e?0:r>t?1:n(Di(e,t,r))}function xv(e,t){e.min=t.min,e.max=t.max}function Vn(e,t){xv(e.x,t.x),xv(e.y,t.y)}function wv(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Cv(e,t,n,r,o){return e-=t,e=oc(e,1/n,r),o!==void 0&&(e=oc(e,1/o,r)),e}function Ij(e,t=0,n=1,r=.5,o,i=e,a=e){if(cr.test(t)&&(t=parseFloat(t),t=Pt(a.min,a.max,t/100)-a.min),typeof t!="number")return;let l=Pt(i.min,i.max,r);e===i&&(l-=t),e.min=Cv(e.min,t,n,l,o),e.max=Cv(e.max,t,n,l,o)}function Sv(e,t,[n,r,o],i,a){Ij(e,t[n],t[r],t[o],t.scale,i,a)}const Aj=["x","scaleX","originX"],Nj=["y","scaleY","originY"];function Tv(e,t,n,r){Sv(e.x,t,Aj,n?n.x:void 0,r?r.x:void 0),Sv(e.y,t,Nj,n?n.y:void 0,r?r.y:void 0)}function kv(e){return e.translate===0&&e.scale===1}function Ov(e){return kv(e.x)&&kv(e.y)}function Ev(e,t){return e.min===t.min&&e.max===t.max}function jj(e,t){return Ev(e.x,t.x)&&Ev(e.y,t.y)}function Pv(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Mv(e,t){return Pv(e.x,t.x)&&Pv(e.y,t.y)}function Rv(e){return an(e.x)/an(e.y)}function Dv(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Fj{constructor(){this.members=[]}add(t){Pd(this.members,t),t.scheduleRender()}remove(t){if(Md(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function _j(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,a=(n==null?void 0:n.z)||0;if((o||i||a)&&(r=`translate3d(${o}px, ${i}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:f,rotateY:p,skewX:h,skewY:y}=n;u&&(r=`perspective(${u}px) ${r}`),d&&(r+=`rotate(${d}deg) `),f&&(r+=`rotateX(${f}deg) `),p&&(r+=`rotateY(${p}deg) `),h&&(r+=`skewX(${h}deg) `),y&&(r+=`skewY(${y}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(r+=`scale(${l}, ${c})`),r||"none"}const Df=["","X","Y","Z"],$j={visibility:"hidden"},Iv=1e3;let Bj=0;function If(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Av(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Hy(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",St,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Av(r)}function Nv({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(a={},l=t==null?void 0:t()){this.id=Bj++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Wj),this.nodes.forEach(Yj),this.nodes.forEach(Gj),this.nodes.forEach(zj)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new Oj)}addEventListener(a,l){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new Id),this.eventHandlers.get(a).add(l)}notifyListeners(a,...l){const c=this.eventHandlers.get(a);c&&c.notify(...l)}hasListeners(a){return this.eventHandlers.has(a)}mount(a,l=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Tj(a),this.instance=a;const{layoutId:c,layout:u,visualElement:d}=this.options;if(d&&!d.current&&d.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),l&&(u||c)&&(this.isLayoutDirty=!0),e){let f;const p=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=Ej(p,250),ic.hasAnimatedSinceResize&&(ic.hasAnimatedSinceResize=!1,this.nodes.forEach(Fv))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&d&&(c||u)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:p,hasRelativeLayoutChanged:h,layout:y})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||d.getDefaultTransition()||Qj,{onLayoutAnimationStart:v,onLayoutAnimationComplete:x}=d.getProps(),T=!this.targetLayout||!Mv(this.targetLayout,y),w=!p&&h;if(this.options.layoutRoot||this.resumeFrom||w||p&&(T||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,w);const k={...Fd(m,"layout"),onPlay:v,onComplete:x};(d.shouldReduceMotion||this.options.layoutRoot)&&(k.delay=0,k.type=!1),this.startAnimation(k)}else p||Fv(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=y})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Hr(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(Kj),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Av(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const f=this.path[d];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(jv);return}this.isUpdating||this.nodes.forEach(Hj),this.isUpdating=!1,this.nodes.forEach(qj),this.nodes.forEach(Lj),this.nodes.forEach(Vj),this.clearAllSnapshots();const l=lr.now();Gt.delta=Or(0,1e3/60,l-Gt.timestamp),Gt.timestamp=l,Gt.isProcessing=!0,Bd.update.process(Gt),Bd.preRender.process(Gt),Bd.render.process(Gt),Gt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,$d.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Uj),this.sharedNodes.forEach(Xj)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,St.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){St.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!an(this.snapshot.measuredBox.x)&&!an(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Bt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(l=!1),l){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!o)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!Ov(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;a&&(l||yo(this.latestValues)||d)&&(o(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return a&&(c=this.removeTransform(c)),e6(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:a}=this.options;if(!a)return Bt();const l=a.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(t6))){const{scroll:d}=this.root;d&&(xs(l.x,d.offset.x),xs(l.y,d.offset.y))}return l}removeElementScroll(a){var c;const l=Bt();if(Vn(l,a),(c=this.scroll)!=null&&c.wasRoot)return l;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:f,options:p}=d;d!==this.root&&f&&p.layoutScroll&&(f.wasRoot&&Vn(l,a),xs(l.x,f.offset.x),xs(l.y,f.offset.y))}return l}applyTransform(a,l=!1){const c=Bt();Vn(c,a);for(let u=0;u<this.path.length;u++){const d=this.path[u];!l&&d.options.layoutScroll&&d.scroll&&d!==d.root&&ws(c,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),yo(d.latestValues)&&ws(c,d.latestValues)}return yo(this.latestValues)&&ws(c,this.latestValues),c}removeTransform(a){const l=Bt();Vn(l,a);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!yo(u.latestValues))continue;Of(u.latestValues)&&u.updateSnapshot();const d=Bt(),f=u.measurePageBox();Vn(d,f),Tv(l,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return yo(this.latestValues)&&Tv(l,this.latestValues),l}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.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!==Gt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var p;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(a||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=Gt.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Bt(),this.relativeTargetOrigin=Bt(),Xi(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),Vn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Bt(),this.targetWithTransforms=Bt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),rj(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Vn(this.target,this.layout.layoutBox),Jb(this.target,this.targetDelta)):Vn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Bt(),this.relativeTargetOrigin=Bt(),Xi(this.relativeTargetOrigin,this.target,h.target),Vn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Of(this.parent.latestValues)||Kb(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 y;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||(y=this.parent)!=null&&y.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Gt.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;Vn(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,p=this.treeScale.y;oj(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=Bt());const{target:h}=a;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(wv(this.prevProjectionDelta.x,this.projectionDelta.x),wv(this.prevProjectionDelta.y,this.projectionDelta.y)),Ki(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==p||!Dv(this.projectionDelta.x,this.prevProjectionDelta.x)||!Dv(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var l;if((l=this.options.visualElement)==null||l.scheduleRender(),a){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=vs(),this.projectionDelta=vs(),this.projectionDeltaWithTransform=vs()}setAnimationOrigin(a,l=!1){const c=this.snapshot,u=c?c.latestValues:{},d={...this.latestValues},f=vs();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const p=Bt(),h=c?c.source:void 0,y=this.layout?this.layout.source:void 0,m=h!==y,v=this.getStack(),x=!v||v.members.length<=1,T=!!(m&&!x&&this.options.crossfade===!0&&!this.path.some(Jj));this.animationProgress=0;let w;this.mixTargetDelta=k=>{const b=k/1e3;_v(f.x,a.x,b),_v(f.y,a.y,b),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Xi(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Zj(this.relativeTarget,this.relativeTargetOrigin,p,b),w&&jj(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=Bt()),Vn(w,this.relativeTarget)),m&&(this.animationValues=d,Mj(d,u,this.latestValues,b,T,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=b},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Hr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=St.update(()=>{ic.hasAnimatedSinceResize=!0,this.currentAnimation=Sj(0,Iv,{...a,onUpdate:l=>{this.mixTargetDelta(l),a.onUpdate&&a.onUpdate(l)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.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 a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Iv),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:l,target:c,layout:u,latestValues:d}=a;if(!(!l||!c||!u)){if(this!==a&&this.layout&&u&&Wv(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||Bt();const f=an(this.layout.layoutBox.x);c.x.min=a.target.x.min,c.x.max=c.x.min+f;const p=an(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+p}Vn(l,c),ws(l,d),Ki(this.projectionDeltaWithTransform,this.layoutCorrected,l,d)}}registerSharedNode(a,l){this.sharedNodes.has(a)||this.sharedNodes.set(a,new Fj),this.sharedNodes.get(a).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var l;const{layoutId:a}=this.options;return a?((l=this.getStack())==null?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:a}=this.options;return a?(l=this.getStack())==null?void 0:l.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:l,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),a&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let l=!1;const{latestValues:c}=a;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const u={};c.z&&If("z",a,u,this.animationValues);for(let d=0;d<Df.length;d++)If(`rotate${Df[d]}`,a,u,this.animationValues),If(`skew${Df[d]}`,a,u,this.animationValues);a.render();for(const d in u)a.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);a.scheduleRender()}getProjectionStyles(a){if(!this.instance||this.isSVG)return;if(!this.isVisible)return $j;const l={visibility:""},c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,l.opacity="",l.pointerEvents=Ql(a==null?void 0:a.pointerEvents)||"",l.transform=c?c(this.latestValues,""):"none",l;const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){const h={};return this.options.layoutId&&(h.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,h.pointerEvents=Ql(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!yo(this.latestValues)&&(h.transform=c?c({},""):"none",this.hasProjected=!1),h}const d=u.animationValues||u.latestValues;this.applyTransformsToTarget(),l.transform=_j(this.projectionDeltaWithTransform,this.treeScale,d),c&&(l.transform=c(d,l.transform));const{x:f,y:p}=this.projectionDelta;l.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,u.animationValues?l.opacity=u===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:l.opacity=u===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const h in _i){if(d[h]===void 0)continue;const{correct:y,applyTo:m,isCSSVariable:v}=_i[h],x=l.transform==="none"?d[h]:y(d[h],u);if(m){const T=m.length;for(let w=0;w<T;w++)l[m[w]]=x}else v?this.options.visualElement.renderState.vars[h]=x:l[h]=x}return this.options.layoutId&&(l.pointerEvents=u===this?Ql(a==null?void 0:a.pointerEvents)||"":"none"),l}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var l;return(l=a.currentAnimation)==null?void 0:l.stop()}),this.root.nodes.forEach(jv),this.root.sharedNodes.clear()}}}function Lj(e){e.updateLayout()}function Vj(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;i==="size"?Ln(f=>{const p=a?t.measuredBox[f]:t.layoutBox[f],h=an(p);p.min=r[f].min,p.max=p.min+h}):Wv(i,t.layoutBox,r)&&Ln(f=>{const p=a?t.measuredBox[f]:t.layoutBox[f],h=an(r[f]);p.max=p.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+h)});const l=vs();Ki(l,r,t.layoutBox);const c=vs();a?Ki(c,e.applyTransform(o,!0),t.measuredBox):Ki(c,r,t.layoutBox);const u=!Ov(l);let d=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:p,layout:h}=f;if(p&&h){const y=Bt();Xi(y,t.layoutBox,p.layoutBox);const m=Bt();Xi(m,r,h.layoutBox),Mv(y,m)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=y,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function Wj(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function zj(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Uj(e){e.clearSnapshot()}function jv(e){e.clearMeasurements()}function Hj(e){e.isLayoutDirty=!1}function qj(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Fv(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Yj(e){e.resolveTargetDelta()}function Gj(e){e.calcProjection()}function Kj(e){e.resetSkewAndRotation()}function Xj(e){e.removeLeadSnapshot()}function _v(e,t,n){e.translate=Pt(t.translate,0,n),e.scale=Pt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function $v(e,t,n,r){e.min=Pt(t.min,n.min,r),e.max=Pt(t.max,n.max,r)}function Zj(e,t,n,r){$v(e.x,t.x,n.x,r),$v(e.y,t.y,n.y,r)}function Jj(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Qj={duration:.45,ease:[.4,0,.1,1]},Bv=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Lv=Bv("applewebkit/")&&!Bv("chrome/")?Math.round:Bn;function Vv(e){e.min=Lv(e.min),e.max=Lv(e.max)}function e6(e){Vv(e.x),Vv(e.y)}function Wv(e,t,n){return e==="position"||e==="preserve-aspect"&&!nj(Rv(t),Rv(n),.2)}function t6(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const n6=Nv({attachResizeListener:(e,t)=>qi(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Af={current:void 0},zv=Nv({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Af.current){const e=new n6({});e.mount(window),e.setOptions({layoutScroll:!0}),Af.current=e}return Af.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),r6={pan:{Feature:vj},drag:{Feature:bj,ProjectionNode:zv,MeasureLayout:hv}};function Uv(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,i=r[o];i&&St.postRender(()=>i(t,Yi(t)))}class o6 extends Gr{mount(){const{current:t}=this.node;t&&(this.unmount=mI(t,(n,r)=>(Uv(this.node,r,"Start"),o=>Uv(this.node,o,"End"))))}unmount(){}}class s6 extends Gr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Ui(qi(this.node.current,"focus",()=>this.onFocus()),qi(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Hv(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),i=r[o];i&&St.postRender(()=>i(t,Yi(t)))}class i6 extends Gr{mount(){const{current:t}=this.node;t&&(this.unmount=vI(t,(n,r)=>(Hv(this.node,r,"Start"),(o,{success:i})=>Hv(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Nf=new WeakMap,jf=new WeakMap,a6=e=>{const t=Nf.get(e.target);t&&t(e)},l6=e=>{e.forEach(a6)};function c6({root:e,...t}){const n=e||document;jf.has(n)||jf.set(n,{});const r=jf.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(l6,{root:e,...t})),r[o]}function u6(e,t,n){const r=c6(t);return Nf.set(e,n),r.observe(e),()=>{Nf.delete(e),r.unobserve(e)}}const d6={some:0,all:1};class f6 extends Gr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:d6[o]},l=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,i&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:f}=this.node.getProps(),p=u?d:f;p&&p(c)};return u6(this.node.current,a,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(p6(t,n))&&this.startObserver()}unmount(){}}function p6({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const h6={inView:{Feature:f6},tap:{Feature:i6},focus:{Feature:s6},hover:{Feature:o6}},m6={layout:{ProjectionNode:zv,MeasureLayout:hv}},Ff={current:null},qv={current:!1};function g6(){if(qv.current=!0,!!Od)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ff.current=e.matches;e.addListener(t),t()}else Ff.current=!1}const y6=[...vb,Qt,Yr],b6=e=>y6.find(bb(e)),v6=new WeakMap;function x6(e,t,n){for(const r in t){const o=t[r],i=n[r];if(Jt(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&Ul(o.version==="12.7.3",`Attempting to mix Motion versions ${o.version} with 12.7.3 may not work as expected.`);else if(Jt(i))e.addValue(r,ji(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(o):a.hasAnimated||a.set(o)}else{const a=e.getStaticValue(r);e.addValue(r,ji(a!==void 0?a:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Yv=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class w6{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:i,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=gf,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=lr.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,St.render(this.render,!1,!0))};const{latestValues:c,renderState:u,onUpdate:d}=a;this.onUpdate=d,this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=l,this.blockInitialAnimation=!!i,this.isControllingVariants=Zl(n),this.isVariantNode=Sy(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:f,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in p){const y=p[h];c[h]!==void 0&&Jt(y)&&y.set(c[h],!1)}}mount(t){this.current=t,v6.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),qv.current||g6(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ff.current,process.env.NODE_ENV!=="production"&&Ul(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Hr(this.notifyUpdate),Hr(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=fo.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&St.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),i(),a&&a(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in ps){const n=ps[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Bt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Yv.length;r++){const o=Yv[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,a=t[i];a&&(this.propEventSubscriptions[o]=this.on(o,a))}this.prevMotionValues=x6(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=ji(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(gb(r)||eb(r))?r=parseFloat(r):!b6(r)&&Yr.test(n)&&(r=lb(t,n)),this.setBaseTarget(t,Jt(r)?r.get():r)),Jt(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var i;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const a=Qd(this.props,n,(i=this.presenceContext)==null?void 0:i.custom);a&&(r=a[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Jt(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Id),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Gv extends w6{constructor(){super(...arguments),this.KeyframeResolver=wb}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Jt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function C6(e){return window.getComputedStyle(e)}class S6 extends Gv{constructor(){super(...arguments),this.type="html",this.renderInstance=By}readValueFromInstance(t,n){if(fo.has(n))return FA(t,n);{const r=C6(t),o=(Hd(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return nv(t,n)}build(t,n,r){Gd(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return tf(t,n,r)}}class T6 extends Gv{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Bt,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&$y(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(fo.has(n)){const r=ab(n);return r&&r.default||0}return n=Ly.has(n)?n:Ud(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Wy(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&St.postRender(this.updateDimensions)}build(t,n,r){Zd(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){Vy(t,n,r,o)}mount(t){this.isSVGTag=Jd(t.tagName),super.mount(t)}}const k6=(e,t)=>Xd(e)?new T6(t):new S6(t,{allowProjection:e!==M.Fragment}),O6=cA({...GN,...h6,...r6,...m6},k6),Ji=OI(O6),hn=({name:e,size:t=24,url:n,color:r="currentColor",style:o={},...i})=>{const a=At(),{isPrimary:l,disabled:c,variant:u}=i,d=n||Je[e],f=a.palette.mode==="dark",p=c?f?"invert(0.5) grayscale(1) brightness(1)":"invert(0) grayscale(1) brightness(1)":f?"invert(0) grayscale(1) brightness(3)":"invert(1) grayscale(1) brightness(3)";return d?g.jsx("img",{src:d,alt:`${e}-icon`,draggable:!1,style:{filter:p,...o},...i}):null},E6=({showOptions:e,setShowOptions:t,buttonRef:n,options:r,onClick:o})=>{const i=M.useRef(null);return M.useEffect(()=>{let a;return e&&(a=setTimeout(()=>{const l=c=>{i!=null&&i.current&&!(i!=null&&i.current.contains(c.target))&&!(n!=null&&n.contains(c.target))&&t(!1)};document.addEventListener("mousedown",l),document._customLabelClickOutside=l},0)),()=>{clearTimeout(a),document._customLabelClickOutside&&(document.removeEventListener("mousedown",document._customLabelClickOutside),delete document._customLabelClickOutside)}},[e]),g.jsx(ss,{open:e,anchorEl:n,placement:"bottom",transition:!0,modifiers:[{name:"offset",options:{offset:[0,0]}},{name:"sameWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:a})=>{a.styles.popper.width=`${a.rects.reference.width}px`}}],style:{zIndex:1300},ref:i,children:({TransitionProps:a})=>g.jsx($r,{...a,timeout:100,children:g.jsx(Se,{sx:{background:l=>l.palette.primary.appBackground,border:l=>`1px solid ${l.palette.primary.notifyBorderColor}`,borderRadius:"0.7rem",width:"100%",padding:"0.3rem",maxHeight:"20rem",overflowY:"auto"},children:g.jsx(Se,{children:r==null?void 0:r.map((l,c)=>g.jsx(Vr,{sx:{opacity:1,pointerEvents:"auto",padding:"0rem",borderTop:c!==0?u=>`0.1rem solid ${u.palette.primary.notifyBorderColor}`:"none"},onClick:u=>{u.stopPropagation(),o(l)},children:g.jsx(pt,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:{p:"0.5rem"},children:g.jsx(pt,{direction:"row",alignItems:"center",gap:"1rem",children:g.jsx(at,{component:"h3",sx:{color:u=>u.palette.primary.notifyActiveText,fontWeight:"300",fontSize:"1.1rem",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:l.label})})})},c))})})})})},Kv=({styles:e,label:t,disabled:n,onClick:r,...o})=>{var v,x;const i=At();let a=(t==null?void 0:t.length)*((t==null?void 0:t.length)>=10?6.5:7.5)+38||0;a=o!=null&&o.options?a+15:a;const[l,c]=M.useState(!1),u=M.useRef(null),[d,f]=M.useState(!1),[p,h]=M.useState(e==null?void 0:e.isAnimate),[y,m]=M.useState(!1);return g.jsxs(Ji.button,{ref:u,onFocus:()=>m(!0),onBlur:()=>m(!1),onMouseEnter:()=>p&&c(!0),onMouseLeave:()=>p&&c(!1),initial:{width:(e==null?void 0:e.width)||(!p&&t?`${a/10}rem`:"3.2rem"),borderRadius:"0.7rem"},animate:{width:p?`${l?a/10:3.2}rem`:t?`${a/10}rem`:"3.2rem"},whileHover:{backgroundColor:(v=e==null?void 0:e.hover)==null?void 0:v.backgroundColor,color:(x=e==null?void 0:e.hover)==null?void 0:x.color},transition:{duration:.2,ease:"easeInOut"},style:{height:"3.2rem",outline:"none",overflow:"hidden",backgroundColor:(e==null?void 0:e.variant)!=="outlined"?(e==null?void 0:e.colorType)==="secondary"?i.palette.brandColor.blue:(e==null?void 0:e.colorType)==="danger"?i.palette.brandColor.red:(e==null?void 0:e.colorType)==="empty"?i.palette.primary.notifyButtonBackground:i.palette.brandColor.orange:i.palette.primary.notifyBackground,border:(e==null?void 0:e.variant)==="outlined"||(e==null?void 0:e.colorType)==="empty"?y?`0.1rem solid ${i.palette.brandColor.lightBlue}`:`0.1rem solid ${i.palette.primary.notifyBorderColor}`:y?`0.1rem solid ${i.palette.brandColor.lightBlue}`:"none",display:"flex",alignItems:"center",gap:l||!p?"0.5rem":0,color:(e==null?void 0:e.variant)==="outlined"||(e==null?void 0:e.colorType)==="empty"?i.palette.primary.notifyTextColor:"white",justifyContent:l?"flex-start":"center",padding:l||!p?"1.2rem":"0.8rem",whiteSpace:"nowrap",opacity:n?.6:1,cursor:n?"auto":"pointer",...e},disabled:n,layout:!0,onClick:()=>{!(o!=null&&o.options)&&r(),o!=null&&o.options&&(f(T=>!T),h(d))},...o,children:[(e==null?void 0:e.icon)&&(!(e!=null&&e.iconPosition)||(e==null?void 0:e.iconPosition)==="start")&&g.jsx(hn,{url:e==null?void 0:e.icon,isPrimary:e==null?void 0:e.iconPrimary}),t&&g.jsxs(Ji.div,{layout:!0,initial:{opacity:0,width:0},animate:{opacity:l||!p?1:0,width:l||!p?"auto":0},transition:{duration:.2,ease:"easeInOut",delay:l?.1:0},style:{overflow:"hidden",whiteSpace:"nowrap",display:"flex",justifyContent:"center",gap:"0.8rem"},children:[g.jsx(at,{sx:{fontSize:"1.1rem"},children:t}),(o==null?void 0:o.options)&&(d?g.jsx(hn,{url:Je.ArrowUpLight}):g.jsx(hn,{url:Je.ArrowDownLight}))]}),(e==null?void 0:e.iconPosition)==="end"&&g.jsx(hn,{url:e==null?void 0:e.icon,isPrimary:e==null?void 0:e.iconPrimary}),g.jsx(E6,{showOptions:d,buttonRef:u==null?void 0:u.current,setShowOptions:f,options:o==null?void 0:o.options,onClick:r})]})};Kv.propTypes={styles:s.object.isRequired,label:s.string};function Er({...e}){return g.jsx($n,{children:g.jsx(Kv,{...e})})}function ac({...e}){return g.jsx($n,{children:g.jsx(G0,{sx:{p:"0!important"},id:e==null?void 0:e.id,icon:g.jsx(Se,{component:"img",src:Je.Uncheck}),checkedIcon:g.jsx(Se,{component:"img",src:Je.Check}),...e})})}const Xv=new Set;function P6(e,t="warning"){if(process.env.NODE_ENV==="production")return;const n=Array.isArray(e)?e.join(`
303
303
  `):e;Xv.has(n)||(Xv.add(n),t==="error"?console.error(n):console.warn(n))}function M6(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}const Pr=s.oneOfType([s.func,s.object]);function R6(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":M6(7));return e.charAt(0).toUpperCase()+e.slice(1)}function _f(e){return e&&e.ownerDocument||document}const ur=typeof window<"u"?C.useLayoutEffect:C.useEffect;let Zv=0;function D6(e){const[t,n]=C.useState(e),r=e||t;return C.useEffect(()=>{t==null&&(Zv+=1,n(`mui-${Zv}`))},[t]),r}const Jv={...C}.useId;function lc(e){if(Jv!==void 0){const t=Jv();return e??t}return D6(e)}function Cs({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=C.useRef(e!==void 0),[i,a]=C.useState(t),l=o?e:i;if(process.env.NODE_ENV!=="production"){C.useEffect(()=>{o!==(e!==void 0)&&console.error([`MUI: A component is changing the ${o?"":"un"}controlled ${r} state of ${n} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
304
304
  `))},[r,n,e]);const{current:u}=C.useRef(t);C.useEffect(()=>{!o&&!Object.is(u,t)&&console.error([`MUI: A component is changing the default ${r} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
305
305
  `))},[JSON.stringify(t)])}const c=C.useCallback(u=>{o||a(u)},[]);return[l,c]}function Ee(e){const t=C.useRef(e);return ur(()=>{t.current=e}),C.useRef((...n)=>(0,t.current)(...n)).current}function mn(...e){const t=C.useRef(void 0),n=C.useCallback(r=>{const o=e.map(i=>{if(i==null)return null;if(typeof i=="function"){const a=i,l=a(r);return typeof l=="function"?l:()=>{a(null)}}return i.current=r,()=>{i.current=null}});return()=>{o.forEach(i=>i==null?void 0:i())}},e);return C.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}const Qv={};function I6(e,t){const n=C.useRef(Qv);return n.current===Qv&&(n.current=e(t)),n}const A6=[];function N6(e){C.useEffect(e,A6)}class $f{constructor(){Wc(this,"currentId",null);Wc(this,"clear",()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)});Wc(this,"disposeEffect",()=>this.clear)}static create(){return new $f}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}function Ss(){const e=I6($f.create).current;return N6(e.disposeEffect),e}const j6={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function Nt(e,t,n=void 0){const r={};for(const o in e){const i=e[o];let a="",l=!0;for(let c=0;c<i.length;c+=1){const u=i[c];u&&(a+=(l===!0?"":" ")+t(u),l=!1,n&&n[u]&&(a+=" "+n[u]))}r[o]=a}return r}const e2=e=>e,F6=(()=>{let e=e2;return{configure(t){e=t},generate(t){return e(t)},reset(){e=e2}}})(),_6={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Wt(e,t,n="Mui"){const r=_6[t];return r?`${n}-${r}`:`${F6.generate(e)}-${t}`}function zt(e,t,n="Mui"){const r={};return t.forEach(o=>{r[o]=Wt(e,o,n)}),r}function $6(e){return typeof e=="string"}function B6(e,t,n){return e===void 0||$6(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function L6(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function t2(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function V6(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=e;if(!t){const h=pe(n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),y={...n==null?void 0:n.style,...o==null?void 0:o.style,...r==null?void 0:r.style},m={...n,...o,...r};return h.length>0&&(m.className=h),Object.keys(y).length>0&&(m.style=y),{props:m,internalRef:void 0}}const a=L6({...o,...r}),l=t2(r),c=t2(o),u=t(a),d=pe(u==null?void 0:u.className,n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),f={...u==null?void 0:u.style,...n==null?void 0:n.style,...o==null?void 0:o.style,...r==null?void 0:r.style},p={...u,...n,...c,...l};return d.length>0&&(p.className=d),Object.keys(f).length>0&&(p.style=f),{props:p,internalRef:u.ref}}function Qi(e,t,n){return typeof e=="function"?e(t,n):e}function ht(e){var f;const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:o=!1,...i}=e,a=o?{}:Qi(n,r),{props:l,internalRef:c}=V6({...i,externalSlotProps:a}),u=mn(c,a==null?void 0:a.ref,(f=e.additionalProps)==null?void 0:f.ref);return B6(t,{...l,ref:u},r)}const ea=(e,t)=>e.length!==t.length?!1:t.every(n=>e.includes(n)),W6=({openTo:e,defaultOpenTo:t,views:n,defaultViews:r})=>{const o=n??r;let i;if(e!=null)i=e;else if(o.includes(t))i=t;else if(o.length>0)i=o[0];else throw new Error("MUI X: The `views` prop must contain at least one view.");return{views:o,openTo:i}},cc=(e,t,n)=>{let r=t;return r=e.setHours(r,e.getHours(n)),r=e.setMinutes(r,e.getMinutes(n)),r=e.setSeconds(r,e.getSeconds(n)),r=e.setMilliseconds(r,e.getMilliseconds(n)),r},ta=({date:e,disableFuture:t,disablePast:n,maxDate:r,minDate:o,isDateDisabled:i,utils:a,timezone:l})=>{const c=cc(a,a.date(void 0,l),e);n&&a.isBefore(o,c)&&(o=c),t&&a.isAfter(r,c)&&(r=c);let u=e,d=e;for(a.isBefore(e,o)&&(u=o,d=null),a.isAfter(e,r)&&(d&&(d=r),u=null);u||d;){if(u&&a.isAfter(u,r)&&(u=null),d&&a.isBefore(d,o)&&(d=null),u){if(!i(u))return u;u=a.addDays(u,1)}if(d){if(!i(d))return d;d=a.addDays(d,-1)}}return null},z6=(e,t)=>e.isValid(t)?t:null,n2=(e,t,n)=>t==null||!e.isValid(t)?n:t,U6=(e,t,n)=>!e.isValid(t)&&t!=null&&!e.isValid(n)&&n!=null?!0:e.isEqual(t,n),Bf=(e,t)=>{const r=[e.startOfYear(t)];for(;r.length<12;){const o=r[r.length-1];r.push(e.addMonths(o,1))}return r},r2=(e,t,n)=>n==="date"?e.startOfDay(e.date(void 0,t)):e.date(void 0,t),H6=["year","month","day"],o2=e=>H6.includes(e),Lf=(e,{format:t,views:n},r)=>{if(t!=null)return t;const o=e.formats;return ea(n,["year"])?o.year:ea(n,["month"])?o.month:ea(n,["day"])?o.dayOfMonth:ea(n,["month","year"])?`${o.month} ${o.year}`:ea(n,["day","month"])?`${o.month} ${o.dayOfMonth}`:r?/en/.test(e.getCurrentLocaleCode())?o.normalDateWithWeekday:o.normalDate:o.keyboardDate},q6=(e,t)=>{const n=e.startOfWeek(t);return[0,1,2,3,4,5,6].map(r=>e.addDays(n,r))},Y6=["hours","minutes","seconds"],G6=e=>Y6.includes(e),s2=(e,t)=>t.getHours(e)*3600+t.getMinutes(e)*60+t.getSeconds(e),K6=(e,t)=>(n,r)=>e?t.isAfter(n,r):s2(n,t)>s2(r,t),dr={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},X6=e=>Math.max(...e.map(t=>dr[t.type]??1)),na=(e,t,n)=>{if(t===dr.year)return e.startOfYear(n);if(t===dr.month)return e.startOfMonth(n);if(t===dr.day)return e.startOfDay(n);let r=n;return t<dr.minutes&&(r=e.setMinutes(r,0)),t<dr.seconds&&(r=e.setSeconds(r,0)),t<dr.milliseconds&&(r=e.setMilliseconds(r,0)),r},Z6=({props:e,utils:t,granularity:n,timezone:r,getTodayDate:o})=>{let i=o?o():na(t,n,r2(t,r));e.minDate!=null&&t.isAfterDay(e.minDate,i)&&(i=na(t,n,e.minDate)),e.maxDate!=null&&t.isBeforeDay(e.maxDate,i)&&(i=na(t,n,e.maxDate));const a=K6(e.disableIgnoringDatePartForTimeValidation??!1,t);return e.minTime!=null&&a(e.minTime,i)&&(i=na(t,n,e.disableIgnoringDatePartForTimeValidation?e.minTime:cc(t,i,e.minTime))),e.maxTime!=null&&a(i,e.maxTime)&&(i=na(t,n,e.disableIgnoringDatePartForTimeValidation?e.maxTime:cc(t,i,e.maxTime))),i},Vf=(e,t)=>{const n=e.formatTokenMap[t];if(n==null)throw new Error([`MUI X: The token "${t}" is not supported by the Date and Time Pickers.`,"Please try using another token or open an issue on https://github.com/mui/mui-x/issues/new/choose if you think it should be supported."].join(`