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