PageSourceSearch

https://affne.com/assets/framer-motion-V3lmxFoN.js

js affne.com collected 2026-10-06 18:04:07 UTC 143,031 bytes, 9 lines download raw bytes

1import{r as m,j as _}from"./react-core-B0dokwlC.js";const Gt=m.createContext({});function B(t){const e=m.useRef(null);return e.current===null&&(e.current=t()),e.current}const Qt=m.createContext(null),Q=m.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});class Jo extends m.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Qo({children:t,isPresent:e}){const n=m.useId(),s=m.useRef(null),i=m.useRef({width:0,height:0,top:0,left:0}),{nonce:o}=m.useContext(Q);return m.useInsertionEffect(()=>{const{width:r,height:a,top:u,left:l}=i.current;if(e||!s.current||!r||!a)return;s.current.dataset.motionPopId=n;const c=document.createElement("style");return o&&(c.nonce=o),document.head.appendChild(c),c.sheet&&c.sheet.insertRule(`
2          [data-motion-pop-id="${n}"] {
3            position: absolute !important;
4            width: ${r}px !important;
5            height: ${a}px !important;
6            top: ${u}px !important;
7            left: ${l}px !important;
8          }
9        `),()=>{document.head.removeChild(c)}},[e]),_.jsx(Jo,{isPresent:e,childRef:s,sizeRef:i,children:m.cloneElement(t,{ref:s})})}const ta=({children:t,initial:e,isPresent:n,onExitComplete:s,custom:i,presenceAffectsLayout:o,mode:r})=>{const a=B(ea),u=m.useId(),l=m.useCallback(f=>{a.set(f,!0);for(const h of a.values())if(!h)return;s&&s()},[a,s]),c=m.useMemo(()=>({id:u,initial:e,isPresent:n,custom:i,onExitComplete:l,register:f=>(a.set(f,!1),()=>a.delete(f))}),o?[Math.random(),l]:[n,l]);return m.useMemo(()=>{a.forEach((f,h)=>a.set(h,!1))},[n]),m.useEffect(()=>{!n&&!a.size&&s&&s()},[n]),r==="popLayout"&&(t=_.jsx(Qo,{isPresent:n,children:t})),_.jsx(Qt.Provider,{value:c,children:t})};function ea(){return new Map}function Zi(t=!0){const e=m.useContext(Qt);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,o=m.useId();m.useEffect(()=>{t&&i(o)},[t]);const r=m.useCallback(()=>t&&s&&s(o),[o,s,t]);return!n&&s?[!1,r]:[!0]}function Bh(){return na(m.useContext(Qt))}function na(t){return t===null?!0:t.isPresent}const ce=t=>t.key||"";function ws(t){const e=[];return m.Children.forEach(t,n=>{m.isValidElement(n)&&e.push(n)}),e}const bn=typeof window<"u",mt=bn?m.useLayoutEffect:m.useEffect,kh=({children:t,custom:e,initial:n=!0,onExitComplete:s,presenceAffectsLayout:i=!0,mode:o="sync",propagate:r=!1})=>{const[a,u]=Zi(r),l=m.useMemo(()=>ws(t),[t]),c=r&&!a?[]:l.map(ce),f=m.useRef(!0),h=m.useRef(l),d=B(()=>new Map),[p,g]=m.useState(l),[v,y]=m.useState(l);mt(()=>{f.current=!1,h.current=l;for(let P=0;P<v.length;P++){const T=ce(v[P]);c.includes(T)?d.delete(T):d.get(T)!==!0&&d.set(T,!1)}},[v,c.length,c.join("-")]);const x=[];if(l!==p){let P=[...l];for(let T=0;T<v.length;T++){const b=v[T],M=ce(b);c.includes(M)||(P.splice(T,0,b),x.push(b))}o==="wait"&&x.length&&(P=x),y(ws(P)),g(l);return}const{forceRender:S}=m.useContext(Gt);return _.jsx(_.Fragment,{children:v.map(P=>{const T=ce(P),b=r&&!a?!1:l===v||c.includes(T),M=()=>{if(d.has(T))d.set(T,!0);else return;let A=!0;d.forEach(V=>{V||(A=!1)}),A&&(S?.(),y(h.current),r&&u?.(),s&&s())};return _.jsx(ta,{isPresent:b,initial:!f.current||n?void 0:!1,custom:b?void 0:e,presenceAffectsLayout:i,mode:o,onExitComplete:b?void 0:M,children:P},T)})})},sa=m.createContext(null);function ia(){const t=m.useRef(!1);return mt(()=>(t.current=!0,()=>{t.current=!1}),[]),t}const k=t=>t;let ra=k,Cn=k;function De(t){let e;return()=>(e===void 0&&(e=t()),e)}const st=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s},W=t=>t*1e3,G=t=>t/1e3,Vn={skipAnimations:!1,useManualTiming:!1};function oa(t){let e=new Set,n=new Set,s=!1,i=!1;const o=new WeakSet;let r={delta:0,timestamp:0,isProcessing:!1};function a(l){o.has(l)&&(u.schedule(l),t()),l(r)}const u={schedule:(l,c=!1,f=!1)=>{const d=f&&s?e:n;return c&&o.add(l),d.has(l)||d.add(l),l},cancel:l=>{n.delete(l),o.delete(l)},process:l=>{if(r=l,s){i=!0;return}s=!0,[e,n]=[n,e],e.forEach(a),e.clear(),s=!1,i&&(i=!1,u.process(l))}};return u}const kt=["read","resolveKeyframes","update","preRender","render","postRender"],aa=40;function Ji(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=kt.reduce((y,x)=>(y[x]=oa(o),y),{}),{read:a,resolveKeyframes:u,update:l,preRender:c,render:f,postRender:h}=r,d=()=>{const y=Vn.useManualTiming?i.timestamp:performance.now();n=!1,i.delta=s?1e3/60:Math.max(Math.min(y-i.timestamp,aa),1),i.timestamp=y,i.isProcessing=!0,a.process(i),u.process(i),l.process(i),c.process(i),f.process(i),h.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(d))},p=()=>{n=!0,s=!0,i.isProcessing||t(d)};return{schedule:kt.reduce((y,x)=>{const S=r[x];return y[x]=(P,T=!1,b=!1)=>(n||p(),S.schedule(P,T,b)),y},{}),cancel:y=>{for(let x=0;x<kt.length;x++)r[kt[x]].cancel(y)},state:i,steps:r}}const{schedule:C,cancel:z,state:O,steps:Ne}=Ji(typeof requestAnimationFrame<"u"?requestAnimationFrame:k,!0);function Qi(){const t=ia(),[e,n]=m.useState(0),s=m.useCallback(()=>{t.current&&n(e+1)},[e]);return[m.useCallback(()=>C.postRender(s),[s]),e]}const ua=t=>!t.isLayoutDirty&&t.willUpdate(!1);function Ps(){const t=new Set,e=new WeakMap,n=()=>t.forEach(ua);return{add:s=>{t.add(s),e.set(s,s.addEventListener("willUpdate",n))},remove:s=>{t.delete(s);const i=e.get(s);i&&(i(),e.delete(s)),n()},dirty:n}}const tr=t=>t===!0,la=t=>tr(t===!0)||t==="id",ca=({children:t,id:e,inherit:n=!0})=>{const s=m.useContext(Gt),i=m.useContext(sa),[o,r]=Qi(),a=m.useRef(null),u=s.id||i;a.current===null&&(la(n)&&u&&(e=e?u+"-"+e:u),a.current={id:e,group:tr(n)&&s.group||Ps()});const l=m.useMemo(()=>({...a.current,forceRender:o}),[r]);return _.jsx(Gt.Provider,{value:l,children:t})},Mn=m.createContext({strict:!1}),As={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},bt={};for(const t in As)bt[t]={isEnabled:e=>As[t].some(n=>!!e[n])};function en(t){for(const e in t)bt[e]={...bt[e],...t[e]}}function jh({children:t,features:e,strict:n=!1}){const[,s]=m.useState(!_e(e)),i=m.useRef(void 0);if(!_e(e)){const{renderer:o,...r}=e;i.current=o,en(r)}return m.useEffect(()=>{_e(e)&&e().then(({renderer:o,...r})=>{en(r),i.current=o,s(!0)})},[]),_.jsx(Mn.Provider,{value:{renderer:i.current,strict:n},children:t})}function _e(t){return typeof t=="function"}const fa=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Se(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||fa.has(t)}let er=t=>!Se(t);function nr(t){t&&(er=e=>e.startsWith("on")?!Se(e):t(e))}try{nr(require("@emotion/is-prop-valid").default)}catch{}function ha(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(er(i)||n===!0&&Se(i)||!e&&!Se(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}function Uh({children:t,isValidProp:e,...n}){e&&nr(e),n={...m.useContext(Q),...n},n.isStatic=B(()=>n.isStatic);const s=m.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return _.jsx(Q.Provider,{value:s,children:t})}function sr(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 te=m.createContext({});function Xt(t){return typeof t=="string"||Array.isArray(t)}function Re(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const En=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Dn=["initial",...En];function Le(t){return Re(t.animate)||Dn.some(e=>Xt(t[e]))}function ir(t){return!!(Le(t)||t.variants)}function da(t,e){if(Le(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Xt(n)?n:void 0,animate:Xt(s)?s:void 0}}return t.inherit!==!1?e:{}}function ma(t){const{initial:e,animate:n}=da(t,m.useContext(te));return m.useMemo(()=>({initial:e,animate:n}),[bs(e),bs(n)])}function bs(t){return Array.isArray(t)?t.join(" "):t}const Rn=Symbol.for("motionComponentSymbol");function Tt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function pa(t,e,n){return m.useCallback(s=>{s&&t.onMount&&t.onMount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):Tt(n)&&(n.current=s))},[e])}const Ie=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),rr="framerAppearId",or="data-"+Ie(rr),{schedule:Ln}=Ji(queueMicrotask,!1),ar=m.createContext({});function ga(t,e,n,s,i){var o,r;const{visualElement:a}=m.useContext(te),u=m.useContext(Mn),l=m.useContext(Qt),c=m.useContext(Q).reducedMotion,f=m.useRef(null);s=s||u.renderer,!f.current&&s&&(f.current=s(t,{visualState:e,parent:a,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c}
vendor: 10,146 bytes, line 9
9));const h=f.current,d=m.useContext(ar);h&&!h.projection&&i&&(h.type==="html"||h.type==="svg")&&ya(f.current,n,i,d);const p=m.useRef(!1);m.useInsertionEffect(()=>{h&&p.current&&h.update(n,l)});const g=n[or],v=m.useRef(!!g&&!(!((o=window.MotionHandoffIsComplete)===null||o===void 0)&&o.call(window,g))&&((r=window.MotionHasOptimisedAnimation)===null||r===void 0?void 0:r.call(window,g)));return mt(()=>{h&&(p.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),Ln.render(h.render),v.current&&h.animationState&&h.animationState.animateChanges())}),m.useEffect(()=>{h&&(!v.current&&h.animationState&&h.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var y;(y=window.MotionHandoffMarkAsComplete)===null||y===void 0||y.call(window,g)}),v.current=!1))}),h}function ya(t,e,n,s){const{layoutId:i,layout:o,drag:r,dragConstraints:a,layoutScroll:u,layoutRoot:l}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:ur(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!r||a&&Tt(a),visualElement:t,animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,layoutScroll:u,layoutRoot:l})}function ur(t){if(t)return t.options.allowProjection!==!1?t.projection:ur(t.parent)}function va({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:s,Component:i}){var o,r;t&&en(t);function a(l,c){let f;const h={...m.useContext(Q),...l,layoutId:xa(l)},{isStatic:d}=h,p=ma(l),g=s(l,d);if(!d&&bn){Ta();const v=Sa(h);f=v.MeasureLayout,p.visualElement=ga(i,g,h,e,v.ProjectionNode)}return _.jsxs(te.Provider,{value:p,children:[f&&p.visualElement?_.jsx(f,{visualElement:p.visualElement,...h}):null,n(i,l,pa(g,p.visualElement,c),g,d,p.visualElement)]})}a.displayName=`motion.${typeof i=="string"?i:`create(${(r=(o=i.displayName)!==null&&o!==void 0?o:i.name)!==null&&r!==void 0?r:""})`}`;const u=m.forwardRef(a);return u[Rn]=i,u}function xa({layoutId:t}){const e=m.useContext(Gt).id;return e&&t!==void 0?e+"-"+t:t}function Ta(t,e){m.useContext(Mn).strict}function Sa(t){const{drag:e,layout:n}=bt;if(!e&&!n)return{};const s={...e,...n};return{MeasureLayout:e?.isEnabled(t)||n?.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}const wa=["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 In(t){return typeof t!="string"||t.includes("-")?!1:!!(wa.indexOf(t)>-1||/[A-Z]/u.test(t))}function Cs(t){const e=[{},{}];return t?.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function Fn(t,e,n,s){if(typeof e=="function"){const[i,o]=Cs(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]=Cs(s);e=e(n!==void 0?n:t.custom,i,o)}return e}const nn=t=>Array.isArray(t),Pa=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),Aa=t=>nn(t)?t[t.length-1]||0:t,L=t=>!!(t&&t.getVelocity);function me(t){const e=L(t)?t.get():t;return Pa(e)?e.toValue():e}function ba({scrapeMotionValuesFromProps:t,createRenderState:e,onUpdate:n},s,i,o){const r={latestValues:Ca(s,i,o,t),renderState:e()};return n&&(r.onMount=a=>n({props:s,current:a,...r}),r.onUpdate=a=>n(a)),r}const On=t=>(e,n)=>{const s=m.useContext(te),i=m.useContext(Qt),o=()=>ba(t,e,s,i);return n?o():B(o)};function Ca(t,e,n,s){const i={},o=s(t,{});for(const h in o)i[h]=me(o[h]);let{initial:r,animate:a}=t;const u=Le(t),l=ir(t);e&&l&&!u&&t.inherit!==!1&&(r===void 0&&(r=e.initial),a===void 0&&(a=e.animate));let c=n?n.initial===!1:!1;c=c||r===!1;const f=c?a:r;if(f&&typeof f!="boolean"&&!Re(f)){const h=Array.isArray(f)?f:[f];for(let d=0;d<h.length;d++){const p=Fn(t,h[d]);if(p){const{transitionEnd:g,transition:v,...y}=p;for(const x in y){let S=y[x];if(Array.isArray(S)){const P=c?S.length-1:0;S=S[P]}S!==null&&(i[x]=S)}for(const x in g)i[x]=g[x]}}}return i}const Et=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],tt=new Set(Et),lr=t=>e=>typeof e=="string"&&e.startsWith(t),cr=lr("--"),Va=lr("var(--"),Bn=t=>Va(t)?Ma.test(t.split("/*")[0].trim()):!1,Ma=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,fr=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Y=(t,e,n)=>n>e?e:n<t?t:n,Dt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Yt={...Dt,transform:t=>Y(0,1,t)},fe={...Dt,default:1},ee=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),et=ee("deg"),Z=ee("%"),w=ee("px"),Ea=ee("vh"),Da=ee("vw"),Vs={...Z,parse:t=>Z.parse(t)/100,transform:t=>Z.transform(t*100)},sn={borderWidth:w,borderTopWidth:w,borderRightWidth:w,borderBottomWidth:w,borderLeftWidth:w,borderRadius:w,radius:w,borderTopLeftRadius:w,borderTopRightRadius:w,borderBottomRightRadius:w,borderBottomLeftRadius:w,width:w,maxWidth:w,height:w,maxHeight:w,top:w,right:w,bottom:w,left:w,padding:w,paddingTop:w,paddingRight:w,paddingBottom:w,paddingLeft:w,margin:w,marginTop:w,marginRight:w,marginBottom:w,marginLeft:w,backgroundPositionX:w,backgroundPositionY:w},Ra={rotate:et,rotateX:et,rotateY:et,rotateZ:et,scale:fe,scaleX:fe,scaleY:fe,scaleZ:fe,skew:et,skewX:et,skewY:et,distance:w,translateX:w,translateY:w,translateZ:w,x:w,y:w,z:w,perspective:w,transformPerspective:w,opacity:Yt,originX:Vs,originY:Vs,originZ:w},Ms={...Dt,transform:Math.round},kn={...sn,...Ra,zIndex:Ms,size:w,fillOpacity:Yt,strokeOpacity:Yt,numOctaves:Ms},La={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Ia=Et.length;function Fa(t,e,n){let s="",i=!0;for(let o=0;o<Ia;o++){const r=Et[o],a=t[r];if(a===void 0)continue;let u=!0;if(typeof a=="number"?u=a===(r.startsWith("scale")?1:0):u=parseFloat(a)===0,!u||n){const l=fr(a,kn[r]);if(!u){i=!1;const c=La[r]||r;s+=`${c}(${l}) `}n&&(e[r]=l)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function jn(t,e,n){const{style:s,vars:i,transformOrigin:o}=t;let r=!1,a=!1;for(const u in e){const l=e[u];if(tt.has(u)){r=!0;continue}else if(cr(u)){i[u]=l;continue}else{const c=fr(l,kn[u]);u.startsWith("origin")?(a=!0,o[u]=c):s[u]=c}}if(e.transform||(r||n?s.transform=Fa(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:u="50%",originY:l="50%",originZ:c=0}=o;s.transformOrigin=`${u} ${l} ${c}`}}const Oa={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ba={offset:"strokeDashoffset",array:"strokeDasharray"};function ka(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?Oa:Ba;t[o.offset]=w.transform(-s);const r=w.transform(e),a=w.transform(n);t[o.array]=`${r} ${a}`}function Es(t,e,n){return typeof t=="string"?t:w.transform(e+n*t)}function ja(t,e,n){const s=Es(e,t.x,t.width),i=Es(n,t.y,t.height);return`${s} ${i}`}function Un(t,{attrX:e,attrY:n,attrScale:s,originX:i,originY:o,pathLength:r,pathSpacing:a=1,pathOffset:u=0,...l},c,f){if(jn(t,l,f),c){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:d,dimensions:p}=t;h.transform&&(p&&(d.transform=h.transform),delete h.transform),p&&(i!==void 0||o!==void 0||d.transform)&&(d.transformOrigin=ja(p,i!==void 0?i:.5,o!==void 0?o:.5)),e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),s!==void 0&&(h.scale=s),r!==void 0&&ka(h,r,a,u,!1)}const Nn=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),hr=()=>({...Nn(),attrs:{}}),_n=t=>typeof t=="string"&&t.toLowerCase()==="svg";function dr(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const o in n)t.style.setProperty(o,n[o])}const mr=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function pr(t,e,n,s){dr(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(mr.has(i)?i:Ie(i),e.attrs[i])}const we={};function Ua(t){Object.assign(we,t)}function gr(t,{layout:e,layoutId:n}){return tt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!we[t]||t==="opacity")}function Wn(t,e,n){var s;const{style:i}=t,o={};for(const r in i)(L(i[r])||e.style&&L(e.style[r])||gr(r,t)||((s=n?.getValue(r))===null||s===void 0?void 0:s.liveStyle)!==void 0)&&(o[r]=i[r]);return o}function yr(t,e,n){const s=Wn(t,e,n);for(const i in t)if(L(t[i])||L(e[i])){const o=Et.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[o]=t[i]}return s}function Na(t,e){try{e.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{e.dimensions={x:0,y:0,width:0,height:0}}}const Ds=["x","y","width","height","cx","cy","r"],_a={useVisualState:On({scrapeMotionValuesFromProps:yr,createRenderState:hr,onUpdate:({props:t,prevProps:e,current:n,renderState:s,latestValues:i})=>{if(!n)return;let o=!!t.drag;if(!o){for(const a in i)if(tt.has(a)){o=!0;break}}if(!o)return;let r=!e;if(e)for(let a=0;a<Ds.length;a++){const u=Ds[a];t[u]!==e[u]&&(r=!0)}r&&C.read(()=>{Na(n,s),C.render(()=>{Un(s,i,_n(n.tagName),t.transformTemplate),pr(n,s)})})}})},Wa={useVisualState:On({scrapeMotionValuesFromProps:Wn,createRenderState:Nn})};function vr(t,e,n){for(const s in e)!L(e[s])&&!gr(s,n)&&(t[s]=e[s])}function za({transformTemplate:t},e){return m.useMemo(()=>{const n=Nn();return jn(n,e,t),Object.assign({},n.vars,n.style)},[e])}function Ka(t,e){const n=t.style||{},s={};return vr(s,n,t),Object.assign(s,za(t,e)),s}function $a(t,e){const n={},s=Ka(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}function Ha(t,e,n,s){const i=m.useMemo(()=>{const o=hr();return Un(o,e,_n(s),t.transformTemplate),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};vr(o,t.style,t),i.style={...o,...i.style}}return i}function Ga(t=!1){return(n,s,i,{latestValues:o},r)=>
9{const u=(In(n)?Ha:$a)(s,o,r,n),l=ha(s,typeof n=="string",t),c=n!==m.Fragment?{...l,...u,ref:i}:{},{children:f}=s,h=m.useMemo(()=>L(f)?f.get():f,[f]);return m.createElement(n,{...c,children:h})}}function xr(t,e){return function(s,{forwardMotionProps:i}={forwardMotionProps:!1}){const r={...In(s)?_a:Wa,preloadedFeatures:t,useRender:Ga(i),createVisualElement:e,Component:s};return va(r)}}const Xa=xr(),Nh=sr(Xa);function Tr(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}function Fe(t,e,n){const s=t.getProps();return Fn(s,e,n!==void 0?n:s.custom,t)}const Sr=De(()=>window.ScrollTimeline!==void 0);class Ya{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>"finished"in e?e.finished:e))}getAll(e){return this.animations[0][e]}setAll(e,n){for(let s=0;s<this.animations.length;s++)this.animations[s][e]=n}attachTimeline(e,n){const s=this.animations.map(i=>{if(Sr()&&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;n<this.animations.length;n++)e=Math.max(e,this.animations[n].duration);return e}runAll(e){this.animations.forEach(n=>n[e]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class zn extends Ya{then(e,n){return Promise.all(this.animations).then(e).catch(n)}}function Oe(t,e){return t?t[e]||t.default||t:void 0}const Pe=2e4;function Kn(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<Pe;)e+=n,s=t.next(e);return e>=Pe?1/0:e}function wr(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(Kn(s),Pe);return{type:"keyframes",ease:o=>s.next(i*o).value/e,duration:G(i)}}function ne(t){return typeof t=="function"}function rn(t,e){t.timeline=e,t.onfinish=null}class qa{constructor(e){this.animation=e}get duration(){var e,n,s;const i=((n=(e=this.animation)===null||e===void 0?void 0:e.effect)===null||n===void 0?void 0:n.getComputedTiming().duration)||((s=this.options)===null||s===void 0?void 0:s.duration)||300;return G(Number(i))}get time(){var e;return this.animation?G(((e=this.animation)===null||e===void 0?void 0:e.currentTime)||0):0}set time(e){this.animation&&(this.animation.currentTime=W(e))}get speed(){return this.animation?this.animation.playbackRate:1}set speed(e){this.animation&&(this.animation.playbackRate=e)}get state(){return this.animation?this.animation.playState:"finished"}get startTime(){return this.animation?this.animation.startTime:null}get finished(){return this.animation?this.animation.finished:Promise.resolve()}play(){this.animation&&this.animation.play()}pause(){this.animation&&this.animation.pause()}stop(){!this.animation||this.state==="idle"||this.state==="finished"||(this.animation.commitStyles&&this.animation.commitStyles(),this.cancel())}flatten(){var e;this.animation&&((e=this.animation.effect)===null||e===void 0||e.updateTiming({easing:"linear"}))}attachTimeline(e){return this.animation&&rn(this.animation,e),k}complete(){this.animation&&this.animation.finish()}cancel(){try{this.animation&&this.animation.cancel()}catch{}}}const $n=t=>Array.isArray(t)&&typeof t[0]=="number",Za={linearEasing:void 0};function Ja(t,e){const n=De(t);return()=>{var s;return(s=Za[e])!==null&&s!==void 0?s:n()}}const qt=Ja(()=>{try{document.createElement("div").animate({opacity:0}
vendor: 81,549 bytes, line 9
9,{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Pr=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let o=0;o<i;o++)s+=t(st(0,i-1,o))+", ";return`linear(${s.substring(0,s.length-2)})`};function Ar(t){return!!(typeof t=="function"&&qt()||!t||typeof t=="string"&&(t in on||qt())||$n(t)||Array.isArray(t)&&t.every(Ar))}const jt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,on={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:jt([0,.65,.55,1]),circOut:jt([.55,0,1,.45]),backIn:jt([.31,.01,.66,-.59]),backOut:jt([.33,1.53,.69,.99])};function br(t,e){if(t)return typeof t=="function"&&qt()?Pr(t,e):$n(t)?jt(t):Array.isArray(t)?t.map(n=>br(n,e)||on.easeOut):on[t]}const X={x:!1,y:!1};function Cr(){return X.x||X.y}function se(t,e,n){var s;if(t instanceof Element)return[t];if(typeof t=="string"){let i=document;e&&(i=e.current);const o=(s=n?.[t])!==null&&s!==void 0?s:i.querySelectorAll(t);return o?Array.from(o):[]}return Array.from(t)}function Vr(t,e){const n=se(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function Rs(t){return e=>{e.pointerType==="touch"||Cr()||t(e)}}function Qa(t,e,n={}){const[s,i,o]=Vr(t,n),r=Rs(a=>{const{target:u}=a,l=e(a);if(typeof l!="function"||!u)return;const c=Rs(f=>{l(f),u.removeEventListener("pointerleave",c)});u.addEventListener("pointerleave",c,i)});return s.forEach(a=>{a.addEventListener("pointerenter",r,i)}),o}const Mr=(t,e)=>e?t===e?!0:Mr(t,e.parentElement):!1,Hn=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,tu=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function eu(t){return tu.has(t.tagName)||t.tabIndex!==-1}const Ut=new WeakSet;function Ls(t){return e=>{e.key==="Enter"&&t(e)}}function We(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const nu=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=Ls(()=>{if(Ut.has(n))return;We(n,"down");const i=Ls(()=>{We(n,"up")}),o=()=>We(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 Is(t){return Hn(t)&&!Cr()}function su(t,e,n={}){const[s,i,o]=Vr(t,n),r=a=>{const u=a.currentTarget;if(!Is(a)||Ut.has(u))return;Ut.add(u);const l=e(a),c=(d,p)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",h),!(!Is(d)||!Ut.has(u))&&(Ut.delete(u),typeof l=="function"&&l(d,{success:p}))},f=d=>{c(d,n.useGlobalTarget||Mr(u,d.target))},h=d=>{c(d,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",h,i)};return s.forEach(a=>{!eu(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0),(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,i),a.addEventListener("focus",l=>nu(l,i),i)}),o}function iu(t){return t==="x"||t==="y"?X[t]?null:(X[t]=!0,()=>{X[t]=!1}):X.x||X.y?null:(X.x=X.y=!0,()=>{X.x=X.y=!1})}const Er=new Set(["width","height","top","left","right","bottom",...Et]);let pe;function ru(){pe=void 0}const J={now:()=>(pe===void 0&&J.set(O.isProcessing||Vn.useManualTiming?O.timestamp:performance.now()),pe),set:t=>{pe=t,queueMicrotask(ru)}};function Be(t,e){t.indexOf(e)===-1&&t.push(e)}function ke(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}function ou([...t],e,n){const s=e<0?t.length+e:e;if(s>=0&&s<t.length){const i=n<0?t.length+n:n,[o]=t.splice(e,1);t.splice(i,0,o)}return t}class Gn{constructor(){this.subscriptions=[]}add(e){return Be(this.subscriptions,e),()=>ke(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let o=0;o<i;o++){const r=this.subscriptions[o];r&&r(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function Xn(t,e){return e?t*(1e3/e):0}const Fs=30,au=t=>!isNaN(parseFloat(t)),_t={current:void 0};class Dr{constructor(e,n={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(s,i=!0)=>{const o=J.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=J.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=au(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 Gn);const s=this.events[e].add(n);return e==="change"?()=>{s(),C.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return _t.current&&_t.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=J.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Fs)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Fs);return Xn(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 q(t,e){return new Dr(t,e)}function uu(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,q(n))}function Yn(t,e){const n=Fe(t,e);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const r in o){const a=Aa(o[r]);uu(t,r,a)}}function lu(t){return!!(L(t)&&t.add)}function an(t,e){const n=t.getValue("willChange");if(lu(n))return n.add(e)}function qn(t){return t.props[or]}const Zt={current:!1},Rr=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,cu=1e-7,fu=12;function hu(t,e,n,s,i){let o,r,a=0;do r=e+(n-e)/2,o=Rr(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>cu&&++a<fu);return r}function ie(t,e,n,s){if(t===e&&n===s)return k;const i=o=>hu(o,0,1,t,n);return o=>o===0||o===1?o:Rr(i(o),e,s)}const Lr=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Ir=t=>e=>1-t(1-e),Fr=ie(.33,1.53,.69,.99),Zn=Ir(Fr),Or=Lr(Zn),Br=t=>(t*=2)<1?.5*Zn(t):.5*(2-Math.pow(2,-10*(t-1))),Jn=t=>1-Math.sin(Math.acos(t)),kr=Ir(Jn),jr=Lr(Jn),Ur=t=>/^0[^.\s]+$/u.test(t);function du(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Ur(t):!0}const Wt=t=>Math.round(t*1e5)/1e5,Qn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function mu(t){return t==null}const pu=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ts=(t,e)=>n=>!!(typeof n=="string"&&pu.test(n)&&n.startsWith(t)||e&&!mu(n)&&Object.prototype.hasOwnProperty.call(n,e)),Nr=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,o,r,a]=s.match(Qn);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},gu=t=>Y(0,255,t),ze={...Dt,transform:t=>Math.round(gu(t))},ct={test:ts("rgb","red"),parse:Nr("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+ze.transform(t)+", "+ze.transform(e)+", "+ze.transform(n)+", "+Wt(Yt.transform(s))+")"};function yu(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 un={test:ts("#"),parse:yu,transform:ct.transform},St={test:ts("hsl","hue"),parse:Nr("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+Z.transform(Wt(e))+", "+Z.transform(Wt(n))+", "+Wt(Yt.transform(s))+")"},N={test:t=>ct.test(t)||un.test(t)||St.test(t),parse:t=>ct.test(t)?ct.parse(t):St.test(t)?St.parse(t):un.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?ct.transform(t):St.transform(t)},vu=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function xu(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(Qn))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(vu))===null||n===void 0?void 0:n.length)||0)>0}const _r="number",Wr="color",Tu="var",Su="var(",Os="${}",wu=/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 Jt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(wu,u=>(N.test(u)?(s.color.push(o),i.push(Wr),n.push(N.parse(u))):u.startsWith(Su)?(s.var.push(o),i.push(Tu),n.push(u)):(s.number.push(o),i.push(_r),n.push(parseFloat(u))),++o,Os)).split(Os);return{values:n,split:a,indexes:s,types:i}}function zr(t){return Jt(t).values}function Kr(t){const{split:e,types:n}=Jt(t),s=e.length;return i=>{let o="";for(let r=0;r<s;r++)if(o+=e[r],i[r]!==void 0){const a=n[r];a===_r?o+=Wt(i[r]):a===Wr?o+=N.transform(i[r]):o+=i[r]}return o}}const Pu=t=>typeof t=="number"?0:t;function Au(t){const e=zr(t);return Kr(t)(e.map(Pu))}const it={test:xu,parse:zr,createTransformer:Kr,getAnimatableNone:Au},bu=new Set(["brightness","contrast","saturate","opacity"]);function Cu(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(Qn)||[];if(!s)return t;const i=n.replace(s,"");let o=bu.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const Vu=/\b([a-z-]*)\(.*?\)/gu,ln={...it,getAnimatableNone:t=>{const e=t.match(Vu);return e?e.map(Cu).join(" "):t}},Mu={...kn,color:N,backgroundColor:N,outlineColor:N,fill:N,stroke:N,borderColor:N,borderTopColor:N,borderRightColor:N,borderBottomColor:N,borderLeftColor:N,filter:ln,WebkitFilter:ln},es=t=>Mu[t];function $r(t,e){let n=es(t);return n!==ln&&(n=it),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Eu=new Set(["auto","none","0"]);function Du(t,e,n){let s=0,i;for(;s<t.length&&!i;){const o=t[s];typeof o=="string"&&!Eu.has(o)&&Jt(o).values.length&&(i=t[s]),s++}if(i&&n)for(const o of e)t[o]=$r(n,i)}const Bs=t=>t===Dt||t===w,ks=(t,e)=>parseFloat(t.split(", ")[e]),js=(t,e)=>(n,{transform:s})=>{if(s==="none"||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/u);if(i)return ks(i[1],e);{const o=s.match(/^matrix\((.+)\)$/u);return o?ks(o[1],t):0}},Ru=new Set(["x","y","z"]),Lu=Et.filter(t=>!Ru.has(t));function Iu(t){const e=[];return Lu.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const Ct={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:js(4,13),y:js(5,14)};Ct.translateX=Ct.x;Ct.translateY=Ct.y;const ft=new Set;let cn=!1,fn=!1;function Hr(){if(fn){const t=Array.from(ft).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=Iu(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([o,r])=>{var a;(a=s.getValue(o))===null||a===void 0||a.set(r)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}fn=!1,cn=!1,ft.forEach(t=>t.complete()),ft.clear()}function Gr(){ft.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(fn=!0)})}function Fu(){Gr(),Hr()}class ns{constructor(e,n,s,i,o,r=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=o,this.isAsync=r}scheduleResolve(){this.isScheduled=!0,this.isAsync?(ft.add(this),cn||(cn=!0,C.read(Gr),C.resolveKeyframes(Hr))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;for(let o=0;o<e.length;o++)if(e[o]===null)if(o===0){const r=i?.get(),a=e[e.length-1];if(r!==void 0)e[0]=r;else if(s&&n){const u=s.readValue(n,a);u!=null&&(e[0]=u)}e[0]===void 0&&(e[0]=a),i&&r===void 0&&i.set(e[0])}else e[o]=e[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),ft.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,ft.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Xr=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),Ou=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Bu(t){const e=Ou.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function Yr(t,e,n=1){const[s,i]=Bu(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const r=o.trim();return Xr(r)?parseFloat(r):r}return Bn(i)?Yr(i,e,n+1):i}const qr=t=>e=>e.test(t),ku={test:t=>t==="auto",parse:t=>t},Zr=[Dt,w,Z,et,Da,Ea,ku],Us=t=>Zr.find(qr(t));class Jr extends ns{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 u=0;u<e.length;u++){let l=e[u];if(typeof l=="string"&&(l=l.trim(),Bn(l))){const c=Yr(l,n.current);c!==void 0&&(e[u]=c),u===e.length-1&&(this.finalKeyframe=l)}}if(this.resolveNoneKeyframes(),!Er.has(s)||e.length!==2)return;const[i,o]=e,r=Us(i),a=Us(o);if(r!==a)if(Bs(r)&&Bs(a))for(let u=0;u<e.length;u++){const l=e[u];typeof l=="string"&&(e[u]=parseFloat(l))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)du(e[i])&&s.push(i);s.length&&Du(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e||!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ct[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){var e;const{element:n,name:s,unresolvedKeyframes:i}=this;if(!n||!n.current)return;const o=n.getValue(s);o&&o.jump(this.measuredOrigin,!1);const r=i.length-1,a=i[r];i[r]=Ct[s](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((e=this.removedTransforms)===null||e===void 0)&&e.length&&this.removedTransforms.forEach(([u,l])=>{n.getValue(u).set(l)}),this.resolveNoneKeyframes()}}const Ns=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(it.test(t)||t==="0")&&!t.startsWith("url("));function ju(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function Uu(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const o=t[t.length-1],r=Ns(i,e),a=Ns(o,e);return!r||!a?!1:ju(t)||(n==="spring"||ne(n))&&s}const Nu=t=>t!==null;function re(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(Nu),o=e&&n!=="loop"&&e%2===1?0:i.length-1;return!o||s===void 0?i[o]:s}const _u=40;class Qr{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=J.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>_u?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&Fu(),this._resolved}onKeyframesResolved(e,n){this.resolvedAt=J.now(),this.hasAttemptedResolve=!0;const{name:s,type:i,velocity:o,delay:r,onComplete:a,onUpdate:u,isGenerator:l}=this.options;if(!l&&!Uu(e,s,i,o))if(Zt.current||!r){u&&u(re(e,this.options,n)),a&&a(),this.resolveFinishedPromise();return}else this.options.duration=0;const c=this.initPlayback(e,n);c!==!1&&(this._resolved={keyframes:e,finalKeyframe:n,...c},this.onPostResolved())}onPostResolved(){}then(e,n){return this.currentFinishedPromise.then(e,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}const E=(t,e,n)=>t+(e-t)*n;function Ke(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 Wu({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,u=2*n-a;i=Ke(u,a,t+1/3),o=Ke(u,a,t),r=Ke(u,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}function Ae(t,e){return n=>n>0?e:t}const $e=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},zu=[un,ct,St],Ku=t=>zu.find(e=>e.test(t));function _s(t){const e=Ku(t);if(!e)return!1;let n=e.parse(t);return e===St&&(n=Wu(n)),n}const Ws=(t,e)=>{const n=_s(t),s=_s(e);if(!n||!s)return Ae(t,e);const i={...n};return o=>(i.red=$e(n.red,s.red,o),i.green=$e(n.green,s.green,o),i.blue=$e(n.blue,s.blue,o),i.alpha=E(n.alpha,s.alpha,o),ct.transform(i))},$u=(t,e)=>n=>e(t(n)),oe=(...t)=>t.reduce($u),hn=new Set(["none","hidden"]);function Hu(t,e){return hn.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function Gu(t,e){return n=>E(t,e,n)}function ss(t){return typeof t=="number"?Gu:typeof t=="string"?Bn(t)?Ae:N.test(t)?Ws:qu:Array.isArray(t)?to:typeof t=="object"?N.test(t)?Ws:Xu:Ae}function to(t,e){const n=[...t],s=n.length,i=t.map((o,r)=>ss(o)(o,e[r]));return o=>{for(let r=0;r<s;r++)n[r]=i[r](o);return n}}function Xu(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=ss(t[i])(t[i],e[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}}function Yu(t,e){var n;const s=[],i={color:0,var:0,number:0};for(let o=0;o<e.values.length;o++){const r=e.types[o],a=t.indexes[r][i[r]],u=(n=t.values[a])!==null&&n!==void 0?n:0;s[o]=u,i[r]++}return s}const qu=(t,e)=>{const n=it.createTransformer(e),s=Jt(t),i=Jt(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?hn.has(t)&&!i.values.length||hn.has(e)&&!s.values.length?Hu(t,e):oe(to(Yu(s,i),i.values),n):Ae(t,e)};function eo(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?E(t,e,n):ss(t)(t,e)}const Zu=5;function no(t,e,n){const s=Math.max(e-Zu,0);return Xn(n-t(s),e-s)}const I={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},He=.001;function Ju({duration:t=I.duration,bounce:e=I.bounce,velocity:n=I.velocity,mass:s=I.mass}){let i,o,r=1-e;r=Y(I.minDamping,I.maxDamping,r),t=Y(I.minDuration,I.maxDuration,G(t)),r<1?(i=l=>{const c=l*r,f=c*t,h=c-n,d=dn(l,r),p=Math.exp(-f);return He-h/d*p},o=l=>{const f=l*r*t,h=f*n+n,d=Math.pow(r,2)*Math.pow(l,2)*t,p=Math.exp(-f),g=dn(Math.pow(l,2),r);return(-i(l)+He>0?-1:1)*((h-d)*p)/g}):(i=l=>{const c=Math.exp(-l*t),f=(l-n)*t+1;return-He+c*f},o=l=>{const c=Math.exp(-l*t),f=(n-l)*(t*t);return c*f});const a=5/t,u=tl(i,o,a);if(t=W(t),isNaN(u))return{stiffness:I.stiffness,damping:I.damping,duration:t};{const l=Math.pow(u,2)*s;return{stiffness:l,damping:r*2*Math.sqrt(s*l),duration:t}}}const Qu=12;function tl(t,e,n){let s=n;for(let i=1;i<Qu;i++)s=s-t(s)/e(s);return s}function dn(t,e){return t*Math.sqrt(1-e*e)}const el=["duration","bounce"],nl=["stiffness","damping","mass"];function zs(t,e){return e.some(n=>t[n]!==void 0)}function sl(t){let e={velocity:I.velocity,stiffness:I.stiffness,damping:I.damping,mass:I.mass,isResolvedFromDuration:!1,...t};if(!zs(t,nl)&&zs(t,el))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,o=2*Y(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:I.mass,stiffness:i,damping:o}}else{const n=Ju(t);e={...e,...n,mass:I.mass},e.isResolvedFromDuration=!0}return e}function is(t=I.visualDuration,e=I.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:u,damping:l,mass:c,duration:f,velocity:h,isResolvedFromDuration:d}=sl({...n,velocity:-G(n.velocity||0)}),p=h||0,g=l/(2*Math.sqrt(u*c)),v=r-o,y=G(Math.sqrt(u/c)),x=Math.abs(v)<5;s||(s=x?I.restSpeed.granular:I.restSpeed.default),i||(i=x?I.restDelta.granular:I.restDelta.default);let S;if(g<1){const T=dn(y,g);S=b=>{const M=Math.exp(-g*y*b);return r-M*((p+g*y*v)/T*Math.sin(T*b)+v*Math.cos(T*b))}}else if(g===1)S=T=>r-Math.exp(-y*T)*(v+(p+y*v)*T);else{const T=y*Math.sqrt(g*g-1);S=b=>{const M=Math.exp(-g*y*b),A=Math.min(T*b,300);return r-M*((p+g*y*v)*Math.sinh(A)+T*v*Math.cosh(A))/T}}const P={calculatedDuration:d&&f||null,next:T=>{const b=S(T);if(d)a.done=T>=f;else{let M=0;g<1&&(M=T===0?W(p):no(S,T,b));const A=Math.abs(M)<=s,V=Math.abs(r-b)<=i;a.done=A&&V}return a.value=a.done?r:b,a},toString:()=>{const T=Math.min(Kn(P),Pe),b=Pr(M=>P.next(T*M).value,T,30);return T+"ms "+b}};return P}function Ks({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:u,restDelta:l=.5,restSpeed:c}){const f=t[0],h={done:!1,value:f},d=A=>a!==void 0&&A<a||u!==void 0&&A>u,p=A=>a===void 0?u:u===void 0||Math.abs(a-A)<Math.abs(u-A)?a:u;let g=n*e;const v=f+g,y=r===void 0?v:r(v);y!==v&&(g=y-f);const x=A=>-g*Math.exp(-A/s),S=A=>y+x(A),P=A=>{const V=x(A),j=S(A);h.done=Math.abs(V)<=l,h.value=h.done?y:j};let T,b;const M=A=>{d(h.value)&&(T=A,b=is({keyframes:[h.value,p(h.value)],velocity:no(S,A,h.value),damping:i,stiffness:o,restDelta:l,restSpeed:c}))};return M(0),{calculatedDuration:null,next:A=>{let V=!1;return!b&&T===void 0&&(V=!0,P(A),M(A)),T!==void 0&&A>=T?b.next(A-T):(!V&&P(A),h)}}}const il=ie(.42,0,1,1),rl=ie(0,0,.58,1),so=ie(.42,0,.58,1),io=t=>Array.isArray(t)&&typeof t[0]!="number",ol={linear:k,easeIn:il,easeInOut:so,easeOut:rl,circIn:Jn,circInOut:jr,circOut:kr,backIn:Zn,backInOut:Or,backOut:Fr,anticipate:Br},mn=t=>{if($n(t)){Cn(t.length===4);const[e,n,s,i]=t;return ie(e,n,s,i)}else if(typeof t=="string")return ol[t];return t};function al(t,e,n){const s=[],i=n||eo,o=t.length-1;for(let r=0;r<o;r++){let a=i(t[r],t[r+1]);if(e){const u=Array.isArray(e)?e[r]||k:e;a=oe(u,a)}s.push(a)}return s}function rs(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;if(Cn(o===e.length),o===1)return()=>e[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=al(e,s,i),u=a.length,l=c=>{if(r&&c<t[0])return e[0];let f=0;if(u>1)for(;f<t.length-2&&!(c<t[f+1]);f++);const h=st(t[f],t[f+1],c);return a[f](h)};return n?c=>l(Y(t[0],t[o-1],c)):l}function ro(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=st(0,e,s);t.push(E(n,1,i))}}function os(t){const e=[0];return ro(e,t.length-1),e}function ul(t,e){return t.map(n=>n*e)}function ll(t,e){return t.map(()=>e||so).splice(0,t.length-1)}function be({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=io(s)?s.map(mn):mn(s),o={done:!1,value:e[0]},r=ul(n&&n.length===e.length?n:os(e),t),a=rs(r,e,{ease:Array.isArray(i)?i:ll(e,i)});return{calculatedDuration:t,next:u=>(o.value=a(u),o.done=u>=t,o)}}const cl=t=>{const e=({timestamp:n})=>t(n);return{start:()=>C.update(e,!0),stop:()=>z(e),now:()=>O.isProcessing?O.timestamp:J.now()}},fl={decay:Ks,inertia:Ks,tween:be,keyframes:be,spring:is},hl=t=>t/100;class je extends Qr{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:u}=this.options;u&&u()};const{name:n,motionValue:s,element:i,keyframes:o}=this.options,r=i?.KeyframeResolver||ns,a=(u,l)=>this.onKeyframesResolved(u,l);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=ne(n)?n:fl[n]||be;let u,l;a!==be&&typeof e[0]!="number"&&(u=oe(hl,eo(e[0],e[1])),e=[0,100]);const c=a({...this.options,keyframes:e});o==="mirror"&&(l=a({...this.options,keyframes:[...e].reverse(),velocity:-r})),c.calculatedDuration===null&&(c.calculatedDuration=Kn(c));const{calculatedDuration:f}=c,h=f+i,d=h*(s+1)-i;return{generator:c,mirroredGenerator:l,mapPercentToKeyframes:u,calculatedDuration:f,resolvedDuration:h,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:A}=this.options;return{done:!0,value:A[A.length-1]}}const{finalKeyframe:i,generator:o,mirroredGenerator:r,mapPercentToKeyframes:a,keyframes:u,calculatedDuration:l,totalDuration:c,resolvedDuration:f}=s;if(this.startTime===null)return o.next(0);const{delay:h,repeat:d,repeatType:p,repeatDelay:g,onUpdate:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-c/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 y=this.currentTime-h*(this.speed>=0?1:-1),x=this.speed>=0?y<0:y>c;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let S=this.currentTime,P=o;if(d){const A=Math.min(this.currentTime,c)/f;let V=Math.floor(A),j=A%1;!j&&A>=1&&(j=1),j===1&&V--,V=Math.min(V,d+1),V%2&&(p==="reverse"?(j=1-j,g&&(j-=g/f)):p==="mirror"&&(P=r)),S=Y(0,1,j)*f}const T=x?{done:!1,value:u[0]}:P.next(S);a&&(T.value=a(T.value));let{done:b}=T;!x&&l!==null&&(b=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const M=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&b);return M&&i!==void 0&&(T.value=re(u,this.options,i)),v&&v(T.value),M&&this.finish(),T}get duration(){const{resolved:e}=this;return e?G(e.calculatedDuration):0}get time(){return G(this.currentTime)}set time(e){e=W(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=G(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:e=cl,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(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(e=this.currentTime)!==null&&e!==void 0?e:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}function dl(t){return new je(t)}const oo=new Set(["opacity","clipPath","filter","transform"]);function Ce(t,e,n,{delay:s=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:a="easeInOut",times:u}={}){const l={[e]:n};u&&(l.offset=u);const c=br(a,i);return Array.isArray(c)&&(l.easing=c),t.animate(l,{delay:s,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"})}const ao=De(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Ve=10,ml=2e4;function pl(t){return ne(t.type)||t.type==="spring"||!Ar(t.ease)}function gl(t,e){const n=new je({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:t[0]};const i=[];let o=0;for(;!s.done&&o<ml;)s=n.sample(o),i.push(s.value),o+=Ve;return{times:void 0,keyframes:i,duration:o-Ve,ease:"linear"}}const uo={anticipate:Br,backInOut:Or,circInOut:jr};function yl(t){return t in uo}class $s extends Qr{constructor(e){super(e);const{name:n,motionValue:s,element:i,keyframes:o}=this.options;this.resolver=new Jr(o,(r,a)=>this.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:u,startTime:l}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof o=="string"&&qt()&&yl(o)&&(o=uo[o]),pl(this.options)){const{onComplete:f,onUpdate:h,motionValue:d,element:p,...g}=this.options,v=gl(e,g);e=v.keyframes,e.length===1&&(e[1]=e[0]),s=v.duration,i=v.times,o=v.ease,r="keyframes"}const c=Ce(a.owner.current,u,e,{...this.options,duration:s,times:i,ease:o});return c.startTime=l??this.calcStartTime(),this.pendingTimeline?(rn(c,this.pendingTimeline),this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:f}=this.options;a.set(re(e,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:c,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 G(n)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:n}=e;return G(n.currentTime||0)}set time(e){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.currentTime=W(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:n}=e;return n.playbackRate}set speed(e){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:n}=e;return n.playState}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 k;const{animation:s}=n;rn(s,e)}return k}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:l,onUpdate:c,onComplete:f,element:h,...d}=this.options,p=new je({...d,keyframes:s,duration:i,type:o,ease:r,times:a,isGenerator:!0}),g=W(this.time);l.setWithVelocity(p.sample(g-Ve).value,p.sample(g).value,Ve)}const{onStop:u}=this.options;u&&u(),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:u,transformTemplate:l}=n.owner.getProps();return ao()&&s&&oo.has(s)&&!u&&!l&&!i&&o!=="mirror"&&r!==0&&a!=="inertia"}}const vl={type:"spring",stiffness:500,damping:25,restSpeed:10},xl=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Tl={type:"keyframes",duration:.8},Sl={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},wl=(t,{keyframes:e})=>e.length>2?Tl:tt.has(t)?t.startsWith("scale")?xl(e[1]):vl:Sl;function Pl({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:u,elapsed:l,...c}){return!!Object.keys(c).length}const as=(t,e,n,s={},i,o)=>r=>{const a=Oe(s,t)||{},u=a.delay||s.delay||0;let{elapsed:l=0}=s;l=l-W(u);let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-l,onUpdate:h=>{e.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:i};Pl(a)||(c={...c,...wl(t,c)}),c.duration&&(c.duration=W(c.duration)),c.repeatDelay&&(c.repeatDelay=W(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let f=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(c.duration=0,c.delay===0&&(f=!0)),(Zt.current||Vn.skipAnimations)&&(f=!0,c.duration=0,c.delay=0),f&&!o&&e.get()!==void 0){const h=re(c.keyframes,a);if(h!==void 0)return C.update(()=>{c.onUpdate(h),c.onComplete()}),new zn([])}return!o&&$s.supports(c)?new $s(c):new je(c)};function Al({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function us(t,e,{delay:n=0,transitionOverride:s,type:i}={}){var o;let{transition:r=t.getDefaultTransition(),transitionEnd:a,...u}=e;s&&(r=s);const l=[],c=i&&t.animationState&&t.animationState.getState()[i];for(const f in u){const h=t.getValue(f,(o=t.latestValues[f])!==null&&o!==void 0?o:null),d=u[f];if(d===void 0||c&&Al(c,f))continue;const p={delay:n,...Oe(r||{},f)};let g=!1;if(window.MotionHandoffAnimation){const y=qn(t);if(y){const x=window.MotionHandoffAnimation(y,f,C);x!==null&&(p.startTime=x,g=!0)}}an(t,f),h.start(as(f,h,d,t.shouldReduceMotion&&Er.has(f)?{type:!1}:p,t,g));const v=h.animation;v&&l.push(v)}return a&&Promise.all(l).then(()=>{C.update(()=>{a&&Yn(t,a)})}),l}function pn(t,e,n={}){var s;const i=Fe(t,e,n.type==="exit"?(s=t.presenceContext)===null||s===void 0?void 0:s.custom:void 0);let{transition:o=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const r=i?()=>Promise.all(us(t,i,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:f,staggerDirection:h}=o;return bl(t,e,c+l,f,h,n)}:()=>Promise.resolve(),{when:u}=o;if(u){const[l,c]=u==="beforeChildren"?[r,a]:[a,r];return l().then(()=>c())}else return Promise.all([r(),a(n.delay)])}function bl(t,e,n=0,s=0,i=1,o){const r=[],a=(t.variantChildren.size-1)*s,u=i===1?(l=0)=>l*s:(l=0)=>a-l*s;return Array.from(t.variantChildren).sort(Cl).forEach((l,c)=>{l.notify("AnimationStart",e),r.push(pn(l,e,{...o,delay:n+u(c)}).then(()=>l.notify("AnimationComplete",e)))}),Promise.all(r)}function Cl(t,e){return t.sortNodePosition(e)}function ls(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>pn(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=pn(t,e,n);else{const i=typeof e=="function"?Fe(t,e,n.custom):e;s=Promise.all(us(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}const Vl=Dn.length;function lo(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?lo(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<Vl;n++){const s=Dn[n],i=t.props[s];(Xt(i)||i===!1)&&(e[s]=i)}return e}const Ml=[...En].reverse(),El=En.length;function Dl(t){return e=>Promise.all(e.map(({animation:n,options:s})=>ls(t,n,s)))}function Rl(t){let e=Dl(t),n=Hs(),s=!0;const i=u=>(l,c)=>{var f;const h=Fe(t,c,u==="exit"?(f=t.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(h){const{transition:d,transitionEnd:p,...g}=h;l={...l,...g,...p}}return l};function o(u){e=u(t)}function r(u){const{props:l}=t,c=lo(t.parent)||{},f=[],h=new Set;let d={},p=1/0;for(let v=0;v<El;v++){const y=Ml[v],x=n[y],S=l[y]!==void 0?l[y]:c[y],P=Xt(S),T=y===u?x.isActive:null;T===!1&&(p=v);let b=S===c[y]&&S!==l[y]&&P;if(b&&s&&t.manuallyAnimateOnMount&&(b=!1),x.protectedKeys={...d},!x.isActive&&T===null||!S&&!x.prevProp||Re(S)||typeof S=="boolean")continue;const M=Ll(x.prevProp,S);let A=M||y===u&&x.isActive&&!b&&P||v>p&&P,V=!1;const j=Array.isArray(S)?S:[S];let U=j.reduce(i(y),{});T===!1&&(U={});const{prevResolvedValues:pt={}}=x,gt={...pt,...U},Ue=D=>{A=!0,h.has(D)&&(V=!0,h.delete(D)),x.needsAnimating[D]=!0;const F=t.getValue(D);F&&(F.liveStyle=!1)};for(const D in gt){const F=U[D],yt=pt[D];if(d.hasOwnProperty(D))continue;let vt=!1;nn(F)&&nn(yt)?vt=!Tr(F,yt):vt=F!==yt,vt?F!=null?Ue(D):h.add(D):F!==void 0&&h.has(D)?Ue(D):x.protectedKeys[D]=!0}x.prevProp=S,x.prevResolvedValues=U,x.isActive&&(d={...d,...U}),s&&t.blockInitialAnimation&&(A=!1),A&&(!(b&&M)||V)&&f.push(...j.map(D=>({animation:D,options:{type:y}})))}if(h.size){const v={};h.forEach(y=>{const x=t.getBaseTarget(y),S=t.getValue(y);S&&(S.liveStyle=!0),v[y]=x??null}),f.push({animation:v})}let g=!!f.length;return s&&(l.initial===!1||l.initial===l.animate)&&!t.manuallyAnimateOnMount&&(g=!1),s=!1,g?e(f):Promise.resolve()}function a(u,l){var c;if(n[u].isActive===l)return Promise.resolve();(c=t.variantChildren)===null||c===void 0||c.forEach(h=>{var d;return(d=h.animationState)===null||d===void 0?void 0:d.setActive(u,l)}),n[u].isActive=l;const f=r(u);for(const h in n)n[h].protectedKeys={};return f}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Hs(),s=!0}}}function Ll(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Tr(e,t):!1}function ot(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Hs(){return{animate:ot(!0),whileInView:ot(),whileHover:ot(),whileTap:ot(),whileDrag:ot(),whileFocus:ot(),exit:ot()}}class rt{constructor(e){this.isMounted=!1,this.node=e}update(){}}class Il extends rt{constructor(e){super(e),e.animationState||(e.animationState=Rl(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Re(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)===null||e===void 0||e.call(this)}}let Fl=0;class Ol extends rt{constructor(){super(...arguments),this.id=Fl++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const cs={animation:{Feature:Il},exit:{Feature:Ol}};function Vt(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function ae(t){return{point:{x:t.pageX,y:t.pageY}}}const Bl=t=>e=>Hn(e)&&t(e,ae(e));function zt(t,e,n,s){return Vt(t,e,Bl(n),s)}const Gs=(t,e)=>Math.abs(t-e);function kl(t,e){const n=Gs(t.x,e.x),s=Gs(t.y,e.y);return Math.sqrt(n**2+s**2)}class co{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 f=Xe(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,d=kl(f.offset,{x:0,y:0})>=3;if(!h&&!d)return;const{point:p}=f,{timestamp:g}=O;this.history.push({...p,timestamp:g});const{onStart:v,onMove:y}=this.handlers;h||(v&&v(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Ge(h,this.transformPagePoint),C.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:d,onSessionEnd:p,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Xe(f.type==="pointercancel"?this.lastMoveEventInfo:Ge(h,this.transformPagePoint),this.history);this.startEvent&&d&&d(f,v),p&&p(f,v)},!Hn(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.contextWindow=i||window;const r=ae(e),a=Ge(r,this.transformPagePoint),{point:u}=a,{timestamp:l}=O;this.history=[{...u,timestamp:l}];const{onSessionStart:c}=n;c&&c(e,Xe(a,this.history)),this.removeListeners=oe(zt(this.contextWindow,"pointermove",this.handlePointerMove),zt(this.contextWindow,"pointerup",this.handlePointerUp),zt(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),z(this.updatePoint)}}function Ge(t,e){return e?{point:e(t.point)}:t}function Xs(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Xe({point:t},e){return{point:t,delta:Xs(t,fo(e)),offset:Xs(t,jl(e)),velocity:Ul(e,.1)}}function jl(t){return t[0]}function fo(t){return t[t.length-1]}function Ul(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=fo(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>W(e)));)n--;if(!s)return{x:0,y:0};const o=G(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}const ho=1e-4,Nl=1-ho,_l=1+ho,mo=.01,Wl=0-mo,zl=0+mo;function K(t){return t.max-t.min}function Kl(t,e,n){return Math.abs(t-e)<=n}function Ys(t,e,n,s=.5){t.origin=s,t.originPoint=E(e.min,e.max,t.origin),t.scale=K(n)/K(e),t.translate=E(n.min,n.max,t.origin)-t.originPoint,(t.scale>=Nl&&t.scale<=_l||isNaN(t.scale))&&(t.scale=1),(t.translate>=Wl&&t.translate<=zl||isNaN(t.translate))&&(t.translate=0)}function Kt(t,e,n,s){Ys(t.x,e.x,n.x,s?s.originX:void 0),Ys(t.y,e.y,n.y,s?s.originY:void 0)}function qs(t,e,n){t.min=n.min+e.min,t.max=t.min+K(e)}function $l(t,e,n){qs(t.x,e.x,n.x),qs(t.y,e.y,n.y)}function Zs(t,e,n){t.min=e.min-n.min,t.max=t.min+K(e)}function $t(t,e,n){Zs(t.x,e.x,n.x),Zs(t.y,e.y,n.y)}function Hl(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?E(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?E(n,t,s.max):Math.min(t,n)),t}function Js(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 Gl(t,{top:e,left:n,bottom:s,right:i}){return{x:Js(t.x,n,i),y:Js(t.y,e,s)}}function Qs(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}function Xl(t,e){return{x:Qs(t.x,e.x),y:Qs(t.y,e.y)}}function Yl(t,e){let n=.5;const s=K(t),i=K(e);return i>s?n=st(e.min,e.max-s,t.min):s>i&&(n=st(t.min,t.max-i,e.min)),Y(0,1,n)}function ql(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 gn=.35;function Zl(t=gn){return t===!1?t=0:t===!0&&(t=gn),{x:ti(t,"left","right"),y:ti(t,"top","bottom")}}function ti(t,e,n){return{min:ei(t,e),max:ei(t,n)}}function ei(t,e){return typeof t=="number"?t:t[e]||0}const ni=()=>({translate:0,scale:1,origin:0,originPoint:0}),wt=()=>({x:ni(),y:ni()}),si=()=>({min:0,max:0}),R=()=>({x:si(),y:si()});function H(t){return[t("x"),t("y")]}function po({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function Jl({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Ql(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function Ye(t){return t===void 0||t===1}function yn({scale:t,scaleX:e,scaleY:n}){return!Ye(t)||!Ye(e)||!Ye(n)}function at(t){return yn(t)||go(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function go(t){return ii(t.x)||ii(t.y)}function ii(t){return t&&t!=="0%"}function Me(t,e,n){const s=t-n,i=e*s;return n+i}function ri(t,e,n,s,i){return i!==void 0&&(t=Me(t,i,s)),Me(t,n,s)+e}function vn(t,e=0,n=1,s,i){t.min=ri(t.min,e,n,s,i),t.max=ri(t.max,e,n,s,i)}function yo(t,{x:e,y:n}){vn(t.x,e.translate,e.scale,e.originPoint),vn(t.y,n.translate,n.scale,n.originPoint)}const oi=.999999999999,ai=1.0000000000001;function tc(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let o,r;for(let a=0;a<i;a++){o=n[a],r=o.projectionDelta;const{visualElement:u}=o.options;u&&u.props.style&&u.props.style.display==="contents"||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&&At(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,yo(t,r)),s&&at(o.latestValues)&&At(t,o.latestValues))}e.x<ai&&e.x>oi&&(e.x=1),e.y<ai&&e.y>oi&&(e.y=1)}function Pt(t,e){t.min=t.min+e,t.max=t.max+e}function ui(t,e,n,s,i=.5){const o=E(t.min,t.max,i);vn(t,e,n,o,s)}function At(t,e){ui(t.x,e.x,e.scaleX,e.scale,e.originX),ui(t.y,e.y,e.scaleY,e.scale,e.originY)}function vo(t,e){return po(Ql(t.getBoundingClientRect(),e))}function ec(t,e,n){const s=vo(t,n),{scroll:i}=e;return i&&(Pt(s.x,i.offset.x),Pt(s.y,i.offset.y)),s}const xo=({current:t})=>t?t.ownerDocument.defaultView:null,nc=new WeakMap;class sc{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=c=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(ae(c).point)},o=(c,f)=>{const{drag:h,dragPropagation:d,onDragStart:p}=this.getProps();if(h&&!d&&(this.openDragLock&&this.openDragLock(),this.openDragLock=iu(h),!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),H(v=>{let y=this.getAxisMotionValue(v).get()||0;if(Z.test(y)){const{projection:x}=this.visualElement;if(x&&x.layout){const S=x.layout.layoutBox[v];S&&(y=K(S)*(parseFloat(y)/100))}}this.originPoint[v]=y}),p&&C.postRender(()=>p(c,f)),an(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},r=(c,f)=>{const{dragPropagation:h,dragDirectionLock:d,onDirectionLock:p,onDrag:g}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:v}=f;if(d&&this.currentDirection===null){this.currentDirection=ic(v),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",f.point,v),this.updateAxis("y",f.point,v),this.visualElement.render(),g&&g(c,f)},a=(c,f)=>this.stop(c,f),u=()=>H(c=>{var f;return this.getAnimationState(c)==="paused"&&((f=this.getAxisMotionValue(c).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:l}=this.getProps();this.panSession=new co(e,{onSessionStart:i,onStart:o,onMove:r,onSessionEnd:a,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,contextWindow:xo(this.visualElement)})}stop(e,n){const s=this.isDragging;if(this.cancel(),!s)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&C.postRender(()=>o(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!he(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(r=Hl(r,this.constraints[e],this.elastic[e])),o.set(r)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:s}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,o=this.constraints;n&&Tt(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=Gl(i.layoutBox,n):this.constraints=!1,this.elastic=Zl(s),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&H(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=ql(i.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!Tt(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=ec(s,i.root,this.visualElement.getTransformPagePoint());let r=Xl(i.layout.layoutBox,o);if(n){const a=n(Jl(r));this.hasMutatedConstraints=!!a,a&&(r=po(a))}return r}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),u=this.constraints||{},l=H(c=>{if(!he(c,n,this.currentDirection))return;let f=u&&u[c]||{};r&&(f={min:0,max:0});const h=i?200:1e6,d=i?40:1e7,p={type:"inertia",velocity:s?e[c]:0,bounceStiffness:h,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(c,p)});return Promise.all(l).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return an(this.visualElement,e),s.start(as(e,s,0,n,this.visualElement,!1))}stopAnimation(){H(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){H(e=>{var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){H(n=>{const{drag:s}=this.getProps();if(!he(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]-E(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!Tt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};H(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const u=a.get();i[r]=Yl({min:u,max:u},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(),H(r=>{if(!he(r,e,null))return;const a=this.getAxisMotionValue(r),{min:u,max:l}=this.constraints[r];a.set(E(u,l,i[r]))})}addListeners(){if(!this.visualElement.current)return;nc.set(this.visualElement,this);const e=this.visualElement.current,n=zt(e,"pointerdown",u=>{const{drag:l,dragListener:c=!0}=this.getProps();l&&c&&this.start(u)}),s=()=>{const{dragConstraints:u}=this.getProps();Tt(u)&&u.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),C.read(s);const r=Vt(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:l})=>{this.isDragging&&l&&(H(c=>{const f=this.getAxisMotionValue(c);f&&(this.originPoint[c]+=u[c].translate,f.set(f.get()+u[c].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=gn,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function he(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function ic(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class rc extends rt{constructor(e){super(e),this.removeGroupControls=k,this.removeListeners=k,this.controls=new sc(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||k}unmount(){this.removeGroupControls(),this.removeListeners()}}const li=t=>(e,n)=>{t&&C.postRender(()=>t(e,n))};class oc extends rt{constructor(){super(...arguments),this.removePointerDownListener=k}onPointerDown(e){this.session=new co(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:xo(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:li(e),onStart:li(n),onMove:s,onEnd:(o,r)=>{delete this.session,i&&C.postRender(()=>i(o,r))}}}mount(){this.removePointerDownListener=zt(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 ge={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function ci(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Ft={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(w.test(t))t=parseFloat(t);else return t;const n=ci(t,e.target.x),s=ci(t,e.target.y);return`${n}% ${s}%`}},ac={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=it.parse(t);if(i.length>5)return s;const o=it.createTransformer(t),r=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,u=n.y.scale*e.y;i[0+r]/=a,i[1+r]/=u;const l=E(a,u,.5);return typeof i[2+r]=="number"&&(i[2+r]/=l),typeof i[3+r]=="number"&&(i[3+r]/=l),o(i)}};class uc extends m.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=e;Ua(lc),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()})),ge.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,r=s.projection;return r&&(r.isPresent=o,i||e.layoutDependency!==n||n===void 0?r.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?r.promote():r.relegate()||C.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Ln.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 To(t){const[e,n]=Zi(),s=m.useContext(Gt);return _.jsx(uc,{...t,layoutGroup:s,switchLayoutGroup:m.useContext(ar),isPresent:e,safeToRemove:n})}const lc={borderRadius:{...Ft,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ft,borderTopRightRadius:Ft,borderBottomLeftRadius:Ft,borderBottomRightRadius:Ft,boxShadow:ac};function So(t,e,n){const s=L(t)?t:q(t);return s.start(as("",s,e,n)),s.animation}function wo(t){return t instanceof SVGElement&&t.tagName!=="svg"}const cc=(t,e)=>t.depth-e.depth;class fc{constructor(){this.children=[],this.isDirty=!1}add(e){Be(this.children,e),this.isDirty=!0}remove(e){ke(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(cc),this.isDirty=!1,this.children.forEach(e)}}function hc(t,e){const n=J.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(z(s),t(o-e))};return C.read(s,!0),()=>z(s)}const Po=["TopLeft","TopRight","BottomLeft","BottomRight"],dc=Po.length,fi=t=>typeof t=="string"?parseFloat(t):t,hi=t=>typeof t=="number"||w.test(t);function mc(t,e,n,s,i,o){i?(t.opacity=E(0,n.opacity!==void 0?n.opacity:1,pc(s)),t.opacityExit=E(e.opacity!==void 0?e.opacity:1,0,gc(s))):o&&(t.opacity=E(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,s));for(let r=0;r<dc;r++){const a=`border${Po[r]}Radius`;let u=di(e,a),l=di(n,a);if(u===void 0&&l===void 0)continue;u||(u=0),l||(l=0),u===0||l===0||hi(u)===hi(l)?(t[a]=Math.max(E(fi(u),fi(l),s),0),(Z.test(l)||Z.test(u))&&(t[a]+="%")):t[a]=l}(e.rotate||n.rotate)&&(t.rotate=E(e.rotate||0,n.rotate||0,s))}function di(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const pc=Ao(0,.5,kr),gc=Ao(.5,.95,k);function Ao(t,e,n){return s=>s<t?0:s>e?1:n(st(t,e,s))}function mi(t,e){t.min=e.min,t.max=e.max}function $(t,e){mi(t.x,e.x),mi(t.y,e.y)}function pi(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function gi(t,e,n,s,i){return t-=e,t=Me(t,1/n,s),i!==void 0&&(t=Me(t,1/i,s)),t}function yc(t,e=0,n=1,s=.5,i,o=t,r=t){if(Z.test(e)&&(e=parseFloat(e),e=E(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=E(o.min,o.max,s);t===o&&(a-=e),t.min=gi(t.min,e,n,a,i),t.max=gi(t.max,e,n,a,i)}function yi(t,e,[n,s,i],o,r){yc(t,e[n],e[s],e[i],e.scale,o,r)}const vc=["x","scaleX","originX"],xc=["y","scaleY","originY"];function vi(t,e,n,s){yi(t.x,e,vc,n?n.x:void 0,s?s.x:void 0),yi(t.y,e,xc,n?n.y:void 0,s?s.y:void 0)}function xi(t){return t.translate===0&&t.scale===1}function bo(t){return xi(t.x)&&xi(t.y)}function Ti(t,e){return t.min===e.min&&t.max===e.max}function Tc(t,e){return Ti(t.x,e.x)&&Ti(t.y,e.y)}function Si(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Co(t,e){return Si(t.x,e.x)&&Si(t.y,e.y)}function wi(t){return K(t.x)/K(t.y)}function Pi(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Sc{constructor(){this.members=[]}add(e){Be(this.members,e),e.scheduleRender()}remove(e){if(ke(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 wc(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:l,rotate:c,rotateX:f,rotateY:h,skewX:d,skewY:p}=n;l&&(s=`perspective(${l}px) ${s}`),c&&(s+=`rotate(${c}deg) `),f&&(s+=`rotateX(${f}deg) `),h&&(s+=`rotateY(${h}deg) `),d&&(s+=`skewX(${d}deg) `),p&&(s+=`skewY(${p}deg) `)}const a=t.x.scale*e.x,u=t.y.scale*e.y;return(a!==1||u!==1)&&(s+=`scale(${a}, ${u})`),s||"none"}const ut={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Nt=typeof window<"u"&&window.MotionDebug!==void 0,qe=["","X","Y","Z"],Pc={visibility:"hidden"},Ai=1e3;let Ac=0;function Ze(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function Vo(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=qn(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",C,!(i||o))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&Vo(s)}function Mo({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},a=e?.()){this.id=Ac++,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,Nt&&(ut.totalNodes=ut.resolvedTargetDeltas=ut.recalculatedProjection=0),this.nodes.forEach(Vc),this.nodes.forEach(Lc),this.nodes.forEach(Ic),this.nodes.forEach(Mc),Nt&&window.MotionDebug.record(ut)},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 u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new fc)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new Gn),this.eventHandlers.get(r).add(a)}notifyListeners(r,...a){const u=this.eventHandlers.get(r);u&&u.notify(...a)}hasListeners(r){return this.eventHandlers.has(r)}mount(r,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=wo(r),this.instance=r;const{layoutId:u,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(l||u)&&(this.isLayoutDirty=!0),t){let f;const h=()=>this.root.updateBlockedByResize=!1;t(r,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=hc(h,250),ge.hasAnimatedSinceResize&&(ge.hasAnimatedSinceResize=!1,this.nodes.forEach(Ci))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&c&&(u||l)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:h,hasRelativeTargetChanged:d,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||c.getDefaultTransition()||jc,{onLayoutAnimationStart:v,onLayoutAnimationComplete:y}=c.getProps(),x=!this.targetLayout||!Co(this.targetLayout,p)||d,S=!h&&d;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||S||h&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,S);const P={...Oe(g,"layout"),onPlay:v,onComplete:y};(c.shouldReduceMotion||this.options.layoutRoot)&&(P.delay=0,P.type=!1),this.startAnimation(P)}else h||Ci(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}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,z(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(Fc),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&&Vo(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const f=this.path[c];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:u}=this.options;if(a===void 0&&!u)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(bi);return}this.isUpdating||this.nodes.forEach(Dc),this.isUpdating=!1,this.nodes.forEach(Rc),this.nodes.forEach(bc),this.nodes.forEach(Cc),this.clearAllSnapshots();const a=J.now();O.delta=Y(0,1e3/60,a-O.timestamp),O.timestamp=a,O.isProcessing=!0,Ne.update.process(O),Ne.preRender.process(O),Ne.render.process(O),O.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ln.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Ec),this.sharedNodes.forEach(Oc)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,C.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){C.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u<this.path.length;u++)this.path[u].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutCorrected=R(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,r?r.layoutBox:void 0)}updateScroll(r="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(a=!1),a){const u=s(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:u,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!i)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!bo(this.projectionDelta),u=this.getTransformTemplate(),l=u?u(this.latestValues,""):void 0,c=l!==this.prevTransformTemplateValue;r&&(a||at(this.latestValues)||c)&&(i(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let u=this.removeElementScroll(a);return r&&(u=this.removeTransform(u)),Uc(u),{animationId:this.root.animationId,measuredBox:a,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){var r;const{visualElement:a}=this.options;if(!a)return R();const u=a.measureViewportBox();if(!(((r=this.scroll)===null||r===void 0?void 0:r.wasRoot)||this.path.some(Nc))){const{scroll:c}=this.root;c&&(Pt(u.x,c.offset.x),Pt(u.y,c.offset.y))}return u}removeElementScroll(r){var a;const u=R();if($(u,r),!((a=this.scroll)===null||a===void 0)&&a.wasRoot)return u;for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:f,options:h}=c;c!==this.root&&f&&h.layoutScroll&&(f.wasRoot&&$(u,r),Pt(u.x,f.offset.x),Pt(u.y,f.offset.y))}return u}applyTransform(r,a=!1){const u=R();$(u,r);for(let l=0;l<this.path.length;l++){const c=this.path[l];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&At(u,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),at(c.latestValues)&&At(u,c.latestValues)}return at(this.latestValues)&&At(u,this.latestValues),u}removeTransform(r){const a=R();$(a,r);for(let u=0;u<this.path.length;u++){const l=this.path[u];if(!l.instance||!at(l.latestValues))continue;yn(l.latestValues)&&l.updateSnapshot();const c=R(),f=l.measurePageBox();$(c,f),vi(a,l.latestValues,l.snapshot?l.snapshot.layoutBox:void 0,c)}return at(this.latestValues)&&vi(a,this.latestValues),a}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==O.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){var a;const u=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=u.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=u.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=u.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==u;if(!(r||l&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:f,layoutId:h}=this.options;if(!(!this.layout||!(f||h))){if(this.resolvedRelativeTargetAt=O.timestamp,!this.targetDelta&&!this.relativeTarget){const d=this.getClosestProjectingParent();d&&d.layout&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=R(),this.relativeTargetOrigin=R(),$t(this.relativeTargetOrigin,this.layout.layoutBox,d.layout.layoutBox),$(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=R(),this.targetWithTransforms=R()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),$l(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):$(this.target,this.layout.layoutBox),yo(this.target,this.targetDelta)):$(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const d=this.getClosestProjectingParent();d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=R(),this.relativeTargetOrigin=R(),$t(this.relativeTargetOrigin,this.target,d.target),$(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Nt&&ut.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||yn(this.parent.latestValues)||go(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var r;const a=this.getLead(),u=!!this.resumingFrom||this!==a;let l=!0;if((this.isProjectionDirty||!((r=this.parent)===null||r===void 0)&&r.isProjectionDirty)&&(l=!1),u&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===O.timestamp&&(l=!1),l)return;const{layout:c,layoutId:f}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||f))return;$(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,d=this.treeScale.y;tc(this.layoutCorrected,this.treeScale,this.path,u),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=R());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(pi(this.prevProjectionDelta.x,this.projectionDelta.x),pi(this.prevProjectionDelta.y,this.projectionDelta.y)),Kt(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==d||!Pi(this.projectionDelta.x,this.prevProjectionDelta.x)||!Pi(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),Nt&&ut.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){var a;if((a=this.options.visualElement)===null||a===void 0||a.scheduleRender(),r){const u=this.getStack();u&&u.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=wt(),this.projectionDelta=wt(),this.projectionDeltaWithTransform=wt()}setAnimationOrigin(r,a=!1){const u=this.snapshot,l=u?u.latestValues:{},c={...this.latestValues},f=wt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=R(),d=u?u.source:void 0,p=this.layout?this.layout.source:void 0,g=d!==p,v=this.getStack(),y=!v||v.members.length<=1,x=!!(g&&!y&&this.options.crossfade===!0&&!this.path.some(kc));this.animationProgress=0;let S;this.mixTargetDelta=P=>{const T=P/1e3;Vi(f.x,r.x,T),Vi(f.y,r.y,T),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&($t(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Bc(this.relativeTarget,this.relativeTargetOrigin,h,T),S&&Tc(this.relativeTarget,S)&&(this.isProjectionDirty=!1),S||(S=R()),$(S,this.relativeTarget)),g&&(this.animationValues=c,mc(c,l,this.latestValues,T,x,y)),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&&(z(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=C.update(()=>{ge.hasAnimatedSinceResize=!0,this.currentAnimation=So(0,Ai,{...r,onUpdate:a=>{this.mixTargetDelta(a),r.onUpdate&&r.onUpdate(a)},onComplete:()=>{r.onComplete&&r.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Ai),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:u,layout:l,latestValues:c}=r;if(!(!a||!u||!l)){if(this!==r&&this.layout&&l&&Eo(this.options.animationType,this.layout.layoutBox,l.layoutBox)){u=this.target||R();const f=K(this.layout.layoutBox.x);u.x.min=r.target.x.min,u.x.max=u.x.min+f;const h=K(this.layout.layoutBox.y);u.y.min=r.target.y.min,u.y.max=u.y.min+h}$(a,u),At(a,c),Kt(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Sc),this.sharedNodes.get(r).add(a);const l=a.options.initialPromotionConfig;a.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(a):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){var r;const{layoutId:a}=this.options;return a?((r=this.getStack())===null||r===void 0?void 0:r.lead)||this:this}getPrevLead(){var r;const{layoutId:a}=this.options;return a?(r=this.getStack())===null||r===void 0?void 0:r.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:u}={}){const l=this.getStack();l&&l.promote(this,u),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:u}=r;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(a=!0),!a)return;const l={};u.z&&Ze("z",r,l,this.animationValues);for(let c=0;c<qe.length;c++)Ze(`rotate${qe[c]}`,r,l,this.animationValues),Ze(`skew${qe[c]}`,r,l,this.animationValues);r.render();for(const c in l)r.setStaticValue(c,l[c]),this.animationValues&&(this.animationValues[c]=l[c]);r.scheduleRender()}getProjectionStyles(r){var a,u;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Pc;const l={visibility:""},c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,l.opacity="",l.pointerEvents=me(r?.pointerEvents)||"",l.transform=c?c(this.latestValues,""):"none",l;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const g={};return this.options.layoutId&&(g.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,g.pointerEvents=me(r?.pointerEvents)||""),this.hasProjected&&!at(this.latestValues)&&(g.transform=c?c({},""):"none",this.hasProjected=!1),g}const h=f.animationValues||f.latestValues;this.applyTransformsToTarget(),l.transform=wc(this.projectionDeltaWithTransform,this.treeScale,h),c&&(l.transform=c(h,l.transform));const{x:d,y:p}=this.projectionDelta;l.transformOrigin=`${d.origin*100}% ${p.origin*100}% 0`,f.animationValues?l.opacity=f===this?(u=(a=h.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&u!==void 0?u:1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:l.opacity=f===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const g in we){if(h[g]===void 0)continue;const{correct:v,applyTo:y}=we[g],x=l.transform==="none"?h[g]:v(h[g],f);if(y){const S=y.length;for(let P=0;P<S;P++)l[y[P]]=x}else l[g]=x}return this.options.layoutId&&(l.pointerEvents=f===this?me(r?.pointerEvents)||"":"none"),l}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>{var a;return(a=r.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(bi),this.root.sharedNodes.clear()}}}function bc(t){t.updateLayout()}function Cc(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:o}=t.options,r=n.source!==t.layout.source;o==="size"?H(f=>{const h=r?n.measuredBox[f]:n.layoutBox[f],d=K(h);h.min=s[f].min,h.max=h.min+d}):Eo(o,n.layoutBox,s)&&H(f=>{const h=r?n.measuredBox[f]:n.layoutBox[f],d=K(s[f]);h.max=h.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[f].max=t.relativeTarget[f].min+d)});const a=wt();Kt(a,s,n.layoutBox);const u=wt();r?Kt(u,t.applyTransform(i,!0),n.measuredBox):Kt(u,s,n.layoutBox);const l=!bo(a);let c=!1;if(!t.resumeFrom){const f=t.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:d}=f;if(h&&d){const p=R();$t(p,n.layoutBox,h.layoutBox);const g=R();$t(g,s,d.layoutBox),Co(p,g)||(c=!0),f.options.layoutRoot&&(t.relativeTarget=g,t.relativeTargetOrigin=p,t.relativeParent=f)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:n,delta:u,layoutDelta:a,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function Vc(t){Nt&&ut.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Mc(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Ec(t){t.clearSnapshot()}function bi(t){t.clearMeasurements()}function Dc(t){t.isLayoutDirty=!1}function Rc(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Ci(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Lc(t){t.resolveTargetDelta()}function Ic(t){t.calcProjection()}
vendor: 6,580 bytes, line 9
9function Fc(t){t.resetSkewAndRotation()}function Oc(t){t.removeLeadSnapshot()}function Vi(t,e,n){t.translate=E(e.translate,0,n),t.scale=E(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Mi(t,e,n,s){t.min=E(e.min,n.min,s),t.max=E(e.max,n.max,s)}function Bc(t,e,n,s){Mi(t.x,e.x,n.x,s),Mi(t.y,e.y,n.y,s)}function kc(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const jc={duration:.45,ease:[.4,0,.1,1]},Ei=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Di=Ei("applewebkit/")&&!Ei("chrome/")?Math.round:k;function Ri(t){t.min=Di(t.min),t.max=Di(t.max)}function Uc(t){Ri(t.x),Ri(t.y)}function Eo(t,e,n){return t==="position"||t==="preserve-aspect"&&!Kl(wi(e),wi(n),.2)}function Nc(t){var e;return t!==t.root&&((e=t.scroll)===null||e===void 0?void 0:e.wasRoot)}const _c=Mo({attachResizeListener:(t,e)=>Vt(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ht={current:void 0},Do=Mo({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!ht.current){const t=new _c({});t.mount(window),t.setOptions({layoutScroll:!0}),ht.current=t}return ht.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Ro={pan:{Feature:oc},drag:{Feature:rc,ProjectionNode:Do,MeasureLayout:To}};function Li(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&&C.postRender(()=>o(e,ae(e)))}class Wc extends rt{mount(){const{current:e}=this.node;e&&(this.unmount=Qa(e,n=>(Li(this.node,n,"Start"),s=>Li(this.node,s,"End"))))}unmount(){}}class zc extends rt{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=oe(Vt(this.node.current,"focus",()=>this.onFocus()),Vt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Ii(t,e,n){const{props:s}=t;t.animationState&&s.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),o=s[i];o&&C.postRender(()=>o(e,ae(e)))}class Kc extends rt{mount(){const{current:e}=this.node;e&&(this.unmount=su(e,n=>(Ii(this.node,n,"Start"),(s,{success:i})=>Ii(this.node,s,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const xn=new WeakMap,Je=new WeakMap,$c=t=>{const e=xn.get(t.target);e&&e(t)},Hc=t=>{t.forEach($c)};function Gc({root:t,...e}){const n=t||document;Je.has(n)||Je.set(n,{});const s=Je.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(Hc,{root:t,...e})),s[i]}function Xc(t,e,n){const s=Gc(e);return xn.set(t,n),s.observe(t),()=>{xn.delete(t),s.unobserve(t)}}const Yc={some:0,all:1};class qc extends rt{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:Yc[i]},a=u=>{const{isIntersecting:l}=u;if(this.isInView===l||(this.isInView=l,o&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:c,onViewportLeave:f}=this.node.getProps(),h=l?c:f;h&&h(u)};return Xc(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(Zc(e,n))&&this.startObserver()}unmount(){}}function Zc({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Lo={inView:{Feature:qc},tap:{Feature:Kc},focus:{Feature:zc},hover:{Feature:Wc}},Io={layout:{ProjectionNode:Do,MeasureLayout:To}},Ee={current:null},fs={current:!1};function Fo(){if(fs.current=!0,!!bn)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Ee.current=t.matches;t.addListener(e),e()}else Ee.current=!1}const Jc=[...Zr,N,it],Qc=t=>Jc.find(qr(t)),Mt=new WeakMap;function tf(t,e,n){for(const s in e){const i=e[s],o=n[s];if(L(i))t.addValue(s,i);else if(L(o))t.addValue(s,q(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,q(r!==void 0?r:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const Fi=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class hs{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=ns,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=J.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,C.render(this.render,!1,!0))};const{latestValues:u,renderState:l,onUpdate:c}=r;this.onUpdate=c,this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=l,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=Le(n),this.isVariantNode=ir(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:f,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in h){const p=h[d];u[d]!==void 0&&L(p)&&p.set(u[d],!1)}}mount(e){this.current=e,Mt.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEac
vendor: 6,579 bytes, line 9
9h((n,s)=>this.bindToMotionValue(s,n)),fs.current||Fo(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ee.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Mt.delete(this.current),this.projection&&this.projection.unmount(),z(this.notifyUpdate),z(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=tt.has(e),i=n.on("change",a=>{this.latestValues[e]=a,this.props.onUpdate&&C.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 bt){const n=bt[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const o=this.features[e];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.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;s<Fi.length;s++){const i=Fi[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,r=e[o];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=tf(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=q(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){var s;let i=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(s=this.getBaseTargetFromProps(this.props,e))!==null&&s!==void 0?s:this.readValueFromInstance(this.current,e,this.options);return i!=null&&(typeof i=="string"&&(Xr(i)||Ur(i))?i=parseFloat(i):!Qc(i)&&it.test(n)&&(i=$r(e,n)),this.setBaseTarget(e,L(i)?i.get():i)),L(i)?i.get():i}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:s}=this.props;let i;if(typeof s=="string"||typeof s=="object"){const r=Fn(this.props,s,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);r&&(i=r[e])}if(s&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,e);return o!==void 0&&!L(o)?o:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Gn),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class Oo extends hs{constructor(){super(...arguments),this.KeyframeResolver=Jr}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;L(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function ef(t){return window.getComputedStyle(t)}class Bo extends Oo{constructor(){super(...arguments),this.type="html",this.renderInstance=dr}readValueFromInstance(e,n){if(tt.has(n)){const s=es(n);return s&&s.default||0}else{const s=ef(e),i=(cr(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return vo(e,n)}build(e,n,s){jn(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return Wn(e,n,s)}}class ko extends Oo{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=R}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(tt.has(n)){const s=es(n);return s&&s.default||0}return n=mr.has(n)?n:Ie(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return yr(e,n,s)}build(e,n,s){Un(e,n,this.isSVGTag,s.transformTemplate)}renderInstance(e,n,s,i){pr(e,n,s,i)}mount(e){this.isSVGTag=_n(e.tagName),super.mount(e)}}const ds=(t,e)=>In(t)?new ko(e):new Bo(e,{allowProjection:t!==m.Fragment}),nf=xr({...cs,...Lo,...Ro,...Io},ds),jo=sr(nf),sf={renderer:ds,...cs,...Lo},Wh={...sf,...Ro,...Io},zh={renderer:ds,...cs};function rf(t,e,n){m.useInsertionEffect(()=>t.on(e,n),[t,e,n])}function Uo(t,e){let n;const s=()=>{const{currentTime:i}=e,r=(i===null?0:i.value)/100;n!==r&&t(r),n=r};return C.update(s,!0),()=>z(s)}const ye=new WeakMap;let nt;function of(t,e){if(e){const{inlineSize:n,blockSize:s}=e[0];return{width:n,height:s}}else return t instanceof SVGElement&&"getBBox"in t?t.getBBox():{width:t.offsetWidth,height:t.offsetHeight}}function af({target:t,contentRect:e,borderBoxSize:n}){var s;
9(s=ye.get(t))===null||s===void 0||s.forEach(i=>{i({target:t,contentSize:e,get size(){return of(t,n)}})})}function uf(t){t.forEach(af)}function lf(){typeof ResizeObserver>"u"||(nt=new ResizeObserver(uf))}function cf(t,e){nt||lf();const n=se(t);return n.forEach(s=>{let i=ye.get(s);i||(i=new Set,ye.set(s,i)),i.add(e),nt?.observe(s)}),()=>{n.forEach(s=>{const i=ye.get(s);i?.delete(e),i?.size||nt?.unobserve(s)})}}const ve=new Set;let Ht;function ff(){Ht=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};ve.forEach(n=>n(e))},window.addEventListener("resize",Ht)}function hf(t){return ve.add(t),Ht||ff(),()=>{ve.delete(t),!ve.size&&Ht&&(Ht=void 0)}}function df(t,e){return typeof t=="function"?hf(t):cf(t,e)}const mf=50,Oi=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),pf=()=>({time:0,x:Oi(),y:Oi()}),gf={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function Bi(t,e,n,s){const i=n[e],{length:o,position:r}=gf[e],a=i.current,u=n.time;i.current=t[`scroll${r}`],i.scrollLength=t[`scroll${o}`]-t[`client${o}`],i.offset.length=0,i.offset[0]=0,i.offset[1]=i.scrollLength,i.progress=st(0,i.scrollLength,i.current);const l=s-u;i.velocity=l>mf?0:Xn(i.current-a,l)}function yf(t,e,n){Bi(t,"x",e,n),Bi(t,"y",e,n),e.time=n}function vf(t,e){const n={x:0,y:0};let s=t;for(;s&&s!==e;)if(s instanceof HTMLElement)n.x+=s.offsetLeft,n.y+=s.offsetTop,s=s.offsetParent;else if(s.tagName==="svg"){const i=s.getBoundingClientRect();s=s.parentElement;const o=s.getBoundingClientRect();n.x+=i.left-o.left,n.y+=i.top-o.top}else if(s instanceof SVGGraphicsElement){const{x:i,y:o}=s.getBBox();n.x+=i,n.y+=o;let r=null,a=s.parentNode;for(;!r;)a.tagName==="svg"&&(r=a),a=s.parentNode;s=r}else break;return n}const Tn={start:0,center:.5,end:1};function ki(t,e,n=0){let s=0;if(t in Tn&&(t=Tn[t]),typeof t=="string"){const i=parseFloat(t);t.endsWith("px")?s=i:t.endsWith("%")?t=i/100:t.endsWith("vw")?s=i/100*document.documentElement.clientWidth:t.endsWith("vh")?s=i/100*document.documentElement.clientHeight:t=i}return typeof t=="number"&&(s=e*t),n+s}const xf=[0,0];function Tf(t,e,n,s){let i=Array.isArray(t)?t:xf,o=0,r=0;return typeof t=="number"?i=[t,t]:typeof t=="string"&&(t=t.trim(),t.includes(" ")?i=t.split(" "):i=[t,Tn[t]?t:"0"]),o=ki(i[0],n,s),r=ki(i[1],e),o-r}const Sf={All:[[0,0],[1,1]]},wf={x:0,y:0};function Pf(t){return"getBBox"in t&&t.tagName!=="svg"?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}function Af(t,e,n){const{offset:s=Sf.All}=n,{target:i=t,axis:o="y"}=n,r=o==="y"?"height":"width",a=i!==t?vf(i,t):wf,u=i===t?{width:t.scrollWidth,height:t.scrollHeight}:Pf(i),l={width:t.clientWidth,height:t.clientHeight};e[o].offset.length=0;let c=!e[o].interpolate;const f=s.length;for(let h=0;h<f;h++){const d=Tf(s[h],l[r],u[r],a[o]);!c&&d!==e[o].interpolatorOffsets[h]&&(c=!0),e[o].offset[h]=d}c&&(e[o].interpolate=rs(e[o].offset,os(s),{clamp:!1}),e[o].interpolatorOffsets=[...e[o].offset]),e[o].progress=Y(0,1,e[o].interpolate(e[o].current))}function bf(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let s=e;for(;s&&s!==t;)n.x.targetOffset+=s.offsetLeft,n.y.targetOffset+=s.offsetTop,s=s.offsetParent}n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight}function Cf(t,e,n,s={}){return{measure:()=>bf(t,s.target,n),update:i=>{yf(t,n,i),(s.offset||s.target)&&Af(t,n,s)},notify:()=>e(n)}}const Ot=new WeakMap,ji=new WeakMap,Qe=new WeakMap,Ui=t=>t===document.documentElement?window:t;function ms(t,{container:e=document.documentElement,...n}={}){let s=Qe.get(e);s||(s=new Set,Qe.set(e,s));const i=pf(),o=Cf(e,t,i,n);if(s.add(o),!Ot.has(e)){const a=()=>{for(const h of s)h.measure()},u=()=>{for(const h of s)h.update(O.timestamp)},l=()=>{for(const h of s)h.notify()},c=()=>{C.read(a,!1,!0),C.read(u,!1,!0),C.update(l,!1,!0)};Ot.set(e,c);const f=Ui(e);window.addEventListener("resize",c,{passive:!0}),e!==document.documentElement&&ji.set(e,df(e,c)),f.addEventListener("scroll",c,{passive:!0})}const r=Ot.get(e);return C.read(r,!1,!0),()=>{var a;z(r);const u=Qe.get(e);if(!u||(u.delete(o),u.size))return;const l=Ot.get(e);Ot.delete(e),l&&(Ui(e).removeEventListener("scroll",l),(a=ji.get(e))===null||a===void 0||a(),window.removeEventListener("resize",l))}}function Vf({source:t,container:e,axis:n="y"}){t&&(e=t);const s={value:0},i=ms(o=>{s.value=o[n].progress*100},{container:e,axis:n});return{currentTime:s,cancel:i}}const tn=new Map;function No({source:t,container:e=document.documentElement,axis:n="y"}={}){t&&(e=t),tn.has(e)||tn.set(e,{});const s=tn.get(e);return s[n]||(s[n]=Sr()?new ScrollTimeline({source:e,axis:n}):Vf({source:e,axis:n})),s[n]}function Mf(t){return t.length===2}function _o(t){return t&&(t.target||t.offset)}function Ef(t,e){return Mf(t)||_o(e)?ms(n=>{t(n[e.axis].progress,n)},e):Uo(t,No(e))}function Df(t,e){if(t.flatten(),_o(e))return t.pause(),ms(n=>{t.time=t.duration*n[e.axis].progress},e);{const n=No(e);return t.attachTimeline?t.attachTimeline(n,s=>(s.pause(),Uo(i=>{s.time=s.duration*i},n))):k}}function Rf(t,{axis:e="y",...n}={}){const s={axis:e,...n};return typeof t=="function"?Ef(t,s):Df(t,s)}function Ni(t,e){ra(!!(!e||e.current))}const Lf=()=>({scrollX:q(0),scrollY:q(0),scrollXProgress:q(0),scrollYProgress:q(0)});function Wo({container:t,target:e,layoutEffect:n=!0,...s}={}){const i=B(Lf);return(n?mt:m.useEffect)(()=>(Ni("target",e),Ni("container",t),Rf((r,{x:a,y:u})=>{i.scrollX.set(a.current),i.scrollXProgress.set(a.progress),i.scrollY.set(u.current),i.scrollYProgress.set(u.progress)},{...s,container:t?.current||void 0,target:e?.current||void 0})),[t,e,JSON.stringify(s.offset)]),i}function Kh(t){return Wo({container:t})}function $h(){return Wo()}function dt(t){const e=B(()=>q(t)),{isStatic:n}=m.useContext(Q);if(n){const[,s]=m.useState(t);m.useEffect(()=>e.on("change",s),[])}return e}function ps(t,e){const n=dt(e()),s=()=>n.set(e());return s(),mt(()=>{const i=()=>C.preRender(s,!1,!0),o=t.map(r=>
9r.on("change",i));return()=>{o.forEach(r=>r()),z(s)}}),n}function Hh(t,...e){const n=t.length;function s(){let i="";for(let o=0;o<n;o++){i+=t[o];const r=e[o];r&&(i+=L(r)?r.get():r)}return i}return ps(e.filter(L),s)}function _i(t){return typeof t=="number"?t:parseFloat(t)}function Gh(t,e={}){const{isStatic:n}=m.useContext(Q),s=m.useRef(null),i=dt(L(t)?_i(t.get()):t),o=m.useRef(i.get()),r=m.useRef(()=>{}),a=()=>{const l=s.current;l&&l.time===0&&l.sample(O.delta),u(),s.current=dl({keyframes:[i.get(),o.current],velocity:i.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...e,onUpdate:r.current})},u=()=>{s.current&&s.current.stop()};return m.useInsertionEffect(()=>i.attach((l,c)=>n?c(l):(o.current=l,r.current=c,C.update(a),i.get()),u),[JSON.stringify(e)]),mt(()=>{if(L(t))return t.on("change",l=>i.set(_i(l)))},[i]),i}function If(t){const e=m.useRef(0),{isStatic:n}=m.useContext(Q);m.useEffect(()=>{if(n)return;const s=({timestamp:i,delta:o})=>{e.current||(e.current=i),t(i-e.current,o)};return C.update(s,!0),()=>z(s)},[t])}function Xh(){const t=dt(0);return If(e=>t.set(e)),t}const Ff=t=>t&&typeof t=="object"&&t.mix,Of=t=>Ff(t)?t.mix:void 0;function Bf(...t){const e=!Array.isArray(t[0]),n=e?0:-1,s=t[0+n],i=t[1+n],o=t[2+n],r=t[3+n],a=rs(i,o,{mixer:Of(o[0]),...r});return e?a(s):a}function kf(t){_t.current=[],t();const e=ps(_t.current,t);return _t.current=void 0,e}function Sn(t,e,n,s){if(typeof t=="function")return kf(t);const i=typeof e=="function"?e:Bf(e,n,s);return Array.isArray(t)?Wi(t,i):Wi([t],([o])=>i(o))}function Wi(t,e){const n=B(()=>[]);return ps(t,()=>{n.length=0;const s=t.length;for(let i=0;i<s;i++)n[i]=t[i].get();return e(n)})}function Yh(t){const e=dt(t.getVelocity()),n=()=>{const s=t.getVelocity();e.set(s),s&&C.update(n)};return rf(t,"change",()=>{C.update(n,!1,!0)}),e}function jf(t){if(tt.has(t))return"transform";if(oo.has(t))return Ie(t)}class Uf extends Dr{constructor(){super(...arguments),this.values=[]}add(e){const n=jf(e);n&&(Be(this.values,n),this.update())}update(){this.set(this.values.length?this.values.join(", "):"auto")}}function qh(){return B(()=>new Uf("auto"))}function Nf(){!fs.current&&Fo();const[t]=m.useState(Ee.current);return t}function Zh(){const t=Nf(),{reducedMotion:e}=m.useContext(Q);return e==="never"?!1:e==="always"?!0:t}function _f(t){t.values.forEach(e=>e.stop())}function wn(t,e){[...e].reverse().forEach(s=>{const i=t.getVariant(s);i&&Yn(t,i),t.variantChildren&&t.variantChildren.forEach(o=>{wn(o,e)})})}function Wf(t,e){if(Array.isArray(e))return wn(t,e);if(typeof e=="string")return wn(t,[e]);Yn(t,e)}function zf(){const t=new Set,e={subscribe(n){return t.add(n),()=>{t.delete(n)}},start(n,s){const i=[];return t.forEach(o=>{i.push(ls(o,n,{transitionOverride:s}))}),Promise.all(i)},set(n){return t.forEach(s=>{Wf(s,n)})},stop(){t.forEach(n=>{_f(n)})},mount(){return()=>{e.stop()}}};return e}function zo(t){return m.useEffect(()=>()=>t(),[])}const Ko=(t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t};function $o(t,e){return io(t)?t[Ko(0,t.length,e)]:t}function gs(t){return typeof t=="object"&&!Array.isArray(t)}function Ho(t,e,n,s){return typeof t=="string"&&gs(e)?se(t,n,s):t instanceof NodeList?Array.from(t):Array.isArray(t)?t:[t]}function Kf(t,e,n){return t*(e+1)}function zi(t,e,n,s){var i;return typeof e=="number"?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):e==="<"?n:(i=s.get(e))!==null&&i!==void 0?i:t}function $f(t,e,n){for(let s=0;s<t.length;s++){const i=t[s];i.at>e&&i.at<n&&(ke(t,i),s--)}}function Hf(t,e,n,s,i,o){$f(t,i,o);for(let r=0;r<e.length;r++)t.push({value:e[r],at:E(i,o,s[r]),easing:$o(n,r)})}function Gf(t,e){for(let n=0;n<t.length;n++)t[n]=t[n]/(e+1)}function Xf(t,e){return t.at===e.at?t.value===null?1:e.value===null?-1:0:t.at-e.at}const Yf="easeInOut";function qf(t,{defaultTransition:e={},...n}={},s,i){const o=e.duration||.3,r=new Map,a=new Map,u={},l=new Map;let c=0,f=0,h=0;for(let d=0;d<t.length;d++){const p=t[d];if(typeof p=="string"){l.set(p,f);continue}else if(!Array.isArray(p)){l.set(p.name,zi(f,p.at,c,l));continue}let[g,v,y={}]=p;y.at!==void 0&&(f=zi(f,y.at,c,l));let x=0;const S=(P,T,b,M=0,A=0)=>{const V=Zf(P),{delay:j=0,times:U=os(V),type:pt="keyframes",repeat:gt,repeatType:Ue,repeatDelay:Zo=0,...ys}=T;let{ease:D=e.ease||"easeOut",duration:F}=T;const yt=typeof j=="function"?j(M,A):j,vt=V.length,vs=ne(pt)?pt:i?.[pt];if(vt<=2&&vs){let Rt=100;if(vt===2&&th(V)){const Lt=V[1]-V[0];Rt=Math.abs(Lt)}const ue={...ys};F!==void 0&&(ue.duration=W(F));const le=wr(ue,Rt,vs);D=le.ease,F=le.duration}F??(F=o);const xs=f+yt;U.length===1&&U[0]===0&&(U[1]=1);const Ts=U.length-V.length;if(Ts>0&&ro(U,Ts),V.length===1&&V.unshift(null),gt){F=Kf(F,gt);const Rt=[...V],ue=[...U];D=Array.isArray(D)?[...D]:[D];const le=[...D];for(let Lt=0;Lt<gt;Lt++){V.push(...Rt);for(let It=0;It<Rt.length;It++)U.push(ue[It]+(Lt+1)),D.push(It===0?"linear":$o(le,It-1))}Gf(U,gt)}const Ss=xs+F;Hf(b,V,D,U,xs,Ss),x=Math.max(yt+F,x),h=Math.max(Ss,h)};if(L(g)){const P=Ki(g,a);S(v,y,$i("default",P))}else{const P=Ho(g,v,s,u),T=P.length;for(let b=0;b<T;b++){v=v,y=y;const M=P[b],A=Ki(M,a);for(const V in v)S(v[V],Jf(y,V),$i(V,A),b,T)}}c=f,f+=x}return a.forEach((d,p)=>{for(const g in d){const v=d[g];v.sort(Xf);const y=[],x=[],S=[];for(let T=0;T<v.length;T++){const{at:b,value:M,easing:A}=v[T];y.push(M),x.push(st(0,h,b)),S.push(A||"easeOut")}x[0]!==0&&(x.unshift(0),y.unshift(y[0]),S.unshift(Yf)),x[x.length-1]!==1&&(x.push(1),y.push(null)),r.has(p)||r.set(p,{keyframes:{},transition:{}});const P=r.get(p);
9P.keyframes[g]=y,P.transition[g]={...e,duration:h,ease:S,times:x,...n}}}),r}function Ki(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function $i(t,e){return e[t]||(e[t]=[]),e[t]}function Zf(t){return Array.isArray(t)?t:[t]}function Jf(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const Qf=t=>typeof t=="number",th=t=>t.every(Qf);function eh(t,e){return t in e}class nh extends hs{constructor(){super(...arguments),this.type="object"}readValueFromInstance(e,n){if(eh(n,e)){const s=e[n];if(typeof s=="string"||typeof s=="number")return s}}getBaseTargetFromProps(){}removeValueFromRenderState(e,n){delete n.output[e]}measureInstanceViewportBox(){return R()}build(e,n){Object.assign(e.output,n)}renderInstance(e,{output:n}){Object.assign(e,n)}sortInstanceNodePosition(){return 0}}function sh(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=wo(t)?new ko(e):new Bo(e);n.mount(t),Mt.set(t,n)}function ih(t){const e={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new nh(e);n.mount(t),Mt.set(t,n)}function rh(t,e){return L(t)||typeof t=="number"||typeof t=="string"&&!gs(e)}function Go(t,e,n,s){const i=[];if(rh(t,e))i.push(So(t,gs(e)&&e.default||e,n&&(n.default||n)));else{const o=Ho(t,e,s),r=o.length;for(let a=0;a<r;a++){const u=o[a],l=u instanceof Element?sh:ih;Mt.has(u)||l(u);const c=Mt.get(u),f={...n};"delay"in f&&typeof f.delay=="function"&&(f.delay=f.delay(a,r)),i.push(...us(c,{...e,transition:f},{}))}}return i}function oh(t,e,n){const s=[];return qf(t,e,n,{spring:is}).forEach(({keyframes:o,transition:r},a)=>{s.push(...Go(a,o,r))}),s}function ah(t){return Array.isArray(t)&&t.some(Array.isArray)}function Xo(t){function e(n,s,i){let o=[];ah(n)?o=oh(n,s,t):o=Go(n,s,i,t);const r=new zn(o);return t&&t.animations.push(r),r}return e}const Jh=Xo();function Qh(){const t=B(()=>({current:null,animations:[]})),e=B(()=>Xo(t));return zo(()=>{t.animations.forEach(n=>n.stop())}),[t,e]}function uh(t,e,n){t.style.setProperty(`--${e}`,n)}function lh(t,e,n){t.style[e]=n}const ch=De(()=>{try{document.createElement("div").animate({opacity:[1]})}catch{return!1}return!0}),xe=new WeakMap;function fh(t,e,n){for(let s=0;s<e.length;s++)e[s]===null&&(e[s]=s===0?n():e[s-1]),typeof e[s]=="number"&&sn[t]&&(e[s]=sn[t].transform(e[s]));!ch()&&e.length<2&&e.unshift(n())}const Hi="easeOut";function Gi(t){const e=xe.get(t)||new Map;return xe.set(t,e),xe.get(t)}class hh extends qa{constructor(e,n,s,i){const o=n.startsWith("--");Cn(typeof i.type!="string");const r=Gi(e).get(n);r&&r.stop();const a=()=>n.startsWith("--")?e.style.getPropertyValue(n):window.getComputedStyle(e)[n];if(Array.isArray(s)||(s=[s]),fh(n,s,a),ne(i.type)){const c=wr(i,100,i.type);i.ease=qt()?c.ease:Hi,i.duration=W(c.duration),i.type="keyframes"}else i.ease=i.ease||Hi;const u=()=>{this.setValue(e,n,re(s,i)),this.cancel(),this.resolveFinishedPromise()},l=()=>{this.setValue=o?uh:lh,this.options=i,this.updateFinishedPromise(),this.removeAnimation=()=>{const c=xe.get(e);c&&c.delete(n)}};ao()?(super(Ce(e,n,s,i)),l(),i.autoplay===!1&&this.animation.pause(),this.animation.onfinish=u,Gi(e).set(n,this)):(super(),l(),u())}then(e,n){return this.currentFinishedPromise.then(e,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}play(){this.state==="finished"&&this.updateFinishedPromise(),super.play()}cancel(){this.removeAnimation(),super.cancel()}}function dh(t,e,n,s){const i=se(t,s),o=i.length,r=[];for(let a=0;a<o;a++){const u=i[a],l={...n};typeof l.delay=="function"&&(l.delay=l.delay(a,o));for(const c in e){const f=e[c],h={...Oe(l,c)};h.duration=h.duration?W(h.duration):h.duration,h.delay=W(h.delay||0),r.push(new hh(u,c,f,h))}}return r}const Yo=t=>{function e(n,s,i){return new zn(dh(n,s,i,t))}return e},td=Yo();function ed(){const t=B(()=>({current:null,animations:[]})),e=B(()=>Yo(t));return zo(()=>{t.animations.forEach(n=>n.stop())}),[t,e]}function mh(){const t=B(zf);return mt(t.mount,[]),t}const nd=mh;function sd(t,e,n,s){m.useEffect(()=>{const i=t.current;if(n&&i)return Vt(i,e,n,s)},[t,e,n,s])}class ph{constructor(){this.componentControls=new Set}subscribe(e){return this.componentControls.add(e),()=>this.componentControls.delete(e)}
9start(e,n){this.componentControls.forEach(s=>{s.start(e.nativeEvent||e,n)})}}const gh=()=>new ph;function id(){return B(gh)}function yh(t){return t!==null&&typeof t=="object"&&Rn in t}function rd(t){if(yh(t))return t[Rn]}function vh(){return xh}function xh(t){ht.current&&(ht.current.isUpdating=!1,ht.current.blockUpdate(),t&&t())}function od(){return m.useCallback(()=>{const e=ht.current;e&&e.resetTree()},[])}function ad(...t){const e=m.useRef(0),[n,s]=m.useState(t[e.current]),i=m.useCallback(o=>{e.current=typeof o!="number"?Ko(0,t.length,e.current+1):o,s(t[e.current])},[t.length,...t]);return[n,i]}const Th={some:0,all:1};function Sh(t,e,{root:n,margin:s,amount:i="some"}={}){const o=se(t),r=new WeakMap,a=l=>{l.forEach(c=>{const f=r.get(c.target);if(c.isIntersecting!==!!f)if(c.isIntersecting){const h=e(c);typeof h=="function"?r.set(c.target,h):u.unobserve(c.target)}else typeof f=="function"&&(f(c),r.delete(c.target))})},u=new IntersectionObserver(a,{root:n,rootMargin:s,threshold:typeof i=="number"?i:Th[i]});return o.forEach(l=>u.observe(l)),()=>u.disconnect()}function ud(t,{root:e,margin:n,amount:s,once:i=!1}={}){const[o,r]=m.useState(!1);return m.useEffect(()=>{if(!t.current||i&&o)return;const a=()=>(r(!0),i?void 0:()=>r(!1)),u={root:e&&e.current||void 0,margin:n,amount:s};return Sh(t.current,a,u)},[e,t,n,i,s]),o}function ld(){const[t,e]=Qi(),n=vh(),s=m.useRef(-1);return m.useEffect(()=>{C.postRender(()=>C.postRender(()=>{e===s.current&&(Zt.current=!1)}))},[e]),i=>{n(()=>{Zt.current=!0,t(),i(),s.current=e+1})}}function cd(){Zt.current=!1}const Te=(t,e)=>{const n=tt.has(e)?"transform":e;return`${t}: ${n}`},lt=new Map,Bt=new Map;function Xi(t,e,n){var s;const i=Te(t,e),o=lt.get(i);if(!o)return null;const{animation:r,startTime:a}=o;function u(){var l;(l=window.MotionCancelOptimisedAnimation)===null||l===void 0||l.call(window,t,e,n)}return r.onfinish=u,a===null||!((s=window.MotionHandoffIsComplete)===null||s===void 0)&&s.call(window,t)?(u(),null):a}let de,xt;const Pn=new Set;function wh(){Pn.forEach(t=>{t.animation.play(),t.animation.startTime=t.startTime}),Pn.clear()}function fd(t,e,n,s,i){if(window.MotionIsMounted)return;const o=t.dataset[rr];if(!o)return;window.MotionHandoffAnimation=Xi;const r=Te(o,e);xt||(xt=Ce(t,e,[n[0],n[0]],{duration:1e4,ease:"linear"}),lt.set(r,{animation:xt,startTime:null}),window.MotionHandoffAnimation=Xi,window.MotionHasOptimisedAnimation=(u,l)=>{if(!u)return!1;if(!l)return Bt.has(u);const c=Te(u,l);return!!lt.get(c)},window.MotionHandoffMarkAsComplete=u=>{Bt.has(u)&&Bt.set(u,!0)},window.MotionHandoffIsComplete=u=>Bt.get(u)===!0,window.MotionCancelOptimisedAnimation=(u,l,c,f)=>{const h=Te(u,l),d=lt.get(h);d&&(c&&f===void 0?c.postRender(()=>{c.postRender(()=>{d.animation.cancel()})}):d.animation.cancel(),c&&f?(Pn.add(d),c.render(wh)):(lt.delete(h),lt.size||(window.MotionCancelOptimisedAnimation=void 0)))},window.MotionCheckAppearSync=(u,l,c)=>{var f,h;const d=qn(u);if(!d)return;const p=(f=window.MotionHasOptimisedAnimation)===null||f===void 0?void 0:f.call(window,d,l),g=(h=u.props.values)===null||h===void 0?void 0:h[l];if(!p||!g)return;const v=c.on("change",y=>{var x;g.get()!==y&&((x=window.MotionCancelOptimisedAnimation)===null||x===void 0||x.call(window,d,l),v())});return v});const a=()=>{xt.cancel();const u=Ce(t,e,n,s);de===void 0&&(de=performance.now()),u.startTime=de,lt.set(r,{animation:u,startTime:de}),i&&i(u)};Bt.set(o,!1),xt.ready?xt.ready.then(a).catch(k):a()}const An=()=>({});class Ph extends hs{constructor(){super(...arguments),this.measureInstanceViewportBox=R}build(){}resetTransform(){}restoreTransform(){}removeValueFromRenderState(){}renderInstance(){}scrapeMotionValuesFromProps(){return An()}getBaseTargetFromProps(){}readValueFromInstance(e,n,s){return s.initialState[n]||0}sortInstanceNodePosition(){return 0}}const Ah=On({scrapeMotionValuesFromProps:An,createRenderState:An});function hd(t){const[e,n]=m.useState(t),s=Ah({},!1),i=B(()=>new Ph({props:{onUpdate:r=>{n({...r})}},visualState:s,presenceContext:null},{initialState:t}));m.useLayoutEffect(()=>(i.mount({}),()=>i.unmount()),[i]);const o=B(()=>r=>ls(i,r));return[e,o]}let bh=0;const dd=({children:t})=>(m.useEffect(()=>{},[]),_.jsx(ca,{id:B(()=>`asl-${bh++}`),children:t})),Ch=1e5,Yi=t=>t>.001?1/t:Ch;function md(t){let e=dt(1),n=dt(1);const{visualElement:s}=m.useContext(te);t?(e=t.scaleX||e,n=t.scaleY||n):s&&(e=s.getValue("scaleX",1),n=s.getValue("scaleY",1));const i=Sn(e,Yi),o=Sn(n,Yi);return{scaleX:i,scaleY:o}}const qo=m.createContext(null);function Vh(t,e,n,s){if(!s)return t;const i=t.findIndex(c=>c.value===e);if(i===-1)return t;const o=s>0?1:-1,r=t[i+o];if(!r)return t;const a=t[i],u=r.layout,l=E(u.min,u.max,.5);return o===1&&a.layout.max+n>l||o===-1&&a.layout.min+n<l?ou(t,i,i+o):t}function Mh({children:t,as:e="ul",axis:n="y",onReorder:s,values:i,...o},r){const a=B(()=>jo[e]),u=[],l=m.useRef(!1),c={axis:n,registerItem:(f,h)=>{const d=u.findIndex(p=>f===p.value);d!==-1?u[d].layout=h[n]:u.push({value:f,layout:h[n]}),u.sort(Rh)},updateOrder:(f,h,d)=>
9{if(l.current)return;const p=Vh(u,f,h,d);u!==p&&(l.current=!0,s(p.map(Dh).filter(g=>i.indexOf(g)!==-1)))}};return m.useEffect(()=>{l.current=!1}),_.jsx(a,{...o,ref:r,ignoreStrict:!0,children:_.jsx(qo.Provider,{value:c,children:t})})}const Eh=m.forwardRef(Mh);function Dh(t){return t.value}function Rh(t,e){return t.layout.min-e.layout.min}function qi(t,e=0){return L(t)?t:dt(e)}function Lh({children:t,style:e={},value:n,as:s="li",onDrag:i,layout:o=!0,...r},a){const u=B(()=>jo[s]),l=m.useContext(qo),c={x:qi(e.x),y:qi(e.y)},f=Sn([c.x,c.y],([g,v])=>g||v?1:"unset"),{axis:h,registerItem:d,updateOrder:p}=l;return _.jsx(u,{drag:h,...r,dragSnapToOrigin:!0,style:{...e,x:c.x,y:c.y,zIndex:f},layout:o,onDrag:(g,v)=>{const{velocity:y}=v;y[h]&&p(n,c[h].get(),y[h]),i&&i(g,v)},onLayoutMeasure:g=>d(n,g),ref:a,ignoreStrict:!0,children:t})}const Ih=m.forwardRef(Lh),pd=Object.freeze(Object.defineProperty({__proto__:null,Group:Eh,Item:Ih},Symbol.toStringTag,{value:"Module"}));function Fh(t,e){if(t==="first")return 0;{const n=e-1;return t==="last"?n:n/2}}function gd(t=.1,{startDelay:e=0,from:n=0,ease:s}={}){return(i,o)=>{const r=typeof n=="number"?n:Fh(n,o),a=Math.abs(r-i);let u=t*a;if(s){const l=o*t;u=mn(s)(u/l)*l}return e+u}}const yd=C,vd=kt.reduce((t,e)=>(t[e]=n=>z(n),t),{});function xd(t,e="end"){return n=>{n=e==="end"?Math.min(n,.999):Math.max(n,.001);const s=n*t,i=e==="end"?Math.floor(s):Math.ceil(s);return Y(0,1,i/t)}}export{$s as AcceleratedAnimation,kh as AnimatePresence,dd as AnimateSharedLayout,sa as DeprecatedLayoutGroupContext,ph as DragControls,fc as FlatTree,ca as LayoutGroup,Gt as LayoutGroupContext,jh as LazyMotion,Uh as MotionConfig,Q as MotionConfigContext,te as MotionContext,Vn as MotionGlobalConfig,Dr as MotionValue,Qt as PresenceContext,pd as Reorder,ar as SwitchLayoutGroupContext,hs as VisualElement,zt as addPointerEvent,Bl as addPointerInfo,Ua as addScaleCorrector,Jh as animate,td as animateMini,dl as animateValue,ls as animateVisualElement,zf as animationControls,cs as animations,Br as anticipate,Zn as backIn,Or as backInOut,Fr as backOut,Fa as buildTransform,K as calcLength,z as cancelFrame,vd as cancelSync,Jn as circIn,jr as circInOut,kr as circOut,Y as clamp,N as color,it as complex,R as createBox,va as createRendererMotionComponent,Xo as createScopedAnimate,ie as cubicBezier,hc as delay,cd as disableInstantTransitions,Gs as distance,kl as distance2D,sf as domAnimation,Wh as domMax,zh as domMin,il as easeIn,so as easeInOut,rl as easeOut,ha as filterProps,Ju as findSpring,C as frame,O as frameData,Ne as frameSteps,Sh as inView,Ks as inertia,rs as interpolate,Cn as invariant,bn as isBrowser,Cr as isDragActive,yh as isMotionComponent,L as isMotionValue,Se as isValidMotionProp,be as keyframes,Nh as m,On as makeUseVisualState,Lr as mirrorEasing,eo as mix,jo as motion,q as motionValue,k as noop,or as optimizedAppearDataAttribute,oe as pipe,st as progress,w as px,me as resolveMotionValue,Ir as reverseEasing,Rf as scroll,ms as scrollInfo,is as spring,gd as stagger,fd as startOptimizedAppearAnimation,xd as steps,yd as sync,J as time,Bf as transform,rd as unwrapMotionComponent,Qh as useAnimate,ed as useAnimateMini,nd as useAnimation,mh as useAnimationControls,If as useAnimationFrame,ad as useCycle,hd as useDeprecatedAnimatedState,md as useDeprecatedInvertedScale,sd as useDomEvent,id as useDragControls,Kh as useElementScroll,Qi as useForceUpdate,ud as useInView,vh as useInstantLayoutTransition,ld as useInstantTransition,Bh as useIsPresent,mt as useIsomorphicLayoutEffect,Hh as useMotionTemplate,dt as useMotionValue,rf as useMotionValueEvent,Zi as usePresence,Nf as useReducedMotion,Zh as useReducedMotionConfig,od as useResetProjection,Wo as useScroll,Gh as useSpring,Xh as useTime,Sn as useTransform,zo as useUnmountEffect,Yh as useVelocity,$h as useViewportScroll,qh as useWillChange,Mt as visualElementStore,Ko as wrap};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.