@kite-copilot/chat-panel 0.2.37 → 0.2.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auto.cjs +1 -1
- package/dist/auto.js +1 -1
- package/dist/{chunk-VXXE7QO3.js → chunk-QSVOPKVC.js} +1 -1
- package/dist/embed.global.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/auto.cjs
CHANGED
|
@@ -915,7 +915,7 @@ function TypingIndicator({ className = "" }) {
|
|
|
915
915
|
|
|
916
916
|
// src/ChatPanel.tsx
|
|
917
917
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
918
|
-
var CHAT_PANEL_VERSION = "0.2.
|
|
918
|
+
var CHAT_PANEL_VERSION = true ? "0.2.38" : "dev";
|
|
919
919
|
var DEFAULT_AGENT_URL = "http://localhost:5002";
|
|
920
920
|
var PANEL_WIDTH = 340;
|
|
921
921
|
function unescapeJsonString(str) {
|
package/dist/auto.js
CHANGED
|
@@ -916,7 +916,7 @@ function TypingIndicator({ className = "" }) {
|
|
|
916
916
|
|
|
917
917
|
// src/ChatPanel.tsx
|
|
918
918
|
import { Fragment as Fragment2, jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
919
|
-
var CHAT_PANEL_VERSION = "0.2.
|
|
919
|
+
var CHAT_PANEL_VERSION = true ? "0.2.38" : "dev";
|
|
920
920
|
var DEFAULT_AGENT_URL = "http://localhost:5002";
|
|
921
921
|
var PANEL_WIDTH = 340;
|
|
922
922
|
function unescapeJsonString(str) {
|
package/dist/embed.global.js
CHANGED
|
@@ -55,7 +55,7 @@ ${g}`}var Me=class extends Error{constructor({message:t,code:r,cause:a,name:o}){
|
|
|
55
55
|
top: ${l}px !important;
|
|
56
56
|
left: ${u}px !important;
|
|
57
57
|
}
|
|
58
|
-
`),()=>{document.head.removeChild(c)}},[t]),(0,bC.jsx)(mg,{isPresent:t,childRef:a,sizeRef:o,children:Pd.cloneElement(e,{ref:a})})}var kC=({children:e,initial:t,isPresent:r,onExitComplete:a,custom:o,presenceAffectsLayout:n,mode:s})=>{let i=Ms(l1),l=(0,hn.useId)(),u=(0,hn.useCallback)(d=>{i.set(d,!0);for(let f of i.values())if(!f)return;a&&a()},[i,a]),c=(0,hn.useMemo)(()=>({id:l,initial:t,isPresent:r,custom:o,onExitComplete:u,register:d=>(i.set(d,!1),()=>i.delete(d))}),n?[Math.random(),u]:[r,u]);return(0,hn.useMemo)(()=>{i.forEach((d,f)=>i.set(f,!1))},[r]),IC.useEffect(()=>{!r&&!i.size&&a&&a()},[r]),s==="popLayout"&&(e=(0,hg.jsx)(LC,{isPresent:r,children:e})),(0,hg.jsx)(co.Provider,{value:c,children:e})};function l1(){return new Map}var fo=O(Q(),1);function Td(e=!0){let t=(0,fo.useContext)(co);if(t===null)return[!0,null];let{isPresent:r,onExitComplete:a,register:o}=t,n=(0,fo.useId)();(0,fo.useEffect)(()=>{e&&o(n)},[e]);let s=(0,fo.useCallback)(()=>e&&a&&a(n),[n,a,e]);return!r&&a?[!1,s]:[!0]}var _d=O(Q(),1),Jl=e=>e.key||"";function gg(e){let t=[];return _d.Children.forEach(e,r=>{(0,_d.isValidElement)(r)&&t.push(r)}),t}var Ad=O(Q(),1);var Bs=typeof window<"u";var Rd=Bs?Ad.useLayoutEffect:Ad.useEffect;var yg=({children:e,custom:t,initial:r=!0,onExitComplete:a,presenceAffectsLayout:o=!0,mode:n="sync",propagate:s=!1})=>{let[i,l]=Td(s),u=(0,zr.useMemo)(()=>gg(e),[e]),c=s&&!i?[]:u.map(Jl),d=(0,zr.useRef)(!0),f=(0,zr.useRef)(u),h=Ms(()=>new Map),[v,x]=(0,zr.useState)(u),[C,g]=(0,zr.useState)(u);Rd(()=>{d.current=!1,f.current=u;for(let b=0;b<C.length;b++){let L=Jl(C[b]);c.includes(L)?h.delete(L):h.get(L)!==!0&&h.set(L,!1)}},[C,c.length,c.join("-")]);let p=[];if(u!==v){let b=[...u];for(let L=0;L<C.length;L++){let P=C[L],T=Jl(P);c.includes(T)||(b.splice(L,0,P),p.push(P))}n==="wait"&&p.length&&(b=p),g(gg(b)),x(u);return}let{forceRender:y}=(0,zr.useContext)(Ns);return(0,Ql.jsx)(Ql.Fragment,{children:C.map(b=>{let L=Jl(b),P=s&&!i?!1:u===C||c.includes(L),T=()=>{if(h.has(L))h.set(L,!0);else return;let A=!0;h.forEach(N=>{N||(A=!1)}),A&&(y?.(),g(f.current),s&&l?.(),a&&a())};return(0,Ql.jsx)(kC,{isPresent:P,initial:!d.current||r?void 0:!1,custom:P?void 0:t,presenceAffectsLayout:o,mode:n,onExitComplete:P?void 0:T,children:b},L)})})};var ye=e=>e;var Sa=ye,Er=ye;function gn(e){let t;return()=>(t===void 0&&(t=e()),t)}var rr=(e,t,r)=>{let a=t-e;return a===0?1:(r-e)/a};var qe=e=>e*1e3,dt=e=>e/1e3;var Fs={skipAnimations:!1,useManualTiming:!1};function PC(e){let t=new Set,r=new Set,a=!1,o=!1,n=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1};function i(u){n.has(u)&&(l.schedule(u),e()),u(s)}let l={schedule:(u,c=!1,d=!1)=>{let h=d&&a?t:r;return c&&n.add(u),h.has(u)||h.add(u),u},cancel:u=>{r.delete(u),n.delete(u)},process:u=>{if(s=u,a){o=!0;return}a=!0,[t,r]=[r,t],t.forEach(i),t.clear(),a=!1,o&&(o=!1,l.process(u))}};return l}var Ed=["read","resolveKeyframes","update","preRender","render","postRender"],u1=40;function Dd(e,t){let r=!1,a=!0,o={delta:0,timestamp:0,isProcessing:!1},n=()=>r=!0,s=Ed.reduce((g,p)=>(g[p]=PC(n),g),{}),{read:i,resolveKeyframes:l,update:u,preRender:c,render:d,postRender:f}=s,h=()=>{let g=Fs.useManualTiming?o.timestamp:performance.now();r=!1,o.delta=a?1e3/60:Math.max(Math.min(g-o.timestamp,u1),1),o.timestamp=g,o.isProcessing=!0,i.process(o),l.process(o),u.process(o),c.process(o),d.process(o),f.process(o),o.isProcessing=!1,r&&t&&(a=!1,e(h))},v=()=>{r=!0,a=!0,o.isProcessing||e(h)};return{schedule:Ed.reduce((g,p)=>{let y=s[p];return g[p]=(b,L=!1,P=!1)=>(r||v(),y.schedule(b,L,P)),g},{}),cancel:g=>{for(let p=0;p<Ed.length;p++)s[Ed[p]].cancel(g)},state:o,steps:s}}var{schedule:re,cancel:ar,state:He,steps:Nd}=Dd(typeof requestAnimationFrame<"u"?requestAnimationFrame:ye,!0);var TC=O(Q(),1),Md=(0,TC.createContext)({strict:!1});var _C={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"]},Ca={};for(let e in _C)Ca[e]={isEnabled:t=>_C[e].some(r=>!!t[r])};function AC(e){for(let t in e)Ca[t]={...Ca[t],...e[t]}}var c1=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 Yl(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||c1.has(e)}var RC=e=>!Yl(e);function d1(e){e&&(RC=t=>t.startsWith("on")?!Yl(t):e(t))}try{d1(pk("@emotion/is-prop-valid").default)}catch{}function EC(e,t,r){let a={};for(let o in e)o==="values"&&typeof e.values=="object"||(RC(o)||r===!0&&Yl(o)||!t&&!Yl(o)||e.draggable&&o.startsWith("onDrag"))&&(a[o]=e[o]);return a}function DC(e){if(typeof Proxy>"u")return e;let t=new Map,r=(...a)=>e(...a);return new Proxy(r,{get:(a,o)=>o==="create"?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}var jd=O(ue(),1);var js=O(Q(),1);var NC=O(Q(),1),po=(0,NC.createContext)({});var Fd=O(Q(),1);function ba(e){return typeof e=="string"||Array.isArray(e)}function mo(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}var Od=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Zl=["initial",...Od];function yn(e){return mo(e.animate)||Zl.some(t=>ba(e[t]))}function Bd(e){return!!(yn(e)||e.variants)}function MC(e,t){if(yn(e)){let{initial:r,animate:a}=e;return{initial:r===!1||ba(r)?r:void 0,animate:ba(a)?a:void 0}}return e.inherit!==!1?t:{}}function BC(e){let{initial:t,animate:r}=MC(e,(0,Fd.useContext)(po));return(0,Fd.useMemo)(()=>({initial:t,animate:r}),[OC(t),OC(r)])}function OC(e){return Array.isArray(e)?e.join(" "):e}var FC=Symbol.for("motionComponentSymbol");var UC=O(Q(),1);function La(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function VC(e,t,r){return(0,UC.useCallback)(a=>{a&&e.onMount&&e.onMount(a),t&&(a?t.mount(a):t.unmount()),r&&(typeof r=="function"?r(a):La(r)&&(r.current=a))},[t])}var Vt=O(Q(),1);var Us=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase();var f1="framerAppearId",Ud="data-"+Us(f1);var{schedule:Vs,cancel:jU}=Dd(queueMicrotask,!1);var jC=O(Q(),1),Vd=(0,jC.createContext)({});function qC(e,t,r,a,o){var n,s;let{visualElement:i}=(0,Vt.useContext)(po),l=(0,Vt.useContext)(Md),u=(0,Vt.useContext)(co),c=(0,Vt.useContext)(Os).reducedMotion,d=(0,Vt.useRef)(null);a=a||l.renderer,!d.current&&a&&(d.current=a(e,{visualState:t,parent:i,props:r,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:c}));let f=d.current,h=(0,Vt.useContext)(Vd);f&&!f.projection&&o&&(f.type==="html"||f.type==="svg")&&p1(d.current,r,o,h);let v=(0,Vt.useRef)(!1);(0,Vt.useInsertionEffect)(()=>{f&&v.current&&f.update(r,u)});let x=r[Ud],C=(0,Vt.useRef)(!!x&&!(!((n=window.MotionHandoffIsComplete)===null||n===void 0)&&n.call(window,x))&&((s=window.MotionHasOptimisedAnimation)===null||s===void 0?void 0:s.call(window,x)));return Rd(()=>{f&&(v.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),Vs.render(f.render),C.current&&f.animationState&&f.animationState.animateChanges())}),(0,Vt.useEffect)(()=>{f&&(!C.current&&f.animationState&&f.animationState.animateChanges(),C.current&&(queueMicrotask(()=>{var g;(g=window.MotionHandoffMarkAsComplete)===null||g===void 0||g.call(window,x)}),C.current=!1))}),f}function p1(e,t,r,a){let{layoutId:o,layout:n,drag:s,dragConstraints:i,layoutScroll:l,layoutRoot:u}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:HC(e.parent)),e.projection.setOptions({layoutId:o,layout:n,alwaysMeasureLayout:!!s||i&&La(i),visualElement:e,animationType:typeof n=="string"?n:"both",initialPromotionConfig:a,layoutScroll:l,layoutRoot:u})}function HC(e){if(e)return e.options.allowProjection!==!1?e.projection:HC(e.parent)}function zC({preloadedFeatures:e,createVisualElement:t,useRender:r,useVisualState:a,Component:o}){var n,s;e&&AC(e);function i(u,c){let d,f={...(0,js.useContext)(Os),...u,layoutId:m1(u)},{isStatic:h}=f,v=BC(u),x=a(u,h);if(!h&&Bs){h1(f,e);let C=g1(f);d=C.MeasureLayout,v.visualElement=qC(o,x,f,t,C.ProjectionNode)}return(0,jd.jsxs)(po.Provider,{value:v,children:[d&&v.visualElement?(0,jd.jsx)(d,{visualElement:v.visualElement,...f}):null,r(o,u,VC(x,v.visualElement,c),x,h,v.visualElement)]})}i.displayName=`motion.${typeof o=="string"?o:`create(${(s=(n=o.displayName)!==null&&n!==void 0?n:o.name)!==null&&s!==void 0?s:""})`}`;let l=(0,js.forwardRef)(i);return l[FC]=o,l}function m1({layoutId:e}){let t=(0,js.useContext)(Ns).id;return t&&e!==void 0?t+"-"+e:e}function h1(e,t){let r=(0,js.useContext)(Md).strict}function g1(e){let{drag:t,layout:r}=Ca;if(!t&&!r)return{};let a={...t,...r};return{MeasureLayout:t?.isEnabled(e)||r?.isEnabled(e)?a.MeasureLayout:void 0,ProjectionNode:a.ProjectionNode}}var $C=["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 qs(e){return typeof e!="string"||e.includes("-")?!1:!!($C.indexOf(e)>-1||/[A-Z]/u.test(e))}var vg=O(Q(),1);function WC(e){let t=[{},{}];return e?.values.forEach((r,a)=>{t[0][a]=r.get(),t[1][a]=r.getVelocity()}),t}function Hs(e,t,r,a){if(typeof t=="function"){let[o,n]=WC(a);t=t(r!==void 0?r:e.custom,o,n)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){let[o,n]=WC(a);t=t(r!==void 0?r:e.custom,o,n)}return t}var eu=e=>Array.isArray(e);var GC=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),KC=e=>eu(e)?e[e.length-1]||0:e;var be=e=>!!(e&&e.getVelocity);function zs(e){let t=be(e)?e.get():e;return GC(t)?t.toValue():t}function y1({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:r},a,o,n){let s={latestValues:v1(a,o,n,e),renderState:t()};return r&&(s.onMount=i=>r({props:a,current:i,...s}),s.onUpdate=i=>r(i)),s}var qd=e=>(t,r)=>{let a=(0,vg.useContext)(po),o=(0,vg.useContext)(co),n=()=>y1(e,t,a,o);return r?n():Ms(n)};function v1(e,t,r,a){let o={},n=a(e,{});for(let f in n)o[f]=zs(n[f]);let{initial:s,animate:i}=e,l=yn(e),u=Bd(e);t&&u&&!l&&e.inherit!==!1&&(s===void 0&&(s=t.initial),i===void 0&&(i=t.animate));let c=r?r.initial===!1:!1;c=c||s===!1;let d=c?i:s;if(d&&typeof d!="boolean"&&!mo(d)){let f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){let v=Hs(e,f[h]);if(v){let{transitionEnd:x,transition:C,...g}=v;for(let p in g){let y=g[p];if(Array.isArray(y)){let b=c?y.length-1:0;y=y[b]}y!==null&&(o[p]=y)}for(let p in x)o[p]=x[p]}}}return o}var $r=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],jt=new Set($r);var XC=e=>t=>typeof t=="string"&&t.startsWith(e),Hd=XC("--"),x1=XC("var(--"),$s=e=>x1(e)?w1.test(e.split("/*")[0].trim()):!1,w1=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;var zd=(e,t)=>t&&typeof e=="number"?t.transform(e):e;var ft=(e,t,r)=>r>t?t:r<e?e:r;var Wr={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ia={...Wr,transform:e=>ft(0,1,e)},tu={...Wr,default:1};var ru=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Gr=ru("deg"),_t=ru("%"),z=ru("px"),JC=ru("vh"),QC=ru("vw"),xg={..._t,parse:e=>_t.parse(e)/100,transform:e=>_t.transform(e*100)};var YC={borderWidth:z,borderTopWidth:z,borderRightWidth:z,borderBottomWidth:z,borderLeftWidth:z,borderRadius:z,radius:z,borderTopLeftRadius:z,borderTopRightRadius:z,borderBottomRightRadius:z,borderBottomLeftRadius:z,width:z,maxWidth:z,height:z,maxHeight:z,top:z,right:z,bottom:z,left:z,padding:z,paddingTop:z,paddingRight:z,paddingBottom:z,paddingLeft:z,margin:z,marginTop:z,marginRight:z,marginBottom:z,marginLeft:z,backgroundPositionX:z,backgroundPositionY:z};var ZC={rotate:Gr,rotateX:Gr,rotateY:Gr,rotateZ:Gr,scale:tu,scaleX:tu,scaleY:tu,scaleZ:tu,skew:Gr,skewX:Gr,skewY:Gr,distance:z,translateX:z,translateY:z,translateZ:z,x:z,y:z,z,perspective:z,transformPerspective:z,opacity:Ia,originX:xg,originY:xg,originZ:z};var wg={...Wr,transform:Math.round};var Ws={...YC,...ZC,zIndex:wg,size:z,fillOpacity:Ia,strokeOpacity:Ia,numOctaves:wg};var S1={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},C1=$r.length;function eb(e,t,r){let a="",o=!0;for(let n=0;n<C1;n++){let s=$r[n],i=e[s];if(i===void 0)continue;let l=!0;if(typeof i=="number"?l=i===(s.startsWith("scale")?1:0):l=parseFloat(i)===0,!l||r){let u=zd(i,Ws[s]);if(!l){o=!1;let c=S1[s]||s;a+=`${c}(${u}) `}r&&(t[s]=u)}}return a=a.trim(),r?a=r(t,o?"":a):o&&(a="none"),a}function Gs(e,t,r){let{style:a,vars:o,transformOrigin:n}=e,s=!1,i=!1;for(let l in t){let u=t[l];if(jt.has(l)){s=!0;continue}else if(Hd(l)){o[l]=u;continue}else{let c=zd(u,Ws[l]);l.startsWith("origin")?(i=!0,n[l]=c):a[l]=c}}if(t.transform||(s||r?a.transform=eb(t,e.transform,r):a.transform&&(a.transform="none")),i){let{originX:l="50%",originY:u="50%",originZ:c=0}=n;a.transformOrigin=`${l} ${u} ${c}`}}var b1={offset:"stroke-dashoffset",array:"stroke-dasharray"},L1={offset:"strokeDashoffset",array:"strokeDasharray"};function tb(e,t,r=1,a=0,o=!0){e.pathLength=1;let n=o?b1:L1;e[n.offset]=z.transform(-a);let s=z.transform(t),i=z.transform(r);e[n.array]=`${s} ${i}`}function rb(e,t,r){return typeof e=="string"?e:z.transform(t+r*e)}function ab(e,t,r){let a=rb(t,e.x,e.width),o=rb(r,e.y,e.height);return`${a} ${o}`}function Ks(e,{attrX:t,attrY:r,attrScale:a,originX:o,originY:n,pathLength:s,pathSpacing:i=1,pathOffset:l=0,...u},c,d){if(Gs(e,u,d),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:f,style:h,dimensions:v}=e;f.transform&&(v&&(h.transform=f.transform),delete f.transform),v&&(o!==void 0||n!==void 0||h.transform)&&(h.transformOrigin=ab(v,o!==void 0?o:.5,n!==void 0?n:.5)),t!==void 0&&(f.x=t),r!==void 0&&(f.y=r),a!==void 0&&(f.scale=a),s!==void 0&&tb(f,s,i,l,!1)}var Xs=()=>({style:{},transform:{},transformOrigin:{},vars:{}});var $d=()=>({...Xs(),attrs:{}});var Js=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Wd(e,{style:t,vars:r},a,o){Object.assign(e.style,t,o&&o.getProjectionStyles(a));for(let n in r)e.style.setProperty(n,r[n])}var Gd=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 Kd(e,t,r,a){Wd(e,t,void 0,a);for(let o in t.attrs)e.setAttribute(Gd.has(o)?o:Us(o),t.attrs[o])}var Qs={};function ob(e){Object.assign(Qs,e)}function Xd(e,{layout:t,layoutId:r}){return jt.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!Qs[e]||e==="opacity")}function Ys(e,t,r){var a;let{style:o}=e,n={};for(let s in o)(be(o[s])||t.style&&be(t.style[s])||Xd(s,e)||((a=r?.getValue(s))===null||a===void 0?void 0:a.liveStyle)!==void 0)&&(n[s]=o[s]);return n}function Jd(e,t,r){let a=Ys(e,t,r);for(let o in e)if(be(e[o])||be(t[o])){let n=$r.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;a[n]=e[o]}return a}function I1(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}var nb=["x","y","width","height","cx","cy","r"],sb={useVisualState:qd({scrapeMotionValuesFromProps:Jd,createRenderState:$d,onUpdate:({props:e,prevProps:t,current:r,renderState:a,latestValues:o})=>{if(!r)return;let n=!!e.drag;if(!n){for(let i in o)if(jt.has(i)){n=!0;break}}if(!n)return;let s=!t;if(t)for(let i=0;i<nb.length;i++){let l=nb[i];e[l]!==t[l]&&(s=!0)}s&&re.read(()=>{I1(r,a),re.render(()=>{Ks(a,o,Js(r.tagName),e.transformTemplate),Kd(r,a)})})}})};var ib={useVisualState:qd({scrapeMotionValuesFromProps:Ys,createRenderState:Xs})};var Zs=O(Q(),1);var lb=O(Q(),1);function Sg(e,t,r){for(let a in t)!be(t[a])&&!Xd(a,r)&&(e[a]=t[a])}function k1({transformTemplate:e},t){return(0,lb.useMemo)(()=>{let r=Xs();return Gs(r,t,e),Object.assign({},r.vars,r.style)},[t])}function P1(e,t){let r=e.style||{},a={};return Sg(a,r,e),Object.assign(a,k1(e,t)),a}function ub(e,t){let r={},a=P1(e,t);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,a.userSelect=a.WebkitUserSelect=a.WebkitTouchCallout="none",a.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=a,r}var cb=O(Q(),1);function db(e,t,r,a){let o=(0,cb.useMemo)(()=>{let n=$d();return Ks(n,t,Js(a),e.transformTemplate),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let n={};Sg(n,e.style,e),o.style={...n,...o.style}}return o}function fb(e=!1){return(r,a,o,{latestValues:n},s)=>{let l=(qs(r)?db:ub)(a,n,s,r),u=EC(a,typeof r=="string",e),c=r!==Zs.Fragment?{...u,...l,ref:o}:{},{children:d}=a,f=(0,Zs.useMemo)(()=>be(d)?d.get():d,[d]);return(0,Zs.createElement)(r,{...c,children:f})}}function pb(e,t){return function(a,{forwardMotionProps:o}={forwardMotionProps:!1}){let s={...qs(a)?sb:ib,preloadedFeatures:e,useRender:fb(o),createVisualElement:t,Component:a};return zC(s)}}function Cg(e,t){if(!Array.isArray(t))return!1;let r=t.length;if(r!==e.length)return!1;for(let a=0;a<r;a++)if(t[a]!==e[a])return!1;return!0}function ho(e,t,r){let a=e.getProps();return Hs(a,t,r!==void 0?r:a.custom,e)}var bg=gn(()=>window.ScrollTimeline!==void 0);var au=class{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,r){for(let a=0;a<this.animations.length;a++)this.animations[a][t]=r}attachTimeline(t,r){let a=this.animations.map(o=>{if(bg()&&o.attachTimeline)return o.attachTimeline(t);if(typeof r=="function")return r(o)});return()=>{a.forEach((o,n)=>{o&&o(),this.animations[n].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let r=0;r<this.animations.length;r++)t=Math.max(t,this.animations[r].duration);return t}runAll(t){this.animations.forEach(r=>r[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}};var ou=class extends au{then(t,r){return Promise.all(this.animations).then(t).catch(r)}};function go(e,t){return e?e[t]||e.default||e:void 0}function ei(e){let t=0,r=50,a=e.next(t);for(;!a.done&&t<2e4;)t+=r,a=e.next(t);return t>=2e4?1/0:t}function yo(e){return typeof e=="function"}function nu(e,t){e.timeline=t,e.onfinish=null}var ti=e=>Array.isArray(e)&&typeof e[0]=="number";var Ig={linearEasing:void 0};function mb(e,t){let r=gn(e);return()=>{var a;return(a=Ig[t])!==null&&a!==void 0?a:r()}}var vo=mb(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");var su=(e,t,r=10)=>{let a="",o=Math.max(Math.round(t/r),2);for(let n=0;n<o;n++)a+=e(rr(0,o-1,n))+", ";return`linear(${a.substring(0,a.length-2)})`};function Yd(e){return!!(typeof e=="function"&&vo()||!e||typeof e=="string"&&(e in Qd||vo())||ti(e)||Array.isArray(e)&&e.every(Yd))}var ri=([e,t,r,a])=>`cubic-bezier(${e}, ${t}, ${r}, ${a})`,Qd={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ri([0,.65,.55,1]),circOut:ri([.55,0,1,.45]),backIn:ri([.31,.01,.66,-.59]),backOut:ri([.33,1.53,.69,.99])};function ai(e,t){if(e)return typeof e=="function"&&vo()?su(e,t):ti(e)?ri(e):Array.isArray(e)?e.map(r=>ai(r,t)||Qd.easeOut):Qd[e]}var or={x:!1,y:!1};function oi(){return or.x||or.y}function kg(e,t,r){var a;if(e instanceof Element)return[e];if(typeof e=="string"){let o=document;t&&(o=t.current);let n=(a=r?.[e])!==null&&a!==void 0?a:o.querySelectorAll(e);return n?Array.from(n):[]}return Array.from(e)}function Zd(e,t){let r=kg(e),a=new AbortController,o={passive:!0,...t,signal:a.signal};return[r,o,()=>a.abort()]}function hb(e){return t=>{t.pointerType==="touch"||oi()||e(t)}}function Pg(e,t,r={}){let[a,o,n]=Zd(e,r),s=hb(i=>{let{target:l}=i,u=t(i);if(typeof u!="function"||!l)return;let c=hb(d=>{u(d),l.removeEventListener("pointerleave",c)});l.addEventListener("pointerleave",c,o)});return a.forEach(i=>{i.addEventListener("pointerenter",s,o)}),n}var ef=(e,t)=>t?e===t?!0:ef(e,t.parentElement):!1;var vn=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;var T1=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function gb(e){return T1.has(e.tagName)||e.tabIndex!==-1}var xn=new WeakSet;function yb(e){return t=>{t.key==="Enter"&&e(t)}}function Tg(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}var vb=(e,t)=>{let r=e.currentTarget;if(!r)return;let a=yb(()=>{if(xn.has(r))return;Tg(r,"down");let o=yb(()=>{Tg(r,"up")}),n=()=>Tg(r,"cancel");r.addEventListener("keyup",o,t),r.addEventListener("blur",n,t)});r.addEventListener("keydown",a,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",a),t)};function xb(e){return vn(e)&&!oi()}function _g(e,t,r={}){let[a,o,n]=Zd(e,r),s=i=>{let l=i.currentTarget;if(!xb(i)||xn.has(l))return;xn.add(l);let u=t(i),c=(h,v)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),!(!xb(h)||!xn.has(l))&&(xn.delete(l),typeof u=="function"&&u(h,{success:v}))},d=h=>{c(h,r.useGlobalTarget||ef(l,h.target))},f=h=>{c(h,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",f,o)};return a.forEach(i=>{!gb(i)&&i.getAttribute("tabindex")===null&&(i.tabIndex=0),(r.useGlobalTarget?window:i).addEventListener("pointerdown",s,o),i.addEventListener("focus",u=>vb(u,o),o)}),n}function Ag(e){return e==="x"||e==="y"?or[e]?null:(or[e]=!0,()=>{or[e]=!1}):or.x||or.y?null:(or.x=or.y=!0,()=>{or.x=or.y=!1})}var tf=new Set(["width","height","top","left","right","bottom",...$r]);var rf;function A1(){rf=void 0}var Ct={now:()=>(rf===void 0&&Ct.set(He.isProcessing||Fs.useManualTiming?He.timestamp:performance.now()),rf),set:e=>{rf=e,queueMicrotask(A1)}};function ni(e,t){e.indexOf(t)===-1&&e.push(t)}function si(e,t){let r=e.indexOf(t);r>-1&&e.splice(r,1)}var xo=class{constructor(){this.subscriptions=[]}add(t){return ni(this.subscriptions,t),()=>si(this.subscriptions,t)}notify(t,r,a){let o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,r,a);else for(let n=0;n<o;n++){let s=this.subscriptions[n];s&&s(t,r,a)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};function af(e,t){return t?e*(1e3/t):0}var Sb=30,R1=e=>!isNaN(parseFloat(e)),Cb={current:void 0},Rg=class{constructor(t,r={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(a,o=!0)=>{let n=Ct.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(a),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=r.owner}setCurrent(t){this.current=t,this.updatedAt=Ct.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=R1(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,r){this.events[t]||(this.events[t]=new xo);let a=this.events[t].add(r);return t==="change"?()=>{a(),re.read(()=>{this.events.change.getSize()||this.stop()})}:a}clearListeners(){for(let t in this.events)this.events[t].clear()}attach(t,r){this.passiveEffect=t,this.stopPassiveEffect=r}set(t,r=!0){!r||!this.passiveEffect?this.updateAndNotify(t,r):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,r,a){this.set(r),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-a}jump(t,r=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return Cb.current&&Cb.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let t=Ct.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Sb)return 0;let r=Math.min(this.updatedAt-this.prevUpdatedAt,Sb);return af(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(t){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=t(r),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function ka(e,t){return new Rg(e,t)}function E1(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,ka(r))}function bb(e,t){let r=ho(e,t),{transitionEnd:a={},transition:o={},...n}=r||{};n={...n,...a};for(let s in n){let i=KC(n[s]);E1(e,s,i)}}function Lb(e){return!!(be(e)&&e.add)}function iu(e,t){let r=e.getValue("willChange");if(Lb(r))return r.add(t)}function of(e){return e.props[Ud]}var nf={current:!1};var Ib=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,D1=1e-7,N1=12;function M1(e,t,r,a,o){let n,s,i=0;do s=t+(r-t)/2,n=Ib(s,a,o)-e,n>0?r=s:t=s;while(Math.abs(n)>D1&&++i<N1);return s}function wo(e,t,r,a){if(e===t&&r===a)return ye;let o=n=>M1(n,0,1,e,r);return n=>n===0||n===1?n:Ib(o(n),t,a)}var sf=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2;var lf=e=>t=>1-e(1-t);var Eg=wo(.33,1.53,.69,.99),lu=lf(Eg),uf=sf(lu);var cf=e=>(e*=2)<1?.5*lu(e):.5*(2-Math.pow(2,-10*(e-1)));var df=e=>1-Math.sin(Math.acos(e)),ff=lf(df),pf=sf(df);var mf=e=>/^0[^.\s]+$/u.test(e);function kb(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||mf(e):!0}var So=e=>Math.round(e*1e5)/1e5;var ii=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Pb(e){return e==null}var Tb=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;var li=(e,t)=>r=>!!(typeof r=="string"&&Tb.test(r)&&r.startsWith(e)||t&&!Pb(r)&&Object.prototype.hasOwnProperty.call(r,t)),hf=(e,t,r)=>a=>{if(typeof a!="string")return a;let[o,n,s,i]=a.match(ii);return{[e]:parseFloat(o),[t]:parseFloat(n),[r]:parseFloat(s),alpha:i!==void 0?parseFloat(i):1}};var O1=e=>ft(0,255,e),Dg={...Wr,transform:e=>Math.round(O1(e))},Kr={test:li("rgb","red"),parse:hf("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:a=1})=>"rgba("+Dg.transform(e)+", "+Dg.transform(t)+", "+Dg.transform(r)+", "+So(Ia.transform(a))+")"};function B1(e){let t="",r="",a="",o="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),a=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),a=e.substring(3,4),o=e.substring(4,5),t+=t,r+=r,a+=a,o+=o),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(a,16),alpha:o?parseInt(o,16)/255:1}}var uu={test:li("#"),parse:B1,transform:Kr.transform};var Co={test:li("hsl","hue"),parse:hf("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:a=1})=>"hsla("+Math.round(e)+", "+_t.transform(So(t))+", "+_t.transform(So(r))+", "+So(Ia.transform(a))+")"};var Ge={test:e=>Kr.test(e)||uu.test(e)||Co.test(e),parse:e=>Kr.test(e)?Kr.parse(e):Co.test(e)?Co.parse(e):uu.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Kr.transform(e):Co.transform(e)};var _b=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function F1(e){var t,r;return isNaN(e)&&typeof e=="string"&&(((t=e.match(ii))===null||t===void 0?void 0:t.length)||0)+(((r=e.match(_b))===null||r===void 0?void 0:r.length)||0)>0}var Rb="number",Eb="color",U1="var",V1="var(",Ab="${}",j1=/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 wn(e){let t=e.toString(),r=[],a={color:[],number:[],var:[]},o=[],n=0,i=t.replace(j1,l=>(Ge.test(l)?(a.color.push(n),o.push(Eb),r.push(Ge.parse(l))):l.startsWith(V1)?(a.var.push(n),o.push(U1),r.push(l)):(a.number.push(n),o.push(Rb),r.push(parseFloat(l))),++n,Ab)).split(Ab);return{values:r,split:i,indexes:a,types:o}}function Db(e){return wn(e).values}function Nb(e){let{split:t,types:r}=wn(e),a=t.length;return o=>{let n="";for(let s=0;s<a;s++)if(n+=t[s],o[s]!==void 0){let i=r[s];i===Rb?n+=So(o[s]):i===Eb?n+=Ge.transform(o[s]):n+=o[s]}return n}}var q1=e=>typeof e=="number"?0:e;function H1(e){let t=Db(e);return Nb(e)(t.map(q1))}var At={test:F1,parse:Db,createTransformer:Nb,getAnimatableNone:H1};var z1=new Set(["brightness","contrast","saturate","opacity"]);function $1(e){let[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;let[a]=r.match(ii)||[];if(!a)return e;let o=r.replace(a,""),n=z1.has(t)?1:0;return a!==r&&(n*=100),t+"("+n+o+")"}var W1=/\b([a-z-]*)\(.*?\)/gu,cu={...At,getAnimatableNone:e=>{let t=e.match(W1);return t?t.map($1).join(" "):e}};var G1={...Ws,color:Ge,backgroundColor:Ge,outlineColor:Ge,fill:Ge,stroke:Ge,borderColor:Ge,borderTopColor:Ge,borderRightColor:Ge,borderBottomColor:Ge,borderLeftColor:Ge,filter:cu,WebkitFilter:cu},ui=e=>G1[e];function gf(e,t){let r=ui(e);return r!==cu&&(r=At),r.getAnimatableNone?r.getAnimatableNone(t):void 0}var K1=new Set(["auto","none","0"]);function Mb(e,t,r){let a=0,o;for(;a<e.length&&!o;){let n=e[a];typeof n=="string"&&!K1.has(n)&&wn(n).values.length&&(o=e[a]),a++}if(o&&r)for(let n of t)e[n]=gf(r,o)}var Ng=e=>e===Wr||e===z,Ob=(e,t)=>parseFloat(e.split(", ")[t]),Bb=(e,t)=>(r,{transform:a})=>{if(a==="none"||!a)return 0;let o=a.match(/^matrix3d\((.+)\)$/u);if(o)return Ob(o[1],t);{let n=a.match(/^matrix\((.+)\)$/u);return n?Ob(n[1],e):0}},X1=new Set(["x","y","z"]),J1=$r.filter(e=>!X1.has(e));function Fb(e){let t=[];return J1.forEach(r=>{let a=e.getValue(r);a!==void 0&&(t.push([r,a.get()]),a.set(r.startsWith("scale")?1:0))}),t}var Sn={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Bb(4,13),y:Bb(5,14)};Sn.translateX=Sn.x;Sn.translateY=Sn.y;var Cn=new Set,Mg=!1,Og=!1;function Ub(){if(Og){let e=Array.from(Cn).filter(a=>a.needsMeasurement),t=new Set(e.map(a=>a.element)),r=new Map;t.forEach(a=>{let o=Fb(a);o.length&&(r.set(a,o),a.render())}),e.forEach(a=>a.measureInitialState()),t.forEach(a=>{a.render();let o=r.get(a);o&&o.forEach(([n,s])=>{var i;(i=a.getValue(n))===null||i===void 0||i.set(s)})}),e.forEach(a=>a.measureEndState()),e.forEach(a=>{a.suspendedScrollY!==void 0&&window.scrollTo(0,a.suspendedScrollY)})}Og=!1,Mg=!1,Cn.forEach(e=>e.complete()),Cn.clear()}function Vb(){Cn.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Og=!0)})}function jb(){Vb(),Ub()}var bo=class{constructor(t,r,a,o,n,s=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=r,this.name=a,this.motionValue=o,this.element=n,this.isAsync=s}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Cn.add(this),Mg||(Mg=!0,re.read(Vb),re.resolveKeyframes(Ub))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:t,name:r,element:a,motionValue:o}=this;for(let n=0;n<t.length;n++)if(t[n]===null)if(n===0){let s=o?.get(),i=t[t.length-1];if(s!==void 0)t[0]=s;else if(a&&r){let l=a.readValue(r,i);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=i),o&&s===void 0&&o.set(t[0])}else t[n]=t[n-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Cn.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Cn.delete(this))}resume(){this.isComplete||this.scheduleResolve()}};var yf=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);var Q1=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Y1(e){let t=Q1.exec(e);if(!t)return[,];let[,r,a,o]=t;return[`--${r??a}`,o]}var Z1=4;function Bg(e,t,r=1){Er(r<=Z1,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);let[a,o]=Y1(e);if(!a)return;let n=window.getComputedStyle(t).getPropertyValue(a);if(n){let s=n.trim();return yf(s)?parseFloat(s):s}return $s(o)?Bg(o,t,r+1):o}var vf=e=>t=>t.test(e);var qb={test:e=>e==="auto",parse:e=>e};var Fg=[Wr,z,_t,Gr,QC,JC,qb],Ug=e=>Fg.find(vf(e));var ci=class extends bo{constructor(t,r,a,o,n){super(t,r,a,o,n,!0)}readKeyframes(){let{unresolvedKeyframes:t,element:r,name:a}=this;if(!r||!r.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let u=t[l];if(typeof u=="string"&&(u=u.trim(),$s(u))){let c=Bg(u,r.current);c!==void 0&&(t[l]=c),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!tf.has(a)||t.length!==2)return;let[o,n]=t,s=Ug(o),i=Ug(n);if(s!==i)if(Ng(s)&&Ng(i))for(let l=0;l<t.length;l++){let u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){let{unresolvedKeyframes:t,name:r}=this,a=[];for(let o=0;o<t.length;o++)kb(t[o])&&a.push(o);a.length&&Mb(t,a,r)}measureInitialState(){let{element:t,unresolvedKeyframes:r,name:a}=this;if(!t||!t.current)return;a==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Sn[a](t.measureViewportBox(),window.getComputedStyle(t.current)),r[0]=this.measuredOrigin;let o=r[r.length-1];o!==void 0&&t.getValue(a,o).jump(o,!1)}measureEndState(){var t;let{element:r,name:a,unresolvedKeyframes:o}=this;if(!r||!r.current)return;let n=r.getValue(a);n&&n.jump(this.measuredOrigin,!1);let s=o.length-1,i=o[s];o[s]=Sn[a](r.measureViewportBox(),window.getComputedStyle(r.current)),i!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=i),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,u])=>{r.getValue(l).set(u)}),this.resolveNoneKeyframes()}};var Vg=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(At.test(e)||e==="0")&&!e.startsWith("url("));function eE(e){let t=e[0];if(e.length===1)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}function Hb(e,t,r,a){let o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;let n=e[e.length-1],s=Vg(o,t),i=Vg(n,t);return Sa(s===i,`You are trying to animate ${t} from "${o}" to "${n}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${n} via the \`style\` property.`),!s||!i?!1:eE(e)||(r==="spring"||yo(r))&&a}var tE=e=>e!==null;function Lo(e,{repeat:t,repeatType:r="loop"},a){let o=e.filter(tE),n=t&&r!=="loop"&&t%2===1?0:o.length-1;return!n||a===void 0?o[n]:a}var rE=40,di=class{constructor({autoplay:t=!0,delay:r=0,type:a="keyframes",repeat:o=0,repeatDelay:n=0,repeatType:s="loop",...i}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Ct.now(),this.options={autoplay:t,delay:r,type:a,repeat:o,repeatDelay:n,repeatType:s,...i},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>rE?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&jb(),this._resolved}onKeyframesResolved(t,r){this.resolvedAt=Ct.now(),this.hasAttemptedResolve=!0;let{name:a,type:o,velocity:n,delay:s,onComplete:i,onUpdate:l,isGenerator:u}=this.options;if(!u&&!Hb(t,a,o,n))if(nf.current||!s){l&&l(Lo(t,this.options,r)),i&&i(),this.resolveFinishedPromise();return}else this.options.duration=0;let c=this.initPlayback(t,r);c!==!1&&(this._resolved={keyframes:t,finalKeyframe:r,...c},this.onPostResolved())}onPostResolved(){}then(t,r){return this.currentFinishedPromise.then(t,r)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}};var le=(e,t,r)=>e+(t-e)*r;function jg(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function zb({hue:e,saturation:t,lightness:r,alpha:a}){e/=360,t/=100,r/=100;let o=0,n=0,s=0;if(!t)o=n=s=r;else{let i=r<.5?r*(1+t):r+t-r*t,l=2*r-i;o=jg(l,i,e+1/3),n=jg(l,i,e),s=jg(l,i,e-1/3)}return{red:Math.round(o*255),green:Math.round(n*255),blue:Math.round(s*255),alpha:a}}function fi(e,t){return r=>r>0?t:e}var qg=(e,t,r)=>{let a=e*e,o=r*(t*t-a)+a;return o<0?0:Math.sqrt(o)},aE=[uu,Kr,Co],oE=e=>aE.find(t=>t.test(e));function $b(e){let t=oE(e);if(Sa(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let r=t.parse(e);return t===Co&&(r=zb(r)),r}var Hg=(e,t)=>{let r=$b(e),a=$b(t);if(!r||!a)return fi(e,t);let o={...r};return n=>(o.red=qg(r.red,a.red,n),o.green=qg(r.green,a.green,n),o.blue=qg(r.blue,a.blue,n),o.alpha=le(r.alpha,a.alpha,n),Kr.transform(o))};var nE=(e,t)=>r=>t(e(r)),Xr=(...e)=>e.reduce(nE);var xf=new Set(["none","hidden"]);function Wb(e,t){return xf.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function sE(e,t){return r=>le(e,t,r)}function wf(e){return typeof e=="number"?sE:typeof e=="string"?$s(e)?fi:Ge.test(e)?Hg:uE:Array.isArray(e)?Gb:typeof e=="object"?Ge.test(e)?Hg:iE:fi}function Gb(e,t){let r=[...e],a=r.length,o=e.map((n,s)=>wf(n)(n,t[s]));return n=>{for(let s=0;s<a;s++)r[s]=o[s](n);return r}}function iE(e,t){let r={...e,...t},a={};for(let o in r)e[o]!==void 0&&t[o]!==void 0&&(a[o]=wf(e[o])(e[o],t[o]));return o=>{for(let n in a)r[n]=a[n](o);return r}}function lE(e,t){var r;let a=[],o={color:0,var:0,number:0};for(let n=0;n<t.values.length;n++){let s=t.types[n],i=e.indexes[s][o[s]],l=(r=e.values[i])!==null&&r!==void 0?r:0;a[n]=l,o[s]++}return a}var uE=(e,t)=>{let r=At.createTransformer(t),a=wn(e),o=wn(t);return a.indexes.var.length===o.indexes.var.length&&a.indexes.color.length===o.indexes.color.length&&a.indexes.number.length>=o.indexes.number.length?xf.has(e)&&!o.values.length||xf.has(t)&&!a.values.length?Wb(e,t):Xr(Gb(lE(a,o),o.values),r):(Sa(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),fi(e,t))};function Sf(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?le(e,t,r):wf(e)(e,t)}var cE=5;function Cf(e,t,r){let a=Math.max(t-cE,0);return af(r-e(a),t-a)}var Te={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};var zg=.001;function Kb({duration:e=Te.duration,bounce:t=Te.bounce,velocity:r=Te.velocity,mass:a=Te.mass}){let o,n;Sa(e<=qe(Te.maxDuration),"Spring duration must be 10 seconds or less");let s=1-t;s=ft(Te.minDamping,Te.maxDamping,s),e=ft(Te.minDuration,Te.maxDuration,dt(e)),s<1?(o=u=>{let c=u*s,d=c*e,f=c-r,h=bf(u,s),v=Math.exp(-d);return zg-f/h*v},n=u=>{let d=u*s*e,f=d*r+r,h=Math.pow(s,2)*Math.pow(u,2)*e,v=Math.exp(-d),x=bf(Math.pow(u,2),s);return(-o(u)+zg>0?-1:1)*((f-h)*v)/x}):(o=u=>{let c=Math.exp(-u*e),d=(u-r)*e+1;return-zg+c*d},n=u=>{let c=Math.exp(-u*e),d=(r-u)*(e*e);return c*d});let i=5/e,l=fE(o,n,i);if(e=qe(e),isNaN(l))return{stiffness:Te.stiffness,damping:Te.damping,duration:e};{let u=Math.pow(l,2)*a;return{stiffness:u,damping:s*2*Math.sqrt(a*u),duration:e}}}var dE=12;function fE(e,t,r){let a=r;for(let o=1;o<dE;o++)a=a-e(a)/t(a);return a}function bf(e,t){return e*Math.sqrt(1-t*t)}var pE=["duration","bounce"],mE=["stiffness","damping","mass"];function Xb(e,t){return t.some(r=>e[r]!==void 0)}function hE(e){let t={velocity:Te.velocity,stiffness:Te.stiffness,damping:Te.damping,mass:Te.mass,isResolvedFromDuration:!1,...e};if(!Xb(e,mE)&&Xb(e,pE))if(e.visualDuration){let r=e.visualDuration,a=2*Math.PI/(r*1.2),o=a*a,n=2*ft(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:Te.mass,stiffness:o,damping:n}}else{let r=Kb(e);t={...t,...r,mass:Te.mass},t.isResolvedFromDuration=!0}return t}function Lf(e=Te.visualDuration,t=Te.bounce){let r=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e,{restSpeed:a,restDelta:o}=r,n=r.keyframes[0],s=r.keyframes[r.keyframes.length-1],i={done:!1,value:n},{stiffness:l,damping:u,mass:c,duration:d,velocity:f,isResolvedFromDuration:h}=hE({...r,velocity:-dt(r.velocity||0)}),v=f||0,x=u/(2*Math.sqrt(l*c)),C=s-n,g=dt(Math.sqrt(l/c)),p=Math.abs(C)<5;a||(a=p?Te.restSpeed.granular:Te.restSpeed.default),o||(o=p?Te.restDelta.granular:Te.restDelta.default);let y;if(x<1){let L=bf(g,x);y=P=>{let T=Math.exp(-x*g*P);return s-T*((v+x*g*C)/L*Math.sin(L*P)+C*Math.cos(L*P))}}else if(x===1)y=L=>s-Math.exp(-g*L)*(C+(v+g*C)*L);else{let L=g*Math.sqrt(x*x-1);y=P=>{let T=Math.exp(-x*g*P),A=Math.min(L*P,300);return s-T*((v+x*g*C)*Math.sinh(A)+L*C*Math.cosh(A))/L}}let b={calculatedDuration:h&&d||null,next:L=>{let P=y(L);if(h)i.done=L>=d;else{let T=0;x<1&&(T=L===0?qe(v):Cf(y,L,P));let A=Math.abs(T)<=a,N=Math.abs(s-P)<=o;i.done=A&&N}return i.value=i.done?s:P,i},toString:()=>{let L=Math.min(ei(b),2e4),P=su(T=>b.next(L*T).value,L,30);return L+"ms "+P}};return b}function $g({keyframes:e,velocity:t=0,power:r=.8,timeConstant:a=325,bounceDamping:o=10,bounceStiffness:n=500,modifyTarget:s,min:i,max:l,restDelta:u=.5,restSpeed:c}){let d=e[0],f={done:!1,value:d},h=A=>i!==void 0&&A<i||l!==void 0&&A>l,v=A=>i===void 0?l:l===void 0||Math.abs(i-A)<Math.abs(l-A)?i:l,x=r*t,C=d+x,g=s===void 0?C:s(C);g!==C&&(x=g-d);let p=A=>-x*Math.exp(-A/a),y=A=>g+p(A),b=A=>{let N=p(A),j=y(A);f.done=Math.abs(N)<=u,f.value=f.done?g:j},L,P,T=A=>{h(f.value)&&(L=A,P=Lf({keyframes:[f.value,v(f.value)],velocity:Cf(y,A,f.value),damping:o,stiffness:n,restDelta:u,restSpeed:c}))};return T(0),{calculatedDuration:null,next:A=>{let N=!1;return!P&&L===void 0&&(N=!0,b(A),T(A)),L!==void 0&&A>=L?P.next(A-L):(!N&&b(A),f)}}}var Jb=wo(.42,0,1,1),Qb=wo(0,0,.58,1),If=wo(.42,0,.58,1);var Yb=e=>Array.isArray(e)&&typeof e[0]!="number";var Zb={linear:ye,easeIn:Jb,easeInOut:If,easeOut:Qb,circIn:df,circInOut:pf,circOut:ff,backIn:lu,backInOut:uf,backOut:Eg,anticipate:cf},Wg=e=>{if(ti(e)){Er(e.length===4,"Cubic bezier arrays must contain four numerical values.");let[t,r,a,o]=e;return wo(t,r,a,o)}else if(typeof e=="string")return Er(Zb[e]!==void 0,`Invalid easing type '${e}'`),Zb[e];return e};function gE(e,t,r){let a=[],o=r||Sf,n=e.length-1;for(let s=0;s<n;s++){let i=o(e[s],e[s+1]);if(t){let l=Array.isArray(t)?t[s]||ye:t;i=Xr(l,i)}a.push(i)}return a}function eL(e,t,{clamp:r=!0,ease:a,mixer:o}={}){let n=e.length;if(Er(n===t.length,"Both input and output ranges must be the same length"),n===1)return()=>t[0];if(n===2&&t[0]===t[1])return()=>t[1];let s=e[0]===e[1];e[0]>e[n-1]&&(e=[...e].reverse(),t=[...t].reverse());let i=gE(t,a,o),l=i.length,u=c=>{if(s&&c<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(c<e[d+1]);d++);let f=rr(e[d],e[d+1],c);return i[d](f)};return r?c=>u(ft(e[0],e[n-1],c)):u}function tL(e,t){let r=e[e.length-1];for(let a=1;a<=t;a++){let o=rr(0,t,a);e.push(le(r,1,o))}}function rL(e){let t=[0];return tL(t,e.length-1),t}function aL(e,t){return e.map(r=>r*t)}function yE(e,t){return e.map(()=>t||If).splice(0,e.length-1)}function du({duration:e=300,keyframes:t,times:r,ease:a="easeInOut"}){let o=Yb(a)?a.map(Wg):Wg(a),n={done:!1,value:t[0]},s=aL(r&&r.length===t.length?r:rL(t),e),i=eL(s,t,{ease:Array.isArray(o)?o:yE(t,o)});return{calculatedDuration:e,next:l=>(n.value=i(l),n.done=l>=e,n)}}var oL=e=>{let t=({timestamp:r})=>e(r);return{start:()=>re.update(t,!0),stop:()=>ar(t),now:()=>He.isProcessing?He.timestamp:Ct.now()}};var vE={decay:$g,inertia:$g,tween:du,keyframes:du,spring:Lf},xE=e=>e/100,bn=class extends di{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();let{onStop:l}=this.options;l&&l()};let{name:r,motionValue:a,element:o,keyframes:n}=this.options,s=o?.KeyframeResolver||bo,i=(l,u)=>this.onKeyframesResolved(l,u);this.resolver=new s(n,i,r,a,o),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){let{type:r="keyframes",repeat:a=0,repeatDelay:o=0,repeatType:n,velocity:s=0}=this.options,i=yo(r)?r:vE[r]||du,l,u;i!==du&&typeof t[0]!="number"&&(l=Xr(xE,Sf(t[0],t[1])),t=[0,100]);let c=i({...this.options,keyframes:t});n==="mirror"&&(u=i({...this.options,keyframes:[...t].reverse(),velocity:-s})),c.calculatedDuration===null&&(c.calculatedDuration=ei(c));let{calculatedDuration:d}=c,f=d+o,h=f*(a+1)-o;return{generator:c,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:f,totalDuration:h}}onPostResolved(){let{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,r=!1){let{resolved:a}=this;if(!a){let{keyframes:A}=this.options;return{done:!0,value:A[A.length-1]}}let{finalKeyframe:o,generator:n,mirroredGenerator:s,mapPercentToKeyframes:i,keyframes:l,calculatedDuration:u,totalDuration:c,resolvedDuration:d}=a;if(this.startTime===null)return n.next(0);let{delay:f,repeat:h,repeatType:v,repeatDelay:x,onUpdate:C}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-c/this.speed,this.startTime)),r?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;let g=this.currentTime-f*(this.speed>=0?1:-1),p=this.speed>=0?g<0:g>c;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let y=this.currentTime,b=n;if(h){let A=Math.min(this.currentTime,c)/d,N=Math.floor(A),j=A%1;!j&&A>=1&&(j=1),j===1&&N--,N=Math.min(N,h+1),N%2&&(v==="reverse"?(j=1-j,x&&(j-=x/d)):v==="mirror"&&(b=s)),y=ft(0,1,j)*d}let L=p?{done:!1,value:l[0]}:b.next(y);i&&(L.value=i(L.value));let{done:P}=L;!p&&u!==null&&(P=this.speed>=0?this.currentTime>=c:this.currentTime<=0);let T=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&P);return T&&o!==void 0&&(L.value=Lo(l,this.options,o)),C&&C(L.value),T&&this.finish(),L}get duration(){let{resolved:t}=this;return t?dt(t.calculatedDuration):0}get time(){return dt(this.currentTime)}set time(t){t=qe(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){let r=this.playbackSpeed!==t;this.playbackSpeed=t,r&&(this.time=dt(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;let{driver:t=oL,onPlay:r,startTime:a}=this.options;this.driver||(this.driver=t(n=>this.tick(n))),r&&r();let o=this.driver.now();this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=o):this.startTime=a??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";let{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}};var nL=new Set(["opacity","clipPath","filter","transform"]);function sL(e,t,r,{delay:a=0,duration:o=300,repeat:n=0,repeatType:s="loop",ease:i="easeInOut",times:l}={}){let u={[t]:r};l&&(u.offset=l);let c=ai(i,o);return Array.isArray(c)&&(u.easing=c),e.animate(u,{delay:a,duration:o,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:n+1,direction:s==="reverse"?"alternate":"normal"})}var iL=gn(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));var kf=10,wE=2e4;function SE(e){return yo(e.type)||e.type==="spring"||!Yd(e.ease)}function CE(e,t){let r=new bn({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0}),a={done:!1,value:e[0]},o=[],n=0;for(;!a.done&&n<wE;)a=r.sample(n),o.push(a.value),n+=kf;return{times:void 0,keyframes:o,duration:n-kf,ease:"linear"}}var lL={anticipate:cf,backInOut:uf,circInOut:pf};function bE(e){return e in lL}var fu=class extends di{constructor(t){super(t);let{name:r,motionValue:a,element:o,keyframes:n}=this.options;this.resolver=new ci(n,(s,i)=>this.onKeyframesResolved(s,i),r,a,o),this.resolver.scheduleResolve()}initPlayback(t,r){let{duration:a=300,times:o,ease:n,type:s,motionValue:i,name:l,startTime:u}=this.options;if(!i.owner||!i.owner.current)return!1;if(typeof n=="string"&&vo()&&bE(n)&&(n=lL[n]),SE(this.options)){let{onComplete:d,onUpdate:f,motionValue:h,element:v,...x}=this.options,C=CE(t,x);t=C.keyframes,t.length===1&&(t[1]=t[0]),a=C.duration,o=C.times,n=C.ease,s="keyframes"}let c=sL(i.owner.current,l,t,{...this.options,duration:a,times:o,ease:n});return c.startTime=u??this.calcStartTime(),this.pendingTimeline?(nu(c,this.pendingTimeline),this.pendingTimeline=void 0):c.onfinish=()=>{let{onComplete:d}=this.options;i.set(Lo(t,this.options,r)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:a,times:o,type:s,ease:n,keyframes:t}}get duration(){let{resolved:t}=this;if(!t)return 0;let{duration:r}=t;return dt(r)}get time(){let{resolved:t}=this;if(!t)return 0;let{animation:r}=t;return dt(r.currentTime||0)}set time(t){let{resolved:r}=this;if(!r)return;let{animation:a}=r;a.currentTime=qe(t)}get speed(){let{resolved:t}=this;if(!t)return 1;let{animation:r}=t;return r.playbackRate}set speed(t){let{resolved:r}=this;if(!r)return;let{animation:a}=r;a.playbackRate=t}get state(){let{resolved:t}=this;if(!t)return"idle";let{animation:r}=t;return r.playState}get startTime(){let{resolved:t}=this;if(!t)return null;let{animation:r}=t;return r.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{let{resolved:r}=this;if(!r)return ye;let{animation:a}=r;nu(a,t)}return ye}play(){if(this.isStopped)return;let{resolved:t}=this;if(!t)return;let{animation:r}=t;r.playState==="finished"&&this.updateFinishedPromise(),r.play()}pause(){let{resolved:t}=this;if(!t)return;let{animation:r}=t;r.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();let{resolved:t}=this;if(!t)return;let{animation:r,keyframes:a,duration:o,type:n,ease:s,times:i}=t;if(r.playState==="idle"||r.playState==="finished")return;if(this.time){let{motionValue:u,onUpdate:c,onComplete:d,element:f,...h}=this.options,v=new bn({...h,keyframes:a,duration:o,type:n,ease:s,times:i,isGenerator:!0}),x=qe(this.time);u.setWithVelocity(v.sample(x-kf).value,v.sample(x).value,kf)}let{onStop:l}=this.options;l&&l(),this.cancel()}complete(){let{resolved:t}=this;t&&t.animation.finish()}cancel(){let{resolved:t}=this;t&&t.animation.cancel()}static supports(t){let{motionValue:r,name:a,repeatDelay:o,repeatType:n,damping:s,type:i}=t;if(!r||!r.owner||!(r.owner.current instanceof HTMLElement))return!1;let{onUpdate:l,transformTemplate:u}=r.owner.getProps();return iL()&&a&&nL.has(a)&&!l&&!u&&!o&&n!=="mirror"&&s!==0&&i!=="inertia"}};var LE={type:"spring",stiffness:500,damping:25,restSpeed:10},IE=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),kE={type:"keyframes",duration:.8},PE={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},uL=(e,{keyframes:t})=>t.length>2?kE:jt.has(e)?e.startsWith("scale")?IE(t[1]):LE:PE;function cL({when:e,delay:t,delayChildren:r,staggerChildren:a,staggerDirection:o,repeat:n,repeatType:s,repeatDelay:i,from:l,elapsed:u,...c}){return!!Object.keys(c).length}var pi=(e,t,r,a={},o,n)=>s=>{let i=go(a,e)||{},l=i.delay||a.delay||0,{elapsed:u=0}=a;u=u-qe(l);let c={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...i,delay:-u,onUpdate:f=>{t.set(f),i.onUpdate&&i.onUpdate(f)},onComplete:()=>{s(),i.onComplete&&i.onComplete()},name:e,motionValue:t,element:n?void 0:o};cL(i)||(c={...c,...uL(e,c)}),c.duration&&(c.duration=qe(c.duration)),c.repeatDelay&&(c.repeatDelay=qe(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(c.duration=0,c.delay===0&&(d=!0)),(nf.current||Fs.skipAnimations)&&(d=!0,c.duration=0,c.delay=0),d&&!n&&t.get()!==void 0){let f=Lo(c.keyframes,i);if(f!==void 0)return re.update(()=>{c.onUpdate(f),c.onComplete()}),new ou([])}return!n&&fu.supports(c)?new fu(c):new bn(c)};function TE({protectedKeys:e,needsAnimating:t},r){let a=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,a}function Pf(e,t,{delay:r=0,transitionOverride:a,type:o}={}){var n;let{transition:s=e.getDefaultTransition(),transitionEnd:i,...l}=t;a&&(s=a);let u=[],c=o&&e.animationState&&e.animationState.getState()[o];for(let d in l){let f=e.getValue(d,(n=e.latestValues[d])!==null&&n!==void 0?n:null),h=l[d];if(h===void 0||c&&TE(c,d))continue;let v={delay:r,...go(s||{},d)},x=!1;if(window.MotionHandoffAnimation){let g=of(e);if(g){let p=window.MotionHandoffAnimation(g,d,re);p!==null&&(v.startTime=p,x=!0)}}iu(e,d),f.start(pi(d,f,h,e.shouldReduceMotion&&tf.has(d)?{type:!1}:v,e,x));let C=f.animation;C&&u.push(C)}return i&&Promise.all(u).then(()=>{re.update(()=>{i&&bb(e,i)})}),u}function Tf(e,t,r={}){var a;let o=ho(e,t,r.type==="exit"?(a=e.presenceContext)===null||a===void 0?void 0:a.custom:void 0),{transition:n=e.getDefaultTransition()||{}}=o||{};r.transitionOverride&&(n=r.transitionOverride);let s=o?()=>Promise.all(Pf(e,o,r)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(u=0)=>{let{delayChildren:c=0,staggerChildren:d,staggerDirection:f}=n;return _E(e,t,c+u,d,f,r)}:()=>Promise.resolve(),{when:l}=n;if(l){let[u,c]=l==="beforeChildren"?[s,i]:[i,s];return u().then(()=>c())}else return Promise.all([s(),i(r.delay)])}function _E(e,t,r=0,a=0,o=1,n){let s=[],i=(e.variantChildren.size-1)*a,l=o===1?(u=0)=>u*a:(u=0)=>i-u*a;return Array.from(e.variantChildren).sort(AE).forEach((u,c)=>{u.notify("AnimationStart",t),s.push(Tf(u,t,{...n,delay:r+l(c)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(s)}function AE(e,t){return e.sortNodePosition(t)}function dL(e,t,r={}){e.notify("AnimationStart",t);let a;if(Array.isArray(t)){let o=t.map(n=>Tf(e,n,r));a=Promise.all(o)}else if(typeof t=="string")a=Tf(e,t,r);else{let o=typeof t=="function"?ho(e,t,r.custom):t;a=Promise.all(Pf(e,o,r))}return a.then(()=>{e.notify("AnimationComplete",t)})}var RE=Zl.length;function Gg(e){if(!e)return;if(!e.isControllingVariants){let r=e.parent?Gg(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}let t={};for(let r=0;r<RE;r++){let a=Zl[r],o=e.props[a];(ba(o)||o===!1)&&(t[a]=o)}return t}var EE=[...Od].reverse(),DE=Od.length;function NE(e){return t=>Promise.all(t.map(({animation:r,options:a})=>dL(e,r,a)))}function pL(e){let t=NE(e),r=fL(),a=!0,o=l=>(u,c)=>{var d;let f=ho(e,c,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){let{transition:h,transitionEnd:v,...x}=f;u={...u,...x,...v}}return u};function n(l){t=l(e)}function s(l){let{props:u}=e,c=Gg(e.parent)||{},d=[],f=new Set,h={},v=1/0;for(let C=0;C<DE;C++){let g=EE[C],p=r[g],y=u[g]!==void 0?u[g]:c[g],b=ba(y),L=g===l?p.isActive:null;L===!1&&(v=C);let P=y===c[g]&&y!==u[g]&&b;if(P&&a&&e.manuallyAnimateOnMount&&(P=!1),p.protectedKeys={...h},!p.isActive&&L===null||!y&&!p.prevProp||mo(y)||typeof y=="boolean")continue;let T=ME(p.prevProp,y),A=T||g===l&&p.isActive&&!P&&b||C>v&&b,N=!1,j=Array.isArray(y)?y:[y],pe=j.reduce(o(g),{});L===!1&&(pe={});let{prevResolvedValues:ee={}}=p,ir={...ee,...pe},zt=ve=>{A=!0,f.has(ve)&&(N=!0,f.delete(ve)),p.needsAnimating[ve]=!0;let Ye=e.getValue(ve);Ye&&(Ye.liveStyle=!1)};for(let ve in ir){let Ye=pe[ve],mt=ee[ve];if(h.hasOwnProperty(ve))continue;let Aa=!1;eu(Ye)&&eu(mt)?Aa=!Cg(Ye,mt):Aa=Ye!==mt,Aa?Ye!=null?zt(ve):f.add(ve):Ye!==void 0&&f.has(ve)?zt(ve):p.protectedKeys[ve]=!0}p.prevProp=y,p.prevResolvedValues=pe,p.isActive&&(h={...h,...pe}),a&&e.blockInitialAnimation&&(A=!1),A&&(!(P&&T)||N)&&d.push(...j.map(ve=>({animation:ve,options:{type:g}})))}if(f.size){let C={};f.forEach(g=>{let p=e.getBaseTarget(g),y=e.getValue(g);y&&(y.liveStyle=!0),C[g]=p??null}),d.push({animation:C})}let x=!!d.length;return a&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(x=!1),a=!1,x?t(d):Promise.resolve()}function i(l,u){var c;if(r[l].isActive===u)return Promise.resolve();(c=e.variantChildren)===null||c===void 0||c.forEach(f=>{var h;return(h=f.animationState)===null||h===void 0?void 0:h.setActive(l,u)}),r[l].isActive=u;let d=s(l);for(let f in r)r[f].protectedKeys={};return d}return{animateChanges:s,setActive:i,setAnimateFunction:n,getState:()=>r,reset:()=>{r=fL(),a=!0}}}function ME(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Cg(t,e):!1}function Ln(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function fL(){return{animate:Ln(!0),whileInView:Ln(),whileHover:Ln(),whileTap:Ln(),whileDrag:Ln(),whileFocus:Ln(),exit:Ln()}}var st=class{constructor(t){this.isMounted=!1,this.node=t}update(){}};var _f=class extends st{constructor(t){super(t),t.animationState||(t.animationState=pL(t))}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();mo(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:t}=this.node.getProps(),{animate:r}=this.node.prevProps||{};t!==r&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}};var OE=0,Af=class extends st{constructor(){super(...arguments),this.id=OE++}update(){if(!this.node.presenceContext)return;let{isPresent:t,onExitComplete:r}=this.node.presenceContext,{isPresent:a}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===a)return;let o=this.node.animationState.setActive("exit",!t);r&&!t&&o.then(()=>r(this.id))}mount(){let{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}};var mL={animation:{Feature:_f},exit:{Feature:Af}};function Pa(e,t,r,a={passive:!0}){return e.addEventListener(t,r,a),()=>e.removeEventListener(t,r)}function Ta(e){return{point:{x:e.pageX,y:e.pageY}}}var hL=e=>t=>vn(t)&&e(t,Ta(t));function Io(e,t,r,a){return Pa(e,t,hL(r),a)}var gL=(e,t)=>Math.abs(e-t);function yL(e,t){let r=gL(e.x,t.x),a=gL(e.y,t.y);return Math.sqrt(r**2+a**2)}var mi=class{constructor(t,r,{transformPagePoint:a,contextWindow:o,dragSnapToOrigin:n=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let d=Xg(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,h=yL(d.offset,{x:0,y:0})>=3;if(!f&&!h)return;let{point:v}=d,{timestamp:x}=He;this.history.push({...v,timestamp:x});let{onStart:C,onMove:g}=this.handlers;f||(C&&C(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Kg(f,this.transformPagePoint),re.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();let{onEnd:h,onSessionEnd:v,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let C=Xg(d.type==="pointercancel"?this.lastMoveEventInfo:Kg(f,this.transformPagePoint),this.history);this.startEvent&&h&&h(d,C),v&&v(d,C)},!vn(t))return;this.dragSnapToOrigin=n,this.handlers=r,this.transformPagePoint=a,this.contextWindow=o||window;let s=Ta(t),i=Kg(s,this.transformPagePoint),{point:l}=i,{timestamp:u}=He;this.history=[{...l,timestamp:u}];let{onSessionStart:c}=r;c&&c(t,Xg(i,this.history)),this.removeListeners=Xr(Io(this.contextWindow,"pointermove",this.handlePointerMove),Io(this.contextWindow,"pointerup",this.handlePointerUp),Io(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ar(this.updatePoint)}};function Kg(e,t){return t?{point:t(e.point)}:e}function vL(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Xg({point:e},t){return{point:e,delta:vL(e,xL(t)),offset:vL(e,BE(t)),velocity:FE(t,.1)}}function BE(e){return e[0]}function xL(e){return e[e.length-1]}function FE(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,a=null,o=xL(e);for(;r>=0&&(a=e[r],!(o.timestamp-a.timestamp>qe(t)));)r--;if(!a)return{x:0,y:0};let n=dt(o.timestamp-a.timestamp);if(n===0)return{x:0,y:0};let s={x:(o.x-a.x)/n,y:(o.y-a.y)/n};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}var bL=1e-4,UE=1-bL,VE=1+bL,LL=.01,jE=0-LL,qE=0+LL;function pt(e){return e.max-e.min}function IL(e,t,r){return Math.abs(e-t)<=r}function wL(e,t,r,a=.5){e.origin=a,e.originPoint=le(t.min,t.max,e.origin),e.scale=pt(r)/pt(t),e.translate=le(r.min,r.max,e.origin)-e.originPoint,(e.scale>=UE&&e.scale<=VE||isNaN(e.scale))&&(e.scale=1),(e.translate>=jE&&e.translate<=qE||isNaN(e.translate))&&(e.translate=0)}function hi(e,t,r,a){wL(e.x,t.x,r.x,a?a.originX:void 0),wL(e.y,t.y,r.y,a?a.originY:void 0)}function SL(e,t,r){e.min=r.min+t.min,e.max=e.min+pt(t)}function kL(e,t,r){SL(e.x,t.x,r.x),SL(e.y,t.y,r.y)}function CL(e,t,r){e.min=t.min-r.min,e.max=e.min+pt(t)}function gi(e,t,r){CL(e.x,t.x,r.x),CL(e.y,t.y,r.y)}function RL(e,{min:t,max:r},a){return t!==void 0&&e<t?e=a?le(t,e,a.min):Math.max(e,t):r!==void 0&&e>r&&(e=a?le(r,e,a.max):Math.min(e,r)),e}function PL(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function EL(e,{top:t,left:r,bottom:a,right:o}){return{x:PL(e.x,r,o),y:PL(e.y,t,a)}}function TL(e,t){let r=t.min-e.min,a=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,a]=[a,r]),{min:r,max:a}}function DL(e,t){return{x:TL(e.x,t.x),y:TL(e.y,t.y)}}function NL(e,t){let r=.5,a=pt(e),o=pt(t);return o>a?r=rr(t.min,t.max-a,e.min):a>o&&(r=rr(e.min,e.max-o,t.min)),ft(0,1,r)}function ML(e,t){let r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}var Rf=.35;function OL(e=Rf){return e===!1?e=0:e===!0&&(e=Rf),{x:_L(e,"left","right"),y:_L(e,"top","bottom")}}function _L(e,t,r){return{min:AL(e,t),max:AL(e,r)}}function AL(e,t){return typeof e=="number"?e:e[t]||0}var BL=()=>({translate:0,scale:1,origin:0,originPoint:0}),In=()=>({x:BL(),y:BL()}),FL=()=>({min:0,max:0}),_e=()=>({x:FL(),y:FL()});function qt(e){return[e("x"),e("y")]}function Ef({top:e,left:t,right:r,bottom:a}){return{x:{min:t,max:r},y:{min:e,max:a}}}function UL({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function VL(e,t){if(!t)return e;let r=t({x:e.left,y:e.top}),a=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:a.y,right:a.x}}function Jg(e){return e===void 0||e===1}function Df({scale:e,scaleX:t,scaleY:r}){return!Jg(e)||!Jg(t)||!Jg(r)}function _a(e){return Df(e)||Qg(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Qg(e){return jL(e.x)||jL(e.y)}function jL(e){return e&&e!=="0%"}function pu(e,t,r){let a=e-r,o=t*a;return r+o}function qL(e,t,r,a,o){return o!==void 0&&(e=pu(e,o,a)),pu(e,r,a)+t}function Yg(e,t=0,r=1,a,o){e.min=qL(e.min,t,r,a,o),e.max=qL(e.max,t,r,a,o)}function Zg(e,{x:t,y:r}){Yg(e.x,t.translate,t.scale,t.originPoint),Yg(e.y,r.translate,r.scale,r.originPoint)}var HL=.999999999999,zL=1.0000000000001;function WL(e,t,r,a=!1){let o=r.length;if(!o)return;t.x=t.y=1;let n,s;for(let i=0;i<o;i++){n=r[i],s=n.projectionDelta;let{visualElement:l}=n.options;l&&l.props.style&&l.props.style.display==="contents"||(a&&n.options.layoutScroll&&n.scroll&&n!==n.root&&kn(e,{x:-n.scroll.offset.x,y:-n.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,Zg(e,s)),a&&_a(n.latestValues)&&kn(e,n.latestValues))}t.x<zL&&t.x>HL&&(t.x=1),t.y<zL&&t.y>HL&&(t.y=1)}function ko(e,t){e.min=e.min+t,e.max=e.max+t}function $L(e,t,r,a,o=.5){let n=le(e.min,e.max,o);Yg(e,t,r,n,a)}function kn(e,t){$L(e.x,t.x,t.scaleX,t.scale,t.originX),$L(e.y,t.y,t.scaleY,t.scale,t.originY)}function ey(e,t){return Ef(VL(e.getBoundingClientRect(),t))}function GL(e,t,r){let a=ey(e,r),{scroll:o}=t;return o&&(ko(a.x,o.offset.x),ko(a.y,o.offset.y)),a}var Nf=({current:e})=>e?e.ownerDocument.defaultView:null;var HE=new WeakMap,Of=class{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=_e(),this.visualElement=t}start(t,{snapToCursor:r=!1}={}){let{presenceContext:a}=this.visualElement;if(a&&a.isPresent===!1)return;let o=c=>{let{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),r&&this.snapToCursor(Ta(c).point)},n=(c,d)=>{let{drag:f,dragPropagation:h,onDragStart:v}=this.getProps();if(f&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Ag(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),qt(C=>{let g=this.getAxisMotionValue(C).get()||0;if(_t.test(g)){let{projection:p}=this.visualElement;if(p&&p.layout){let y=p.layout.layoutBox[C];y&&(g=pt(y)*(parseFloat(g)/100))}}this.originPoint[C]=g}),v&&re.postRender(()=>v(c,d)),iu(this.visualElement,"transform");let{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},s=(c,d)=>{let{dragPropagation:f,dragDirectionLock:h,onDirectionLock:v,onDrag:x}=this.getProps();if(!f&&!this.openDragLock)return;let{offset:C}=d;if(h&&this.currentDirection===null){this.currentDirection=zE(C),this.currentDirection!==null&&v&&v(this.currentDirection);return}this.updateAxis("x",d.point,C),this.updateAxis("y",d.point,C),this.visualElement.render(),x&&x(c,d)},i=(c,d)=>this.stop(c,d),l=()=>qt(c=>{var d;return this.getAnimationState(c)==="paused"&&((d=this.getAxisMotionValue(c).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new mi(t,{onSessionStart:o,onStart:n,onMove:s,onSessionEnd:i,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:Nf(this.visualElement)})}stop(t,r){let a=this.isDragging;if(this.cancel(),!a)return;let{velocity:o}=r;this.startAnimation(o);let{onDragEnd:n}=this.getProps();n&&re.postRender(()=>n(t,r))}cancel(){this.isDragging=!1;let{projection:t,animationState:r}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:a}=this.getProps();!a&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",!1)}updateAxis(t,r,a){let{drag:o}=this.getProps();if(!a||!Mf(t,o,this.currentDirection))return;let n=this.getAxisMotionValue(t),s=this.originPoint[t]+a[t];this.constraints&&this.constraints[t]&&(s=RL(s,this.constraints[t],this.elastic[t])),n.set(s)}resolveConstraints(){var t;let{dragConstraints:r,dragElastic:a}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,n=this.constraints;r&&La(r)?this.constraints||(this.constraints=this.resolveRefConstraints()):r&&o?this.constraints=EL(o.layoutBox,r):this.constraints=!1,this.elastic=OL(a),n!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&qt(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=ML(o.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){let{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!La(t))return!1;let a=t.current;Er(a!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");let{projection:o}=this.visualElement;if(!o||!o.layout)return!1;let n=GL(a,o.root,this.visualElement.getTransformPagePoint()),s=DL(o.layout.layoutBox,n);if(r){let i=r(UL(s));this.hasMutatedConstraints=!!i,i&&(s=Ef(i))}return s}startAnimation(t){let{drag:r,dragMomentum:a,dragElastic:o,dragTransition:n,dragSnapToOrigin:s,onDragTransitionEnd:i}=this.getProps(),l=this.constraints||{},u=qt(c=>{if(!Mf(c,r,this.currentDirection))return;let d=l&&l[c]||{};s&&(d={min:0,max:0});let f=o?200:1e6,h=o?40:1e7,v={type:"inertia",velocity:a?t[c]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...n,...d};return this.startAxisValueAnimation(c,v)});return Promise.all(u).then(i)}startAxisValueAnimation(t,r){let a=this.getAxisMotionValue(t);return iu(this.visualElement,t),a.start(pi(t,a,0,r,this.visualElement,!1))}stopAnimation(){qt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){qt(t=>{var r;return(r=this.getAxisMotionValue(t).animation)===null||r===void 0?void 0:r.pause()})}getAnimationState(t){var r;return(r=this.getAxisMotionValue(t).animation)===null||r===void 0?void 0:r.state}getAxisMotionValue(t){let r=`_drag${t.toUpperCase()}`,a=this.visualElement.getProps(),o=a[r];return o||this.visualElement.getValue(t,(a.initial?a.initial[t]:void 0)||0)}snapToCursor(t){qt(r=>{let{drag:a}=this.getProps();if(!Mf(r,a,this.currentDirection))return;let{projection:o}=this.visualElement,n=this.getAxisMotionValue(r);if(o&&o.layout){let{min:s,max:i}=o.layout.layoutBox[r];n.set(t[r]-le(s,i,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:t,dragConstraints:r}=this.getProps(),{projection:a}=this.visualElement;if(!La(r)||!a||!this.constraints)return;this.stopAnimation();let o={x:0,y:0};qt(s=>{let i=this.getAxisMotionValue(s);if(i&&this.constraints!==!1){let l=i.get();o[s]=NL({min:l,max:l},this.constraints[s])}});let{transformTemplate:n}=this.visualElement.getProps();this.visualElement.current.style.transform=n?n({},""):"none",a.root&&a.root.updateScroll(),a.updateLayout(),this.resolveConstraints(),qt(s=>{if(!Mf(s,t,null))return;let i=this.getAxisMotionValue(s),{min:l,max:u}=this.constraints[s];i.set(le(l,u,o[s]))})}addListeners(){if(!this.visualElement.current)return;HE.set(this.visualElement,this);let t=this.visualElement.current,r=Io(t,"pointerdown",l=>{let{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),a=()=>{let{dragConstraints:l}=this.getProps();La(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,n=o.addEventListener("measure",a);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),re.read(a);let s=Pa(window,"resize",()=>this.scalePositionWithinConstraints()),i=o.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(qt(c=>{let d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=l[c].translate,d.set(d.get()+l[c].translate))}),this.visualElement.render())}));return()=>{s(),r(),n(),i&&i()}}getProps(){let t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:a=!1,dragPropagation:o=!1,dragConstraints:n=!1,dragElastic:s=Rf,dragMomentum:i=!0}=t;return{...t,drag:r,dragDirectionLock:a,dragPropagation:o,dragConstraints:n,dragElastic:s,dragMomentum:i}}};function Mf(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function zE(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}var Bf=class extends st{constructor(t){super(t),this.removeGroupControls=ye,this.removeListeners=ye,this.controls=new Of(t)}mount(){let{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ye}unmount(){this.removeGroupControls(),this.removeListeners()}};var KL=e=>(t,r)=>{e&&re.postRender(()=>e(t,r))},Ff=class extends st{constructor(){super(...arguments),this.removePointerDownListener=ye}onPointerDown(t){this.session=new mi(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Nf(this.node)})}createPanHandlers(){let{onPanSessionStart:t,onPanStart:r,onPan:a,onPanEnd:o}=this.node.getProps();return{onSessionStart:KL(t),onStart:KL(r),onMove:a,onEnd:(n,s)=>{delete this.session,o&&re.postRender(()=>o(n,s))}}}mount(){this.removePointerDownListener=Io(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}};var QL=O(ue(),1),mu=O(Q(),1);var yi={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function XL(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var vi={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(z.test(e))e=parseFloat(e);else return e;let r=XL(e,t.target.x),a=XL(e,t.target.y);return`${r}% ${a}%`}};var JL={correct:(e,{treeScale:t,projectionDelta:r})=>{let a=e,o=At.parse(e);if(o.length>5)return a;let n=At.createTransformer(e),s=typeof o[0]!="number"?1:0,i=r.x.scale*t.x,l=r.y.scale*t.y;o[0+s]/=i,o[1+s]/=l;let u=le(i,l,.5);return typeof o[2+s]=="number"&&(o[2+s]/=u),typeof o[3+s]=="number"&&(o[3+s]/=u),n(o)}};var ty=class extends mu.Component{componentDidMount(){let{visualElement:t,layoutGroup:r,switchLayoutGroup:a,layoutId:o}=this.props,{projection:n}=t;ob($E),n&&(r.group&&r.group.add(n),a&&a.register&&o&&a.register(n),n.root.didUpdate(),n.addEventListener("animationComplete",()=>{this.safeToRemove()}),n.setOptions({...n.options,onExitComplete:()=>this.safeToRemove()})),yi.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){let{layoutDependency:r,visualElement:a,drag:o,isPresent:n}=this.props,s=a.projection;return s&&(s.isPresent=n,o||t.layoutDependency!==r||r===void 0?s.willUpdate():this.safeToRemove(),t.isPresent!==n&&(n?s.promote():s.relegate()||re.postRender(()=>{let i=s.getStack();(!i||!i.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){let{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Vs.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:t,layoutGroup:r,switchLayoutGroup:a}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(o),a&&a.deregister&&a.deregister(o))}safeToRemove(){let{safeToRemove:t}=this.props;t&&t()}render(){return null}};function Uf(e){let[t,r]=Td(),a=(0,mu.useContext)(Ns);return(0,QL.jsx)(ty,{...e,layoutGroup:a,switchLayoutGroup:(0,mu.useContext)(Vd),isPresent:t,safeToRemove:r})}var $E={borderRadius:{...vi,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:vi,borderTopRightRadius:vi,borderBottomLeftRadius:vi,borderBottomRightRadius:vi,boxShadow:JL};function YL(e,t,r){let a=be(e)?e:ka(e);return a.start(pi("",a,t,r)),a.animation}function ZL(e){return e instanceof SVGElement&&e.tagName!=="svg"}var eI=(e,t)=>e.depth-t.depth;var Vf=class{constructor(){this.children=[],this.isDirty=!1}add(t){ni(this.children,t),this.isDirty=!0}remove(t){si(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(eI),this.isDirty=!1,this.children.forEach(t)}};function tI(e,t){let r=Ct.now(),a=({timestamp:o})=>{let n=o-r;n>=t&&(ar(a),e(n-t))};return re.read(a,!0),()=>ar(a)}var nI=["TopLeft","TopRight","BottomLeft","BottomRight"],WE=nI.length,rI=e=>typeof e=="string"?parseFloat(e):e,aI=e=>typeof e=="number"||z.test(e);function sI(e,t,r,a,o,n){o?(e.opacity=le(0,r.opacity!==void 0?r.opacity:1,GE(a)),e.opacityExit=le(t.opacity!==void 0?t.opacity:1,0,KE(a))):n&&(e.opacity=le(t.opacity!==void 0?t.opacity:1,r.opacity!==void 0?r.opacity:1,a));for(let s=0;s<WE;s++){let i=`border${nI[s]}Radius`,l=oI(t,i),u=oI(r,i);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||aI(l)===aI(u)?(e[i]=Math.max(le(rI(l),rI(u),a),0),(_t.test(u)||_t.test(l))&&(e[i]+="%")):e[i]=u}(t.rotate||r.rotate)&&(e.rotate=le(t.rotate||0,r.rotate||0,a))}function oI(e,t){return e[t]!==void 0?e[t]:e.borderRadius}var GE=iI(0,.5,ff),KE=iI(.5,.95,ye);function iI(e,t,r){return a=>a<e?0:a>t?1:r(rr(e,t,a))}function lI(e,t){e.min=t.min,e.max=t.max}function nr(e,t){lI(e.x,t.x),lI(e.y,t.y)}function ry(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function uI(e,t,r,a,o){return e-=t,e=pu(e,1/r,a),o!==void 0&&(e=pu(e,1/o,a)),e}function XE(e,t=0,r=1,a=.5,o,n=e,s=e){if(_t.test(t)&&(t=parseFloat(t),t=le(s.min,s.max,t/100)-s.min),typeof t!="number")return;let i=le(n.min,n.max,a);e===n&&(i-=t),e.min=uI(e.min,t,r,i,o),e.max=uI(e.max,t,r,i,o)}function cI(e,t,[r,a,o],n,s){XE(e,t[r],t[a],t[o],t.scale,n,s)}var JE=["x","scaleX","originX"],QE=["y","scaleY","originY"];function ay(e,t,r,a){cI(e.x,t,JE,r?r.x:void 0,a?a.x:void 0),cI(e.y,t,QE,r?r.y:void 0,a?a.y:void 0)}function dI(e){return e.translate===0&&e.scale===1}function oy(e){return dI(e.x)&&dI(e.y)}function fI(e,t){return e.min===t.min&&e.max===t.max}function mI(e,t){return fI(e.x,t.x)&&fI(e.y,t.y)}function pI(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function ny(e,t){return pI(e.x,t.x)&&pI(e.y,t.y)}function sy(e){return pt(e.x)/pt(e.y)}function iy(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var jf=class{constructor(){this.members=[]}add(t){ni(this.members,t),t.scheduleRender()}remove(t){if(si(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){let r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(t){let r=this.members.findIndex(o=>t===o);if(r===0)return!1;let a;for(let o=r;o>=0;o--){let n=this.members[o];if(n.isPresent!==!1){a=n;break}}return a?(this.promote(a),!0):!1}promote(t,r){let a=this.lead;if(t!==a&&(this.prevLead=a,this.lead=t,t.show(),a)){a.instance&&a.scheduleRender(),t.scheduleRender(),t.resumeFrom=a,r&&(t.resumeFrom.preserveOpacity=!0),a.snapshot&&(t.snapshot=a.snapshot,t.snapshot.latestValues=a.animationValues||a.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);let{crossfade:o}=t.options;o===!1&&a.hide()}}exitAnimationComplete(){this.members.forEach(t=>{let{options:r,resumingFrom:a}=t;r.onExitComplete&&r.onExitComplete(),a&&a.options.onExitComplete&&a.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}};function hI(e,t,r){let a="",o=e.x.translate/t.x,n=e.y.translate/t.y,s=r?.z||0;if((o||n||s)&&(a=`translate3d(${o}px, ${n}px, ${s}px) `),(t.x!==1||t.y!==1)&&(a+=`scale(${1/t.x}, ${1/t.y}) `),r){let{transformPerspective:u,rotate:c,rotateX:d,rotateY:f,skewX:h,skewY:v}=r;u&&(a=`perspective(${u}px) ${a}`),c&&(a+=`rotate(${c}deg) `),d&&(a+=`rotateX(${d}deg) `),f&&(a+=`rotateY(${f}deg) `),h&&(a+=`skewX(${h}deg) `),v&&(a+=`skewY(${v}deg) `)}let i=e.x.scale*t.x,l=e.y.scale*t.y;return(i!==1||l!==1)&&(a+=`scale(${i}, ${l})`),a||"none"}var Pn={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},hu=typeof window<"u"&&window.MotionDebug!==void 0,ly=["","X","Y","Z"],YE={visibility:"hidden"},gI=1e3,ZE=0;function uy(e,t,r,a){let{latestValues:o}=t;o[e]&&(r[e]=o[e],t.setStaticValue(e,0),a&&(a[e]=0))}function LI(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let r=of(t);if(window.MotionHasOptimisedAnimation(r,"transform")){let{layout:o,layoutId:n}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",re,!(o||n))}let{parent:a}=e;a&&!a.hasCheckedOptimisedAppear&&LI(a)}function qf({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:a,resetTransform:o}){return class{constructor(s={},i=t?.()){this.id=ZE++,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,hu&&(Pn.totalNodes=Pn.resolvedTargetDeltas=Pn.recalculatedProjection=0),this.nodes.forEach(rD),this.nodes.forEach(iD),this.nodes.forEach(lD),this.nodes.forEach(aD),hu&&window.MotionDebug.record(Pn)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=i?i.root||i:this,this.path=i?[...i.path,i]:[],this.parent=i,this.depth=i?i.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Vf)}addEventListener(s,i){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new xo),this.eventHandlers.get(s).add(i)}notifyListeners(s,...i){let l=this.eventHandlers.get(s);l&&l.notify(...i)}hasListeners(s){return this.eventHandlers.has(s)}mount(s,i=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=ZL(s),this.instance=s;let{layoutId:l,layout:u,visualElement:c}=this.options;if(c&&!c.current&&c.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),i&&(u||l)&&(this.isLayoutDirty=!0),e){let d,f=()=>this.root.updateBlockedByResize=!1;e(s,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=tI(f,250),yi.hasAnimatedSinceResize&&(yi.hasAnimatedSinceResize=!1,this.nodes.forEach(vI))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeTargetChanged:h,layout:v})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let x=this.options.transition||c.getDefaultTransition()||pD,{onLayoutAnimationStart:C,onLayoutAnimationComplete:g}=c.getProps(),p=!this.targetLayout||!ny(this.targetLayout,v)||h,y=!f&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||y||f&&(p||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,y);let b={...go(x,"layout"),onPlay:C,onComplete:g};(c.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b)}else f||vI(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=v})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,ar(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(uD),this.animationId++)}getTransformTemplate(){let{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&LI(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){let d=this.path[c];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}let{layoutId:i,layout:l}=this.options;if(i===void 0&&!l)return;let u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(yI);return}this.isUpdating||this.nodes.forEach(nD),this.isUpdating=!1,this.nodes.forEach(sD),this.nodes.forEach(eD),this.nodes.forEach(tD),this.clearAllSnapshots();let i=Ct.now();He.delta=ft(0,1e3/60,i-He.timestamp),He.timestamp=i,He.isProcessing=!0,Nd.update.process(He),Nd.preRender.process(He),Nd.render.process(He),He.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Vs.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(oD),this.sharedNodes.forEach(cD)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,re.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){re.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();let s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=_e(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:i}=this.options;i&&i.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let i=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(i=!1),i){let l=a(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:l,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;let s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,i=this.projectionDelta&&!oy(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;s&&(i||_a(this.latestValues)||c)&&(o(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){let i=this.measurePageBox(),l=this.removeElementScroll(i);return s&&(l=this.removeTransform(l)),mD(l),{animationId:this.root.animationId,measuredBox:i,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var s;let{visualElement:i}=this.options;if(!i)return _e();let l=i.measureViewportBox();if(!(((s=this.scroll)===null||s===void 0?void 0:s.wasRoot)||this.path.some(hD))){let{scroll:c}=this.root;c&&(ko(l.x,c.offset.x),ko(l.y,c.offset.y))}return l}removeElementScroll(s){var i;let l=_e();if(nr(l,s),!((i=this.scroll)===null||i===void 0)&&i.wasRoot)return l;for(let u=0;u<this.path.length;u++){let c=this.path[u],{scroll:d,options:f}=c;c!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&nr(l,s),ko(l.x,d.offset.x),ko(l.y,d.offset.y))}return l}applyTransform(s,i=!1){let l=_e();nr(l,s);for(let u=0;u<this.path.length;u++){let c=this.path[u];!i&&c.options.layoutScroll&&c.scroll&&c!==c.root&&kn(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),_a(c.latestValues)&&kn(l,c.latestValues)}return _a(this.latestValues)&&kn(l,this.latestValues),l}removeTransform(s){let i=_e();nr(i,s);for(let l=0;l<this.path.length;l++){let u=this.path[l];if(!u.instance||!_a(u.latestValues))continue;Df(u.latestValues)&&u.updateSnapshot();let c=_e(),d=u.measurePageBox();nr(c,d),ay(i,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return _a(this.latestValues)&&ay(i,this.latestValues),i}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.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!==He.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var i;let l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);let u=!!this.resumingFrom||this!==l;if(!(s||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((i=this.parent)===null||i===void 0)&&i.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=He.timestamp,!this.targetDelta&&!this.relativeTarget){let h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=_e(),this.relativeTargetOrigin=_e(),gi(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),nr(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(),kL(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):nr(this.target,this.layout.layoutBox),Zg(this.target,this.targetDelta)):nr(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;let h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=_e(),this.relativeTargetOrigin=_e(),gi(this.relativeTargetOrigin,this.target,h.target),nr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}hu&&Pn.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Df(this.parent.latestValues)||Qg(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 s;let i=this.getLead(),l=!!this.resumingFrom||this!==i,u=!0;if((this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty)&&(u=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===He.timestamp&&(u=!1),u)return;let{layout:c,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||d))return;nr(this.layoutCorrected,this.layout.layoutBox);let f=this.treeScale.x,h=this.treeScale.y;WL(this.layoutCorrected,this.treeScale,this.path,l),i.layout&&!i.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(i.target=i.layout.layoutBox,i.targetWithTransforms=_e());let{target:v}=i;if(!v){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(ry(this.prevProjectionDelta.x,this.projectionDelta.x),ry(this.prevProjectionDelta.y,this.projectionDelta.y)),hi(this.projectionDelta,this.layoutCorrected,v,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!iy(this.projectionDelta.x,this.prevProjectionDelta.x)||!iy(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",v)),hu&&Pn.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){var i;if((i=this.options.visualElement)===null||i===void 0||i.scheduleRender(),s){let l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=In(),this.projectionDelta=In(),this.projectionDeltaWithTransform=In()}setAnimationOrigin(s,i=!1){let l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},d=In();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!i;let f=_e(),h=l?l.source:void 0,v=this.layout?this.layout.source:void 0,x=h!==v,C=this.getStack(),g=!C||C.members.length<=1,p=!!(x&&!g&&this.options.crossfade===!0&&!this.path.some(fD));this.animationProgress=0;let y;this.mixTargetDelta=b=>{let L=b/1e3;xI(d.x,s.x,L),xI(d.y,s.y,L),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(gi(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),dD(this.relativeTarget,this.relativeTargetOrigin,f,L),y&&mI(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=_e()),nr(y,this.relativeTarget)),x&&(this.animationValues=c,sI(c,u,this.latestValues,L,p,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=L},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(ar(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=re.update(()=>{yi.hasAnimatedSinceResize=!0,this.currentAnimation=YL(0,gI,{...s,onUpdate:i=>{this.mixTargetDelta(i),s.onUpdate&&s.onUpdate(i)},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(gI),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let s=this.getLead(),{targetWithTransforms:i,target:l,layout:u,latestValues:c}=s;if(!(!i||!l||!u)){if(this!==s&&this.layout&&u&&II(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||_e();let d=pt(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+d;let f=pt(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+f}nr(i,l),kn(i,c),hi(this.projectionDeltaWithTransform,this.layoutCorrected,i,c)}}registerSharedNode(s,i){this.sharedNodes.has(s)||this.sharedNodes.set(s,new jf),this.sharedNodes.get(s).add(i);let u=i.options.initialPromotionConfig;i.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(i):void 0})}isLead(){let s=this.getStack();return s?s.lead===this:!0}getLead(){var s;let{layoutId:i}=this.options;return i?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;let{layoutId:i}=this.options;return i?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){let{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:i,preserveFollowOpacity:l}={}){let u=this.getStack();u&&u.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),i&&this.setOptions({transition:i})}relegate(){let s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){let{visualElement:s}=this.options;if(!s)return;let i=!1,{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(i=!0),!i)return;let u={};l.z&&uy("z",s,u,this.animationValues);for(let c=0;c<ly.length;c++)uy(`rotate${ly[c]}`,s,u,this.animationValues),uy(`skew${ly[c]}`,s,u,this.animationValues);s.render();for(let c in u)s.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);s.scheduleRender()}getProjectionStyles(s){var i,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return YE;let u={visibility:""},c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=zs(s?.pointerEvents)||"",u.transform=c?c(this.latestValues,""):"none",u;let d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){let x={};return this.options.layoutId&&(x.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,x.pointerEvents=zs(s?.pointerEvents)||""),this.hasProjected&&!_a(this.latestValues)&&(x.transform=c?c({},""):"none",this.hasProjected=!1),x}let f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),u.transform=hI(this.projectionDeltaWithTransform,this.treeScale,f),c&&(u.transform=c(f,u.transform));let{x:h,y:v}=this.projectionDelta;u.transformOrigin=`${h.origin*100}% ${v.origin*100}% 0`,d.animationValues?u.opacity=d===this?(l=(i=f.opacity)!==null&&i!==void 0?i:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:u.opacity=d===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(let x in Qs){if(f[x]===void 0)continue;let{correct:C,applyTo:g}=Qs[x],p=u.transform==="none"?f[x]:C(f[x],d);if(g){let y=g.length;for(let b=0;b<y;b++)u[g[b]]=p}else u[x]=p}return this.options.layoutId&&(u.pointerEvents=d===this?zs(s?.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var i;return(i=s.currentAnimation)===null||i===void 0?void 0:i.stop()}),this.root.nodes.forEach(yI),this.root.sharedNodes.clear()}}}function eD(e){e.updateLayout()}function tD(e){var t;let r=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&r&&e.hasListeners("didUpdate")){let{layoutBox:a,measuredBox:o}=e.layout,{animationType:n}=e.options,s=r.source!==e.layout.source;n==="size"?qt(d=>{let f=s?r.measuredBox[d]:r.layoutBox[d],h=pt(f);f.min=a[d].min,f.max=f.min+h}):II(n,r.layoutBox,a)&&qt(d=>{let f=s?r.measuredBox[d]:r.layoutBox[d],h=pt(a[d]);f.max=f.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+h)});let i=In();hi(i,a,r.layoutBox);let l=In();s?hi(l,e.applyTransform(o,!0),r.measuredBox):hi(l,a,r.layoutBox);let u=!oy(i),c=!1;if(!e.resumeFrom){let d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){let{snapshot:f,layout:h}=d;if(f&&h){let v=_e();gi(v,r.layoutBox,f.layoutBox);let x=_e();gi(x,a,h.layoutBox),ny(v,x)||(c=!0),d.options.layoutRoot&&(e.relativeTarget=x,e.relativeTargetOrigin=v,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:a,snapshot:r,delta:l,layoutDelta:i,hasLayoutChanged:u,hasRelativeTargetChanged:c})}else if(e.isLead()){let{onExitComplete:a}=e.options;a&&a()}e.options.transition=void 0}function rD(e){hu&&Pn.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function aD(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function oD(e){e.clearSnapshot()}function yI(e){e.clearMeasurements()}function nD(e){e.isLayoutDirty=!1}function sD(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function vI(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function iD(e){e.resolveTargetDelta()}function lD(e){e.calcProjection()}function uD(e){e.resetSkewAndRotation()}function cD(e){e.removeLeadSnapshot()}function xI(e,t,r){e.translate=le(t.translate,0,r),e.scale=le(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function wI(e,t,r,a){e.min=le(t.min,r.min,a),e.max=le(t.max,r.max,a)}function dD(e,t,r,a){wI(e.x,t.x,r.x,a),wI(e.y,t.y,r.y,a)}function fD(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var pD={duration:.45,ease:[.4,0,.1,1]},SI=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),CI=SI("applewebkit/")&&!SI("chrome/")?Math.round:ye;function bI(e){e.min=CI(e.min),e.max=CI(e.max)}function mD(e){bI(e.x),bI(e.y)}function II(e,t,r){return e==="position"||e==="preserve-aspect"&&!IL(sy(t),sy(r),.2)}function hD(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}var kI=qf({attachResizeListener:(e,t)=>Pa(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0});var cy={current:void 0},Hf=qf({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!cy.current){let e=new kI({});e.mount(window),e.setOptions({layoutScroll:!0}),cy.current=e}return cy.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"});var PI={pan:{Feature:Ff},drag:{Feature:Bf,ProjectionNode:Hf,MeasureLayout:Uf}};function TI(e,t,r){let{props:a}=e;e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",r==="Start");let o="onHover"+r,n=a[o];n&&re.postRender(()=>n(t,Ta(t)))}var zf=class extends st{mount(){let{current:t}=this.node;t&&(this.unmount=Pg(t,r=>(TI(this.node,r,"Start"),a=>TI(this.node,a,"End"))))}unmount(){}};var $f=class extends st{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Xr(Pa(this.node.current,"focus",()=>this.onFocus()),Pa(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function _I(e,t,r){let{props:a}=e;e.animationState&&a.whileTap&&e.animationState.setActive("whileTap",r==="Start");let o="onTap"+(r==="End"?"":r),n=a[o];n&&re.postRender(()=>n(t,Ta(t)))}var Wf=class extends st{mount(){let{current:t}=this.node;t&&(this.unmount=_g(t,r=>(_I(this.node,r,"Start"),(a,{success:o})=>_I(this.node,a,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}};var fy=new WeakMap,dy=new WeakMap,gD=e=>{let t=fy.get(e.target);t&&t(e)},yD=e=>{e.forEach(gD)};function vD({root:e,...t}){let r=e||document;dy.has(r)||dy.set(r,{});let a=dy.get(r),o=JSON.stringify(t);return a[o]||(a[o]=new IntersectionObserver(yD,{root:e,...t})),a[o]}function AI(e,t,r){let a=vD(t);return fy.set(e,r),a.observe(e),()=>{fy.delete(e),a.unobserve(e)}}var xD={some:0,all:1},Gf=class extends st{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:t={}}=this.node.getProps(),{root:r,margin:a,amount:o="some",once:n}=t,s={root:r?r.current:void 0,rootMargin:a,threshold:typeof o=="number"?o:xD[o]},i=l=>{let{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,n&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);let{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),f=u?c:d;f&&f(l)};return AI(this.node.current,s,i)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;let{props:t,prevProps:r}=this.node;["amount","margin","root"].some(wD(t,r))&&this.startObserver()}unmount(){}};function wD({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}var RI={inView:{Feature:Gf},tap:{Feature:Wf},focus:{Feature:$f},hover:{Feature:zf}};var EI={layout:{ProjectionNode:Hf,MeasureLayout:Uf}};var BI=O(Q(),1);var gu={current:null},Kf={current:!1};function DI(){if(Kf.current=!0,!!Bs)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>gu.current=e.matches;e.addListener(t),t()}else gu.current=!1}var SD=[...Fg,Ge,At],NI=e=>SD.find(vf(e));var py=new WeakMap;function MI(e,t,r){for(let a in t){let o=t[a],n=r[a];if(be(o))e.addValue(a,o);else if(be(n))e.addValue(a,ka(o,{owner:e}));else if(n!==o)if(e.hasValue(a)){let s=e.getValue(a);s.liveStyle===!0?s.jump(o):s.hasAnimated||s.set(o)}else{let s=e.getStaticValue(a);e.addValue(a,ka(s!==void 0?s:o,{owner:e}))}}for(let a in r)t[a]===void 0&&e.removeValue(a);return t}var OI=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Xf=class{scrapeMotionValuesFromProps(t,r,a){return{}}constructor({parent:t,props:r,presenceContext:a,reducedMotionConfig:o,blockInitialAnimation:n,visualState:s},i={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=bo,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let h=Ct.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,re.render(this.render,!1,!0))};let{latestValues:l,renderState:u,onUpdate:c}=s;this.onUpdate=c,this.latestValues=l,this.baseTarget={...l},this.initialValues=r.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=r,this.presenceContext=a,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=i,this.blockInitialAnimation=!!n,this.isControllingVariants=yn(r),this.isVariantNode=Bd(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);let{willChange:d,...f}=this.scrapeMotionValuesFromProps(r,{},this);for(let h in f){let v=f[h];l[h]!==void 0&&be(v)&&v.set(l[h],!1)}}mount(t){this.current=t,py.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,a)=>this.bindToMotionValue(a,r)),Kf.current||DI(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:gu.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){py.delete(this.current),this.projection&&this.projection.unmount(),ar(this.notifyUpdate),ar(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(let t in this.events)this.events[t].clear();for(let t in this.features){let r=this.features[t];r&&(r.unmount(),r.isMounted=!1)}this.current=null}bindToMotionValue(t,r){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();let a=jt.has(t),o=r.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&re.preRender(this.notifyUpdate),a&&this.projection&&(this.projection.isTransformDirty=!0)}),n=r.on("renderRequest",this.scheduleRender),s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,r)),this.valueSubscriptions.set(t,()=>{o(),n(),s&&s(),r.owner&&r.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Ca){let r=Ca[t];if(!r)continue;let{isEnabled:a,Feature:o}=r;if(!this.features[t]&&o&&a(this.props)&&(this.features[t]=new o(this)),this.features[t]){let n=this.features[t];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):_e()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,r){this.latestValues[t]=r}update(t,r){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let a=0;a<OI.length;a++){let o=OI[a];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);let n="on"+o,s=t[n];s&&(this.propEventSubscriptions[o]=this.on(o,s))}this.prevMotionValues=MI(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){let r=this.getClosestVariantNode();if(r)return r.variantChildren&&r.variantChildren.add(t),()=>r.variantChildren.delete(t)}addValue(t,r){let a=this.values.get(t);r!==a&&(a&&this.removeValue(t),this.bindToMotionValue(t,r),this.values.set(t,r),this.latestValues[t]=r.get())}removeValue(t){this.values.delete(t);let r=this.valueSubscriptions.get(t);r&&(r(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,r){if(this.props.values&&this.props.values[t])return this.props.values[t];let a=this.values.get(t);return a===void 0&&r!==void 0&&(a=ka(r===null?void 0:r,{owner:this}),this.addValue(t,a)),a}readValue(t,r){var a;let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(a=this.getBaseTargetFromProps(this.props,t))!==null&&a!==void 0?a:this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(yf(o)||mf(o))?o=parseFloat(o):!NI(o)&&At.test(r)&&(o=gf(t,r)),this.setBaseTarget(t,be(o)?o.get():o)),be(o)?o.get():o}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){var r;let{initial:a}=this.props,o;if(typeof a=="string"||typeof a=="object"){let s=Hs(this.props,a,(r=this.presenceContext)===null||r===void 0?void 0:r.custom);s&&(o=s[t])}if(a&&o!==void 0)return o;let n=this.getBaseTargetFromProps(this.props,t);return n!==void 0&&!be(n)?n:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new xo),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}};var xi=class extends Xf{constructor(){super(...arguments),this.KeyframeResolver=ci}sortInstanceNodePosition(t,r){return t.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(t,r){return t.style?t.style[r]:void 0}removeValueFromRenderState(t,{vars:r,style:a}){delete r[t],delete a[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:t}=this.props;be(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}};function CD(e){return window.getComputedStyle(e)}var Jf=class extends xi{constructor(){super(...arguments),this.type="html",this.renderInstance=Wd}readValueFromInstance(t,r){if(jt.has(r)){let a=ui(r);return a&&a.default||0}else{let a=CD(t),o=(Hd(r)?a.getPropertyValue(r):a[r])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:r}){return ey(t,r)}build(t,r,a){Gs(t,r,a.transformTemplate)}scrapeMotionValuesFromProps(t,r,a){return Ys(t,r,a)}};var Qf=class extends xi{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=_e}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(jt.has(r)){let a=ui(r);return a&&a.default||0}return r=Gd.has(r)?r:Us(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,a){return Jd(t,r,a)}build(t,r,a){Ks(t,r,this.isSVGTag,a.transformTemplate)}renderInstance(t,r,a,o){Kd(t,r,a,o)}mount(t){this.isSVGTag=Js(t.tagName),super.mount(t)}};var FI=(e,t)=>qs(e)?new Qf(t):new Jf(t,{allowProjection:e!==BI.Fragment});var UI=pb({...mL,...RI,...PI,...EI},FI);var my=DC(UI);var yu=O(ue(),1);function VI({x:e,y:t,visible:r,onClick:a=!1}){return(0,yu.jsx)(yg,{children:r&&(0,yu.jsx)(my.div,{className:"fixed pointer-events-none z-[9999]",initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1,x:e,y:t},exit:{opacity:0,scale:.5},transition:{type:"spring",stiffness:200,damping:20},style:{left:0,top:0},children:(0,yu.jsx)("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,yu.jsx)("path",{d:"M3 3L10.07 19.97L12.58 12.58L19.97 10.07L3 3Z",fill:"#C4B5FD"})})})})}var wi=O(Q(),1);function jI(){let[e,t]=wi.useState({x:0,y:0,visible:!1,onClick:!1}),r=wi.useCallback(n=>{let s=document.querySelector(n.selector);if(s){let i=s.getBoundingClientRect(),l=n.offset?.x||0,u=n.offset?.y||0;t({x:i.left+i.width/2+l,y:i.top+i.height/2+u,visible:!0,onClick:n.onClick||!1})}},[]),a=wi.useCallback(()=>{t(n=>({...n,visible:!1}))},[]),o=wi.useCallback(()=>{t(n=>({...n,visible:!0}))},[]);return{cursorState:e,moveTo:r,hide:a,show:o}}var Si=O(ue(),1);function bt({className:e,...t}){return(0,Si.jsx)("div",{"data-slot":"card",className:er("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...t})}function Jr({className:e,...t}){return(0,Si.jsx)("div",{"data-slot":"card-header",className:er("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function Qr({className:e,...t}){return(0,Si.jsx)("div",{"data-slot":"card-title",className:er("leading-none font-semibold",e),...t})}function hy({className:e,...t}){return(0,Si.jsx)("div",{"data-slot":"card-description",className:er("text-muted-foreground text-sm",e),...t})}function Lt({className:e,...t}){return(0,Si.jsx)("div",{"data-slot":"card-content",className:er("px-6",e),...t})}var S=O(ue(),1),gy=e=>new Date(e).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),Yf=(e,t="USD")=>new Intl.NumberFormat("en-US",{style:"currency",currency:t}).format(e),yy=e=>{switch(e){case"Enterprise":return dn;case"Professional":return Xl;default:return Vl}},Zf=e=>{switch(e){case"Enterprise":return"bg-purple-50 text-purple-700 border-purple-200";case"Professional":return"bg-blue-50 text-blue-700 border-blue-200";default:return"bg-gray-50 text-gray-700 border-gray-200"}};function vu({status:e,type:t="default"}){let a=(()=>{let n=e.toLowerCase();if(t==="transaction")switch(n){case"paid":return{color:"bg-emerald-50 text-emerald-700 border-emerald-200",icon:nt};case"failed":return{color:"bg-red-50 text-red-700 border-red-200",icon:Ar};case"pending":return{color:"bg-amber-50 text-amber-700 border-amber-200",icon:un};case"refunded":return{color:"bg-slate-50 text-slate-700 border-slate-200",icon:Rs};default:return{color:"bg-gray-50 text-gray-700 border-gray-200",icon:_r}}if(t==="subscription")switch(n){case"active":return{color:"bg-emerald-50 text-emerald-700 border-emerald-200",icon:nt};case"cancelled":return{color:"bg-slate-50 text-slate-700 border-slate-200",icon:Ar};case"past_due":return{color:"bg-red-50 text-red-700 border-red-200",icon:_r};case"trialing":return{color:"bg-blue-50 text-blue-700 border-blue-200",icon:un};default:return{color:"bg-gray-50 text-gray-700 border-gray-200",icon:_r}}switch(n){case"active":return{color:"bg-emerald-50 text-emerald-700 border-emerald-200",icon:nt};case"inactive":return{color:"bg-slate-50 text-slate-700 border-slate-200",icon:Ar};default:return{color:"bg-gray-50 text-gray-700 border-gray-200",icon:_r}}})(),o=a.icon;return(0,S.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-medium border ${a.color}`,children:[(0,S.jsx)(o,{className:"h-3 w-3"}),e]})}function bD({subscription:e}){let t=yy(e.plan);return(0,S.jsxs)(bt,{className:"border-gray-200 shadow-sm bg-white overflow-hidden",children:[(0,S.jsx)("div",{className:`h-1 ${e.status==="active"?"bg-emerald-500":e.status==="past_due"?"bg-red-500":"bg-slate-300"}`}),(0,S.jsx)(Jr,{className:"pb-3",children:(0,S.jsxs)("div",{className:"flex items-start justify-between",children:[(0,S.jsxs)("div",{className:"space-y-1",children:[(0,S.jsxs)(Qr,{className:"text-base font-semibold text-gray-900 flex items-center gap-2",children:[(0,S.jsx)(cn,{className:"h-4 w-4 text-gray-500"}),e.id]}),e.customer_email&&(0,S.jsxs)(hy,{className:"text-sm text-gray-500 flex items-center gap-1.5",children:[(0,S.jsx)(_s,{className:"h-3 w-3"}),e.customer_email]})]}),(0,S.jsx)(vu,{status:e.status,type:"subscription"})]})}),(0,S.jsx)(Lt,{className:"pt-0",children:(0,S.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,S.jsxs)("div",{className:"space-y-3",children:[(0,S.jsxs)("div",{children:[(0,S.jsx)("div",{className:"text-xs text-gray-500 mb-1",children:"Plan"}),(0,S.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md text-xs font-medium border ${Zf(e.plan)}`,children:[(0,S.jsx)(t,{className:"h-3 w-3"}),e.plan]})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("div",{className:"text-xs text-gray-500 mb-1",children:"Billing"}),(0,S.jsxs)("div",{className:"text-sm font-medium text-gray-900",children:[Yf(e.amount,e.currency)," / ",e.billing_cycle]})]})]}),(0,S.jsxs)("div",{className:"space-y-3",children:[(0,S.jsxs)("div",{children:[(0,S.jsx)("div",{className:"text-xs text-gray-500 mb-1",children:"Current Period"}),(0,S.jsxs)("div",{className:"text-sm text-gray-700",children:[gy(e.current_period_start)," - ",gy(e.current_period_end)]})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("div",{className:"text-xs text-gray-500 mb-1",children:"Created"}),(0,S.jsx)("div",{className:"text-sm text-gray-700",children:gy(e.created_at)})]})]})]})})]})}function LD({subscriptions:e,maxItems:t=5}){let r=e.slice(0,t),a=e.length>t;return e.length===0?(0,S.jsx)(bt,{className:"border-gray-200 shadow-sm bg-white",children:(0,S.jsxs)(Lt,{className:"py-8 text-center",children:[(0,S.jsx)(cn,{className:"h-10 w-10 text-gray-300 mx-auto mb-3"}),(0,S.jsx)("p",{className:"text-sm text-gray-500",children:"No subscriptions found"})]})}):(0,S.jsxs)(bt,{className:"border-gray-200 shadow-sm bg-white overflow-hidden",children:[(0,S.jsx)(Jr,{className:"pb-2 border-b border-gray-100",children:(0,S.jsxs)(Qr,{className:"text-sm font-medium text-gray-700 flex items-center gap-2",children:[(0,S.jsx)(cn,{className:"h-4 w-4"}),e.length," Subscription",e.length!==1?"s":""]})}),(0,S.jsxs)(Lt,{className:"p-0",children:[(0,S.jsx)("div",{className:"divide-y divide-gray-100",children:r.map(o=>{let n=yy(o.plan);return(0,S.jsx)("div",{className:"px-4 py-3 hover:bg-gray-50 transition-colors",children:(0,S.jsxs)("div",{className:"flex items-center justify-between",children:[(0,S.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,S.jsx)("div",{className:`p-2 rounded-lg ${Zf(o.plan).replace("text-","text-").replace("border-","bg-").split(" ")[0]}`,children:(0,S.jsx)(n,{className:"h-4 w-4"})}),(0,S.jsxs)("div",{className:"min-w-0",children:[(0,S.jsx)("div",{className:"text-sm font-medium text-gray-900 truncate",children:o.customer_email||o.customer_id}),(0,S.jsxs)("div",{className:"text-xs text-gray-500",children:[o.plan," \xB7 ",Yf(o.amount,o.currency),"/",o.billing_cycle]})]})]}),(0,S.jsx)(vu,{status:o.status,type:"subscription"})]})},o.id)})}),a&&(0,S.jsx)("div",{className:"px-4 py-2 bg-gray-50 border-t border-gray-100 text-center",children:(0,S.jsxs)("span",{className:"text-xs text-gray-500",children:["+",e.length-t," more subscription",e.length-t!==1?"s":""]})})]})]})}function ID({customer:e}){let t=yy(e.subscription);return(0,S.jsxs)(bt,{className:"border-gray-200 shadow-sm bg-white overflow-hidden",children:[(0,S.jsx)("div",{className:`h-1 ${e.status==="active"?"bg-emerald-500":"bg-slate-300"}`}),(0,S.jsx)(Jr,{className:"pb-3",children:(0,S.jsxs)("div",{className:"flex items-start justify-between",children:[(0,S.jsx)("div",{className:"flex items-center gap-3",children:(0,S.jsxs)("div",{children:[(0,S.jsx)(Qr,{className:"text-base font-semibold text-gray-900",children:e.name}),(0,S.jsxs)(hy,{className:"text-sm text-gray-500 flex items-center gap-1",children:[(0,S.jsx)(_s,{className:"h-3 w-3"}),e.email]})]})}),(0,S.jsx)(vu,{status:e.status,type:"customer"})]})}),(0,S.jsx)(Lt,{className:"pt-0",children:(0,S.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,S.jsxs)("div",{className:"space-y-3",children:[(0,S.jsxs)("div",{children:[(0,S.jsx)("div",{className:"text-xs text-gray-500 mb-1",children:"Plan"}),(0,S.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md text-xs font-medium border ${Zf(e.subscription)}`,children:[(0,S.jsx)(t,{className:"h-3 w-3"}),e.subscription]})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("div",{className:"text-xs text-gray-500 mb-1",children:"Revenue"}),(0,S.jsxs)("div",{className:"text-sm font-medium text-gray-900 flex items-center gap-1",children:[(0,S.jsx)(fn,{className:"h-3 w-3 text-emerald-500"}),e.revenue]})]})]}),(0,S.jsxs)("div",{className:"space-y-3",children:[(0,S.jsxs)("div",{children:[(0,S.jsx)("div",{className:"text-xs text-gray-500 mb-1",children:"Location"}),(0,S.jsxs)("div",{className:"text-sm text-gray-700 flex items-center gap-1",children:[(0,S.jsx)(As,{className:"h-3 w-3 text-gray-400"}),e.location||"Not specified"]})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("div",{className:"text-xs text-gray-500 mb-1",children:"Customer Since"}),(0,S.jsxs)("div",{className:"text-sm text-gray-700 flex items-center gap-1",children:[(0,S.jsx)(ql,{className:"h-3 w-3 text-gray-400"}),e.joinDate]})]})]})]})})]})}function kD({customers:e,maxItems:t=5}){let r=e.slice(0,t),a=e.length>t;return e.length===0?(0,S.jsx)(bt,{className:"border-gray-200 shadow-sm bg-white",children:(0,S.jsxs)(Lt,{className:"py-8 text-center",children:[(0,S.jsx)(Ds,{className:"h-10 w-10 text-gray-300 mx-auto mb-3"}),(0,S.jsx)("p",{className:"text-sm text-gray-500",children:"No customers found"})]})}):(0,S.jsxs)(bt,{className:"border-gray-200 shadow-sm bg-white overflow-hidden",children:[(0,S.jsx)(Jr,{className:"pb-2 border-b border-gray-100",children:(0,S.jsxs)(Qr,{className:"text-sm font-medium text-gray-700 flex items-center gap-2",children:[(0,S.jsx)(Ds,{className:"h-4 w-4"}),e.length," Customer",e.length!==1?"s":""]})}),(0,S.jsxs)(Lt,{className:"p-0",children:[(0,S.jsx)("div",{className:"divide-y divide-gray-100",children:r.map(o=>(0,S.jsx)("div",{className:"px-4 py-3 hover:bg-gray-50 transition-colors",children:(0,S.jsxs)("div",{className:"flex items-center justify-between",children:[(0,S.jsx)("div",{className:"flex items-center gap-3 min-w-0",children:(0,S.jsxs)("div",{className:"min-w-0",children:[(0,S.jsx)("div",{className:"text-sm font-medium text-gray-900 truncate",children:o.name}),(0,S.jsx)("div",{className:"text-xs text-gray-500 truncate",children:o.email})]})}),(0,S.jsxs)("div",{className:"flex items-center gap-2",children:[(0,S.jsx)("span",{className:`px-2 py-0.5 rounded text-xs font-medium ${Zf(o.subscription)}`,children:o.subscription}),(0,S.jsx)(vu,{status:o.status,type:"customer"})]})]})},o.id))}),a&&(0,S.jsx)("div",{className:"px-4 py-2 bg-gray-50 border-t border-gray-100 text-center",children:(0,S.jsxs)("span",{className:"text-xs text-gray-500",children:["+",e.length-t," more customer",e.length-t!==1?"s":""]})})]})]})}function qI({transactions:e,maxItems:t=5}){let r=e.slice(0,t),a=e.length>t;return e.length===0?(0,S.jsx)(bt,{className:"border-gray-200 shadow-sm bg-white",children:(0,S.jsxs)(Lt,{className:"py-8 text-center",children:[(0,S.jsx)(fn,{className:"h-10 w-10 text-gray-300 mx-auto mb-3"}),(0,S.jsx)("p",{className:"text-sm text-gray-500",children:"No transactions found"})]})}):(0,S.jsxs)(bt,{className:"border-gray-200 shadow-sm bg-white overflow-hidden",children:[(0,S.jsx)(Jr,{className:"pb-2 border-b border-gray-100",children:(0,S.jsxs)(Qr,{className:"text-sm font-medium text-gray-700 flex items-center gap-2",children:[(0,S.jsx)(fn,{className:"h-4 w-4"}),e.length," Transaction",e.length!==1?"s":""]})}),(0,S.jsxs)(Lt,{className:"p-0",children:[(0,S.jsx)("div",{className:"divide-y divide-gray-100",children:r.map(o=>(0,S.jsx)("div",{className:"px-4 py-3 hover:bg-gray-50 transition-colors",children:(0,S.jsxs)("div",{className:"flex items-center justify-between",children:[(0,S.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,S.jsx)("div",{className:`p-2 rounded-lg ${o.status==="paid"?"bg-emerald-50":o.status==="failed"?"bg-red-50":o.status==="refunded"?"bg-slate-50":"bg-amber-50"}`,children:o.status==="paid"?(0,S.jsx)(nt,{className:"h-4 w-4 text-emerald-600"}):o.status==="failed"?(0,S.jsx)(Ar,{className:"h-4 w-4 text-red-600"}):o.status==="refunded"?(0,S.jsx)(Rs,{className:"h-4 w-4 text-slate-600"}):(0,S.jsx)(un,{className:"h-4 w-4 text-amber-600"})}),(0,S.jsxs)("div",{className:"min-w-0",children:[(0,S.jsx)("div",{className:"text-sm font-medium text-gray-900 truncate",children:o.customer}),(0,S.jsxs)("div",{className:"text-xs text-gray-500",children:[o.date,o.decline_reason&&(0,S.jsxs)("span",{className:"text-red-500 ml-2",children:["\xB7 ",o.decline_reason]})]})]})]}),(0,S.jsxs)("div",{className:"flex items-center gap-3",children:[(0,S.jsxs)("span",{className:`text-sm font-semibold ${o.status==="paid"?"text-emerald-600":o.status==="failed"?"text-red-600":o.status==="refunded"?"text-slate-600":"text-amber-600"}`,children:[o.status==="refunded"?"-":"",o.amount]}),(0,S.jsx)(vu,{status:o.status,type:"transaction"})]})]})},o.id))}),a&&(0,S.jsx)("div",{className:"px-4 py-2 bg-gray-50 border-t border-gray-100 text-center",children:(0,S.jsxs)("span",{className:"text-xs text-gray-500",children:["+",e.length-t," more transaction",e.length-t!==1?"s":""]})})]})]})}function PD({apiKeys:e}){return e.length===0?(0,S.jsx)(bt,{className:"border-gray-200 shadow-sm bg-white",children:(0,S.jsxs)(Lt,{className:"py-8 text-center",children:[(0,S.jsx)(Ts,{className:"h-10 w-10 text-gray-300 mx-auto mb-3"}),(0,S.jsx)("p",{className:"text-sm text-gray-500",children:"No API keys found"})]})}):(0,S.jsxs)(bt,{className:"border-gray-200 shadow-sm bg-white overflow-hidden",children:[(0,S.jsx)(Jr,{className:"pb-2 border-b border-gray-100",children:(0,S.jsxs)(Qr,{className:"text-sm font-medium text-gray-700 flex items-center gap-2",children:[(0,S.jsx)(Ts,{className:"h-4 w-4"}),e.length," API Key",e.length!==1?"s":""]})}),(0,S.jsx)(Lt,{className:"p-0",children:(0,S.jsx)("div",{className:"divide-y divide-gray-100",children:e.map((t,r)=>(0,S.jsx)("div",{className:"px-4 py-3 hover:bg-gray-50 transition-colors",children:(0,S.jsxs)("div",{className:"flex items-center justify-between",children:[(0,S.jsxs)("div",{className:"min-w-0",children:[(0,S.jsx)("div",{className:"text-sm font-medium text-gray-900",children:t.name}),(0,S.jsxs)("div",{className:"text-xs text-gray-500 font-mono",children:[t.key.slice(0,12),"...",t.key.slice(-4)]})]}),(0,S.jsxs)("div",{className:"text-xs text-gray-500",children:["Last used: ",t.lastUsed]})]})},r))})})]})}function TD({sessions:e}){let t=r=>{let a=r.toLowerCase();return a.includes("mobile")||a.includes("iphone")||a.includes("android")?Gl:zl};return e.length===0?(0,S.jsx)(bt,{className:"border-gray-200 shadow-sm bg-white",children:(0,S.jsxs)(Lt,{className:"py-8 text-center",children:[(0,S.jsx)(Es,{className:"h-10 w-10 text-gray-300 mx-auto mb-3"}),(0,S.jsx)("p",{className:"text-sm text-gray-500",children:"No active sessions"})]})}):(0,S.jsxs)(bt,{className:"border-gray-200 shadow-sm bg-white overflow-hidden",children:[(0,S.jsx)(Jr,{className:"pb-2 border-b border-gray-100",children:(0,S.jsxs)(Qr,{className:"text-sm font-medium text-gray-700 flex items-center gap-2",children:[(0,S.jsx)(Es,{className:"h-4 w-4"}),e.length," Active Session",e.length!==1?"s":""]})}),(0,S.jsx)(Lt,{className:"p-0",children:(0,S.jsx)("div",{className:"divide-y divide-gray-100",children:e.map((r,a)=>{let o=t(r.device);return(0,S.jsx)("div",{className:"px-4 py-3 hover:bg-gray-50 transition-colors",children:(0,S.jsxs)("div",{className:"flex items-center justify-between",children:[(0,S.jsxs)("div",{className:"flex items-center gap-3",children:[(0,S.jsx)("div",{className:"p-2 rounded-lg bg-gray-100",children:(0,S.jsx)(o,{className:"h-4 w-4 text-gray-600"})}),(0,S.jsxs)("div",{children:[(0,S.jsx)("div",{className:"text-sm font-medium text-gray-900",children:r.device}),(0,S.jsxs)("div",{className:"text-xs text-gray-500 flex items-center gap-1",children:[(0,S.jsx)(As,{className:"h-3 w-3"}),r.location]})]})]}),(0,S.jsx)("div",{className:"text-xs text-gray-500",children:r.time})]})},a)})})})]})}function _D({stats:e}){return(0,S.jsxs)(bt,{className:"border-gray-200 shadow-sm bg-white overflow-hidden",children:[(0,S.jsx)(Jr,{className:"pb-2 border-b border-gray-100",children:(0,S.jsxs)(Qr,{className:"text-sm font-medium text-gray-700 flex items-center gap-2",children:[(0,S.jsx)(Kl,{className:"h-4 w-4"}),"Dashboard Overview"]})}),(0,S.jsx)(Lt,{className:"p-4",children:(0,S.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[e.revenue&&(0,S.jsxs)("div",{className:"p-3 rounded-lg bg-emerald-50 border border-emerald-100",children:[(0,S.jsx)("div",{className:"text-xs text-emerald-600 font-medium mb-1",children:"Revenue"}),(0,S.jsx)("div",{className:"text-lg font-bold text-emerald-700",children:Yf(e.revenue.total)}),e.revenue.change!==0&&(0,S.jsxs)("div",{className:`text-xs ${e.revenue.change>0?"text-emerald-600":"text-red-600"}`,children:[e.revenue.change>0?"+":"",e.revenue.change,"% from last period"]})]}),e.subscriptions&&(0,S.jsxs)("div",{className:"p-3 rounded-lg bg-blue-50 border border-blue-100",children:[(0,S.jsx)("div",{className:"text-xs text-blue-600 font-medium mb-1",children:"Subscriptions"}),(0,S.jsxs)("div",{className:"text-lg font-bold text-blue-700",children:[e.subscriptions.active," active"]}),(0,S.jsxs)("div",{className:"text-xs text-blue-600",children:[e.subscriptions.total," total"]})]}),e.customers&&(0,S.jsxs)("div",{className:"p-3 rounded-lg bg-purple-50 border border-purple-100",children:[(0,S.jsx)("div",{className:"text-xs text-purple-600 font-medium mb-1",children:"Customers"}),(0,S.jsx)("div",{className:"text-lg font-bold text-purple-700",children:e.customers.total}),e.customers.new>0&&(0,S.jsxs)("div",{className:"text-xs text-purple-600",children:["+",e.customers.new," new this period"]})]}),e.transactions&&(0,S.jsxs)("div",{className:"p-3 rounded-lg bg-amber-50 border border-amber-100",children:[(0,S.jsx)("div",{className:"text-xs text-amber-600 font-medium mb-1",children:"Transactions"}),(0,S.jsxs)("div",{className:"text-lg font-bold text-amber-700",children:[e.transactions.successful," successful"]}),e.transactions.failed>0&&(0,S.jsxs)("div",{className:"text-xs text-red-600",children:[e.transactions.failed," failed"]})]})]})})]})}function AD({customers:e}){return e.length===0?(0,S.jsx)(bt,{className:"border-gray-200 shadow-sm bg-white",children:(0,S.jsxs)(Lt,{className:"py-8 text-center",children:[(0,S.jsx)(dn,{className:"h-10 w-10 text-gray-300 mx-auto mb-3"}),(0,S.jsx)("p",{className:"text-sm text-gray-500",children:"No top customers data"})]})}):(0,S.jsxs)(bt,{className:"border-gray-200 shadow-sm bg-white overflow-hidden",children:[(0,S.jsx)(Jr,{className:"pb-2 border-b border-gray-100",children:(0,S.jsxs)(Qr,{className:"text-sm font-medium text-gray-700 flex items-center gap-2",children:[(0,S.jsx)(dn,{className:"h-4 w-4 text-amber-500"}),"Top Customers"]})}),(0,S.jsx)(Lt,{className:"p-0",children:(0,S.jsx)("div",{className:"divide-y divide-gray-100",children:e.map((t,r)=>(0,S.jsx)("div",{className:"px-4 py-3 hover:bg-gray-50 transition-colors",children:(0,S.jsxs)("div",{className:"flex items-center justify-between",children:[(0,S.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,S.jsx)("div",{className:`h-6 w-6 rounded-full flex items-center justify-center text-xs font-bold ${r===0?"bg-amber-100 text-amber-700":r===1?"bg-slate-100 text-slate-700":r===2?"bg-orange-100 text-orange-700":"bg-gray-100 text-gray-700"}`,children:r+1}),(0,S.jsxs)("div",{className:"min-w-0",children:[(0,S.jsx)("div",{className:"text-sm font-medium text-gray-900 truncate",children:t.name}),(0,S.jsx)("div",{className:"text-xs text-gray-500 truncate",children:t.email})]})]}),(0,S.jsx)("div",{className:"text-sm font-semibold text-emerald-600",children:typeof t.revenue=="number"?Yf(t.revenue):t.revenue})]})},r))})})]})}function HI({type:e,data:t}){if(!t)return null;switch(e){case"subscription":return(0,S.jsx)(bD,{subscription:t});case"subscriptions":let r=t.subscriptions||t||[];return(0,S.jsx)(LD,{subscriptions:Array.isArray(r)?r:[r]});case"customer":return(0,S.jsx)(ID,{customer:t.customer||t});case"customers":let a=t.customers||t||[];return(0,S.jsx)(kD,{customers:Array.isArray(a)?a:[a]});case"transactions":let o=t.transactions||t||[];return(0,S.jsx)(qI,{transactions:Array.isArray(o)?o:[o]});case"transaction":return(0,S.jsx)(qI,{transactions:[t],maxItems:1});case"dashboard_stats":return(0,S.jsx)(_D,{stats:t});case"top_customers":let n=t.customers||t||[];return(0,S.jsx)(AD,{customers:Array.isArray(n)?n:[n]});case"api_keys":let s=t.api_keys||t||[];return(0,S.jsx)(PD,{apiKeys:Array.isArray(s)?s:[s]});case"sessions":let i=t.sessions||t||[];return(0,S.jsx)(TD,{sessions:Array.isArray(i)?i:[i]});default:return null}}var Tn=O(ue(),1);function zI({className:e=""}){return(0,Tn.jsx)("div",{className:`flex items-center gap-1 px-4 py-3 ${e}`,children:(0,Tn.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Tn.jsx)("span",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"0ms",animationDuration:"600ms"}}),(0,Tn.jsx)("span",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"150ms",animationDuration:"600ms"}}),(0,Tn.jsx)("span",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"300ms",animationDuration:"600ms"}})]})})}var m=O(ue(),1),RD="0.2.36",ED="http://localhost:5002",WI=340;function DD(e){return e.replace(/\\\\n/g,`
|
|
58
|
+
`),()=>{document.head.removeChild(c)}},[t]),(0,bC.jsx)(mg,{isPresent:t,childRef:a,sizeRef:o,children:Pd.cloneElement(e,{ref:a})})}var kC=({children:e,initial:t,isPresent:r,onExitComplete:a,custom:o,presenceAffectsLayout:n,mode:s})=>{let i=Ms(l1),l=(0,hn.useId)(),u=(0,hn.useCallback)(d=>{i.set(d,!0);for(let f of i.values())if(!f)return;a&&a()},[i,a]),c=(0,hn.useMemo)(()=>({id:l,initial:t,isPresent:r,custom:o,onExitComplete:u,register:d=>(i.set(d,!1),()=>i.delete(d))}),n?[Math.random(),u]:[r,u]);return(0,hn.useMemo)(()=>{i.forEach((d,f)=>i.set(f,!1))},[r]),IC.useEffect(()=>{!r&&!i.size&&a&&a()},[r]),s==="popLayout"&&(e=(0,hg.jsx)(LC,{isPresent:r,children:e})),(0,hg.jsx)(co.Provider,{value:c,children:e})};function l1(){return new Map}var fo=O(Q(),1);function Td(e=!0){let t=(0,fo.useContext)(co);if(t===null)return[!0,null];let{isPresent:r,onExitComplete:a,register:o}=t,n=(0,fo.useId)();(0,fo.useEffect)(()=>{e&&o(n)},[e]);let s=(0,fo.useCallback)(()=>e&&a&&a(n),[n,a,e]);return!r&&a?[!1,s]:[!0]}var _d=O(Q(),1),Jl=e=>e.key||"";function gg(e){let t=[];return _d.Children.forEach(e,r=>{(0,_d.isValidElement)(r)&&t.push(r)}),t}var Ad=O(Q(),1);var Bs=typeof window<"u";var Rd=Bs?Ad.useLayoutEffect:Ad.useEffect;var yg=({children:e,custom:t,initial:r=!0,onExitComplete:a,presenceAffectsLayout:o=!0,mode:n="sync",propagate:s=!1})=>{let[i,l]=Td(s),u=(0,zr.useMemo)(()=>gg(e),[e]),c=s&&!i?[]:u.map(Jl),d=(0,zr.useRef)(!0),f=(0,zr.useRef)(u),h=Ms(()=>new Map),[v,x]=(0,zr.useState)(u),[C,g]=(0,zr.useState)(u);Rd(()=>{d.current=!1,f.current=u;for(let b=0;b<C.length;b++){let L=Jl(C[b]);c.includes(L)?h.delete(L):h.get(L)!==!0&&h.set(L,!1)}},[C,c.length,c.join("-")]);let p=[];if(u!==v){let b=[...u];for(let L=0;L<C.length;L++){let P=C[L],T=Jl(P);c.includes(T)||(b.splice(L,0,P),p.push(P))}n==="wait"&&p.length&&(b=p),g(gg(b)),x(u);return}let{forceRender:y}=(0,zr.useContext)(Ns);return(0,Ql.jsx)(Ql.Fragment,{children:C.map(b=>{let L=Jl(b),P=s&&!i?!1:u===C||c.includes(L),T=()=>{if(h.has(L))h.set(L,!0);else return;let A=!0;h.forEach(N=>{N||(A=!1)}),A&&(y?.(),g(f.current),s&&l?.(),a&&a())};return(0,Ql.jsx)(kC,{isPresent:P,initial:!d.current||r?void 0:!1,custom:P?void 0:t,presenceAffectsLayout:o,mode:n,onExitComplete:P?void 0:T,children:b},L)})})};var ye=e=>e;var Sa=ye,Er=ye;function gn(e){let t;return()=>(t===void 0&&(t=e()),t)}var rr=(e,t,r)=>{let a=t-e;return a===0?1:(r-e)/a};var qe=e=>e*1e3,dt=e=>e/1e3;var Fs={skipAnimations:!1,useManualTiming:!1};function PC(e){let t=new Set,r=new Set,a=!1,o=!1,n=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1};function i(u){n.has(u)&&(l.schedule(u),e()),u(s)}let l={schedule:(u,c=!1,d=!1)=>{let h=d&&a?t:r;return c&&n.add(u),h.has(u)||h.add(u),u},cancel:u=>{r.delete(u),n.delete(u)},process:u=>{if(s=u,a){o=!0;return}a=!0,[t,r]=[r,t],t.forEach(i),t.clear(),a=!1,o&&(o=!1,l.process(u))}};return l}var Ed=["read","resolveKeyframes","update","preRender","render","postRender"],u1=40;function Dd(e,t){let r=!1,a=!0,o={delta:0,timestamp:0,isProcessing:!1},n=()=>r=!0,s=Ed.reduce((g,p)=>(g[p]=PC(n),g),{}),{read:i,resolveKeyframes:l,update:u,preRender:c,render:d,postRender:f}=s,h=()=>{let g=Fs.useManualTiming?o.timestamp:performance.now();r=!1,o.delta=a?1e3/60:Math.max(Math.min(g-o.timestamp,u1),1),o.timestamp=g,o.isProcessing=!0,i.process(o),l.process(o),u.process(o),c.process(o),d.process(o),f.process(o),o.isProcessing=!1,r&&t&&(a=!1,e(h))},v=()=>{r=!0,a=!0,o.isProcessing||e(h)};return{schedule:Ed.reduce((g,p)=>{let y=s[p];return g[p]=(b,L=!1,P=!1)=>(r||v(),y.schedule(b,L,P)),g},{}),cancel:g=>{for(let p=0;p<Ed.length;p++)s[Ed[p]].cancel(g)},state:o,steps:s}}var{schedule:re,cancel:ar,state:He,steps:Nd}=Dd(typeof requestAnimationFrame<"u"?requestAnimationFrame:ye,!0);var TC=O(Q(),1),Md=(0,TC.createContext)({strict:!1});var _C={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"]},Ca={};for(let e in _C)Ca[e]={isEnabled:t=>_C[e].some(r=>!!t[r])};function AC(e){for(let t in e)Ca[t]={...Ca[t],...e[t]}}var c1=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 Yl(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||c1.has(e)}var RC=e=>!Yl(e);function d1(e){e&&(RC=t=>t.startsWith("on")?!Yl(t):e(t))}try{d1(pk("@emotion/is-prop-valid").default)}catch{}function EC(e,t,r){let a={};for(let o in e)o==="values"&&typeof e.values=="object"||(RC(o)||r===!0&&Yl(o)||!t&&!Yl(o)||e.draggable&&o.startsWith("onDrag"))&&(a[o]=e[o]);return a}function DC(e){if(typeof Proxy>"u")return e;let t=new Map,r=(...a)=>e(...a);return new Proxy(r,{get:(a,o)=>o==="create"?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}var jd=O(ue(),1);var js=O(Q(),1);var NC=O(Q(),1),po=(0,NC.createContext)({});var Fd=O(Q(),1);function ba(e){return typeof e=="string"||Array.isArray(e)}function mo(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}var Od=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Zl=["initial",...Od];function yn(e){return mo(e.animate)||Zl.some(t=>ba(e[t]))}function Bd(e){return!!(yn(e)||e.variants)}function MC(e,t){if(yn(e)){let{initial:r,animate:a}=e;return{initial:r===!1||ba(r)?r:void 0,animate:ba(a)?a:void 0}}return e.inherit!==!1?t:{}}function BC(e){let{initial:t,animate:r}=MC(e,(0,Fd.useContext)(po));return(0,Fd.useMemo)(()=>({initial:t,animate:r}),[OC(t),OC(r)])}function OC(e){return Array.isArray(e)?e.join(" "):e}var FC=Symbol.for("motionComponentSymbol");var UC=O(Q(),1);function La(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function VC(e,t,r){return(0,UC.useCallback)(a=>{a&&e.onMount&&e.onMount(a),t&&(a?t.mount(a):t.unmount()),r&&(typeof r=="function"?r(a):La(r)&&(r.current=a))},[t])}var Vt=O(Q(),1);var Us=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase();var f1="framerAppearId",Ud="data-"+Us(f1);var{schedule:Vs,cancel:jU}=Dd(queueMicrotask,!1);var jC=O(Q(),1),Vd=(0,jC.createContext)({});function qC(e,t,r,a,o){var n,s;let{visualElement:i}=(0,Vt.useContext)(po),l=(0,Vt.useContext)(Md),u=(0,Vt.useContext)(co),c=(0,Vt.useContext)(Os).reducedMotion,d=(0,Vt.useRef)(null);a=a||l.renderer,!d.current&&a&&(d.current=a(e,{visualState:t,parent:i,props:r,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:c}));let f=d.current,h=(0,Vt.useContext)(Vd);f&&!f.projection&&o&&(f.type==="html"||f.type==="svg")&&p1(d.current,r,o,h);let v=(0,Vt.useRef)(!1);(0,Vt.useInsertionEffect)(()=>{f&&v.current&&f.update(r,u)});let x=r[Ud],C=(0,Vt.useRef)(!!x&&!(!((n=window.MotionHandoffIsComplete)===null||n===void 0)&&n.call(window,x))&&((s=window.MotionHasOptimisedAnimation)===null||s===void 0?void 0:s.call(window,x)));return Rd(()=>{f&&(v.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),Vs.render(f.render),C.current&&f.animationState&&f.animationState.animateChanges())}),(0,Vt.useEffect)(()=>{f&&(!C.current&&f.animationState&&f.animationState.animateChanges(),C.current&&(queueMicrotask(()=>{var g;(g=window.MotionHandoffMarkAsComplete)===null||g===void 0||g.call(window,x)}),C.current=!1))}),f}function p1(e,t,r,a){let{layoutId:o,layout:n,drag:s,dragConstraints:i,layoutScroll:l,layoutRoot:u}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:HC(e.parent)),e.projection.setOptions({layoutId:o,layout:n,alwaysMeasureLayout:!!s||i&&La(i),visualElement:e,animationType:typeof n=="string"?n:"both",initialPromotionConfig:a,layoutScroll:l,layoutRoot:u})}function HC(e){if(e)return e.options.allowProjection!==!1?e.projection:HC(e.parent)}function zC({preloadedFeatures:e,createVisualElement:t,useRender:r,useVisualState:a,Component:o}){var n,s;e&&AC(e);function i(u,c){let d,f={...(0,js.useContext)(Os),...u,layoutId:m1(u)},{isStatic:h}=f,v=BC(u),x=a(u,h);if(!h&&Bs){h1(f,e);let C=g1(f);d=C.MeasureLayout,v.visualElement=qC(o,x,f,t,C.ProjectionNode)}return(0,jd.jsxs)(po.Provider,{value:v,children:[d&&v.visualElement?(0,jd.jsx)(d,{visualElement:v.visualElement,...f}):null,r(o,u,VC(x,v.visualElement,c),x,h,v.visualElement)]})}i.displayName=`motion.${typeof o=="string"?o:`create(${(s=(n=o.displayName)!==null&&n!==void 0?n:o.name)!==null&&s!==void 0?s:""})`}`;let l=(0,js.forwardRef)(i);return l[FC]=o,l}function m1({layoutId:e}){let t=(0,js.useContext)(Ns).id;return t&&e!==void 0?t+"-"+e:e}function h1(e,t){let r=(0,js.useContext)(Md).strict}function g1(e){let{drag:t,layout:r}=Ca;if(!t&&!r)return{};let a={...t,...r};return{MeasureLayout:t?.isEnabled(e)||r?.isEnabled(e)?a.MeasureLayout:void 0,ProjectionNode:a.ProjectionNode}}var $C=["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 qs(e){return typeof e!="string"||e.includes("-")?!1:!!($C.indexOf(e)>-1||/[A-Z]/u.test(e))}var vg=O(Q(),1);function WC(e){let t=[{},{}];return e?.values.forEach((r,a)=>{t[0][a]=r.get(),t[1][a]=r.getVelocity()}),t}function Hs(e,t,r,a){if(typeof t=="function"){let[o,n]=WC(a);t=t(r!==void 0?r:e.custom,o,n)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){let[o,n]=WC(a);t=t(r!==void 0?r:e.custom,o,n)}return t}var eu=e=>Array.isArray(e);var GC=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),KC=e=>eu(e)?e[e.length-1]||0:e;var be=e=>!!(e&&e.getVelocity);function zs(e){let t=be(e)?e.get():e;return GC(t)?t.toValue():t}function y1({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:r},a,o,n){let s={latestValues:v1(a,o,n,e),renderState:t()};return r&&(s.onMount=i=>r({props:a,current:i,...s}),s.onUpdate=i=>r(i)),s}var qd=e=>(t,r)=>{let a=(0,vg.useContext)(po),o=(0,vg.useContext)(co),n=()=>y1(e,t,a,o);return r?n():Ms(n)};function v1(e,t,r,a){let o={},n=a(e,{});for(let f in n)o[f]=zs(n[f]);let{initial:s,animate:i}=e,l=yn(e),u=Bd(e);t&&u&&!l&&e.inherit!==!1&&(s===void 0&&(s=t.initial),i===void 0&&(i=t.animate));let c=r?r.initial===!1:!1;c=c||s===!1;let d=c?i:s;if(d&&typeof d!="boolean"&&!mo(d)){let f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){let v=Hs(e,f[h]);if(v){let{transitionEnd:x,transition:C,...g}=v;for(let p in g){let y=g[p];if(Array.isArray(y)){let b=c?y.length-1:0;y=y[b]}y!==null&&(o[p]=y)}for(let p in x)o[p]=x[p]}}}return o}var $r=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],jt=new Set($r);var XC=e=>t=>typeof t=="string"&&t.startsWith(e),Hd=XC("--"),x1=XC("var(--"),$s=e=>x1(e)?w1.test(e.split("/*")[0].trim()):!1,w1=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;var zd=(e,t)=>t&&typeof e=="number"?t.transform(e):e;var ft=(e,t,r)=>r>t?t:r<e?e:r;var Wr={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ia={...Wr,transform:e=>ft(0,1,e)},tu={...Wr,default:1};var ru=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Gr=ru("deg"),_t=ru("%"),z=ru("px"),JC=ru("vh"),QC=ru("vw"),xg={..._t,parse:e=>_t.parse(e)/100,transform:e=>_t.transform(e*100)};var YC={borderWidth:z,borderTopWidth:z,borderRightWidth:z,borderBottomWidth:z,borderLeftWidth:z,borderRadius:z,radius:z,borderTopLeftRadius:z,borderTopRightRadius:z,borderBottomRightRadius:z,borderBottomLeftRadius:z,width:z,maxWidth:z,height:z,maxHeight:z,top:z,right:z,bottom:z,left:z,padding:z,paddingTop:z,paddingRight:z,paddingBottom:z,paddingLeft:z,margin:z,marginTop:z,marginRight:z,marginBottom:z,marginLeft:z,backgroundPositionX:z,backgroundPositionY:z};var ZC={rotate:Gr,rotateX:Gr,rotateY:Gr,rotateZ:Gr,scale:tu,scaleX:tu,scaleY:tu,scaleZ:tu,skew:Gr,skewX:Gr,skewY:Gr,distance:z,translateX:z,translateY:z,translateZ:z,x:z,y:z,z,perspective:z,transformPerspective:z,opacity:Ia,originX:xg,originY:xg,originZ:z};var wg={...Wr,transform:Math.round};var Ws={...YC,...ZC,zIndex:wg,size:z,fillOpacity:Ia,strokeOpacity:Ia,numOctaves:wg};var S1={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},C1=$r.length;function eb(e,t,r){let a="",o=!0;for(let n=0;n<C1;n++){let s=$r[n],i=e[s];if(i===void 0)continue;let l=!0;if(typeof i=="number"?l=i===(s.startsWith("scale")?1:0):l=parseFloat(i)===0,!l||r){let u=zd(i,Ws[s]);if(!l){o=!1;let c=S1[s]||s;a+=`${c}(${u}) `}r&&(t[s]=u)}}return a=a.trim(),r?a=r(t,o?"":a):o&&(a="none"),a}function Gs(e,t,r){let{style:a,vars:o,transformOrigin:n}=e,s=!1,i=!1;for(let l in t){let u=t[l];if(jt.has(l)){s=!0;continue}else if(Hd(l)){o[l]=u;continue}else{let c=zd(u,Ws[l]);l.startsWith("origin")?(i=!0,n[l]=c):a[l]=c}}if(t.transform||(s||r?a.transform=eb(t,e.transform,r):a.transform&&(a.transform="none")),i){let{originX:l="50%",originY:u="50%",originZ:c=0}=n;a.transformOrigin=`${l} ${u} ${c}`}}var b1={offset:"stroke-dashoffset",array:"stroke-dasharray"},L1={offset:"strokeDashoffset",array:"strokeDasharray"};function tb(e,t,r=1,a=0,o=!0){e.pathLength=1;let n=o?b1:L1;e[n.offset]=z.transform(-a);let s=z.transform(t),i=z.transform(r);e[n.array]=`${s} ${i}`}function rb(e,t,r){return typeof e=="string"?e:z.transform(t+r*e)}function ab(e,t,r){let a=rb(t,e.x,e.width),o=rb(r,e.y,e.height);return`${a} ${o}`}function Ks(e,{attrX:t,attrY:r,attrScale:a,originX:o,originY:n,pathLength:s,pathSpacing:i=1,pathOffset:l=0,...u},c,d){if(Gs(e,u,d),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:f,style:h,dimensions:v}=e;f.transform&&(v&&(h.transform=f.transform),delete f.transform),v&&(o!==void 0||n!==void 0||h.transform)&&(h.transformOrigin=ab(v,o!==void 0?o:.5,n!==void 0?n:.5)),t!==void 0&&(f.x=t),r!==void 0&&(f.y=r),a!==void 0&&(f.scale=a),s!==void 0&&tb(f,s,i,l,!1)}var Xs=()=>({style:{},transform:{},transformOrigin:{},vars:{}});var $d=()=>({...Xs(),attrs:{}});var Js=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Wd(e,{style:t,vars:r},a,o){Object.assign(e.style,t,o&&o.getProjectionStyles(a));for(let n in r)e.style.setProperty(n,r[n])}var Gd=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 Kd(e,t,r,a){Wd(e,t,void 0,a);for(let o in t.attrs)e.setAttribute(Gd.has(o)?o:Us(o),t.attrs[o])}var Qs={};function ob(e){Object.assign(Qs,e)}function Xd(e,{layout:t,layoutId:r}){return jt.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!Qs[e]||e==="opacity")}function Ys(e,t,r){var a;let{style:o}=e,n={};for(let s in o)(be(o[s])||t.style&&be(t.style[s])||Xd(s,e)||((a=r?.getValue(s))===null||a===void 0?void 0:a.liveStyle)!==void 0)&&(n[s]=o[s]);return n}function Jd(e,t,r){let a=Ys(e,t,r);for(let o in e)if(be(e[o])||be(t[o])){let n=$r.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;a[n]=e[o]}return a}function I1(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}var nb=["x","y","width","height","cx","cy","r"],sb={useVisualState:qd({scrapeMotionValuesFromProps:Jd,createRenderState:$d,onUpdate:({props:e,prevProps:t,current:r,renderState:a,latestValues:o})=>{if(!r)return;let n=!!e.drag;if(!n){for(let i in o)if(jt.has(i)){n=!0;break}}if(!n)return;let s=!t;if(t)for(let i=0;i<nb.length;i++){let l=nb[i];e[l]!==t[l]&&(s=!0)}s&&re.read(()=>{I1(r,a),re.render(()=>{Ks(a,o,Js(r.tagName),e.transformTemplate),Kd(r,a)})})}})};var ib={useVisualState:qd({scrapeMotionValuesFromProps:Ys,createRenderState:Xs})};var Zs=O(Q(),1);var lb=O(Q(),1);function Sg(e,t,r){for(let a in t)!be(t[a])&&!Xd(a,r)&&(e[a]=t[a])}function k1({transformTemplate:e},t){return(0,lb.useMemo)(()=>{let r=Xs();return Gs(r,t,e),Object.assign({},r.vars,r.style)},[t])}function P1(e,t){let r=e.style||{},a={};return Sg(a,r,e),Object.assign(a,k1(e,t)),a}function ub(e,t){let r={},a=P1(e,t);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,a.userSelect=a.WebkitUserSelect=a.WebkitTouchCallout="none",a.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=a,r}var cb=O(Q(),1);function db(e,t,r,a){let o=(0,cb.useMemo)(()=>{let n=$d();return Ks(n,t,Js(a),e.transformTemplate),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let n={};Sg(n,e.style,e),o.style={...n,...o.style}}return o}function fb(e=!1){return(r,a,o,{latestValues:n},s)=>{let l=(qs(r)?db:ub)(a,n,s,r),u=EC(a,typeof r=="string",e),c=r!==Zs.Fragment?{...u,...l,ref:o}:{},{children:d}=a,f=(0,Zs.useMemo)(()=>be(d)?d.get():d,[d]);return(0,Zs.createElement)(r,{...c,children:f})}}function pb(e,t){return function(a,{forwardMotionProps:o}={forwardMotionProps:!1}){let s={...qs(a)?sb:ib,preloadedFeatures:e,useRender:fb(o),createVisualElement:t,Component:a};return zC(s)}}function Cg(e,t){if(!Array.isArray(t))return!1;let r=t.length;if(r!==e.length)return!1;for(let a=0;a<r;a++)if(t[a]!==e[a])return!1;return!0}function ho(e,t,r){let a=e.getProps();return Hs(a,t,r!==void 0?r:a.custom,e)}var bg=gn(()=>window.ScrollTimeline!==void 0);var au=class{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,r){for(let a=0;a<this.animations.length;a++)this.animations[a][t]=r}attachTimeline(t,r){let a=this.animations.map(o=>{if(bg()&&o.attachTimeline)return o.attachTimeline(t);if(typeof r=="function")return r(o)});return()=>{a.forEach((o,n)=>{o&&o(),this.animations[n].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let r=0;r<this.animations.length;r++)t=Math.max(t,this.animations[r].duration);return t}runAll(t){this.animations.forEach(r=>r[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}};var ou=class extends au{then(t,r){return Promise.all(this.animations).then(t).catch(r)}};function go(e,t){return e?e[t]||e.default||e:void 0}function ei(e){let t=0,r=50,a=e.next(t);for(;!a.done&&t<2e4;)t+=r,a=e.next(t);return t>=2e4?1/0:t}function yo(e){return typeof e=="function"}function nu(e,t){e.timeline=t,e.onfinish=null}var ti=e=>Array.isArray(e)&&typeof e[0]=="number";var Ig={linearEasing:void 0};function mb(e,t){let r=gn(e);return()=>{var a;return(a=Ig[t])!==null&&a!==void 0?a:r()}}var vo=mb(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");var su=(e,t,r=10)=>{let a="",o=Math.max(Math.round(t/r),2);for(let n=0;n<o;n++)a+=e(rr(0,o-1,n))+", ";return`linear(${a.substring(0,a.length-2)})`};function Yd(e){return!!(typeof e=="function"&&vo()||!e||typeof e=="string"&&(e in Qd||vo())||ti(e)||Array.isArray(e)&&e.every(Yd))}var ri=([e,t,r,a])=>`cubic-bezier(${e}, ${t}, ${r}, ${a})`,Qd={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ri([0,.65,.55,1]),circOut:ri([.55,0,1,.45]),backIn:ri([.31,.01,.66,-.59]),backOut:ri([.33,1.53,.69,.99])};function ai(e,t){if(e)return typeof e=="function"&&vo()?su(e,t):ti(e)?ri(e):Array.isArray(e)?e.map(r=>ai(r,t)||Qd.easeOut):Qd[e]}var or={x:!1,y:!1};function oi(){return or.x||or.y}function kg(e,t,r){var a;if(e instanceof Element)return[e];if(typeof e=="string"){let o=document;t&&(o=t.current);let n=(a=r?.[e])!==null&&a!==void 0?a:o.querySelectorAll(e);return n?Array.from(n):[]}return Array.from(e)}function Zd(e,t){let r=kg(e),a=new AbortController,o={passive:!0,...t,signal:a.signal};return[r,o,()=>a.abort()]}function hb(e){return t=>{t.pointerType==="touch"||oi()||e(t)}}function Pg(e,t,r={}){let[a,o,n]=Zd(e,r),s=hb(i=>{let{target:l}=i,u=t(i);if(typeof u!="function"||!l)return;let c=hb(d=>{u(d),l.removeEventListener("pointerleave",c)});l.addEventListener("pointerleave",c,o)});return a.forEach(i=>{i.addEventListener("pointerenter",s,o)}),n}var ef=(e,t)=>t?e===t?!0:ef(e,t.parentElement):!1;var vn=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;var T1=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function gb(e){return T1.has(e.tagName)||e.tabIndex!==-1}var xn=new WeakSet;function yb(e){return t=>{t.key==="Enter"&&e(t)}}function Tg(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}var vb=(e,t)=>{let r=e.currentTarget;if(!r)return;let a=yb(()=>{if(xn.has(r))return;Tg(r,"down");let o=yb(()=>{Tg(r,"up")}),n=()=>Tg(r,"cancel");r.addEventListener("keyup",o,t),r.addEventListener("blur",n,t)});r.addEventListener("keydown",a,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",a),t)};function xb(e){return vn(e)&&!oi()}function _g(e,t,r={}){let[a,o,n]=Zd(e,r),s=i=>{let l=i.currentTarget;if(!xb(i)||xn.has(l))return;xn.add(l);let u=t(i),c=(h,v)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),!(!xb(h)||!xn.has(l))&&(xn.delete(l),typeof u=="function"&&u(h,{success:v}))},d=h=>{c(h,r.useGlobalTarget||ef(l,h.target))},f=h=>{c(h,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",f,o)};return a.forEach(i=>{!gb(i)&&i.getAttribute("tabindex")===null&&(i.tabIndex=0),(r.useGlobalTarget?window:i).addEventListener("pointerdown",s,o),i.addEventListener("focus",u=>vb(u,o),o)}),n}function Ag(e){return e==="x"||e==="y"?or[e]?null:(or[e]=!0,()=>{or[e]=!1}):or.x||or.y?null:(or.x=or.y=!0,()=>{or.x=or.y=!1})}var tf=new Set(["width","height","top","left","right","bottom",...$r]);var rf;function A1(){rf=void 0}var Ct={now:()=>(rf===void 0&&Ct.set(He.isProcessing||Fs.useManualTiming?He.timestamp:performance.now()),rf),set:e=>{rf=e,queueMicrotask(A1)}};function ni(e,t){e.indexOf(t)===-1&&e.push(t)}function si(e,t){let r=e.indexOf(t);r>-1&&e.splice(r,1)}var xo=class{constructor(){this.subscriptions=[]}add(t){return ni(this.subscriptions,t),()=>si(this.subscriptions,t)}notify(t,r,a){let o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,r,a);else for(let n=0;n<o;n++){let s=this.subscriptions[n];s&&s(t,r,a)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};function af(e,t){return t?e*(1e3/t):0}var Sb=30,R1=e=>!isNaN(parseFloat(e)),Cb={current:void 0},Rg=class{constructor(t,r={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(a,o=!0)=>{let n=Ct.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(a),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=r.owner}setCurrent(t){this.current=t,this.updatedAt=Ct.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=R1(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,r){this.events[t]||(this.events[t]=new xo);let a=this.events[t].add(r);return t==="change"?()=>{a(),re.read(()=>{this.events.change.getSize()||this.stop()})}:a}clearListeners(){for(let t in this.events)this.events[t].clear()}attach(t,r){this.passiveEffect=t,this.stopPassiveEffect=r}set(t,r=!0){!r||!this.passiveEffect?this.updateAndNotify(t,r):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,r,a){this.set(r),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-a}jump(t,r=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return Cb.current&&Cb.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let t=Ct.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Sb)return 0;let r=Math.min(this.updatedAt-this.prevUpdatedAt,Sb);return af(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(t){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=t(r),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function ka(e,t){return new Rg(e,t)}function E1(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,ka(r))}function bb(e,t){let r=ho(e,t),{transitionEnd:a={},transition:o={},...n}=r||{};n={...n,...a};for(let s in n){let i=KC(n[s]);E1(e,s,i)}}function Lb(e){return!!(be(e)&&e.add)}function iu(e,t){let r=e.getValue("willChange");if(Lb(r))return r.add(t)}function of(e){return e.props[Ud]}var nf={current:!1};var Ib=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,D1=1e-7,N1=12;function M1(e,t,r,a,o){let n,s,i=0;do s=t+(r-t)/2,n=Ib(s,a,o)-e,n>0?r=s:t=s;while(Math.abs(n)>D1&&++i<N1);return s}function wo(e,t,r,a){if(e===t&&r===a)return ye;let o=n=>M1(n,0,1,e,r);return n=>n===0||n===1?n:Ib(o(n),t,a)}var sf=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2;var lf=e=>t=>1-e(1-t);var Eg=wo(.33,1.53,.69,.99),lu=lf(Eg),uf=sf(lu);var cf=e=>(e*=2)<1?.5*lu(e):.5*(2-Math.pow(2,-10*(e-1)));var df=e=>1-Math.sin(Math.acos(e)),ff=lf(df),pf=sf(df);var mf=e=>/^0[^.\s]+$/u.test(e);function kb(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||mf(e):!0}var So=e=>Math.round(e*1e5)/1e5;var ii=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Pb(e){return e==null}var Tb=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;var li=(e,t)=>r=>!!(typeof r=="string"&&Tb.test(r)&&r.startsWith(e)||t&&!Pb(r)&&Object.prototype.hasOwnProperty.call(r,t)),hf=(e,t,r)=>a=>{if(typeof a!="string")return a;let[o,n,s,i]=a.match(ii);return{[e]:parseFloat(o),[t]:parseFloat(n),[r]:parseFloat(s),alpha:i!==void 0?parseFloat(i):1}};var O1=e=>ft(0,255,e),Dg={...Wr,transform:e=>Math.round(O1(e))},Kr={test:li("rgb","red"),parse:hf("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:a=1})=>"rgba("+Dg.transform(e)+", "+Dg.transform(t)+", "+Dg.transform(r)+", "+So(Ia.transform(a))+")"};function B1(e){let t="",r="",a="",o="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),a=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),a=e.substring(3,4),o=e.substring(4,5),t+=t,r+=r,a+=a,o+=o),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(a,16),alpha:o?parseInt(o,16)/255:1}}var uu={test:li("#"),parse:B1,transform:Kr.transform};var Co={test:li("hsl","hue"),parse:hf("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:a=1})=>"hsla("+Math.round(e)+", "+_t.transform(So(t))+", "+_t.transform(So(r))+", "+So(Ia.transform(a))+")"};var Ge={test:e=>Kr.test(e)||uu.test(e)||Co.test(e),parse:e=>Kr.test(e)?Kr.parse(e):Co.test(e)?Co.parse(e):uu.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Kr.transform(e):Co.transform(e)};var _b=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function F1(e){var t,r;return isNaN(e)&&typeof e=="string"&&(((t=e.match(ii))===null||t===void 0?void 0:t.length)||0)+(((r=e.match(_b))===null||r===void 0?void 0:r.length)||0)>0}var Rb="number",Eb="color",U1="var",V1="var(",Ab="${}",j1=/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 wn(e){let t=e.toString(),r=[],a={color:[],number:[],var:[]},o=[],n=0,i=t.replace(j1,l=>(Ge.test(l)?(a.color.push(n),o.push(Eb),r.push(Ge.parse(l))):l.startsWith(V1)?(a.var.push(n),o.push(U1),r.push(l)):(a.number.push(n),o.push(Rb),r.push(parseFloat(l))),++n,Ab)).split(Ab);return{values:r,split:i,indexes:a,types:o}}function Db(e){return wn(e).values}function Nb(e){let{split:t,types:r}=wn(e),a=t.length;return o=>{let n="";for(let s=0;s<a;s++)if(n+=t[s],o[s]!==void 0){let i=r[s];i===Rb?n+=So(o[s]):i===Eb?n+=Ge.transform(o[s]):n+=o[s]}return n}}var q1=e=>typeof e=="number"?0:e;function H1(e){let t=Db(e);return Nb(e)(t.map(q1))}var At={test:F1,parse:Db,createTransformer:Nb,getAnimatableNone:H1};var z1=new Set(["brightness","contrast","saturate","opacity"]);function $1(e){let[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;let[a]=r.match(ii)||[];if(!a)return e;let o=r.replace(a,""),n=z1.has(t)?1:0;return a!==r&&(n*=100),t+"("+n+o+")"}var W1=/\b([a-z-]*)\(.*?\)/gu,cu={...At,getAnimatableNone:e=>{let t=e.match(W1);return t?t.map($1).join(" "):e}};var G1={...Ws,color:Ge,backgroundColor:Ge,outlineColor:Ge,fill:Ge,stroke:Ge,borderColor:Ge,borderTopColor:Ge,borderRightColor:Ge,borderBottomColor:Ge,borderLeftColor:Ge,filter:cu,WebkitFilter:cu},ui=e=>G1[e];function gf(e,t){let r=ui(e);return r!==cu&&(r=At),r.getAnimatableNone?r.getAnimatableNone(t):void 0}var K1=new Set(["auto","none","0"]);function Mb(e,t,r){let a=0,o;for(;a<e.length&&!o;){let n=e[a];typeof n=="string"&&!K1.has(n)&&wn(n).values.length&&(o=e[a]),a++}if(o&&r)for(let n of t)e[n]=gf(r,o)}var Ng=e=>e===Wr||e===z,Ob=(e,t)=>parseFloat(e.split(", ")[t]),Bb=(e,t)=>(r,{transform:a})=>{if(a==="none"||!a)return 0;let o=a.match(/^matrix3d\((.+)\)$/u);if(o)return Ob(o[1],t);{let n=a.match(/^matrix\((.+)\)$/u);return n?Ob(n[1],e):0}},X1=new Set(["x","y","z"]),J1=$r.filter(e=>!X1.has(e));function Fb(e){let t=[];return J1.forEach(r=>{let a=e.getValue(r);a!==void 0&&(t.push([r,a.get()]),a.set(r.startsWith("scale")?1:0))}),t}var Sn={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Bb(4,13),y:Bb(5,14)};Sn.translateX=Sn.x;Sn.translateY=Sn.y;var Cn=new Set,Mg=!1,Og=!1;function Ub(){if(Og){let e=Array.from(Cn).filter(a=>a.needsMeasurement),t=new Set(e.map(a=>a.element)),r=new Map;t.forEach(a=>{let o=Fb(a);o.length&&(r.set(a,o),a.render())}),e.forEach(a=>a.measureInitialState()),t.forEach(a=>{a.render();let o=r.get(a);o&&o.forEach(([n,s])=>{var i;(i=a.getValue(n))===null||i===void 0||i.set(s)})}),e.forEach(a=>a.measureEndState()),e.forEach(a=>{a.suspendedScrollY!==void 0&&window.scrollTo(0,a.suspendedScrollY)})}Og=!1,Mg=!1,Cn.forEach(e=>e.complete()),Cn.clear()}function Vb(){Cn.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Og=!0)})}function jb(){Vb(),Ub()}var bo=class{constructor(t,r,a,o,n,s=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=r,this.name=a,this.motionValue=o,this.element=n,this.isAsync=s}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Cn.add(this),Mg||(Mg=!0,re.read(Vb),re.resolveKeyframes(Ub))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:t,name:r,element:a,motionValue:o}=this;for(let n=0;n<t.length;n++)if(t[n]===null)if(n===0){let s=o?.get(),i=t[t.length-1];if(s!==void 0)t[0]=s;else if(a&&r){let l=a.readValue(r,i);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=i),o&&s===void 0&&o.set(t[0])}else t[n]=t[n-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Cn.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Cn.delete(this))}resume(){this.isComplete||this.scheduleResolve()}};var yf=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);var Q1=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Y1(e){let t=Q1.exec(e);if(!t)return[,];let[,r,a,o]=t;return[`--${r??a}`,o]}var Z1=4;function Bg(e,t,r=1){Er(r<=Z1,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);let[a,o]=Y1(e);if(!a)return;let n=window.getComputedStyle(t).getPropertyValue(a);if(n){let s=n.trim();return yf(s)?parseFloat(s):s}return $s(o)?Bg(o,t,r+1):o}var vf=e=>t=>t.test(e);var qb={test:e=>e==="auto",parse:e=>e};var Fg=[Wr,z,_t,Gr,QC,JC,qb],Ug=e=>Fg.find(vf(e));var ci=class extends bo{constructor(t,r,a,o,n){super(t,r,a,o,n,!0)}readKeyframes(){let{unresolvedKeyframes:t,element:r,name:a}=this;if(!r||!r.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let u=t[l];if(typeof u=="string"&&(u=u.trim(),$s(u))){let c=Bg(u,r.current);c!==void 0&&(t[l]=c),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!tf.has(a)||t.length!==2)return;let[o,n]=t,s=Ug(o),i=Ug(n);if(s!==i)if(Ng(s)&&Ng(i))for(let l=0;l<t.length;l++){let u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){let{unresolvedKeyframes:t,name:r}=this,a=[];for(let o=0;o<t.length;o++)kb(t[o])&&a.push(o);a.length&&Mb(t,a,r)}measureInitialState(){let{element:t,unresolvedKeyframes:r,name:a}=this;if(!t||!t.current)return;a==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Sn[a](t.measureViewportBox(),window.getComputedStyle(t.current)),r[0]=this.measuredOrigin;let o=r[r.length-1];o!==void 0&&t.getValue(a,o).jump(o,!1)}measureEndState(){var t;let{element:r,name:a,unresolvedKeyframes:o}=this;if(!r||!r.current)return;let n=r.getValue(a);n&&n.jump(this.measuredOrigin,!1);let s=o.length-1,i=o[s];o[s]=Sn[a](r.measureViewportBox(),window.getComputedStyle(r.current)),i!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=i),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,u])=>{r.getValue(l).set(u)}),this.resolveNoneKeyframes()}};var Vg=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(At.test(e)||e==="0")&&!e.startsWith("url("));function eE(e){let t=e[0];if(e.length===1)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}function Hb(e,t,r,a){let o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;let n=e[e.length-1],s=Vg(o,t),i=Vg(n,t);return Sa(s===i,`You are trying to animate ${t} from "${o}" to "${n}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${n} via the \`style\` property.`),!s||!i?!1:eE(e)||(r==="spring"||yo(r))&&a}var tE=e=>e!==null;function Lo(e,{repeat:t,repeatType:r="loop"},a){let o=e.filter(tE),n=t&&r!=="loop"&&t%2===1?0:o.length-1;return!n||a===void 0?o[n]:a}var rE=40,di=class{constructor({autoplay:t=!0,delay:r=0,type:a="keyframes",repeat:o=0,repeatDelay:n=0,repeatType:s="loop",...i}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Ct.now(),this.options={autoplay:t,delay:r,type:a,repeat:o,repeatDelay:n,repeatType:s,...i},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>rE?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&jb(),this._resolved}onKeyframesResolved(t,r){this.resolvedAt=Ct.now(),this.hasAttemptedResolve=!0;let{name:a,type:o,velocity:n,delay:s,onComplete:i,onUpdate:l,isGenerator:u}=this.options;if(!u&&!Hb(t,a,o,n))if(nf.current||!s){l&&l(Lo(t,this.options,r)),i&&i(),this.resolveFinishedPromise();return}else this.options.duration=0;let c=this.initPlayback(t,r);c!==!1&&(this._resolved={keyframes:t,finalKeyframe:r,...c},this.onPostResolved())}onPostResolved(){}then(t,r){return this.currentFinishedPromise.then(t,r)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}};var le=(e,t,r)=>e+(t-e)*r;function jg(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function zb({hue:e,saturation:t,lightness:r,alpha:a}){e/=360,t/=100,r/=100;let o=0,n=0,s=0;if(!t)o=n=s=r;else{let i=r<.5?r*(1+t):r+t-r*t,l=2*r-i;o=jg(l,i,e+1/3),n=jg(l,i,e),s=jg(l,i,e-1/3)}return{red:Math.round(o*255),green:Math.round(n*255),blue:Math.round(s*255),alpha:a}}function fi(e,t){return r=>r>0?t:e}var qg=(e,t,r)=>{let a=e*e,o=r*(t*t-a)+a;return o<0?0:Math.sqrt(o)},aE=[uu,Kr,Co],oE=e=>aE.find(t=>t.test(e));function $b(e){let t=oE(e);if(Sa(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let r=t.parse(e);return t===Co&&(r=zb(r)),r}var Hg=(e,t)=>{let r=$b(e),a=$b(t);if(!r||!a)return fi(e,t);let o={...r};return n=>(o.red=qg(r.red,a.red,n),o.green=qg(r.green,a.green,n),o.blue=qg(r.blue,a.blue,n),o.alpha=le(r.alpha,a.alpha,n),Kr.transform(o))};var nE=(e,t)=>r=>t(e(r)),Xr=(...e)=>e.reduce(nE);var xf=new Set(["none","hidden"]);function Wb(e,t){return xf.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function sE(e,t){return r=>le(e,t,r)}function wf(e){return typeof e=="number"?sE:typeof e=="string"?$s(e)?fi:Ge.test(e)?Hg:uE:Array.isArray(e)?Gb:typeof e=="object"?Ge.test(e)?Hg:iE:fi}function Gb(e,t){let r=[...e],a=r.length,o=e.map((n,s)=>wf(n)(n,t[s]));return n=>{for(let s=0;s<a;s++)r[s]=o[s](n);return r}}function iE(e,t){let r={...e,...t},a={};for(let o in r)e[o]!==void 0&&t[o]!==void 0&&(a[o]=wf(e[o])(e[o],t[o]));return o=>{for(let n in a)r[n]=a[n](o);return r}}function lE(e,t){var r;let a=[],o={color:0,var:0,number:0};for(let n=0;n<t.values.length;n++){let s=t.types[n],i=e.indexes[s][o[s]],l=(r=e.values[i])!==null&&r!==void 0?r:0;a[n]=l,o[s]++}return a}var uE=(e,t)=>{let r=At.createTransformer(t),a=wn(e),o=wn(t);return a.indexes.var.length===o.indexes.var.length&&a.indexes.color.length===o.indexes.color.length&&a.indexes.number.length>=o.indexes.number.length?xf.has(e)&&!o.values.length||xf.has(t)&&!a.values.length?Wb(e,t):Xr(Gb(lE(a,o),o.values),r):(Sa(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),fi(e,t))};function Sf(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?le(e,t,r):wf(e)(e,t)}var cE=5;function Cf(e,t,r){let a=Math.max(t-cE,0);return af(r-e(a),t-a)}var Te={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};var zg=.001;function Kb({duration:e=Te.duration,bounce:t=Te.bounce,velocity:r=Te.velocity,mass:a=Te.mass}){let o,n;Sa(e<=qe(Te.maxDuration),"Spring duration must be 10 seconds or less");let s=1-t;s=ft(Te.minDamping,Te.maxDamping,s),e=ft(Te.minDuration,Te.maxDuration,dt(e)),s<1?(o=u=>{let c=u*s,d=c*e,f=c-r,h=bf(u,s),v=Math.exp(-d);return zg-f/h*v},n=u=>{let d=u*s*e,f=d*r+r,h=Math.pow(s,2)*Math.pow(u,2)*e,v=Math.exp(-d),x=bf(Math.pow(u,2),s);return(-o(u)+zg>0?-1:1)*((f-h)*v)/x}):(o=u=>{let c=Math.exp(-u*e),d=(u-r)*e+1;return-zg+c*d},n=u=>{let c=Math.exp(-u*e),d=(r-u)*(e*e);return c*d});let i=5/e,l=fE(o,n,i);if(e=qe(e),isNaN(l))return{stiffness:Te.stiffness,damping:Te.damping,duration:e};{let u=Math.pow(l,2)*a;return{stiffness:u,damping:s*2*Math.sqrt(a*u),duration:e}}}var dE=12;function fE(e,t,r){let a=r;for(let o=1;o<dE;o++)a=a-e(a)/t(a);return a}function bf(e,t){return e*Math.sqrt(1-t*t)}var pE=["duration","bounce"],mE=["stiffness","damping","mass"];function Xb(e,t){return t.some(r=>e[r]!==void 0)}function hE(e){let t={velocity:Te.velocity,stiffness:Te.stiffness,damping:Te.damping,mass:Te.mass,isResolvedFromDuration:!1,...e};if(!Xb(e,mE)&&Xb(e,pE))if(e.visualDuration){let r=e.visualDuration,a=2*Math.PI/(r*1.2),o=a*a,n=2*ft(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:Te.mass,stiffness:o,damping:n}}else{let r=Kb(e);t={...t,...r,mass:Te.mass},t.isResolvedFromDuration=!0}return t}function Lf(e=Te.visualDuration,t=Te.bounce){let r=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e,{restSpeed:a,restDelta:o}=r,n=r.keyframes[0],s=r.keyframes[r.keyframes.length-1],i={done:!1,value:n},{stiffness:l,damping:u,mass:c,duration:d,velocity:f,isResolvedFromDuration:h}=hE({...r,velocity:-dt(r.velocity||0)}),v=f||0,x=u/(2*Math.sqrt(l*c)),C=s-n,g=dt(Math.sqrt(l/c)),p=Math.abs(C)<5;a||(a=p?Te.restSpeed.granular:Te.restSpeed.default),o||(o=p?Te.restDelta.granular:Te.restDelta.default);let y;if(x<1){let L=bf(g,x);y=P=>{let T=Math.exp(-x*g*P);return s-T*((v+x*g*C)/L*Math.sin(L*P)+C*Math.cos(L*P))}}else if(x===1)y=L=>s-Math.exp(-g*L)*(C+(v+g*C)*L);else{let L=g*Math.sqrt(x*x-1);y=P=>{let T=Math.exp(-x*g*P),A=Math.min(L*P,300);return s-T*((v+x*g*C)*Math.sinh(A)+L*C*Math.cosh(A))/L}}let b={calculatedDuration:h&&d||null,next:L=>{let P=y(L);if(h)i.done=L>=d;else{let T=0;x<1&&(T=L===0?qe(v):Cf(y,L,P));let A=Math.abs(T)<=a,N=Math.abs(s-P)<=o;i.done=A&&N}return i.value=i.done?s:P,i},toString:()=>{let L=Math.min(ei(b),2e4),P=su(T=>b.next(L*T).value,L,30);return L+"ms "+P}};return b}function $g({keyframes:e,velocity:t=0,power:r=.8,timeConstant:a=325,bounceDamping:o=10,bounceStiffness:n=500,modifyTarget:s,min:i,max:l,restDelta:u=.5,restSpeed:c}){let d=e[0],f={done:!1,value:d},h=A=>i!==void 0&&A<i||l!==void 0&&A>l,v=A=>i===void 0?l:l===void 0||Math.abs(i-A)<Math.abs(l-A)?i:l,x=r*t,C=d+x,g=s===void 0?C:s(C);g!==C&&(x=g-d);let p=A=>-x*Math.exp(-A/a),y=A=>g+p(A),b=A=>{let N=p(A),j=y(A);f.done=Math.abs(N)<=u,f.value=f.done?g:j},L,P,T=A=>{h(f.value)&&(L=A,P=Lf({keyframes:[f.value,v(f.value)],velocity:Cf(y,A,f.value),damping:o,stiffness:n,restDelta:u,restSpeed:c}))};return T(0),{calculatedDuration:null,next:A=>{let N=!1;return!P&&L===void 0&&(N=!0,b(A),T(A)),L!==void 0&&A>=L?P.next(A-L):(!N&&b(A),f)}}}var Jb=wo(.42,0,1,1),Qb=wo(0,0,.58,1),If=wo(.42,0,.58,1);var Yb=e=>Array.isArray(e)&&typeof e[0]!="number";var Zb={linear:ye,easeIn:Jb,easeInOut:If,easeOut:Qb,circIn:df,circInOut:pf,circOut:ff,backIn:lu,backInOut:uf,backOut:Eg,anticipate:cf},Wg=e=>{if(ti(e)){Er(e.length===4,"Cubic bezier arrays must contain four numerical values.");let[t,r,a,o]=e;return wo(t,r,a,o)}else if(typeof e=="string")return Er(Zb[e]!==void 0,`Invalid easing type '${e}'`),Zb[e];return e};function gE(e,t,r){let a=[],o=r||Sf,n=e.length-1;for(let s=0;s<n;s++){let i=o(e[s],e[s+1]);if(t){let l=Array.isArray(t)?t[s]||ye:t;i=Xr(l,i)}a.push(i)}return a}function eL(e,t,{clamp:r=!0,ease:a,mixer:o}={}){let n=e.length;if(Er(n===t.length,"Both input and output ranges must be the same length"),n===1)return()=>t[0];if(n===2&&t[0]===t[1])return()=>t[1];let s=e[0]===e[1];e[0]>e[n-1]&&(e=[...e].reverse(),t=[...t].reverse());let i=gE(t,a,o),l=i.length,u=c=>{if(s&&c<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(c<e[d+1]);d++);let f=rr(e[d],e[d+1],c);return i[d](f)};return r?c=>u(ft(e[0],e[n-1],c)):u}function tL(e,t){let r=e[e.length-1];for(let a=1;a<=t;a++){let o=rr(0,t,a);e.push(le(r,1,o))}}function rL(e){let t=[0];return tL(t,e.length-1),t}function aL(e,t){return e.map(r=>r*t)}function yE(e,t){return e.map(()=>t||If).splice(0,e.length-1)}function du({duration:e=300,keyframes:t,times:r,ease:a="easeInOut"}){let o=Yb(a)?a.map(Wg):Wg(a),n={done:!1,value:t[0]},s=aL(r&&r.length===t.length?r:rL(t),e),i=eL(s,t,{ease:Array.isArray(o)?o:yE(t,o)});return{calculatedDuration:e,next:l=>(n.value=i(l),n.done=l>=e,n)}}var oL=e=>{let t=({timestamp:r})=>e(r);return{start:()=>re.update(t,!0),stop:()=>ar(t),now:()=>He.isProcessing?He.timestamp:Ct.now()}};var vE={decay:$g,inertia:$g,tween:du,keyframes:du,spring:Lf},xE=e=>e/100,bn=class extends di{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();let{onStop:l}=this.options;l&&l()};let{name:r,motionValue:a,element:o,keyframes:n}=this.options,s=o?.KeyframeResolver||bo,i=(l,u)=>this.onKeyframesResolved(l,u);this.resolver=new s(n,i,r,a,o),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){let{type:r="keyframes",repeat:a=0,repeatDelay:o=0,repeatType:n,velocity:s=0}=this.options,i=yo(r)?r:vE[r]||du,l,u;i!==du&&typeof t[0]!="number"&&(l=Xr(xE,Sf(t[0],t[1])),t=[0,100]);let c=i({...this.options,keyframes:t});n==="mirror"&&(u=i({...this.options,keyframes:[...t].reverse(),velocity:-s})),c.calculatedDuration===null&&(c.calculatedDuration=ei(c));let{calculatedDuration:d}=c,f=d+o,h=f*(a+1)-o;return{generator:c,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:f,totalDuration:h}}onPostResolved(){let{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,r=!1){let{resolved:a}=this;if(!a){let{keyframes:A}=this.options;return{done:!0,value:A[A.length-1]}}let{finalKeyframe:o,generator:n,mirroredGenerator:s,mapPercentToKeyframes:i,keyframes:l,calculatedDuration:u,totalDuration:c,resolvedDuration:d}=a;if(this.startTime===null)return n.next(0);let{delay:f,repeat:h,repeatType:v,repeatDelay:x,onUpdate:C}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-c/this.speed,this.startTime)),r?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;let g=this.currentTime-f*(this.speed>=0?1:-1),p=this.speed>=0?g<0:g>c;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let y=this.currentTime,b=n;if(h){let A=Math.min(this.currentTime,c)/d,N=Math.floor(A),j=A%1;!j&&A>=1&&(j=1),j===1&&N--,N=Math.min(N,h+1),N%2&&(v==="reverse"?(j=1-j,x&&(j-=x/d)):v==="mirror"&&(b=s)),y=ft(0,1,j)*d}let L=p?{done:!1,value:l[0]}:b.next(y);i&&(L.value=i(L.value));let{done:P}=L;!p&&u!==null&&(P=this.speed>=0?this.currentTime>=c:this.currentTime<=0);let T=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&P);return T&&o!==void 0&&(L.value=Lo(l,this.options,o)),C&&C(L.value),T&&this.finish(),L}get duration(){let{resolved:t}=this;return t?dt(t.calculatedDuration):0}get time(){return dt(this.currentTime)}set time(t){t=qe(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){let r=this.playbackSpeed!==t;this.playbackSpeed=t,r&&(this.time=dt(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;let{driver:t=oL,onPlay:r,startTime:a}=this.options;this.driver||(this.driver=t(n=>this.tick(n))),r&&r();let o=this.driver.now();this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=o):this.startTime=a??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";let{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}};var nL=new Set(["opacity","clipPath","filter","transform"]);function sL(e,t,r,{delay:a=0,duration:o=300,repeat:n=0,repeatType:s="loop",ease:i="easeInOut",times:l}={}){let u={[t]:r};l&&(u.offset=l);let c=ai(i,o);return Array.isArray(c)&&(u.easing=c),e.animate(u,{delay:a,duration:o,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:n+1,direction:s==="reverse"?"alternate":"normal"})}var iL=gn(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));var kf=10,wE=2e4;function SE(e){return yo(e.type)||e.type==="spring"||!Yd(e.ease)}function CE(e,t){let r=new bn({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0}),a={done:!1,value:e[0]},o=[],n=0;for(;!a.done&&n<wE;)a=r.sample(n),o.push(a.value),n+=kf;return{times:void 0,keyframes:o,duration:n-kf,ease:"linear"}}var lL={anticipate:cf,backInOut:uf,circInOut:pf};function bE(e){return e in lL}var fu=class extends di{constructor(t){super(t);let{name:r,motionValue:a,element:o,keyframes:n}=this.options;this.resolver=new ci(n,(s,i)=>this.onKeyframesResolved(s,i),r,a,o),this.resolver.scheduleResolve()}initPlayback(t,r){let{duration:a=300,times:o,ease:n,type:s,motionValue:i,name:l,startTime:u}=this.options;if(!i.owner||!i.owner.current)return!1;if(typeof n=="string"&&vo()&&bE(n)&&(n=lL[n]),SE(this.options)){let{onComplete:d,onUpdate:f,motionValue:h,element:v,...x}=this.options,C=CE(t,x);t=C.keyframes,t.length===1&&(t[1]=t[0]),a=C.duration,o=C.times,n=C.ease,s="keyframes"}let c=sL(i.owner.current,l,t,{...this.options,duration:a,times:o,ease:n});return c.startTime=u??this.calcStartTime(),this.pendingTimeline?(nu(c,this.pendingTimeline),this.pendingTimeline=void 0):c.onfinish=()=>{let{onComplete:d}=this.options;i.set(Lo(t,this.options,r)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:a,times:o,type:s,ease:n,keyframes:t}}get duration(){let{resolved:t}=this;if(!t)return 0;let{duration:r}=t;return dt(r)}get time(){let{resolved:t}=this;if(!t)return 0;let{animation:r}=t;return dt(r.currentTime||0)}set time(t){let{resolved:r}=this;if(!r)return;let{animation:a}=r;a.currentTime=qe(t)}get speed(){let{resolved:t}=this;if(!t)return 1;let{animation:r}=t;return r.playbackRate}set speed(t){let{resolved:r}=this;if(!r)return;let{animation:a}=r;a.playbackRate=t}get state(){let{resolved:t}=this;if(!t)return"idle";let{animation:r}=t;return r.playState}get startTime(){let{resolved:t}=this;if(!t)return null;let{animation:r}=t;return r.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{let{resolved:r}=this;if(!r)return ye;let{animation:a}=r;nu(a,t)}return ye}play(){if(this.isStopped)return;let{resolved:t}=this;if(!t)return;let{animation:r}=t;r.playState==="finished"&&this.updateFinishedPromise(),r.play()}pause(){let{resolved:t}=this;if(!t)return;let{animation:r}=t;r.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();let{resolved:t}=this;if(!t)return;let{animation:r,keyframes:a,duration:o,type:n,ease:s,times:i}=t;if(r.playState==="idle"||r.playState==="finished")return;if(this.time){let{motionValue:u,onUpdate:c,onComplete:d,element:f,...h}=this.options,v=new bn({...h,keyframes:a,duration:o,type:n,ease:s,times:i,isGenerator:!0}),x=qe(this.time);u.setWithVelocity(v.sample(x-kf).value,v.sample(x).value,kf)}let{onStop:l}=this.options;l&&l(),this.cancel()}complete(){let{resolved:t}=this;t&&t.animation.finish()}cancel(){let{resolved:t}=this;t&&t.animation.cancel()}static supports(t){let{motionValue:r,name:a,repeatDelay:o,repeatType:n,damping:s,type:i}=t;if(!r||!r.owner||!(r.owner.current instanceof HTMLElement))return!1;let{onUpdate:l,transformTemplate:u}=r.owner.getProps();return iL()&&a&&nL.has(a)&&!l&&!u&&!o&&n!=="mirror"&&s!==0&&i!=="inertia"}};var LE={type:"spring",stiffness:500,damping:25,restSpeed:10},IE=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),kE={type:"keyframes",duration:.8},PE={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},uL=(e,{keyframes:t})=>t.length>2?kE:jt.has(e)?e.startsWith("scale")?IE(t[1]):LE:PE;function cL({when:e,delay:t,delayChildren:r,staggerChildren:a,staggerDirection:o,repeat:n,repeatType:s,repeatDelay:i,from:l,elapsed:u,...c}){return!!Object.keys(c).length}var pi=(e,t,r,a={},o,n)=>s=>{let i=go(a,e)||{},l=i.delay||a.delay||0,{elapsed:u=0}=a;u=u-qe(l);let c={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...i,delay:-u,onUpdate:f=>{t.set(f),i.onUpdate&&i.onUpdate(f)},onComplete:()=>{s(),i.onComplete&&i.onComplete()},name:e,motionValue:t,element:n?void 0:o};cL(i)||(c={...c,...uL(e,c)}),c.duration&&(c.duration=qe(c.duration)),c.repeatDelay&&(c.repeatDelay=qe(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(c.duration=0,c.delay===0&&(d=!0)),(nf.current||Fs.skipAnimations)&&(d=!0,c.duration=0,c.delay=0),d&&!n&&t.get()!==void 0){let f=Lo(c.keyframes,i);if(f!==void 0)return re.update(()=>{c.onUpdate(f),c.onComplete()}),new ou([])}return!n&&fu.supports(c)?new fu(c):new bn(c)};function TE({protectedKeys:e,needsAnimating:t},r){let a=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,a}function Pf(e,t,{delay:r=0,transitionOverride:a,type:o}={}){var n;let{transition:s=e.getDefaultTransition(),transitionEnd:i,...l}=t;a&&(s=a);let u=[],c=o&&e.animationState&&e.animationState.getState()[o];for(let d in l){let f=e.getValue(d,(n=e.latestValues[d])!==null&&n!==void 0?n:null),h=l[d];if(h===void 0||c&&TE(c,d))continue;let v={delay:r,...go(s||{},d)},x=!1;if(window.MotionHandoffAnimation){let g=of(e);if(g){let p=window.MotionHandoffAnimation(g,d,re);p!==null&&(v.startTime=p,x=!0)}}iu(e,d),f.start(pi(d,f,h,e.shouldReduceMotion&&tf.has(d)?{type:!1}:v,e,x));let C=f.animation;C&&u.push(C)}return i&&Promise.all(u).then(()=>{re.update(()=>{i&&bb(e,i)})}),u}function Tf(e,t,r={}){var a;let o=ho(e,t,r.type==="exit"?(a=e.presenceContext)===null||a===void 0?void 0:a.custom:void 0),{transition:n=e.getDefaultTransition()||{}}=o||{};r.transitionOverride&&(n=r.transitionOverride);let s=o?()=>Promise.all(Pf(e,o,r)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(u=0)=>{let{delayChildren:c=0,staggerChildren:d,staggerDirection:f}=n;return _E(e,t,c+u,d,f,r)}:()=>Promise.resolve(),{when:l}=n;if(l){let[u,c]=l==="beforeChildren"?[s,i]:[i,s];return u().then(()=>c())}else return Promise.all([s(),i(r.delay)])}function _E(e,t,r=0,a=0,o=1,n){let s=[],i=(e.variantChildren.size-1)*a,l=o===1?(u=0)=>u*a:(u=0)=>i-u*a;return Array.from(e.variantChildren).sort(AE).forEach((u,c)=>{u.notify("AnimationStart",t),s.push(Tf(u,t,{...n,delay:r+l(c)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(s)}function AE(e,t){return e.sortNodePosition(t)}function dL(e,t,r={}){e.notify("AnimationStart",t);let a;if(Array.isArray(t)){let o=t.map(n=>Tf(e,n,r));a=Promise.all(o)}else if(typeof t=="string")a=Tf(e,t,r);else{let o=typeof t=="function"?ho(e,t,r.custom):t;a=Promise.all(Pf(e,o,r))}return a.then(()=>{e.notify("AnimationComplete",t)})}var RE=Zl.length;function Gg(e){if(!e)return;if(!e.isControllingVariants){let r=e.parent?Gg(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}let t={};for(let r=0;r<RE;r++){let a=Zl[r],o=e.props[a];(ba(o)||o===!1)&&(t[a]=o)}return t}var EE=[...Od].reverse(),DE=Od.length;function NE(e){return t=>Promise.all(t.map(({animation:r,options:a})=>dL(e,r,a)))}function pL(e){let t=NE(e),r=fL(),a=!0,o=l=>(u,c)=>{var d;let f=ho(e,c,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){let{transition:h,transitionEnd:v,...x}=f;u={...u,...x,...v}}return u};function n(l){t=l(e)}function s(l){let{props:u}=e,c=Gg(e.parent)||{},d=[],f=new Set,h={},v=1/0;for(let C=0;C<DE;C++){let g=EE[C],p=r[g],y=u[g]!==void 0?u[g]:c[g],b=ba(y),L=g===l?p.isActive:null;L===!1&&(v=C);let P=y===c[g]&&y!==u[g]&&b;if(P&&a&&e.manuallyAnimateOnMount&&(P=!1),p.protectedKeys={...h},!p.isActive&&L===null||!y&&!p.prevProp||mo(y)||typeof y=="boolean")continue;let T=ME(p.prevProp,y),A=T||g===l&&p.isActive&&!P&&b||C>v&&b,N=!1,j=Array.isArray(y)?y:[y],pe=j.reduce(o(g),{});L===!1&&(pe={});let{prevResolvedValues:ee={}}=p,ir={...ee,...pe},zt=ve=>{A=!0,f.has(ve)&&(N=!0,f.delete(ve)),p.needsAnimating[ve]=!0;let Ye=e.getValue(ve);Ye&&(Ye.liveStyle=!1)};for(let ve in ir){let Ye=pe[ve],mt=ee[ve];if(h.hasOwnProperty(ve))continue;let Aa=!1;eu(Ye)&&eu(mt)?Aa=!Cg(Ye,mt):Aa=Ye!==mt,Aa?Ye!=null?zt(ve):f.add(ve):Ye!==void 0&&f.has(ve)?zt(ve):p.protectedKeys[ve]=!0}p.prevProp=y,p.prevResolvedValues=pe,p.isActive&&(h={...h,...pe}),a&&e.blockInitialAnimation&&(A=!1),A&&(!(P&&T)||N)&&d.push(...j.map(ve=>({animation:ve,options:{type:g}})))}if(f.size){let C={};f.forEach(g=>{let p=e.getBaseTarget(g),y=e.getValue(g);y&&(y.liveStyle=!0),C[g]=p??null}),d.push({animation:C})}let x=!!d.length;return a&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(x=!1),a=!1,x?t(d):Promise.resolve()}function i(l,u){var c;if(r[l].isActive===u)return Promise.resolve();(c=e.variantChildren)===null||c===void 0||c.forEach(f=>{var h;return(h=f.animationState)===null||h===void 0?void 0:h.setActive(l,u)}),r[l].isActive=u;let d=s(l);for(let f in r)r[f].protectedKeys={};return d}return{animateChanges:s,setActive:i,setAnimateFunction:n,getState:()=>r,reset:()=>{r=fL(),a=!0}}}function ME(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Cg(t,e):!1}function Ln(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function fL(){return{animate:Ln(!0),whileInView:Ln(),whileHover:Ln(),whileTap:Ln(),whileDrag:Ln(),whileFocus:Ln(),exit:Ln()}}var st=class{constructor(t){this.isMounted=!1,this.node=t}update(){}};var _f=class extends st{constructor(t){super(t),t.animationState||(t.animationState=pL(t))}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();mo(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:t}=this.node.getProps(),{animate:r}=this.node.prevProps||{};t!==r&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}};var OE=0,Af=class extends st{constructor(){super(...arguments),this.id=OE++}update(){if(!this.node.presenceContext)return;let{isPresent:t,onExitComplete:r}=this.node.presenceContext,{isPresent:a}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===a)return;let o=this.node.animationState.setActive("exit",!t);r&&!t&&o.then(()=>r(this.id))}mount(){let{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}};var mL={animation:{Feature:_f},exit:{Feature:Af}};function Pa(e,t,r,a={passive:!0}){return e.addEventListener(t,r,a),()=>e.removeEventListener(t,r)}function Ta(e){return{point:{x:e.pageX,y:e.pageY}}}var hL=e=>t=>vn(t)&&e(t,Ta(t));function Io(e,t,r,a){return Pa(e,t,hL(r),a)}var gL=(e,t)=>Math.abs(e-t);function yL(e,t){let r=gL(e.x,t.x),a=gL(e.y,t.y);return Math.sqrt(r**2+a**2)}var mi=class{constructor(t,r,{transformPagePoint:a,contextWindow:o,dragSnapToOrigin:n=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let d=Xg(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,h=yL(d.offset,{x:0,y:0})>=3;if(!f&&!h)return;let{point:v}=d,{timestamp:x}=He;this.history.push({...v,timestamp:x});let{onStart:C,onMove:g}=this.handlers;f||(C&&C(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Kg(f,this.transformPagePoint),re.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();let{onEnd:h,onSessionEnd:v,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let C=Xg(d.type==="pointercancel"?this.lastMoveEventInfo:Kg(f,this.transformPagePoint),this.history);this.startEvent&&h&&h(d,C),v&&v(d,C)},!vn(t))return;this.dragSnapToOrigin=n,this.handlers=r,this.transformPagePoint=a,this.contextWindow=o||window;let s=Ta(t),i=Kg(s,this.transformPagePoint),{point:l}=i,{timestamp:u}=He;this.history=[{...l,timestamp:u}];let{onSessionStart:c}=r;c&&c(t,Xg(i,this.history)),this.removeListeners=Xr(Io(this.contextWindow,"pointermove",this.handlePointerMove),Io(this.contextWindow,"pointerup",this.handlePointerUp),Io(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ar(this.updatePoint)}};function Kg(e,t){return t?{point:t(e.point)}:e}function vL(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Xg({point:e},t){return{point:e,delta:vL(e,xL(t)),offset:vL(e,BE(t)),velocity:FE(t,.1)}}function BE(e){return e[0]}function xL(e){return e[e.length-1]}function FE(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,a=null,o=xL(e);for(;r>=0&&(a=e[r],!(o.timestamp-a.timestamp>qe(t)));)r--;if(!a)return{x:0,y:0};let n=dt(o.timestamp-a.timestamp);if(n===0)return{x:0,y:0};let s={x:(o.x-a.x)/n,y:(o.y-a.y)/n};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}var bL=1e-4,UE=1-bL,VE=1+bL,LL=.01,jE=0-LL,qE=0+LL;function pt(e){return e.max-e.min}function IL(e,t,r){return Math.abs(e-t)<=r}function wL(e,t,r,a=.5){e.origin=a,e.originPoint=le(t.min,t.max,e.origin),e.scale=pt(r)/pt(t),e.translate=le(r.min,r.max,e.origin)-e.originPoint,(e.scale>=UE&&e.scale<=VE||isNaN(e.scale))&&(e.scale=1),(e.translate>=jE&&e.translate<=qE||isNaN(e.translate))&&(e.translate=0)}function hi(e,t,r,a){wL(e.x,t.x,r.x,a?a.originX:void 0),wL(e.y,t.y,r.y,a?a.originY:void 0)}function SL(e,t,r){e.min=r.min+t.min,e.max=e.min+pt(t)}function kL(e,t,r){SL(e.x,t.x,r.x),SL(e.y,t.y,r.y)}function CL(e,t,r){e.min=t.min-r.min,e.max=e.min+pt(t)}function gi(e,t,r){CL(e.x,t.x,r.x),CL(e.y,t.y,r.y)}function RL(e,{min:t,max:r},a){return t!==void 0&&e<t?e=a?le(t,e,a.min):Math.max(e,t):r!==void 0&&e>r&&(e=a?le(r,e,a.max):Math.min(e,r)),e}function PL(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function EL(e,{top:t,left:r,bottom:a,right:o}){return{x:PL(e.x,r,o),y:PL(e.y,t,a)}}function TL(e,t){let r=t.min-e.min,a=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,a]=[a,r]),{min:r,max:a}}function DL(e,t){return{x:TL(e.x,t.x),y:TL(e.y,t.y)}}function NL(e,t){let r=.5,a=pt(e),o=pt(t);return o>a?r=rr(t.min,t.max-a,e.min):a>o&&(r=rr(e.min,e.max-o,t.min)),ft(0,1,r)}function ML(e,t){let r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}var Rf=.35;function OL(e=Rf){return e===!1?e=0:e===!0&&(e=Rf),{x:_L(e,"left","right"),y:_L(e,"top","bottom")}}function _L(e,t,r){return{min:AL(e,t),max:AL(e,r)}}function AL(e,t){return typeof e=="number"?e:e[t]||0}var BL=()=>({translate:0,scale:1,origin:0,originPoint:0}),In=()=>({x:BL(),y:BL()}),FL=()=>({min:0,max:0}),_e=()=>({x:FL(),y:FL()});function qt(e){return[e("x"),e("y")]}function Ef({top:e,left:t,right:r,bottom:a}){return{x:{min:t,max:r},y:{min:e,max:a}}}function UL({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function VL(e,t){if(!t)return e;let r=t({x:e.left,y:e.top}),a=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:a.y,right:a.x}}function Jg(e){return e===void 0||e===1}function Df({scale:e,scaleX:t,scaleY:r}){return!Jg(e)||!Jg(t)||!Jg(r)}function _a(e){return Df(e)||Qg(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Qg(e){return jL(e.x)||jL(e.y)}function jL(e){return e&&e!=="0%"}function pu(e,t,r){let a=e-r,o=t*a;return r+o}function qL(e,t,r,a,o){return o!==void 0&&(e=pu(e,o,a)),pu(e,r,a)+t}function Yg(e,t=0,r=1,a,o){e.min=qL(e.min,t,r,a,o),e.max=qL(e.max,t,r,a,o)}function Zg(e,{x:t,y:r}){Yg(e.x,t.translate,t.scale,t.originPoint),Yg(e.y,r.translate,r.scale,r.originPoint)}var HL=.999999999999,zL=1.0000000000001;function WL(e,t,r,a=!1){let o=r.length;if(!o)return;t.x=t.y=1;let n,s;for(let i=0;i<o;i++){n=r[i],s=n.projectionDelta;let{visualElement:l}=n.options;l&&l.props.style&&l.props.style.display==="contents"||(a&&n.options.layoutScroll&&n.scroll&&n!==n.root&&kn(e,{x:-n.scroll.offset.x,y:-n.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,Zg(e,s)),a&&_a(n.latestValues)&&kn(e,n.latestValues))}t.x<zL&&t.x>HL&&(t.x=1),t.y<zL&&t.y>HL&&(t.y=1)}function ko(e,t){e.min=e.min+t,e.max=e.max+t}function $L(e,t,r,a,o=.5){let n=le(e.min,e.max,o);Yg(e,t,r,n,a)}function kn(e,t){$L(e.x,t.x,t.scaleX,t.scale,t.originX),$L(e.y,t.y,t.scaleY,t.scale,t.originY)}function ey(e,t){return Ef(VL(e.getBoundingClientRect(),t))}function GL(e,t,r){let a=ey(e,r),{scroll:o}=t;return o&&(ko(a.x,o.offset.x),ko(a.y,o.offset.y)),a}var Nf=({current:e})=>e?e.ownerDocument.defaultView:null;var HE=new WeakMap,Of=class{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=_e(),this.visualElement=t}start(t,{snapToCursor:r=!1}={}){let{presenceContext:a}=this.visualElement;if(a&&a.isPresent===!1)return;let o=c=>{let{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),r&&this.snapToCursor(Ta(c).point)},n=(c,d)=>{let{drag:f,dragPropagation:h,onDragStart:v}=this.getProps();if(f&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Ag(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),qt(C=>{let g=this.getAxisMotionValue(C).get()||0;if(_t.test(g)){let{projection:p}=this.visualElement;if(p&&p.layout){let y=p.layout.layoutBox[C];y&&(g=pt(y)*(parseFloat(g)/100))}}this.originPoint[C]=g}),v&&re.postRender(()=>v(c,d)),iu(this.visualElement,"transform");let{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},s=(c,d)=>{let{dragPropagation:f,dragDirectionLock:h,onDirectionLock:v,onDrag:x}=this.getProps();if(!f&&!this.openDragLock)return;let{offset:C}=d;if(h&&this.currentDirection===null){this.currentDirection=zE(C),this.currentDirection!==null&&v&&v(this.currentDirection);return}this.updateAxis("x",d.point,C),this.updateAxis("y",d.point,C),this.visualElement.render(),x&&x(c,d)},i=(c,d)=>this.stop(c,d),l=()=>qt(c=>{var d;return this.getAnimationState(c)==="paused"&&((d=this.getAxisMotionValue(c).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new mi(t,{onSessionStart:o,onStart:n,onMove:s,onSessionEnd:i,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:Nf(this.visualElement)})}stop(t,r){let a=this.isDragging;if(this.cancel(),!a)return;let{velocity:o}=r;this.startAnimation(o);let{onDragEnd:n}=this.getProps();n&&re.postRender(()=>n(t,r))}cancel(){this.isDragging=!1;let{projection:t,animationState:r}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:a}=this.getProps();!a&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",!1)}updateAxis(t,r,a){let{drag:o}=this.getProps();if(!a||!Mf(t,o,this.currentDirection))return;let n=this.getAxisMotionValue(t),s=this.originPoint[t]+a[t];this.constraints&&this.constraints[t]&&(s=RL(s,this.constraints[t],this.elastic[t])),n.set(s)}resolveConstraints(){var t;let{dragConstraints:r,dragElastic:a}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,n=this.constraints;r&&La(r)?this.constraints||(this.constraints=this.resolveRefConstraints()):r&&o?this.constraints=EL(o.layoutBox,r):this.constraints=!1,this.elastic=OL(a),n!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&qt(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=ML(o.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){let{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!La(t))return!1;let a=t.current;Er(a!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");let{projection:o}=this.visualElement;if(!o||!o.layout)return!1;let n=GL(a,o.root,this.visualElement.getTransformPagePoint()),s=DL(o.layout.layoutBox,n);if(r){let i=r(UL(s));this.hasMutatedConstraints=!!i,i&&(s=Ef(i))}return s}startAnimation(t){let{drag:r,dragMomentum:a,dragElastic:o,dragTransition:n,dragSnapToOrigin:s,onDragTransitionEnd:i}=this.getProps(),l=this.constraints||{},u=qt(c=>{if(!Mf(c,r,this.currentDirection))return;let d=l&&l[c]||{};s&&(d={min:0,max:0});let f=o?200:1e6,h=o?40:1e7,v={type:"inertia",velocity:a?t[c]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...n,...d};return this.startAxisValueAnimation(c,v)});return Promise.all(u).then(i)}startAxisValueAnimation(t,r){let a=this.getAxisMotionValue(t);return iu(this.visualElement,t),a.start(pi(t,a,0,r,this.visualElement,!1))}stopAnimation(){qt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){qt(t=>{var r;return(r=this.getAxisMotionValue(t).animation)===null||r===void 0?void 0:r.pause()})}getAnimationState(t){var r;return(r=this.getAxisMotionValue(t).animation)===null||r===void 0?void 0:r.state}getAxisMotionValue(t){let r=`_drag${t.toUpperCase()}`,a=this.visualElement.getProps(),o=a[r];return o||this.visualElement.getValue(t,(a.initial?a.initial[t]:void 0)||0)}snapToCursor(t){qt(r=>{let{drag:a}=this.getProps();if(!Mf(r,a,this.currentDirection))return;let{projection:o}=this.visualElement,n=this.getAxisMotionValue(r);if(o&&o.layout){let{min:s,max:i}=o.layout.layoutBox[r];n.set(t[r]-le(s,i,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:t,dragConstraints:r}=this.getProps(),{projection:a}=this.visualElement;if(!La(r)||!a||!this.constraints)return;this.stopAnimation();let o={x:0,y:0};qt(s=>{let i=this.getAxisMotionValue(s);if(i&&this.constraints!==!1){let l=i.get();o[s]=NL({min:l,max:l},this.constraints[s])}});let{transformTemplate:n}=this.visualElement.getProps();this.visualElement.current.style.transform=n?n({},""):"none",a.root&&a.root.updateScroll(),a.updateLayout(),this.resolveConstraints(),qt(s=>{if(!Mf(s,t,null))return;let i=this.getAxisMotionValue(s),{min:l,max:u}=this.constraints[s];i.set(le(l,u,o[s]))})}addListeners(){if(!this.visualElement.current)return;HE.set(this.visualElement,this);let t=this.visualElement.current,r=Io(t,"pointerdown",l=>{let{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),a=()=>{let{dragConstraints:l}=this.getProps();La(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,n=o.addEventListener("measure",a);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),re.read(a);let s=Pa(window,"resize",()=>this.scalePositionWithinConstraints()),i=o.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(qt(c=>{let d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=l[c].translate,d.set(d.get()+l[c].translate))}),this.visualElement.render())}));return()=>{s(),r(),n(),i&&i()}}getProps(){let t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:a=!1,dragPropagation:o=!1,dragConstraints:n=!1,dragElastic:s=Rf,dragMomentum:i=!0}=t;return{...t,drag:r,dragDirectionLock:a,dragPropagation:o,dragConstraints:n,dragElastic:s,dragMomentum:i}}};function Mf(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function zE(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}var Bf=class extends st{constructor(t){super(t),this.removeGroupControls=ye,this.removeListeners=ye,this.controls=new Of(t)}mount(){let{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ye}unmount(){this.removeGroupControls(),this.removeListeners()}};var KL=e=>(t,r)=>{e&&re.postRender(()=>e(t,r))},Ff=class extends st{constructor(){super(...arguments),this.removePointerDownListener=ye}onPointerDown(t){this.session=new mi(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Nf(this.node)})}createPanHandlers(){let{onPanSessionStart:t,onPanStart:r,onPan:a,onPanEnd:o}=this.node.getProps();return{onSessionStart:KL(t),onStart:KL(r),onMove:a,onEnd:(n,s)=>{delete this.session,o&&re.postRender(()=>o(n,s))}}}mount(){this.removePointerDownListener=Io(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}};var QL=O(ue(),1),mu=O(Q(),1);var yi={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function XL(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var vi={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(z.test(e))e=parseFloat(e);else return e;let r=XL(e,t.target.x),a=XL(e,t.target.y);return`${r}% ${a}%`}};var JL={correct:(e,{treeScale:t,projectionDelta:r})=>{let a=e,o=At.parse(e);if(o.length>5)return a;let n=At.createTransformer(e),s=typeof o[0]!="number"?1:0,i=r.x.scale*t.x,l=r.y.scale*t.y;o[0+s]/=i,o[1+s]/=l;let u=le(i,l,.5);return typeof o[2+s]=="number"&&(o[2+s]/=u),typeof o[3+s]=="number"&&(o[3+s]/=u),n(o)}};var ty=class extends mu.Component{componentDidMount(){let{visualElement:t,layoutGroup:r,switchLayoutGroup:a,layoutId:o}=this.props,{projection:n}=t;ob($E),n&&(r.group&&r.group.add(n),a&&a.register&&o&&a.register(n),n.root.didUpdate(),n.addEventListener("animationComplete",()=>{this.safeToRemove()}),n.setOptions({...n.options,onExitComplete:()=>this.safeToRemove()})),yi.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){let{layoutDependency:r,visualElement:a,drag:o,isPresent:n}=this.props,s=a.projection;return s&&(s.isPresent=n,o||t.layoutDependency!==r||r===void 0?s.willUpdate():this.safeToRemove(),t.isPresent!==n&&(n?s.promote():s.relegate()||re.postRender(()=>{let i=s.getStack();(!i||!i.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){let{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Vs.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:t,layoutGroup:r,switchLayoutGroup:a}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(o),a&&a.deregister&&a.deregister(o))}safeToRemove(){let{safeToRemove:t}=this.props;t&&t()}render(){return null}};function Uf(e){let[t,r]=Td(),a=(0,mu.useContext)(Ns);return(0,QL.jsx)(ty,{...e,layoutGroup:a,switchLayoutGroup:(0,mu.useContext)(Vd),isPresent:t,safeToRemove:r})}var $E={borderRadius:{...vi,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:vi,borderTopRightRadius:vi,borderBottomLeftRadius:vi,borderBottomRightRadius:vi,boxShadow:JL};function YL(e,t,r){let a=be(e)?e:ka(e);return a.start(pi("",a,t,r)),a.animation}function ZL(e){return e instanceof SVGElement&&e.tagName!=="svg"}var eI=(e,t)=>e.depth-t.depth;var Vf=class{constructor(){this.children=[],this.isDirty=!1}add(t){ni(this.children,t),this.isDirty=!0}remove(t){si(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(eI),this.isDirty=!1,this.children.forEach(t)}};function tI(e,t){let r=Ct.now(),a=({timestamp:o})=>{let n=o-r;n>=t&&(ar(a),e(n-t))};return re.read(a,!0),()=>ar(a)}var nI=["TopLeft","TopRight","BottomLeft","BottomRight"],WE=nI.length,rI=e=>typeof e=="string"?parseFloat(e):e,aI=e=>typeof e=="number"||z.test(e);function sI(e,t,r,a,o,n){o?(e.opacity=le(0,r.opacity!==void 0?r.opacity:1,GE(a)),e.opacityExit=le(t.opacity!==void 0?t.opacity:1,0,KE(a))):n&&(e.opacity=le(t.opacity!==void 0?t.opacity:1,r.opacity!==void 0?r.opacity:1,a));for(let s=0;s<WE;s++){let i=`border${nI[s]}Radius`,l=oI(t,i),u=oI(r,i);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||aI(l)===aI(u)?(e[i]=Math.max(le(rI(l),rI(u),a),0),(_t.test(u)||_t.test(l))&&(e[i]+="%")):e[i]=u}(t.rotate||r.rotate)&&(e.rotate=le(t.rotate||0,r.rotate||0,a))}function oI(e,t){return e[t]!==void 0?e[t]:e.borderRadius}var GE=iI(0,.5,ff),KE=iI(.5,.95,ye);function iI(e,t,r){return a=>a<e?0:a>t?1:r(rr(e,t,a))}function lI(e,t){e.min=t.min,e.max=t.max}function nr(e,t){lI(e.x,t.x),lI(e.y,t.y)}function ry(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function uI(e,t,r,a,o){return e-=t,e=pu(e,1/r,a),o!==void 0&&(e=pu(e,1/o,a)),e}function XE(e,t=0,r=1,a=.5,o,n=e,s=e){if(_t.test(t)&&(t=parseFloat(t),t=le(s.min,s.max,t/100)-s.min),typeof t!="number")return;let i=le(n.min,n.max,a);e===n&&(i-=t),e.min=uI(e.min,t,r,i,o),e.max=uI(e.max,t,r,i,o)}function cI(e,t,[r,a,o],n,s){XE(e,t[r],t[a],t[o],t.scale,n,s)}var JE=["x","scaleX","originX"],QE=["y","scaleY","originY"];function ay(e,t,r,a){cI(e.x,t,JE,r?r.x:void 0,a?a.x:void 0),cI(e.y,t,QE,r?r.y:void 0,a?a.y:void 0)}function dI(e){return e.translate===0&&e.scale===1}function oy(e){return dI(e.x)&&dI(e.y)}function fI(e,t){return e.min===t.min&&e.max===t.max}function mI(e,t){return fI(e.x,t.x)&&fI(e.y,t.y)}function pI(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function ny(e,t){return pI(e.x,t.x)&&pI(e.y,t.y)}function sy(e){return pt(e.x)/pt(e.y)}function iy(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var jf=class{constructor(){this.members=[]}add(t){ni(this.members,t),t.scheduleRender()}remove(t){if(si(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){let r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(t){let r=this.members.findIndex(o=>t===o);if(r===0)return!1;let a;for(let o=r;o>=0;o--){let n=this.members[o];if(n.isPresent!==!1){a=n;break}}return a?(this.promote(a),!0):!1}promote(t,r){let a=this.lead;if(t!==a&&(this.prevLead=a,this.lead=t,t.show(),a)){a.instance&&a.scheduleRender(),t.scheduleRender(),t.resumeFrom=a,r&&(t.resumeFrom.preserveOpacity=!0),a.snapshot&&(t.snapshot=a.snapshot,t.snapshot.latestValues=a.animationValues||a.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);let{crossfade:o}=t.options;o===!1&&a.hide()}}exitAnimationComplete(){this.members.forEach(t=>{let{options:r,resumingFrom:a}=t;r.onExitComplete&&r.onExitComplete(),a&&a.options.onExitComplete&&a.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}};function hI(e,t,r){let a="",o=e.x.translate/t.x,n=e.y.translate/t.y,s=r?.z||0;if((o||n||s)&&(a=`translate3d(${o}px, ${n}px, ${s}px) `),(t.x!==1||t.y!==1)&&(a+=`scale(${1/t.x}, ${1/t.y}) `),r){let{transformPerspective:u,rotate:c,rotateX:d,rotateY:f,skewX:h,skewY:v}=r;u&&(a=`perspective(${u}px) ${a}`),c&&(a+=`rotate(${c}deg) `),d&&(a+=`rotateX(${d}deg) `),f&&(a+=`rotateY(${f}deg) `),h&&(a+=`skewX(${h}deg) `),v&&(a+=`skewY(${v}deg) `)}let i=e.x.scale*t.x,l=e.y.scale*t.y;return(i!==1||l!==1)&&(a+=`scale(${i}, ${l})`),a||"none"}var Pn={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},hu=typeof window<"u"&&window.MotionDebug!==void 0,ly=["","X","Y","Z"],YE={visibility:"hidden"},gI=1e3,ZE=0;function uy(e,t,r,a){let{latestValues:o}=t;o[e]&&(r[e]=o[e],t.setStaticValue(e,0),a&&(a[e]=0))}function LI(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let r=of(t);if(window.MotionHasOptimisedAnimation(r,"transform")){let{layout:o,layoutId:n}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",re,!(o||n))}let{parent:a}=e;a&&!a.hasCheckedOptimisedAppear&&LI(a)}function qf({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:a,resetTransform:o}){return class{constructor(s={},i=t?.()){this.id=ZE++,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,hu&&(Pn.totalNodes=Pn.resolvedTargetDeltas=Pn.recalculatedProjection=0),this.nodes.forEach(rD),this.nodes.forEach(iD),this.nodes.forEach(lD),this.nodes.forEach(aD),hu&&window.MotionDebug.record(Pn)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=i?i.root||i:this,this.path=i?[...i.path,i]:[],this.parent=i,this.depth=i?i.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Vf)}addEventListener(s,i){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new xo),this.eventHandlers.get(s).add(i)}notifyListeners(s,...i){let l=this.eventHandlers.get(s);l&&l.notify(...i)}hasListeners(s){return this.eventHandlers.has(s)}mount(s,i=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=ZL(s),this.instance=s;let{layoutId:l,layout:u,visualElement:c}=this.options;if(c&&!c.current&&c.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),i&&(u||l)&&(this.isLayoutDirty=!0),e){let d,f=()=>this.root.updateBlockedByResize=!1;e(s,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=tI(f,250),yi.hasAnimatedSinceResize&&(yi.hasAnimatedSinceResize=!1,this.nodes.forEach(vI))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeTargetChanged:h,layout:v})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let x=this.options.transition||c.getDefaultTransition()||pD,{onLayoutAnimationStart:C,onLayoutAnimationComplete:g}=c.getProps(),p=!this.targetLayout||!ny(this.targetLayout,v)||h,y=!f&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||y||f&&(p||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,y);let b={...go(x,"layout"),onPlay:C,onComplete:g};(c.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b)}else f||vI(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=v})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,ar(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(uD),this.animationId++)}getTransformTemplate(){let{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&LI(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){let d=this.path[c];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}let{layoutId:i,layout:l}=this.options;if(i===void 0&&!l)return;let u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(yI);return}this.isUpdating||this.nodes.forEach(nD),this.isUpdating=!1,this.nodes.forEach(sD),this.nodes.forEach(eD),this.nodes.forEach(tD),this.clearAllSnapshots();let i=Ct.now();He.delta=ft(0,1e3/60,i-He.timestamp),He.timestamp=i,He.isProcessing=!0,Nd.update.process(He),Nd.preRender.process(He),Nd.render.process(He),He.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Vs.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(oD),this.sharedNodes.forEach(cD)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,re.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){re.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();let s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=_e(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:i}=this.options;i&&i.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let i=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(i=!1),i){let l=a(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:l,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;let s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,i=this.projectionDelta&&!oy(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;s&&(i||_a(this.latestValues)||c)&&(o(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){let i=this.measurePageBox(),l=this.removeElementScroll(i);return s&&(l=this.removeTransform(l)),mD(l),{animationId:this.root.animationId,measuredBox:i,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var s;let{visualElement:i}=this.options;if(!i)return _e();let l=i.measureViewportBox();if(!(((s=this.scroll)===null||s===void 0?void 0:s.wasRoot)||this.path.some(hD))){let{scroll:c}=this.root;c&&(ko(l.x,c.offset.x),ko(l.y,c.offset.y))}return l}removeElementScroll(s){var i;let l=_e();if(nr(l,s),!((i=this.scroll)===null||i===void 0)&&i.wasRoot)return l;for(let u=0;u<this.path.length;u++){let c=this.path[u],{scroll:d,options:f}=c;c!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&nr(l,s),ko(l.x,d.offset.x),ko(l.y,d.offset.y))}return l}applyTransform(s,i=!1){let l=_e();nr(l,s);for(let u=0;u<this.path.length;u++){let c=this.path[u];!i&&c.options.layoutScroll&&c.scroll&&c!==c.root&&kn(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),_a(c.latestValues)&&kn(l,c.latestValues)}return _a(this.latestValues)&&kn(l,this.latestValues),l}removeTransform(s){let i=_e();nr(i,s);for(let l=0;l<this.path.length;l++){let u=this.path[l];if(!u.instance||!_a(u.latestValues))continue;Df(u.latestValues)&&u.updateSnapshot();let c=_e(),d=u.measurePageBox();nr(c,d),ay(i,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return _a(this.latestValues)&&ay(i,this.latestValues),i}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.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!==He.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var i;let l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);let u=!!this.resumingFrom||this!==l;if(!(s||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((i=this.parent)===null||i===void 0)&&i.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=He.timestamp,!this.targetDelta&&!this.relativeTarget){let h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=_e(),this.relativeTargetOrigin=_e(),gi(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),nr(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(),kL(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):nr(this.target,this.layout.layoutBox),Zg(this.target,this.targetDelta)):nr(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;let h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=_e(),this.relativeTargetOrigin=_e(),gi(this.relativeTargetOrigin,this.target,h.target),nr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}hu&&Pn.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Df(this.parent.latestValues)||Qg(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 s;let i=this.getLead(),l=!!this.resumingFrom||this!==i,u=!0;if((this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty)&&(u=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===He.timestamp&&(u=!1),u)return;let{layout:c,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||d))return;nr(this.layoutCorrected,this.layout.layoutBox);let f=this.treeScale.x,h=this.treeScale.y;WL(this.layoutCorrected,this.treeScale,this.path,l),i.layout&&!i.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(i.target=i.layout.layoutBox,i.targetWithTransforms=_e());let{target:v}=i;if(!v){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(ry(this.prevProjectionDelta.x,this.projectionDelta.x),ry(this.prevProjectionDelta.y,this.projectionDelta.y)),hi(this.projectionDelta,this.layoutCorrected,v,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!iy(this.projectionDelta.x,this.prevProjectionDelta.x)||!iy(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",v)),hu&&Pn.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){var i;if((i=this.options.visualElement)===null||i===void 0||i.scheduleRender(),s){let l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=In(),this.projectionDelta=In(),this.projectionDeltaWithTransform=In()}setAnimationOrigin(s,i=!1){let l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},d=In();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!i;let f=_e(),h=l?l.source:void 0,v=this.layout?this.layout.source:void 0,x=h!==v,C=this.getStack(),g=!C||C.members.length<=1,p=!!(x&&!g&&this.options.crossfade===!0&&!this.path.some(fD));this.animationProgress=0;let y;this.mixTargetDelta=b=>{let L=b/1e3;xI(d.x,s.x,L),xI(d.y,s.y,L),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(gi(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),dD(this.relativeTarget,this.relativeTargetOrigin,f,L),y&&mI(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=_e()),nr(y,this.relativeTarget)),x&&(this.animationValues=c,sI(c,u,this.latestValues,L,p,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=L},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(ar(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=re.update(()=>{yi.hasAnimatedSinceResize=!0,this.currentAnimation=YL(0,gI,{...s,onUpdate:i=>{this.mixTargetDelta(i),s.onUpdate&&s.onUpdate(i)},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(gI),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let s=this.getLead(),{targetWithTransforms:i,target:l,layout:u,latestValues:c}=s;if(!(!i||!l||!u)){if(this!==s&&this.layout&&u&&II(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||_e();let d=pt(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+d;let f=pt(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+f}nr(i,l),kn(i,c),hi(this.projectionDeltaWithTransform,this.layoutCorrected,i,c)}}registerSharedNode(s,i){this.sharedNodes.has(s)||this.sharedNodes.set(s,new jf),this.sharedNodes.get(s).add(i);let u=i.options.initialPromotionConfig;i.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(i):void 0})}isLead(){let s=this.getStack();return s?s.lead===this:!0}getLead(){var s;let{layoutId:i}=this.options;return i?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;let{layoutId:i}=this.options;return i?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){let{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:i,preserveFollowOpacity:l}={}){let u=this.getStack();u&&u.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),i&&this.setOptions({transition:i})}relegate(){let s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){let{visualElement:s}=this.options;if(!s)return;let i=!1,{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(i=!0),!i)return;let u={};l.z&&uy("z",s,u,this.animationValues);for(let c=0;c<ly.length;c++)uy(`rotate${ly[c]}`,s,u,this.animationValues),uy(`skew${ly[c]}`,s,u,this.animationValues);s.render();for(let c in u)s.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);s.scheduleRender()}getProjectionStyles(s){var i,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return YE;let u={visibility:""},c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=zs(s?.pointerEvents)||"",u.transform=c?c(this.latestValues,""):"none",u;let d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){let x={};return this.options.layoutId&&(x.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,x.pointerEvents=zs(s?.pointerEvents)||""),this.hasProjected&&!_a(this.latestValues)&&(x.transform=c?c({},""):"none",this.hasProjected=!1),x}let f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),u.transform=hI(this.projectionDeltaWithTransform,this.treeScale,f),c&&(u.transform=c(f,u.transform));let{x:h,y:v}=this.projectionDelta;u.transformOrigin=`${h.origin*100}% ${v.origin*100}% 0`,d.animationValues?u.opacity=d===this?(l=(i=f.opacity)!==null&&i!==void 0?i:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:u.opacity=d===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(let x in Qs){if(f[x]===void 0)continue;let{correct:C,applyTo:g}=Qs[x],p=u.transform==="none"?f[x]:C(f[x],d);if(g){let y=g.length;for(let b=0;b<y;b++)u[g[b]]=p}else u[x]=p}return this.options.layoutId&&(u.pointerEvents=d===this?zs(s?.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var i;return(i=s.currentAnimation)===null||i===void 0?void 0:i.stop()}),this.root.nodes.forEach(yI),this.root.sharedNodes.clear()}}}function eD(e){e.updateLayout()}function tD(e){var t;let r=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&r&&e.hasListeners("didUpdate")){let{layoutBox:a,measuredBox:o}=e.layout,{animationType:n}=e.options,s=r.source!==e.layout.source;n==="size"?qt(d=>{let f=s?r.measuredBox[d]:r.layoutBox[d],h=pt(f);f.min=a[d].min,f.max=f.min+h}):II(n,r.layoutBox,a)&&qt(d=>{let f=s?r.measuredBox[d]:r.layoutBox[d],h=pt(a[d]);f.max=f.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+h)});let i=In();hi(i,a,r.layoutBox);let l=In();s?hi(l,e.applyTransform(o,!0),r.measuredBox):hi(l,a,r.layoutBox);let u=!oy(i),c=!1;if(!e.resumeFrom){let d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){let{snapshot:f,layout:h}=d;if(f&&h){let v=_e();gi(v,r.layoutBox,f.layoutBox);let x=_e();gi(x,a,h.layoutBox),ny(v,x)||(c=!0),d.options.layoutRoot&&(e.relativeTarget=x,e.relativeTargetOrigin=v,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:a,snapshot:r,delta:l,layoutDelta:i,hasLayoutChanged:u,hasRelativeTargetChanged:c})}else if(e.isLead()){let{onExitComplete:a}=e.options;a&&a()}e.options.transition=void 0}function rD(e){hu&&Pn.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function aD(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function oD(e){e.clearSnapshot()}function yI(e){e.clearMeasurements()}function nD(e){e.isLayoutDirty=!1}function sD(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function vI(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function iD(e){e.resolveTargetDelta()}function lD(e){e.calcProjection()}function uD(e){e.resetSkewAndRotation()}function cD(e){e.removeLeadSnapshot()}function xI(e,t,r){e.translate=le(t.translate,0,r),e.scale=le(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function wI(e,t,r,a){e.min=le(t.min,r.min,a),e.max=le(t.max,r.max,a)}function dD(e,t,r,a){wI(e.x,t.x,r.x,a),wI(e.y,t.y,r.y,a)}function fD(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var pD={duration:.45,ease:[.4,0,.1,1]},SI=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),CI=SI("applewebkit/")&&!SI("chrome/")?Math.round:ye;function bI(e){e.min=CI(e.min),e.max=CI(e.max)}function mD(e){bI(e.x),bI(e.y)}function II(e,t,r){return e==="position"||e==="preserve-aspect"&&!IL(sy(t),sy(r),.2)}function hD(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}var kI=qf({attachResizeListener:(e,t)=>Pa(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0});var cy={current:void 0},Hf=qf({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!cy.current){let e=new kI({});e.mount(window),e.setOptions({layoutScroll:!0}),cy.current=e}return cy.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"});var PI={pan:{Feature:Ff},drag:{Feature:Bf,ProjectionNode:Hf,MeasureLayout:Uf}};function TI(e,t,r){let{props:a}=e;e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",r==="Start");let o="onHover"+r,n=a[o];n&&re.postRender(()=>n(t,Ta(t)))}var zf=class extends st{mount(){let{current:t}=this.node;t&&(this.unmount=Pg(t,r=>(TI(this.node,r,"Start"),a=>TI(this.node,a,"End"))))}unmount(){}};var $f=class extends st{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Xr(Pa(this.node.current,"focus",()=>this.onFocus()),Pa(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function _I(e,t,r){let{props:a}=e;e.animationState&&a.whileTap&&e.animationState.setActive("whileTap",r==="Start");let o="onTap"+(r==="End"?"":r),n=a[o];n&&re.postRender(()=>n(t,Ta(t)))}var Wf=class extends st{mount(){let{current:t}=this.node;t&&(this.unmount=_g(t,r=>(_I(this.node,r,"Start"),(a,{success:o})=>_I(this.node,a,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}};var fy=new WeakMap,dy=new WeakMap,gD=e=>{let t=fy.get(e.target);t&&t(e)},yD=e=>{e.forEach(gD)};function vD({root:e,...t}){let r=e||document;dy.has(r)||dy.set(r,{});let a=dy.get(r),o=JSON.stringify(t);return a[o]||(a[o]=new IntersectionObserver(yD,{root:e,...t})),a[o]}function AI(e,t,r){let a=vD(t);return fy.set(e,r),a.observe(e),()=>{fy.delete(e),a.unobserve(e)}}var xD={some:0,all:1},Gf=class extends st{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:t={}}=this.node.getProps(),{root:r,margin:a,amount:o="some",once:n}=t,s={root:r?r.current:void 0,rootMargin:a,threshold:typeof o=="number"?o:xD[o]},i=l=>{let{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,n&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);let{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),f=u?c:d;f&&f(l)};return AI(this.node.current,s,i)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;let{props:t,prevProps:r}=this.node;["amount","margin","root"].some(wD(t,r))&&this.startObserver()}unmount(){}};function wD({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}var RI={inView:{Feature:Gf},tap:{Feature:Wf},focus:{Feature:$f},hover:{Feature:zf}};var EI={layout:{ProjectionNode:Hf,MeasureLayout:Uf}};var BI=O(Q(),1);var gu={current:null},Kf={current:!1};function DI(){if(Kf.current=!0,!!Bs)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>gu.current=e.matches;e.addListener(t),t()}else gu.current=!1}var SD=[...Fg,Ge,At],NI=e=>SD.find(vf(e));var py=new WeakMap;function MI(e,t,r){for(let a in t){let o=t[a],n=r[a];if(be(o))e.addValue(a,o);else if(be(n))e.addValue(a,ka(o,{owner:e}));else if(n!==o)if(e.hasValue(a)){let s=e.getValue(a);s.liveStyle===!0?s.jump(o):s.hasAnimated||s.set(o)}else{let s=e.getStaticValue(a);e.addValue(a,ka(s!==void 0?s:o,{owner:e}))}}for(let a in r)t[a]===void 0&&e.removeValue(a);return t}var OI=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Xf=class{scrapeMotionValuesFromProps(t,r,a){return{}}constructor({parent:t,props:r,presenceContext:a,reducedMotionConfig:o,blockInitialAnimation:n,visualState:s},i={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=bo,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let h=Ct.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,re.render(this.render,!1,!0))};let{latestValues:l,renderState:u,onUpdate:c}=s;this.onUpdate=c,this.latestValues=l,this.baseTarget={...l},this.initialValues=r.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=r,this.presenceContext=a,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=i,this.blockInitialAnimation=!!n,this.isControllingVariants=yn(r),this.isVariantNode=Bd(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);let{willChange:d,...f}=this.scrapeMotionValuesFromProps(r,{},this);for(let h in f){let v=f[h];l[h]!==void 0&&be(v)&&v.set(l[h],!1)}}mount(t){this.current=t,py.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,a)=>this.bindToMotionValue(a,r)),Kf.current||DI(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:gu.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){py.delete(this.current),this.projection&&this.projection.unmount(),ar(this.notifyUpdate),ar(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(let t in this.events)this.events[t].clear();for(let t in this.features){let r=this.features[t];r&&(r.unmount(),r.isMounted=!1)}this.current=null}bindToMotionValue(t,r){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();let a=jt.has(t),o=r.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&re.preRender(this.notifyUpdate),a&&this.projection&&(this.projection.isTransformDirty=!0)}),n=r.on("renderRequest",this.scheduleRender),s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,r)),this.valueSubscriptions.set(t,()=>{o(),n(),s&&s(),r.owner&&r.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Ca){let r=Ca[t];if(!r)continue;let{isEnabled:a,Feature:o}=r;if(!this.features[t]&&o&&a(this.props)&&(this.features[t]=new o(this)),this.features[t]){let n=this.features[t];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):_e()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,r){this.latestValues[t]=r}update(t,r){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let a=0;a<OI.length;a++){let o=OI[a];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);let n="on"+o,s=t[n];s&&(this.propEventSubscriptions[o]=this.on(o,s))}this.prevMotionValues=MI(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){let r=this.getClosestVariantNode();if(r)return r.variantChildren&&r.variantChildren.add(t),()=>r.variantChildren.delete(t)}addValue(t,r){let a=this.values.get(t);r!==a&&(a&&this.removeValue(t),this.bindToMotionValue(t,r),this.values.set(t,r),this.latestValues[t]=r.get())}removeValue(t){this.values.delete(t);let r=this.valueSubscriptions.get(t);r&&(r(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,r){if(this.props.values&&this.props.values[t])return this.props.values[t];let a=this.values.get(t);return a===void 0&&r!==void 0&&(a=ka(r===null?void 0:r,{owner:this}),this.addValue(t,a)),a}readValue(t,r){var a;let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(a=this.getBaseTargetFromProps(this.props,t))!==null&&a!==void 0?a:this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(yf(o)||mf(o))?o=parseFloat(o):!NI(o)&&At.test(r)&&(o=gf(t,r)),this.setBaseTarget(t,be(o)?o.get():o)),be(o)?o.get():o}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){var r;let{initial:a}=this.props,o;if(typeof a=="string"||typeof a=="object"){let s=Hs(this.props,a,(r=this.presenceContext)===null||r===void 0?void 0:r.custom);s&&(o=s[t])}if(a&&o!==void 0)return o;let n=this.getBaseTargetFromProps(this.props,t);return n!==void 0&&!be(n)?n:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new xo),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}};var xi=class extends Xf{constructor(){super(...arguments),this.KeyframeResolver=ci}sortInstanceNodePosition(t,r){return t.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(t,r){return t.style?t.style[r]:void 0}removeValueFromRenderState(t,{vars:r,style:a}){delete r[t],delete a[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:t}=this.props;be(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}};function CD(e){return window.getComputedStyle(e)}var Jf=class extends xi{constructor(){super(...arguments),this.type="html",this.renderInstance=Wd}readValueFromInstance(t,r){if(jt.has(r)){let a=ui(r);return a&&a.default||0}else{let a=CD(t),o=(Hd(r)?a.getPropertyValue(r):a[r])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:r}){return ey(t,r)}build(t,r,a){Gs(t,r,a.transformTemplate)}scrapeMotionValuesFromProps(t,r,a){return Ys(t,r,a)}};var Qf=class extends xi{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=_e}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(jt.has(r)){let a=ui(r);return a&&a.default||0}return r=Gd.has(r)?r:Us(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,a){return Jd(t,r,a)}build(t,r,a){Ks(t,r,this.isSVGTag,a.transformTemplate)}renderInstance(t,r,a,o){Kd(t,r,a,o)}mount(t){this.isSVGTag=Js(t.tagName),super.mount(t)}};var FI=(e,t)=>qs(e)?new Qf(t):new Jf(t,{allowProjection:e!==BI.Fragment});var UI=pb({...mL,...RI,...PI,...EI},FI);var my=DC(UI);var yu=O(ue(),1);function VI({x:e,y:t,visible:r,onClick:a=!1}){return(0,yu.jsx)(yg,{children:r&&(0,yu.jsx)(my.div,{className:"fixed pointer-events-none z-[9999]",initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1,x:e,y:t},exit:{opacity:0,scale:.5},transition:{type:"spring",stiffness:200,damping:20},style:{left:0,top:0},children:(0,yu.jsx)("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,yu.jsx)("path",{d:"M3 3L10.07 19.97L12.58 12.58L19.97 10.07L3 3Z",fill:"#C4B5FD"})})})})}var wi=O(Q(),1);function jI(){let[e,t]=wi.useState({x:0,y:0,visible:!1,onClick:!1}),r=wi.useCallback(n=>{let s=document.querySelector(n.selector);if(s){let i=s.getBoundingClientRect(),l=n.offset?.x||0,u=n.offset?.y||0;t({x:i.left+i.width/2+l,y:i.top+i.height/2+u,visible:!0,onClick:n.onClick||!1})}},[]),a=wi.useCallback(()=>{t(n=>({...n,visible:!1}))},[]),o=wi.useCallback(()=>{t(n=>({...n,visible:!0}))},[]);return{cursorState:e,moveTo:r,hide:a,show:o}}var Si=O(ue(),1);function bt({className:e,...t}){return(0,Si.jsx)("div",{"data-slot":"card",className:er("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...t})}function Jr({className:e,...t}){return(0,Si.jsx)("div",{"data-slot":"card-header",className:er("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function Qr({className:e,...t}){return(0,Si.jsx)("div",{"data-slot":"card-title",className:er("leading-none font-semibold",e),...t})}function hy({className:e,...t}){return(0,Si.jsx)("div",{"data-slot":"card-description",className:er("text-muted-foreground text-sm",e),...t})}function Lt({className:e,...t}){return(0,Si.jsx)("div",{"data-slot":"card-content",className:er("px-6",e),...t})}var S=O(ue(),1),gy=e=>new Date(e).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),Yf=(e,t="USD")=>new Intl.NumberFormat("en-US",{style:"currency",currency:t}).format(e),yy=e=>{switch(e){case"Enterprise":return dn;case"Professional":return Xl;default:return Vl}},Zf=e=>{switch(e){case"Enterprise":return"bg-purple-50 text-purple-700 border-purple-200";case"Professional":return"bg-blue-50 text-blue-700 border-blue-200";default:return"bg-gray-50 text-gray-700 border-gray-200"}};function vu({status:e,type:t="default"}){let a=(()=>{let n=e.toLowerCase();if(t==="transaction")switch(n){case"paid":return{color:"bg-emerald-50 text-emerald-700 border-emerald-200",icon:nt};case"failed":return{color:"bg-red-50 text-red-700 border-red-200",icon:Ar};case"pending":return{color:"bg-amber-50 text-amber-700 border-amber-200",icon:un};case"refunded":return{color:"bg-slate-50 text-slate-700 border-slate-200",icon:Rs};default:return{color:"bg-gray-50 text-gray-700 border-gray-200",icon:_r}}if(t==="subscription")switch(n){case"active":return{color:"bg-emerald-50 text-emerald-700 border-emerald-200",icon:nt};case"cancelled":return{color:"bg-slate-50 text-slate-700 border-slate-200",icon:Ar};case"past_due":return{color:"bg-red-50 text-red-700 border-red-200",icon:_r};case"trialing":return{color:"bg-blue-50 text-blue-700 border-blue-200",icon:un};default:return{color:"bg-gray-50 text-gray-700 border-gray-200",icon:_r}}switch(n){case"active":return{color:"bg-emerald-50 text-emerald-700 border-emerald-200",icon:nt};case"inactive":return{color:"bg-slate-50 text-slate-700 border-slate-200",icon:Ar};default:return{color:"bg-gray-50 text-gray-700 border-gray-200",icon:_r}}})(),o=a.icon;return(0,S.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-medium border ${a.color}`,children:[(0,S.jsx)(o,{className:"h-3 w-3"}),e]})}function bD({subscription:e}){let t=yy(e.plan);return(0,S.jsxs)(bt,{className:"border-gray-200 shadow-sm bg-white overflow-hidden",children:[(0,S.jsx)("div",{className:`h-1 ${e.status==="active"?"bg-emerald-500":e.status==="past_due"?"bg-red-500":"bg-slate-300"}`}),(0,S.jsx)(Jr,{className:"pb-3",children:(0,S.jsxs)("div",{className:"flex items-start justify-between",children:[(0,S.jsxs)("div",{className:"space-y-1",children:[(0,S.jsxs)(Qr,{className:"text-base font-semibold text-gray-900 flex items-center gap-2",children:[(0,S.jsx)(cn,{className:"h-4 w-4 text-gray-500"}),e.id]}),e.customer_email&&(0,S.jsxs)(hy,{className:"text-sm text-gray-500 flex items-center gap-1.5",children:[(0,S.jsx)(_s,{className:"h-3 w-3"}),e.customer_email]})]}),(0,S.jsx)(vu,{status:e.status,type:"subscription"})]})}),(0,S.jsx)(Lt,{className:"pt-0",children:(0,S.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,S.jsxs)("div",{className:"space-y-3",children:[(0,S.jsxs)("div",{children:[(0,S.jsx)("div",{className:"text-xs text-gray-500 mb-1",children:"Plan"}),(0,S.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md text-xs font-medium border ${Zf(e.plan)}`,children:[(0,S.jsx)(t,{className:"h-3 w-3"}),e.plan]})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("div",{className:"text-xs text-gray-500 mb-1",children:"Billing"}),(0,S.jsxs)("div",{className:"text-sm font-medium text-gray-900",children:[Yf(e.amount,e.currency)," / ",e.billing_cycle]})]})]}),(0,S.jsxs)("div",{className:"space-y-3",children:[(0,S.jsxs)("div",{children:[(0,S.jsx)("div",{className:"text-xs text-gray-500 mb-1",children:"Current Period"}),(0,S.jsxs)("div",{className:"text-sm text-gray-700",children:[gy(e.current_period_start)," - ",gy(e.current_period_end)]})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("div",{className:"text-xs text-gray-500 mb-1",children:"Created"}),(0,S.jsx)("div",{className:"text-sm text-gray-700",children:gy(e.created_at)})]})]})]})})]})}function LD({subscriptions:e,maxItems:t=5}){let r=e.slice(0,t),a=e.length>t;return e.length===0?(0,S.jsx)(bt,{className:"border-gray-200 shadow-sm bg-white",children:(0,S.jsxs)(Lt,{className:"py-8 text-center",children:[(0,S.jsx)(cn,{className:"h-10 w-10 text-gray-300 mx-auto mb-3"}),(0,S.jsx)("p",{className:"text-sm text-gray-500",children:"No subscriptions found"})]})}):(0,S.jsxs)(bt,{className:"border-gray-200 shadow-sm bg-white overflow-hidden",children:[(0,S.jsx)(Jr,{className:"pb-2 border-b border-gray-100",children:(0,S.jsxs)(Qr,{className:"text-sm font-medium text-gray-700 flex items-center gap-2",children:[(0,S.jsx)(cn,{className:"h-4 w-4"}),e.length," Subscription",e.length!==1?"s":""]})}),(0,S.jsxs)(Lt,{className:"p-0",children:[(0,S.jsx)("div",{className:"divide-y divide-gray-100",children:r.map(o=>{let n=yy(o.plan);return(0,S.jsx)("div",{className:"px-4 py-3 hover:bg-gray-50 transition-colors",children:(0,S.jsxs)("div",{className:"flex items-center justify-between",children:[(0,S.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,S.jsx)("div",{className:`p-2 rounded-lg ${Zf(o.plan).replace("text-","text-").replace("border-","bg-").split(" ")[0]}`,children:(0,S.jsx)(n,{className:"h-4 w-4"})}),(0,S.jsxs)("div",{className:"min-w-0",children:[(0,S.jsx)("div",{className:"text-sm font-medium text-gray-900 truncate",children:o.customer_email||o.customer_id}),(0,S.jsxs)("div",{className:"text-xs text-gray-500",children:[o.plan," \xB7 ",Yf(o.amount,o.currency),"/",o.billing_cycle]})]})]}),(0,S.jsx)(vu,{status:o.status,type:"subscription"})]})},o.id)})}),a&&(0,S.jsx)("div",{className:"px-4 py-2 bg-gray-50 border-t border-gray-100 text-center",children:(0,S.jsxs)("span",{className:"text-xs text-gray-500",children:["+",e.length-t," more subscription",e.length-t!==1?"s":""]})})]})]})}function ID({customer:e}){let t=yy(e.subscription);return(0,S.jsxs)(bt,{className:"border-gray-200 shadow-sm bg-white overflow-hidden",children:[(0,S.jsx)("div",{className:`h-1 ${e.status==="active"?"bg-emerald-500":"bg-slate-300"}`}),(0,S.jsx)(Jr,{className:"pb-3",children:(0,S.jsxs)("div",{className:"flex items-start justify-between",children:[(0,S.jsx)("div",{className:"flex items-center gap-3",children:(0,S.jsxs)("div",{children:[(0,S.jsx)(Qr,{className:"text-base font-semibold text-gray-900",children:e.name}),(0,S.jsxs)(hy,{className:"text-sm text-gray-500 flex items-center gap-1",children:[(0,S.jsx)(_s,{className:"h-3 w-3"}),e.email]})]})}),(0,S.jsx)(vu,{status:e.status,type:"customer"})]})}),(0,S.jsx)(Lt,{className:"pt-0",children:(0,S.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,S.jsxs)("div",{className:"space-y-3",children:[(0,S.jsxs)("div",{children:[(0,S.jsx)("div",{className:"text-xs text-gray-500 mb-1",children:"Plan"}),(0,S.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md text-xs font-medium border ${Zf(e.subscription)}`,children:[(0,S.jsx)(t,{className:"h-3 w-3"}),e.subscription]})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("div",{className:"text-xs text-gray-500 mb-1",children:"Revenue"}),(0,S.jsxs)("div",{className:"text-sm font-medium text-gray-900 flex items-center gap-1",children:[(0,S.jsx)(fn,{className:"h-3 w-3 text-emerald-500"}),e.revenue]})]})]}),(0,S.jsxs)("div",{className:"space-y-3",children:[(0,S.jsxs)("div",{children:[(0,S.jsx)("div",{className:"text-xs text-gray-500 mb-1",children:"Location"}),(0,S.jsxs)("div",{className:"text-sm text-gray-700 flex items-center gap-1",children:[(0,S.jsx)(As,{className:"h-3 w-3 text-gray-400"}),e.location||"Not specified"]})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("div",{className:"text-xs text-gray-500 mb-1",children:"Customer Since"}),(0,S.jsxs)("div",{className:"text-sm text-gray-700 flex items-center gap-1",children:[(0,S.jsx)(ql,{className:"h-3 w-3 text-gray-400"}),e.joinDate]})]})]})]})})]})}function kD({customers:e,maxItems:t=5}){let r=e.slice(0,t),a=e.length>t;return e.length===0?(0,S.jsx)(bt,{className:"border-gray-200 shadow-sm bg-white",children:(0,S.jsxs)(Lt,{className:"py-8 text-center",children:[(0,S.jsx)(Ds,{className:"h-10 w-10 text-gray-300 mx-auto mb-3"}),(0,S.jsx)("p",{className:"text-sm text-gray-500",children:"No customers found"})]})}):(0,S.jsxs)(bt,{className:"border-gray-200 shadow-sm bg-white overflow-hidden",children:[(0,S.jsx)(Jr,{className:"pb-2 border-b border-gray-100",children:(0,S.jsxs)(Qr,{className:"text-sm font-medium text-gray-700 flex items-center gap-2",children:[(0,S.jsx)(Ds,{className:"h-4 w-4"}),e.length," Customer",e.length!==1?"s":""]})}),(0,S.jsxs)(Lt,{className:"p-0",children:[(0,S.jsx)("div",{className:"divide-y divide-gray-100",children:r.map(o=>(0,S.jsx)("div",{className:"px-4 py-3 hover:bg-gray-50 transition-colors",children:(0,S.jsxs)("div",{className:"flex items-center justify-between",children:[(0,S.jsx)("div",{className:"flex items-center gap-3 min-w-0",children:(0,S.jsxs)("div",{className:"min-w-0",children:[(0,S.jsx)("div",{className:"text-sm font-medium text-gray-900 truncate",children:o.name}),(0,S.jsx)("div",{className:"text-xs text-gray-500 truncate",children:o.email})]})}),(0,S.jsxs)("div",{className:"flex items-center gap-2",children:[(0,S.jsx)("span",{className:`px-2 py-0.5 rounded text-xs font-medium ${Zf(o.subscription)}`,children:o.subscription}),(0,S.jsx)(vu,{status:o.status,type:"customer"})]})]})},o.id))}),a&&(0,S.jsx)("div",{className:"px-4 py-2 bg-gray-50 border-t border-gray-100 text-center",children:(0,S.jsxs)("span",{className:"text-xs text-gray-500",children:["+",e.length-t," more customer",e.length-t!==1?"s":""]})})]})]})}function qI({transactions:e,maxItems:t=5}){let r=e.slice(0,t),a=e.length>t;return e.length===0?(0,S.jsx)(bt,{className:"border-gray-200 shadow-sm bg-white",children:(0,S.jsxs)(Lt,{className:"py-8 text-center",children:[(0,S.jsx)(fn,{className:"h-10 w-10 text-gray-300 mx-auto mb-3"}),(0,S.jsx)("p",{className:"text-sm text-gray-500",children:"No transactions found"})]})}):(0,S.jsxs)(bt,{className:"border-gray-200 shadow-sm bg-white overflow-hidden",children:[(0,S.jsx)(Jr,{className:"pb-2 border-b border-gray-100",children:(0,S.jsxs)(Qr,{className:"text-sm font-medium text-gray-700 flex items-center gap-2",children:[(0,S.jsx)(fn,{className:"h-4 w-4"}),e.length," Transaction",e.length!==1?"s":""]})}),(0,S.jsxs)(Lt,{className:"p-0",children:[(0,S.jsx)("div",{className:"divide-y divide-gray-100",children:r.map(o=>(0,S.jsx)("div",{className:"px-4 py-3 hover:bg-gray-50 transition-colors",children:(0,S.jsxs)("div",{className:"flex items-center justify-between",children:[(0,S.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,S.jsx)("div",{className:`p-2 rounded-lg ${o.status==="paid"?"bg-emerald-50":o.status==="failed"?"bg-red-50":o.status==="refunded"?"bg-slate-50":"bg-amber-50"}`,children:o.status==="paid"?(0,S.jsx)(nt,{className:"h-4 w-4 text-emerald-600"}):o.status==="failed"?(0,S.jsx)(Ar,{className:"h-4 w-4 text-red-600"}):o.status==="refunded"?(0,S.jsx)(Rs,{className:"h-4 w-4 text-slate-600"}):(0,S.jsx)(un,{className:"h-4 w-4 text-amber-600"})}),(0,S.jsxs)("div",{className:"min-w-0",children:[(0,S.jsx)("div",{className:"text-sm font-medium text-gray-900 truncate",children:o.customer}),(0,S.jsxs)("div",{className:"text-xs text-gray-500",children:[o.date,o.decline_reason&&(0,S.jsxs)("span",{className:"text-red-500 ml-2",children:["\xB7 ",o.decline_reason]})]})]})]}),(0,S.jsxs)("div",{className:"flex items-center gap-3",children:[(0,S.jsxs)("span",{className:`text-sm font-semibold ${o.status==="paid"?"text-emerald-600":o.status==="failed"?"text-red-600":o.status==="refunded"?"text-slate-600":"text-amber-600"}`,children:[o.status==="refunded"?"-":"",o.amount]}),(0,S.jsx)(vu,{status:o.status,type:"transaction"})]})]})},o.id))}),a&&(0,S.jsx)("div",{className:"px-4 py-2 bg-gray-50 border-t border-gray-100 text-center",children:(0,S.jsxs)("span",{className:"text-xs text-gray-500",children:["+",e.length-t," more transaction",e.length-t!==1?"s":""]})})]})]})}function PD({apiKeys:e}){return e.length===0?(0,S.jsx)(bt,{className:"border-gray-200 shadow-sm bg-white",children:(0,S.jsxs)(Lt,{className:"py-8 text-center",children:[(0,S.jsx)(Ts,{className:"h-10 w-10 text-gray-300 mx-auto mb-3"}),(0,S.jsx)("p",{className:"text-sm text-gray-500",children:"No API keys found"})]})}):(0,S.jsxs)(bt,{className:"border-gray-200 shadow-sm bg-white overflow-hidden",children:[(0,S.jsx)(Jr,{className:"pb-2 border-b border-gray-100",children:(0,S.jsxs)(Qr,{className:"text-sm font-medium text-gray-700 flex items-center gap-2",children:[(0,S.jsx)(Ts,{className:"h-4 w-4"}),e.length," API Key",e.length!==1?"s":""]})}),(0,S.jsx)(Lt,{className:"p-0",children:(0,S.jsx)("div",{className:"divide-y divide-gray-100",children:e.map((t,r)=>(0,S.jsx)("div",{className:"px-4 py-3 hover:bg-gray-50 transition-colors",children:(0,S.jsxs)("div",{className:"flex items-center justify-between",children:[(0,S.jsxs)("div",{className:"min-w-0",children:[(0,S.jsx)("div",{className:"text-sm font-medium text-gray-900",children:t.name}),(0,S.jsxs)("div",{className:"text-xs text-gray-500 font-mono",children:[t.key.slice(0,12),"...",t.key.slice(-4)]})]}),(0,S.jsxs)("div",{className:"text-xs text-gray-500",children:["Last used: ",t.lastUsed]})]})},r))})})]})}function TD({sessions:e}){let t=r=>{let a=r.toLowerCase();return a.includes("mobile")||a.includes("iphone")||a.includes("android")?Gl:zl};return e.length===0?(0,S.jsx)(bt,{className:"border-gray-200 shadow-sm bg-white",children:(0,S.jsxs)(Lt,{className:"py-8 text-center",children:[(0,S.jsx)(Es,{className:"h-10 w-10 text-gray-300 mx-auto mb-3"}),(0,S.jsx)("p",{className:"text-sm text-gray-500",children:"No active sessions"})]})}):(0,S.jsxs)(bt,{className:"border-gray-200 shadow-sm bg-white overflow-hidden",children:[(0,S.jsx)(Jr,{className:"pb-2 border-b border-gray-100",children:(0,S.jsxs)(Qr,{className:"text-sm font-medium text-gray-700 flex items-center gap-2",children:[(0,S.jsx)(Es,{className:"h-4 w-4"}),e.length," Active Session",e.length!==1?"s":""]})}),(0,S.jsx)(Lt,{className:"p-0",children:(0,S.jsx)("div",{className:"divide-y divide-gray-100",children:e.map((r,a)=>{let o=t(r.device);return(0,S.jsx)("div",{className:"px-4 py-3 hover:bg-gray-50 transition-colors",children:(0,S.jsxs)("div",{className:"flex items-center justify-between",children:[(0,S.jsxs)("div",{className:"flex items-center gap-3",children:[(0,S.jsx)("div",{className:"p-2 rounded-lg bg-gray-100",children:(0,S.jsx)(o,{className:"h-4 w-4 text-gray-600"})}),(0,S.jsxs)("div",{children:[(0,S.jsx)("div",{className:"text-sm font-medium text-gray-900",children:r.device}),(0,S.jsxs)("div",{className:"text-xs text-gray-500 flex items-center gap-1",children:[(0,S.jsx)(As,{className:"h-3 w-3"}),r.location]})]})]}),(0,S.jsx)("div",{className:"text-xs text-gray-500",children:r.time})]})},a)})})})]})}function _D({stats:e}){return(0,S.jsxs)(bt,{className:"border-gray-200 shadow-sm bg-white overflow-hidden",children:[(0,S.jsx)(Jr,{className:"pb-2 border-b border-gray-100",children:(0,S.jsxs)(Qr,{className:"text-sm font-medium text-gray-700 flex items-center gap-2",children:[(0,S.jsx)(Kl,{className:"h-4 w-4"}),"Dashboard Overview"]})}),(0,S.jsx)(Lt,{className:"p-4",children:(0,S.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[e.revenue&&(0,S.jsxs)("div",{className:"p-3 rounded-lg bg-emerald-50 border border-emerald-100",children:[(0,S.jsx)("div",{className:"text-xs text-emerald-600 font-medium mb-1",children:"Revenue"}),(0,S.jsx)("div",{className:"text-lg font-bold text-emerald-700",children:Yf(e.revenue.total)}),e.revenue.change!==0&&(0,S.jsxs)("div",{className:`text-xs ${e.revenue.change>0?"text-emerald-600":"text-red-600"}`,children:[e.revenue.change>0?"+":"",e.revenue.change,"% from last period"]})]}),e.subscriptions&&(0,S.jsxs)("div",{className:"p-3 rounded-lg bg-blue-50 border border-blue-100",children:[(0,S.jsx)("div",{className:"text-xs text-blue-600 font-medium mb-1",children:"Subscriptions"}),(0,S.jsxs)("div",{className:"text-lg font-bold text-blue-700",children:[e.subscriptions.active," active"]}),(0,S.jsxs)("div",{className:"text-xs text-blue-600",children:[e.subscriptions.total," total"]})]}),e.customers&&(0,S.jsxs)("div",{className:"p-3 rounded-lg bg-purple-50 border border-purple-100",children:[(0,S.jsx)("div",{className:"text-xs text-purple-600 font-medium mb-1",children:"Customers"}),(0,S.jsx)("div",{className:"text-lg font-bold text-purple-700",children:e.customers.total}),e.customers.new>0&&(0,S.jsxs)("div",{className:"text-xs text-purple-600",children:["+",e.customers.new," new this period"]})]}),e.transactions&&(0,S.jsxs)("div",{className:"p-3 rounded-lg bg-amber-50 border border-amber-100",children:[(0,S.jsx)("div",{className:"text-xs text-amber-600 font-medium mb-1",children:"Transactions"}),(0,S.jsxs)("div",{className:"text-lg font-bold text-amber-700",children:[e.transactions.successful," successful"]}),e.transactions.failed>0&&(0,S.jsxs)("div",{className:"text-xs text-red-600",children:[e.transactions.failed," failed"]})]})]})})]})}function AD({customers:e}){return e.length===0?(0,S.jsx)(bt,{className:"border-gray-200 shadow-sm bg-white",children:(0,S.jsxs)(Lt,{className:"py-8 text-center",children:[(0,S.jsx)(dn,{className:"h-10 w-10 text-gray-300 mx-auto mb-3"}),(0,S.jsx)("p",{className:"text-sm text-gray-500",children:"No top customers data"})]})}):(0,S.jsxs)(bt,{className:"border-gray-200 shadow-sm bg-white overflow-hidden",children:[(0,S.jsx)(Jr,{className:"pb-2 border-b border-gray-100",children:(0,S.jsxs)(Qr,{className:"text-sm font-medium text-gray-700 flex items-center gap-2",children:[(0,S.jsx)(dn,{className:"h-4 w-4 text-amber-500"}),"Top Customers"]})}),(0,S.jsx)(Lt,{className:"p-0",children:(0,S.jsx)("div",{className:"divide-y divide-gray-100",children:e.map((t,r)=>(0,S.jsx)("div",{className:"px-4 py-3 hover:bg-gray-50 transition-colors",children:(0,S.jsxs)("div",{className:"flex items-center justify-between",children:[(0,S.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,S.jsx)("div",{className:`h-6 w-6 rounded-full flex items-center justify-center text-xs font-bold ${r===0?"bg-amber-100 text-amber-700":r===1?"bg-slate-100 text-slate-700":r===2?"bg-orange-100 text-orange-700":"bg-gray-100 text-gray-700"}`,children:r+1}),(0,S.jsxs)("div",{className:"min-w-0",children:[(0,S.jsx)("div",{className:"text-sm font-medium text-gray-900 truncate",children:t.name}),(0,S.jsx)("div",{className:"text-xs text-gray-500 truncate",children:t.email})]})]}),(0,S.jsx)("div",{className:"text-sm font-semibold text-emerald-600",children:typeof t.revenue=="number"?Yf(t.revenue):t.revenue})]})},r))})})]})}function HI({type:e,data:t}){if(!t)return null;switch(e){case"subscription":return(0,S.jsx)(bD,{subscription:t});case"subscriptions":let r=t.subscriptions||t||[];return(0,S.jsx)(LD,{subscriptions:Array.isArray(r)?r:[r]});case"customer":return(0,S.jsx)(ID,{customer:t.customer||t});case"customers":let a=t.customers||t||[];return(0,S.jsx)(kD,{customers:Array.isArray(a)?a:[a]});case"transactions":let o=t.transactions||t||[];return(0,S.jsx)(qI,{transactions:Array.isArray(o)?o:[o]});case"transaction":return(0,S.jsx)(qI,{transactions:[t],maxItems:1});case"dashboard_stats":return(0,S.jsx)(_D,{stats:t});case"top_customers":let n=t.customers||t||[];return(0,S.jsx)(AD,{customers:Array.isArray(n)?n:[n]});case"api_keys":let s=t.api_keys||t||[];return(0,S.jsx)(PD,{apiKeys:Array.isArray(s)?s:[s]});case"sessions":let i=t.sessions||t||[];return(0,S.jsx)(TD,{sessions:Array.isArray(i)?i:[i]});default:return null}}var Tn=O(ue(),1);function zI({className:e=""}){return(0,Tn.jsx)("div",{className:`flex items-center gap-1 px-4 py-3 ${e}`,children:(0,Tn.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Tn.jsx)("span",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"0ms",animationDuration:"600ms"}}),(0,Tn.jsx)("span",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"150ms",animationDuration:"600ms"}}),(0,Tn.jsx)("span",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"300ms",animationDuration:"600ms"}})]})})}var m=O(ue(),1),RD="0.2.38",ED="http://localhost:5002",WI=340;function DD(e){return e.replace(/\\\\n/g,`
|
|
59
59
|
`).replace(/\\\\t/g," ").replace(/\\\\"/g,'"').replace(/\\\\\\\\/g,"\\").replace(/\\n/g,`
|
|
60
60
|
`).replace(/\\t/g," ").replace(/\\"/g,'"').replace(/\\\\/g,"\\")}function ND(e){if(!e)return null;let t=e.split(`
|
|
61
61
|
`),r=[],a=null,o=!1,n=[],s="",i=u=>{let c=[],d=u,f=0;for(;d.length>0;){let h=d.match(/^`([^`]+)`/);if(h){c.push((0,m.jsx)("code",{className:"bg-gray-100 px-1 py-0.5 rounded text-xs font-mono",children:h[1]},f++)),d=d.slice(h[0].length);continue}let v=d.match(/^\*\*([^*]+)\*\*/);if(v){c.push((0,m.jsx)("strong",{children:v[1]},f++)),d=d.slice(v[0].length);continue}let x=d.match(/^\*([^*]+)\*/);if(x){c.push((0,m.jsx)("em",{children:x[1]},f++)),d=d.slice(x[0].length);continue}let C=d.match(/^\[([^\]]+)\]\(([^)]+)\)/);if(C){c.push((0,m.jsx)("a",{href:C[2],className:"kite-link",target:"_blank",rel:"noopener noreferrer",children:C[1]},f++)),d=d.slice(C[0].length);continue}let g=d.match(/^(https?:\/\/[^\s<>]+|www\.[^\s<>]+)/);if(g){let b=g[1],L=b.startsWith("www.")?`https://${b}`:b;c.push((0,m.jsx)("a",{href:L,className:"kite-link",target:"_blank",rel:"noopener noreferrer",children:b},f++)),d=d.slice(b.length);continue}let p=d.match(/^([a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,})/);if(p){let b=p[1];c.push((0,m.jsx)("a",{href:`mailto:${b}`,className:"kite-link",children:b},f++)),d=d.slice(b.length);continue}let y=d.search(/[`*\[@h]/);if(y===-1){c.push(d);break}else y===0?(c.push(d[0]),d=d.slice(1)):(c.push(d.slice(0,y)),d=d.slice(y))}return c.length===1?c[0]:(0,m.jsx)(m.Fragment,{children:c})},l=()=>{if(a){let u=a.type==="ul"?"ul":"ol";r.push((0,m.jsx)(u,{className:`${a.type==="ul"?"list-disc":"list-decimal"} ml-4 my-1`,children:a.items.map((c,d)=>(0,m.jsx)("li",{className:"ml-2",children:c},d))},r.length)),a=null}};for(let u=0;u<t.length;u++){let c=t[u];if(c.startsWith("```")){o?(r.push((0,m.jsx)("pre",{className:"bg-gray-100 rounded p-2 my-1 overflow-x-auto",children:(0,m.jsx)("code",{className:"text-xs font-mono",children:n.join(`
|
package/dist/index.cjs
CHANGED
|
@@ -969,7 +969,7 @@ function TypingIndicator({ className = "" }) {
|
|
|
969
969
|
|
|
970
970
|
// src/ChatPanel.tsx
|
|
971
971
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
972
|
-
var CHAT_PANEL_VERSION = "0.2.
|
|
972
|
+
var CHAT_PANEL_VERSION = true ? "0.2.38" : "dev";
|
|
973
973
|
var DEFAULT_AGENT_URL = "http://localhost:5002";
|
|
974
974
|
var PANEL_WIDTH = 340;
|
|
975
975
|
function unescapeJsonString(str) {
|
package/dist/index.js
CHANGED