@moontra/moonui-pro 2.25.11 → 2.25.13
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/index.global.js +2 -2
- package/dist/index.global.js.map +1 -1
- package/dist/index.mjs +12 -12
- package/package.json +1 -1
package/dist/index.global.js
CHANGED
|
@@ -66,7 +66,7 @@ ${t}`)}};function L1(e,t){switch(e){case"gemini":return new FM(t);case"openai":r
|
|
|
66
66
|
top: ${l}px !important;
|
|
67
67
|
left: ${c}px !important;
|
|
68
68
|
}
|
|
69
|
-
`),()=>{document.head.removeChild(u)}},[t]),(0,pve.jsx)(qK,{isPresent:t,childRef:n,sizeRef:o,children:L4.cloneElement(e,{ref:n})})}var gve=({children:e,initial:t,isPresent:r,onExitComplete:n,custom:o,presenceAffectsLayout:a,mode:i})=>{let s=nl(qct),l=(0,_w.useId)(),c=(0,_w.useCallback)(d=>{s.set(d,!0);for(let f of s.values())if(!f)return;n&&n()},[s,n]),u=(0,_w.useMemo)(()=>({id:l,initial:t,isPresent:r,custom:o,onExitComplete:c,register:d=>(s.set(d,!1),()=>s.delete(d))}),a?[Math.random(),c]:[r,c]);return(0,_w.useMemo)(()=>{s.forEach((d,f)=>s.set(f,!1))},[r]),hve.useEffect(()=>{!r&&!s.size&&n&&n()},[r]),i==="popLayout"&&(e=(0,$K.jsx)(mve,{isPresent:r,children:e})),(0,$K.jsx)(Ex.Provider,{value:u,children:e})};function qct(){return new Map}var Dx=L(ce(),1);function E4(e=!0){let t=(0,Dx.useContext)(Ex);if(t===null)return[!0,null];let{isPresent:r,onExitComplete:n,register:o}=t,a=(0,Dx.useId)();(0,Dx.useEffect)(()=>{e&&o(a)},[e]);let i=(0,Dx.useCallback)(()=>e&&n&&n(a),[a,n,e]);return!r&&n?[!1,i]:[!0]}var D4=L(ce(),1),ZA=e=>e.key||"";function WK(e){let t=[];return D4.Children.forEach(e,r=>{(0,D4.isValidElement)(r)&&t.push(r)}),t}var O4=L(ce(),1);var IP=typeof window<"u";var xh=IP?O4.useLayoutEffect:O4.useEffect;var Dt=({children:e,custom:t,initial:r=!0,onExitComplete:n,presenceAffectsLayout:o=!0,mode:a="sync",propagate:i=!1})=>{let[s,l]=E4(i),c=(0,bh.useMemo)(()=>WK(e),[e]),u=i&&!s?[]:c.map(ZA),d=(0,bh.useRef)(!0),f=(0,bh.useRef)(c),p=nl(()=>new Map),[h,m]=(0,bh.useState)(c),[g,v]=(0,bh.useState)(c);xh(()=>{d.current=!1,f.current=c;for(let C=0;C<g.length;C++){let b=ZA(g[C]);u.includes(b)?p.delete(b):p.get(b)!==!0&&p.set(b,!1)}},[g,u.length,u.join("-")]);let y=[];if(c!==h){let C=[...c];for(let b=0;b<g.length;b++){let w=g[b],S=ZA(w);u.includes(S)||(C.splice(b,0,w),y.push(w))}a==="wait"&&y.length&&(C=y),v(WK(C)),m(c);return}let{forceRender:x}=(0,bh.useContext)(PP);return(0,JA.jsx)(JA.Fragment,{children:g.map(C=>{let b=ZA(C),w=i&&!s?!1:c===g||u.includes(b),S=()=>{if(p.has(b))p.set(b,!0);else return;let P=!0;p.forEach(N=>{N||(P=!1)}),P&&(x?.(),v(f.current),i&&l?.(),n&&n())};return(0,JA.jsx)(gve,{isPresent:w,initial:!d.current||r?void 0:!1,custom:w?void 0:t,presenceAffectsLayout:o,mode:a,onExitComplete:w?void 0:S,children:C},b)})})};var To=e=>e;var vv=To,Ni=To;function Fw(e){let t;return()=>(t===void 0&&(t=e()),t)}var Fc=(e,t,r)=>{let n=t-e;return n===0?1:(r-e)/n};var ci=e=>e*1e3,ol=e=>e/1e3;var RP={skipAnimations:!1,useManualTiming:!1};function vve(e){let t=new Set,r=new Set,n=!1,o=!1,a=new WeakSet,i={delta:0,timestamp:0,isProcessing:!1};function s(c){a.has(c)&&(l.schedule(c),e()),c(i)}let l={schedule:(c,u=!1,d=!1)=>{let p=d&&n?t:r;return u&&a.add(c),p.has(c)||p.add(c),c},cancel:c=>{r.delete(c),a.delete(c)},process:c=>{if(i=c,n){o=!0;return}n=!0,[t,r]=[r,t],t.forEach(s),t.clear(),n=!1,o&&(o=!1,l.process(c))}};return l}var _4=["read","resolveKeyframes","update","preRender","render","postRender"],$ct=40;function F4(e,t){let r=!1,n=!0,o={delta:0,timestamp:0,isProcessing:!1},a=()=>r=!0,i=_4.reduce((v,y)=>(v[y]=vve(a),v),{}),{read:s,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:f}=i,p=()=>{let v=RP.useManualTiming?o.timestamp:performance.now();r=!1,o.delta=n?1e3/60:Math.max(Math.min(v-o.timestamp,$ct),1),o.timestamp=v,o.isProcessing=!0,s.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),o.isProcessing=!1,r&&t&&(n=!1,e(p))},h=()=>{r=!0,n=!0,o.isProcessing||e(p)};return{schedule:_4.reduce((v,y)=>{let x=i[y];return v[y]=(C,b=!1,w=!1)=>(r||h(),x.schedule(C,b,w)),v},{}),cancel:v=>{for(let y=0;y<_4.length;y++)i[_4[y]].cancel(v)},state:o,steps:i}}var{schedule:Br,cancel:Bc,state:ui,steps:B4}=F4(typeof requestAnimationFrame<"u"?requestAnimationFrame:To,!0);var yve=L(ce(),1),V4=(0,yve.createContext)({strict:!1});var xve={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"]},yv={};for(let e in xve)yv[e]={isEnabled:t=>xve[e].some(r=>!!t[r])};function bve(e){for(let t in e)yv[t]={...yv[t],...e[t]}}var Wct=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 eL(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Wct.has(e)}var wve=e=>!eL(e);function Gct(e){e&&(wve=t=>t.startsWith("on")?!eL(t):e(t))}try{Gct(Lde("@emotion/is-prop-valid").default)}catch{}function Cve(e,t,r){let n={};for(let o in e)o==="values"&&typeof e.values=="object"||(wve(o)||r===!0&&eL(o)||!t&&!eL(o)||e.draggable&&o.startsWith("onDrag"))&&(n[o]=e[o]);return n}function Sve(e){if(typeof Proxy>"u")return e;let t=new Map,r=(...n)=>e(...n);return new Proxy(r,{get:(n,o)=>o==="create"?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}var $4=L(fe(),1);var MP=L(ce(),1);var Pve=L(ce(),1),Ox=(0,Pve.createContext)({});var H4=L(ce(),1);function xv(e){return typeof e=="string"||Array.isArray(e)}function _x(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}var z4=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],tL=["initial",...z4];function Bw(e){return _x(e.animate)||tL.some(t=>xv(e[t]))}function U4(e){return!!(Bw(e)||e.variants)}function Ive(e,t){if(Bw(e)){let{initial:r,animate:n}=e;return{initial:r===!1||xv(r)?r:void 0,animate:xv(n)?n:void 0}}return e.inherit!==!1?t:{}}function kve(e){let{initial:t,animate:r}=Ive(e,(0,H4.useContext)(Ox));return(0,H4.useMemo)(()=>({initial:t,animate:r}),[Rve(t),Rve(r)])}function Rve(e){return Array.isArray(e)?e.join(" "):e}var Nve=Symbol.for("motionComponentSymbol");var Mve=L(ce(),1);function bv(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Tve(e,t,r){return(0,Mve.useCallback)(n=>{n&&e.onMount&&e.onMount(n),t&&(n?t.mount(n):t.unmount()),r&&(typeof r=="function"?r(n):bv(r)&&(r.current=n))},[t])}var Au=L(ce(),1);var kP=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase();var Kct="framerAppearId",j4="data-"+kP(Kct);var{schedule:NP,cancel:ESr}=F4(queueMicrotask,!1);var Ave=L(ce(),1),q4=(0,Ave.createContext)({});function Lve(e,t,r,n,o){var a,i;let{visualElement:s}=(0,Au.useContext)(Ox),l=(0,Au.useContext)(V4),c=(0,Au.useContext)(Ex),u=(0,Au.useContext)(yh).reducedMotion,d=(0,Au.useRef)(null);n=n||l.renderer,!d.current&&n&&(d.current=n(e,{visualState:t,parent:s,props:r,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u}));let f=d.current,p=(0,Au.useContext)(q4);f&&!f.projection&&o&&(f.type==="html"||f.type==="svg")&&Xct(d.current,r,o,p);let h=(0,Au.useRef)(!1);(0,Au.useInsertionEffect)(()=>{f&&h.current&&f.update(r,c)});let m=r[j4],g=(0,Au.useRef)(!!m&&!(!((a=window.MotionHandoffIsComplete)===null||a===void 0)&&a.call(window,m))&&((i=window.MotionHasOptimisedAnimation)===null||i===void 0?void 0:i.call(window,m)));return xh(()=>{f&&(h.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),NP.render(f.render),g.current&&f.animationState&&f.animationState.animateChanges())}),(0,Au.useEffect)(()=>{f&&(!g.current&&f.animationState&&f.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{var v;(v=window.MotionHandoffMarkAsComplete)===null||v===void 0||v.call(window,m)}),g.current=!1))}),f}function Xct(e,t,r,n){let{layoutId:o,layout:a,drag:i,dragConstraints:s,layoutScroll:l,layoutRoot:c}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:Eve(e.parent)),e.projection.setOptions({layoutId:o,layout:a,alwaysMeasureLayout:!!i||s&&bv(s),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:n,layoutScroll:l,layoutRoot:c})}function Eve(e){if(e)return e.options.allowProjection!==!1?e.projection:Eve(e.parent)}function Dve({preloadedFeatures:e,createVisualElement:t,useRender:r,useVisualState:n,Component:o}){var a,i;e&&bve(e);function s(c,u){let d,f={...(0,MP.useContext)(yh),...c,layoutId:Yct(c)},{isStatic:p}=f,h=kve(c),m=n(c,p);if(!p&&IP){Qct(f,e);let g=Zct(f);d=g.MeasureLayout,h.visualElement=Lve(o,m,f,t,g.ProjectionNode)}return(0,$4.jsxs)(Ox.Provider,{value:h,children:[d&&h.visualElement?(0,$4.jsx)(d,{visualElement:h.visualElement,...f}):null,r(o,c,Tve(m,h.visualElement,u),m,p,h.visualElement)]})}s.displayName=`motion.${typeof o=="string"?o:`create(${(i=(a=o.displayName)!==null&&a!==void 0?a:o.name)!==null&&i!==void 0?i:""})`}`;let l=(0,MP.forwardRef)(s);return l[Nve]=o,l}function Yct({layoutId:e}){let t=(0,MP.useContext)(PP).id;return t&&e!==void 0?t+"-"+e:e}function Qct(e,t){let r=(0,MP.useContext)(V4).strict}function Zct(e){let{drag:t,layout:r}=yv;if(!t&&!r)return{};let n={...t,...r};return{MeasureLayout:t?.isEnabled(e)||r?.isEnabled(e)?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}var Ove=["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 TP(e){return typeof e!="string"||e.includes("-")?!1:!!(Ove.indexOf(e)>-1||/[A-Z]/u.test(e))}var GK=L(ce(),1);function _ve(e){let t=[{},{}];return e?.values.forEach((r,n)=>{t[0][n]=r.get(),t[1][n]=r.getVelocity()}),t}function AP(e,t,r,n){if(typeof t=="function"){let[o,a]=_ve(n);t=t(r!==void 0?r:e.custom,o,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){let[o,a]=_ve(n);t=t(r!==void 0?r:e.custom,o,a)}return t}var rL=e=>Array.isArray(e);var Fve=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),Bve=e=>rL(e)?e[e.length-1]||0:e;var Ln=e=>!!(e&&e.getVelocity);function LP(e){let t=Ln(e)?e.get():e;return Fve(t)?t.toValue():t}function Jct({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:r},n,o,a){let i={latestValues:eut(n,o,a,e),renderState:t()};return r&&(i.onMount=s=>r({props:n,current:s,...i}),i.onUpdate=s=>r(s)),i}var W4=e=>(t,r)=>{let n=(0,GK.useContext)(Ox),o=(0,GK.useContext)(Ex),a=()=>Jct(e,t,n,o);return r?a():nl(a)};function eut(e,t,r,n){let o={},a=n(e,{});for(let f in a)o[f]=LP(a[f]);let{initial:i,animate:s}=e,l=Bw(e),c=U4(e);t&&c&&!l&&e.inherit!==!1&&(i===void 0&&(i=t.initial),s===void 0&&(s=t.animate));let u=r?r.initial===!1:!1;u=u||i===!1;let d=u?s:i;if(d&&typeof d!="boolean"&&!_x(d)){let f=Array.isArray(d)?d:[d];for(let p=0;p<f.length;p++){let h=AP(e,f[p]);if(h){let{transitionEnd:m,transition:g,...v}=h;for(let y in v){let x=v[y];if(Array.isArray(x)){let C=u?x.length-1:0;x=x[C]}x!==null&&(o[y]=x)}for(let y in m)o[y]=m[y]}}}return o}var wh=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Lu=new Set(wh);var Vve=e=>t=>typeof t=="string"&&t.startsWith(e),G4=Vve("--"),tut=Vve("var(--"),EP=e=>tut(e)?rut.test(e.split("/*")[0].trim()):!1,rut=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;var K4=(e,t)=>t&&typeof e=="number"?t.transform(e):e;var kl=(e,t,r)=>r>t?t:r<e?e:r;var Ch={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},wv={...Ch,transform:e=>kl(0,1,e)},nL={...Ch,default:1};var oL=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Sh=oL("deg"),Vc=oL("%"),er=oL("px"),zve=oL("vh"),Uve=oL("vw"),KK={...Vc,parse:e=>Vc.parse(e)/100,transform:e=>Vc.transform(e*100)};var Hve={borderWidth:er,borderTopWidth:er,borderRightWidth:er,borderBottomWidth:er,borderLeftWidth:er,borderRadius:er,radius:er,borderTopLeftRadius:er,borderTopRightRadius:er,borderBottomRightRadius:er,borderBottomLeftRadius:er,width:er,maxWidth:er,height:er,maxHeight:er,top:er,right:er,bottom:er,left:er,padding:er,paddingTop:er,paddingRight:er,paddingBottom:er,paddingLeft:er,margin:er,marginTop:er,marginRight:er,marginBottom:er,marginLeft:er,backgroundPositionX:er,backgroundPositionY:er};var jve={rotate:Sh,rotateX:Sh,rotateY:Sh,rotateZ:Sh,scale:nL,scaleX:nL,scaleY:nL,scaleZ:nL,skew:Sh,skewX:Sh,skewY:Sh,distance:er,translateX:er,translateY:er,translateZ:er,x:er,y:er,z:er,perspective:er,transformPerspective:er,opacity:wv,originX:KK,originY:KK,originZ:er};var XK={...Ch,transform:Math.round};var DP={...Hve,...jve,zIndex:XK,size:er,fillOpacity:wv,strokeOpacity:wv,numOctaves:XK};var nut={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},out=wh.length;function qve(e,t,r){let n="",o=!0;for(let a=0;a<out;a++){let i=wh[a],s=e[i];if(s===void 0)continue;let l=!0;if(typeof s=="number"?l=s===(i.startsWith("scale")?1:0):l=parseFloat(s)===0,!l||r){let c=K4(s,DP[i]);if(!l){o=!1;let u=nut[i]||i;n+=`${u}(${c}) `}r&&(t[i]=c)}}return n=n.trim(),r?n=r(t,o?"":n):o&&(n="none"),n}function OP(e,t,r){let{style:n,vars:o,transformOrigin:a}=e,i=!1,s=!1;for(let l in t){let c=t[l];if(Lu.has(l)){i=!0;continue}else if(G4(l)){o[l]=c;continue}else{let u=K4(c,DP[l]);l.startsWith("origin")?(s=!0,a[l]=u):n[l]=u}}if(t.transform||(i||r?n.transform=qve(t,e.transform,r):n.transform&&(n.transform="none")),s){let{originX:l="50%",originY:c="50%",originZ:u=0}=a;n.transformOrigin=`${l} ${c} ${u}`}}var aut={offset:"stroke-dashoffset",array:"stroke-dasharray"},iut={offset:"strokeDashoffset",array:"strokeDasharray"};function $ve(e,t,r=1,n=0,o=!0){e.pathLength=1;let a=o?aut:iut;e[a.offset]=er.transform(-n);let i=er.transform(t),s=er.transform(r);e[a.array]=`${i} ${s}`}function Wve(e,t,r){return typeof e=="string"?e:er.transform(t+r*e)}function Gve(e,t,r){let n=Wve(t,e.x,e.width),o=Wve(r,e.y,e.height);return`${n} ${o}`}function _P(e,{attrX:t,attrY:r,attrScale:n,originX:o,originY:a,pathLength:i,pathSpacing:s=1,pathOffset:l=0,...c},u,d){if(OP(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:f,style:p,dimensions:h}=e;f.transform&&(h&&(p.transform=f.transform),delete f.transform),h&&(o!==void 0||a!==void 0||p.transform)&&(p.transformOrigin=Gve(h,o!==void 0?o:.5,a!==void 0?a:.5)),t!==void 0&&(f.x=t),r!==void 0&&(f.y=r),n!==void 0&&(f.scale=n),i!==void 0&&$ve(f,i,s,l,!1)}var FP=()=>({style:{},transform:{},transformOrigin:{},vars:{}});var X4=()=>({...FP(),attrs:{}});var BP=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Y4(e,{style:t,vars:r},n,o){Object.assign(e.style,t,o&&o.getProjectionStyles(n));for(let a in r)e.style.setProperty(a,r[a])}var Q4=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 Z4(e,t,r,n){Y4(e,t,void 0,n);for(let o in t.attrs)e.setAttribute(Q4.has(o)?o:kP(o),t.attrs[o])}var VP={};function Kve(e){Object.assign(VP,e)}function J4(e,{layout:t,layoutId:r}){return Lu.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!VP[e]||e==="opacity")}function zP(e,t,r){var n;let{style:o}=e,a={};for(let i in o)(Ln(o[i])||t.style&&Ln(t.style[i])||J4(i,e)||((n=r?.getValue(i))===null||n===void 0?void 0:n.liveStyle)!==void 0)&&(a[i]=o[i]);return a}function eV(e,t,r){let n=zP(e,t,r);for(let o in e)if(Ln(e[o])||Ln(t[o])){let a=wh.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;n[a]=e[o]}return n}function sut(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 Xve=["x","y","width","height","cx","cy","r"],Yve={useVisualState:W4({scrapeMotionValuesFromProps:eV,createRenderState:X4,onUpdate:({props:e,prevProps:t,current:r,renderState:n,latestValues:o})=>{if(!r)return;let a=!!e.drag;if(!a){for(let s in o)if(Lu.has(s)){a=!0;break}}if(!a)return;let i=!t;if(t)for(let s=0;s<Xve.length;s++){let l=Xve[s];e[l]!==t[l]&&(i=!0)}i&&Br.read(()=>{sut(r,n),Br.render(()=>{_P(n,o,BP(r.tagName),e.transformTemplate),Z4(r,n)})})}})};var Qve={useVisualState:W4({scrapeMotionValuesFromProps:zP,createRenderState:FP})};var UP=L(ce(),1);var Zve=L(ce(),1);function YK(e,t,r){for(let n in t)!Ln(t[n])&&!J4(n,r)&&(e[n]=t[n])}function lut({transformTemplate:e},t){return(0,Zve.useMemo)(()=>{let r=FP();return OP(r,t,e),Object.assign({},r.vars,r.style)},[t])}function cut(e,t){let r=e.style||{},n={};return YK(n,r,e),Object.assign(n,lut(e,t)),n}function Jve(e,t){let r={},n=cut(e,t);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.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=n,r}var eye=L(ce(),1);function tye(e,t,r,n){let o=(0,eye.useMemo)(()=>{let a=X4();return _P(a,t,BP(n),e.transformTemplate),{...a.attrs,style:{...a.style}}},[t]);if(e.style){let a={};YK(a,e.style,e),o.style={...a,...o.style}}return o}function rye(e=!1){return(r,n,o,{latestValues:a},i)=>{let l=(TP(r)?tye:Jve)(n,a,i,r),c=Cve(n,typeof r=="string",e),u=r!==UP.Fragment?{...c,...l,ref:o}:{},{children:d}=n,f=(0,UP.useMemo)(()=>Ln(d)?d.get():d,[d]);return(0,UP.createElement)(r,{...u,children:f})}}function nye(e,t){return function(n,{forwardMotionProps:o}={forwardMotionProps:!1}){let i={...TP(n)?Yve:Qve,preloadedFeatures:e,useRender:rye(o),createVisualElement:t,Component:n};return Dve(i)}}function QK(e,t){if(!Array.isArray(t))return!1;let r=t.length;if(r!==e.length)return!1;for(let n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}function Fx(e,t,r){let n=e.getProps();return AP(n,t,r!==void 0?r:n.custom,e)}var ZK=Fw(()=>window.ScrollTimeline!==void 0);var aL=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 n=0;n<this.animations.length;n++)this.animations[n][t]=r}attachTimeline(t,r){let n=this.animations.map(o=>{if(ZK()&&o.attachTimeline)return o.attachTimeline(t);if(typeof r=="function")return r(o)});return()=>{n.forEach((o,a)=>{o&&o(),this.animations[a].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 Vw=class extends aL{then(t,r){return Promise.all(this.animations).then(t).catch(r)}};function Bx(e,t){return e?e[t]||e.default||e:void 0}function zw(e){let t=0,r=50,n=e.next(t);for(;!n.done&&t<2e4;)t+=r,n=e.next(t);return t>=2e4?1/0:t}function rV(e,t=100,r){let n=r({...e,keyframes:[0,t]}),o=Math.min(zw(n),2e4);return{type:"keyframes",ease:a=>n.next(o*a).value/t,duration:ol(o)}}function Ph(e){return typeof e=="function"}function iL(e,t){e.timeline=t,e.onfinish=null}var HP=e=>Array.isArray(e)&&typeof e[0]=="number";var JK={linearEasing:void 0};function oye(e,t){let r=Fw(e);return()=>{var n;return(n=JK[t])!==null&&n!==void 0?n:r()}}var Vx=oye(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");var sL=(e,t,r=10)=>{let n="",o=Math.max(Math.round(t/r),2);for(let a=0;a<o;a++)n+=e(Fc(0,o-1,a))+", ";return`linear(${n.substring(0,n.length-2)})`};function oV(e){return!!(typeof e=="function"&&Vx()||!e||typeof e=="string"&&(e in nV||Vx())||HP(e)||Array.isArray(e)&&e.every(oV))}var jP=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`,nV={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:jP([0,.65,.55,1]),circOut:jP([.55,0,1,.45]),backIn:jP([.31,.01,.66,-.59]),backOut:jP([.33,1.53,.69,.99])};function qP(e,t){if(e)return typeof e=="function"&&Vx()?sL(e,t):HP(e)?jP(e):Array.isArray(e)?e.map(r=>qP(r,t)||nV.easeOut):nV[e]}var Ld={x:!1,y:!1};function $P(){return Ld.x||Ld.y}function lL(e,t,r){var n;if(e instanceof Element)return[e];if(typeof e=="string"){let o=document;t&&(o=t.current);let a=(n=r?.[e])!==null&&n!==void 0?n:o.querySelectorAll(e);return a?Array.from(a):[]}return Array.from(e)}function aV(e,t){let r=lL(e),n=new AbortController,o={passive:!0,...t,signal:n.signal};return[r,o,()=>n.abort()]}function aye(e){return t=>{t.pointerType==="touch"||$P()||e(t)}}function e7(e,t,r={}){let[n,o,a]=aV(e,r),i=aye(s=>{let{target:l}=s,c=t(s);if(typeof c!="function"||!l)return;let u=aye(d=>{c(d),l.removeEventListener("pointerleave",u)});l.addEventListener("pointerleave",u,o)});return n.forEach(s=>{s.addEventListener("pointerenter",i,o)}),a}var iV=(e,t)=>t?e===t?!0:iV(e,t.parentElement):!1;var Uw=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;var uut=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function iye(e){return uut.has(e.tagName)||e.tabIndex!==-1}var Hw=new WeakSet;function sye(e){return t=>{t.key==="Enter"&&e(t)}}function t7(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}var lye=(e,t)=>{let r=e.currentTarget;if(!r)return;let n=sye(()=>{if(Hw.has(r))return;t7(r,"down");let o=sye(()=>{t7(r,"up")}),a=()=>t7(r,"cancel");r.addEventListener("keyup",o,t),r.addEventListener("blur",a,t)});r.addEventListener("keydown",n,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",n),t)};function cye(e){return Uw(e)&&!$P()}function r7(e,t,r={}){let[n,o,a]=aV(e,r),i=s=>{let l=s.currentTarget;if(!cye(s)||Hw.has(l))return;Hw.add(l);let c=t(s),u=(p,h)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),!(!cye(p)||!Hw.has(l))&&(Hw.delete(l),typeof c=="function"&&c(p,{success:h}))},d=p=>{u(p,r.useGlobalTarget||iV(l,p.target))},f=p=>{u(p,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",f,o)};return n.forEach(s=>{!iye(s)&&s.getAttribute("tabindex")===null&&(s.tabIndex=0),(r.useGlobalTarget?window:s).addEventListener("pointerdown",i,o),s.addEventListener("focus",c=>lye(c,o),o)}),a}function n7(e){return e==="x"||e==="y"?Ld[e]?null:(Ld[e]=!0,()=>{Ld[e]=!1}):Ld.x||Ld.y?null:(Ld.x=Ld.y=!0,()=>{Ld.x=Ld.y=!1})}var sV=new Set(["width","height","top","left","right","bottom",...wh]);var lV;function dut(){lV=void 0}var ec={now:()=>(lV===void 0&&ec.set(ui.isProcessing||RP.useManualTiming?ui.timestamp:performance.now()),lV),set:e=>{lV=e,queueMicrotask(dut)}};function WP(e,t){e.indexOf(t)===-1&&e.push(t)}function zx(e,t){let r=e.indexOf(t);r>-1&&e.splice(r,1)}function dye([...e],t,r){let n=t<0?e.length+t:t;if(n>=0&&n<e.length){let o=r<0?e.length+r:r,[a]=e.splice(t,1);e.splice(o,0,a)}return e}var Ux=class{constructor(){this.subscriptions=[]}add(t){return WP(this.subscriptions,t),()=>zx(this.subscriptions,t)}notify(t,r,n){let o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,r,n);else for(let a=0;a<o;a++){let i=this.subscriptions[a];i&&i(t,r,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};function cV(e,t){return t?e*(1e3/t):0}var fye=30,fut=e=>!isNaN(parseFloat(e)),GP={current:void 0},o7=class{constructor(t,r={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(n,o=!0)=>{let a=ec.now();this.updatedAt!==a&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),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=ec.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=fut(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 Ux);let n=this.events[t].add(r);return t==="change"?()=>{n(),Br.read(()=>{this.events.change.getSize()||this.stop()})}:n}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,n){this.set(r),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}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 GP.current&&GP.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let t=ec.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>fye)return 0;let r=Math.min(this.updatedAt-this.prevUpdatedAt,fye);return cV(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 am(e,t){return new o7(e,t)}function put(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,am(r))}function cL(e,t){let r=Fx(e,t),{transitionEnd:n={},transition:o={},...a}=r||{};a={...a,...n};for(let i in a){let s=Bve(a[i]);put(e,i,s)}}function pye(e){return!!(Ln(e)&&e.add)}function uL(e,t){let r=e.getValue("willChange");if(pye(r))return r.add(t)}function uV(e){return e.props[j4]}var dV={current:!1};var mye=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,mut=1e-7,hut=12;function gut(e,t,r,n,o){let a,i,s=0;do i=t+(r-t)/2,a=mye(i,n,o)-e,a>0?r=i:t=i;while(Math.abs(a)>mut&&++s<hut);return i}function Hx(e,t,r,n){if(e===t&&r===n)return To;let o=a=>gut(a,0,1,e,r);return a=>a===0||a===1?a:mye(o(a),t,n)}var fV=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2;var pV=e=>t=>1-e(1-t);var a7=Hx(.33,1.53,.69,.99),dL=pV(a7),mV=fV(dL);var hV=e=>(e*=2)<1?.5*dL(e):.5*(2-Math.pow(2,-10*(e-1)));var gV=e=>1-Math.sin(Math.acos(e)),vV=pV(gV),yV=fV(gV);var xV=e=>/^0[^.\s]+$/u.test(e);function hye(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||xV(e):!0}var jx=e=>Math.round(e*1e5)/1e5;var KP=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function gye(e){return e==null}var vye=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;var XP=(e,t)=>r=>!!(typeof r=="string"&&vye.test(r)&&r.startsWith(e)||t&&!gye(r)&&Object.prototype.hasOwnProperty.call(r,t)),bV=(e,t,r)=>n=>{if(typeof n!="string")return n;let[o,a,i,s]=n.match(KP);return{[e]:parseFloat(o),[t]:parseFloat(a),[r]:parseFloat(i),alpha:s!==void 0?parseFloat(s):1}};var vut=e=>kl(0,255,e),i7={...Ch,transform:e=>Math.round(vut(e))},Ih={test:XP("rgb","red"),parse:bV("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+i7.transform(e)+", "+i7.transform(t)+", "+i7.transform(r)+", "+jx(wv.transform(n))+")"};function yut(e){let t="",r="",n="",o="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),n=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),n=e.substring(3,4),o=e.substring(4,5),t+=t,r+=r,n+=n,o+=o),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:o?parseInt(o,16)/255:1}}var fL={test:XP("#"),parse:yut,transform:Ih.transform};var qx={test:XP("hsl","hue"),parse:bV("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+Vc.transform(jx(t))+", "+Vc.transform(jx(r))+", "+jx(wv.transform(n))+")"};var ss={test:e=>Ih.test(e)||fL.test(e)||qx.test(e),parse:e=>Ih.test(e)?Ih.parse(e):qx.test(e)?qx.parse(e):fL.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ih.transform(e):qx.transform(e)};var yye=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function xut(e){var t,r;return isNaN(e)&&typeof e=="string"&&(((t=e.match(KP))===null||t===void 0?void 0:t.length)||0)+(((r=e.match(yye))===null||r===void 0?void 0:r.length)||0)>0}var bye="number",wye="color",but="var",wut="var(",xye="${}",Cut=/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 jw(e){let t=e.toString(),r=[],n={color:[],number:[],var:[]},o=[],a=0,s=t.replace(Cut,l=>(ss.test(l)?(n.color.push(a),o.push(wye),r.push(ss.parse(l))):l.startsWith(wut)?(n.var.push(a),o.push(but),r.push(l)):(n.number.push(a),o.push(bye),r.push(parseFloat(l))),++a,xye)).split(xye);return{values:r,split:s,indexes:n,types:o}}function Cye(e){return jw(e).values}function Sye(e){let{split:t,types:r}=jw(e),n=t.length;return o=>{let a="";for(let i=0;i<n;i++)if(a+=t[i],o[i]!==void 0){let s=r[i];s===bye?a+=jx(o[i]):s===wye?a+=ss.transform(o[i]):a+=o[i]}return a}}var Sut=e=>typeof e=="number"?0:e;function Put(e){let t=Cye(e);return Sye(e)(t.map(Sut))}var zc={test:xut,parse:Cye,createTransformer:Sye,getAnimatableNone:Put};var Iut=new Set(["brightness","contrast","saturate","opacity"]);function Rut(e){let[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;let[n]=r.match(KP)||[];if(!n)return e;let o=r.replace(n,""),a=Iut.has(t)?1:0;return n!==r&&(a*=100),t+"("+a+o+")"}var kut=/\b([a-z-]*)\(.*?\)/gu,pL={...zc,getAnimatableNone:e=>{let t=e.match(kut);return t?t.map(Rut).join(" "):e}};var Nut={...DP,color:ss,backgroundColor:ss,outlineColor:ss,fill:ss,stroke:ss,borderColor:ss,borderTopColor:ss,borderRightColor:ss,borderBottomColor:ss,borderLeftColor:ss,filter:pL,WebkitFilter:pL},YP=e=>Nut[e];function wV(e,t){let r=YP(e);return r!==pL&&(r=zc),r.getAnimatableNone?r.getAnimatableNone(t):void 0}var Mut=new Set(["auto","none","0"]);function Pye(e,t,r){let n=0,o;for(;n<e.length&&!o;){let a=e[n];typeof a=="string"&&!Mut.has(a)&&jw(a).values.length&&(o=e[n]),n++}if(o&&r)for(let a of t)e[a]=wV(r,o)}var s7=e=>e===Ch||e===er,Iye=(e,t)=>parseFloat(e.split(", ")[t]),Rye=(e,t)=>(r,{transform:n})=>{if(n==="none"||!n)return 0;let o=n.match(/^matrix3d\((.+)\)$/u);if(o)return Iye(o[1],t);{let a=n.match(/^matrix\((.+)\)$/u);return a?Iye(a[1],e):0}},Tut=new Set(["x","y","z"]),Aut=wh.filter(e=>!Tut.has(e));function kye(e){let t=[];return Aut.forEach(r=>{let n=e.getValue(r);n!==void 0&&(t.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),t}var qw={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:Rye(4,13),y:Rye(5,14)};qw.translateX=qw.x;qw.translateY=qw.y;var $w=new Set,l7=!1,c7=!1;function Nye(){if(c7){let e=Array.from($w).filter(n=>n.needsMeasurement),t=new Set(e.map(n=>n.element)),r=new Map;t.forEach(n=>{let o=kye(n);o.length&&(r.set(n,o),n.render())}),e.forEach(n=>n.measureInitialState()),t.forEach(n=>{n.render();let o=r.get(n);o&&o.forEach(([a,i])=>{var s;(s=n.getValue(a))===null||s===void 0||s.set(i)})}),e.forEach(n=>n.measureEndState()),e.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}c7=!1,l7=!1,$w.forEach(e=>e.complete()),$w.clear()}function Mye(){$w.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(c7=!0)})}function Tye(){Mye(),Nye()}var $x=class{constructor(t,r,n,o,a,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=r,this.name=n,this.motionValue=o,this.element=a,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?($w.add(this),l7||(l7=!0,Br.read(Mye),Br.resolveKeyframes(Nye))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:t,name:r,element:n,motionValue:o}=this;for(let a=0;a<t.length;a++)if(t[a]===null)if(a===0){let i=o?.get(),s=t[t.length-1];if(i!==void 0)t[0]=i;else if(n&&r){let l=n.readValue(r,s);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=s),o&&i===void 0&&o.set(t[0])}else t[a]=t[a-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),$w.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,$w.delete(this))}resume(){this.isComplete||this.scheduleResolve()}};var CV=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);var Lut=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Eut(e){let t=Lut.exec(e);if(!t)return[,];let[,r,n,o]=t;return[`--${r??n}`,o]}var Dut=4;function u7(e,t,r=1){Ni(r<=Dut,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);let[n,o]=Eut(e);if(!n)return;let a=window.getComputedStyle(t).getPropertyValue(n);if(a){let i=a.trim();return CV(i)?parseFloat(i):i}return EP(o)?u7(o,t,r+1):o}var SV=e=>t=>t.test(e);var Aye={test:e=>e==="auto",parse:e=>e};var d7=[Ch,er,Vc,Sh,Uve,zve,Aye],f7=e=>d7.find(SV(e));var QP=class extends $x{constructor(t,r,n,o,a){super(t,r,n,o,a,!0)}readKeyframes(){let{unresolvedKeyframes:t,element:r,name:n}=this;if(!r||!r.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),EP(c))){let u=u7(c,r.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!sV.has(n)||t.length!==2)return;let[o,a]=t,i=f7(o),s=f7(a);if(i!==s)if(s7(i)&&s7(s))for(let l=0;l<t.length;l++){let c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){let{unresolvedKeyframes:t,name:r}=this,n=[];for(let o=0;o<t.length;o++)hye(t[o])&&n.push(o);n.length&&Pye(t,n,r)}measureInitialState(){let{element:t,unresolvedKeyframes:r,name:n}=this;if(!t||!t.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=qw[n](t.measureViewportBox(),window.getComputedStyle(t.current)),r[0]=this.measuredOrigin;let o=r[r.length-1];o!==void 0&&t.getValue(n,o).jump(o,!1)}measureEndState(){var t;let{element:r,name:n,unresolvedKeyframes:o}=this;if(!r||!r.current)return;let a=r.getValue(n);a&&a.jump(this.measuredOrigin,!1);let i=o.length-1,s=o[i];o[i]=qw[n](r.measureViewportBox(),window.getComputedStyle(r.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{r.getValue(l).set(c)}),this.resolveNoneKeyframes()}};var p7=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(zc.test(e)||e==="0")&&!e.startsWith("url("));function Out(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 Lye(e,t,r,n){let o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;let a=e[e.length-1],i=p7(o,t),s=p7(a,t);return vv(i===s,`You are trying to animate ${t} from "${o}" to "${a}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${a} via the \`style\` property.`),!i||!s?!1:Out(e)||(r==="spring"||Ph(r))&&n}var _ut=e=>e!==null;function Wx(e,{repeat:t,repeatType:r="loop"},n){let o=e.filter(_ut),a=t&&r!=="loop"&&t%2===1?0:o.length-1;return!a||n===void 0?o[a]:n}var Fut=40,ZP=class{constructor({autoplay:t=!0,delay:r=0,type:n="keyframes",repeat:o=0,repeatDelay:a=0,repeatType:i="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=ec.now(),this.options={autoplay:t,delay:r,type:n,repeat:o,repeatDelay:a,repeatType:i,...s},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>Fut?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&Tye(),this._resolved}onKeyframesResolved(t,r){this.resolvedAt=ec.now(),this.hasAttemptedResolve=!0;let{name:n,type:o,velocity:a,delay:i,onComplete:s,onUpdate:l,isGenerator:c}=this.options;if(!c&&!Lye(t,n,o,a))if(dV.current||!i){l&&l(Wx(t,this.options,r)),s&&s(),this.resolveFinishedPromise();return}else this.options.duration=0;let u=this.initPlayback(t,r);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:r,...u},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 dn=(e,t,r)=>e+(t-e)*r;function m7(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 Eye({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,t/=100,r/=100;let o=0,a=0,i=0;if(!t)o=a=i=r;else{let s=r<.5?r*(1+t):r+t-r*t,l=2*r-s;o=m7(l,s,e+1/3),a=m7(l,s,e),i=m7(l,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(a*255),blue:Math.round(i*255),alpha:n}}function JP(e,t){return r=>r>0?t:e}var h7=(e,t,r)=>{let n=e*e,o=r*(t*t-n)+n;return o<0?0:Math.sqrt(o)},But=[fL,Ih,qx],Vut=e=>But.find(t=>t.test(e));function Dye(e){let t=Vut(e);if(vv(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let r=t.parse(e);return t===qx&&(r=Eye(r)),r}var g7=(e,t)=>{let r=Dye(e),n=Dye(t);if(!r||!n)return JP(e,t);let o={...r};return a=>(o.red=h7(r.red,n.red,a),o.green=h7(r.green,n.green,a),o.blue=h7(r.blue,n.blue,a),o.alpha=dn(r.alpha,n.alpha,a),Ih.transform(o))};var zut=(e,t)=>r=>t(e(r)),Rh=(...e)=>e.reduce(zut);var PV=new Set(["none","hidden"]);function Oye(e,t){return PV.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function Uut(e,t){return r=>dn(e,t,r)}function IV(e){return typeof e=="number"?Uut:typeof e=="string"?EP(e)?JP:ss.test(e)?g7:qut:Array.isArray(e)?_ye:typeof e=="object"?ss.test(e)?g7:Hut:JP}function _ye(e,t){let r=[...e],n=r.length,o=e.map((a,i)=>IV(a)(a,t[i]));return a=>{for(let i=0;i<n;i++)r[i]=o[i](a);return r}}function Hut(e,t){let r={...e,...t},n={};for(let o in r)e[o]!==void 0&&t[o]!==void 0&&(n[o]=IV(e[o])(e[o],t[o]));return o=>{for(let a in n)r[a]=n[a](o);return r}}function jut(e,t){var r;let n=[],o={color:0,var:0,number:0};for(let a=0;a<t.values.length;a++){let i=t.types[a],s=e.indexes[i][o[i]],l=(r=e.values[s])!==null&&r!==void 0?r:0;n[a]=l,o[i]++}return n}var qut=(e,t)=>{let r=zc.createTransformer(t),n=jw(e),o=jw(t);return n.indexes.var.length===o.indexes.var.length&&n.indexes.color.length===o.indexes.color.length&&n.indexes.number.length>=o.indexes.number.length?PV.has(e)&&!o.values.length||PV.has(t)&&!n.values.length?Oye(e,t):Rh(_ye(jut(n,o),o.values),r):(vv(!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.`),JP(e,t))};function RV(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?dn(e,t,r):IV(e)(e,t)}var $ut=5;function kV(e,t,r){let n=Math.max(t-$ut,0);return cV(r-e(n),t-n)}var wa={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 v7=.001;function Fye({duration:e=wa.duration,bounce:t=wa.bounce,velocity:r=wa.velocity,mass:n=wa.mass}){let o,a;vv(e<=ci(wa.maxDuration),"Spring duration must be 10 seconds or less");let i=1-t;i=kl(wa.minDamping,wa.maxDamping,i),e=kl(wa.minDuration,wa.maxDuration,ol(e)),i<1?(o=c=>{let u=c*i,d=u*e,f=u-r,p=NV(c,i),h=Math.exp(-d);return v7-f/p*h},a=c=>{let d=c*i*e,f=d*r+r,p=Math.pow(i,2)*Math.pow(c,2)*e,h=Math.exp(-d),m=NV(Math.pow(c,2),i);return(-o(c)+v7>0?-1:1)*((f-p)*h)/m}):(o=c=>{let u=Math.exp(-c*e),d=(c-r)*e+1;return-v7+u*d},a=c=>{let u=Math.exp(-c*e),d=(r-c)*(e*e);return u*d});let s=5/e,l=Gut(o,a,s);if(e=ci(e),isNaN(l))return{stiffness:wa.stiffness,damping:wa.damping,duration:e};{let c=Math.pow(l,2)*n;return{stiffness:c,damping:i*2*Math.sqrt(n*c),duration:e}}}var Wut=12;function Gut(e,t,r){let n=r;for(let o=1;o<Wut;o++)n=n-e(n)/t(n);return n}function NV(e,t){return e*Math.sqrt(1-t*t)}var Kut=["duration","bounce"],Xut=["stiffness","damping","mass"];function Bye(e,t){return t.some(r=>e[r]!==void 0)}function Yut(e){let t={velocity:wa.velocity,stiffness:wa.stiffness,damping:wa.damping,mass:wa.mass,isResolvedFromDuration:!1,...e};if(!Bye(e,Xut)&&Bye(e,Kut))if(e.visualDuration){let r=e.visualDuration,n=2*Math.PI/(r*1.2),o=n*n,a=2*kl(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:wa.mass,stiffness:o,damping:a}}else{let r=Fye(e);t={...t,...r,mass:wa.mass},t.isResolvedFromDuration=!0}return t}function eI(e=wa.visualDuration,t=wa.bounce){let r=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e,{restSpeed:n,restDelta:o}=r,a=r.keyframes[0],i=r.keyframes[r.keyframes.length-1],s={done:!1,value:a},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=Yut({...r,velocity:-ol(r.velocity||0)}),h=f||0,m=c/(2*Math.sqrt(l*u)),g=i-a,v=ol(Math.sqrt(l/u)),y=Math.abs(g)<5;n||(n=y?wa.restSpeed.granular:wa.restSpeed.default),o||(o=y?wa.restDelta.granular:wa.restDelta.default);let x;if(m<1){let b=NV(v,m);x=w=>{let S=Math.exp(-m*v*w);return i-S*((h+m*v*g)/b*Math.sin(b*w)+g*Math.cos(b*w))}}else if(m===1)x=b=>i-Math.exp(-v*b)*(g+(h+v*g)*b);else{let b=v*Math.sqrt(m*m-1);x=w=>{let S=Math.exp(-m*v*w),P=Math.min(b*w,300);return i-S*((h+m*v*g)*Math.sinh(P)+b*g*Math.cosh(P))/b}}let C={calculatedDuration:p&&d||null,next:b=>{let w=x(b);if(p)s.done=b>=d;else{let S=0;m<1&&(S=b===0?ci(h):kV(x,b,w));let P=Math.abs(S)<=n,N=Math.abs(i-w)<=o;s.done=P&&N}return s.value=s.done?i:w,s},toString:()=>{let b=Math.min(zw(C),2e4),w=sL(S=>C.next(b*S).value,b,30);return b+"ms "+w}};return C}function y7({keyframes:e,velocity:t=0,power:r=.8,timeConstant:n=325,bounceDamping:o=10,bounceStiffness:a=500,modifyTarget:i,min:s,max:l,restDelta:c=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=P=>s!==void 0&&P<s||l!==void 0&&P>l,h=P=>s===void 0?l:l===void 0||Math.abs(s-P)<Math.abs(l-P)?s:l,m=r*t,g=d+m,v=i===void 0?g:i(g);v!==g&&(m=v-d);let y=P=>-m*Math.exp(-P/n),x=P=>v+y(P),C=P=>{let N=y(P),D=x(P);f.done=Math.abs(N)<=c,f.value=f.done?v:D},b,w,S=P=>{p(f.value)&&(b=P,w=eI({keyframes:[f.value,h(f.value)],velocity:kV(x,P,f.value),damping:o,stiffness:a,restDelta:c,restSpeed:u}))};return S(0),{calculatedDuration:null,next:P=>{let N=!1;return!w&&b===void 0&&(N=!0,C(P),S(P)),b!==void 0&&P>=b?w.next(P-b):(!N&&C(P),f)}}}var Vye=Hx(.42,0,1,1),zye=Hx(0,0,.58,1),MV=Hx(.42,0,.58,1);var TV=e=>Array.isArray(e)&&typeof e[0]!="number";var Uye={linear:To,easeIn:Vye,easeInOut:MV,easeOut:zye,circIn:gV,circInOut:yV,circOut:vV,backIn:dL,backInOut:mV,backOut:a7,anticipate:hV},x7=e=>{if(HP(e)){Ni(e.length===4,"Cubic bezier arrays must contain four numerical values.");let[t,r,n,o]=e;return Hx(t,r,n,o)}else if(typeof e=="string")return Ni(Uye[e]!==void 0,`Invalid easing type '${e}'`),Uye[e];return e};function Qut(e,t,r){let n=[],o=r||RV,a=e.length-1;for(let i=0;i<a;i++){let s=o(e[i],e[i+1]);if(t){let l=Array.isArray(t)?t[i]||To:t;s=Rh(l,s)}n.push(s)}return n}function AV(e,t,{clamp:r=!0,ease:n,mixer:o}={}){let a=e.length;if(Ni(a===t.length,"Both input and output ranges must be the same length"),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let i=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=Qut(t,n,o),l=s.length,c=u=>{if(i&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);let f=Fc(e[d],e[d+1],u);return s[d](f)};return r?u=>c(kl(e[0],e[a-1],u)):c}function LV(e,t){let r=e[e.length-1];for(let n=1;n<=t;n++){let o=Fc(0,t,n);e.push(dn(r,1,o))}}function EV(e){let t=[0];return LV(t,e.length-1),t}function Hye(e,t){return e.map(r=>r*t)}function Zut(e,t){return e.map(()=>t||MV).splice(0,e.length-1)}function mL({duration:e=300,keyframes:t,times:r,ease:n="easeInOut"}){let o=TV(n)?n.map(x7):x7(n),a={done:!1,value:t[0]},i=Hye(r&&r.length===t.length?r:EV(t),e),s=AV(i,t,{ease:Array.isArray(o)?o:Zut(t,o)});return{calculatedDuration:e,next:l=>(a.value=s(l),a.done=l>=e,a)}}var jye=e=>{let t=({timestamp:r})=>e(r);return{start:()=>Br.update(t,!0),stop:()=>Bc(t),now:()=>ui.isProcessing?ui.timestamp:ec.now()}};var Jut={decay:y7,inertia:y7,tween:mL,keyframes:mL,spring:eI},edt=e=>e/100,Gx=class extends ZP{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:n,element:o,keyframes:a}=this.options,i=o?.KeyframeResolver||$x,s=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new i(a,s,r,n,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:n=0,repeatDelay:o=0,repeatType:a,velocity:i=0}=this.options,s=Ph(r)?r:Jut[r]||mL,l,c;s!==mL&&typeof t[0]!="number"&&(l=Rh(edt,RV(t[0],t[1])),t=[0,100]);let u=s({...this.options,keyframes:t});a==="mirror"&&(c=s({...this.options,keyframes:[...t].reverse(),velocity:-i})),u.calculatedDuration===null&&(u.calculatedDuration=zw(u));let{calculatedDuration:d}=u,f=d+o,p=f*(n+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:f,totalDuration:p}}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:n}=this;if(!n){let{keyframes:P}=this.options;return{done:!0,value:P[P.length-1]}}let{finalKeyframe:o,generator:a,mirroredGenerator:i,mapPercentToKeyframes:s,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=n;if(this.startTime===null)return a.next(0);let{delay:f,repeat:p,repeatType:h,repeatDelay:m,onUpdate:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/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 v=this.currentTime-f*(this.speed>=0?1:-1),y=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let x=this.currentTime,C=a;if(p){let P=Math.min(this.currentTime,u)/d,N=Math.floor(P),D=P%1;!D&&P>=1&&(D=1),D===1&&N--,N=Math.min(N,p+1),!!(N%2)&&(h==="reverse"?(D=1-D,m&&(D-=m/d)):h==="mirror"&&(C=i)),x=kl(0,1,D)*d}let b=y?{done:!1,value:l[0]}:C.next(x);s&&(b.value=s(b.value));let{done:w}=b;!y&&c!==null&&(w=this.speed>=0?this.currentTime>=u:this.currentTime<=0);let S=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&w);return S&&o!==void 0&&(b.value=Wx(l,this.options,o)),g&&g(b.value),S&&this.finish(),b}get duration(){let{resolved:t}=this;return t?ol(t.calculatedDuration):0}get time(){return ol(this.currentTime)}set time(t){t=ci(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=ol(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;let{driver:t=jye,onPlay:r,startTime:n}=this.options;this.driver||(this.driver=t(a=>this.tick(a))),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=n??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)}};function qye(e){return new Gx(e)}var $ye=new Set(["opacity","clipPath","filter","transform"]);function Wye(e,t,r,{delay:n=0,duration:o=300,repeat:a=0,repeatType:i="loop",ease:s="easeInOut",times:l}={}){let c={[t]:r};l&&(c.offset=l);let u=qP(s,o);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:n,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:a+1,direction:i==="reverse"?"alternate":"normal"})}var Gye=Fw(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));var DV=10,tdt=2e4;function rdt(e){return Ph(e.type)||e.type==="spring"||!oV(e.ease)}function ndt(e,t){let r=new Gx({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0}),n={done:!1,value:e[0]},o=[],a=0;for(;!n.done&&a<tdt;)n=r.sample(a),o.push(n.value),a+=DV;return{times:void 0,keyframes:o,duration:a-DV,ease:"linear"}}var Kye={anticipate:hV,backInOut:mV,circInOut:yV};function odt(e){return e in Kye}var hL=class extends ZP{constructor(t){super(t);let{name:r,motionValue:n,element:o,keyframes:a}=this.options;this.resolver=new QP(a,(i,s)=>this.onKeyframesResolved(i,s),r,n,o),this.resolver.scheduleResolve()}initPlayback(t,r){let{duration:n=300,times:o,ease:a,type:i,motionValue:s,name:l,startTime:c}=this.options;if(!s.owner||!s.owner.current)return!1;if(typeof a=="string"&&Vx()&&odt(a)&&(a=Kye[a]),rdt(this.options)){let{onComplete:d,onUpdate:f,motionValue:p,element:h,...m}=this.options,g=ndt(t,m);t=g.keyframes,t.length===1&&(t[1]=t[0]),n=g.duration,o=g.times,a=g.ease,i="keyframes"}let u=Wye(s.owner.current,l,t,{...this.options,duration:n,times:o,ease:a});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(iL(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{let{onComplete:d}=this.options;s.set(Wx(t,this.options,r)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:n,times:o,type:i,ease:a,keyframes:t}}get duration(){let{resolved:t}=this;if(!t)return 0;let{duration:r}=t;return ol(r)}get time(){let{resolved:t}=this;if(!t)return 0;let{animation:r}=t;return ol(r.currentTime||0)}set time(t){let{resolved:r}=this;if(!r)return;let{animation:n}=r;n.currentTime=ci(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:n}=r;n.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 To;let{animation:n}=r;iL(n,t)}return To}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:n,duration:o,type:a,ease:i,times:s}=t;if(r.playState==="idle"||r.playState==="finished")return;if(this.time){let{motionValue:c,onUpdate:u,onComplete:d,element:f,...p}=this.options,h=new Gx({...p,keyframes:n,duration:o,type:a,ease:i,times:s,isGenerator:!0}),m=ci(this.time);c.setWithVelocity(h.sample(m-DV).value,h.sample(m).value,DV)}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:n,repeatDelay:o,repeatType:a,damping:i,type:s}=t;if(!r||!r.owner||!(r.owner.current instanceof HTMLElement))return!1;let{onUpdate:l,transformTemplate:c}=r.owner.getProps();return Gye()&&n&&$ye.has(n)&&!l&&!c&&!o&&a!=="mirror"&&i!==0&&s!=="inertia"}};var adt={type:"spring",stiffness:500,damping:25,restSpeed:10},idt=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),sdt={type:"keyframes",duration:.8},ldt={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Xye=(e,{keyframes:t})=>t.length>2?sdt:Lu.has(e)?e.startsWith("scale")?idt(t[1]):adt:ldt;function Yye({when:e,delay:t,delayChildren:r,staggerChildren:n,staggerDirection:o,repeat:a,repeatType:i,repeatDelay:s,from:l,elapsed:c,...u}){return!!Object.keys(u).length}var tI=(e,t,r,n={},o,a)=>i=>{let s=Bx(n,e)||{},l=s.delay||n.delay||0,{elapsed:c=0}=n;c=c-ci(l);let u={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,onUpdate:f=>{t.set(f),s.onUpdate&&s.onUpdate(f)},onComplete:()=>{i(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:o};Yye(s)||(u={...u,...Xye(e,u)}),u.duration&&(u.duration=ci(u.duration)),u.repeatDelay&&(u.repeatDelay=ci(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),(dV.current||RP.skipAnimations)&&(d=!0,u.duration=0,u.delay=0),d&&!a&&t.get()!==void 0){let f=Wx(u.keyframes,s);if(f!==void 0)return Br.update(()=>{u.onUpdate(f),u.onComplete()}),new Vw([])}return!a&&hL.supports(u)?new hL(u):new Gx(u)};function cdt({protectedKeys:e,needsAnimating:t},r){let n=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,n}function rI(e,t,{delay:r=0,transitionOverride:n,type:o}={}){var a;let{transition:i=e.getDefaultTransition(),transitionEnd:s,...l}=t;n&&(i=n);let c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(let d in l){let f=e.getValue(d,(a=e.latestValues[d])!==null&&a!==void 0?a:null),p=l[d];if(p===void 0||u&&cdt(u,d))continue;let h={delay:r,...Bx(i||{},d)},m=!1;if(window.MotionHandoffAnimation){let v=uV(e);if(v){let y=window.MotionHandoffAnimation(v,d,Br);y!==null&&(h.startTime=y,m=!0)}}uL(e,d),f.start(tI(d,f,p,e.shouldReduceMotion&&sV.has(d)?{type:!1}:h,e,m));let g=f.animation;g&&c.push(g)}return s&&Promise.all(c).then(()=>{Br.update(()=>{s&&cL(e,s)})}),c}function OV(e,t,r={}){var n;let o=Fx(e,t,r.type==="exit"?(n=e.presenceContext)===null||n===void 0?void 0:n.custom:void 0),{transition:a=e.getDefaultTransition()||{}}=o||{};r.transitionOverride&&(a=r.transitionOverride);let i=o?()=>Promise.all(rI(e,o,r)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(c=0)=>{let{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=a;return udt(e,t,u+c,d,f,r)}:()=>Promise.resolve(),{when:l}=a;if(l){let[c,u]=l==="beforeChildren"?[i,s]:[s,i];return c().then(()=>u())}else return Promise.all([i(),s(r.delay)])}function udt(e,t,r=0,n=0,o=1,a){let i=[],s=(e.variantChildren.size-1)*n,l=o===1?(c=0)=>c*n:(c=0)=>s-c*n;return Array.from(e.variantChildren).sort(ddt).forEach((c,u)=>{c.notify("AnimationStart",t),i.push(OV(c,t,{...a,delay:r+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(i)}function ddt(e,t){return e.sortNodePosition(t)}function _V(e,t,r={}){e.notify("AnimationStart",t);let n;if(Array.isArray(t)){let o=t.map(a=>OV(e,a,r));n=Promise.all(o)}else if(typeof t=="string")n=OV(e,t,r);else{let o=typeof t=="function"?Fx(e,t,r.custom):t;n=Promise.all(rI(e,o,r))}return n.then(()=>{e.notify("AnimationComplete",t)})}var fdt=tL.length;function b7(e){if(!e)return;if(!e.isControllingVariants){let r=e.parent?b7(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}let t={};for(let r=0;r<fdt;r++){let n=tL[r],o=e.props[n];(xv(o)||o===!1)&&(t[n]=o)}return t}var pdt=[...z4].reverse(),mdt=z4.length;function hdt(e){return t=>Promise.all(t.map(({animation:r,options:n})=>_V(e,r,n)))}function Zye(e){let t=hdt(e),r=Qye(),n=!0,o=l=>(c,u)=>{var d;let f=Fx(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){let{transition:p,transitionEnd:h,...m}=f;c={...c,...m,...h}}return c};function a(l){t=l(e)}function i(l){let{props:c}=e,u=b7(e.parent)||{},d=[],f=new Set,p={},h=1/0;for(let g=0;g<mdt;g++){let v=pdt[g],y=r[v],x=c[v]!==void 0?c[v]:u[v],C=xv(x),b=v===l?y.isActive:null;b===!1&&(h=g);let w=x===u[v]&&x!==c[v]&&C;if(w&&n&&e.manuallyAnimateOnMount&&(w=!1),y.protectedKeys={...p},!y.isActive&&b===null||!x&&!y.prevProp||_x(x)||typeof x=="boolean")continue;let S=gdt(y.prevProp,x),P=S||v===l&&y.isActive&&!w&&C||g>h&&C,N=!1,D=Array.isArray(x)?x:[x],E=D.reduce(o(v),{});b===!1&&(E={});let{prevResolvedValues:A={}}=y,z={...A,...E},V=k=>{P=!0,f.has(k)&&(N=!0,f.delete(k)),y.needsAnimating[k]=!0;let T=e.getValue(k);T&&(T.liveStyle=!1)};for(let k in z){let T=E[k],O=A[k];if(p.hasOwnProperty(k))continue;let F=!1;rL(T)&&rL(O)?F=!QK(T,O):F=T!==O,F?T!=null?V(k):f.add(k):T!==void 0&&f.has(k)?V(k):y.protectedKeys[k]=!0}y.prevProp=x,y.prevResolvedValues=E,y.isActive&&(p={...p,...E}),n&&e.blockInitialAnimation&&(P=!1),P&&(!(w&&S)||N)&&d.push(...D.map(k=>({animation:k,options:{type:v}})))}if(f.size){let g={};f.forEach(v=>{let y=e.getBaseTarget(v),x=e.getValue(v);x&&(x.liveStyle=!0),g[v]=y??null}),d.push({animation:g})}let m=!!d.length;return n&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(m=!1),n=!1,m?t(d):Promise.resolve()}function s(l,c){var u;if(r[l].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(f=>{var p;return(p=f.animationState)===null||p===void 0?void 0:p.setActive(l,c)}),r[l].isActive=c;let d=i(l);for(let f in r)r[f].protectedKeys={};return d}return{animateChanges:i,setActive:s,setAnimateFunction:a,getState:()=>r,reset:()=>{r=Qye(),n=!0}}}function gdt(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!QK(t,e):!1}function Ww(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Qye(){return{animate:Ww(!0),whileInView:Ww(),whileHover:Ww(),whileTap:Ww(),whileDrag:Ww(),whileFocus:Ww(),exit:Ww()}}var al=class{constructor(t){this.isMounted=!1,this.node=t}update(){}};var FV=class extends al{constructor(t){super(t),t.animationState||(t.animationState=Zye(t))}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();_x(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 vdt=0,BV=class extends al{constructor(){super(...arguments),this.id=vdt++}update(){if(!this.node.presenceContext)return;let{isPresent:t,onExitComplete:r}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)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 Jye={animation:{Feature:FV},exit:{Feature:BV}};function Cv(e,t,r,n={passive:!0}){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r)}function Sv(e){return{point:{x:e.pageX,y:e.pageY}}}var exe=e=>t=>Uw(t)&&e(t,Sv(t));function Kx(e,t,r,n){return Cv(e,t,exe(r),n)}var txe=(e,t)=>Math.abs(e-t);function rxe(e,t){let r=txe(e.x,t.x),n=txe(e.y,t.y);return Math.sqrt(r**2+n**2)}var nI=class{constructor(t,r,{transformPagePoint:n,contextWindow:o,dragSnapToOrigin:a=!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=C7(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,p=rxe(d.offset,{x:0,y:0})>=3;if(!f&&!p)return;let{point:h}=d,{timestamp:m}=ui;this.history.push({...h,timestamp:m});let{onStart:g,onMove:v}=this.handlers;f||(g&&g(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=w7(f,this.transformPagePoint),Br.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();let{onEnd:p,onSessionEnd:h,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let g=C7(d.type==="pointercancel"?this.lastMoveEventInfo:w7(f,this.transformPagePoint),this.history);this.startEvent&&p&&p(d,g),h&&h(d,g)},!Uw(t))return;this.dragSnapToOrigin=a,this.handlers=r,this.transformPagePoint=n,this.contextWindow=o||window;let i=Sv(t),s=w7(i,this.transformPagePoint),{point:l}=s,{timestamp:c}=ui;this.history=[{...l,timestamp:c}];let{onSessionStart:u}=r;u&&u(t,C7(s,this.history)),this.removeListeners=Rh(Kx(this.contextWindow,"pointermove",this.handlePointerMove),Kx(this.contextWindow,"pointerup",this.handlePointerUp),Kx(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Bc(this.updatePoint)}};function w7(e,t){return t?{point:t(e.point)}:e}function nxe(e,t){return{x:e.x-t.x,y:e.y-t.y}}function C7({point:e},t){return{point:e,delta:nxe(e,oxe(t)),offset:nxe(e,ydt(t)),velocity:xdt(t,.1)}}function ydt(e){return e[0]}function oxe(e){return e[e.length-1]}function xdt(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,n=null,o=oxe(e);for(;r>=0&&(n=e[r],!(o.timestamp-n.timestamp>ci(t)));)r--;if(!n)return{x:0,y:0};let a=ol(o.timestamp-n.timestamp);if(a===0)return{x:0,y:0};let i={x:(o.x-n.x)/a,y:(o.y-n.y)/a};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}var lxe=1e-4,bdt=1-lxe,wdt=1+lxe,cxe=.01,Cdt=0-cxe,Sdt=0+cxe;function Nl(e){return e.max-e.min}function uxe(e,t,r){return Math.abs(e-t)<=r}function axe(e,t,r,n=.5){e.origin=n,e.originPoint=dn(t.min,t.max,e.origin),e.scale=Nl(r)/Nl(t),e.translate=dn(r.min,r.max,e.origin)-e.originPoint,(e.scale>=bdt&&e.scale<=wdt||isNaN(e.scale))&&(e.scale=1),(e.translate>=Cdt&&e.translate<=Sdt||isNaN(e.translate))&&(e.translate=0)}function oI(e,t,r,n){axe(e.x,t.x,r.x,n?n.originX:void 0),axe(e.y,t.y,r.y,n?n.originY:void 0)}function ixe(e,t,r){e.min=r.min+t.min,e.max=e.min+Nl(t)}function dxe(e,t,r){ixe(e.x,t.x,r.x),ixe(e.y,t.y,r.y)}function sxe(e,t,r){e.min=t.min-r.min,e.max=e.min+Nl(t)}function aI(e,t,r){sxe(e.x,t.x,r.x),sxe(e.y,t.y,r.y)}function gxe(e,{min:t,max:r},n){return t!==void 0&&e<t?e=n?dn(t,e,n.min):Math.max(e,t):r!==void 0&&e>r&&(e=n?dn(r,e,n.max):Math.min(e,r)),e}function fxe(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 vxe(e,{top:t,left:r,bottom:n,right:o}){return{x:fxe(e.x,r,o),y:fxe(e.y,t,n)}}function pxe(e,t){let r=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,n]=[n,r]),{min:r,max:n}}function yxe(e,t){return{x:pxe(e.x,t.x),y:pxe(e.y,t.y)}}function xxe(e,t){let r=.5,n=Nl(e),o=Nl(t);return o>n?r=Fc(t.min,t.max-n,e.min):n>o&&(r=Fc(e.min,e.max-o,t.min)),kl(0,1,r)}function bxe(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 VV=.35;function wxe(e=VV){return e===!1?e=0:e===!0&&(e=VV),{x:mxe(e,"left","right"),y:mxe(e,"top","bottom")}}function mxe(e,t,r){return{min:hxe(e,t),max:hxe(e,r)}}function hxe(e,t){return typeof e=="number"?e:e[t]||0}var Cxe=()=>({translate:0,scale:1,origin:0,originPoint:0}),Gw=()=>({x:Cxe(),y:Cxe()}),Sxe=()=>({min:0,max:0}),Go=()=>({x:Sxe(),y:Sxe()});function Eu(e){return[e("x"),e("y")]}function zV({top:e,left:t,right:r,bottom:n}){return{x:{min:t,max:r},y:{min:e,max:n}}}function Pxe({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Ixe(e,t){if(!t)return e;let r=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}function S7(e){return e===void 0||e===1}function UV({scale:e,scaleX:t,scaleY:r}){return!S7(e)||!S7(t)||!S7(r)}function Pv(e){return UV(e)||P7(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function P7(e){return Rxe(e.x)||Rxe(e.y)}function Rxe(e){return e&&e!=="0%"}function gL(e,t,r){let n=e-r,o=t*n;return r+o}function kxe(e,t,r,n,o){return o!==void 0&&(e=gL(e,o,n)),gL(e,r,n)+t}function I7(e,t=0,r=1,n,o){e.min=kxe(e.min,t,r,n,o),e.max=kxe(e.max,t,r,n,o)}function R7(e,{x:t,y:r}){I7(e.x,t.translate,t.scale,t.originPoint),I7(e.y,r.translate,r.scale,r.originPoint)}var Nxe=.999999999999,Mxe=1.0000000000001;function Axe(e,t,r,n=!1){let o=r.length;if(!o)return;t.x=t.y=1;let a,i;for(let s=0;s<o;s++){a=r[s],i=a.projectionDelta;let{visualElement:l}=a.options;l&&l.props.style&&l.props.style.display==="contents"||(n&&a.options.layoutScroll&&a.scroll&&a!==a.root&&Kw(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,R7(e,i)),n&&Pv(a.latestValues)&&Kw(e,a.latestValues))}t.x<Mxe&&t.x>Nxe&&(t.x=1),t.y<Mxe&&t.y>Nxe&&(t.y=1)}function Xx(e,t){e.min=e.min+t,e.max=e.max+t}function Txe(e,t,r,n,o=.5){let a=dn(e.min,e.max,o);I7(e,t,r,a,n)}function Kw(e,t){Txe(e.x,t.x,t.scaleX,t.scale,t.originX),Txe(e.y,t.y,t.scaleY,t.scale,t.originY)}function k7(e,t){return zV(Ixe(e.getBoundingClientRect(),t))}function Lxe(e,t,r){let n=k7(e,r),{scroll:o}=t;return o&&(Xx(n.x,o.offset.x),Xx(n.y,o.offset.y)),n}var HV=({current:e})=>e?e.ownerDocument.defaultView:null;var Pdt=new WeakMap,qV=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=Go(),this.visualElement=t}start(t,{snapToCursor:r=!1}={}){let{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;let o=u=>{let{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),r&&this.snapToCursor(Sv(u).point)},a=(u,d)=>{let{drag:f,dragPropagation:p,onDragStart:h}=this.getProps();if(f&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=n7(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),Eu(g=>{let v=this.getAxisMotionValue(g).get()||0;if(Vc.test(v)){let{projection:y}=this.visualElement;if(y&&y.layout){let x=y.layout.layoutBox[g];x&&(v=Nl(x)*(parseFloat(v)/100))}}this.originPoint[g]=v}),h&&Br.postRender(()=>h(u,d)),uL(this.visualElement,"transform");let{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},i=(u,d)=>{let{dragPropagation:f,dragDirectionLock:p,onDirectionLock:h,onDrag:m}=this.getProps();if(!f&&!this.openDragLock)return;let{offset:g}=d;if(p&&this.currentDirection===null){this.currentDirection=Idt(g),this.currentDirection!==null&&h&&h(this.currentDirection);return}this.updateAxis("x",d.point,g),this.updateAxis("y",d.point,g),this.visualElement.render(),m&&m(u,d)},s=(u,d)=>this.stop(u,d),l=()=>Eu(u=>{var d;return this.getAnimationState(u)==="paused"&&((d=this.getAxisMotionValue(u).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new nI(t,{onSessionStart:o,onStart:a,onMove:i,onSessionEnd:s,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:HV(this.visualElement)})}stop(t,r){let n=this.isDragging;if(this.cancel(),!n)return;let{velocity:o}=r;this.startAnimation(o);let{onDragEnd:a}=this.getProps();a&&Br.postRender(()=>a(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:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",!1)}updateAxis(t,r,n){let{drag:o}=this.getProps();if(!n||!jV(t,o,this.currentDirection))return;let a=this.getAxisMotionValue(t),i=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(i=gxe(i,this.constraints[t],this.elastic[t])),a.set(i)}resolveConstraints(){var t;let{dragConstraints:r,dragElastic:n}=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,a=this.constraints;r&&bv(r)?this.constraints||(this.constraints=this.resolveRefConstraints()):r&&o?this.constraints=vxe(o.layoutBox,r):this.constraints=!1,this.elastic=wxe(n),a!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&Eu(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=bxe(o.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){let{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!bv(t))return!1;let n=t.current;Ni(n!==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 a=Lxe(n,o.root,this.visualElement.getTransformPagePoint()),i=yxe(o.layout.layoutBox,a);if(r){let s=r(Pxe(i));this.hasMutatedConstraints=!!s,s&&(i=zV(s))}return i}startAnimation(t){let{drag:r,dragMomentum:n,dragElastic:o,dragTransition:a,dragSnapToOrigin:i,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},c=Eu(u=>{if(!jV(u,r,this.currentDirection))return;let d=l&&l[u]||{};i&&(d={min:0,max:0});let f=o?200:1e6,p=o?40:1e7,h={type:"inertia",velocity:n?t[u]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...a,...d};return this.startAxisValueAnimation(u,h)});return Promise.all(c).then(s)}startAxisValueAnimation(t,r){let n=this.getAxisMotionValue(t);return uL(this.visualElement,t),n.start(tI(t,n,0,r,this.visualElement,!1))}stopAnimation(){Eu(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Eu(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()}`,n=this.visualElement.getProps(),o=n[r];return o||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){Eu(r=>{let{drag:n}=this.getProps();if(!jV(r,n,this.currentDirection))return;let{projection:o}=this.visualElement,a=this.getAxisMotionValue(r);if(o&&o.layout){let{min:i,max:s}=o.layout.layoutBox[r];a.set(t[r]-dn(i,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:t,dragConstraints:r}=this.getProps(),{projection:n}=this.visualElement;if(!bv(r)||!n||!this.constraints)return;this.stopAnimation();let o={x:0,y:0};Eu(i=>{let s=this.getAxisMotionValue(i);if(s&&this.constraints!==!1){let l=s.get();o[i]=xxe({min:l,max:l},this.constraints[i])}});let{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Eu(i=>{if(!jV(i,t,null))return;let s=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];s.set(dn(l,c,o[i]))})}addListeners(){if(!this.visualElement.current)return;Pdt.set(this.visualElement,this);let t=this.visualElement.current,r=Kx(t,"pointerdown",l=>{let{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),n=()=>{let{dragConstraints:l}=this.getProps();bv(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,a=o.addEventListener("measure",n);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Br.read(n);let i=Cv(window,"resize",()=>this.scalePositionWithinConstraints()),s=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Eu(u=>{let d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{i(),r(),a(),s&&s()}}getProps(){let t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:o=!1,dragConstraints:a=!1,dragElastic:i=VV,dragMomentum:s=!0}=t;return{...t,drag:r,dragDirectionLock:n,dragPropagation:o,dragConstraints:a,dragElastic:i,dragMomentum:s}}};function jV(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function Idt(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}var $V=class extends al{constructor(t){super(t),this.removeGroupControls=To,this.removeListeners=To,this.controls=new qV(t)}mount(){let{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||To}unmount(){this.removeGroupControls(),this.removeListeners()}};var Exe=e=>(t,r)=>{e&&Br.postRender(()=>e(t,r))},WV=class extends al{constructor(){super(...arguments),this.removePointerDownListener=To}onPointerDown(t){this.session=new nI(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:HV(this.node)})}createPanHandlers(){let{onPanSessionStart:t,onPanStart:r,onPan:n,onPanEnd:o}=this.node.getProps();return{onSessionStart:Exe(t),onStart:Exe(r),onMove:n,onEnd:(a,i)=>{delete this.session,o&&Br.postRender(()=>o(a,i))}}}mount(){this.removePointerDownListener=Kx(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 _xe=L(fe(),1),vL=L(ce(),1);var iI={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Dxe(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var sI={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(er.test(e))e=parseFloat(e);else return e;let r=Dxe(e,t.target.x),n=Dxe(e,t.target.y);return`${r}% ${n}%`}};var Oxe={correct:(e,{treeScale:t,projectionDelta:r})=>{let n=e,o=zc.parse(e);if(o.length>5)return n;let a=zc.createTransformer(e),i=typeof o[0]!="number"?1:0,s=r.x.scale*t.x,l=r.y.scale*t.y;o[0+i]/=s,o[1+i]/=l;let c=dn(s,l,.5);return typeof o[2+i]=="number"&&(o[2+i]/=c),typeof o[3+i]=="number"&&(o[3+i]/=c),a(o)}};var N7=class extends vL.Component{componentDidMount(){let{visualElement:t,layoutGroup:r,switchLayoutGroup:n,layoutId:o}=this.props,{projection:a}=t;Kve(Rdt),a&&(r.group&&r.group.add(a),n&&n.register&&o&&n.register(a),a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),iI.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){let{layoutDependency:r,visualElement:n,drag:o,isPresent:a}=this.props,i=n.projection;return i&&(i.isPresent=a,o||t.layoutDependency!==r||r===void 0?i.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?i.promote():i.relegate()||Br.postRender(()=>{let s=i.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){let{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),NP.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:t,layoutGroup:r,switchLayoutGroup:n}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(o),n&&n.deregister&&n.deregister(o))}safeToRemove(){let{safeToRemove:t}=this.props;t&&t()}render(){return null}};function GV(e){let[t,r]=E4(),n=(0,vL.useContext)(PP);return(0,_xe.jsx)(N7,{...e,layoutGroup:n,switchLayoutGroup:(0,vL.useContext)(q4),isPresent:t,safeToRemove:r})}var Rdt={borderRadius:{...sI,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:sI,borderTopRightRadius:sI,borderBottomLeftRadius:sI,borderBottomRightRadius:sI,boxShadow:Oxe};function KV(e,t,r){let n=Ln(e)?e:am(e);return n.start(tI("",n,t,r)),n.animation}function XV(e){return e instanceof SVGElement&&e.tagName!=="svg"}var Fxe=(e,t)=>e.depth-t.depth;var YV=class{constructor(){this.children=[],this.isDirty=!1}add(t){WP(this.children,t),this.isDirty=!0}remove(t){zx(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Fxe),this.isDirty=!1,this.children.forEach(t)}};function Bxe(e,t){let r=ec.now(),n=({timestamp:o})=>{let a=o-r;a>=t&&(Bc(n),e(a-t))};return Br.read(n,!0),()=>Bc(n)}var Hxe=["TopLeft","TopRight","BottomLeft","BottomRight"],kdt=Hxe.length,Vxe=e=>typeof e=="string"?parseFloat(e):e,zxe=e=>typeof e=="number"||er.test(e);function jxe(e,t,r,n,o,a){o?(e.opacity=dn(0,r.opacity!==void 0?r.opacity:1,Ndt(n)),e.opacityExit=dn(t.opacity!==void 0?t.opacity:1,0,Mdt(n))):a&&(e.opacity=dn(t.opacity!==void 0?t.opacity:1,r.opacity!==void 0?r.opacity:1,n));for(let i=0;i<kdt;i++){let s=`border${Hxe[i]}Radius`,l=Uxe(t,s),c=Uxe(r,s);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||zxe(l)===zxe(c)?(e[s]=Math.max(dn(Vxe(l),Vxe(c),n),0),(Vc.test(c)||Vc.test(l))&&(e[s]+="%")):e[s]=c}(t.rotate||r.rotate)&&(e.rotate=dn(t.rotate||0,r.rotate||0,n))}function Uxe(e,t){return e[t]!==void 0?e[t]:e.borderRadius}var Ndt=qxe(0,.5,vV),Mdt=qxe(.5,.95,To);function qxe(e,t,r){return n=>n<e?0:n>t?1:r(Fc(e,t,n))}function $xe(e,t){e.min=t.min,e.max=t.max}function Ed(e,t){$xe(e.x,t.x),$xe(e.y,t.y)}function M7(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Wxe(e,t,r,n,o){return e-=t,e=gL(e,1/r,n),o!==void 0&&(e=gL(e,1/o,n)),e}function Tdt(e,t=0,r=1,n=.5,o,a=e,i=e){if(Vc.test(t)&&(t=parseFloat(t),t=dn(i.min,i.max,t/100)-i.min),typeof t!="number")return;let s=dn(a.min,a.max,n);e===a&&(s-=t),e.min=Wxe(e.min,t,r,s,o),e.max=Wxe(e.max,t,r,s,o)}function Gxe(e,t,[r,n,o],a,i){Tdt(e,t[r],t[n],t[o],t.scale,a,i)}var Adt=["x","scaleX","originX"],Ldt=["y","scaleY","originY"];function T7(e,t,r,n){Gxe(e.x,t,Adt,r?r.x:void 0,n?n.x:void 0),Gxe(e.y,t,Ldt,r?r.y:void 0,n?n.y:void 0)}function Kxe(e){return e.translate===0&&e.scale===1}function A7(e){return Kxe(e.x)&&Kxe(e.y)}function Xxe(e,t){return e.min===t.min&&e.max===t.max}function Qxe(e,t){return Xxe(e.x,t.x)&&Xxe(e.y,t.y)}function Yxe(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function L7(e,t){return Yxe(e.x,t.x)&&Yxe(e.y,t.y)}function E7(e){return Nl(e.x)/Nl(e.y)}function D7(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var QV=class{constructor(){this.members=[]}add(t){WP(this.members,t),t.scheduleRender()}remove(t){if(zx(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 n;for(let o=r;o>=0;o--){let a=this.members[o];if(a.isPresent!==!1){n=a;break}}return n?(this.promote(n),!0):!1}promote(t,r){let n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,r&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);let{crossfade:o}=t.options;o===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{let{options:r,resumingFrom:n}=t;r.onExitComplete&&r.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}};function Zxe(e,t,r){let n="",o=e.x.translate/t.x,a=e.y.translate/t.y,i=r?.z||0;if((o||a||i)&&(n=`translate3d(${o}px, ${a}px, ${i}px) `),(t.x!==1||t.y!==1)&&(n+=`scale(${1/t.x}, ${1/t.y}) `),r){let{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:p,skewY:h}=r;c&&(n=`perspective(${c}px) ${n}`),u&&(n+=`rotate(${u}deg) `),d&&(n+=`rotateX(${d}deg) `),f&&(n+=`rotateY(${f}deg) `),p&&(n+=`skewX(${p}deg) `),h&&(n+=`skewY(${h}deg) `)}let s=e.x.scale*t.x,l=e.y.scale*t.y;return(s!==1||l!==1)&&(n+=`scale(${s}, ${l})`),n||"none"}var Xw={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},yL=typeof window<"u"&&window.MotionDebug!==void 0,O7=["","X","Y","Z"],Edt={visibility:"hidden"},Jxe=1e3,Ddt=0;function _7(e,t,r,n){let{latestValues:o}=t;o[e]&&(r[e]=o[e],t.setStaticValue(e,0),n&&(n[e]=0))}function sbe(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let r=uV(t);if(window.MotionHasOptimisedAnimation(r,"transform")){let{layout:o,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",Br,!(o||a))}let{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&sbe(n)}function ZV({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:n,resetTransform:o}){return class{constructor(i={},s=t?.()){this.id=Ddt++,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,yL&&(Xw.totalNodes=Xw.resolvedTargetDeltas=Xw.recalculatedProjection=0),this.nodes.forEach(Fdt),this.nodes.forEach(Hdt),this.nodes.forEach(jdt),this.nodes.forEach(Bdt),yL&&window.MotionDebug.record(Xw)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new YV)}addEventListener(i,s){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new Ux),this.eventHandlers.get(i).add(s)}notifyListeners(i,...s){let l=this.eventHandlers.get(i);l&&l.notify(...s)}hasListeners(i){return this.eventHandlers.has(i)}mount(i,s=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=XV(i),this.instance=i;let{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),s&&(c||l)&&(this.isLayoutDirty=!0),e){let d,f=()=>this.root.updateBlockedByResize=!1;e(i,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=Bxe(f,250),iI.hasAnimatedSinceResize&&(iI.hasAnimatedSinceResize=!1,this.nodes.forEach(tbe))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeTargetChanged:p,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let m=this.options.transition||u.getDefaultTransition()||Kdt,{onLayoutAnimationStart:g,onLayoutAnimationComplete:v}=u.getProps(),y=!this.targetLayout||!L7(this.targetLayout,h)||p,x=!f&&p;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||x||f&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,x);let C={...Bx(m,"layout"),onPlay:g,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(C.delay=0,C.type=!1),this.startAnimation(C)}else f||tbe(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Bc(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(qdt),this.animationId++)}getTransformTemplate(){let{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&sbe(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){let d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}let{layoutId:s,layout:l}=this.options;if(s===void 0&&!l)return;let c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(ebe);return}this.isUpdating||this.nodes.forEach(zdt),this.isUpdating=!1,this.nodes.forEach(Udt),this.nodes.forEach(Odt),this.nodes.forEach(_dt),this.clearAllSnapshots();let s=ec.now();ui.delta=kl(0,1e3/60,s-ui.timestamp),ui.timestamp=s,ui.isProcessing=!0,B4.update.process(ui),B4.preRender.process(ui),B4.render.process(ui),ui.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,NP.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Vdt),this.sharedNodes.forEach($dt)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Br.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Br.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 i=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Go(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,i?i.layoutBox:void 0)}updateScroll(i="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(s=!1),s){let l=n(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:l,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;let i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!A7(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;i&&(s||Pv(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){let s=this.measurePageBox(),l=this.removeElementScroll(s);return i&&(l=this.removeTransform(l)),Xdt(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var i;let{visualElement:s}=this.options;if(!s)return Go();let l=s.measureViewportBox();if(!(((i=this.scroll)===null||i===void 0?void 0:i.wasRoot)||this.path.some(Ydt))){let{scroll:u}=this.root;u&&(Xx(l.x,u.offset.x),Xx(l.y,u.offset.y))}return l}removeElementScroll(i){var s;let l=Go();if(Ed(l,i),!((s=this.scroll)===null||s===void 0)&&s.wasRoot)return l;for(let c=0;c<this.path.length;c++){let u=this.path[c],{scroll:d,options:f}=u;u!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&Ed(l,i),Xx(l.x,d.offset.x),Xx(l.y,d.offset.y))}return l}applyTransform(i,s=!1){let l=Go();Ed(l,i);for(let c=0;c<this.path.length;c++){let u=this.path[c];!s&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Kw(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Pv(u.latestValues)&&Kw(l,u.latestValues)}return Pv(this.latestValues)&&Kw(l,this.latestValues),l}removeTransform(i){let s=Go();Ed(s,i);for(let l=0;l<this.path.length;l++){let c=this.path[l];if(!c.instance||!Pv(c.latestValues))continue;UV(c.latestValues)&&c.updateSnapshot();let u=Go(),d=c.measurePageBox();Ed(u,d),T7(s,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Pv(this.latestValues)&&T7(s,this.latestValues),s}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.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!==ui.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){var s;let l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);let c=!!this.resumingFrom||this!==l;if(!(i||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=ui.timestamp,!this.targetDelta&&!this.relativeTarget){let p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Go(),this.relativeTargetOrigin=Go(),aI(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),Ed(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Go(),this.targetWithTransforms=Go()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),dxe(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Ed(this.target,this.layout.layoutBox),R7(this.target,this.targetDelta)):Ed(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;let p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Go(),this.relativeTargetOrigin=Go(),aI(this.relativeTargetOrigin,this.target,p.target),Ed(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}yL&&Xw.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||UV(this.parent.latestValues)||P7(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 i;let s=this.getLead(),l=!!this.resumingFrom||this!==s,c=!0;if((this.isProjectionDirty||!((i=this.parent)===null||i===void 0)&&i.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===ui.timestamp&&(c=!1),c)return;let{layout:u,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||!(u||d))return;Ed(this.layoutCorrected,this.layout.layoutBox);let f=this.treeScale.x,p=this.treeScale.y;Axe(this.layoutCorrected,this.treeScale,this.path,l),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=Go());let{target:h}=s;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(M7(this.prevProjectionDelta.x,this.projectionDelta.x),M7(this.prevProjectionDelta.y,this.projectionDelta.y)),oI(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==p||!D7(this.projectionDelta.x,this.prevProjectionDelta.x)||!D7(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h)),yL&&Xw.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){var s;if((s=this.options.visualElement)===null||s===void 0||s.scheduleRender(),i){let l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Gw(),this.projectionDelta=Gw(),this.projectionDeltaWithTransform=Gw()}setAnimationOrigin(i,s=!1){let l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=Gw();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;let f=Go(),p=l?l.source:void 0,h=this.layout?this.layout.source:void 0,m=p!==h,g=this.getStack(),v=!g||g.members.length<=1,y=!!(m&&!v&&this.options.crossfade===!0&&!this.path.some(Gdt));this.animationProgress=0;let x;this.mixTargetDelta=C=>{let b=C/1e3;rbe(d.x,i.x,b),rbe(d.y,i.y,b),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(aI(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Wdt(this.relativeTarget,this.relativeTargetOrigin,f,b),x&&Qxe(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=Go()),Ed(x,this.relativeTarget)),m&&(this.animationValues=u,jxe(u,c,this.latestValues,b,y,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=b},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Bc(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Br.update(()=>{iI.hasAnimatedSinceResize=!0,this.currentAnimation=KV(0,Jxe,{...i,onUpdate:s=>{this.mixTargetDelta(s),i.onUpdate&&i.onUpdate(s)},onComplete:()=>{i.onComplete&&i.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 i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Jxe),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let i=this.getLead(),{targetWithTransforms:s,target:l,layout:c,latestValues:u}=i;if(!(!s||!l||!c)){if(this!==i&&this.layout&&c&&lbe(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Go();let d=Nl(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;let f=Nl(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}Ed(s,l),Kw(s,u),oI(this.projectionDeltaWithTransform,this.layoutCorrected,s,u)}}registerSharedNode(i,s){this.sharedNodes.has(i)||this.sharedNodes.set(i,new QV),this.sharedNodes.get(i).add(s);let c=s.options.initialPromotionConfig;s.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(s):void 0})}isLead(){let i=this.getStack();return i?i.lead===this:!0}getLead(){var i;let{layoutId:s}=this.options;return s?((i=this.getStack())===null||i===void 0?void 0:i.lead)||this:this}getPrevLead(){var i;let{layoutId:s}=this.options;return s?(i=this.getStack())===null||i===void 0?void 0:i.prevLead:void 0}getStack(){let{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:s,preserveFollowOpacity:l}={}){let c=this.getStack();c&&c.promote(this,l),i&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){let i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){let{visualElement:i}=this.options;if(!i)return;let s=!1,{latestValues:l}=i;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(s=!0),!s)return;let c={};l.z&&_7("z",i,c,this.animationValues);for(let u=0;u<O7.length;u++)_7(`rotate${O7[u]}`,i,c,this.animationValues),_7(`skew${O7[u]}`,i,c,this.animationValues);i.render();for(let u in c)i.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);i.scheduleRender()}getProjectionStyles(i){var s,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Edt;let c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=LP(i?.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;let d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){let m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=LP(i?.pointerEvents)||""),this.hasProjected&&!Pv(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}let f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=Zxe(this.projectionDeltaWithTransform,this.treeScale,f),u&&(c.transform=u(f,c.transform));let{x:p,y:h}=this.projectionDelta;c.transformOrigin=`${p.origin*100}% ${h.origin*100}% 0`,d.animationValues?c.opacity=d===this?(l=(s=f.opacity)!==null&&s!==void 0?s:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:c.opacity=d===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(let m in VP){if(f[m]===void 0)continue;let{correct:g,applyTo:v}=VP[m],y=c.transform==="none"?f[m]:g(f[m],d);if(v){let x=v.length;for(let C=0;C<x;C++)c[v[C]]=y}else c[m]=y}return this.options.layoutId&&(c.pointerEvents=d===this?LP(i?.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>{var s;return(s=i.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(ebe),this.root.sharedNodes.clear()}}}function Odt(e){e.updateLayout()}function _dt(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:n,measuredBox:o}=e.layout,{animationType:a}=e.options,i=r.source!==e.layout.source;a==="size"?Eu(d=>{let f=i?r.measuredBox[d]:r.layoutBox[d],p=Nl(f);f.min=n[d].min,f.max=f.min+p}):lbe(a,r.layoutBox,n)&&Eu(d=>{let f=i?r.measuredBox[d]:r.layoutBox[d],p=Nl(n[d]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+p)});let s=Gw();oI(s,n,r.layoutBox);let l=Gw();i?oI(l,e.applyTransform(o,!0),r.measuredBox):oI(l,n,r.layoutBox);let c=!A7(s),u=!1;if(!e.resumeFrom){let d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){let{snapshot:f,layout:p}=d;if(f&&p){let h=Go();aI(h,r.layoutBox,f.layoutBox);let m=Go();aI(m,n,p.layoutBox),L7(h,m)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=h,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:r,delta:l,layoutDelta:s,hasLayoutChanged:c,hasRelativeTargetChanged:u})}else if(e.isLead()){let{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function Fdt(e){yL&&Xw.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 Bdt(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Vdt(e){e.clearSnapshot()}function ebe(e){e.clearMeasurements()}function zdt(e){e.isLayoutDirty=!1}function Udt(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function tbe(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Hdt(e){e.resolveTargetDelta()}function jdt(e){e.calcProjection()}function qdt(e){e.resetSkewAndRotation()}function $dt(e){e.removeLeadSnapshot()}function rbe(e,t,r){e.translate=dn(t.translate,0,r),e.scale=dn(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function nbe(e,t,r,n){e.min=dn(t.min,r.min,n),e.max=dn(t.max,r.max,n)}function Wdt(e,t,r,n){nbe(e.x,t.x,r.x,n),nbe(e.y,t.y,r.y,n)}function Gdt(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var Kdt={duration:.45,ease:[.4,0,.1,1]},obe=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),abe=obe("applewebkit/")&&!obe("chrome/")?Math.round:To;function ibe(e){e.min=abe(e.min),e.max=abe(e.max)}function Xdt(e){ibe(e.x),ibe(e.y)}function lbe(e,t,r){return e==="position"||e==="preserve-aspect"&&!uxe(E7(t),E7(r),.2)}function Ydt(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}var cbe=ZV({attachResizeListener:(e,t)=>Cv(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0});var F7={current:void 0},JV=ZV({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!F7.current){let e=new cbe({});e.mount(window),e.setOptions({layoutScroll:!0}),F7.current=e}return F7.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"});var ube={pan:{Feature:WV},drag:{Feature:$V,ProjectionNode:JV,MeasureLayout:GV}};function dbe(e,t,r){let{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover",r==="Start");let o="onHover"+r,a=n[o];a&&Br.postRender(()=>a(t,Sv(t)))}var e3=class extends al{mount(){let{current:t}=this.node;t&&(this.unmount=e7(t,r=>(dbe(this.node,r,"Start"),n=>dbe(this.node,n,"End"))))}unmount(){}};var t3=class extends al{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=Rh(Cv(this.node.current,"focus",()=>this.onFocus()),Cv(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function fbe(e,t,r){let{props:n}=e;e.animationState&&n.whileTap&&e.animationState.setActive("whileTap",r==="Start");let o="onTap"+(r==="End"?"":r),a=n[o];a&&Br.postRender(()=>a(t,Sv(t)))}var r3=class extends al{mount(){let{current:t}=this.node;t&&(this.unmount=r7(t,r=>(fbe(this.node,r,"Start"),(n,{success:o})=>fbe(this.node,n,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}};var V7=new WeakMap,B7=new WeakMap,Qdt=e=>{let t=V7.get(e.target);t&&t(e)},Zdt=e=>{e.forEach(Qdt)};function Jdt({root:e,...t}){let r=e||document;B7.has(r)||B7.set(r,{});let n=B7.get(r),o=JSON.stringify(t);return n[o]||(n[o]=new IntersectionObserver(Zdt,{root:e,...t})),n[o]}function pbe(e,t,r){let n=Jdt(t);return V7.set(e,r),n.observe(e),()=>{V7.delete(e),n.unobserve(e)}}var eft={some:0,all:1},n3=class extends al{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:t={}}=this.node.getProps(),{root:r,margin:n,amount:o="some",once:a}=t,i={root:r?r.current:void 0,rootMargin:n,threshold:typeof o=="number"?o:eft[o]},s=l=>{let{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,a&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);let{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return pbe(this.node.current,i,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;let{props:t,prevProps:r}=this.node;["amount","margin","root"].some(tft(t,r))&&this.startObserver()}unmount(){}};function tft({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}var mbe={inView:{Feature:n3},tap:{Feature:r3},focus:{Feature:t3},hover:{Feature:e3}};var hbe={layout:{ProjectionNode:JV,MeasureLayout:GV}};var bbe=L(ce(),1);var xL={current:null},o3={current:!1};function gbe(){if(o3.current=!0,!!IP)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>xL.current=e.matches;e.addListener(t),t()}else xL.current=!1}var rft=[...d7,ss,zc],vbe=e=>rft.find(SV(e));var Iv=new WeakMap;function ybe(e,t,r){for(let n in t){let o=t[n],a=r[n];if(Ln(o))e.addValue(n,o);else if(Ln(a))e.addValue(n,am(o,{owner:e}));else if(a!==o)if(e.hasValue(n)){let i=e.getValue(n);i.liveStyle===!0?i.jump(o):i.hasAnimated||i.set(o)}else{let i=e.getStaticValue(n);e.addValue(n,am(i!==void 0?i:o,{owner:e}))}}for(let n in r)t[n]===void 0&&e.removeValue(n);return t}var xbe=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],lI=class{scrapeMotionValuesFromProps(t,r,n){return{}}constructor({parent:t,props:r,presenceContext:n,reducedMotionConfig:o,blockInitialAnimation:a,visualState:i},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=$x,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 p=ec.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,Br.render(this.render,!1,!0))};let{latestValues:l,renderState:c,onUpdate:u}=i;this.onUpdate=u,this.latestValues=l,this.baseTarget={...l},this.initialValues=r.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=r,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=Bw(r),this.isVariantNode=U4(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);let{willChange:d,...f}=this.scrapeMotionValuesFromProps(r,{},this);for(let p in f){let h=f[p];l[p]!==void 0&&Ln(h)&&h.set(l[p],!1)}}mount(t){this.current=t,Iv.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,n)=>this.bindToMotionValue(n,r)),o3.current||gbe(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:xL.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Iv.delete(this.current),this.projection&&this.projection.unmount(),Bc(this.notifyUpdate),Bc(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 n=Lu.has(t),o=r.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&Br.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),a=r.on("renderRequest",this.scheduleRender),i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,r)),this.valueSubscriptions.set(t,()=>{o(),a(),i&&i(),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 yv){let r=yv[t];if(!r)continue;let{isEnabled:n,Feature:o}=r;if(!this.features[t]&&o&&n(this.props)&&(this.features[t]=new o(this)),this.features[t]){let a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Go()}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 n=0;n<xbe.length;n++){let o=xbe[n];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);let a="on"+o,i=t[a];i&&(this.propEventSubscriptions[o]=this.on(o,i))}this.prevMotionValues=ybe(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 n=this.values.get(t);r!==n&&(n&&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 n=this.values.get(t);return n===void 0&&r!==void 0&&(n=am(r===null?void 0:r,{owner:this}),this.addValue(t,n)),n}readValue(t,r){var n;let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(n=this.getBaseTargetFromProps(this.props,t))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(CV(o)||xV(o))?o=parseFloat(o):!vbe(o)&&zc.test(r)&&(o=wV(t,r)),this.setBaseTarget(t,Ln(o)?o.get():o)),Ln(o)?o.get():o}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){var r;let{initial:n}=this.props,o;if(typeof n=="string"||typeof n=="object"){let i=AP(this.props,n,(r=this.presenceContext)===null||r===void 0?void 0:r.custom);i&&(o=i[t])}if(n&&o!==void 0)return o;let a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!Ln(a)?a:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new Ux),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}};var cI=class extends lI{constructor(){super(...arguments),this.KeyframeResolver=QP}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:n}){delete r[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:t}=this.props;Ln(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}};function nft(e){return window.getComputedStyle(e)}var uI=class extends cI{constructor(){super(...arguments),this.type="html",this.renderInstance=Y4}readValueFromInstance(t,r){if(Lu.has(r)){let n=YP(r);return n&&n.default||0}else{let n=nft(t),o=(G4(r)?n.getPropertyValue(r):n[r])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:r}){return k7(t,r)}build(t,r,n){OP(t,r,n.transformTemplate)}scrapeMotionValuesFromProps(t,r,n){return zP(t,r,n)}};var dI=class extends cI{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Go}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(Lu.has(r)){let n=YP(r);return n&&n.default||0}return r=Q4.has(r)?r:kP(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,n){return eV(t,r,n)}build(t,r,n){_P(t,r,this.isSVGTag,n.transformTemplate)}renderInstance(t,r,n,o){Z4(t,r,n,o)}mount(t){this.isSVGTag=BP(t.tagName),super.mount(t)}};var wbe=(e,t)=>TP(e)?new dI(t):new uI(t,{allowProjection:e!==bbe.Fragment});var Cbe=nye({...Jye,...mbe,...ube,...hbe},wbe);var ie=Sve(Cbe);var fI=L(ce(),1);function Ca(e){let t=nl(()=>am(e)),{isStatic:r}=(0,fI.useContext)(yh);if(r){let[,n]=(0,fI.useState)(e);(0,fI.useEffect)(()=>t.on("change",n),[])}return t}function a3(e,t){let r=Ca(t()),n=()=>r.set(t());return n(),xh(()=>{let o=()=>Br.preRender(n,!1,!0),a=e.map(i=>i.on("change",o));return()=>{a.forEach(i=>i()),Bc(n)}}),r}var Yx=L(ce(),1);function Sbe(e){return typeof e=="number"?e:parseFloat(e)}function kh(e,t={}){let{isStatic:r}=(0,Yx.useContext)(yh),n=(0,Yx.useRef)(null),o=Ca(Ln(e)?Sbe(e.get()):e),a=(0,Yx.useRef)(o.get()),i=(0,Yx.useRef)(()=>{}),s=()=>{let c=n.current;c&&c.time===0&&c.sample(ui.delta),l(),n.current=qye({keyframes:[o.get(),a.current],velocity:o.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...t,onUpdate:i.current})},l=()=>{n.current&&n.current.stop()};return(0,Yx.useInsertionEffect)(()=>o.attach((c,u)=>r?u(c):(a.current=c,i.current=u,Br.update(s),o.get()),l),[JSON.stringify(t)]),xh(()=>{if(Ln(e))return e.on("change",c=>o.set(Sbe(c)))},[o]),o}var oft=e=>e&&typeof e=="object"&&e.mix,aft=e=>oft(e)?e.mix:void 0;function Pbe(...e){let t=!Array.isArray(e[0]),r=t?0:-1,n=e[0+r],o=e[1+r],a=e[2+r],i=e[3+r],s=AV(o,a,{mixer:aft(a[0]),...i});return t?s(n):s}function Ibe(e){GP.current=[],e();let t=a3(GP.current,e);return GP.current=void 0,t}function tc(e,t,r,n){if(typeof e=="function")return Ibe(e);let o=typeof t=="function"?t:Pbe(t,r,n);return Array.isArray(e)?Rbe(e,o):Rbe([e],([a])=>o(a))}function Rbe(e,t){let r=nl(()=>[]);return a3(e,()=>{r.length=0;let n=e.length;for(let o=0;o<n;o++)r[o]=e[o].get();return t(r)})}function ift(e){e.values.forEach(t=>t.stop())}function z7(e,t){[...t].reverse().forEach(n=>{let o=e.getVariant(n);o&&cL(e,o),e.variantChildren&&e.variantChildren.forEach(a=>{z7(a,t)})})}function sft(e,t){if(Array.isArray(t))return z7(e,t);if(typeof t=="string")return z7(e,[t]);cL(e,t)}function kbe(){let e=!1,t=new Set,r={subscribe(n){return t.add(n),()=>void t.delete(n)},start(n,o){Ni(e,"controls.start() should only be called after a component has mounted. Consider calling within a useEffect hook.");let a=[];return t.forEach(i=>{a.push(_V(i,n,{transitionOverride:o}))}),Promise.all(a)},set(n){return Ni(e,"controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook."),t.forEach(o=>{sft(o,n)})},stop(){t.forEach(n=>{ift(n)})},mount(){return e=!0,()=>{e=!1,r.stop()}}};return r}var Nbe=(e,t,r)=>{let n=t-e;return((r-e)%n+n)%n+e};function i3(e,t){return TV(e)?e[Nbe(0,e.length,t)]:e}function bL(e){return typeof e=="object"&&!Array.isArray(e)}function s3(e,t,r,n){return typeof e=="string"&&bL(t)?lL(e,r,n):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function Mbe(e,t,r){return e*(t+1)}function U7(e,t,r,n){var o;return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?r:(o=n.get(t))!==null&&o!==void 0?o:e}function lft(e,t,r){for(let n=0;n<e.length;n++){let o=e[n];o.at>t&&o.at<r&&(zx(e,o),n--)}}function Tbe(e,t,r,n,o,a){lft(e,o,a);for(let i=0;i<t.length;i++)e.push({value:t[i],at:dn(o,a,n[i]),easing:i3(r,i)})}function Abe(e,t){for(let r=0;r<e.length;r++)e[r]=e[r]/(t+1)}function Lbe(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}var cft="easeInOut",uft=20;function Obe(e,{defaultTransition:t={},...r}={},n,o){let a=t.duration||.3,i=new Map,s=new Map,l={},c=new Map,u=0,d=0,f=0;for(let p=0;p<e.length;p++){let h=e[p];if(typeof h=="string"){c.set(h,d);continue}else if(!Array.isArray(h)){c.set(h.name,U7(d,h.at,u,c));continue}let[m,g,v={}]=h;v.at!==void 0&&(d=U7(d,v.at,u,c));let y=0,x=(C,b,w,S=0,P=0)=>{let N=dft(C),{delay:D=0,times:E=EV(N),type:A="keyframes",repeat:z,repeatType:V,repeatDelay:R=0,...I}=b,{ease:k=t.ease||"easeOut",duration:T}=b,O=typeof D=="function"?D(S,P):D,F=N.length,_=Ph(A)?A:o?.[A];if(F<=2&&_){let q=100;if(F===2&&mft(N)){let K=N[1]-N[0];q=Math.abs(K)}let G={...I};T!==void 0&&(G.duration=ci(T));let U=rV(G,q,_);k=U.ease,T=U.duration}T??(T=a);let M=d+O;E.length===1&&E[0]===0&&(E[1]=1);let j=E.length-N.length;if(j>0&&LV(E,j),N.length===1&&N.unshift(null),z){Ni(z<uft,"Repeat count too high, must be less than 20"),T=Mbe(T,z);let q=[...N],G=[...E];k=Array.isArray(k)?[...k]:[k];let U=[...k];for(let K=0;K<z;K++){N.push(...q);for(let Y=0;Y<q.length;Y++)E.push(G[Y]+(K+1)),k.push(Y===0?"linear":i3(U,Y-1))}Abe(E,z)}let H=M+T;Tbe(w,N,k,E,M,H),y=Math.max(O+T,y),f=Math.max(H,f)};if(Ln(m)){let C=Ebe(m,s);x(g,v,Dbe("default",C))}else{let C=s3(m,g,n,l),b=C.length;for(let w=0;w<b;w++){g=g,v=v;let S=C[w],P=Ebe(S,s);for(let N in g)x(g[N],fft(v,N),Dbe(N,P),w,b)}}u=d,d+=y}return s.forEach((p,h)=>{for(let m in p){let g=p[m];g.sort(Lbe);let v=[],y=[],x=[];for(let b=0;b<g.length;b++){let{at:w,value:S,easing:P}=g[b];v.push(S),y.push(Fc(0,f,w)),x.push(P||"easeOut")}y[0]!==0&&(y.unshift(0),v.unshift(v[0]),x.unshift(cft)),y[y.length-1]!==1&&(y.push(1),v.push(null)),i.has(h)||i.set(h,{keyframes:{},transition:{}});let C=i.get(h);C.keyframes[m]=v,C.transition[m]={...t,duration:f,ease:x,times:y,...r}}}),i}function Ebe(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function Dbe(e,t){return t[e]||(t[e]=[]),t[e]}function dft(e){return Array.isArray(e)?e:[e]}function fft(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}var pft=e=>typeof e=="number",mft=e=>e.every(pft);function hft(e,t){return e in t}var l3=class extends lI{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,r){if(hft(r,t)){let n=t[r];if(typeof n=="string"||typeof n=="number")return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,r){delete r.output[t]}measureInstanceViewportBox(){return Go()}build(t,r){Object.assign(t.output,r)}renderInstance(t,{output:r}){Object.assign(t,r)}sortInstanceNodePosition(){return 0}};function _be(e){let t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},r=XV(e)?new dI(t):new uI(t);r.mount(e),Iv.set(e,r)}function Fbe(e){let t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},r=new l3(t);r.mount(e),Iv.set(e,r)}function gft(e,t){return Ln(e)||typeof e=="number"||typeof e=="string"&&!bL(t)}function c3(e,t,r,n){let o=[];if(gft(e,t))o.push(KV(e,bL(t)&&t.default||t,r&&(r.default||r)));else{let a=s3(e,t,n),i=a.length;Ni(!!i,"No valid elements provided.");for(let s=0;s<i;s++){let l=a[s],c=l instanceof Element?_be:Fbe;Iv.has(l)||c(l);let u=Iv.get(l),d={...r};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,i)),o.push(...rI(u,{...t,transition:d},{}))}}return o}function Bbe(e,t,r){let n=[];return Obe(e,t,r,{spring:eI}).forEach(({keyframes:a,transition:i},s)=>{n.push(...c3(s,a,i))}),n}function vft(e){return Array.isArray(e)&&e.some(Array.isArray)}function Vbe(e){function t(r,n,o){let a=[];vft(r)?a=Bbe(r,n,e):a=c3(r,n,o,e);let i=new Vw(a);return e&&e.animations.push(i),i}return t}var Ko=Vbe();function zbe(){let e=nl(kbe);return xh(e.mount,[]),e}var u3=zbe;var d3=class{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,r){this.componentControls.forEach(n=>{n.start(t.nativeEvent||t,r)})}},yft=()=>new d3;function H7(){return nl(yft)}var wL={};RF(wL,{Group:()=>jbe,Item:()=>Wbe});var j7=L(fe(),1);var pI=L(ce(),1);var Ube=L(ce(),1),f3=(0,Ube.createContext)(null);function Hbe(e,t,r,n){if(!n)return e;let o=e.findIndex(u=>u.value===t);if(o===-1)return e;let a=n>0?1:-1,i=e[o+a];if(!i)return e;let s=e[o],l=i.layout,c=dn(l.min,l.max,.5);return a===1&&s.layout.max+r>c||a===-1&&s.layout.min+r<c?dye(e,o,o+a):e}function xft({children:e,as:t="ul",axis:r="y",onReorder:n,values:o,...a},i){let s=nl(()=>ie[t]),l=[],c=(0,pI.useRef)(!1);Ni(!!o,"Reorder.Group must be provided a values prop");let u={axis:r,registerItem:(d,f)=>{let p=l.findIndex(h=>d===h.value);p!==-1?l[p].layout=f[r]:l.push({value:d,layout:f[r]}),l.sort(wft)},updateOrder:(d,f,p)=>{if(c.current)return;let h=Hbe(l,d,f,p);l!==h&&(c.current=!0,n(h.map(bft).filter(m=>o.indexOf(m)!==-1)))}};return(0,pI.useEffect)(()=>{c.current=!1}),(0,j7.jsx)(s,{...a,ref:i,ignoreStrict:!0,children:(0,j7.jsx)(f3.Provider,{value:u,children:e})})}var jbe=(0,pI.forwardRef)(xft);function bft(e){return e.value}function wft(e,t){return e.layout.min-t.layout.min}var $be=L(fe(),1);var p3=L(ce(),1);function qbe(e,t=0){return Ln(e)?e:Ca(t)}function Cft({children:e,style:t={},value:r,as:n="li",onDrag:o,layout:a=!0,...i},s){let l=nl(()=>ie[n]),c=(0,p3.useContext)(f3),u={x:qbe(t.x),y:qbe(t.y)},d=tc([u.x,u.y],([m,g])=>m||g?1:"unset");Ni(!!c,"Reorder.Item must be a child of Reorder.Group");let{axis:f,registerItem:p,updateOrder:h}=c;return(0,$be.jsx)(l,{drag:f,...i,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:d},layout:a,onDrag:(m,g)=>{let{velocity:v}=g;v[f]&&h(r,u[f].get(),v[f]),o&&o(m,g)},onLayoutMeasure:m=>p(r,m),ref:s,ignoreStrict:!0,children:e})}var Wbe=(0,p3.forwardRef)(Cft);var kBr=mt("",{variants:{hover:{lift:["transition-all duration-200 ease-out","hover:-translate-y-0.5","hover:shadow-md"],glow:["transition-all duration-300 ease-out","hover:shadow-lg","hover:shadow-primary/20"],scale:["transition-transform duration-200 ease-out","hover:scale-105","active:scale-95"],brightness:["transition-all duration-200 ease-out","hover:brightness-110","active:brightness-95"],border:["transition-all duration-200 ease-out","hover:border-primary/50"]},focus:{ring:["focus:outline-none","focus-visible:ring-2","focus-visible:ring-primary/50","focus-visible:ring-offset-2"],glow:["focus:outline-none","focus-visible:shadow-lg","focus-visible:shadow-primary/30"],border:["focus:outline-none","focus-visible:border-primary","focus-visible:border-2"]},active:{scale:["active:scale-95","transition-transform duration-100"],darken:["active:brightness-90","transition-all duration-100"],depress:["active:translate-y-0.5","active:shadow-sm","transition-all duration-100"]},cursor:{pointer:"cursor-pointer",grab:"cursor-grab active:cursor-grabbing",text:"cursor-text",wait:"cursor-wait",help:"cursor-help",notAllowed:"cursor-not-allowed"}},defaultVariants:{hover:"lift",focus:"ring",active:"scale",cursor:"pointer"}}),im={smooth:{type:"spring",stiffness:260,damping:20},bouncy:{type:"spring",stiffness:300,damping:15},stiff:{type:"spring",stiffness:400,damping:25},gentle:{type:"spring",stiffness:150,damping:15}},m3={lift:{y:-2,transition:im.smooth},scale:{scale:1.05,transition:im.smooth},glow:{boxShadow:"0 0 20px rgba(var(--primary), 0.3)",transition:im.smooth},rotate:{rotate:2,transition:im.bouncy}},Gbe={scale:{scale:.95,transition:{duration:.1}},depress:{y:1,transition:{duration:.1}}},NBr={ring:{boxShadow:"0 0 0 2px var(--background), 0 0 0 4px var(--primary)",transition:im.smooth},glow:{boxShadow:"0 0 0 3px rgba(var(--primary), 0.3)",transition:im.smooth}},MBr={container:{hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.05}}},item:{hidden:{opacity:0,y:20},show:{opacity:1,y:0,transition:im.smooth}}},TBr={fadeIn:{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3}},slideUp:{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:im.smooth},slideRight:{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},transition:im.smooth},scale:{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:1.05},transition:im.smooth}};var ABr={initial:{opacity:0,y:-20,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.95,transition:{duration:.15}},transition:im.bouncy};var Qx=L(fe(),1),Sft=mt("rounded-lg border bg-card text-card-foreground shadow-sm transition-all duration-200",{variants:{variant:{default:"border-border dark:border-border",outline:"border border-border shadow-none bg-transparent dark:border-border",filled:"border-none bg-secondary dark:bg-secondary shadow-inner",elevated:"border-none shadow-lg dark:shadow-xl dark:shadow-black/20",gradient:"border-none bg-gradient-to-br from-primary/5 to-primary/10 dark:from-primary/10 dark:to-primary/20",glass:"border border-white/20 bg-white/10 backdrop-blur-md dark:border-white/10 dark:bg-black/10",neon:"border-2 border-primary/50 shadow-[0_0_15px_rgba(var(--primary),0.5)] dark:shadow-[0_0_20px_rgba(var(--primary),0.7)]",glow:"border border-border shadow-[0_0_30px_rgba(var(--primary),0.15)] dark:shadow-[0_0_40px_rgba(var(--primary),0.25)]"},size:{default:"p-6",sm:"p-4",lg:"p-8",xl:"p-10"},radius:{default:"rounded-lg",sm:"rounded-md",lg:"rounded-xl",full:"rounded-3xl",none:"rounded-none"},interactive:{true:"cursor-pointer hover:shadow-lg hover:border-primary/20 dark:hover:border-primary/30 hover:-translate-y-0.5 active:translate-y-0 active:shadow-sm",false:""}},defaultVariants:{variant:"default",size:"default",radius:"default"}}),Be=Nh.forwardRef(({className:e,variant:t,size:r,radius:n,interactive:o,microInteraction:a="lift",enableGlassmorphism:i,enableParallax:s=!1,enableTilt:l=!1,tiltMaxAngle:c=15,parallaxOffset:u=20,children:d,asChild:f,...p},h)=>{let[m,g]=Nh.useState({x:0,y:0}),[v,y]=Nh.useState(!1),x=V=>{if(!l&&!s)return;let R=V.currentTarget.getBoundingClientRect(),I=R.left+R.width/2,k=R.top+R.height/2,T=(V.clientX-I)/(R.width/2),O=(V.clientY-k)/(R.height/2);g({x:T,y:O})},C=()=>y(!0),b=()=>{y(!1),g({x:0,y:0})},w=i?"glass":t,S=l?m.y*-c:0,P=l?m.x*c:0,N=o&&a!=="none"?{whileHover:a==="scale"?m3.scale:a==="glow"?m3.glow:m3.lift,whileTap:Gbe.scale}:{},{onDrag:D,onDragStart:E,onDragEnd:A,...z}=p;return(0,Qx.jsx)(ie.div,{ref:h,className:B(Sft({variant:w,size:r,radius:n,interactive:o,className:e})),onMouseMove:x,onMouseEnter:C,onMouseLeave:b,style:{transformStyle:l||s?"preserve-3d":void 0,perspective:l||s?"1000px":void 0},animate:{rotateX:S,rotateY:P},transition:{type:"spring",damping:20,stiffness:300},...N,...z,children:s?(0,Qx.jsx)(ie.div,{style:{transform:"translateZ(50px)"},animate:{x:v?m.x*u:0,y:v?m.y*u:0},transition:{type:"spring",damping:20,stiffness:300},children:d}):d})});Be.displayName="MoonUICardPro";var yr=Nh.forwardRef(({className:e,...t},r)=>(0,Qx.jsx)("div",{ref:r,className:B("flex flex-col space-y-1.5",e),...t}));yr.displayName="MoonUICardHeaderPro";var Or=Nh.forwardRef(({className:e,...t},r)=>(0,Qx.jsx)("h3",{ref:r,className:B("text-lg font-semibold leading-none tracking-tight",e),...t}));Or.displayName="MoonUICardTitlePro";var qi=Nh.forwardRef(({className:e,...t},r)=>(0,Qx.jsx)("p",{ref:r,className:B("text-sm text-muted-foreground",e),...t}));qi.displayName="MoonUICardDescriptionPro";var Ve=Nh.forwardRef(({className:e,...t},r)=>(0,Qx.jsx)("div",{ref:r,className:B("pt-0",e),...t}));Ve.displayName="MoonUICardContentPro";var h3=Nh.forwardRef(({className:e,...t},r)=>(0,Qx.jsx)("div",{ref:r,className:B("flex items-center pt-4",e),...t}));h3.displayName="MoonUICardFooterPro";var sm=L(ce(),1);var Uc=L(ce(),1);var g3=L(ce(),1);function mI(e){let t=g3.useRef({value:e,previous:e});return g3.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Kbe=L(ce(),1);function hI(e){let[t,r]=Kbe.useState(void 0);return Un(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});let n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;let a=o[0],i,s;if("borderBoxSize"in a){let l=a.borderBoxSize,c=Array.isArray(l)?l[0]:l;i=c.inlineSize,s=c.blockSize}else i=e.offsetWidth,s=e.offsetHeight;r({width:i,height:s})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Dd=L(fe(),1),v3="Checkbox",[Pft,YBr]=Fn(v3),[Ift,q7]=Pft(v3);function Rft(e){let{__scopeCheckbox:t,checked:r,children:n,defaultChecked:o,disabled:a,form:i,name:s,onCheckedChange:l,required:c,value:u="on",internal_do_not_use_render:d}=e,[f,p]=qo({prop:r,defaultProp:o??!1,onChange:l,caller:v3}),[h,m]=Uc.useState(null),[g,v]=Uc.useState(null),y=Uc.useRef(!1),x=h?!!i||!!h.closest("form"):!0,C={checked:f,disabled:a,setChecked:p,control:h,setControl:m,name:s,form:i,value:u,hasConsumerStoppedPropagationRef:y,required:c,defaultChecked:Zx(o)?!1:o,isFormControl:x,bubbleInput:g,setBubbleInput:v};return(0,Dd.jsx)(Ift,{scope:t,...C,children:kft(d)?d(C):n})}var Xbe="CheckboxTrigger",Ybe=Uc.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},o)=>{let{control:a,value:i,disabled:s,checked:l,required:c,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:h}=q7(Xbe,e),m=Gt(o,u),g=Uc.useRef(l);return Uc.useEffect(()=>{let v=a?.form;if(v){let y=()=>d(g.current);return v.addEventListener("reset",y),()=>v.removeEventListener("reset",y)}},[a,d]),(0,Dd.jsx)(ot.button,{type:"button",role:"checkbox","aria-checked":Zx(l)?"mixed":l,"aria-required":c,"data-state":e0e(l),"data-disabled":s?"":void 0,disabled:s,value:i,...n,ref:m,onKeyDown:Ze(t,v=>{v.key==="Enter"&&v.preventDefault()}),onClick:Ze(r,v=>{d(y=>Zx(y)?!0:!y),h&&p&&(f.current=v.isPropagationStopped(),f.current||v.stopPropagation())})})});Ybe.displayName=Xbe;var y3=Uc.forwardRef((e,t)=>{let{__scopeCheckbox:r,name:n,checked:o,defaultChecked:a,required:i,disabled:s,value:l,onCheckedChange:c,form:u,...d}=e;return(0,Dd.jsx)(Rft,{__scopeCheckbox:r,checked:o,defaultChecked:a,disabled:s,required:i,onCheckedChange:c,name:n,form:u,value:l,internal_do_not_use_render:({isFormControl:f})=>(0,Dd.jsxs)(Dd.Fragment,{children:[(0,Dd.jsx)(Ybe,{...d,ref:t,__scopeCheckbox:r}),f&&(0,Dd.jsx)(Jbe,{__scopeCheckbox:r})]})})});y3.displayName=v3;var Qbe="CheckboxIndicator",$7=Uc.forwardRef((e,t)=>{let{__scopeCheckbox:r,forceMount:n,...o}=e,a=q7(Qbe,r);return(0,Dd.jsx)(Io,{present:n||Zx(a.checked)||a.checked===!0,children:(0,Dd.jsx)(ot.span,{"data-state":e0e(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});$7.displayName=Qbe;var Zbe="CheckboxBubbleInput",Jbe=Uc.forwardRef(({__scopeCheckbox:e,...t},r)=>{let{control:n,hasConsumerStoppedPropagationRef:o,checked:a,defaultChecked:i,required:s,disabled:l,name:c,value:u,form:d,bubbleInput:f,setBubbleInput:p}=q7(Zbe,e),h=Gt(r,p),m=mI(a),g=hI(n);Uc.useEffect(()=>{let y=f;if(!y)return;let x=window.HTMLInputElement.prototype,b=Object.getOwnPropertyDescriptor(x,"checked").set,w=!o.current;if(m!==a&&b){let S=new Event("click",{bubbles:w});y.indeterminate=Zx(a),b.call(y,Zx(a)?!1:a),y.dispatchEvent(S)}},[f,m,a,o]);let v=Uc.useRef(Zx(a)?!1:a);return(0,Dd.jsx)(ot.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??v.current,required:s,disabled:l,name:c,value:u,form:d,...t,tabIndex:-1,ref:h,style:{...t.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Jbe.displayName=Zbe;function kft(e){return typeof e=="function"}function Zx(e){return e==="indeterminate"}function e0e(e){return Zx(e)?"indeterminate":e?"checked":"unchecked"}var Uf=L(fe(),1),Mft=mt("peer shrink-0 border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:text-primary-foreground",{variants:{variant:{default:"border-border bg-background data-[state=checked]:bg-primary data-[state=checked]:border-primary",outline:"border-border bg-transparent data-[state=checked]:bg-primary data-[state=checked]:border-primary",muted:"border-border bg-accent data-[state=checked]:bg-primary data-[state=checked]:border-primary",ghost:"border-transparent bg-transparent hover:bg-accent data-[state=checked]:bg-primary data-[state=checked]:border-primary"},size:{sm:"h-3.5 w-3.5",default:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},radius:{none:"rounded-none",sm:"rounded-sm",default:"rounded-sm",md:"rounded-md",full:"rounded-full"},animation:{none:"",subtle:"transition-all duration-200",default:"transition-all duration-200",bounce:"transition-all duration-200"}},defaultVariants:{variant:"default",size:"default",radius:"default",animation:"default"}}),Du=sm.forwardRef(({className:e,variant:t,size:r,radius:n,animation:o,indeterminate:a=!1,icon:i,checked:s,...l},c)=>{let[u,d]=sm.useState(a);return sm.useEffect(()=>{d(a)},[a]),(0,Uf.jsx)(y3,{ref:c,checked:u?!1:s,className:B(Mft({variant:t,size:r,radius:n,animation:o}),e),...l,children:(0,Uf.jsx)($7,{className:B("flex items-center justify-center text-current",o==="bounce"&&"data-[state=checked]:animate-bounce"),children:u?(0,Uf.jsx)(em,{className:"h-[65%] w-[65%]"}):i||(0,Uf.jsx)(Wr,{className:"h-[65%] w-[65%]"})})})});Du.displayName=y3.displayName;var Tft=sm.forwardRef(({className:e,orientation:t="vertical",spacing:r="1rem",children:n,...o},a)=>(0,Uf.jsx)("div",{ref:a,className:B("flex",t==="vertical"?"flex-col":"flex-row flex-wrap",e),style:{gap:r},role:"group",...o,children:n}));Tft.displayName="CheckboxGroup";var W7=sm.forwardRef(({className:e,htmlFor:t,children:r,position:n="end",disabled:o=!1,...a},i)=>(0,Uf.jsx)("label",{ref:i,htmlFor:t,className:B("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",n==="start"?"mr-2":"ml-2",o&&"cursor-not-allowed opacity-70",e),...a,children:r}));W7.displayName="CheckboxLabel";var Aft=sm.forwardRef(({id:e,label:t,labelPosition:r="end",labelClassName:n,...o},a)=>{let i=sm.useId(),s=e||i;return(0,Uf.jsxs)("div",{className:"flex items-center",children:[r==="start"&&(0,Uf.jsx)(W7,{htmlFor:s,position:"start",disabled:o.disabled,className:n,children:t}),(0,Uf.jsx)(Du,{ref:a,id:s,...o}),r==="end"&&(0,Uf.jsx)(W7,{htmlFor:s,position:"end",disabled:o.disabled,className:n,children:t})]})});Aft.displayName="CheckboxWithLabel";var Mi=L(ce(),1);var fn=L(fe(),1),x3=Mi.forwardRef(({className:e,variant:t="default",size:r="md",animationMode:n="smooth",autoCollapseAfter:o,onToggleChange:a,persistKey:i,loading:s,progress:l,badge:c,badgeVariant:u="default",shortcut:d,lazy:f,open:p,defaultOpen:h,onOpenChange:m,children:g,disabled:v},y)=>{let[x,C]=Mi.useState(()=>{if(i&&typeof window<"u"){let D=localStorage.getItem(`collapsible-${i}`);if(D!==null)return D==="true"}return h||!1}),[b,w]=Mi.useState(!f),S=p!==void 0?p:x,P=Mi.useCallback(D=>{s||(C(D),m?.(D),a?.(D),i&&typeof window<"u"&&localStorage.setItem(`collapsible-${i}`,String(D)),f&&D&&!b&&w(!0),D&&o&&setTimeout(()=>{C(!1),m?.(!1),a?.(!1)},o))},[s,m,a,i,f,b,o]);Mi.useEffect(()=>{if(d){let D=E=>{let A=d.toLowerCase().split("+"),z=A.includes("ctrl")||A.includes("cmd"),V=A.includes("shift"),R=A.includes("alt"),I=A[A.length-1];E.ctrlKey===z&&E.shiftKey===V&&E.altKey===R&&E.key.toLowerCase()===I&&(E.preventDefault(),P(!S))};return window.addEventListener("keydown",D),()=>window.removeEventListener("keydown",D)}},[d,S,P]);let N=l?188.4-188.4*l/100:188.4;return(0,fn.jsxs)("div",{className:B("relative",t==="bordered"&&"border border-border rounded-lg",t==="elevated"&&"border border-border rounded-lg shadow-lg hover:shadow-xl transition-shadow",t==="gradient"&&"rounded-lg bg-gradient-to-r from-primary/5 via-accent/5 to-secondary/5",t==="glassmorphism"&&"rounded-lg backdrop-blur-md bg-white/10 border border-white/20",t==="card"&&"border border-border rounded-lg bg-card",s&&"opacity-60 pointer-events-none",e),children:[l!==void 0&&(0,fn.jsxs)("div",{className:"absolute top-2 right-2 w-6 h-6 z-10",children:[(0,fn.jsxs)("svg",{className:"w-6 h-6 -rotate-90",viewBox:"0 0 64 64",children:[(0,fn.jsx)("circle",{cx:"32",cy:"32",r:"30",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"text-muted-foreground/20"}),(0,fn.jsx)("circle",{cx:"32",cy:"32",r:"30",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeDasharray:"188.4",strokeDashoffset:N,strokeLinecap:"round",className:"text-primary transition-all duration-500"})]}),(0,fn.jsx)("span",{className:"absolute inset-0 flex items-center justify-center text-xs font-medium",children:Math.round(l)})]}),c&&(0,fn.jsx)("div",{className:"absolute -top-3 right-4 z-20",children:(0,fn.jsx)("div",{className:B("text-xs px-2.5 py-1 rounded-full font-semibold shadow-md",u==="default"&&"bg-background text-foreground border border-border",u==="primary"&&"bg-primary text-primary-foreground",u==="secondary"&&"bg-secondary text-secondary-foreground",u==="success"&&"bg-green-500 text-white",u==="warning"&&"bg-amber-500 text-white",u==="danger"&&"bg-red-500 text-white",u==="info"&&"bg-blue-500 text-white"),children:c})}),s&&(0,fn.jsx)("div",{className:"absolute top-1/2 right-4 -translate-y-1/2 z-10",children:(0,fn.jsx)(Sr,{className:"h-4 w-4 animate-spin text-muted-foreground"})}),(0,fn.jsx)(t4,{ref:y,open:S,onOpenChange:P,disabled:v||s,className:B("w-full",n==="spring"&&"[&_[data-state=open]]:animate-[collapsible-down_0.3s_cubic-bezier(0.34,1.56,0.64,1)]",n==="bounce"&&"[&_[data-state=open]]:animate-[collapsible-down_0.4s_cubic-bezier(0.68,-0.55,0.265,1.55)]",n==="fade"&&"[&_[data-state=open]]:animate-[collapsible-down_0.2s_ease-in-out]",n==="slide"&&"[&_[data-state=open]]:animate-[slide-down_0.3s_ease-out]"),children:(0,fn.jsx)(G7.Provider,{value:{variant:t,size:r,animationMode:n,lazy:f&&!b,shortcut:d},children:g})})]})});x3.displayName="MoonUICollapsiblePro";var G7=Mi.createContext({}),CL=mt("flex w-full items-center gap-3 transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",{variants:{variant:{default:"text-foreground hover:text-primary",bordered:"text-foreground hover:text-primary hover:bg-primary/5 rounded-t-lg",elevated:"text-foreground hover:text-primary hover:bg-primary/5 rounded-t-lg",gradient:"text-foreground hover:text-primary",glassmorphism:"text-foreground hover:text-primary hover:bg-white/10",card:"text-foreground hover:text-primary hover:bg-accent/5 rounded-t-lg"},size:{xs:"text-xs py-2 px-3 min-h-[2.5rem]",sm:"text-sm py-2.5 px-3.5 min-h-[3rem]",md:"text-base py-3 px-4 min-h-[3.5rem]",lg:"text-lg py-4 px-5 min-h-[4rem]",xl:"text-xl py-5 px-6 min-h-[4.5rem]"}},defaultVariants:{variant:"default",size:"md"}}),b3=Mi.forwardRef(({className:e,children:t,variant:r,size:n,asChild:o,leftIcon:a,rightIcon:i,description:s,external:l,customChevron:c,hideChevron:u,status:d,...f},p)=>{let{variant:h,size:m,shortcut:g}=Mi.useContext(G7),v=r||h||"default",y=n||m||"md",x=d&&{success:(0,fn.jsx)(_s,{className:"h-4 w-4 text-green-500"}),warning:(0,fn.jsx)(eo,{className:"h-4 w-4 text-amber-500"}),error:(0,fn.jsx)(aa,{className:"h-4 w-4 text-red-500"}),info:(0,fn.jsx)(Ec,{className:"h-4 w-4 text-blue-500"})}[d];return o?(0,fn.jsx)(LT,{ref:p,className:B(CL({variant:v,size:y}),e),asChild:o,...f,children:t}):(0,fn.jsxs)(LT,{ref:p,className:B(CL({variant:v,size:y}),"[&[data-state=open]>.chevron]:rotate-180","[&[data-state=open]]:text-primary",e),...f,children:[a&&(0,fn.jsx)("span",{className:"text-muted-foreground",children:a}),x&&!a&&x,(0,fn.jsxs)("div",{className:"flex-1 text-left",children:[(0,fn.jsxs)("div",{className:"flex items-center gap-2",children:[(0,fn.jsx)("span",{className:"font-medium",children:t}),l&&(0,fn.jsx)(Lc,{className:"h-3 w-3 text-muted-foreground"})]}),s&&(0,fn.jsx)("div",{className:"text-sm text-muted-foreground mt-1",children:s})]}),(0,fn.jsxs)("div",{className:"flex items-center gap-2",children:[g&&(0,fn.jsx)("kbd",{className:"hidden sm:inline-flex h-6 px-2 items-center rounded border bg-muted text-xs font-medium text-muted-foreground",children:g}),i&&(0,fn.jsx)("span",{className:"text-muted-foreground",children:i}),!u&&(0,fn.jsx)("span",{className:"chevron transition-transform duration-200 text-muted-foreground",children:c||(0,fn.jsx)($o,{className:"h-4 w-4"})})]})]})});b3.displayName="MoonUICollapsibleTriggerPro";var w3=mt("overflow-hidden transition-all",{variants:{variant:{default:"text-muted-foreground",bordered:"text-muted-foreground border-x border-b border-border rounded-b-lg",elevated:"text-muted-foreground bg-muted/20",gradient:"text-muted-foreground",glassmorphism:"text-muted-foreground bg-white/5",card:"text-muted-foreground border-x border-b border-border rounded-b-lg bg-card/50"},size:{xs:"text-xs",sm:"text-sm",md:"text-base",lg:"text-lg",xl:"text-xl"}},defaultVariants:{variant:"default",size:"md"}}),C3=Mi.forwardRef(({className:e,children:t,variant:r,size:n,contentLoading:o,loadContent:a,noPadding:i,padding:s,...l},c)=>{let{variant:u,size:d,animationMode:f,lazy:p}=Mi.useContext(G7),h=r||u||"default",m=n||d||"md",[g,v]=Mi.useState(null),[y,x]=Mi.useState(!1);Mi.useEffect(()=>{a&&!g&&(x(!0),a().then(v).finally(()=>x(!1)))},[a,g]);let C=!i&&{xs:"p-3",sm:"p-3.5",md:"p-4",lg:"p-5",xl:"p-6"}[m];return(0,fn.jsx)(r4,{ref:c,className:B(w3({variant:h,size:m}),f==="spring"&&"data-[state=closed]:animate-[collapsible-up_0.3s_cubic-bezier(0.34,1.56,0.64,1)] data-[state=open]:animate-[collapsible-down_0.3s_cubic-bezier(0.34,1.56,0.64,1)]",f==="bounce"&&"data-[state=closed]:animate-[collapsible-up_0.4s_cubic-bezier(0.68,-0.55,0.265,1.55)] data-[state=open]:animate-[collapsible-down_0.4s_cubic-bezier(0.68,-0.55,0.265,1.55)]",f==="fade"&&"data-[state=closed]:animate-[collapsible-up_0.2s_ease-in-out] data-[state=open]:animate-[collapsible-down_0.2s_ease-in-out]",f==="slide"&&"data-[state=closed]:animate-[slide-up_0.3s_ease-out] data-[state=open]:animate-[slide-down_0.3s_ease-out]",f==="smooth"&&"data-[state=closed]:animate-collapse-up data-[state=open]:animate-collapse-down",e),...l,children:(0,fn.jsx)("div",{className:B(s||C),children:p?(0,fn.jsxs)("div",{className:"flex items-center gap-2 py-4",children:[(0,fn.jsx)(In,{className:"h-4 w-4 animate-pulse"}),(0,fn.jsx)("span",{className:"text-sm",children:"Click to load content..."})]}):o||y?(0,fn.jsxs)("div",{className:"flex items-center gap-2 py-4",children:[(0,fn.jsx)(Sr,{className:"h-4 w-4 animate-spin"}),(0,fn.jsx)("span",{className:"text-sm",children:"Loading content..."})]}):g||t})})});C3.displayName="MoonUICollapsibleContentPro";var t0e=()=>{let[e,t]=Mi.useState({openCount:0,lastOpened:null,totalTimeOpen:0}),r=Mi.useCallback(()=>{t(o=>({...o,openCount:o.openCount+1,lastOpened:new Date}))},[]),n=Mi.useCallback(()=>{t(o=>{if(o.lastOpened){let a=Date.now()-o.lastOpened.getTime();return{...o,totalTimeOpen:o.totalTimeOpen+a,lastOpened:null}}return o})},[]);return{analytics:e,trackOpen:r,trackClose:n}};var r0e=L(ce(),1);var Rv=L(fe(),1),Lft=["#000000","#374151","#EF4444","#F97316","#F59E0B","#EAB308","#22C55E","#10B981","#06B6D4","#3B82F6","#6366F1","#8B5CF6","#A855F7","#D946EF","#EC4899","#F43F5E"],gI=({value:e="#000000",onChange:t,className:r,showInput:n=!1,showPresets:o=!0,size:a="default",presets:i=Lft})=>{let[s,l]=(0,r0e.useState)(e),c=d=>{l(d),t?.(d)},u={sm:"w-6 h-6",default:"w-8 h-8",lg:"w-10 h-10"};return(0,Rv.jsxs)("div",{className:B("flex flex-col gap-2",r),children:[n&&(0,Rv.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,Rv.jsx)("input",{type:"color",value:s,onChange:d=>c(d.target.value),className:B("rounded border cursor-pointer",u[a]||u.default)}),(0,Rv.jsx)("input",{type:"text",value:s,onChange:d=>c(d.target.value),className:"px-2 py-1 border rounded text-sm font-mono",placeholder:"#000000"})]}),!n&&(0,Rv.jsx)("input",{type:"color",value:s,onChange:d=>c(d.target.value),className:B("rounded border cursor-pointer",u[a]||u.default)}),o&&i&&i.length>0&&(0,Rv.jsx)("div",{className:"flex flex-wrap gap-1",children:i.map(d=>(0,Rv.jsx)("button",{type:"button",onClick:()=>c(d),className:B("w-6 h-6 rounded border-2 hover:scale-110 transition-transform",s===d?"border-gray-900 dark:border-gray-100":"border-transparent"),style:{backgroundColor:d}},d))})]})};var pb=L(ce(),1),fi=L(ce(),1);var n0e=1,Eft=.9,Dft=.8,Oft=.17,K7=.1,X7=.999,_ft=.9999,Fft=.99,Bft=/[\\\/_+.#"@\[\(\{&]/,Vft=/[\\\/_+.#"@\[\(\{&]/g,zft=/[\s-]/,a0e=/[\s-]/g;function Y7(e,t,r,n,o,a,i){if(a===t.length)return o===e.length?n0e:Fft;var s=`${o},${a}`;if(i[s]!==void 0)return i[s];for(var l=n.charAt(a),c=r.indexOf(l,o),u=0,d,f,p,h;c>=0;)d=Y7(e,t,r,n,c+1,a+1,i),d>u&&(c===o?d*=n0e:Bft.test(e.charAt(c-1))?(d*=Dft,p=e.slice(o,c-1).match(Vft),p&&o>0&&(d*=Math.pow(X7,p.length))):zft.test(e.charAt(c-1))?(d*=Eft,h=e.slice(o,c-1).match(a0e),h&&o>0&&(d*=Math.pow(X7,h.length))):(d*=Oft,o>0&&(d*=Math.pow(X7,c-o))),e.charAt(c)!==t.charAt(a)&&(d*=_ft)),(d<K7&&r.charAt(c-1)===n.charAt(a+1)||n.charAt(a+1)===n.charAt(a)&&r.charAt(c-1)!==n.charAt(a))&&(f=Y7(e,t,r,n,c+1,a+2,i),f*K7>d&&(d=f*K7)),d>u&&(u=d),c=r.indexOf(l,c+1);return i[s]=u,u}function o0e(e){return e.toLowerCase().replace(a0e," ")}function i0e(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,Y7(e,t,o0e(e),o0e(t),0,0,{})}var ia=L(ce(),1);var di=L(ce(),1);var s0e=L(ce(),1);function l0e(e,t=globalThis?.document){let r=qn(e);s0e.useEffect(()=>{let n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var Z7=L(fe(),1),Uft="DismissableLayer",Q7="dismissableLayer.update",Hft="dismissableLayer.pointerDownOutside",jft="dismissableLayer.focusOutside",c0e,d0e=di.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Hf=di.forwardRef((e,t)=>{let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...l}=e,c=di.useContext(d0e),[u,d]=di.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=di.useState({}),h=Gt(t,S=>d(S)),m=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=m.indexOf(g),y=u?m.indexOf(u):-1,x=c.layersWithOutsidePointerEventsDisabled.size>0,C=y>=v,b=$ft(S=>{let P=S.target,N=[...c.branches].some(D=>D.contains(P));!C||N||(o?.(S),i?.(S),S.defaultPrevented||s?.())},f),w=Wft(S=>{let P=S.target;[...c.branches].some(D=>D.contains(P))||(a?.(S),i?.(S),S.defaultPrevented||s?.())},f);return l0e(S=>{y===c.layers.size-1&&(n?.(S),!S.defaultPrevented&&s&&(S.preventDefault(),s()))},f),di.useEffect(()=>{if(u)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(c0e=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),u0e(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=c0e)}},[u,f,r,c]),di.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),u0e())},[u,c]),di.useEffect(()=>{let S=()=>p({});return document.addEventListener(Q7,S),()=>document.removeEventListener(Q7,S)},[]),(0,Z7.jsx)(ot.div,{...l,ref:h,style:{pointerEvents:x?C?"auto":"none":void 0,...e.style},onFocusCapture:Ze(e.onFocusCapture,w.onFocusCapture),onBlurCapture:Ze(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:Ze(e.onPointerDownCapture,b.onPointerDownCapture)})});Hf.displayName=Uft;var qft="DismissableLayerBranch",f0e=di.forwardRef((e,t)=>{let r=di.useContext(d0e),n=di.useRef(null),o=Gt(t,n);return di.useEffect(()=>{let a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),(0,Z7.jsx)(ot.div,{...e,ref:o})});f0e.displayName=qft;function $ft(e,t=globalThis?.document){let r=qn(e),n=di.useRef(!1),o=di.useRef(()=>{});return di.useEffect(()=>{let a=s=>{if(s.target&&!n.current){let c=function(){p0e(Hft,r,u,{discrete:!0})};var l=c;let u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);n.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function Wft(e,t=globalThis?.document){let r=qn(e),n=di.useRef(!1);return di.useEffect(()=>{let o=a=>{a.target&&!n.current&&p0e(jft,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function u0e(){let e=new CustomEvent(Q7);document.dispatchEvent(e)}function p0e(e,t,r,{discrete:n}){let o=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?uP(o,a):o.dispatchEvent(a)}var m0e=Hf,h0e=f0e;var jf=L(ce(),1);var b0e=L(fe(),1),J7="focusScope.autoFocusOnMount",eX="focusScope.autoFocusOnUnmount",g0e={bubbles:!1,cancelable:!0},Kft="FocusScope",kv=jf.forwardRef((e,t)=>{let{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[s,l]=jf.useState(null),c=qn(o),u=qn(a),d=jf.useRef(null),f=Gt(t,m=>l(m)),p=jf.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;jf.useEffect(()=>{if(n){let y=function(w){if(p.paused||!s)return;let S=w.target;s.contains(S)?d.current=S:Jx(d.current,{select:!0})},x=function(w){if(p.paused||!s)return;let S=w.relatedTarget;S!==null&&(s.contains(S)||Jx(d.current,{select:!0}))},C=function(w){if(document.activeElement===document.body)for(let P of w)P.removedNodes.length>0&&Jx(s)};var m=y,g=x,v=C;document.addEventListener("focusin",y),document.addEventListener("focusout",x);let b=new MutationObserver(C);return s&&b.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",x),b.disconnect()}}},[n,s,p.paused]),jf.useEffect(()=>{if(s){y0e.add(p);let m=document.activeElement;if(!s.contains(m)){let v=new CustomEvent(J7,g0e);s.addEventListener(J7,c),s.dispatchEvent(v),v.defaultPrevented||(Xft(ept(w0e(s)),{select:!0}),document.activeElement===m&&Jx(s))}return()=>{s.removeEventListener(J7,c),setTimeout(()=>{let v=new CustomEvent(eX,g0e);s.addEventListener(eX,u),s.dispatchEvent(v),v.defaultPrevented||Jx(m??document.body,{select:!0}),s.removeEventListener(eX,u),y0e.remove(p)},0)}}},[s,c,u,p]);let h=jf.useCallback(m=>{if(!r&&!n||p.paused)return;let g=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,v=document.activeElement;if(g&&v){let y=m.currentTarget,[x,C]=Yft(y);x&&C?!m.shiftKey&&v===C?(m.preventDefault(),r&&Jx(x,{select:!0})):m.shiftKey&&v===x&&(m.preventDefault(),r&&Jx(C,{select:!0})):v===y&&m.preventDefault()}},[r,n,p.paused]);return(0,b0e.jsx)(ot.div,{tabIndex:-1,...i,ref:f,onKeyDown:h})});kv.displayName=Kft;function Xft(e,{select:t=!1}={}){let r=document.activeElement;for(let n of e)if(Jx(n,{select:t}),document.activeElement!==r)return}function Yft(e){let t=w0e(e),r=v0e(t,e),n=v0e(t.reverse(),e);return[r,n]}function w0e(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{let o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function v0e(e,t){for(let r of e)if(!Qft(r,{upTo:t}))return r}function Qft(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Zft(e){return e instanceof HTMLInputElement&&"select"in e}function Jx(e,{select:t=!1}={}){if(e&&e.focus){let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Zft(e)&&t&&e.select()}}var y0e=Jft();function Jft(){let e=[];return{add(t){let r=e[0];t!==r&&r?.pause(),e=x0e(e,t),e.unshift(t)},remove(t){e=x0e(e,t),e[0]?.resume()}}}function x0e(e,t){let r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function ept(e){return e.filter(t=>t.tagName!=="A")}var S3=L(ce(),1),C0e=L(fh(),1);var S0e=L(fe(),1),tpt="Portal",Od=S3.forwardRef((e,t)=>{let{container:r,...n}=e,[o,a]=S3.useState(!1);Un(()=>a(!0),[]);let i=r||o&&globalThis?.document?.body;return i?C0e.default.createPortal((0,S0e.jsx)(ot.div,{...n,ref:t}),i):null});Od.displayName=tpt;var I0e=L(ce(),1),tX=0;function eb(){I0e.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??P0e()),document.body.insertAdjacentElement("beforeend",e[1]??P0e()),tX++,()=>{tX===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),tX--}},[])}function P0e(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Ou=function(){return Ou=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Ou.apply(this,arguments)};function P3(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function R0e(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}var M3=L(ce());var rc=L(ce());var Yw="right-scroll-bar-position",Qw="width-before-scroll-bar",rX="with-scroll-bars-hidden",nX="--removed-body-scroll-bar-size";function I3(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}var k0e=L(ce());function N0e(e,t){var r=(0,k0e.useState)(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var R3=L(ce());var rpt=typeof window<"u"?R3.useLayoutEffect:R3.useEffect,M0e=new WeakMap;function oX(e,t){var r=N0e(t||null,function(n){return e.forEach(function(o){return I3(o,n)})});return rpt(function(){var n=M0e.get(r);if(n){var o=new Set(n),a=new Set(e),i=r.current;o.forEach(function(s){a.has(s)||I3(s,null)}),a.forEach(function(s){o.has(s)||I3(s,i)})}M0e.set(r,e)},[e]),r}function npt(e){return e}function opt(e,t){t===void 0&&(t=npt);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var i=t(a,n);return r.push(i),function(){r=r.filter(function(s){return s!==i})}},assignSyncMedium:function(a){for(n=!0;r.length;){var i=r;r=[],i.forEach(a)}r={push:function(s){return a(s)},filter:function(){return r}}},assignMedium:function(a){n=!0;var i=[];if(r.length){var s=r;r=[],s.forEach(a),i=r}var l=function(){var u=i;i=[],u.forEach(a)},c=function(){return Promise.resolve().then(l)};c(),r={push:function(u){i.push(u),c()},filter:function(u){return i=i.filter(u),r}}}};return o}function aX(e){e===void 0&&(e={});var t=opt(null);return t.options=Ou({async:!0,ssr:!1},e),t}var T0e=L(ce()),A0e=function(e){var t=e.sideCar,r=P3(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return T0e.createElement(n,Ou({},r))};A0e.isSideCarExport=!0;function iX(e,t){return e.useMedium(t),A0e}var k3=aX();var sX=function(){},SL=rc.forwardRef(function(e,t){var r=rc.useRef(null),n=rc.useState({onScrollCapture:sX,onWheelCapture:sX,onTouchMoveCapture:sX}),o=n[0],a=n[1],i=e.forwardProps,s=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,h=e.noIsolation,m=e.inert,g=e.allowPinchZoom,v=e.as,y=v===void 0?"div":v,x=e.gapMode,C=P3(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),b=f,w=oX([r,t]),S=Ou(Ou({},C),o);return rc.createElement(rc.Fragment,null,u&&rc.createElement(b,{sideCar:k3,removeScrollBar:c,shards:d,noRelative:p,noIsolation:h,inert:m,setCallbacks:a,allowPinchZoom:!!g,lockRef:r,gapMode:x}),i?rc.cloneElement(rc.Children.only(s),Ou(Ou({},S),{ref:w})):rc.createElement(y,Ou({},S,{className:l,ref:w}),s))});SL.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};SL.classNames={fullWidth:Qw,zeroRight:Yw};var Sa=L(ce());var yI=L(ce());var D0e=L(ce());var L0e;var E0e=function(){if(L0e)return L0e;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function apt(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=E0e();return t&&e.setAttribute("nonce",t),e}function ipt(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function spt(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var lX=function(){var e=0,t=null;return{add:function(r){e==0&&(t=apt())&&(ipt(t,r),spt(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}};var cX=function(){var e=lX();return function(t,r){D0e.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}};var PL=function(){var e=cX(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t};var lpt={left:0,top:0,right:0,gap:0},uX=function(e){return parseInt(e||"",10)||0},cpt=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[uX(r),uX(n),uX(o)]},dX=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return lpt;var t=cpt(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}};var upt=PL(),vI="data-scroll-locked",dpt=function(e,t,r,n){var o=e.left,a=e.top,i=e.right,s=e.gap;return r===void 0&&(r="margin"),`
|
|
69
|
+
`),()=>{document.head.removeChild(u)}},[t]),(0,pve.jsx)(qK,{isPresent:t,childRef:n,sizeRef:o,children:L4.cloneElement(e,{ref:n})})}var gve=({children:e,initial:t,isPresent:r,onExitComplete:n,custom:o,presenceAffectsLayout:a,mode:i})=>{let s=nl(qct),l=(0,_w.useId)(),c=(0,_w.useCallback)(d=>{s.set(d,!0);for(let f of s.values())if(!f)return;n&&n()},[s,n]),u=(0,_w.useMemo)(()=>({id:l,initial:t,isPresent:r,custom:o,onExitComplete:c,register:d=>(s.set(d,!1),()=>s.delete(d))}),a?[Math.random(),c]:[r,c]);return(0,_w.useMemo)(()=>{s.forEach((d,f)=>s.set(f,!1))},[r]),hve.useEffect(()=>{!r&&!s.size&&n&&n()},[r]),i==="popLayout"&&(e=(0,$K.jsx)(mve,{isPresent:r,children:e})),(0,$K.jsx)(Ex.Provider,{value:u,children:e})};function qct(){return new Map}var Dx=L(ce(),1);function E4(e=!0){let t=(0,Dx.useContext)(Ex);if(t===null)return[!0,null];let{isPresent:r,onExitComplete:n,register:o}=t,a=(0,Dx.useId)();(0,Dx.useEffect)(()=>{e&&o(a)},[e]);let i=(0,Dx.useCallback)(()=>e&&n&&n(a),[a,n,e]);return!r&&n?[!1,i]:[!0]}var D4=L(ce(),1),ZA=e=>e.key||"";function WK(e){let t=[];return D4.Children.forEach(e,r=>{(0,D4.isValidElement)(r)&&t.push(r)}),t}var O4=L(ce(),1);var IP=typeof window<"u";var xh=IP?O4.useLayoutEffect:O4.useEffect;var Dt=({children:e,custom:t,initial:r=!0,onExitComplete:n,presenceAffectsLayout:o=!0,mode:a="sync",propagate:i=!1})=>{let[s,l]=E4(i),c=(0,bh.useMemo)(()=>WK(e),[e]),u=i&&!s?[]:c.map(ZA),d=(0,bh.useRef)(!0),f=(0,bh.useRef)(c),p=nl(()=>new Map),[h,m]=(0,bh.useState)(c),[g,v]=(0,bh.useState)(c);xh(()=>{d.current=!1,f.current=c;for(let C=0;C<g.length;C++){let b=ZA(g[C]);u.includes(b)?p.delete(b):p.get(b)!==!0&&p.set(b,!1)}},[g,u.length,u.join("-")]);let y=[];if(c!==h){let C=[...c];for(let b=0;b<g.length;b++){let w=g[b],S=ZA(w);u.includes(S)||(C.splice(b,0,w),y.push(w))}a==="wait"&&y.length&&(C=y),v(WK(C)),m(c);return}let{forceRender:x}=(0,bh.useContext)(PP);return(0,JA.jsx)(JA.Fragment,{children:g.map(C=>{let b=ZA(C),w=i&&!s?!1:c===g||u.includes(b),S=()=>{if(p.has(b))p.set(b,!0);else return;let P=!0;p.forEach(N=>{N||(P=!1)}),P&&(x?.(),v(f.current),i&&l?.(),n&&n())};return(0,JA.jsx)(gve,{isPresent:w,initial:!d.current||r?void 0:!1,custom:w?void 0:t,presenceAffectsLayout:o,mode:a,onExitComplete:w?void 0:S,children:C},b)})})};var To=e=>e;var vv=To,Ni=To;function Fw(e){let t;return()=>(t===void 0&&(t=e()),t)}var Fc=(e,t,r)=>{let n=t-e;return n===0?1:(r-e)/n};var ci=e=>e*1e3,ol=e=>e/1e3;var RP={skipAnimations:!1,useManualTiming:!1};function vve(e){let t=new Set,r=new Set,n=!1,o=!1,a=new WeakSet,i={delta:0,timestamp:0,isProcessing:!1};function s(c){a.has(c)&&(l.schedule(c),e()),c(i)}let l={schedule:(c,u=!1,d=!1)=>{let p=d&&n?t:r;return u&&a.add(c),p.has(c)||p.add(c),c},cancel:c=>{r.delete(c),a.delete(c)},process:c=>{if(i=c,n){o=!0;return}n=!0,[t,r]=[r,t],t.forEach(s),t.clear(),n=!1,o&&(o=!1,l.process(c))}};return l}var _4=["read","resolveKeyframes","update","preRender","render","postRender"],$ct=40;function F4(e,t){let r=!1,n=!0,o={delta:0,timestamp:0,isProcessing:!1},a=()=>r=!0,i=_4.reduce((v,y)=>(v[y]=vve(a),v),{}),{read:s,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:f}=i,p=()=>{let v=RP.useManualTiming?o.timestamp:performance.now();r=!1,o.delta=n?1e3/60:Math.max(Math.min(v-o.timestamp,$ct),1),o.timestamp=v,o.isProcessing=!0,s.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),o.isProcessing=!1,r&&t&&(n=!1,e(p))},h=()=>{r=!0,n=!0,o.isProcessing||e(p)};return{schedule:_4.reduce((v,y)=>{let x=i[y];return v[y]=(C,b=!1,w=!1)=>(r||h(),x.schedule(C,b,w)),v},{}),cancel:v=>{for(let y=0;y<_4.length;y++)i[_4[y]].cancel(v)},state:o,steps:i}}var{schedule:Br,cancel:Bc,state:ui,steps:B4}=F4(typeof requestAnimationFrame<"u"?requestAnimationFrame:To,!0);var yve=L(ce(),1),V4=(0,yve.createContext)({strict:!1});var xve={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"]},yv={};for(let e in xve)yv[e]={isEnabled:t=>xve[e].some(r=>!!t[r])};function bve(e){for(let t in e)yv[t]={...yv[t],...e[t]}}var Wct=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 eL(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Wct.has(e)}var wve=e=>!eL(e);function Gct(e){e&&(wve=t=>t.startsWith("on")?!eL(t):e(t))}try{Gct(Lde("@emotion/is-prop-valid").default)}catch{}function Cve(e,t,r){let n={};for(let o in e)o==="values"&&typeof e.values=="object"||(wve(o)||r===!0&&eL(o)||!t&&!eL(o)||e.draggable&&o.startsWith("onDrag"))&&(n[o]=e[o]);return n}function Sve(e){if(typeof Proxy>"u")return e;let t=new Map,r=(...n)=>e(...n);return new Proxy(r,{get:(n,o)=>o==="create"?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}var $4=L(fe(),1);var MP=L(ce(),1);var Pve=L(ce(),1),Ox=(0,Pve.createContext)({});var H4=L(ce(),1);function xv(e){return typeof e=="string"||Array.isArray(e)}function _x(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}var z4=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],tL=["initial",...z4];function Bw(e){return _x(e.animate)||tL.some(t=>xv(e[t]))}function U4(e){return!!(Bw(e)||e.variants)}function Ive(e,t){if(Bw(e)){let{initial:r,animate:n}=e;return{initial:r===!1||xv(r)?r:void 0,animate:xv(n)?n:void 0}}return e.inherit!==!1?t:{}}function kve(e){let{initial:t,animate:r}=Ive(e,(0,H4.useContext)(Ox));return(0,H4.useMemo)(()=>({initial:t,animate:r}),[Rve(t),Rve(r)])}function Rve(e){return Array.isArray(e)?e.join(" "):e}var Nve=Symbol.for("motionComponentSymbol");var Mve=L(ce(),1);function bv(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Tve(e,t,r){return(0,Mve.useCallback)(n=>{n&&e.onMount&&e.onMount(n),t&&(n?t.mount(n):t.unmount()),r&&(typeof r=="function"?r(n):bv(r)&&(r.current=n))},[t])}var Au=L(ce(),1);var kP=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase();var Kct="framerAppearId",j4="data-"+kP(Kct);var{schedule:NP,cancel:ESr}=F4(queueMicrotask,!1);var Ave=L(ce(),1),q4=(0,Ave.createContext)({});function Lve(e,t,r,n,o){var a,i;let{visualElement:s}=(0,Au.useContext)(Ox),l=(0,Au.useContext)(V4),c=(0,Au.useContext)(Ex),u=(0,Au.useContext)(yh).reducedMotion,d=(0,Au.useRef)(null);n=n||l.renderer,!d.current&&n&&(d.current=n(e,{visualState:t,parent:s,props:r,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u}));let f=d.current,p=(0,Au.useContext)(q4);f&&!f.projection&&o&&(f.type==="html"||f.type==="svg")&&Xct(d.current,r,o,p);let h=(0,Au.useRef)(!1);(0,Au.useInsertionEffect)(()=>{f&&h.current&&f.update(r,c)});let m=r[j4],g=(0,Au.useRef)(!!m&&!(!((a=window.MotionHandoffIsComplete)===null||a===void 0)&&a.call(window,m))&&((i=window.MotionHasOptimisedAnimation)===null||i===void 0?void 0:i.call(window,m)));return xh(()=>{f&&(h.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),NP.render(f.render),g.current&&f.animationState&&f.animationState.animateChanges())}),(0,Au.useEffect)(()=>{f&&(!g.current&&f.animationState&&f.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{var v;(v=window.MotionHandoffMarkAsComplete)===null||v===void 0||v.call(window,m)}),g.current=!1))}),f}function Xct(e,t,r,n){let{layoutId:o,layout:a,drag:i,dragConstraints:s,layoutScroll:l,layoutRoot:c}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:Eve(e.parent)),e.projection.setOptions({layoutId:o,layout:a,alwaysMeasureLayout:!!i||s&&bv(s),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:n,layoutScroll:l,layoutRoot:c})}function Eve(e){if(e)return e.options.allowProjection!==!1?e.projection:Eve(e.parent)}function Dve({preloadedFeatures:e,createVisualElement:t,useRender:r,useVisualState:n,Component:o}){var a,i;e&&bve(e);function s(c,u){let d,f={...(0,MP.useContext)(yh),...c,layoutId:Yct(c)},{isStatic:p}=f,h=kve(c),m=n(c,p);if(!p&&IP){Qct(f,e);let g=Zct(f);d=g.MeasureLayout,h.visualElement=Lve(o,m,f,t,g.ProjectionNode)}return(0,$4.jsxs)(Ox.Provider,{value:h,children:[d&&h.visualElement?(0,$4.jsx)(d,{visualElement:h.visualElement,...f}):null,r(o,c,Tve(m,h.visualElement,u),m,p,h.visualElement)]})}s.displayName=`motion.${typeof o=="string"?o:`create(${(i=(a=o.displayName)!==null&&a!==void 0?a:o.name)!==null&&i!==void 0?i:""})`}`;let l=(0,MP.forwardRef)(s);return l[Nve]=o,l}function Yct({layoutId:e}){let t=(0,MP.useContext)(PP).id;return t&&e!==void 0?t+"-"+e:e}function Qct(e,t){let r=(0,MP.useContext)(V4).strict}function Zct(e){let{drag:t,layout:r}=yv;if(!t&&!r)return{};let n={...t,...r};return{MeasureLayout:t?.isEnabled(e)||r?.isEnabled(e)?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}var Ove=["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 TP(e){return typeof e!="string"||e.includes("-")?!1:!!(Ove.indexOf(e)>-1||/[A-Z]/u.test(e))}var GK=L(ce(),1);function _ve(e){let t=[{},{}];return e?.values.forEach((r,n)=>{t[0][n]=r.get(),t[1][n]=r.getVelocity()}),t}function AP(e,t,r,n){if(typeof t=="function"){let[o,a]=_ve(n);t=t(r!==void 0?r:e.custom,o,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){let[o,a]=_ve(n);t=t(r!==void 0?r:e.custom,o,a)}return t}var rL=e=>Array.isArray(e);var Fve=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),Bve=e=>rL(e)?e[e.length-1]||0:e;var Ln=e=>!!(e&&e.getVelocity);function LP(e){let t=Ln(e)?e.get():e;return Fve(t)?t.toValue():t}function Jct({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:r},n,o,a){let i={latestValues:eut(n,o,a,e),renderState:t()};return r&&(i.onMount=s=>r({props:n,current:s,...i}),i.onUpdate=s=>r(s)),i}var W4=e=>(t,r)=>{let n=(0,GK.useContext)(Ox),o=(0,GK.useContext)(Ex),a=()=>Jct(e,t,n,o);return r?a():nl(a)};function eut(e,t,r,n){let o={},a=n(e,{});for(let f in a)o[f]=LP(a[f]);let{initial:i,animate:s}=e,l=Bw(e),c=U4(e);t&&c&&!l&&e.inherit!==!1&&(i===void 0&&(i=t.initial),s===void 0&&(s=t.animate));let u=r?r.initial===!1:!1;u=u||i===!1;let d=u?s:i;if(d&&typeof d!="boolean"&&!_x(d)){let f=Array.isArray(d)?d:[d];for(let p=0;p<f.length;p++){let h=AP(e,f[p]);if(h){let{transitionEnd:m,transition:g,...v}=h;for(let y in v){let x=v[y];if(Array.isArray(x)){let C=u?x.length-1:0;x=x[C]}x!==null&&(o[y]=x)}for(let y in m)o[y]=m[y]}}}return o}var wh=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Lu=new Set(wh);var Vve=e=>t=>typeof t=="string"&&t.startsWith(e),G4=Vve("--"),tut=Vve("var(--"),EP=e=>tut(e)?rut.test(e.split("/*")[0].trim()):!1,rut=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;var K4=(e,t)=>t&&typeof e=="number"?t.transform(e):e;var kl=(e,t,r)=>r>t?t:r<e?e:r;var Ch={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},wv={...Ch,transform:e=>kl(0,1,e)},nL={...Ch,default:1};var oL=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Sh=oL("deg"),Vc=oL("%"),er=oL("px"),zve=oL("vh"),Uve=oL("vw"),KK={...Vc,parse:e=>Vc.parse(e)/100,transform:e=>Vc.transform(e*100)};var Hve={borderWidth:er,borderTopWidth:er,borderRightWidth:er,borderBottomWidth:er,borderLeftWidth:er,borderRadius:er,radius:er,borderTopLeftRadius:er,borderTopRightRadius:er,borderBottomRightRadius:er,borderBottomLeftRadius:er,width:er,maxWidth:er,height:er,maxHeight:er,top:er,right:er,bottom:er,left:er,padding:er,paddingTop:er,paddingRight:er,paddingBottom:er,paddingLeft:er,margin:er,marginTop:er,marginRight:er,marginBottom:er,marginLeft:er,backgroundPositionX:er,backgroundPositionY:er};var jve={rotate:Sh,rotateX:Sh,rotateY:Sh,rotateZ:Sh,scale:nL,scaleX:nL,scaleY:nL,scaleZ:nL,skew:Sh,skewX:Sh,skewY:Sh,distance:er,translateX:er,translateY:er,translateZ:er,x:er,y:er,z:er,perspective:er,transformPerspective:er,opacity:wv,originX:KK,originY:KK,originZ:er};var XK={...Ch,transform:Math.round};var DP={...Hve,...jve,zIndex:XK,size:er,fillOpacity:wv,strokeOpacity:wv,numOctaves:XK};var nut={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},out=wh.length;function qve(e,t,r){let n="",o=!0;for(let a=0;a<out;a++){let i=wh[a],s=e[i];if(s===void 0)continue;let l=!0;if(typeof s=="number"?l=s===(i.startsWith("scale")?1:0):l=parseFloat(s)===0,!l||r){let c=K4(s,DP[i]);if(!l){o=!1;let u=nut[i]||i;n+=`${u}(${c}) `}r&&(t[i]=c)}}return n=n.trim(),r?n=r(t,o?"":n):o&&(n="none"),n}function OP(e,t,r){let{style:n,vars:o,transformOrigin:a}=e,i=!1,s=!1;for(let l in t){let c=t[l];if(Lu.has(l)){i=!0;continue}else if(G4(l)){o[l]=c;continue}else{let u=K4(c,DP[l]);l.startsWith("origin")?(s=!0,a[l]=u):n[l]=u}}if(t.transform||(i||r?n.transform=qve(t,e.transform,r):n.transform&&(n.transform="none")),s){let{originX:l="50%",originY:c="50%",originZ:u=0}=a;n.transformOrigin=`${l} ${c} ${u}`}}var aut={offset:"stroke-dashoffset",array:"stroke-dasharray"},iut={offset:"strokeDashoffset",array:"strokeDasharray"};function $ve(e,t,r=1,n=0,o=!0){e.pathLength=1;let a=o?aut:iut;e[a.offset]=er.transform(-n);let i=er.transform(t),s=er.transform(r);e[a.array]=`${i} ${s}`}function Wve(e,t,r){return typeof e=="string"?e:er.transform(t+r*e)}function Gve(e,t,r){let n=Wve(t,e.x,e.width),o=Wve(r,e.y,e.height);return`${n} ${o}`}function _P(e,{attrX:t,attrY:r,attrScale:n,originX:o,originY:a,pathLength:i,pathSpacing:s=1,pathOffset:l=0,...c},u,d){if(OP(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:f,style:p,dimensions:h}=e;f.transform&&(h&&(p.transform=f.transform),delete f.transform),h&&(o!==void 0||a!==void 0||p.transform)&&(p.transformOrigin=Gve(h,o!==void 0?o:.5,a!==void 0?a:.5)),t!==void 0&&(f.x=t),r!==void 0&&(f.y=r),n!==void 0&&(f.scale=n),i!==void 0&&$ve(f,i,s,l,!1)}var FP=()=>({style:{},transform:{},transformOrigin:{},vars:{}});var X4=()=>({...FP(),attrs:{}});var BP=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Y4(e,{style:t,vars:r},n,o){Object.assign(e.style,t,o&&o.getProjectionStyles(n));for(let a in r)e.style.setProperty(a,r[a])}var Q4=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 Z4(e,t,r,n){Y4(e,t,void 0,n);for(let o in t.attrs)e.setAttribute(Q4.has(o)?o:kP(o),t.attrs[o])}var VP={};function Kve(e){Object.assign(VP,e)}function J4(e,{layout:t,layoutId:r}){return Lu.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!VP[e]||e==="opacity")}function zP(e,t,r){var n;let{style:o}=e,a={};for(let i in o)(Ln(o[i])||t.style&&Ln(t.style[i])||J4(i,e)||((n=r?.getValue(i))===null||n===void 0?void 0:n.liveStyle)!==void 0)&&(a[i]=o[i]);return a}function eV(e,t,r){let n=zP(e,t,r);for(let o in e)if(Ln(e[o])||Ln(t[o])){let a=wh.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;n[a]=e[o]}return n}function sut(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 Xve=["x","y","width","height","cx","cy","r"],Yve={useVisualState:W4({scrapeMotionValuesFromProps:eV,createRenderState:X4,onUpdate:({props:e,prevProps:t,current:r,renderState:n,latestValues:o})=>{if(!r)return;let a=!!e.drag;if(!a){for(let s in o)if(Lu.has(s)){a=!0;break}}if(!a)return;let i=!t;if(t)for(let s=0;s<Xve.length;s++){let l=Xve[s];e[l]!==t[l]&&(i=!0)}i&&Br.read(()=>{sut(r,n),Br.render(()=>{_P(n,o,BP(r.tagName),e.transformTemplate),Z4(r,n)})})}})};var Qve={useVisualState:W4({scrapeMotionValuesFromProps:zP,createRenderState:FP})};var UP=L(ce(),1);var Zve=L(ce(),1);function YK(e,t,r){for(let n in t)!Ln(t[n])&&!J4(n,r)&&(e[n]=t[n])}function lut({transformTemplate:e},t){return(0,Zve.useMemo)(()=>{let r=FP();return OP(r,t,e),Object.assign({},r.vars,r.style)},[t])}function cut(e,t){let r=e.style||{},n={};return YK(n,r,e),Object.assign(n,lut(e,t)),n}function Jve(e,t){let r={},n=cut(e,t);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.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=n,r}var eye=L(ce(),1);function tye(e,t,r,n){let o=(0,eye.useMemo)(()=>{let a=X4();return _P(a,t,BP(n),e.transformTemplate),{...a.attrs,style:{...a.style}}},[t]);if(e.style){let a={};YK(a,e.style,e),o.style={...a,...o.style}}return o}function rye(e=!1){return(r,n,o,{latestValues:a},i)=>{let l=(TP(r)?tye:Jve)(n,a,i,r),c=Cve(n,typeof r=="string",e),u=r!==UP.Fragment?{...c,...l,ref:o}:{},{children:d}=n,f=(0,UP.useMemo)(()=>Ln(d)?d.get():d,[d]);return(0,UP.createElement)(r,{...u,children:f})}}function nye(e,t){return function(n,{forwardMotionProps:o}={forwardMotionProps:!1}){let i={...TP(n)?Yve:Qve,preloadedFeatures:e,useRender:rye(o),createVisualElement:t,Component:n};return Dve(i)}}function QK(e,t){if(!Array.isArray(t))return!1;let r=t.length;if(r!==e.length)return!1;for(let n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}function Fx(e,t,r){let n=e.getProps();return AP(n,t,r!==void 0?r:n.custom,e)}var ZK=Fw(()=>window.ScrollTimeline!==void 0);var aL=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 n=0;n<this.animations.length;n++)this.animations[n][t]=r}attachTimeline(t,r){let n=this.animations.map(o=>{if(ZK()&&o.attachTimeline)return o.attachTimeline(t);if(typeof r=="function")return r(o)});return()=>{n.forEach((o,a)=>{o&&o(),this.animations[a].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 Vw=class extends aL{then(t,r){return Promise.all(this.animations).then(t).catch(r)}};function Bx(e,t){return e?e[t]||e.default||e:void 0}function zw(e){let t=0,r=50,n=e.next(t);for(;!n.done&&t<2e4;)t+=r,n=e.next(t);return t>=2e4?1/0:t}function rV(e,t=100,r){let n=r({...e,keyframes:[0,t]}),o=Math.min(zw(n),2e4);return{type:"keyframes",ease:a=>n.next(o*a).value/t,duration:ol(o)}}function Ph(e){return typeof e=="function"}function iL(e,t){e.timeline=t,e.onfinish=null}var HP=e=>Array.isArray(e)&&typeof e[0]=="number";var JK={linearEasing:void 0};function oye(e,t){let r=Fw(e);return()=>{var n;return(n=JK[t])!==null&&n!==void 0?n:r()}}var Vx=oye(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");var sL=(e,t,r=10)=>{let n="",o=Math.max(Math.round(t/r),2);for(let a=0;a<o;a++)n+=e(Fc(0,o-1,a))+", ";return`linear(${n.substring(0,n.length-2)})`};function oV(e){return!!(typeof e=="function"&&Vx()||!e||typeof e=="string"&&(e in nV||Vx())||HP(e)||Array.isArray(e)&&e.every(oV))}var jP=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`,nV={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:jP([0,.65,.55,1]),circOut:jP([.55,0,1,.45]),backIn:jP([.31,.01,.66,-.59]),backOut:jP([.33,1.53,.69,.99])};function qP(e,t){if(e)return typeof e=="function"&&Vx()?sL(e,t):HP(e)?jP(e):Array.isArray(e)?e.map(r=>qP(r,t)||nV.easeOut):nV[e]}var Ld={x:!1,y:!1};function $P(){return Ld.x||Ld.y}function lL(e,t,r){var n;if(e instanceof Element)return[e];if(typeof e=="string"){let o=document;t&&(o=t.current);let a=(n=r?.[e])!==null&&n!==void 0?n:o.querySelectorAll(e);return a?Array.from(a):[]}return Array.from(e)}function aV(e,t){let r=lL(e),n=new AbortController,o={passive:!0,...t,signal:n.signal};return[r,o,()=>n.abort()]}function aye(e){return t=>{t.pointerType==="touch"||$P()||e(t)}}function e7(e,t,r={}){let[n,o,a]=aV(e,r),i=aye(s=>{let{target:l}=s,c=t(s);if(typeof c!="function"||!l)return;let u=aye(d=>{c(d),l.removeEventListener("pointerleave",u)});l.addEventListener("pointerleave",u,o)});return n.forEach(s=>{s.addEventListener("pointerenter",i,o)}),a}var iV=(e,t)=>t?e===t?!0:iV(e,t.parentElement):!1;var Uw=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;var uut=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function iye(e){return uut.has(e.tagName)||e.tabIndex!==-1}var Hw=new WeakSet;function sye(e){return t=>{t.key==="Enter"&&e(t)}}function t7(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}var lye=(e,t)=>{let r=e.currentTarget;if(!r)return;let n=sye(()=>{if(Hw.has(r))return;t7(r,"down");let o=sye(()=>{t7(r,"up")}),a=()=>t7(r,"cancel");r.addEventListener("keyup",o,t),r.addEventListener("blur",a,t)});r.addEventListener("keydown",n,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",n),t)};function cye(e){return Uw(e)&&!$P()}function r7(e,t,r={}){let[n,o,a]=aV(e,r),i=s=>{let l=s.currentTarget;if(!cye(s)||Hw.has(l))return;Hw.add(l);let c=t(s),u=(p,h)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),!(!cye(p)||!Hw.has(l))&&(Hw.delete(l),typeof c=="function"&&c(p,{success:h}))},d=p=>{u(p,r.useGlobalTarget||iV(l,p.target))},f=p=>{u(p,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",f,o)};return n.forEach(s=>{!iye(s)&&s.getAttribute("tabindex")===null&&(s.tabIndex=0),(r.useGlobalTarget?window:s).addEventListener("pointerdown",i,o),s.addEventListener("focus",c=>lye(c,o),o)}),a}function n7(e){return e==="x"||e==="y"?Ld[e]?null:(Ld[e]=!0,()=>{Ld[e]=!1}):Ld.x||Ld.y?null:(Ld.x=Ld.y=!0,()=>{Ld.x=Ld.y=!1})}var sV=new Set(["width","height","top","left","right","bottom",...wh]);var lV;function dut(){lV=void 0}var ec={now:()=>(lV===void 0&&ec.set(ui.isProcessing||RP.useManualTiming?ui.timestamp:performance.now()),lV),set:e=>{lV=e,queueMicrotask(dut)}};function WP(e,t){e.indexOf(t)===-1&&e.push(t)}function zx(e,t){let r=e.indexOf(t);r>-1&&e.splice(r,1)}function dye([...e],t,r){let n=t<0?e.length+t:t;if(n>=0&&n<e.length){let o=r<0?e.length+r:r,[a]=e.splice(t,1);e.splice(o,0,a)}return e}var Ux=class{constructor(){this.subscriptions=[]}add(t){return WP(this.subscriptions,t),()=>zx(this.subscriptions,t)}notify(t,r,n){let o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,r,n);else for(let a=0;a<o;a++){let i=this.subscriptions[a];i&&i(t,r,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};function cV(e,t){return t?e*(1e3/t):0}var fye=30,fut=e=>!isNaN(parseFloat(e)),GP={current:void 0},o7=class{constructor(t,r={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(n,o=!0)=>{let a=ec.now();this.updatedAt!==a&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),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=ec.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=fut(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 Ux);let n=this.events[t].add(r);return t==="change"?()=>{n(),Br.read(()=>{this.events.change.getSize()||this.stop()})}:n}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,n){this.set(r),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}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 GP.current&&GP.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let t=ec.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>fye)return 0;let r=Math.min(this.updatedAt-this.prevUpdatedAt,fye);return cV(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 am(e,t){return new o7(e,t)}function put(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,am(r))}function cL(e,t){let r=Fx(e,t),{transitionEnd:n={},transition:o={},...a}=r||{};a={...a,...n};for(let i in a){let s=Bve(a[i]);put(e,i,s)}}function pye(e){return!!(Ln(e)&&e.add)}function uL(e,t){let r=e.getValue("willChange");if(pye(r))return r.add(t)}function uV(e){return e.props[j4]}var dV={current:!1};var mye=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,mut=1e-7,hut=12;function gut(e,t,r,n,o){let a,i,s=0;do i=t+(r-t)/2,a=mye(i,n,o)-e,a>0?r=i:t=i;while(Math.abs(a)>mut&&++s<hut);return i}function Hx(e,t,r,n){if(e===t&&r===n)return To;let o=a=>gut(a,0,1,e,r);return a=>a===0||a===1?a:mye(o(a),t,n)}var fV=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2;var pV=e=>t=>1-e(1-t);var a7=Hx(.33,1.53,.69,.99),dL=pV(a7),mV=fV(dL);var hV=e=>(e*=2)<1?.5*dL(e):.5*(2-Math.pow(2,-10*(e-1)));var gV=e=>1-Math.sin(Math.acos(e)),vV=pV(gV),yV=fV(gV);var xV=e=>/^0[^.\s]+$/u.test(e);function hye(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||xV(e):!0}var jx=e=>Math.round(e*1e5)/1e5;var KP=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function gye(e){return e==null}var vye=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;var XP=(e,t)=>r=>!!(typeof r=="string"&&vye.test(r)&&r.startsWith(e)||t&&!gye(r)&&Object.prototype.hasOwnProperty.call(r,t)),bV=(e,t,r)=>n=>{if(typeof n!="string")return n;let[o,a,i,s]=n.match(KP);return{[e]:parseFloat(o),[t]:parseFloat(a),[r]:parseFloat(i),alpha:s!==void 0?parseFloat(s):1}};var vut=e=>kl(0,255,e),i7={...Ch,transform:e=>Math.round(vut(e))},Ih={test:XP("rgb","red"),parse:bV("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+i7.transform(e)+", "+i7.transform(t)+", "+i7.transform(r)+", "+jx(wv.transform(n))+")"};function yut(e){let t="",r="",n="",o="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),n=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),n=e.substring(3,4),o=e.substring(4,5),t+=t,r+=r,n+=n,o+=o),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:o?parseInt(o,16)/255:1}}var fL={test:XP("#"),parse:yut,transform:Ih.transform};var qx={test:XP("hsl","hue"),parse:bV("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+Vc.transform(jx(t))+", "+Vc.transform(jx(r))+", "+jx(wv.transform(n))+")"};var ss={test:e=>Ih.test(e)||fL.test(e)||qx.test(e),parse:e=>Ih.test(e)?Ih.parse(e):qx.test(e)?qx.parse(e):fL.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ih.transform(e):qx.transform(e)};var yye=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function xut(e){var t,r;return isNaN(e)&&typeof e=="string"&&(((t=e.match(KP))===null||t===void 0?void 0:t.length)||0)+(((r=e.match(yye))===null||r===void 0?void 0:r.length)||0)>0}var bye="number",wye="color",but="var",wut="var(",xye="${}",Cut=/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 jw(e){let t=e.toString(),r=[],n={color:[],number:[],var:[]},o=[],a=0,s=t.replace(Cut,l=>(ss.test(l)?(n.color.push(a),o.push(wye),r.push(ss.parse(l))):l.startsWith(wut)?(n.var.push(a),o.push(but),r.push(l)):(n.number.push(a),o.push(bye),r.push(parseFloat(l))),++a,xye)).split(xye);return{values:r,split:s,indexes:n,types:o}}function Cye(e){return jw(e).values}function Sye(e){let{split:t,types:r}=jw(e),n=t.length;return o=>{let a="";for(let i=0;i<n;i++)if(a+=t[i],o[i]!==void 0){let s=r[i];s===bye?a+=jx(o[i]):s===wye?a+=ss.transform(o[i]):a+=o[i]}return a}}var Sut=e=>typeof e=="number"?0:e;function Put(e){let t=Cye(e);return Sye(e)(t.map(Sut))}var zc={test:xut,parse:Cye,createTransformer:Sye,getAnimatableNone:Put};var Iut=new Set(["brightness","contrast","saturate","opacity"]);function Rut(e){let[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;let[n]=r.match(KP)||[];if(!n)return e;let o=r.replace(n,""),a=Iut.has(t)?1:0;return n!==r&&(a*=100),t+"("+a+o+")"}var kut=/\b([a-z-]*)\(.*?\)/gu,pL={...zc,getAnimatableNone:e=>{let t=e.match(kut);return t?t.map(Rut).join(" "):e}};var Nut={...DP,color:ss,backgroundColor:ss,outlineColor:ss,fill:ss,stroke:ss,borderColor:ss,borderTopColor:ss,borderRightColor:ss,borderBottomColor:ss,borderLeftColor:ss,filter:pL,WebkitFilter:pL},YP=e=>Nut[e];function wV(e,t){let r=YP(e);return r!==pL&&(r=zc),r.getAnimatableNone?r.getAnimatableNone(t):void 0}var Mut=new Set(["auto","none","0"]);function Pye(e,t,r){let n=0,o;for(;n<e.length&&!o;){let a=e[n];typeof a=="string"&&!Mut.has(a)&&jw(a).values.length&&(o=e[n]),n++}if(o&&r)for(let a of t)e[a]=wV(r,o)}var s7=e=>e===Ch||e===er,Iye=(e,t)=>parseFloat(e.split(", ")[t]),Rye=(e,t)=>(r,{transform:n})=>{if(n==="none"||!n)return 0;let o=n.match(/^matrix3d\((.+)\)$/u);if(o)return Iye(o[1],t);{let a=n.match(/^matrix\((.+)\)$/u);return a?Iye(a[1],e):0}},Tut=new Set(["x","y","z"]),Aut=wh.filter(e=>!Tut.has(e));function kye(e){let t=[];return Aut.forEach(r=>{let n=e.getValue(r);n!==void 0&&(t.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),t}var qw={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:Rye(4,13),y:Rye(5,14)};qw.translateX=qw.x;qw.translateY=qw.y;var $w=new Set,l7=!1,c7=!1;function Nye(){if(c7){let e=Array.from($w).filter(n=>n.needsMeasurement),t=new Set(e.map(n=>n.element)),r=new Map;t.forEach(n=>{let o=kye(n);o.length&&(r.set(n,o),n.render())}),e.forEach(n=>n.measureInitialState()),t.forEach(n=>{n.render();let o=r.get(n);o&&o.forEach(([a,i])=>{var s;(s=n.getValue(a))===null||s===void 0||s.set(i)})}),e.forEach(n=>n.measureEndState()),e.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}c7=!1,l7=!1,$w.forEach(e=>e.complete()),$w.clear()}function Mye(){$w.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(c7=!0)})}function Tye(){Mye(),Nye()}var $x=class{constructor(t,r,n,o,a,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=r,this.name=n,this.motionValue=o,this.element=a,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?($w.add(this),l7||(l7=!0,Br.read(Mye),Br.resolveKeyframes(Nye))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:t,name:r,element:n,motionValue:o}=this;for(let a=0;a<t.length;a++)if(t[a]===null)if(a===0){let i=o?.get(),s=t[t.length-1];if(i!==void 0)t[0]=i;else if(n&&r){let l=n.readValue(r,s);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=s),o&&i===void 0&&o.set(t[0])}else t[a]=t[a-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),$w.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,$w.delete(this))}resume(){this.isComplete||this.scheduleResolve()}};var CV=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);var Lut=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Eut(e){let t=Lut.exec(e);if(!t)return[,];let[,r,n,o]=t;return[`--${r??n}`,o]}var Dut=4;function u7(e,t,r=1){Ni(r<=Dut,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);let[n,o]=Eut(e);if(!n)return;let a=window.getComputedStyle(t).getPropertyValue(n);if(a){let i=a.trim();return CV(i)?parseFloat(i):i}return EP(o)?u7(o,t,r+1):o}var SV=e=>t=>t.test(e);var Aye={test:e=>e==="auto",parse:e=>e};var d7=[Ch,er,Vc,Sh,Uve,zve,Aye],f7=e=>d7.find(SV(e));var QP=class extends $x{constructor(t,r,n,o,a){super(t,r,n,o,a,!0)}readKeyframes(){let{unresolvedKeyframes:t,element:r,name:n}=this;if(!r||!r.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),EP(c))){let u=u7(c,r.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!sV.has(n)||t.length!==2)return;let[o,a]=t,i=f7(o),s=f7(a);if(i!==s)if(s7(i)&&s7(s))for(let l=0;l<t.length;l++){let c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){let{unresolvedKeyframes:t,name:r}=this,n=[];for(let o=0;o<t.length;o++)hye(t[o])&&n.push(o);n.length&&Pye(t,n,r)}measureInitialState(){let{element:t,unresolvedKeyframes:r,name:n}=this;if(!t||!t.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=qw[n](t.measureViewportBox(),window.getComputedStyle(t.current)),r[0]=this.measuredOrigin;let o=r[r.length-1];o!==void 0&&t.getValue(n,o).jump(o,!1)}measureEndState(){var t;let{element:r,name:n,unresolvedKeyframes:o}=this;if(!r||!r.current)return;let a=r.getValue(n);a&&a.jump(this.measuredOrigin,!1);let i=o.length-1,s=o[i];o[i]=qw[n](r.measureViewportBox(),window.getComputedStyle(r.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{r.getValue(l).set(c)}),this.resolveNoneKeyframes()}};var p7=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(zc.test(e)||e==="0")&&!e.startsWith("url("));function Out(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 Lye(e,t,r,n){let o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;let a=e[e.length-1],i=p7(o,t),s=p7(a,t);return vv(i===s,`You are trying to animate ${t} from "${o}" to "${a}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${a} via the \`style\` property.`),!i||!s?!1:Out(e)||(r==="spring"||Ph(r))&&n}var _ut=e=>e!==null;function Wx(e,{repeat:t,repeatType:r="loop"},n){let o=e.filter(_ut),a=t&&r!=="loop"&&t%2===1?0:o.length-1;return!a||n===void 0?o[a]:n}var Fut=40,ZP=class{constructor({autoplay:t=!0,delay:r=0,type:n="keyframes",repeat:o=0,repeatDelay:a=0,repeatType:i="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=ec.now(),this.options={autoplay:t,delay:r,type:n,repeat:o,repeatDelay:a,repeatType:i,...s},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>Fut?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&Tye(),this._resolved}onKeyframesResolved(t,r){this.resolvedAt=ec.now(),this.hasAttemptedResolve=!0;let{name:n,type:o,velocity:a,delay:i,onComplete:s,onUpdate:l,isGenerator:c}=this.options;if(!c&&!Lye(t,n,o,a))if(dV.current||!i){l&&l(Wx(t,this.options,r)),s&&s(),this.resolveFinishedPromise();return}else this.options.duration=0;let u=this.initPlayback(t,r);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:r,...u},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 dn=(e,t,r)=>e+(t-e)*r;function m7(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 Eye({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,t/=100,r/=100;let o=0,a=0,i=0;if(!t)o=a=i=r;else{let s=r<.5?r*(1+t):r+t-r*t,l=2*r-s;o=m7(l,s,e+1/3),a=m7(l,s,e),i=m7(l,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(a*255),blue:Math.round(i*255),alpha:n}}function JP(e,t){return r=>r>0?t:e}var h7=(e,t,r)=>{let n=e*e,o=r*(t*t-n)+n;return o<0?0:Math.sqrt(o)},But=[fL,Ih,qx],Vut=e=>But.find(t=>t.test(e));function Dye(e){let t=Vut(e);if(vv(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let r=t.parse(e);return t===qx&&(r=Eye(r)),r}var g7=(e,t)=>{let r=Dye(e),n=Dye(t);if(!r||!n)return JP(e,t);let o={...r};return a=>(o.red=h7(r.red,n.red,a),o.green=h7(r.green,n.green,a),o.blue=h7(r.blue,n.blue,a),o.alpha=dn(r.alpha,n.alpha,a),Ih.transform(o))};var zut=(e,t)=>r=>t(e(r)),Rh=(...e)=>e.reduce(zut);var PV=new Set(["none","hidden"]);function Oye(e,t){return PV.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function Uut(e,t){return r=>dn(e,t,r)}function IV(e){return typeof e=="number"?Uut:typeof e=="string"?EP(e)?JP:ss.test(e)?g7:qut:Array.isArray(e)?_ye:typeof e=="object"?ss.test(e)?g7:Hut:JP}function _ye(e,t){let r=[...e],n=r.length,o=e.map((a,i)=>IV(a)(a,t[i]));return a=>{for(let i=0;i<n;i++)r[i]=o[i](a);return r}}function Hut(e,t){let r={...e,...t},n={};for(let o in r)e[o]!==void 0&&t[o]!==void 0&&(n[o]=IV(e[o])(e[o],t[o]));return o=>{for(let a in n)r[a]=n[a](o);return r}}function jut(e,t){var r;let n=[],o={color:0,var:0,number:0};for(let a=0;a<t.values.length;a++){let i=t.types[a],s=e.indexes[i][o[i]],l=(r=e.values[s])!==null&&r!==void 0?r:0;n[a]=l,o[i]++}return n}var qut=(e,t)=>{let r=zc.createTransformer(t),n=jw(e),o=jw(t);return n.indexes.var.length===o.indexes.var.length&&n.indexes.color.length===o.indexes.color.length&&n.indexes.number.length>=o.indexes.number.length?PV.has(e)&&!o.values.length||PV.has(t)&&!n.values.length?Oye(e,t):Rh(_ye(jut(n,o),o.values),r):(vv(!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.`),JP(e,t))};function RV(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?dn(e,t,r):IV(e)(e,t)}var $ut=5;function kV(e,t,r){let n=Math.max(t-$ut,0);return cV(r-e(n),t-n)}var wa={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 v7=.001;function Fye({duration:e=wa.duration,bounce:t=wa.bounce,velocity:r=wa.velocity,mass:n=wa.mass}){let o,a;vv(e<=ci(wa.maxDuration),"Spring duration must be 10 seconds or less");let i=1-t;i=kl(wa.minDamping,wa.maxDamping,i),e=kl(wa.minDuration,wa.maxDuration,ol(e)),i<1?(o=c=>{let u=c*i,d=u*e,f=u-r,p=NV(c,i),h=Math.exp(-d);return v7-f/p*h},a=c=>{let d=c*i*e,f=d*r+r,p=Math.pow(i,2)*Math.pow(c,2)*e,h=Math.exp(-d),m=NV(Math.pow(c,2),i);return(-o(c)+v7>0?-1:1)*((f-p)*h)/m}):(o=c=>{let u=Math.exp(-c*e),d=(c-r)*e+1;return-v7+u*d},a=c=>{let u=Math.exp(-c*e),d=(r-c)*(e*e);return u*d});let s=5/e,l=Gut(o,a,s);if(e=ci(e),isNaN(l))return{stiffness:wa.stiffness,damping:wa.damping,duration:e};{let c=Math.pow(l,2)*n;return{stiffness:c,damping:i*2*Math.sqrt(n*c),duration:e}}}var Wut=12;function Gut(e,t,r){let n=r;for(let o=1;o<Wut;o++)n=n-e(n)/t(n);return n}function NV(e,t){return e*Math.sqrt(1-t*t)}var Kut=["duration","bounce"],Xut=["stiffness","damping","mass"];function Bye(e,t){return t.some(r=>e[r]!==void 0)}function Yut(e){let t={velocity:wa.velocity,stiffness:wa.stiffness,damping:wa.damping,mass:wa.mass,isResolvedFromDuration:!1,...e};if(!Bye(e,Xut)&&Bye(e,Kut))if(e.visualDuration){let r=e.visualDuration,n=2*Math.PI/(r*1.2),o=n*n,a=2*kl(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:wa.mass,stiffness:o,damping:a}}else{let r=Fye(e);t={...t,...r,mass:wa.mass},t.isResolvedFromDuration=!0}return t}function eI(e=wa.visualDuration,t=wa.bounce){let r=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e,{restSpeed:n,restDelta:o}=r,a=r.keyframes[0],i=r.keyframes[r.keyframes.length-1],s={done:!1,value:a},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=Yut({...r,velocity:-ol(r.velocity||0)}),h=f||0,m=c/(2*Math.sqrt(l*u)),g=i-a,v=ol(Math.sqrt(l/u)),y=Math.abs(g)<5;n||(n=y?wa.restSpeed.granular:wa.restSpeed.default),o||(o=y?wa.restDelta.granular:wa.restDelta.default);let x;if(m<1){let b=NV(v,m);x=w=>{let S=Math.exp(-m*v*w);return i-S*((h+m*v*g)/b*Math.sin(b*w)+g*Math.cos(b*w))}}else if(m===1)x=b=>i-Math.exp(-v*b)*(g+(h+v*g)*b);else{let b=v*Math.sqrt(m*m-1);x=w=>{let S=Math.exp(-m*v*w),P=Math.min(b*w,300);return i-S*((h+m*v*g)*Math.sinh(P)+b*g*Math.cosh(P))/b}}let C={calculatedDuration:p&&d||null,next:b=>{let w=x(b);if(p)s.done=b>=d;else{let S=0;m<1&&(S=b===0?ci(h):kV(x,b,w));let P=Math.abs(S)<=n,N=Math.abs(i-w)<=o;s.done=P&&N}return s.value=s.done?i:w,s},toString:()=>{let b=Math.min(zw(C),2e4),w=sL(S=>C.next(b*S).value,b,30);return b+"ms "+w}};return C}function y7({keyframes:e,velocity:t=0,power:r=.8,timeConstant:n=325,bounceDamping:o=10,bounceStiffness:a=500,modifyTarget:i,min:s,max:l,restDelta:c=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=P=>s!==void 0&&P<s||l!==void 0&&P>l,h=P=>s===void 0?l:l===void 0||Math.abs(s-P)<Math.abs(l-P)?s:l,m=r*t,g=d+m,v=i===void 0?g:i(g);v!==g&&(m=v-d);let y=P=>-m*Math.exp(-P/n),x=P=>v+y(P),C=P=>{let N=y(P),D=x(P);f.done=Math.abs(N)<=c,f.value=f.done?v:D},b,w,S=P=>{p(f.value)&&(b=P,w=eI({keyframes:[f.value,h(f.value)],velocity:kV(x,P,f.value),damping:o,stiffness:a,restDelta:c,restSpeed:u}))};return S(0),{calculatedDuration:null,next:P=>{let N=!1;return!w&&b===void 0&&(N=!0,C(P),S(P)),b!==void 0&&P>=b?w.next(P-b):(!N&&C(P),f)}}}var Vye=Hx(.42,0,1,1),zye=Hx(0,0,.58,1),MV=Hx(.42,0,.58,1);var TV=e=>Array.isArray(e)&&typeof e[0]!="number";var Uye={linear:To,easeIn:Vye,easeInOut:MV,easeOut:zye,circIn:gV,circInOut:yV,circOut:vV,backIn:dL,backInOut:mV,backOut:a7,anticipate:hV},x7=e=>{if(HP(e)){Ni(e.length===4,"Cubic bezier arrays must contain four numerical values.");let[t,r,n,o]=e;return Hx(t,r,n,o)}else if(typeof e=="string")return Ni(Uye[e]!==void 0,`Invalid easing type '${e}'`),Uye[e];return e};function Qut(e,t,r){let n=[],o=r||RV,a=e.length-1;for(let i=0;i<a;i++){let s=o(e[i],e[i+1]);if(t){let l=Array.isArray(t)?t[i]||To:t;s=Rh(l,s)}n.push(s)}return n}function AV(e,t,{clamp:r=!0,ease:n,mixer:o}={}){let a=e.length;if(Ni(a===t.length,"Both input and output ranges must be the same length"),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let i=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=Qut(t,n,o),l=s.length,c=u=>{if(i&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);let f=Fc(e[d],e[d+1],u);return s[d](f)};return r?u=>c(kl(e[0],e[a-1],u)):c}function LV(e,t){let r=e[e.length-1];for(let n=1;n<=t;n++){let o=Fc(0,t,n);e.push(dn(r,1,o))}}function EV(e){let t=[0];return LV(t,e.length-1),t}function Hye(e,t){return e.map(r=>r*t)}function Zut(e,t){return e.map(()=>t||MV).splice(0,e.length-1)}function mL({duration:e=300,keyframes:t,times:r,ease:n="easeInOut"}){let o=TV(n)?n.map(x7):x7(n),a={done:!1,value:t[0]},i=Hye(r&&r.length===t.length?r:EV(t),e),s=AV(i,t,{ease:Array.isArray(o)?o:Zut(t,o)});return{calculatedDuration:e,next:l=>(a.value=s(l),a.done=l>=e,a)}}var jye=e=>{let t=({timestamp:r})=>e(r);return{start:()=>Br.update(t,!0),stop:()=>Bc(t),now:()=>ui.isProcessing?ui.timestamp:ec.now()}};var Jut={decay:y7,inertia:y7,tween:mL,keyframes:mL,spring:eI},edt=e=>e/100,Gx=class extends ZP{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:n,element:o,keyframes:a}=this.options,i=o?.KeyframeResolver||$x,s=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new i(a,s,r,n,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:n=0,repeatDelay:o=0,repeatType:a,velocity:i=0}=this.options,s=Ph(r)?r:Jut[r]||mL,l,c;s!==mL&&typeof t[0]!="number"&&(l=Rh(edt,RV(t[0],t[1])),t=[0,100]);let u=s({...this.options,keyframes:t});a==="mirror"&&(c=s({...this.options,keyframes:[...t].reverse(),velocity:-i})),u.calculatedDuration===null&&(u.calculatedDuration=zw(u));let{calculatedDuration:d}=u,f=d+o,p=f*(n+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:f,totalDuration:p}}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:n}=this;if(!n){let{keyframes:P}=this.options;return{done:!0,value:P[P.length-1]}}let{finalKeyframe:o,generator:a,mirroredGenerator:i,mapPercentToKeyframes:s,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=n;if(this.startTime===null)return a.next(0);let{delay:f,repeat:p,repeatType:h,repeatDelay:m,onUpdate:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/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 v=this.currentTime-f*(this.speed>=0?1:-1),y=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let x=this.currentTime,C=a;if(p){let P=Math.min(this.currentTime,u)/d,N=Math.floor(P),D=P%1;!D&&P>=1&&(D=1),D===1&&N--,N=Math.min(N,p+1),!!(N%2)&&(h==="reverse"?(D=1-D,m&&(D-=m/d)):h==="mirror"&&(C=i)),x=kl(0,1,D)*d}let b=y?{done:!1,value:l[0]}:C.next(x);s&&(b.value=s(b.value));let{done:w}=b;!y&&c!==null&&(w=this.speed>=0?this.currentTime>=u:this.currentTime<=0);let S=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&w);return S&&o!==void 0&&(b.value=Wx(l,this.options,o)),g&&g(b.value),S&&this.finish(),b}get duration(){let{resolved:t}=this;return t?ol(t.calculatedDuration):0}get time(){return ol(this.currentTime)}set time(t){t=ci(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=ol(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;let{driver:t=jye,onPlay:r,startTime:n}=this.options;this.driver||(this.driver=t(a=>this.tick(a))),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=n??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)}};function qye(e){return new Gx(e)}var $ye=new Set(["opacity","clipPath","filter","transform"]);function Wye(e,t,r,{delay:n=0,duration:o=300,repeat:a=0,repeatType:i="loop",ease:s="easeInOut",times:l}={}){let c={[t]:r};l&&(c.offset=l);let u=qP(s,o);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:n,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:a+1,direction:i==="reverse"?"alternate":"normal"})}var Gye=Fw(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));var DV=10,tdt=2e4;function rdt(e){return Ph(e.type)||e.type==="spring"||!oV(e.ease)}function ndt(e,t){let r=new Gx({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0}),n={done:!1,value:e[0]},o=[],a=0;for(;!n.done&&a<tdt;)n=r.sample(a),o.push(n.value),a+=DV;return{times:void 0,keyframes:o,duration:a-DV,ease:"linear"}}var Kye={anticipate:hV,backInOut:mV,circInOut:yV};function odt(e){return e in Kye}var hL=class extends ZP{constructor(t){super(t);let{name:r,motionValue:n,element:o,keyframes:a}=this.options;this.resolver=new QP(a,(i,s)=>this.onKeyframesResolved(i,s),r,n,o),this.resolver.scheduleResolve()}initPlayback(t,r){let{duration:n=300,times:o,ease:a,type:i,motionValue:s,name:l,startTime:c}=this.options;if(!s.owner||!s.owner.current)return!1;if(typeof a=="string"&&Vx()&&odt(a)&&(a=Kye[a]),rdt(this.options)){let{onComplete:d,onUpdate:f,motionValue:p,element:h,...m}=this.options,g=ndt(t,m);t=g.keyframes,t.length===1&&(t[1]=t[0]),n=g.duration,o=g.times,a=g.ease,i="keyframes"}let u=Wye(s.owner.current,l,t,{...this.options,duration:n,times:o,ease:a});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(iL(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{let{onComplete:d}=this.options;s.set(Wx(t,this.options,r)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:n,times:o,type:i,ease:a,keyframes:t}}get duration(){let{resolved:t}=this;if(!t)return 0;let{duration:r}=t;return ol(r)}get time(){let{resolved:t}=this;if(!t)return 0;let{animation:r}=t;return ol(r.currentTime||0)}set time(t){let{resolved:r}=this;if(!r)return;let{animation:n}=r;n.currentTime=ci(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:n}=r;n.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 To;let{animation:n}=r;iL(n,t)}return To}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:n,duration:o,type:a,ease:i,times:s}=t;if(r.playState==="idle"||r.playState==="finished")return;if(this.time){let{motionValue:c,onUpdate:u,onComplete:d,element:f,...p}=this.options,h=new Gx({...p,keyframes:n,duration:o,type:a,ease:i,times:s,isGenerator:!0}),m=ci(this.time);c.setWithVelocity(h.sample(m-DV).value,h.sample(m).value,DV)}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:n,repeatDelay:o,repeatType:a,damping:i,type:s}=t;if(!r||!r.owner||!(r.owner.current instanceof HTMLElement))return!1;let{onUpdate:l,transformTemplate:c}=r.owner.getProps();return Gye()&&n&&$ye.has(n)&&!l&&!c&&!o&&a!=="mirror"&&i!==0&&s!=="inertia"}};var adt={type:"spring",stiffness:500,damping:25,restSpeed:10},idt=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),sdt={type:"keyframes",duration:.8},ldt={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Xye=(e,{keyframes:t})=>t.length>2?sdt:Lu.has(e)?e.startsWith("scale")?idt(t[1]):adt:ldt;function Yye({when:e,delay:t,delayChildren:r,staggerChildren:n,staggerDirection:o,repeat:a,repeatType:i,repeatDelay:s,from:l,elapsed:c,...u}){return!!Object.keys(u).length}var tI=(e,t,r,n={},o,a)=>i=>{let s=Bx(n,e)||{},l=s.delay||n.delay||0,{elapsed:c=0}=n;c=c-ci(l);let u={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,onUpdate:f=>{t.set(f),s.onUpdate&&s.onUpdate(f)},onComplete:()=>{i(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:o};Yye(s)||(u={...u,...Xye(e,u)}),u.duration&&(u.duration=ci(u.duration)),u.repeatDelay&&(u.repeatDelay=ci(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),(dV.current||RP.skipAnimations)&&(d=!0,u.duration=0,u.delay=0),d&&!a&&t.get()!==void 0){let f=Wx(u.keyframes,s);if(f!==void 0)return Br.update(()=>{u.onUpdate(f),u.onComplete()}),new Vw([])}return!a&&hL.supports(u)?new hL(u):new Gx(u)};function cdt({protectedKeys:e,needsAnimating:t},r){let n=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,n}function rI(e,t,{delay:r=0,transitionOverride:n,type:o}={}){var a;let{transition:i=e.getDefaultTransition(),transitionEnd:s,...l}=t;n&&(i=n);let c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(let d in l){let f=e.getValue(d,(a=e.latestValues[d])!==null&&a!==void 0?a:null),p=l[d];if(p===void 0||u&&cdt(u,d))continue;let h={delay:r,...Bx(i||{},d)},m=!1;if(window.MotionHandoffAnimation){let v=uV(e);if(v){let y=window.MotionHandoffAnimation(v,d,Br);y!==null&&(h.startTime=y,m=!0)}}uL(e,d),f.start(tI(d,f,p,e.shouldReduceMotion&&sV.has(d)?{type:!1}:h,e,m));let g=f.animation;g&&c.push(g)}return s&&Promise.all(c).then(()=>{Br.update(()=>{s&&cL(e,s)})}),c}function OV(e,t,r={}){var n;let o=Fx(e,t,r.type==="exit"?(n=e.presenceContext)===null||n===void 0?void 0:n.custom:void 0),{transition:a=e.getDefaultTransition()||{}}=o||{};r.transitionOverride&&(a=r.transitionOverride);let i=o?()=>Promise.all(rI(e,o,r)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(c=0)=>{let{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=a;return udt(e,t,u+c,d,f,r)}:()=>Promise.resolve(),{when:l}=a;if(l){let[c,u]=l==="beforeChildren"?[i,s]:[s,i];return c().then(()=>u())}else return Promise.all([i(),s(r.delay)])}function udt(e,t,r=0,n=0,o=1,a){let i=[],s=(e.variantChildren.size-1)*n,l=o===1?(c=0)=>c*n:(c=0)=>s-c*n;return Array.from(e.variantChildren).sort(ddt).forEach((c,u)=>{c.notify("AnimationStart",t),i.push(OV(c,t,{...a,delay:r+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(i)}function ddt(e,t){return e.sortNodePosition(t)}function _V(e,t,r={}){e.notify("AnimationStart",t);let n;if(Array.isArray(t)){let o=t.map(a=>OV(e,a,r));n=Promise.all(o)}else if(typeof t=="string")n=OV(e,t,r);else{let o=typeof t=="function"?Fx(e,t,r.custom):t;n=Promise.all(rI(e,o,r))}return n.then(()=>{e.notify("AnimationComplete",t)})}var fdt=tL.length;function b7(e){if(!e)return;if(!e.isControllingVariants){let r=e.parent?b7(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}let t={};for(let r=0;r<fdt;r++){let n=tL[r],o=e.props[n];(xv(o)||o===!1)&&(t[n]=o)}return t}var pdt=[...z4].reverse(),mdt=z4.length;function hdt(e){return t=>Promise.all(t.map(({animation:r,options:n})=>_V(e,r,n)))}function Zye(e){let t=hdt(e),r=Qye(),n=!0,o=l=>(c,u)=>{var d;let f=Fx(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){let{transition:p,transitionEnd:h,...m}=f;c={...c,...m,...h}}return c};function a(l){t=l(e)}function i(l){let{props:c}=e,u=b7(e.parent)||{},d=[],f=new Set,p={},h=1/0;for(let g=0;g<mdt;g++){let v=pdt[g],y=r[v],x=c[v]!==void 0?c[v]:u[v],C=xv(x),b=v===l?y.isActive:null;b===!1&&(h=g);let w=x===u[v]&&x!==c[v]&&C;if(w&&n&&e.manuallyAnimateOnMount&&(w=!1),y.protectedKeys={...p},!y.isActive&&b===null||!x&&!y.prevProp||_x(x)||typeof x=="boolean")continue;let S=gdt(y.prevProp,x),P=S||v===l&&y.isActive&&!w&&C||g>h&&C,N=!1,D=Array.isArray(x)?x:[x],E=D.reduce(o(v),{});b===!1&&(E={});let{prevResolvedValues:A={}}=y,z={...A,...E},V=k=>{P=!0,f.has(k)&&(N=!0,f.delete(k)),y.needsAnimating[k]=!0;let T=e.getValue(k);T&&(T.liveStyle=!1)};for(let k in z){let T=E[k],O=A[k];if(p.hasOwnProperty(k))continue;let F=!1;rL(T)&&rL(O)?F=!QK(T,O):F=T!==O,F?T!=null?V(k):f.add(k):T!==void 0&&f.has(k)?V(k):y.protectedKeys[k]=!0}y.prevProp=x,y.prevResolvedValues=E,y.isActive&&(p={...p,...E}),n&&e.blockInitialAnimation&&(P=!1),P&&(!(w&&S)||N)&&d.push(...D.map(k=>({animation:k,options:{type:v}})))}if(f.size){let g={};f.forEach(v=>{let y=e.getBaseTarget(v),x=e.getValue(v);x&&(x.liveStyle=!0),g[v]=y??null}),d.push({animation:g})}let m=!!d.length;return n&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(m=!1),n=!1,m?t(d):Promise.resolve()}function s(l,c){var u;if(r[l].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(f=>{var p;return(p=f.animationState)===null||p===void 0?void 0:p.setActive(l,c)}),r[l].isActive=c;let d=i(l);for(let f in r)r[f].protectedKeys={};return d}return{animateChanges:i,setActive:s,setAnimateFunction:a,getState:()=>r,reset:()=>{r=Qye(),n=!0}}}function gdt(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!QK(t,e):!1}function Ww(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Qye(){return{animate:Ww(!0),whileInView:Ww(),whileHover:Ww(),whileTap:Ww(),whileDrag:Ww(),whileFocus:Ww(),exit:Ww()}}var al=class{constructor(t){this.isMounted=!1,this.node=t}update(){}};var FV=class extends al{constructor(t){super(t),t.animationState||(t.animationState=Zye(t))}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();_x(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 vdt=0,BV=class extends al{constructor(){super(...arguments),this.id=vdt++}update(){if(!this.node.presenceContext)return;let{isPresent:t,onExitComplete:r}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)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 Jye={animation:{Feature:FV},exit:{Feature:BV}};function Cv(e,t,r,n={passive:!0}){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r)}function Sv(e){return{point:{x:e.pageX,y:e.pageY}}}var exe=e=>t=>Uw(t)&&e(t,Sv(t));function Kx(e,t,r,n){return Cv(e,t,exe(r),n)}var txe=(e,t)=>Math.abs(e-t);function rxe(e,t){let r=txe(e.x,t.x),n=txe(e.y,t.y);return Math.sqrt(r**2+n**2)}var nI=class{constructor(t,r,{transformPagePoint:n,contextWindow:o,dragSnapToOrigin:a=!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=C7(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,p=rxe(d.offset,{x:0,y:0})>=3;if(!f&&!p)return;let{point:h}=d,{timestamp:m}=ui;this.history.push({...h,timestamp:m});let{onStart:g,onMove:v}=this.handlers;f||(g&&g(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=w7(f,this.transformPagePoint),Br.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();let{onEnd:p,onSessionEnd:h,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let g=C7(d.type==="pointercancel"?this.lastMoveEventInfo:w7(f,this.transformPagePoint),this.history);this.startEvent&&p&&p(d,g),h&&h(d,g)},!Uw(t))return;this.dragSnapToOrigin=a,this.handlers=r,this.transformPagePoint=n,this.contextWindow=o||window;let i=Sv(t),s=w7(i,this.transformPagePoint),{point:l}=s,{timestamp:c}=ui;this.history=[{...l,timestamp:c}];let{onSessionStart:u}=r;u&&u(t,C7(s,this.history)),this.removeListeners=Rh(Kx(this.contextWindow,"pointermove",this.handlePointerMove),Kx(this.contextWindow,"pointerup",this.handlePointerUp),Kx(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Bc(this.updatePoint)}};function w7(e,t){return t?{point:t(e.point)}:e}function nxe(e,t){return{x:e.x-t.x,y:e.y-t.y}}function C7({point:e},t){return{point:e,delta:nxe(e,oxe(t)),offset:nxe(e,ydt(t)),velocity:xdt(t,.1)}}function ydt(e){return e[0]}function oxe(e){return e[e.length-1]}function xdt(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,n=null,o=oxe(e);for(;r>=0&&(n=e[r],!(o.timestamp-n.timestamp>ci(t)));)r--;if(!n)return{x:0,y:0};let a=ol(o.timestamp-n.timestamp);if(a===0)return{x:0,y:0};let i={x:(o.x-n.x)/a,y:(o.y-n.y)/a};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}var lxe=1e-4,bdt=1-lxe,wdt=1+lxe,cxe=.01,Cdt=0-cxe,Sdt=0+cxe;function Nl(e){return e.max-e.min}function uxe(e,t,r){return Math.abs(e-t)<=r}function axe(e,t,r,n=.5){e.origin=n,e.originPoint=dn(t.min,t.max,e.origin),e.scale=Nl(r)/Nl(t),e.translate=dn(r.min,r.max,e.origin)-e.originPoint,(e.scale>=bdt&&e.scale<=wdt||isNaN(e.scale))&&(e.scale=1),(e.translate>=Cdt&&e.translate<=Sdt||isNaN(e.translate))&&(e.translate=0)}function oI(e,t,r,n){axe(e.x,t.x,r.x,n?n.originX:void 0),axe(e.y,t.y,r.y,n?n.originY:void 0)}function ixe(e,t,r){e.min=r.min+t.min,e.max=e.min+Nl(t)}function dxe(e,t,r){ixe(e.x,t.x,r.x),ixe(e.y,t.y,r.y)}function sxe(e,t,r){e.min=t.min-r.min,e.max=e.min+Nl(t)}function aI(e,t,r){sxe(e.x,t.x,r.x),sxe(e.y,t.y,r.y)}function gxe(e,{min:t,max:r},n){return t!==void 0&&e<t?e=n?dn(t,e,n.min):Math.max(e,t):r!==void 0&&e>r&&(e=n?dn(r,e,n.max):Math.min(e,r)),e}function fxe(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 vxe(e,{top:t,left:r,bottom:n,right:o}){return{x:fxe(e.x,r,o),y:fxe(e.y,t,n)}}function pxe(e,t){let r=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,n]=[n,r]),{min:r,max:n}}function yxe(e,t){return{x:pxe(e.x,t.x),y:pxe(e.y,t.y)}}function xxe(e,t){let r=.5,n=Nl(e),o=Nl(t);return o>n?r=Fc(t.min,t.max-n,e.min):n>o&&(r=Fc(e.min,e.max-o,t.min)),kl(0,1,r)}function bxe(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 VV=.35;function wxe(e=VV){return e===!1?e=0:e===!0&&(e=VV),{x:mxe(e,"left","right"),y:mxe(e,"top","bottom")}}function mxe(e,t,r){return{min:hxe(e,t),max:hxe(e,r)}}function hxe(e,t){return typeof e=="number"?e:e[t]||0}var Cxe=()=>({translate:0,scale:1,origin:0,originPoint:0}),Gw=()=>({x:Cxe(),y:Cxe()}),Sxe=()=>({min:0,max:0}),Go=()=>({x:Sxe(),y:Sxe()});function Eu(e){return[e("x"),e("y")]}function zV({top:e,left:t,right:r,bottom:n}){return{x:{min:t,max:r},y:{min:e,max:n}}}function Pxe({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Ixe(e,t){if(!t)return e;let r=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}function S7(e){return e===void 0||e===1}function UV({scale:e,scaleX:t,scaleY:r}){return!S7(e)||!S7(t)||!S7(r)}function Pv(e){return UV(e)||P7(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function P7(e){return Rxe(e.x)||Rxe(e.y)}function Rxe(e){return e&&e!=="0%"}function gL(e,t,r){let n=e-r,o=t*n;return r+o}function kxe(e,t,r,n,o){return o!==void 0&&(e=gL(e,o,n)),gL(e,r,n)+t}function I7(e,t=0,r=1,n,o){e.min=kxe(e.min,t,r,n,o),e.max=kxe(e.max,t,r,n,o)}function R7(e,{x:t,y:r}){I7(e.x,t.translate,t.scale,t.originPoint),I7(e.y,r.translate,r.scale,r.originPoint)}var Nxe=.999999999999,Mxe=1.0000000000001;function Axe(e,t,r,n=!1){let o=r.length;if(!o)return;t.x=t.y=1;let a,i;for(let s=0;s<o;s++){a=r[s],i=a.projectionDelta;let{visualElement:l}=a.options;l&&l.props.style&&l.props.style.display==="contents"||(n&&a.options.layoutScroll&&a.scroll&&a!==a.root&&Kw(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,R7(e,i)),n&&Pv(a.latestValues)&&Kw(e,a.latestValues))}t.x<Mxe&&t.x>Nxe&&(t.x=1),t.y<Mxe&&t.y>Nxe&&(t.y=1)}function Xx(e,t){e.min=e.min+t,e.max=e.max+t}function Txe(e,t,r,n,o=.5){let a=dn(e.min,e.max,o);I7(e,t,r,a,n)}function Kw(e,t){Txe(e.x,t.x,t.scaleX,t.scale,t.originX),Txe(e.y,t.y,t.scaleY,t.scale,t.originY)}function k7(e,t){return zV(Ixe(e.getBoundingClientRect(),t))}function Lxe(e,t,r){let n=k7(e,r),{scroll:o}=t;return o&&(Xx(n.x,o.offset.x),Xx(n.y,o.offset.y)),n}var HV=({current:e})=>e?e.ownerDocument.defaultView:null;var Pdt=new WeakMap,qV=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=Go(),this.visualElement=t}start(t,{snapToCursor:r=!1}={}){let{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;let o=u=>{let{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),r&&this.snapToCursor(Sv(u).point)},a=(u,d)=>{let{drag:f,dragPropagation:p,onDragStart:h}=this.getProps();if(f&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=n7(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),Eu(g=>{let v=this.getAxisMotionValue(g).get()||0;if(Vc.test(v)){let{projection:y}=this.visualElement;if(y&&y.layout){let x=y.layout.layoutBox[g];x&&(v=Nl(x)*(parseFloat(v)/100))}}this.originPoint[g]=v}),h&&Br.postRender(()=>h(u,d)),uL(this.visualElement,"transform");let{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},i=(u,d)=>{let{dragPropagation:f,dragDirectionLock:p,onDirectionLock:h,onDrag:m}=this.getProps();if(!f&&!this.openDragLock)return;let{offset:g}=d;if(p&&this.currentDirection===null){this.currentDirection=Idt(g),this.currentDirection!==null&&h&&h(this.currentDirection);return}this.updateAxis("x",d.point,g),this.updateAxis("y",d.point,g),this.visualElement.render(),m&&m(u,d)},s=(u,d)=>this.stop(u,d),l=()=>Eu(u=>{var d;return this.getAnimationState(u)==="paused"&&((d=this.getAxisMotionValue(u).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new nI(t,{onSessionStart:o,onStart:a,onMove:i,onSessionEnd:s,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:HV(this.visualElement)})}stop(t,r){let n=this.isDragging;if(this.cancel(),!n)return;let{velocity:o}=r;this.startAnimation(o);let{onDragEnd:a}=this.getProps();a&&Br.postRender(()=>a(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:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",!1)}updateAxis(t,r,n){let{drag:o}=this.getProps();if(!n||!jV(t,o,this.currentDirection))return;let a=this.getAxisMotionValue(t),i=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(i=gxe(i,this.constraints[t],this.elastic[t])),a.set(i)}resolveConstraints(){var t;let{dragConstraints:r,dragElastic:n}=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,a=this.constraints;r&&bv(r)?this.constraints||(this.constraints=this.resolveRefConstraints()):r&&o?this.constraints=vxe(o.layoutBox,r):this.constraints=!1,this.elastic=wxe(n),a!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&Eu(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=bxe(o.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){let{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!bv(t))return!1;let n=t.current;Ni(n!==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 a=Lxe(n,o.root,this.visualElement.getTransformPagePoint()),i=yxe(o.layout.layoutBox,a);if(r){let s=r(Pxe(i));this.hasMutatedConstraints=!!s,s&&(i=zV(s))}return i}startAnimation(t){let{drag:r,dragMomentum:n,dragElastic:o,dragTransition:a,dragSnapToOrigin:i,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},c=Eu(u=>{if(!jV(u,r,this.currentDirection))return;let d=l&&l[u]||{};i&&(d={min:0,max:0});let f=o?200:1e6,p=o?40:1e7,h={type:"inertia",velocity:n?t[u]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...a,...d};return this.startAxisValueAnimation(u,h)});return Promise.all(c).then(s)}startAxisValueAnimation(t,r){let n=this.getAxisMotionValue(t);return uL(this.visualElement,t),n.start(tI(t,n,0,r,this.visualElement,!1))}stopAnimation(){Eu(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Eu(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()}`,n=this.visualElement.getProps(),o=n[r];return o||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){Eu(r=>{let{drag:n}=this.getProps();if(!jV(r,n,this.currentDirection))return;let{projection:o}=this.visualElement,a=this.getAxisMotionValue(r);if(o&&o.layout){let{min:i,max:s}=o.layout.layoutBox[r];a.set(t[r]-dn(i,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:t,dragConstraints:r}=this.getProps(),{projection:n}=this.visualElement;if(!bv(r)||!n||!this.constraints)return;this.stopAnimation();let o={x:0,y:0};Eu(i=>{let s=this.getAxisMotionValue(i);if(s&&this.constraints!==!1){let l=s.get();o[i]=xxe({min:l,max:l},this.constraints[i])}});let{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Eu(i=>{if(!jV(i,t,null))return;let s=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];s.set(dn(l,c,o[i]))})}addListeners(){if(!this.visualElement.current)return;Pdt.set(this.visualElement,this);let t=this.visualElement.current,r=Kx(t,"pointerdown",l=>{let{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),n=()=>{let{dragConstraints:l}=this.getProps();bv(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,a=o.addEventListener("measure",n);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Br.read(n);let i=Cv(window,"resize",()=>this.scalePositionWithinConstraints()),s=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Eu(u=>{let d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{i(),r(),a(),s&&s()}}getProps(){let t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:o=!1,dragConstraints:a=!1,dragElastic:i=VV,dragMomentum:s=!0}=t;return{...t,drag:r,dragDirectionLock:n,dragPropagation:o,dragConstraints:a,dragElastic:i,dragMomentum:s}}};function jV(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function Idt(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}var $V=class extends al{constructor(t){super(t),this.removeGroupControls=To,this.removeListeners=To,this.controls=new qV(t)}mount(){let{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||To}unmount(){this.removeGroupControls(),this.removeListeners()}};var Exe=e=>(t,r)=>{e&&Br.postRender(()=>e(t,r))},WV=class extends al{constructor(){super(...arguments),this.removePointerDownListener=To}onPointerDown(t){this.session=new nI(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:HV(this.node)})}createPanHandlers(){let{onPanSessionStart:t,onPanStart:r,onPan:n,onPanEnd:o}=this.node.getProps();return{onSessionStart:Exe(t),onStart:Exe(r),onMove:n,onEnd:(a,i)=>{delete this.session,o&&Br.postRender(()=>o(a,i))}}}mount(){this.removePointerDownListener=Kx(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 _xe=L(fe(),1),vL=L(ce(),1);var iI={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Dxe(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var sI={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(er.test(e))e=parseFloat(e);else return e;let r=Dxe(e,t.target.x),n=Dxe(e,t.target.y);return`${r}% ${n}%`}};var Oxe={correct:(e,{treeScale:t,projectionDelta:r})=>{let n=e,o=zc.parse(e);if(o.length>5)return n;let a=zc.createTransformer(e),i=typeof o[0]!="number"?1:0,s=r.x.scale*t.x,l=r.y.scale*t.y;o[0+i]/=s,o[1+i]/=l;let c=dn(s,l,.5);return typeof o[2+i]=="number"&&(o[2+i]/=c),typeof o[3+i]=="number"&&(o[3+i]/=c),a(o)}};var N7=class extends vL.Component{componentDidMount(){let{visualElement:t,layoutGroup:r,switchLayoutGroup:n,layoutId:o}=this.props,{projection:a}=t;Kve(Rdt),a&&(r.group&&r.group.add(a),n&&n.register&&o&&n.register(a),a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),iI.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){let{layoutDependency:r,visualElement:n,drag:o,isPresent:a}=this.props,i=n.projection;return i&&(i.isPresent=a,o||t.layoutDependency!==r||r===void 0?i.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?i.promote():i.relegate()||Br.postRender(()=>{let s=i.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){let{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),NP.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:t,layoutGroup:r,switchLayoutGroup:n}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(o),n&&n.deregister&&n.deregister(o))}safeToRemove(){let{safeToRemove:t}=this.props;t&&t()}render(){return null}};function GV(e){let[t,r]=E4(),n=(0,vL.useContext)(PP);return(0,_xe.jsx)(N7,{...e,layoutGroup:n,switchLayoutGroup:(0,vL.useContext)(q4),isPresent:t,safeToRemove:r})}var Rdt={borderRadius:{...sI,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:sI,borderTopRightRadius:sI,borderBottomLeftRadius:sI,borderBottomRightRadius:sI,boxShadow:Oxe};function KV(e,t,r){let n=Ln(e)?e:am(e);return n.start(tI("",n,t,r)),n.animation}function XV(e){return e instanceof SVGElement&&e.tagName!=="svg"}var Fxe=(e,t)=>e.depth-t.depth;var YV=class{constructor(){this.children=[],this.isDirty=!1}add(t){WP(this.children,t),this.isDirty=!0}remove(t){zx(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Fxe),this.isDirty=!1,this.children.forEach(t)}};function Bxe(e,t){let r=ec.now(),n=({timestamp:o})=>{let a=o-r;a>=t&&(Bc(n),e(a-t))};return Br.read(n,!0),()=>Bc(n)}var Hxe=["TopLeft","TopRight","BottomLeft","BottomRight"],kdt=Hxe.length,Vxe=e=>typeof e=="string"?parseFloat(e):e,zxe=e=>typeof e=="number"||er.test(e);function jxe(e,t,r,n,o,a){o?(e.opacity=dn(0,r.opacity!==void 0?r.opacity:1,Ndt(n)),e.opacityExit=dn(t.opacity!==void 0?t.opacity:1,0,Mdt(n))):a&&(e.opacity=dn(t.opacity!==void 0?t.opacity:1,r.opacity!==void 0?r.opacity:1,n));for(let i=0;i<kdt;i++){let s=`border${Hxe[i]}Radius`,l=Uxe(t,s),c=Uxe(r,s);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||zxe(l)===zxe(c)?(e[s]=Math.max(dn(Vxe(l),Vxe(c),n),0),(Vc.test(c)||Vc.test(l))&&(e[s]+="%")):e[s]=c}(t.rotate||r.rotate)&&(e.rotate=dn(t.rotate||0,r.rotate||0,n))}function Uxe(e,t){return e[t]!==void 0?e[t]:e.borderRadius}var Ndt=qxe(0,.5,vV),Mdt=qxe(.5,.95,To);function qxe(e,t,r){return n=>n<e?0:n>t?1:r(Fc(e,t,n))}function $xe(e,t){e.min=t.min,e.max=t.max}function Ed(e,t){$xe(e.x,t.x),$xe(e.y,t.y)}function M7(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Wxe(e,t,r,n,o){return e-=t,e=gL(e,1/r,n),o!==void 0&&(e=gL(e,1/o,n)),e}function Tdt(e,t=0,r=1,n=.5,o,a=e,i=e){if(Vc.test(t)&&(t=parseFloat(t),t=dn(i.min,i.max,t/100)-i.min),typeof t!="number")return;let s=dn(a.min,a.max,n);e===a&&(s-=t),e.min=Wxe(e.min,t,r,s,o),e.max=Wxe(e.max,t,r,s,o)}function Gxe(e,t,[r,n,o],a,i){Tdt(e,t[r],t[n],t[o],t.scale,a,i)}var Adt=["x","scaleX","originX"],Ldt=["y","scaleY","originY"];function T7(e,t,r,n){Gxe(e.x,t,Adt,r?r.x:void 0,n?n.x:void 0),Gxe(e.y,t,Ldt,r?r.y:void 0,n?n.y:void 0)}function Kxe(e){return e.translate===0&&e.scale===1}function A7(e){return Kxe(e.x)&&Kxe(e.y)}function Xxe(e,t){return e.min===t.min&&e.max===t.max}function Qxe(e,t){return Xxe(e.x,t.x)&&Xxe(e.y,t.y)}function Yxe(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function L7(e,t){return Yxe(e.x,t.x)&&Yxe(e.y,t.y)}function E7(e){return Nl(e.x)/Nl(e.y)}function D7(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var QV=class{constructor(){this.members=[]}add(t){WP(this.members,t),t.scheduleRender()}remove(t){if(zx(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 n;for(let o=r;o>=0;o--){let a=this.members[o];if(a.isPresent!==!1){n=a;break}}return n?(this.promote(n),!0):!1}promote(t,r){let n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,r&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);let{crossfade:o}=t.options;o===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{let{options:r,resumingFrom:n}=t;r.onExitComplete&&r.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}};function Zxe(e,t,r){let n="",o=e.x.translate/t.x,a=e.y.translate/t.y,i=r?.z||0;if((o||a||i)&&(n=`translate3d(${o}px, ${a}px, ${i}px) `),(t.x!==1||t.y!==1)&&(n+=`scale(${1/t.x}, ${1/t.y}) `),r){let{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:p,skewY:h}=r;c&&(n=`perspective(${c}px) ${n}`),u&&(n+=`rotate(${u}deg) `),d&&(n+=`rotateX(${d}deg) `),f&&(n+=`rotateY(${f}deg) `),p&&(n+=`skewX(${p}deg) `),h&&(n+=`skewY(${h}deg) `)}let s=e.x.scale*t.x,l=e.y.scale*t.y;return(s!==1||l!==1)&&(n+=`scale(${s}, ${l})`),n||"none"}var Xw={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},yL=typeof window<"u"&&window.MotionDebug!==void 0,O7=["","X","Y","Z"],Edt={visibility:"hidden"},Jxe=1e3,Ddt=0;function _7(e,t,r,n){let{latestValues:o}=t;o[e]&&(r[e]=o[e],t.setStaticValue(e,0),n&&(n[e]=0))}function sbe(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let r=uV(t);if(window.MotionHasOptimisedAnimation(r,"transform")){let{layout:o,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",Br,!(o||a))}let{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&sbe(n)}function ZV({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:n,resetTransform:o}){return class{constructor(i={},s=t?.()){this.id=Ddt++,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,yL&&(Xw.totalNodes=Xw.resolvedTargetDeltas=Xw.recalculatedProjection=0),this.nodes.forEach(Fdt),this.nodes.forEach(Hdt),this.nodes.forEach(jdt),this.nodes.forEach(Bdt),yL&&window.MotionDebug.record(Xw)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new YV)}addEventListener(i,s){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new Ux),this.eventHandlers.get(i).add(s)}notifyListeners(i,...s){let l=this.eventHandlers.get(i);l&&l.notify(...s)}hasListeners(i){return this.eventHandlers.has(i)}mount(i,s=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=XV(i),this.instance=i;let{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),s&&(c||l)&&(this.isLayoutDirty=!0),e){let d,f=()=>this.root.updateBlockedByResize=!1;e(i,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=Bxe(f,250),iI.hasAnimatedSinceResize&&(iI.hasAnimatedSinceResize=!1,this.nodes.forEach(tbe))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeTargetChanged:p,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let m=this.options.transition||u.getDefaultTransition()||Kdt,{onLayoutAnimationStart:g,onLayoutAnimationComplete:v}=u.getProps(),y=!this.targetLayout||!L7(this.targetLayout,h)||p,x=!f&&p;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||x||f&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,x);let C={...Bx(m,"layout"),onPlay:g,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(C.delay=0,C.type=!1),this.startAnimation(C)}else f||tbe(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Bc(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(qdt),this.animationId++)}getTransformTemplate(){let{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&sbe(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){let d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}let{layoutId:s,layout:l}=this.options;if(s===void 0&&!l)return;let c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(ebe);return}this.isUpdating||this.nodes.forEach(zdt),this.isUpdating=!1,this.nodes.forEach(Udt),this.nodes.forEach(Odt),this.nodes.forEach(_dt),this.clearAllSnapshots();let s=ec.now();ui.delta=kl(0,1e3/60,s-ui.timestamp),ui.timestamp=s,ui.isProcessing=!0,B4.update.process(ui),B4.preRender.process(ui),B4.render.process(ui),ui.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,NP.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Vdt),this.sharedNodes.forEach($dt)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Br.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Br.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 i=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Go(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,i?i.layoutBox:void 0)}updateScroll(i="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(s=!1),s){let l=n(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:l,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;let i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!A7(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;i&&(s||Pv(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){let s=this.measurePageBox(),l=this.removeElementScroll(s);return i&&(l=this.removeTransform(l)),Xdt(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var i;let{visualElement:s}=this.options;if(!s)return Go();let l=s.measureViewportBox();if(!(((i=this.scroll)===null||i===void 0?void 0:i.wasRoot)||this.path.some(Ydt))){let{scroll:u}=this.root;u&&(Xx(l.x,u.offset.x),Xx(l.y,u.offset.y))}return l}removeElementScroll(i){var s;let l=Go();if(Ed(l,i),!((s=this.scroll)===null||s===void 0)&&s.wasRoot)return l;for(let c=0;c<this.path.length;c++){let u=this.path[c],{scroll:d,options:f}=u;u!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&Ed(l,i),Xx(l.x,d.offset.x),Xx(l.y,d.offset.y))}return l}applyTransform(i,s=!1){let l=Go();Ed(l,i);for(let c=0;c<this.path.length;c++){let u=this.path[c];!s&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Kw(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Pv(u.latestValues)&&Kw(l,u.latestValues)}return Pv(this.latestValues)&&Kw(l,this.latestValues),l}removeTransform(i){let s=Go();Ed(s,i);for(let l=0;l<this.path.length;l++){let c=this.path[l];if(!c.instance||!Pv(c.latestValues))continue;UV(c.latestValues)&&c.updateSnapshot();let u=Go(),d=c.measurePageBox();Ed(u,d),T7(s,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Pv(this.latestValues)&&T7(s,this.latestValues),s}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.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!==ui.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){var s;let l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);let c=!!this.resumingFrom||this!==l;if(!(i||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=ui.timestamp,!this.targetDelta&&!this.relativeTarget){let p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Go(),this.relativeTargetOrigin=Go(),aI(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),Ed(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Go(),this.targetWithTransforms=Go()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),dxe(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Ed(this.target,this.layout.layoutBox),R7(this.target,this.targetDelta)):Ed(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;let p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Go(),this.relativeTargetOrigin=Go(),aI(this.relativeTargetOrigin,this.target,p.target),Ed(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}yL&&Xw.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||UV(this.parent.latestValues)||P7(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 i;let s=this.getLead(),l=!!this.resumingFrom||this!==s,c=!0;if((this.isProjectionDirty||!((i=this.parent)===null||i===void 0)&&i.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===ui.timestamp&&(c=!1),c)return;let{layout:u,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||!(u||d))return;Ed(this.layoutCorrected,this.layout.layoutBox);let f=this.treeScale.x,p=this.treeScale.y;Axe(this.layoutCorrected,this.treeScale,this.path,l),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=Go());let{target:h}=s;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(M7(this.prevProjectionDelta.x,this.projectionDelta.x),M7(this.prevProjectionDelta.y,this.projectionDelta.y)),oI(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==p||!D7(this.projectionDelta.x,this.prevProjectionDelta.x)||!D7(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h)),yL&&Xw.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){var s;if((s=this.options.visualElement)===null||s===void 0||s.scheduleRender(),i){let l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Gw(),this.projectionDelta=Gw(),this.projectionDeltaWithTransform=Gw()}setAnimationOrigin(i,s=!1){let l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=Gw();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;let f=Go(),p=l?l.source:void 0,h=this.layout?this.layout.source:void 0,m=p!==h,g=this.getStack(),v=!g||g.members.length<=1,y=!!(m&&!v&&this.options.crossfade===!0&&!this.path.some(Gdt));this.animationProgress=0;let x;this.mixTargetDelta=C=>{let b=C/1e3;rbe(d.x,i.x,b),rbe(d.y,i.y,b),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(aI(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Wdt(this.relativeTarget,this.relativeTargetOrigin,f,b),x&&Qxe(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=Go()),Ed(x,this.relativeTarget)),m&&(this.animationValues=u,jxe(u,c,this.latestValues,b,y,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=b},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Bc(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Br.update(()=>{iI.hasAnimatedSinceResize=!0,this.currentAnimation=KV(0,Jxe,{...i,onUpdate:s=>{this.mixTargetDelta(s),i.onUpdate&&i.onUpdate(s)},onComplete:()=>{i.onComplete&&i.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 i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Jxe),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let i=this.getLead(),{targetWithTransforms:s,target:l,layout:c,latestValues:u}=i;if(!(!s||!l||!c)){if(this!==i&&this.layout&&c&&lbe(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Go();let d=Nl(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;let f=Nl(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}Ed(s,l),Kw(s,u),oI(this.projectionDeltaWithTransform,this.layoutCorrected,s,u)}}registerSharedNode(i,s){this.sharedNodes.has(i)||this.sharedNodes.set(i,new QV),this.sharedNodes.get(i).add(s);let c=s.options.initialPromotionConfig;s.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(s):void 0})}isLead(){let i=this.getStack();return i?i.lead===this:!0}getLead(){var i;let{layoutId:s}=this.options;return s?((i=this.getStack())===null||i===void 0?void 0:i.lead)||this:this}getPrevLead(){var i;let{layoutId:s}=this.options;return s?(i=this.getStack())===null||i===void 0?void 0:i.prevLead:void 0}getStack(){let{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:s,preserveFollowOpacity:l}={}){let c=this.getStack();c&&c.promote(this,l),i&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){let i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){let{visualElement:i}=this.options;if(!i)return;let s=!1,{latestValues:l}=i;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(s=!0),!s)return;let c={};l.z&&_7("z",i,c,this.animationValues);for(let u=0;u<O7.length;u++)_7(`rotate${O7[u]}`,i,c,this.animationValues),_7(`skew${O7[u]}`,i,c,this.animationValues);i.render();for(let u in c)i.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);i.scheduleRender()}getProjectionStyles(i){var s,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Edt;let c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=LP(i?.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;let d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){let m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=LP(i?.pointerEvents)||""),this.hasProjected&&!Pv(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}let f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=Zxe(this.projectionDeltaWithTransform,this.treeScale,f),u&&(c.transform=u(f,c.transform));let{x:p,y:h}=this.projectionDelta;c.transformOrigin=`${p.origin*100}% ${h.origin*100}% 0`,d.animationValues?c.opacity=d===this?(l=(s=f.opacity)!==null&&s!==void 0?s:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:c.opacity=d===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(let m in VP){if(f[m]===void 0)continue;let{correct:g,applyTo:v}=VP[m],y=c.transform==="none"?f[m]:g(f[m],d);if(v){let x=v.length;for(let C=0;C<x;C++)c[v[C]]=y}else c[m]=y}return this.options.layoutId&&(c.pointerEvents=d===this?LP(i?.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>{var s;return(s=i.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(ebe),this.root.sharedNodes.clear()}}}function Odt(e){e.updateLayout()}function _dt(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:n,measuredBox:o}=e.layout,{animationType:a}=e.options,i=r.source!==e.layout.source;a==="size"?Eu(d=>{let f=i?r.measuredBox[d]:r.layoutBox[d],p=Nl(f);f.min=n[d].min,f.max=f.min+p}):lbe(a,r.layoutBox,n)&&Eu(d=>{let f=i?r.measuredBox[d]:r.layoutBox[d],p=Nl(n[d]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+p)});let s=Gw();oI(s,n,r.layoutBox);let l=Gw();i?oI(l,e.applyTransform(o,!0),r.measuredBox):oI(l,n,r.layoutBox);let c=!A7(s),u=!1;if(!e.resumeFrom){let d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){let{snapshot:f,layout:p}=d;if(f&&p){let h=Go();aI(h,r.layoutBox,f.layoutBox);let m=Go();aI(m,n,p.layoutBox),L7(h,m)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=h,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:r,delta:l,layoutDelta:s,hasLayoutChanged:c,hasRelativeTargetChanged:u})}else if(e.isLead()){let{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function Fdt(e){yL&&Xw.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 Bdt(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Vdt(e){e.clearSnapshot()}function ebe(e){e.clearMeasurements()}function zdt(e){e.isLayoutDirty=!1}function Udt(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function tbe(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Hdt(e){e.resolveTargetDelta()}function jdt(e){e.calcProjection()}function qdt(e){e.resetSkewAndRotation()}function $dt(e){e.removeLeadSnapshot()}function rbe(e,t,r){e.translate=dn(t.translate,0,r),e.scale=dn(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function nbe(e,t,r,n){e.min=dn(t.min,r.min,n),e.max=dn(t.max,r.max,n)}function Wdt(e,t,r,n){nbe(e.x,t.x,r.x,n),nbe(e.y,t.y,r.y,n)}function Gdt(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var Kdt={duration:.45,ease:[.4,0,.1,1]},obe=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),abe=obe("applewebkit/")&&!obe("chrome/")?Math.round:To;function ibe(e){e.min=abe(e.min),e.max=abe(e.max)}function Xdt(e){ibe(e.x),ibe(e.y)}function lbe(e,t,r){return e==="position"||e==="preserve-aspect"&&!uxe(E7(t),E7(r),.2)}function Ydt(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}var cbe=ZV({attachResizeListener:(e,t)=>Cv(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0});var F7={current:void 0},JV=ZV({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!F7.current){let e=new cbe({});e.mount(window),e.setOptions({layoutScroll:!0}),F7.current=e}return F7.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"});var ube={pan:{Feature:WV},drag:{Feature:$V,ProjectionNode:JV,MeasureLayout:GV}};function dbe(e,t,r){let{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover",r==="Start");let o="onHover"+r,a=n[o];a&&Br.postRender(()=>a(t,Sv(t)))}var e3=class extends al{mount(){let{current:t}=this.node;t&&(this.unmount=e7(t,r=>(dbe(this.node,r,"Start"),n=>dbe(this.node,n,"End"))))}unmount(){}};var t3=class extends al{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=Rh(Cv(this.node.current,"focus",()=>this.onFocus()),Cv(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function fbe(e,t,r){let{props:n}=e;e.animationState&&n.whileTap&&e.animationState.setActive("whileTap",r==="Start");let o="onTap"+(r==="End"?"":r),a=n[o];a&&Br.postRender(()=>a(t,Sv(t)))}var r3=class extends al{mount(){let{current:t}=this.node;t&&(this.unmount=r7(t,r=>(fbe(this.node,r,"Start"),(n,{success:o})=>fbe(this.node,n,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}};var V7=new WeakMap,B7=new WeakMap,Qdt=e=>{let t=V7.get(e.target);t&&t(e)},Zdt=e=>{e.forEach(Qdt)};function Jdt({root:e,...t}){let r=e||document;B7.has(r)||B7.set(r,{});let n=B7.get(r),o=JSON.stringify(t);return n[o]||(n[o]=new IntersectionObserver(Zdt,{root:e,...t})),n[o]}function pbe(e,t,r){let n=Jdt(t);return V7.set(e,r),n.observe(e),()=>{V7.delete(e),n.unobserve(e)}}var eft={some:0,all:1},n3=class extends al{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:t={}}=this.node.getProps(),{root:r,margin:n,amount:o="some",once:a}=t,i={root:r?r.current:void 0,rootMargin:n,threshold:typeof o=="number"?o:eft[o]},s=l=>{let{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,a&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);let{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return pbe(this.node.current,i,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;let{props:t,prevProps:r}=this.node;["amount","margin","root"].some(tft(t,r))&&this.startObserver()}unmount(){}};function tft({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}var mbe={inView:{Feature:n3},tap:{Feature:r3},focus:{Feature:t3},hover:{Feature:e3}};var hbe={layout:{ProjectionNode:JV,MeasureLayout:GV}};var bbe=L(ce(),1);var xL={current:null},o3={current:!1};function gbe(){if(o3.current=!0,!!IP)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>xL.current=e.matches;e.addListener(t),t()}else xL.current=!1}var rft=[...d7,ss,zc],vbe=e=>rft.find(SV(e));var Iv=new WeakMap;function ybe(e,t,r){for(let n in t){let o=t[n],a=r[n];if(Ln(o))e.addValue(n,o);else if(Ln(a))e.addValue(n,am(o,{owner:e}));else if(a!==o)if(e.hasValue(n)){let i=e.getValue(n);i.liveStyle===!0?i.jump(o):i.hasAnimated||i.set(o)}else{let i=e.getStaticValue(n);e.addValue(n,am(i!==void 0?i:o,{owner:e}))}}for(let n in r)t[n]===void 0&&e.removeValue(n);return t}var xbe=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],lI=class{scrapeMotionValuesFromProps(t,r,n){return{}}constructor({parent:t,props:r,presenceContext:n,reducedMotionConfig:o,blockInitialAnimation:a,visualState:i},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=$x,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 p=ec.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,Br.render(this.render,!1,!0))};let{latestValues:l,renderState:c,onUpdate:u}=i;this.onUpdate=u,this.latestValues=l,this.baseTarget={...l},this.initialValues=r.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=r,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=Bw(r),this.isVariantNode=U4(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);let{willChange:d,...f}=this.scrapeMotionValuesFromProps(r,{},this);for(let p in f){let h=f[p];l[p]!==void 0&&Ln(h)&&h.set(l[p],!1)}}mount(t){this.current=t,Iv.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,n)=>this.bindToMotionValue(n,r)),o3.current||gbe(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:xL.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Iv.delete(this.current),this.projection&&this.projection.unmount(),Bc(this.notifyUpdate),Bc(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 n=Lu.has(t),o=r.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&Br.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),a=r.on("renderRequest",this.scheduleRender),i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,r)),this.valueSubscriptions.set(t,()=>{o(),a(),i&&i(),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 yv){let r=yv[t];if(!r)continue;let{isEnabled:n,Feature:o}=r;if(!this.features[t]&&o&&n(this.props)&&(this.features[t]=new o(this)),this.features[t]){let a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Go()}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 n=0;n<xbe.length;n++){let o=xbe[n];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);let a="on"+o,i=t[a];i&&(this.propEventSubscriptions[o]=this.on(o,i))}this.prevMotionValues=ybe(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 n=this.values.get(t);r!==n&&(n&&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 n=this.values.get(t);return n===void 0&&r!==void 0&&(n=am(r===null?void 0:r,{owner:this}),this.addValue(t,n)),n}readValue(t,r){var n;let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(n=this.getBaseTargetFromProps(this.props,t))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(CV(o)||xV(o))?o=parseFloat(o):!vbe(o)&&zc.test(r)&&(o=wV(t,r)),this.setBaseTarget(t,Ln(o)?o.get():o)),Ln(o)?o.get():o}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){var r;let{initial:n}=this.props,o;if(typeof n=="string"||typeof n=="object"){let i=AP(this.props,n,(r=this.presenceContext)===null||r===void 0?void 0:r.custom);i&&(o=i[t])}if(n&&o!==void 0)return o;let a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!Ln(a)?a:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new Ux),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}};var cI=class extends lI{constructor(){super(...arguments),this.KeyframeResolver=QP}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:n}){delete r[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:t}=this.props;Ln(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}};function nft(e){return window.getComputedStyle(e)}var uI=class extends cI{constructor(){super(...arguments),this.type="html",this.renderInstance=Y4}readValueFromInstance(t,r){if(Lu.has(r)){let n=YP(r);return n&&n.default||0}else{let n=nft(t),o=(G4(r)?n.getPropertyValue(r):n[r])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:r}){return k7(t,r)}build(t,r,n){OP(t,r,n.transformTemplate)}scrapeMotionValuesFromProps(t,r,n){return zP(t,r,n)}};var dI=class extends cI{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Go}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(Lu.has(r)){let n=YP(r);return n&&n.default||0}return r=Q4.has(r)?r:kP(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,n){return eV(t,r,n)}build(t,r,n){_P(t,r,this.isSVGTag,n.transformTemplate)}renderInstance(t,r,n,o){Z4(t,r,n,o)}mount(t){this.isSVGTag=BP(t.tagName),super.mount(t)}};var wbe=(e,t)=>TP(e)?new dI(t):new uI(t,{allowProjection:e!==bbe.Fragment});var Cbe=nye({...Jye,...mbe,...ube,...hbe},wbe);var ie=Sve(Cbe);var fI=L(ce(),1);function Ca(e){let t=nl(()=>am(e)),{isStatic:r}=(0,fI.useContext)(yh);if(r){let[,n]=(0,fI.useState)(e);(0,fI.useEffect)(()=>t.on("change",n),[])}return t}function a3(e,t){let r=Ca(t()),n=()=>r.set(t());return n(),xh(()=>{let o=()=>Br.preRender(n,!1,!0),a=e.map(i=>i.on("change",o));return()=>{a.forEach(i=>i()),Bc(n)}}),r}var Yx=L(ce(),1);function Sbe(e){return typeof e=="number"?e:parseFloat(e)}function kh(e,t={}){let{isStatic:r}=(0,Yx.useContext)(yh),n=(0,Yx.useRef)(null),o=Ca(Ln(e)?Sbe(e.get()):e),a=(0,Yx.useRef)(o.get()),i=(0,Yx.useRef)(()=>{}),s=()=>{let c=n.current;c&&c.time===0&&c.sample(ui.delta),l(),n.current=qye({keyframes:[o.get(),a.current],velocity:o.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...t,onUpdate:i.current})},l=()=>{n.current&&n.current.stop()};return(0,Yx.useInsertionEffect)(()=>o.attach((c,u)=>r?u(c):(a.current=c,i.current=u,Br.update(s),o.get()),l),[JSON.stringify(t)]),xh(()=>{if(Ln(e))return e.on("change",c=>o.set(Sbe(c)))},[o]),o}var oft=e=>e&&typeof e=="object"&&e.mix,aft=e=>oft(e)?e.mix:void 0;function Pbe(...e){let t=!Array.isArray(e[0]),r=t?0:-1,n=e[0+r],o=e[1+r],a=e[2+r],i=e[3+r],s=AV(o,a,{mixer:aft(a[0]),...i});return t?s(n):s}function Ibe(e){GP.current=[],e();let t=a3(GP.current,e);return GP.current=void 0,t}function tc(e,t,r,n){if(typeof e=="function")return Ibe(e);let o=typeof t=="function"?t:Pbe(t,r,n);return Array.isArray(e)?Rbe(e,o):Rbe([e],([a])=>o(a))}function Rbe(e,t){let r=nl(()=>[]);return a3(e,()=>{r.length=0;let n=e.length;for(let o=0;o<n;o++)r[o]=e[o].get();return t(r)})}function ift(e){e.values.forEach(t=>t.stop())}function z7(e,t){[...t].reverse().forEach(n=>{let o=e.getVariant(n);o&&cL(e,o),e.variantChildren&&e.variantChildren.forEach(a=>{z7(a,t)})})}function sft(e,t){if(Array.isArray(t))return z7(e,t);if(typeof t=="string")return z7(e,[t]);cL(e,t)}function kbe(){let e=!1,t=new Set,r={subscribe(n){return t.add(n),()=>void t.delete(n)},start(n,o){Ni(e,"controls.start() should only be called after a component has mounted. Consider calling within a useEffect hook.");let a=[];return t.forEach(i=>{a.push(_V(i,n,{transitionOverride:o}))}),Promise.all(a)},set(n){return Ni(e,"controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook."),t.forEach(o=>{sft(o,n)})},stop(){t.forEach(n=>{ift(n)})},mount(){return e=!0,()=>{e=!1,r.stop()}}};return r}var Nbe=(e,t,r)=>{let n=t-e;return((r-e)%n+n)%n+e};function i3(e,t){return TV(e)?e[Nbe(0,e.length,t)]:e}function bL(e){return typeof e=="object"&&!Array.isArray(e)}function s3(e,t,r,n){return typeof e=="string"&&bL(t)?lL(e,r,n):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function Mbe(e,t,r){return e*(t+1)}function U7(e,t,r,n){var o;return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?r:(o=n.get(t))!==null&&o!==void 0?o:e}function lft(e,t,r){for(let n=0;n<e.length;n++){let o=e[n];o.at>t&&o.at<r&&(zx(e,o),n--)}}function Tbe(e,t,r,n,o,a){lft(e,o,a);for(let i=0;i<t.length;i++)e.push({value:t[i],at:dn(o,a,n[i]),easing:i3(r,i)})}function Abe(e,t){for(let r=0;r<e.length;r++)e[r]=e[r]/(t+1)}function Lbe(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}var cft="easeInOut",uft=20;function Obe(e,{defaultTransition:t={},...r}={},n,o){let a=t.duration||.3,i=new Map,s=new Map,l={},c=new Map,u=0,d=0,f=0;for(let p=0;p<e.length;p++){let h=e[p];if(typeof h=="string"){c.set(h,d);continue}else if(!Array.isArray(h)){c.set(h.name,U7(d,h.at,u,c));continue}let[m,g,v={}]=h;v.at!==void 0&&(d=U7(d,v.at,u,c));let y=0,x=(C,b,w,S=0,P=0)=>{let N=dft(C),{delay:D=0,times:E=EV(N),type:A="keyframes",repeat:z,repeatType:V,repeatDelay:R=0,...I}=b,{ease:k=t.ease||"easeOut",duration:T}=b,O=typeof D=="function"?D(S,P):D,F=N.length,_=Ph(A)?A:o?.[A];if(F<=2&&_){let q=100;if(F===2&&mft(N)){let K=N[1]-N[0];q=Math.abs(K)}let G={...I};T!==void 0&&(G.duration=ci(T));let U=rV(G,q,_);k=U.ease,T=U.duration}T??(T=a);let M=d+O;E.length===1&&E[0]===0&&(E[1]=1);let j=E.length-N.length;if(j>0&&LV(E,j),N.length===1&&N.unshift(null),z){Ni(z<uft,"Repeat count too high, must be less than 20"),T=Mbe(T,z);let q=[...N],G=[...E];k=Array.isArray(k)?[...k]:[k];let U=[...k];for(let K=0;K<z;K++){N.push(...q);for(let Y=0;Y<q.length;Y++)E.push(G[Y]+(K+1)),k.push(Y===0?"linear":i3(U,Y-1))}Abe(E,z)}let H=M+T;Tbe(w,N,k,E,M,H),y=Math.max(O+T,y),f=Math.max(H,f)};if(Ln(m)){let C=Ebe(m,s);x(g,v,Dbe("default",C))}else{let C=s3(m,g,n,l),b=C.length;for(let w=0;w<b;w++){g=g,v=v;let S=C[w],P=Ebe(S,s);for(let N in g)x(g[N],fft(v,N),Dbe(N,P),w,b)}}u=d,d+=y}return s.forEach((p,h)=>{for(let m in p){let g=p[m];g.sort(Lbe);let v=[],y=[],x=[];for(let b=0;b<g.length;b++){let{at:w,value:S,easing:P}=g[b];v.push(S),y.push(Fc(0,f,w)),x.push(P||"easeOut")}y[0]!==0&&(y.unshift(0),v.unshift(v[0]),x.unshift(cft)),y[y.length-1]!==1&&(y.push(1),v.push(null)),i.has(h)||i.set(h,{keyframes:{},transition:{}});let C=i.get(h);C.keyframes[m]=v,C.transition[m]={...t,duration:f,ease:x,times:y,...r}}}),i}function Ebe(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function Dbe(e,t){return t[e]||(t[e]=[]),t[e]}function dft(e){return Array.isArray(e)?e:[e]}function fft(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}var pft=e=>typeof e=="number",mft=e=>e.every(pft);function hft(e,t){return e in t}var l3=class extends lI{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,r){if(hft(r,t)){let n=t[r];if(typeof n=="string"||typeof n=="number")return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,r){delete r.output[t]}measureInstanceViewportBox(){return Go()}build(t,r){Object.assign(t.output,r)}renderInstance(t,{output:r}){Object.assign(t,r)}sortInstanceNodePosition(){return 0}};function _be(e){let t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},r=XV(e)?new dI(t):new uI(t);r.mount(e),Iv.set(e,r)}function Fbe(e){let t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},r=new l3(t);r.mount(e),Iv.set(e,r)}function gft(e,t){return Ln(e)||typeof e=="number"||typeof e=="string"&&!bL(t)}function c3(e,t,r,n){let o=[];if(gft(e,t))o.push(KV(e,bL(t)&&t.default||t,r&&(r.default||r)));else{let a=s3(e,t,n),i=a.length;Ni(!!i,"No valid elements provided.");for(let s=0;s<i;s++){let l=a[s],c=l instanceof Element?_be:Fbe;Iv.has(l)||c(l);let u=Iv.get(l),d={...r};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,i)),o.push(...rI(u,{...t,transition:d},{}))}}return o}function Bbe(e,t,r){let n=[];return Obe(e,t,r,{spring:eI}).forEach(({keyframes:a,transition:i},s)=>{n.push(...c3(s,a,i))}),n}function vft(e){return Array.isArray(e)&&e.some(Array.isArray)}function Vbe(e){function t(r,n,o){let a=[];vft(r)?a=Bbe(r,n,e):a=c3(r,n,o,e);let i=new Vw(a);return e&&e.animations.push(i),i}return t}var Ko=Vbe();function zbe(){let e=nl(kbe);return xh(e.mount,[]),e}var u3=zbe;var d3=class{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,r){this.componentControls.forEach(n=>{n.start(t.nativeEvent||t,r)})}},yft=()=>new d3;function H7(){return nl(yft)}var wL={};RF(wL,{Group:()=>jbe,Item:()=>Wbe});var j7=L(fe(),1);var pI=L(ce(),1);var Ube=L(ce(),1),f3=(0,Ube.createContext)(null);function Hbe(e,t,r,n){if(!n)return e;let o=e.findIndex(u=>u.value===t);if(o===-1)return e;let a=n>0?1:-1,i=e[o+a];if(!i)return e;let s=e[o],l=i.layout,c=dn(l.min,l.max,.5);return a===1&&s.layout.max+r>c||a===-1&&s.layout.min+r<c?dye(e,o,o+a):e}function xft({children:e,as:t="ul",axis:r="y",onReorder:n,values:o,...a},i){let s=nl(()=>ie[t]),l=[],c=(0,pI.useRef)(!1);Ni(!!o,"Reorder.Group must be provided a values prop");let u={axis:r,registerItem:(d,f)=>{let p=l.findIndex(h=>d===h.value);p!==-1?l[p].layout=f[r]:l.push({value:d,layout:f[r]}),l.sort(wft)},updateOrder:(d,f,p)=>{if(c.current)return;let h=Hbe(l,d,f,p);l!==h&&(c.current=!0,n(h.map(bft).filter(m=>o.indexOf(m)!==-1)))}};return(0,pI.useEffect)(()=>{c.current=!1}),(0,j7.jsx)(s,{...a,ref:i,ignoreStrict:!0,children:(0,j7.jsx)(f3.Provider,{value:u,children:e})})}var jbe=(0,pI.forwardRef)(xft);function bft(e){return e.value}function wft(e,t){return e.layout.min-t.layout.min}var $be=L(fe(),1);var p3=L(ce(),1);function qbe(e,t=0){return Ln(e)?e:Ca(t)}function Cft({children:e,style:t={},value:r,as:n="li",onDrag:o,layout:a=!0,...i},s){let l=nl(()=>ie[n]),c=(0,p3.useContext)(f3),u={x:qbe(t.x),y:qbe(t.y)},d=tc([u.x,u.y],([m,g])=>m||g?1:"unset");Ni(!!c,"Reorder.Item must be a child of Reorder.Group");let{axis:f,registerItem:p,updateOrder:h}=c;return(0,$be.jsx)(l,{drag:f,...i,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:d},layout:a,onDrag:(m,g)=>{let{velocity:v}=g;v[f]&&h(r,u[f].get(),v[f]),o&&o(m,g)},onLayoutMeasure:m=>p(r,m),ref:s,ignoreStrict:!0,children:e})}var Wbe=(0,p3.forwardRef)(Cft);var kBr=mt("",{variants:{hover:{lift:["transition-all duration-200 ease-out","hover:-translate-y-0.5","hover:shadow-md"],glow:["transition-all duration-300 ease-out","hover:shadow-lg","hover:shadow-primary/20"],scale:["transition-transform duration-200 ease-out","hover:scale-105","active:scale-95"],brightness:["transition-all duration-200 ease-out","hover:brightness-110","active:brightness-95"],border:["transition-all duration-200 ease-out","hover:border-primary/50"]},focus:{ring:["focus:outline-none","focus-visible:ring-2","focus-visible:ring-primary/50","focus-visible:ring-offset-2"],glow:["focus:outline-none","focus-visible:shadow-lg","focus-visible:shadow-primary/30"],border:["focus:outline-none","focus-visible:border-primary","focus-visible:border-2"]},active:{scale:["active:scale-95","transition-transform duration-100"],darken:["active:brightness-90","transition-all duration-100"],depress:["active:translate-y-0.5","active:shadow-sm","transition-all duration-100"]},cursor:{pointer:"cursor-pointer",grab:"cursor-grab active:cursor-grabbing",text:"cursor-text",wait:"cursor-wait",help:"cursor-help",notAllowed:"cursor-not-allowed"}},defaultVariants:{hover:"lift",focus:"ring",active:"scale",cursor:"pointer"}}),im={smooth:{type:"spring",stiffness:260,damping:20},bouncy:{type:"spring",stiffness:300,damping:15},stiff:{type:"spring",stiffness:400,damping:25},gentle:{type:"spring",stiffness:150,damping:15}},m3={lift:{y:-2,transition:im.smooth},scale:{scale:1.05,transition:im.smooth},glow:{boxShadow:"0 0 20px rgba(var(--primary), 0.3)",transition:im.smooth},rotate:{rotate:2,transition:im.bouncy}},Gbe={scale:{scale:.95,transition:{duration:.1}},depress:{y:1,transition:{duration:.1}}},NBr={ring:{boxShadow:"0 0 0 2px var(--background), 0 0 0 4px var(--primary)",transition:im.smooth},glow:{boxShadow:"0 0 0 3px rgba(var(--primary), 0.3)",transition:im.smooth}},MBr={container:{hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.05}}},item:{hidden:{opacity:0,y:20},show:{opacity:1,y:0,transition:im.smooth}}},TBr={fadeIn:{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3}},slideUp:{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:im.smooth},slideRight:{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},transition:im.smooth},scale:{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:1.05},transition:im.smooth}};var ABr={initial:{opacity:0,y:-20,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.95,transition:{duration:.15}},transition:im.bouncy};var Qx=L(fe(),1),Sft=mt("rounded-lg border bg-card text-card-foreground shadow-sm transition-all duration-200",{variants:{variant:{default:"border-border dark:border-border",outline:"border border-border shadow-none bg-transparent dark:border-border",filled:"border-none bg-secondary dark:bg-secondary shadow-inner",elevated:"border-none shadow-lg dark:shadow-xl dark:shadow-black/20",gradient:"border-none bg-gradient-to-br from-primary/5 to-primary/10 dark:from-primary/10 dark:to-primary/20",glass:"border border-white/20 bg-white/10 backdrop-blur-md dark:border-white/10 dark:bg-black/10",neon:"border-2 border-primary/50 shadow-[0_0_15px_rgba(var(--primary),0.5)] dark:shadow-[0_0_20px_rgba(var(--primary),0.7)]",glow:"border border-border shadow-[0_0_30px_rgba(var(--primary),0.15)] dark:shadow-[0_0_40px_rgba(var(--primary),0.25)]"},size:{default:"",sm:"",lg:"",xl:""},radius:{default:"rounded-lg",sm:"rounded-md",lg:"rounded-xl",full:"rounded-3xl",none:"rounded-none"},interactive:{true:"cursor-pointer hover:shadow-lg hover:border-primary/20 dark:hover:border-primary/30 hover:-translate-y-0.5 active:translate-y-0 active:shadow-sm",false:""}},defaultVariants:{variant:"default",size:"default",radius:"default"}}),Be=Nh.forwardRef(({className:e,variant:t,size:r,radius:n,interactive:o,microInteraction:a="lift",enableGlassmorphism:i,enableParallax:s=!1,enableTilt:l=!1,tiltMaxAngle:c=15,parallaxOffset:u=20,children:d,asChild:f,...p},h)=>{let[m,g]=Nh.useState({x:0,y:0}),[v,y]=Nh.useState(!1),x=V=>{if(!l&&!s)return;let R=V.currentTarget.getBoundingClientRect(),I=R.left+R.width/2,k=R.top+R.height/2,T=(V.clientX-I)/(R.width/2),O=(V.clientY-k)/(R.height/2);g({x:T,y:O})},C=()=>y(!0),b=()=>{y(!1),g({x:0,y:0})},w=i?"glass":t,S=l?m.y*-c:0,P=l?m.x*c:0,N=o&&a!=="none"?{whileHover:a==="scale"?m3.scale:a==="glow"?m3.glow:m3.lift,whileTap:Gbe.scale}:{},{onDrag:D,onDragStart:E,onDragEnd:A,...z}=p;return(0,Qx.jsx)(ie.div,{ref:h,className:B(Sft({variant:w,size:r,radius:n,interactive:o,className:e})),onMouseMove:x,onMouseEnter:C,onMouseLeave:b,style:{transformStyle:l||s?"preserve-3d":void 0,perspective:l||s?"1000px":void 0},animate:{rotateX:S,rotateY:P},transition:{type:"spring",damping:20,stiffness:300},...N,...z,children:s?(0,Qx.jsx)(ie.div,{style:{transform:"translateZ(50px)"},animate:{x:v?m.x*u:0,y:v?m.y*u:0},transition:{type:"spring",damping:20,stiffness:300},children:d}):d})});Be.displayName="MoonUICardPro";var yr=Nh.forwardRef(({className:e,...t},r)=>(0,Qx.jsx)("div",{ref:r,className:B("flex flex-col space-y-1.5 p-6",e),...t}));yr.displayName="MoonUICardHeaderPro";var Or=Nh.forwardRef(({className:e,...t},r)=>(0,Qx.jsx)("h3",{ref:r,className:B("text-lg font-semibold leading-none tracking-tight",e),...t}));Or.displayName="MoonUICardTitlePro";var qi=Nh.forwardRef(({className:e,...t},r)=>(0,Qx.jsx)("p",{ref:r,className:B("text-sm text-muted-foreground",e),...t}));qi.displayName="MoonUICardDescriptionPro";var Ve=Nh.forwardRef(({className:e,...t},r)=>(0,Qx.jsx)("div",{ref:r,className:B("p-6 pt-0",e),...t}));Ve.displayName="MoonUICardContentPro";var h3=Nh.forwardRef(({className:e,...t},r)=>(0,Qx.jsx)("div",{ref:r,className:B("flex items-center p-6 pt-0",e),...t}));h3.displayName="MoonUICardFooterPro";var sm=L(ce(),1);var Uc=L(ce(),1);var g3=L(ce(),1);function mI(e){let t=g3.useRef({value:e,previous:e});return g3.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Kbe=L(ce(),1);function hI(e){let[t,r]=Kbe.useState(void 0);return Un(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});let n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;let a=o[0],i,s;if("borderBoxSize"in a){let l=a.borderBoxSize,c=Array.isArray(l)?l[0]:l;i=c.inlineSize,s=c.blockSize}else i=e.offsetWidth,s=e.offsetHeight;r({width:i,height:s})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Dd=L(fe(),1),v3="Checkbox",[Pft,YBr]=Fn(v3),[Ift,q7]=Pft(v3);function Rft(e){let{__scopeCheckbox:t,checked:r,children:n,defaultChecked:o,disabled:a,form:i,name:s,onCheckedChange:l,required:c,value:u="on",internal_do_not_use_render:d}=e,[f,p]=qo({prop:r,defaultProp:o??!1,onChange:l,caller:v3}),[h,m]=Uc.useState(null),[g,v]=Uc.useState(null),y=Uc.useRef(!1),x=h?!!i||!!h.closest("form"):!0,C={checked:f,disabled:a,setChecked:p,control:h,setControl:m,name:s,form:i,value:u,hasConsumerStoppedPropagationRef:y,required:c,defaultChecked:Zx(o)?!1:o,isFormControl:x,bubbleInput:g,setBubbleInput:v};return(0,Dd.jsx)(Ift,{scope:t,...C,children:kft(d)?d(C):n})}var Xbe="CheckboxTrigger",Ybe=Uc.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},o)=>{let{control:a,value:i,disabled:s,checked:l,required:c,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:h}=q7(Xbe,e),m=Gt(o,u),g=Uc.useRef(l);return Uc.useEffect(()=>{let v=a?.form;if(v){let y=()=>d(g.current);return v.addEventListener("reset",y),()=>v.removeEventListener("reset",y)}},[a,d]),(0,Dd.jsx)(ot.button,{type:"button",role:"checkbox","aria-checked":Zx(l)?"mixed":l,"aria-required":c,"data-state":e0e(l),"data-disabled":s?"":void 0,disabled:s,value:i,...n,ref:m,onKeyDown:Ze(t,v=>{v.key==="Enter"&&v.preventDefault()}),onClick:Ze(r,v=>{d(y=>Zx(y)?!0:!y),h&&p&&(f.current=v.isPropagationStopped(),f.current||v.stopPropagation())})})});Ybe.displayName=Xbe;var y3=Uc.forwardRef((e,t)=>{let{__scopeCheckbox:r,name:n,checked:o,defaultChecked:a,required:i,disabled:s,value:l,onCheckedChange:c,form:u,...d}=e;return(0,Dd.jsx)(Rft,{__scopeCheckbox:r,checked:o,defaultChecked:a,disabled:s,required:i,onCheckedChange:c,name:n,form:u,value:l,internal_do_not_use_render:({isFormControl:f})=>(0,Dd.jsxs)(Dd.Fragment,{children:[(0,Dd.jsx)(Ybe,{...d,ref:t,__scopeCheckbox:r}),f&&(0,Dd.jsx)(Jbe,{__scopeCheckbox:r})]})})});y3.displayName=v3;var Qbe="CheckboxIndicator",$7=Uc.forwardRef((e,t)=>{let{__scopeCheckbox:r,forceMount:n,...o}=e,a=q7(Qbe,r);return(0,Dd.jsx)(Io,{present:n||Zx(a.checked)||a.checked===!0,children:(0,Dd.jsx)(ot.span,{"data-state":e0e(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});$7.displayName=Qbe;var Zbe="CheckboxBubbleInput",Jbe=Uc.forwardRef(({__scopeCheckbox:e,...t},r)=>{let{control:n,hasConsumerStoppedPropagationRef:o,checked:a,defaultChecked:i,required:s,disabled:l,name:c,value:u,form:d,bubbleInput:f,setBubbleInput:p}=q7(Zbe,e),h=Gt(r,p),m=mI(a),g=hI(n);Uc.useEffect(()=>{let y=f;if(!y)return;let x=window.HTMLInputElement.prototype,b=Object.getOwnPropertyDescriptor(x,"checked").set,w=!o.current;if(m!==a&&b){let S=new Event("click",{bubbles:w});y.indeterminate=Zx(a),b.call(y,Zx(a)?!1:a),y.dispatchEvent(S)}},[f,m,a,o]);let v=Uc.useRef(Zx(a)?!1:a);return(0,Dd.jsx)(ot.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??v.current,required:s,disabled:l,name:c,value:u,form:d,...t,tabIndex:-1,ref:h,style:{...t.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Jbe.displayName=Zbe;function kft(e){return typeof e=="function"}function Zx(e){return e==="indeterminate"}function e0e(e){return Zx(e)?"indeterminate":e?"checked":"unchecked"}var Uf=L(fe(),1),Mft=mt("peer shrink-0 border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:text-primary-foreground",{variants:{variant:{default:"border-border bg-background data-[state=checked]:bg-primary data-[state=checked]:border-primary",outline:"border-border bg-transparent data-[state=checked]:bg-primary data-[state=checked]:border-primary",muted:"border-border bg-accent data-[state=checked]:bg-primary data-[state=checked]:border-primary",ghost:"border-transparent bg-transparent hover:bg-accent data-[state=checked]:bg-primary data-[state=checked]:border-primary"},size:{sm:"h-3.5 w-3.5",default:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},radius:{none:"rounded-none",sm:"rounded-sm",default:"rounded-sm",md:"rounded-md",full:"rounded-full"},animation:{none:"",subtle:"transition-all duration-200",default:"transition-all duration-200",bounce:"transition-all duration-200"}},defaultVariants:{variant:"default",size:"default",radius:"default",animation:"default"}}),Du=sm.forwardRef(({className:e,variant:t,size:r,radius:n,animation:o,indeterminate:a=!1,icon:i,checked:s,...l},c)=>{let[u,d]=sm.useState(a);return sm.useEffect(()=>{d(a)},[a]),(0,Uf.jsx)(y3,{ref:c,checked:u?!1:s,className:B(Mft({variant:t,size:r,radius:n,animation:o}),e),...l,children:(0,Uf.jsx)($7,{className:B("flex items-center justify-center text-current",o==="bounce"&&"data-[state=checked]:animate-bounce"),children:u?(0,Uf.jsx)(em,{className:"h-[65%] w-[65%]"}):i||(0,Uf.jsx)(Wr,{className:"h-[65%] w-[65%]"})})})});Du.displayName=y3.displayName;var Tft=sm.forwardRef(({className:e,orientation:t="vertical",spacing:r="1rem",children:n,...o},a)=>(0,Uf.jsx)("div",{ref:a,className:B("flex",t==="vertical"?"flex-col":"flex-row flex-wrap",e),style:{gap:r},role:"group",...o,children:n}));Tft.displayName="CheckboxGroup";var W7=sm.forwardRef(({className:e,htmlFor:t,children:r,position:n="end",disabled:o=!1,...a},i)=>(0,Uf.jsx)("label",{ref:i,htmlFor:t,className:B("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",n==="start"?"mr-2":"ml-2",o&&"cursor-not-allowed opacity-70",e),...a,children:r}));W7.displayName="CheckboxLabel";var Aft=sm.forwardRef(({id:e,label:t,labelPosition:r="end",labelClassName:n,...o},a)=>{let i=sm.useId(),s=e||i;return(0,Uf.jsxs)("div",{className:"flex items-center",children:[r==="start"&&(0,Uf.jsx)(W7,{htmlFor:s,position:"start",disabled:o.disabled,className:n,children:t}),(0,Uf.jsx)(Du,{ref:a,id:s,...o}),r==="end"&&(0,Uf.jsx)(W7,{htmlFor:s,position:"end",disabled:o.disabled,className:n,children:t})]})});Aft.displayName="CheckboxWithLabel";var Mi=L(ce(),1);var fn=L(fe(),1),x3=Mi.forwardRef(({className:e,variant:t="default",size:r="md",animationMode:n="smooth",autoCollapseAfter:o,onToggleChange:a,persistKey:i,loading:s,progress:l,badge:c,badgeVariant:u="default",shortcut:d,lazy:f,open:p,defaultOpen:h,onOpenChange:m,children:g,disabled:v},y)=>{let[x,C]=Mi.useState(()=>{if(i&&typeof window<"u"){let D=localStorage.getItem(`collapsible-${i}`);if(D!==null)return D==="true"}return h||!1}),[b,w]=Mi.useState(!f),S=p!==void 0?p:x,P=Mi.useCallback(D=>{s||(C(D),m?.(D),a?.(D),i&&typeof window<"u"&&localStorage.setItem(`collapsible-${i}`,String(D)),f&&D&&!b&&w(!0),D&&o&&setTimeout(()=>{C(!1),m?.(!1),a?.(!1)},o))},[s,m,a,i,f,b,o]);Mi.useEffect(()=>{if(d){let D=E=>{let A=d.toLowerCase().split("+"),z=A.includes("ctrl")||A.includes("cmd"),V=A.includes("shift"),R=A.includes("alt"),I=A[A.length-1];E.ctrlKey===z&&E.shiftKey===V&&E.altKey===R&&E.key.toLowerCase()===I&&(E.preventDefault(),P(!S))};return window.addEventListener("keydown",D),()=>window.removeEventListener("keydown",D)}},[d,S,P]);let N=l?188.4-188.4*l/100:188.4;return(0,fn.jsxs)("div",{className:B("relative",t==="bordered"&&"border border-border rounded-lg",t==="elevated"&&"border border-border rounded-lg shadow-lg hover:shadow-xl transition-shadow",t==="gradient"&&"rounded-lg bg-gradient-to-r from-primary/5 via-accent/5 to-secondary/5",t==="glassmorphism"&&"rounded-lg backdrop-blur-md bg-white/10 border border-white/20",t==="card"&&"border border-border rounded-lg bg-card",s&&"opacity-60 pointer-events-none",e),children:[l!==void 0&&(0,fn.jsxs)("div",{className:"absolute top-2 right-2 w-6 h-6 z-10",children:[(0,fn.jsxs)("svg",{className:"w-6 h-6 -rotate-90",viewBox:"0 0 64 64",children:[(0,fn.jsx)("circle",{cx:"32",cy:"32",r:"30",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"text-muted-foreground/20"}),(0,fn.jsx)("circle",{cx:"32",cy:"32",r:"30",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeDasharray:"188.4",strokeDashoffset:N,strokeLinecap:"round",className:"text-primary transition-all duration-500"})]}),(0,fn.jsx)("span",{className:"absolute inset-0 flex items-center justify-center text-xs font-medium",children:Math.round(l)})]}),c&&(0,fn.jsx)("div",{className:"absolute -top-3 right-4 z-20",children:(0,fn.jsx)("div",{className:B("text-xs px-2.5 py-1 rounded-full font-semibold shadow-md",u==="default"&&"bg-background text-foreground border border-border",u==="primary"&&"bg-primary text-primary-foreground",u==="secondary"&&"bg-secondary text-secondary-foreground",u==="success"&&"bg-green-500 text-white",u==="warning"&&"bg-amber-500 text-white",u==="danger"&&"bg-red-500 text-white",u==="info"&&"bg-blue-500 text-white"),children:c})}),s&&(0,fn.jsx)("div",{className:"absolute top-1/2 right-4 -translate-y-1/2 z-10",children:(0,fn.jsx)(Sr,{className:"h-4 w-4 animate-spin text-muted-foreground"})}),(0,fn.jsx)(t4,{ref:y,open:S,onOpenChange:P,disabled:v||s,className:B("w-full",n==="spring"&&"[&_[data-state=open]]:animate-[collapsible-down_0.3s_cubic-bezier(0.34,1.56,0.64,1)]",n==="bounce"&&"[&_[data-state=open]]:animate-[collapsible-down_0.4s_cubic-bezier(0.68,-0.55,0.265,1.55)]",n==="fade"&&"[&_[data-state=open]]:animate-[collapsible-down_0.2s_ease-in-out]",n==="slide"&&"[&_[data-state=open]]:animate-[slide-down_0.3s_ease-out]"),children:(0,fn.jsx)(G7.Provider,{value:{variant:t,size:r,animationMode:n,lazy:f&&!b,shortcut:d},children:g})})]})});x3.displayName="MoonUICollapsiblePro";var G7=Mi.createContext({}),CL=mt("flex w-full items-center gap-3 transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",{variants:{variant:{default:"text-foreground hover:text-primary",bordered:"text-foreground hover:text-primary hover:bg-primary/5 rounded-t-lg",elevated:"text-foreground hover:text-primary hover:bg-primary/5 rounded-t-lg",gradient:"text-foreground hover:text-primary",glassmorphism:"text-foreground hover:text-primary hover:bg-white/10",card:"text-foreground hover:text-primary hover:bg-accent/5 rounded-t-lg"},size:{xs:"text-xs py-2 px-3 min-h-[2.5rem]",sm:"text-sm py-2.5 px-3.5 min-h-[3rem]",md:"text-base py-3 px-4 min-h-[3.5rem]",lg:"text-lg py-4 px-5 min-h-[4rem]",xl:"text-xl py-5 px-6 min-h-[4.5rem]"}},defaultVariants:{variant:"default",size:"md"}}),b3=Mi.forwardRef(({className:e,children:t,variant:r,size:n,asChild:o,leftIcon:a,rightIcon:i,description:s,external:l,customChevron:c,hideChevron:u,status:d,...f},p)=>{let{variant:h,size:m,shortcut:g}=Mi.useContext(G7),v=r||h||"default",y=n||m||"md",x=d&&{success:(0,fn.jsx)(_s,{className:"h-4 w-4 text-green-500"}),warning:(0,fn.jsx)(eo,{className:"h-4 w-4 text-amber-500"}),error:(0,fn.jsx)(aa,{className:"h-4 w-4 text-red-500"}),info:(0,fn.jsx)(Ec,{className:"h-4 w-4 text-blue-500"})}[d];return o?(0,fn.jsx)(LT,{ref:p,className:B(CL({variant:v,size:y}),e),asChild:o,...f,children:t}):(0,fn.jsxs)(LT,{ref:p,className:B(CL({variant:v,size:y}),"[&[data-state=open]>.chevron]:rotate-180","[&[data-state=open]]:text-primary",e),...f,children:[a&&(0,fn.jsx)("span",{className:"text-muted-foreground",children:a}),x&&!a&&x,(0,fn.jsxs)("div",{className:"flex-1 text-left",children:[(0,fn.jsxs)("div",{className:"flex items-center gap-2",children:[(0,fn.jsx)("span",{className:"font-medium",children:t}),l&&(0,fn.jsx)(Lc,{className:"h-3 w-3 text-muted-foreground"})]}),s&&(0,fn.jsx)("div",{className:"text-sm text-muted-foreground mt-1",children:s})]}),(0,fn.jsxs)("div",{className:"flex items-center gap-2",children:[g&&(0,fn.jsx)("kbd",{className:"hidden sm:inline-flex h-6 px-2 items-center rounded border bg-muted text-xs font-medium text-muted-foreground",children:g}),i&&(0,fn.jsx)("span",{className:"text-muted-foreground",children:i}),!u&&(0,fn.jsx)("span",{className:"chevron transition-transform duration-200 text-muted-foreground",children:c||(0,fn.jsx)($o,{className:"h-4 w-4"})})]})]})});b3.displayName="MoonUICollapsibleTriggerPro";var w3=mt("overflow-hidden transition-all",{variants:{variant:{default:"text-muted-foreground",bordered:"text-muted-foreground border-x border-b border-border rounded-b-lg",elevated:"text-muted-foreground bg-muted/20",gradient:"text-muted-foreground",glassmorphism:"text-muted-foreground bg-white/5",card:"text-muted-foreground border-x border-b border-border rounded-b-lg bg-card/50"},size:{xs:"text-xs",sm:"text-sm",md:"text-base",lg:"text-lg",xl:"text-xl"}},defaultVariants:{variant:"default",size:"md"}}),C3=Mi.forwardRef(({className:e,children:t,variant:r,size:n,contentLoading:o,loadContent:a,noPadding:i,padding:s,...l},c)=>{let{variant:u,size:d,animationMode:f,lazy:p}=Mi.useContext(G7),h=r||u||"default",m=n||d||"md",[g,v]=Mi.useState(null),[y,x]=Mi.useState(!1);Mi.useEffect(()=>{a&&!g&&(x(!0),a().then(v).finally(()=>x(!1)))},[a,g]);let C=!i&&{xs:"p-3",sm:"p-3.5",md:"p-4",lg:"p-5",xl:"p-6"}[m];return(0,fn.jsx)(r4,{ref:c,className:B(w3({variant:h,size:m}),f==="spring"&&"data-[state=closed]:animate-[collapsible-up_0.3s_cubic-bezier(0.34,1.56,0.64,1)] data-[state=open]:animate-[collapsible-down_0.3s_cubic-bezier(0.34,1.56,0.64,1)]",f==="bounce"&&"data-[state=closed]:animate-[collapsible-up_0.4s_cubic-bezier(0.68,-0.55,0.265,1.55)] data-[state=open]:animate-[collapsible-down_0.4s_cubic-bezier(0.68,-0.55,0.265,1.55)]",f==="fade"&&"data-[state=closed]:animate-[collapsible-up_0.2s_ease-in-out] data-[state=open]:animate-[collapsible-down_0.2s_ease-in-out]",f==="slide"&&"data-[state=closed]:animate-[slide-up_0.3s_ease-out] data-[state=open]:animate-[slide-down_0.3s_ease-out]",f==="smooth"&&"data-[state=closed]:animate-collapse-up data-[state=open]:animate-collapse-down",e),...l,children:(0,fn.jsx)("div",{className:B(s||C),children:p?(0,fn.jsxs)("div",{className:"flex items-center gap-2 py-4",children:[(0,fn.jsx)(In,{className:"h-4 w-4 animate-pulse"}),(0,fn.jsx)("span",{className:"text-sm",children:"Click to load content..."})]}):o||y?(0,fn.jsxs)("div",{className:"flex items-center gap-2 py-4",children:[(0,fn.jsx)(Sr,{className:"h-4 w-4 animate-spin"}),(0,fn.jsx)("span",{className:"text-sm",children:"Loading content..."})]}):g||t})})});C3.displayName="MoonUICollapsibleContentPro";var t0e=()=>{let[e,t]=Mi.useState({openCount:0,lastOpened:null,totalTimeOpen:0}),r=Mi.useCallback(()=>{t(o=>({...o,openCount:o.openCount+1,lastOpened:new Date}))},[]),n=Mi.useCallback(()=>{t(o=>{if(o.lastOpened){let a=Date.now()-o.lastOpened.getTime();return{...o,totalTimeOpen:o.totalTimeOpen+a,lastOpened:null}}return o})},[]);return{analytics:e,trackOpen:r,trackClose:n}};var r0e=L(ce(),1);var Rv=L(fe(),1),Lft=["#000000","#374151","#EF4444","#F97316","#F59E0B","#EAB308","#22C55E","#10B981","#06B6D4","#3B82F6","#6366F1","#8B5CF6","#A855F7","#D946EF","#EC4899","#F43F5E"],gI=({value:e="#000000",onChange:t,className:r,showInput:n=!1,showPresets:o=!0,size:a="default",presets:i=Lft})=>{let[s,l]=(0,r0e.useState)(e),c=d=>{l(d),t?.(d)},u={sm:"w-6 h-6",default:"w-8 h-8",lg:"w-10 h-10"};return(0,Rv.jsxs)("div",{className:B("flex flex-col gap-2",r),children:[n&&(0,Rv.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,Rv.jsx)("input",{type:"color",value:s,onChange:d=>c(d.target.value),className:B("rounded border cursor-pointer",u[a]||u.default)}),(0,Rv.jsx)("input",{type:"text",value:s,onChange:d=>c(d.target.value),className:"px-2 py-1 border rounded text-sm font-mono",placeholder:"#000000"})]}),!n&&(0,Rv.jsx)("input",{type:"color",value:s,onChange:d=>c(d.target.value),className:B("rounded border cursor-pointer",u[a]||u.default)}),o&&i&&i.length>0&&(0,Rv.jsx)("div",{className:"flex flex-wrap gap-1",children:i.map(d=>(0,Rv.jsx)("button",{type:"button",onClick:()=>c(d),className:B("w-6 h-6 rounded border-2 hover:scale-110 transition-transform",s===d?"border-gray-900 dark:border-gray-100":"border-transparent"),style:{backgroundColor:d}},d))})]})};var pb=L(ce(),1),fi=L(ce(),1);var n0e=1,Eft=.9,Dft=.8,Oft=.17,K7=.1,X7=.999,_ft=.9999,Fft=.99,Bft=/[\\\/_+.#"@\[\(\{&]/,Vft=/[\\\/_+.#"@\[\(\{&]/g,zft=/[\s-]/,a0e=/[\s-]/g;function Y7(e,t,r,n,o,a,i){if(a===t.length)return o===e.length?n0e:Fft;var s=`${o},${a}`;if(i[s]!==void 0)return i[s];for(var l=n.charAt(a),c=r.indexOf(l,o),u=0,d,f,p,h;c>=0;)d=Y7(e,t,r,n,c+1,a+1,i),d>u&&(c===o?d*=n0e:Bft.test(e.charAt(c-1))?(d*=Dft,p=e.slice(o,c-1).match(Vft),p&&o>0&&(d*=Math.pow(X7,p.length))):zft.test(e.charAt(c-1))?(d*=Eft,h=e.slice(o,c-1).match(a0e),h&&o>0&&(d*=Math.pow(X7,h.length))):(d*=Oft,o>0&&(d*=Math.pow(X7,c-o))),e.charAt(c)!==t.charAt(a)&&(d*=_ft)),(d<K7&&r.charAt(c-1)===n.charAt(a+1)||n.charAt(a+1)===n.charAt(a)&&r.charAt(c-1)!==n.charAt(a))&&(f=Y7(e,t,r,n,c+1,a+2,i),f*K7>d&&(d=f*K7)),d>u&&(u=d),c=r.indexOf(l,c+1);return i[s]=u,u}function o0e(e){return e.toLowerCase().replace(a0e," ")}function i0e(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,Y7(e,t,o0e(e),o0e(t),0,0,{})}var ia=L(ce(),1);var di=L(ce(),1);var s0e=L(ce(),1);function l0e(e,t=globalThis?.document){let r=qn(e);s0e.useEffect(()=>{let n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var Z7=L(fe(),1),Uft="DismissableLayer",Q7="dismissableLayer.update",Hft="dismissableLayer.pointerDownOutside",jft="dismissableLayer.focusOutside",c0e,d0e=di.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Hf=di.forwardRef((e,t)=>{let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...l}=e,c=di.useContext(d0e),[u,d]=di.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=di.useState({}),h=Gt(t,S=>d(S)),m=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=m.indexOf(g),y=u?m.indexOf(u):-1,x=c.layersWithOutsidePointerEventsDisabled.size>0,C=y>=v,b=$ft(S=>{let P=S.target,N=[...c.branches].some(D=>D.contains(P));!C||N||(o?.(S),i?.(S),S.defaultPrevented||s?.())},f),w=Wft(S=>{let P=S.target;[...c.branches].some(D=>D.contains(P))||(a?.(S),i?.(S),S.defaultPrevented||s?.())},f);return l0e(S=>{y===c.layers.size-1&&(n?.(S),!S.defaultPrevented&&s&&(S.preventDefault(),s()))},f),di.useEffect(()=>{if(u)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(c0e=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),u0e(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=c0e)}},[u,f,r,c]),di.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),u0e())},[u,c]),di.useEffect(()=>{let S=()=>p({});return document.addEventListener(Q7,S),()=>document.removeEventListener(Q7,S)},[]),(0,Z7.jsx)(ot.div,{...l,ref:h,style:{pointerEvents:x?C?"auto":"none":void 0,...e.style},onFocusCapture:Ze(e.onFocusCapture,w.onFocusCapture),onBlurCapture:Ze(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:Ze(e.onPointerDownCapture,b.onPointerDownCapture)})});Hf.displayName=Uft;var qft="DismissableLayerBranch",f0e=di.forwardRef((e,t)=>{let r=di.useContext(d0e),n=di.useRef(null),o=Gt(t,n);return di.useEffect(()=>{let a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),(0,Z7.jsx)(ot.div,{...e,ref:o})});f0e.displayName=qft;function $ft(e,t=globalThis?.document){let r=qn(e),n=di.useRef(!1),o=di.useRef(()=>{});return di.useEffect(()=>{let a=s=>{if(s.target&&!n.current){let c=function(){p0e(Hft,r,u,{discrete:!0})};var l=c;let u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);n.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function Wft(e,t=globalThis?.document){let r=qn(e),n=di.useRef(!1);return di.useEffect(()=>{let o=a=>{a.target&&!n.current&&p0e(jft,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function u0e(){let e=new CustomEvent(Q7);document.dispatchEvent(e)}function p0e(e,t,r,{discrete:n}){let o=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?uP(o,a):o.dispatchEvent(a)}var m0e=Hf,h0e=f0e;var jf=L(ce(),1);var b0e=L(fe(),1),J7="focusScope.autoFocusOnMount",eX="focusScope.autoFocusOnUnmount",g0e={bubbles:!1,cancelable:!0},Kft="FocusScope",kv=jf.forwardRef((e,t)=>{let{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[s,l]=jf.useState(null),c=qn(o),u=qn(a),d=jf.useRef(null),f=Gt(t,m=>l(m)),p=jf.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;jf.useEffect(()=>{if(n){let y=function(w){if(p.paused||!s)return;let S=w.target;s.contains(S)?d.current=S:Jx(d.current,{select:!0})},x=function(w){if(p.paused||!s)return;let S=w.relatedTarget;S!==null&&(s.contains(S)||Jx(d.current,{select:!0}))},C=function(w){if(document.activeElement===document.body)for(let P of w)P.removedNodes.length>0&&Jx(s)};var m=y,g=x,v=C;document.addEventListener("focusin",y),document.addEventListener("focusout",x);let b=new MutationObserver(C);return s&&b.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",x),b.disconnect()}}},[n,s,p.paused]),jf.useEffect(()=>{if(s){y0e.add(p);let m=document.activeElement;if(!s.contains(m)){let v=new CustomEvent(J7,g0e);s.addEventListener(J7,c),s.dispatchEvent(v),v.defaultPrevented||(Xft(ept(w0e(s)),{select:!0}),document.activeElement===m&&Jx(s))}return()=>{s.removeEventListener(J7,c),setTimeout(()=>{let v=new CustomEvent(eX,g0e);s.addEventListener(eX,u),s.dispatchEvent(v),v.defaultPrevented||Jx(m??document.body,{select:!0}),s.removeEventListener(eX,u),y0e.remove(p)},0)}}},[s,c,u,p]);let h=jf.useCallback(m=>{if(!r&&!n||p.paused)return;let g=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,v=document.activeElement;if(g&&v){let y=m.currentTarget,[x,C]=Yft(y);x&&C?!m.shiftKey&&v===C?(m.preventDefault(),r&&Jx(x,{select:!0})):m.shiftKey&&v===x&&(m.preventDefault(),r&&Jx(C,{select:!0})):v===y&&m.preventDefault()}},[r,n,p.paused]);return(0,b0e.jsx)(ot.div,{tabIndex:-1,...i,ref:f,onKeyDown:h})});kv.displayName=Kft;function Xft(e,{select:t=!1}={}){let r=document.activeElement;for(let n of e)if(Jx(n,{select:t}),document.activeElement!==r)return}function Yft(e){let t=w0e(e),r=v0e(t,e),n=v0e(t.reverse(),e);return[r,n]}function w0e(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{let o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function v0e(e,t){for(let r of e)if(!Qft(r,{upTo:t}))return r}function Qft(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Zft(e){return e instanceof HTMLInputElement&&"select"in e}function Jx(e,{select:t=!1}={}){if(e&&e.focus){let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Zft(e)&&t&&e.select()}}var y0e=Jft();function Jft(){let e=[];return{add(t){let r=e[0];t!==r&&r?.pause(),e=x0e(e,t),e.unshift(t)},remove(t){e=x0e(e,t),e[0]?.resume()}}}function x0e(e,t){let r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function ept(e){return e.filter(t=>t.tagName!=="A")}var S3=L(ce(),1),C0e=L(fh(),1);var S0e=L(fe(),1),tpt="Portal",Od=S3.forwardRef((e,t)=>{let{container:r,...n}=e,[o,a]=S3.useState(!1);Un(()=>a(!0),[]);let i=r||o&&globalThis?.document?.body;return i?C0e.default.createPortal((0,S0e.jsx)(ot.div,{...n,ref:t}),i):null});Od.displayName=tpt;var I0e=L(ce(),1),tX=0;function eb(){I0e.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??P0e()),document.body.insertAdjacentElement("beforeend",e[1]??P0e()),tX++,()=>{tX===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),tX--}},[])}function P0e(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Ou=function(){return Ou=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Ou.apply(this,arguments)};function P3(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function R0e(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}var M3=L(ce());var rc=L(ce());var Yw="right-scroll-bar-position",Qw="width-before-scroll-bar",rX="with-scroll-bars-hidden",nX="--removed-body-scroll-bar-size";function I3(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}var k0e=L(ce());function N0e(e,t){var r=(0,k0e.useState)(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var R3=L(ce());var rpt=typeof window<"u"?R3.useLayoutEffect:R3.useEffect,M0e=new WeakMap;function oX(e,t){var r=N0e(t||null,function(n){return e.forEach(function(o){return I3(o,n)})});return rpt(function(){var n=M0e.get(r);if(n){var o=new Set(n),a=new Set(e),i=r.current;o.forEach(function(s){a.has(s)||I3(s,null)}),a.forEach(function(s){o.has(s)||I3(s,i)})}M0e.set(r,e)},[e]),r}function npt(e){return e}function opt(e,t){t===void 0&&(t=npt);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var i=t(a,n);return r.push(i),function(){r=r.filter(function(s){return s!==i})}},assignSyncMedium:function(a){for(n=!0;r.length;){var i=r;r=[],i.forEach(a)}r={push:function(s){return a(s)},filter:function(){return r}}},assignMedium:function(a){n=!0;var i=[];if(r.length){var s=r;r=[],s.forEach(a),i=r}var l=function(){var u=i;i=[],u.forEach(a)},c=function(){return Promise.resolve().then(l)};c(),r={push:function(u){i.push(u),c()},filter:function(u){return i=i.filter(u),r}}}};return o}function aX(e){e===void 0&&(e={});var t=opt(null);return t.options=Ou({async:!0,ssr:!1},e),t}var T0e=L(ce()),A0e=function(e){var t=e.sideCar,r=P3(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return T0e.createElement(n,Ou({},r))};A0e.isSideCarExport=!0;function iX(e,t){return e.useMedium(t),A0e}var k3=aX();var sX=function(){},SL=rc.forwardRef(function(e,t){var r=rc.useRef(null),n=rc.useState({onScrollCapture:sX,onWheelCapture:sX,onTouchMoveCapture:sX}),o=n[0],a=n[1],i=e.forwardProps,s=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,h=e.noIsolation,m=e.inert,g=e.allowPinchZoom,v=e.as,y=v===void 0?"div":v,x=e.gapMode,C=P3(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),b=f,w=oX([r,t]),S=Ou(Ou({},C),o);return rc.createElement(rc.Fragment,null,u&&rc.createElement(b,{sideCar:k3,removeScrollBar:c,shards:d,noRelative:p,noIsolation:h,inert:m,setCallbacks:a,allowPinchZoom:!!g,lockRef:r,gapMode:x}),i?rc.cloneElement(rc.Children.only(s),Ou(Ou({},S),{ref:w})):rc.createElement(y,Ou({},S,{className:l,ref:w}),s))});SL.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};SL.classNames={fullWidth:Qw,zeroRight:Yw};var Sa=L(ce());var yI=L(ce());var D0e=L(ce());var L0e;var E0e=function(){if(L0e)return L0e;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function apt(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=E0e();return t&&e.setAttribute("nonce",t),e}function ipt(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function spt(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var lX=function(){var e=0,t=null;return{add:function(r){e==0&&(t=apt())&&(ipt(t,r),spt(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}};var cX=function(){var e=lX();return function(t,r){D0e.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}};var PL=function(){var e=cX(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t};var lpt={left:0,top:0,right:0,gap:0},uX=function(e){return parseInt(e||"",10)||0},cpt=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[uX(r),uX(n),uX(o)]},dX=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return lpt;var t=cpt(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}};var upt=PL(),vI="data-scroll-locked",dpt=function(e,t,r,n){var o=e.left,a=e.top,i=e.right,s=e.gap;return r===void 0&&(r="margin"),`
|
|
70
70
|
.`.concat(rX,` {
|
|
71
71
|
overflow: hidden `).concat(n,`;
|
|
72
72
|
padding-right: `).concat(s,"px ").concat(n,`;
|
|
@@ -309,7 +309,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
309
309
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cGt(e,t){if(e){if(typeof e=="string")return kae(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return kae(e,t)}}function uGt(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function dGt(e){if(Array.isArray(e))return kae(e)}function kae(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function fGt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Z$e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,e6e(n.key),n)}}function pGt(e,t,r){return t&&Z$e(e.prototype,t),r&&Z$e(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function mGt(e,t,r){return t=m$(t),hGt(e,J$e()?Reflect.construct(t,r||[],m$(e).constructor):t.apply(e,r))}function hGt(e,t){if(t&&(Zk(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return gGt(e)}function gGt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function J$e(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(J$e=function(){return!!e})()}function m$(e){return m$=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},m$(e)}function vGt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Nae(e,t)}function Nae(e,t){return Nae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},Nae(e,t)}function zm(e,t,r){return t=e6e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function e6e(e){var t=yGt(e,"string");return Zk(t)=="symbol"?t:t+""}function yGt(e,t){if(Zk(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Zk(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Um=function(e){function t(){var r;fGt(this,t);for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];return r=mGt(this,t,[].concat(o)),zm(r,"state",{isAnimationFinished:!0,totalLength:0}),zm(r,"generateSimpleStrokeDasharray",function(i,s){return"".concat(s,"px ").concat(i-s,"px")}),zm(r,"getStrokeDasharray",function(i,s,l){var c=l.reduce(function(v,y){return v+y});if(!c)return r.generateSimpleStrokeDasharray(s,i);for(var u=Math.floor(i/c),d=i%c,f=s-i,p=[],h=0,m=0;h<l.length;m+=l[h],++h)if(m+l[h]>d){p=[].concat(Qk(l.slice(0,h)),[d-m]);break}var g=p.length%2===0?[0,f]:[f];return[].concat(Qk(t.repeat(l,u)),Qk(p),g).map(function(v){return"".concat(v,"px")}).join(", ")}),zm(r,"id",pc("recharts-line-")),zm(r,"pathRef",function(i){r.mainCurve=i}),zm(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),zm(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return vGt(t,e),pGt(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();this.setState({totalLength:n})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();n!==this.state.totalLength&&this.setState({totalLength:n})}}},{key:"getTotalLength",value:function(){var n=this.mainCurve;try{return n&&n.getTotalLength&&n.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(n,o){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,i=a.points,s=a.xAxis,l=a.yAxis,c=a.layout,u=a.children,d=pa(u,Cg);if(!d)return null;var f=function(m,g){return{x:m.x,y:m.y,value:m.value,errorVal:kn(m.payload,g)}},p={clipPath:n?"url(#clipPath-".concat(o,")"):null};return Vl.default.createElement(Bt,p,d.map(function(h){return Vl.default.cloneElement(h,{key:"bar-".concat(h.props.dataKey),data:i,xAxis:s,yAxis:l,layout:c,dataPointFormatter:f})}))}},{key:"renderDots",value:function(n,o,a){var i=this.props.isAnimationActive;if(i&&!this.state.isAnimationFinished)return null;var s=this.props,l=s.dot,c=s.points,u=s.dataKey,d=nt(this.props,!1),f=nt(l,!0),p=c.map(function(m,g){var v=cf(cf(cf({key:"dot-".concat(g),r:3},d),f),{},{index:g,cx:m.x,cy:m.y,value:m.value,dataKey:u,payload:m.payload,points:c});return t.renderDotItem(l,v)}),h={clipPath:n?"url(#clipPath-".concat(o?"":"dots-").concat(a,")"):null};return Vl.default.createElement(Bt,$O({className:"recharts-line-dots",key:"dots"},h),p)}},{key:"renderCurveStatically",value:function(n,o,a,i){var s=this.props,l=s.type,c=s.layout,u=s.connectNulls,d=s.ref,f=Y$e(s,aGt),p=cf(cf(cf({},nt(f,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:o?"url(#clipPath-".concat(a,")"):null,points:n},i),{},{type:l,layout:c,connectNulls:u});return Vl.default.createElement(nf,$O({},p,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(n,o){var a=this,i=this.props,s=i.points,l=i.strokeDasharray,c=i.isAnimationActive,u=i.animationBegin,d=i.animationDuration,f=i.animationEasing,p=i.animationId,h=i.animateNewValues,m=i.width,g=i.height,v=this.state,y=v.prevPoints,x=v.totalLength;return Vl.default.createElement(Ss,{begin:u,duration:d,isActive:c,easing:f,from:{t:0},to:{t:1},key:"line-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(C){var b=C.t;if(y){var w=y.length/s.length,S=s.map(function(A,z){var V=Math.floor(z*w);if(y[V]){var R=y[V],I=Rn(R.x,A.x),k=Rn(R.y,A.y);return cf(cf({},A),{},{x:I(b),y:k(b)})}if(h){var T=Rn(m*2,A.x),O=Rn(g/2,A.y);return cf(cf({},A),{},{x:T(b),y:O(b)})}return cf(cf({},A),{},{x:A.x,y:A.y})});return a.renderCurveStatically(S,n,o)}var P=Rn(0,x),N=P(b),D;if(l){var E="".concat(l).split(/[,\s]+/gim).map(function(A){return parseFloat(A)});D=a.getStrokeDasharray(N,x,E)}else D=a.generateSimpleStrokeDasharray(x,N);return a.renderCurveStatically(s,n,o,{strokeDasharray:D})})}},{key:"renderCurve",value:function(n,o){var a=this.props,i=a.points,s=a.isAnimationActive,l=this.state,c=l.prevPoints,u=l.totalLength;return s&&i&&i.length&&(!c&&u>0||!(0,r6e.default)(c,i))?this.renderCurveWithAnimation(n,o):this.renderCurveStatically(i,n,o)}},{key:"render",value:function(){var n,o=this.props,a=o.hide,i=o.dot,s=o.points,l=o.className,c=o.xAxis,u=o.yAxis,d=o.top,f=o.left,p=o.width,h=o.height,m=o.isAnimationActive,g=o.id;if(a||!s||!s.length)return null;var v=this.state.isAnimationFinished,y=s.length===1,x=ft("recharts-line",l),C=c&&c.allowDataOverflow,b=u&&u.allowDataOverflow,w=C||b,S=(0,h$.default)(g)?this.id:g,P=(n=nt(i,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},N=P.r,D=N===void 0?3:N,E=P.strokeWidth,A=E===void 0?2:E,z=JH(i)?i:{},V=z.clipDot,R=V===void 0?!0:V,I=D*2+A;return Vl.default.createElement(Bt,{className:x},C||b?Vl.default.createElement("defs",null,Vl.default.createElement("clipPath",{id:"clipPath-".concat(S)},Vl.default.createElement("rect",{x:C?f:f-p/2,y:b?d:d-h/2,width:C?p:p*2,height:b?h:h*2})),!R&&Vl.default.createElement("clipPath",{id:"clipPath-dots-".concat(S)},Vl.default.createElement("rect",{x:f-I/2,y:d-I/2,width:p+I,height:h+I}))):null,!y&&this.renderCurve(w,S),this.renderErrorBar(w,S),(y||i)&&this.renderDots(w,R,S),(!m||v)&&Cs.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(n,o){return n.animationId!==o.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:o.curPoints}:n.points!==o.curPoints?{curPoints:n.points}:null}},{key:"repeat",value:function(n,o){for(var a=n.length%2!==0?[].concat(Qk(n),[0]):n,i=[],s=0;s<o;++s)i=[].concat(Qk(i),Qk(a));return i}},{key:"renderDotItem",value:function(n,o){var a;if(Vl.default.isValidElement(n))a=Vl.default.cloneElement(n,o);else if((0,t6e.default)(n))a=n(o);else{var i=o.key,s=Y$e(o,iGt),l=ft("recharts-line-dot",typeof n!="boolean"?n.className:"");a=Vl.default.createElement(Rp,$O({key:i},s,{className:l}))}return a}}])}(Vl.PureComponent);zm(Um,"displayName","Line");zm(Um,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!Ma.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});zm(Um,"getComposedData",function(e){var t=e.props,r=e.xAxis,n=e.yAxis,o=e.xAxisTicks,a=e.yAxisTicks,i=e.dataKey,s=e.bandSize,l=e.displayedData,c=e.offset,u=t.layout,d=l.map(function(f,p){var h=kn(f,i);return u==="horizontal"?{x:py({axis:r,ticks:o,bandSize:s,entry:f,index:p}),y:(0,h$.default)(h)?null:n.scale(h),value:h,payload:f}:{x:(0,h$.default)(h)?null:r.scale(h),y:py({axis:n,ticks:a,bandSize:s,entry:f,index:p}),value:h,payload:f}});return cf({points:d,layout:u},c)});var Xa=L(ce());var v$=L(zo()),WO=L(Jne()),Tae=L(fc()),c6e=L(YH()),Aae=L(wg());var xGt=["layout","type","stroke","connectNulls","isRange","ref"],bGt=["key"],a6e;function Jk(e){"@babel/helpers - typeof";return Jk=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jk(e)}function i6e(e,t){if(e==null)return{};var r=wGt(e,t),n,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function wGt(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function NS(){return NS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},NS.apply(this,arguments)}function n6e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function s0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?n6e(Object(r),!0).forEach(function(n){Ng(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n6e(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function CGt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o6e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l6e(n.key),n)}}function SGt(e,t,r){return t&&o6e(e.prototype,t),r&&o6e(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function PGt(e,t,r){return t=g$(t),IGt(e,s6e()?Reflect.construct(t,r||[],g$(e).constructor):t.apply(e,r))}function IGt(e,t){if(t&&(Jk(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return RGt(e)}function RGt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function s6e(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(s6e=function(){return!!e})()}function g$(e){return g$=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},g$(e)}function kGt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Mae(e,t)}function Mae(e,t){return Mae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},Mae(e,t)}function Ng(e,t,r){return t=l6e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l6e(e){var t=NGt(e,"string");return Jk(t)=="symbol"?t:t+""}function NGt(e,t){if(Jk(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Jk(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var uf=function(e){function t(){var r;CGt(this,t);for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];return r=PGt(this,t,[].concat(o)),Ng(r,"state",{isAnimationFinished:!0}),Ng(r,"id",pc("recharts-area-")),Ng(r,"handleAnimationEnd",function(){var i=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),(0,v$.default)(i)&&i()}),Ng(r,"handleAnimationStart",function(){var i=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),(0,v$.default)(i)&&i()}),r}return kGt(t,e),SGt(t,[{key:"renderDots",value:function(n,o,a){var i=this.props.isAnimationActive,s=this.state.isAnimationFinished;if(i&&!s)return null;var l=this.props,c=l.dot,u=l.points,d=l.dataKey,f=nt(this.props,!1),p=nt(c,!0),h=u.map(function(g,v){var y=s0(s0(s0({key:"dot-".concat(v),r:3},f),p),{},{index:v,cx:g.x,cy:g.y,dataKey:d,value:g.value,payload:g.payload,points:u});return t.renderDotItem(c,y)}),m={clipPath:n?"url(#clipPath-".concat(o?"":"dots-").concat(a,")"):null};return Xa.default.createElement(Bt,NS({className:"recharts-area-dots"},m),h)}},{key:"renderHorizontalRect",value:function(n){var o=this.props,a=o.baseLine,i=o.points,s=o.strokeWidth,l=i[0].x,c=i[i.length-1].x,u=n*Math.abs(l-c),d=(0,WO.default)(i.map(function(f){return f.y||0}));return Qe(a)&&typeof a=="number"?d=Math.max(a,d):a&&Array.isArray(a)&&a.length&&(d=Math.max((0,WO.default)(a.map(function(f){return f.y||0})),d)),Qe(d)?Xa.default.createElement("rect",{x:l<c?l:l-u,y:0,width:u,height:Math.floor(d+(s?parseInt("".concat(s),10):1))}):null}},{key:"renderVerticalRect",value:function(n){var o=this.props,a=o.baseLine,i=o.points,s=o.strokeWidth,l=i[0].y,c=i[i.length-1].y,u=n*Math.abs(l-c),d=(0,WO.default)(i.map(function(f){return f.x||0}));return Qe(a)&&typeof a=="number"?d=Math.max(a,d):a&&Array.isArray(a)&&a.length&&(d=Math.max((0,WO.default)(a.map(function(f){return f.x||0})),d)),Qe(d)?Xa.default.createElement("rect",{x:0,y:l<c?l:l-u,width:d+(s?parseInt("".concat(s),10):1),height:Math.floor(u)}):null}},{key:"renderClipRect",value:function(n){var o=this.props.layout;return o==="vertical"?this.renderVerticalRect(n):this.renderHorizontalRect(n)}},{key:"renderAreaStatically",value:function(n,o,a,i){var s=this.props,l=s.layout,c=s.type,u=s.stroke,d=s.connectNulls,f=s.isRange,p=s.ref,h=i6e(s,xGt);return Xa.default.createElement(Bt,{clipPath:a?"url(#clipPath-".concat(i,")"):null},Xa.default.createElement(nf,NS({},nt(h,!0),{points:n,connectNulls:d,type:c,baseLine:o,layout:l,stroke:"none",className:"recharts-area-area"})),u!=="none"&&Xa.default.createElement(nf,NS({},nt(this.props,!1),{className:"recharts-area-curve",layout:l,type:c,connectNulls:d,fill:"none",points:n})),u!=="none"&&f&&Xa.default.createElement(nf,NS({},nt(this.props,!1),{className:"recharts-area-curve",layout:l,type:c,connectNulls:d,fill:"none",points:o})))}},{key:"renderAreaWithAnimation",value:function(n,o){var a=this,i=this.props,s=i.points,l=i.baseLine,c=i.isAnimationActive,u=i.animationBegin,d=i.animationDuration,f=i.animationEasing,p=i.animationId,h=this.state,m=h.prevPoints,g=h.prevBaseLine;return Xa.default.createElement(Ss,{begin:u,duration:d,isActive:c,easing:f,from:{t:0},to:{t:1},key:"area-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(v){var y=v.t;if(m){var x=m.length/s.length,C=s.map(function(P,N){var D=Math.floor(N*x);if(m[D]){var E=m[D],A=Rn(E.x,P.x),z=Rn(E.y,P.y);return s0(s0({},P),{},{x:A(y),y:z(y)})}return P}),b;if(Qe(l)&&typeof l=="number"){var w=Rn(g,l);b=w(y)}else if((0,Tae.default)(l)||(0,c6e.default)(l)){var S=Rn(g,0);b=S(y)}else b=l.map(function(P,N){var D=Math.floor(N*x);if(g[D]){var E=g[D],A=Rn(E.x,P.x),z=Rn(E.y,P.y);return s0(s0({},P),{},{x:A(y),y:z(y)})}return P});return a.renderAreaStatically(C,b,n,o)}return Xa.default.createElement(Bt,null,Xa.default.createElement("defs",null,Xa.default.createElement("clipPath",{id:"animationClipPath-".concat(o)},a.renderClipRect(y))),Xa.default.createElement(Bt,{clipPath:"url(#animationClipPath-".concat(o,")")},a.renderAreaStatically(s,l,n,o)))})}},{key:"renderArea",value:function(n,o){var a=this.props,i=a.points,s=a.baseLine,l=a.isAnimationActive,c=this.state,u=c.prevPoints,d=c.prevBaseLine,f=c.totalLength;return l&&i&&i.length&&(!u&&f>0||!(0,Aae.default)(u,i)||!(0,Aae.default)(d,s))?this.renderAreaWithAnimation(n,o):this.renderAreaStatically(i,s,n,o)}},{key:"render",value:function(){var n,o=this.props,a=o.hide,i=o.dot,s=o.points,l=o.className,c=o.top,u=o.left,d=o.xAxis,f=o.yAxis,p=o.width,h=o.height,m=o.isAnimationActive,g=o.id;if(a||!s||!s.length)return null;var v=this.state.isAnimationFinished,y=s.length===1,x=ft("recharts-area",l),C=d&&d.allowDataOverflow,b=f&&f.allowDataOverflow,w=C||b,S=(0,Tae.default)(g)?this.id:g,P=(n=nt(i,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},N=P.r,D=N===void 0?3:N,E=P.strokeWidth,A=E===void 0?2:E,z=JH(i)?i:{},V=z.clipDot,R=V===void 0?!0:V,I=D*2+A;return Xa.default.createElement(Bt,{className:x},C||b?Xa.default.createElement("defs",null,Xa.default.createElement("clipPath",{id:"clipPath-".concat(S)},Xa.default.createElement("rect",{x:C?u:u-p/2,y:b?c:c-h/2,width:C?p:p*2,height:b?h:h*2})),!R&&Xa.default.createElement("clipPath",{id:"clipPath-dots-".concat(S)},Xa.default.createElement("rect",{x:u-I/2,y:c-I/2,width:p+I,height:h+I}))):null,y?null:this.renderArea(w,S),(i||y)&&this.renderDots(w,R,S),(!m||v)&&Cs.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(n,o){return n.animationId!==o.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,curBaseLine:n.baseLine,prevPoints:o.curPoints,prevBaseLine:o.curBaseLine}:n.points!==o.curPoints||n.baseLine!==o.curBaseLine?{curPoints:n.points,curBaseLine:n.baseLine}:null}}])}(Xa.PureComponent);a6e=uf;Ng(uf,"displayName","Area");Ng(uf,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Ma.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});Ng(uf,"getBaseValue",function(e,t,r,n){var o=e.layout,a=e.baseValue,i=t.props.baseValue,s=i??a;if(Qe(s)&&typeof s=="number")return s;var l=o==="horizontal"?n:r,c=l.scale.domain();if(l.type==="number"){var u=Math.max(c[0],c[1]),d=Math.min(c[0],c[1]);return s==="dataMin"?d:s==="dataMax"||u<0?u:Math.max(Math.min(c[0],c[1]),0)}return s==="dataMin"?c[0]:s==="dataMax"?c[1]:c[0]});Ng(uf,"getComposedData",function(e){var t=e.props,r=e.item,n=e.xAxis,o=e.yAxis,a=e.xAxisTicks,i=e.yAxisTicks,s=e.bandSize,l=e.dataKey,c=e.stackedData,u=e.dataStartIndex,d=e.displayedData,f=e.offset,p=t.layout,h=c&&c.length,m=a6e.getBaseValue(t,r,n,o),g=p==="horizontal",v=!1,y=d.map(function(C,b){var w;h?w=c[u+b]:(w=kn(C,l),Array.isArray(w)?v=!0:w=[m,w]);var S=w[1]==null||h&&kn(C,l)==null;return g?{x:py({axis:n,ticks:a,bandSize:s,entry:C,index:b}),y:S?null:o.scale(w[1]),value:w,payload:C}:{x:S?null:n.scale(w[1]),y:py({axis:o,ticks:i,bandSize:s,entry:C,index:b}),value:w,payload:C}}),x;return h||v?x=y.map(function(C){var b=Array.isArray(C.value)?C.value[0]:null;return g?{x:C.x,y:b!=null&&C.y!=null?o.scale(b):null}:{x:b!=null?n.scale(b):null,y:C.y}}):x=g?o.scale(m):n.scale(m),s0({points:y,baseLine:x,layout:p,isRange:v},f)});Ng(uf,"renderDotItem",function(e,t){var r;if(Xa.default.isValidElement(e))r=Xa.default.cloneElement(e,t);else if((0,v$.default)(e))r=e(t);else{var n=ft("recharts-area-dot",typeof e!="boolean"?e.className:""),o=t.key,a=i6e(t,bGt);r=Xa.default.createElement(Rp,NS({},a,{key:o,className:n}))}return r});var zl=L(ce());var MS=L(fc()),b6e=L(wg()),w6e=L(zo());var m6e=L(ce());function eN(e){"@babel/helpers - typeof";return eN=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},eN(e)}function MGt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u6e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,p6e(n.key),n)}}function TGt(e,t,r){return t&&u6e(e.prototype,t),r&&u6e(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function AGt(e,t,r){return t=y$(t),LGt(e,d6e()?Reflect.construct(t,r||[],y$(e).constructor):t.apply(e,r))}function LGt(e,t){if(t&&(eN(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return EGt(e)}function EGt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d6e(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(d6e=function(){return!!e})()}function y$(e){return y$=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},y$(e)}function DGt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Lae(e,t)}function Lae(e,t){return Lae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},Lae(e,t)}function f6e(e,t,r){return t=p6e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p6e(e){var t=OGt(e,"string");return eN(t)=="symbol"?t:t+""}function OGt(e,t){if(eN(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(eN(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var tN=function(e){function t(){return MGt(this,t),AGt(this,t,arguments)}return DGt(t,e),TGt(t,[{key:"render",value:function(){return null}}])}(m6e.Component);f6e(tN,"displayName","ZAxis");f6e(tN,"defaultProps",{zAxisId:0,range:[64,64],scale:"auto",type:"number"});var x$=L(ce());var _Gt=["option","isActive"];function GO(){return GO=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},GO.apply(this,arguments)}function FGt(e,t){if(e==null)return{};var r=BGt(e,t),n,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function BGt(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function h6e(e){var t=e.option,r=e.isActive,n=FGt(e,_Gt);return typeof t=="string"?x$.createElement(vy,GO({option:x$.createElement(JC,GO({type:t},n)),isActive:r,shapeType:"symbols"},n)):x$.createElement(vy,GO({option:t,isActive:r,shapeType:"symbols"},n))}var VGt;function rN(e){"@babel/helpers - typeof";return rN=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rN(e)}function KO(){return KO=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},KO.apply(this,arguments)}function g6e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Ap(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?g6e(Object(r),!0).forEach(function(n){l0(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g6e(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zGt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v6e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,x6e(n.key),n)}}function UGt(e,t,r){return t&&v6e(e.prototype,t),r&&v6e(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function HGt(e,t,r){return t=b$(t),jGt(e,y6e()?Reflect.construct(t,r||[],b$(e).constructor):t.apply(e,r))}function jGt(e,t){if(t&&(rN(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return qGt(e)}function qGt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y6e(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(y6e=function(){return!!e})()}function b$(e){return b$=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},b$(e)}function $Gt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Eae(e,t)}function Eae(e,t){return Eae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},Eae(e,t)}function l0(e,t,r){return t=x6e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function x6e(e){var t=WGt(e,"string");return rN(t)=="symbol"?t:t+""}function WGt(e,t){if(rN(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(rN(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var wy=function(e){function t(){var r;zGt(this,t);for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];return r=HGt(this,t,[].concat(o)),l0(r,"state",{isAnimationFinished:!1}),l0(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0})}),l0(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1})}),l0(r,"id",pc("recharts-scatter-")),r}return $Gt(t,e),UGt(t,[{key:"renderSymbolsStatically",value:function(n){var o=this,a=this.props,i=a.shape,s=a.activeShape,l=a.activeIndex,c=nt(this.props,!1);return n.map(function(u,d){var f=l===d,p=f?s:i,h=Ap(Ap({},c),u);return zl.default.createElement(Bt,KO({className:"recharts-scatter-symbol",key:"symbol-".concat(u?.cx,"-").concat(u?.cy,"-").concat(u?.size,"-").concat(d)},dl(o.props,u,d),{role:"img"}),zl.default.createElement(h6e,KO({option:p,isActive:f,key:"symbol-".concat(d)},h)))})}},{key:"renderSymbolsWithAnimation",value:function(){var n=this,o=this.props,a=o.points,i=o.isAnimationActive,s=o.animationBegin,l=o.animationDuration,c=o.animationEasing,u=o.animationId,d=this.state.prevPoints;return zl.default.createElement(Ss,{begin:s,duration:l,isActive:i,easing:c,from:{t:0},to:{t:1},key:"pie-".concat(u),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(f){var p=f.t,h=a.map(function(m,g){var v=d&&d[g];if(v){var y=Rn(v.cx,m.cx),x=Rn(v.cy,m.cy),C=Rn(v.size,m.size);return Ap(Ap({},m),{},{cx:y(p),cy:x(p),size:C(p)})}var b=Rn(0,m.size);return Ap(Ap({},m),{},{size:b(p)})});return zl.default.createElement(Bt,null,n.renderSymbolsStatically(h))})}},{key:"renderSymbols",value:function(){var n=this.props,o=n.points,a=n.isAnimationActive,i=this.state.prevPoints;return a&&o&&o.length&&(!i||!(0,b6e.default)(i,o))?this.renderSymbolsWithAnimation():this.renderSymbolsStatically(o)}},{key:"renderErrorBar",value:function(){var n=this.props.isAnimationActive;if(n&&!this.state.isAnimationFinished)return null;var o=this.props,a=o.points,i=o.xAxis,s=o.yAxis,l=o.children,c=pa(l,Cg);return c?c.map(function(u,d){var f=u.props,p=f.direction,h=f.dataKey;return zl.default.cloneElement(u,{key:"".concat(p,"-").concat(h,"-").concat(a[d]),data:a,xAxis:i,yAxis:s,layout:p==="x"?"vertical":"horizontal",dataPointFormatter:function(g,v){return{x:g.cx,y:g.cy,value:p==="x"?+g.node.x:+g.node.y,errorVal:kn(g,v)}}})}):null}},{key:"renderLine",value:function(){var n=this.props,o=n.points,a=n.line,i=n.lineType,s=n.lineJointType,l=nt(this.props,!1),c=nt(a,!1),u,d;if(i==="joint")u=o.map(function(x){return{x:x.cx,y:x.cy}});else if(i==="fitting"){var f=D2e(o),p=f.xmin,h=f.xmax,m=f.a,g=f.b,v=function(C){return m*C+g};u=[{x:p,y:v(p)},{x:h,y:v(h)}]}var y=Ap(Ap(Ap({},l),{},{fill:"none",stroke:l&&l.fill},c),{},{points:u});return zl.default.isValidElement(a)?d=zl.default.cloneElement(a,y):(0,w6e.default)(a)?d=a(y):d=zl.default.createElement(nf,KO({},y,{type:s})),zl.default.createElement(Bt,{className:"recharts-scatter-line",key:"recharts-scatter-line"},d)}},{key:"render",value:function(){var n=this.props,o=n.hide,a=n.points,i=n.line,s=n.className,l=n.xAxis,c=n.yAxis,u=n.left,d=n.top,f=n.width,p=n.height,h=n.id,m=n.isAnimationActive;if(o||!a||!a.length)return null;var g=this.state.isAnimationFinished,v=ft("recharts-scatter",s),y=l&&l.allowDataOverflow,x=c&&c.allowDataOverflow,C=y||x,b=(0,MS.default)(h)?this.id:h;return zl.default.createElement(Bt,{className:v,clipPath:C?"url(#clipPath-".concat(b,")"):null},y||x?zl.default.createElement("defs",null,zl.default.createElement("clipPath",{id:"clipPath-".concat(b)},zl.default.createElement("rect",{x:y?u:u-f/2,y:x?d:d-p/2,width:y?f:f*2,height:x?p:p*2}))):null,i&&this.renderLine(),this.renderErrorBar(),zl.default.createElement(Bt,{key:"recharts-scatter-symbols"},this.renderSymbols()),(!m||g)&&Cs.renderCallByParent(this.props,a))}}],[{key:"getDerivedStateFromProps",value:function(n,o){return n.animationId!==o.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:o.curPoints}:n.points!==o.curPoints?{curPoints:n.points}:null}}])}(zl.PureComponent);VGt=wy;l0(wy,"displayName","Scatter");l0(wy,"defaultProps",{xAxisId:0,yAxisId:0,zAxisId:0,legendType:"circle",lineType:"joint",lineJointType:"linear",data:[],shape:"circle",hide:!1,isAnimationActive:!Ma.isSsr,animationBegin:0,animationDuration:400,animationEasing:"linear"});l0(wy,"getComposedData",function(e){var t=e.xAxis,r=e.yAxis,n=e.zAxis,o=e.item,a=e.displayedData,i=e.xAxisTicks,s=e.yAxisTicks,l=e.offset,c=o.props.tooltipType,u=pa(o.props.children,Wu),d=(0,MS.default)(t.dataKey)?o.props.dataKey:t.dataKey,f=(0,MS.default)(r.dataKey)?o.props.dataKey:r.dataKey,p=n&&n.dataKey,h=n?n.range:tN.defaultProps.range,m=h&&h[0],g=t.scale.bandwidth?t.scale.bandwidth():0,v=r.scale.bandwidth?r.scale.bandwidth():0,y=a.map(function(x,C){var b=kn(x,d),w=kn(x,f),S=!(0,MS.default)(p)&&kn(x,p)||"-",P=[{name:(0,MS.default)(t.dataKey)?o.props.name:t.name||t.dataKey,unit:t.unit||"",value:b,payload:x,dataKey:d,type:c},{name:(0,MS.default)(r.dataKey)?o.props.name:r.name||r.dataKey,unit:r.unit||"",value:w,payload:x,dataKey:f,type:c}];S!=="-"&&P.push({name:n.name||n.dataKey,unit:n.unit||"",value:S,payload:x,dataKey:p,type:c});var N=py({axis:t,ticks:i,bandSize:g,entry:x,index:C,dataKey:d}),D=py({axis:r,ticks:s,bandSize:v,entry:x,index:C,dataKey:f}),E=S!=="-"?n.scale(S):m,A=Math.sqrt(Math.max(E,0)/Math.PI);return Ap(Ap({},x),{},{cx:N,cy:D,x:N-A,y:D-A,xAxis:t,yAxis:r,zAxis:n,width:2*A,height:2*A,size:E,node:{x:b,y:w,z:S},tooltipPayload:P,tooltipPosition:{x:N,y:D},payload:x},u&&u[C]&&u[C].props)});return Ap({points:y},l)});var XO=L(ce());function nN(e){"@babel/helpers - typeof";return nN=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nN(e)}function GGt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function C6e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,I6e(n.key),n)}}function KGt(e,t,r){return t&&C6e(e.prototype,t),r&&C6e(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function XGt(e,t,r){return t=w$(t),YGt(e,S6e()?Reflect.construct(t,r||[],w$(e).constructor):t.apply(e,r))}function YGt(e,t){if(t&&(nN(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return QGt(e)}function QGt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function S6e(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(S6e=function(){return!!e})()}function w$(e){return w$=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},w$(e)}function ZGt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Dae(e,t)}function Dae(e,t){return Dae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},Dae(e,t)}function P6e(e,t,r){return t=I6e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function I6e(e){var t=JGt(e,"string");return nN(t)=="symbol"?t:t+""}function JGt(e,t){if(nN(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(nN(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Oae(){return Oae=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Oae.apply(this,arguments)}function e8t(e){var t=e.xAxisId,r=zk(),n=Uk(),o=n$(t);return o==null?null:XO.createElement(by,Oae({},o,{className:ft("recharts-".concat(o.axisType," ").concat(o.axisType),o.className),viewBox:{x:0,y:0,width:r,height:n},ticksGenerator:function(i){return rf(i,!0)}}))}var Is=function(e){function t(){return GGt(this,t),XGt(this,t,arguments)}return ZGt(t,e),KGt(t,[{key:"render",value:function(){return XO.createElement(e8t,this.props)}}])}(XO.Component);P6e(Is,"displayName","XAxis");P6e(Is,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});var YO=L(ce());function oN(e){"@babel/helpers - typeof";return oN=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oN(e)}function t8t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function R6e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,M6e(n.key),n)}}function r8t(e,t,r){return t&&R6e(e.prototype,t),r&&R6e(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function n8t(e,t,r){return t=C$(t),o8t(e,k6e()?Reflect.construct(t,r||[],C$(e).constructor):t.apply(e,r))}function o8t(e,t){if(t&&(oN(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return a8t(e)}function a8t(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function k6e(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(k6e=function(){return!!e})()}function C$(e){return C$=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},C$(e)}function i8t(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_ae(e,t)}function _ae(e,t){return _ae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},_ae(e,t)}function N6e(e,t,r){return t=M6e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function M6e(e){var t=s8t(e,"string");return oN(t)=="symbol"?t:t+""}function s8t(e,t){if(oN(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(oN(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Fae(){return Fae=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Fae.apply(this,arguments)}var l8t=function(t){var r=t.yAxisId,n=zk(),o=Uk(),a=o$(r);return a==null?null:YO.createElement(by,Fae({},a,{className:ft("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:n,height:o},ticksGenerator:function(s){return rf(s,!0)}}))},Rs=function(e){function t(){return t8t(this,t),n8t(this,t,arguments)}return i8t(t,e),r8t(t,[{key:"render",value:function(){return YO.createElement(l8t,this.props)}}])}(YO.Component);N6e(Rs,"displayName","YAxis");N6e(Rs,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});var po=L(ce()),sN=L(fc()),Hm=L(zo()),A$=L(oae()),lN=L($b()),Z6e=L(Cj()),J6e=L(pne());function T6e(e){return f8t(e)||d8t(e)||u8t(e)||c8t()}function c8t(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
310
310
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function u8t(e,t){if(e){if(typeof e=="string")return Bae(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Bae(e,t)}}function d8t(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function f8t(e){if(Array.isArray(e))return Bae(e)}function Bae(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var S$=function(t,r,n,o,a){var i=pa(t,xy),s=pa(t,HO),l=[].concat(T6e(i),T6e(s)),c=pa(t,i0),u="".concat(o,"Id"),d=o[0],f=r;if(l.length&&(f=l.reduce(function(m,g){if(g.props[u]===n&&Qu(g.props,"extendDomain")&&Qe(g.props[d])){var v=g.props[d];return[Math.min(m[0],v),Math.max(m[1],v)]}return m},f)),c.length){var p="".concat(d,"1"),h="".concat(d,"2");f=c.reduce(function(m,g){if(g.props[u]===n&&Qu(g.props,"extendDomain")&&Qe(g.props[p])&&Qe(g.props[h])){var v=g.props[p],y=g.props[h];return[Math.min(m[0],v,y),Math.max(m[1],v,y)]}return m},f)}return a&&a.length&&(f=a.reduce(function(m,g){return Qe(g)?[Math.min(m[0],g),Math.max(m[1],g)]:m},f)),f};var E6e=L(L6e()),I$=new E6e.default;var R$="recharts.syncMouseEvents";function ZO(e){"@babel/helpers - typeof";return ZO=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ZO(e)}function h8t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function D6e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,O6e(n.key),n)}}function g8t(e,t,r){return t&&D6e(e.prototype,t),r&&D6e(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function zae(e,t,r){return t=O6e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function O6e(e){var t=v8t(e,"string");return ZO(t)=="symbol"?t:t+""}function v8t(e,t){if(ZO(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ZO(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var _6e=function(){function e(){h8t(this,e),zae(this,"activeIndex",0),zae(this,"coordinateList",[]),zae(this,"layout","horizontal")}return g8t(e,[{key:"setDetails",value:function(r){var n,o=r.coordinateList,a=o===void 0?null:o,i=r.container,s=i===void 0?null:i,l=r.layout,c=l===void 0?null:l,u=r.offset,d=u===void 0?null:u,f=r.mouseHandlerCallback,p=f===void 0?null:f;this.coordinateList=(n=a??this.coordinateList)!==null&&n!==void 0?n:[],this.container=s??this.container,this.layout=c??this.layout,this.offset=d??this.offset,this.mouseHandlerCallback=p??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(r){if(this.coordinateList.length!==0)switch(r.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}default:break}}},{key:"setIndex",value:function(r){this.activeIndex=r}},{key:"spoofMouse",value:function(){var r,n;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var o=this.container.getBoundingClientRect(),a=o.x,i=o.y,s=o.height,l=this.coordinateList[this.activeIndex].coordinate,c=((r=window)===null||r===void 0?void 0:r.scrollX)||0,u=((n=window)===null||n===void 0?void 0:n.scrollY)||0,d=a+l+c,f=i+this.offset.top+s/2+u;this.mouseHandlerCallback({pageX:d,pageY:f})}}}])}();function F6e(e,t,r){if(r==="number"&&t===!0&&Array.isArray(e)){var n=e?.[0],o=e?.[1];if(n&&o&&Qe(n)&&Qe(o))return!0}return!1}var aN=L(ce());function B6e(e,t,r,n){var o=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-o:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-o,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function k$(e){var t=e.cx,r=e.cy,n=e.radius,o=e.startAngle,a=e.endAngle,i=Hr(t,r,n,o),s=Hr(t,r,n,a);return{points:[i,s],cx:t,cy:r,radius:n,startAngle:o,endAngle:a}}function V6e(e,t,r){var n,o,a,i;if(e==="horizontal")n=t.x,a=n,o=r.top,i=r.top+r.height;else if(e==="vertical")o=t.y,i=o,n=r.left,a=r.left+r.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var s=t.cx,l=t.cy,c=t.innerRadius,u=t.outerRadius,d=t.angle,f=Hr(s,l,c,d),p=Hr(s,l,u,d);n=f.x,o=f.y,a=p.x,i=p.y}else return k$(t);return[{x:n,y:o},{x:a,y:i}]}function JO(e){"@babel/helpers - typeof";return JO=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},JO(e)}function z6e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function N$(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?z6e(Object(r),!0).forEach(function(n){y8t(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):z6e(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function y8t(e,t,r){return t=x8t(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function x8t(e){var t=b8t(e,"string");return JO(t)=="symbol"?t:t+""}function b8t(e,t){if(JO(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(JO(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function U6e(e){var t,r,n=e.element,o=e.tooltipEventType,a=e.isActive,i=e.activeCoordinate,s=e.activePayload,l=e.offset,c=e.activeTooltipIndex,u=e.tooltipAxisBandSize,d=e.layout,f=e.chartName,p=(t=n.props.cursor)!==null&&t!==void 0?t:(r=n.type.defaultProps)===null||r===void 0?void 0:r.cursor;if(!n||!p||!a||!i||f!=="ScatterChart"&&o!=="axis")return null;var h,m=nf;if(f==="ScatterChart")h=i,m=qHe;else if(f==="BarChart")h=B6e(d,i,l,u),m=Ik;else if(d==="radial"){var g=k$(i),v=g.cx,y=g.cy,x=g.radius,C=g.startAngle,b=g.endAngle;h={cx:v,cy:y,startAngle:C,endAngle:b,innerRadius:x,outerRadius:x},m=Tq}else h={points:V6e(d,i,l)},m=nf;var w=N$(N$(N$(N$({stroke:"#ccc",pointerEvents:"none"},l),h),nt(p,!1)),{},{payload:s,payloadIndex:c,className:ft("recharts-tooltip-cursor",p.className)});return(0,aN.isValidElement)(p)?(0,aN.cloneElement)(p,w):(0,aN.createElement)(m,w)}var w8t=["item"],C8t=["children","className","width","height","style","compact","title","desc"];function cN(e){"@babel/helpers - typeof";return cN=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cN(e)}function iN(){return iN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},iN.apply(this,arguments)}function H6e(e,t){return I8t(e)||P8t(e,t)||Y6e(e,t)||S8t()}function S8t(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
311
311
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function P8t(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,a,i,s=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(u){c=!0,o=u}finally{try{if(!l&&r.return!=null&&(i=r.return(),Object(i)!==i))return}finally{if(c)throw o}}return s}}function I8t(e){if(Array.isArray(e))return e}function j6e(e,t){if(e==null)return{};var r=R8t(e,t),n,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function R8t(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function k8t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function q6e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Q6e(n.key),n)}}function N8t(e,t,r){return t&&q6e(e.prototype,t),r&&q6e(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function M8t(e,t,r){return t=T$(t),T8t(e,X6e()?Reflect.construct(t,r||[],T$(e).constructor):t.apply(e,r))}function T8t(e,t){if(t&&(cN(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return A8t(e)}function A8t(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function X6e(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(X6e=function(){return!!e})()}function T$(e){return T$=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},T$(e)}function L8t(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Uae(e,t)}function Uae(e,t){return Uae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},Uae(e,t)}function uN(e){return O8t(e)||D8t(e)||Y6e(e)||E8t()}function E8t(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
312
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Y6e(e,t){if(e){if(typeof e=="string")return Hae(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Hae(e,t)}}function D8t(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function O8t(e){if(Array.isArray(e))return Hae(e)}function Hae(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function $6e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function He(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$6e(Object(r),!0).forEach(function(n){br(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$6e(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function br(e,t,r){return t=Q6e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Q6e(e){var t=_8t(e,"string");return cN(t)=="symbol"?t:t+""}function _8t(e,t){if(cN(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(cN(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var F8t={xAxis:["bottom","top"],yAxis:["left","right"]},B8t={width:"100%",height:"100%"},eWe={x:0,y:0};function M$(e){return e}var V8t=function(t,r){return r==="horizontal"?t.x:r==="vertical"?t.y:r==="centric"?t.angle:t.radius},z8t=function(t,r,n,o){var a=r.find(function(u){return u&&u.index===n});if(a){if(t==="horizontal")return{x:a.coordinate,y:o.y};if(t==="vertical")return{x:o.x,y:a.coordinate};if(t==="centric"){var i=a.coordinate,s=o.radius;return He(He(He({},o),Hr(o.cx,o.cy,s,i)),{},{angle:i,radius:s})}var l=a.coordinate,c=o.angle;return He(He(He({},o),Hr(o.cx,o.cy,l,c)),{},{angle:c,radius:l})}return eWe},L$=function(t,r){var n=r.graphicalItems,o=r.dataStartIndex,a=r.dataEndIndex,i=(n??[]).reduce(function(s,l){var c=l.props.data;return c&&c.length?[].concat(uN(s),uN(c)):s},[]);return i.length>0?i:t&&t.length&&Qe(o)&&Qe(a)?t.slice(o,a+1):[]};function tWe(e){return e==="number"?[0,"auto"]:void 0}var jae=function(t,r,n,o){var a=t.graphicalItems,i=t.tooltipAxis,s=L$(r,t);return n<0||!a||!a.length||n>=s.length?null:a.reduce(function(l,c){var u,d=(u=c.props.data)!==null&&u!==void 0?u:r;d&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(d=d.slice(t.dataStartIndex,t.dataEndIndex+1));var f;if(i.dataKey&&!i.allowDuplicatedCategory){var p=d===void 0?s:d;f=LR(p,i.dataKey,o)}else f=d&&d[n]||s[n];return f?[].concat(uN(l),[wk(c,f)]):l},[])},W6e=function(t,r,n,o){var a=o||{x:t.chartX,y:t.chartY},i=V8t(a,n),s=t.orderedTooltipTicks,l=t.tooltipAxis,c=t.tooltipTicks,u=y5e(i,s,c,l);if(u>=0&&c){var d=c[u]&&c[u].value,f=jae(t,r,u,d),p=z8t(n,s,u,a);return{activeTooltipIndex:u,activeLabel:d,activePayload:f,activeCoordinate:p}}return null},U8t=function(t,r){var n=r.axes,o=r.graphicalItems,a=r.axisType,i=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,c=r.dataEndIndex,u=t.layout,d=t.children,f=t.stackOffset,p=yoe(u,a);return n.reduce(function(h,m){var g,v=m.type.defaultProps!==void 0?He(He({},m.type.defaultProps),m.props):m.props,y=v.type,x=v.dataKey,C=v.allowDataOverflow,b=v.allowDuplicatedCategory,w=v.scale,S=v.ticks,P=v.includeHidden,N=v[i];if(h[N])return h;var D=L$(t.data,{graphicalItems:o.filter(function(M){var j,H=i in M.props?M.props[i]:(j=M.type.defaultProps)===null||j===void 0?void 0:j[i];return H===N}),dataStartIndex:l,dataEndIndex:c}),E=D.length,A,z,V;F6e(v.domain,C,y)&&(A=Iq(v.domain,null,C),p&&(y==="number"||w!=="auto")&&(V=yk(D,x,"category")));var R=tWe(y);if(!A||A.length===0){var I,k=(I=v.domain)!==null&&I!==void 0?I:R;if(x){if(A=yk(D,x,y),y==="category"&&p){var T=E2e(A);b&&T?(z=A,A=(0,A$.default)(0,E)):b||(A=woe(k,A,m).reduce(function(M,j){return M.indexOf(j)>=0?M:[].concat(uN(M),[j])},[]))}else if(y==="category")b?A=A.filter(function(M){return M!==""&&!(0,sN.default)(M)}):A=woe(k,A,m).reduce(function(M,j){return M.indexOf(j)>=0||j===""||(0,sN.default)(j)?M:[].concat(uN(M),[j])},[]);else if(y==="number"){var O=S5e(D,o.filter(function(M){var j,H,q=i in M.props?M.props[i]:(j=M.type.defaultProps)===null||j===void 0?void 0:j[i],G="hide"in M.props?M.props.hide:(H=M.type.defaultProps)===null||H===void 0?void 0:H.hide;return q===N&&(P||!G)}),x,a,u);O&&(A=O)}p&&(y==="number"||w!=="auto")&&(V=yk(D,x,"category"))}else p?A=(0,A$.default)(0,E):s&&s[N]&&s[N].hasStack&&y==="number"?A=f==="expand"?[0,1]:boe(s[N].stackGroups,l,c):A=voe(D,o.filter(function(M){var j=i in M.props?M.props[i]:M.type.defaultProps[i],H="hide"in M.props?M.props.hide:M.type.defaultProps.hide;return j===N&&(P||!H)}),y,u,!0);if(y==="number")A=S$(d,A,N,a,S),k&&(A=Iq(k,A,C));else if(y==="category"&&k){var F=k,_=A.every(function(M){return F.indexOf(M)>=0});_&&(A=F)}}return He(He({},h),{},br({},N,He(He({},v),{},{axisType:a,domain:A,categoricalDomain:V,duplicateDomain:z,originalDomain:(g=v.domain)!==null&&g!==void 0?g:R,isCategorical:p,layout:u})))},{})},H8t=function(t,r){var n=r.graphicalItems,o=r.Axis,a=r.axisType,i=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,c=r.dataEndIndex,u=t.layout,d=t.children,f=L$(t.data,{graphicalItems:n,dataStartIndex:l,dataEndIndex:c}),p=f.length,h=yoe(u,a),m=-1;return n.reduce(function(g,v){var y=v.type.defaultProps!==void 0?He(He({},v.type.defaultProps),v.props):v.props,x=y[i],C=tWe("number");if(!g[x]){m++;var b;return h?b=(0,A$.default)(0,p):s&&s[x]&&s[x].hasStack?(b=boe(s[x].stackGroups,l,c),b=S$(d,b,x,a)):(b=Iq(C,voe(f,n.filter(function(w){var S,P,N=i in w.props?w.props[i]:(S=w.type.defaultProps)===null||S===void 0?void 0:S[i],D="hide"in w.props?w.props.hide:(P=w.type.defaultProps)===null||P===void 0?void 0:P.hide;return N===x&&!D}),"number",u),o.defaultProps.allowDataOverflow),b=S$(d,b,x,a)),He(He({},g),{},br({},x,He(He({axisType:a},o.defaultProps),{},{hide:!0,orientation:(0,lN.default)(F8t,"".concat(a,".").concat(m%2),null),domain:b,originalDomain:C,isCategorical:h,layout:u})))}return g},{})},j8t=function(t,r){var n=r.axisType,o=n===void 0?"xAxis":n,a=r.AxisComp,i=r.graphicalItems,s=r.stackGroups,l=r.dataStartIndex,c=r.dataEndIndex,u=t.children,d="".concat(o,"Id"),f=pa(u,a),p={};return f&&f.length?p=U8t(t,{axes:f,graphicalItems:i,axisType:o,axisIdKey:d,stackGroups:s,dataStartIndex:l,dataEndIndex:c}):i&&i.length&&(p=H8t(t,{Axis:a,graphicalItems:i,axisType:o,axisIdKey:d,stackGroups:s,dataStartIndex:l,dataEndIndex:c})),p},q8t=function(t){var r=pg(t),n=rf(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:(0,Z6e.default)(n,function(o){return o.coordinate}),tooltipAxis:r,tooltipAxisBandSize:bk(r,n)}},G6e=function(t){var r=t.children,n=t.defaultShowTooltip,o=mc(r,Tp),a=0,i=0;return t.data&&t.data.length!==0&&(i=t.data.length-1),o&&o.props&&(o.props.startIndex>=0&&(a=o.props.startIndex),o.props.endIndex>=0&&(i=o.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:i,activeTooltipIndex:-1,isTooltipActive:!!n}},$8t=function(t){return!t||!t.length?!1:t.some(function(r){var n=xp(r&&r.type);return n&&n.indexOf("Bar")>=0})},K6e=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},W8t=function(t,r){var n=t.props,o=t.graphicalItems,a=t.xAxisMap,i=a===void 0?{}:a,s=t.yAxisMap,l=s===void 0?{}:s,c=n.width,u=n.height,d=n.children,f=n.margin||{},p=mc(d,Tp),h=mc(d,yi),m=Object.keys(l).reduce(function(b,w){var S=l[w],P=S.orientation;return!S.mirror&&!S.hide?He(He({},b),{},br({},P,b[P]+S.width)):b},{left:f.left||0,right:f.right||0}),g=Object.keys(i).reduce(function(b,w){var S=i[w],P=S.orientation;return!S.mirror&&!S.hide?He(He({},b),{},br({},P,(0,lN.default)(b,"".concat(P))+S.height)):b},{top:f.top||0,bottom:f.bottom||0}),v=He(He({},g),m),y=v.bottom;p&&(v.bottom+=p.props.height||Tp.defaultProps.height),h&&r&&(v=w5e(v,o,n,r));var x=c-v.left-v.right,C=u-v.top-v.bottom;return He(He({brushBottom:y},v),{},{width:Math.max(x,0),height:Math.max(C,0)})},G8t=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},Zu=function(t){var r=t.chartName,n=t.GraphicalChild,o=t.defaultTooltipEventType,a=o===void 0?"axis":o,i=t.validateTooltipEventTypes,s=i===void 0?["axis"]:i,l=t.axisComponents,c=t.legendContent,u=t.formatAxisMap,d=t.defaultProps,f=function(v,y){var x=y.graphicalItems,C=y.stackGroups,b=y.offset,w=y.updateId,S=y.dataStartIndex,P=y.dataEndIndex,N=v.barSize,D=v.layout,E=v.barGap,A=v.barCategoryGap,z=v.maxBarSize,V=K6e(D),R=V.numericAxisName,I=V.cateAxisName,k=$8t(x),T=[];return x.forEach(function(O,F){var _=L$(v.data,{graphicalItems:[O],dataStartIndex:S,dataEndIndex:P}),M=O.type.defaultProps!==void 0?He(He({},O.type.defaultProps),O.props):O.props,j=M.dataKey,H=M.maxBarSize,q=M["".concat(R,"Id")],G=M["".concat(I,"Id")],U={},K=l.reduce(function(ee,re){var Le,Ie,pe=y["".concat(re.axisType,"Map")],ne=M["".concat(re.axisType,"Id")];pe&&pe[ne]||re.axisType==="zAxis"||Em(!1);var xe=pe[ne];return He(He({},ee),{},br(br({},re.axisType,xe),"".concat(re.axisType,"Ticks"),rf(xe)))},U),Y=K[I],Q=K["".concat(I,"Ticks")],ae=C&&C[q]&&C[q].hasStack&&I5e(O,C[q].stackGroups),oe=xp(O.type).indexOf("Bar")>=0,Ae=bk(Y,Q),Se=[],Oe=k&&x5e({barSize:N,stackGroups:C,totalSize:G8t(K,I)});if(oe){var me,Pe,ye=(0,sN.default)(H)?z:H,we=(me=(Pe=bk(Y,Q,!0))!==null&&Pe!==void 0?Pe:ye)!==null&&me!==void 0?me:0;Se=b5e({barGap:E,barCategoryGap:A,bandSize:we!==Ae?we:Ae,sizeList:Oe[G],maxBarSize:ye}),we!==Ae&&(Se=Se.map(function(ee){return He(He({},ee),{},{position:He(He({},ee.position),{},{offset:ee.position.offset-we/2})})}))}var $=O&&O.type&&O.type.getComposedData;$&&T.push({props:He(He({},$(He(He({},K),{},{displayedData:_,props:v,dataKey:j,item:O,bandSize:Ae,barPosition:Se,offset:b,stackedData:ae,layout:D,dataStartIndex:S,dataEndIndex:P}))),{},br(br(br({key:O.key||"item-".concat(F)},R,K[R]),I,K[I]),"animationId",w)),childIndex:K2e(O,v.children),item:O})}),T},p=function(v,y){var x=v.props,C=v.dataStartIndex,b=v.dataEndIndex,w=v.updateId;if(!Hte({props:x}))return null;var S=x.children,P=x.layout,N=x.stackOffset,D=x.data,E=x.reverseStackOrder,A=K6e(P),z=A.numericAxisName,V=A.cateAxisName,R=pa(S,n),I=P5e(D,R,"".concat(z,"Id"),"".concat(V,"Id"),N,E),k=l.reduce(function(M,j){var H="".concat(j.axisType,"Map");return He(He({},M),{},br({},H,j8t(x,He(He({},j),{},{graphicalItems:R,stackGroups:j.axisType===z&&I,dataStartIndex:C,dataEndIndex:b}))))},{}),T=W8t(He(He({},k),{},{props:x,graphicalItems:R}),y?.legendBBox);Object.keys(k).forEach(function(M){k[M]=u(x,k[M],T,M.replace("Map",""),r)});var O=k["".concat(V,"Map")],F=q8t(O),_=f(x,He(He({},k),{},{dataStartIndex:C,dataEndIndex:b,updateId:w,graphicalItems:R,stackGroups:I,offset:T}));return He(He({formattedGraphicalItems:_,graphicalItems:R,offset:T,stackGroups:I},F),k)},h=function(g){function v(y){var x,C,b;return k8t(this,v),b=M8t(this,v,[y]),br(b,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),br(b,"accessibilityManager",new _6e),br(b,"handleLegendBBoxUpdate",function(w){if(w){var S=b.state,P=S.dataStartIndex,N=S.dataEndIndex,D=S.updateId;b.setState(He({legendBBox:w},p({props:b.props,dataStartIndex:P,dataEndIndex:N,updateId:D},He(He({},b.state),{},{legendBBox:w}))))}}),br(b,"handleReceiveSyncEvent",function(w,S,P){if(b.props.syncId===w){if(P===b.eventEmitterSymbol&&typeof b.props.syncMethod!="function")return;b.applySyncEvent(S)}}),br(b,"handleBrushChange",function(w){var S=w.startIndex,P=w.endIndex;if(S!==b.state.dataStartIndex||P!==b.state.dataEndIndex){var N=b.state.updateId;b.setState(function(){return He({dataStartIndex:S,dataEndIndex:P},p({props:b.props,dataStartIndex:S,dataEndIndex:P,updateId:N},b.state))}),b.triggerSyncEvent({dataStartIndex:S,dataEndIndex:P})}}),br(b,"handleMouseEnter",function(w){var S=b.getMouseInfo(w);if(S){var P=He(He({},S),{},{isTooltipActive:!0});b.setState(P),b.triggerSyncEvent(P);var N=b.props.onMouseEnter;(0,Hm.default)(N)&&N(P,w)}}),br(b,"triggeredAfterMouseMove",function(w){var S=b.getMouseInfo(w),P=S?He(He({},S),{},{isTooltipActive:!0}):{isTooltipActive:!1};b.setState(P),b.triggerSyncEvent(P);var N=b.props.onMouseMove;(0,Hm.default)(N)&&N(P,w)}),br(b,"handleItemMouseEnter",function(w){b.setState(function(){return{isTooltipActive:!0,activeItem:w,activePayload:w.tooltipPayload,activeCoordinate:w.tooltipPosition||{x:w.cx,y:w.cy}}})}),br(b,"handleItemMouseLeave",function(){b.setState(function(){return{isTooltipActive:!1}})}),br(b,"handleMouseMove",function(w){w.persist(),b.throttleTriggeredAfterMouseMove(w)}),br(b,"handleMouseLeave",function(w){b.throttleTriggeredAfterMouseMove.cancel();var S={isTooltipActive:!1};b.setState(S),b.triggerSyncEvent(S);var P=b.props.onMouseLeave;(0,Hm.default)(P)&&P(S,w)}),br(b,"handleOuterEvent",function(w){var S=G2e(w),P=(0,lN.default)(b.props,"".concat(S));if(S&&(0,Hm.default)(P)){var N,D;/.*touch.*/i.test(S)?D=b.getMouseInfo(w.changedTouches[0]):D=b.getMouseInfo(w),P((N=D)!==null&&N!==void 0?N:{},w)}}),br(b,"handleClick",function(w){var S=b.getMouseInfo(w);if(S){var P=He(He({},S),{},{isTooltipActive:!0});b.setState(P),b.triggerSyncEvent(P);var N=b.props.onClick;(0,Hm.default)(N)&&N(P,w)}}),br(b,"handleMouseDown",function(w){var S=b.props.onMouseDown;if((0,Hm.default)(S)){var P=b.getMouseInfo(w);S(P,w)}}),br(b,"handleMouseUp",function(w){var S=b.props.onMouseUp;if((0,Hm.default)(S)){var P=b.getMouseInfo(w);S(P,w)}}),br(b,"handleTouchMove",function(w){w.changedTouches!=null&&w.changedTouches.length>0&&b.throttleTriggeredAfterMouseMove(w.changedTouches[0])}),br(b,"handleTouchStart",function(w){w.changedTouches!=null&&w.changedTouches.length>0&&b.handleMouseDown(w.changedTouches[0])}),br(b,"handleTouchEnd",function(w){w.changedTouches!=null&&w.changedTouches.length>0&&b.handleMouseUp(w.changedTouches[0])}),br(b,"handleDoubleClick",function(w){var S=b.props.onDoubleClick;if((0,Hm.default)(S)){var P=b.getMouseInfo(w);S(P,w)}}),br(b,"handleContextMenu",function(w){var S=b.props.onContextMenu;if((0,Hm.default)(S)){var P=b.getMouseInfo(w);S(P,w)}}),br(b,"triggerSyncEvent",function(w){b.props.syncId!==void 0&&I$.emit(R$,b.props.syncId,w,b.eventEmitterSymbol)}),br(b,"applySyncEvent",function(w){var S=b.props,P=S.layout,N=S.syncMethod,D=b.state.updateId,E=w.dataStartIndex,A=w.dataEndIndex;if(w.dataStartIndex!==void 0||w.dataEndIndex!==void 0)b.setState(He({dataStartIndex:E,dataEndIndex:A},p({props:b.props,dataStartIndex:E,dataEndIndex:A,updateId:D},b.state)));else if(w.activeTooltipIndex!==void 0){var z=w.chartX,V=w.chartY,R=w.activeTooltipIndex,I=b.state,k=I.offset,T=I.tooltipTicks;if(!k)return;if(typeof N=="function")R=N(T,w);else if(N==="value"){R=-1;for(var O=0;O<T.length;O++)if(T[O].value===w.activeLabel){R=O;break}}var F=He(He({},k),{},{x:k.left,y:k.top}),_=Math.min(z,F.x+F.width),M=Math.min(V,F.y+F.height),j=T[R]&&T[R].value,H=jae(b.state,b.props.data,R),q=T[R]?{x:P==="horizontal"?T[R].coordinate:_,y:P==="horizontal"?M:T[R].coordinate}:eWe;b.setState(He(He({},w),{},{activeLabel:j,activeCoordinate:q,activePayload:H,activeTooltipIndex:R}))}else b.setState(w)}),br(b,"renderCursor",function(w){var S,P=b.state,N=P.isTooltipActive,D=P.activeCoordinate,E=P.activePayload,A=P.offset,z=P.activeTooltipIndex,V=P.tooltipAxisBandSize,R=b.getTooltipEventType(),I=(S=w.props.active)!==null&&S!==void 0?S:N,k=b.props.layout,T=w.key||"_recharts-cursor";return po.default.createElement(U6e,{key:T,activeCoordinate:D,activePayload:E,activeTooltipIndex:z,chartName:r,element:w,isActive:I,layout:k,offset:A,tooltipAxisBandSize:V,tooltipEventType:R})}),br(b,"renderPolarAxis",function(w,S,P){var N=(0,lN.default)(w,"type.axisType"),D=(0,lN.default)(b.state,"".concat(N,"Map")),E=w.type.defaultProps,A=E!==void 0?He(He({},E),w.props):w.props,z=D&&D[A["".concat(N,"Id")]];return(0,po.cloneElement)(w,He(He({},z),{},{className:ft(N,z.className),key:w.key||"".concat(S,"-").concat(P),ticks:rf(z,!0)}))}),br(b,"renderPolarGrid",function(w){var S=w.props,P=S.radialLines,N=S.polarAngles,D=S.polarRadius,E=b.state,A=E.radiusAxisMap,z=E.angleAxisMap,V=pg(A),R=pg(z),I=R.cx,k=R.cy,T=R.innerRadius,O=R.outerRadius;return(0,po.cloneElement)(w,{polarAngles:Array.isArray(N)?N:rf(R,!0).map(function(F){return F.coordinate}),polarRadius:Array.isArray(D)?D:rf(V,!0).map(function(F){return F.coordinate}),cx:I,cy:k,innerRadius:T,outerRadius:O,key:w.key||"polar-grid",radialLines:P})}),br(b,"renderLegend",function(){var w=b.state.formattedGraphicalItems,S=b.props,P=S.children,N=S.width,D=S.height,E=b.props.margin||{},A=N-(E.left||0)-(E.right||0),z=vq({children:P,formattedGraphicalItems:w,legendWidth:A,legendContent:c});if(!z)return null;var V=z.item,R=j6e(z,w8t);return(0,po.cloneElement)(V,He(He({},R),{},{chartWidth:N,chartHeight:D,margin:E,onBBoxUpdate:b.handleLegendBBoxUpdate}))}),br(b,"renderTooltip",function(){var w,S=b.props,P=S.children,N=S.accessibilityLayer,D=mc(P,Ta);if(!D)return null;var E=b.state,A=E.isTooltipActive,z=E.activeCoordinate,V=E.activePayload,R=E.activeLabel,I=E.offset,k=(w=D.props.active)!==null&&w!==void 0?w:A;return(0,po.cloneElement)(D,{viewBox:He(He({},I),{},{x:I.left,y:I.top}),active:k,label:R,payload:k?V:[],coordinate:z,accessibilityLayer:N})}),br(b,"renderBrush",function(w){var S=b.props,P=S.margin,N=S.data,D=b.state,E=D.offset,A=D.dataStartIndex,z=D.dataEndIndex,V=D.updateId;return(0,po.cloneElement)(w,{key:w.key||"_recharts-brush",onChange:cO(b.handleBrushChange,w.props.onChange),data:N,x:Qe(w.props.x)?w.props.x:E.left,y:Qe(w.props.y)?w.props.y:E.top+E.height+E.brushBottom-(P.bottom||0),width:Qe(w.props.width)?w.props.width:E.width,startIndex:A,endIndex:z,updateId:"brush-".concat(V)})}),br(b,"renderReferenceElement",function(w,S,P){if(!w)return null;var N=b,D=N.clipPathId,E=b.state,A=E.xAxisMap,z=E.yAxisMap,V=E.offset,R=w.type.defaultProps||{},I=w.props,k=I.xAxisId,T=k===void 0?R.xAxisId:k,O=I.yAxisId,F=O===void 0?R.yAxisId:O;return(0,po.cloneElement)(w,{key:w.key||"".concat(S,"-").concat(P),xAxis:A[T],yAxis:z[F],viewBox:{x:V.left,y:V.top,width:V.width,height:V.height},clipPathId:D})}),br(b,"renderActivePoints",function(w){var S=w.item,P=w.activePoint,N=w.basePoint,D=w.childIndex,E=w.isRange,A=[],z=S.props.key,V=S.item.type.defaultProps!==void 0?He(He({},S.item.type.defaultProps),S.item.props):S.item.props,R=V.activeDot,I=V.dataKey,k=He(He({index:D,dataKey:I,cx:P.x,cy:P.y,r:4,fill:aO(S.item),strokeWidth:2,stroke:"#fff",payload:P.payload,value:P.value},nt(R,!1)),XC(R));return A.push(v.renderActiveDot(R,k,"".concat(z,"-activePoint-").concat(D))),N?A.push(v.renderActiveDot(R,He(He({},k),{},{cx:N.x,cy:N.y}),"".concat(z,"-basePoint-").concat(D))):E&&A.push(null),A}),br(b,"renderGraphicChild",function(w,S,P){var N=b.filterFormatItem(w,S,P);if(!N)return null;var D=b.getTooltipEventType(),E=b.state,A=E.isTooltipActive,z=E.tooltipAxis,V=E.activeTooltipIndex,R=E.activeLabel,I=b.props.children,k=mc(I,Ta),T=N.props,O=T.points,F=T.isRange,_=T.baseLine,M=N.item.type.defaultProps!==void 0?He(He({},N.item.type.defaultProps),N.item.props):N.item.props,j=M.activeDot,H=M.hide,q=M.activeBar,G=M.activeShape,U=!!(!H&&A&&k&&(j||q||G)),K={};D!=="axis"&&k&&k.props.trigger==="click"?K={onClick:cO(b.handleItemMouseEnter,w.props.onClick)}:D!=="axis"&&(K={onMouseLeave:cO(b.handleItemMouseLeave,w.props.onMouseLeave),onMouseEnter:cO(b.handleItemMouseEnter,w.props.onMouseEnter)});var Y=(0,po.cloneElement)(w,He(He({},N.props),K));function Q(re){return typeof z.dataKey=="function"?z.dataKey(re.payload):null}if(U)if(V>=0){var ae,oe;if(z.dataKey&&!z.allowDuplicatedCategory){var Ae=typeof z.dataKey=="function"?Q:"payload.".concat(z.dataKey.toString());ae=LR(O,Ae,R),oe=F&&_&&LR(_,Ae,R)}else ae=O?.[V],oe=F&&_&&_[V];if(G||q){var Se=w.props.activeIndex!==void 0?w.props.activeIndex:V;return[(0,po.cloneElement)(w,He(He(He({},N.props),K),{},{activeIndex:Se})),null,null]}if(!(0,sN.default)(ae))return[Y].concat(uN(b.renderActivePoints({item:N,activePoint:ae,basePoint:oe,childIndex:V,isRange:F})))}else{var Oe,me=(Oe=b.getItemByXY(b.state.activeCoordinate))!==null&&Oe!==void 0?Oe:{graphicalItem:Y},Pe=me.graphicalItem,ye=Pe.item,we=ye===void 0?w:ye,$=Pe.childIndex,ee=He(He(He({},N.props),K),{},{activeIndex:$});return[(0,po.cloneElement)(we,ee),null,null]}return F?[Y,null,null]:[Y,null]}),br(b,"renderCustomized",function(w,S,P){return(0,po.cloneElement)(w,He(He({key:"recharts-customized-".concat(P)},b.props),b.state))}),br(b,"renderMap",{CartesianGrid:{handler:M$,once:!0},ReferenceArea:{handler:b.renderReferenceElement},ReferenceLine:{handler:M$},ReferenceDot:{handler:b.renderReferenceElement},XAxis:{handler:M$},YAxis:{handler:M$},Brush:{handler:b.renderBrush,once:!0},Bar:{handler:b.renderGraphicChild},Line:{handler:b.renderGraphicChild},Area:{handler:b.renderGraphicChild},Radar:{handler:b.renderGraphicChild},RadialBar:{handler:b.renderGraphicChild},Scatter:{handler:b.renderGraphicChild},Pie:{handler:b.renderGraphicChild},Funnel:{handler:b.renderGraphicChild},Tooltip:{handler:b.renderCursor,once:!0},PolarGrid:{handler:b.renderPolarGrid,once:!0},PolarAngleAxis:{handler:b.renderPolarAxis},PolarRadiusAxis:{handler:b.renderPolarAxis},Customized:{handler:b.renderCustomized}}),b.clipPathId="".concat((x=y.id)!==null&&x!==void 0?x:pc("recharts"),"-clip"),b.throttleTriggeredAfterMouseMove=(0,J6e.default)(b.triggeredAfterMouseMove,(C=y.throttleDelay)!==null&&C!==void 0?C:1e3/60),b.state={},b}return L8t(v,g),N8t(v,[{key:"componentDidMount",value:function(){var x,C;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(x=this.props.margin.left)!==null&&x!==void 0?x:0,top:(C=this.props.margin.top)!==null&&C!==void 0?C:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var x=this.props,C=x.children,b=x.data,w=x.height,S=x.layout,P=mc(C,Ta);if(P){var N=P.props.defaultIndex;if(!(typeof N!="number"||N<0||N>this.state.tooltipTicks.length-1)){var D=this.state.tooltipTicks[N]&&this.state.tooltipTicks[N].value,E=jae(this.state,b,N,D),A=this.state.tooltipTicks[N].coordinate,z=(this.state.offset.top+w)/2,V=S==="horizontal",R=V?{x:A,y:z}:{y:A,x:z},I=this.state.formattedGraphicalItems.find(function(T){var O=T.item;return O.type.name==="Scatter"});I&&(R=He(He({},R),I.props.points[N].tooltipPosition),E=I.props.points[N].tooltipPayload);var k={activeTooltipIndex:N,isTooltipActive:!0,activeLabel:D,activePayload:E,activeCoordinate:R};this.setState(k),this.renderCursor(P),this.accessibilityManager.setIndex(N)}}}},{key:"getSnapshotBeforeUpdate",value:function(x,C){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==C.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==x.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==x.margin){var b,w;this.accessibilityManager.setDetails({offset:{left:(b=this.props.margin.left)!==null&&b!==void 0?b:0,top:(w=this.props.margin.top)!==null&&w!==void 0?w:0}})}return null}},{key:"componentDidUpdate",value:function(x){ej([mc(x.children,Ta)],[mc(this.props.children,Ta)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var x=mc(this.props.children,Ta);if(x&&typeof x.props.shared=="boolean"){var C=x.props.shared?"axis":"item";return s.indexOf(C)>=0?C:a}return a}},{key:"getMouseInfo",value:function(x){if(!this.container)return null;var C=this.container,b=C.getBoundingClientRect(),w=rze(b),S={chartX:Math.round(x.pageX-w.left),chartY:Math.round(x.pageY-w.top)},P=b.width/C.offsetWidth||1,N=this.inRange(S.chartX,S.chartY,P);if(!N)return null;var D=this.state,E=D.xAxisMap,A=D.yAxisMap,z=this.getTooltipEventType(),V=W6e(this.state,this.props.data,this.props.layout,N);if(z!=="axis"&&E&&A){var R=pg(E).scale,I=pg(A).scale,k=R&&R.invert?R.invert(S.chartX):null,T=I&&I.invert?I.invert(S.chartY):null;return He(He({},S),{},{xValue:k,yValue:T},V)}return V?He(He({},S),V):null}},{key:"inRange",value:function(x,C){var b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,w=this.props.layout,S=x/b,P=C/b;if(w==="horizontal"||w==="vertical"){var N=this.state.offset,D=S>=N.left&&S<=N.left+N.width&&P>=N.top&&P<=N.top+N.height;return D?{x:S,y:P}:null}var E=this.state,A=E.angleAxisMap,z=E.radiusAxisMap;if(A&&z){var V=pg(A);return Soe({x:S,y:P},V)}return null}},{key:"parseEventsOfWrapper",value:function(){var x=this.props.children,C=this.getTooltipEventType(),b=mc(x,Ta),w={};b&&C==="axis"&&(b.props.trigger==="click"?w={onClick:this.handleClick}:w={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var S=XC(this.props,this.handleOuterEvent);return He(He({},S),w)}},{key:"addListener",value:function(){I$.on(R$,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){I$.removeListener(R$,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(x,C,b){for(var w=this.state.formattedGraphicalItems,S=0,P=w.length;S<P;S++){var N=w[S];if(N.item===x||N.props.key===x.key||C===xp(N.item.type)&&b===N.childIndex)return N}return null}},{key:"renderClipPath",value:function(){var x=this.clipPathId,C=this.state.offset,b=C.left,w=C.top,S=C.height,P=C.width;return po.default.createElement("defs",null,po.default.createElement("clipPath",{id:x},po.default.createElement("rect",{x:b,y:w,height:S,width:P})))}},{key:"getXScales",value:function(){var x=this.state.xAxisMap;return x?Object.entries(x).reduce(function(C,b){var w=H6e(b,2),S=w[0],P=w[1];return He(He({},C),{},br({},S,P.scale))},{}):null}},{key:"getYScales",value:function(){var x=this.state.yAxisMap;return x?Object.entries(x).reduce(function(C,b){var w=H6e(b,2),S=w[0],P=w[1];return He(He({},C),{},br({},S,P.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(x){var C;return(C=this.state.xAxisMap)===null||C===void 0||(C=C[x])===null||C===void 0?void 0:C.scale}},{key:"getYScaleByAxisId",value:function(x){var C;return(C=this.state.yAxisMap)===null||C===void 0||(C=C[x])===null||C===void 0?void 0:C.scale}},{key:"getItemByXY",value:function(x){var C=this.state,b=C.formattedGraphicalItems,w=C.activeItem;if(b&&b.length)for(var S=0,P=b.length;S<P;S++){var N=b[S],D=N.props,E=N.item,A=E.type.defaultProps!==void 0?He(He({},E.type.defaultProps),E.props):E.props,z=xp(E.type);if(z==="Bar"){var V=(D.data||[]).find(function(T){return BHe(x,T)});if(V)return{graphicalItem:N,payload:V}}else if(z==="RadialBar"){var R=(D.data||[]).find(function(T){return Soe(x,T)});if(R)return{graphicalItem:N,payload:R}}else if(DO(N,w)||OO(N,w)||Ak(N,w)){var I=Nje({graphicalItem:N,activeTooltipItem:w,itemData:A.data}),k=A.activeIndex===void 0?I:A.activeIndex;return{graphicalItem:He(He({},N),{},{childIndex:k}),payload:Ak(N,w)?A.data[I]:N.props.data[I]}}}return null}},{key:"render",value:function(){var x=this;if(!Hte(this))return null;var C=this.props,b=C.children,w=C.className,S=C.width,P=C.height,N=C.style,D=C.compact,E=C.title,A=C.desc,z=j6e(C,C8t),V=nt(z,!1);if(D)return po.default.createElement(hae,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},po.default.createElement(vD,iN({},V,{width:S,height:P,title:E,desc:A}),this.renderClipPath(),jte(b,this.renderMap)));if(this.props.accessibilityLayer){var R,I;V.tabIndex=(R=this.props.tabIndex)!==null&&R!==void 0?R:0,V.role=(I=this.props.role)!==null&&I!==void 0?I:"application",V.onKeyDown=function(T){x.accessibilityManager.keyboardEvent(T)},V.onFocus=function(){x.accessibilityManager.focus()}}var k=this.parseEventsOfWrapper();return po.default.createElement(hae,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},po.default.createElement("div",iN({className:ft("recharts-wrapper",w),style:He({position:"relative",cursor:"default",width:S,height:P},N)},k,{ref:function(O){x.container=O}}),po.default.createElement(vD,iN({},V,{width:S,height:P,title:E,desc:A,style:B8t}),this.renderClipPath(),jte(b,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(po.Component);br(h,"displayName",r),br(h,"defaultProps",He({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},d)),br(h,"getDerivedStateFromProps",function(g,v){var y=g.dataKey,x=g.data,C=g.children,b=g.width,w=g.height,S=g.layout,P=g.stackOffset,N=g.margin,D=v.dataStartIndex,E=v.dataEndIndex;if(v.updateId===void 0){var A=G6e(g);return He(He(He({},A),{},{updateId:0},p(He(He({props:g},A),{},{updateId:0}),v)),{},{prevDataKey:y,prevData:x,prevWidth:b,prevHeight:w,prevLayout:S,prevStackOffset:P,prevMargin:N,prevChildren:C})}if(y!==v.prevDataKey||x!==v.prevData||b!==v.prevWidth||w!==v.prevHeight||S!==v.prevLayout||P!==v.prevStackOffset||!sy(N,v.prevMargin)){var z=G6e(g),V={chartX:v.chartX,chartY:v.chartY,isTooltipActive:v.isTooltipActive},R=He(He({},W6e(v,x,S)),{},{updateId:v.updateId+1}),I=He(He(He({},z),V),R);return He(He(He({},I),p(He({props:g},I),v)),{},{prevDataKey:y,prevData:x,prevWidth:b,prevHeight:w,prevLayout:S,prevStackOffset:P,prevMargin:N,prevChildren:C})}if(!ej(C,v.prevChildren)){var k,T,O,F,_=mc(C,Tp),M=_&&(k=(T=_.props)===null||T===void 0?void 0:T.startIndex)!==null&&k!==void 0?k:D,j=_&&(O=(F=_.props)===null||F===void 0?void 0:F.endIndex)!==null&&O!==void 0?O:E,H=M!==D||j!==E,q=!(0,sN.default)(x),G=q&&!H?v.updateId:v.updateId+1;return He(He({updateId:G},p(He(He({props:g},v),{},{updateId:G,dataStartIndex:M,dataEndIndex:j}),v)),{},{prevChildren:C,dataStartIndex:M,dataEndIndex:j})}return null}),br(h,"renderActiveDot",function(g,v,y){var x;return(0,po.isValidElement)(g)?x=(0,po.cloneElement)(g,v):(0,Hm.default)(g)?x=g(v):x=po.default.createElement(Rp,v),po.default.createElement(Bt,{className:"recharts-active-dot",key:y},x)});var m=(0,po.forwardRef)(function(v,y){return po.default.createElement(h,iN({},v,{ref:y}))});return m.displayName=h.displayName,m};var dN=Zu({chartName:"LineChart",GraphicalChild:Um,axisComponents:[{axisType:"xAxis",AxisComp:Is},{axisType:"yAxis",AxisComp:Rs}],formatAxisMap:a0});var e_=Zu({chartName:"BarChart",GraphicalChild:lf,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:Is},{axisType:"yAxis",AxisComp:Rs}],formatAxisMap:a0});var t_=Zu({chartName:"PieChart",GraphicalChild:Yu,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:Xu},{axisType:"radiusAxis",AxisComp:Ku}],formatAxisMap:Ck,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}});var r_=Zu({chartName:"RadarChart",GraphicalChild:Rg,axisComponents:[{axisType:"angleAxis",AxisComp:Xu},{axisType:"radiusAxis",AxisComp:Ku}],formatAxisMap:Ck,defaultProps:{layout:"centric",startAngle:90,endAngle:-270,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}});var qae=Zu({chartName:"ScatterChart",GraphicalChild:wy,defaultTooltipEventType:"item",validateTooltipEventTypes:["item"],axisComponents:[{axisType:"xAxis",AxisComp:Is},{axisType:"yAxis",AxisComp:Rs},{axisType:"zAxis",AxisComp:tN}],formatAxisMap:a0});var n_=Zu({chartName:"AreaChart",GraphicalChild:uf,axisComponents:[{axisType:"xAxis",AxisComp:Is},{axisType:"yAxis",AxisComp:Rs}],formatAxisMap:a0});var $ae=Zu({chartName:"RadialBarChart",GraphicalChild:n0,legendContent:"children",defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"angleAxis",AxisComp:Xu},{axisType:"radiusAxis",AxisComp:Ku}],formatAxisMap:Ck,defaultProps:{layout:"radial",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}});var ve=L(fe(),1),Gae={default:["#3b82f6","#ef4444","#10b981","#f59e0b","#8b5cf6","#06b6d4","#f97316","#84cc16","#ec4899","#6366f1"],vibrant:["#FF006E","#FB5607","#FFBE0B","#8338EC","#3A86FF","#06FFB4","#FF4365","#00F5FF","#FF124F","#7209B7"],pastel:["#B5E2FA","#F7AEF8","#FDC5F5","#F8B7D3","#FAC9B8","#C8E9A0","#A7D2CB","#F2D98D","#E5B3BB","#D6A2E8"],dark:["#1e3a5f","#4b0e0e","#0e4b2b","#4b3c0e","#2e0e4b","#0e3c4b","#4b2e0e","#2b4b0e","#4b0e3c","#1e0e4b"],neon:["#39FF14","#FF10F0","#00FFFF","#FE019A","#FFFF00","#FF073A","#00FF00","#FF0099","#0FF0FC","#FFE400"]},rWe=Gae.default,Wae=({active:e,payload:t,label:r})=>!e||!t||!t.length?null:(0,ve.jsxs)(ie.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},className:"backdrop-blur-xl bg-background/80 p-3 rounded-xl shadow-2xl border border-border/50",children:[(0,ve.jsx)("p",{className:"text-sm font-medium mb-2",children:r}),t.map((n,o)=>(0,ve.jsxs)("div",{className:"flex items-center gap-2 text-sm",children:[(0,ve.jsx)("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:n.color}}),(0,ve.jsxs)("span",{className:"text-muted-foreground",children:[n.name,":"]}),(0,ve.jsx)("span",{className:"font-semibold",children:n.value})]},o))]}),TS=({payload:e,onItemClick:t})=>(0,ve.jsx)("div",{className:"flex flex-wrap items-center justify-center gap-4 mt-4",children:e.map((r,n)=>(0,ve.jsxs)(ie.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>t&&t(r),className:B("flex items-center gap-2 px-3 py-1.5 rounded-lg transition-all","hover:bg-accent/10",r.inactive&&"opacity-50"),children:[(0,ve.jsx)(ie.div,{animate:{scale:r.inactive?.8:1,opacity:r.inactive?.5:1},className:"w-3 h-3 rounded-full",style:{backgroundColor:r.color}}),(0,ve.jsx)("span",{className:"text-sm font-medium",children:r.value})]},`item-${n}`))}),K8t=({data:e,dataKey:t,color:r})=>{let n=e.map(s=>s[t]),o=Math.min(...n),i=Math.max(...n)-o;return(0,ve.jsx)("svg",{width:"60",height:"20",className:"ml-2",children:(0,ve.jsx)("polyline",{fill:"none",stroke:r,strokeWidth:"2",points:n.map((s,l)=>`${l/(n.length-1)*60},${20-(s-o)/i*20}`).join(" ")})})},X8t=({height:e})=>(0,ve.jsx)("div",{className:"w-full",style:{height:e},children:(0,ve.jsx)("div",{className:"flex items-end justify-center h-full gap-2 px-8",children:[...Array(8)].map((t,r)=>(0,ve.jsx)(ie.div,{initial:{height:0},animate:{height:`${Math.random()*80+20}%`},transition:{duration:1.5,delay:r*.1,repeat:1/0,repeatType:"reverse"},className:"w-full bg-gradient-to-t from-primary/20 to-primary/5 rounded-t-lg"},r))})});function Y8t({data:e,type:t,series:r,title:n,subtitle:o,height:a=400,width:i="100%",xAxisKey:s="name",yAxisKey:l,showGrid:c=!0,showTooltip:u=!0,showLegend:d=!0,showBrush:f=!1,showReference:p=!1,referenceLines:h=[],referenceAreas:m=[],colors:g=rWe,className:v,onDataPointClick:y,onExport:x,onRefresh:C,customTooltip:b,customLegend:w,loading:S=!1,error:P=null,animated:N=!0,responsive:D=!0,showCrosshair:E=!1,enableZoom:A=!1,enablePan:z=!1,showMiniMap:V=!1,darkMode:R=!1,gradientColors:I=!0,interactiveLegend:k=!0,showDataLabels:T=!1,sparklineMode:O=!1,animationDuration:F=1500,theme:_="default"}){let[M,j]=Lp.default.useState(!1),[H,q]=Lp.default.useState(!1),[G,U]=Lp.default.useState(100),[K,Y]=Lp.default.useState(_),[Q,ae]=Lp.default.useState(null),[oe,Ae]=Lp.default.useState(new Set),Se=Lp.default.useRef(null),Oe=Lp.default.useRef(null),me=Lp.default.useMemo(()=>Gae[K]||rWe,[K]),Pe=Lp.default.useId(),ye=Lp.default.useMemo(()=>{if(!e||!Array.isArray(e)||!e.length||!r||!Array.isArray(r)||!r.length)return null;let pe=r[0];if(!pe||!pe.dataKey)return null;let ne=e.map(Ge=>Number(Ge[pe.dataKey])).filter(Ge=>!isNaN(Ge));if(ne.length<2)return null;let xe=ne[0],Ne=ne[ne.length-1];if(xe===0)return null;let he=(Ne-xe)/xe*100;return{direction:he>0?"up":he<0?"down":"neutral",percentage:Math.abs(he).toFixed(1)}},[e,r]),we=pe=>{Ae(ne=>{let xe=new Set(ne);return xe.has(pe)?xe.delete(pe):xe.add(pe),xe})},$=pe=>{k&&we(pe.dataKey)},ee=pe=>{x&&x(pe)},re=pe=>{U(ne=>pe==="in"?Math.min(ne+10,200):Math.max(ne-10,50))},Le=()=>(0,ve.jsx)("defs",{children:r.map((pe,ne)=>{let xe=pe.color||me[ne%me.length];return(0,ve.jsxs)("linearGradient",{id:`gradient-${Pe}-${pe.dataKey}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,ve.jsx)("stop",{offset:"0%",stopColor:xe,stopOpacity:.8}),(0,ve.jsx)("stop",{offset:"100%",stopColor:xe,stopOpacity:.1})]},`gradient-${pe.dataKey}`)})}),Ie=()=>{if(!e||!Array.isArray(e)||!r||!Array.isArray(r))return(0,ve.jsx)("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:"No data available"});let pe={data:e,width:typeof i=="string"?void 0:i,height:O?60:a,margin:O?{top:5,right:5,left:5,bottom:5}:{top:20,right:30,left:20,bottom:f?60:20}},ne=r.filter(he=>!he.hide&&!oe.has(he.dataKey)),xe={fontSize:12,fill:R?"#9ca3af":"#6b7280"},Ne={stroke:R?"#374151":"#e5e7eb",strokeDasharray:"3 3",opacity:.5};switch(t){case"line":return(0,ve.jsxs)(dN,{...pe,children:[I&&Le(),c&&!O&&(0,ve.jsx)(Vm,{...Ne}),!O&&(0,ve.jsxs)(ve.Fragment,{children:[(0,ve.jsx)(Is,{dataKey:s,...xe,tick:{fontSize:11},axisLine:{stroke:R?"#4b5563":"#d1d5db"}}),(0,ve.jsx)(Rs,{...xe,tick:{fontSize:11},axisLine:{stroke:R?"#4b5563":"#d1d5db"}})]}),u&&!O&&(0,ve.jsx)(Ta,{cursor:E?{stroke:R?"#6b7280":"#9ca3af",strokeWidth:1,strokeDasharray:"5 5"}:!1}),d&&!O&&(0,ve.jsx)(yi,{content:he=>{let Ge=w;return Ge?(0,ve.jsx)(Ge,{...he}):(0,ve.jsx)(TS,{...he,onItemClick:$})}}),ne.map((he,Ge)=>{let Ht=he.color||me[Ge%me.length];return(0,ve.jsx)(Um,{type:he.type||"monotone",dataKey:he.dataKey,stroke:Ht,strokeWidth:O?1.5:he.strokeWidth||2,strokeDasharray:he.strokeDasharray,name:he.name,dot:O?!1:he.dot!==void 0?he.dot:{r:3,strokeWidth:2,fill:R?"#1f2937":"#ffffff"},activeDot:O?!1:he.activeDot!==void 0?he.activeDot:{r:5,strokeWidth:2,fill:Ht,stroke:R?"#1f2937":"#ffffff",className:"animate-pulse"},animationDuration:N?F:0,animationBegin:Ge*100,label:T?he.label:!1},he.dataKey)}),p&&h.map((he,Ge)=>(0,ve.jsx)(xy,{y:he.value,stroke:he.color||(R?"#6b7280":"#9ca3af"),strokeDasharray:"5 5",label:he.label},Ge)),p&&m.map((he,Ge)=>(0,ve.jsx)(i0,{x1:he.x1,x2:he.x2,fill:he.color||(R?"#374151":"#f3f4f6"),fillOpacity:.3,label:he.label},Ge)),f&&!O&&(0,ve.jsx)(Tp,{height:30,fill:R?"#1f2937":"#f9fafb",stroke:R?"#374151":"#e5e7eb"})]});case"bar":return(0,ve.jsxs)(e_,{...pe,children:[I&&Le(),c&&(0,ve.jsx)(Vm,{...Ne}),(0,ve.jsx)(Is,{dataKey:s,...xe,tick:{fontSize:11},axisLine:{stroke:R?"#4b5563":"#d1d5db"}}),(0,ve.jsx)(Rs,{...xe,tick:{fontSize:11},axisLine:{stroke:R?"#4b5563":"#d1d5db"}}),u&&(0,ve.jsx)(Ta,{cursor:{fill:R?"rgba(255,255,255,0.05)":"rgba(0,0,0,0.05)"}}),d&&(0,ve.jsx)(yi,{content:he=>{let Ge=w;return Ge?(0,ve.jsx)(Ge,{...he}):(0,ve.jsx)(TS,{...he,onItemClick:$})}}),ne.map((he,Ge)=>{let Ht=he.color||me[Ge%me.length];return(0,ve.jsx)(lf,{dataKey:he.dataKey,fill:I?`url(#gradient-${Pe}-${he.dataKey})`:Ht,name:he.name,animationDuration:N?F:0,animationBegin:Ge*100,radius:[4,4,0,0],label:T?he.label:!1,stackId:he.stackId,onMouseEnter:()=>ae(he.dataKey),onMouseLeave:()=>ae(null),className:"hover:opacity-80 transition-opacity cursor-pointer"},he.dataKey)}),p&&h.map((he,Ge)=>(0,ve.jsx)(xy,{y:he.value,stroke:he.color||(R?"#6b7280":"#9ca3af"),strokeDasharray:"5 5",label:he.label},Ge)),f&&(0,ve.jsx)(Tp,{height:30,fill:R?"#1f2937":"#f9fafb",stroke:R?"#374151":"#e5e7eb"})]});case"area":return(0,ve.jsxs)(n_,{...pe,children:[I&&Le(),c&&(0,ve.jsx)(Vm,{...Ne}),(0,ve.jsx)(Is,{dataKey:s,...xe,tick:{fontSize:11},axisLine:{stroke:R?"#4b5563":"#d1d5db"}}),(0,ve.jsx)(Rs,{...xe,tick:{fontSize:11},axisLine:{stroke:R?"#4b5563":"#d1d5db"}}),u&&(0,ve.jsx)(Ta,{}),d&&(0,ve.jsx)(yi,{content:he=>{let Ge=w;return Ge?(0,ve.jsx)(Ge,{...he}):(0,ve.jsx)(TS,{...he,onItemClick:$})}}),ne.map((he,Ge)=>{let Ht=he.color||me[Ge%me.length];return(0,ve.jsx)(uf,{type:he.type||"monotone",dataKey:he.dataKey,stroke:Ht,strokeWidth:2,fill:I?`url(#gradient-${Pe}-${he.dataKey})`:Ht,fillOpacity:he.fillOpacity||.6,name:he.name,animationDuration:N?F:0,animationBegin:Ge*100,dot:he.dot!==void 0?he.dot:!1,activeDot:he.activeDot!==void 0?he.activeDot:{r:4,strokeWidth:2,fill:Ht,stroke:R?"#1f2937":"#ffffff",className:"animate-pulse"},label:T?he.label:!1,stackId:he.stackId},he.dataKey)}),p&&h.map((he,Ge)=>(0,ve.jsx)(xy,{y:he.value,stroke:he.color||(R?"#6b7280":"#9ca3af"),strokeDasharray:"5 5",label:he.label},Ge)),f&&(0,ve.jsx)(Tp,{height:30,fill:R?"#1f2937":"#f9fafb",stroke:R?"#374151":"#e5e7eb"})]});case"pie":return(0,ve.jsxs)(t_,{...pe,children:[u&&(0,ve.jsx)(Ta,{content:b||Wae}),d&&(0,ve.jsx)(yi,{content:he=>{let Ge=w;return Ge?(0,ve.jsx)(Ge,{...he}):(0,ve.jsx)(TS,{...he,onItemClick:$})}}),(0,ve.jsx)(Yu,{data:e,dataKey:r[0]?.dataKey||"value",nameKey:s,cx:"50%",cy:"50%",innerRadius:t==="pie"?0:"40%",outerRadius:Math.min(a,typeof i=="number"?i:400)/3,animationDuration:N?F:0,animationBegin:0,label:T?{fill:R?"#e5e7eb":"#374151",fontSize:12}:!1,labelLine:T?{stroke:R?"#6b7280":"#9ca3af",strokeWidth:1}:!1,children:e.map((he,Ge)=>{let Ht=me[Ge%me.length];return(0,ve.jsx)(Wu,{fill:Ht,className:"hover:opacity-80 transition-opacity cursor-pointer",onMouseEnter:()=>ae(he),onMouseLeave:()=>ae(null)},`cell-${Ge}`)})})]});case"scatter":return(0,ve.jsxs)(qae,{...pe,children:[c&&(0,ve.jsx)(Vm,{...Ne}),(0,ve.jsx)(Is,{dataKey:s,...xe,tick:{fontSize:11},axisLine:{stroke:R?"#4b5563":"#d1d5db"}}),(0,ve.jsx)(Rs,{dataKey:l,...xe,tick:{fontSize:11},axisLine:{stroke:R?"#4b5563":"#d1d5db"}}),u&&(0,ve.jsx)(Ta,{}),d&&(0,ve.jsx)(yi,{content:he=>{let Ge=w;return Ge?(0,ve.jsx)(Ge,{...he}):(0,ve.jsx)(TS,{...he,onItemClick:$})}}),ne.map((he,Ge)=>{let Ht=he.color||me[Ge%me.length];return(0,ve.jsx)(wy,{data:e,fill:Ht,name:he.name,animationDuration:N?F:0,animationBegin:Ge*100,shape:Zn=>{let $e=Q===Zn.payload,{cx:Ye,cy:de,fill:We}=Zn;return(0,ve.jsx)("circle",{cx:Ye,cy:de,fill:We,r:$e?6:4,className:"transition-all duration-200 hover:r-6",onMouseEnter:()=>ae(Zn.payload),onMouseLeave:()=>ae(null)})}},he.dataKey)})]});case"radar":return(0,ve.jsxs)(r_,{...pe,children:[(0,ve.jsx)(Nk,{stroke:R?"#374151":"#e5e7eb",strokeDasharray:"3 3"}),(0,ve.jsx)(Xu,{dataKey:s,...xe,tick:{fontSize:10}}),(0,ve.jsx)(Ku,{...xe,tick:{fontSize:10},axisLine:!1}),u&&(0,ve.jsx)(Ta,{content:b||Wae}),d&&(0,ve.jsx)(yi,{content:he=>{let Ge=w;return Ge?(0,ve.jsx)(Ge,{...he}):(0,ve.jsx)(TS,{...he,onItemClick:$})}}),ne.map((he,Ge)=>{let Ht=he.color||me[Ge%me.length];return(0,ve.jsx)(Rg,{dataKey:he.dataKey,stroke:Ht,fill:Ht,fillOpacity:.3,name:he.name,animationDuration:N?F:0,animationBegin:Ge*100},he.dataKey)})]});case"radialBar":return(0,ve.jsxs)($ae,{...pe,innerRadius:"10%",outerRadius:"90%",children:[u&&(0,ve.jsx)(Ta,{content:b||Wae}),d&&(0,ve.jsx)(yi,{content:he=>{let Ge=w;return Ge?(0,ve.jsx)(Ge,{...he}):(0,ve.jsx)(TS,{...he,onItemClick:$})}}),(0,ve.jsx)(n0,{dataKey:r[0]?.dataKey||"value",cornerRadius:10,fill:me[0],animationDuration:N?F:0,label:T?{fill:R?"#e5e7eb":"#374151",position:"center"}:!1})]});default:return(0,ve.jsx)("div",{children:"Unsupported chart type"})}};return S?(0,ve.jsxs)(Be,{className:B("w-full overflow-hidden",v),children:[(0,ve.jsxs)(yr,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,ve.jsxs)("div",{className:"space-y-1",children:[(0,ve.jsx)(ca,{className:"h-4 w-32"}),(0,ve.jsx)(ca,{className:"h-3 w-48"})]}),(0,ve.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,ve.jsx)(ca,{className:"h-8 w-8 rounded"}),(0,ve.jsx)(ca,{className:"h-8 w-8 rounded"}),(0,ve.jsx)(ca,{className:"h-8 w-8 rounded"})]})]}),(0,ve.jsx)(Ve,{children:(0,ve.jsx)(X8t,{height:a})})]}):P?(0,ve.jsx)(Be,{className:B("w-full",v),children:(0,ve.jsx)(Ve,{className:"flex items-center justify-center",style:{height:a},children:(0,ve.jsxs)(ie.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},className:"text-center",children:[(0,ve.jsx)("div",{className:"w-12 h-12 rounded-full bg-destructive/10 dark:bg-destructive/20 flex items-center justify-center mx-auto mb-4",children:(0,ve.jsx)(Zt,{className:"w-6 h-6 text-destructive"})}),(0,ve.jsx)("p",{className:"text-destructive mb-4 font-medium",children:P}),C&&(0,ve.jsxs)(te,{variant:"outline",onClick:C,className:"group",children:[(0,ve.jsx)(yo,{className:"mr-2 h-4 w-4 group-hover:rotate-180 transition-transform duration-500"}),"Retry"]})]})})}):(0,ve.jsx)(ie.div,{ref:Oe,className:B("relative",M&&"fixed inset-0 z-50 bg-background p-4"),initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},children:(0,ve.jsxs)(Be,{className:B("w-full overflow-hidden transition-all duration-300",R&&"dark",M&&"h-full",v),ref:Se,children:[(0,ve.jsxs)(yr,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,ve.jsxs)(ie.div,{className:"space-y-1",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:.1},children:[(0,ve.jsxs)(Or,{className:"text-base font-medium flex items-center gap-2",children:[n,ye&&(0,ve.jsxs)(ie.span,{className:"inline-flex items-center",initial:{scale:0},animate:{scale:1},transition:{type:"spring",delay:.3},children:[ye.direction==="up"&&(0,ve.jsx)(Oc,{className:"h-4 w-4 text-green-500 dark:text-green-400"}),ye.direction==="down"&&(0,ve.jsx)(FA,{className:"h-4 w-4 text-red-500 dark:text-red-400"}),ye.direction==="neutral"&&(0,ve.jsx)(em,{className:"h-4 w-4 text-muted-foreground"}),(0,ve.jsxs)("span",{className:B("ml-1 text-sm font-semibold",ye.direction==="up"&&"text-green-500 dark:text-green-400",ye.direction==="down"&&"text-red-500 dark:text-red-400",ye.direction==="neutral"&&"text-muted-foreground"),children:[ye.percentage,"%"]})]}),O&&r[0]&&(0,ve.jsx)(K8t,{data:e,dataKey:r[0].dataKey,color:r[0].color||me[0]})]}),o&&(0,ve.jsx)("p",{className:"text-xs text-muted-foreground",children:o})]}),(0,ve.jsxs)(ie.div,{className:"flex items-center space-x-1",initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{delay:.2},children:[A&&!O&&(0,ve.jsxs)("div",{className:"flex items-center border rounded-lg mr-2",children:[(0,ve.jsx)(te,{variant:"ghost",size:"sm",onClick:()=>re("out"),disabled:G<=50,className:"h-7 w-7 p-0",children:(0,ve.jsx)(Ad,{className:"h-3 w-3"})}),(0,ve.jsxs)("span",{className:"text-xs px-2 text-muted-foreground",children:[G,"%"]}),(0,ve.jsx)(te,{variant:"ghost",size:"sm",onClick:()=>re("in"),disabled:G>=200,className:"h-7 w-7 p-0",children:(0,ve.jsx)(Td,{className:"h-3 w-3"})})]}),C&&(0,ve.jsx)(te,{variant:"ghost",size:"sm",onClick:C,className:"group",children:(0,ve.jsx)(yo,{className:"h-4 w-4 group-hover:rotate-180 transition-transform duration-500"})}),(0,ve.jsxs)(Ti,{open:H,onOpenChange:q,children:[(0,ve.jsx)(Ai,{asChild:!0,children:(0,ve.jsx)(te,{variant:"ghost",size:"sm",children:(0,ve.jsx)(as,{className:"h-4 w-4"})})}),(0,ve.jsx)(pi,{className:"w-80",align:"end",children:(0,ve.jsxs)("div",{className:"space-y-4",children:[(0,ve.jsx)("div",{className:"space-y-2",children:(0,ve.jsx)("h4",{className:"font-medium text-sm",children:"Chart Settings"})}),(0,ve.jsxs)("div",{className:"space-y-2",children:[(0,ve.jsx)(bt,{className:"text-xs",children:"Color Theme"}),(0,ve.jsx)("div",{className:"grid grid-cols-3 gap-2",children:Object.entries(Gae).map(([pe,ne])=>(0,ve.jsxs)("button",{onClick:()=>Y(pe),className:B("p-2 rounded-lg border-2 transition-all",K===pe?"border-primary":"border-transparent hover:border-muted-foreground/20"),children:[(0,ve.jsx)("div",{className:"flex gap-1",children:ne.slice(0,3).map((xe,Ne)=>(0,ve.jsx)("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:xe}},Ne))}),(0,ve.jsx)("span",{className:"text-xs mt-1 block capitalize",children:pe})]},pe))})]}),(0,ve.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ve.jsx)(bt,{htmlFor:"animation",className:"text-xs",children:"Animations"}),(0,ve.jsx)(Hh,{id:"animation",checked:N,onCheckedChange:pe=>{}})]}),(0,ve.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ve.jsx)(bt,{htmlFor:"grid",className:"text-xs",children:"Show Grid"}),(0,ve.jsx)(Hh,{id:"grid",checked:c,onCheckedChange:pe=>{}})]}),(0,ve.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ve.jsx)(bt,{htmlFor:"crosshair",className:"text-xs",children:"Crosshair Cursor"}),(0,ve.jsx)(Hh,{id:"crosshair",checked:E,onCheckedChange:pe=>{}})]})]})})]}),x&&(0,ve.jsxs)(Pr,{children:[(0,ve.jsx)(Ir,{asChild:!0,children:(0,ve.jsx)(te,{variant:"ghost",size:"sm",children:(0,ve.jsx)(un,{className:"h-4 w-4"})})}),(0,ve.jsxs)(xr,{align:"end",children:[(0,ve.jsxs)(Fe,{onClick:()=>ee("png"),children:[(0,ve.jsx)(rl,{className:"mr-2 h-4 w-4"}),"Export as PNG"]}),(0,ve.jsxs)(Fe,{onClick:()=>ee("svg"),children:[(0,ve.jsx)(ov,{className:"mr-2 h-4 w-4"}),"Export as SVG"]}),(0,ve.jsxs)(Fe,{onClick:()=>ee("pdf"),children:[(0,ve.jsx)(ov,{className:"mr-2 h-4 w-4"}),"Export as PDF"]}),(0,ve.jsx)(Vr,{}),(0,ve.jsxs)(Fe,{onClick:()=>ee("csv"),children:[(0,ve.jsx)(ov,{className:"mr-2 h-4 w-4"}),"Export as CSV"]}),(0,ve.jsxs)(Fe,{onClick:()=>ee("json"),children:[(0,ve.jsx)(vw,{className:"mr-2 h-4 w-4"}),"Export as JSON"]})]})]}),(0,ve.jsx)(te,{variant:"ghost",size:"sm",onClick:()=>j(!M),children:M?(0,ve.jsx)(Zt,{className:"h-4 w-4"}):(0,ve.jsx)(Rl,{className:"h-4 w-4"})})]})]}),(0,ve.jsxs)(Ve,{className:"relative",children:[z&&(0,ve.jsxs)(ie.div,{initial:{opacity:0},animate:{opacity:1},className:"absolute top-2 left-2 z-10 flex items-center gap-1 text-xs text-muted-foreground bg-background/80 backdrop-blur-sm px-2 py-1 rounded-md",children:[(0,ve.jsx)(Rx,{className:"h-3 w-3"}),(0,ve.jsx)("span",{children:"Drag to pan"})]}),(0,ve.jsx)(ie.div,{animate:{scale:G/100},transition:{type:"spring",stiffness:300,damping:30},style:{transformOrigin:"center"},children:D?(0,ve.jsx)(hg,{width:"100%",height:O?60:a,children:Ie()}):(0,ve.jsx)("div",{style:{width:"100%",height:O?"60px":`${a}px`},children:Ie()})}),V&&!O&&(0,ve.jsx)(ie.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"absolute bottom-2 right-2 w-32 h-20 bg-background/80 backdrop-blur-sm border rounded-lg p-1",children:(0,ve.jsx)(hg,{width:"100%",height:"100%",children:(0,ve.jsx)(dN,{data:e,margin:{top:0,right:0,left:0,bottom:0},children:r.filter(pe=>!pe.hide&&!oe.has(pe.dataKey)).map((pe,ne)=>(0,ve.jsx)(Um,{type:"monotone",dataKey:pe.dataKey,stroke:pe.color||me[ne%me.length],strokeWidth:1,dot:!1},pe.dataKey))})})})]})]})})}function Kae(e){let{hasProAccess:t}=Ut();return t?(0,ve.jsx)(Y8t,{...e}):(0,ve.jsx)(Be,{className:"w-full",children:(0,ve.jsxs)(Ve,{className:"flex flex-col items-center justify-center py-12",children:[(0,ve.jsx)("div",{className:"flex items-center justify-center w-16 h-16 rounded-full bg-primary/10 mb-4",children:(0,ve.jsx)(Ct,{className:"w-8 h-8 text-primary"})}),(0,ve.jsx)("h3",{className:"text-lg font-semibold text-center mb-2",children:"Advanced Chart - Pro Feature"}),(0,ve.jsx)("p",{className:"text-muted-foreground text-center text-sm mb-6 max-w-sm",children:"Professional chart component with advanced features like animations, themes, and interactive controls requires a Pro subscription."}),(0,ve.jsx)("div",{className:"flex items-center gap-2",children:(0,ve.jsxs)(Nt,{variant:"secondary",className:"bg-gradient-to-r from-purple-500/10 to-pink-500/10 text-purple-700 dark:text-purple-300",children:[(0,ve.jsx)(yt,{className:"w-3 h-3 mr-1"}),"Pro Feature"]})}),(0,ve.jsx)(te,{className:"mt-4",size:"sm",children:"Upgrade to Pro"})]})})}var nWe=Kae;var xi=L(ce(),1);var Sy=L(ce(),1);var E$=L(ce(),1);var lr=L(fe(),1);function D$({data:e,onClick:t,onAction:r,className:n,showSparkline:o=!0,showForecast:a=!1,interactive:i=!0,glassmorphism:s=!1,compact:l=!1}){let[c,u]=E$.default.useState(!1),[d,f]=E$.default.useState(!1);E$.default.useEffect(()=>{f(!0)},[]);let p={primary:"text-blue-600 dark:text-blue-400",success:"text-green-600 dark:text-green-400",warning:"text-yellow-600 dark:text-yellow-400",danger:"text-red-600 dark:text-red-400",info:"text-purple-600 dark:text-purple-400"},h=C=>{switch(C){case"increase":return"text-green-600 dark:text-green-400";case"decrease":return"text-red-600 dark:text-red-400";default:return"text-muted-foreground"}},m=C=>{switch(C){case"increase":return(0,lr.jsx)(hw,{className:"h-4 w-4"});case"decrease":return(0,lr.jsx)(mw,{className:"h-4 w-4"});default:return(0,lr.jsx)(em,{className:"h-4 w-4"})}},g=()=>{if(!e.sparkline||e.sparkline.length<2)return null;let C=Math.max(...e.sparkline),b=Math.min(...e.sparkline),w=C-b||1,S=e.sparkline.map((N,D)=>{let E=D/(e.sparkline.length-1)*100,A=100-(N-b)/w*100;return`${E},${A}`}).join(" "),P=`gradient-${e.id}`;return(0,lr.jsx)(ie.div,{className:"absolute bottom-0 left-0 right-0 h-16 overflow-hidden rounded-b-lg opacity-20",initial:{opacity:0},animate:{opacity:c?.3:.2},transition:{duration:.2},children:(0,lr.jsxs)("svg",{className:"w-full h-full",viewBox:"0 0 100 100",preserveAspectRatio:"none",children:[(0,lr.jsx)("defs",{children:(0,lr.jsxs)("linearGradient",{id:P,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[(0,lr.jsx)("stop",{offset:"0%",stopColor:"currentColor",stopOpacity:"0.3"}),(0,lr.jsx)("stop",{offset:"100%",stopColor:"currentColor",stopOpacity:"0"})]})}),(0,lr.jsx)("polyline",{fill:"none",stroke:"currentColor",strokeWidth:"2",points:S,className:p[e.color||"primary"]}),(0,lr.jsx)("polygon",{fill:`url(#${P})`,points:`0,100 ${S} 100,100`,className:p[e.color||"primary"]})]})})},v=()=>{if(!e.target)return null;let C=typeof e.value=="number"?e.value:parseFloat(e.value),b=C/e.target*100;return(0,lr.jsxs)(ie.div,{className:"mt-3",initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.1},children:[(0,lr.jsxs)("div",{className:"flex justify-between text-xs text-muted-foreground mb-1",children:[(0,lr.jsx)("span",{children:"Progress to target"}),(0,lr.jsxs)("span",{children:[b.toFixed(1),"%"]})]}),(0,lr.jsx)("div",{className:"h-1.5 bg-muted rounded-full overflow-hidden",children:(0,lr.jsx)(ie.div,{className:B("h-full rounded-full",b>=100?"bg-green-500":"bg-primary"),initial:{width:0},animate:{width:`${Math.min(b,100)}%`},transition:{duration:.5,ease:"easeOut"}})}),(0,lr.jsxs)("div",{className:"flex justify-between text-xs text-muted-foreground mt-1",children:[(0,lr.jsxs)("span",{children:[C," ",e.unit]}),(0,lr.jsxs)("span",{children:["Target: ",e.target," ",e.unit]})]})]})},y=C=>d?typeof C=="number"?C>=1e6?(C/1e6).toFixed(1)+"M":C>=1e3?(C/1e3).toFixed(1)+"K":C.toFixed(2):C.toString():typeof C=="number"?C>=1e6?(C/1e6).toFixed(1)+"M":C>=1e3?(C/1e3).toFixed(1)+"K":C.toString():C.toString(),x={initial:{opacity:0,y:20},animate:{opacity:1,y:0,transition:{duration:.3,ease:"easeOut"}},hover:i?{y:-2,transition:{duration:.2}}:{}};return(0,lr.jsx)(ie.div,{variants:x,initial:"initial",animate:"animate",whileHover:"hover",onHoverStart:()=>u(!0),onHoverEnd:()=>u(!1),children:(0,lr.jsxs)(Be,{className:B("relative overflow-hidden cursor-pointer transition-all duration-300",i&&"hover:shadow-lg hover:shadow-primary/5",s&&"bg-background/60 backdrop-blur-md border-white/10",n),onClick:t,children:[s&&(0,lr.jsx)("div",{className:"absolute inset-0 bg-gradient-to-br from-primary/5 to-transparent"}),(0,lr.jsxs)("div",{className:B("flex items-center justify-between",l?"p-3 pb-1":"p-4 pb-2"),children:[(0,lr.jsxs)("div",{className:"flex items-center gap-2",children:[(0,lr.jsx)(ie.div,{className:B("rounded-lg",l?"p-1.5":"p-2",s?"bg-white/10 backdrop-blur":"bg-muted"),whileHover:{scale:1.05},whileTap:{scale:.95},children:(0,lr.jsx)("div",{className:B(p[e.color||"primary"],l?"h-4 w-4":"h-5 w-5"),children:e.icon})}),(0,lr.jsx)("div",{children:(0,lr.jsx)("h3",{className:B("font-medium text-muted-foreground",l?"text-xs":"text-sm"),children:e.title})})]}),i&&(0,lr.jsxs)(Pr,{children:[(0,lr.jsx)(Ir,{asChild:!0,children:(0,lr.jsx)(te,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:C=>C.stopPropagation(),children:(0,lr.jsx)(ku,{className:"h-4 w-4"})})}),(0,lr.jsxs)(xr,{align:"end",children:[(0,lr.jsxs)(Fe,{onClick:()=>r?.("fullscreen"),children:[(0,lr.jsx)(Rl,{className:"mr-2 h-4 w-4"}),"Fullscreen"]}),(0,lr.jsxs)(Fe,{onClick:()=>r?.("export"),children:[(0,lr.jsx)(un,{className:"mr-2 h-4 w-4"}),"Export Data"]}),(0,lr.jsxs)(Fe,{onClick:()=>r?.("share"),children:[(0,lr.jsx)(cv,{className:"mr-2 h-4 w-4"}),"Share"]})]})]})]}),(0,lr.jsxs)("div",{className:l?"px-3 pb-3":"px-4 pb-4",children:[(0,lr.jsx)(Gf,{children:(0,lr.jsxs)(Bd,{children:[(0,lr.jsx)(Vd,{asChild:!0,children:(0,lr.jsxs)(ie.div,{className:B("font-bold tracking-tight",l?"text-xl":"text-3xl"),animate:{scale:c&&!l?1.02:1},transition:{duration:.2},children:[y(e.value),e.unit&&(0,lr.jsx)("span",{className:B("ml-1 text-muted-foreground",l?"text-sm":"text-lg"),children:e.unit})]})}),(0,lr.jsx)(Fu,{children:(0,lr.jsxs)("p",{children:["Exact value: ",e.value," ",e.unit]})})]})}),e.change&&(0,lr.jsxs)(ie.div,{className:B("flex items-center gap-1 mt-1",l?"text-xs":"text-sm",h(e.change.type)),initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:.1},children:[m(e.change.type),(0,lr.jsxs)("span",{className:"font-medium",children:[e.change.type==="neutral"?"":e.change.type==="increase"?"+":"-",Math.abs(e.change.value),"%"]}),(0,lr.jsxs)("span",{className:"text-muted-foreground",children:["from ",e.change.period]})]}),a&&e.forecast&&(0,lr.jsxs)(ie.div,{className:"flex items-center gap-1 text-xs text-muted-foreground mt-1",initial:{opacity:0},animate:{opacity:1},transition:{delay:.2},children:[(0,lr.jsx)(Oc,{className:"h-3 w-3"}),(0,lr.jsxs)("span",{children:["Forecast: ",y(e.forecast)," ",e.unit]})]}),!l&&v()]}),o&&!l&&g()]})})}var Yae=L(ce(),1);var ut=L(fe(),1),Xae={default:["#3b82f6","#10b981","#f59e0b","#ef4444","#8b5cf6","#ec4899"],pastel:["#93c5fd","#86efac","#fcd34d","#fca5a5","#c4b5fd","#fbcfe8"],vibrant:["#2563eb","#059669","#d97706","#dc2626","#7c3aed","#db2777"],monochrome:["#1f2937","#374151","#4b5563","#6b7280","#9ca3af","#d1d5db"]};function O$({id:e,title:t,description:r,data:n,className:o,height:a=300,onAction:i,loading:s=!1,refreshing:l=!1,glassmorphism:c=!1,interactive:u=!0,compact:d=!1}){let[f,p]=Yae.default.useState("default"),[h,m]=Yae.default.useState(!1),g=Xae[f],v=d?120:a,y=({active:b,payload:w,label:S})=>!b||!w?null:(0,ut.jsxs)(ie.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},className:B("p-3 rounded-lg shadow-lg",c?"bg-background/80 backdrop-blur-md border border-white/10":"bg-background border"),children:[(0,ut.jsx)("p",{className:"text-sm font-medium",children:S}),w.map((P,N)=>(0,ut.jsxs)("p",{className:"text-sm mt-1",children:[(0,ut.jsx)("span",{className:"inline-block w-3 h-3 rounded-full mr-2",style:{backgroundColor:P.color}}),P.name,": ",P.value]},N))]}),x=()=>{if(!n.data||n.data.length===0)return(0,ut.jsx)("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:"No data available"});let b={data:n.data,margin:{top:5,right:30,left:20,bottom:5}};switch(n.type){case"line":return(0,ut.jsx)(hg,{width:"100%",height:v,children:(0,ut.jsxs)(dN,{...b,children:[!d&&(0,ut.jsx)(Vm,{strokeDasharray:"3 3",className:"opacity-30"}),(0,ut.jsx)(Is,{dataKey:"name",tick:d?{fontSize:10}:void 0,hide:d}),(0,ut.jsx)(Rs,{tick:d?{fontSize:10}:void 0,hide:d}),!d&&(0,ut.jsx)(Ta,{content:(0,ut.jsx)(y,{})}),u&&!d&&(0,ut.jsx)(yi,{}),Object.keys(n.data[0]).filter(w=>w!=="name").map((w,S)=>(0,ut.jsx)(Um,{type:"monotone",dataKey:w,stroke:g[S%g.length],strokeWidth:2,dot:{r:4},activeDot:{r:6},isAnimationActive:!1},w))]})});case"bar":return(0,ut.jsx)(hg,{width:"100%",height:v,children:(0,ut.jsxs)(e_,{...b,children:[!d&&(0,ut.jsx)(Vm,{strokeDasharray:"3 3",className:"opacity-30"}),(0,ut.jsx)(Is,{dataKey:"name",tick:d?{fontSize:10}:void 0,hide:d}),(0,ut.jsx)(Rs,{tick:d?{fontSize:10}:void 0,hide:d}),!d&&(0,ut.jsx)(Ta,{content:(0,ut.jsx)(y,{})}),u&&!d&&(0,ut.jsx)(yi,{}),Object.keys(n.data[0]).filter(w=>w!=="name").map((w,S)=>(0,ut.jsx)(lf,{dataKey:w,fill:g[S%g.length],radius:[4,4,0,0],isAnimationActive:!1},w))]})});case"area":return(0,ut.jsx)(hg,{width:"100%",height:v,children:(0,ut.jsxs)(n_,{...b,children:[!d&&(0,ut.jsx)(Vm,{strokeDasharray:"3 3",className:"opacity-30"}),(0,ut.jsx)(Is,{dataKey:"name",tick:d?{fontSize:10}:void 0,hide:d}),(0,ut.jsx)(Rs,{tick:d?{fontSize:10}:void 0,hide:d}),!d&&(0,ut.jsx)(Ta,{content:(0,ut.jsx)(y,{})}),u&&!d&&(0,ut.jsx)(yi,{}),Object.keys(n.data[0]).filter(w=>w!=="name").map((w,S)=>(0,ut.jsx)(uf,{type:"monotone",dataKey:w,stroke:g[S%g.length],fill:g[S%g.length],fillOpacity:.2,isAnimationActive:!1},w))]})});case"pie":case"donut":return(0,ut.jsx)(hg,{width:"100%",height:v,children:(0,ut.jsxs)(t_,{children:[(0,ut.jsx)(Yu,{data:n.data,cx:"50%",cy:"50%",labelLine:!1,label:u&&!d,outerRadius:d?40:n.type==="donut"?80:100,innerRadius:n.type==="donut"?d?25:50:0,fill:"#8884d8",dataKey:"value",isAnimationActive:!1,children:n.data.map((w,S)=>(0,ut.jsx)(Wu,{fill:g[S%g.length]},`cell-${S}`))}),!d&&(0,ut.jsx)(Ta,{content:(0,ut.jsx)(y,{})}),u&&!d&&(0,ut.jsx)(yi,{})]})});case"radar":return(0,ut.jsx)(hg,{width:"100%",height:v,children:(0,ut.jsxs)(r_,{data:n.data,children:[(0,ut.jsx)(Nk,{}),(0,ut.jsx)(Xu,{dataKey:"subject"}),(0,ut.jsx)(Ku,{}),Object.keys(n.data[0]).filter(w=>w!=="subject").map((w,S)=>(0,ut.jsx)(Rg,{name:w,dataKey:w,stroke:g[S%g.length],fill:g[S%g.length],fillOpacity:.3,isAnimationActive:!1},w)),!d&&(0,ut.jsx)(Ta,{content:(0,ut.jsx)(y,{})}),u&&!d&&(0,ut.jsx)(yi,{})]})});default:return null}},C={initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1,transition:{duration:.3,ease:"easeOut"}}};return(0,ut.jsx)(ie.div,{variants:C,initial:"initial",animate:"animate",className:B(h&&"fixed inset-4 z-50"),children:(0,ut.jsxs)(Be,{className:B("relative overflow-hidden transition-all duration-300",c&&"bg-background/60 backdrop-blur-md border-white/10",h&&"h-full",o),children:[(0,ut.jsxs)(yr,{className:B("flex flex-row items-center justify-between space-y-0",d?"pb-1 pt-2 px-3":u?"pb-2":"pb-1 pt-3"),children:[(0,ut.jsxs)("div",{children:[(0,ut.jsx)(Or,{className:B("font-semibold",d?"text-xs":u?"text-base":"text-sm"),children:t}),r&&u&&!d&&(0,ut.jsx)("p",{className:"text-sm text-muted-foreground mt-1",children:r})]}),!d&&(0,ut.jsxs)("div",{className:"flex items-center gap-2",children:[l&&(0,ut.jsx)(ie.div,{animate:{rotate:360},transition:{duration:1,repeat:1/0,ease:"linear"},children:(0,ut.jsx)(yo,{className:"h-4 w-4 text-muted-foreground"})}),u&&(0,ut.jsxs)(Pr,{children:[(0,ut.jsx)(Ir,{asChild:!0,children:(0,ut.jsx)(te,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:(0,ut.jsx)(ku,{className:"h-4 w-4"})})}),(0,ut.jsxs)(xr,{align:"end",className:"w-48",children:[(0,ut.jsxs)(Fe,{onClick:()=>{m(!h),i?.("fullscreen",{fullscreen:!h})},children:[(0,ut.jsx)(Rl,{className:"mr-2 h-4 w-4"}),h?"Exit Fullscreen":"Fullscreen"]}),(0,ut.jsxs)(Bu,{children:[(0,ut.jsxs)(jc,{children:[(0,ut.jsx)(Dc,{className:"mr-2 h-4 w-4"}),"Color Scheme"]}),(0,ut.jsx)(qc,{children:Object.keys(Xae).map(b=>(0,ut.jsx)(Fe,{onClick:()=>p(b),children:(0,ut.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ut.jsx)("div",{className:"flex gap-1",children:Xae[b].slice(0,3).map((w,S)=>(0,ut.jsx)("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:w}},S))}),(0,ut.jsx)("span",{className:"capitalize",children:b})]})},b))})]}),(0,ut.jsx)(Vr,{}),(0,ut.jsxs)(Fe,{onClick:()=>i?.("export",{format:"png"}),children:[(0,ut.jsx)(un,{className:"mr-2 h-4 w-4"}),"Export as PNG"]}),(0,ut.jsxs)(Fe,{onClick:()=>i?.("export",{format:"csv"}),children:[(0,ut.jsx)(un,{className:"mr-2 h-4 w-4"}),"Export Data"]}),(0,ut.jsx)(Vr,{}),(0,ut.jsxs)(Fe,{onClick:()=>i?.("filter"),children:[(0,ut.jsx)(Ii,{className:"mr-2 h-4 w-4"}),"Filter Data"]}),(0,ut.jsxs)(Fe,{onClick:()=>i?.("settings"),children:[(0,ut.jsx)(as,{className:"mr-2 h-4 w-4"}),"Chart Settings"]})]})]})]})]}),(0,ut.jsx)(Ve,{className:B("p-0",d?"px-2 pb-2":u?"px-4 pb-4":"px-2 pb-2"),children:(0,ut.jsx)(Dt,{mode:"wait",children:s?(0,ut.jsx)(ie.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"flex items-center justify-center",style:{height:v},children:(0,ut.jsxs)("div",{className:"space-y-2",children:[(0,ut.jsx)("div",{className:"animate-pulse bg-muted h-4 w-32 rounded"}),(0,ut.jsx)("div",{className:"animate-pulse bg-muted h-4 w-24 rounded"}),(0,ut.jsx)("div",{className:"animate-pulse bg-muted h-4 w-28 rounded"})]})},"loading"):(0,ut.jsx)(ie.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.3},children:x()},"chart")})})]})})}var AS=L(ce(),1);var St=L(fe(),1);function _$({items:e,title:t="Activity Feed",className:r,height:n=400,onItemClick:o,onAction:a,loading:i=!1,showFilters:s=!0,showNotifications:l=!0,glassmorphism:c=!1,realtime:u=!1,maxItems:d,compact:f=!1}){let[p,h]=AS.default.useState("all"),[m,g]=AS.default.useState(!0),[v,y]=AS.default.useState([]),[x,C]=AS.default.useState(!1);AS.default.useEffect(()=>{C(!0)},[]),AS.default.useEffect(()=>{if(!u)return;let N=setInterval(()=>{let D={id:`new-${Date.now()}`,type:["info","success","warning","error"][Math.floor(Math.random()*4)],title:"New activity",description:"Something happened just now",timestamp:new Date,user:{name:"System",avatar:void 0}};y(E=>[D,...E].slice(0,3)),setTimeout(()=>{y(E=>E.filter(A=>A.id!==D.id))},5e3)},1e4);return()=>clearInterval(N)},[u]);let b=N=>{switch(N){case"info":return(0,St.jsx)(Ec,{className:"h-4 w-4"});case"success":return(0,St.jsx)(Pi,{className:"h-4 w-4"});case"warning":return(0,St.jsx)(eo,{className:"h-4 w-4"});case"error":return(0,St.jsx)(aa,{className:"h-4 w-4"})}},w=N=>{switch(N){case"info":return"text-blue-500 bg-blue-100 dark:bg-blue-900/20";case"success":return"text-green-500 bg-green-100 dark:bg-green-900/20";case"warning":return"text-yellow-500 bg-yellow-100 dark:bg-yellow-900/20";case"error":return"text-red-500 bg-red-100 dark:bg-red-900/20"}},S=[...v,...e].filter(N=>p==="all"||N.type===p);d&&(S=S.slice(0,d));let P=(N,D=!1)=>(0,St.jsxs)(ie.div,{layout:!0,initial:{opacity:0,x:-20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},whileHover:{x:f?2:4},transition:{duration:.2},className:B("group relative flex gap-3 rounded-lg cursor-pointer transition-colors",f?"p-2":"p-3","hover:bg-muted/50",D&&"bg-primary/5 border-l-2 border-primary"),onClick:()=>o?.(N),children:[!f&&(0,St.jsx)("div",{className:"absolute left-7 top-12 bottom-0 w-px bg-border"}),(0,St.jsx)("div",{className:"relative z-10 flex-shrink-0",children:N.user?.avatar?(0,St.jsxs)(ba,{className:f?"h-6 w-6":"h-8 w-8",children:[(0,St.jsx)(ki,{src:N.user.avatar}),(0,St.jsx)(Ha,{children:N.user.name[0]})]}):(0,St.jsx)("div",{className:B(f?"h-6 w-6":"h-8 w-8","rounded-full flex items-center justify-center",w(N.type)),children:N.icon||b(N.type)})}),(0,St.jsxs)("div",{className:"flex-1 min-w-0",children:[f?(0,St.jsxs)("div",{className:"space-y-0.5",children:[(0,St.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,St.jsxs)("p",{className:"text-xs font-medium leading-tight",children:[N.user?.name&&(0,St.jsxs)("span",{className:"text-foreground",children:[N.user.name," "]}),(0,St.jsx)("span",{className:"text-muted-foreground",children:N.title})]}),(0,St.jsx)("div",{className:"text-[10px] text-muted-foreground",children:x?jK(N.timestamp,{addSuffix:!1}).replace("about ","").replace("over ",""):""})]}),N.description&&(0,St.jsx)("p",{className:"text-[10px] text-muted-foreground line-clamp-1",children:N.description})]}):(0,St.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,St.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,St.jsxs)("p",{className:"text-sm font-medium leading-tight",children:[N.user?.name&&(0,St.jsxs)("span",{className:"text-foreground",children:[N.user.name," "]}),(0,St.jsx)("span",{className:"text-muted-foreground",children:N.title})]}),N.description&&(0,St.jsx)("p",{className:"text-sm text-muted-foreground mt-0.5 line-clamp-2",children:N.description})]}),(0,St.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground whitespace-nowrap",children:[(0,St.jsx)(In,{className:"h-3 w-3"}),x?jK(N.timestamp,{addSuffix:!0}):"Loading..."]})]}),D&&(0,St.jsx)(ie.div,{initial:{scale:0},animate:{scale:1},className:"inline-block mt-1",children:(0,St.jsx)(Nt,{variant:"secondary",className:"text-xs",children:"New"})})]}),!f&&(0,St.jsx)("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity",children:(0,St.jsx)(te,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:E=>{E.stopPropagation(),a?.("more",N)},children:(0,St.jsx)(za,{className:"h-3 w-3"})})})]},N.id);return(0,St.jsxs)(Be,{className:B("relative overflow-hidden",c&&"bg-background/60 backdrop-blur-md border-white/10",r),children:[(0,St.jsxs)(yr,{className:B("flex flex-row items-center justify-between space-y-0",f?"pb-2 pt-3":"pb-3"),children:[(0,St.jsxs)("div",{className:"flex items-center gap-2",children:[(0,St.jsx)(Ba,{className:B("text-muted-foreground",f?"h-3.5 w-3.5":"h-4 w-4")}),(0,St.jsx)(Or,{className:B("font-semibold",f?"text-sm":"text-base"),children:t}),u&&!f&&(0,St.jsxs)(Nt,{variant:"secondary",className:"text-xs",children:[(0,St.jsx)("span",{className:"mr-1 h-1.5 w-1.5 rounded-full bg-green-500 animate-pulse"}),"Live"]})]}),!f&&(0,St.jsxs)("div",{className:"flex items-center gap-1",children:[s&&(0,St.jsxs)(Pr,{children:[(0,St.jsx)(Ir,{asChild:!0,children:(0,St.jsxs)(te,{variant:"ghost",size:"sm",className:"h-8 px-2",children:[(0,St.jsx)(Ii,{className:"h-4 w-4 mr-1"}),p!=="all"&&(0,St.jsx)(Nt,{variant:"secondary",className:"ml-1",children:p})]})}),(0,St.jsxs)(xr,{align:"end",children:[(0,St.jsx)(Fe,{onClick:()=>h("all"),children:"All Activities"}),(0,St.jsx)(Vr,{}),(0,St.jsxs)(Fe,{onClick:()=>h("info"),children:[(0,St.jsx)(Ec,{className:"mr-2 h-4 w-4 text-blue-500"}),"Information"]}),(0,St.jsxs)(Fe,{onClick:()=>h("success"),children:[(0,St.jsx)(Pi,{className:"mr-2 h-4 w-4 text-green-500"}),"Success"]}),(0,St.jsxs)(Fe,{onClick:()=>h("warning"),children:[(0,St.jsx)(eo,{className:"mr-2 h-4 w-4 text-yellow-500"}),"Warning"]}),(0,St.jsxs)(Fe,{onClick:()=>h("error"),children:[(0,St.jsx)(aa,{className:"mr-2 h-4 w-4 text-red-500"}),"Error"]})]})]}),l&&(0,St.jsx)(te,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:()=>{g(!m),a?.("notifications",{enabled:!m})},children:m?(0,St.jsx)(mh,{className:"h-4 w-4"}):(0,St.jsx)(zT,{className:"h-4 w-4 text-muted-foreground"})}),(0,St.jsx)(te,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:()=>a?.("refresh"),children:(0,St.jsx)(yo,{className:"h-4 w-4"})})]})]}),(0,St.jsx)(Ve,{className:"p-0",children:(0,St.jsx)(ac,{className:f?"px-3 pb-3":"px-4 pb-4",style:{height:f?Math.min(n,200):n},children:(0,St.jsx)(Dt,{mode:"popLayout",children:i?(0,St.jsx)(ie.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"space-y-3",children:[...Array(5)].map((N,D)=>(0,St.jsxs)("div",{className:"flex gap-3",children:[(0,St.jsx)("div",{className:"h-8 w-8 rounded-full bg-muted animate-pulse"}),(0,St.jsxs)("div",{className:"flex-1 space-y-2",children:[(0,St.jsx)("div",{className:"h-4 bg-muted rounded animate-pulse"}),(0,St.jsx)("div",{className:"h-3 bg-muted rounded w-3/4 animate-pulse"})]})]},D))},"loading"):S.length===0?(0,St.jsxs)(ie.div,{initial:{opacity:0},animate:{opacity:1},className:"flex flex-col items-center justify-center py-12 text-muted-foreground",children:[(0,St.jsx)(Ba,{className:"h-8 w-8 mb-2"}),(0,St.jsx)("p",{className:"text-sm",children:"No activities to show"})]},"empty"):(0,St.jsx)("div",{className:"space-y-1",children:S.map(N=>P(N,v.some(D=>D.id===N.id)))})})})})]})}var Qae=L(ce(),1);var La=L(fe(),1);function F$({data:e,title:t="Progress",className:r,glassmorphism:n=!1,compact:o=!1}){let a=Array.isArray(e)?e:[e],[i,s]=Qae.default.useState(!1);return Qae.default.useEffect(()=>{s(!0)},[]),(0,La.jsxs)(Be,{className:B("h-full flex flex-col",n&&"bg-background/60 backdrop-blur-md border-white/10",r),children:[(0,La.jsx)(yr,{className:"pb-3 space-y-0",children:(0,La.jsxs)(Or,{className:"text-sm sm:text-base font-semibold flex items-center gap-2",children:[(0,La.jsx)(gh,{className:"h-4 w-4 text-muted-foreground"}),(0,La.jsx)("span",{className:"truncate",children:t})]})}),(0,La.jsx)(Ve,{className:"flex-1 space-y-3 overflow-auto",children:a.map((l,c)=>{let u=l.current/l.target*100,d=l.deadline&&new Date(l.deadline)<new Date;return(0,La.jsxs)(ie.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:c*.05},className:"space-y-2",children:[(0,La.jsxs)("div",{className:"flex flex-col sm:flex-row sm:justify-between gap-1 sm:gap-2",children:[(0,La.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,La.jsx)("h4",{className:"text-xs sm:text-sm font-medium truncate",children:l.title}),l.description&&(0,La.jsx)("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:l.description})]}),(0,La.jsxs)("div",{className:"text-left sm:text-right",children:[(0,La.jsxs)("p",{className:"text-xs sm:text-sm font-semibold tabular-nums",children:[l.current," / ",l.target," ",l.unit]}),(0,La.jsxs)("p",{className:"text-xs text-muted-foreground",children:[u.toFixed(1),"%"]})]})]}),(0,La.jsxs)("div",{className:"relative",children:[(0,La.jsx)(ps,{value:Math.min(u,100),className:B("h-1.5 sm:h-2",d&&"[&>div]:bg-destructive")}),l.milestone&&(0,La.jsx)("div",{className:"absolute top-1/2 -translate-y-1/2 w-0.5 h-3 sm:h-4 bg-border",style:{left:`${l.milestone/l.target*100}%`}})]}),l.deadline&&(0,La.jsxs)("div",{className:B("flex items-center gap-1 text-xs",d?"text-destructive":"text-muted-foreground"),children:[(0,La.jsx)(In,{className:"h-3 w-3"}),(0,La.jsxs)("span",{children:[d?"Overdue":"Due",": ",i?new Date(l.deadline).toLocaleDateString():"Loading..."]})]}),l.trend&&(0,La.jsxs)("div",{className:"flex items-center gap-1 text-xs text-green-600 dark:text-green-400",children:[(0,La.jsx)(Oc,{className:"h-3 w-3"}),(0,La.jsxs)("span",{children:["+",l.trend,"% this week"]})]})]},l.id)})})]})}var Zae=L(ce(),1);var So=L(fe(),1);function B$({data:e,title:t="Comparison",className:r,glassmorphism:n=!1,compact:o=!1}){let[a,i]=Zae.default.useState(!1);Zae.default.useEffect(()=>{i(!0)},[]);let s=Math.max(...e.periods.map(d=>d.value)),l=e.periods.length>=2?(e.periods[0].value-e.periods[1].value)/e.periods[1].value*100:0,c=l>0?"increase":l<0?"decrease":"neutral",u=d=>a?d>=1e6?(d/1e6).toFixed(1)+"M":d>=1e3?(d/1e3).toFixed(0)+"K":d.toLocaleString():d.toString();return(0,So.jsxs)(Be,{className:B("h-full flex flex-col overflow-hidden",n&&"bg-background/60 backdrop-blur-md border-white/10",r),children:[(0,So.jsx)(yr,{className:"flex-shrink-0 pb-3 px-4",children:(0,So.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,So.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,So.jsxs)(Or,{className:"text-sm font-semibold flex items-center gap-2",children:[(0,So.jsx)(ns,{className:"h-4 w-4 text-muted-foreground flex-shrink-0"}),(0,So.jsx)("span",{className:"truncate",children:t})]}),e.metric&&(0,So.jsx)("p",{className:"text-xs text-muted-foreground mt-1 truncate",children:e.metric})]}),l!==0&&(0,So.jsxs)("div",{className:B("inline-flex items-center gap-1 px-2 py-0.5 rounded-md text-xs font-medium flex-shrink-0",c==="increase"&&"bg-green-500/10 text-green-600 dark:text-green-400 border border-green-500/20",c==="decrease"&&"bg-red-500/10 text-red-600 dark:text-red-400 border border-red-500/20",c==="neutral"&&"bg-muted text-muted-foreground border border-border"),children:[c==="increase"?(0,So.jsx)(hw,{className:"h-3 w-3"}):c==="decrease"?(0,So.jsx)(mw,{className:"h-3 w-3"}):(0,So.jsx)(em,{className:"h-3 w-3"}),(0,So.jsxs)("span",{children:[Math.abs(l).toFixed(1),"%"]})]})]})}),(0,So.jsxs)(Ve,{className:"flex-1 px-4 pb-4 overflow-hidden flex flex-col gap-3",children:[(0,So.jsx)("div",{className:"flex-1 min-h-0 overflow-y-auto overflow-x-hidden pr-2 -mr-2",children:(0,So.jsx)("div",{className:"space-y-2.5",children:e.periods.map((d,f)=>{let p=d.value/s*100,h=d.value===s;return(0,So.jsxs)(ie.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:f*.05},children:[(0,So.jsxs)("div",{className:"flex items-center justify-between gap-3 mb-1",children:[(0,So.jsx)("span",{className:B("text-xs font-medium truncate flex-1",h?"text-foreground":"text-muted-foreground"),children:d.label}),(0,So.jsx)("span",{className:B("text-xs font-semibold tabular-nums flex-shrink-0",h&&"text-primary"),children:u(d.value)})]}),(0,So.jsx)("div",{className:"w-full bg-muted rounded-full h-1.5 overflow-hidden",children:(0,So.jsx)(ie.div,{className:B("h-full rounded-full transition-colors",h?"bg-primary":"bg-primary/60"),initial:{width:0},animate:{width:`${Math.min(p,100)}%`},transition:{duration:.5,delay:f*.05}})})]},d.label)})})}),e.showChart&&(0,So.jsx)("div",{className:"flex-shrink-0 pt-3 border-t",children:(0,So.jsx)("div",{className:"h-14 flex items-end justify-between gap-1",children:e.periods.slice(0,5).map((d,f)=>{let p=d.value/s*100,h=d.value===s;return(0,So.jsxs)(ie.div,{className:"flex-1 flex flex-col items-center gap-0.5",initial:{opacity:0},animate:{opacity:1},transition:{delay:f*.05},children:[(0,So.jsx)("div",{className:"w-full h-10 flex items-end justify-center px-0.5",children:(0,So.jsx)(ie.div,{className:B("w-full max-w-[20px] rounded-t transition-colors",h?"bg-primary":"bg-primary/40"),initial:{height:0},animate:{height:`${p}%`},transition:{duration:.5,delay:f*.05}})}),(0,So.jsx)("span",{className:"text-[9px] text-muted-foreground",children:d.label.slice(0,3)})]},d.label)})})})]})]})}var h6=L(vGe(),1);var gn=L(fe(),1),C7t=(0,h6.WidthProvider)(h6.Responsive);function yGe({widgets:e,onLayoutChange:t,onWidgetRemove:r,onWidgetAction:n,editMode:o=!1,className:a,glassmorphism:i=!1,breakpoints:s={lg:1200,md:996,sm:768,xs:480,xxs:0},cols:l={lg:12,md:10,sm:6,xs:4,xxs:2},rowHeight:c=80,margin:u=[20,20],containerPadding:d=[20,20]}){let[f,p]=Sy.default.useState({}),[h,m]=Sy.default.useState("lg"),[g,v]=Sy.default.useState(new Set),[y,x]=Sy.default.useState(null),[C,b]=Sy.default.useState(1200),w=Sy.default.useRef(null),[S,P]=Sy.default.useState("vertical");Sy.default.useEffect(()=>{let R=()=>{if(w.current){let I=w.current.offsetWidth;b(I),I<480?m("xxs"):I<768?m("xs"):I<996?m("sm"):I<1200?m("md"):m("lg")}};return R(),window.addEventListener("resize",R),()=>window.removeEventListener("resize",R)},[]);let N=()=>{let R=e.map((k,T)=>({i:k.id,x:k.position?.x??T*3%12,y:k.position?.y??Math.floor(T/4)*3,w:k.size?.w??3,h:k.size?.h??3,minW:k.size?.minW||1,maxW:k.size?.maxW||12,minH:k.size?.minH||2,maxH:k.size?.maxH||8,isDraggable:o&&!g.has(k.id)&&k.permissions?.canMove!==!1,isResizable:o&&!g.has(k.id)&&k.permissions?.canResize!==!1})),I=(k,T)=>{let O=[...k].sort((M,j)=>M.y===j.y?M.x-j.x:M.y-j.y),F=0,_=[];for(let M of O){let j=Math.min(M.w,T),H=F;for(let q of _){let G=q.y+q.h;q.x<j&&q.x+q.w>0&&G>H&&(H=G)}_.push({...M,w:j,x:0,y:H}),F=H+M.h}return _};return{lg:R,md:e.map((k,T)=>{let O=Math.floor(T/2),F=T%2*5;return{i:k.id,w:Math.min(k.size?.w??5,5),h:k.size?.h??3,x:F,y:O*4,minW:2,minH:2,isDraggable:o&&!g.has(k.id),isResizable:o&&!g.has(k.id)}}),sm:I(R.map(k=>({...k,w:Math.min(k.w,6),h:Math.min(k.h,4)})),6),xs:I(R.map(k=>({...k,w:Math.min(k.w,4),h:Math.min(k.h,3)})),4),xxs:I(R.map(k=>({...k,w:2,h:Math.min(k.h,3)})),2)}},D=()=>{let R=N();return R[h]||R.lg},E=R=>{v(I=>{let k=new Set(I);return k.has(R)?k.delete(R):k.add(R),k})},A=R=>{x(y===R?null:R)},z=R=>{let I=g.has(R.id),k=y===R.id,T=()=>{switch(R.type){case"metric":return(0,gn.jsx)(D$,{data:R.data,onAction:O=>n?.(R.id,O),glassmorphism:i});case"chart":return(0,gn.jsx)(O$,{id:R.id,title:R.title,description:R.description,data:R.data,loading:R.loading,glassmorphism:i,onAction:(O,F)=>n?.(R.id,O,F)});case"activity":return(0,gn.jsx)(_$,{items:R.data?.items||[],title:R.title,loading:R.loading,glassmorphism:i,realtime:R.data?.realtime,onAction:(O,F)=>n?.(R.id,O,F)});case"progress":return(0,gn.jsx)(F$,{data:R.data,title:R.title,glassmorphism:i});case"comparison":return(0,gn.jsx)(B$,{data:R.data,title:R.title,glassmorphism:i});case"table":case"map":case"calendar":return(0,gn.jsxs)("div",{className:B("h-full p-4 rounded-lg border",i?"bg-background/60 backdrop-blur-md border-white/10":"bg-card"),children:[(0,gn.jsx)("h3",{className:"font-semibold mb-2",children:R.title}),R.description&&(0,gn.jsx)("p",{className:"text-sm text-muted-foreground mb-4",children:R.description}),(0,gn.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground",children:(0,gn.jsxs)("span",{className:"text-sm",children:[R.type," widget content"]})})]});default:return(0,gn.jsxs)("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:["Widget type not supported: ",R.type]})}};return(0,gn.jsxs)(ie.div,{className:B("relative group h-full",k&&"!fixed !inset-4 !z-50 !h-auto !w-auto"),layout:!k,transition:{duration:.2},children:[(0,gn.jsx)("div",{className:"h-full dashboard-widget-container",children:T()}),o&&!k&&(0,gn.jsx)(ie.div,{initial:{opacity:0},animate:{opacity:1},className:"absolute top-2 right-2 z-10 opacity-0 group-hover:opacity-100 transition-opacity",children:(0,gn.jsxs)("div",{className:B("flex items-center gap-1 p-1 rounded-lg",i?"bg-background/80 backdrop-blur-sm":"bg-background/95","border shadow-sm"),children:[!I&&(0,gn.jsx)("div",{className:"drag-handle cursor-move p-1 hover:bg-muted rounded",children:(0,gn.jsx)(nA,{className:"h-4 w-4"})}),(0,gn.jsx)(te,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>E(R.id),children:I?(0,gn.jsx)(Ct,{className:"h-3 w-3"}):(0,gn.jsx)(Ix,{className:"h-3 w-3"})}),(0,gn.jsx)(te,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>A(R.id),children:(0,gn.jsx)(Rl,{className:"h-3 w-3"})}),(0,gn.jsx)(te,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>n?.(R.id,"settings"),children:(0,gn.jsx)(as,{className:"h-3 w-3"})}),R.permissions?.canDelete!==!1&&(0,gn.jsx)(te,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0 text-destructive hover:text-destructive",onClick:()=>r?.(R.id),children:(0,gn.jsx)(Zt,{className:"h-3 w-3"})})]})}),k&&(0,gn.jsx)(ie.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:"absolute top-4 right-4 z-10",children:(0,gn.jsxs)(te,{variant:"outline",size:"sm",onClick:()=>A(R.id),children:[(0,gn.jsx)(ww,{className:"h-4 w-4 mr-2"}),"Exit Fullscreen"]})})]},R.id)},V=h==="xs"||h==="xxs"||h==="sm";return(0,gn.jsxs)("div",{ref:w,className:B("w-full relative",a),children:[(0,gn.jsx)(Dt,{children:y?(0,gn.jsx)(ie.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-40 bg-background",children:e.filter(R=>R.id===y).map(z)}):V?(0,gn.jsx)("div",{className:"space-y-6",children:e.map(R=>(0,gn.jsx)(ie.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"w-full",children:z(R)},R.id))}):(0,gn.jsx)(C7t,{className:"layout",layouts:f.lg?f:N(),breakpoints:s,cols:l,rowHeight:h==="xs"||h==="xxs"?60:h==="sm"?70:c,margin:h==="xs"||h==="xxs"?[12,20]:u,containerPadding:h==="xs"||h==="xxs"?[8,8]:d,onLayoutChange:(R,I)=>{p(I),t?.(R)},onBreakpointChange:R=>{m(R),P("vertical")},draggableHandle:".drag-handle",isDraggable:o,isResizable:o,compactType:"vertical",preventCollision:!0,useCSSTransforms:!0,transformScale:1,isDroppable:!0,autoSize:!1,verticalCompact:!0,children:e.map(R=>(0,gn.jsx)("div",{children:z(R)},R.id))})}),o&&!y&&(0,gn.jsx)(ie.div,{initial:{opacity:0},animate:{opacity:.1},className:"absolute inset-0 pointer-events-none",style:{backgroundImage:`
|
|
312
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Y6e(e,t){if(e){if(typeof e=="string")return Hae(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Hae(e,t)}}function D8t(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function O8t(e){if(Array.isArray(e))return Hae(e)}function Hae(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function $6e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function He(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$6e(Object(r),!0).forEach(function(n){br(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$6e(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function br(e,t,r){return t=Q6e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Q6e(e){var t=_8t(e,"string");return cN(t)=="symbol"?t:t+""}function _8t(e,t){if(cN(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(cN(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var F8t={xAxis:["bottom","top"],yAxis:["left","right"]},B8t={width:"100%",height:"100%"},eWe={x:0,y:0};function M$(e){return e}var V8t=function(t,r){return r==="horizontal"?t.x:r==="vertical"?t.y:r==="centric"?t.angle:t.radius},z8t=function(t,r,n,o){var a=r.find(function(u){return u&&u.index===n});if(a){if(t==="horizontal")return{x:a.coordinate,y:o.y};if(t==="vertical")return{x:o.x,y:a.coordinate};if(t==="centric"){var i=a.coordinate,s=o.radius;return He(He(He({},o),Hr(o.cx,o.cy,s,i)),{},{angle:i,radius:s})}var l=a.coordinate,c=o.angle;return He(He(He({},o),Hr(o.cx,o.cy,l,c)),{},{angle:c,radius:l})}return eWe},L$=function(t,r){var n=r.graphicalItems,o=r.dataStartIndex,a=r.dataEndIndex,i=(n??[]).reduce(function(s,l){var c=l.props.data;return c&&c.length?[].concat(uN(s),uN(c)):s},[]);return i.length>0?i:t&&t.length&&Qe(o)&&Qe(a)?t.slice(o,a+1):[]};function tWe(e){return e==="number"?[0,"auto"]:void 0}var jae=function(t,r,n,o){var a=t.graphicalItems,i=t.tooltipAxis,s=L$(r,t);return n<0||!a||!a.length||n>=s.length?null:a.reduce(function(l,c){var u,d=(u=c.props.data)!==null&&u!==void 0?u:r;d&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(d=d.slice(t.dataStartIndex,t.dataEndIndex+1));var f;if(i.dataKey&&!i.allowDuplicatedCategory){var p=d===void 0?s:d;f=LR(p,i.dataKey,o)}else f=d&&d[n]||s[n];return f?[].concat(uN(l),[wk(c,f)]):l},[])},W6e=function(t,r,n,o){var a=o||{x:t.chartX,y:t.chartY},i=V8t(a,n),s=t.orderedTooltipTicks,l=t.tooltipAxis,c=t.tooltipTicks,u=y5e(i,s,c,l);if(u>=0&&c){var d=c[u]&&c[u].value,f=jae(t,r,u,d),p=z8t(n,s,u,a);return{activeTooltipIndex:u,activeLabel:d,activePayload:f,activeCoordinate:p}}return null},U8t=function(t,r){var n=r.axes,o=r.graphicalItems,a=r.axisType,i=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,c=r.dataEndIndex,u=t.layout,d=t.children,f=t.stackOffset,p=yoe(u,a);return n.reduce(function(h,m){var g,v=m.type.defaultProps!==void 0?He(He({},m.type.defaultProps),m.props):m.props,y=v.type,x=v.dataKey,C=v.allowDataOverflow,b=v.allowDuplicatedCategory,w=v.scale,S=v.ticks,P=v.includeHidden,N=v[i];if(h[N])return h;var D=L$(t.data,{graphicalItems:o.filter(function(M){var j,H=i in M.props?M.props[i]:(j=M.type.defaultProps)===null||j===void 0?void 0:j[i];return H===N}),dataStartIndex:l,dataEndIndex:c}),E=D.length,A,z,V;F6e(v.domain,C,y)&&(A=Iq(v.domain,null,C),p&&(y==="number"||w!=="auto")&&(V=yk(D,x,"category")));var R=tWe(y);if(!A||A.length===0){var I,k=(I=v.domain)!==null&&I!==void 0?I:R;if(x){if(A=yk(D,x,y),y==="category"&&p){var T=E2e(A);b&&T?(z=A,A=(0,A$.default)(0,E)):b||(A=woe(k,A,m).reduce(function(M,j){return M.indexOf(j)>=0?M:[].concat(uN(M),[j])},[]))}else if(y==="category")b?A=A.filter(function(M){return M!==""&&!(0,sN.default)(M)}):A=woe(k,A,m).reduce(function(M,j){return M.indexOf(j)>=0||j===""||(0,sN.default)(j)?M:[].concat(uN(M),[j])},[]);else if(y==="number"){var O=S5e(D,o.filter(function(M){var j,H,q=i in M.props?M.props[i]:(j=M.type.defaultProps)===null||j===void 0?void 0:j[i],G="hide"in M.props?M.props.hide:(H=M.type.defaultProps)===null||H===void 0?void 0:H.hide;return q===N&&(P||!G)}),x,a,u);O&&(A=O)}p&&(y==="number"||w!=="auto")&&(V=yk(D,x,"category"))}else p?A=(0,A$.default)(0,E):s&&s[N]&&s[N].hasStack&&y==="number"?A=f==="expand"?[0,1]:boe(s[N].stackGroups,l,c):A=voe(D,o.filter(function(M){var j=i in M.props?M.props[i]:M.type.defaultProps[i],H="hide"in M.props?M.props.hide:M.type.defaultProps.hide;return j===N&&(P||!H)}),y,u,!0);if(y==="number")A=S$(d,A,N,a,S),k&&(A=Iq(k,A,C));else if(y==="category"&&k){var F=k,_=A.every(function(M){return F.indexOf(M)>=0});_&&(A=F)}}return He(He({},h),{},br({},N,He(He({},v),{},{axisType:a,domain:A,categoricalDomain:V,duplicateDomain:z,originalDomain:(g=v.domain)!==null&&g!==void 0?g:R,isCategorical:p,layout:u})))},{})},H8t=function(t,r){var n=r.graphicalItems,o=r.Axis,a=r.axisType,i=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,c=r.dataEndIndex,u=t.layout,d=t.children,f=L$(t.data,{graphicalItems:n,dataStartIndex:l,dataEndIndex:c}),p=f.length,h=yoe(u,a),m=-1;return n.reduce(function(g,v){var y=v.type.defaultProps!==void 0?He(He({},v.type.defaultProps),v.props):v.props,x=y[i],C=tWe("number");if(!g[x]){m++;var b;return h?b=(0,A$.default)(0,p):s&&s[x]&&s[x].hasStack?(b=boe(s[x].stackGroups,l,c),b=S$(d,b,x,a)):(b=Iq(C,voe(f,n.filter(function(w){var S,P,N=i in w.props?w.props[i]:(S=w.type.defaultProps)===null||S===void 0?void 0:S[i],D="hide"in w.props?w.props.hide:(P=w.type.defaultProps)===null||P===void 0?void 0:P.hide;return N===x&&!D}),"number",u),o.defaultProps.allowDataOverflow),b=S$(d,b,x,a)),He(He({},g),{},br({},x,He(He({axisType:a},o.defaultProps),{},{hide:!0,orientation:(0,lN.default)(F8t,"".concat(a,".").concat(m%2),null),domain:b,originalDomain:C,isCategorical:h,layout:u})))}return g},{})},j8t=function(t,r){var n=r.axisType,o=n===void 0?"xAxis":n,a=r.AxisComp,i=r.graphicalItems,s=r.stackGroups,l=r.dataStartIndex,c=r.dataEndIndex,u=t.children,d="".concat(o,"Id"),f=pa(u,a),p={};return f&&f.length?p=U8t(t,{axes:f,graphicalItems:i,axisType:o,axisIdKey:d,stackGroups:s,dataStartIndex:l,dataEndIndex:c}):i&&i.length&&(p=H8t(t,{Axis:a,graphicalItems:i,axisType:o,axisIdKey:d,stackGroups:s,dataStartIndex:l,dataEndIndex:c})),p},q8t=function(t){var r=pg(t),n=rf(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:(0,Z6e.default)(n,function(o){return o.coordinate}),tooltipAxis:r,tooltipAxisBandSize:bk(r,n)}},G6e=function(t){var r=t.children,n=t.defaultShowTooltip,o=mc(r,Tp),a=0,i=0;return t.data&&t.data.length!==0&&(i=t.data.length-1),o&&o.props&&(o.props.startIndex>=0&&(a=o.props.startIndex),o.props.endIndex>=0&&(i=o.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:i,activeTooltipIndex:-1,isTooltipActive:!!n}},$8t=function(t){return!t||!t.length?!1:t.some(function(r){var n=xp(r&&r.type);return n&&n.indexOf("Bar")>=0})},K6e=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},W8t=function(t,r){var n=t.props,o=t.graphicalItems,a=t.xAxisMap,i=a===void 0?{}:a,s=t.yAxisMap,l=s===void 0?{}:s,c=n.width,u=n.height,d=n.children,f=n.margin||{},p=mc(d,Tp),h=mc(d,yi),m=Object.keys(l).reduce(function(b,w){var S=l[w],P=S.orientation;return!S.mirror&&!S.hide?He(He({},b),{},br({},P,b[P]+S.width)):b},{left:f.left||0,right:f.right||0}),g=Object.keys(i).reduce(function(b,w){var S=i[w],P=S.orientation;return!S.mirror&&!S.hide?He(He({},b),{},br({},P,(0,lN.default)(b,"".concat(P))+S.height)):b},{top:f.top||0,bottom:f.bottom||0}),v=He(He({},g),m),y=v.bottom;p&&(v.bottom+=p.props.height||Tp.defaultProps.height),h&&r&&(v=w5e(v,o,n,r));var x=c-v.left-v.right,C=u-v.top-v.bottom;return He(He({brushBottom:y},v),{},{width:Math.max(x,0),height:Math.max(C,0)})},G8t=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},Zu=function(t){var r=t.chartName,n=t.GraphicalChild,o=t.defaultTooltipEventType,a=o===void 0?"axis":o,i=t.validateTooltipEventTypes,s=i===void 0?["axis"]:i,l=t.axisComponents,c=t.legendContent,u=t.formatAxisMap,d=t.defaultProps,f=function(v,y){var x=y.graphicalItems,C=y.stackGroups,b=y.offset,w=y.updateId,S=y.dataStartIndex,P=y.dataEndIndex,N=v.barSize,D=v.layout,E=v.barGap,A=v.barCategoryGap,z=v.maxBarSize,V=K6e(D),R=V.numericAxisName,I=V.cateAxisName,k=$8t(x),T=[];return x.forEach(function(O,F){var _=L$(v.data,{graphicalItems:[O],dataStartIndex:S,dataEndIndex:P}),M=O.type.defaultProps!==void 0?He(He({},O.type.defaultProps),O.props):O.props,j=M.dataKey,H=M.maxBarSize,q=M["".concat(R,"Id")],G=M["".concat(I,"Id")],U={},K=l.reduce(function(ee,re){var Le,Ie,pe=y["".concat(re.axisType,"Map")],ne=M["".concat(re.axisType,"Id")];pe&&pe[ne]||re.axisType==="zAxis"||Em(!1);var xe=pe[ne];return He(He({},ee),{},br(br({},re.axisType,xe),"".concat(re.axisType,"Ticks"),rf(xe)))},U),Y=K[I],Q=K["".concat(I,"Ticks")],ae=C&&C[q]&&C[q].hasStack&&I5e(O,C[q].stackGroups),oe=xp(O.type).indexOf("Bar")>=0,Ae=bk(Y,Q),Se=[],Oe=k&&x5e({barSize:N,stackGroups:C,totalSize:G8t(K,I)});if(oe){var me,Pe,ye=(0,sN.default)(H)?z:H,we=(me=(Pe=bk(Y,Q,!0))!==null&&Pe!==void 0?Pe:ye)!==null&&me!==void 0?me:0;Se=b5e({barGap:E,barCategoryGap:A,bandSize:we!==Ae?we:Ae,sizeList:Oe[G],maxBarSize:ye}),we!==Ae&&(Se=Se.map(function(ee){return He(He({},ee),{},{position:He(He({},ee.position),{},{offset:ee.position.offset-we/2})})}))}var $=O&&O.type&&O.type.getComposedData;$&&T.push({props:He(He({},$(He(He({},K),{},{displayedData:_,props:v,dataKey:j,item:O,bandSize:Ae,barPosition:Se,offset:b,stackedData:ae,layout:D,dataStartIndex:S,dataEndIndex:P}))),{},br(br(br({key:O.key||"item-".concat(F)},R,K[R]),I,K[I]),"animationId",w)),childIndex:K2e(O,v.children),item:O})}),T},p=function(v,y){var x=v.props,C=v.dataStartIndex,b=v.dataEndIndex,w=v.updateId;if(!Hte({props:x}))return null;var S=x.children,P=x.layout,N=x.stackOffset,D=x.data,E=x.reverseStackOrder,A=K6e(P),z=A.numericAxisName,V=A.cateAxisName,R=pa(S,n),I=P5e(D,R,"".concat(z,"Id"),"".concat(V,"Id"),N,E),k=l.reduce(function(M,j){var H="".concat(j.axisType,"Map");return He(He({},M),{},br({},H,j8t(x,He(He({},j),{},{graphicalItems:R,stackGroups:j.axisType===z&&I,dataStartIndex:C,dataEndIndex:b}))))},{}),T=W8t(He(He({},k),{},{props:x,graphicalItems:R}),y?.legendBBox);Object.keys(k).forEach(function(M){k[M]=u(x,k[M],T,M.replace("Map",""),r)});var O=k["".concat(V,"Map")],F=q8t(O),_=f(x,He(He({},k),{},{dataStartIndex:C,dataEndIndex:b,updateId:w,graphicalItems:R,stackGroups:I,offset:T}));return He(He({formattedGraphicalItems:_,graphicalItems:R,offset:T,stackGroups:I},F),k)},h=function(g){function v(y){var x,C,b;return k8t(this,v),b=M8t(this,v,[y]),br(b,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),br(b,"accessibilityManager",new _6e),br(b,"handleLegendBBoxUpdate",function(w){if(w){var S=b.state,P=S.dataStartIndex,N=S.dataEndIndex,D=S.updateId;b.setState(He({legendBBox:w},p({props:b.props,dataStartIndex:P,dataEndIndex:N,updateId:D},He(He({},b.state),{},{legendBBox:w}))))}}),br(b,"handleReceiveSyncEvent",function(w,S,P){if(b.props.syncId===w){if(P===b.eventEmitterSymbol&&typeof b.props.syncMethod!="function")return;b.applySyncEvent(S)}}),br(b,"handleBrushChange",function(w){var S=w.startIndex,P=w.endIndex;if(S!==b.state.dataStartIndex||P!==b.state.dataEndIndex){var N=b.state.updateId;b.setState(function(){return He({dataStartIndex:S,dataEndIndex:P},p({props:b.props,dataStartIndex:S,dataEndIndex:P,updateId:N},b.state))}),b.triggerSyncEvent({dataStartIndex:S,dataEndIndex:P})}}),br(b,"handleMouseEnter",function(w){var S=b.getMouseInfo(w);if(S){var P=He(He({},S),{},{isTooltipActive:!0});b.setState(P),b.triggerSyncEvent(P);var N=b.props.onMouseEnter;(0,Hm.default)(N)&&N(P,w)}}),br(b,"triggeredAfterMouseMove",function(w){var S=b.getMouseInfo(w),P=S?He(He({},S),{},{isTooltipActive:!0}):{isTooltipActive:!1};b.setState(P),b.triggerSyncEvent(P);var N=b.props.onMouseMove;(0,Hm.default)(N)&&N(P,w)}),br(b,"handleItemMouseEnter",function(w){b.setState(function(){return{isTooltipActive:!0,activeItem:w,activePayload:w.tooltipPayload,activeCoordinate:w.tooltipPosition||{x:w.cx,y:w.cy}}})}),br(b,"handleItemMouseLeave",function(){b.setState(function(){return{isTooltipActive:!1}})}),br(b,"handleMouseMove",function(w){w.persist(),b.throttleTriggeredAfterMouseMove(w)}),br(b,"handleMouseLeave",function(w){b.throttleTriggeredAfterMouseMove.cancel();var S={isTooltipActive:!1};b.setState(S),b.triggerSyncEvent(S);var P=b.props.onMouseLeave;(0,Hm.default)(P)&&P(S,w)}),br(b,"handleOuterEvent",function(w){var S=G2e(w),P=(0,lN.default)(b.props,"".concat(S));if(S&&(0,Hm.default)(P)){var N,D;/.*touch.*/i.test(S)?D=b.getMouseInfo(w.changedTouches[0]):D=b.getMouseInfo(w),P((N=D)!==null&&N!==void 0?N:{},w)}}),br(b,"handleClick",function(w){var S=b.getMouseInfo(w);if(S){var P=He(He({},S),{},{isTooltipActive:!0});b.setState(P),b.triggerSyncEvent(P);var N=b.props.onClick;(0,Hm.default)(N)&&N(P,w)}}),br(b,"handleMouseDown",function(w){var S=b.props.onMouseDown;if((0,Hm.default)(S)){var P=b.getMouseInfo(w);S(P,w)}}),br(b,"handleMouseUp",function(w){var S=b.props.onMouseUp;if((0,Hm.default)(S)){var P=b.getMouseInfo(w);S(P,w)}}),br(b,"handleTouchMove",function(w){w.changedTouches!=null&&w.changedTouches.length>0&&b.throttleTriggeredAfterMouseMove(w.changedTouches[0])}),br(b,"handleTouchStart",function(w){w.changedTouches!=null&&w.changedTouches.length>0&&b.handleMouseDown(w.changedTouches[0])}),br(b,"handleTouchEnd",function(w){w.changedTouches!=null&&w.changedTouches.length>0&&b.handleMouseUp(w.changedTouches[0])}),br(b,"handleDoubleClick",function(w){var S=b.props.onDoubleClick;if((0,Hm.default)(S)){var P=b.getMouseInfo(w);S(P,w)}}),br(b,"handleContextMenu",function(w){var S=b.props.onContextMenu;if((0,Hm.default)(S)){var P=b.getMouseInfo(w);S(P,w)}}),br(b,"triggerSyncEvent",function(w){b.props.syncId!==void 0&&I$.emit(R$,b.props.syncId,w,b.eventEmitterSymbol)}),br(b,"applySyncEvent",function(w){var S=b.props,P=S.layout,N=S.syncMethod,D=b.state.updateId,E=w.dataStartIndex,A=w.dataEndIndex;if(w.dataStartIndex!==void 0||w.dataEndIndex!==void 0)b.setState(He({dataStartIndex:E,dataEndIndex:A},p({props:b.props,dataStartIndex:E,dataEndIndex:A,updateId:D},b.state)));else if(w.activeTooltipIndex!==void 0){var z=w.chartX,V=w.chartY,R=w.activeTooltipIndex,I=b.state,k=I.offset,T=I.tooltipTicks;if(!k)return;if(typeof N=="function")R=N(T,w);else if(N==="value"){R=-1;for(var O=0;O<T.length;O++)if(T[O].value===w.activeLabel){R=O;break}}var F=He(He({},k),{},{x:k.left,y:k.top}),_=Math.min(z,F.x+F.width),M=Math.min(V,F.y+F.height),j=T[R]&&T[R].value,H=jae(b.state,b.props.data,R),q=T[R]?{x:P==="horizontal"?T[R].coordinate:_,y:P==="horizontal"?M:T[R].coordinate}:eWe;b.setState(He(He({},w),{},{activeLabel:j,activeCoordinate:q,activePayload:H,activeTooltipIndex:R}))}else b.setState(w)}),br(b,"renderCursor",function(w){var S,P=b.state,N=P.isTooltipActive,D=P.activeCoordinate,E=P.activePayload,A=P.offset,z=P.activeTooltipIndex,V=P.tooltipAxisBandSize,R=b.getTooltipEventType(),I=(S=w.props.active)!==null&&S!==void 0?S:N,k=b.props.layout,T=w.key||"_recharts-cursor";return po.default.createElement(U6e,{key:T,activeCoordinate:D,activePayload:E,activeTooltipIndex:z,chartName:r,element:w,isActive:I,layout:k,offset:A,tooltipAxisBandSize:V,tooltipEventType:R})}),br(b,"renderPolarAxis",function(w,S,P){var N=(0,lN.default)(w,"type.axisType"),D=(0,lN.default)(b.state,"".concat(N,"Map")),E=w.type.defaultProps,A=E!==void 0?He(He({},E),w.props):w.props,z=D&&D[A["".concat(N,"Id")]];return(0,po.cloneElement)(w,He(He({},z),{},{className:ft(N,z.className),key:w.key||"".concat(S,"-").concat(P),ticks:rf(z,!0)}))}),br(b,"renderPolarGrid",function(w){var S=w.props,P=S.radialLines,N=S.polarAngles,D=S.polarRadius,E=b.state,A=E.radiusAxisMap,z=E.angleAxisMap,V=pg(A),R=pg(z),I=R.cx,k=R.cy,T=R.innerRadius,O=R.outerRadius;return(0,po.cloneElement)(w,{polarAngles:Array.isArray(N)?N:rf(R,!0).map(function(F){return F.coordinate}),polarRadius:Array.isArray(D)?D:rf(V,!0).map(function(F){return F.coordinate}),cx:I,cy:k,innerRadius:T,outerRadius:O,key:w.key||"polar-grid",radialLines:P})}),br(b,"renderLegend",function(){var w=b.state.formattedGraphicalItems,S=b.props,P=S.children,N=S.width,D=S.height,E=b.props.margin||{},A=N-(E.left||0)-(E.right||0),z=vq({children:P,formattedGraphicalItems:w,legendWidth:A,legendContent:c});if(!z)return null;var V=z.item,R=j6e(z,w8t);return(0,po.cloneElement)(V,He(He({},R),{},{chartWidth:N,chartHeight:D,margin:E,onBBoxUpdate:b.handleLegendBBoxUpdate}))}),br(b,"renderTooltip",function(){var w,S=b.props,P=S.children,N=S.accessibilityLayer,D=mc(P,Ta);if(!D)return null;var E=b.state,A=E.isTooltipActive,z=E.activeCoordinate,V=E.activePayload,R=E.activeLabel,I=E.offset,k=(w=D.props.active)!==null&&w!==void 0?w:A;return(0,po.cloneElement)(D,{viewBox:He(He({},I),{},{x:I.left,y:I.top}),active:k,label:R,payload:k?V:[],coordinate:z,accessibilityLayer:N})}),br(b,"renderBrush",function(w){var S=b.props,P=S.margin,N=S.data,D=b.state,E=D.offset,A=D.dataStartIndex,z=D.dataEndIndex,V=D.updateId;return(0,po.cloneElement)(w,{key:w.key||"_recharts-brush",onChange:cO(b.handleBrushChange,w.props.onChange),data:N,x:Qe(w.props.x)?w.props.x:E.left,y:Qe(w.props.y)?w.props.y:E.top+E.height+E.brushBottom-(P.bottom||0),width:Qe(w.props.width)?w.props.width:E.width,startIndex:A,endIndex:z,updateId:"brush-".concat(V)})}),br(b,"renderReferenceElement",function(w,S,P){if(!w)return null;var N=b,D=N.clipPathId,E=b.state,A=E.xAxisMap,z=E.yAxisMap,V=E.offset,R=w.type.defaultProps||{},I=w.props,k=I.xAxisId,T=k===void 0?R.xAxisId:k,O=I.yAxisId,F=O===void 0?R.yAxisId:O;return(0,po.cloneElement)(w,{key:w.key||"".concat(S,"-").concat(P),xAxis:A[T],yAxis:z[F],viewBox:{x:V.left,y:V.top,width:V.width,height:V.height},clipPathId:D})}),br(b,"renderActivePoints",function(w){var S=w.item,P=w.activePoint,N=w.basePoint,D=w.childIndex,E=w.isRange,A=[],z=S.props.key,V=S.item.type.defaultProps!==void 0?He(He({},S.item.type.defaultProps),S.item.props):S.item.props,R=V.activeDot,I=V.dataKey,k=He(He({index:D,dataKey:I,cx:P.x,cy:P.y,r:4,fill:aO(S.item),strokeWidth:2,stroke:"#fff",payload:P.payload,value:P.value},nt(R,!1)),XC(R));return A.push(v.renderActiveDot(R,k,"".concat(z,"-activePoint-").concat(D))),N?A.push(v.renderActiveDot(R,He(He({},k),{},{cx:N.x,cy:N.y}),"".concat(z,"-basePoint-").concat(D))):E&&A.push(null),A}),br(b,"renderGraphicChild",function(w,S,P){var N=b.filterFormatItem(w,S,P);if(!N)return null;var D=b.getTooltipEventType(),E=b.state,A=E.isTooltipActive,z=E.tooltipAxis,V=E.activeTooltipIndex,R=E.activeLabel,I=b.props.children,k=mc(I,Ta),T=N.props,O=T.points,F=T.isRange,_=T.baseLine,M=N.item.type.defaultProps!==void 0?He(He({},N.item.type.defaultProps),N.item.props):N.item.props,j=M.activeDot,H=M.hide,q=M.activeBar,G=M.activeShape,U=!!(!H&&A&&k&&(j||q||G)),K={};D!=="axis"&&k&&k.props.trigger==="click"?K={onClick:cO(b.handleItemMouseEnter,w.props.onClick)}:D!=="axis"&&(K={onMouseLeave:cO(b.handleItemMouseLeave,w.props.onMouseLeave),onMouseEnter:cO(b.handleItemMouseEnter,w.props.onMouseEnter)});var Y=(0,po.cloneElement)(w,He(He({},N.props),K));function Q(re){return typeof z.dataKey=="function"?z.dataKey(re.payload):null}if(U)if(V>=0){var ae,oe;if(z.dataKey&&!z.allowDuplicatedCategory){var Ae=typeof z.dataKey=="function"?Q:"payload.".concat(z.dataKey.toString());ae=LR(O,Ae,R),oe=F&&_&&LR(_,Ae,R)}else ae=O?.[V],oe=F&&_&&_[V];if(G||q){var Se=w.props.activeIndex!==void 0?w.props.activeIndex:V;return[(0,po.cloneElement)(w,He(He(He({},N.props),K),{},{activeIndex:Se})),null,null]}if(!(0,sN.default)(ae))return[Y].concat(uN(b.renderActivePoints({item:N,activePoint:ae,basePoint:oe,childIndex:V,isRange:F})))}else{var Oe,me=(Oe=b.getItemByXY(b.state.activeCoordinate))!==null&&Oe!==void 0?Oe:{graphicalItem:Y},Pe=me.graphicalItem,ye=Pe.item,we=ye===void 0?w:ye,$=Pe.childIndex,ee=He(He(He({},N.props),K),{},{activeIndex:$});return[(0,po.cloneElement)(we,ee),null,null]}return F?[Y,null,null]:[Y,null]}),br(b,"renderCustomized",function(w,S,P){return(0,po.cloneElement)(w,He(He({key:"recharts-customized-".concat(P)},b.props),b.state))}),br(b,"renderMap",{CartesianGrid:{handler:M$,once:!0},ReferenceArea:{handler:b.renderReferenceElement},ReferenceLine:{handler:M$},ReferenceDot:{handler:b.renderReferenceElement},XAxis:{handler:M$},YAxis:{handler:M$},Brush:{handler:b.renderBrush,once:!0},Bar:{handler:b.renderGraphicChild},Line:{handler:b.renderGraphicChild},Area:{handler:b.renderGraphicChild},Radar:{handler:b.renderGraphicChild},RadialBar:{handler:b.renderGraphicChild},Scatter:{handler:b.renderGraphicChild},Pie:{handler:b.renderGraphicChild},Funnel:{handler:b.renderGraphicChild},Tooltip:{handler:b.renderCursor,once:!0},PolarGrid:{handler:b.renderPolarGrid,once:!0},PolarAngleAxis:{handler:b.renderPolarAxis},PolarRadiusAxis:{handler:b.renderPolarAxis},Customized:{handler:b.renderCustomized}}),b.clipPathId="".concat((x=y.id)!==null&&x!==void 0?x:pc("recharts"),"-clip"),b.throttleTriggeredAfterMouseMove=(0,J6e.default)(b.triggeredAfterMouseMove,(C=y.throttleDelay)!==null&&C!==void 0?C:1e3/60),b.state={},b}return L8t(v,g),N8t(v,[{key:"componentDidMount",value:function(){var x,C;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(x=this.props.margin.left)!==null&&x!==void 0?x:0,top:(C=this.props.margin.top)!==null&&C!==void 0?C:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var x=this.props,C=x.children,b=x.data,w=x.height,S=x.layout,P=mc(C,Ta);if(P){var N=P.props.defaultIndex;if(!(typeof N!="number"||N<0||N>this.state.tooltipTicks.length-1)){var D=this.state.tooltipTicks[N]&&this.state.tooltipTicks[N].value,E=jae(this.state,b,N,D),A=this.state.tooltipTicks[N].coordinate,z=(this.state.offset.top+w)/2,V=S==="horizontal",R=V?{x:A,y:z}:{y:A,x:z},I=this.state.formattedGraphicalItems.find(function(T){var O=T.item;return O.type.name==="Scatter"});I&&(R=He(He({},R),I.props.points[N].tooltipPosition),E=I.props.points[N].tooltipPayload);var k={activeTooltipIndex:N,isTooltipActive:!0,activeLabel:D,activePayload:E,activeCoordinate:R};this.setState(k),this.renderCursor(P),this.accessibilityManager.setIndex(N)}}}},{key:"getSnapshotBeforeUpdate",value:function(x,C){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==C.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==x.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==x.margin){var b,w;this.accessibilityManager.setDetails({offset:{left:(b=this.props.margin.left)!==null&&b!==void 0?b:0,top:(w=this.props.margin.top)!==null&&w!==void 0?w:0}})}return null}},{key:"componentDidUpdate",value:function(x){ej([mc(x.children,Ta)],[mc(this.props.children,Ta)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var x=mc(this.props.children,Ta);if(x&&typeof x.props.shared=="boolean"){var C=x.props.shared?"axis":"item";return s.indexOf(C)>=0?C:a}return a}},{key:"getMouseInfo",value:function(x){if(!this.container)return null;var C=this.container,b=C.getBoundingClientRect(),w=rze(b),S={chartX:Math.round(x.pageX-w.left),chartY:Math.round(x.pageY-w.top)},P=b.width/C.offsetWidth||1,N=this.inRange(S.chartX,S.chartY,P);if(!N)return null;var D=this.state,E=D.xAxisMap,A=D.yAxisMap,z=this.getTooltipEventType(),V=W6e(this.state,this.props.data,this.props.layout,N);if(z!=="axis"&&E&&A){var R=pg(E).scale,I=pg(A).scale,k=R&&R.invert?R.invert(S.chartX):null,T=I&&I.invert?I.invert(S.chartY):null;return He(He({},S),{},{xValue:k,yValue:T},V)}return V?He(He({},S),V):null}},{key:"inRange",value:function(x,C){var b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,w=this.props.layout,S=x/b,P=C/b;if(w==="horizontal"||w==="vertical"){var N=this.state.offset,D=S>=N.left&&S<=N.left+N.width&&P>=N.top&&P<=N.top+N.height;return D?{x:S,y:P}:null}var E=this.state,A=E.angleAxisMap,z=E.radiusAxisMap;if(A&&z){var V=pg(A);return Soe({x:S,y:P},V)}return null}},{key:"parseEventsOfWrapper",value:function(){var x=this.props.children,C=this.getTooltipEventType(),b=mc(x,Ta),w={};b&&C==="axis"&&(b.props.trigger==="click"?w={onClick:this.handleClick}:w={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var S=XC(this.props,this.handleOuterEvent);return He(He({},S),w)}},{key:"addListener",value:function(){I$.on(R$,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){I$.removeListener(R$,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(x,C,b){for(var w=this.state.formattedGraphicalItems,S=0,P=w.length;S<P;S++){var N=w[S];if(N.item===x||N.props.key===x.key||C===xp(N.item.type)&&b===N.childIndex)return N}return null}},{key:"renderClipPath",value:function(){var x=this.clipPathId,C=this.state.offset,b=C.left,w=C.top,S=C.height,P=C.width;return po.default.createElement("defs",null,po.default.createElement("clipPath",{id:x},po.default.createElement("rect",{x:b,y:w,height:S,width:P})))}},{key:"getXScales",value:function(){var x=this.state.xAxisMap;return x?Object.entries(x).reduce(function(C,b){var w=H6e(b,2),S=w[0],P=w[1];return He(He({},C),{},br({},S,P.scale))},{}):null}},{key:"getYScales",value:function(){var x=this.state.yAxisMap;return x?Object.entries(x).reduce(function(C,b){var w=H6e(b,2),S=w[0],P=w[1];return He(He({},C),{},br({},S,P.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(x){var C;return(C=this.state.xAxisMap)===null||C===void 0||(C=C[x])===null||C===void 0?void 0:C.scale}},{key:"getYScaleByAxisId",value:function(x){var C;return(C=this.state.yAxisMap)===null||C===void 0||(C=C[x])===null||C===void 0?void 0:C.scale}},{key:"getItemByXY",value:function(x){var C=this.state,b=C.formattedGraphicalItems,w=C.activeItem;if(b&&b.length)for(var S=0,P=b.length;S<P;S++){var N=b[S],D=N.props,E=N.item,A=E.type.defaultProps!==void 0?He(He({},E.type.defaultProps),E.props):E.props,z=xp(E.type);if(z==="Bar"){var V=(D.data||[]).find(function(T){return BHe(x,T)});if(V)return{graphicalItem:N,payload:V}}else if(z==="RadialBar"){var R=(D.data||[]).find(function(T){return Soe(x,T)});if(R)return{graphicalItem:N,payload:R}}else if(DO(N,w)||OO(N,w)||Ak(N,w)){var I=Nje({graphicalItem:N,activeTooltipItem:w,itemData:A.data}),k=A.activeIndex===void 0?I:A.activeIndex;return{graphicalItem:He(He({},N),{},{childIndex:k}),payload:Ak(N,w)?A.data[I]:N.props.data[I]}}}return null}},{key:"render",value:function(){var x=this;if(!Hte(this))return null;var C=this.props,b=C.children,w=C.className,S=C.width,P=C.height,N=C.style,D=C.compact,E=C.title,A=C.desc,z=j6e(C,C8t),V=nt(z,!1);if(D)return po.default.createElement(hae,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},po.default.createElement(vD,iN({},V,{width:S,height:P,title:E,desc:A}),this.renderClipPath(),jte(b,this.renderMap)));if(this.props.accessibilityLayer){var R,I;V.tabIndex=(R=this.props.tabIndex)!==null&&R!==void 0?R:0,V.role=(I=this.props.role)!==null&&I!==void 0?I:"application",V.onKeyDown=function(T){x.accessibilityManager.keyboardEvent(T)},V.onFocus=function(){x.accessibilityManager.focus()}}var k=this.parseEventsOfWrapper();return po.default.createElement(hae,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},po.default.createElement("div",iN({className:ft("recharts-wrapper",w),style:He({position:"relative",cursor:"default",width:S,height:P},N)},k,{ref:function(O){x.container=O}}),po.default.createElement(vD,iN({},V,{width:S,height:P,title:E,desc:A,style:B8t}),this.renderClipPath(),jte(b,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(po.Component);br(h,"displayName",r),br(h,"defaultProps",He({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},d)),br(h,"getDerivedStateFromProps",function(g,v){var y=g.dataKey,x=g.data,C=g.children,b=g.width,w=g.height,S=g.layout,P=g.stackOffset,N=g.margin,D=v.dataStartIndex,E=v.dataEndIndex;if(v.updateId===void 0){var A=G6e(g);return He(He(He({},A),{},{updateId:0},p(He(He({props:g},A),{},{updateId:0}),v)),{},{prevDataKey:y,prevData:x,prevWidth:b,prevHeight:w,prevLayout:S,prevStackOffset:P,prevMargin:N,prevChildren:C})}if(y!==v.prevDataKey||x!==v.prevData||b!==v.prevWidth||w!==v.prevHeight||S!==v.prevLayout||P!==v.prevStackOffset||!sy(N,v.prevMargin)){var z=G6e(g),V={chartX:v.chartX,chartY:v.chartY,isTooltipActive:v.isTooltipActive},R=He(He({},W6e(v,x,S)),{},{updateId:v.updateId+1}),I=He(He(He({},z),V),R);return He(He(He({},I),p(He({props:g},I),v)),{},{prevDataKey:y,prevData:x,prevWidth:b,prevHeight:w,prevLayout:S,prevStackOffset:P,prevMargin:N,prevChildren:C})}if(!ej(C,v.prevChildren)){var k,T,O,F,_=mc(C,Tp),M=_&&(k=(T=_.props)===null||T===void 0?void 0:T.startIndex)!==null&&k!==void 0?k:D,j=_&&(O=(F=_.props)===null||F===void 0?void 0:F.endIndex)!==null&&O!==void 0?O:E,H=M!==D||j!==E,q=!(0,sN.default)(x),G=q&&!H?v.updateId:v.updateId+1;return He(He({updateId:G},p(He(He({props:g},v),{},{updateId:G,dataStartIndex:M,dataEndIndex:j}),v)),{},{prevChildren:C,dataStartIndex:M,dataEndIndex:j})}return null}),br(h,"renderActiveDot",function(g,v,y){var x;return(0,po.isValidElement)(g)?x=(0,po.cloneElement)(g,v):(0,Hm.default)(g)?x=g(v):x=po.default.createElement(Rp,v),po.default.createElement(Bt,{className:"recharts-active-dot",key:y},x)});var m=(0,po.forwardRef)(function(v,y){return po.default.createElement(h,iN({},v,{ref:y}))});return m.displayName=h.displayName,m};var dN=Zu({chartName:"LineChart",GraphicalChild:Um,axisComponents:[{axisType:"xAxis",AxisComp:Is},{axisType:"yAxis",AxisComp:Rs}],formatAxisMap:a0});var e_=Zu({chartName:"BarChart",GraphicalChild:lf,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:Is},{axisType:"yAxis",AxisComp:Rs}],formatAxisMap:a0});var t_=Zu({chartName:"PieChart",GraphicalChild:Yu,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:Xu},{axisType:"radiusAxis",AxisComp:Ku}],formatAxisMap:Ck,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}});var r_=Zu({chartName:"RadarChart",GraphicalChild:Rg,axisComponents:[{axisType:"angleAxis",AxisComp:Xu},{axisType:"radiusAxis",AxisComp:Ku}],formatAxisMap:Ck,defaultProps:{layout:"centric",startAngle:90,endAngle:-270,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}});var qae=Zu({chartName:"ScatterChart",GraphicalChild:wy,defaultTooltipEventType:"item",validateTooltipEventTypes:["item"],axisComponents:[{axisType:"xAxis",AxisComp:Is},{axisType:"yAxis",AxisComp:Rs},{axisType:"zAxis",AxisComp:tN}],formatAxisMap:a0});var n_=Zu({chartName:"AreaChart",GraphicalChild:uf,axisComponents:[{axisType:"xAxis",AxisComp:Is},{axisType:"yAxis",AxisComp:Rs}],formatAxisMap:a0});var $ae=Zu({chartName:"RadialBarChart",GraphicalChild:n0,legendContent:"children",defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"angleAxis",AxisComp:Xu},{axisType:"radiusAxis",AxisComp:Ku}],formatAxisMap:Ck,defaultProps:{layout:"radial",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}});var ve=L(fe(),1),Gae={default:["#3b82f6","#ef4444","#10b981","#f59e0b","#8b5cf6","#06b6d4","#f97316","#84cc16","#ec4899","#6366f1"],vibrant:["#FF006E","#FB5607","#FFBE0B","#8338EC","#3A86FF","#06FFB4","#FF4365","#00F5FF","#FF124F","#7209B7"],pastel:["#B5E2FA","#F7AEF8","#FDC5F5","#F8B7D3","#FAC9B8","#C8E9A0","#A7D2CB","#F2D98D","#E5B3BB","#D6A2E8"],dark:["#1e3a5f","#4b0e0e","#0e4b2b","#4b3c0e","#2e0e4b","#0e3c4b","#4b2e0e","#2b4b0e","#4b0e3c","#1e0e4b"],neon:["#39FF14","#FF10F0","#00FFFF","#FE019A","#FFFF00","#FF073A","#00FF00","#FF0099","#0FF0FC","#FFE400"]},rWe=Gae.default,Wae=({active:e,payload:t,label:r})=>!e||!t||!t.length?null:(0,ve.jsxs)(ie.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},className:"backdrop-blur-xl bg-background/80 p-3 rounded-xl shadow-2xl border border-border/50",children:[(0,ve.jsx)("p",{className:"text-sm font-medium mb-2",children:r}),t.map((n,o)=>(0,ve.jsxs)("div",{className:"flex items-center gap-2 text-sm",children:[(0,ve.jsx)("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:n.color}}),(0,ve.jsxs)("span",{className:"text-muted-foreground",children:[n.name,":"]}),(0,ve.jsx)("span",{className:"font-semibold",children:n.value})]},o))]}),TS=({payload:e,onItemClick:t})=>(0,ve.jsx)("div",{className:"flex flex-wrap items-center justify-center gap-4 mt-4",children:e.map((r,n)=>(0,ve.jsxs)(ie.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>t&&t(r),className:B("flex items-center gap-2 px-3 py-1.5 rounded-lg transition-all","hover:bg-accent/10",r.inactive&&"opacity-50"),children:[(0,ve.jsx)(ie.div,{animate:{scale:r.inactive?.8:1,opacity:r.inactive?.5:1},className:"w-3 h-3 rounded-full",style:{backgroundColor:r.color}}),(0,ve.jsx)("span",{className:"text-sm font-medium",children:r.value})]},`item-${n}`))}),K8t=({data:e,dataKey:t,color:r})=>{let n=e.map(s=>s[t]),o=Math.min(...n),i=Math.max(...n)-o;return(0,ve.jsx)("svg",{width:"60",height:"20",className:"ml-2",children:(0,ve.jsx)("polyline",{fill:"none",stroke:r,strokeWidth:"2",points:n.map((s,l)=>`${l/(n.length-1)*60},${20-(s-o)/i*20}`).join(" ")})})},X8t=({height:e})=>(0,ve.jsx)("div",{className:"w-full",style:{height:e},children:(0,ve.jsx)("div",{className:"flex items-end justify-center h-full gap-2 px-8",children:[...Array(8)].map((t,r)=>(0,ve.jsx)(ie.div,{initial:{height:0},animate:{height:`${Math.random()*80+20}%`},transition:{duration:1.5,delay:r*.1,repeat:1/0,repeatType:"reverse"},className:"w-full bg-gradient-to-t from-primary/20 to-primary/5 rounded-t-lg"},r))})});function Y8t({data:e,type:t,series:r,title:n,subtitle:o,height:a=400,width:i="100%",xAxisKey:s="name",yAxisKey:l,showGrid:c=!0,showTooltip:u=!0,showLegend:d=!0,showBrush:f=!1,showReference:p=!1,referenceLines:h=[],referenceAreas:m=[],colors:g=rWe,className:v,onDataPointClick:y,onExport:x,onRefresh:C,customTooltip:b,customLegend:w,loading:S=!1,error:P=null,animated:N=!0,responsive:D=!0,showCrosshair:E=!1,enableZoom:A=!1,enablePan:z=!1,showMiniMap:V=!1,darkMode:R=!1,gradientColors:I=!0,interactiveLegend:k=!0,showDataLabels:T=!1,sparklineMode:O=!1,animationDuration:F=1500,theme:_="default"}){let[M,j]=Lp.default.useState(!1),[H,q]=Lp.default.useState(!1),[G,U]=Lp.default.useState(100),[K,Y]=Lp.default.useState(_),[Q,ae]=Lp.default.useState(null),[oe,Ae]=Lp.default.useState(new Set),Se=Lp.default.useRef(null),Oe=Lp.default.useRef(null),me=Lp.default.useMemo(()=>Gae[K]||rWe,[K]),Pe=Lp.default.useId(),ye=Lp.default.useMemo(()=>{if(!e||!Array.isArray(e)||!e.length||!r||!Array.isArray(r)||!r.length)return null;let pe=r[0];if(!pe||!pe.dataKey)return null;let ne=e.map(Ge=>Number(Ge[pe.dataKey])).filter(Ge=>!isNaN(Ge));if(ne.length<2)return null;let xe=ne[0],Ne=ne[ne.length-1];if(xe===0)return null;let he=(Ne-xe)/xe*100;return{direction:he>0?"up":he<0?"down":"neutral",percentage:Math.abs(he).toFixed(1)}},[e,r]),we=pe=>{Ae(ne=>{let xe=new Set(ne);return xe.has(pe)?xe.delete(pe):xe.add(pe),xe})},$=pe=>{k&&we(pe.dataKey)},ee=pe=>{x&&x(pe)},re=pe=>{U(ne=>pe==="in"?Math.min(ne+10,200):Math.max(ne-10,50))},Le=()=>(0,ve.jsx)("defs",{children:r.map((pe,ne)=>{let xe=pe.color||me[ne%me.length];return(0,ve.jsxs)("linearGradient",{id:`gradient-${Pe}-${pe.dataKey}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,ve.jsx)("stop",{offset:"0%",stopColor:xe,stopOpacity:.8}),(0,ve.jsx)("stop",{offset:"100%",stopColor:xe,stopOpacity:.1})]},`gradient-${pe.dataKey}`)})}),Ie=()=>{if(!e||!Array.isArray(e)||!r||!Array.isArray(r))return(0,ve.jsx)("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:"No data available"});let pe={data:e,width:typeof i=="string"?void 0:i,height:O?60:a,margin:O?{top:5,right:5,left:5,bottom:5}:{top:20,right:30,left:20,bottom:f?60:20}},ne=r.filter(he=>!he.hide&&!oe.has(he.dataKey)),xe={fontSize:12,fill:R?"#9ca3af":"#6b7280"},Ne={stroke:R?"#374151":"#e5e7eb",strokeDasharray:"3 3",opacity:.5};switch(t){case"line":return(0,ve.jsxs)(dN,{...pe,children:[I&&Le(),c&&!O&&(0,ve.jsx)(Vm,{...Ne}),!O&&(0,ve.jsxs)(ve.Fragment,{children:[(0,ve.jsx)(Is,{dataKey:s,...xe,tick:{fontSize:11},axisLine:{stroke:R?"#4b5563":"#d1d5db"}}),(0,ve.jsx)(Rs,{...xe,tick:{fontSize:11},axisLine:{stroke:R?"#4b5563":"#d1d5db"}})]}),u&&!O&&(0,ve.jsx)(Ta,{cursor:E?{stroke:R?"#6b7280":"#9ca3af",strokeWidth:1,strokeDasharray:"5 5"}:!1}),d&&!O&&(0,ve.jsx)(yi,{content:he=>{let Ge=w;return Ge?(0,ve.jsx)(Ge,{...he}):(0,ve.jsx)(TS,{...he,onItemClick:$})}}),ne.map((he,Ge)=>{let Ht=he.color||me[Ge%me.length];return(0,ve.jsx)(Um,{type:he.type||"monotone",dataKey:he.dataKey,stroke:Ht,strokeWidth:O?1.5:he.strokeWidth||2,strokeDasharray:he.strokeDasharray,name:he.name,dot:O?!1:he.dot!==void 0?he.dot:{r:3,strokeWidth:2,fill:R?"#1f2937":"#ffffff"},activeDot:O?!1:he.activeDot!==void 0?he.activeDot:{r:5,strokeWidth:2,fill:Ht,stroke:R?"#1f2937":"#ffffff",className:"animate-pulse"},animationDuration:N?F:0,animationBegin:Ge*100,label:T?he.label:!1},he.dataKey)}),p&&h.map((he,Ge)=>(0,ve.jsx)(xy,{y:he.value,stroke:he.color||(R?"#6b7280":"#9ca3af"),strokeDasharray:"5 5",label:he.label},Ge)),p&&m.map((he,Ge)=>(0,ve.jsx)(i0,{x1:he.x1,x2:he.x2,fill:he.color||(R?"#374151":"#f3f4f6"),fillOpacity:.3,label:he.label},Ge)),f&&!O&&(0,ve.jsx)(Tp,{height:30,fill:R?"#1f2937":"#f9fafb",stroke:R?"#374151":"#e5e7eb"})]});case"bar":return(0,ve.jsxs)(e_,{...pe,children:[I&&Le(),c&&(0,ve.jsx)(Vm,{...Ne}),(0,ve.jsx)(Is,{dataKey:s,...xe,tick:{fontSize:11},axisLine:{stroke:R?"#4b5563":"#d1d5db"}}),(0,ve.jsx)(Rs,{...xe,tick:{fontSize:11},axisLine:{stroke:R?"#4b5563":"#d1d5db"}}),u&&(0,ve.jsx)(Ta,{cursor:{fill:R?"rgba(255,255,255,0.05)":"rgba(0,0,0,0.05)"}}),d&&(0,ve.jsx)(yi,{content:he=>{let Ge=w;return Ge?(0,ve.jsx)(Ge,{...he}):(0,ve.jsx)(TS,{...he,onItemClick:$})}}),ne.map((he,Ge)=>{let Ht=he.color||me[Ge%me.length];return(0,ve.jsx)(lf,{dataKey:he.dataKey,fill:I?`url(#gradient-${Pe}-${he.dataKey})`:Ht,name:he.name,animationDuration:N?F:0,animationBegin:Ge*100,radius:[4,4,0,0],label:T?he.label:!1,stackId:he.stackId,onMouseEnter:()=>ae(he.dataKey),onMouseLeave:()=>ae(null),className:"hover:opacity-80 transition-opacity cursor-pointer"},he.dataKey)}),p&&h.map((he,Ge)=>(0,ve.jsx)(xy,{y:he.value,stroke:he.color||(R?"#6b7280":"#9ca3af"),strokeDasharray:"5 5",label:he.label},Ge)),f&&(0,ve.jsx)(Tp,{height:30,fill:R?"#1f2937":"#f9fafb",stroke:R?"#374151":"#e5e7eb"})]});case"area":return(0,ve.jsxs)(n_,{...pe,children:[I&&Le(),c&&(0,ve.jsx)(Vm,{...Ne}),(0,ve.jsx)(Is,{dataKey:s,...xe,tick:{fontSize:11},axisLine:{stroke:R?"#4b5563":"#d1d5db"}}),(0,ve.jsx)(Rs,{...xe,tick:{fontSize:11},axisLine:{stroke:R?"#4b5563":"#d1d5db"}}),u&&(0,ve.jsx)(Ta,{}),d&&(0,ve.jsx)(yi,{content:he=>{let Ge=w;return Ge?(0,ve.jsx)(Ge,{...he}):(0,ve.jsx)(TS,{...he,onItemClick:$})}}),ne.map((he,Ge)=>{let Ht=he.color||me[Ge%me.length];return(0,ve.jsx)(uf,{type:he.type||"monotone",dataKey:he.dataKey,stroke:Ht,strokeWidth:2,fill:I?`url(#gradient-${Pe}-${he.dataKey})`:Ht,fillOpacity:he.fillOpacity||.6,name:he.name,animationDuration:N?F:0,animationBegin:Ge*100,dot:he.dot!==void 0?he.dot:!1,activeDot:he.activeDot!==void 0?he.activeDot:{r:4,strokeWidth:2,fill:Ht,stroke:R?"#1f2937":"#ffffff",className:"animate-pulse"},label:T?he.label:!1,stackId:he.stackId},he.dataKey)}),p&&h.map((he,Ge)=>(0,ve.jsx)(xy,{y:he.value,stroke:he.color||(R?"#6b7280":"#9ca3af"),strokeDasharray:"5 5",label:he.label},Ge)),f&&(0,ve.jsx)(Tp,{height:30,fill:R?"#1f2937":"#f9fafb",stroke:R?"#374151":"#e5e7eb"})]});case"pie":return(0,ve.jsxs)(t_,{...pe,children:[u&&(0,ve.jsx)(Ta,{content:b||Wae}),d&&(0,ve.jsx)(yi,{content:he=>{let Ge=w;return Ge?(0,ve.jsx)(Ge,{...he}):(0,ve.jsx)(TS,{...he,onItemClick:$})}}),(0,ve.jsx)(Yu,{data:e,dataKey:r[0]?.dataKey||"value",nameKey:s,cx:"50%",cy:"50%",innerRadius:t==="pie"?0:"40%",outerRadius:Math.min(a,typeof i=="number"?i:400)/3,animationDuration:N?F:0,animationBegin:0,label:T?{fill:R?"#e5e7eb":"#374151",fontSize:12}:!1,labelLine:T?{stroke:R?"#6b7280":"#9ca3af",strokeWidth:1}:!1,children:e.map((he,Ge)=>{let Ht=me[Ge%me.length];return(0,ve.jsx)(Wu,{fill:Ht,className:"hover:opacity-80 transition-opacity cursor-pointer",onMouseEnter:()=>ae(he),onMouseLeave:()=>ae(null)},`cell-${Ge}`)})})]});case"scatter":return(0,ve.jsxs)(qae,{...pe,children:[c&&(0,ve.jsx)(Vm,{...Ne}),(0,ve.jsx)(Is,{dataKey:s,...xe,tick:{fontSize:11},axisLine:{stroke:R?"#4b5563":"#d1d5db"}}),(0,ve.jsx)(Rs,{dataKey:l,...xe,tick:{fontSize:11},axisLine:{stroke:R?"#4b5563":"#d1d5db"}}),u&&(0,ve.jsx)(Ta,{}),d&&(0,ve.jsx)(yi,{content:he=>{let Ge=w;return Ge?(0,ve.jsx)(Ge,{...he}):(0,ve.jsx)(TS,{...he,onItemClick:$})}}),ne.map((he,Ge)=>{let Ht=he.color||me[Ge%me.length];return(0,ve.jsx)(wy,{data:e,fill:Ht,name:he.name,animationDuration:N?F:0,animationBegin:Ge*100,shape:Zn=>{let $e=Q===Zn.payload,{cx:Ye,cy:de,fill:We}=Zn;return(0,ve.jsx)("circle",{cx:Ye,cy:de,fill:We,r:$e?6:4,className:"transition-all duration-200 hover:r-6",onMouseEnter:()=>ae(Zn.payload),onMouseLeave:()=>ae(null)})}},he.dataKey)})]});case"radar":return(0,ve.jsxs)(r_,{...pe,children:[(0,ve.jsx)(Nk,{stroke:R?"#374151":"#e5e7eb",strokeDasharray:"3 3"}),(0,ve.jsx)(Xu,{dataKey:s,...xe,tick:{fontSize:10}}),(0,ve.jsx)(Ku,{...xe,tick:{fontSize:10},axisLine:!1}),u&&(0,ve.jsx)(Ta,{content:b||Wae}),d&&(0,ve.jsx)(yi,{content:he=>{let Ge=w;return Ge?(0,ve.jsx)(Ge,{...he}):(0,ve.jsx)(TS,{...he,onItemClick:$})}}),ne.map((he,Ge)=>{let Ht=he.color||me[Ge%me.length];return(0,ve.jsx)(Rg,{dataKey:he.dataKey,stroke:Ht,fill:Ht,fillOpacity:.3,name:he.name,animationDuration:N?F:0,animationBegin:Ge*100},he.dataKey)})]});case"radialBar":return(0,ve.jsxs)($ae,{...pe,innerRadius:"10%",outerRadius:"90%",children:[u&&(0,ve.jsx)(Ta,{content:b||Wae}),d&&(0,ve.jsx)(yi,{content:he=>{let Ge=w;return Ge?(0,ve.jsx)(Ge,{...he}):(0,ve.jsx)(TS,{...he,onItemClick:$})}}),(0,ve.jsx)(n0,{dataKey:r[0]?.dataKey||"value",cornerRadius:10,fill:me[0],animationDuration:N?F:0,label:T?{fill:R?"#e5e7eb":"#374151",position:"center"}:!1})]});default:return(0,ve.jsx)("div",{children:"Unsupported chart type"})}};return S?(0,ve.jsxs)(Be,{className:B("w-full overflow-hidden",v),children:[(0,ve.jsxs)(yr,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,ve.jsxs)("div",{className:"space-y-1",children:[(0,ve.jsx)(ca,{className:"h-4 w-32"}),(0,ve.jsx)(ca,{className:"h-3 w-48"})]}),(0,ve.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,ve.jsx)(ca,{className:"h-8 w-8 rounded"}),(0,ve.jsx)(ca,{className:"h-8 w-8 rounded"}),(0,ve.jsx)(ca,{className:"h-8 w-8 rounded"})]})]}),(0,ve.jsx)(Ve,{children:(0,ve.jsx)(X8t,{height:a})})]}):P?(0,ve.jsx)(Be,{className:B("w-full",v),children:(0,ve.jsx)(Ve,{className:"flex items-center justify-center",style:{height:a},children:(0,ve.jsxs)(ie.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},className:"text-center",children:[(0,ve.jsx)("div",{className:"w-12 h-12 rounded-full bg-destructive/10 dark:bg-destructive/20 flex items-center justify-center mx-auto mb-4",children:(0,ve.jsx)(Zt,{className:"w-6 h-6 text-destructive"})}),(0,ve.jsx)("p",{className:"text-destructive mb-4 font-medium",children:P}),C&&(0,ve.jsxs)(te,{variant:"outline",onClick:C,className:"group",children:[(0,ve.jsx)(yo,{className:"mr-2 h-4 w-4 group-hover:rotate-180 transition-transform duration-500"}),"Retry"]})]})})}):(0,ve.jsx)(ie.div,{ref:Oe,className:B("relative",M&&"fixed inset-0 z-50 bg-background p-4"),initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},children:(0,ve.jsxs)(Be,{className:B("w-full overflow-hidden transition-all duration-300",R&&"dark",M&&"h-full",v),ref:Se,children:[(0,ve.jsxs)(yr,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,ve.jsxs)(ie.div,{className:"space-y-1",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:.1},children:[(0,ve.jsxs)(Or,{className:"text-base font-medium flex items-center gap-2",children:[n,ye&&(0,ve.jsxs)(ie.span,{className:"inline-flex items-center",initial:{scale:0},animate:{scale:1},transition:{type:"spring",delay:.3},children:[ye.direction==="up"&&(0,ve.jsx)(Oc,{className:"h-4 w-4 text-green-500 dark:text-green-400"}),ye.direction==="down"&&(0,ve.jsx)(FA,{className:"h-4 w-4 text-red-500 dark:text-red-400"}),ye.direction==="neutral"&&(0,ve.jsx)(em,{className:"h-4 w-4 text-muted-foreground"}),(0,ve.jsxs)("span",{className:B("ml-1 text-sm font-semibold",ye.direction==="up"&&"text-green-500 dark:text-green-400",ye.direction==="down"&&"text-red-500 dark:text-red-400",ye.direction==="neutral"&&"text-muted-foreground"),children:[ye.percentage,"%"]})]}),O&&r[0]&&(0,ve.jsx)(K8t,{data:e,dataKey:r[0].dataKey,color:r[0].color||me[0]})]}),o&&(0,ve.jsx)("p",{className:"text-xs text-muted-foreground",children:o})]}),(0,ve.jsxs)(ie.div,{className:"flex items-center space-x-1",initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{delay:.2},children:[A&&!O&&(0,ve.jsxs)("div",{className:"flex items-center border rounded-lg mr-2",children:[(0,ve.jsx)(te,{variant:"ghost",size:"sm",onClick:()=>re("out"),disabled:G<=50,className:"h-7 w-7 p-0",children:(0,ve.jsx)(Ad,{className:"h-3 w-3"})}),(0,ve.jsxs)("span",{className:"text-xs px-2 text-muted-foreground",children:[G,"%"]}),(0,ve.jsx)(te,{variant:"ghost",size:"sm",onClick:()=>re("in"),disabled:G>=200,className:"h-7 w-7 p-0",children:(0,ve.jsx)(Td,{className:"h-3 w-3"})})]}),C&&(0,ve.jsx)(te,{variant:"ghost",size:"sm",onClick:C,className:"group",children:(0,ve.jsx)(yo,{className:"h-4 w-4 group-hover:rotate-180 transition-transform duration-500"})}),(0,ve.jsxs)(Ti,{open:H,onOpenChange:q,children:[(0,ve.jsx)(Ai,{asChild:!0,children:(0,ve.jsx)(te,{variant:"ghost",size:"sm",children:(0,ve.jsx)(as,{className:"h-4 w-4"})})}),(0,ve.jsx)(pi,{className:"w-80",align:"end",children:(0,ve.jsxs)("div",{className:"space-y-4",children:[(0,ve.jsx)("div",{className:"space-y-2",children:(0,ve.jsx)("h4",{className:"font-medium text-sm",children:"Chart Settings"})}),(0,ve.jsxs)("div",{className:"space-y-2",children:[(0,ve.jsx)(bt,{className:"text-xs",children:"Color Theme"}),(0,ve.jsx)("div",{className:"grid grid-cols-3 gap-2",children:Object.entries(Gae).map(([pe,ne])=>(0,ve.jsxs)("button",{onClick:()=>Y(pe),className:B("p-2 rounded-lg border-2 transition-all",K===pe?"border-primary":"border-transparent hover:border-muted-foreground/20"),children:[(0,ve.jsx)("div",{className:"flex gap-1",children:ne.slice(0,3).map((xe,Ne)=>(0,ve.jsx)("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:xe}},Ne))}),(0,ve.jsx)("span",{className:"text-xs mt-1 block capitalize",children:pe})]},pe))})]}),(0,ve.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ve.jsx)(bt,{htmlFor:"animation",className:"text-xs",children:"Animations"}),(0,ve.jsx)(Hh,{id:"animation",checked:N,onCheckedChange:pe=>{}})]}),(0,ve.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ve.jsx)(bt,{htmlFor:"grid",className:"text-xs",children:"Show Grid"}),(0,ve.jsx)(Hh,{id:"grid",checked:c,onCheckedChange:pe=>{}})]}),(0,ve.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ve.jsx)(bt,{htmlFor:"crosshair",className:"text-xs",children:"Crosshair Cursor"}),(0,ve.jsx)(Hh,{id:"crosshair",checked:E,onCheckedChange:pe=>{}})]})]})})]}),x&&(0,ve.jsxs)(Pr,{children:[(0,ve.jsx)(Ir,{asChild:!0,children:(0,ve.jsx)(te,{variant:"ghost",size:"sm",children:(0,ve.jsx)(un,{className:"h-4 w-4"})})}),(0,ve.jsxs)(xr,{align:"end",children:[(0,ve.jsxs)(Fe,{onClick:()=>ee("png"),children:[(0,ve.jsx)(rl,{className:"mr-2 h-4 w-4"}),"Export as PNG"]}),(0,ve.jsxs)(Fe,{onClick:()=>ee("svg"),children:[(0,ve.jsx)(ov,{className:"mr-2 h-4 w-4"}),"Export as SVG"]}),(0,ve.jsxs)(Fe,{onClick:()=>ee("pdf"),children:[(0,ve.jsx)(ov,{className:"mr-2 h-4 w-4"}),"Export as PDF"]}),(0,ve.jsx)(Vr,{}),(0,ve.jsxs)(Fe,{onClick:()=>ee("csv"),children:[(0,ve.jsx)(ov,{className:"mr-2 h-4 w-4"}),"Export as CSV"]}),(0,ve.jsxs)(Fe,{onClick:()=>ee("json"),children:[(0,ve.jsx)(vw,{className:"mr-2 h-4 w-4"}),"Export as JSON"]})]})]}),(0,ve.jsx)(te,{variant:"ghost",size:"sm",onClick:()=>j(!M),children:M?(0,ve.jsx)(Zt,{className:"h-4 w-4"}):(0,ve.jsx)(Rl,{className:"h-4 w-4"})})]})]}),(0,ve.jsxs)(Ve,{className:"relative",children:[z&&(0,ve.jsxs)(ie.div,{initial:{opacity:0},animate:{opacity:1},className:"absolute top-2 left-2 z-10 flex items-center gap-1 text-xs text-muted-foreground bg-background/80 backdrop-blur-sm px-2 py-1 rounded-md",children:[(0,ve.jsx)(Rx,{className:"h-3 w-3"}),(0,ve.jsx)("span",{children:"Drag to pan"})]}),(0,ve.jsx)(ie.div,{animate:{scale:G/100},transition:{type:"spring",stiffness:300,damping:30},style:{transformOrigin:"center"},children:D?(0,ve.jsx)(hg,{width:"100%",height:O?60:a,children:Ie()}):(0,ve.jsx)("div",{style:{width:"100%",height:O?"60px":`${a}px`},children:Ie()})}),V&&!O&&(0,ve.jsx)(ie.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"absolute bottom-2 right-2 w-32 h-20 bg-background/80 backdrop-blur-sm border rounded-lg p-1",children:(0,ve.jsx)(hg,{width:"100%",height:"100%",children:(0,ve.jsx)(dN,{data:e,margin:{top:0,right:0,left:0,bottom:0},children:r.filter(pe=>!pe.hide&&!oe.has(pe.dataKey)).map((pe,ne)=>(0,ve.jsx)(Um,{type:"monotone",dataKey:pe.dataKey,stroke:pe.color||me[ne%me.length],strokeWidth:1,dot:!1},pe.dataKey))})})})]})]})})}function Kae(e){let{hasProAccess:t}=Ut();return t?(0,ve.jsx)(Y8t,{...e}):(0,ve.jsx)(Be,{className:"w-full",children:(0,ve.jsxs)(Ve,{className:"flex flex-col items-center justify-center py-12",children:[(0,ve.jsx)("div",{className:"flex items-center justify-center w-16 h-16 rounded-full bg-primary/10 mb-4",children:(0,ve.jsx)(Ct,{className:"w-8 h-8 text-primary"})}),(0,ve.jsx)("h3",{className:"text-lg font-semibold text-center mb-2",children:"Advanced Chart - Pro Feature"}),(0,ve.jsx)("p",{className:"text-muted-foreground text-center text-sm mb-6 max-w-sm",children:"Professional chart component with advanced features like animations, themes, and interactive controls requires a Pro subscription."}),(0,ve.jsx)("div",{className:"flex items-center gap-2",children:(0,ve.jsxs)(Nt,{variant:"secondary",className:"bg-gradient-to-r from-purple-500/10 to-pink-500/10 text-purple-700 dark:text-purple-300",children:[(0,ve.jsx)(yt,{className:"w-3 h-3 mr-1"}),"Pro Feature"]})}),(0,ve.jsx)(te,{className:"mt-4",size:"sm",children:"Upgrade to Pro"})]})})}var nWe=Kae;var xi=L(ce(),1);var Sy=L(ce(),1);var E$=L(ce(),1);var lr=L(fe(),1);function D$({data:e,onClick:t,onAction:r,className:n,showSparkline:o=!0,showForecast:a=!1,interactive:i=!0,glassmorphism:s=!1,compact:l=!1}){let[c,u]=E$.default.useState(!1),[d,f]=E$.default.useState(!1);E$.default.useEffect(()=>{f(!0)},[]);let p={primary:"text-blue-600 dark:text-blue-400",success:"text-green-600 dark:text-green-400",warning:"text-yellow-600 dark:text-yellow-400",danger:"text-red-600 dark:text-red-400",info:"text-purple-600 dark:text-purple-400"},h=C=>{switch(C){case"increase":return"text-green-600 dark:text-green-400";case"decrease":return"text-red-600 dark:text-red-400";default:return"text-muted-foreground"}},m=C=>{switch(C){case"increase":return(0,lr.jsx)(hw,{className:"h-4 w-4"});case"decrease":return(0,lr.jsx)(mw,{className:"h-4 w-4"});default:return(0,lr.jsx)(em,{className:"h-4 w-4"})}},g=()=>{if(!e.sparkline||e.sparkline.length<2)return null;let C=Math.max(...e.sparkline),b=Math.min(...e.sparkline),w=C-b||1,S=e.sparkline.map((N,D)=>{let E=D/(e.sparkline.length-1)*100,A=100-(N-b)/w*100;return`${E},${A}`}).join(" "),P=`gradient-${e.id}`;return(0,lr.jsx)(ie.div,{className:"absolute bottom-0 left-0 right-0 h-16 overflow-hidden rounded-b-lg opacity-20",initial:{opacity:0},animate:{opacity:c?.3:.2},transition:{duration:.2},children:(0,lr.jsxs)("svg",{className:"w-full h-full",viewBox:"0 0 100 100",preserveAspectRatio:"none",children:[(0,lr.jsx)("defs",{children:(0,lr.jsxs)("linearGradient",{id:P,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[(0,lr.jsx)("stop",{offset:"0%",stopColor:"currentColor",stopOpacity:"0.3"}),(0,lr.jsx)("stop",{offset:"100%",stopColor:"currentColor",stopOpacity:"0"})]})}),(0,lr.jsx)("polyline",{fill:"none",stroke:"currentColor",strokeWidth:"2",points:S,className:p[e.color||"primary"]}),(0,lr.jsx)("polygon",{fill:`url(#${P})`,points:`0,100 ${S} 100,100`,className:p[e.color||"primary"]})]})})},v=()=>{if(!e.target)return null;let C=typeof e.value=="number"?e.value:parseFloat(e.value),b=C/e.target*100;return(0,lr.jsxs)(ie.div,{className:"mt-3",initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.1},children:[(0,lr.jsxs)("div",{className:"flex justify-between text-xs text-muted-foreground mb-1",children:[(0,lr.jsx)("span",{children:"Progress to target"}),(0,lr.jsxs)("span",{children:[b.toFixed(1),"%"]})]}),(0,lr.jsx)("div",{className:"h-1.5 bg-muted rounded-full overflow-hidden",children:(0,lr.jsx)(ie.div,{className:B("h-full rounded-full",b>=100?"bg-green-500":"bg-primary"),initial:{width:0},animate:{width:`${Math.min(b,100)}%`},transition:{duration:.5,ease:"easeOut"}})}),(0,lr.jsxs)("div",{className:"flex justify-between text-xs text-muted-foreground mt-1",children:[(0,lr.jsxs)("span",{children:[C," ",e.unit]}),(0,lr.jsxs)("span",{children:["Target: ",e.target," ",e.unit]})]})]})},y=C=>d?typeof C=="number"?C>=1e6?(C/1e6).toFixed(1)+"M":C>=1e3?(C/1e3).toFixed(1)+"K":C.toFixed(2):C.toString():typeof C=="number"?C>=1e6?(C/1e6).toFixed(1)+"M":C>=1e3?(C/1e3).toFixed(1)+"K":C.toString():C.toString(),x={initial:{opacity:0,y:20},animate:{opacity:1,y:0,transition:{duration:.3,ease:"easeOut"}},hover:i?{y:-2,transition:{duration:.2}}:{}};return(0,lr.jsx)(ie.div,{variants:x,initial:"initial",animate:"animate",whileHover:"hover",onHoverStart:()=>u(!0),onHoverEnd:()=>u(!1),children:(0,lr.jsxs)(Be,{className:B("relative overflow-hidden cursor-pointer transition-all duration-300",i&&"hover:shadow-lg hover:shadow-primary/5",s&&"bg-background/60 backdrop-blur-md border-white/10",n),onClick:t,children:[s&&(0,lr.jsx)("div",{className:"absolute inset-0 bg-gradient-to-br from-primary/5 to-transparent"}),(0,lr.jsxs)("div",{className:B("flex items-center justify-between",l?"p-3 pb-1":"p-4 pb-2"),children:[(0,lr.jsxs)("div",{className:"flex items-center gap-2",children:[(0,lr.jsx)(ie.div,{className:B("rounded-lg",l?"p-1.5":"p-2",s?"bg-white/10 backdrop-blur":"bg-muted"),whileHover:{scale:1.05},whileTap:{scale:.95},children:(0,lr.jsx)("div",{className:B(p[e.color||"primary"],l?"h-4 w-4":"h-5 w-5"),children:e.icon})}),(0,lr.jsx)("div",{children:(0,lr.jsx)("h3",{className:B("font-medium text-muted-foreground",l?"text-xs":"text-sm"),children:e.title})})]}),i&&(0,lr.jsxs)(Pr,{children:[(0,lr.jsx)(Ir,{asChild:!0,children:(0,lr.jsx)(te,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:C=>C.stopPropagation(),children:(0,lr.jsx)(ku,{className:"h-4 w-4"})})}),(0,lr.jsxs)(xr,{align:"end",children:[(0,lr.jsxs)(Fe,{onClick:()=>r?.("fullscreen"),children:[(0,lr.jsx)(Rl,{className:"mr-2 h-4 w-4"}),"Fullscreen"]}),(0,lr.jsxs)(Fe,{onClick:()=>r?.("export"),children:[(0,lr.jsx)(un,{className:"mr-2 h-4 w-4"}),"Export Data"]}),(0,lr.jsxs)(Fe,{onClick:()=>r?.("share"),children:[(0,lr.jsx)(cv,{className:"mr-2 h-4 w-4"}),"Share"]})]})]})]}),(0,lr.jsxs)("div",{className:l?"px-3 pb-3":"px-4 pb-4",children:[(0,lr.jsx)(Gf,{children:(0,lr.jsxs)(Bd,{children:[(0,lr.jsx)(Vd,{asChild:!0,children:(0,lr.jsxs)(ie.div,{className:B("font-bold tracking-tight",l?"text-xl":"text-3xl"),animate:{scale:c&&!l?1.02:1},transition:{duration:.2},children:[y(e.value),e.unit&&(0,lr.jsx)("span",{className:B("ml-1 text-muted-foreground",l?"text-sm":"text-lg"),children:e.unit})]})}),(0,lr.jsx)(Fu,{children:(0,lr.jsxs)("p",{children:["Exact value: ",e.value," ",e.unit]})})]})}),e.change&&(0,lr.jsxs)(ie.div,{className:B("flex items-center gap-1 mt-1",l?"text-xs":"text-sm",h(e.change.type)),initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:.1},children:[m(e.change.type),(0,lr.jsxs)("span",{className:"font-medium",children:[e.change.type==="neutral"?"":e.change.type==="increase"?"+":"-",Math.abs(e.change.value),"%"]}),(0,lr.jsxs)("span",{className:"text-muted-foreground",children:["from ",e.change.period]})]}),a&&e.forecast&&(0,lr.jsxs)(ie.div,{className:"flex items-center gap-1 text-xs text-muted-foreground mt-1",initial:{opacity:0},animate:{opacity:1},transition:{delay:.2},children:[(0,lr.jsx)(Oc,{className:"h-3 w-3"}),(0,lr.jsxs)("span",{children:["Forecast: ",y(e.forecast)," ",e.unit]})]}),!l&&v()]}),o&&!l&&g()]})})}var Yae=L(ce(),1);var ut=L(fe(),1),Xae={default:["#3b82f6","#10b981","#f59e0b","#ef4444","#8b5cf6","#ec4899"],pastel:["#93c5fd","#86efac","#fcd34d","#fca5a5","#c4b5fd","#fbcfe8"],vibrant:["#2563eb","#059669","#d97706","#dc2626","#7c3aed","#db2777"],monochrome:["#1f2937","#374151","#4b5563","#6b7280","#9ca3af","#d1d5db"]};function O$({id:e,title:t,description:r,data:n,className:o,height:a=300,onAction:i,loading:s=!1,refreshing:l=!1,glassmorphism:c=!1,interactive:u=!0,compact:d=!1}){let[f,p]=Yae.default.useState("default"),[h,m]=Yae.default.useState(!1),g=Xae[f],v=d?120:a,y=({active:b,payload:w,label:S})=>!b||!w?null:(0,ut.jsxs)(ie.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},className:B("p-3 rounded-lg shadow-lg",c?"bg-background/80 backdrop-blur-md border border-white/10":"bg-background border"),children:[(0,ut.jsx)("p",{className:"text-sm font-medium",children:S}),w.map((P,N)=>(0,ut.jsxs)("p",{className:"text-sm mt-1",children:[(0,ut.jsx)("span",{className:"inline-block w-3 h-3 rounded-full mr-2",style:{backgroundColor:P.color}}),P.name,": ",P.value]},N))]}),x=()=>{if(!n.data||n.data.length===0)return(0,ut.jsx)("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:"No data available"});let b={data:n.data,margin:{top:5,right:30,left:20,bottom:5}};switch(n.type){case"line":return(0,ut.jsx)(hg,{width:"100%",height:v,children:(0,ut.jsxs)(dN,{...b,children:[!d&&(0,ut.jsx)(Vm,{strokeDasharray:"3 3",className:"opacity-30"}),(0,ut.jsx)(Is,{dataKey:"name",tick:d?{fontSize:10}:void 0,hide:d}),(0,ut.jsx)(Rs,{tick:d?{fontSize:10}:void 0,hide:d}),!d&&(0,ut.jsx)(Ta,{content:(0,ut.jsx)(y,{})}),u&&!d&&(0,ut.jsx)(yi,{}),Object.keys(n.data[0]).filter(w=>w!=="name").map((w,S)=>(0,ut.jsx)(Um,{type:"monotone",dataKey:w,stroke:g[S%g.length],strokeWidth:2,dot:{r:4},activeDot:{r:6},isAnimationActive:!1},w))]})});case"bar":return(0,ut.jsx)(hg,{width:"100%",height:v,children:(0,ut.jsxs)(e_,{...b,children:[!d&&(0,ut.jsx)(Vm,{strokeDasharray:"3 3",className:"opacity-30"}),(0,ut.jsx)(Is,{dataKey:"name",tick:d?{fontSize:10}:void 0,hide:d}),(0,ut.jsx)(Rs,{tick:d?{fontSize:10}:void 0,hide:d}),!d&&(0,ut.jsx)(Ta,{content:(0,ut.jsx)(y,{})}),u&&!d&&(0,ut.jsx)(yi,{}),Object.keys(n.data[0]).filter(w=>w!=="name").map((w,S)=>(0,ut.jsx)(lf,{dataKey:w,fill:g[S%g.length],radius:[4,4,0,0],isAnimationActive:!1},w))]})});case"area":return(0,ut.jsx)(hg,{width:"100%",height:v,children:(0,ut.jsxs)(n_,{...b,children:[!d&&(0,ut.jsx)(Vm,{strokeDasharray:"3 3",className:"opacity-30"}),(0,ut.jsx)(Is,{dataKey:"name",tick:d?{fontSize:10}:void 0,hide:d}),(0,ut.jsx)(Rs,{tick:d?{fontSize:10}:void 0,hide:d}),!d&&(0,ut.jsx)(Ta,{content:(0,ut.jsx)(y,{})}),u&&!d&&(0,ut.jsx)(yi,{}),Object.keys(n.data[0]).filter(w=>w!=="name").map((w,S)=>(0,ut.jsx)(uf,{type:"monotone",dataKey:w,stroke:g[S%g.length],fill:g[S%g.length],fillOpacity:.2,isAnimationActive:!1},w))]})});case"pie":case"donut":return(0,ut.jsx)(hg,{width:"100%",height:v,children:(0,ut.jsxs)(t_,{children:[(0,ut.jsx)(Yu,{data:n.data,cx:"50%",cy:"50%",labelLine:!1,label:u&&!d,outerRadius:d?40:n.type==="donut"?80:100,innerRadius:n.type==="donut"?d?25:50:0,fill:"#8884d8",dataKey:"value",isAnimationActive:!1,children:n.data.map((w,S)=>(0,ut.jsx)(Wu,{fill:g[S%g.length]},`cell-${S}`))}),!d&&(0,ut.jsx)(Ta,{content:(0,ut.jsx)(y,{})}),u&&!d&&(0,ut.jsx)(yi,{})]})});case"radar":return(0,ut.jsx)(hg,{width:"100%",height:v,children:(0,ut.jsxs)(r_,{data:n.data,children:[(0,ut.jsx)(Nk,{}),(0,ut.jsx)(Xu,{dataKey:"subject"}),(0,ut.jsx)(Ku,{}),Object.keys(n.data[0]).filter(w=>w!=="subject").map((w,S)=>(0,ut.jsx)(Rg,{name:w,dataKey:w,stroke:g[S%g.length],fill:g[S%g.length],fillOpacity:.3,isAnimationActive:!1},w)),!d&&(0,ut.jsx)(Ta,{content:(0,ut.jsx)(y,{})}),u&&!d&&(0,ut.jsx)(yi,{})]})});default:return null}},C={initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1,transition:{duration:.3,ease:"easeOut"}}};return(0,ut.jsx)(ie.div,{variants:C,initial:"initial",animate:"animate",className:B(h&&"fixed inset-4 z-50"),children:(0,ut.jsxs)(Be,{className:B("relative overflow-hidden transition-all duration-300",c&&"bg-background/60 backdrop-blur-md border-white/10",h&&"h-full",o),children:[(0,ut.jsxs)(yr,{className:B("flex flex-row items-center justify-between space-y-0",d?"pb-1 pt-2 px-3":u?"pb-2":"pb-1 pt-3"),children:[(0,ut.jsxs)("div",{children:[(0,ut.jsx)(Or,{className:B("font-semibold",d?"text-xs":u?"text-base":"text-sm"),children:t}),r&&u&&!d&&(0,ut.jsx)("p",{className:"text-sm text-muted-foreground mt-1",children:r})]}),!d&&(0,ut.jsxs)("div",{className:"flex items-center gap-2",children:[l&&(0,ut.jsx)(ie.div,{animate:{rotate:360},transition:{duration:1,repeat:1/0,ease:"linear"},children:(0,ut.jsx)(yo,{className:"h-4 w-4 text-muted-foreground"})}),u&&(0,ut.jsxs)(Pr,{children:[(0,ut.jsx)(Ir,{asChild:!0,children:(0,ut.jsx)(te,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:(0,ut.jsx)(ku,{className:"h-4 w-4"})})}),(0,ut.jsxs)(xr,{align:"end",className:"w-48",children:[(0,ut.jsxs)(Fe,{onClick:()=>{m(!h),i?.("fullscreen",{fullscreen:!h})},children:[(0,ut.jsx)(Rl,{className:"mr-2 h-4 w-4"}),h?"Exit Fullscreen":"Fullscreen"]}),(0,ut.jsxs)(Bu,{children:[(0,ut.jsxs)(jc,{children:[(0,ut.jsx)(Dc,{className:"mr-2 h-4 w-4"}),"Color Scheme"]}),(0,ut.jsx)(qc,{children:Object.keys(Xae).map(b=>(0,ut.jsx)(Fe,{onClick:()=>p(b),children:(0,ut.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ut.jsx)("div",{className:"flex gap-1",children:Xae[b].slice(0,3).map((w,S)=>(0,ut.jsx)("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:w}},S))}),(0,ut.jsx)("span",{className:"capitalize",children:b})]})},b))})]}),(0,ut.jsx)(Vr,{}),(0,ut.jsxs)(Fe,{onClick:()=>i?.("export",{format:"png"}),children:[(0,ut.jsx)(un,{className:"mr-2 h-4 w-4"}),"Export as PNG"]}),(0,ut.jsxs)(Fe,{onClick:()=>i?.("export",{format:"csv"}),children:[(0,ut.jsx)(un,{className:"mr-2 h-4 w-4"}),"Export Data"]}),(0,ut.jsx)(Vr,{}),(0,ut.jsxs)(Fe,{onClick:()=>i?.("filter"),children:[(0,ut.jsx)(Ii,{className:"mr-2 h-4 w-4"}),"Filter Data"]}),(0,ut.jsxs)(Fe,{onClick:()=>i?.("settings"),children:[(0,ut.jsx)(as,{className:"mr-2 h-4 w-4"}),"Chart Settings"]})]})]})]})]}),(0,ut.jsx)(Ve,{className:B("p-0",d?"px-2 pb-2":u?"px-4 pb-4":"px-2 pb-2"),children:(0,ut.jsx)(Dt,{mode:"wait",children:s?(0,ut.jsx)(ie.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"flex items-center justify-center",style:{height:v},children:(0,ut.jsxs)("div",{className:"space-y-2",children:[(0,ut.jsx)("div",{className:"animate-pulse bg-muted h-4 w-32 rounded"}),(0,ut.jsx)("div",{className:"animate-pulse bg-muted h-4 w-24 rounded"}),(0,ut.jsx)("div",{className:"animate-pulse bg-muted h-4 w-28 rounded"})]})},"loading"):(0,ut.jsx)(ie.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.3},children:x()},"chart")})})]})})}var AS=L(ce(),1);var St=L(fe(),1);function _$({items:e,title:t="Activity Feed",className:r,height:n=400,onItemClick:o,onAction:a,loading:i=!1,showFilters:s=!0,showNotifications:l=!0,glassmorphism:c=!1,realtime:u=!1,maxItems:d,compact:f=!1}){let[p,h]=AS.default.useState("all"),[m,g]=AS.default.useState(!0),[v,y]=AS.default.useState([]),[x,C]=AS.default.useState(!1);AS.default.useEffect(()=>{C(!0)},[]),AS.default.useEffect(()=>{if(!u)return;let N=setInterval(()=>{let D={id:`new-${Date.now()}`,type:["info","success","warning","error"][Math.floor(Math.random()*4)],title:"New activity",description:"Something happened just now",timestamp:new Date,user:{name:"System",avatar:void 0}};y(E=>[D,...E].slice(0,3)),setTimeout(()=>{y(E=>E.filter(A=>A.id!==D.id))},5e3)},1e4);return()=>clearInterval(N)},[u]);let b=N=>{switch(N){case"info":return(0,St.jsx)(Ec,{className:"h-4 w-4"});case"success":return(0,St.jsx)(Pi,{className:"h-4 w-4"});case"warning":return(0,St.jsx)(eo,{className:"h-4 w-4"});case"error":return(0,St.jsx)(aa,{className:"h-4 w-4"})}},w=N=>{switch(N){case"info":return"text-blue-500 bg-blue-100 dark:bg-blue-900/20";case"success":return"text-green-500 bg-green-100 dark:bg-green-900/20";case"warning":return"text-yellow-500 bg-yellow-100 dark:bg-yellow-900/20";case"error":return"text-red-500 bg-red-100 dark:bg-red-900/20"}},S=[...v,...e].filter(N=>p==="all"||N.type===p);d&&(S=S.slice(0,d));let P=(N,D=!1)=>(0,St.jsxs)(ie.div,{layout:!0,initial:{opacity:0,x:-20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},whileHover:{x:f?2:4},transition:{duration:.2},className:B("group relative flex gap-3 rounded-lg cursor-pointer transition-colors",f?"p-2":"p-3","hover:bg-muted/50",D&&"bg-primary/5 border-l-2 border-primary"),onClick:()=>o?.(N),children:[!f&&(0,St.jsx)("div",{className:"absolute left-7 top-12 bottom-0 w-px bg-border"}),(0,St.jsx)("div",{className:"relative z-10 flex-shrink-0",children:N.user?.avatar?(0,St.jsxs)(ba,{className:f?"h-6 w-6":"h-8 w-8",children:[(0,St.jsx)(ki,{src:N.user.avatar}),(0,St.jsx)(Ha,{children:N.user.name[0]})]}):(0,St.jsx)("div",{className:B(f?"h-6 w-6":"h-8 w-8","rounded-full flex items-center justify-center",w(N.type)),children:N.icon||b(N.type)})}),(0,St.jsxs)("div",{className:"flex-1 min-w-0",children:[f?(0,St.jsxs)("div",{className:"space-y-0.5",children:[(0,St.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,St.jsxs)("p",{className:"text-xs font-medium leading-tight",children:[N.user?.name&&(0,St.jsxs)("span",{className:"text-foreground",children:[N.user.name," "]}),(0,St.jsx)("span",{className:"text-muted-foreground",children:N.title})]}),(0,St.jsx)("div",{className:"text-[10px] text-muted-foreground",children:x?jK(N.timestamp,{addSuffix:!1}).replace("about ","").replace("over ",""):""})]}),N.description&&(0,St.jsx)("p",{className:"text-[10px] text-muted-foreground line-clamp-1",children:N.description})]}):(0,St.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,St.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,St.jsxs)("p",{className:"text-sm font-medium leading-tight",children:[N.user?.name&&(0,St.jsxs)("span",{className:"text-foreground",children:[N.user.name," "]}),(0,St.jsx)("span",{className:"text-muted-foreground",children:N.title})]}),N.description&&(0,St.jsx)("p",{className:"text-sm text-muted-foreground mt-0.5 line-clamp-2",children:N.description})]}),(0,St.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground whitespace-nowrap",children:[(0,St.jsx)(In,{className:"h-3 w-3"}),x?jK(N.timestamp,{addSuffix:!0}):"Loading..."]})]}),D&&(0,St.jsx)(ie.div,{initial:{scale:0},animate:{scale:1},className:"inline-block mt-1",children:(0,St.jsx)(Nt,{variant:"secondary",className:"text-xs",children:"New"})})]}),!f&&(0,St.jsx)("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity",children:(0,St.jsx)(te,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:E=>{E.stopPropagation(),a?.("more",N)},children:(0,St.jsx)(za,{className:"h-3 w-3"})})})]},N.id);return(0,St.jsxs)(Be,{className:B("relative overflow-hidden",c&&"bg-background/60 backdrop-blur-md border-white/10",r),children:[(0,St.jsxs)(yr,{className:B("flex flex-row items-center justify-between space-y-0",f?"pb-2 pt-3":"pb-3"),children:[(0,St.jsxs)("div",{className:"flex items-center gap-2",children:[(0,St.jsx)(Ba,{className:B("text-muted-foreground",f?"h-3.5 w-3.5":"h-4 w-4")}),(0,St.jsx)(Or,{className:B("font-semibold",f?"text-sm":"text-base"),children:t}),u&&!f&&(0,St.jsxs)(Nt,{variant:"secondary",className:"text-xs",children:[(0,St.jsx)("span",{className:"mr-1 h-1.5 w-1.5 rounded-full bg-green-500 animate-pulse"}),"Live"]})]}),!f&&(0,St.jsxs)("div",{className:"flex items-center gap-1",children:[s&&(0,St.jsxs)(Pr,{children:[(0,St.jsx)(Ir,{asChild:!0,children:(0,St.jsxs)(te,{variant:"ghost",size:"sm",className:"h-8 px-2",children:[(0,St.jsx)(Ii,{className:"h-4 w-4 mr-1"}),p!=="all"&&(0,St.jsx)(Nt,{variant:"secondary",className:"ml-1",children:p})]})}),(0,St.jsxs)(xr,{align:"end",children:[(0,St.jsx)(Fe,{onClick:()=>h("all"),children:"All Activities"}),(0,St.jsx)(Vr,{}),(0,St.jsxs)(Fe,{onClick:()=>h("info"),children:[(0,St.jsx)(Ec,{className:"mr-2 h-4 w-4 text-blue-500"}),"Information"]}),(0,St.jsxs)(Fe,{onClick:()=>h("success"),children:[(0,St.jsx)(Pi,{className:"mr-2 h-4 w-4 text-green-500"}),"Success"]}),(0,St.jsxs)(Fe,{onClick:()=>h("warning"),children:[(0,St.jsx)(eo,{className:"mr-2 h-4 w-4 text-yellow-500"}),"Warning"]}),(0,St.jsxs)(Fe,{onClick:()=>h("error"),children:[(0,St.jsx)(aa,{className:"mr-2 h-4 w-4 text-red-500"}),"Error"]})]})]}),l&&(0,St.jsx)(te,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:()=>{g(!m),a?.("notifications",{enabled:!m})},children:m?(0,St.jsx)(mh,{className:"h-4 w-4"}):(0,St.jsx)(zT,{className:"h-4 w-4 text-muted-foreground"})}),(0,St.jsx)(te,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:()=>a?.("refresh"),children:(0,St.jsx)(yo,{className:"h-4 w-4"})})]})]}),(0,St.jsx)(Ve,{className:"p-0",children:(0,St.jsx)(ac,{className:f?"px-3 pb-3":"px-4 pb-4",style:{height:f?Math.min(n,200):n},children:(0,St.jsx)(Dt,{mode:"popLayout",children:i?(0,St.jsx)(ie.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"space-y-3",children:[...Array(5)].map((N,D)=>(0,St.jsxs)("div",{className:"flex gap-3",children:[(0,St.jsx)("div",{className:"h-8 w-8 rounded-full bg-muted animate-pulse"}),(0,St.jsxs)("div",{className:"flex-1 space-y-2",children:[(0,St.jsx)("div",{className:"h-4 bg-muted rounded animate-pulse"}),(0,St.jsx)("div",{className:"h-3 bg-muted rounded w-3/4 animate-pulse"})]})]},D))},"loading"):S.length===0?(0,St.jsxs)(ie.div,{initial:{opacity:0},animate:{opacity:1},className:"flex flex-col items-center justify-center py-12 text-muted-foreground",children:[(0,St.jsx)(Ba,{className:"h-8 w-8 mb-2"}),(0,St.jsx)("p",{className:"text-sm",children:"No activities to show"})]},"empty"):(0,St.jsx)("div",{className:"space-y-1",children:S.map(N=>P(N,v.some(D=>D.id===N.id)))})})})})]})}var Qae=L(ce(),1);var La=L(fe(),1);function F$({data:e,title:t="Progress",className:r,glassmorphism:n=!1,compact:o=!1}){let a=Array.isArray(e)?e:[e],[i,s]=Qae.default.useState(!1);return Qae.default.useEffect(()=>{s(!0)},[]),(0,La.jsxs)(Be,{className:B("h-full flex flex-col",n&&"bg-background/60 backdrop-blur-md border-white/10",r),children:[(0,La.jsx)(yr,{className:"pb-3 space-y-0",children:(0,La.jsxs)(Or,{className:"text-sm sm:text-base font-semibold flex items-center gap-2",children:[(0,La.jsx)(gh,{className:"h-4 w-4 text-muted-foreground"}),(0,La.jsx)("span",{className:"truncate",children:t})]})}),(0,La.jsx)(Ve,{className:"flex-1 space-y-3 overflow-auto",children:a.map((l,c)=>{let u=l.current/l.target*100,d=l.deadline&&new Date(l.deadline)<new Date;return(0,La.jsxs)(ie.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:c*.05},className:"space-y-2",children:[(0,La.jsxs)("div",{className:"flex flex-col sm:flex-row sm:justify-between gap-1 sm:gap-2",children:[(0,La.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,La.jsx)("h4",{className:"text-xs sm:text-sm font-medium truncate",children:l.title}),l.description&&(0,La.jsx)("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:l.description})]}),(0,La.jsxs)("div",{className:"text-left sm:text-right",children:[(0,La.jsxs)("p",{className:"text-xs sm:text-sm font-semibold tabular-nums",children:[l.current," / ",l.target," ",l.unit]}),(0,La.jsxs)("p",{className:"text-xs text-muted-foreground",children:[u.toFixed(1),"%"]})]})]}),(0,La.jsxs)("div",{className:"relative",children:[(0,La.jsx)(ps,{value:Math.min(u,100),className:B("h-1.5 sm:h-2",d&&"[&>div]:bg-destructive")}),l.milestone&&(0,La.jsx)("div",{className:"absolute top-1/2 -translate-y-1/2 w-0.5 h-3 sm:h-4 bg-border",style:{left:`${l.milestone/l.target*100}%`}})]}),l.deadline&&(0,La.jsxs)("div",{className:B("flex items-center gap-1 text-xs",d?"text-destructive":"text-muted-foreground"),children:[(0,La.jsx)(In,{className:"h-3 w-3"}),(0,La.jsxs)("span",{children:[d?"Overdue":"Due",": ",i?new Date(l.deadline).toLocaleDateString():"Loading..."]})]}),l.trend&&(0,La.jsxs)("div",{className:"flex items-center gap-1 text-xs text-green-600 dark:text-green-400",children:[(0,La.jsx)(Oc,{className:"h-3 w-3"}),(0,La.jsxs)("span",{children:["+",l.trend,"% this week"]})]})]},l.id)})})]})}var Zae=L(ce(),1);var So=L(fe(),1);function B$({data:e,title:t="Comparison",className:r,glassmorphism:n=!1,compact:o=!1}){let[a,i]=Zae.default.useState(!1);Zae.default.useEffect(()=>{i(!0)},[]);let s=Math.max(...e.periods.map(d=>d.value)),l=e.periods.length>=2?(e.periods[0].value-e.periods[1].value)/e.periods[1].value*100:0,c=l>0?"increase":l<0?"decrease":"neutral",u=d=>a?d>=1e6?(d/1e6).toFixed(1)+"M":d>=1e3?(d/1e3).toFixed(0)+"K":d.toLocaleString():d.toString();return(0,So.jsxs)(Be,{className:B("h-full flex flex-col overflow-hidden",n&&"bg-background/60 backdrop-blur-md border-white/10",r),children:[(0,So.jsx)(yr,{className:"flex-shrink-0 pb-3 px-4",children:(0,So.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,So.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,So.jsxs)(Or,{className:"text-sm font-semibold flex items-center gap-2",children:[(0,So.jsx)(ns,{className:"h-4 w-4 text-muted-foreground flex-shrink-0"}),(0,So.jsx)("span",{className:"truncate",children:t})]}),e.metric&&(0,So.jsx)("p",{className:"text-xs text-muted-foreground mt-1 truncate",children:e.metric})]}),l!==0&&(0,So.jsxs)("div",{className:B("inline-flex items-center gap-1 px-2 py-0.5 rounded-md text-xs font-medium flex-shrink-0",c==="increase"&&"bg-green-500/10 text-green-600 dark:text-green-400 border border-green-500/20",c==="decrease"&&"bg-red-500/10 text-red-600 dark:text-red-400 border border-red-500/20",c==="neutral"&&"bg-muted text-muted-foreground border border-border"),children:[c==="increase"?(0,So.jsx)(hw,{className:"h-3 w-3"}):c==="decrease"?(0,So.jsx)(mw,{className:"h-3 w-3"}):(0,So.jsx)(em,{className:"h-3 w-3"}),(0,So.jsxs)("span",{children:[Math.abs(l).toFixed(1),"%"]})]})]})}),(0,So.jsxs)(Ve,{className:"flex-1 px-4 pb-4 overflow-hidden flex flex-col gap-3",children:[(0,So.jsx)("div",{className:"flex-1 min-h-0 overflow-y-auto overflow-x-hidden pr-2 -mr-2",children:(0,So.jsx)("div",{className:"space-y-2.5",children:e.periods.map((d,f)=>{let p=d.value/s*100,h=d.value===s;return(0,So.jsxs)(ie.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:f*.05},children:[(0,So.jsxs)("div",{className:"flex items-center justify-between gap-3 mb-1",children:[(0,So.jsx)("span",{className:B("text-xs font-medium truncate flex-1",h?"text-foreground":"text-muted-foreground"),children:d.label}),(0,So.jsx)("span",{className:B("text-xs font-semibold tabular-nums flex-shrink-0",h&&"text-primary"),children:u(d.value)})]}),(0,So.jsx)("div",{className:"w-full bg-muted rounded-full h-1.5 overflow-hidden",children:(0,So.jsx)(ie.div,{className:B("h-full rounded-full transition-colors",h?"bg-primary":"bg-primary/60"),initial:{width:0},animate:{width:`${Math.min(p,100)}%`},transition:{duration:.5,delay:f*.05}})})]},d.label)})})}),e.showChart&&(0,So.jsx)("div",{className:"flex-shrink-0 pt-3 border-t",children:(0,So.jsx)("div",{className:"h-14 flex items-end justify-between gap-1",children:e.periods.slice(0,5).map((d,f)=>{let p=d.value/s*100,h=d.value===s;return(0,So.jsxs)(ie.div,{className:"flex-1 flex flex-col items-center gap-0.5",initial:{opacity:0},animate:{opacity:1},transition:{delay:f*.05},children:[(0,So.jsx)("div",{className:"w-full h-10 flex items-end justify-center px-0.5",children:(0,So.jsx)(ie.div,{className:B("w-full max-w-[20px] rounded-t transition-colors",h?"bg-primary":"bg-primary/40"),initial:{height:0},animate:{height:`${p}%`},transition:{duration:.5,delay:f*.05}})}),(0,So.jsx)("span",{className:"text-[9px] text-muted-foreground",children:d.label.slice(0,3)})]},d.label)})})})]})]})}var h6=L(vGe(),1);var gn=L(fe(),1),C7t=(0,h6.WidthProvider)(h6.Responsive);function yGe({widgets:e,onLayoutChange:t,onWidgetRemove:r,onWidgetAction:n,editMode:o=!1,className:a,glassmorphism:i=!1,breakpoints:s={lg:1200,md:996,sm:768,xs:480,xxs:0},cols:l={lg:12,md:10,sm:6,xs:4,xxs:2},rowHeight:c=80,margin:u=[4,6],containerPadding:d=[4,4]}){let[f,p]=Sy.default.useState({}),[h,m]=Sy.default.useState("lg"),[g,v]=Sy.default.useState(new Set),[y,x]=Sy.default.useState(null),[C,b]=Sy.default.useState(1200),w=Sy.default.useRef(null),[S,P]=Sy.default.useState("vertical");Sy.default.useEffect(()=>{let R=()=>{if(w.current){let I=w.current.offsetWidth;b(I),I<480?m("xxs"):I<768?m("xs"):I<996?m("sm"):I<1200?m("md"):m("lg")}};return R(),window.addEventListener("resize",R),()=>window.removeEventListener("resize",R)},[]);let N=()=>{let R=e.map((k,T)=>({i:k.id,x:k.position?.x??T*3%12,y:k.position?.y??Math.floor(T/4)*3,w:k.size?.w??3,h:k.size?.h??3,minW:k.size?.minW||1,maxW:k.size?.maxW||12,minH:k.size?.minH||2,maxH:k.size?.maxH||8,isDraggable:o&&!g.has(k.id)&&k.permissions?.canMove!==!1,isResizable:o&&!g.has(k.id)&&k.permissions?.canResize!==!1})),I=(k,T)=>{let O=[...k].sort((M,j)=>M.y===j.y?M.x-j.x:M.y-j.y),F=0,_=[];for(let M of O){let j=Math.min(M.w,T),H=F;for(let q of _){let G=q.y+q.h;q.x<j&&q.x+q.w>0&&G>H&&(H=G)}_.push({...M,w:j,x:0,y:H}),F=H+M.h}return _};return{lg:R,md:e.map((k,T)=>{let O=Math.floor(T/2),F=T%2*5;return{i:k.id,w:Math.min(k.size?.w??5,5),h:k.size?.h??3,x:F,y:O*4,minW:2,minH:2,isDraggable:o&&!g.has(k.id),isResizable:o&&!g.has(k.id)}}),sm:I(R.map(k=>({...k,w:Math.min(k.w,6),h:Math.min(k.h,4)})),6),xs:I(R.map(k=>({...k,w:Math.min(k.w,4),h:Math.min(k.h,3)})),4),xxs:I(R.map(k=>({...k,w:2,h:Math.min(k.h,3)})),2)}},D=()=>{let R=N();return R[h]||R.lg},E=R=>{v(I=>{let k=new Set(I);return k.has(R)?k.delete(R):k.add(R),k})},A=R=>{x(y===R?null:R)},z=R=>{let I=g.has(R.id),k=y===R.id,T=()=>{switch(R.type){case"metric":return(0,gn.jsx)(D$,{data:R.data,onAction:O=>n?.(R.id,O),glassmorphism:i});case"chart":return(0,gn.jsx)(O$,{id:R.id,title:R.title,description:R.description,data:R.data,loading:R.loading,glassmorphism:i,onAction:(O,F)=>n?.(R.id,O,F)});case"activity":return(0,gn.jsx)(_$,{items:R.data?.items||[],title:R.title,loading:R.loading,glassmorphism:i,realtime:R.data?.realtime,onAction:(O,F)=>n?.(R.id,O,F)});case"progress":return(0,gn.jsx)(F$,{data:R.data,title:R.title,glassmorphism:i});case"comparison":return(0,gn.jsx)(B$,{data:R.data,title:R.title,glassmorphism:i});case"table":case"map":case"calendar":return(0,gn.jsxs)("div",{className:B("h-full p-4 rounded-lg border",i?"bg-background/60 backdrop-blur-md border-white/10":"bg-card"),children:[(0,gn.jsx)("h3",{className:"font-semibold mb-2",children:R.title}),R.description&&(0,gn.jsx)("p",{className:"text-sm text-muted-foreground mb-4",children:R.description}),(0,gn.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground",children:(0,gn.jsxs)("span",{className:"text-sm",children:[R.type," widget content"]})})]});default:return(0,gn.jsxs)("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:["Widget type not supported: ",R.type]})}};return(0,gn.jsxs)(ie.div,{className:B("relative group h-full",k&&"!fixed !inset-4 !z-50 !h-auto !w-auto"),layout:!k,transition:{duration:.2},children:[(0,gn.jsx)("div",{className:"h-full dashboard-widget-container",children:T()}),o&&!k&&(0,gn.jsx)(ie.div,{initial:{opacity:0},animate:{opacity:1},className:"absolute top-2 right-2 z-10 opacity-0 group-hover:opacity-100 transition-opacity",children:(0,gn.jsxs)("div",{className:B("flex items-center gap-1 p-1 rounded-lg",i?"bg-background/80 backdrop-blur-sm":"bg-background/95","border shadow-sm"),children:[!I&&(0,gn.jsx)("div",{className:"drag-handle cursor-move p-1 hover:bg-muted rounded",children:(0,gn.jsx)(nA,{className:"h-4 w-4"})}),(0,gn.jsx)(te,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>E(R.id),children:I?(0,gn.jsx)(Ct,{className:"h-3 w-3"}):(0,gn.jsx)(Ix,{className:"h-3 w-3"})}),(0,gn.jsx)(te,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>A(R.id),children:(0,gn.jsx)(Rl,{className:"h-3 w-3"})}),(0,gn.jsx)(te,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>n?.(R.id,"settings"),children:(0,gn.jsx)(as,{className:"h-3 w-3"})}),R.permissions?.canDelete!==!1&&(0,gn.jsx)(te,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0 text-destructive hover:text-destructive",onClick:()=>r?.(R.id),children:(0,gn.jsx)(Zt,{className:"h-3 w-3"})})]})}),k&&(0,gn.jsx)(ie.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:"absolute top-4 right-4 z-10",children:(0,gn.jsxs)(te,{variant:"outline",size:"sm",onClick:()=>A(R.id),children:[(0,gn.jsx)(ww,{className:"h-4 w-4 mr-2"}),"Exit Fullscreen"]})})]},R.id)},V=h==="xs"||h==="xxs"||h==="sm";return(0,gn.jsxs)("div",{ref:w,className:B("w-full relative",a),children:[(0,gn.jsx)(Dt,{children:y?(0,gn.jsx)(ie.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-40 bg-background",children:e.filter(R=>R.id===y).map(z)}):V?(0,gn.jsx)("div",{className:"space-y-2",children:e.map(R=>(0,gn.jsx)(ie.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"w-full",children:z(R)},R.id))}):(0,gn.jsx)(C7t,{className:"layout",layouts:f.lg?f:N(),breakpoints:s,cols:l,rowHeight:h==="xs"||h==="xxs"?60:h==="sm"?70:c,margin:h==="xs"||h==="xxs"?[3,4]:u,containerPadding:d,onLayoutChange:(R,I)=>{p(I),t?.(R)},onBreakpointChange:R=>{m(R),P("vertical")},draggableHandle:".drag-handle",isDraggable:o,isResizable:o,compactType:"vertical",preventCollision:!0,useCSSTransforms:!0,transformScale:1,isDroppable:!0,autoSize:!1,verticalCompact:!0,children:e.map(R=>(0,gn.jsx)("div",{children:z(R)},R.id))})}),o&&!y&&(0,gn.jsx)(ie.div,{initial:{opacity:0},animate:{opacity:.1},className:"absolute inset-0 pointer-events-none",style:{backgroundImage:`
|
|
313
313
|
repeating-linear-gradient(
|
|
314
314
|
0deg,
|
|
315
315
|
var(--border) 0px,
|