import{r as g,j as _}from"./react-core-lkHtAB4F.js";import{m as Fe,a as W,n as U,M as me,S as Be,v as Fs,s as $,i as Bs,p as St,b as ks,r as Is}from"./vendor-m-109-Du2052Hq.js";const ke=g.createContext({});function Ie(t){const e=g.useRef(null);return e.current===null&&(e.current=t()),e.current}const je=typeof window<"u",js=je?g.useLayoutEffect:g.useEffect,Yt=g.createContext(null),Oe=g.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});class cr extends g.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const s=n.offsetParent,i=s instanceof HTMLElement&&s.offsetWidth||0,o=this.props.sizeRef.current;o.height=n.offsetHeight||0,o.width=n.offsetWidth||0,o.top=n.offsetTop,o.left=n.offsetLeft,o.right=i-o.width-o.left}return null}componentDidUpdate(){}render(){return this.props.children}}function hr({children:t,isPresent:e,anchorX:n}){const s=g.useId(),i=g.useRef(null),o=g.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:r}=g.useContext(Oe);return g.useInsertionEffect(()=>{const{width:a,height:l,top:c,left:u,right:h}=o.current;if(e||!i.current||!a||!l)return;const f=n==="left"?`left: ${u}`:`right: ${h}`;i.current.dataset.motionPopId=s;const d=document.createElement("style");return r&&(d.nonce=r),document.head.appendChild(d),d.sheet&&d.sheet.insertRule(`
[data-motion-pop-id="${s}"] {
position: absolute !important;
width: ${a}px !important;
height: ${l}px !important;
${f}px !important;
top: ${c}px !important;
}
`),()=>{document.head.removeChild(d)}},[e]),_.jsx(cr,{isPresent:e,childRef:i,sizeRef:o,children:g.cloneElement(t,{ref:i})})}const fr=({children:t,initial:e,isPresent:n,onExitComplete:s,custom:i,presenceAffectsLayout:o,mode:r,anchorX:a})=>{const l=Ie(dr),c=g.useId(),u=g.useCallback(f=>{l.set(f,!0);for(const d of l.values())if(!d)return;s&&s()},[l,s]),h=g.useMemo(()=>({id:c,initial:e,isPresent:n,custom:i,onExitComplete:u,register:f=>(l.set(f,!1),()=>l.delete(f))}),o?[Math.random(),u]:[n,u]);return g.useMemo(()=>{l.forEach((f,d)=>l.set(d,!1))},[n]),g.useEffect(()=>{!n&&!l.size&&s&&s()},[n]),r==="popLayout"&&(t=_.jsx(hr,{isPresent:n,anchorX:a,children:t})),_.jsx(Yt.Provider,{value:h,children:t})};function dr(){return new Map}function Os(t=!0){const e=g.useContext(Yt);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,o=g.useId();g.useEffect(()=>{if(t)return i(o)},[t]);const r=g.useCallback(()=>t&&s&&s(o),[o,s,t]);return!n&&s?[!1,r]:[!0]}const kt=t=>t.key||"";function pn(t){const e=[];return g.Children.forEach(t,n=>{g.isValidElement(n)&&e.push(n)}),e}const zu=({children:t,custom:e,initial:n=!0,onExitComplete:s,presenceAffectsLayout:i=!0,mode:o="sync",propagate:r=!1,anchorX:a="left"})=>{const[l,c]=Os(r),u=g.useMemo(()=>pn(t),[t]),h=r&&!l?[]:u.map(kt),f=g.useRef(!0),d=g.useRef(u),m=Ie(()=>new Map),[y,v]=g.useState(u),[p,P]=g.useState(u);js(()=>{f.current=!1,d.current=u;for(let T=0;T
{const A=kt(T),C=r&&!l?!1:u===p||h.includes(A),w=()=>{if(m.has(A))m.set(A,!0);else return;let E=!0;m.forEach(j=>{j||(E=!1)}),E&&(b?.(),P(d.current),r&&c?.(),s&&s())};return _.jsx(fr,{isPresent:C,initial:!f.current||n?void 0:!1,custom:e,presenceAffectsLayout:i,mode:o,onExitComplete:C?void 0:w,anchorX:a,children:T},A)})})},mr=Fe(()=>window.ScrollTimeline!==void 0);class pr{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}setAll(e,n){for(let s=0;s{if(mr()&&i.attachTimeline)return i.attachTimeline(e);if(typeof n=="function")return n(i)});return()=>{s.forEach((i,o)=>{i&&i(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let n=0;nn[e]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class gr extends pr{then(e,n){return this.finished.finally(e).then(()=>{})}}const gn={value:null},Ne=t=>Array.isArray(t)&&typeof t[0]=="number",yr={};function vr(t,e){const n=Fe(t);return()=>yr[e]??n()}const At=vr(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Ns=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let o=0;o`cubic-bezier(${t}, ${e}, ${n}, ${s})`,pe={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:gt([0,.65,.55,1]),circOut:gt([.55,0,1,.45]),backIn:gt([.31,.01,.66,-.59]),backOut:gt([.33,1.53,.69,.99])};function Us(t,e){if(t)return typeof t=="function"&&At()?Ns(t,e):Ne(t)?gt(t):Array.isArray(t)?t.map(n=>Us(n,e)||pe.easeOut):pe[t]}function xr(t,e,n,{delay:s=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:a="easeInOut",times:l}={},c=void 0){const u={[e]:n};l&&(u.offset=l);const h=Us(a,i);return Array.isArray(h)&&(u.easing=h),t.animate(u,{delay:s,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal",pseudoElement:c})}function Ue(t){return typeof t=="function"&&"applyToOptions"in t}function Ke(t,e){return t?.[e]??t?.default??t}const Wt=2e4;function We(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e=Wt?1/0:e}function Tr(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(We(s),Wt);return{type:"keyframes",ease:o=>s.next(i*o).value/e,duration:W(i)}}function Ks(t){return!!(typeof t=="function"&&At()||!t||typeof t=="string"&&(t in pe||At())||Ne(t)||Array.isArray(t)&&t.every(Ks))}function yn(t,e){t.timeline=e,t.onfinish=null}const It=["read","resolveKeyframes","update","preRender","render","postRender"];function Pr(t,e){let n=new Set,s=new Set,i=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(h){r.has(h)&&(u.schedule(h),t()),l++,h(a)}const u={schedule:(h,f=!1,d=!1)=>{const y=d&&i?n:s;return f&&r.add(h),y.has(h)||y.add(h),h},cancel:h=>{s.delete(h),r.delete(h)},process:h=>{if(a=h,i){o=!0;return}i=!0,[n,s]=[s,n],n.forEach(c),e&&gn.value&&gn.value.frameloop[e].push(l),l=0,n.clear(),i=!1,o&&(o=!1,u.process(h))}};return u}const Sr=40;function Ws(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=It.reduce((p,P)=>(p[P]=Pr(o,e?P:void 0),p),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:h,postRender:f}=r,d=()=>{const p=performance.now();n=!1,i.delta=s?1e3/60:Math.max(Math.min(p-i.timestamp,Sr),1),i.timestamp=p,i.isProcessing=!0,a.process(i),l.process(i),c.process(i),u.process(i),h.process(i),f.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(d))},m=()=>{n=!0,s=!0,i.isProcessing||t(d)};return{schedule:It.reduce((p,P)=>{const x=r[P];return p[P]=(b,T=!1,A=!1)=>(n||m(),x.schedule(b,T,A)),p},{}),cancel:p=>{for(let P=0;P(Nt===void 0&&G.set(L.isProcessing||me.useManualTiming?L.timestamp:performance.now()),Nt),set:t=>{Nt=t,queueMicrotask(Ar)}},K={x:!1,y:!1};function $s(){return K.x||K.y}function wr(t){return t==="x"||t==="y"?K[t]?null:(K[t]=!0,()=>{K[t]=!1}):K.x||K.y?null:(K.x=K.y=!0,()=>{K.x=K.y=!1})}function br(t,e,n){if(t instanceof EventTarget)return[t];if(typeof t=="string"){let s=document;const i=n?.[t]??s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}function Gs(t,e){const n=br(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function vn(t){return!(t.pointerType==="touch"||$s())}function Vr(t,e,n={}){const[s,i,o]=Gs(t,n),r=a=>{if(!vn(a))return;const{target:l}=a,c=e(l,a);if(typeof c!="function"||!l)return;const u=h=>{vn(h)&&(c(h),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,i)};return s.forEach(a=>{a.addEventListener("pointerenter",r,i)}),o}const zs=(t,e)=>e?t===e?!0:zs(t,e.parentElement):!1,Ge=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Cr=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Mr(t){return Cr.has(t.tagName)||t.tabIndex!==-1}const yt=new WeakSet;function xn(t){return e=>{e.key==="Enter"&&t(e)}}function se(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Dr=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=xn(()=>{if(yt.has(n))return;se(n,"down");const i=xn(()=>{se(n,"up")}),o=()=>se(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",o,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function Tn(t){return Ge(t)&&!$s()}function Rr(t,e,n={}){const[s,i,o]=Gs(t,n),r=a=>{const l=a.currentTarget;if(!Tn(a)||yt.has(l))return;yt.add(l);const c=e(l,a),u=(d,m)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),!(!Tn(d)||!yt.has(l))&&(yt.delete(l),typeof c=="function"&&c(d,{success:m}))},h=d=>{u(d,l===window||l===document||n.useGlobalTarget||zs(l,d.target))},f=d=>{u(d,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",f,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,i),a instanceof HTMLElement&&(a.addEventListener("focus",c=>Dr(c,i)),!Mr(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}const Pn=30,Er=t=>!isNaN(parseFloat(t));class Lr{constructor(e,n={}){this.version="12.7.3",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(s,i=!0)=>{const o=G.now();this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=G.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Er(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Be);const s=this.events[e].add(n);return e==="change"?()=>{s(),V.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=G.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Pn)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Pn);return Fs(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function wt(t,e){return new Lr(t,e)}const Hs=g.createContext({strict:!1}),Sn={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"]},ht={};for(const t in Sn)ht[t]={isEnabled:e=>Sn[t].some(n=>!!e[n])};function Fr(t){for(const e in t)ht[e]={...ht[e],...t[e]}}const Br=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 $t(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Br.has(t)}let _s=t=>!$t(t);function kr(t){t&&(_s=e=>e.startsWith("on")?!$t(e):t(e))}try{kr(require("@emotion/is-prop-valid").default)}catch{}function Ir(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(_s(i)||n===!0&&$t(i)||!e&&!$t(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}function jr(t){if(typeof Proxy>"u")return t;const e=new Map,n=(...s)=>t(...s);return new Proxy(n,{get:(s,i)=>i==="create"?t:(e.has(i)||e.set(i,t(i)),e.get(i))})}const qt=g.createContext({});function Zt(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function bt(t){return typeof t=="string"||Array.isArray(t)}const ze=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],He=["initial",...ze];function Jt(t){return Zt(t.animate)||He.some(e=>bt(t[e]))}function Xs(t){return!!(Jt(t)||t.variants)}function Or(t,e){if(Jt(t)){const{initial:n,animate:s}=t;return{initial:n===!1||bt(n)?n:void 0,animate:bt(s)?s:void 0}}return t.inherit!==!1?e:{}}function Nr(t){const{initial:e,animate:n}=Or(t,g.useContext(qt));return g.useMemo(()=>({initial:e,animate:n}),[An(e),An(n)])}function An(t){return Array.isArray(t)?t.join(" "):t}const Ur=Symbol.for("motionComponentSymbol");function ot(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Kr(t,e,n){return g.useCallback(s=>{s&&t.onMount&&t.onMount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):ot(n)&&(n.current=s))},[e])}const _e=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Wr="framerAppearId",Ys="data-"+_e(Wr),qs=g.createContext({});function $r(t,e,n,s,i){const{visualElement:o}=g.useContext(qt),r=g.useContext(Hs),a=g.useContext(Yt),l=g.useContext(Oe).reducedMotion,c=g.useRef(null);s=s||r.renderer,!c.current&&s&&(c.current=s(t,{visualState:e,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,h=g.useContext(qs);u&&!u.projection&&i&&(u.type==="html"||u.type==="svg")&&Gr(c.current,n,i,h);const f=g.useRef(!1);g.useInsertionEffect(()=>{u&&f.current&&u.update(n,a)});const d=n[Ys],m=g.useRef(!!d&&!window.MotionHandoffIsComplete?.(d)&&window.MotionHasOptimisedAnimation?.(d));return js(()=>{u&&(f.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),$e.render(u.render),m.current&&u.animationState&&u.animationState.animateChanges())}),g.useEffect(()=>{u&&(!m.current&&u.animationState&&u.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(d)}),m.current=!1))}),u}function Gr(t,e,n,s){const{layoutId:i,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Zs(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!r||a&&ot(a),visualElement:t,animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,crossfade:u,layoutScroll:l,layoutRoot:c})}function Zs(t){if(t)return t.options.allowProjection!==!1?t.projection:Zs(t.parent)}function zr({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:s,Component:i}){t&&Fr(t);function o(a,l){let c;const u={...g.useContext(Oe),...a,layoutId:Hr(a)},{isStatic:h}=u,f=Nr(a),d=s(a,h);if(!h&&je){_r();const m=Xr(u);c=m.MeasureLayout,f.visualElement=$r(i,d,u,e,m.ProjectionNode)}return _.jsxs(qt.Provider,{value:f,children:[c&&f.visualElement?_.jsx(c,{visualElement:f.visualElement,...u}):null,n(i,a,Kr(d,f.visualElement,l),d,h,f.visualElement)]})}o.displayName=`motion.${typeof i=="string"?i:`create(${i.displayName??i.name??""})`}`;const r=g.forwardRef(o);return r[Ur]=i,r}function Hr({layoutId:t}){const e=g.useContext(ke).id;return e&&t!==void 0?e+"-"+t:t}function _r(t,e){g.useContext(Hs).strict}function Xr(t){const{drag:e,layout:n}=ht;if(!e&&!n)return{};const s={...e,...n};return{MeasureLayout:e?.isEnabled(t)||n?.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}const Js=t=>e=>typeof e=="string"&&e.startsWith(t),Xe=Js("--"),Yr=Js("var(--"),Ye=t=>Yr(t)?qr.test(t.split("/*")[0].trim()):!1,qr=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Vt={};function Zr(t){for(const e in t)Vt[e]=t[e],Xe(e)&&(Vt[e].isCSSVariable=!0)}const dt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],it=new Set(dt);function Qs(t,{layout:e,layoutId:n}){return it.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Vt[t]||t==="opacity")}const B=t=>!!(t&&t.getVelocity),ti=(t,e)=>e&&typeof t=="number"?e.transform(t):t,X=(t,e,n)=>n>e?e:ntypeof t=="number",parse:parseFloat,transform:t=>t},Ct={...mt,transform:t=>X(0,1,t)},jt={...mt,default:1},Et=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Y=Et("deg"),z=Et("%"),S=Et("px"),Jr=Et("vh"),Qr=Et("vw"),wn={...z,parse:t=>z.parse(t)/100,transform:t=>z.transform(t*100)},to={borderWidth:S,borderTopWidth:S,borderRightWidth:S,borderBottomWidth:S,borderLeftWidth:S,borderRadius:S,radius:S,borderTopLeftRadius:S,borderTopRightRadius:S,borderBottomRightRadius:S,borderBottomLeftRadius:S,width:S,maxWidth:S,height:S,maxHeight:S,top:S,right:S,bottom:S,left:S,padding:S,paddingTop:S,paddingRight:S,paddingBottom:S,paddingLeft:S,margin:S,marginTop:S,marginRight:S,marginBottom:S,marginLeft:S,backgroundPositionX:S,backgroundPositionY:S},eo={rotate:Y,rotateX:Y,rotateY:Y,rotateZ:Y,scale:jt,scaleX:jt,scaleY:jt,scaleZ:jt,skew:Y,skewX:Y,skewY:Y,distance:S,translateX:S,translateY:S,translateZ:S,x:S,y:S,z:S,perspective:S,transformPerspective:S,opacity:Ct,originX:wn,originY:wn,originZ:S},bn={...mt,transform:Math.round},qe={...to,...eo,zIndex:bn,size:S,fillOpacity:Ct,strokeOpacity:Ct,numOctaves:bn},no={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},so=dt.length;function io(t,e,n){let s="",i=!0;for(let o=0;o({style:{},transform:{},transformOrigin:{},vars:{}});function ei(t,e,n){for(const s in e)!B(e[s])&&!Qs(s,n)&&(t[s]=e[s])}function ro({transformTemplate:t},e){return g.useMemo(()=>{const n=Je();return Ze(n,e,t),Object.assign({},n.vars,n.style)},[e])}function oo(t,e){const n=t.style||{},s={};return ei(s,n,t),Object.assign(s,ro(t,e)),s}function ao(t,e){const n={},s=oo(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=s,n}const lo=["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 Qe(t){return typeof t!="string"||t.includes("-")?!1:!!(lo.indexOf(t)>-1||/[A-Z]/u.test(t))}const uo={offset:"stroke-dashoffset",array:"stroke-dasharray"},co={offset:"strokeDashoffset",array:"strokeDasharray"};function ho(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?uo:co;t[o.offset]=S.transform(-s);const r=S.transform(e),a=S.transform(n);t[o.array]=`${r} ${a}`}function Vn(t,e,n){return typeof t=="string"?t:S.transform(e+n*t)}function fo(t,e,n){const s=Vn(e,t.x,t.width),i=Vn(n,t.y,t.height);return`${s} ${i}`}function tn(t,{attrX:e,attrY:n,attrScale:s,originX:i,originY:o,pathLength:r,pathSpacing:a=1,pathOffset:l=0,...c},u,h){if(Ze(t,c,h),u){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:f,style:d,dimensions:m}=t;f.transform&&(m&&(d.transform=f.transform),delete f.transform),m&&(i!==void 0||o!==void 0||d.transform)&&(d.transformOrigin=fo(m,i!==void 0?i:.5,o!==void 0?o:.5)),e!==void 0&&(f.x=e),n!==void 0&&(f.y=n),s!==void 0&&(f.scale=s),r!==void 0&&ho(f,r,a,l,!1)}const ni=()=>({...Je(),attrs:{}}),en=t=>typeof t=="string"&&t.toLowerCase()==="svg";function mo(t,e,n,s){const i=g.useMemo(()=>{const o=ni();return tn(o,e,en(s),t.transformTemplate),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};ei(o,t.style,t),i.style={...o,...i.style}}return i}function po(t=!1){return(n,s,i,{latestValues:o},r)=>{const l=(Qe(n)?mo:ao)(s,o,r,n),c=Ir(s,typeof n=="string",t),u=n!==g.Fragment?{...c,...l,ref:i}:{},{children:h}=s,f=g.useMemo(()=>B(h)?h.get():h,[h]);return g.createElement(n,{...u,children:f})}}function Cn(t){const e=[{},{}];return t?.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function nn(t,e,n,s){if(typeof e=="function"){const[i,o]=Cn(s);e=e(n!==void 0?n:t.custom,i,o)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,o]=Cn(s);e=e(n!==void 0?n:t.custom,i,o)}return e}const ge=t=>Array.isArray(t),go=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),yo=t=>ge(t)?t[t.length-1]||0:t;function Ut(t){const e=B(t)?t.get():t;return go(e)?e.toValue():e}function vo({scrapeMotionValuesFromProps:t,createRenderState:e,onUpdate:n},s,i,o){const r={latestValues:xo(s,i,o,t),renderState:e()};return n&&(r.onMount=a=>n({props:s,current:a,...r}),r.onUpdate=a=>n(a)),r}const si=t=>(e,n)=>{const s=g.useContext(qt),i=g.useContext(Yt),o=()=>vo(t,e,s,i);return n?o():Ie(o)};function xo(t,e,n,s){const i={},o=s(t,{});for(const f in o)i[f]=Ut(o[f]);let{initial:r,animate:a}=t;const l=Jt(t),c=Xs(t);e&&c&&!l&&t.inherit!==!1&&(r===void 0&&(r=e.initial),a===void 0&&(a=e.animate));let u=n?n.initial===!1:!1;u=u||r===!1;const h=u?a:r;if(h&&typeof h!="boolean"&&!Zt(h)){const f=Array.isArray(h)?h:[h];for(let d=0;d{if(!n)return;let o=!!t.drag;if(!o){for(const a in i)if(it.has(a)){o=!0;break}}if(!o)return;let r=!e;if(e)for(let a=0;a{ii(n,s),V.render(()=>{tn(s,i,en(n.tagName),t.transformTemplate),ai(n,s)})})}})};function So(t,e){return function(s,{forwardMotionProps:i}={forwardMotionProps:!1}){const r={...Qe(s)?Po:To,preloadedFeatures:t,useRender:po(i),createVisualElement:e,Component:s};return zr(r)}}function Mt(t,e,n){const s=t.getProps();return nn(s,e,n!==void 0?n:s.custom,t)}const ui=new Set(["width","height","top","left","right","bottom",...dt]);function Ao(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,wt(n))}function wo(t,e){const n=Mt(t,e);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const r in o){const a=yo(o[r]);Ao(t,r,a)}}function bo(t){return!!(B(t)&&t.add)}function ye(t,e){const n=t.getValue("willChange");if(bo(n))return n.add(e);if(!n&&me.WillChange){const s=new me.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function ci(t){return t.props[Ys]}const hi=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Vo=1e-7,Co=12;function Mo(t,e,n,s,i){let o,r,a=0;do r=e+(n-e)/2,o=hi(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>Vo&&++aMo(o,0,1,t,n);return o=>o===0||o===1?o:hi(i(o),e,s)}const fi=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,di=t=>e=>1-t(1-e),mi=Lt(.33,1.53,.69,.99),rn=di(mi),pi=fi(rn),gi=t=>(t*=2)<1?.5*rn(t):.5*(2-Math.pow(2,-10*(t-1))),on=t=>1-Math.sin(Math.acos(t)),yi=di(on),vi=fi(on),xi=t=>/^0[^.\s]+$/u.test(t);function Do(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||xi(t):!0}const vt=t=>Math.round(t*1e5)/1e5,an=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ro(t){return t==null}const Eo=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ln=(t,e)=>n=>!!(typeof n=="string"&&Eo.test(n)&&n.startsWith(t)||e&&!Ro(n)&&Object.prototype.hasOwnProperty.call(n,e)),Ti=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,o,r,a]=s.match(an);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},Lo=t=>X(0,255,t),ie={...mt,transform:t=>Math.round(Lo(t))},et={test:ln("rgb","red"),parse:Ti("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+ie.transform(t)+", "+ie.transform(e)+", "+ie.transform(n)+", "+vt(Ct.transform(s))+")"};function Fo(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const ve={test:ln("#"),parse:Fo,transform:et.transform},at={test:ln("hsl","hue"),parse:Ti("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+z.transform(vt(e))+", "+z.transform(vt(n))+", "+vt(Ct.transform(s))+")"},F={test:t=>et.test(t)||ve.test(t)||at.test(t),parse:t=>et.test(t)?et.parse(t):at.test(t)?at.parse(t):ve.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?et.transform(t):at.transform(t)},Bo=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function ko(t){return isNaN(t)&&typeof t=="string"&&(t.match(an)?.length||0)+(t.match(Bo)?.length||0)>0}const Pi="number",Si="color",Io="var",jo="var(",Dn="${}",Oo=/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 Dt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(Oo,l=>(F.test(l)?(s.color.push(o),i.push(Si),n.push(F.parse(l))):l.startsWith(jo)?(s.var.push(o),i.push(Io),n.push(l)):(s.number.push(o),i.push(Pi),n.push(parseFloat(l))),++o,Dn)).split(Dn);return{values:n,split:a,indexes:s,types:i}}function Ai(t){return Dt(t).values}function wi(t){const{split:e,types:n}=Dt(t),s=e.length;return i=>{let o="";for(let r=0;rtypeof t=="number"?0:t;function Uo(t){const e=Ai(t);return wi(t)(e.map(No))}const Z={test:ko,parse:Ai,createTransformer:wi,getAnimatableNone:Uo},Ko=new Set(["brightness","contrast","saturate","opacity"]);function Wo(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(an)||[];if(!s)return t;const i=n.replace(s,"");let o=Ko.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const $o=/\b([a-z-]*)\(.*?\)/gu,xe={...Z,getAnimatableNone:t=>{const e=t.match($o);return e?e.map(Wo).join(" "):t}},Go={...qe,color:F,backgroundColor:F,outlineColor:F,fill:F,stroke:F,borderColor:F,borderTopColor:F,borderRightColor:F,borderBottomColor:F,borderLeftColor:F,filter:xe,WebkitFilter:xe},bi=t=>Go[t];function Vi(t,e){let n=bi(t);return n!==xe&&(n=Z),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const zo=new Set(["auto","none","0"]);function Ho(t,e,n){let s=0,i;for(;st*180/Math.PI,Te=t=>{const e=nt(Math.atan2(t[1],t[0]));return Pe(e)},_o={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Te,rotateZ:Te,skewX:t=>nt(Math.atan(t[1])),skewY:t=>nt(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Pe=t=>(t=t%360,t<0&&(t+=360),t),Rn=Te,En=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Ln=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Xo={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:En,scaleY:Ln,scale:t=>(En(t)+Ln(t))/2,rotateX:t=>Pe(nt(Math.atan2(t[6],t[5]))),rotateY:t=>Pe(nt(Math.atan2(-t[2],t[0]))),rotateZ:Rn,rotate:Rn,skewX:t=>nt(Math.atan(t[4])),skewY:t=>nt(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Fn(t){return t.includes("scale")?1:0}function Se(t,e){if(!t||t==="none")return Fn(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Xo,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=_o,i=a}if(!i)return Fn(e);const o=s[e],r=i[1].split(",").map(qo);return typeof o=="function"?o(r):r[o]}const Yo=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Se(n,e)};function qo(t){return parseFloat(t.trim())}const Bn=t=>t===mt||t===S,Zo=new Set(["x","y","z"]),Jo=dt.filter(t=>!Zo.has(t));function Qo(t){const e=[];return Jo.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const ft={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>Se(e,"x"),y:(t,{transform:e})=>Se(e,"y")};ft.translateX=ft.x;ft.translateY=ft.y;const st=new Set;let Ae=!1,we=!1;function Ci(){if(we){const t=Array.from(st).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=Qo(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([o,r])=>{s.getValue(o)?.set(r)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}we=!1,Ae=!1,st.forEach(t=>t.complete()),st.clear()}function Mi(){st.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(we=!0)})}function ta(){Mi(),Ci()}class un{constructor(e,n,s,i,o,r=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=o,this.isAsync=r}scheduleResolve(){this.isScheduled=!0,this.isAsync?(st.add(this),Ae||(Ae=!0,V.read(Mi),V.resolveKeyframes(Ci))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;for(let o=0;o/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),ea=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function na(t){const e=ea.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function Ri(t,e,n=1){const[s,i]=na(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const r=o.trim();return Di(r)?parseFloat(r):r}return Ye(i)?Ri(i,e,n+1):i}const Ei=t=>e=>e.test(t),sa={test:t=>t==="auto",parse:t=>t},Li=[mt,S,z,Y,Qr,Jr,sa],kn=t=>Li.find(Ei(t));class Fi extends un{constructor(e,n,s,i,o){super(e,n,s,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l{e.getValue(a).set(l)}),this.resolveNoneKeyframes()}}const In=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Z.test(t)||t==="0")&&!t.startsWith("url("));function ia(t){const e=t[0];if(t.length===1)return!0;for(let n=0;nt!==null;function Qt(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(oa),o=e&&n!=="loop"&&e%2===1?0:i.length-1;return!o||s===void 0?i[o]:s}const aa=40;class Bi{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:r="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=G.now(),this.options={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:o,repeatType:r,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>aa?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&ta(),this._resolved}onKeyframesResolved(e,n){this.resolvedAt=G.now(),this.hasAttemptedResolve=!0;const{name:s,type:i,velocity:o,delay:r,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!ra(e,s,i,o))if(r)this.options.duration=0;else{l&&l(Qt(e,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const u=this.initPlayback(e,n);u!==!1&&(this._resolved={keyframes:e,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(e,n){return this.currentFinishedPromise.then(e,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}const M=(t,e,n)=>t+(e-t)*n;function re(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function la({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,o=0,r=0;if(!e)i=o=r=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=re(l,a,t+1/3),o=re(l,a,t),r=re(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}function Gt(t,e){return n=>n>0?e:t}const oe=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},ua=[ve,et,at],ca=t=>ua.find(e=>e.test(t));function jn(t){const e=ca(t);if(!e)return!1;let n=e.parse(t);return e===at&&(n=la(n)),n}const On=(t,e)=>{const n=jn(t),s=jn(e);if(!n||!s)return Gt(t,e);const i={...n};return o=>(i.red=oe(n.red,s.red,o),i.green=oe(n.green,s.green,o),i.blue=oe(n.blue,s.blue,o),i.alpha=M(n.alpha,s.alpha,o),et.transform(i))},ha=(t,e)=>n=>e(t(n)),Ft=(...t)=>t.reduce(ha),be=new Set(["none","hidden"]);function fa(t,e){return be.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function da(t,e){return n=>M(t,e,n)}function cn(t){return typeof t=="number"?da:typeof t=="string"?Ye(t)?Gt:F.test(t)?On:ga:Array.isArray(t)?ki:typeof t=="object"?F.test(t)?On:ma:Gt}function ki(t,e){const n=[...t],s=n.length,i=t.map((o,r)=>cn(o)(o,e[r]));return o=>{for(let r=0;r{for(const o in s)n[o]=s[o](i);return n}}function pa(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i{const n=Z.createTransformer(e),s=Dt(t),i=Dt(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?be.has(t)&&!i.values.length||be.has(e)&&!s.values.length?fa(t,e):Ft(ki(pa(s,i),i.values),n):Gt(t,e)};function Ii(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?M(t,e,n):cn(t)(t,e)}const ya=5;function ji(t,e,n){const s=Math.max(e-ya,0);return Fs(n-t(s),e-s)}const D={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},Nn=.001;function va({duration:t=D.duration,bounce:e=D.bounce,velocity:n=D.velocity,mass:s=D.mass}){let i,o,r=1-e;r=X(D.minDamping,D.maxDamping,r),t=X(D.minDuration,D.maxDuration,W(t)),r<1?(i=c=>{const u=c*r,h=u*t,f=u-n,d=Ve(c,r),m=Math.exp(-h);return Nn-f/d*m},o=c=>{const h=c*r*t,f=h*n+n,d=Math.pow(r,2)*Math.pow(c,2)*t,m=Math.exp(-h),y=Ve(Math.pow(c,2),r);return(-i(c)+Nn>0?-1:1)*((f-d)*m)/y}):(i=c=>{const u=Math.exp(-c*t),h=(c-n)*t+1;return-.001+u*h},o=c=>{const u=Math.exp(-c*t),h=(n-c)*(t*t);return u*h});const a=5/t,l=Ta(i,o,a);if(t=$(t),isNaN(l))return{stiffness:D.stiffness,damping:D.damping,duration:t};{const c=Math.pow(l,2)*s;return{stiffness:c,damping:r*2*Math.sqrt(s*c),duration:t}}}const xa=12;function Ta(t,e,n){let s=n;for(let i=1;it[n]!==void 0)}function Aa(t){let e={velocity:D.velocity,stiffness:D.stiffness,damping:D.damping,mass:D.mass,isResolvedFromDuration:!1,...t};if(!Un(t,Sa)&&Un(t,Pa))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,o=2*X(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:D.mass,stiffness:i,damping:o}}else{const n=va(t);e={...e,...n,mass:D.mass},e.isResolvedFromDuration=!0}return e}function zt(t=D.visualDuration,e=D.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:c,mass:u,duration:h,velocity:f,isResolvedFromDuration:d}=Aa({...n,velocity:-W(n.velocity||0)}),m=f||0,y=c/(2*Math.sqrt(l*u)),v=r-o,p=W(Math.sqrt(l/u)),P=Math.abs(v)<5;s||(s=P?D.restSpeed.granular:D.restSpeed.default),i||(i=P?D.restDelta.granular:D.restDelta.default);let x;if(y<1){const T=Ve(p,y);x=A=>{const C=Math.exp(-y*p*A);return r-C*((m+y*p*v)/T*Math.sin(T*A)+v*Math.cos(T*A))}}else if(y===1)x=T=>r-Math.exp(-p*T)*(v+(m+p*v)*T);else{const T=p*Math.sqrt(y*y-1);x=A=>{const C=Math.exp(-y*p*A),w=Math.min(T*A,300);return r-C*((m+y*p*v)*Math.sinh(w)+T*v*Math.cosh(w))/T}}const b={calculatedDuration:d&&h||null,next:T=>{const A=x(T);if(d)a.done=T>=h;else{let C=0;y<1&&(C=T===0?$(m):ji(x,T,A));const w=Math.abs(C)<=s,E=Math.abs(r-A)<=i;a.done=w&&E}return a.value=a.done?r:A,a},toString:()=>{const T=Math.min(We(b),Wt),A=Ns(C=>b.next(T*C).value,T,30);return T+"ms "+A},toTransition:()=>{}};return b}zt.applyToOptions=t=>{const e=Tr(t,100,zt);return t.ease=At()?e.ease:"easeOut",t.duration=$(e.duration),t.type="keyframes",t};function Kn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){const h=t[0],f={done:!1,value:h},d=w=>a!==void 0&&wl,m=w=>a===void 0?l:l===void 0||Math.abs(a-w)-y*Math.exp(-w/s),x=w=>p+P(w),b=w=>{const E=P(w),j=x(w);f.done=Math.abs(E)<=c,f.value=f.done?p:j};let T,A;const C=w=>{d(f.value)&&(T=w,A=zt({keyframes:[f.value,m(f.value)],velocity:ji(x,w,f.value),damping:i,stiffness:o,restDelta:c,restSpeed:u}))};return C(0),{calculatedDuration:null,next:w=>{let E=!1;return!A&&T===void 0&&(E=!0,b(w),C(w)),T!==void 0&&w>=T?A.next(w-T):(!E&&b(w),f)}}}const wa=Lt(.42,0,1,1),ba=Lt(0,0,.58,1),Oi=Lt(.42,0,.58,1),Va=t=>Array.isArray(t)&&typeof t[0]!="number",Ca={linear:U,easeIn:wa,easeInOut:Oi,easeOut:ba,circIn:on,circInOut:vi,circOut:yi,backIn:rn,backInOut:pi,backOut:mi,anticipate:gi},Wn=t=>{if(Ne(t)){Bs(t.length===4);const[e,n,s,i]=t;return Lt(e,n,s,i)}else if(typeof t=="string")return Ca[t];return t};function Ma(t,e,n){const s=[],i=n||Ii,o=t.length-1;for(let r=0;re[0];if(o===2&&e[0]===e[1])return()=>e[1];const r=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=Ma(e,s,i),l=a.length,c=u=>{if(r&&u1)for(;hc(X(t[0],t[o-1],u)):c}function Ra(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=St(0,e,s);t.push(M(n,1,i))}}function Ea(t){const e=[0];return Ra(e,t.length-1),e}function La(t,e){return t.map(n=>n*e)}function Fa(t,e){return t.map(()=>e||Oi).splice(0,t.length-1)}function Ht({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Va(s)?s.map(Wn):Wn(s),o={done:!1,value:e[0]},r=La(n&&n.length===e.length?n:Ea(e),t),a=Da(r,e,{ease:Array.isArray(i)?i:Fa(e,i)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}const Ba=t=>{const e=({timestamp:n})=>t(n);return{start:()=>V.update(e,!0),stop:()=>q(e),now:()=>L.isProcessing?L.timestamp:G.now()}},ka={decay:Kn,inertia:Kn,tween:Ht,keyframes:Ht,spring:zt},Ia=t=>t/100;class hn extends Bi{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:s,element:i,keyframes:o}=this.options,r=i?.KeyframeResolver||un,a=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new r(o,a,n,s,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(e){const{type:n="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=this.options,a=Ue(n)?n:ka[n]||Ht;let l,c;a!==Ht&&typeof e[0]!="number"&&(l=Ft(Ia,Ii(e[0],e[1])),e=[0,100]);const u=a({...this.options,keyframes:e});o==="mirror"&&(c=a({...this.options,keyframes:[...e].reverse(),velocity:-r})),u.calculatedDuration===null&&(u.calculatedDuration=We(u));const{calculatedDuration:h}=u,f=h+i,d=f*(s+1)-i;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:h,resolvedDuration:f,totalDuration:d}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!e?this.pause():this.state=this.pendingPlayState}tick(e,n=!1){const{resolved:s}=this;if(!s){const{keyframes:w}=this.options;return{done:!0,value:w[w.length-1]}}const{finalKeyframe:i,generator:o,mirroredGenerator:r,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:h}=s;if(this.startTime===null)return o.next(0);const{delay:f,repeat:d,repeatType:m,repeatDelay:y,onUpdate:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-u/this.speed,this.startTime)),n?this.currentTime=e:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const p=this.currentTime-f*(this.speed>=0?1:-1),P=this.speed>=0?p<0:p>u;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let x=this.currentTime,b=o;if(d){const w=Math.min(this.currentTime,u)/h;let E=Math.floor(w),j=w%1;!j&&w>=1&&(j=1),j===1&&E--,E=Math.min(E,d+1),!!(E%2)&&(m==="reverse"?(j=1-j,y&&(j-=y/h)):m==="mirror"&&(b=r)),x=X(0,1,j)*h}const T=P?{done:!1,value:l[0]}:b.next(x);a&&(T.value=a(T.value));let{done:A}=T;!P&&c!==null&&(A=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&A);return C&&i!==void 0&&(T.value=Qt(l,this.options,i)),v&&v(T.value),C&&this.finish(),T}get duration(){const{resolved:e}=this;return e?W(e.calculatedDuration):0}get time(){return W(this.currentTime)}set time(e){e=$(e),this.currentTime=e,this.holdTime!==null||this.speed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=W(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:e=Ba,onPlay:n,startTime:s}=this.options;this.driver||(this.driver=e(o=>this.tick(o))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=s??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=this.currentTime??0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}get finished(){return this.currentFinishedPromise}}const ja=new Set(["opacity","clipPath","filter","transform"]),Oa=Fe(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),_t=10,Na=2e4;function Ua(t){return Ue(t.type)||t.type==="spring"||!Ks(t.ease)}function Ka(t,e){const n=new hn({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:t[0]};const i=[];let o=0;for(;!s.done&&othis.onKeyframesResolved(r,a),n,s,i),this.resolver.scheduleResolve()}initPlayback(e,n){let{duration:s=300,times:i,ease:o,type:r,motionValue:a,name:l,startTime:c}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof o=="string"&&At()&&Wa(o)&&(o=Ni[o]),Ua(this.options)){const{onComplete:h,onUpdate:f,motionValue:d,element:m,...y}=this.options,v=Ka(e,y);e=v.keyframes,e.length===1&&(e[1]=e[0]),s=v.duration,i=v.times,o=v.ease,r="keyframes"}const u=xr(a.owner.current,l,e,{...this.options,duration:s,times:i,ease:o});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(yn(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:h}=this.options;a.set(Qt(e,this.options,n)),h&&h(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:s,times:i,type:r,ease:o,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:n}=e;return W(n)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:n}=e;return W(n.currentTime||0)}set time(e){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.currentTime=$(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:n}=e;return n.playbackRate}get finished(){return this.resolved.animation.finished}set speed(e){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:n}=e;return n.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:n}=e;return n.startTime}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{const{resolved:n}=this;if(!n)return U;const{animation:s}=n;yn(s,e)}return U}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:n,keyframes:s,duration:i,type:o,ease:r,times:a}=e;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:h,element:f,...d}=this.options,m=new hn({...d,keyframes:s,duration:i,type:o,ease:r,times:a,isGenerator:!0}),y=$(this.time);c.setWithVelocity(m.sample(y-_t).value,m.sample(y).value,_t)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:n,name:s,repeatDelay:i,repeatType:o,damping:r,type:a}=e;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=n.owner.getProps();return Oa()&&s&&ja.has(s)&&(s!=="transform"||!c)&&!l&&!i&&o!=="mirror"&&r!==0&&a!=="inertia"}}const $a={type:"spring",stiffness:500,damping:25,restSpeed:10},Ga=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),za={type:"keyframes",duration:.8},Ha={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},_a=(t,{keyframes:e})=>e.length>2?za:it.has(t)?t.startsWith("scale")?Ga(e[1]):$a:Ha;function Xa({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const fn=(t,e,n,s={},i,o)=>r=>{const a=Ke(s,t)||{},l=a.delay||s.delay||0;let{elapsed:c=0}=s;c=c-$(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:i};Xa(a)||(u={...u,..._a(t,u)}),u.duration&&(u.duration=$(u.duration)),u.repeatDelay&&(u.repeatDelay=$(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let h=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(h=!0)),u.allowFlatten=!a.type&&!a.ease,h&&!o&&e.get()!==void 0){const f=Qt(u.keyframes,a);if(f!==void 0)return V.update(()=>{u.onUpdate(f),u.onComplete()}),new gr([])}return!o&&$n.supports(u)?new $n(u):new hn(u)};function Ya({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Ui(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=e;s&&(o=s);const l=[],c=i&&t.animationState&&t.animationState.getState()[i];for(const u in a){const h=t.getValue(u,t.latestValues[u]??null),f=a[u];if(f===void 0||c&&Ya(c,u))continue;const d={delay:n,...Ke(o||{},u)};let m=!1;if(window.MotionHandoffAnimation){const v=ci(t);if(v){const p=window.MotionHandoffAnimation(v,u,V);p!==null&&(d.startTime=p,m=!0)}}ye(t,u),h.start(fn(u,h,f,t.shouldReduceMotion&&ui.has(u)?{type:!1}:d,t,m));const y=h.animation;y&&l.push(y)}return r&&Promise.all(l).then(()=>{V.update(()=>{r&&wo(t,r)})}),l}function Ce(t,e,n={}){const s=Mt(t,e,n.type==="exit"?t.presenceContext?.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(Ui(t,s,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:h}=i;return qa(t,e,c+l,u,h,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[l,c]=a==="beforeChildren"?[o,r]:[r,o];return l().then(()=>c())}else return Promise.all([o(),r(n.delay)])}function qa(t,e,n=0,s=0,i=1,o){const r=[],a=(t.variantChildren.size-1)*s,l=i===1?(c=0)=>c*s:(c=0)=>a-c*s;return Array.from(t.variantChildren).sort(Za).forEach((c,u)=>{c.notify("AnimationStart",e),r.push(Ce(c,e,{...o,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",e)))}),Promise.all(r)}function Za(t,e){return t.sortNodePosition(e)}function Ja(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>Ce(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=Ce(t,e,n);else{const i=typeof e=="function"?Mt(t,e,n.custom):e;s=Promise.all(Ui(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}function Ki(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;sPromise.all(e.map(({animation:n,options:s})=>Ja(t,n,s)))}function sl(t){let e=nl(t),n=Gn(),s=!0;const i=l=>(c,u)=>{const h=Mt(t,u,l==="exit"?t.presenceContext?.custom:void 0);if(h){const{transition:f,transitionEnd:d,...m}=h;c={...c,...m,...d}}return c};function o(l){e=l(t)}function r(l){const{props:c}=t,u=Wi(t.parent)||{},h=[],f=new Set;let d={},m=1/0;for(let v=0;vm&&b,E=!1;const j=Array.isArray(x)?x:[x];let rt=j.reduce(i(p),{});T===!1&&(rt={});const{prevResolvedValues:dn={}}=P,ur={...dn,...rt},mn=k=>{w=!0,f.has(k)&&(E=!0,f.delete(k)),P.needsAnimating[k]=!0;const H=t.getValue(k);H&&(H.liveStyle=!1)};for(const k in ur){const H=rt[k],te=dn[k];if(d.hasOwnProperty(k))continue;let ee=!1;ge(H)&&ge(te)?ee=!Ki(H,te):ee=H!==te,ee?H!=null?mn(k):f.add(k):H!==void 0&&f.has(k)?mn(k):P.protectedKeys[k]=!0}P.prevProp=x,P.prevResolvedValues=rt,P.isActive&&(d={...d,...rt}),s&&t.blockInitialAnimation&&(w=!1),w&&(!(A&&C)||E)&&h.push(...j.map(k=>({animation:k,options:{type:p}})))}if(f.size){const v={};if(typeof c.initial!="boolean"){const p=Mt(t,Array.isArray(c.initial)?c.initial[0]:c.initial);p&&p.transition&&(v.transition=p.transition)}f.forEach(p=>{const P=t.getBaseTarget(p),x=t.getValue(p);x&&(x.liveStyle=!0),v[p]=P??null}),h.push({animation:v})}let y=!!h.length;return s&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(y=!1),s=!1,y?e(h):Promise.resolve()}function a(l,c){if(n[l].isActive===c)return Promise.resolve();t.variantChildren?.forEach(h=>h.animationState?.setActive(l,c)),n[l].isActive=c;const u=r(l);for(const h in n)n[h].protectedKeys={};return u}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Gn(),s=!0}}}function il(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Ki(e,t):!1}function Q(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Gn(){return{animate:Q(!0),whileInView:Q(),whileHover:Q(),whileTap:Q(),whileDrag:Q(),whileFocus:Q(),exit:Q()}}class J{constructor(e){this.isMounted=!1,this.node=e}update(){}}class rl extends J{constructor(e){super(e),e.animationState||(e.animationState=sl(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Zt(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let ol=0;class al extends J{constructor(){super(...arguments),this.id=ol++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>{n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const ll={animation:{Feature:rl},exit:{Feature:al}};function Rt(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function Bt(t){return{point:{x:t.pageX,y:t.pageY}}}const ul=t=>e=>Ge(e)&&t(e,Bt(e));function xt(t,e,n,s){return Rt(t,e,ul(n),s)}function $i({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function cl({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function hl(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}const Gi=1e-4,fl=1-Gi,dl=1+Gi,zi=.01,ml=0-zi,pl=0+zi;function I(t){return t.max-t.min}function gl(t,e,n){return Math.abs(t-e)<=n}function zn(t,e,n,s=.5){t.origin=s,t.originPoint=M(e.min,e.max,t.origin),t.scale=I(n)/I(e),t.translate=M(n.min,n.max,t.origin)-t.originPoint,(t.scale>=fl&&t.scale<=dl||isNaN(t.scale))&&(t.scale=1),(t.translate>=ml&&t.translate<=pl||isNaN(t.translate))&&(t.translate=0)}function Tt(t,e,n,s){zn(t.x,e.x,n.x,s?s.originX:void 0),zn(t.y,e.y,n.y,s?s.originY:void 0)}function Hn(t,e,n){t.min=n.min+e.min,t.max=t.min+I(e)}function yl(t,e,n){Hn(t.x,e.x,n.x),Hn(t.y,e.y,n.y)}function _n(t,e,n){t.min=e.min-n.min,t.max=t.min+I(e)}function Pt(t,e,n){_n(t.x,e.x,n.x),_n(t.y,e.y,n.y)}const Xn=()=>({translate:0,scale:1,origin:0,originPoint:0}),lt=()=>({x:Xn(),y:Xn()}),Yn=()=>({min:0,max:0}),R=()=>({x:Yn(),y:Yn()});function N(t){return[t("x"),t("y")]}function ae(t){return t===void 0||t===1}function Me({scale:t,scaleX:e,scaleY:n}){return!ae(t)||!ae(e)||!ae(n)}function tt(t){return Me(t)||Hi(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Hi(t){return qn(t.x)||qn(t.y)}function qn(t){return t&&t!=="0%"}function Xt(t,e,n){const s=t-n,i=e*s;return n+i}function Zn(t,e,n,s,i){return i!==void 0&&(t=Xt(t,i,s)),Xt(t,n,s)+e}function De(t,e=0,n=1,s,i){t.min=Zn(t.min,e,n,s,i),t.max=Zn(t.max,e,n,s,i)}function _i(t,{x:e,y:n}){De(t.x,e.translate,e.scale,e.originPoint),De(t.y,n.translate,n.scale,n.originPoint)}const Jn=.999999999999,Qn=1.0000000000001;function vl(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let o,r;for(let a=0;aJn&&(e.x=1),e.yJn&&(e.y=1)}function ut(t,e){t.min=t.min+e,t.max=t.max+e}function ts(t,e,n,s,i=.5){const o=M(t.min,t.max,i);De(t,e,n,o,s)}function ct(t,e){ts(t.x,e.x,e.scaleX,e.scale,e.originX),ts(t.y,e.y,e.scaleY,e.scale,e.originY)}function Xi(t,e){return $i(hl(t.getBoundingClientRect(),e))}function xl(t,e,n){const s=Xi(t,n),{scroll:i}=e;return i&&(ut(s.x,i.offset.x),ut(s.y,i.offset.y)),s}const Yi=({current:t})=>t?t.ownerDocument.defaultView:null,es=(t,e)=>Math.abs(t-e);function Tl(t,e){const n=es(t.x,e.x),s=es(t.y,e.y);return Math.sqrt(n**2+s**2)}class qi{constructor(e,n,{transformPagePoint:s,contextWindow:i,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=ue(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,d=Tl(h.offset,{x:0,y:0})>=3;if(!f&&!d)return;const{point:m}=h,{timestamp:y}=L;this.history.push({...m,timestamp:y});const{onStart:v,onMove:p}=this.handlers;f||(v&&v(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),p&&p(this.lastMoveEvent,h)},this.handlePointerMove=(h,f)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=le(f,this.transformPagePoint),V.update(this.updatePoint,!0)},this.handlePointerUp=(h,f)=>{this.end();const{onEnd:d,onSessionEnd:m,resumeAnimation:y}=this.handlers;if(this.dragSnapToOrigin&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=ue(h.type==="pointercancel"?this.lastMoveEventInfo:le(f,this.transformPagePoint),this.history);this.startEvent&&d&&d(h,v),m&&m(h,v)},!Ge(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.contextWindow=i||window;const r=Bt(e),a=le(r,this.transformPagePoint),{point:l}=a,{timestamp:c}=L;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(e,ue(a,this.history)),this.removeListeners=Ft(xt(this.contextWindow,"pointermove",this.handlePointerMove),xt(this.contextWindow,"pointerup",this.handlePointerUp),xt(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),q(this.updatePoint)}}function le(t,e){return e?{point:e(t.point)}:t}function ns(t,e){return{x:t.x-e.x,y:t.y-e.y}}function ue({point:t},e){return{point:t,delta:ns(t,Zi(e)),offset:ns(t,Pl(e)),velocity:Sl(e,.1)}}function Pl(t){return t[0]}function Zi(t){return t[t.length-1]}function Sl(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=Zi(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>$(e)));)n--;if(!s)return{x:0,y:0};const o=W(i.timestamp-s.timestamp);if(o===0)return{x:0,y:0};const r={x:(i.x-s.x)/o,y:(i.y-s.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function Al(t,{min:e,max:n},s){return e!==void 0&&tn&&(t=s?M(n,t,s.max):Math.min(t,n)),t}function ss(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function wl(t,{top:e,left:n,bottom:s,right:i}){return{x:ss(t.x,n,i),y:ss(t.y,e,s)}}function is(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.mins?n=St(e.min,e.max-s,t.min):s>i&&(n=St(t.min,t.max-i,e.min)),X(0,1,n)}function Cl(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Re=.35;function Ml(t=Re){return t===!1?t=0:t===!0&&(t=Re),{x:rs(t,"left","right"),y:rs(t,"top","bottom")}}function rs(t,e,n){return{min:os(t,e),max:os(t,n)}}function os(t,e){return typeof t=="number"?t:t[e]||0}const Dl=new WeakMap;class Rl{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=R(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=u=>{const{dragSnapToOrigin:h}=this.getProps();h?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Bt(u).point)},o=(u,h)=>{const{drag:f,dragPropagation:d,onDragStart:m}=this.getProps();if(f&&!d&&(this.openDragLock&&this.openDragLock(),this.openDragLock=wr(f),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),N(v=>{let p=this.getAxisMotionValue(v).get()||0;if(z.test(p)){const{projection:P}=this.visualElement;if(P&&P.layout){const x=P.layout.layoutBox[v];x&&(p=I(x)*(parseFloat(p)/100))}}this.originPoint[v]=p}),m&&V.postRender(()=>m(u,h)),ye(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},r=(u,h)=>{const{dragPropagation:f,dragDirectionLock:d,onDirectionLock:m,onDrag:y}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:v}=h;if(d&&this.currentDirection===null){this.currentDirection=El(v),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",h.point,v),this.updateAxis("y",h.point,v),this.visualElement.render(),y&&y(u,h)},a=(u,h)=>this.stop(u,h),l=()=>N(u=>this.getAnimationState(u)==="paused"&&this.getAxisMotionValue(u).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new qi(e,{onSessionStart:i,onStart:o,onMove:r,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:Yi(this.visualElement)})}stop(e,n){const s=this.isDragging;if(this.cancel(),!s)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&V.postRender(()=>o(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!Ot(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(r=Al(r,this.constraints[e],this.elastic[e])),o.set(r)}resolveConstraints(){const{dragConstraints:e,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;e&&ot(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=wl(s.layoutBox,e):this.constraints=!1,this.elastic=Ml(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&N(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Cl(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!ot(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=xl(s,i.root,this.visualElement.getTransformPagePoint());let r=bl(i.layout.layoutBox,o);if(n){const a=n(cl(r));this.hasMutatedConstraints=!!a,a&&(r=$i(a))}return r}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=N(u=>{if(!Ot(u,n,this.currentDirection))return;let h=l&&l[u]||{};r&&(h={min:0,max:0});const f=i?200:1e6,d=i?40:1e7,m={type:"inertia",velocity:s?e[u]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...o,...h};return this.startAxisValueAnimation(u,m)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return ye(this.visualElement,e),s.start(fn(e,s,0,n,this.visualElement,!1))}stopAnimation(){N(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){N(e=>this.getAxisMotionValue(e).animation?.pause())}getAnimationState(e){return this.getAxisMotionValue(e).animation?.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){N(n=>{const{drag:s}=this.getProps();if(!Ot(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:r,max:a}=i.layout.layoutBox[n];o.set(e[n]-M(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!ot(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};N(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();i[r]=Vl({min:l,max:l},this.constraints[r])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),N(r=>{if(!Ot(r,e,null))return;const a=this.getAxisMotionValue(r),{min:l,max:c}=this.constraints[r];a.set(M(l,c,i[r]))})}addListeners(){if(!this.visualElement.current)return;Dl.set(this.visualElement,this);const e=this.visualElement.current,n=xt(e,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();ot(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),V.read(s);const r=Rt(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(N(u=>{const h=this.getAxisMotionValue(u);h&&(this.originPoint[u]+=l[u].translate,h.set(h.get()+l[u].translate))}),this.visualElement.render())});return()=>{r(),n(),o(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=Re,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function Ot(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function El(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class Ll extends J{constructor(e){super(e),this.removeGroupControls=U,this.removeListeners=U,this.controls=new Rl(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||U}unmount(){this.removeGroupControls(),this.removeListeners()}}const as=t=>(e,n)=>{t&&V.postRender(()=>t(e,n))};class Fl extends J{constructor(){super(...arguments),this.removePointerDownListener=U}onPointerDown(e){this.session=new qi(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Yi(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:as(e),onStart:as(n),onMove:s,onEnd:(o,r)=>{delete this.session,i&&V.postRender(()=>i(o,r))}}}mount(){this.removePointerDownListener=xt(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Kt={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function ls(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const pt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(S.test(t))t=parseFloat(t);else return t;const n=ls(t,e.target.x),s=ls(t,e.target.y);return`${n}% ${s}%`}},Bl={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=Z.parse(t);if(i.length>5)return s;const o=Z.createTransformer(t),r=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+r]/=a,i[1+r]/=l;const c=M(a,l,.5);return typeof i[2+r]=="number"&&(i[2+r]/=c),typeof i[3+r]=="number"&&(i[3+r]/=c),o(i)}};class kl extends g.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=e;Zr(Il),o&&(n.group&&n.group.add(o),s&&s.register&&i&&s.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Kt.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,r=s.projection;return r&&(r.isPresent=o,i||e.layoutDependency!==n||n===void 0||e.isPresent!==o?r.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?r.promote():r.relegate()||V.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),$e.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Ji(t){const[e,n]=Os(),s=g.useContext(ke);return _.jsx(kl,{...t,layoutGroup:s,switchLayoutGroup:g.useContext(qs),isPresent:e,safeToRemove:n})}const Il={borderRadius:{...pt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:pt,borderTopRightRadius:pt,borderBottomLeftRadius:pt,borderBottomRightRadius:pt,boxShadow:Bl};function jl(t,e,n){const s=B(t)?t:wt(t);return s.start(fn("",s,e,n)),s.animation}function Ol(t){return t instanceof SVGElement&&t.tagName!=="svg"}const Nl=(t,e)=>t.depth-e.depth;class Ul{constructor(){this.children=[],this.isDirty=!1}add(e){ks(this.children,e),this.isDirty=!0}remove(e){Is(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Nl),this.isDirty=!1,this.children.forEach(e)}}function Kl(t,e){const n=G.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(q(s),t(o-e))};return V.read(s,!0),()=>q(s)}const Qi=["TopLeft","TopRight","BottomLeft","BottomRight"],Wl=Qi.length,us=t=>typeof t=="string"?parseFloat(t):t,cs=t=>typeof t=="number"||S.test(t);function $l(t,e,n,s,i,o){i?(t.opacity=M(0,n.opacity??1,Gl(s)),t.opacityExit=M(e.opacity??1,0,zl(s))):o&&(t.opacity=M(e.opacity??1,n.opacity??1,s));for(let r=0;rse?1:n(St(t,e,s))}function fs(t,e){t.min=e.min,t.max=e.max}function O(t,e){fs(t.x,e.x),fs(t.y,e.y)}function ds(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function ms(t,e,n,s,i){return t-=e,t=Xt(t,1/n,s),i!==void 0&&(t=Xt(t,1/i,s)),t}function Hl(t,e=0,n=1,s=.5,i,o=t,r=t){if(z.test(e)&&(e=parseFloat(e),e=M(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=M(o.min,o.max,s);t===o&&(a-=e),t.min=ms(t.min,e,n,a,i),t.max=ms(t.max,e,n,a,i)}function ps(t,e,[n,s,i],o,r){Hl(t,e[n],e[s],e[i],e.scale,o,r)}const _l=["x","scaleX","originX"],Xl=["y","scaleY","originY"];function gs(t,e,n,s){ps(t.x,e,_l,n?n.x:void 0,s?s.x:void 0),ps(t.y,e,Xl,n?n.y:void 0,s?s.y:void 0)}function ys(t){return t.translate===0&&t.scale===1}function er(t){return ys(t.x)&&ys(t.y)}function vs(t,e){return t.min===e.min&&t.max===e.max}function Yl(t,e){return vs(t.x,e.x)&&vs(t.y,e.y)}function xs(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function nr(t,e){return xs(t.x,e.x)&&xs(t.y,e.y)}function Ts(t){return I(t.x)/I(t.y)}function Ps(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class ql{constructor(){this.members=[]}add(e){ks(this.members,e),e.scheduleRender()}remove(e){if(Is(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){s=o;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Zl(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;if((i||o||r)&&(s=`translate3d(${i}px, ${o}px, ${r}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:h,rotateY:f,skewX:d,skewY:m}=n;c&&(s=`perspective(${c}px) ${s}`),u&&(s+=`rotate(${u}deg) `),h&&(s+=`rotateX(${h}deg) `),f&&(s+=`rotateY(${f}deg) `),d&&(s+=`skewX(${d}deg) `),m&&(s+=`skewY(${m}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const ce=["","X","Y","Z"],Jl={visibility:"hidden"},Ss=1e3;let Ql=0;function he(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function sr(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=ci(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",V,!(i||o))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&sr(s)}function ir({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},a=e?.()){this.id=Ql++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(nu),this.nodes.forEach(au),this.nodes.forEach(lu),this.nodes.forEach(su)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;lthis.root.updateBlockedByResize=!1;t(r,()=>{this.root.updateBlockedByResize=!0,h&&h(),h=Kl(f,250),Kt.hasAnimatedSinceResize&&(Kt.hasAnimatedSinceResize=!1,this.nodes.forEach(ws))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:f,hasRelativeLayoutChanged:d,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||u.getDefaultTransition()||du,{onLayoutAnimationStart:v,onLayoutAnimationComplete:p}=u.getProps(),P=!this.targetLayout||!nr(this.targetLayout,m),x=!f&&d;if(this.options.layoutRoot||this.resumeFrom||x||f&&(P||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(h,x);const b={...Ke(y,"layout"),onPlay:v,onComplete:p};(u.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b)}else f||ws(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,q(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(uu),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&sr(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!I(this.snapshot.measuredBox.x)&&!I(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{const T=b/1e3;bs(h.x,r.x,T),bs(h.y,r.y,T),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Pt(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),hu(this.relativeTarget,this.relativeTargetOrigin,f,T),x&&Yl(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=R()),O(x,this.relativeTarget)),y&&(this.animationValues=u,$l(u,c,this.latestValues,T,P,p)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(q(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=V.update(()=>{Kt.hasAnimatedSinceResize=!0,this.currentAnimation=jl(0,Ss,{...r,onUpdate:a=>{this.mixTargetDelta(a),r.onUpdate&&r.onUpdate(a)},onStop:()=>{},onComplete:()=>{r.onComplete&&r.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Ss),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=r;if(!(!a||!l||!c)){if(this!==r&&this.layout&&c&&rr(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||R();const h=I(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+h;const f=I(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+f}O(a,l),ct(a,u),Tt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new ql),this.sharedNodes.get(r).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){const{layoutId:r}=this.options;return r?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:r}=this.options;return r?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:l}=r;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&he("z",r,c,this.animationValues);for(let u=0;ur.currentAnimation?.stop()),this.root.nodes.forEach(As),this.root.sharedNodes.clear()}}}function tu(t){t.updateLayout()}function eu(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=t.layout,{animationType:i}=t.options,o=e.source!==t.layout.source;i==="size"?N(u=>{const h=o?e.measuredBox[u]:e.layoutBox[u],f=I(h);h.min=n[u].min,h.max=h.min+f}):rr(i,e.layoutBox,n)&&N(u=>{const h=o?e.measuredBox[u]:e.layoutBox[u],f=I(n[u]);h.max=h.min+f,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[u].max=t.relativeTarget[u].min+f)});const r=lt();Tt(r,n,e.layoutBox);const a=lt();o?Tt(a,t.applyTransform(s,!0),e.measuredBox):Tt(a,n,e.layoutBox);const l=!er(r);let c=!1;if(!t.resumeFrom){const u=t.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:h,layout:f}=u;if(h&&f){const d=R();Pt(d,e.layoutBox,h.layoutBox);const m=R();Pt(m,n,f.layoutBox),nr(d,m)||(c=!0),u.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=d,t.relativeParent=u)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function nu(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 su(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function iu(t){t.clearSnapshot()}function As(t){t.clearMeasurements()}function ru(t){t.isLayoutDirty=!1}function ou(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function ws(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function au(t){t.resolveTargetDelta()}function lu(t){t.calcProjection()}function uu(t){t.resetSkewAndRotation()}function cu(t){t.removeLeadSnapshot()}function bs(t,e,n){t.translate=M(e.translate,0,n),t.scale=M(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Vs(t,e,n,s){t.min=M(e.min,n.min,s),t.max=M(e.max,n.max,s)}function hu(t,e,n,s){Vs(t.x,e.x,n.x,s),Vs(t.y,e.y,n.y,s)}function fu(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const du={duration:.45,ease:[.4,0,.1,1]},Cs=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Ms=Cs("applewebkit/")&&!Cs("chrome/")?Math.round:U;function Ds(t){t.min=Ms(t.min),t.max=Ms(t.max)}function mu(t){Ds(t.x),Ds(t.y)}function rr(t,e,n){return t==="position"||t==="preserve-aspect"&&!gl(Ts(e),Ts(n),.2)}function pu(t){return t!==t.root&&t.scroll?.wasRoot}const gu=ir({attachResizeListener:(t,e)=>Rt(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),fe={current:void 0},or=ir({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!fe.current){const t=new gu({});t.mount(window),t.setOptions({layoutScroll:!0}),fe.current=t}return fe.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),yu={pan:{Feature:Fl},drag:{Feature:Ll,ProjectionNode:or,MeasureLayout:Ji}};function Rs(t,e,n){const{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=s[i];o&&V.postRender(()=>o(e,Bt(e)))}class vu extends J{mount(){const{current:e}=this.node;e&&(this.unmount=Vr(e,(n,s)=>(Rs(this.node,s,"Start"),i=>Rs(this.node,i,"End"))))}unmount(){}}class xu extends J{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Ft(Rt(this.node.current,"focus",()=>this.onFocus()),Rt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Es(t,e,n){const{props:s}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&s.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),o=s[i];o&&V.postRender(()=>o(e,Bt(e)))}class Tu extends J{mount(){const{current:e}=this.node;e&&(this.unmount=Rr(e,(n,s)=>(Es(this.node,s,"Start"),(i,{success:o})=>Es(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Ee=new WeakMap,de=new WeakMap,Pu=t=>{const e=Ee.get(t.target);e&&e(t)},Su=t=>{t.forEach(Pu)};function Au({root:t,...e}){const n=t||document;de.has(n)||de.set(n,{});const s=de.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(Su,{root:t,...e})),s[i]}function wu(t,e,n){const s=Au(e);return Ee.set(t,n),s.observe(t),()=>{Ee.delete(t),s.unobserve(t)}}const bu={some:0,all:1};class Vu extends J{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:o}=e,r={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:bu[i]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,o&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:h}=this.node.getProps(),f=c?u:h;f&&f(l)};return wu(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(Cu(e,n))&&this.startObserver()}unmount(){}}function Cu({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Mu={inView:{Feature:Vu},tap:{Feature:Tu},focus:{Feature:xu},hover:{Feature:vu}},Du={layout:{ProjectionNode:or,MeasureLayout:Ji}},Le={current:null},ar={current:!1};function Ru(){if(ar.current=!0,!!je)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Le.current=t.matches;t.addListener(e),e()}else Le.current=!1}const Eu=[...Li,F,Z],Lu=t=>Eu.find(Ei(t)),Fu=new WeakMap;function Bu(t,e,n){for(const s in e){const i=e[s],o=n[s];if(B(i))t.addValue(s,i);else if(B(o))t.addValue(s,wt(i,{owner:t}));else if(o!==i)if(t.hasValue(s)){const r=t.getValue(s);r.liveStyle===!0?r.jump(i):r.hasAnimated||r.set(i)}else{const r=t.getStaticValue(s);t.addValue(s,wt(r!==void 0?r:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const Ls=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class ku{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:o,visualState:r},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=un,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const d=G.now();this.renderScheduledAtthis.bindToMotionValue(s,n)),ar.current||Ru(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Le.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),q(this.notifyUpdate),q(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const s=it.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",a=>{this.latestValues[e]=a,this.props.onUpdate&&V.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);let r;window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),o(),r&&r(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in ht){const n=ht[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const o=this.features[e];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):R()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;sn.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=wt(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(Di(s)||xi(s))?s=parseFloat(s):!Lu(s)&&Z.test(n)&&(s=Vi(e,n)),this.setBaseTarget(e,B(s)?s.get():s)),B(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const o=nn(this.props,n,this.presenceContext?.custom);o&&(s=o[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!B(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Be),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class lr extends ku{constructor(){super(...arguments),this.KeyframeResolver=Fi}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;B(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Iu(t){return window.getComputedStyle(t)}class ju extends lr{constructor(){super(...arguments),this.type="html",this.renderInstance=ri}readValueFromInstance(e,n){if(it.has(n))return Yo(e,n);{const s=Iu(e),i=(Xe(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Xi(e,n)}build(e,n,s){Ze(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return sn(e,n,s)}}class Ou extends lr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=R,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&ii(this.current,this.renderState)}}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(it.has(n)){const s=bi(n);return s&&s.default||0}return n=oi.has(n)?n:_e(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return li(e,n,s)}onBindTransform(){this.current&&!this.renderState.dimensions&&V.postRender(this.updateDimensions)}build(e,n,s){tn(e,n,this.isSVGTag,s.transformTemplate)}renderInstance(e,n,s,i){ai(e,n,s,i)}mount(e){this.isSVGTag=en(e.tagName),super.mount(e)}}const Nu=(t,e)=>Qe(t)?new Ou(e):new ju(e,{allowProjection:t!==g.Fragment}),Uu=So({...ll,...Mu,...yu,...Du},Nu),_u=jr(Uu);export{zu as A,_u as m};