react-markdown-typewriter 1.1.2 → 1.1.3
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/components/MarkdownTypewriter.js +1 -1
- package/dist/components/MarkdownTypewriter.mjs +1 -1
- package/dist/components/MarkdownTypewriterAsync.js +1 -1
- package/dist/components/MarkdownTypewriterAsync.mjs +1 -1
- package/dist/components/MarkdownTypewriterHooks.js +1 -1
- package/dist/components/MarkdownTypewriterHooks.mjs +1 -1
- package/dist/components/TypewriterItem.js +1 -1
- package/dist/components/TypewriterItem.mjs +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/index.mjs +1 -1
- package/dist/functions/markdownComponents.js +1 -1
- package/dist/functions/markdownComponents.mjs +1 -1
- package/dist/functions/typewriterHook.js +1 -1
- package/dist/functions/typewriterHook.mjs +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import {createContext,useRef,useContext,forwardRef,useMemo,useInsertionEffect,useLayoutEffect,useEffect,useCallback,Fragment,createElement,useId,Component}from'react';import {jsx,jsxs}from'react/jsx-runtime';var Ra=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var Fe=createContext({});function ni(t){let e=useRef(null);return e.current===null&&(e.current=t()),e.current}var Kt=typeof window<"u";var si=Kt?useLayoutEffect:useEffect;var Gt=createContext(null);var Oe=createContext({transformPagePoint:t=>t,isStatic:false,reducedMotion:"never"});function ai(t=true){let e=useContext(Gt);if(e===null)return [true,null];let{isPresent:r,onExitComplete:o,register:i}=e,s=useId();useEffect(()=>{if(t)return i(s)},[t]);let n=useCallback(()=>t&&o&&o(s),[s,o,t]);return !r&&o?[false,n]:[true]}var Te=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function li(t,e){let r=new Set,o=new Set,i=false,s=false,n=new WeakSet,a={delta:0,timestamp:0,isProcessing:false};function u(c){n.has(c)&&(m.schedule(c),t()),c(a);}let m={schedule:(c,f=false,p=false)=>{let y=p&&i?r:o;return f&&n.add(c),y.has(c)||y.add(c),c},cancel:c=>{o.delete(c),n.delete(c);},process:c=>{if(a=c,i){s=true;return}i=true,[r,o]=[o,r],r.forEach(u),r.clear(),i=false,s&&(s=false,m.process(c));}};return m}var G={};var Ga=40;function ke(t,e){let r=false,o=true,i={delta:0,timestamp:0,isProcessing:false},s=()=>r=true,n=Te.reduce((d,A)=>(d[A]=li(s),d),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:m,update:c,preRender:f,render:p,postRender:h}=n,y=()=>{let d=G.useManualTiming?i.timestamp:performance.now();r=false,G.useManualTiming||(i.delta=o?1e3/60:Math.max(Math.min(d-i.timestamp,Ga),1)),i.timestamp=d,i.isProcessing=true,a.process(i),l.process(i),u.process(i),m.process(i),c.process(i),f.process(i),p.process(i),h.process(i),i.isProcessing=false,r&&e&&(o=false,t(y));},v=()=>{r=true,o=true,i.isProcessing||t(y);};return {schedule:Te.reduce((d,A)=>{let T=n[A];return d[A]=(M,F=false,b=false)=>(r||v(),T.schedule(M,F,b)),d},{}),cancel:d=>{for(let A=0;A<Te.length;A++)n[Te[A]].cancel(d);},state:i,steps:n}}var E=t=>t;var{schedule:V,cancel:Y,state:R,steps:Ie}=ke(typeof requestAnimationFrame<"u"?requestAnimationFrame:E,true);var je=createContext({strict:false});var mi={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"]},at={};for(let t in mi)at[t]={isEnabled:e=>mi[t].some(r=>!!e[r])};function ui(t){for(let e in t)at[e]={...at[e],...t[e]};}var $a=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 Se(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||$a.has(t)}var ci=t=>!Se(t);function za(t){t&&(ci=e=>e.startsWith("on")?!Se(e):t(e));}try{za(Ra("@emotion/is-prop-valid").default);}catch{}function fi(t,e,r){let o={};for(let i in t)i==="values"&&typeof t.values=="object"||(ci(i)||r===true&&Se(i)||!e&&!Se(i)||t.draggable&&i.startsWith("onDrag"))&&(o[i]=t[i]);return o}var pi=new Set;function Wt(t,e,r){t||pi.has(e)||(console.warn(e),pi.add(e));}function hi(t){if(typeof Proxy>"u")return t;let e=new Map,r=(...o)=>(process.env.NODE_ENV!=="production"&&Wt(false,"motion() is deprecated. Use motion.create() instead."),t(...o));return new Proxy(r,{get:(o,i)=>i==="create"?t:(e.has(i)||e.set(i,t(i)),e.get(i))})}var yt=createContext({});function xt(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function lt(t){return typeof t=="string"||Array.isArray(t)}var Ne=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ve=["initial",...Ne];function Dt(t){return xt(t.animate)||Ve.some(e=>lt(t[e]))}function Ue(t){return !!(Dt(t)||t.variants)}function di(t,e){if(Dt(t)){let{initial:r,animate:o}=t;return {initial:r===false||lt(r)?r:void 0,animate:lt(o)?o:void 0}}return t.inherit!==false?e:{}}function yi(t){let{initial:e,animate:r}=di(t,useContext(yt));return useMemo(()=>({initial:e,animate:r}),[gi(e),gi(r)])}function gi(t){return Array.isArray(t)?t.join(" "):t}var xi=Symbol.for("motionComponentSymbol");function mt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function vi(t,e,r){return useCallback(o=>{o&&t.onMount&&t.onMount(o),e&&(o?e.mount(o):e.unmount()),r&&(typeof r=="function"?r(o):mt(r)&&(r.current=o));},[e])}var $t=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase();var qa="framerAppearId",Ke="data-"+$t(qa);var Ge=createContext({});var{schedule:zt}=ke(queueMicrotask,false);function Ti(t,e,r,o,i){let{visualElement:s}=useContext(yt),n=useContext(je),a=useContext(Gt),l=useContext(Oe).reducedMotion,u=useRef(null);o=o||n.renderer,!u.current&&o&&(u.current=o(t,{visualState:e,parent:s,props:r,presenceContext:a,blockInitialAnimation:a?a.initial===false:false,reducedMotionConfig:l}));let m=u.current,c=useContext(Ge);m&&!m.projection&&i&&(m.type==="html"||m.type==="svg")&&tl(u.current,r,i,c);let f=useRef(false);useInsertionEffect(()=>{m&&f.current&&m.update(r,a);});let p=r[Ke],h=useRef(!!p&&!window.MotionHandoffIsComplete?.(p)&&window.MotionHasOptimisedAnimation?.(p));return si(()=>{m&&(f.current=true,window.MotionIsMounted=true,m.updateFeatures(),zt.render(m.render),h.current&&m.animationState&&m.animationState.animateChanges());}),useEffect(()=>{m&&(!h.current&&m.animationState&&m.animationState.animateChanges(),h.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(p);}),h.current=false));}),m}function tl(t,e,r,o){let{layoutId:i,layout:s,drag:n,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:m}=e;t.projection=new r(t.latestValues,e["data-framer-portal-id"]?void 0:Si(t.parent)),t.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!n||a&&mt(a),visualElement:t,animationType:typeof s=="string"?s:"both",initialPromotionConfig:o,crossfade:m,layoutScroll:l,layoutRoot:u});}function Si(t){if(t)return t.options.allowProjection!==false?t.projection:Si(t.parent)}var Q=()=>{},N=()=>{};process.env.NODE_ENV!=="production"&&(Q=(t,e)=>{!t&&typeof console<"u"&&console.warn(e);},N=(t,e)=>{if(!t)throw new Error(e)});function Vi({preloadedFeatures:t,createVisualElement:e,useRender:r,useVisualState:o,Component:i}){t&&ui(t);function s(a,l){let u,m={...useContext(Oe),...a,layoutId:il(a)},{isStatic:c}=m,f=yi(a),p=o(a,c);if(!c&&Kt){nl(m,t);let h=sl(m);u=h.MeasureLayout,f.visualElement=Ti(i,p,m,e,h.ProjectionNode);}return jsxs(yt.Provider,{value:f,children:[u&&f.visualElement?jsx(u,{visualElement:f.visualElement,...m}):null,r(i,a,vi(p,f.visualElement,l),p,c,f.visualElement)]})}s.displayName=`motion.${typeof i=="string"?i:`create(${i.displayName??i.name??""})`}`;let n=forwardRef(s);return n[xi]=i,n}function il({layoutId:t}){let e=useContext(Fe).id;return e&&t!==void 0?e+"-"+t:t}function nl(t,e){let r=useContext(je).strict;if(process.env.NODE_ENV!=="production"&&e&&r){let o="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?Q(false,o):N(false,o);}}function sl(t){let{drag:e,layout:r}=at;if(!e&&!r)return {};let o={...e,...r};return {MeasureLayout:e?.isEnabled(t)||r?.isEnabled(t)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}var bi=t=>e=>typeof e=="string"&&e.startsWith(t),Ht=bi("--"),al=bi("var(--"),_t=t=>al(t)?ll.test(t.split("/*")[0].trim()):false,ll=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;var Et={};function Pi(t){for(let e in t)Et[e]=t[e],Ht(e)&&(Et[e].isCSSVariable=true);}var tt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Z=new Set(tt);function We(t,{layout:e,layoutId:r}){return Z.has(t)||t.startsWith("origin")||(e||r!==void 0)&&(!!Et[t]||t==="opacity")}var w=t=>!!(t&&t.getVelocity);var $e=(t,e)=>e&&typeof t=="number"?e.transform(t):t;var j=(t,e,r)=>r>e?e:r<t?t:r;var et={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},ut={...et,transform:t=>j(0,1,t)},Pe={...et,default:1};var mo={...et,transform:Math.round};var Ae=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),rt=Ae("deg"),W=Ae("%"),x=Ae("px"),Ai=Ae("vh"),Mi=Ae("vw"),uo={...W,parse:t=>W.parse(t)/100,transform:t=>W.transform(t*100)};var wi={rotate:rt,rotateX:rt,rotateY:rt,rotateZ:rt,scale:Pe,scaleX:Pe,scaleY:Pe,scaleZ:Pe,skew:rt,skewX:rt,skewY:rt,distance:x,translateX:x,translateY:x,translateZ:x,x,y:x,z:x,perspective:x,transformPerspective:x,opacity:ut,originX:uo,originY:uo,originZ:x};var Yt={borderWidth:x,borderTopWidth:x,borderRightWidth:x,borderBottomWidth:x,borderLeftWidth:x,borderRadius:x,radius:x,borderTopLeftRadius:x,borderTopRightRadius:x,borderBottomRightRadius:x,borderBottomLeftRadius:x,width:x,maxWidth:x,height:x,maxHeight:x,top:x,right:x,bottom:x,left:x,padding:x,paddingTop:x,paddingRight:x,paddingBottom:x,paddingLeft:x,margin:x,marginTop:x,marginRight:x,marginBottom:x,marginLeft:x,backgroundPositionX:x,backgroundPositionY:x,...wi,zIndex:mo,fillOpacity:ut,strokeOpacity:ut,numOctaves:mo};var ml={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ul=tt.length;function Ci(t,e,r){let o="",i=true;for(let s=0;s<ul;s++){let n=tt[s],a=t[n];if(a===void 0)continue;let l=true;if(typeof a=="number"?l=a===(n.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||r){let u=$e(a,Yt[n]);if(!l){i=false;let m=ml[n]||n;o+=`${m}(${u}) `;}r&&(e[n]=u);}}return o=o.trim(),r?o=r(e,i?"":o):i&&(o="none"),o}function Xt(t,e,r){let{style:o,vars:i,transformOrigin:s}=t,n=false,a=false;for(let l in e){let u=e[l];if(Z.has(l)){n=true;continue}else if(Ht(l)){i[l]=u;continue}else {let m=$e(u,Yt[l]);l.startsWith("origin")?(a=true,s[l]=m):o[l]=m;}}if(e.transform||(n||r?o.transform=Ci(e,t.transform,r):o.transform&&(o.transform="none")),a){let{originX:l="50%",originY:u="50%",originZ:m=0}=s;o.transformOrigin=`${l} ${u} ${m}`;}}var qt=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function co(t,e,r){for(let o in e)!w(e[o])&&!We(o,r)&&(t[o]=e[o]);}function fl({transformTemplate:t},e){return useMemo(()=>{let r=qt();return Xt(r,e,t),Object.assign({},r.vars,r.style)},[e])}function pl(t,e){let r=t.style||{},o={};return co(o,r,t),Object.assign(o,fl(t,e)),o}function Di(t,e){let r={},o=pl(t,e);return t.drag&&t.dragListener!==false&&(r.draggable=false,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=t.drag===true?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(r.tabIndex=0),r.style=o,r}var Ei=["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 Zt(t){return typeof t!="string"||t.includes("-")?false:!!(Ei.indexOf(t)>-1||/[A-Z]/u.test(t))}var hl={offset:"stroke-dashoffset",array:"stroke-dasharray"},dl={offset:"strokeDashoffset",array:"strokeDasharray"};function Ri(t,e,r=1,o=0,i=true){t.pathLength=1;let s=i?hl:dl;t[s.offset]=x.transform(-o);let n=x.transform(e),a=x.transform(r);t[s.array]=`${n} ${a}`;}function ze(t,{attrX:e,attrY:r,attrScale:o,pathLength:i,pathSpacing:s=1,pathOffset:n=0,...a},l,u,m){if(Xt(t,a,u),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};let{attrs:c,style:f}=t;c.transform&&(f.transform=c.transform,delete c.transform),(f.transform||c.transformOrigin)&&(f.transformOrigin=c.transformOrigin??"50% 50%",delete c.transformOrigin),f.transform&&(f.transformBox=m?.transformBox??"fill-box",delete c.transformBox),e!==void 0&&(c.x=e),r!==void 0&&(c.y=r),o!==void 0&&(c.scale=o),i!==void 0&&Ri(c,i,s,n,false);}var He=()=>({...qt(),attrs:{}});var _e=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Li(t,e,r,o){let i=useMemo(()=>{let s=He();return ze(s,e,_e(o),t.transformTemplate,t.style),{...s.attrs,style:{...s.style}}},[e]);if(t.style){let s={};co(s,t.style,t),i.style={...s,...i.style};}return i}function Bi(t=false){return (r,o,i,{latestValues:s},n)=>{let l=(Zt(r)?Li:Di)(o,s,n,r),u=fi(o,typeof r=="string",t),m=r!==Fragment?{...u,...l,ref:i}:{},{children:c}=o,f=useMemo(()=>w(c)?c.get():c,[c]);return createElement(r,{...m,children:f})}}function Fi(t){let e=[{},{}];return t?.values.forEach((r,o)=>{e[0][o]=r.get(),e[1][o]=r.getVelocity();}),e}function Jt(t,e,r,o){if(typeof e=="function"){let[i,s]=Fi(o);e=e(r!==void 0?r:t.custom,i,s);}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){let[i,s]=Fi(o);e=e(r!==void 0?r:t.custom,i,s);}return e}function Qt(t){return w(t)?t.get():t}function Tl({scrapeMotionValuesFromProps:t,createRenderState:e},r,o,i){return {latestValues:Sl(r,o,i,t),renderState:e()}}var Ye=t=>(e,r)=>{let o=useContext(yt),i=useContext(Gt),s=()=>Tl(t,e,o,i);return r?s():ni(s)};function Sl(t,e,r,o){let i={},s=o(t,{});for(let f in s)i[f]=Qt(s[f]);let{initial:n,animate:a}=t,l=Dt(t),u=Ue(t);e&&u&&!l&&t.inherit!==false&&(n===void 0&&(n=e.initial),a===void 0&&(a=e.animate));let m=r?r.initial===false:false;m=m||n===false;let c=m?a:n;if(c&&typeof c!="boolean"&&!xt(c)){let f=Array.isArray(c)?c:[c];for(let p=0;p<f.length;p++){let h=Jt(t,f[p]);if(h){let{transitionEnd:y,transition:v,...g}=h;for(let S in g){let d=g[S];if(Array.isArray(d)){let A=m?d.length-1:0;d=d[A];}d!==null&&(i[S]=d);}for(let S in y)i[S]=y[S];}}}return i}function te(t,e,r){let{style:o}=t,i={};for(let s in o)(w(o[s])||e.style&&w(e.style[s])||We(s,t)||r?.getValue(s)?.liveStyle!==void 0)&&(i[s]=o[s]);return i}var ki={useVisualState:Ye({scrapeMotionValuesFromProps:te,createRenderState:qt})};function Xe(t,e,r){let o=te(t,e,r);for(let i in t)if(w(t[i])||w(e[i])){let s=tt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;o[s]=t[i];}return o}var Ii={useVisualState:Ye({scrapeMotionValuesFromProps:Xe,createRenderState:He})};function ji(t,e){return function(o,{forwardMotionProps:i}={forwardMotionProps:false}){let n={...Zt(o)?Ii:ki,preloadedFeatures:t,useRender:Bi(i),createVisualElement:e,Component:o};return Vi(n)}}function ct(t,e,r){let o=t.getProps();return Jt(o,e,r!==void 0?r:o.custom,t)}var Me=t=>Array.isArray(t);var qe;function Vl(){qe=void 0;}var L={now:()=>(qe===void 0&&L.set(R.isProcessing||G.useManualTiming?R.timestamp:performance.now()),qe),set:t=>{qe=t,queueMicrotask(Vl);}};function ee(t,e){t.indexOf(e)===-1&&t.push(e);}function re(t,e){let r=t.indexOf(e);r>-1&&t.splice(r,1);}var vt=class{constructor(){this.subscriptions=[];}add(e){return ee(this.subscriptions,e),()=>re(this.subscriptions,e)}notify(e,r,o){let i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,r,o);else for(let s=0;s<i;s++){let n=this.subscriptions[s];n&&n(e,r,o);}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0;}};function Ze(t,e){return e?t*(1e3/e):0}var Ni=30,bl=t=>!isNaN(parseFloat(t)),fo=class{constructor(e,r={}){this.version="__VERSION__",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(o,i=true)=>{let s=L.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&this.events.change?.notify(this.current),i&&this.events.renderRequest?.notify(this.current);},this.hasAnimated=false,this.setCurrent(e),this.owner=r.owner;}setCurrent(e){this.current=e,this.updatedAt=L.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=bl(this.current));}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt;}onChange(e){return process.env.NODE_ENV!=="production"&&Wt(false,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,r){this.events[e]||(this.events[e]=new vt);let o=this.events[e].add(r);return e==="change"?()=>{o(),V.read(()=>{this.events.change.getSize()||this.stop();});}:o}clearListeners(){for(let e in this.events)this.events[e].clear();}attach(e,r){this.passiveEffect=e,this.stopPassiveEffect=r;}set(e,r=true){!r||!this.passiveEffect?this.updateAndNotify(e,r):this.passiveEffect(e,this.updateAndNotify);}setWithVelocity(e,r,o){this.set(r),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-o;}jump(e,r=true){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect();}get(){return this.current}getPrevious(){return this.prev}getVelocity(){let e=L.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Ni)return 0;let r=Math.min(this.updatedAt-this.prevUpdatedAt,Ni);return Ze(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(e){return this.stop(),new Promise(r=>{this.hasAnimated=true,this.animation=e(r),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.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect();}};function ft(t,e){return new fo(t,e)}function Pl(t,e,r){t.hasValue(e)?t.getValue(e).set(r):t.addValue(e,ft(r));}function Al(t){return Me(t)?t[t.length-1]||0:t}function Ki(t,e){let r=ct(t,e),{transitionEnd:o={},transition:i={},...s}=r||{};s={...s,...o};for(let n in s){let a=Al(s[n]);Pl(t,n,a);}}function Gi(t){return !!(w(t)&&t.add)}function we(t,e){let r=t.getValue("willChange");if(Gi(r))return r.add(e);if(!r&&G.WillChange){let o=new G.WillChange("auto");t.addValue("willChange",o),o.add(e);}}function Je(t){return t.props[Ke]}var Ml=t=>t!==null;function Wi(t,{repeat:e,repeatType:r="loop"},o){let i=t.filter(Ml),s=e&&r!=="loop"&&e%2===1?0:i.length-1;return !s||o===void 0?i[s]:o}var wl={type:"spring",stiffness:500,damping:25,restSpeed:10},Cl=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Dl={type:"keyframes",duration:.8},El={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},$i=(t,{keyframes:e})=>e.length>2?Dl:Z.has(t)?t.startsWith("scale")?Cl(e[1]):wl:El;function zi({when:t,delay:e,delayChildren:r,staggerChildren:o,staggerDirection:i,repeat:s,repeatType:n,repeatDelay:a,from:l,elapsed:u,...m}){return !!Object.keys(m).length}function oe(t,e){return t?.[e]??t?.default??t}var k=t=>t*1e3,U=t=>t/1e3;var Tt=t=>Math.round(t*1e5)/1e5;var ie=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Hi(t){return t==null}var _i=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;var ne=(t,e)=>r=>!!(typeof r=="string"&&_i.test(r)&&r.startsWith(t)||e&&!Hi(r)&&Object.prototype.hasOwnProperty.call(r,e)),Qe=(t,e,r)=>o=>{if(typeof o!="string")return o;let[i,s,n,a]=o.match(ie);return {[t]:parseFloat(i),[e]:parseFloat(s),[r]:parseFloat(n),alpha:a!==void 0?parseFloat(a):1}};var Rl=t=>j(0,255,t),po={...et,transform:t=>Math.round(Rl(t))},it={test:ne("rgb","red"),parse:Qe("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:o=1})=>"rgba("+po.transform(t)+", "+po.transform(e)+", "+po.transform(r)+", "+Tt(ut.transform(o))+")"};function Ll(t){let e="",r="",o="",i="";return t.length>5?(e=t.substring(1,3),r=t.substring(3,5),o=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),r=t.substring(2,3),o=t.substring(3,4),i=t.substring(4,5),e+=e,r+=r,o+=o,i+=i),{red:parseInt(e,16),green:parseInt(r,16),blue:parseInt(o,16),alpha:i?parseInt(i,16)/255:1}}var Ce={test:ne("#"),parse:Ll,transform:it.transform};var St={test:ne("hsl","hue"),parse:Qe("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:o=1})=>"hsla("+Math.round(t)+", "+W.transform(Tt(e))+", "+W.transform(Tt(r))+", "+Tt(ut.transform(o))+")"};var B={test:t=>it.test(t)||Ce.test(t)||St.test(t),parse:t=>it.test(t)?it.parse(t):St.test(t)?St.parse(t):Ce.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?it.transform(t):St.transform(t)};var Yi=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Bl(t){return isNaN(t)&&typeof t=="string"&&(t.match(ie)?.length||0)+(t.match(Yi)?.length||0)>0}var qi="number",Zi="color",Fl="var",Ol="var(",Xi="${}",kl=/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 Rt(t){let e=t.toString(),r=[],o={color:[],number:[],var:[]},i=[],s=0,a=e.replace(kl,l=>(B.test(l)?(o.color.push(s),i.push(Zi),r.push(B.parse(l))):l.startsWith(Ol)?(o.var.push(s),i.push(Fl),r.push(l)):(o.number.push(s),i.push(qi),r.push(parseFloat(l))),++s,Xi)).split(Xi);return {values:r,split:a,indexes:o,types:i}}function Ji(t){return Rt(t).values}function Qi(t){let{split:e,types:r}=Rt(t),o=e.length;return i=>{let s="";for(let n=0;n<o;n++)if(s+=e[n],i[n]!==void 0){let a=r[n];a===qi?s+=Tt(i[n]):a===Zi?s+=B.transform(i[n]):s+=i[n];}return s}}var Il=t=>typeof t=="number"?0:t;function jl(t){let e=Ji(t);return Qi(t)(e.map(Il))}var $={test:Bl,parse:Ji,createTransformer:Qi,getAnimatableNone:jl};function ho(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function tn({hue:t,saturation:e,lightness:r,alpha:o}){t/=360,e/=100,r/=100;let i=0,s=0,n=0;if(!e)i=s=n=r;else {let a=r<.5?r*(1+e):r+e-r*e,l=2*r-a;i=ho(l,a,t+1/3),s=ho(l,a,t),n=ho(l,a,t-1/3);}return {red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(n*255),alpha:o}}function se(t,e){return r=>r>0?e:t}var P=(t,e,r)=>t+(e-t)*r;var go=(t,e,r)=>{let o=t*t,i=r*(e*e-o)+o;return i<0?0:Math.sqrt(i)},Nl=[Ce,it,St],Ul=t=>Nl.find(e=>e.test(t));function en(t){let e=Ul(t);if(Q(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`),!e)return false;let r=e.parse(t);return e===St&&(r=tn(r)),r}var yo=(t,e)=>{let r=en(t),o=en(e);if(!r||!o)return se(t,e);let i={...r};return s=>(i.red=go(r.red,o.red,s),i.green=go(r.green,o.green,s),i.blue=go(r.blue,o.blue,s),i.alpha=P(r.alpha,o.alpha,s),it.transform(i))};var tr=new Set(["none","hidden"]);function rn(t,e){return tr.has(t)?r=>r<=0?t:e:r=>r>=1?e:t}var Kl=(t,e)=>r=>e(t(r)),nt=(...t)=>t.reduce(Kl);function Gl(t,e){return r=>P(t,e,r)}function er(t){return typeof t=="number"?Gl:typeof t=="string"?_t(t)?se:B.test(t)?yo:zl:Array.isArray(t)?on:typeof t=="object"?B.test(t)?yo:Wl:se}function on(t,e){let r=[...t],o=r.length,i=t.map((s,n)=>er(s)(s,e[n]));return s=>{for(let n=0;n<o;n++)r[n]=i[n](s);return r}}function Wl(t,e){let r={...t,...e},o={};for(let i in r)t[i]!==void 0&&e[i]!==void 0&&(o[i]=er(t[i])(t[i],e[i]));return i=>{for(let s in o)r[s]=o[s](i);return r}}function $l(t,e){let r=[],o={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){let s=e.types[i],n=t.indexes[s][o[s]],a=t.values[n]??0;r[i]=a,o[s]++;}return r}var zl=(t,e)=>{let r=$.createTransformer(e),o=Rt(t),i=Rt(e);return o.indexes.var.length===i.indexes.var.length&&o.indexes.color.length===i.indexes.color.length&&o.indexes.number.length>=i.indexes.number.length?tr.has(t)&&!i.values.length||tr.has(e)&&!o.values.length?rn(t,e):nt(on($l(o,i),i.values),r):(Q(true,`Complex values '${t}' and '${e}' 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.`),se(t,e))};function rr(t,e,r){return typeof t=="number"&&typeof e=="number"&&typeof r=="number"?P(t,e,r):er(t)(t,e)}var nn=t=>{let e=({timestamp:r})=>t(r);return {start:()=>V.update(e,true),stop:()=>Y(e),now:()=>R.isProcessing?R.timestamp:L.now()}};var or=(t,e,r=10)=>{let o="",i=Math.max(Math.round(e/r),2);for(let s=0;s<i;s++)o+=t(s/(i-1))+", ";return `linear(${o.substring(0,o.length-2)})`};function ae(t){let e=0,r=50,o=t.next(e);for(;!o.done&&e<2e4;)e+=r,o=t.next(e);return e>=2e4?1/0:e}function sn(t,e=100,r){let o=r({...t,keyframes:[0,e]}),i=Math.min(ae(o),2e4);return {type:"keyframes",ease:s=>o.next(i*s).value/e,duration:U(i)}}var Hl=5;function ir(t,e,r){let o=Math.max(e-Hl,0);return Ze(r-t(o),e-o)}var C={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};var vo=.001;function an({duration:t=C.duration,bounce:e=C.bounce,velocity:r=C.velocity,mass:o=C.mass}){let i,s;Q(t<=k(C.maxDuration),"Spring duration must be 10 seconds or less");let n=1-e;n=j(C.minDamping,C.maxDamping,n),t=j(C.minDuration,C.maxDuration,U(t)),n<1?(i=u=>{let m=u*n,c=m*t,f=m-r,p=nr(u,n),h=Math.exp(-c);return vo-f/p*h},s=u=>{let c=u*n*t,f=c*r+r,p=Math.pow(n,2)*Math.pow(u,2)*t,h=Math.exp(-c),y=nr(Math.pow(u,2),n);return (-i(u)+vo>0?-1:1)*((f-p)*h)/y}):(i=u=>{let m=Math.exp(-u*t),c=(u-r)*t+1;return -1e-3+m*c},s=u=>{let m=Math.exp(-u*t),c=(r-u)*(t*t);return m*c});let a=5/t,l=Yl(i,s,a);if(t=k(t),isNaN(l))return {stiffness:C.stiffness,damping:C.damping,duration:t};{let u=Math.pow(l,2)*o;return {stiffness:u,damping:n*2*Math.sqrt(o*u),duration:t}}}var _l=12;function Yl(t,e,r){let o=r;for(let i=1;i<_l;i++)o=o-t(o)/e(o);return o}function nr(t,e){return t*Math.sqrt(1-e*e)}var Xl=["duration","bounce"],ql=["stiffness","damping","mass"];function ln(t,e){return e.some(r=>t[r]!==void 0)}function Zl(t){let e={velocity:C.velocity,stiffness:C.stiffness,damping:C.damping,mass:C.mass,isResolvedFromDuration:false,...t};if(!ln(t,ql)&&ln(t,Xl))if(t.visualDuration){let r=t.visualDuration,o=2*Math.PI/(r*1.2),i=o*o,s=2*j(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:C.mass,stiffness:i,damping:s};}else {let r=an(t);e={...e,...r,mass:C.mass},e.isResolvedFromDuration=true;}return e}function le(t=C.visualDuration,e=C.bounce){let r=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t,{restSpeed:o,restDelta:i}=r,s=r.keyframes[0],n=r.keyframes[r.keyframes.length-1],a={done:false,value:s},{stiffness:l,damping:u,mass:m,duration:c,velocity:f,isResolvedFromDuration:p}=Zl({...r,velocity:-U(r.velocity||0)}),h=f||0,y=u/(2*Math.sqrt(l*m)),v=n-s,g=U(Math.sqrt(l/m)),S=Math.abs(v)<5;o||(o=S?C.restSpeed.granular:C.restSpeed.default),i||(i=S?C.restDelta.granular:C.restDelta.default);let d;if(y<1){let T=nr(g,y);d=M=>{let F=Math.exp(-y*g*M);return n-F*((h+y*g*v)/T*Math.sin(T*M)+v*Math.cos(T*M))};}else if(y===1)d=T=>n-Math.exp(-g*T)*(v+(h+g*v)*T);else {let T=g*Math.sqrt(y*y-1);d=M=>{let F=Math.exp(-y*g*M),b=Math.min(T*M,300);return n-F*((h+y*g*v)*Math.sinh(b)+T*v*Math.cosh(b))/T};}let A={calculatedDuration:p&&c||null,next:T=>{let M=d(T);if(p)a.done=T>=c;else {let F=T===0?h:0;y<1&&(F=T===0?k(h):ir(d,T,M));let b=Math.abs(F)<=o,z=Math.abs(n-M)<=i;a.done=b&&z;}return a.value=a.done?n:M,a},toString:()=>{let T=Math.min(ae(A),2e4),M=or(F=>A.next(T*F).value,T,30);return T+"ms "+M},toTransition:()=>{}};return A}le.applyToOptions=t=>{let e=sn(t,100,le);return t.ease=e.ease,t.duration=k(e.duration),t.type="keyframes",t};function De({keyframes:t,velocity:e=0,power:r=.8,timeConstant:o=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:n,min:a,max:l,restDelta:u=.5,restSpeed:m}){let c=t[0],f={done:false,value:c},p=b=>a!==void 0&&b<a||l!==void 0&&b>l,h=b=>a===void 0?l:l===void 0||Math.abs(a-b)<Math.abs(l-b)?a:l,y=r*e,v=c+y,g=n===void 0?v:n(v);g!==v&&(y=g-c);let S=b=>-y*Math.exp(-b/o),d=b=>g+S(b),A=b=>{let z=S(b),q=d(b);f.done=Math.abs(z)<=u,f.value=f.done?g:q;},T,M,F=b=>{p(f.value)&&(T=b,M=le({keyframes:[f.value,h(f.value)],velocity:ir(d,b,f.value),damping:i,stiffness:s,restDelta:u,restSpeed:m}));};return F(0),{calculatedDuration:null,next:b=>{let z=false;return !M&&T===void 0&&(z=true,A(b),F(b)),T!==void 0&&b>=T?M.next(b-T):(!z&&A(b),f)}}}var pt=(t,e,r)=>{let o=e-t;return o===0?1:(r-t)/o};function Jl(t,e,r){let o=[],i=r||G.mix||rr,s=t.length-1;for(let n=0;n<s;n++){let a=i(t[n],t[n+1]);if(e){let l=Array.isArray(e)?e[n]||E:e;a=nt(l,a);}o.push(a);}return o}function mn(t,e,{clamp:r=true,ease:o,mixer:i}={}){let s=t.length;if(N(s===e.length,"Both input and output ranges must be the same length"),s===1)return ()=>e[0];if(s===2&&e[0]===e[1])return ()=>e[1];let n=t[0]===t[1];t[0]>t[s-1]&&(t=[...t].reverse(),e=[...e].reverse());let a=Jl(e,o,i),l=a.length,u=m=>{if(n&&m<t[0])return e[0];let c=0;if(l>1)for(;c<t.length-2&&!(m<t[c+1]);c++);let f=pt(t[c],t[c+1],m);return a[c](f)};return r?m=>u(j(t[0],t[s-1],m)):u}function un(t,e){let r=t[t.length-1];for(let o=1;o<=e;o++){let i=pt(0,e,o);t.push(P(r,1,i));}}function cn(t){let e=[0];return un(e,t.length-1),e}function fn(t,e){return t.map(r=>r*e)}var pn=(t,e,r)=>(((1-3*r+3*e)*t+(3*r-6*e))*t+3*e)*t,Ql=1e-7,tm=12;function em(t,e,r,o,i){let s,n,a=0;do n=e+(r-e)/2,s=pn(n,o,i)-t,s>0?r=n:e=n;while(Math.abs(s)>Ql&&++a<tm);return n}function Vt(t,e,r,o){if(t===e&&r===o)return E;let i=s=>em(s,0,1,t,r);return s=>s===0||s===1?s:pn(i(s),e,o)}var hn=Vt(.42,0,1,1),dn=Vt(0,0,.58,1),sr=Vt(.42,0,.58,1);var gn=t=>Array.isArray(t)&&typeof t[0]!="number";var ar=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2;var lr=t=>e=>1-t(1-e);var To=Vt(.33,1.53,.69,.99),Ee=lr(To),mr=ar(Ee);var ur=t=>(t*=2)<1?.5*Ee(t):.5*(2-Math.pow(2,-10*(t-1)));var cr=t=>1-Math.sin(Math.acos(t)),fr=lr(cr),pr=ar(cr);var hr=t=>Array.isArray(t)&&typeof t[0]=="number";var yn={linear:E,easeIn:hn,easeInOut:sr,easeOut:dn,circIn:cr,circInOut:pr,circOut:fr,backIn:Ee,backInOut:mr,backOut:To,anticipate:ur},rm=t=>typeof t=="string",So=t=>{if(hr(t)){N(t.length===4,"Cubic bezier arrays must contain four numerical values.");let[e,r,o,i]=t;return Vt(e,r,o,i)}else if(rm(t))return N(yn[t]!==void 0,`Invalid easing type '${t}'`),yn[t];return t};function om(t,e){return t.map(()=>e||sr).splice(0,t.length-1)}function bt({duration:t=300,keyframes:e,times:r,ease:o="easeInOut"}){let i=gn(o)?o.map(So):So(o),s={done:false,value:e[0]},n=fn(r&&r.length===e.length?r:cn(e),t),a=mn(n,e,{ease:Array.isArray(i)?i:om(e,i)});return {calculatedDuration:t,next:l=>(s.value=a(l),s.done=l>=t,s)}}var im=t=>t!==null;function me(t,{repeat:e,repeatType:r="loop"},o,i=1){let s=t.filter(im),a=i<0||e&&r!=="loop"&&e%2===1?0:s.length-1;return !a||o===void 0?s[a]:o}var nm={decay:De,inertia:De,tween:bt,keyframes:bt,spring:le};function dr(t){typeof t.type=="string"&&(t.type=nm[t.type]);}var Pt=class{constructor(){this.count=0,this.updateFinished();}get finished(){return this._finished}updateFinished(){this.count++,this._finished=new Promise(e=>{this.resolve=e;});}notifyFinished(){this.resolve();}then(e,r){return this.finished.then(e,r)}};var sm=t=>t/100,ue=class extends Pt{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=false,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{let{motionValue:r}=this.options;if(r&&r.updatedAt!==L.now()&&this.tick(L.now()),this.isStopped=true,this.state==="idle")return;this.teardown();let{onStop:o}=this.options;o&&o();},this.options=e,this.initAnimation(),this.play(),e.autoplay===false&&this.pause();}initAnimation(){let{options:e}=this;dr(e);let{type:r=bt,repeat:o=0,repeatDelay:i=0,repeatType:s,velocity:n=0}=e,{keyframes:a}=e,l=r||bt;process.env.NODE_ENV!=="production"&&l!==bt&&N(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`),l!==bt&&typeof a[0]!="number"&&(this.mixKeyframes=nt(sm,rr(a[0],a[1])),a=[0,100]);let u=l({...e,keyframes:a});s==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-n})),u.calculatedDuration===null&&(u.calculatedDuration=ae(u));let{calculatedDuration:m}=u;this.calculatedDuration=m,this.resolvedDuration=m+i,this.totalDuration=this.resolvedDuration*(o+1)-i,this.generator=u;}updateTime(e){let r=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=r;}tick(e,r=false){let{generator:o,totalDuration:i,mixKeyframes:s,mirroredGenerator:n,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return o.next(0);let{delay:u=0,keyframes:m,repeat:c,repeatType:f,repeatDelay:p,type:h,onUpdate:y,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),r?this.currentTime=e:this.updateTime(e);let g=this.currentTime-u*(this.playbackSpeed>=0?1:-1),S=this.playbackSpeed>=0?g<0:g>i;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let d=this.currentTime,A=o;if(c){let b=Math.min(this.currentTime,i)/a,z=Math.floor(b),q=b%1;!q&&b>=1&&(q=1),q===1&&z--,z=Math.min(z,c+1),!!(z%2)&&(f==="reverse"?(q=1-q,p&&(q-=p/a)):f==="mirror"&&(A=n)),d=j(0,1,q)*a;}let T=S?{done:false,value:m[0]}:A.next(d);s&&(T.value=s(T.value));let{done:M}=T;!S&&l!==null&&(M=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);let F=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&M);return F&&h!==De&&(T.value=me(m,this.options,v,this.speed)),y&&y(T.value),F&&this.finish(),T}then(e,r){return this.finished.then(e,r)}get duration(){return U(this.calculatedDuration)}get time(){return U(this.currentTime)}set time(e){e=k(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed);}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(L.now());let r=this.playbackSpeed!==e;this.playbackSpeed=e,r&&(this.time=U(this.currentTime));}play(){if(this.isStopped)return;let{driver:e=nn,onPlay:r,startTime:o}=this.options;this.driver||(this.driver=e(s=>this.tick(s))),r&&r();let i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=o??i),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start();}pause(){this.state="paused",this.updateTime(L.now()),this.holdTime=this.currentTime;}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null;}finish(){this.teardown(),this.state="finished";let{onComplete:e}=this.options;e&&e();}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown();}teardown(){this.notifyFinished(),this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null;}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0);}sample(e){return this.startTime=0,this.tick(e,true)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),e.observe(this)}};function xn(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1]);}var Lt=t=>t*180/Math.PI,Vo=t=>{let e=Lt(Math.atan2(t[1],t[0]));return bo(e)},am={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Vo,rotateZ:Vo,skewX:t=>Lt(Math.atan(t[1])),skewY:t=>Lt(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},bo=t=>(t=t%360,t<0&&(t+=360),t),vn=Vo,Tn=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Sn=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),lm={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Tn,scaleY:Sn,scale:t=>(Tn(t)+Sn(t))/2,rotateX:t=>bo(Lt(Math.atan2(t[6],t[5]))),rotateY:t=>bo(Lt(Math.atan2(-t[2],t[0]))),rotateZ:vn,rotate:vn,skewX:t=>Lt(Math.atan(t[4])),skewY:t=>Lt(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Vn(t){return t.includes("scale")?1:0}function gr(t,e){if(!t||t==="none")return Vn(e);let r=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),o,i;if(r)o=lm,i=r;else {let a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);o=am,i=a;}if(!i)return Vn(e);let s=o[e],n=i[1].split(",").map(mm);return typeof s=="function"?s(n):n[s]}var bn=(t,e)=>{let{transform:r="none"}=getComputedStyle(t);return gr(r,e)};function mm(t){return parseFloat(t.trim())}var Po=t=>t===et||t===x,um=new Set(["x","y","z"]),cm=tt.filter(t=>!um.has(t));function Pn(t){let e=[];return cm.forEach(r=>{let o=t.getValue(r);o!==void 0&&(e.push([r,o.get()]),o.set(r.startsWith("scale")?1:0));}),e}var At={width:({x:t},{paddingLeft:e="0",paddingRight:r="0"})=>t.max-t.min-parseFloat(e)-parseFloat(r),height:({y:t},{paddingTop:e="0",paddingBottom:r="0"})=>t.max-t.min-parseFloat(e)-parseFloat(r),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>gr(e,"x"),y:(t,{transform:e})=>gr(e,"y")};At.translateX=At.x;At.translateY=At.y;var Bt=new Set,Ao=false,Mo=false,wo=false;function An(){if(Mo){let t=Array.from(Bt).filter(o=>o.needsMeasurement),e=new Set(t.map(o=>o.element)),r=new Map;e.forEach(o=>{let i=Pn(o);i.length&&(r.set(o,i),o.render());}),t.forEach(o=>o.measureInitialState()),e.forEach(o=>{o.render();let i=r.get(o);i&&i.forEach(([s,n])=>{o.getValue(s)?.set(n);});}),t.forEach(o=>o.measureEndState()),t.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY);});}Mo=false,Ao=false,Bt.forEach(t=>t.complete(wo)),Bt.clear();}function Mn(){Bt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Mo=true);});}function wn(){wo=true,Mn(),An(),wo=false;}var Mt=class{constructor(e,r,o,i,s,n=false){this.isComplete=false,this.isAsync=false,this.needsMeasurement=false,this.isScheduled=false,this.unresolvedKeyframes=[...e],this.onComplete=r,this.name=o,this.motionValue=i,this.element=s,this.isAsync=n;}scheduleResolve(){this.isScheduled=true,this.isAsync?(Bt.add(this),Ao||(Ao=true,V.read(Mn),V.resolveKeyframes(An))):(this.readKeyframes(),this.complete());}readKeyframes(){let{unresolvedKeyframes:e,name:r,element:o,motionValue:i}=this;if(e[0]===null){let s=i?.get(),n=e[e.length-1];if(s!==void 0)e[0]=s;else if(o&&r){let a=o.readValue(r,n);a!=null&&(e[0]=a);}e[0]===void 0&&(e[0]=n),i&&s===void 0&&i.set(e[0]);}xn(e);}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=false){this.isComplete=true,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Bt.delete(this);}cancel(){this.isComplete||(this.isScheduled=false,Bt.delete(this));}resume(){this.isComplete||this.scheduleResolve();}};var Cn=t=>t.startsWith("--");function Dn(t,e,r){Cn(e)?t.style.setProperty(e,r):t.style[e]=r;}function ce(t){let e;return ()=>(e===void 0&&(e=t()),e)}var En=ce(()=>window.ScrollTimeline!==void 0);var Rn={};function Ln(t,e){let r=ce(t);return ()=>Rn[e]??r()}var yr=Ln(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"});}catch{return false}return true},"linearEasing");var Ft=([t,e,r,o])=>`cubic-bezier(${t}, ${e}, ${r}, ${o})`;var Co={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ft([0,.65,.55,1]),circOut:Ft([.55,0,1,.45]),backIn:Ft([.31,.01,.66,-0.59]),backOut:Ft([.33,1.53,.69,.99])};function Do(t,e){if(t)return typeof t=="function"?yr()?or(t,e):"ease-out":hr(t)?Ft(t):Array.isArray(t)?t.map(r=>Do(r,e)||Co.easeOut):Co[t]}function Bn(t,e,r,{delay:o=0,duration:i=300,repeat:s=0,repeatType:n="loop",ease:a="easeOut",times:l}={},u=void 0){let m={[e]:r};l&&(m.offset=l);let c=Do(a,i);Array.isArray(c)&&(m.easing=c);let f={delay:o,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:s+1,direction:n==="reverse"?"alternate":"normal"};u&&(f.pseudoElement=u);let p=t.animate(m,f);return p}function xr(t){return typeof t=="function"&&"applyToOptions"in t}function Fn({type:t,...e}){return xr(t)&&yr()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}var vr=class extends Pt{constructor(e){if(super(),this.finishedTime=null,this.isStopped=false,!e)return;let{element:r,name:o,keyframes:i,pseudoElement:s,allowFlatten:n=false,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!s,this.allowFlatten=n,this.options=e,N(typeof e.type!="string",`animateMini doesn't support "type" as a string. Did you mean to import { spring } from "motion"?`);let u=Fn(e);this.animation=Bn(r,o,i,u,s),u.autoplay===false&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){let m=me(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(m):Dn(r,o,m),this.animation.cancel();}l?.(),this.notifyFinished();},this.animation.oncancel=()=>this.notifyFinished();}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished());}pause(){this.animation.pause();}complete(){this.animation.finish?.();}cancel(){try{this.animation.cancel();}catch{}}stop(){if(this.isStopped)return;this.isStopped=true;let{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel());}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.();}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return U(Number(e))}get time(){return U(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=k(e);}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e;}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e;}attachTimeline({timeline:e,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&En()?(this.animation.timeline=e,E):r(this)}};var On={anticipate:ur,backInOut:mr,circInOut:pr};function fm(t){return t in On}function kn(t){typeof t.ease=="string"&&fm(t.ease)&&(t.ease=On[t.ease]);}var In=10,Tr=class extends vr{constructor(e){kn(e),dr(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e;}updateMotionValue(e){let{motionValue:r,onUpdate:o,onComplete:i,element:s,...n}=this.options;if(!r)return;if(e!==void 0){r.set(e);return}let a=new ue({...n,autoplay:false}),l=k(this.finishedTime??this.time);r.setWithVelocity(a.sample(l-In).value,a.sample(l).value,In),a.stop();}};var Eo=(t,e)=>e==="zIndex"?false:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&($.test(t)||t==="0")&&!t.startsWith("url("));function pm(t){let e=t[0];if(t.length===1)return true;for(let r=0;r<t.length;r++)if(t[r]!==e)return true}function jn(t,e,r,o){let i=t[0];if(i===null)return false;if(e==="display"||e==="visibility")return true;let s=t[t.length-1],n=Eo(i,e),a=Eo(s,e);return Q(n===a,`You are trying to animate ${e} from "${i}" to "${s}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${s} via the \`style\` property.`),!n||!a?false:pm(t)||(r==="spring"||xr(r))&&o}var hm=new Set(["opacity","clipPath","filter","transform"]),dm=ce(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Nn(t){let{motionValue:e,name:r,repeatDelay:o,repeatType:i,damping:s,type:n}=t;if(!e||!e.owner||!(e.owner.current instanceof HTMLElement))return false;let{onUpdate:a,transformTemplate:l}=e.owner.getProps();return dm()&&r&&hm.has(r)&&(r!=="transform"||!l)&&!a&&!o&&i!=="mirror"&&s!==0&&n!=="inertia"}var gm=40,Sr=class extends Pt{constructor({autoplay:e=true,delay:r=0,type:o="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:n="loop",keyframes:a,name:l,motionValue:u,element:m,...c}){super(),this.stop=()=>{this._animation?(this._animation.stop(),this.stopTimeline?.()):this.keyframeResolver?.cancel();},this.createdAt=L.now();let f={autoplay:e,delay:r,type:o,repeat:i,repeatDelay:s,repeatType:n,name:l,motionValue:u,element:m,...c},p=m?.KeyframeResolver||Mt;this.keyframeResolver=new p(a,(h,y,v)=>this.onKeyframesResolved(h,y,f,!v),l,u,m),this.keyframeResolver?.scheduleResolve();}onKeyframesResolved(e,r,o,i){this.keyframeResolver=void 0;let{name:s,type:n,velocity:a,delay:l,isHandoff:u,onUpdate:m}=o;this.resolvedAt=L.now(),jn(e,s,n,a)||((G.instantAnimations||!l)&&m?.(me(e,o,r)),e[0]=e[e.length-1],o.duration=0,o.repeat=0);let f={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>gm?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:r,...o,keyframes:e},p=!u&&Nn(f)?new Tr({...f,element:f.motionValue.owner.current}):new ue(f);p.finished.then(()=>this.notifyFinished()).catch(E),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p;}get finished(){return this._animation?this.animation.finished:this._finished}then(e,r){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||wn(),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(e){this.animation.time=e;}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e;}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play();}pause(){this.animation.pause();}complete(){this.animation.complete();}cancel(){this.animation.cancel();}};var fe=(t,e,r,o={},i,s)=>n=>{let a=oe(o,t)||{},l=a.delay||o.delay||0,{elapsed:u=0}=o;u=u-k(l);let m={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f);},onComplete:()=>{n(),a.onComplete&&a.onComplete();},name:t,motionValue:e,element:s?void 0:i};zi(a)||Object.assign(m,$i(t,m)),m.duration&&(m.duration=k(m.duration)),m.repeatDelay&&(m.repeatDelay=k(m.repeatDelay)),m.from!==void 0&&(m.keyframes[0]=m.from);let c=false;if((m.type===false||m.duration===0&&!m.repeatDelay)&&(m.duration=0,m.delay===0&&(c=true)),(G.instantAnimations||G.skipAnimations)&&(c=true,m.duration=0,m.delay=0),m.allowFlatten=!a.type&&!a.ease,c&&!s&&e.get()!==void 0){let f=Wi(m.keyframes,a);if(f!==void 0){V.update(()=>{m.onUpdate(f),m.onComplete();});return}}return new Sr(m)};var Vr=new Set(["width","height","top","left","right","bottom",...tt]);function ym({protectedKeys:t,needsAnimating:e},r){let o=t.hasOwnProperty(r)&&e[r]!==true;return e[r]=false,o}function br(t,e,{delay:r=0,transitionOverride:o,type:i}={}){let{transition:s=t.getDefaultTransition(),transitionEnd:n,...a}=e;o&&(s=o);let l=[],u=i&&t.animationState&&t.animationState.getState()[i];for(let m in a){let c=t.getValue(m,t.latestValues[m]??null),f=a[m];if(f===void 0||u&&ym(u,m))continue;let p={delay:r,...oe(s||{},m)},h=c.get();if(h!==void 0&&!c.isAnimating&&!Array.isArray(f)&&f===h&&!p.velocity)continue;let y=false;if(window.MotionHandoffAnimation){let g=Je(t);if(g){let S=window.MotionHandoffAnimation(g,m,V);S!==null&&(p.startTime=S,y=true);}}we(t,m),c.start(fe(m,c,f,t.shouldReduceMotion&&Vr.has(m)?{type:false}:p,t,y));let v=c.animation;v&&l.push(v);}return n&&Promise.all(l).then(()=>{V.update(()=>{n&&Ki(t,n);});}),l}function Pr(t,e,r={}){let o=ct(t,e,r.type==="exit"?t.presenceContext?.custom:void 0),{transition:i=t.getDefaultTransition()||{}}=o||{};r.transitionOverride&&(i=r.transitionOverride);let s=o?()=>Promise.all(br(t,o,r)):()=>Promise.resolve(),n=t.variantChildren&&t.variantChildren.size?(l=0)=>{let{delayChildren:u=0,staggerChildren:m,staggerDirection:c}=i;return xm(t,e,u+l,m,c,r)}:()=>Promise.resolve(),{when:a}=i;if(a){let[l,u]=a==="beforeChildren"?[s,n]:[n,s];return l().then(()=>u())}else return Promise.all([s(),n(r.delay)])}function xm(t,e,r=0,o=0,i=1,s){let n=[],a=(t.variantChildren.size-1)*o,l=i===1?(u=0)=>u*o:(u=0)=>a-u*o;return Array.from(t.variantChildren).sort(vm).forEach((u,m)=>{u.notify("AnimationStart",e),n.push(Pr(u,e,{...s,delay:r+l(m)}).then(()=>u.notify("AnimationComplete",e)));}),Promise.all(n)}function vm(t,e){return t.sortNodePosition(e)}function Un(t,e,r={}){t.notify("AnimationStart",e);let o;if(Array.isArray(e)){let i=e.map(s=>Pr(t,s,r));o=Promise.all(i);}else if(typeof e=="string")o=Pr(t,e,r);else {let i=typeof e=="function"?ct(t,e,r.custom):e;o=Promise.all(br(t,i,r));}return o.then(()=>{t.notify("AnimationComplete",e);})}function Ro(t,e){if(!Array.isArray(e))return false;let r=e.length;if(r!==t.length)return false;for(let o=0;o<r;o++)if(e[o]!==t[o])return false;return true}var Tm=Ve.length;function Lo(t){if(!t)return;if(!t.isControllingVariants){let r=t.parent?Lo(t.parent)||{}:{};return t.props.initial!==void 0&&(r.initial=t.props.initial),r}let e={};for(let r=0;r<Tm;r++){let o=Ve[r],i=t.props[o];(lt(i)||i===false)&&(e[o]=i);}return e}var Sm=[...Ne].reverse(),Vm=Ne.length;function bm(t){return e=>Promise.all(e.map(({animation:r,options:o})=>Un(t,r,o)))}function Gn(t){let e=bm(t),r=Kn(),o=true,i=l=>(u,m)=>{let c=ct(t,m,l==="exit"?t.presenceContext?.custom:void 0);if(c){let{transition:f,transitionEnd:p,...h}=c;u={...u,...h,...p};}return u};function s(l){e=l(t);}function n(l){let{props:u}=t,m=Lo(t.parent)||{},c=[],f=new Set,p={},h=1/0;for(let v=0;v<Vm;v++){let g=Sm[v],S=r[g],d=u[g]!==void 0?u[g]:m[g],A=lt(d),T=g===l?S.isActive:null;T===false&&(h=v);let M=d===m[g]&&d!==u[g]&&A;if(M&&o&&t.manuallyAnimateOnMount&&(M=false),S.protectedKeys={...p},!S.isActive&&T===null||!d&&!S.prevProp||xt(d)||typeof d=="boolean")continue;let F=Pm(S.prevProp,d),b=F||g===l&&S.isActive&&!M&&A||v>h&&A,z=false,q=Array.isArray(d)?d:[d],Ut=q.reduce(i(g),{});T===false&&(Ut={});let{prevResolvedValues:oi={}}=S,Ea={...oi,...Ut},ii=K=>{b=true,f.has(K)&&(z=true,f.delete(K)),S.needsAnimating[K]=true;let st=t.getValue(K);st&&(st.liveStyle=false);};for(let K in Ea){let st=Ut[K],no=oi[K];if(p.hasOwnProperty(K))continue;let so=false;Me(st)&&Me(no)?so=!Ro(st,no):so=st!==no,so?st!=null?ii(K):f.add(K):st!==void 0&&f.has(K)?ii(K):S.protectedKeys[K]=true;}S.prevProp=d,S.prevResolvedValues=Ut,S.isActive&&(p={...p,...Ut}),o&&t.blockInitialAnimation&&(b=false),b&&(!(M&&F)||z)&&c.push(...q.map(K=>({animation:K,options:{type:g}})));}if(f.size){let v={};if(typeof u.initial!="boolean"){let g=ct(t,Array.isArray(u.initial)?u.initial[0]:u.initial);g&&g.transition&&(v.transition=g.transition);}f.forEach(g=>{let S=t.getBaseTarget(g),d=t.getValue(g);d&&(d.liveStyle=true),v[g]=S??null;}),c.push({animation:v});}let y=!!c.length;return o&&(u.initial===false||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(y=false),o=false,y?e(c):Promise.resolve()}function a(l,u){if(r[l].isActive===u)return Promise.resolve();t.variantChildren?.forEach(c=>c.animationState?.setActive(l,u)),r[l].isActive=u;let m=n(l);for(let c in r)r[c].protectedKeys={};return m}return {animateChanges:n,setActive:a,setAnimateFunction:s,getState:()=>r,reset:()=>{r=Kn(),o=true;}}}function Pm(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Ro(e,t):false}function Ot(t=false){return {isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Kn(){return {animate:Ot(true),whileInView:Ot(),whileHover:Ot(),whileTap:Ot(),whileDrag:Ot(),whileFocus:Ot(),exit:Ot()}}var I=class{constructor(e){this.isMounted=false,this.node=e;}update(){}};var Ar=class extends I{constructor(e){super(e),e.animationState||(e.animationState=Gn(e));}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();xt(e)&&(this.unmountControls=e.subscribe(this.node));}mount(){this.updateAnimationControlsSubscription();}update(){let{animate:e}=this.node.getProps(),{animate:r}=this.node.prevProps||{};e!==r&&this.updateAnimationControlsSubscription();}unmount(){this.node.animationState.reset(),this.unmountControls?.();}};var Am=0,Mr=class extends I{constructor(){super(...arguments),this.id=Am++;}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:r}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===o)return;let i=this.node.animationState.setActive("exit",!e);r&&!e&&i.then(()=>{r(this.id);});}mount(){let{register:e,onExitComplete:r}=this.node.presenceContext||{};r&&r(this.id),e&&(this.unmount=e(this.id));}unmount(){}};var Wn={animation:{Feature:Ar},exit:{Feature:Mr}};function ht(t,e,r,o={passive:true}){return t.addEventListener(e,r,o),()=>t.removeEventListener(e,r)}var pe=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==false;function dt(t){return {point:{x:t.pageX,y:t.pageY}}}var $n=t=>e=>pe(e)&&t(e,dt(e));function wt(t,e,r,o){return ht(t,e,$n(r),o)}function wr({top:t,left:e,right:r,bottom:o}){return {x:{min:e,max:r},y:{min:t,max:o}}}function zn({x:t,y:e}){return {top:e.min,right:t.max,bottom:e.max,left:t.min}}function Hn(t,e){if(!e)return t;let r=e({x:t.left,y:t.top}),o=e({x:t.right,y:t.bottom});return {top:r.y,left:r.x,bottom:o.y,right:o.x}}var qn=1e-4,Mm=1-qn,wm=1+qn,Zn=.01,Cm=0-Zn,Dm=0+Zn;function O(t){return t.max-t.min}function Jn(t,e,r){return Math.abs(t-e)<=r}function _n(t,e,r,o=.5){t.origin=o,t.originPoint=P(e.min,e.max,t.origin),t.scale=O(r)/O(e),t.translate=P(r.min,r.max,t.origin)-t.originPoint,(t.scale>=Mm&&t.scale<=wm||isNaN(t.scale))&&(t.scale=1),(t.translate>=Cm&&t.translate<=Dm||isNaN(t.translate))&&(t.translate=0);}function he(t,e,r,o){_n(t.x,e.x,r.x,o?o.originX:void 0),_n(t.y,e.y,r.y,o?o.originY:void 0);}function Yn(t,e,r){t.min=r.min+e.min,t.max=t.min+O(e);}function Qn(t,e,r){Yn(t.x,e.x,r.x),Yn(t.y,e.y,r.y);}function Xn(t,e,r){t.min=e.min-r.min,t.max=t.min+O(e);}function de(t,e,r){Xn(t.x,e.x,r.x),Xn(t.y,e.y,r.y);}var ts=()=>({translate:0,scale:1,origin:0,originPoint:0}),kt=()=>({x:ts(),y:ts()}),es=()=>({min:0,max:0}),D=()=>({x:es(),y:es()});function H(t){return [t("x"),t("y")]}function Bo(t){return t===void 0||t===1}function Cr({scale:t,scaleX:e,scaleY:r}){return !Bo(t)||!Bo(e)||!Bo(r)}function gt(t){return Cr(t)||Fo(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Fo(t){return rs(t.x)||rs(t.y)}function rs(t){return t&&t!=="0%"}function Re(t,e,r){let o=t-r,i=e*o;return r+i}function os(t,e,r,o,i){return i!==void 0&&(t=Re(t,i,o)),Re(t,r,o)+e}function Oo(t,e=0,r=1,o,i){t.min=os(t.min,e,r,o,i),t.max=os(t.max,e,r,o,i);}function ko(t,{x:e,y:r}){Oo(t.x,e.translate,e.scale,e.originPoint),Oo(t.y,r.translate,r.scale,r.originPoint);}var is=.999999999999,ns=1.0000000000001;function as(t,e,r,o=false){let i=r.length;if(!i)return;e.x=e.y=1;let s,n;for(let a=0;a<i;a++){s=r[a],n=s.projectionDelta;let{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(o&&s.options.layoutScroll&&s.scroll&&s!==s.root&&It(t,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),n&&(e.x*=n.x.scale,e.y*=n.y.scale,ko(t,n)),o&>(s.latestValues)&&It(t,s.latestValues));}e.x<ns&&e.x>is&&(e.x=1),e.y<ns&&e.y>is&&(e.y=1);}function Ct(t,e){t.min=t.min+e,t.max=t.max+e;}function ss(t,e,r,o,i=.5){let s=P(t.min,t.max,i);Oo(t,e,r,s,o);}function It(t,e){ss(t.x,e.x,e.scaleX,e.scale,e.originX),ss(t.y,e.y,e.scaleY,e.scale,e.originY);}function Io(t,e){return wr(Hn(t.getBoundingClientRect(),e))}function ls(t,e,r){let o=Io(t,r),{scroll:i}=e;return i&&(Ct(o.x,i.offset.x),Ct(o.y,i.offset.y)),o}var Dr=({current:t})=>t?t.ownerDocument.defaultView:null;var ms=(t,e)=>Math.abs(t-e);function us(t,e){let r=ms(t.x,e.x),o=ms(t.y,e.y);return Math.sqrt(r**2+o**2)}var ge=class{constructor(e,r,{transformPagePoint:o,contextWindow:i,dragSnapToOrigin:s=false}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let c=No(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,p=us(c.offset,{x:0,y:0})>=3;if(!f&&!p)return;let{point:h}=c,{timestamp:y}=R;this.history.push({...h,timestamp:y});let{onStart:v,onMove:g}=this.handlers;f||(v&&v(this.lastMoveEvent,c),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,c);},this.handlePointerMove=(c,f)=>{this.lastMoveEvent=c,this.lastMoveEventInfo=jo(f,this.transformPagePoint),V.update(this.updatePoint,true);},this.handlePointerUp=(c,f)=>{this.end();let{onEnd:p,onSessionEnd:h,resumeAnimation:y}=this.handlers;if(this.dragSnapToOrigin&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let v=No(c.type==="pointercancel"?this.lastMoveEventInfo:jo(f,this.transformPagePoint),this.history);this.startEvent&&p&&p(c,v),h&&h(c,v);},!pe(e))return;this.dragSnapToOrigin=s,this.handlers=r,this.transformPagePoint=o,this.contextWindow=i||window;let n=dt(e),a=jo(n,this.transformPagePoint),{point:l}=a,{timestamp:u}=R;this.history=[{...l,timestamp:u}];let{onSessionStart:m}=r;m&&m(e,No(a,this.history)),this.removeListeners=nt(wt(this.contextWindow,"pointermove",this.handlePointerMove),wt(this.contextWindow,"pointerup",this.handlePointerUp),wt(this.contextWindow,"pointercancel",this.handlePointerUp));}updateHandlers(e){this.handlers=e;}end(){this.removeListeners&&this.removeListeners(),Y(this.updatePoint);}};function jo(t,e){return e?{point:e(t.point)}:t}function cs(t,e){return {x:t.x-e.x,y:t.y-e.y}}function No({point:t},e){return {point:t,delta:cs(t,fs(e)),offset:cs(t,Em(e)),velocity:Rm(e,.1)}}function Em(t){return t[0]}function fs(t){return t[t.length-1]}function Rm(t,e){if(t.length<2)return {x:0,y:0};let r=t.length-1,o=null,i=fs(t);for(;r>=0&&(o=t[r],!(i.timestamp-o.timestamp>k(e)));)r--;if(!o)return {x:0,y:0};let s=U(i.timestamp-o.timestamp);if(s===0)return {x:0,y:0};let n={x:(i.x-o.x)/s,y:(i.y-o.y)/s};return n.x===1/0&&(n.x=0),n.y===1/0&&(n.y=0),n}function ys(t,{min:e,max:r},o){return e!==void 0&&t<e?t=o?P(e,t,o.min):Math.max(t,e):r!==void 0&&t>r&&(t=o?P(r,t,o.max):Math.min(t,r)),t}function ps(t,e,r){return {min:e!==void 0?t.min+e:void 0,max:r!==void 0?t.max+r-(t.max-t.min):void 0}}function xs(t,{top:e,left:r,bottom:o,right:i}){return {x:ps(t.x,r,i),y:ps(t.y,e,o)}}function hs(t,e){let r=e.min-t.min,o=e.max-t.max;return e.max-e.min<t.max-t.min&&([r,o]=[o,r]),{min:r,max:o}}function vs(t,e){return {x:hs(t.x,e.x),y:hs(t.y,e.y)}}function Ts(t,e){let r=.5,o=O(t),i=O(e);return i>o?r=pt(e.min,e.max-o,t.min):o>i&&(r=pt(t.min,t.max-i,e.min)),j(0,1,r)}function Ss(t,e){let r={};return e.min!==void 0&&(r.min=e.min-t.min),e.max!==void 0&&(r.max=e.max-t.min),r}var Er=.35;function Vs(t=Er){return t===false?t=0:t===true&&(t=Er),{x:ds(t,"left","right"),y:ds(t,"top","bottom")}}function ds(t,e,r){return {min:gs(t,e),max:gs(t,r)}}function gs(t,e){return typeof t=="number"?t:t[e]||0}var J={x:false,y:false};function Rr(){return J.x||J.y}function bs(t){return t==="x"||t==="y"?J[t]?null:(J[t]=true,()=>{J[t]=false;}):J.x||J.y?null:(J.x=J.y=true,()=>{J.x=J.y=false;})}var Lm=new WeakMap,Br=class{constructor(e){this.openDragLock=null,this.isDragging=false,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=false,this.hasMutatedConstraints=false,this.elastic=D(),this.visualElement=e;}start(e,{snapToCursor:r=false}={}){let{presenceContext:o}=this.visualElement;if(o&&o.isPresent===false)return;let i=m=>{let{dragSnapToOrigin:c}=this.getProps();c?this.pauseAnimation():this.stopAnimation(),r&&this.snapToCursor(dt(m).point);},s=(m,c)=>{let{drag:f,dragPropagation:p,onDragStart:h}=this.getProps();if(f&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=bs(f),!this.openDragLock))return;this.isDragging=true,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=true,this.visualElement.projection.target=void 0),H(v=>{let g=this.getAxisMotionValue(v).get()||0;if(W.test(g)){let{projection:S}=this.visualElement;if(S&&S.layout){let d=S.layout.layoutBox[v];d&&(g=O(d)*(parseFloat(g)/100));}}this.originPoint[v]=g;}),h&&V.postRender(()=>h(m,c)),we(this.visualElement,"transform");let{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",true);},n=(m,c)=>{let{dragPropagation:f,dragDirectionLock:p,onDirectionLock:h,onDrag:y}=this.getProps();if(!f&&!this.openDragLock)return;let{offset:v}=c;if(p&&this.currentDirection===null){this.currentDirection=Bm(v),this.currentDirection!==null&&h&&h(this.currentDirection);return}this.updateAxis("x",c.point,v),this.updateAxis("y",c.point,v),this.visualElement.render(),y&&y(m,c);},a=(m,c)=>this.stop(m,c),l=()=>H(m=>this.getAnimationState(m)==="paused"&&this.getAxisMotionValue(m).animation?.play()),{dragSnapToOrigin:u}=this.getProps();this.panSession=new ge(e,{onSessionStart:i,onStart:s,onMove:n,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:Dr(this.visualElement)});}stop(e,r){let o=this.isDragging;if(this.cancel(),!o)return;let{velocity:i}=r;this.startAnimation(i);let{onDragEnd:s}=this.getProps();s&&V.postRender(()=>s(e,r));}cancel(){this.isDragging=false;let{projection:e,animationState:r}=this.visualElement;e&&(e.isAnimationBlocked=false),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",false);}updateAxis(e,r,o){let{drag:i}=this.getProps();if(!o||!Lr(e,i,this.currentDirection))return;let s=this.getAxisMotionValue(e),n=this.originPoint[e]+o[e];this.constraints&&this.constraints[e]&&(n=ys(n,this.constraints[e],this.elastic[e])),s.set(n);}resolveConstraints(){let{dragConstraints:e,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(false):this.visualElement.projection?.layout,i=this.constraints;e&&mt(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&o?this.constraints=xs(o.layoutBox,e):this.constraints=false,this.elastic=Vs(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&H(s=>{this.constraints!==false&&this.getAxisMotionValue(s)&&(this.constraints[s]=Ss(o.layoutBox[s],this.constraints[s]));});}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:r}=this.getProps();if(!e||!mt(e))return false;let o=e.current;N(o!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");let{projection:i}=this.visualElement;if(!i||!i.layout)return false;let s=ls(o,i.root,this.visualElement.getTransformPagePoint()),n=vs(i.layout.layoutBox,s);if(r){let a=r(zn(n));this.hasMutatedConstraints=!!a,a&&(n=wr(a));}return n}startAnimation(e){let{drag:r,dragMomentum:o,dragElastic:i,dragTransition:s,dragSnapToOrigin:n,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=H(m=>{if(!Lr(m,r,this.currentDirection))return;let c=l&&l[m]||{};n&&(c={min:0,max:0});let f=i?200:1e6,p=i?40:1e7,h={type:"inertia",velocity:o?e[m]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...s,...c};return this.startAxisValueAnimation(m,h)});return Promise.all(u).then(a)}startAxisValueAnimation(e,r){let o=this.getAxisMotionValue(e);return we(this.visualElement,e),o.start(fe(e,o,0,r,this.visualElement,false))}stopAnimation(){H(e=>this.getAxisMotionValue(e).stop());}pauseAnimation(){H(e=>this.getAxisMotionValue(e).animation?.pause());}getAnimationState(e){return this.getAxisMotionValue(e).animation?.state}getAxisMotionValue(e){let r=`_drag${e.toUpperCase()}`,o=this.visualElement.getProps(),i=o[r];return i||this.visualElement.getValue(e,(o.initial?o.initial[e]:void 0)||0)}snapToCursor(e){H(r=>{let{drag:o}=this.getProps();if(!Lr(r,o,this.currentDirection))return;let{projection:i}=this.visualElement,s=this.getAxisMotionValue(r);if(i&&i.layout){let{min:n,max:a}=i.layout.layoutBox[r];s.set(e[r]-P(n,a,.5));}});}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:r}=this.getProps(),{projection:o}=this.visualElement;if(!mt(r)||!o||!this.constraints)return;this.stopAnimation();let i={x:0,y:0};H(n=>{let a=this.getAxisMotionValue(n);if(a&&this.constraints!==false){let l=a.get();i[n]=Ts({min:l,max:l},this.constraints[n]);}});let{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),H(n=>{if(!Lr(n,e,null))return;let a=this.getAxisMotionValue(n),{min:l,max:u}=this.constraints[n];a.set(P(l,u,i[n]));});}addListeners(){if(!this.visualElement.current)return;Lm.set(this.visualElement,this);let e=this.visualElement.current,r=wt(e,"pointerdown",l=>{let{drag:u,dragListener:m=true}=this.getProps();u&&m&&this.start(l);}),o=()=>{let{dragConstraints:l}=this.getProps();mt(l)&&l.current&&(this.constraints=this.resolveRefConstraints());},{projection:i}=this.visualElement,s=i.addEventListener("measure",o);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),V.read(o);let n=ht(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(H(m=>{let c=this.getAxisMotionValue(m);c&&(this.originPoint[m]+=l[m].translate,c.set(c.get()+l[m].translate));}),this.visualElement.render());});return ()=>{n(),r(),s(),a&&a();}}getProps(){let e=this.visualElement.getProps(),{drag:r=false,dragDirectionLock:o=false,dragPropagation:i=false,dragConstraints:s=false,dragElastic:n=Er,dragMomentum:a=true}=e;return {...e,drag:r,dragDirectionLock:o,dragPropagation:i,dragConstraints:s,dragElastic:n,dragMomentum:a}}};function Lr(t,e,r){return (e===true||e===t)&&(r===null||r===t)}function Bm(t,e=10){let r=null;return Math.abs(t.y)>e?r="y":Math.abs(t.x)>e&&(r="x"),r}var Fr=class extends I{constructor(e){super(e),this.removeGroupControls=E,this.removeListeners=E,this.controls=new Br(e);}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||E;}unmount(){this.removeGroupControls(),this.removeListeners();}};var Ps=t=>(e,r)=>{t&&V.postRender(()=>t(e,r));},Or=class extends I{constructor(){super(...arguments),this.removePointerDownListener=E;}onPointerDown(e){this.session=new ge(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Dr(this.node)});}createPanHandlers(){let{onPanSessionStart:e,onPanStart:r,onPan:o,onPanEnd:i}=this.node.getProps();return {onSessionStart:Ps(e),onStart:Ps(r),onMove:o,onEnd:(s,n)=>{delete this.session,i&&V.postRender(()=>i(s,n));}}}mount(){this.removePointerDownListener=wt(this.node.current,"pointerdown",e=>this.onPointerDown(e));}update(){this.session&&this.session.updateHandlers(this.createPanHandlers());}unmount(){this.removePointerDownListener(),this.session&&this.session.end();}};var ye={hasAnimatedSinceResize:true,hasEverUpdated:false};function As(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}var xe={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(x.test(t))t=parseFloat(t);else return t;let r=As(t,e.target.x),o=As(t,e.target.y);return `${r}% ${o}%`}};var Ms={correct:(t,{treeScale:e,projectionDelta:r})=>{let o=t,i=$.parse(t);if(i.length>5)return o;let s=$.createTransformer(t),n=typeof i[0]!="number"?1:0,a=r.x.scale*e.x,l=r.y.scale*e.y;i[0+n]/=a,i[1+n]/=l;let u=P(a,l,.5);return typeof i[2+n]=="number"&&(i[2+n]/=u),typeof i[3+n]=="number"&&(i[3+n]/=u),s(i)}};var Uo=class extends Component{componentDidMount(){let{visualElement:e,layoutGroup:r,switchLayoutGroup:o,layoutId:i}=this.props,{projection:s}=e;Pi(km),s&&(r.group&&r.group.add(s),o&&o.register&&i&&o.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove();}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),ye.hasEverUpdated=true;}getSnapshotBeforeUpdate(e){let{layoutDependency:r,visualElement:o,drag:i,isPresent:s}=this.props,{projection:n}=o;return n&&(n.isPresent=s,i||e.layoutDependency!==r||r===void 0||e.isPresent!==s?n.willUpdate():this.safeToRemove(),e.isPresent!==s&&(s?n.promote():n.relegate()||V.postRender(()=>{let a=n.getStack();(!a||!a.members.length)&&this.safeToRemove();}))),null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),zt.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove();}));}componentWillUnmount(){let{visualElement:e,layoutGroup:r,switchLayoutGroup:o}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(i),o&&o.deregister&&o.deregister(i));}safeToRemove(){let{safeToRemove:e}=this.props;e&&e();}render(){return null}};function kr(t){let[e,r]=ai(),o=useContext(Fe);return jsx(Uo,{...t,layoutGroup:o,switchLayoutGroup:useContext(Ge),isPresent:e,safeToRemove:r})}var km={borderRadius:{...xe,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:xe,borderTopRightRadius:xe,borderBottomLeftRadius:xe,borderBottomRightRadius:xe,boxShadow:Ms};function Cs(t,e,r){let o=w(t)?t:ft(t);return o.start(fe("",o,e,r)),o.animation}function Ds(t){return t instanceof SVGElement&&t.tagName!=="svg"}var Es=(t,e)=>t.depth-e.depth;var Ir=class{constructor(){this.children=[],this.isDirty=false;}add(e){ee(this.children,e),this.isDirty=true;}remove(e){re(this.children,e),this.isDirty=true;}forEach(e){this.isDirty&&this.children.sort(Es),this.isDirty=false,this.children.forEach(e);}};function Rs(t,e){let r=L.now(),o=({timestamp:i})=>{let s=i-r;s>=e&&(Y(o),t(s-e));};return V.setup(o,true),()=>Y(o)}var Os=["TopLeft","TopRight","BottomLeft","BottomRight"],Im=Os.length,Ls=t=>typeof t=="string"?parseFloat(t):t,Bs=t=>typeof t=="number"||x.test(t);function ks(t,e,r,o,i,s){i?(t.opacity=P(0,r.opacity??1,jm(o)),t.opacityExit=P(e.opacity??1,0,Nm(o))):s&&(t.opacity=P(e.opacity??1,r.opacity??1,o));for(let n=0;n<Im;n++){let a=`border${Os[n]}Radius`,l=Fs(e,a),u=Fs(r,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||Bs(l)===Bs(u)?(t[a]=Math.max(P(Ls(l),Ls(u),o),0),(W.test(u)||W.test(l))&&(t[a]+="%")):t[a]=u;}(e.rotate||r.rotate)&&(t.rotate=P(e.rotate||0,r.rotate||0,o));}function Fs(t,e){return t[e]!==void 0?t[e]:t.borderRadius}var jm=Is(0,.5,fr),Nm=Is(.5,.95,E);function Is(t,e,r){return o=>o<t?0:o>e?1:r(pt(t,e,o))}function js(t,e){t.min=e.min,t.max=e.max;}function X(t,e){js(t.x,e.x),js(t.y,e.y);}function Ko(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin;}function Ns(t,e,r,o,i){return t-=e,t=Re(t,1/r,o),i!==void 0&&(t=Re(t,1/i,o)),t}function Um(t,e=0,r=1,o=.5,i,s=t,n=t){if(W.test(e)&&(e=parseFloat(e),e=P(n.min,n.max,e/100)-n.min),typeof e!="number")return;let a=P(s.min,s.max,o);t===s&&(a-=e),t.min=Ns(t.min,e,r,a,i),t.max=Ns(t.max,e,r,a,i);}function Us(t,e,[r,o,i],s,n){Um(t,e[r],e[o],e[i],e.scale,s,n);}var Km=["x","scaleX","originX"],Gm=["y","scaleY","originY"];function Go(t,e,r,o){Us(t.x,e,Km,r?r.x:void 0,o?o.x:void 0),Us(t.y,e,Gm,r?r.y:void 0,o?o.y:void 0);}function Ks(t){return t.translate===0&&t.scale===1}function Wo(t){return Ks(t.x)&&Ks(t.y)}function Gs(t,e){return t.min===e.min&&t.max===e.max}function $s(t,e){return Gs(t.x,e.x)&&Gs(t.y,e.y)}function Ws(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function $o(t,e){return Ws(t.x,e.x)&&Ws(t.y,e.y)}function zo(t){return O(t.x)/O(t.y)}function Ho(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}var jr=class{constructor(){this.members=[];}add(e){ee(this.members,e),e.scheduleRender();}remove(e){if(re(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let r=this.members[this.members.length-1];r&&this.promote(r);}}relegate(e){let r=this.members.findIndex(i=>e===i);if(r===0)return false;let o;for(let i=r;i>=0;i--){let s=this.members[i];if(s.isPresent!==false){o=s;break}}return o?(this.promote(o),true):false}promote(e,r){let o=this.lead;if(e!==o&&(this.prevLead=o,this.lead=e,e.show(),o)){o.instance&&o.scheduleRender(),e.scheduleRender(),e.resumeFrom=o,r&&(e.resumeFrom.preserveOpacity=true),o.snapshot&&(e.snapshot=o.snapshot,e.snapshot.latestValues=o.animationValues||o.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=true);let{crossfade:i}=e.options;i===false&&o.hide();}}exitAnimationComplete(){this.members.forEach(e=>{let{options:r,resumingFrom:o}=e;r.onExitComplete&&r.onExitComplete(),o&&o.options.onExitComplete&&o.options.onExitComplete();});}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(false);});}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0);}};function zs(t,e,r){let o="",i=t.x.translate/e.x,s=t.y.translate/e.y,n=r?.z||0;if((i||s||n)&&(o=`translate3d(${i}px, ${s}px, ${n}px) `),(e.x!==1||e.y!==1)&&(o+=`scale(${1/e.x}, ${1/e.y}) `),r){let{transformPerspective:u,rotate:m,rotateX:c,rotateY:f,skewX:p,skewY:h}=r;u&&(o=`perspective(${u}px) ${o}`),m&&(o+=`rotate(${m}deg) `),c&&(o+=`rotateX(${c}deg) `),f&&(o+=`rotateY(${f}deg) `),p&&(o+=`skewX(${p}deg) `),h&&(o+=`skewY(${h}deg) `);}let a=t.x.scale*e.x,l=t.y.scale*e.y;return (a!==1||l!==1)&&(o+=`scale(${a}, ${l})`),o||"none"}var _o=["","X","Y","Z"],Wm={visibility:"hidden"},Hs=1e3,$m=0;function Yo(t,e,r,o){let{latestValues:i}=e;i[t]&&(r[t]=i[t],e.setStaticValue(t,0),o&&(o[t]=0));}function ta(t){if(t.hasCheckedOptimisedAppear=true,t.root===t)return;let{visualElement:e}=t.options;if(!e)return;let r=Je(e);if(window.MotionHasOptimisedAnimation(r,"transform")){let{layout:i,layoutId:s}=t.options;window.MotionCancelOptimisedAnimation(r,"transform",V,!(i||s));}let{parent:o}=t;o&&!o.hasCheckedOptimisedAppear&&ta(o);}function Nr({attachResizeListener:t,defaultParent:e,measureScroll:r,checkIsScrollRoot:o,resetTransform:i}){return class{constructor(n={},a=e?.()){this.id=$m++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=false,this.isAnimationBlocked=false,this.isLayoutDirty=false,this.isProjectionDirty=false,this.isSharedProjectionDirty=false,this.isTransformDirty=false,this.updateManuallyBlocked=false,this.updateBlockedByResize=false,this.isUpdating=false,this.isSVG=false,this.needsReset=false,this.shouldResetTransform=false,this.hasCheckedOptimisedAppear=false,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=false,this.updateScheduled=false,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=false,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=false,this.clearAllSnapshots());},this.updateProjection=()=>{this.projectionUpdateScheduled=false,this.nodes.forEach(_m),this.nodes.forEach(Jm),this.nodes.forEach(Qm),this.nodes.forEach(Ym);},this.resolvedRelativeTargetAt=0,this.hasProjected=false,this.isVisible=true,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=n,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=true;this.root===this&&(this.nodes=new Ir);}addEventListener(n,a){return this.eventHandlers.has(n)||this.eventHandlers.set(n,new vt),this.eventHandlers.get(n).add(a)}notifyListeners(n,...a){let l=this.eventHandlers.get(n);l&&l.notify(...a);}hasListeners(n){return this.eventHandlers.has(n)}mount(n){if(this.instance)return;this.isSVG=Ds(n),this.instance=n;let{layoutId:a,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(n),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=true),t){let m,c=()=>this.root.updateBlockedByResize=false;t(n,()=>{this.root.updateBlockedByResize=true,m&&m(),m=Rs(c,250),ye.hasAnimatedSinceResize&&(ye.hasAnimatedSinceResize=false,this.nodes.forEach(Ys));});}a&&this.root.registerSharedNode(a,this),this.options.animate!==false&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:c,hasRelativeLayoutChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let h=this.options.transition||u.getDefaultTransition()||iu,{onLayoutAnimationStart:y,onLayoutAnimationComplete:v}=u.getProps(),g=!this.targetLayout||!$o(this.targetLayout,p),S=!c&&f;if(this.options.layoutRoot||this.resumeFrom||S||c&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,S);let d={...oe(h,"layout"),onPlay:y,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(d.delay=0,d.type=false),this.startAnimation(d);}else c||Ys(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p;});}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let n=this.getStack();n&&n.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Y(this.updateProjection);}blockUpdate(){this.updateManuallyBlocked=true;}unblockUpdate(){this.updateManuallyBlocked=false;}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||false}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=true,this.nodes&&this.nodes.forEach(tu),this.animationId++);}getTransformTemplate(){let{visualElement:n}=this.options;return n&&n.getProps().transformTemplate}willUpdate(n=true){if(this.root.hasTreeAnimated=true,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ta(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=true;for(let m=0;m<this.path.length;m++){let c=this.path[m];c.shouldResetTransform=true,c.updateScroll("snapshot"),c.options.layoutRoot&&c.willUpdate(false);}let{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;let u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),n&&this.notifyListeners("willUpdate");}update(){if(this.updateScheduled=false,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(_s);return}this.isUpdating||this.nodes.forEach(qm),this.isUpdating=false,this.nodes.forEach(Zm),this.nodes.forEach(zm),this.nodes.forEach(Hm),this.clearAllSnapshots();let a=L.now();R.delta=j(0,1e3/60,a-R.timestamp),R.timestamp=a,R.isProcessing=true,Ie.update.process(R),Ie.preRender.process(R),Ie.render.process(R),R.isProcessing=false;}didUpdate(){this.updateScheduled||(this.updateScheduled=true,zt.read(this.scheduleUpdate));}clearAllSnapshots(){this.nodes.forEach(Xm),this.sharedNodes.forEach(eu);}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=true,V.preRender(this.updateProjection,false,true));}scheduleCheckAfterUnmount(){V.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed();});}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!O(this.snapshot.measuredBox.x)&&!O(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 l=0;l<this.path.length;l++)this.path[l].updateScroll();let n=this.layout;this.layout=this.measure(false),this.layoutCorrected=D(),this.isLayoutDirty=false,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,n?n.layoutBox:void 0);}updateScroll(n="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===n&&(a=false),a&&this.instance){let l=o(this.instance);this.scroll={animationId:this.root.animationId,phase:n,isRoot:l,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l};}}resetTransform(){if(!i)return;let n=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Wo(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,m=u!==this.prevTransformTemplateValue;n&&this.instance&&(a||gt(this.latestValues)||m)&&(i(this.instance,u),this.shouldResetTransform=false,this.scheduleRender());}measure(n=true){let a=this.measurePageBox(),l=this.removeElementScroll(a);return n&&(l=this.removeTransform(l)),nu(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:n}=this.options;if(!n)return D();let a=n.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(su))){let{scroll:u}=this.root;u&&(Ct(a.x,u.offset.x),Ct(a.y,u.offset.y));}return a}removeElementScroll(n){let a=D();if(X(a,n),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){let u=this.path[l],{scroll:m,options:c}=u;u!==this.root&&m&&c.layoutScroll&&(m.wasRoot&&X(a,n),Ct(a.x,m.offset.x),Ct(a.y,m.offset.y));}return a}applyTransform(n,a=false){let l=D();X(l,n);for(let u=0;u<this.path.length;u++){let m=this.path[u];!a&&m.options.layoutScroll&&m.scroll&&m!==m.root&&It(l,{x:-m.scroll.offset.x,y:-m.scroll.offset.y}),gt(m.latestValues)&&It(l,m.latestValues);}return gt(this.latestValues)&&It(l,this.latestValues),l}removeTransform(n){let a=D();X(a,n);for(let l=0;l<this.path.length;l++){let u=this.path[l];if(!u.instance||!gt(u.latestValues))continue;Cr(u.latestValues)&&u.updateSnapshot();let m=D(),c=u.measurePageBox();X(m,c),Go(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,m);}return gt(this.latestValues)&&Go(a,this.latestValues),a}setTargetDelta(n){this.targetDelta=n,this.root.scheduleUpdateProjection(),this.isProjectionDirty=true;}setOptions(n){this.options={...this.options,...n,crossfade:n.crossfade!==void 0?n.crossfade:true};}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=false;}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==R.timestamp&&this.relativeParent.resolveTargetDelta(true);}resolveTargetDelta(n=false){let a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);let l=!!this.resumingFrom||this!==a;if(!(n||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:m,layoutId:c}=this.options;if(!(!this.layout||!(m||c))){if(this.resolvedRelativeTargetAt=R.timestamp,!this.targetDelta&&!this.relativeTarget){let f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=D(),this.relativeTargetOrigin=D(),de(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),X(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0;}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=D(),this.targetWithTransforms=D()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Qn(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):X(this.target,this.layout.layoutBox),ko(this.target,this.targetDelta)):X(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=false;let f=this.getClosestProjectingParent();f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=D(),this.relativeTargetOrigin=D(),de(this.relativeTargetOrigin,this.target,f.target),X(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0;}}}}getClosestProjectingParent(){if(!(!this.parent||Cr(this.parent.latestValues)||Fo(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return !!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){let n=this.getLead(),a=!!this.resumingFrom||this!==n,l=true;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=false),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=false),this.resolvedRelativeTargetAt===R.timestamp&&(l=false),l)return;let{layout:u,layoutId:m}=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||m))return;X(this.layoutCorrected,this.layout.layoutBox);let c=this.treeScale.x,f=this.treeScale.y;as(this.layoutCorrected,this.treeScale,this.path,a),n.layout&&!n.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(n.target=n.layout.layoutBox,n.targetWithTransforms=D());let{target:p}=n;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ko(this.prevProjectionDelta.x,this.projectionDelta.x),Ko(this.prevProjectionDelta.y,this.projectionDelta.y)),he(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==c||this.treeScale.y!==f||!Ho(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ho(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=true,this.scheduleRender(),this.notifyListeners("projectionUpdate",p));}hide(){this.isVisible=false;}show(){this.isVisible=true;}scheduleRender(n=true){if(this.options.visualElement?.scheduleRender(),n){let a=this.getStack();a&&a.scheduleRender();}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0);}createProjectionDeltas(){this.prevProjectionDelta=kt(),this.projectionDelta=kt(),this.projectionDeltaWithTransform=kt();}setAnimationOrigin(n,a=false){let l=this.snapshot,u=l?l.latestValues:{},m={...this.latestValues},c=kt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;let f=D(),p=l?l.source:void 0,h=this.layout?this.layout.source:void 0,y=p!==h,v=this.getStack(),g=!v||v.members.length<=1,S=!!(y&&!g&&this.options.crossfade===true&&!this.path.some(ou));this.animationProgress=0;let d;this.mixTargetDelta=A=>{let T=A/1e3;Xs(c.x,n.x,T),Xs(c.y,n.y,T),this.setTargetDelta(c),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(de(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),ru(this.relativeTarget,this.relativeTargetOrigin,f,T),d&&$s(this.relativeTarget,d)&&(this.isProjectionDirty=false),d||(d=D()),X(d,this.relativeTarget)),y&&(this.animationValues=m,ks(m,u,this.latestValues,T,S,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T;},this.mixTargetDelta(this.options.layoutRoot?1e3:0);}startAnimation(n){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Y(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=V.update(()=>{ye.hasAnimatedSinceResize=true,this.currentAnimation=Cs(0,Hs,{...n,onUpdate:a=>{this.mixTargetDelta(a),n.onUpdate&&n.onUpdate(a);},onStop:()=>{},onComplete:()=>{n.onComplete&&n.onComplete(),this.completeAnimation();}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0;});}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let n=this.getStack();n&&n.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete");}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Hs),this.currentAnimation.stop()),this.completeAnimation();}applyTransformsToTarget(){let n=this.getLead(),{targetWithTransforms:a,target:l,layout:u,latestValues:m}=n;if(!(!a||!l||!u)){if(this!==n&&this.layout&&u&&ea(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||D();let c=O(this.layout.layoutBox.x);l.x.min=n.target.x.min,l.x.max=l.x.min+c;let f=O(this.layout.layoutBox.y);l.y.min=n.target.y.min,l.y.max=l.y.min+f;}X(a,l),It(a,m),he(this.projectionDeltaWithTransform,this.layoutCorrected,a,m);}}registerSharedNode(n,a){this.sharedNodes.has(n)||this.sharedNodes.set(n,new jr),this.sharedNodes.get(n).add(a);let u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0});}isLead(){let n=this.getStack();return n?n.lead===this:true}getLead(){let{layoutId:n}=this.options;return n?this.getStack()?.lead||this:this}getPrevLead(){let{layoutId:n}=this.options;return n?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:n}=this.options;if(n)return this.root.sharedNodes.get(n)}promote({needsReset:n,transition:a,preserveFollowOpacity:l}={}){let u=this.getStack();u&&u.promote(this,l),n&&(this.projectionDelta=void 0,this.needsReset=true),a&&this.setOptions({transition:a});}relegate(){let n=this.getStack();return n?n.relegate(this):false}resetSkewAndRotation(){let{visualElement:n}=this.options;if(!n)return;let a=false,{latestValues:l}=n;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=true),!a)return;let u={};l.z&&Yo("z",n,u,this.animationValues);for(let m=0;m<_o.length;m++)Yo(`rotate${_o[m]}`,n,u,this.animationValues),Yo(`skew${_o[m]}`,n,u,this.animationValues);n.render();for(let m in u)n.setStaticValue(m,u[m]),this.animationValues&&(this.animationValues[m]=u[m]);n.scheduleRender();}getProjectionStyles(n){if(!this.instance||this.isSVG)return;if(!this.isVisible)return Wm;let a={visibility:""},l=this.getTransformTemplate();if(this.needsReset)return this.needsReset=false,a.opacity="",a.pointerEvents=Qt(n?.pointerEvents)||"",a.transform=l?l(this.latestValues,""):"none",a;let u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){let p={};return this.options.layoutId&&(p.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,p.pointerEvents=Qt(n?.pointerEvents)||""),this.hasProjected&&!gt(this.latestValues)&&(p.transform=l?l({},""):"none",this.hasProjected=false),p}let m=u.animationValues||u.latestValues;this.applyTransformsToTarget(),a.transform=zs(this.projectionDeltaWithTransform,this.treeScale,m),l&&(a.transform=l(m,a.transform));let{x:c,y:f}=this.projectionDelta;a.transformOrigin=`${c.origin*100}% ${f.origin*100}% 0`,u.animationValues?a.opacity=u===this?m.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:m.opacityExit:a.opacity=u===this?m.opacity!==void 0?m.opacity:"":m.opacityExit!==void 0?m.opacityExit:0;for(let p in Et){if(m[p]===void 0)continue;let{correct:h,applyTo:y,isCSSVariable:v}=Et[p],g=a.transform==="none"?m[p]:h(m[p],u);if(y){let S=y.length;for(let d=0;d<S;d++)a[y[d]]=g;}else v?this.options.visualElement.renderState.vars[p]=g:a[p]=g;}return this.options.layoutId&&(a.pointerEvents=u===this?Qt(n?.pointerEvents)||"":"none"),a}clearSnapshot(){this.resumeFrom=this.snapshot=void 0;}resetTree(){this.root.nodes.forEach(n=>n.currentAnimation?.stop()),this.root.nodes.forEach(_s),this.root.sharedNodes.clear();}}}function zm(t){t.updateLayout();}function Hm(t){let e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){let{layoutBox:r,measuredBox:o}=t.layout,{animationType:i}=t.options,s=e.source!==t.layout.source;i==="size"?H(m=>{let c=s?e.measuredBox[m]:e.layoutBox[m],f=O(c);c.min=r[m].min,c.max=c.min+f;}):ea(i,e.layoutBox,r)&&H(m=>{let c=s?e.measuredBox[m]:e.layoutBox[m],f=O(r[m]);c.max=c.min+f,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=true,t.relativeTarget[m].max=t.relativeTarget[m].min+f);});let n=kt();he(n,r,e.layoutBox);let a=kt();s?he(a,t.applyTransform(o,true),e.measuredBox):he(a,r,e.layoutBox);let l=!Wo(n),u=false;if(!t.resumeFrom){let m=t.getClosestProjectingParent();if(m&&!m.resumeFrom){let{snapshot:c,layout:f}=m;if(c&&f){let p=D();de(p,e.layoutBox,c.layoutBox);let h=D();de(h,r,f.layoutBox),$o(p,h)||(u=true),m.options.layoutRoot&&(t.relativeTarget=h,t.relativeTargetOrigin=p,t.relativeParent=m);}}}t.notifyListeners("didUpdate",{layout:r,snapshot:e,delta:a,layoutDelta:n,hasLayoutChanged:l,hasRelativeLayoutChanged:u});}else if(t.isLead()){let{onExitComplete:r}=t.options;r&&r();}t.options.transition=void 0;}function _m(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty));}function Ym(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=false;}function Xm(t){t.clearSnapshot();}function _s(t){t.clearMeasurements();}function qm(t){t.isLayoutDirty=false;}function Zm(t){let{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform();}function Ys(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=true;}function Jm(t){t.resolveTargetDelta();}function Qm(t){t.calcProjection();}function tu(t){t.resetSkewAndRotation();}function eu(t){t.removeLeadSnapshot();}function Xs(t,e,r){t.translate=P(e.translate,0,r),t.scale=P(e.scale,1,r),t.origin=e.origin,t.originPoint=e.originPoint;}function qs(t,e,r,o){t.min=P(e.min,r.min,o),t.max=P(e.max,r.max,o);}function ru(t,e,r,o){qs(t.x,e.x,r.x,o),qs(t.y,e.y,r.y,o);}function ou(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}var iu={duration:.45,ease:[.4,0,.1,1]},Zs=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Js=Zs("applewebkit/")&&!Zs("chrome/")?Math.round:E;function Qs(t){t.min=Js(t.min),t.max=Js(t.max);}function nu(t){Qs(t.x),Qs(t.y);}function ea(t,e,r){return t==="position"||t==="preserve-aspect"&&!Jn(zo(e),zo(r),.2)}function su(t){return t!==t.root&&t.scroll?.wasRoot}var ra=Nr({attachResizeListener:(t,e)=>ht(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>true});var Xo={current:void 0},Ur=Nr({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Xo.current){let t=new ra({});t.mount(window),t.setOptions({layoutScroll:true}),Xo.current=t;}return Xo.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none";},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"});var oa={pan:{Feature:Or},drag:{Feature:Fr,ProjectionNode:Ur,MeasureLayout:kr}};function ia(t,e,r){if(t instanceof EventTarget)return [t];if(typeof t=="string"){let o=document;let i=o.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}function Kr(t,e){let r=ia(t),o=new AbortController,i={passive:true,...e,signal:o.signal};return [r,i,()=>o.abort()]}function na(t){return !(t.pointerType==="touch"||Rr())}function sa(t,e,r={}){let[o,i,s]=Kr(t,r),n=a=>{if(!na(a))return;let{target:l}=a,u=e(l,a);if(typeof u!="function"||!l)return;let m=c=>{na(c)&&(u(c),l.removeEventListener("pointerleave",m));};l.addEventListener("pointerleave",m,i);};return o.forEach(a=>{a.addEventListener("pointerenter",n,i);}),s}function aa(t,e,r){let{props:o}=t;t.animationState&&o.whileHover&&t.animationState.setActive("whileHover",r==="Start");let i="onHover"+r,s=o[i];s&&V.postRender(()=>s(e,dt(e)));}var Gr=class extends I{mount(){let{current:e}=this.node;e&&(this.unmount=sa(e,(r,o)=>(aa(this.node,o,"Start"),i=>aa(this.node,i,"End"))));}unmount(){}};var Wr=class extends I{constructor(){super(...arguments),this.isActive=false;}onFocus(){let e=false;try{e=this.node.current.matches(":focus-visible");}catch{e=true;}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",true),this.isActive=true);}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",false),this.isActive=false);}mount(){this.unmount=nt(ht(this.node.current,"focus",()=>this.onFocus()),ht(this.node.current,"blur",()=>this.onBlur()));}unmount(){}};var qo=(t,e)=>e?t===e?true:qo(t,e.parentElement):false;var au=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function la(t){return au.has(t.tagName)||t.tabIndex!==-1}var Nt=new WeakSet;function ma(t){return e=>{e.key==="Enter"&&t(e);}}function Zo(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:true,bubbles:true}));}var ua=(t,e)=>{let r=t.currentTarget;if(!r)return;let o=ma(()=>{if(Nt.has(r))return;Zo(r,"down");let i=ma(()=>{Zo(r,"up");}),s=()=>Zo(r,"cancel");r.addEventListener("keyup",i,e),r.addEventListener("blur",s,e);});r.addEventListener("keydown",o,e),r.addEventListener("blur",()=>r.removeEventListener("keydown",o),e);};function ca(t){return pe(t)&&!Rr()}function fa(t,e,r={}){let[o,i,s]=Kr(t,r),n=a=>{let l=a.currentTarget;if(!ca(a)||Nt.has(l))return;Nt.add(l);let u=e(l,a),m=(p,h)=>{window.removeEventListener("pointerup",c),window.removeEventListener("pointercancel",f),!(!ca(p)||!Nt.has(l))&&(Nt.delete(l),typeof u=="function"&&u(p,{success:h}));},c=p=>{m(p,l===window||l===document||r.useGlobalTarget||qo(l,p.target));},f=p=>{m(p,false);};window.addEventListener("pointerup",c,i),window.addEventListener("pointercancel",f,i);};return o.forEach(a=>{(r.useGlobalTarget?window:a).addEventListener("pointerdown",n,i),a instanceof HTMLElement&&(a.addEventListener("focus",u=>ua(u,i)),!la(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0));}),s}function pa(t,e,r){let{props:o}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&o.whileTap&&t.animationState.setActive("whileTap",r==="Start");let i="onTap"+(r==="End"?"":r),s=o[i];s&&V.postRender(()=>s(e,dt(e)));}var $r=class extends I{mount(){let{current:e}=this.node;e&&(this.unmount=fa(e,(r,o)=>(pa(this.node,o,"Start"),(i,{success:s})=>pa(this.node,i,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}));}unmount(){}};var Qo=new WeakMap,Jo=new WeakMap,lu=t=>{let e=Qo.get(t.target);e&&e(t);},mu=t=>{t.forEach(lu);};function uu({root:t,...e}){let r=t||document;Jo.has(r)||Jo.set(r,{});let o=Jo.get(r),i=JSON.stringify(e);return o[i]||(o[i]=new IntersectionObserver(mu,{root:t,...e})),o[i]}function ha(t,e,r){let o=uu(e);return Qo.set(t,r),o.observe(t),()=>{Qo.delete(t),o.unobserve(t);}}var cu={some:0,all:1},zr=class extends I{constructor(){super(...arguments),this.hasEnteredView=false,this.isInView=false;}startObserver(){this.unmount();let{viewport:e={}}=this.node.getProps(),{root:r,margin:o,amount:i="some",once:s}=e,n={root:r?r.current:void 0,rootMargin:o,threshold:typeof i=="number"?i:cu[i]},a=l=>{let{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=true),this.node.animationState&&this.node.animationState.setActive("whileInView",u);let{onViewportEnter:m,onViewportLeave:c}=this.node.getProps(),f=u?m:c;f&&f(l);};return ha(this.node.current,n,a)}mount(){this.startObserver();}update(){if(typeof IntersectionObserver>"u")return;let{props:e,prevProps:r}=this.node;["amount","margin","root"].some(fu(e,r))&&this.startObserver();}unmount(){}};function fu({viewport:t={}},{viewport:e={}}={}){return r=>t[r]!==e[r]}var da={inView:{Feature:zr},tap:{Feature:$r},focus:{Feature:Wr},hover:{Feature:Gr}};var ga={layout:{ProjectionNode:Ur,MeasureLayout:kr}};var Le={current:null},Hr={current:false};function ya(){if(Hr.current=true,!!Kt)if(window.matchMedia){let t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Le.current=t.matches;t.addListener(e),e();}else Le.current=false;}var xa=new WeakMap;function va(t,e,r){for(let o in e){let i=e[o],s=r[o];if(w(i))t.addValue(o,i);else if(w(s))t.addValue(o,ft(i,{owner:t}));else if(s!==i)if(t.hasValue(o)){let n=t.getValue(o);n.liveStyle===true?n.jump(i):n.hasAnimated||n.set(i);}else {let n=t.getStaticValue(o);t.addValue(o,ft(n!==void 0?n:i,{owner:t}));}}for(let o in r)e[o]===void 0&&t.removeValue(o);return e}var _r=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);var Yr=t=>/^0[^.\s]+$/u.test(t);var Ta={test:t=>t==="auto",parse:t=>t};var Xr=t=>e=>e.test(t);var ti=[et,x,W,rt,Mi,Ai,Ta],ei=t=>ti.find(Xr(t));var pu=[...ti,B,$],Sa=t=>pu.find(Xr(t));var hu=new Set(["brightness","contrast","saturate","opacity"]);function du(t){let[e,r]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;let[o]=r.match(ie)||[];if(!o)return t;let i=r.replace(o,""),s=hu.has(e)?1:0;return o!==r&&(s*=100),e+"("+s+i+")"}var gu=/\b([a-z-]*)\(.*?\)/gu,Be={...$,getAnimatableNone:t=>{let e=t.match(gu);return e?e.map(du).join(" "):t}};var yu={...Yt,color:B,backgroundColor:B,outlineColor:B,fill:B,stroke:B,borderColor:B,borderTopColor:B,borderRightColor:B,borderBottomColor:B,borderLeftColor:B,filter:Be,WebkitFilter:Be},qr=t=>yu[t];function Zr(t,e){let r=qr(t);return r!==Be&&(r=$),r.getAnimatableNone?r.getAnimatableNone(e):void 0}var Va=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Jr=class{scrapeMotionValuesFromProps(e,r,o){return {}}constructor({parent:e,props:r,presenceContext:o,reducedMotionConfig:i,blockInitialAnimation:s,visualState:n},a={}){this.current=null,this.children=new Set,this.isVariantNode=false,this.isControllingVariants=false,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Mt,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection));},this.renderScheduledAt=0,this.scheduleRender=()=>{let f=L.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,V.render(this.render,false,true));};let{latestValues:l,renderState:u}=n;this.latestValues=l,this.baseTarget={...l},this.initialValues=r.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=r,this.presenceContext=o,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=Dt(r),this.isVariantNode=Ue(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:m,...c}=this.scrapeMotionValuesFromProps(r,{},this);for(let f in c){let p=c[f];l[f]!==void 0&&w(p)&&p.set(l[f],false);}}mount(e){this.current=e,xa.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,o)=>this.bindToMotionValue(o,r)),Hr.current||ya(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?false:this.reducedMotionConfig==="always"?true:Le.current,process.env.NODE_ENV!=="production"&&Wt(this.shouldReduceMotion!==true,"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(),Y(this.notifyUpdate),Y(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let r=this.features[e];r&&(r.unmount(),r.isMounted=false);}this.current=null;}bindToMotionValue(e,r){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();let o=Z.has(e);o&&this.onBindTransform&&this.onBindTransform();let i=r.on("change",a=>{this.latestValues[e]=a,this.props.onUpdate&&V.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=true);}),s=r.on("renderRequest",this.scheduleRender),n;window.MotionCheckAppearSync&&(n=window.MotionCheckAppearSync(this,e,r)),this.valueSubscriptions.set(e,()=>{i(),s(),n&&n(),r.owner&&r.stop();});}sortNodePosition(e){return !this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in at){let r=at[e];if(!r)continue;let{isEnabled:o,Feature:i}=r;if(!this.features[e]&&i&&o(this.props)&&(this.features[e]=new i(this)),this.features[e]){let s=this.features[e];s.isMounted?s.update():(s.mount(),s.isMounted=true);}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props);}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):D()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,r){this.latestValues[e]=r;}update(e,r){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let o=0;o<Va.length;o++){let i=Va[o];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);let s="on"+i,n=e[s];n&&(this.propEventSubscriptions[i]=this.on(i,n));}this.prevMotionValues=va(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue();}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let r=this.getClosestVariantNode();if(r)return r.variantChildren&&r.variantChildren.add(e),()=>r.variantChildren.delete(e)}addValue(e,r){let o=this.values.get(e);r!==o&&(o&&this.removeValue(e),this.bindToMotionValue(e,r),this.values.set(e,r),this.latestValues[e]=r.get());}removeValue(e){this.values.delete(e);let r=this.valueSubscriptions.get(e);r&&(r(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState);}hasValue(e){return this.values.has(e)}getValue(e,r){if(this.props.values&&this.props.values[e])return this.props.values[e];let o=this.values.get(e);return o===void 0&&r!==void 0&&(o=ft(r===null?void 0:r,{owner:this}),this.addValue(e,o)),o}readValue(e,r){let o=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return o!=null&&(typeof o=="string"&&(_r(o)||Yr(o))?o=parseFloat(o):!Sa(o)&&$.test(r)&&(o=Zr(e,r)),this.setBaseTarget(e,w(o)?o.get():o)),w(o)?o.get():o}setBaseTarget(e,r){this.baseTarget[e]=r;}getBaseTarget(e){let{initial:r}=this.props,o;if(typeof r=="string"||typeof r=="object"){let s=Jt(this.props,r,this.presenceContext?.custom);s&&(o=s[e]);}if(r&&o!==void 0)return o;let i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!w(i)?i:this.initialValues[e]!==void 0&&o===void 0?void 0:this.baseTarget[e]}on(e,r){return this.events[e]||(this.events[e]=new vt),this.events[e].add(r)}notify(e,...r){this.events[e]&&this.events[e].notify(...r);}};var xu=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function vu(t){let e=xu.exec(t);if(!e)return [,];let[,r,o,i]=e;return [`--${r??o}`,i]}var Tu=4;function ri(t,e,r=1){N(r<=Tu,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);let[o,i]=vu(t);if(!o)return;let s=window.getComputedStyle(e).getPropertyValue(o);if(s){let n=s.trim();return _r(n)?parseFloat(n):n}return _t(i)?ri(i,e,r+1):i}function ba(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Yr(t):true}var Su=new Set(["auto","none","0"]);function Pa(t,e,r){let o=0,i;for(;o<t.length&&!i;){let s=t[o];typeof s=="string"&&!Su.has(s)&&Rt(s).values.length&&(i=t[o]),o++;}if(i&&r)for(let s of e)t[s]=Zr(r,i);}var Qr=class extends Mt{constructor(e,r,o,i,s){super(e,r,o,i,s,true);}readKeyframes(){let{unresolvedKeyframes:e,element:r,name:o}=this;if(!r||!r.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let u=e[l];if(typeof u=="string"&&(u=u.trim(),_t(u))){let m=ri(u,r.current);m!==void 0&&(e[l]=m),l===e.length-1&&(this.finalKeyframe=u);}}if(this.resolveNoneKeyframes(),!Vr.has(o)||e.length!==2)return;let[i,s]=e,n=ei(i),a=ei(s);if(n!==a)if(Po(n)&&Po(a))for(let l=0;l<e.length;l++){let u=e[l];typeof u=="string"&&(e[l]=parseFloat(u));}else At[o]&&(this.needsMeasurement=true);}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:r}=this,o=[];for(let i=0;i<e.length;i++)(e[i]===null||ba(e[i]))&&o.push(i);o.length&&Pa(e,o,r);}measureInitialState(){let{element:e,unresolvedKeyframes:r,name:o}=this;if(!e||!e.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=At[o](e.measureViewportBox(),window.getComputedStyle(e.current)),r[0]=this.measuredOrigin;let i=r[r.length-1];i!==void 0&&e.getValue(o,i).jump(i,false);}measureEndState(){let{element:e,name:r,unresolvedKeyframes:o}=this;if(!e||!e.current)return;let i=e.getValue(r);i&&i.jump(this.measuredOrigin,false);let s=o.length-1,n=o[s];o[s]=At[r](e.measureViewportBox(),window.getComputedStyle(e.current)),n!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=n),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,l])=>{e.getValue(a).set(l);}),this.resolveNoneKeyframes();}};var ve=class extends Jr{constructor(){super(...arguments),this.KeyframeResolver=Qr;}sortInstanceNodePosition(e,r){return e.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(e,r){return e.style?e.style[r]:void 0}removeValueFromRenderState(e,{vars:r,style:o}){delete r[e],delete o[e];}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;w(e)&&(this.childSubscription=e.on("change",r=>{this.current&&(this.current.textContent=`${r}`);}));}};function to(t,{style:e,vars:r},o,i){Object.assign(t.style,e,i&&i.getProjectionStyles(o));for(let s in r)t.style.setProperty(s,r[s]);}function Vu(t){return window.getComputedStyle(t)}var eo=class extends ve{constructor(){super(...arguments),this.type="html",this.renderInstance=to;}readValueFromInstance(e,r){if(Z.has(r))return bn(e,r);{let o=Vu(e),i=(Ht(r)?o.getPropertyValue(r):o[r])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:r}){return Io(e,r)}build(e,r,o){Xt(e,r,o.transformTemplate);}scrapeMotionValuesFromProps(e,r,o){return te(e,r,o)}};var ro=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 Aa(t,e,r,o){to(t,e,void 0,o);for(let i in e.attrs)t.setAttribute(ro.has(i)?i:$t(i),e.attrs[i]);}var oo=class extends ve{constructor(){super(...arguments),this.type="svg",this.isSVGTag=false,this.measureInstanceViewportBox=D;}getBaseTargetFromProps(e,r){return e[r]}readValueFromInstance(e,r){if(Z.has(r)){let o=qr(r);return o&&o.default||0}return r=ro.has(r)?r:$t(r),e.getAttribute(r)}scrapeMotionValuesFromProps(e,r,o){return Xe(e,r,o)}build(e,r,o){ze(e,r,this.isSVGTag,o.transformTemplate,o.style);}renderInstance(e,r,o,i){Aa(e,r,o,i);}mount(e){this.isSVGTag=_e(e.tagName),super.mount(e);}};var Ma=(t,e)=>Zt(t)?new oo(e):new eo(e,{allowProjection:t!==Fragment});var wa=ji({...Wn,...da,...oa,...ga},Ma);var io=hi(wa);function Pu({children:t,className:e,characterVariants:r,dadElement:o,onCharacterAnimationComplete:i,key:s}){if(typeof t=="string"){let n=t.split("").map((a,l)=>{let u=useRef(null);return jsx(io.span,{ref:u,className:e,variants:r,onAnimationComplete:i?()=>{i(u);}:void 0,children:a},`span-${s}-${a}-${l}`)});return o(n,true)}else if(Array.isArray(t)){let n=t.map(a=>typeof a=="string"?a.split("").map((u,m)=>{let c=useRef(null);return jsx(io.span,{ref:c,className:e,variants:r,onAnimationComplete:i?()=>{i(c);}:void 0,children:u},`span-${s}-${u}-${m}`)}):a);return o(n)}return o(t,true)}export{Pu as default};
|
|
1
|
+
import {createContext,useRef,useContext,forwardRef,useMemo,useInsertionEffect,useLayoutEffect,useEffect,useCallback,Fragment,createElement,useId,Component}from'react';import {jsx,jsxs}from'react/jsx-runtime';var ka=Object.create;var ni=Object.defineProperty;var Oa=Object.getOwnPropertyDescriptor;var Ia=Object.getOwnPropertyNames;var ja=Object.getPrototypeOf,Na=Object.prototype.hasOwnProperty;var Ua=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var Ka=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Ga=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Ia(e))!Na.call(t,i)&&i!==r&&ni(t,i,{get:()=>e[i],enumerable:!(o=Oa(e,i))||o.enumerable});return t};var Wa=(t,e,r)=>(r=t!=null?ka(ja(t)):{},Ga(!t||!t.__esModule?ni(r,"default",{value:t,enumerable:true}):r,t));var ai=Ka((Gm,si)=>{si.exports=function(){return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g};});var Ra=Wa(ai());var Le=createContext({});function ui(t){let e=useRef(null);return e.current===null&&(e.current=t()),e.current}var Kt=typeof window<"u";var li=Kt?useLayoutEffect:useEffect;var Gt=createContext(null);var ke=createContext({transformPagePoint:t=>t,isStatic:false,reducedMotion:"never"});function mi(t=true){let e=useContext(Gt);if(e===null)return [true,null];let{isPresent:r,onExitComplete:o,register:i}=e,s=useId();useEffect(()=>{if(t)return i(s)},[t]);let n=useCallback(()=>t&&o&&o(s),[s,o,t]);return !r&&o?[false,n]:[true]}var ye=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Di(t,e){let r=new Set,o=new Set,i=false,s=false,n=new WeakSet,a={delta:0,timestamp:0,isProcessing:false};function m(D){n.has(D)&&(l.schedule(D),t()),D(a);}let l={schedule:(D,c=false,f=false)=>{let g=f&&i?r:o;return c&&n.add(D),g.has(D)||g.add(D),D},cancel:D=>{o.delete(D),n.delete(D);},process:D=>{if(a=D,i){s=true;return}i=true,[r,o]=[o,r],r.forEach(m),r.clear(),i=false,s&&(s=false,l.process(D));}};return l}var G={};var tu=40;function Oe(t,e){let r=false,o=true,i={delta:0,timestamp:0,isProcessing:false},s=()=>r=true,n=ye.reduce((h,T)=>(h[T]=Di(s),h),{}),{setup:a,read:u,resolveKeyframes:m,preUpdate:l,update:D,preRender:c,render:f,postRender:p}=n,g=()=>{let h=G.useManualTiming?i.timestamp:performance.now();r=false,G.useManualTiming||(i.delta=o?1e3/60:Math.max(Math.min(h-i.timestamp,tu),1)),i.timestamp=h,i.isProcessing=true,a.process(i),u.process(i),m.process(i),l.process(i),D.process(i),c.process(i),f.process(i),p.process(i),i.isProcessing=false,r&&e&&(o=false,t(g));},F=()=>{r=true,o=true,i.isProcessing||t(g);};return {schedule:ye.reduce((h,T)=>{let y=n[T];return h[T]=(B,L=false,v=false)=>(r||F(),y.schedule(B,L,v)),h},{}),cancel:h=>{for(let T=0;T<ye.length;T++)n[ye[T]].cancel(h);},state:i,steps:n}}var P=t=>t;var{schedule:E,cancel:Y,state:M,steps:Ie}=Oe(typeof requestAnimationFrame<"u"?requestAnimationFrame:P,true);var je=createContext({strict:false});var ci={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"]},ut={};for(let t in ci)ut[t]={isEnabled:e=>ci[t].some(r=>!!e[r])};function fi(t){for(let e in t)ut[e]={...ut[e],...t[e]};}var ru=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 xe(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||ru.has(t)}var pi=t=>!xe(t);function ou(t){t&&(pi=e=>e.startsWith("on")?!xe(e):t(e));}try{ou(Ua("@emotion/is-prop-valid").default);}catch{}function hi(t,e,r){let o={};for(let i in t)i==="values"&&typeof t.values=="object"||(pi(i)||r===true&&xe(i)||!e&&!xe(i)||t.draggable&&i.startsWith("onDrag"))&&(o[i]=t[i]);return o}var di=new Set;function Wt(t,e,r){t||di.has(e)||(console.warn(e),di.add(e));}function gi(t){if(typeof Proxy>"u")return t;let e=new Map,r=(...o)=>(process.env.NODE_ENV!=="production"&&Wt(false,"motion() is deprecated. Use motion.create() instead."),t(...o));return new Proxy(r,{get:(o,i)=>i==="create"?t:(e.has(i)||e.set(i,t(i)),e.get(i))})}var gt=createContext({});function Ct(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function lt(t){return typeof t=="string"||Array.isArray(t)}var Ne=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ee=["initial",...Ne];function Pt(t){return Ct(t.animate)||Ee.some(e=>lt(t[e]))}function Ue(t){return !!(Pt(t)||t.variants)}function Ci(t,e){if(Pt(t)){let{initial:r,animate:o}=t;return {initial:r===false||lt(r)?r:void 0,animate:lt(o)?o:void 0}}return t.inherit!==false?e:{}}function yi(t){let{initial:e,animate:r}=Ci(t,useContext(gt));return useMemo(()=>({initial:e,animate:r}),[Fi(e),Fi(r)])}function Fi(t){return Array.isArray(t)?t.join(" "):t}var xi=Symbol.for("motionComponentSymbol");function mt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Ei(t,e,r){return useCallback(o=>{o&&t.onMount&&t.onMount(o),e&&(o?e.mount(o):e.unmount()),r&&(typeof r=="function"?r(o):mt(r)&&(r.current=o));},[e])}var $t=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase();var uu="framerAppearId",Ke="data-"+$t(uu);var Ge=createContext({});var{schedule:zt}=Oe(queueMicrotask,false);function vi(t,e,r,o,i){let{visualElement:s}=useContext(gt),n=useContext(je),a=useContext(Gt),u=useContext(ke).reducedMotion,m=useRef(null);o=o||n.renderer,!m.current&&o&&(m.current=o(t,{visualState:e,parent:s,props:r,presenceContext:a,blockInitialAnimation:a?a.initial===false:false,reducedMotionConfig:u}));let l=m.current,D=useContext(Ge);l&&!l.projection&&i&&(l.type==="html"||l.type==="svg")&&cu(m.current,r,i,D);let c=useRef(false);useInsertionEffect(()=>{l&&c.current&&l.update(r,a);});let f=r[Ke],p=useRef(!!f&&!window.MotionHandoffIsComplete?.(f)&&window.MotionHasOptimisedAnimation?.(f));return li(()=>{l&&(c.current=true,window.MotionIsMounted=true,l.updateFeatures(),zt.render(l.render),p.current&&l.animationState&&l.animationState.animateChanges());}),useEffect(()=>{l&&(!p.current&&l.animationState&&l.animationState.animateChanges(),p.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(f);}),p.current=false));}),l}function cu(t,e,r,o){let{layoutId:i,layout:s,drag:n,dragConstraints:a,layoutScroll:u,layoutRoot:m,layoutCrossfade:l}=e;t.projection=new r(t.latestValues,e["data-framer-portal-id"]?void 0:Ai(t.parent)),t.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!n||a&&mt(a),visualElement:t,animationType:typeof s=="string"?s:"both",initialPromotionConfig:o,crossfade:l,layoutScroll:u,layoutRoot:m});}function Ai(t){if(t)return t.options.allowProjection!==false?t.projection:Ai(t.parent)}var Q=()=>{},N=()=>{};process.env.NODE_ENV!=="production"&&(Q=(t,e)=>{!t&&typeof console<"u"&&console.warn(e);},N=(t,e)=>{if(!t)throw new Error(e)});function Ti({preloadedFeatures:t,createVisualElement:e,useRender:r,useVisualState:o,Component:i}){t&&fi(t);function s(a,u){let m,l={...useContext(ke),...a,layoutId:du(a)},{isStatic:D}=l,c=yi(a),f=o(a,D);if(!D&&Kt){gu(l,t);let p=Cu(l);m=p.MeasureLayout,c.visualElement=vi(i,f,l,e,p.ProjectionNode);}return jsxs(gt.Provider,{value:c,children:[m&&c.visualElement?jsx(m,{visualElement:c.visualElement,...l}):null,r(i,a,Ei(f,c.visualElement,u),f,D,c.visualElement)]})}s.displayName=`motion.${typeof i=="string"?i:`create(${i.displayName??i.name??""})`}`;let n=forwardRef(s);return n[xi]=i,n}function du({layoutId:t}){let e=useContext(Le).id;return e&&t!==void 0?e+"-"+t:t}function gu(t,e){let r=useContext(je).strict;if(process.env.NODE_ENV!=="production"&&e&&r){let o="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?Q(false,o):N(false,o);}}function Cu(t){let{drag:e,layout:r}=ut;if(!e&&!r)return {};let o={...e,...r};return {MeasureLayout:e?.isEnabled(t)||r?.isEnabled(t)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}var Bi=t=>e=>typeof e=="string"&&e.startsWith(t),Ht=Bi("--"),Fu=Bi("var(--"),_t=t=>Fu(t)?yu.test(t.split("/*")[0].trim()):false,yu=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;var Mt={};function Si(t){for(let e in t)Mt[e]=t[e],Ht(e)&&(Mt[e].isCSSVariable=true);}var et=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Z=new Set(et);function We(t,{layout:e,layoutId:r}){return Z.has(t)||t.startsWith("origin")||(e||r!==void 0)&&(!!Mt[t]||t==="opacity")}var S=t=>!!(t&&t.getVelocity);var $e=(t,e)=>e&&typeof t=="number"?e.transform(t):t;var j=(t,e,r)=>r>e?e:r<t?t:r;var rt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Dt={...rt,transform:t=>j(0,1,t)},Ae={...rt,default:1};var lo={...rt,transform:Math.round};var Te=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),ot=Te("deg"),W=Te("%"),C=Te("px"),Vi=Te("vh"),bi=Te("vw"),mo={...W,parse:t=>W.parse(t)/100,transform:t=>W.transform(t*100)};var Pi={rotate:ot,rotateX:ot,rotateY:ot,rotateZ:ot,scale:Ae,scaleX:Ae,scaleY:Ae,scaleZ:Ae,skew:ot,skewX:ot,skewY:ot,distance:C,translateX:C,translateY:C,translateZ:C,x:C,y:C,z:C,perspective:C,transformPerspective:C,opacity:Dt,originX:mo,originY:mo,originZ:C};var Yt={borderWidth:C,borderTopWidth:C,borderRightWidth:C,borderBottomWidth:C,borderLeftWidth:C,borderRadius:C,radius:C,borderTopLeftRadius:C,borderTopRightRadius:C,borderBottomRightRadius:C,borderBottomLeftRadius:C,width:C,maxWidth:C,height:C,maxHeight:C,top:C,right:C,bottom:C,left:C,padding:C,paddingTop:C,paddingRight:C,paddingBottom:C,paddingLeft:C,margin:C,marginTop:C,marginRight:C,marginBottom:C,marginLeft:C,backgroundPositionX:C,backgroundPositionY:C,...Pi,zIndex:lo,fillOpacity:Dt,strokeOpacity:Dt,numOctaves:lo};var xu={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Eu=et.length;function Mi(t,e,r){let o="",i=true;for(let s=0;s<Eu;s++){let n=et[s],a=t[n];if(a===void 0)continue;let u=true;if(typeof a=="number"?u=a===(n.startsWith("scale")?1:0):u=parseFloat(a)===0,!u||r){let m=$e(a,Yt[n]);if(!u){i=false;let l=xu[n]||n;o+=`${l}(${m}) `;}r&&(e[n]=m);}}return o=o.trim(),r?o=r(e,i?"":o):i&&(o="none"),o}function Xt(t,e,r){let{style:o,vars:i,transformOrigin:s}=t,n=false,a=false;for(let u in e){let m=e[u];if(Z.has(u)){n=true;continue}else if(Ht(u)){i[u]=m;continue}else {let l=$e(m,Yt[u]);u.startsWith("origin")?(a=true,s[u]=l):o[u]=l;}}if(e.transform||(n||r?o.transform=Mi(e,t.transform,r):o.transform&&(o.transform="none")),a){let{originX:u="50%",originY:m="50%",originZ:l=0}=s;o.transformOrigin=`${u} ${m} ${l}`;}}var qt=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Do(t,e,r){for(let o in e)!S(e[o])&&!We(o,r)&&(t[o]=e[o]);}function Au({transformTemplate:t},e){return useMemo(()=>{let r=qt();return Xt(r,e,t),Object.assign({},r.vars,r.style)},[e])}function Tu(t,e){let r=t.style||{},o={};return Do(o,r,t),Object.assign(o,Au(t,e)),o}function wi(t,e){let r={},o=Tu(t,e);return t.drag&&t.dragListener!==false&&(r.draggable=false,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=t.drag===true?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(r.tabIndex=0),r.style=o,r}var Ri=["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 Zt(t){return typeof t!="string"||t.includes("-")?false:!!(Ri.indexOf(t)>-1||/[A-Z]/u.test(t))}var Bu={offset:"stroke-dashoffset",array:"stroke-dasharray"},Su={offset:"strokeDashoffset",array:"strokeDasharray"};function Li(t,e,r=1,o=0,i=true){t.pathLength=1;let s=i?Bu:Su;t[s.offset]=C.transform(-o);let n=C.transform(e),a=C.transform(r);t[s.array]=`${n} ${a}`;}function ze(t,{attrX:e,attrY:r,attrScale:o,pathLength:i,pathSpacing:s=1,pathOffset:n=0,...a},u,m,l){if(Xt(t,a,m),u){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};let{attrs:D,style:c}=t;D.transform&&(c.transform=D.transform,delete D.transform),(c.transform||D.transformOrigin)&&(c.transformOrigin=D.transformOrigin??"50% 50%",delete D.transformOrigin),c.transform&&(c.transformBox=l?.transformBox??"fill-box",delete D.transformBox),e!==void 0&&(D.x=e),r!==void 0&&(D.y=r),o!==void 0&&(D.scale=o),i!==void 0&&Li(D,i,s,n,false);}var He=()=>({...qt(),attrs:{}});var _e=t=>typeof t=="string"&&t.toLowerCase()==="svg";function ki(t,e,r,o){let i=useMemo(()=>{let s=He();return ze(s,e,_e(o),t.transformTemplate,t.style),{...s.attrs,style:{...s.style}}},[e]);if(t.style){let s={};Do(s,t.style,t),i.style={...s,...i.style};}return i}function Oi(t=false){return (r,o,i,{latestValues:s},n)=>{let u=(Zt(r)?ki:wi)(o,s,n,r),m=hi(o,typeof r=="string",t),l=r!==Fragment?{...m,...u,ref:i}:{},{children:D}=o,c=useMemo(()=>S(D)?D.get():D,[D]);return createElement(r,{...l,children:c})}}function Ii(t){let e=[{},{}];return t?.values.forEach((r,o)=>{e[0][o]=r.get(),e[1][o]=r.getVelocity();}),e}function Jt(t,e,r,o){if(typeof e=="function"){let[i,s]=Ii(o);e=e(r!==void 0?r:t.custom,i,s);}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){let[i,s]=Ii(o);e=e(r!==void 0?r:t.custom,i,s);}return e}function Qt(t){return S(t)?t.get():t}function wu({scrapeMotionValuesFromProps:t,createRenderState:e},r,o,i){return {latestValues:Ru(r,o,i,t),renderState:e()}}var Ye=t=>(e,r)=>{let o=useContext(gt),i=useContext(Gt),s=()=>wu(t,e,o,i);return r?s():ui(s)};function Ru(t,e,r,o){let i={},s=o(t,{});for(let c in s)i[c]=Qt(s[c]);let{initial:n,animate:a}=t,u=Pt(t),m=Ue(t);e&&m&&!u&&t.inherit!==false&&(n===void 0&&(n=e.initial),a===void 0&&(a=e.animate));let l=r?r.initial===false:false;l=l||n===false;let D=l?a:n;if(D&&typeof D!="boolean"&&!Ct(D)){let c=Array.isArray(D)?D:[D];for(let f=0;f<c.length;f++){let p=Jt(t,c[f]);if(p){let{transitionEnd:g,transition:F,...d}=p;for(let x in d){let h=d[x];if(Array.isArray(h)){let T=l?h.length-1:0;h=h[T];}h!==null&&(i[x]=h);}for(let x in g)i[x]=g[x];}}}return i}function te(t,e,r){let{style:o}=t,i={};for(let s in o)(S(o[s])||e.style&&S(e.style[s])||We(s,t)||r?.getValue(s)?.liveStyle!==void 0)&&(i[s]=o[s]);return i}var Ni={useVisualState:Ye({scrapeMotionValuesFromProps:te,createRenderState:qt})};function Xe(t,e,r){let o=te(t,e,r);for(let i in t)if(S(t[i])||S(e[i])){let s=et.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;o[s]=t[i];}return o}var Ui={useVisualState:Ye({scrapeMotionValuesFromProps:Xe,createRenderState:He})};function Ki(t,e){return function(o,{forwardMotionProps:i}={forwardMotionProps:false}){let n={...Zt(o)?Ui:Ni,preloadedFeatures:t,useRender:Oi(i),createVisualElement:e,Component:o};return Ti(n)}}function ct(t,e,r){let o=t.getProps();return Jt(o,e,r!==void 0?r:o.custom,t)}var Be=t=>Array.isArray(t);var qe;function Lu(){qe=void 0;}var w={now:()=>(qe===void 0&&w.set(M.isProcessing||G.useManualTiming?M.timestamp:performance.now()),qe),set:t=>{qe=t,queueMicrotask(Lu);}};function ee(t,e){t.indexOf(e)===-1&&t.push(e);}function re(t,e){let r=t.indexOf(e);r>-1&&t.splice(r,1);}var Ft=class{constructor(){this.subscriptions=[];}add(e){return ee(this.subscriptions,e),()=>re(this.subscriptions,e)}notify(e,r,o){let i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,r,o);else for(let s=0;s<i;s++){let n=this.subscriptions[s];n&&n(e,r,o);}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0;}};function Ze(t,e){return e?t*(1e3/e):0}var Gi=30,ku=t=>!isNaN(parseFloat(t)),co=class{constructor(e,r={}){this.version="__VERSION__",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(o,i=true)=>{let s=w.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let n of this.dependents)n.dirty();i&&this.events.renderRequest?.notify(this.current);},this.hasAnimated=false,this.setCurrent(e),this.owner=r.owner;}setCurrent(e){this.current=e,this.updatedAt=w.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=ku(this.current));}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt;}onChange(e){return process.env.NODE_ENV!=="production"&&Wt(false,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,r){this.events[e]||(this.events[e]=new Ft);let o=this.events[e].add(r);return e==="change"?()=>{o(),E.read(()=>{this.events.change.getSize()||this.stop();});}:o}clearListeners(){for(let e in this.events)this.events[e].clear();}attach(e,r){this.passiveEffect=e,this.stopPassiveEffect=r;}set(e,r=true){!r||!this.passiveEffect?this.updateAndNotify(e,r):this.passiveEffect(e,this.updateAndNotify);}setWithVelocity(e,r,o){this.set(r),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-o;}jump(e,r=true){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect();}dirty(){this.events.change?.notify(this.current);}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e);}removeDependent(e){this.dependents&&this.dependents.delete(e);}get(){return this.current}getPrevious(){return this.prev}getVelocity(){let e=w.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Gi)return 0;let r=Math.min(this.updatedAt-this.prevUpdatedAt,Gi);return Ze(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(e){return this.stop(),new Promise(r=>{this.hasAnimated=true,this.animation=e(r),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.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect();}};function tt(t,e){return new co(t,e)}function Ou(t,e,r){t.hasValue(e)?t.getValue(e).set(r):t.addValue(e,tt(r));}function Iu(t){return Be(t)?t[t.length-1]||0:t}function $i(t,e){let r=ct(t,e),{transitionEnd:o={},transition:i={},...s}=r||{};s={...s,...o};for(let n in s){let a=Iu(s[n]);Ou(t,n,a);}}function zi(t){return !!(S(t)&&t.add)}function Se(t,e){let r=t.getValue("willChange");if(zi(r))return r.add(e);if(!r&&G.WillChange){let o=new G.WillChange("auto");t.addValue("willChange",o),o.add(e);}}function Je(t){return t.props[Ke]}var ju=t=>t!==null;function Hi(t,{repeat:e,repeatType:r="loop"},o){let i=t.filter(ju),s=e&&r!=="loop"&&e%2===1?0:i.length-1;return !s||o===void 0?i[s]:o}var Nu={type:"spring",stiffness:500,damping:25,restSpeed:10},Uu=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Ku={type:"keyframes",duration:.8},Gu={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},_i=(t,{keyframes:e})=>e.length>2?Ku:Z.has(t)?t.startsWith("scale")?Uu(e[1]):Nu:Gu;function Yi({when:t,delay:e,delayChildren:r,staggerChildren:o,staggerDirection:i,repeat:s,repeatType:n,repeatDelay:a,from:u,elapsed:m,...l}){return !!Object.keys(l).length}function oe(t,e){return t?.[e]??t?.default??t}var O=t=>t*1e3,U=t=>t/1e3;var yt=t=>Math.round(t*1e5)/1e5;var ie=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Xi(t){return t==null}var qi=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;var ne=(t,e)=>r=>!!(typeof r=="string"&&qi.test(r)&&r.startsWith(t)||e&&!Xi(r)&&Object.prototype.hasOwnProperty.call(r,e)),Qe=(t,e,r)=>o=>{if(typeof o!="string")return o;let[i,s,n,a]=o.match(ie);return {[t]:parseFloat(i),[e]:parseFloat(s),[r]:parseFloat(n),alpha:a!==void 0?parseFloat(a):1}};var Wu=t=>j(0,255,t),fo={...rt,transform:t=>Math.round(Wu(t))},nt={test:ne("rgb","red"),parse:Qe("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:o=1})=>"rgba("+fo.transform(t)+", "+fo.transform(e)+", "+fo.transform(r)+", "+yt(Dt.transform(o))+")"};function $u(t){let e="",r="",o="",i="";return t.length>5?(e=t.substring(1,3),r=t.substring(3,5),o=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),r=t.substring(2,3),o=t.substring(3,4),i=t.substring(4,5),e+=e,r+=r,o+=o,i+=i),{red:parseInt(e,16),green:parseInt(r,16),blue:parseInt(o,16),alpha:i?parseInt(i,16)/255:1}}var Ve={test:ne("#"),parse:$u,transform:nt.transform};var xt={test:ne("hsl","hue"),parse:Qe("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:o=1})=>"hsla("+Math.round(t)+", "+W.transform(yt(e))+", "+W.transform(yt(r))+", "+yt(Dt.transform(o))+")"};var R={test:t=>nt.test(t)||Ve.test(t)||xt.test(t),parse:t=>nt.test(t)?nt.parse(t):xt.test(t)?xt.parse(t):Ve.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?nt.transform(t):xt.transform(t)};var Zi=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function zu(t){return isNaN(t)&&typeof t=="string"&&(t.match(ie)?.length||0)+(t.match(Zi)?.length||0)>0}var Qi="number",tn="color",Hu="var",_u="var(",Ji="${}",Yu=/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 wt(t){let e=t.toString(),r=[],o={color:[],number:[],var:[]},i=[],s=0,a=e.replace(Yu,u=>(R.test(u)?(o.color.push(s),i.push(tn),r.push(R.parse(u))):u.startsWith(_u)?(o.var.push(s),i.push(Hu),r.push(u)):(o.number.push(s),i.push(Qi),r.push(parseFloat(u))),++s,Ji)).split(Ji);return {values:r,split:a,indexes:o,types:i}}function en(t){return wt(t).values}function rn(t){let{split:e,types:r}=wt(t),o=e.length;return i=>{let s="";for(let n=0;n<o;n++)if(s+=e[n],i[n]!==void 0){let a=r[n];a===Qi?s+=yt(i[n]):a===tn?s+=R.transform(i[n]):s+=i[n];}return s}}var Xu=t=>typeof t=="number"?0:t;function qu(t){let e=en(t);return rn(t)(e.map(Xu))}var $={test:zu,parse:en,createTransformer:rn,getAnimatableNone:qu};function po(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function on({hue:t,saturation:e,lightness:r,alpha:o}){t/=360,e/=100,r/=100;let i=0,s=0,n=0;if(!e)i=s=n=r;else {let a=r<.5?r*(1+e):r+e-r*e,u=2*r-a;i=po(u,a,t+1/3),s=po(u,a,t),n=po(u,a,t-1/3);}return {red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(n*255),alpha:o}}function se(t,e){return r=>r>0?e:t}var A=(t,e,r)=>t+(e-t)*r;var ho=(t,e,r)=>{let o=t*t,i=r*(e*e-o)+o;return i<0?0:Math.sqrt(i)},Zu=[Ve,nt,xt],Ju=t=>Zu.find(e=>e.test(t));function nn(t){let e=Ju(t);if(Q(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`),!e)return false;let r=e.parse(t);return e===xt&&(r=on(r)),r}var go=(t,e)=>{let r=nn(t),o=nn(e);if(!r||!o)return se(t,e);let i={...r};return s=>(i.red=ho(r.red,o.red,s),i.green=ho(r.green,o.green,s),i.blue=ho(r.blue,o.blue,s),i.alpha=A(r.alpha,o.alpha,s),nt.transform(i))};var tr=new Set(["none","hidden"]);function sn(t,e){return tr.has(t)?r=>r<=0?t:e:r=>r>=1?e:t}var Qu=(t,e)=>r=>e(t(r)),st=(...t)=>t.reduce(Qu);function tl(t,e){return r=>A(t,e,r)}function er(t){return typeof t=="number"?tl:typeof t=="string"?_t(t)?se:R.test(t)?go:ol:Array.isArray(t)?an:typeof t=="object"?R.test(t)?go:el:se}function an(t,e){let r=[...t],o=r.length,i=t.map((s,n)=>er(s)(s,e[n]));return s=>{for(let n=0;n<o;n++)r[n]=i[n](s);return r}}function el(t,e){let r={...t,...e},o={};for(let i in r)t[i]!==void 0&&e[i]!==void 0&&(o[i]=er(t[i])(t[i],e[i]));return i=>{for(let s in o)r[s]=o[s](i);return r}}function rl(t,e){let r=[],o={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){let s=e.types[i],n=t.indexes[s][o[s]],a=t.values[n]??0;r[i]=a,o[s]++;}return r}var ol=(t,e)=>{let r=$.createTransformer(e),o=wt(t),i=wt(e);return o.indexes.var.length===i.indexes.var.length&&o.indexes.color.length===i.indexes.color.length&&o.indexes.number.length>=i.indexes.number.length?tr.has(t)&&!i.values.length||tr.has(e)&&!o.values.length?sn(t,e):st(an(rl(o,i),i.values),r):(Q(true,`Complex values '${t}' and '${e}' 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.`),se(t,e))};function rr(t,e,r){return typeof t=="number"&&typeof e=="number"&&typeof r=="number"?A(t,e,r):er(t)(t,e)}var un=t=>{let e=({timestamp:r})=>t(r);return {start:(r=true)=>E.update(e,r),stop:()=>Y(e),now:()=>M.isProcessing?M.timestamp:w.now()}};var or=(t,e,r=10)=>{let o="",i=Math.max(Math.round(e/r),2);for(let s=0;s<i;s++)o+=t(s/(i-1))+", ";return `linear(${o.substring(0,o.length-2)})`};function ae(t){let e=0,r=50,o=t.next(e);for(;!o.done&&e<2e4;)e+=r,o=t.next(e);return e>=2e4?1/0:e}function ln(t,e=100,r){let o=r({...t,keyframes:[0,e]}),i=Math.min(ae(o),2e4);return {type:"keyframes",ease:s=>o.next(i*s).value/e,duration:U(i)}}var il=5;function ir(t,e,r){let o=Math.max(e-il,0);return Ze(r-t(o),e-o)}var V={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};var Fo=.001;function mn({duration:t=V.duration,bounce:e=V.bounce,velocity:r=V.velocity,mass:o=V.mass}){let i,s;Q(t<=O(V.maxDuration),"Spring duration must be 10 seconds or less");let n=1-e;n=j(V.minDamping,V.maxDamping,n),t=j(V.minDuration,V.maxDuration,U(t)),n<1?(i=m=>{let l=m*n,D=l*t,c=l-r,f=nr(m,n),p=Math.exp(-D);return Fo-c/f*p},s=m=>{let D=m*n*t,c=D*r+r,f=Math.pow(n,2)*Math.pow(m,2)*t,p=Math.exp(-D),g=nr(Math.pow(m,2),n);return (-i(m)+Fo>0?-1:1)*((c-f)*p)/g}):(i=m=>{let l=Math.exp(-m*t),D=(m-r)*t+1;return -1e-3+l*D},s=m=>{let l=Math.exp(-m*t),D=(r-m)*(t*t);return l*D});let a=5/t,u=sl(i,s,a);if(t=O(t),isNaN(u))return {stiffness:V.stiffness,damping:V.damping,duration:t};{let m=Math.pow(u,2)*o;return {stiffness:m,damping:n*2*Math.sqrt(o*m),duration:t}}}var nl=12;function sl(t,e,r){let o=r;for(let i=1;i<nl;i++)o=o-t(o)/e(o);return o}function nr(t,e){return t*Math.sqrt(1-e*e)}var al=["duration","bounce"],ul=["stiffness","damping","mass"];function Dn(t,e){return e.some(r=>t[r]!==void 0)}function ll(t){let e={velocity:V.velocity,stiffness:V.stiffness,damping:V.damping,mass:V.mass,isResolvedFromDuration:false,...t};if(!Dn(t,ul)&&Dn(t,al))if(t.visualDuration){let r=t.visualDuration,o=2*Math.PI/(r*1.2),i=o*o,s=2*j(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:V.mass,stiffness:i,damping:s};}else {let r=mn(t);e={...e,...r,mass:V.mass},e.isResolvedFromDuration=true;}return e}function ue(t=V.visualDuration,e=V.bounce){let r=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t,{restSpeed:o,restDelta:i}=r,s=r.keyframes[0],n=r.keyframes[r.keyframes.length-1],a={done:false,value:s},{stiffness:u,damping:m,mass:l,duration:D,velocity:c,isResolvedFromDuration:f}=ll({...r,velocity:-U(r.velocity||0)}),p=c||0,g=m/(2*Math.sqrt(u*l)),F=n-s,d=U(Math.sqrt(u/l)),x=Math.abs(F)<5;o||(o=x?V.restSpeed.granular:V.restSpeed.default),i||(i=x?V.restDelta.granular:V.restDelta.default);let h;if(g<1){let y=nr(d,g);h=B=>{let L=Math.exp(-g*d*B);return n-L*((p+g*d*F)/y*Math.sin(y*B)+F*Math.cos(y*B))};}else if(g===1)h=y=>n-Math.exp(-d*y)*(F+(p+d*F)*y);else {let y=d*Math.sqrt(g*g-1);h=B=>{let L=Math.exp(-g*d*B),v=Math.min(y*B,300);return n-L*((p+g*d*F)*Math.sinh(v)+y*F*Math.cosh(v))/y};}let T={calculatedDuration:f&&D||null,next:y=>{let B=h(y);if(f)a.done=y>=D;else {let L=y===0?p:0;g<1&&(L=y===0?O(p):ir(h,y,B));let v=Math.abs(L)<=o,z=Math.abs(n-B)<=i;a.done=v&&z;}return a.value=a.done?n:B,a},toString:()=>{let y=Math.min(ae(T),2e4),B=or(L=>T.next(y*L).value,y,30);return y+"ms "+B},toTransition:()=>{}};return T}ue.applyToOptions=t=>{let e=ln(t,100,ue);return t.ease=e.ease,t.duration=O(e.duration),t.type="keyframes",t};function be({keyframes:t,velocity:e=0,power:r=.8,timeConstant:o=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:n,min:a,max:u,restDelta:m=.5,restSpeed:l}){let D=t[0],c={done:false,value:D},f=v=>a!==void 0&&v<a||u!==void 0&&v>u,p=v=>a===void 0?u:u===void 0||Math.abs(a-v)<Math.abs(u-v)?a:u,g=r*e,F=D+g,d=n===void 0?F:n(F);d!==F&&(g=d-D);let x=v=>-g*Math.exp(-v/o),h=v=>d+x(v),T=v=>{let z=x(v),q=h(v);c.done=Math.abs(z)<=m,c.value=c.done?d:q;},y,B,L=v=>{f(c.value)&&(y=v,B=ue({keyframes:[c.value,p(c.value)],velocity:ir(h,v,c.value),damping:i,stiffness:s,restDelta:m,restSpeed:l}));};return L(0),{calculatedDuration:null,next:v=>{let z=false;return !B&&y===void 0&&(z=true,T(v),L(v)),y!==void 0&&v>=y?B.next(v-y):(!z&&T(v),c)}}}var ft=(t,e,r)=>{let o=e-t;return o===0?1:(r-t)/o};function ml(t,e,r){let o=[],i=r||G.mix||rr,s=t.length-1;for(let n=0;n<s;n++){let a=i(t[n],t[n+1]);if(e){let u=Array.isArray(e)?e[n]||P:e;a=st(u,a);}o.push(a);}return o}function cn(t,e,{clamp:r=true,ease:o,mixer:i}={}){let s=t.length;if(N(s===e.length,"Both input and output ranges must be the same length"),s===1)return ()=>e[0];if(s===2&&e[0]===e[1])return ()=>e[1];let n=t[0]===t[1];t[0]>t[s-1]&&(t=[...t].reverse(),e=[...e].reverse());let a=ml(e,o,i),u=a.length,m=l=>{if(n&&l<t[0])return e[0];let D=0;if(u>1)for(;D<t.length-2&&!(l<t[D+1]);D++);let c=ft(t[D],t[D+1],l);return a[D](c)};return r?l=>m(j(t[0],t[s-1],l)):m}function fn(t,e){let r=t[t.length-1];for(let o=1;o<=e;o++){let i=ft(0,e,o);t.push(A(r,1,i));}}function pn(t){let e=[0];return fn(e,t.length-1),e}function hn(t,e){return t.map(r=>r*e)}var dn=(t,e,r)=>(((1-3*r+3*e)*t+(3*r-6*e))*t+3*e)*t,Dl=1e-7,cl=12;function fl(t,e,r,o,i){let s,n,a=0;do n=e+(r-e)/2,s=dn(n,o,i)-t,s>0?r=n:e=n;while(Math.abs(s)>Dl&&++a<cl);return n}function Et(t,e,r,o){if(t===e&&r===o)return P;let i=s=>fl(s,0,1,t,r);return s=>s===0||s===1?s:dn(i(s),e,o)}var gn=Et(.42,0,1,1),Cn=Et(0,0,.58,1),sr=Et(.42,0,.58,1);var Fn=t=>Array.isArray(t)&&typeof t[0]!="number";var ar=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2;var ur=t=>e=>1-t(1-e);var yo=Et(.33,1.53,.69,.99),Pe=ur(yo),lr=ar(Pe);var mr=t=>(t*=2)<1?.5*Pe(t):.5*(2-Math.pow(2,-10*(t-1)));var Dr=t=>1-Math.sin(Math.acos(t)),cr=ur(Dr),fr=ar(Dr);var pr=t=>Array.isArray(t)&&typeof t[0]=="number";var yn={linear:P,easeIn:gn,easeInOut:sr,easeOut:Cn,circIn:Dr,circInOut:fr,circOut:cr,backIn:Pe,backInOut:lr,backOut:yo,anticipate:mr},pl=t=>typeof t=="string",xo=t=>{if(pr(t)){N(t.length===4,"Cubic bezier arrays must contain four numerical values.");let[e,r,o,i]=t;return Et(e,r,o,i)}else if(pl(t))return N(yn[t]!==void 0,`Invalid easing type '${t}'`),yn[t];return t};function hl(t,e){return t.map(()=>e||sr).splice(0,t.length-1)}function vt({duration:t=300,keyframes:e,times:r,ease:o="easeInOut"}){let i=Fn(o)?o.map(xo):xo(o),s={done:false,value:e[0]},n=hn(r&&r.length===e.length?r:pn(e),t),a=cn(n,e,{ease:Array.isArray(i)?i:hl(e,i)});return {calculatedDuration:t,next:u=>(s.value=a(u),s.done=u>=t,s)}}var dl=t=>t!==null;function le(t,{repeat:e,repeatType:r="loop"},o,i=1){let s=t.filter(dl),a=i<0||e&&r!=="loop"&&e%2===1?0:s.length-1;return !a||o===void 0?s[a]:o}var gl={decay:be,inertia:be,tween:vt,keyframes:vt,spring:ue};function hr(t){typeof t.type=="string"&&(t.type=gl[t.type]);}var At=class{constructor(){this.count=0,this.updateFinished();}get finished(){return this._finished}updateFinished(){this.count++,this._finished=new Promise(e=>{this.resolve=e;});}notifyFinished(){this.resolve();}then(e,r){return this.finished.then(e,r)}};var Cl=t=>t/100,Tt=class extends At{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=false,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=(r=true)=>{if(r){let{motionValue:i}=this.options;i&&i.updatedAt!==w.now()&&this.tick(w.now());}if(this.isStopped=true,this.state==="idle")return;this.teardown();let{onStop:o}=this.options;o&&o();},this.options=e,this.initAnimation(),this.play(),e.autoplay===false&&this.pause();}initAnimation(){let{options:e}=this;hr(e);let{type:r=vt,repeat:o=0,repeatDelay:i=0,repeatType:s,velocity:n=0}=e,{keyframes:a}=e,u=r||vt;process.env.NODE_ENV!=="production"&&u!==vt&&N(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`),u!==vt&&typeof a[0]!="number"&&(this.mixKeyframes=st(Cl,rr(a[0],a[1])),a=[0,100]);let m=u({...e,keyframes:a});s==="mirror"&&(this.mirroredGenerator=u({...e,keyframes:[...a].reverse(),velocity:-n})),m.calculatedDuration===null&&(m.calculatedDuration=ae(m));let{calculatedDuration:l}=m;this.calculatedDuration=l,this.resolvedDuration=l+i,this.totalDuration=this.resolvedDuration*(o+1)-i,this.generator=m;}updateTime(e){let r=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=r;}tick(e,r=false){let{generator:o,totalDuration:i,mixKeyframes:s,mirroredGenerator:n,resolvedDuration:a,calculatedDuration:u}=this;if(this.startTime===null)return o.next(0);let{delay:m=0,keyframes:l,repeat:D,repeatType:c,repeatDelay:f,type:p,onUpdate:g,finalKeyframe:F}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),r?this.currentTime=e:this.updateTime(e);let d=this.currentTime-m*(this.playbackSpeed>=0?1:-1),x=this.playbackSpeed>=0?d<0:d>i;this.currentTime=Math.max(d,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let h=this.currentTime,T=o;if(D){let v=Math.min(this.currentTime,i)/a,z=Math.floor(v),q=v%1;!q&&v>=1&&(q=1),q===1&&z--,z=Math.min(z,D+1),!!(z%2)&&(c==="reverse"?(q=1-q,f&&(q-=f/a)):c==="mirror"&&(T=n)),h=j(0,1,q)*a;}let y=x?{done:false,value:l[0]}:T.next(h);s&&(y.value=s(y.value));let{done:B}=y;!x&&u!==null&&(B=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);let L=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&B);return L&&p!==be&&(y.value=le(l,this.options,F,this.speed)),g&&g(y.value),L&&this.finish(),y}then(e,r){return this.finished.then(e,r)}get duration(){return U(this.calculatedDuration)}get time(){return U(this.currentTime)}set time(e){e=O(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?.start(false);}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(w.now());let r=this.playbackSpeed!==e;this.playbackSpeed=e,r&&(this.time=U(this.currentTime));}play(){if(this.isStopped)return;let{driver:e=un,onPlay:r,startTime:o}=this.options;this.driver||(this.driver=e(s=>this.tick(s))),r&&r();let i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=o??i),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start();}pause(){this.state="paused",this.updateTime(w.now()),this.holdTime=this.currentTime;}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null;}finish(){this.teardown(),this.state="finished";let{onComplete:e}=this.options;e&&e();}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown();}teardown(){this.notifyFinished(),this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null;}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0);}sample(e){return this.startTime=0,this.tick(e,true)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}};function xn(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1]);}var Rt=t=>t*180/Math.PI,Eo=t=>{let e=Rt(Math.atan2(t[1],t[0]));return vo(e)},Fl={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Eo,rotateZ:Eo,skewX:t=>Rt(Math.atan(t[1])),skewY:t=>Rt(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},vo=t=>(t=t%360,t<0&&(t+=360),t),En=Eo,vn=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),An=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),yl={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:vn,scaleY:An,scale:t=>(vn(t)+An(t))/2,rotateX:t=>vo(Rt(Math.atan2(t[6],t[5]))),rotateY:t=>vo(Rt(Math.atan2(-t[2],t[0]))),rotateZ:En,rotate:En,skewX:t=>Rt(Math.atan(t[4])),skewY:t=>Rt(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Tn(t){return t.includes("scale")?1:0}function dr(t,e){if(!t||t==="none")return Tn(e);let r=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),o,i;if(r)o=yl,i=r;else {let a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);o=Fl,i=a;}if(!i)return Tn(e);let s=o[e],n=i[1].split(",").map(xl);return typeof s=="function"?s(n):n[s]}var Bn=(t,e)=>{let{transform:r="none"}=getComputedStyle(t);return dr(r,e)};function xl(t){return parseFloat(t.trim())}var Ao=t=>t===rt||t===C,El=new Set(["x","y","z"]),vl=et.filter(t=>!El.has(t));function Sn(t){let e=[];return vl.forEach(r=>{let o=t.getValue(r);o!==void 0&&(e.push([r,o.get()]),o.set(r.startsWith("scale")?1:0));}),e}var Bt={width:({x:t},{paddingLeft:e="0",paddingRight:r="0"})=>t.max-t.min-parseFloat(e)-parseFloat(r),height:({y:t},{paddingTop:e="0",paddingBottom:r="0"})=>t.max-t.min-parseFloat(e)-parseFloat(r),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>dr(e,"x"),y:(t,{transform:e})=>dr(e,"y")};Bt.translateX=Bt.x;Bt.translateY=Bt.y;var Lt=new Set,To=false,Bo=false,So=false;function Vn(){if(Bo){let t=Array.from(Lt).filter(o=>o.needsMeasurement),e=new Set(t.map(o=>o.element)),r=new Map;e.forEach(o=>{let i=Sn(o);i.length&&(r.set(o,i),o.render());}),t.forEach(o=>o.measureInitialState()),e.forEach(o=>{o.render();let i=r.get(o);i&&i.forEach(([s,n])=>{o.getValue(s)?.set(n);});}),t.forEach(o=>o.measureEndState()),t.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY);});}Bo=false,To=false,Lt.forEach(t=>t.complete(So)),Lt.clear();}function bn(){Lt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Bo=true);});}function Pn(){So=true,bn(),Vn(),So=false;}var St=class{constructor(e,r,o,i,s,n=false){this.state="pending",this.isAsync=false,this.needsMeasurement=false,this.unresolvedKeyframes=[...e],this.onComplete=r,this.name=o,this.motionValue=i,this.element=s,this.isAsync=n;}scheduleResolve(){this.state="scheduled",this.isAsync?(Lt.add(this),To||(To=true,E.read(bn),E.resolveKeyframes(Vn))):(this.readKeyframes(),this.complete());}readKeyframes(){let{unresolvedKeyframes:e,name:r,element:o,motionValue:i}=this;if(e[0]===null){let s=i?.get(),n=e[e.length-1];if(s!==void 0)e[0]=s;else if(o&&r){let a=o.readValue(r,n);a!=null&&(e[0]=a);}e[0]===void 0&&(e[0]=n),i&&s===void 0&&i.set(e[0]);}xn(e);}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=false){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Lt.delete(this);}cancel(){this.state==="scheduled"&&(Lt.delete(this),this.state="pending");}resume(){this.state==="pending"&&this.scheduleResolve();}};var Mn=t=>t.startsWith("--");function wn(t,e,r){Mn(e)?t.style.setProperty(e,r):t.style[e]=r;}function me(t){let e;return ()=>(e===void 0&&(e=t()),e)}var Rn=me(()=>window.ScrollTimeline!==void 0);var Ln={};function kn(t,e){let r=me(t);return ()=>Ln[e]??r()}var gr=kn(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"});}catch{return false}return true},"linearEasing");var kt=([t,e,r,o])=>`cubic-bezier(${t}, ${e}, ${r}, ${o})`;var Vo={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:kt([0,.65,.55,1]),circOut:kt([.55,0,1,.45]),backIn:kt([.31,.01,.66,-0.59]),backOut:kt([.33,1.53,.69,.99])};function bo(t,e){if(t)return typeof t=="function"?gr()?or(t,e):"ease-out":pr(t)?kt(t):Array.isArray(t)?t.map(r=>bo(r,e)||Vo.easeOut):Vo[t]}function On(t,e,r,{delay:o=0,duration:i=300,repeat:s=0,repeatType:n="loop",ease:a="easeOut",times:u}={},m=void 0){let l={[e]:r};u&&(l.offset=u);let D=bo(a,i);Array.isArray(D)&&(l.easing=D);let c={delay:o,duration:i,easing:Array.isArray(D)?"linear":D,fill:"both",iterations:s+1,direction:n==="reverse"?"alternate":"normal"};m&&(c.pseudoElement=m);let f=t.animate(l,c);return f}function Cr(t){return typeof t=="function"&&"applyToOptions"in t}function In({type:t,...e}){return Cr(t)&&gr()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}var Fr=class extends At{constructor(e){if(super(),this.finishedTime=null,this.isStopped=false,!e)return;let{element:r,name:o,keyframes:i,pseudoElement:s,allowFlatten:n=false,finalKeyframe:a,onComplete:u}=e;this.isPseudoElement=!!s,this.allowFlatten=n,this.options=e,N(typeof e.type!="string",`animateMini doesn't support "type" as a string. Did you mean to import { spring } from "motion"?`);let m=In(e);this.animation=On(r,o,i,m,s),m.autoplay===false&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){let l=le(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(l):wn(r,o,l),this.animation.cancel();}u?.(),this.notifyFinished();},this.animation.oncancel=()=>this.notifyFinished();}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished());}pause(){this.animation.pause();}complete(){this.animation.finish?.();}cancel(){try{this.animation.cancel();}catch{}}stop(){if(this.isStopped)return;this.isStopped=true;let{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel());}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.();}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return U(Number(e))}get time(){return U(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=O(e);}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e;}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e;}attachTimeline({timeline:e,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&Rn()?(this.animation.timeline=e,P):r(this)}};var jn={anticipate:mr,backInOut:lr,circInOut:fr};function Al(t){return t in jn}function Nn(t){typeof t.ease=="string"&&Al(t.ease)&&(t.ease=jn[t.ease]);}var Un=10,yr=class extends Fr{constructor(e){Nn(e),hr(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e;}updateMotionValue(e){let{motionValue:r,onUpdate:o,onComplete:i,element:s,...n}=this.options;if(!r)return;if(e!==void 0){r.set(e);return}let a=new Tt({...n,autoplay:false}),u=O(this.finishedTime??this.time);r.setWithVelocity(a.sample(u-Un).value,a.sample(u).value,Un),a.stop();}};var Po=(t,e)=>e==="zIndex"?false:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&($.test(t)||t==="0")&&!t.startsWith("url("));function Tl(t){let e=t[0];if(t.length===1)return true;for(let r=0;r<t.length;r++)if(t[r]!==e)return true}function Kn(t,e,r,o){let i=t[0];if(i===null)return false;if(e==="display"||e==="visibility")return true;let s=t[t.length-1],n=Po(i,e),a=Po(s,e);return Q(n===a,`You are trying to animate ${e} from "${i}" to "${s}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${s} via the \`style\` property.`),!n||!a?false:Tl(t)||(r==="spring"||Cr(r))&&o}var Bl=new Set(["opacity","clipPath","filter","transform"]),Sl=me(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Gn(t){let{motionValue:e,name:r,repeatDelay:o,repeatType:i,damping:s,type:n}=t;if(!e||!e.owner||!(e.owner.current instanceof HTMLElement))return false;let{onUpdate:a,transformTemplate:u}=e.owner.getProps();return Sl()&&r&&Bl.has(r)&&(r!=="transform"||!u)&&!a&&!o&&i!=="mirror"&&s!==0&&n!=="inertia"}var Vl=40,xr=class extends At{constructor({autoplay:e=true,delay:r=0,type:o="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:n="loop",keyframes:a,name:u,motionValue:m,element:l,...D}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel();},this.createdAt=w.now();let c={autoplay:e,delay:r,type:o,repeat:i,repeatDelay:s,repeatType:n,name:u,motionValue:m,element:l,...D},f=l?.KeyframeResolver||St;this.keyframeResolver=new f(a,(p,g,F)=>this.onKeyframesResolved(p,g,c,!F),u,m,l),this.keyframeResolver?.scheduleResolve();}onKeyframesResolved(e,r,o,i){this.keyframeResolver=void 0;let{name:s,type:n,velocity:a,delay:u,isHandoff:m,onUpdate:l}=o;this.resolvedAt=w.now(),Kn(e,s,n,a)||((G.instantAnimations||!u)&&l?.(le(e,o,r)),e[0]=e[e.length-1],o.duration=0,o.repeat=0);let c={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Vl?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:r,...o,keyframes:e},f=!m&&Gn(c)?new yr({...c,element:c.motionValue.owner.current}):new Tt(c);f.finished.then(()=>this.notifyFinished()).catch(P),this.pendingTimeline&&(this.stopTimeline=f.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=f;}get finished(){return this._animation?this.animation.finished:this._finished}then(e,r){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Pn()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(e){this.animation.time=e;}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e;}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play();}pause(){this.animation.pause();}complete(){this.animation.complete();}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel();}};var De=(t,e,r,o={},i,s)=>n=>{let a=oe(o,t)||{},u=a.delay||o.delay||0,{elapsed:m=0}=o;m=m-O(u);let l={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-m,onUpdate:c=>{e.set(c),a.onUpdate&&a.onUpdate(c);},onComplete:()=>{n(),a.onComplete&&a.onComplete();},name:t,motionValue:e,element:s?void 0:i};Yi(a)||Object.assign(l,_i(t,l)),l.duration&&(l.duration=O(l.duration)),l.repeatDelay&&(l.repeatDelay=O(l.repeatDelay)),l.from!==void 0&&(l.keyframes[0]=l.from);let D=false;if((l.type===false||l.duration===0&&!l.repeatDelay)&&(l.duration=0,l.delay===0&&(D=true)),(G.instantAnimations||G.skipAnimations)&&(D=true,l.duration=0,l.delay=0),l.allowFlatten=!a.type&&!a.ease,D&&!s&&e.get()!==void 0){let c=Hi(l.keyframes,a);if(c!==void 0){E.update(()=>{l.onUpdate(c),l.onComplete();});return}}return a.isSync?new Tt(l):new xr(l)};var Er=new Set(["width","height","top","left","right","bottom",...et]);function bl({protectedKeys:t,needsAnimating:e},r){let o=t.hasOwnProperty(r)&&e[r]!==true;return e[r]=false,o}function vr(t,e,{delay:r=0,transitionOverride:o,type:i}={}){let{transition:s=t.getDefaultTransition(),transitionEnd:n,...a}=e;o&&(s=o);let u=[],m=i&&t.animationState&&t.animationState.getState()[i];for(let l in a){let D=t.getValue(l,t.latestValues[l]??null),c=a[l];if(c===void 0||m&&bl(m,l))continue;let f={delay:r,...oe(s||{},l)},p=D.get();if(p!==void 0&&!D.isAnimating&&!Array.isArray(c)&&c===p&&!f.velocity)continue;let g=false;if(window.MotionHandoffAnimation){let d=Je(t);if(d){let x=window.MotionHandoffAnimation(d,l,E);x!==null&&(f.startTime=x,g=true);}}Se(t,l),D.start(De(l,D,c,t.shouldReduceMotion&&Er.has(l)?{type:false}:f,t,g));let F=D.animation;F&&u.push(F);}return n&&Promise.all(u).then(()=>{E.update(()=>{n&&$i(t,n);});}),u}function Ar(t,e,r={}){let o=ct(t,e,r.type==="exit"?t.presenceContext?.custom:void 0),{transition:i=t.getDefaultTransition()||{}}=o||{};r.transitionOverride&&(i=r.transitionOverride);let s=o?()=>Promise.all(vr(t,o,r)):()=>Promise.resolve(),n=t.variantChildren&&t.variantChildren.size?(u=0)=>{let{delayChildren:m=0,staggerChildren:l,staggerDirection:D}=i;return Pl(t,e,m+u,l,D,r)}:()=>Promise.resolve(),{when:a}=i;if(a){let[u,m]=a==="beforeChildren"?[s,n]:[n,s];return u().then(()=>m())}else return Promise.all([s(),n(r.delay)])}function Pl(t,e,r=0,o=0,i=1,s){let n=[],a=(t.variantChildren.size-1)*o,u=i===1?(m=0)=>m*o:(m=0)=>a-m*o;return Array.from(t.variantChildren).sort(Ml).forEach((m,l)=>{m.notify("AnimationStart",e),n.push(Ar(m,e,{...s,delay:r+u(l)}).then(()=>m.notify("AnimationComplete",e)));}),Promise.all(n)}function Ml(t,e){return t.sortNodePosition(e)}function Wn(t,e,r={}){t.notify("AnimationStart",e);let o;if(Array.isArray(e)){let i=e.map(s=>Ar(t,s,r));o=Promise.all(i);}else if(typeof e=="string")o=Ar(t,e,r);else {let i=typeof e=="function"?ct(t,e,r.custom):e;o=Promise.all(vr(t,i,r));}return o.then(()=>{t.notify("AnimationComplete",e);})}function Mo(t,e){if(!Array.isArray(e))return false;let r=e.length;if(r!==t.length)return false;for(let o=0;o<r;o++)if(e[o]!==t[o])return false;return true}var wl=Ee.length;function wo(t){if(!t)return;if(!t.isControllingVariants){let r=t.parent?wo(t.parent)||{}:{};return t.props.initial!==void 0&&(r.initial=t.props.initial),r}let e={};for(let r=0;r<wl;r++){let o=Ee[r],i=t.props[o];(lt(i)||i===false)&&(e[o]=i);}return e}var Rl=[...Ne].reverse(),Ll=Ne.length;function kl(t){return e=>Promise.all(e.map(({animation:r,options:o})=>Wn(t,r,o)))}function zn(t){let e=kl(t),r=$n(),o=true,i=u=>(m,l)=>{let D=ct(t,l,u==="exit"?t.presenceContext?.custom:void 0);if(D){let{transition:c,transitionEnd:f,...p}=D;m={...m,...p,...f};}return m};function s(u){e=u(t);}function n(u){let{props:m}=t,l=wo(t.parent)||{},D=[],c=new Set,f={},p=1/0;for(let F=0;F<Ll;F++){let d=Rl[F],x=r[d],h=m[d]!==void 0?m[d]:l[d],T=lt(h),y=d===u?x.isActive:null;y===false&&(p=F);let B=h===l[d]&&h!==m[d]&&T;if(B&&o&&t.manuallyAnimateOnMount&&(B=false),x.protectedKeys={...f},!x.isActive&&y===null||!h&&!x.prevProp||Ct(h)||typeof h=="boolean")continue;let L=Ol(x.prevProp,h),v=L||d===u&&x.isActive&&!B&&T||F>p&&T,z=false,q=Array.isArray(h)?h:[h],Ut=q.reduce(i(d),{});y===false&&(Ut={});let{prevResolvedValues:oi={}}=x,La={...oi,...Ut},ii=K=>{v=true,c.has(K)&&(z=true,c.delete(K)),x.needsAnimating[K]=true;let at=t.getValue(K);at&&(at.liveStyle=false);};for(let K in La){let at=Ut[K],no=oi[K];if(f.hasOwnProperty(K))continue;let so=false;Be(at)&&Be(no)?so=!Mo(at,no):so=at!==no,so?at!=null?ii(K):c.add(K):at!==void 0&&c.has(K)?ii(K):x.protectedKeys[K]=true;}x.prevProp=h,x.prevResolvedValues=Ut,x.isActive&&(f={...f,...Ut}),o&&t.blockInitialAnimation&&(v=false),v&&(!(B&&L)||z)&&D.push(...q.map(K=>({animation:K,options:{type:d}})));}if(c.size){let F={};if(typeof m.initial!="boolean"){let d=ct(t,Array.isArray(m.initial)?m.initial[0]:m.initial);d&&d.transition&&(F.transition=d.transition);}c.forEach(d=>{let x=t.getBaseTarget(d),h=t.getValue(d);h&&(h.liveStyle=true),F[d]=x??null;}),D.push({animation:F});}let g=!!D.length;return o&&(m.initial===false||m.initial===m.animate)&&!t.manuallyAnimateOnMount&&(g=false),o=false,g?e(D):Promise.resolve()}function a(u,m){if(r[u].isActive===m)return Promise.resolve();t.variantChildren?.forEach(D=>D.animationState?.setActive(u,m)),r[u].isActive=m;let l=n(u);for(let D in r)r[D].protectedKeys={};return l}return {animateChanges:n,setActive:a,setAnimateFunction:s,getState:()=>r,reset:()=>{r=$n(),o=true;}}}function Ol(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Mo(e,t):false}function Ot(t=false){return {isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function $n(){return {animate:Ot(true),whileInView:Ot(),whileHover:Ot(),whileTap:Ot(),whileDrag:Ot(),whileFocus:Ot(),exit:Ot()}}var I=class{constructor(e){this.isMounted=false,this.node=e;}update(){}};var Tr=class extends I{constructor(e){super(e),e.animationState||(e.animationState=zn(e));}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();Ct(e)&&(this.unmountControls=e.subscribe(this.node));}mount(){this.updateAnimationControlsSubscription();}update(){let{animate:e}=this.node.getProps(),{animate:r}=this.node.prevProps||{};e!==r&&this.updateAnimationControlsSubscription();}unmount(){this.node.animationState.reset(),this.unmountControls?.();}};var Il=0,Br=class extends I{constructor(){super(...arguments),this.id=Il++;}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:r}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===o)return;let i=this.node.animationState.setActive("exit",!e);r&&!e&&i.then(()=>{r(this.id);});}mount(){let{register:e,onExitComplete:r}=this.node.presenceContext||{};r&&r(this.id),e&&(this.unmount=e(this.id));}unmount(){}};var Hn={animation:{Feature:Tr},exit:{Feature:Br}};function pt(t,e,r,o={passive:true}){return t.addEventListener(e,r,o),()=>t.removeEventListener(e,r)}var ce=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==false;function ht(t){return {point:{x:t.pageX,y:t.pageY}}}var _n=t=>e=>ce(e)&&t(e,ht(e));function Vt(t,e,r,o){return pt(t,e,_n(r),o)}function Sr({top:t,left:e,right:r,bottom:o}){return {x:{min:e,max:r},y:{min:t,max:o}}}function Yn({x:t,y:e}){return {top:e.min,right:t.max,bottom:e.max,left:t.min}}function Xn(t,e){if(!e)return t;let r=e({x:t.left,y:t.top}),o=e({x:t.right,y:t.bottom});return {top:r.y,left:r.x,bottom:o.y,right:o.x}}var Qn=1e-4,jl=1-Qn,Nl=1+Qn,ts=.01,Ul=0-ts,Kl=0+ts;function k(t){return t.max-t.min}function es(t,e,r){return Math.abs(t-e)<=r}function qn(t,e,r,o=.5){t.origin=o,t.originPoint=A(e.min,e.max,t.origin),t.scale=k(r)/k(e),t.translate=A(r.min,r.max,t.origin)-t.originPoint,(t.scale>=jl&&t.scale<=Nl||isNaN(t.scale))&&(t.scale=1),(t.translate>=Ul&&t.translate<=Kl||isNaN(t.translate))&&(t.translate=0);}function fe(t,e,r,o){qn(t.x,e.x,r.x,o?o.originX:void 0),qn(t.y,e.y,r.y,o?o.originY:void 0);}function Zn(t,e,r){t.min=r.min+e.min,t.max=t.min+k(e);}function rs(t,e,r){Zn(t.x,e.x,r.x),Zn(t.y,e.y,r.y);}function Jn(t,e,r){t.min=e.min-r.min,t.max=t.min+k(e);}function pe(t,e,r){Jn(t.x,e.x,r.x),Jn(t.y,e.y,r.y);}var os=()=>({translate:0,scale:1,origin:0,originPoint:0}),It=()=>({x:os(),y:os()}),is=()=>({min:0,max:0}),b=()=>({x:is(),y:is()});function H(t){return [t("x"),t("y")]}function Ro(t){return t===void 0||t===1}function Vr({scale:t,scaleX:e,scaleY:r}){return !Ro(t)||!Ro(e)||!Ro(r)}function dt(t){return Vr(t)||Lo(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Lo(t){return ns(t.x)||ns(t.y)}function ns(t){return t&&t!=="0%"}function Me(t,e,r){let o=t-r,i=e*o;return r+i}function ss(t,e,r,o,i){return i!==void 0&&(t=Me(t,i,o)),Me(t,r,o)+e}function ko(t,e=0,r=1,o,i){t.min=ss(t.min,e,r,o,i),t.max=ss(t.max,e,r,o,i);}function Oo(t,{x:e,y:r}){ko(t.x,e.translate,e.scale,e.originPoint),ko(t.y,r.translate,r.scale,r.originPoint);}var as=.999999999999,us=1.0000000000001;function ms(t,e,r,o=false){let i=r.length;if(!i)return;e.x=e.y=1;let s,n;for(let a=0;a<i;a++){s=r[a],n=s.projectionDelta;let{visualElement:u}=s.options;u&&u.props.style&&u.props.style.display==="contents"||(o&&s.options.layoutScroll&&s.scroll&&s!==s.root&&jt(t,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),n&&(e.x*=n.x.scale,e.y*=n.y.scale,Oo(t,n)),o&&dt(s.latestValues)&&jt(t,s.latestValues));}e.x<us&&e.x>as&&(e.x=1),e.y<us&&e.y>as&&(e.y=1);}function bt(t,e){t.min=t.min+e,t.max=t.max+e;}function ls(t,e,r,o,i=.5){let s=A(t.min,t.max,i);ko(t,e,r,s,o);}function jt(t,e){ls(t.x,e.x,e.scaleX,e.scale,e.originX),ls(t.y,e.y,e.scaleY,e.scale,e.originY);}function Io(t,e){return Sr(Xn(t.getBoundingClientRect(),e))}function Ds(t,e,r){let o=Io(t,r),{scroll:i}=e;return i&&(bt(o.x,i.offset.x),bt(o.y,i.offset.y)),o}var br=({current:t})=>t?t.ownerDocument.defaultView:null;var cs=(t,e)=>Math.abs(t-e);function fs(t,e){let r=cs(t.x,e.x),o=cs(t.y,e.y);return Math.sqrt(r**2+o**2)}var he=class{constructor(e,r,{transformPagePoint:o,contextWindow:i,dragSnapToOrigin:s=false}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let D=No(this.lastMoveEventInfo,this.history),c=this.startEvent!==null,f=fs(D.offset,{x:0,y:0})>=3;if(!c&&!f)return;let{point:p}=D,{timestamp:g}=M;this.history.push({...p,timestamp:g});let{onStart:F,onMove:d}=this.handlers;c||(F&&F(this.lastMoveEvent,D),this.startEvent=this.lastMoveEvent),d&&d(this.lastMoveEvent,D);},this.handlePointerMove=(D,c)=>{this.lastMoveEvent=D,this.lastMoveEventInfo=jo(c,this.transformPagePoint),E.update(this.updatePoint,true);},this.handlePointerUp=(D,c)=>{this.end();let{onEnd:f,onSessionEnd:p,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let F=No(D.type==="pointercancel"?this.lastMoveEventInfo:jo(c,this.transformPagePoint),this.history);this.startEvent&&f&&f(D,F),p&&p(D,F);},!ce(e))return;this.dragSnapToOrigin=s,this.handlers=r,this.transformPagePoint=o,this.contextWindow=i||window;let n=ht(e),a=jo(n,this.transformPagePoint),{point:u}=a,{timestamp:m}=M;this.history=[{...u,timestamp:m}];let{onSessionStart:l}=r;l&&l(e,No(a,this.history)),this.removeListeners=st(Vt(this.contextWindow,"pointermove",this.handlePointerMove),Vt(this.contextWindow,"pointerup",this.handlePointerUp),Vt(this.contextWindow,"pointercancel",this.handlePointerUp));}updateHandlers(e){this.handlers=e;}end(){this.removeListeners&&this.removeListeners(),Y(this.updatePoint);}};function jo(t,e){return e?{point:e(t.point)}:t}function ps(t,e){return {x:t.x-e.x,y:t.y-e.y}}function No({point:t},e){return {point:t,delta:ps(t,hs(e)),offset:ps(t,Gl(e)),velocity:Wl(e,.1)}}function Gl(t){return t[0]}function hs(t){return t[t.length-1]}function Wl(t,e){if(t.length<2)return {x:0,y:0};let r=t.length-1,o=null,i=hs(t);for(;r>=0&&(o=t[r],!(i.timestamp-o.timestamp>O(e)));)r--;if(!o)return {x:0,y:0};let s=U(i.timestamp-o.timestamp);if(s===0)return {x:0,y:0};let n={x:(i.x-o.x)/s,y:(i.y-o.y)/s};return n.x===1/0&&(n.x=0),n.y===1/0&&(n.y=0),n}function ys(t,{min:e,max:r},o){return e!==void 0&&t<e?t=o?A(e,t,o.min):Math.max(t,e):r!==void 0&&t>r&&(t=o?A(r,t,o.max):Math.min(t,r)),t}function ds(t,e,r){return {min:e!==void 0?t.min+e:void 0,max:r!==void 0?t.max+r-(t.max-t.min):void 0}}function xs(t,{top:e,left:r,bottom:o,right:i}){return {x:ds(t.x,r,i),y:ds(t.y,e,o)}}function gs(t,e){let r=e.min-t.min,o=e.max-t.max;return e.max-e.min<t.max-t.min&&([r,o]=[o,r]),{min:r,max:o}}function Es(t,e){return {x:gs(t.x,e.x),y:gs(t.y,e.y)}}function vs(t,e){let r=.5,o=k(t),i=k(e);return i>o?r=ft(e.min,e.max-o,t.min):o>i&&(r=ft(t.min,t.max-i,e.min)),j(0,1,r)}function As(t,e){let r={};return e.min!==void 0&&(r.min=e.min-t.min),e.max!==void 0&&(r.max=e.max-t.min),r}var Pr=.35;function Ts(t=Pr){return t===false?t=0:t===true&&(t=Pr),{x:Cs(t,"left","right"),y:Cs(t,"top","bottom")}}function Cs(t,e,r){return {min:Fs(t,e),max:Fs(t,r)}}function Fs(t,e){return typeof t=="number"?t:t[e]||0}var J={x:false,y:false};function Mr(){return J.x||J.y}function Bs(t){return t==="x"||t==="y"?J[t]?null:(J[t]=true,()=>{J[t]=false;}):J.x||J.y?null:(J.x=J.y=true,()=>{J.x=J.y=false;})}var $l=new WeakMap,Rr=class{constructor(e){this.openDragLock=null,this.isDragging=false,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=false,this.hasMutatedConstraints=false,this.elastic=b(),this.visualElement=e;}start(e,{snapToCursor:r=false}={}){let{presenceContext:o}=this.visualElement;if(o&&o.isPresent===false)return;let i=l=>{let{dragSnapToOrigin:D}=this.getProps();D?this.pauseAnimation():this.stopAnimation(),r&&this.snapToCursor(ht(l).point);},s=(l,D)=>{let{drag:c,dragPropagation:f,onDragStart:p}=this.getProps();if(c&&!f&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Bs(c),!this.openDragLock))return;this.isDragging=true,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=true,this.visualElement.projection.target=void 0),H(F=>{let d=this.getAxisMotionValue(F).get()||0;if(W.test(d)){let{projection:x}=this.visualElement;if(x&&x.layout){let h=x.layout.layoutBox[F];h&&(d=k(h)*(parseFloat(d)/100));}}this.originPoint[F]=d;}),p&&E.postRender(()=>p(l,D)),Se(this.visualElement,"transform");let{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",true);},n=(l,D)=>{let{dragPropagation:c,dragDirectionLock:f,onDirectionLock:p,onDrag:g}=this.getProps();if(!c&&!this.openDragLock)return;let{offset:F}=D;if(f&&this.currentDirection===null){this.currentDirection=zl(F),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",D.point,F),this.updateAxis("y",D.point,F),this.visualElement.render(),g&&g(l,D);},a=(l,D)=>this.stop(l,D),u=()=>H(l=>this.getAnimationState(l)==="paused"&&this.getAxisMotionValue(l).animation?.play()),{dragSnapToOrigin:m}=this.getProps();this.panSession=new he(e,{onSessionStart:i,onStart:s,onMove:n,onSessionEnd:a,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:m,contextWindow:br(this.visualElement)});}stop(e,r){let o=this.isDragging;if(this.cancel(),!o)return;let{velocity:i}=r;this.startAnimation(i);let{onDragEnd:s}=this.getProps();s&&E.postRender(()=>s(e,r));}cancel(){this.isDragging=false;let{projection:e,animationState:r}=this.visualElement;e&&(e.isAnimationBlocked=false),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",false);}updateAxis(e,r,o){let{drag:i}=this.getProps();if(!o||!wr(e,i,this.currentDirection))return;let s=this.getAxisMotionValue(e),n=this.originPoint[e]+o[e];this.constraints&&this.constraints[e]&&(n=ys(n,this.constraints[e],this.elastic[e])),s.set(n);}resolveConstraints(){let{dragConstraints:e,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(false):this.visualElement.projection?.layout,i=this.constraints;e&&mt(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&o?this.constraints=xs(o.layoutBox,e):this.constraints=false,this.elastic=Ts(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&H(s=>{this.constraints!==false&&this.getAxisMotionValue(s)&&(this.constraints[s]=As(o.layoutBox[s],this.constraints[s]));});}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:r}=this.getProps();if(!e||!mt(e))return false;let o=e.current;N(o!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");let{projection:i}=this.visualElement;if(!i||!i.layout)return false;let s=Ds(o,i.root,this.visualElement.getTransformPagePoint()),n=Es(i.layout.layoutBox,s);if(r){let a=r(Yn(n));this.hasMutatedConstraints=!!a,a&&(n=Sr(a));}return n}startAnimation(e){let{drag:r,dragMomentum:o,dragElastic:i,dragTransition:s,dragSnapToOrigin:n,onDragTransitionEnd:a}=this.getProps(),u=this.constraints||{},m=H(l=>{if(!wr(l,r,this.currentDirection))return;let D=u&&u[l]||{};n&&(D={min:0,max:0});let c=i?200:1e6,f=i?40:1e7,p={type:"inertia",velocity:o?e[l]:0,bounceStiffness:c,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...s,...D};return this.startAxisValueAnimation(l,p)});return Promise.all(m).then(a)}startAxisValueAnimation(e,r){let o=this.getAxisMotionValue(e);return Se(this.visualElement,e),o.start(De(e,o,0,r,this.visualElement,false))}stopAnimation(){H(e=>this.getAxisMotionValue(e).stop());}pauseAnimation(){H(e=>this.getAxisMotionValue(e).animation?.pause());}getAnimationState(e){return this.getAxisMotionValue(e).animation?.state}getAxisMotionValue(e){let r=`_drag${e.toUpperCase()}`,o=this.visualElement.getProps(),i=o[r];return i||this.visualElement.getValue(e,(o.initial?o.initial[e]:void 0)||0)}snapToCursor(e){H(r=>{let{drag:o}=this.getProps();if(!wr(r,o,this.currentDirection))return;let{projection:i}=this.visualElement,s=this.getAxisMotionValue(r);if(i&&i.layout){let{min:n,max:a}=i.layout.layoutBox[r];s.set(e[r]-A(n,a,.5));}});}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:r}=this.getProps(),{projection:o}=this.visualElement;if(!mt(r)||!o||!this.constraints)return;this.stopAnimation();let i={x:0,y:0};H(n=>{let a=this.getAxisMotionValue(n);if(a&&this.constraints!==false){let u=a.get();i[n]=vs({min:u,max:u},this.constraints[n]);}});let{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),H(n=>{if(!wr(n,e,null))return;let a=this.getAxisMotionValue(n),{min:u,max:m}=this.constraints[n];a.set(A(u,m,i[n]));});}addListeners(){if(!this.visualElement.current)return;$l.set(this.visualElement,this);let e=this.visualElement.current,r=Vt(e,"pointerdown",u=>{let{drag:m,dragListener:l=true}=this.getProps();m&&l&&this.start(u);}),o=()=>{let{dragConstraints:u}=this.getProps();mt(u)&&u.current&&(this.constraints=this.resolveRefConstraints());},{projection:i}=this.visualElement,s=i.addEventListener("measure",o);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),E.read(o);let n=pt(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:u,hasLayoutChanged:m})=>{this.isDragging&&m&&(H(l=>{let D=this.getAxisMotionValue(l);D&&(this.originPoint[l]+=u[l].translate,D.set(D.get()+u[l].translate));}),this.visualElement.render());});return ()=>{n(),r(),s(),a&&a();}}getProps(){let e=this.visualElement.getProps(),{drag:r=false,dragDirectionLock:o=false,dragPropagation:i=false,dragConstraints:s=false,dragElastic:n=Pr,dragMomentum:a=true}=e;return {...e,drag:r,dragDirectionLock:o,dragPropagation:i,dragConstraints:s,dragElastic:n,dragMomentum:a}}};function wr(t,e,r){return (e===true||e===t)&&(r===null||r===t)}function zl(t,e=10){let r=null;return Math.abs(t.y)>e?r="y":Math.abs(t.x)>e&&(r="x"),r}var Lr=class extends I{constructor(e){super(e),this.removeGroupControls=P,this.removeListeners=P,this.controls=new Rr(e);}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||P;}unmount(){this.removeGroupControls(),this.removeListeners();}};var Ss=t=>(e,r)=>{t&&E.postRender(()=>t(e,r));},kr=class extends I{constructor(){super(...arguments),this.removePointerDownListener=P;}onPointerDown(e){this.session=new he(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:br(this.node)});}createPanHandlers(){let{onPanSessionStart:e,onPanStart:r,onPan:o,onPanEnd:i}=this.node.getProps();return {onSessionStart:Ss(e),onStart:Ss(r),onMove:o,onEnd:(s,n)=>{delete this.session,i&&E.postRender(()=>i(s,n));}}}mount(){this.removePointerDownListener=Vt(this.node.current,"pointerdown",e=>this.onPointerDown(e));}update(){this.session&&this.session.updateHandlers(this.createPanHandlers());}unmount(){this.removePointerDownListener(),this.session&&this.session.end();}};var de={hasAnimatedSinceResize:true,hasEverUpdated:false};function Vs(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}var ge={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(C.test(t))t=parseFloat(t);else return t;let r=Vs(t,e.target.x),o=Vs(t,e.target.y);return `${r}% ${o}%`}};var bs={correct:(t,{treeScale:e,projectionDelta:r})=>{let o=t,i=$.parse(t);if(i.length>5)return o;let s=$.createTransformer(t),n=typeof i[0]!="number"?1:0,a=r.x.scale*e.x,u=r.y.scale*e.y;i[0+n]/=a,i[1+n]/=u;let m=A(a,u,.5);return typeof i[2+n]=="number"&&(i[2+n]/=m),typeof i[3+n]=="number"&&(i[3+n]/=m),s(i)}};var Uo=class extends Component{componentDidMount(){let{visualElement:e,layoutGroup:r,switchLayoutGroup:o,layoutId:i}=this.props,{projection:s}=e;Si(Yl),s&&(r.group&&r.group.add(s),o&&o.register&&i&&o.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove();}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),de.hasEverUpdated=true;}getSnapshotBeforeUpdate(e){let{layoutDependency:r,visualElement:o,drag:i,isPresent:s}=this.props,{projection:n}=o;return n&&(n.isPresent=s,i||e.layoutDependency!==r||r===void 0||e.isPresent!==s?n.willUpdate():this.safeToRemove(),e.isPresent!==s&&(s?n.promote():n.relegate()||E.postRender(()=>{let a=n.getStack();(!a||!a.members.length)&&this.safeToRemove();}))),null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),zt.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove();}));}componentWillUnmount(){let{visualElement:e,layoutGroup:r,switchLayoutGroup:o}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(i),o&&o.deregister&&o.deregister(i));}safeToRemove(){let{safeToRemove:e}=this.props;e&&e();}render(){return null}};function Or(t){let[e,r]=mi(),o=useContext(Le);return jsx(Uo,{...t,layoutGroup:o,switchLayoutGroup:useContext(Ge),isPresent:e,safeToRemove:r})}var Yl={borderRadius:{...ge,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ge,borderTopRightRadius:ge,borderBottomLeftRadius:ge,borderBottomRightRadius:ge,boxShadow:bs};function Ms(t,e,r){let o=S(t)?t:tt(t);return o.start(De("",o,e,r)),o.animation}function ws(t){return t instanceof SVGElement&&t.tagName!=="svg"}var Rs=(t,e)=>t.depth-e.depth;var Ir=class{constructor(){this.children=[],this.isDirty=false;}add(e){ee(this.children,e),this.isDirty=true;}remove(e){re(this.children,e),this.isDirty=true;}forEach(e){this.isDirty&&this.children.sort(Rs),this.isDirty=false,this.children.forEach(e);}};function Ls(t,e){let r=w.now(),o=({timestamp:i})=>{let s=i-r;s>=e&&(Y(o),t(s-e));};return E.setup(o,true),()=>Y(o)}var js=["TopLeft","TopRight","BottomLeft","BottomRight"],Xl=js.length,ks=t=>typeof t=="string"?parseFloat(t):t,Os=t=>typeof t=="number"||C.test(t);function Ns(t,e,r,o,i,s){i?(t.opacity=A(0,r.opacity??1,ql(o)),t.opacityExit=A(e.opacity??1,0,Zl(o))):s&&(t.opacity=A(e.opacity??1,r.opacity??1,o));for(let n=0;n<Xl;n++){let a=`border${js[n]}Radius`,u=Is(e,a),m=Is(r,a);if(u===void 0&&m===void 0)continue;u||(u=0),m||(m=0),u===0||m===0||Os(u)===Os(m)?(t[a]=Math.max(A(ks(u),ks(m),o),0),(W.test(m)||W.test(u))&&(t[a]+="%")):t[a]=m;}(e.rotate||r.rotate)&&(t.rotate=A(e.rotate||0,r.rotate||0,o));}function Is(t,e){return t[e]!==void 0?t[e]:t.borderRadius}var ql=Us(0,.5,cr),Zl=Us(.5,.95,P);function Us(t,e,r){return o=>o<t?0:o>e?1:r(ft(t,e,o))}function Ks(t,e){t.min=e.min,t.max=e.max;}function X(t,e){Ks(t.x,e.x),Ks(t.y,e.y);}function Ko(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin;}function Gs(t,e,r,o,i){return t-=e,t=Me(t,1/r,o),i!==void 0&&(t=Me(t,1/i,o)),t}function Jl(t,e=0,r=1,o=.5,i,s=t,n=t){if(W.test(e)&&(e=parseFloat(e),e=A(n.min,n.max,e/100)-n.min),typeof e!="number")return;let a=A(s.min,s.max,o);t===s&&(a-=e),t.min=Gs(t.min,e,r,a,i),t.max=Gs(t.max,e,r,a,i);}function Ws(t,e,[r,o,i],s,n){Jl(t,e[r],e[o],e[i],e.scale,s,n);}var Ql=["x","scaleX","originX"],tm=["y","scaleY","originY"];function Go(t,e,r,o){Ws(t.x,e,Ql,r?r.x:void 0,o?o.x:void 0),Ws(t.y,e,tm,r?r.y:void 0,o?o.y:void 0);}function $s(t){return t.translate===0&&t.scale===1}function Wo(t){return $s(t.x)&&$s(t.y)}function zs(t,e){return t.min===e.min&&t.max===e.max}function _s(t,e){return zs(t.x,e.x)&&zs(t.y,e.y)}function Hs(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function $o(t,e){return Hs(t.x,e.x)&&Hs(t.y,e.y)}function zo(t){return k(t.x)/k(t.y)}function Ho(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}var jr=class{constructor(){this.members=[];}add(e){ee(this.members,e),e.scheduleRender();}remove(e){if(re(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let r=this.members[this.members.length-1];r&&this.promote(r);}}relegate(e){let r=this.members.findIndex(i=>e===i);if(r===0)return false;let o;for(let i=r;i>=0;i--){let s=this.members[i];if(s.isPresent!==false){o=s;break}}return o?(this.promote(o),true):false}promote(e,r){let o=this.lead;if(e!==o&&(this.prevLead=o,this.lead=e,e.show(),o)){o.instance&&o.scheduleRender(),e.scheduleRender(),e.resumeFrom=o,r&&(e.resumeFrom.preserveOpacity=true),o.snapshot&&(e.snapshot=o.snapshot,e.snapshot.latestValues=o.animationValues||o.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=true);let{crossfade:i}=e.options;i===false&&o.hide();}}exitAnimationComplete(){this.members.forEach(e=>{let{options:r,resumingFrom:o}=e;r.onExitComplete&&r.onExitComplete(),o&&o.options.onExitComplete&&o.options.onExitComplete();});}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(false);});}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0);}};function Ys(t,e,r){let o="",i=t.x.translate/e.x,s=t.y.translate/e.y,n=r?.z||0;if((i||s||n)&&(o=`translate3d(${i}px, ${s}px, ${n}px) `),(e.x!==1||e.y!==1)&&(o+=`scale(${1/e.x}, ${1/e.y}) `),r){let{transformPerspective:m,rotate:l,rotateX:D,rotateY:c,skewX:f,skewY:p}=r;m&&(o=`perspective(${m}px) ${o}`),l&&(o+=`rotate(${l}deg) `),D&&(o+=`rotateX(${D}deg) `),c&&(o+=`rotateY(${c}deg) `),f&&(o+=`skewX(${f}deg) `),p&&(o+=`skewY(${p}deg) `);}let a=t.x.scale*e.x,u=t.y.scale*e.y;return (a!==1||u!==1)&&(o+=`scale(${a}, ${u})`),o||"none"}var _o=["","X","Y","Z"],em={visibility:"hidden"},rm=1e3,om=0;function Yo(t,e,r,o){let{latestValues:i}=e;i[t]&&(r[t]=i[t],e.setStaticValue(t,0),o&&(o[t]=0));}function ra(t){if(t.hasCheckedOptimisedAppear=true,t.root===t)return;let{visualElement:e}=t.options;if(!e)return;let r=Je(e);if(window.MotionHasOptimisedAnimation(r,"transform")){let{layout:i,layoutId:s}=t.options;window.MotionCancelOptimisedAnimation(r,"transform",E,!(i||s));}let{parent:o}=t;o&&!o.hasCheckedOptimisedAppear&&ra(o);}function Nr({attachResizeListener:t,defaultParent:e,measureScroll:r,checkIsScrollRoot:o,resetTransform:i}){return class{constructor(n={},a=e?.()){this.id=om++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=false,this.isAnimationBlocked=false,this.isLayoutDirty=false,this.isProjectionDirty=false,this.isSharedProjectionDirty=false,this.isTransformDirty=false,this.updateManuallyBlocked=false,this.updateBlockedByResize=false,this.isUpdating=false,this.isSVG=false,this.needsReset=false,this.shouldResetTransform=false,this.hasCheckedOptimisedAppear=false,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=false,this.updateScheduled=false,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=false,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=false,this.clearAllSnapshots());},this.updateProjection=()=>{this.projectionUpdateScheduled=false,this.nodes.forEach(sm),this.nodes.forEach(Dm),this.nodes.forEach(cm),this.nodes.forEach(am);},this.resolvedRelativeTargetAt=0,this.hasProjected=false,this.isVisible=true,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=n,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=true;this.root===this&&(this.nodes=new Ir);}addEventListener(n,a){return this.eventHandlers.has(n)||this.eventHandlers.set(n,new Ft),this.eventHandlers.get(n).add(a)}notifyListeners(n,...a){let u=this.eventHandlers.get(n);u&&u.notify(...a);}hasListeners(n){return this.eventHandlers.has(n)}mount(n){if(this.instance)return;this.isSVG=ws(n),this.instance=n;let{layoutId:a,layout:u,visualElement:m}=this.options;if(m&&!m.current&&m.mount(n),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(u||a)&&(this.isLayoutDirty=true),t){let l,D=()=>this.root.updateBlockedByResize=false;t(n,()=>{this.root.updateBlockedByResize=true,l&&l(),l=Ls(D,250),de.hasAnimatedSinceResize&&(de.hasAnimatedSinceResize=false,this.nodes.forEach(qs));});}a&&this.root.registerSharedNode(a,this),this.options.animate!==false&&m&&(a||u)&&this.addEventListener("didUpdate",({delta:l,hasLayoutChanged:D,hasRelativeLayoutChanged:c,layout:f})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let p=this.options.transition||m.getDefaultTransition()||gm,{onLayoutAnimationStart:g,onLayoutAnimationComplete:F}=m.getProps(),d=!this.targetLayout||!$o(this.targetLayout,f),x=!D&&c;if(this.options.layoutRoot||this.resumeFrom||x||D&&(d||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(l,x);let h={...oe(p,"layout"),onPlay:g,onComplete:F};(m.shouldReduceMotion||this.options.layoutRoot)&&(h.delay=0,h.type=false),this.startAnimation(h);}else D||qs(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=f;});}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let n=this.getStack();n&&n.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Y(this.updateProjection);}blockUpdate(){this.updateManuallyBlocked=true;}unblockUpdate(){this.updateManuallyBlocked=false;}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||false}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=true,this.nodes&&this.nodes.forEach(fm),this.animationId++);}getTransformTemplate(){let{visualElement:n}=this.options;return n&&n.getProps().transformTemplate}willUpdate(n=true){if(this.root.hasTreeAnimated=true,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ra(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=true;for(let l=0;l<this.path.length;l++){let D=this.path[l];D.shouldResetTransform=true,D.updateScroll("snapshot"),D.options.layoutRoot&&D.willUpdate(false);}let{layoutId:a,layout:u}=this.options;if(a===void 0&&!u)return;let m=this.getTransformTemplate();this.prevTransformTemplateValue=m?m(this.latestValues,""):void 0,this.updateSnapshot(),n&&this.notifyListeners("willUpdate");}update(){if(this.updateScheduled=false,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Xs);return}this.isUpdating||this.nodes.forEach(lm),this.isUpdating=false,this.nodes.forEach(mm),this.nodes.forEach(im),this.nodes.forEach(nm),this.clearAllSnapshots();let a=w.now();M.delta=j(0,1e3/60,a-M.timestamp),M.timestamp=a,M.isProcessing=true,Ie.update.process(M),Ie.preRender.process(M),Ie.render.process(M),M.isProcessing=false;}didUpdate(){this.updateScheduled||(this.updateScheduled=true,zt.read(this.scheduleUpdate));}clearAllSnapshots(){this.nodes.forEach(um),this.sharedNodes.forEach(pm);}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=true,E.preRender(this.updateProjection,false,true));}scheduleCheckAfterUnmount(){E.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed();});}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!k(this.snapshot.measuredBox.x)&&!k(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 u=0;u<this.path.length;u++)this.path[u].updateScroll();let n=this.layout;this.layout=this.measure(false),this.layoutCorrected=b(),this.isLayoutDirty=false,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,n?n.layoutBox:void 0);}updateScroll(n="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===n&&(a=false),a&&this.instance){let u=o(this.instance);this.scroll={animationId:this.root.animationId,phase:n,isRoot:u,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u};}}resetTransform(){if(!i)return;let n=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Wo(this.projectionDelta),u=this.getTransformTemplate(),m=u?u(this.latestValues,""):void 0,l=m!==this.prevTransformTemplateValue;n&&this.instance&&(a||dt(this.latestValues)||l)&&(i(this.instance,m),this.shouldResetTransform=false,this.scheduleRender());}measure(n=true){let a=this.measurePageBox(),u=this.removeElementScroll(a);return n&&(u=this.removeTransform(u)),Cm(u),{animationId:this.root.animationId,measuredBox:a,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:n}=this.options;if(!n)return b();let a=n.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Fm))){let{scroll:m}=this.root;m&&(bt(a.x,m.offset.x),bt(a.y,m.offset.y));}return a}removeElementScroll(n){let a=b();if(X(a,n),this.scroll?.wasRoot)return a;for(let u=0;u<this.path.length;u++){let m=this.path[u],{scroll:l,options:D}=m;m!==this.root&&l&&D.layoutScroll&&(l.wasRoot&&X(a,n),bt(a.x,l.offset.x),bt(a.y,l.offset.y));}return a}applyTransform(n,a=false){let u=b();X(u,n);for(let m=0;m<this.path.length;m++){let l=this.path[m];!a&&l.options.layoutScroll&&l.scroll&&l!==l.root&&jt(u,{x:-l.scroll.offset.x,y:-l.scroll.offset.y}),dt(l.latestValues)&&jt(u,l.latestValues);}return dt(this.latestValues)&&jt(u,this.latestValues),u}removeTransform(n){let a=b();X(a,n);for(let u=0;u<this.path.length;u++){let m=this.path[u];if(!m.instance||!dt(m.latestValues))continue;Vr(m.latestValues)&&m.updateSnapshot();let l=b(),D=m.measurePageBox();X(l,D),Go(a,m.latestValues,m.snapshot?m.snapshot.layoutBox:void 0,l);}return dt(this.latestValues)&&Go(a,this.latestValues),a}setTargetDelta(n){this.targetDelta=n,this.root.scheduleUpdateProjection(),this.isProjectionDirty=true;}setOptions(n){this.options={...this.options,...n,crossfade:n.crossfade!==void 0?n.crossfade:true};}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=false;}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==M.timestamp&&this.relativeParent.resolveTargetDelta(true);}resolveTargetDelta(n=false){let a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);let u=!!this.resumingFrom||this!==a;if(!(n||u&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:l,layoutId:D}=this.options;if(!(!this.layout||!(l||D))){if(this.resolvedRelativeTargetAt=M.timestamp,!this.targetDelta&&!this.relativeTarget){let c=this.getClosestProjectingParent();c&&c.layout&&this.animationProgress!==1?(this.relativeParent=c,this.forceRelativeParentToResolveTarget(),this.relativeTarget=b(),this.relativeTargetOrigin=b(),pe(this.relativeTargetOrigin,this.layout.layoutBox,c.layout.layoutBox),X(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0;}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=b(),this.targetWithTransforms=b()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),rs(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):X(this.target,this.layout.layoutBox),Oo(this.target,this.targetDelta)):X(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=false;let c=this.getClosestProjectingParent();c&&!!c.resumingFrom==!!this.resumingFrom&&!c.options.layoutScroll&&c.target&&this.animationProgress!==1?(this.relativeParent=c,this.forceRelativeParentToResolveTarget(),this.relativeTarget=b(),this.relativeTargetOrigin=b(),pe(this.relativeTargetOrigin,this.target,c.target),X(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0;}}}}getClosestProjectingParent(){if(!(!this.parent||Vr(this.parent.latestValues)||Lo(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return !!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){let n=this.getLead(),a=!!this.resumingFrom||this!==n,u=true;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(u=false),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=false),this.resolvedRelativeTargetAt===M.timestamp&&(u=false),u)return;let{layout:m,layoutId:l}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(m||l))return;X(this.layoutCorrected,this.layout.layoutBox);let D=this.treeScale.x,c=this.treeScale.y;ms(this.layoutCorrected,this.treeScale,this.path,a),n.layout&&!n.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(n.target=n.layout.layoutBox,n.targetWithTransforms=b());let{target:f}=n;if(!f){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ko(this.prevProjectionDelta.x,this.projectionDelta.x),Ko(this.prevProjectionDelta.y,this.projectionDelta.y)),fe(this.projectionDelta,this.layoutCorrected,f,this.latestValues),(this.treeScale.x!==D||this.treeScale.y!==c||!Ho(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ho(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=true,this.scheduleRender(),this.notifyListeners("projectionUpdate",f));}hide(){this.isVisible=false;}show(){this.isVisible=true;}scheduleRender(n=true){if(this.options.visualElement?.scheduleRender(),n){let a=this.getStack();a&&a.scheduleRender();}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0);}createProjectionDeltas(){this.prevProjectionDelta=It(),this.projectionDelta=It(),this.projectionDeltaWithTransform=It();}setAnimationOrigin(n,a=false){let u=this.snapshot,m=u?u.latestValues:{},l={...this.latestValues},D=It();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;let c=b(),f=u?u.source:void 0,p=this.layout?this.layout.source:void 0,g=f!==p,F=this.getStack(),d=!F||F.members.length<=1,x=!!(g&&!d&&this.options.crossfade===true&&!this.path.some(dm));this.animationProgress=0;let h;this.mixTargetDelta=T=>{let y=T/1e3;Zs(D.x,n.x,y),Zs(D.y,n.y,y),this.setTargetDelta(D),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(pe(c,this.layout.layoutBox,this.relativeParent.layout.layoutBox),hm(this.relativeTarget,this.relativeTargetOrigin,c,y),h&&_s(this.relativeTarget,h)&&(this.isProjectionDirty=false),h||(h=b()),X(h,this.relativeTarget)),g&&(this.animationValues=l,Ns(l,m,this.latestValues,y,x,d)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=y;},this.mixTargetDelta(this.options.layoutRoot?1e3:0);}startAnimation(n){this.notifyListeners("animationStart"),this.currentAnimation?.stop(false),this.resumingFrom?.currentAnimation?.stop(false),this.pendingAnimation&&(Y(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=E.update(()=>{de.hasAnimatedSinceResize=true,this.motionValue||(this.motionValue=tt(0)),this.currentAnimation=Ms(this.motionValue,[0,1e3],{...n,isSync:true,onUpdate:a=>{this.mixTargetDelta(a),n.onUpdate&&n.onUpdate(a);},onStop:()=>{},onComplete:()=>{n.onComplete&&n.onComplete(),this.completeAnimation();}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0;});}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let n=this.getStack();n&&n.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete");}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(rm),this.currentAnimation.stop(false)),this.completeAnimation();}applyTransformsToTarget(){let n=this.getLead(),{targetWithTransforms:a,target:u,layout:m,latestValues:l}=n;if(!(!a||!u||!m)){if(this!==n&&this.layout&&m&&oa(this.options.animationType,this.layout.layoutBox,m.layoutBox)){u=this.target||b();let D=k(this.layout.layoutBox.x);u.x.min=n.target.x.min,u.x.max=u.x.min+D;let c=k(this.layout.layoutBox.y);u.y.min=n.target.y.min,u.y.max=u.y.min+c;}X(a,u),jt(a,l),fe(this.projectionDeltaWithTransform,this.layoutCorrected,a,l);}}registerSharedNode(n,a){this.sharedNodes.has(n)||this.sharedNodes.set(n,new jr),this.sharedNodes.get(n).add(a);let m=a.options.initialPromotionConfig;a.promote({transition:m?m.transition:void 0,preserveFollowOpacity:m&&m.shouldPreserveFollowOpacity?m.shouldPreserveFollowOpacity(a):void 0});}isLead(){let n=this.getStack();return n?n.lead===this:true}getLead(){let{layoutId:n}=this.options;return n?this.getStack()?.lead||this:this}getPrevLead(){let{layoutId:n}=this.options;return n?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:n}=this.options;if(n)return this.root.sharedNodes.get(n)}promote({needsReset:n,transition:a,preserveFollowOpacity:u}={}){let m=this.getStack();m&&m.promote(this,u),n&&(this.projectionDelta=void 0,this.needsReset=true),a&&this.setOptions({transition:a});}relegate(){let n=this.getStack();return n?n.relegate(this):false}resetSkewAndRotation(){let{visualElement:n}=this.options;if(!n)return;let a=false,{latestValues:u}=n;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(a=true),!a)return;let m={};u.z&&Yo("z",n,m,this.animationValues);for(let l=0;l<_o.length;l++)Yo(`rotate${_o[l]}`,n,m,this.animationValues),Yo(`skew${_o[l]}`,n,m,this.animationValues);n.render();for(let l in m)n.setStaticValue(l,m[l]),this.animationValues&&(this.animationValues[l]=m[l]);n.scheduleRender();}getProjectionStyles(n){if(!this.instance||this.isSVG)return;if(!this.isVisible)return em;let a={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=false,a.opacity="",a.pointerEvents=Qt(n?.pointerEvents)||"",a.transform=u?u(this.latestValues,""):"none",a;let m=this.getLead();if(!this.projectionDelta||!this.layout||!m.target){let f={};return this.options.layoutId&&(f.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,f.pointerEvents=Qt(n?.pointerEvents)||""),this.hasProjected&&!dt(this.latestValues)&&(f.transform=u?u({},""):"none",this.hasProjected=false),f}let l=m.animationValues||m.latestValues;this.applyTransformsToTarget(),a.transform=Ys(this.projectionDeltaWithTransform,this.treeScale,l),u&&(a.transform=u(l,a.transform));let{x:D,y:c}=this.projectionDelta;a.transformOrigin=`${D.origin*100}% ${c.origin*100}% 0`,m.animationValues?a.opacity=m===this?l.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:l.opacityExit:a.opacity=m===this?l.opacity!==void 0?l.opacity:"":l.opacityExit!==void 0?l.opacityExit:0;for(let f in Mt){if(l[f]===void 0)continue;let{correct:p,applyTo:g,isCSSVariable:F}=Mt[f],d=a.transform==="none"?l[f]:p(l[f],m);if(g){let x=g.length;for(let h=0;h<x;h++)a[g[h]]=d;}else F?this.options.visualElement.renderState.vars[f]=d:a[f]=d;}return this.options.layoutId&&(a.pointerEvents=m===this?Qt(n?.pointerEvents)||"":"none"),a}clearSnapshot(){this.resumeFrom=this.snapshot=void 0;}resetTree(){this.root.nodes.forEach(n=>n.currentAnimation?.stop(false)),this.root.nodes.forEach(Xs),this.root.sharedNodes.clear();}}}function im(t){t.updateLayout();}function nm(t){let e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){let{layoutBox:r,measuredBox:o}=t.layout,{animationType:i}=t.options,s=e.source!==t.layout.source;i==="size"?H(l=>{let D=s?e.measuredBox[l]:e.layoutBox[l],c=k(D);D.min=r[l].min,D.max=D.min+c;}):oa(i,e.layoutBox,r)&&H(l=>{let D=s?e.measuredBox[l]:e.layoutBox[l],c=k(r[l]);D.max=D.min+c,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=true,t.relativeTarget[l].max=t.relativeTarget[l].min+c);});let n=It();fe(n,r,e.layoutBox);let a=It();s?fe(a,t.applyTransform(o,true),e.measuredBox):fe(a,r,e.layoutBox);let u=!Wo(n),m=false;if(!t.resumeFrom){let l=t.getClosestProjectingParent();if(l&&!l.resumeFrom){let{snapshot:D,layout:c}=l;if(D&&c){let f=b();pe(f,e.layoutBox,D.layoutBox);let p=b();pe(p,r,c.layoutBox),$o(f,p)||(m=true),l.options.layoutRoot&&(t.relativeTarget=p,t.relativeTargetOrigin=f,t.relativeParent=l);}}}t.notifyListeners("didUpdate",{layout:r,snapshot:e,delta:a,layoutDelta:n,hasLayoutChanged:u,hasRelativeLayoutChanged:m});}else if(t.isLead()){let{onExitComplete:r}=t.options;r&&r();}t.options.transition=void 0;}function sm(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty));}function am(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=false;}function um(t){t.clearSnapshot();}function Xs(t){t.clearMeasurements();}function lm(t){t.isLayoutDirty=false;}function mm(t){let{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform();}function qs(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=true;}function Dm(t){t.resolveTargetDelta();}function cm(t){t.calcProjection();}function fm(t){t.resetSkewAndRotation();}function pm(t){t.removeLeadSnapshot();}function Zs(t,e,r){t.translate=A(e.translate,0,r),t.scale=A(e.scale,1,r),t.origin=e.origin,t.originPoint=e.originPoint;}function Js(t,e,r,o){t.min=A(e.min,r.min,o),t.max=A(e.max,r.max,o);}function hm(t,e,r,o){Js(t.x,e.x,r.x,o),Js(t.y,e.y,r.y,o);}function dm(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}var gm={duration:.45,ease:[.4,0,.1,1]},Qs=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),ta=Qs("applewebkit/")&&!Qs("chrome/")?Math.round:P;function ea(t){t.min=ta(t.min),t.max=ta(t.max);}function Cm(t){ea(t.x),ea(t.y);}function oa(t,e,r){return t==="position"||t==="preserve-aspect"&&!es(zo(e),zo(r),.2)}function Fm(t){return t!==t.root&&t.scroll?.wasRoot}var ia=Nr({attachResizeListener:(t,e)=>pt(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>true});var Xo={current:void 0},Ur=Nr({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Xo.current){let t=new ia({});t.mount(window),t.setOptions({layoutScroll:true}),Xo.current=t;}return Xo.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none";},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"});var na={pan:{Feature:kr},drag:{Feature:Lr,ProjectionNode:Ur,MeasureLayout:Or}};function sa(t,e,r){if(t instanceof EventTarget)return [t];if(typeof t=="string"){let o=document;let i=o.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}function Kr(t,e){let r=sa(t),o=new AbortController,i={passive:true,...e,signal:o.signal};return [r,i,()=>o.abort()]}function aa(t){return !(t.pointerType==="touch"||Mr())}function ua(t,e,r={}){let[o,i,s]=Kr(t,r),n=a=>{if(!aa(a))return;let{target:u}=a,m=e(u,a);if(typeof m!="function"||!u)return;let l=D=>{aa(D)&&(m(D),u.removeEventListener("pointerleave",l));};u.addEventListener("pointerleave",l,i);};return o.forEach(a=>{a.addEventListener("pointerenter",n,i);}),s}function la(t,e,r){let{props:o}=t;t.animationState&&o.whileHover&&t.animationState.setActive("whileHover",r==="Start");let i="onHover"+r,s=o[i];s&&E.postRender(()=>s(e,ht(e)));}var Gr=class extends I{mount(){let{current:e}=this.node;e&&(this.unmount=ua(e,(r,o)=>(la(this.node,o,"Start"),i=>la(this.node,i,"End"))));}unmount(){}};var Wr=class extends I{constructor(){super(...arguments),this.isActive=false;}onFocus(){let e=false;try{e=this.node.current.matches(":focus-visible");}catch{e=true;}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",true),this.isActive=true);}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",false),this.isActive=false);}mount(){this.unmount=st(pt(this.node.current,"focus",()=>this.onFocus()),pt(this.node.current,"blur",()=>this.onBlur()));}unmount(){}};var qo=(t,e)=>e?t===e?true:qo(t,e.parentElement):false;var ym=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function ma(t){return ym.has(t.tagName)||t.tabIndex!==-1}var Ce=new WeakSet;function Da(t){return e=>{e.key==="Enter"&&t(e);}}function Zo(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:true,bubbles:true}));}var ca=(t,e)=>{let r=t.currentTarget;if(!r)return;let o=Da(()=>{if(Ce.has(r))return;Zo(r,"down");let i=Da(()=>{Zo(r,"up");}),s=()=>Zo(r,"cancel");r.addEventListener("keyup",i,e),r.addEventListener("blur",s,e);});r.addEventListener("keydown",o,e),r.addEventListener("blur",()=>r.removeEventListener("keydown",o),e);};function fa(t){return ce(t)&&!Mr()}function pa(t,e,r={}){let[o,i,s]=Kr(t,r),n=a=>{let u=a.currentTarget;if(!fa(a))return;Ce.add(u);let m=e(u,a),l=(f,p)=>{window.removeEventListener("pointerup",D),window.removeEventListener("pointercancel",c),Ce.has(u)&&Ce.delete(u),fa(f)&&typeof m=="function"&&m(f,{success:p});},D=f=>{l(f,u===window||u===document||r.useGlobalTarget||qo(u,f.target));},c=f=>{l(f,false);};window.addEventListener("pointerup",D,i),window.addEventListener("pointercancel",c,i);};return o.forEach(a=>{(r.useGlobalTarget?window:a).addEventListener("pointerdown",n,i),a instanceof HTMLElement&&(a.addEventListener("focus",m=>ca(m,i)),!ma(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0));}),s}function ha(t,e,r){let{props:o}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&o.whileTap&&t.animationState.setActive("whileTap",r==="Start");let i="onTap"+(r==="End"?"":r),s=o[i];s&&E.postRender(()=>s(e,ht(e)));}var $r=class extends I{mount(){let{current:e}=this.node;e&&(this.unmount=pa(e,(r,o)=>(ha(this.node,o,"Start"),(i,{success:s})=>ha(this.node,i,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}));}unmount(){}};var Qo=new WeakMap,Jo=new WeakMap,xm=t=>{let e=Qo.get(t.target);e&&e(t);},Em=t=>{t.forEach(xm);};function vm({root:t,...e}){let r=t||document;Jo.has(r)||Jo.set(r,{});let o=Jo.get(r),i=JSON.stringify(e);return o[i]||(o[i]=new IntersectionObserver(Em,{root:t,...e})),o[i]}function da(t,e,r){let o=vm(e);return Qo.set(t,r),o.observe(t),()=>{Qo.delete(t),o.unobserve(t);}}var Am={some:0,all:1},zr=class extends I{constructor(){super(...arguments),this.hasEnteredView=false,this.isInView=false;}startObserver(){this.unmount();let{viewport:e={}}=this.node.getProps(),{root:r,margin:o,amount:i="some",once:s}=e,n={root:r?r.current:void 0,rootMargin:o,threshold:typeof i=="number"?i:Am[i]},a=u=>{let{isIntersecting:m}=u;if(this.isInView===m||(this.isInView=m,s&&!m&&this.hasEnteredView))return;m&&(this.hasEnteredView=true),this.node.animationState&&this.node.animationState.setActive("whileInView",m);let{onViewportEnter:l,onViewportLeave:D}=this.node.getProps(),c=m?l:D;c&&c(u);};return da(this.node.current,n,a)}mount(){this.startObserver();}update(){if(typeof IntersectionObserver>"u")return;let{props:e,prevProps:r}=this.node;["amount","margin","root"].some(Tm(e,r))&&this.startObserver();}unmount(){}};function Tm({viewport:t={}},{viewport:e={}}={}){return r=>t[r]!==e[r]}var ga={inView:{Feature:zr},tap:{Feature:$r},focus:{Feature:Wr},hover:{Feature:Gr}};var Ca={layout:{ProjectionNode:Ur,MeasureLayout:Or}};var we={current:null},Hr={current:false};function Fa(){if(Hr.current=true,!!Kt)if(window.matchMedia){let t=window.matchMedia("(prefers-reduced-motion)"),e=()=>we.current=t.matches;t.addListener(e),e();}else we.current=false;}var ya=new WeakMap;function xa(t,e,r){for(let o in e){let i=e[o],s=r[o];if(S(i))t.addValue(o,i);else if(S(s))t.addValue(o,tt(i,{owner:t}));else if(s!==i)if(t.hasValue(o)){let n=t.getValue(o);n.liveStyle===true?n.jump(i):n.hasAnimated||n.set(i);}else {let n=t.getStaticValue(o);t.addValue(o,tt(n!==void 0?n:i,{owner:t}));}}for(let o in r)e[o]===void 0&&t.removeValue(o);return e}var _r=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);var Yr=t=>/^0[^.\s]+$/u.test(t);var Ea={test:t=>t==="auto",parse:t=>t};var Xr=t=>e=>e.test(t);var ti=[rt,C,W,ot,bi,Vi,Ea],ei=t=>ti.find(Xr(t));var Bm=[...ti,R,$],va=t=>Bm.find(Xr(t));var Sm=new Set(["brightness","contrast","saturate","opacity"]);function Vm(t){let[e,r]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;let[o]=r.match(ie)||[];if(!o)return t;let i=r.replace(o,""),s=Sm.has(e)?1:0;return o!==r&&(s*=100),e+"("+s+i+")"}var bm=/\b([a-z-]*)\(.*?\)/gu,Re={...$,getAnimatableNone:t=>{let e=t.match(bm);return e?e.map(Vm).join(" "):t}};var Pm={...Yt,color:R,backgroundColor:R,outlineColor:R,fill:R,stroke:R,borderColor:R,borderTopColor:R,borderRightColor:R,borderBottomColor:R,borderLeftColor:R,filter:Re,WebkitFilter:Re},qr=t=>Pm[t];function Zr(t,e){let r=qr(t);return r!==Re&&(r=$),r.getAnimatableNone?r.getAnimatableNone(e):void 0}var Aa=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Jr=class{scrapeMotionValuesFromProps(e,r,o){return {}}constructor({parent:e,props:r,presenceContext:o,reducedMotionConfig:i,blockInitialAnimation:s,visualState:n},a={}){this.current=null,this.children=new Set,this.isVariantNode=false,this.isControllingVariants=false,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=St,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection));},this.renderScheduledAt=0,this.scheduleRender=()=>{let c=w.now();this.renderScheduledAt<c&&(this.renderScheduledAt=c,E.render(this.render,false,true));};let{latestValues:u,renderState:m}=n;this.latestValues=u,this.baseTarget={...u},this.initialValues=r.initial?{...u}:{},this.renderState=m,this.parent=e,this.props=r,this.presenceContext=o,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=Pt(r),this.isVariantNode=Ue(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:l,...D}=this.scrapeMotionValuesFromProps(r,{},this);for(let c in D){let f=D[c];u[c]!==void 0&&S(f)&&f.set(u[c],false);}}mount(e){this.current=e,ya.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,o)=>this.bindToMotionValue(o,r)),Hr.current||Fa(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?false:this.reducedMotionConfig==="always"?true:we.current,process.env.NODE_ENV!=="production"&&Wt(this.shouldReduceMotion!==true,"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(),Y(this.notifyUpdate),Y(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let r=this.features[e];r&&(r.unmount(),r.isMounted=false);}this.current=null;}bindToMotionValue(e,r){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();let o=Z.has(e);o&&this.onBindTransform&&this.onBindTransform();let i=r.on("change",a=>{this.latestValues[e]=a,this.props.onUpdate&&E.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=true);}),s=r.on("renderRequest",this.scheduleRender),n;window.MotionCheckAppearSync&&(n=window.MotionCheckAppearSync(this,e,r)),this.valueSubscriptions.set(e,()=>{i(),s(),n&&n(),r.owner&&r.stop();});}sortNodePosition(e){return !this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in ut){let r=ut[e];if(!r)continue;let{isEnabled:o,Feature:i}=r;if(!this.features[e]&&i&&o(this.props)&&(this.features[e]=new i(this)),this.features[e]){let s=this.features[e];s.isMounted?s.update():(s.mount(),s.isMounted=true);}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props);}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):b()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,r){this.latestValues[e]=r;}update(e,r){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let o=0;o<Aa.length;o++){let i=Aa[o];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);let s="on"+i,n=e[s];n&&(this.propEventSubscriptions[i]=this.on(i,n));}this.prevMotionValues=xa(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue();}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let r=this.getClosestVariantNode();if(r)return r.variantChildren&&r.variantChildren.add(e),()=>r.variantChildren.delete(e)}addValue(e,r){let o=this.values.get(e);r!==o&&(o&&this.removeValue(e),this.bindToMotionValue(e,r),this.values.set(e,r),this.latestValues[e]=r.get());}removeValue(e){this.values.delete(e);let r=this.valueSubscriptions.get(e);r&&(r(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState);}hasValue(e){return this.values.has(e)}getValue(e,r){if(this.props.values&&this.props.values[e])return this.props.values[e];let o=this.values.get(e);return o===void 0&&r!==void 0&&(o=tt(r===null?void 0:r,{owner:this}),this.addValue(e,o)),o}readValue(e,r){let o=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return o!=null&&(typeof o=="string"&&(_r(o)||Yr(o))?o=parseFloat(o):!va(o)&&$.test(r)&&(o=Zr(e,r)),this.setBaseTarget(e,S(o)?o.get():o)),S(o)?o.get():o}setBaseTarget(e,r){this.baseTarget[e]=r;}getBaseTarget(e){let{initial:r}=this.props,o;if(typeof r=="string"||typeof r=="object"){let s=Jt(this.props,r,this.presenceContext?.custom);s&&(o=s[e]);}if(r&&o!==void 0)return o;let i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!S(i)?i:this.initialValues[e]!==void 0&&o===void 0?void 0:this.baseTarget[e]}on(e,r){return this.events[e]||(this.events[e]=new Ft),this.events[e].add(r)}notify(e,...r){this.events[e]&&this.events[e].notify(...r);}};var Mm=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function wm(t){let e=Mm.exec(t);if(!e)return [,];let[,r,o,i]=e;return [`--${r??o}`,i]}var Rm=4;function ri(t,e,r=1){N(r<=Rm,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);let[o,i]=wm(t);if(!o)return;let s=window.getComputedStyle(e).getPropertyValue(o);if(s){let n=s.trim();return _r(n)?parseFloat(n):n}return _t(i)?ri(i,e,r+1):i}function Ta(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Yr(t):true}var Lm=new Set(["auto","none","0"]);function Ba(t,e,r){let o=0,i;for(;o<t.length&&!i;){let s=t[o];typeof s=="string"&&!Lm.has(s)&&wt(s).values.length&&(i=t[o]),o++;}if(i&&r)for(let s of e)t[s]=Zr(r,i);}var Qr=class extends St{constructor(e,r,o,i,s){super(e,r,o,i,s,true);}readKeyframes(){let{unresolvedKeyframes:e,element:r,name:o}=this;if(!r||!r.current)return;super.readKeyframes();for(let u=0;u<e.length;u++){let m=e[u];if(typeof m=="string"&&(m=m.trim(),_t(m))){let l=ri(m,r.current);l!==void 0&&(e[u]=l),u===e.length-1&&(this.finalKeyframe=m);}}if(this.resolveNoneKeyframes(),!Er.has(o)||e.length!==2)return;let[i,s]=e,n=ei(i),a=ei(s);if(n!==a)if(Ao(n)&&Ao(a))for(let u=0;u<e.length;u++){let m=e[u];typeof m=="string"&&(e[u]=parseFloat(m));}else Bt[o]&&(this.needsMeasurement=true);}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:r}=this,o=[];for(let i=0;i<e.length;i++)(e[i]===null||Ta(e[i]))&&o.push(i);o.length&&Ba(e,o,r);}measureInitialState(){let{element:e,unresolvedKeyframes:r,name:o}=this;if(!e||!e.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Bt[o](e.measureViewportBox(),window.getComputedStyle(e.current)),r[0]=this.measuredOrigin;let i=r[r.length-1];i!==void 0&&e.getValue(o,i).jump(i,false);}measureEndState(){let{element:e,name:r,unresolvedKeyframes:o}=this;if(!e||!e.current)return;let i=e.getValue(r);i&&i.jump(this.measuredOrigin,false);let s=o.length-1,n=o[s];o[s]=Bt[r](e.measureViewportBox(),window.getComputedStyle(e.current)),n!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=n),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,u])=>{e.getValue(a).set(u);}),this.resolveNoneKeyframes();}};var Fe=class extends Jr{constructor(){super(...arguments),this.KeyframeResolver=Qr;}sortInstanceNodePosition(e,r){return e.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(e,r){return e.style?e.style[r]:void 0}removeValueFromRenderState(e,{vars:r,style:o}){delete r[e],delete o[e];}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;S(e)&&(this.childSubscription=e.on("change",r=>{this.current&&(this.current.textContent=`${r}`);}));}};function to(t,{style:e,vars:r},o,i){Object.assign(t.style,e,i&&i.getProjectionStyles(o));for(let s in r)t.style.setProperty(s,r[s]);}function km(t){return window.getComputedStyle(t)}var eo=class extends Fe{constructor(){super(...arguments),this.type="html",this.renderInstance=to;}readValueFromInstance(e,r){if(Z.has(r))return Bn(e,r);{let o=km(e),i=(Ht(r)?o.getPropertyValue(r):o[r])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:r}){return Io(e,r)}build(e,r,o){Xt(e,r,o.transformTemplate);}scrapeMotionValuesFromProps(e,r,o){return te(e,r,o)}};var ro=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 Sa(t,e,r,o){to(t,e,void 0,o);for(let i in e.attrs)t.setAttribute(ro.has(i)?i:$t(i),e.attrs[i]);}var oo=class extends Fe{constructor(){super(...arguments),this.type="svg",this.isSVGTag=false,this.measureInstanceViewportBox=b;}getBaseTargetFromProps(e,r){return e[r]}readValueFromInstance(e,r){if(Z.has(r)){let o=qr(r);return o&&o.default||0}return r=ro.has(r)?r:$t(r),e.getAttribute(r)}scrapeMotionValuesFromProps(e,r,o){return Xe(e,r,o)}build(e,r,o){ze(e,r,this.isSVGTag,o.transformTemplate,o.style);}renderInstance(e,r,o,i){Sa(e,r,o,i);}mount(e){this.isSVGTag=_e(e.tagName),super.mount(e);}};var Va=(t,e)=>Zt(t)?new oo(e):new eo(e,{allowProjection:t!==Fragment});var ba=Ki({...Hn,...ga,...na,...Ca},Va);var io=gi(ba);function Ma(t,e){let r=0;return (...o)=>{let i=Date.now();i-r>=e&&(r=i,t(...o));}}function Im(t){let e=(0, Ra.default)(),r=[],o=0;return t.replace(e,(i,s)=>(s>o&&r.push(...t.slice(o,s).split("")),r.push(i),o=s+i.length,i)),o<t.length&&r.push(...t.slice(o).split("")),r}function jm({children:t,className:e,characterVariants:r,dadElement:o,onCharacterAnimationComplete:i,key:s}){if(typeof t=="string"){let n=Im(t).map((a,u)=>{let m=useRef(null),l=i?Ma(()=>i(m),10):void 0;return jsx(io.span,{ref:m,className:e,variants:r,onAnimationComplete:l,children:a},`span-${s}-${a}-${u}`)});return o(n,true)}else if(Array.isArray(t)){let n=t.map(a=>typeof a=="string"?a.split("").map((m,l)=>{let D=useRef(null),c=i?Ma(()=>i(D),10):void 0;return jsx(io.span,{ref:D,className:e,variants:r,onAnimationComplete:c,children:m},`span-${s}-${m}-${l}`)}):a);return o(n)}return o(t,true)}export{jm as default};
|