@medixdeck/ui 0.1.5 → 0.1.6
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.cjs +10 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +73 -0
- package/dist/index.js +2699 -2353
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),w=require("react"),f=require("@chakra-ui/react");function Kr(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const L=Kr(w);var Yr=(e,t,n,o,i,r,s,l)=>{let c=document.documentElement,u=["light","dark"];function d(m){(Array.isArray(e)?e:[e]).forEach(x=>{let g=x==="class",b=g&&r?i.map(y=>r[y]||y):i;g?(c.classList.remove(...b),c.classList.add(r&&r[m]?r[m]:m)):c.setAttribute(x,m)}),h(m)}function h(m){l&&u.includes(m)&&(c.style.colorScheme=m)}function p(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(o)d(o);else try{let m=localStorage.getItem(t)||n,x=s&&m==="system"?p():m;d(x)}catch{}},to=["light","dark"],Bi="(prefers-color-scheme: dark)",Xr=typeof window>"u",Ai=L.createContext(void 0),Zr=e=>L.useContext(Ai)?L.createElement(L.Fragment,null,e.children):L.createElement(Jr,{...e}),qr=["light","dark"],Jr=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:n=!0,enableColorScheme:o=!0,storageKey:i="theme",themes:r=qr,defaultTheme:s=n?"system":"light",attribute:l="data-theme",value:c,children:u,nonce:d,scriptProps:h})=>{let[p,m]=L.useState(()=>ea(i,s)),[x,g]=L.useState(()=>p==="system"?At():p),b=c?Object.values(c):r,y=L.useCallback(j=>{let F=j;if(!F)return;j==="system"&&n&&(F=At());let D=c?c[F]:F,A=t?ta(d):null,T=document.documentElement,k=E=>{E==="class"?(T.classList.remove(...b),D&&T.classList.add(D)):E.startsWith("data-")&&(D?T.setAttribute(E,D):T.removeAttribute(E))};if(Array.isArray(l)?l.forEach(k):k(l),o){let E=to.includes(s)?s:null,P=to.includes(F)?F:E;T.style.colorScheme=P}A==null||A()},[d]),v=L.useCallback(j=>{let F=typeof j=="function"?j(p):j;m(F);try{localStorage.setItem(i,F)}catch{}},[p]),S=L.useCallback(j=>{let F=At(j);g(F),p==="system"&&n&&!e&&y("system")},[p,e]);L.useEffect(()=>{let j=window.matchMedia(Bi);return j.addListener(S),S(j),()=>j.removeListener(S)},[S]),L.useEffect(()=>{let j=F=>{F.key===i&&(F.newValue?m(F.newValue):v(s))};return window.addEventListener("storage",j),()=>window.removeEventListener("storage",j)},[v]),L.useEffect(()=>{y(e??p)},[e,p]);let C=L.useMemo(()=>({theme:p,setTheme:v,forcedTheme:e,resolvedTheme:p==="system"?x:p,themes:n?[...r,"system"]:r,systemTheme:n?x:void 0}),[p,v,e,x,n,r]);return L.createElement(Ai.Provider,{value:C},L.createElement(Qr,{forcedTheme:e,storageKey:i,attribute:l,enableSystem:n,enableColorScheme:o,defaultTheme:s,value:c,themes:r,nonce:d,scriptProps:h}),u)},Qr=L.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:o,enableColorScheme:i,defaultTheme:r,value:s,themes:l,nonce:c,scriptProps:u})=>{let d=JSON.stringify([n,t,r,e,l,s,o,i]).slice(1,-1);return L.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?c:"",dangerouslySetInnerHTML:{__html:`(${Yr.toString()})(${d})`}})}),ea=(e,t)=>{if(Xr)return;let n;try{n=localStorage.getItem(e)||void 0}catch{}return n||t},ta=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},At=e=>(e||(e=window.matchMedia(Bi)),e.matches?"dark":"light");const ae={blue:{50:{value:"#E8F3FF"},100:{value:"#D6EEFF"},200:{value:"#A8D4FF"},300:{value:"#70B6FF"},400:{value:"#3D98FF"},500:{value:"#0685FF"},600:{value:"#0066CC"},700:{value:"#004D99"},800:{value:"#003366"},900:{value:"#001A33"},gradient:{value:"#1A8FFF"}},purple:{50:{value:"#F9F0FF"},100:{value:"#EDD6FF"},200:{value:"#D9AAFF"},300:{value:"#BB77FF"},400:{value:"#9933FF"},500:{value:"#7700CC"},600:{value:"#5C00A3"},700:{value:"#44007A"},800:{value:"#2D0052"},900:{value:"#160029"}},neutralLight:{bg:{value:"#FEFEFE"},bg2:{value:"#F6F6F6"},surface:{value:"#F6F6F6"},white:{value:"#FFFFFF"},border:{value:"#E4E8F0"},muted:{value:"#9AAAB8"},heading:{value:"#111926"},body:{value:"#3D4F63"}},neutralDark:{bg:{value:"#0A1220"},bg2:{value:"#182337"},surface:{value:"#152035"},black:{value:"#000000"},border:{value:"#1E3050"},muted:{value:"#4A6480"},heading:{value:"#F0F6FF"},body:{value:"#ABC0D6"}},green:{50:{value:"#F0FDF4"},100:{value:"#DCFCE7"},500:{value:"#1B7A38"},600:{value:"#166534"}},amber:{50:{value:"#FFFBEB"},100:{value:"#FEF3C7"},500:{value:"#D97706"},600:{value:"#B45309"}},red:{50:{value:"#FFF1F2"},100:{value:"#FFE4E6"},200:{value:"#FECDD3"},500:{value:"#DC2626"},600:{value:"#B91C1C"}}},Te={fonts:{heading:{value:"'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"},body:{value:"'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"},mono:{value:"'JetBrains Mono', 'Fira Code', 'Fira Mono', monospace"}},fontSizes:{"2xs":{value:"0.625rem"},xs:{value:"0.6875rem"},sm:{value:"0.75rem"},md:{value:"0.875rem"},lg:{value:"1rem"},xl:{value:"1.125rem"},"2xl":{value:"1.3125rem"},"3xl":{value:"1.5rem"},"4xl":{value:"1.75rem"},"5xl":{value:"2.25rem"},"6xl":{value:"3.25rem"}},fontWeights:{normal:{value:"400"},medium:{value:"500"},semibold:{value:"600"},bold:{value:"700"}},lineHeights:{none:{value:"1"},tight:{value:"1.1"},snug:{value:"1.2"},normal:{value:"1.3"},relaxed:{value:"1.4"},loose:{value:"1.6"}},letterSpacings:{tight:{value:"-0.01em"},normal:{value:"0em"},wide:{value:"0.05em"},wider:{value:"0.1em"}}},Di={display:{value:{fontFamily:"var(--font-heading)",fontSize:"var(--font-size-6xl)",fontWeight:"var(--font-weight-bold)",lineHeight:"var(--line-height-tight)",letterSpacing:"var(--letter-spacing-tight)"}},h1:{value:{fontFamily:"var(--font-heading)",fontSize:"var(--font-size-5xl)",fontWeight:"var(--font-weight-semibold)",lineHeight:"var(--line-height-snug)",letterSpacing:"var(--letter-spacing-tight)"}},h2:{value:{fontFamily:"var(--font-heading)",fontSize:"var(--font-size-4xl)",fontWeight:"var(--font-weight-semibold)",lineHeight:"var(--line-height-normal)"}},h3:{value:{fontFamily:"var(--font-heading)",fontSize:"var(--font-size-2xl)",fontWeight:"var(--font-weight-medium)",lineHeight:"var(--line-height-relaxed)"}},body:{value:{fontFamily:"var(--font-body)",fontSize:"var(--font-size-md)",fontWeight:"var(--font-weight-normal)",lineHeight:"var(--line-height-loose)"}},small:{value:{fontFamily:"var(--font-body)",fontSize:"var(--font-size-sm)",fontWeight:"var(--font-weight-normal)",lineHeight:"var(--line-height-normal)"}},label:{value:{fontFamily:"var(--font-body)",fontSize:"var(--font-size-xs)",fontWeight:"var(--font-weight-medium)",letterSpacing:"var(--letter-spacing-wide)",textTransform:"uppercase"}},mono:{value:{fontFamily:"var(--font-mono)",fontSize:"var(--font-size-md)",fontWeight:"var(--font-weight-normal)"}}},Ei={0:{value:"0px"},1:{value:"4px"},2:{value:"8px"},3:{value:"12px"},4:{value:"16px"},6:{value:"24px"},8:{value:"32px"},12:{value:"48px"},16:{value:"64px"},20:{value:"80px"},24:{value:"96px"},32:{value:"128px"},40:{value:"160px"},48:{value:"192px"}},Pi={none:{value:"0px"},badge:{value:"4px"},sm:{value:"4px"},md:{value:"8px"},card:{value:"12px"},lg:{value:"12px"},modal:{value:"16px"},xl:{value:"16px"},"2xl":{value:"20px"},"3xl":{value:"24px"},full:{value:"9999px"},circle:{value:"50%"}},Mi={xs:{value:"0 1px 2px 0 rgba(0, 0, 0, 0.05)"},sm:{value:"0 1px 3px 0 rgba(0, 0, 0, 0.10), 0 1px 2px -1px rgba(0, 0, 0, 0.10)"},md:{value:"0 4px 6px -1px rgba(0, 0, 0, 0.10), 0 2px 4px -2px rgba(0, 0, 0, 0.10)"},lg:{value:"0 10px 15px -3px rgba(0, 0, 0, 0.10), 0 4px 6px -4px rgba(0, 0, 0, 0.10)"},xl:{value:"0 20px 25px -5px rgba(0, 0, 0, 0.10), 0 8px 10px -6px rgba(0, 0, 0, 0.10)"},"card-dark":{value:"0 4px 24px 0 rgba(0, 0, 0, 0.40)"},"card-light":{value:"0 2px 12px 0 rgba(17, 25, 38, 0.08)"},none:{value:"none"}},Ri=f.defineConfig({globalCss:{"html, body":{fontFamily:"var(--font-body)"},"*":{boxSizing:"border-box"}},theme:{tokens:{colors:{brand:{blue:ae.blue,purple:ae.purple,green:ae.green,amber:ae.amber,red:ae.red,neutralLight:ae.neutralLight,neutralDark:ae.neutralDark}},fonts:Te.fonts,fontSizes:Te.fontSizes,fontWeights:Te.fontWeights,lineHeights:Te.lineHeights,letterSpacings:Te.letterSpacings,spacing:Ei,radii:Pi,shadows:Mi},semanticTokens:{colors:{"brand.solid":{value:{base:"{colors.brand.blue.500}",_dark:"{colors.brand.blue.500}"}},"brand.muted":{value:{base:"{colors.brand.blue.100}",_dark:"{colors.brand.blue.900}"}},"brand.contrast":{value:{base:"#FFFFFF",_dark:"#FFFFFF"}},bg:{value:{base:"{colors.brand.neutralLight.bg}",_dark:"{colors.brand.neutralDark.bg}"}},"bg.subtle":{value:{base:"{colors.brand.neutralLight.bg2}",_dark:"{colors.brand.neutralDark.bg2}"}},"bg.surface":{value:{base:"{colors.brand.neutralLight.surface}",_dark:"{colors.brand.neutralDark.surface}"}},"text.heading":{value:{base:"{colors.brand.neutralLight.heading}",_dark:"{colors.brand.neutralDark.heading}"}},"text.body":{value:{base:"{colors.brand.neutralLight.body}",_dark:"{colors.brand.neutralDark.body}"}},"text.muted":{value:{base:"{colors.brand.neutralLight.muted}",_dark:"{colors.brand.neutralDark.muted}"}},border:{value:{base:"{colors.brand.neutralLight.border}",_dark:"{colors.brand.neutralDark.border}"}},"status.success":{value:{base:"{colors.brand.green.500}",_dark:"{colors.brand.green.500}"}},"status.success.tint":{value:{base:"{colors.brand.green.100}",_dark:"rgba(27, 122, 56, 0.2)"}},"status.warning":{value:{base:"{colors.brand.amber.500}",_dark:"{colors.brand.amber.500}"}},"status.warning.tint":{value:{base:"{colors.brand.amber.100}",_dark:"rgba(217, 119, 6, 0.2)"}},"status.error":{value:{base:"{colors.brand.red.500}",_dark:"{colors.brand.red.500}"}},"status.error.tint":{value:{base:"{colors.brand.red.100}",_dark:"rgba(220, 38, 38, 0.2)"}},blue:{50:{value:{base:"{colors.brand.blue.50}"}},100:{value:{base:"{colors.brand.blue.100}"}},200:{value:{base:"{colors.brand.blue.200}"}},300:{value:{base:"{colors.brand.blue.300}"}},400:{value:{base:"{colors.brand.blue.400}"}},500:{value:{base:"{colors.brand.blue.500}"}},600:{value:{base:"{colors.brand.blue.600}"}},700:{value:{base:"{colors.brand.blue.700}"}},800:{value:{base:"{colors.brand.blue.800}"}},900:{value:{base:"{colors.brand.blue.900}"}},solid:{value:{base:"{colors.brand.blue.500}"}},contrast:{value:{base:"#FFFFFF"}},muted:{value:{base:"{colors.brand.blue.100}",_dark:"{colors.brand.blue.900}"}},subtle:{value:{base:"{colors.brand.blue.50}",_dark:"rgba(6, 133, 255, 0.1)"}},emphasized:{value:{base:"{colors.brand.blue.100}",_dark:"{colors.brand.blue.800}"}},fg:{value:{base:"{colors.brand.blue.700}",_dark:"{colors.brand.blue.300}"}},focusRing:{value:{base:"{colors.brand.blue.500}"}}},purple:{50:{value:{base:"{colors.brand.purple.50}"}},100:{value:{base:"{colors.brand.purple.100}"}},500:{value:{base:"{colors.brand.purple.500}"}},600:{value:{base:"{colors.brand.purple.600}"}},solid:{value:{base:"{colors.brand.purple.500}"}},contrast:{value:{base:"#FFFFFF"}},muted:{value:{base:"{colors.brand.purple.100}",_dark:"{colors.brand.purple.900}"}},subtle:{value:{base:"{colors.brand.purple.50}",_dark:"rgba(119, 0, 204, 0.1)"}},emphasized:{value:{base:"{colors.brand.purple.100}"}},fg:{value:{base:"{colors.brand.purple.700}",_dark:"{colors.brand.purple.300}"}},focusRing:{value:{base:"{colors.brand.purple.500}"}}}}},textStyles:Di}}),Vi=f.createSystem(f.defaultConfig,Ri),na=["https://api.fontshare.com/v2/css?f[]=satoshi@400,500,600,700&display=swap","https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"],oa=`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),S=require("react"),f=require("@chakra-ui/react");function Yr(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const V=Yr(S);var Xr=(e,t,n,o,i,a,r,l)=>{let c=document.documentElement,u=["light","dark"];function d(m){(Array.isArray(e)?e:[e]).forEach(x=>{let g=x==="class",v=g&&a?i.map(b=>a[b]||b):i;g?(c.classList.remove(...v),c.classList.add(a&&a[m]?a[m]:m)):c.setAttribute(x,m)}),h(m)}function h(m){l&&u.includes(m)&&(c.style.colorScheme=m)}function p(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(o)d(o);else try{let m=localStorage.getItem(t)||n,x=r&&m==="system"?p():m;d(x)}catch{}},no=["light","dark"],Ai="(prefers-color-scheme: dark)",Zr=typeof window>"u",Cn=V.createContext(void 0),qr={setTheme:e=>{},themes:[]},Jr=()=>{var e;return(e=V.useContext(Cn))!=null?e:qr},Qr=e=>V.useContext(Cn)?V.createElement(V.Fragment,null,e.children):V.createElement(ta,{...e}),ea=["light","dark"],ta=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:n=!0,enableColorScheme:o=!0,storageKey:i="theme",themes:a=ea,defaultTheme:r=n?"system":"light",attribute:l="data-theme",value:c,children:u,nonce:d,scriptProps:h})=>{let[p,m]=V.useState(()=>oa(i,r)),[x,g]=V.useState(()=>p==="system"?Dt():p),v=c?Object.values(c):a,b=V.useCallback(C=>{let k=C;if(!k)return;C==="system"&&n&&(k=Dt());let D=c?c[k]:k,A=t?ia(d):null,F=document.documentElement,T=P=>{P==="class"?(F.classList.remove(...v),D&&F.classList.add(D)):P.startsWith("data-")&&(D?F.setAttribute(P,D):F.removeAttribute(P))};if(Array.isArray(l)?l.forEach(T):T(l),o){let P=no.includes(r)?r:null,E=no.includes(k)?k:P;F.style.colorScheme=E}A==null||A()},[d]),y=V.useCallback(C=>{let k=typeof C=="function"?C(p):C;m(k);try{localStorage.setItem(i,k)}catch{}},[p]),w=V.useCallback(C=>{let k=Dt(C);g(k),p==="system"&&n&&!e&&b("system")},[p,e]);V.useEffect(()=>{let C=window.matchMedia(Ai);return C.addListener(w),w(C),()=>C.removeListener(w)},[w]),V.useEffect(()=>{let C=k=>{k.key===i&&(k.newValue?m(k.newValue):y(r))};return window.addEventListener("storage",C),()=>window.removeEventListener("storage",C)},[y]),V.useEffect(()=>{b(e??p)},[e,p]);let j=V.useMemo(()=>({theme:p,setTheme:y,forcedTheme:e,resolvedTheme:p==="system"?x:p,themes:n?[...a,"system"]:a,systemTheme:n?x:void 0}),[p,y,e,x,n,a]);return V.createElement(Cn.Provider,{value:j},V.createElement(na,{forcedTheme:e,storageKey:i,attribute:l,enableSystem:n,enableColorScheme:o,defaultTheme:r,value:c,themes:a,nonce:d,scriptProps:h}),u)},na=V.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:o,enableColorScheme:i,defaultTheme:a,value:r,themes:l,nonce:c,scriptProps:u})=>{let d=JSON.stringify([n,t,a,e,l,r,o,i]).slice(1,-1);return V.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?c:"",dangerouslySetInnerHTML:{__html:`(${Xr.toString()})(${d})`}})}),oa=(e,t)=>{if(Zr)return;let n;try{n=localStorage.getItem(e)||void 0}catch{}return n||t},ia=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},Dt=e=>(e||(e=window.matchMedia(Ai)),e.matches?"dark":"light");const ae={blue:{50:{value:"#E8F3FF"},100:{value:"#D6EEFF"},200:{value:"#A8D4FF"},300:{value:"#70B6FF"},400:{value:"#3D98FF"},500:{value:"#0685FF"},600:{value:"#0066CC"},700:{value:"#004D99"},800:{value:"#003366"},900:{value:"#001A33"},gradient:{value:"#1A8FFF"}},purple:{50:{value:"#F9F0FF"},100:{value:"#EDD6FF"},200:{value:"#D9AAFF"},300:{value:"#BB77FF"},400:{value:"#9933FF"},500:{value:"#7700CC"},600:{value:"#5C00A3"},700:{value:"#44007A"},800:{value:"#2D0052"},900:{value:"#160029"}},neutralLight:{bg:{value:"#FEFEFE"},bg2:{value:"#F6F6F6"},surface:{value:"#F6F6F6"},white:{value:"#FFFFFF"},border:{value:"#E4E8F0"},muted:{value:"#9AAAB8"},heading:{value:"#111926"},body:{value:"#3D4F63"}},neutralDark:{bg:{value:"#0A1220"},bg2:{value:"#182337"},surface:{value:"#152035"},black:{value:"#000000"},border:{value:"#1E3050"},muted:{value:"#4A6480"},heading:{value:"#F0F6FF"},body:{value:"#ABC0D6"}},green:{50:{value:"#F0FDF4"},100:{value:"#DCFCE7"},500:{value:"#1B7A38"},600:{value:"#166534"}},amber:{50:{value:"#FFFBEB"},100:{value:"#FEF3C7"},500:{value:"#D97706"},600:{value:"#B45309"}},red:{50:{value:"#FFF1F2"},100:{value:"#FFE4E6"},200:{value:"#FECDD3"},500:{value:"#DC2626"},600:{value:"#B91C1C"}}},Fe={fonts:{heading:{value:"'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"},body:{value:"'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"},mono:{value:"'JetBrains Mono', 'Fira Code', 'Fira Mono', monospace"}},fontSizes:{"2xs":{value:"0.625rem"},xs:{value:"0.6875rem"},sm:{value:"0.75rem"},md:{value:"0.875rem"},lg:{value:"1rem"},xl:{value:"1.125rem"},"2xl":{value:"1.3125rem"},"3xl":{value:"1.5rem"},"4xl":{value:"1.75rem"},"5xl":{value:"2.25rem"},"6xl":{value:"3.25rem"}},fontWeights:{normal:{value:"400"},medium:{value:"500"},semibold:{value:"600"},bold:{value:"700"}},lineHeights:{none:{value:"1"},tight:{value:"1.1"},snug:{value:"1.2"},normal:{value:"1.3"},relaxed:{value:"1.4"},loose:{value:"1.6"}},letterSpacings:{tight:{value:"-0.01em"},normal:{value:"0em"},wide:{value:"0.05em"},wider:{value:"0.1em"}}},Di={display:{value:{fontFamily:"var(--font-heading)",fontSize:"var(--font-size-6xl)",fontWeight:"var(--font-weight-bold)",lineHeight:"var(--line-height-tight)",letterSpacing:"var(--letter-spacing-tight)"}},h1:{value:{fontFamily:"var(--font-heading)",fontSize:"var(--font-size-5xl)",fontWeight:"var(--font-weight-semibold)",lineHeight:"var(--line-height-snug)",letterSpacing:"var(--letter-spacing-tight)"}},h2:{value:{fontFamily:"var(--font-heading)",fontSize:"var(--font-size-4xl)",fontWeight:"var(--font-weight-semibold)",lineHeight:"var(--line-height-normal)"}},h3:{value:{fontFamily:"var(--font-heading)",fontSize:"var(--font-size-2xl)",fontWeight:"var(--font-weight-medium)",lineHeight:"var(--line-height-relaxed)"}},body:{value:{fontFamily:"var(--font-body)",fontSize:"var(--font-size-md)",fontWeight:"var(--font-weight-normal)",lineHeight:"var(--line-height-loose)"}},small:{value:{fontFamily:"var(--font-body)",fontSize:"var(--font-size-sm)",fontWeight:"var(--font-weight-normal)",lineHeight:"var(--line-height-normal)"}},label:{value:{fontFamily:"var(--font-body)",fontSize:"var(--font-size-xs)",fontWeight:"var(--font-weight-medium)",letterSpacing:"var(--letter-spacing-wide)",textTransform:"uppercase"}},mono:{value:{fontFamily:"var(--font-mono)",fontSize:"var(--font-size-md)",fontWeight:"var(--font-weight-normal)"}}},Pi={0:{value:"0px"},1:{value:"4px"},2:{value:"8px"},3:{value:"12px"},4:{value:"16px"},6:{value:"24px"},8:{value:"32px"},12:{value:"48px"},16:{value:"64px"},20:{value:"80px"},24:{value:"96px"},32:{value:"128px"},40:{value:"160px"},48:{value:"192px"}},Ei={none:{value:"0px"},badge:{value:"4px"},sm:{value:"4px"},md:{value:"8px"},card:{value:"12px"},lg:{value:"12px"},modal:{value:"16px"},xl:{value:"16px"},"2xl":{value:"20px"},"3xl":{value:"24px"},full:{value:"9999px"},circle:{value:"50%"}},Mi={xs:{value:"0 1px 2px 0 rgba(0, 0, 0, 0.05)"},sm:{value:"0 1px 3px 0 rgba(0, 0, 0, 0.10), 0 1px 2px -1px rgba(0, 0, 0, 0.10)"},md:{value:"0 4px 6px -1px rgba(0, 0, 0, 0.10), 0 2px 4px -2px rgba(0, 0, 0, 0.10)"},lg:{value:"0 10px 15px -3px rgba(0, 0, 0, 0.10), 0 4px 6px -4px rgba(0, 0, 0, 0.10)"},xl:{value:"0 20px 25px -5px rgba(0, 0, 0, 0.10), 0 8px 10px -6px rgba(0, 0, 0, 0.10)"},"card-dark":{value:"0 4px 24px 0 rgba(0, 0, 0, 0.40)"},"card-light":{value:"0 2px 12px 0 rgba(17, 25, 38, 0.08)"},none:{value:"none"}},Ri=f.defineConfig({globalCss:{"html, body":{fontFamily:"var(--font-body)"},"*":{boxSizing:"border-box"}},theme:{tokens:{colors:{brand:{blue:ae.blue,purple:ae.purple,green:ae.green,amber:ae.amber,red:ae.red,neutralLight:ae.neutralLight,neutralDark:ae.neutralDark}},fonts:Fe.fonts,fontSizes:Fe.fontSizes,fontWeights:Fe.fontWeights,lineHeights:Fe.lineHeights,letterSpacings:Fe.letterSpacings,spacing:Pi,radii:Ei,shadows:Mi},semanticTokens:{colors:{"brand.solid":{value:{base:"{colors.brand.blue.500}",_dark:"{colors.brand.blue.500}"}},"brand.muted":{value:{base:"{colors.brand.blue.100}",_dark:"{colors.brand.blue.900}"}},"brand.contrast":{value:{base:"#FFFFFF",_dark:"#FFFFFF"}},bg:{value:{base:"{colors.brand.neutralLight.bg}",_dark:"{colors.brand.neutralDark.bg}"}},"bg.subtle":{value:{base:"{colors.brand.neutralLight.bg2}",_dark:"{colors.brand.neutralDark.bg2}"}},"bg.surface":{value:{base:"{colors.brand.neutralLight.surface}",_dark:"{colors.brand.neutralDark.surface}"}},"text.heading":{value:{base:"{colors.brand.neutralLight.heading}",_dark:"{colors.brand.neutralDark.heading}"}},"text.body":{value:{base:"{colors.brand.neutralLight.body}",_dark:"{colors.brand.neutralDark.body}"}},"text.muted":{value:{base:"{colors.brand.neutralLight.muted}",_dark:"{colors.brand.neutralDark.muted}"}},border:{value:{base:"{colors.brand.neutralLight.border}",_dark:"{colors.brand.neutralDark.border}"}},"status.success":{value:{base:"{colors.brand.green.500}",_dark:"{colors.brand.green.500}"}},"status.success.tint":{value:{base:"{colors.brand.green.100}",_dark:"rgba(27, 122, 56, 0.2)"}},"status.warning":{value:{base:"{colors.brand.amber.500}",_dark:"{colors.brand.amber.500}"}},"status.warning.tint":{value:{base:"{colors.brand.amber.100}",_dark:"rgba(217, 119, 6, 0.2)"}},"status.error":{value:{base:"{colors.brand.red.500}",_dark:"{colors.brand.red.500}"}},"status.error.tint":{value:{base:"{colors.brand.red.100}",_dark:"rgba(220, 38, 38, 0.2)"}},blue:{50:{value:{base:"{colors.brand.blue.50}"}},100:{value:{base:"{colors.brand.blue.100}"}},200:{value:{base:"{colors.brand.blue.200}"}},300:{value:{base:"{colors.brand.blue.300}"}},400:{value:{base:"{colors.brand.blue.400}"}},500:{value:{base:"{colors.brand.blue.500}"}},600:{value:{base:"{colors.brand.blue.600}"}},700:{value:{base:"{colors.brand.blue.700}"}},800:{value:{base:"{colors.brand.blue.800}"}},900:{value:{base:"{colors.brand.blue.900}"}},solid:{value:{base:"{colors.brand.blue.500}"}},contrast:{value:{base:"#FFFFFF"}},muted:{value:{base:"{colors.brand.blue.100}",_dark:"{colors.brand.blue.900}"}},subtle:{value:{base:"{colors.brand.blue.50}",_dark:"rgba(6, 133, 255, 0.1)"}},emphasized:{value:{base:"{colors.brand.blue.100}",_dark:"{colors.brand.blue.800}"}},fg:{value:{base:"{colors.brand.blue.700}",_dark:"{colors.brand.blue.300}"}},focusRing:{value:{base:"{colors.brand.blue.500}"}}},purple:{50:{value:{base:"{colors.brand.purple.50}"}},100:{value:{base:"{colors.brand.purple.100}"}},500:{value:{base:"{colors.brand.purple.500}"}},600:{value:{base:"{colors.brand.purple.600}"}},solid:{value:{base:"{colors.brand.purple.500}"}},contrast:{value:{base:"#FFFFFF"}},muted:{value:{base:"{colors.brand.purple.100}",_dark:"{colors.brand.purple.900}"}},subtle:{value:{base:"{colors.brand.purple.50}",_dark:"rgba(119, 0, 204, 0.1)"}},emphasized:{value:{base:"{colors.brand.purple.100}"}},fg:{value:{base:"{colors.brand.purple.700}",_dark:"{colors.brand.purple.300}"}},focusRing:{value:{base:"{colors.brand.purple.500}"}}}}},textStyles:Di}}),Vi=f.createSystem(f.defaultConfig,Ri),sa=["https://api.fontshare.com/v2/css?f[]=satoshi@400,500,600,700&display=swap","https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"],ra=`
|
|
2
2
|
/* ── Font custom properties ─────────────────────────────────────────────── */
|
|
3
3
|
:root {
|
|
4
4
|
--font-heading: 'Satoshi', 'Inter', -apple-system, BlinkMacSystemFont,
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
@keyframes medix-spin {
|
|
57
57
|
to { transform: rotate(360deg); }
|
|
58
58
|
}
|
|
59
|
-
`;let no=!1,oo=!1;function ia(){if(typeof document>"u"||no)return;["https://api.fontshare.com","https://fonts.googleapis.com","https://fonts.gstatic.com"].forEach(t=>{if(document.head.querySelector(`link[href="${t}"]`))return;const n=document.createElement("link");n.rel="preconnect",n.href=t,t.includes("gstatic")&&(n.crossOrigin="anonymous"),document.head.appendChild(n)}),na.forEach(t=>{if(document.head.querySelector(`link[href="${t}"]`))return;const n=document.createElement("link");n.rel="stylesheet",n.href=t,document.head.appendChild(n)}),no=!0}function sa(){if(typeof document>"u"||oo)return;const e=document.createElement("style");e.setAttribute("data-medixdeck","global"),e.textContent=oa,document.head.insertBefore(e,document.head.firstChild),oo=!0}function ra({children:e,defaultColorMode:t="system",forcedColorMode:n}){return w.useEffect(()=>{ia(),sa()},[]),a.jsx(Zr,{attribute:"class",defaultTheme:t,forcedTheme:n,disableTransitionOnChange:!0,children:a.jsx(f.ChakraProvider,{value:Vi,children:e})})}const io={blue:{solid:"#0685FF",solidHover:"#0575E6",solidActive:"#0562C2",tint:"#E8F3FF",tintHover:"#D6EEFF",fg:"#0685FF",fgHover:"#0562C2"},purple:{solid:"#7700CC",solidHover:"#6600B3",solidActive:"#550099",tint:"#F9F0FF",tintHover:"#EDD6FF",fg:"#7700CC",fgHover:"#550099"},green:{solid:"#1B7A38",solidHover:"#166530",solidActive:"#125429",tint:"#F0FDF4",tintHover:"#DCFCE7",fg:"#1B7A38",fgHover:"#125429"},red:{solid:"#DC2626",solidHover:"#C41F1F",solidActive:"#AC1919",tint:"#FFF1F2",tintHover:"#FFE4E6",fg:"#DC2626",fgHover:"#AC1919"},amber:{solid:"#D97706",solidHover:"#C26905",solidActive:"#A85B04",tint:"#FFFBEB",tintHover:"#FEF3C7",fg:"#D97706",fgHover:"#A85B04"},black:{solid:"#111926",solidHover:"#0D131D",solidActive:"#000000",tint:"#F3F4F6",tintHover:"#E5E7EB",fg:"#111926",fgHover:"#000000"},gray:{solid:"#4B5563",solidHover:"#374151",solidActive:"#1F2937",tint:"#F9FAFB",tintHover:"#F3F4F6",fg:"#4B5563",fgHover:"#1F2937"}},so={xs:{height:"28px",px:"12px",fontSize:"11px"},sm:{height:"32px",px:"14px",fontSize:"13px"},md:{height:"40px",px:"18px",fontSize:"14px"},lg:{height:"48px",px:"24px",fontSize:"16px"}},we=w.forwardRef(({variant:e="solid",size:t="md",colorScheme:n="blue",isLoading:o=!1,leftIcon:i,rightIcon:r,disabled:s,children:l,style:c,...u},d)=>{const h=io[n]||io.blue,p=so[t]||so.md,m={display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"0.4rem",height:p.height,paddingLeft:p.px,paddingRight:p.px,fontSize:p.fontSize,fontWeight:600,fontFamily:"var(--font-body)",borderRadius:8,border:"none",cursor:s||o?"not-allowed":"pointer",opacity:s||o?.55:1,outline:"none",textDecoration:"none",whiteSpace:"nowrap",userSelect:"none",WebkitTapHighlightColor:"transparent",transition:"background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease"};let x={};switch(e){case"solid":x={background:h.solid,color:"#FFFFFF"};break;case"outline":x={background:"transparent",color:h.fg,border:`1.5px solid ${h.solid}`};break;case"ghost":x={background:"transparent",color:h.fg,border:"none"};break;case"secondary":x={background:h.tint,color:h.fg,border:"none"};break;case"link":x={background:"transparent",color:h.fg,border:"none",padding:0,height:"auto",fontSize:p.fontSize,textDecoration:"underline",textUnderlineOffset:"3px"};break}const[g,b]=w.useState(!1),[y,v]=w.useState(!1);let S={};if((g||y)&&!s&&!o)switch(e){case"solid":S={background:y?h.solidActive:h.solidHover,boxShadow:y?"none":"0 4px 14px rgba(0,0,0,0.18)"};break;case"outline":S={background:h.tint,color:h.fgHover};break;case"ghost":S={background:h.tint};break;case"secondary":S={background:h.tintHover};break;case"link":S={color:h.fgHover};break}const C={...m,...x,...S,...c};return a.jsx("button",{ref:d,type:u.type??"button",disabled:s||o,style:C,onMouseEnter:()=>b(!0),onMouseLeave:()=>{b(!1),v(!1)},onMouseDown:()=>v(!0),onMouseUp:()=>v(!1),onFocus:j=>{j.currentTarget.style.boxShadow=`0 0 0 2px #FFFFFF, 0 0 0 4px ${h.solid}`},onBlur:j=>{j.currentTarget.style.boxShadow=S.boxShadow??x.boxShadow??"none"},...u,children:o?a.jsx(f.Box,{as:"span",display:"inline-block",w:"1em",h:"1em",borderRadius:"full",border:"2px solid currentColor",borderTopColor:"transparent",style:{animation:"medix-spin 0.65s linear infinite"}}):a.jsxs(a.Fragment,{children:[i&&a.jsx("span",{style:{display:"inline-flex",flexShrink:0},children:i}),l,r&&a.jsx("span",{style:{display:"inline-flex",flexShrink:0},children:r})]})})});we.displayName="MedixButton";const aa={blue:{solid:"#0685FF",solidHover:"#0575E6",solidActive:"#0562C2",tint:"#E8F3FF",tintHover:"#D6EEFF",fg:"#0685FF"},purple:{solid:"#7700CC",solidHover:"#6600B3",solidActive:"#550099",tint:"#F9F0FF",tintHover:"#EDD6FF",fg:"#7700CC"},green:{solid:"#1B7A38",solidHover:"#166530",solidActive:"#125429",tint:"#F0FDF4",tintHover:"#DCFCE7",fg:"#1B7A38"},red:{solid:"#DC2626",solidHover:"#C41F1F",solidActive:"#AC1919",tint:"#FFF1F2",tintHover:"#FFE4E6",fg:"#DC2626"},gray:{solid:"#6B7280",solidHover:"#4B5563",solidActive:"#374151",tint:"#F3F4F6",tintHover:"#E5E7EB",fg:"#374151"}},la={xs:{width:24,height:24,fontSize:12,borderRadius:6},sm:{width:28,height:28,fontSize:14,borderRadius:6},md:{width:36,height:36,fontSize:16,borderRadius:8},lg:{width:44,height:44,fontSize:18,borderRadius:8}},Li=w.forwardRef(({variant:e="ghost",size:t="md",colorScheme:n="blue",isRound:o=!1,disabled:i,children:r,style:s,...l},c)=>{const u=aa[n],d=la[t],[h,p]=w.useState(!1),[m,x]=w.useState(!1);let g;switch(e){case"solid":g={background:h?m?u.solidActive:u.solidHover:u.solid,color:"#fff"};break;case"outline":g={background:h?u.tint:"transparent",color:u.fg,border:`1.5px solid ${u.solid}`};break;case"ghost":default:g={background:h?u.tint:"transparent",color:u.fg};break}return a.jsx("button",{ref:c,type:l.type??"button",disabled:i,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",border:"none",cursor:i?"not-allowed":"pointer",opacity:i?.55:1,outline:"none",flexShrink:0,transition:"background 0.15s ease, box-shadow 0.15s ease",...d,...o?{borderRadius:"50%"}:{},...g,...s},onMouseEnter:()=>p(!0),onMouseLeave:()=>{p(!1),x(!1)},onMouseDown:()=>x(!0),onMouseUp:()=>x(!1),onFocus:b=>{b.currentTarget.style.boxShadow=`0 0 0 2px #fff, 0 0 0 4px ${u.solid}`},onBlur:b=>{b.currentTarget.style.boxShadow="none"},...l,children:r})});Li.displayName="MedixIconButton";const ca={success:{solid:"#1B7A38",solidText:"#fff",tint:"#DCFCE7",tintText:"#1B7A38",border:"#1B7A38"},warning:{solid:"#D97706",solidText:"#fff",tint:"#FEF3C7",tintText:"#B45309",border:"#D97706"},error:{solid:"#DC2626",solidText:"#fff",tint:"#FFE4E6",tintText:"#B91C1C",border:"#DC2626"},info:{solid:"#0685FF",solidText:"#fff",tint:"#E8F3FF",tintText:"#0562C2",border:"#0685FF"},neutral:{solid:"#6B7280",solidText:"#fff",tint:"#F3F4F6",tintText:"#374151",border:"#9CA3AF"}},da={sm:{padding:"1px 6px",fontSize:10,lineHeight:"18px"},md:{padding:"2px 8px",fontSize:11,lineHeight:"20px"},lg:{padding:"3px 10px",fontSize:12,lineHeight:"22px"}},jt=w.forwardRef(({variant:e="subtle",status:t="neutral",size:n="md",children:o,style:i,...r},s)=>{const l=ca[t],c=da[n];let u,d,h="1px solid transparent";switch(e){case"solid":u=l.solid,d=l.solidText;break;case"outline":u="transparent",d=l.tintText,h=`1px solid ${l.border}`;break;case"surface":u=l.tint,d=l.tintText,h=`1px solid ${l.border}20`;break;case"subtle":default:u=l.tint,d=l.tintText;break}const p={display:"inline-flex",alignItems:"center",justifyContent:"center",fontFamily:"var(--font-body)",fontWeight:500,letterSpacing:"0.03em",textTransform:"none",borderRadius:4,border:h,background:u,color:d,whiteSpace:"nowrap",...c,...i};return a.jsx("span",{ref:s,style:p,...r,children:o})});jt.displayName="MedixBadge";const Ii={xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"xl","2xl":"2xl"},Sn=w.forwardRef(({src:e,name:t,size:n="md",showStatus:o=!1,statusColor:i="green",...r},s)=>a.jsxs(f.Avatar.Root,{ref:s,size:Ii[n],position:"relative",...r,children:[a.jsx(f.Avatar.Fallback,{name:t,bg:"blue.500",color:"white",fontFamily:"var(--font-body)"}),e&&a.jsx(f.Avatar.Image,{src:e,alt:t??""}),o&&a.jsx(f.Box,{position:"absolute",bottom:"0",right:"0",w:"3",h:"3",bg:i,borderRadius:"full",border:"2px solid",borderColor:"bg"})]}));Sn.displayName="MedixAvatar";function ua({children:e,max:t,size:n="md"}){const o=w.Children.toArray(e),i=t?o.slice(0,t):o,r=t?Math.max(0,o.length-t):0,s=Ii[n];return a.jsxs(f.Box,{display:"flex",alignItems:"center",children:[i.map((l,c)=>a.jsx(f.Box,{ml:c===0?"0":"-2",position:"relative",zIndex:i.length-c,children:w.isValidElement(l)?w.cloneElement(l,{size:n}):l},c)),r>0&&a.jsxs(f.Box,{ml:"-2",w:s==="sm"?"8":s==="lg"?"12":"10",h:s==="sm"?"8":s==="lg"?"12":"10",borderRadius:"full",bg:"bg.surface",border:"2px solid",borderColor:"border",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"xs",fontWeight:"medium",color:"text.muted",children:["+",r]})]})}function zi({size:e="md",label:t,color:n="blue.500",...o}){return a.jsxs(f.Box,{display:"inline-flex",flexDirection:"column",alignItems:"center",gap:"2",children:[a.jsx(f.Spinner,{size:e,color:n,borderWidth:"2px",...o}),t&&a.jsx(f.Text,{textStyle:"small",color:"text.muted",children:t})]})}function fa({label:e}){return a.jsx(f.Box,{position:"fixed",inset:"0",display:"flex",alignItems:"center",justifyContent:"center",bg:"bg",zIndex:"overlay",children:a.jsx(zi,{size:"xl",label:e??"Loading…"})})}const Oi=w.forwardRef(({variant:e="subtle",colorScheme:t="blue",onClose:n,children:o,...i},r)=>a.jsxs(f.Box,{ref:r,as:"span",display:"inline-flex",alignItems:"center",gap:"1",px:"2.5",py:"1",borderRadius:"full",fontSize:"xs",fontWeight:"medium",fontFamily:"var(--font-body)",border:"1px solid",borderColor:e==="outline"?`${t}.400`:"transparent",bg:e==="solid"?`${t}.500`:e==="subtle"?`${t}.100`:"transparent",color:e==="solid"?"white":`${t}.700`,transition:"all 0.15s",cursor:n?"default":void 0,...i,children:[o,n&&a.jsx(f.Box,{as:"button",onClick:n,ml:"1",opacity:.7,_hover:{opacity:1},lineHeight:"1",fontSize:"md",cursor:"pointer",border:"none",bg:"transparent",padding:"0",display:"inline-flex",alignItems:"center",children:"×"})]}));Oi.displayName="MedixTag";const Wi=w.forwardRef(({orientation:e="horizontal",label:t,...n},o)=>t?a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",width:"100%"},children:[a.jsx("div",{style:{flex:1,height:"1px",background:"var(--chakra-colors-border)"}}),a.jsx("span",{style:{fontSize:"var(--chakra-font-sizes-sm)",color:"var(--chakra-colors-text-muted)",whiteSpace:"nowrap",fontFamily:"var(--font-body)"},children:t}),a.jsx("div",{style:{flex:1,height:"1px",background:"var(--chakra-colors-border)"}})]}):a.jsx(f.Separator,{ref:o,orientation:e,borderColor:"border",...n}));Wi.displayName="MedixDivider";const ha={blue:"#0685FF",purple:"#7700CC",black:"#111926",white:"#FFFFFF"},pa={blue:"#111926",purple:"#111926",black:"#111926",white:"#FFFFFF"},ma={blue:"#FFFFFF",purple:"#FFFFFF",black:"#111926",white:"#FFFFFF"};function ro(){return typeof document>"u"?!1:document.documentElement.classList.contains("dark")}function xa(){const[e,t]=w.useState(ro);return w.useEffect(()=>{const n=document.documentElement,o=new MutationObserver(()=>t(ro()));return o.observe(n,{attributeFilter:["class"]}),()=>o.disconnect()},[]),e}function ga({color:e,height:t}){return a.jsx("svg",{width:t,height:t,viewBox:"0 0 532 532",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",style:{display:"block",flexShrink:0},children:a.jsx("g",{children:a.jsx("path",{d:`
|
|
59
|
+
`;let oo=!1,io=!1;function aa(){if(typeof document>"u"||oo)return;["https://api.fontshare.com","https://fonts.googleapis.com","https://fonts.gstatic.com"].forEach(t=>{if(document.head.querySelector(`link[href="${t}"]`))return;const n=document.createElement("link");n.rel="preconnect",n.href=t,t.includes("gstatic")&&(n.crossOrigin="anonymous"),document.head.appendChild(n)}),sa.forEach(t=>{if(document.head.querySelector(`link[href="${t}"]`))return;const n=document.createElement("link");n.rel="stylesheet",n.href=t,document.head.appendChild(n)}),oo=!0}function la(){if(typeof document>"u"||io)return;const e=document.createElement("style");e.setAttribute("data-medixdeck","global"),e.textContent=ra,document.head.insertBefore(e,document.head.firstChild),io=!0}function ca({children:e,defaultColorMode:t="system",forcedColorMode:n}){return S.useEffect(()=>{aa(),la()},[]),s.jsx(Qr,{attribute:"class",defaultTheme:t,forcedTheme:n,disableTransitionOnChange:!0,children:s.jsx(f.ChakraProvider,{value:Vi,children:e})})}const so={blue:{solid:"#0685FF",solidHover:"#0575E6",solidActive:"#0562C2",tint:"#E8F3FF",tintHover:"#D6EEFF",fg:"#0685FF",fgHover:"#0562C2"},purple:{solid:"#7700CC",solidHover:"#6600B3",solidActive:"#550099",tint:"#F9F0FF",tintHover:"#EDD6FF",fg:"#7700CC",fgHover:"#550099"},green:{solid:"#1B7A38",solidHover:"#166530",solidActive:"#125429",tint:"#F0FDF4",tintHover:"#DCFCE7",fg:"#1B7A38",fgHover:"#125429"},red:{solid:"#DC2626",solidHover:"#C41F1F",solidActive:"#AC1919",tint:"#FFF1F2",tintHover:"#FFE4E6",fg:"#DC2626",fgHover:"#AC1919"},amber:{solid:"#D97706",solidHover:"#C26905",solidActive:"#A85B04",tint:"#FFFBEB",tintHover:"#FEF3C7",fg:"#D97706",fgHover:"#A85B04"},black:{solid:"#111926",solidHover:"#0D131D",solidActive:"#000000",tint:"#F3F4F6",tintHover:"#E5E7EB",fg:"#111926",fgHover:"#000000"},gray:{solid:"#4B5563",solidHover:"#374151",solidActive:"#1F2937",tint:"#F9FAFB",tintHover:"#F3F4F6",fg:"#4B5563",fgHover:"#1F2937"}},ro={xs:{height:"28px",px:"12px",fontSize:"11px"},sm:{height:"32px",px:"14px",fontSize:"13px"},md:{height:"40px",px:"18px",fontSize:"14px"},lg:{height:"48px",px:"24px",fontSize:"16px"}},we=S.forwardRef(({variant:e="solid",size:t="md",colorScheme:n="blue",isLoading:o=!1,leftIcon:i,rightIcon:a,disabled:r,children:l,style:c,...u},d)=>{const h=so[n]||so.blue,p=ro[t]||ro.md,m={display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"0.4rem",height:p.height,paddingLeft:p.px,paddingRight:p.px,fontSize:p.fontSize,fontWeight:600,fontFamily:"var(--font-body)",borderRadius:8,border:"none",cursor:r||o?"not-allowed":"pointer",opacity:r||o?.55:1,outline:"none",textDecoration:"none",whiteSpace:"nowrap",userSelect:"none",WebkitTapHighlightColor:"transparent",transition:"background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease"};let x={};switch(e){case"solid":x={background:h.solid,color:"#FFFFFF"};break;case"outline":x={background:"transparent",color:h.fg,border:`1.5px solid ${h.solid}`};break;case"ghost":x={background:"transparent",color:h.fg,border:"none"};break;case"secondary":x={background:h.tint,color:h.fg,border:"none"};break;case"link":x={background:"transparent",color:h.fg,border:"none",padding:0,height:"auto",fontSize:p.fontSize,textDecoration:"underline",textUnderlineOffset:"3px"};break}const[g,v]=S.useState(!1),[b,y]=S.useState(!1);let w={};if((g||b)&&!r&&!o)switch(e){case"solid":w={background:b?h.solidActive:h.solidHover,boxShadow:b?"none":"0 4px 14px rgba(0,0,0,0.18)"};break;case"outline":w={background:h.tint,color:h.fgHover};break;case"ghost":w={background:h.tint};break;case"secondary":w={background:h.tintHover};break;case"link":w={color:h.fgHover};break}const j={...m,...x,...w,...c};return s.jsx("button",{ref:d,type:u.type??"button",disabled:r||o,style:j,onMouseEnter:()=>v(!0),onMouseLeave:()=>{v(!1),y(!1)},onMouseDown:()=>y(!0),onMouseUp:()=>y(!1),onFocus:C=>{C.currentTarget.style.boxShadow=`0 0 0 2px #FFFFFF, 0 0 0 4px ${h.solid}`},onBlur:C=>{C.currentTarget.style.boxShadow=w.boxShadow??x.boxShadow??"none"},...u,children:o?s.jsx(f.Box,{as:"span",display:"inline-block",w:"1em",h:"1em",borderRadius:"full",border:"2px solid currentColor",borderTopColor:"transparent",style:{animation:"medix-spin 0.65s linear infinite"}}):s.jsxs(s.Fragment,{children:[i&&s.jsx("span",{style:{display:"inline-flex",flexShrink:0},children:i}),l,a&&s.jsx("span",{style:{display:"inline-flex",flexShrink:0},children:a})]})})});we.displayName="MedixButton";const da={blue:{solid:"#0685FF",solidHover:"#0575E6",solidActive:"#0562C2",tint:"#E8F3FF",tintHover:"#D6EEFF",fg:"#0685FF"},purple:{solid:"#7700CC",solidHover:"#6600B3",solidActive:"#550099",tint:"#F9F0FF",tintHover:"#EDD6FF",fg:"#7700CC"},green:{solid:"#1B7A38",solidHover:"#166530",solidActive:"#125429",tint:"#F0FDF4",tintHover:"#DCFCE7",fg:"#1B7A38"},red:{solid:"#DC2626",solidHover:"#C41F1F",solidActive:"#AC1919",tint:"#FFF1F2",tintHover:"#FFE4E6",fg:"#DC2626"},gray:{solid:"#6B7280",solidHover:"#4B5563",solidActive:"#374151",tint:"#F3F4F6",tintHover:"#E5E7EB",fg:"#374151"}},ua={xs:{width:24,height:24,fontSize:12,borderRadius:6},sm:{width:28,height:28,fontSize:14,borderRadius:6},md:{width:36,height:36,fontSize:16,borderRadius:8},lg:{width:44,height:44,fontSize:18,borderRadius:8}},Li=S.forwardRef(({variant:e="ghost",size:t="md",colorScheme:n="blue",isRound:o=!1,disabled:i,children:a,style:r,...l},c)=>{const u=da[n],d=ua[t],[h,p]=S.useState(!1),[m,x]=S.useState(!1);let g;switch(e){case"solid":g={background:h?m?u.solidActive:u.solidHover:u.solid,color:"#fff"};break;case"outline":g={background:h?u.tint:"transparent",color:u.fg,border:`1.5px solid ${u.solid}`};break;case"ghost":default:g={background:h?u.tint:"transparent",color:u.fg};break}return s.jsx("button",{ref:c,type:l.type??"button",disabled:i,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",border:"none",cursor:i?"not-allowed":"pointer",opacity:i?.55:1,outline:"none",flexShrink:0,transition:"background 0.15s ease, box-shadow 0.15s ease",...d,...o?{borderRadius:"50%"}:{},...g,...r},onMouseEnter:()=>p(!0),onMouseLeave:()=>{p(!1),x(!1)},onMouseDown:()=>x(!0),onMouseUp:()=>x(!1),onFocus:v=>{v.currentTarget.style.boxShadow=`0 0 0 2px #fff, 0 0 0 4px ${u.solid}`},onBlur:v=>{v.currentTarget.style.boxShadow="none"},...l,children:a})});Li.displayName="MedixIconButton";const fa={success:{solid:"#1B7A38",solidText:"#fff",tint:"#DCFCE7",tintText:"#1B7A38",border:"#1B7A38"},warning:{solid:"#D97706",solidText:"#fff",tint:"#FEF3C7",tintText:"#B45309",border:"#D97706"},error:{solid:"#DC2626",solidText:"#fff",tint:"#FFE4E6",tintText:"#B91C1C",border:"#DC2626"},info:{solid:"#0685FF",solidText:"#fff",tint:"#E8F3FF",tintText:"#0562C2",border:"#0685FF"},neutral:{solid:"#6B7280",solidText:"#fff",tint:"#F3F4F6",tintText:"#374151",border:"#9CA3AF"}},ha={sm:{padding:"1px 6px",fontSize:10,lineHeight:"18px"},md:{padding:"2px 8px",fontSize:11,lineHeight:"20px"},lg:{padding:"3px 10px",fontSize:12,lineHeight:"22px"}},Ct=S.forwardRef(({variant:e="subtle",status:t="neutral",size:n="md",children:o,style:i,...a},r)=>{const l=fa[t],c=ha[n];let u,d,h="1px solid transparent";switch(e){case"solid":u=l.solid,d=l.solidText;break;case"outline":u="transparent",d=l.tintText,h=`1px solid ${l.border}`;break;case"surface":u=l.tint,d=l.tintText,h=`1px solid ${l.border}20`;break;case"subtle":default:u=l.tint,d=l.tintText;break}const p={display:"inline-flex",alignItems:"center",justifyContent:"center",fontFamily:"var(--font-body)",fontWeight:500,letterSpacing:"0.03em",textTransform:"none",borderRadius:4,border:h,background:u,color:d,whiteSpace:"nowrap",...c,...i};return s.jsx("span",{ref:r,style:p,...a,children:o})});Ct.displayName="MedixBadge";const Ii={xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"xl","2xl":"2xl"},jn=S.forwardRef(({src:e,name:t,size:n="md",showStatus:o=!1,statusColor:i="green",...a},r)=>s.jsxs(f.Avatar.Root,{ref:r,size:Ii[n],position:"relative",...a,children:[s.jsx(f.Avatar.Fallback,{name:t,bg:"blue.500",color:"white",fontFamily:"var(--font-body)"}),e&&s.jsx(f.Avatar.Image,{src:e,alt:t??""}),o&&s.jsx(f.Box,{position:"absolute",bottom:"0",right:"0",w:"3",h:"3",bg:i,borderRadius:"full",border:"2px solid",borderColor:"bg"})]}));jn.displayName="MedixAvatar";function pa({children:e,max:t,size:n="md"}){const o=S.Children.toArray(e),i=t?o.slice(0,t):o,a=t?Math.max(0,o.length-t):0,r=Ii[n];return s.jsxs(f.Box,{display:"flex",alignItems:"center",children:[i.map((l,c)=>s.jsx(f.Box,{ml:c===0?"0":"-2",position:"relative",zIndex:i.length-c,children:S.isValidElement(l)?S.cloneElement(l,{size:n}):l},c)),a>0&&s.jsxs(f.Box,{ml:"-2",w:r==="sm"?"8":r==="lg"?"12":"10",h:r==="sm"?"8":r==="lg"?"12":"10",borderRadius:"full",bg:"bg.surface",border:"2px solid",borderColor:"border",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"xs",fontWeight:"medium",color:"text.muted",children:["+",a]})]})}function zi({size:e="md",label:t,color:n="blue.500",...o}){return s.jsxs(f.Box,{display:"inline-flex",flexDirection:"column",alignItems:"center",gap:"2",children:[s.jsx(f.Spinner,{size:e,color:n,borderWidth:"2px",...o}),t&&s.jsx(f.Text,{textStyle:"small",color:"text.muted",children:t})]})}function ma({label:e}){return s.jsx(f.Box,{position:"fixed",inset:"0",display:"flex",alignItems:"center",justifyContent:"center",bg:"bg",zIndex:"overlay",children:s.jsx(zi,{size:"xl",label:e??"Loading…"})})}const Oi=S.forwardRef(({variant:e="subtle",colorScheme:t="blue",onClose:n,children:o,...i},a)=>s.jsxs(f.Box,{ref:a,as:"span",display:"inline-flex",alignItems:"center",gap:"1",px:"2.5",py:"1",borderRadius:"full",fontSize:"xs",fontWeight:"medium",fontFamily:"var(--font-body)",border:"1px solid",borderColor:e==="outline"?`${t}.400`:"transparent",bg:e==="solid"?`${t}.500`:e==="subtle"?`${t}.100`:"transparent",color:e==="solid"?"white":`${t}.700`,transition:"all 0.15s",cursor:n?"default":void 0,...i,children:[o,n&&s.jsx(f.Box,{as:"button",onClick:n,ml:"1",opacity:.7,_hover:{opacity:1},lineHeight:"1",fontSize:"md",cursor:"pointer",border:"none",bg:"transparent",padding:"0",display:"inline-flex",alignItems:"center",children:"×"})]}));Oi.displayName="MedixTag";const Wi=S.forwardRef(({orientation:e="horizontal",label:t,...n},o)=>t?s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",width:"100%"},children:[s.jsx("div",{style:{flex:1,height:"1px",background:"var(--chakra-colors-border)"}}),s.jsx("span",{style:{fontSize:"var(--chakra-font-sizes-sm)",color:"var(--chakra-colors-text-muted)",whiteSpace:"nowrap",fontFamily:"var(--font-body)"},children:t}),s.jsx("div",{style:{flex:1,height:"1px",background:"var(--chakra-colors-border)"}})]}):s.jsx(f.Separator,{ref:o,orientation:e,borderColor:"border",...n}));Wi.displayName="MedixDivider";const xa={blue:"#0685FF",purple:"#7700CC",black:"#111926",white:"#FFFFFF"},ga={blue:"#111926",purple:"#111926",black:"#111926",white:"#FFFFFF"},ya={blue:"#FFFFFF",purple:"#FFFFFF",black:"#111926",white:"#FFFFFF"};function ao(){return typeof document>"u"?!1:document.documentElement.classList.contains("dark")}function ba(){const[e,t]=S.useState(ao);return S.useEffect(()=>{const n=document.documentElement,o=new MutationObserver(()=>t(ao()));return o.observe(n,{attributeFilter:["class"]}),()=>o.disconnect()},[]),e}function va({color:e,height:t}){return s.jsx("svg",{width:t,height:t,viewBox:"0 0 532 532",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",style:{display:"block",flexShrink:0},children:s.jsx("g",{children:s.jsx("path",{d:`
|
|
60
60
|
M394.335,2488.823C394.554,2488.998 394.639,2489.292 394.547,2489.557
|
|
61
61
|
C394.454,2489.822 394.204,2490 393.924,2490C375.317,2490 225.88,2490
|
|
62
62
|
225.88,2490C199.437,2490 178,2468.563 178,2442.12L178,2005.88
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
C328.923,2426.794 337.487,2436.055 345.675,2444.555
|
|
122
122
|
C353.486,2452.676 362.788,2461.68 371.226,2469.229
|
|
123
123
|
C378.696,2475.993 386.419,2482.518 394.335,2488.823Z
|
|
124
|
-
`,fill:e,fillRule:"evenodd",transform:"translate(-178,-1958)"})})})}function
|
|
124
|
+
`,fill:e,fillRule:"evenodd",transform:"translate(-178,-1958)"})})})}function wa({color:e,height:t}){const r=t/32,l=Math.round(119*r);return s.jsx("svg",{width:l,height:t,viewBox:"44 0 119 32",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",style:{display:"block",flexShrink:0},children:s.jsx("path",{d:`
|
|
125
125
|
M46.32 25H44.016V7.648H46.32L52.296 22.24L58.272 7.648H60.624V25H58.32
|
|
126
126
|
V18.136C58.32 14.896 58.344 13.72 58.464 12.496L53.4 25H51.192L46.152
|
|
127
127
|
12.544C46.272 13.384 46.32 15.16 46.32 17.584V25Z
|
|
@@ -174,23 +174,23 @@
|
|
|
174
174
|
|
|
175
175
|
M154.241 25H151.985V7.336H154.241V18.784L159.449 13.264H162.281
|
|
176
176
|
L157.793 17.944L162.257 25H159.665L156.233 19.576L154.241 21.664V25Z
|
|
177
|
-
`,fill:e})})}function jn({variant:e="blue",type:t="full",height:n=32,className:o,style:i}){const r=xa(),s=ha[e],l=r?ma[e]:pa[e],u={display:"inline-flex",alignItems:"center",gap:`${Math.round(n*.3)}px`,lineHeight:1,...i};return a.jsxs("span",{className:o,style:u,role:"img","aria-label":"MedixDeck logo",children:[a.jsx(ga,{color:s,height:n}),t==="full"&&a.jsx(ya,{color:l,height:n})]})}const Dt={sm:{h:"8",px:"3",fontSize:"sm"},md:{h:"10",px:"4",fontSize:"md"},lg:{h:"12",px:"4",fontSize:"lg"}},Cn=w.forwardRef(({size:e="md",leftElement:t,rightElement:n,isInvalid:o,errorMessage:i,...r},s)=>{const l=!!t,c=!!n;return a.jsxs(f.Box,{w:"100%",children:[a.jsxs(f.Box,{position:"relative",children:[l&&a.jsx(f.Box,{position:"absolute",left:"3",top:"50%",transform:"translateY(-50%)",zIndex:"1",color:"text.muted",display:"flex",alignItems:"center",children:t}),a.jsx(f.Input,{ref:s,...Dt[e],pl:l?"10":Dt[e].px,pr:c?"10":Dt[e].px,bg:"bg.surface",border:"1px solid",borderColor:o?"red.500":"border",borderRadius:"md",color:"text.heading",fontFamily:"var(--font-body)",_placeholder:{color:"text.muted"},_focus:{borderColor:o?"red.500":"blue.500",boxShadow:o?"0 0 0 3px rgba(220, 38, 38, 0.15)":"0 0 0 3px rgba(6, 133, 255, 0.15)",outline:"none"},_dark:{bg:"bg.surface",borderColor:o?"red.500":"border",color:"text.heading"},...r}),c&&a.jsx(f.Box,{position:"absolute",right:"3",top:"50%",transform:"translateY(-50%)",zIndex:"1",color:"text.muted",display:"flex",alignItems:"center",children:n})]}),o&&i&&a.jsx(f.Text,{mt:"1",fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:i})]})});Cn.displayName="MedixInput";const Hi=w.forwardRef(({placeholder:e="Search…",...t},n)=>a.jsx(Cn,{ref:n,type:"search",placeholder:e,leftElement:a.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[a.jsx("circle",{cx:"11",cy:"11",r:"8"}),a.jsx("path",{d:"m21 21-4.35-4.35"})]}),...t}));Hi.displayName="MedixSearchInput";const Ni=w.forwardRef(({isInvalid:e,errorMessage:t,maxLength:n,showCount:o=!1,onChange:i,value:r,...s},l)=>{const[c,u]=w.useState(typeof r=="string"?r.length:0),d=h=>{u(h.target.value.length),i==null||i(h)};return a.jsxs(f.Box,{w:"100%",children:[a.jsx(f.Textarea,{ref:l,bg:"bg.surface",border:"1px solid",borderColor:e?"red.500":"border",borderRadius:"md",color:"text.heading",fontFamily:"var(--font-body)",fontSize:"md",px:"4",py:"3",resize:"vertical",maxLength:n,value:r,onChange:d,_placeholder:{color:"text.muted"},_focus:{borderColor:e?"red.500":"blue.500",boxShadow:e?"0 0 0 3px rgba(220, 38, 38, 0.15)":"0 0 0 3px rgba(6, 133, 255, 0.15)",outline:"none"},_dark:{bg:"bg.surface",borderColor:e?"red.500":"border",color:"text.heading",_placeholder:{color:"text.muted"}},...s}),a.jsxs(f.Box,{display:"flex",justifyContent:"space-between",mt:"1",children:[e&&t?a.jsx(f.Text,{fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:t}):a.jsx("span",{}),o&&n&&a.jsxs(f.Text,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:[c,"/",n]})]})]})});Ni.displayName="MedixTextarea";const ba={sm:{h:"8",px:"3",fontSize:"sm"},md:{h:"10",px:"4",fontSize:"md"},lg:{h:"12",px:"4",fontSize:"lg"}},_i=w.forwardRef(({options:e=[],placeholder:t,isInvalid:n,errorMessage:o,size:i="md",children:r,...s},l)=>{const c=ba[i];return a.jsxs(f.Box,{w:"100%",children:[a.jsxs(f.NativeSelect.Root,{...s,children:[a.jsxs(f.NativeSelect.Field,{ref:l,h:c.h,px:c.px,fontSize:c.fontSize,bg:"bg.surface",border:"1px solid",borderColor:n?"red.500":"border",borderRadius:"md",color:"text.heading",fontFamily:"var(--font-body)",_focus:{borderColor:n?"red.500":"blue.500",boxShadow:n?"0 0 0 3px rgba(220,38,38,0.15)":"0 0 0 3px rgba(6,133,255,0.15)",outline:"none"},_dark:{bg:"bg.surface",borderColor:n?"red.500":"border",color:"text.heading"},children:[t&&a.jsx("option",{value:"",disabled:!0,children:t}),e.map(u=>a.jsx("option",{value:u.value,disabled:u.disabled,children:u.label},u.value)),r]}),a.jsx(f.NativeSelect.Indicator,{})]}),n&&o&&a.jsx(f.Text,{mt:"1",fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:o})]})});_i.displayName="MedixSelect";const $i={blue:{solid:"#0685FF",ring:"rgba(6,133,255,0.30)",tint:"#E8F3FF"},purple:{solid:"#7700CC",ring:"rgba(119,0,204,0.25)",tint:"#F9F0FF"},green:{solid:"#1B7A38",ring:"rgba(27,122,56,0.25)",tint:"#F0FDF4"}},Ui=w.forwardRef(({colorScheme:e="blue",checked:t,defaultChecked:n=!1,onChange:o,disabled:i=!1,indeterminate:r=!1,children:s,description:l,name:c,value:u,id:d},h)=>{const p=$i[e],m=d??w.useId(),[x,g]=w.useState(n),[b,y]=w.useState(!1),v=t!==void 0?t:x,S=j=>{t===void 0&&g(j.target.checked),o==null||o(j.target.checked)},C={width:18,height:18,borderRadius:4,border:`2px solid ${v||r?p.solid:"var(--medix-form-border, #CBD5E1)"}`,background:v||r?p.solid:"transparent",display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,marginTop:2,transition:"background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease",boxShadow:b?`0 0 0 3px ${p.ring}`:"none",pointerEvents:"none"};return a.jsxs(f.Box,{opacity:i?.55:1,children:[a.jsxs("label",{htmlFor:m,style:{display:"inline-flex",alignItems:"flex-start",gap:10,cursor:i?"not-allowed":"pointer",userSelect:"none"},children:[a.jsx("input",{ref:h,id:m,type:"checkbox",name:c,value:u,checked:v,disabled:i,onChange:S,onFocus:()=>y(!0),onBlur:()=>y(!1),style:{position:"absolute",width:1,height:1,opacity:0,margin:0,padding:0,pointerEvents:"none"}}),a.jsx("span",{style:C,"aria-hidden":"true",children:r?a.jsx("svg",{width:"10",height:"2",viewBox:"0 0 10 2",fill:"none",children:a.jsx("rect",{width:"10",height:"2",rx:"1",fill:"#fff"})}):v?a.jsx("svg",{width:"11",height:"9",viewBox:"0 0 11 9",fill:"none",children:a.jsx("path",{d:"M1 4.5L4 7.5L10 1",stroke:"#fff",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):null}),s&&a.jsxs(f.Box,{children:[a.jsx(f.Text,{as:"span",fontFamily:"var(--font-body)",fontSize:"md",color:"text.body",lineHeight:"1.5",children:s}),l&&a.jsx(f.Text,{display:"block",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:l})]})]}),!s&&l&&a.jsx(f.Text,{mt:"1",ml:"7",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:l})]})});Ui.displayName="MedixCheckbox";function va({name:e,value:t,onChange:n,options:o,colorScheme:i="blue",direction:r="column"}){const s=$i[i],[l,c]=w.useState(""),u=t!==void 0?t:l,d=h=>{t===void 0&&c(h),n==null||n(h)};return a.jsx(f.Box,{display:"flex",flexDirection:r,gap:r==="row"?"5":"3",role:"radiogroup",children:o.map(h=>{const p=u===h.value;return a.jsx(wa,{option:h,name:e,isSelected:p,onChange:d,solidColor:s.solid,ring:s.ring},h.value)})})}function wa({option:e,name:t,isSelected:n,onChange:o,solidColor:i,ring:r}){const[s,l]=w.useState(!1);return a.jsxs("label",{style:{display:"inline-flex",alignItems:"flex-start",gap:10,cursor:e.disabled?"not-allowed":"pointer",opacity:e.disabled?.55:1,userSelect:"none"},children:[a.jsx("input",{type:"radio",name:t,value:e.value,checked:n,disabled:e.disabled,onChange:()=>o(e.value),onFocus:()=>l(!0),onBlur:()=>l(!1),style:{position:"absolute",width:1,height:1,opacity:0,margin:0,padding:0,pointerEvents:"none"}}),a.jsx("span",{"aria-hidden":"true",style:{width:18,height:18,borderRadius:"50%",border:`2px solid ${n?i:"var(--medix-form-border, #CBD5E1)"}`,display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,marginTop:2,transition:"border-color 0.15s ease, box-shadow 0.15s ease",boxShadow:s?`0 0 0 3px ${r}`:"none",pointerEvents:"none"},children:a.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:i,transform:n?"scale(1)":"scale(0)",transition:"transform 0.15s ease"}})}),a.jsxs(f.Box,{children:[a.jsx(f.Text,{as:"span",fontFamily:"var(--font-body)",fontSize:"md",color:"text.body",lineHeight:"1.5",children:e.label}),e.description&&a.jsx(f.Text,{display:"block",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:e.description})]})]})}const Sa={blue:{solid:"#0685FF",ring:"rgba(6,133,255,0.30)",track:"#0685FF"},purple:{solid:"#7700CC",ring:"rgba(119,0,204,0.25)",track:"#7700CC"},green:{solid:"#1B7A38",ring:"rgba(27,122,56,0.25)",track:"#1B7A38"}},ja={sm:{width:32,height:18,thumbSize:12,thumbOffset:2},md:{width:42,height:24,thumbSize:16,thumbOffset:3},lg:{width:52,height:30,thumbSize:20,thumbOffset:4}},Gi=w.forwardRef(({colorScheme:e="blue",size:t="md",checked:n,defaultChecked:o=!1,onChange:i,disabled:r=!1,label:s,description:l,name:c,id:u},d)=>{const h=Sa[e],p=ja[t],m=u??w.useId(),[x,g]=w.useState(o),[b,y]=w.useState(!1),v=n!==void 0?n:x,S=F=>{n===void 0&&g(F.target.checked),i==null||i(F.target.checked)},C={position:"relative",display:"inline-flex",alignItems:"center",width:p.width,height:p.height,borderRadius:p.height,background:v?h.track:"var(--medix-form-border, #CBD5E1)",transition:"background 0.2s ease, box-shadow 0.2s ease",boxShadow:b?`0 0 0 3px ${h.ring}`:"none",cursor:r?"not-allowed":"pointer",flexShrink:0},j={position:"absolute",width:p.thumbSize,height:p.thumbSize,borderRadius:"50%",background:"#fff",boxShadow:"0 1px 4px rgba(0,0,0,0.22)",top:p.thumbOffset,left:v?p.width-p.thumbSize-p.thumbOffset:p.thumbOffset,transition:"left 0.18s ease"};return a.jsxs(f.Box,{display:"flex",alignItems:"flex-start",gap:"3",opacity:r?.55:1,children:[a.jsxs("label",{htmlFor:m,style:{display:"inline-flex",cursor:r?"not-allowed":"pointer"},children:[a.jsx("input",{ref:d,id:m,type:"checkbox",role:"switch",name:c,checked:v,disabled:r,onChange:S,onFocus:()=>y(!0),onBlur:()=>y(!1),style:{position:"absolute",width:1,height:1,opacity:0,margin:0,padding:0,pointerEvents:"none"}}),a.jsx("span",{style:C,"aria-hidden":"true",children:a.jsx("span",{style:j})})]}),(s||l)&&a.jsxs(f.Box,{children:[s&&a.jsx("label",{htmlFor:m,style:{display:"block",fontSize:"1rem",fontWeight:500,color:"inherit",fontFamily:"var(--font-body)",lineHeight:"1.4",cursor:r?"not-allowed":"pointer",userSelect:"none"},children:s}),l&&a.jsx(f.Text,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:l})]})]})});Gi.displayName="MedixSwitch";function Ca({id:e,label:t,helperText:n,errorMessage:o,isRequired:i=!1,isDisabled:r=!1,children:s}){const l=!!o;return a.jsxs(f.Box,{display:"flex",flexDirection:"column",gap:"1.5",opacity:r?.5:1,pointerEvents:r?"none":void 0,w:"100%",children:[t&&a.jsxs(f.Box,{as:"label",htmlFor:e,display:"flex",alignItems:"center",gap:"1",children:[a.jsx(f.Text,{as:"span",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:t}),i&&a.jsx(f.Text,{as:"span",color:"red.500",fontSize:"sm",lineHeight:"1",children:"*"})]}),w.cloneElement(s,{id:e,isInvalid:l||void 0}),n&&!l&&a.jsx(f.Text,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:n}),l&&o&&a.jsx(f.Text,{fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:o})]})}function Ki({length:e=6,value:t="",onChange:n,onComplete:o,isInvalid:i=!1,isDisabled:r=!1,mask:s=!1,label:l,helperText:c,errorMessage:u}){const d=t.split("").slice(0,e),h=w.useRef([]),p=i?"#DC2626":"var(--medix-form-border)",m=i?"#DC2626":"#0685FF",x=(y,v)=>{var S,C,j;if(y.key==="Backspace"){y.preventDefault();const F=[...d];F[v]?(F[v]="",n==null||n(F.join(""))):v>0&&((S=h.current[v-1])==null||S.focus(),F[v-1]="",n==null||n(F.join("")))}else y.key==="ArrowLeft"&&v>0?(C=h.current[v-1])==null||C.focus():y.key==="ArrowRight"&&v<e-1&&((j=h.current[v+1])==null||j.focus())},g=(y,v)=>{var F,D;const S=y.target.value.replace(/\D/g,"");if(!S)return;if(S.length>1){const A=S.split("").slice(0,e),T=[...Array(e).fill("")];A.forEach((P,U)=>{T[U]=P});const k=T.join("");n==null||n(k);const E=Math.min(A.length,e-1);(F=h.current[E])==null||F.focus(),k.length===e&&(o==null||o(k));return}const C=[...d];for(;C.length<e;)C.push("");C[v]=S;const j=C.join("");n==null||n(j),v<e-1&&((D=h.current[v+1])==null||D.focus()),j.replace(/\s/g,"").length===e&&(o==null||o(j))},b=y=>y.target.select();return a.jsxs(f.Box,{w:"fit-content",children:[l&&a.jsx(f.Text,{mb:"2",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:l}),a.jsx(f.Box,{display:"flex",gap:"2",alignItems:"center",children:Array.from({length:e}).map((y,v)=>a.jsx("input",{ref:S=>{h.current[v]=S},type:s?"password":"text",inputMode:"numeric",pattern:"\\d*",maxLength:1,value:d[v]??"",onChange:S=>g(S,v),onKeyDown:S=>x(S,v),onFocus:b,disabled:r,"aria-label":`Digit ${v+1} of ${e}`,style:{width:"48px",height:"48px",borderRadius:"10px",border:`1.5px solid ${p}`,background:"var(--medix-form-bg)",color:"var(--medix-form-text)",fontSize:"20px",fontWeight:600,textAlign:"center",fontFamily:"var(--font-body)",outline:"none",transition:"border-color 0.15s, box-shadow 0.15s",cursor:r?"not-allowed":"text",opacity:r?.5:1},onFocusCapture:S=>{S.target.style.borderColor=m,S.target.style.boxShadow=`0 0 0 3px ${i?"rgba(220,38,38,0.15)":"rgba(6,133,255,0.15)"}`},onBlurCapture:S=>{S.target.style.borderColor=p,S.target.style.boxShadow="none"}},v))}),(c||u)&&a.jsx(f.Text,{mt:"2",fontSize:"xs",color:i?"red.500":"text.muted",fontFamily:"var(--font-body)",children:i?u:c})]})}const Fa=Ki,Et=[{code:"+234",flag:"🇳🇬",country:"NG"},{code:"+1",flag:"🇺🇸",country:"US"},{code:"+44",flag:"🇬🇧",country:"GB"},{code:"+233",flag:"🇬🇭",country:"GH"},{code:"+254",flag:"🇰🇪",country:"KE"},{code:"+27",flag:"🇿🇦",country:"ZA"},{code:"+251",flag:"🇪🇹",country:"ET"},{code:"+255",flag:"🇹🇿",country:"TZ"}];function Ta({value:e="",onChange:t,showCountryCode:n=!0,defaultCountryCode:o="+234",placeholder:i="80 000 0000",isInvalid:r=!1,errorMessage:s,label:l,helperText:c,isDisabled:u=!1,id:d}){const[h,p]=w.useState(o),[m,x]=w.useState(e),[g,b]=w.useState(!1),y=Et.find(F=>F.code===h)??Et[0],v=F=>{const D=F.target.value.replace(/[^\d\s\-]/g,"");x(D),t==null||t(`${h}${D.replace(/\s/g,"")}`)},S=F=>{p(F.target.value),t==null||t(`${F.target.value}${m.replace(/\s/g,"")}`)},C=r?"#DC2626":g?"#0685FF":"var(--medix-form-border)",j=g?`0 0 0 3px ${r?"rgba(220,38,38,0.15)":"rgba(6,133,255,0.15)"}`:"none";return a.jsxs(f.Box,{w:"100%",children:[l&&a.jsx(f.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:l}),a.jsxs(f.Box,{display:"flex",alignItems:"center",overflow:"hidden",borderRadius:"10px",transition:"border-color 0.15s, box-shadow 0.15s",opacity:u?.5:1,pointerEvents:u?"none":void 0,style:{border:`1.5px solid ${C}`,boxShadow:j,background:"var(--medix-form-bg)"},children:[n&&a.jsxs("label",{htmlFor:`${d}-country`,style:{display:"flex",alignItems:"center",gap:"4px",padding:"10px 12px",background:"var(--medix-form-bg-subtle)",borderRight:"1px solid var(--medix-form-border)",cursor:"pointer",flexShrink:0,minWidth:"80px"},children:[a.jsx(f.Text,{fontSize:"lg",lineHeight:"1",children:y.flag}),a.jsx("select",{id:`${d}-country`,value:h,onChange:S,"aria-label":"Country code",style:{background:"transparent",border:"none",outline:"none",fontSize:"14px",fontFamily:"var(--font-body)",color:"var(--medix-form-text)",cursor:"pointer",width:"42px"},children:Et.map(F=>a.jsx("option",{value:F.code,style:{background:"var(--medix-form-bg)",color:"var(--medix-form-text)"},children:F.code},F.code))})]}),a.jsx("input",{id:d,type:"tel",value:m,onChange:v,onFocus:()=>b(!0),onBlur:()=>b(!1),placeholder:i,disabled:u,"aria-invalid":r,style:{flex:1,border:"none",outline:"none",background:"transparent",fontSize:"15px",fontFamily:"var(--font-body)",color:"var(--medix-form-text)",padding:"10px 16px",minWidth:0}})]}),(c||s)&&a.jsx(f.Text,{mt:"1.5",fontSize:"xs",color:r?"red.500":"text.muted",fontFamily:"var(--font-body)",children:r?s:c})]})}function ka({value:e,onChange:t,min:n,max:o,label:i,helperText:r,errorMessage:s,isInvalid:l=!1,isDisabled:c=!1,placeholder:u,id:d,includeTime:h=!1}){const[p,m]=w.useState(!1),x=l?"#DC2626":p?"#0685FF":"var(--medix-form-border)",g=p?`0 0 0 3px ${l?"rgba(220,38,38,0.15)":"rgba(6,133,255,0.15)"}`:"none";return a.jsxs(f.Box,{w:"100%",children:[i&&a.jsx(f.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:i}),a.jsxs(f.Box,{position:"relative",children:[a.jsx("input",{id:d,type:h?"datetime-local":"date",value:e??"",onChange:b=>t==null?void 0:t(b.target.value),min:n,max:o,placeholder:u,disabled:c,"aria-invalid":l,onFocus:()=>m(!0),onBlur:()=>m(!1),style:{width:"100%",height:"40px",padding:"0 40px 0 16px",borderRadius:"10px",border:`1.5px solid ${x}`,boxShadow:g,background:"var(--medix-form-bg)",color:"var(--medix-form-text)",fontSize:"15px",fontFamily:"var(--font-body)",outline:"none",transition:"border-color 0.15s, box-shadow 0.15s",cursor:c?"not-allowed":"pointer",opacity:c?.5:1,colorScheme:"auto"}}),a.jsx(f.Box,{position:"absolute",right:"3",top:"50%",transform:"translateY(-50%)",pointerEvents:"none",fontSize:"md",color:"text.muted",children:"📅"})]}),(r||s)&&a.jsx(f.Text,{mt:"1.5",fontSize:"xs",color:l?"red.500":"text.muted",fontFamily:"var(--font-body)",children:l?s:r})]})}function Ba({startValue:e,onStartChange:t,endValue:n,onEndChange:o,min:i,max:r,label:s,helperText:l,errorMessage:c,isInvalid:u=!1,isDisabled:d=!1,startPlaceholder:h,endPlaceholder:p,id:m}){const[x,g]=w.useState(null),b=u?"#DC2626":x?"#0685FF":"var(--medix-form-border)",y=x?`0 0 0 3px ${u?"rgba(220,38,38,0.15)":"rgba(6,133,255,0.15)"}`:"none",v={flex:1,height:"100%",padding:"0 10px",background:"transparent",color:"var(--medix-form-text)",fontSize:"15px",fontFamily:"var(--font-body)",border:"none",outline:"none",cursor:d?"not-allowed":"pointer",colorScheme:"auto",width:"100%"};return a.jsxs(f.Box,{w:"100%",children:[s&&a.jsx(f.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:s}),a.jsxs(f.Box,{display:"flex",alignItems:"center",style:{width:"100%",height:"40px",borderRadius:"10px",border:`1.5px solid ${b}`,boxShadow:y,background:"var(--medix-form-bg)",transition:"border-color 0.15s, box-shadow 0.15s",opacity:d?.5:1,overflow:"hidden"},children:[a.jsx("input",{id:m,type:"date",value:e??"",onChange:S=>t==null?void 0:t(S.target.value),min:i,max:n||r,placeholder:h,disabled:d,"aria-invalid":u,onFocus:()=>g("start"),onBlur:()=>g(null),style:v}),a.jsx(f.Box,{color:"text.muted",px:"1",fontSize:"sm",children:"—"}),a.jsx("input",{type:"date",value:n??"",onChange:S=>o==null?void 0:o(S.target.value),min:e||i,max:r,placeholder:p,disabled:d,"aria-invalid":u,onFocus:()=>g("end"),onBlur:()=>g(null),style:v})]}),(l||c)&&a.jsx(f.Text,{mt:"1.5",fontSize:"xs",color:u?"red.500":"text.muted",fontFamily:"var(--font-body)",children:u?c:l})]})}const Aa=a.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:a.jsx("polyline",{points:"6 9 12 15 18 9"})});function Da({options:e,value:t,onChange:n,placeholder:o="Search...",label:i,helperText:r,errorMessage:s,isInvalid:l=!1,isDisabled:c=!1}){const[u,d]=w.useState(!1),[h,p]=w.useState(""),m=w.useRef(null);w.useEffect(()=>{if(t){const y=e.find(v=>v.value===t);y&&p(y.label)}},[t,e]),w.useEffect(()=>{function y(v){if(m.current&&!m.current.contains(v.target))if(d(!1),t){const S=e.find(C=>C.value===t);S&&p(S.label)}else p("")}return document.addEventListener("mousedown",y),()=>document.removeEventListener("mousedown",y)},[t,e]);const x=e.filter(y=>y.label.toLowerCase().includes(h.toLowerCase())),g=l?"#DC2626":u?"#0685FF":"var(--medix-form-border)",b=u?`0 0 0 3px ${l?"rgba(220,38,38,0.15)":"rgba(6,133,255,0.15)"}`:"none";return a.jsxs(f.Box,{w:"100%",position:"relative",ref:m,children:[i&&a.jsx(f.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:i}),a.jsxs(f.Box,{position:"relative",children:[a.jsx("input",{type:"text",value:h,placeholder:o,disabled:c,onChange:y=>{p(y.target.value),d(!0),y.target.value||n==null||n("")},onFocus:()=>d(!0),style:{width:"100%",height:"40px",padding:"0 40px 0 16px",borderRadius:"10px",border:`1.5px solid ${g}`,boxShadow:b,background:"var(--medix-form-bg)",color:"var(--medix-form-text)",fontSize:"15px",fontFamily:"var(--font-body)",outline:"none",transition:"border-color 0.15s, box-shadow 0.15s",cursor:c?"not-allowed":"text",opacity:c?.5:1}}),a.jsx(f.Box,{position:"absolute",right:"3",top:"50%",transform:"translateY(-50%)",pointerEvents:"none",color:"text.muted",children:Aa})]}),u&&!c&&a.jsx(f.Box,{position:"absolute",zIndex:10,top:"100%",left:"0",right:"0",mt:"1",bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"md",boxShadow:"sm",maxH:"200px",overflowY:"auto",py:"1",children:x.length>0?x.map(y=>a.jsx(f.Box,{px:"3",py:"2",fontSize:"sm",fontFamily:"var(--font-body)",color:"text.body",cursor:"pointer",_hover:{bg:"bg.subtle"},onClick:()=>{n==null||n(y.value),p(y.label),d(!1)},children:y.label},y.value)):a.jsx(f.Box,{px:"3",py:"2",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:"No options found"})}),(r||s)&&a.jsx(f.Text,{mt:"1.5",fontSize:"xs",color:l?"red.500":"text.muted",fontFamily:"var(--font-body)",children:l?s:r})]})}const Ea=a.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),a.jsx("polyline",{points:"17 8 12 3 7 8"}),a.jsx("line",{x1:"12",y1:"3",x2:"12",y2:"15"})]});function Pa({accept:e,multiple:t=!1,maxSize:n,label:o,helperText:i,errorMessage:r,isInvalid:s=!1,isDisabled:l=!1,onChange:c,dropzoneTitle:u="Click or drag to upload",id:d}){const[h,p]=w.useState(!1),[m,x]=w.useState([]),g=w.useRef(null),b=D=>{D.preventDefault(),l||p(!0)},y=D=>{D.preventDefault(),p(!1)},v=D=>{if(!D||D.length===0)return;const A=Array.from(D).filter(T=>!(n&&T.size>n));x(A.map(T=>T.name)),c==null||c(A)},S=D=>{D.preventDefault(),p(!1),!l&&v(D.dataTransfer.files)},C=D=>{v(D.target.files)},j=s?"red.500":h?"blue.500":"border",F=h?"bg.subtle":"transparent";return a.jsxs(f.Box,{w:"100%",children:[o&&a.jsx(f.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:o}),a.jsxs(f.Box,{position:"relative",border:"1.5px dashed",borderColor:j,borderRadius:"xl",bg:F,px:"6",py:"8",textAlign:"center",transition:"all 0.2s ease",opacity:l?.5:1,cursor:l?"not-allowed":"pointer",_hover:l?void 0:{borderColor:"blue.500",bg:"bg.subtle"},onDragEnter:b,onDragOver:b,onDragLeave:y,onDrop:S,onClick:()=>{var D;return!l&&((D=g.current)==null?void 0:D.click())},children:[a.jsx("input",{ref:g,id:d,type:"file",accept:e,multiple:t,disabled:l,style:{display:"none"},onChange:C}),a.jsx(f.Box,{color:"text.muted",display:"flex",justifyContent:"center",mb:"3",children:Ea}),a.jsx(f.Text,{fontSize:"sm",fontWeight:"medium",color:h?"blue.500":"text.heading",fontFamily:"var(--font-body)",children:u}),a.jsxs(f.Text,{fontSize:"xs",color:"text.muted",mt:"1",fontFamily:"var(--font-body)",children:[e?`Accepts ${e}`:"All file types supported",n&&` up to ${Math.round(n/1024/1024)}MB`]}),m.length>0&&a.jsxs(f.Box,{mt:"4",pt:"3",borderTop:"1px solid",borderColor:"border",children:[a.jsxs(f.Text,{fontSize:"xs",fontWeight:"semibold",color:"text.heading",mb:"1",fontFamily:"var(--font-body)",children:["Selected file",m.length>1?"s":"",":"]}),m.map((D,A)=>a.jsx(f.Text,{fontSize:"xs",color:"text.muted",truncate:!0,fontFamily:"var(--font-body)",children:D},A))]})]}),(i||r)&&a.jsx(f.Text,{mt:"1.5",fontSize:"xs",color:s?"red.500":"text.muted",fontFamily:"var(--font-body)",children:s?r:i})]})}const Yi=w.forwardRef(({noPadding:e=!1,hoverable:t=!1,children:n,...o},i)=>a.jsx(f.Box,{ref:i,bg:"bg.surface",borderRadius:"card",border:"1px solid",borderColor:"border",boxShadow:"card-light",_dark:{boxShadow:"card-dark"},overflow:"hidden",transition:"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",...t&&{_hover:{transform:"translateY(-2px)",boxShadow:"lg",borderColor:"blue.200"},cursor:"pointer"},...o,children:w.Children.map(n,r=>r||null)}));Yi.displayName="MedixCard";function Ma({title:e,subtitle:t,action:n,children:o,...i}){return a.jsxs(f.Box,{px:"6",py:"4",borderBottom:"1px solid",borderColor:"border",display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:"4",...i,children:[a.jsxs(f.Box,{flex:"1",children:[e&&a.jsx(f.Box,{as:"h3",fontSize:"lg",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"1.3",children:e}),t&&a.jsx(f.Box,{as:"p",mt:"0.5",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t}),o]}),n&&a.jsx(f.Box,{flexShrink:0,children:n})]})}function Ra({children:e,...t}){return a.jsx(f.Box,{px:"6",py:"5",...t,children:e})}function Va({children:e,...t}){return a.jsx(f.Box,{px:"6",py:"4",borderTop:"1px solid",borderColor:"border",display:"flex",alignItems:"center",gap:"3",...t,children:e})}const Xi=w.forwardRef(({value:e,label:t,unit:n,change:o,trend:i,icon:r,accentColor:s="blue.500",...l},c)=>{const u=i??(o!==void 0?o>=0?"up":"down":"neutral"),d=u==="up"?"green.500":u==="down"?"red.500":"text.muted";return a.jsxs(f.Box,{ref:c,bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"6",boxShadow:"card-light",_dark:{boxShadow:"card-dark"},...l,children:[r&&a.jsx(f.Box,{w:"10",h:"10",borderRadius:"md",bg:`${s.split(".")[0]}.100`,color:s,display:"flex",alignItems:"center",justifyContent:"center",mb:"3",fontSize:"xl",children:r}),a.jsxs(f.Box,{fontSize:"4xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"1.1",children:[e,n&&a.jsx(f.Box,{as:"span",fontSize:"xl",fontWeight:"medium",color:"text.muted",ml:"1",children:n})]}),a.jsx(f.Box,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t}),o!==void 0&&a.jsxs(f.Box,{mt:"2",display:"inline-flex",alignItems:"center",gap:"1",fontSize:"xs",fontWeight:"medium",color:d,children:[a.jsx(f.Box,{as:"span",children:u==="up"?"↑":u==="down"?"↓":"→"}),a.jsxs(f.Box,{as:"span",children:[Math.abs(o),"%"]})]})]})});Xi.displayName="MedixStatCard";const La={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1440px",full:"100%"},Zi=w.forwardRef(({maxWidth:e="xl",children:t,...n},o)=>a.jsx(f.Box,{ref:o,w:"100%",maxW:La[e],mx:"auto",px:{base:"4",md:"6",lg:"8"},...n,children:t}));Zi.displayName="MedixContainer";function Ia({eyebrow:e,title:t,description:n,align:o="center",action:i,eyebrowColor:r="blue.500",...s}){const l=o,c=o==="center"?"center":o==="right"?"flex-end":"flex-start";return a.jsxs(f.Box,{display:"flex",flexDirection:"column",alignItems:c,textAlign:l,gap:"3",...s,children:[e&&a.jsx(f.Box,{as:"span",fontSize:"xs",fontWeight:"bold",color:r,letterSpacing:"wider",textTransform:"uppercase",fontFamily:"var(--font-body)",children:e}),a.jsx(f.Box,{as:"h2",fontSize:{base:"3xl",md:"4xl"},fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"snug",maxW:o==="center"?"720px":void 0,children:t}),n&&a.jsx(f.Box,{as:"p",fontSize:"md",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",maxW:o==="center"?"640px":void 0,children:n}),i&&a.jsx(f.Box,{mt:"2",children:i})]})}const Je="#0685FF",qi="rgba(6,133,255,0.08)",za="rgba(6,133,255,0.12)",Oa="rgba(6,133,255,0.10)",Wa="rgba(6,133,255,0.15)",Se="#EF4444",Ji="rgba(239,68,68,0.08)",Ha=()=>a.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),a.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),a.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]}),Na=()=>a.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),a.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),_a=({open:e})=>a.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",style:{transition:"transform 0.2s ease",transform:e?"rotate(180deg)":"rotate(0deg)"},children:a.jsx("polyline",{points:"6 9 12 15 18 9"})}),Qi=()=>a.jsxs("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("path",{d:"M9 21H5a2 2 0 01-2-2V5a2 2 0 012-2h4"}),a.jsx("polyline",{points:"16 17 21 12 16 7"}),a.jsx("line",{x1:"21",y1:"12",x2:"9",y2:"12"})]}),$a=()=>a.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("path",{d:"M20 21v-2a4 4 0 00-4-4H8a4 4 0 00-4 4v2"}),a.jsx("circle",{cx:"12",cy:"7",r:"4"})]}),Ua=()=>a.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("circle",{cx:"12",cy:"12",r:"3"}),a.jsx("path",{d:"M19.4 15a1.65 1.65 0 00.33 1.82l.06.06a2 2 0 010 2.83 2 2 0 01-2.83 0l-.06-.06a1.65 1.65 0 00-1.82-.33 1.65 1.65 0 00-1 1.51V21a2 2 0 01-4 0v-.09A1.65 1.65 0 009 19.4a1.65 1.65 0 00-1.82.33l-.06.06a2 2 0 01-2.83-2.83l.06-.06A1.65 1.65 0 004.68 15a1.65 1.65 0 00-1.51-1H3a2 2 0 010-4h.09A1.65 1.65 0 004.6 9a1.65 1.65 0 00-.33-1.82l-.06-.06a2 2 0 012.83-2.83l.06.06A1.65 1.65 0 009 4.68a1.65 1.65 0 001-1.51V3a2 2 0 014 0v.09a1.65 1.65 0 001 1.51 1.65 1.65 0 001.82-.33l.06-.06a2 2 0 012.83 2.83l-.06.06A1.65 1.65 0 0019.4 9a1.65 1.65 0 001.51 1H21a2 2 0 010 4h-.09a1.65 1.65 0 00-1.51 1z"})]}),Ga=(e,t)=>a.jsx("a",{href:e.href,style:{textDecoration:"none",display:"block"},children:t});function Ka(){const e=new Date().getHours();return e<12?"Good morning":e<17?"Good afternoon":"Good evening"}function Ya({item:e,renderLink:t,onClick:n}){const[o,i]=w.useState(!1),r=e.isActive??!1,s=a.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"3",px:"3",py:"2.5",borderRadius:"lg",borderLeftRadius:"none",borderTopLeftRadius:"none",borderBottomLeftRadius:"none",position:"relative",cursor:"pointer",onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),onClick:n,style:{background:r?Oa:o?qi:"transparent",boxShadow:r?`inset 3px 0 0 ${Je}`:void 0,transition:"background 0.15s ease, box-shadow 0.15s ease"},_dark:{bg:r?Wa:o?za:"transparent"},children:[e.icon&&a.jsx(f.Box,{flexShrink:0,style:{color:r?Je:void 0,opacity:r?1:o?.85:.6,transition:"color 0.15s ease, opacity 0.15s ease"},color:r?"blue.500":"text.body",children:e.icon}),a.jsx(f.Box,{as:"span",flex:"1",fontSize:"sm",fontWeight:r?"600":"500",fontFamily:"var(--font-body)",style:{color:r?Je:void 0,transition:"color 0.15s ease"},color:r?"blue.500":"text.body",children:e.label}),typeof e.badge=="number"&&a.jsx(f.Box,{as:"span",display:"inline-flex",alignItems:"center",justifyContent:"center",minW:"20px",h:"20px",px:"1",borderRadius:"full",fontSize:"xs",fontWeight:"700",lineHeight:"1",style:{background:Je,color:"#fff"},children:e.badge}),e.hasDot&&a.jsx(f.Box,{as:"span",display:"inline-block",w:"7px",h:"7px",borderRadius:"full",flexShrink:0,style:{background:Se},"aria-label":"New notification"})]});return t(e,s)}function Xa({logo:e,navGroups:t,isOpen:n,onClose:o,onLogout:i,renderLink:r,sidebarWidth:s}){const[l,c]=w.useState(!1);return a.jsxs(a.Fragment,{children:[n&&a.jsx(f.Box,{display:{base:"block",md:"none"},position:"fixed",inset:"0",zIndex:"overlay",bg:"blackAlpha.500",onClick:o,"aria-hidden":"true"}),a.jsxs(f.Box,{as:"aside","aria-label":"Main navigation",position:"fixed",top:"0",left:"0",bottom:"0",w:`${s}px`,zIndex:{base:"modal",md:"sticky"},bg:"bg",borderRight:"1px solid",borderColor:"border",display:"flex",flexDirection:"column",transform:{base:n?"translateX(0)":`translateX(-${s+10}px)`,md:"translateX(0)"},transition:"transform 0.25s cubic-bezier(0.22,1,0.36,1)",children:[a.jsx(f.Box,{px:"5",pt:"5",pb:"4",flexShrink:0,borderBottom:"1px solid",borderColor:"border",display:"flex",alignItems:"center",children:e}),a.jsx(f.Box,{flex:"1",overflowY:"auto",py:"3",px:"3",children:t.map((u,d)=>a.jsxs(f.Box,{mb:"4",children:[u.groupLabel&&a.jsx(f.Box,{px:"3",pb:"2",pt:d>0?"2":void 0,fontSize:"10px",fontWeight:"700",letterSpacing:"widest",textTransform:"uppercase",color:"text.muted",fontFamily:"var(--font-body)",children:u.groupLabel}),a.jsx(f.Box,{display:"flex",flexDirection:"column",gap:"0.5",children:u.items.map(h=>a.jsx(Ya,{item:h,renderLink:r,onClick:o},h.href))})]},d))}),a.jsx(f.Box,{px:"3",pb:"4",pt:"2",flexShrink:0,borderTop:"1px solid",borderColor:"border",children:a.jsxs(f.Box,{as:"button",display:"flex",alignItems:"center",gap:"3",w:"full",px:"3",py:"2.5",borderRadius:"lg",border:"none",bg:"transparent",cursor:"pointer",onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),onClick:()=>{o(),i==null||i()},style:{background:l?Ji:"transparent",color:Se,transition:"background 0.15s ease"},children:[a.jsx(f.Box,{flexShrink:0,style:{color:Se},children:a.jsx(Qi,{})}),a.jsx(f.Box,{as:"span",fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",style:{color:Se},children:"Log out"})]})})]})]})}function Za({user:e,greeting:t,isSidebarOpen:n,onMenuToggle:o,sidebarWidth:i,topBarSlot:r,dropdownItems:s,onLogout:l}){const[c,u]=w.useState(!1),d=w.useRef(null),h=w.useId(),p=`user-menu-button-${h}`,m=`user-menu-dropdown-${h}`;return w.useEffect(()=>{const x=g=>{d.current&&!d.current.contains(g.target)&&u(!1)};return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[]),a.jsxs(f.Box,{as:"header",role:"banner",position:"sticky",top:"0",zIndex:"docked",bg:"bg",borderBottom:"1px solid",borderColor:"border",h:"16",display:"flex",alignItems:"center",px:{base:"4",md:"6"},gap:"4",children:[a.jsx(f.Box,{as:"button",display:{base:"flex",md:"none"},alignItems:"center",justifyContent:"center",border:"none",bg:"transparent",p:"1",cursor:"pointer",color:"text.body",borderRadius:"md",_hover:{bg:"bg.subtle"},onClick:o,"aria-label":n?"Close navigation menu":"Open navigation menu","aria-expanded":n,children:n?a.jsx(Na,{}):a.jsx(Ha,{})}),a.jsx(f.Box,{flex:"1",children:a.jsxs(f.Box,{as:"p",fontSize:{base:"sm",md:"md"},fontWeight:"500",fontFamily:"var(--font-body)",color:"text.body",children:[t,","," ",a.jsx(f.Box,{as:"span",fontWeight:"700",color:"text.heading",children:e.name})]})}),r,a.jsxs(f.Box,{position:"relative",ref:d,children:[a.jsxs(f.Box,{as:"button",id:p,display:"flex",alignItems:"center",gap:"2",bg:"transparent",border:"none",cursor:"pointer",borderRadius:"full",p:"1",_hover:{bg:"bg.subtle"},onClick:()=>u(x=>!x),"aria-haspopup":"menu","aria-expanded":c,"aria-controls":c?m:void 0,"aria-label":"User menu",children:[a.jsx(Sn,{name:e.name,src:e.avatarSrc,size:"sm"}),a.jsx(f.Box,{color:"text.muted",children:a.jsx(_a,{open:c})})]}),c&&a.jsxs(f.Box,{role:"menu","aria-labelledby":p,id:m,position:"absolute",top:"calc(100% + 8px)",right:"0",minW:"200px",bg:"bg",border:"1px solid",borderColor:"border",borderRadius:"xl",boxShadow:"0 8px 32px rgba(0,0,0,0.12)",zIndex:"popover",overflow:"hidden",py:"1",children:[a.jsxs(f.Box,{px:"4",py:"3",borderBottom:"1px solid",borderColor:"border",children:[a.jsx(f.Box,{fontSize:"sm",fontWeight:"700",color:"text.heading",fontFamily:"var(--font-body)",children:e.name}),e.email&&a.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:e.email})]}),!s&&a.jsxs(a.Fragment,{children:[a.jsx(Qe,{icon:a.jsx($a,{}),label:"My Profile",onClick:()=>u(!1)}),a.jsx(Qe,{icon:a.jsx(Ua,{}),label:"Settings",onClick:()=>u(!1)})]}),s==null?void 0:s.map((x,g)=>a.jsx(Qe,{icon:x.icon,label:x.label,isDanger:x.isDanger,onClick:()=>{var b;u(!1),(b=x.onClick)==null||b.call(x)}},g)),a.jsx(f.Box,{borderTop:"1px solid",borderColor:"border",my:"1"}),a.jsx(Qe,{icon:a.jsx(Qi,{}),label:"Log out",isDanger:!0,onClick:()=>{u(!1),l==null||l()}})]})]})]})}function Qe({icon:e,label:t,isDanger:n,onClick:o}){const[i,r]=w.useState(!1);return a.jsxs(f.Box,{as:"button",role:"menuitem",display:"flex",alignItems:"center",gap:"2.5",w:"full",px:"4",py:"2.5",border:"none",bg:"transparent",cursor:"pointer",textAlign:"left",onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),onClick:o,style:{background:i?n?Ji:qi:"transparent",color:n?Se:void 0,transition:"background 0.12s ease"},children:[e&&a.jsx(f.Box,{flexShrink:0,style:{color:n?Se:void 0},color:"text.muted",children:e}),a.jsx(f.Box,{as:"span",fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",style:{color:n?Se:void 0},color:n?void 0:"text.body",children:t})]})}function es({children:e,logo:t,navGroups:n,user:o,greeting:i,onLogout:r,renderLink:s=Ga,dropdownItems:l,topBarSlot:c,sidebarWidth:u=220,...d}){const[h,p]=w.useState(!1),m=i??Ka();return a.jsxs(f.Box,{display:"flex",minH:"100vh",bg:"bg",...d,children:[a.jsx(Xa,{logo:t??a.jsx(jn,{height:26}),navGroups:n,isOpen:h,onClose:()=>p(!1),onLogout:r,renderLink:s,sidebarWidth:u}),a.jsxs(f.Box,{flex:"1",display:"flex",flexDirection:"column",minW:"0",ml:{base:"0",md:`${u}px`},transition:"margin-left 0.25s cubic-bezier(0.22,1,0.36,1)",children:[a.jsx(Za,{user:o,greeting:m,isSidebarOpen:h,onMenuToggle:()=>p(x=>!x),sidebarWidth:u,topBarSlot:c,dropdownItems:l,onLogout:r}),a.jsx(f.Box,{as:"main",id:"main-content",role:"main",flex:"1",overflowY:"auto",bg:"bg.subtle",p:{base:"4",md:"6",lg:"8"},children:e})]})]})}es.displayName="MedixDashboardLayout";const Fn=w.createContext({});function Tn(e){const t=w.useRef(null);return t.current===null&&(t.current=e()),t.current}const qa=typeof window<"u",ts=qa?w.useLayoutEffect:w.useEffect,Ct=w.createContext(null);function kn(e,t){e.indexOf(t)===-1&&e.push(t)}function pt(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const ie=(e,t,n)=>n>t?t:n<e?e:n;function Xt(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Ve=()=>{},se=()=>{};var ki;typeof process<"u"&&((ki=process.env)==null?void 0:ki.NODE_ENV)!=="production"&&(Ve=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(Xt(t,n))},se=(e,t,n)=>{if(!e)throw new Error(Xt(t,n))});const ue={},ns=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function os(e){return typeof e=="object"&&e!==null}const is=e=>/^0[^.\s]+$/u.test(e);function ss(e){let t;return()=>(t===void 0&&(t=e()),t)}const Z=e=>e,Ja=(e,t)=>n=>t(e(n)),Ye=(...e)=>e.reduce(Ja),$e=(e,t,n)=>{const o=t-e;return o===0?1:(n-e)/o};class Bn{constructor(){this.subscriptions=[]}add(t){return kn(this.subscriptions,t),()=>pt(this.subscriptions,t)}notify(t,n,o){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,o);else for(let r=0;r<i;r++){const s=this.subscriptions[r];s&&s(t,n,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const $=e=>e*1e3,X=e=>e/1e3;function rs(e,t){return t?e*(1e3/t):0}const ao=new Set;function An(e,t,n){e||ao.has(t)||(console.warn(Xt(t,n)),ao.add(t))}const as=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Qa=1e-7,el=12;function tl(e,t,n,o,i){let r,s,l=0;do s=t+(n-t)/2,r=as(s,o,i)-e,r>0?n=s:t=s;while(Math.abs(r)>Qa&&++l<el);return s}function Xe(e,t,n,o){if(e===t&&n===o)return Z;const i=r=>tl(r,0,1,e,n);return r=>r===0||r===1?r:as(i(r),t,o)}const ls=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,cs=e=>t=>1-e(1-t),ds=Xe(.33,1.53,.69,.99),Dn=cs(ds),us=ls(Dn),fs=e=>e>=1?1:(e*=2)<1?.5*Dn(e):.5*(2-Math.pow(2,-10*(e-1))),En=e=>1-Math.sin(Math.acos(e)),hs=cs(En),ps=ls(En),nl=Xe(.42,0,1,1),ol=Xe(0,0,.58,1),ms=Xe(.42,0,.58,1),il=e=>Array.isArray(e)&&typeof e[0]!="number",xs=e=>Array.isArray(e)&&typeof e[0]=="number",lo={linear:Z,easeIn:nl,easeInOut:ms,easeOut:ol,circIn:En,circInOut:ps,circOut:hs,backIn:Dn,backInOut:us,backOut:ds,anticipate:fs},sl=e=>typeof e=="string",co=e=>{if(xs(e)){se(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,o,i]=e;return Xe(t,n,o,i)}else if(sl(e))return se(lo[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),lo[e];return e},et=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function rl(e,t){let n=new Set,o=new Set,i=!1,r=!1;const s=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1};function c(d){s.has(d)&&(u.schedule(d),e()),d(l)}const u={schedule:(d,h=!1,p=!1)=>{const x=p&&i?n:o;return h&&s.add(d),x.add(d),d},cancel:d=>{o.delete(d),s.delete(d)},process:d=>{if(l=d,i){r=!0;return}i=!0;const h=n;n=o,o=h,n.forEach(c),n.clear(),i=!1,r&&(r=!1,u.process(d))}};return u}const al=40;function gs(e,t){let n=!1,o=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,s=et.reduce((S,C)=>(S[C]=rl(r),S),{}),{setup:l,read:c,resolveKeyframes:u,preUpdate:d,update:h,preRender:p,render:m,postRender:x}=s,g=()=>{const S=ue.useManualTiming,C=S?i.timestamp:performance.now();n=!1,S||(i.delta=o?1e3/60:Math.max(Math.min(C-i.timestamp,al),1)),i.timestamp=C,i.isProcessing=!0,l.process(i),c.process(i),u.process(i),d.process(i),h.process(i),p.process(i),m.process(i),x.process(i),i.isProcessing=!1,n&&t&&(o=!1,e(g))},b=()=>{n=!0,o=!0,i.isProcessing||e(g)};return{schedule:et.reduce((S,C)=>{const j=s[C];return S[C]=(F,D=!1,A=!1)=>(n||b(),j.schedule(F,D,A)),S},{}),cancel:S=>{for(let C=0;C<et.length;C++)s[et[C]].cancel(S)},state:i,steps:s}}const{schedule:M,cancel:fe,state:W,steps:Pt}=gs(typeof requestAnimationFrame<"u"?requestAnimationFrame:Z,!0);let st;function ll(){st=void 0}const N={now:()=>(st===void 0&&N.set(W.isProcessing||ue.useManualTiming?W.timestamp:performance.now()),st),set:e=>{st=e,queueMicrotask(ll)}},ys=e=>t=>typeof t=="string"&&t.startsWith(e),bs=ys("--"),cl=ys("var(--"),Pn=e=>cl(e)?dl.test(e.split("/*")[0].trim()):!1,dl=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function uo(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Le={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ue={...Le,transform:e=>ie(0,1,e)},tt={...Le,default:1},He=e=>Math.round(e*1e5)/1e5,Mn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function ul(e){return e==null}const fl=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Rn=(e,t)=>n=>!!(typeof n=="string"&&fl.test(n)&&n.startsWith(e)||t&&!ul(n)&&Object.prototype.hasOwnProperty.call(n,t)),vs=(e,t,n)=>o=>{if(typeof o!="string")return o;const[i,r,s,l]=o.match(Mn);return{[e]:parseFloat(i),[t]:parseFloat(r),[n]:parseFloat(s),alpha:l!==void 0?parseFloat(l):1}},hl=e=>ie(0,255,e),Mt={...Le,transform:e=>Math.round(hl(e))},ye={test:Rn("rgb","red"),parse:vs("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:o=1})=>"rgba("+Mt.transform(e)+", "+Mt.transform(t)+", "+Mt.transform(n)+", "+He(Ue.transform(o))+")"};function pl(e){let t="",n="",o="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),o=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),o=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,o+=o,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(o,16),alpha:i?parseInt(i,16)/255:1}}const Zt={test:Rn("#"),parse:pl,transform:ye.transform},Ze=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),le=Ze("deg"),oe=Ze("%"),B=Ze("px"),ml=Ze("vh"),xl=Ze("vw"),fo={...oe,parse:e=>oe.parse(e)/100,transform:e=>oe.transform(e*100)},Be={test:Rn("hsl","hue"),parse:vs("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:o=1})=>"hsla("+Math.round(e)+", "+oe.transform(He(t))+", "+oe.transform(He(n))+", "+He(Ue.transform(o))+")"},I={test:e=>ye.test(e)||Zt.test(e)||Be.test(e),parse:e=>ye.test(e)?ye.parse(e):Be.test(e)?Be.parse(e):Zt.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ye.transform(e):Be.transform(e),getAnimatableNone:e=>{const t=I.parse(e);return t.alpha=0,I.transform(t)}},gl=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function yl(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Mn))==null?void 0:t.length)||0)+(((n=e.match(gl))==null?void 0:n.length)||0)>0}const ws="number",Ss="color",bl="var",vl="var(",ho="${}",wl=/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 Pe(e){const t=e.toString(),n=[],o={color:[],number:[],var:[]},i=[];let r=0;const l=t.replace(wl,c=>(I.test(c)?(o.color.push(r),i.push(Ss),n.push(I.parse(c))):c.startsWith(vl)?(o.var.push(r),i.push(bl),n.push(c)):(o.number.push(r),i.push(ws),n.push(parseFloat(c))),++r,ho)).split(ho);return{values:n,split:l,indexes:o,types:i}}function Sl(e){return Pe(e).values}function js({split:e,types:t}){const n=e.length;return o=>{let i="";for(let r=0;r<n;r++)if(i+=e[r],o[r]!==void 0){const s=t[r];s===ws?i+=He(o[r]):s===Ss?i+=I.transform(o[r]):i+=o[r]}return i}}function jl(e){return js(Pe(e))}const Cl=e=>typeof e=="number"?0:I.test(e)?I.getAnimatableNone(e):e,Fl=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:Cl(e);function Tl(e){const t=Pe(e);return js(t)(t.values.map((o,i)=>Fl(o,t.split[i])))}const Q={test:yl,parse:Sl,createTransformer:jl,getAnimatableNone:Tl};function Rt(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function kl({hue:e,saturation:t,lightness:n,alpha:o}){e/=360,t/=100,n/=100;let i=0,r=0,s=0;if(!t)i=r=s=n;else{const l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;i=Rt(c,l,e+1/3),r=Rt(c,l,e),s=Rt(c,l,e-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(s*255),alpha:o}}function mt(e,t){return n=>n>0?t:e}const R=(e,t,n)=>e+(t-e)*n,Vt=(e,t,n)=>{const o=e*e,i=n*(t*t-o)+o;return i<0?0:Math.sqrt(i)},Bl=[Zt,ye,Be],Al=e=>Bl.find(t=>t.test(e));function po(e){const t=Al(e);if(Ve(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===Be&&(n=kl(n)),n}const mo=(e,t)=>{const n=po(e),o=po(t);if(!n||!o)return mt(e,t);const i={...n};return r=>(i.red=Vt(n.red,o.red,r),i.green=Vt(n.green,o.green,r),i.blue=Vt(n.blue,o.blue,r),i.alpha=R(n.alpha,o.alpha,r),ye.transform(i))},qt=new Set(["none","hidden"]);function Dl(e,t){return qt.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function El(e,t){return n=>R(e,t,n)}function Vn(e){return typeof e=="number"?El:typeof e=="string"?Pn(e)?mt:I.test(e)?mo:Rl:Array.isArray(e)?Cs:typeof e=="object"?I.test(e)?mo:Pl:mt}function Cs(e,t){const n=[...e],o=n.length,i=e.map((r,s)=>Vn(r)(r,t[s]));return r=>{for(let s=0;s<o;s++)n[s]=i[s](r);return n}}function Pl(e,t){const n={...e,...t},o={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(o[i]=Vn(e[i])(e[i],t[i]));return i=>{for(const r in o)n[r]=o[r](i);return n}}function Ml(e,t){const n=[],o={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const r=t.types[i],s=e.indexes[r][o[r]],l=e.values[s]??0;n[i]=l,o[r]++}return n}const Rl=(e,t)=>{const n=Q.createTransformer(t),o=Pe(e),i=Pe(t);return o.indexes.var.length===i.indexes.var.length&&o.indexes.color.length===i.indexes.color.length&&o.indexes.number.length>=i.indexes.number.length?qt.has(e)&&!i.values.length||qt.has(t)&&!o.values.length?Dl(e,t):Ye(Cs(Ml(o,i),i.values),n):(Ve(!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.`,"complex-values-different"),mt(e,t))};function Fs(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?R(e,t,n):Vn(e)(e,t)}const Vl=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>M.update(t,n),stop:()=>fe(t),now:()=>W.isProcessing?W.timestamp:N.now()}},Ts=(e,t,n=10)=>{let o="";const i=Math.max(Math.round(t/n),2);for(let r=0;r<i;r++)o+=Math.round(e(r/(i-1))*1e4)/1e4+", ";return`linear(${o.substring(0,o.length-2)})`},xt=2e4;function Ln(e){let t=0;const n=50;let o=e.next(t);for(;!o.done&&t<xt;)t+=n,o=e.next(t);return t>=xt?1/0:t}function Ll(e,t=100,n){const o=n({...e,keyframes:[0,t]}),i=Math.min(Ln(o),xt);return{type:"keyframes",ease:r=>o.next(i*r).value/t,duration:X(i)}}const V={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};function Jt(e,t){return e*Math.sqrt(1-t*t)}const Il=12;function zl(e,t,n){let o=n;for(let i=1;i<Il;i++)o=o-e(o)/t(o);return o}const Lt=.001;function Ol({duration:e=V.duration,bounce:t=V.bounce,velocity:n=V.velocity,mass:o=V.mass}){let i,r;Ve(e<=$(V.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let s=1-t;s=ie(V.minDamping,V.maxDamping,s),e=ie(V.minDuration,V.maxDuration,X(e)),s<1?(i=u=>{const d=u*s,h=d*e,p=d-n,m=Jt(u,s),x=Math.exp(-h);return Lt-p/m*x},r=u=>{const h=u*s*e,p=h*n+n,m=Math.pow(s,2)*Math.pow(u,2)*e,x=Math.exp(-h),g=Jt(Math.pow(u,2),s);return(-i(u)+Lt>0?-1:1)*((p-m)*x)/g}):(i=u=>{const d=Math.exp(-u*e),h=(u-n)*e+1;return-Lt+d*h},r=u=>{const d=Math.exp(-u*e),h=(n-u)*(e*e);return d*h});const l=5/e,c=zl(i,r,l);if(e=$(e),isNaN(c))return{stiffness:V.stiffness,damping:V.damping,duration:e};{const u=Math.pow(c,2)*o;return{stiffness:u,damping:s*2*Math.sqrt(o*u),duration:e}}}const Wl=["duration","bounce"],Hl=["stiffness","damping","mass"];function xo(e,t){return t.some(n=>e[n]!==void 0)}function Nl(e){let t={velocity:V.velocity,stiffness:V.stiffness,damping:V.damping,mass:V.mass,isResolvedFromDuration:!1,...e};if(!xo(e,Hl)&&xo(e,Wl))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,o=2*Math.PI/(n*1.2),i=o*o,r=2*ie(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:V.mass,stiffness:i,damping:r}}else{const n=Ol({...e,velocity:0});t={...t,...n,mass:V.mass},t.isResolvedFromDuration=!0}return t}function gt(e=V.visualDuration,t=V.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:o,restDelta:i}=n;const r=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],l={done:!1,value:r},{stiffness:c,damping:u,mass:d,duration:h,velocity:p,isResolvedFromDuration:m}=Nl({...n,velocity:-X(n.velocity||0)}),x=p||0,g=u/(2*Math.sqrt(c*d)),b=s-r,y=X(Math.sqrt(c/d)),v=Math.abs(b)<5;o||(o=v?V.restSpeed.granular:V.restSpeed.default),i||(i=v?V.restDelta.granular:V.restDelta.default);let S,C,j,F,D,A;if(g<1)j=Jt(y,g),F=(x+g*y*b)/j,S=k=>{const E=Math.exp(-g*y*k);return s-E*(F*Math.sin(j*k)+b*Math.cos(j*k))},D=g*y*F+b*j,A=g*y*b-F*j,C=k=>Math.exp(-g*y*k)*(D*Math.sin(j*k)+A*Math.cos(j*k));else if(g===1){S=E=>s-Math.exp(-y*E)*(b+(x+y*b)*E);const k=x+y*b;C=E=>Math.exp(-y*E)*(y*k*E-x)}else{const k=y*Math.sqrt(g*g-1);S=G=>{const K=Math.exp(-g*y*G),ee=Math.min(k*G,300);return s-K*((x+g*y*b)*Math.sinh(ee)+k*b*Math.cosh(ee))/k};const E=(x+g*y*b)/k,P=g*y*E-b*k,U=g*y*b-E*k;C=G=>{const K=Math.exp(-g*y*G),ee=Math.min(k*G,300);return K*(P*Math.sinh(ee)+U*Math.cosh(ee))}}const T={calculatedDuration:m&&h||null,velocity:k=>$(C(k)),next:k=>{if(!m&&g<1){const P=Math.exp(-g*y*k),U=Math.sin(j*k),G=Math.cos(j*k),K=s-P*(F*U+b*G),ee=$(P*(D*U+A*G));return l.done=Math.abs(ee)<=o&&Math.abs(s-K)<=i,l.value=l.done?s:K,l}const E=S(k);if(m)l.done=k>=h;else{const P=$(C(k));l.done=Math.abs(P)<=o&&Math.abs(s-E)<=i}return l.value=l.done?s:E,l},toString:()=>{const k=Math.min(Ln(T),xt),E=Ts(P=>T.next(k*P).value,k,30);return k+"ms "+E},toTransition:()=>{}};return T}gt.applyToOptions=e=>{const t=Ll(e,100,gt);return e.ease=t.ease,e.duration=$(t.duration),e.type="keyframes",e};const _l=5;function ks(e,t,n){const o=Math.max(t-_l,0);return rs(n-e(o),t-o)}function Qt({keyframes:e,velocity:t=0,power:n=.8,timeConstant:o=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:s,min:l,max:c,restDelta:u=.5,restSpeed:d}){const h=e[0],p={done:!1,value:h},m=A=>l!==void 0&&A<l||c!==void 0&&A>c,x=A=>l===void 0?c:c===void 0||Math.abs(l-A)<Math.abs(c-A)?l:c;let g=n*t;const b=h+g,y=s===void 0?b:s(b);y!==b&&(g=y-h);const v=A=>-g*Math.exp(-A/o),S=A=>y+v(A),C=A=>{const T=v(A),k=S(A);p.done=Math.abs(T)<=u,p.value=p.done?y:k};let j,F;const D=A=>{m(p.value)&&(j=A,F=gt({keyframes:[p.value,x(p.value)],velocity:ks(S,A,p.value),damping:i,stiffness:r,restDelta:u,restSpeed:d}))};return D(0),{calculatedDuration:null,next:A=>{let T=!1;return!F&&j===void 0&&(T=!0,C(A),D(A)),j!==void 0&&A>=j?F.next(A-j):(!T&&C(A),p)}}}function $l(e,t,n){const o=[],i=n||ue.mix||Fs,r=e.length-1;for(let s=0;s<r;s++){let l=i(e[s],e[s+1]);if(t){const c=Array.isArray(t)?t[s]||Z:t;l=Ye(c,l)}o.push(l)}return o}function Ul(e,t,{clamp:n=!0,ease:o,mixer:i}={}){const r=e.length;if(se(r===t.length,"Both input and output ranges must be the same length","range-length"),r===1)return()=>t[0];if(r===2&&t[0]===t[1])return()=>t[1];const s=e[0]===e[1];e[0]>e[r-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=$l(t,o,i),c=l.length,u=d=>{if(s&&d<e[0])return t[0];let h=0;if(c>1)for(;h<e.length-2&&!(d<e[h+1]);h++);const p=$e(e[h],e[h+1],d);return l[h](p)};return n?d=>u(ie(e[0],e[r-1],d)):u}function Gl(e,t){const n=e[e.length-1];for(let o=1;o<=t;o++){const i=$e(0,t,o);e.push(R(n,1,i))}}function Kl(e){const t=[0];return Gl(t,e.length-1),t}function Yl(e,t){return e.map(n=>n*t)}function Xl(e,t){return e.map(()=>t||ms).splice(0,e.length-1)}function Ae({duration:e=300,keyframes:t,times:n,ease:o="easeInOut"}){const i=il(o)?o.map(co):co(o),r={done:!1,value:t[0]},s=Yl(n&&n.length===t.length?n:Kl(t),e),l=Ul(s,t,{ease:Array.isArray(i)?i:Xl(t,i)});return{calculatedDuration:e,next:c=>(r.value=l(c),r.done=c>=e,r)}}const Zl=e=>e!==null;function Ft(e,{repeat:t,repeatType:n="loop"},o,i=1){const r=e.filter(Zl),l=i<0||t&&n!=="loop"&&t%2===1?0:r.length-1;return!l||o===void 0?r[l]:o}const ql={decay:Qt,inertia:Qt,tween:Ae,keyframes:Ae,spring:gt};function Bs(e){typeof e.type=="string"&&(e.type=ql[e.type])}class In{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const Jl=e=>e/100;class yt extends In{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var o,i;const{motionValue:n}=this.options;n&&n.updatedAt!==N.now()&&this.tick(N.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(o=this.options).onStop)==null||i.call(o))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Bs(t);const{type:n=Ae,repeat:o=0,repeatDelay:i=0,repeatType:r,velocity:s=0}=t;let{keyframes:l}=t;const c=n||Ae;process.env.NODE_ENV!=="production"&&c!==Ae&&se(l.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${l}`,"spring-two-frames"),c!==Ae&&typeof l[0]!="number"&&(this.mixKeyframes=Ye(Jl,Fs(l[0],l[1])),l=[0,100]);const u=c({...t,keyframes:l});r==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...l].reverse(),velocity:-s})),u.calculatedDuration===null&&(u.calculatedDuration=Ln(u));const{calculatedDuration:d}=u;this.calculatedDuration=d,this.resolvedDuration=d+i,this.totalDuration=this.resolvedDuration*(o+1)-i,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:o,totalDuration:i,mixKeyframes:r,mirroredGenerator:s,resolvedDuration:l,calculatedDuration:c}=this;if(this.startTime===null)return o.next(0);const{delay:u=0,keyframes:d,repeat:h,repeatType:p,repeatDelay:m,type:x,onUpdate:g,finalKeyframe:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const y=this.currentTime-u*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let S=this.currentTime,C=o;if(h){const A=Math.min(this.currentTime,i)/l;let T=Math.floor(A),k=A%1;!k&&A>=1&&(k=1),k===1&&T--,T=Math.min(T,h+1),!!(T%2)&&(p==="reverse"?(k=1-k,m&&(k-=m/l)):p==="mirror"&&(C=s)),S=ie(0,1,k)*l}let j;v?(this.delayState.value=d[0],j=this.delayState):j=C.next(S),r&&!v&&(j.value=r(j.value));let{done:F}=j;!v&&c!==null&&(F=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const D=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&F);return D&&x!==Qt&&(j.value=Ft(d,this.options,b,this.speed)),g&&g(j.value),D&&this.finish(),j}then(t,n){return this.finished.then(t,n)}get duration(){return X(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+X(t)}get time(){return X(this.currentTime)}set time(t){t=$(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const n=this.generator.next(t).value;return ks(o=>this.generator.next(o).value,t,n)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(N.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=X(this.currentTime))}play(){var i,r;if(this.isStopped)return;const{driver:t=Vl,startTime:n}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),(r=(i=this.options).onPlay)==null||r.call(i);const o=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=o):this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime||(this.startTime=n??o),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(N.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function Ql(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const be=e=>e*180/Math.PI,en=e=>{const t=be(Math.atan2(e[1],e[0]));return tn(t)},ec={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:en,rotateZ:en,skewX:e=>be(Math.atan(e[1])),skewY:e=>be(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},tn=e=>(e=e%360,e<0&&(e+=360),e),go=en,yo=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),bo=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),tc={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:yo,scaleY:bo,scale:e=>(yo(e)+bo(e))/2,rotateX:e=>tn(be(Math.atan2(e[6],e[5]))),rotateY:e=>tn(be(Math.atan2(-e[2],e[0]))),rotateZ:go,rotate:go,skewX:e=>be(Math.atan(e[4])),skewY:e=>be(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function nn(e){return e.includes("scale")?1:0}function on(e,t){if(!e||e==="none")return nn(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let o,i;if(n)o=tc,i=n;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);o=ec,i=l}if(!i)return nn(t);const r=o[t],s=i[1].split(",").map(oc);return typeof r=="function"?r(s):s[r]}const nc=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return on(n,t)};function oc(e){return parseFloat(e.trim())}const Ie=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ze=new Set(Ie),vo=e=>e===Le||e===B,ic=new Set(["x","y","z"]),sc=Ie.filter(e=>!ic.has(e));function rc(e){const t=[];return sc.forEach(n=>{const o=e.getValue(n);o!==void 0&&(t.push([n,o.get()]),o.set(n.startsWith("scale")?1:0))}),t}const de={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:o})=>{const i=e.max-e.min;return o==="border-box"?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:o})=>{const i=e.max-e.min;return o==="border-box"?i:i-parseFloat(t)-parseFloat(n)},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:(e,{transform:t})=>on(t,"x"),y:(e,{transform:t})=>on(t,"y")};de.translateX=de.x;de.translateY=de.y;const je=new Set;let sn=!1,rn=!1,an=!1;function As(){if(rn){const e=Array.from(je).filter(o=>o.needsMeasurement),t=new Set(e.map(o=>o.element)),n=new Map;t.forEach(o=>{const i=rc(o);i.length&&(n.set(o,i),o.render())}),e.forEach(o=>o.measureInitialState()),t.forEach(o=>{o.render();const i=n.get(o);i&&i.forEach(([r,s])=>{var l;(l=o.getValue(r))==null||l.set(s)})}),e.forEach(o=>o.measureEndState()),e.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}rn=!1,sn=!1,je.forEach(e=>e.complete(an)),je.clear()}function Ds(){je.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(rn=!0)})}function ac(){an=!0,Ds(),As(),an=!1}class zn{constructor(t,n,o,i,r,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=o,this.motionValue=i,this.element=r,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(je.add(this),sn||(sn=!0,M.read(Ds),M.resolveKeyframes(As))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:o,motionValue:i}=this;if(t[0]===null){const r=i==null?void 0:i.get(),s=t[t.length-1];if(r!==void 0)t[0]=r;else if(o&&n){const l=o.readValue(n,s);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=s),i&&r===void 0&&i.set(t[0])}Ql(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),je.delete(this)}cancel(){this.state==="scheduled"&&(je.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const lc=e=>e.startsWith("--");function Es(e,t,n){lc(t)?e.style.setProperty(t,n):e.style[t]=n}const cc={};function Ps(e,t){const n=ss(e);return()=>cc[t]??n()}const dc=Ps(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Ms=Ps(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),We=([e,t,n,o])=>`cubic-bezier(${e}, ${t}, ${n}, ${o})`,wo={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:We([0,.65,.55,1]),circOut:We([.55,0,1,.45]),backIn:We([.31,.01,.66,-.59]),backOut:We([.33,1.53,.69,.99])};function Rs(e,t){if(e)return typeof e=="function"?Ms()?Ts(e,t):"ease-out":xs(e)?We(e):Array.isArray(e)?e.map(n=>Rs(n,t)||wo.easeOut):wo[e]}function uc(e,t,n,{delay:o=0,duration:i=300,repeat:r=0,repeatType:s="loop",ease:l="easeOut",times:c}={},u=void 0){const d={[t]:n};c&&(d.offset=c);const h=Rs(l,i);Array.isArray(h)&&(d.easing=h);const p={delay:o,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:r+1,direction:s==="reverse"?"alternate":"normal"};return u&&(p.pseudoElement=u),e.animate(d,p)}function Vs(e){return typeof e=="function"&&"applyToOptions"in e}function fc({type:e,...t}){return Vs(e)&&Ms()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Ls extends In{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:o,keyframes:i,pseudoElement:r,allowFlatten:s=!1,finalKeyframe:l,onComplete:c}=t;this.isPseudoElement=!!r,this.allowFlatten=s,this.options=t,se(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=fc(t);this.animation=uc(n,o,i,u,r),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const d=Ft(i,this.options,l,this.speed);this.updateMotionValue&&this.updateMotionValue(d),Es(n,o,d),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,o,i;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((i=(o=this.animation).commitStyles)==null||i.call(o))}get duration(){var n,o;const t=((o=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:o.call(n).duration)||0;return X(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+X(t)}get time(){return X(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=$(t),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:n,rangeEnd:o,observe:i}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&dc()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),o&&(this.animation.rangeEnd=o),Z):i(this)}}const Is={anticipate:fs,backInOut:us,circInOut:ps};function hc(e){return e in Is}function pc(e){typeof e.ease=="string"&&hc(e.ease)&&(e.ease=Is[e.ease])}const It=10;class mc extends Ls{constructor(t){pc(t),Bs(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:o,onComplete:i,element:r,...s}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const l=new yt({...s,autoplay:!1}),c=Math.max(It,N.now()-this.startTime),u=ie(0,It,c-It),d=l.sample(c).value,{name:h}=this.options;r&&h&&Es(r,h,d),n.setWithVelocity(l.sample(Math.max(0,c-u)).value,d,u),l.stop()}}const So=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Q.test(e)||e==="0")&&!e.startsWith("url("));function xc(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function gc(e,t,n,o){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const r=e[e.length-1],s=So(i,t),l=So(r,t);return Ve(s===l,`You are trying to animate ${t} from "${i}" to "${r}". "${s?r:i}" is not an animatable value.`,"value-not-animatable"),!s||!l?!1:xc(e)||(n==="spring"||Vs(n))&&o}function ln(e){e.duration=0,e.type="keyframes"}const zs=new Set(["opacity","clipPath","filter","transform"]),yc=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function bc(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&yc.test(e[t]))return!0;return!1}const vc=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),wc=ss(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Sc(e){var h;const{motionValue:t,name:n,repeatDelay:o,repeatType:i,damping:r,type:s,keyframes:l}=e;if(!(((h=t==null?void 0:t.owner)==null?void 0:h.current)instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:d}=t.owner.getProps();return wc()&&n&&(zs.has(n)||vc.has(n)&&bc(l))&&(n!=="transform"||!d)&&!u&&!o&&i!=="mirror"&&r!==0&&s!=="inertia"}const jc=40;class Cc extends In{constructor({autoplay:t=!0,delay:n=0,type:o="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:s="loop",keyframes:l,name:c,motionValue:u,element:d,...h}){var x;super(),this.stop=()=>{var g,b;this._animation&&(this._animation.stop(),(g=this.stopTimeline)==null||g.call(this)),(b=this.keyframeResolver)==null||b.cancel()},this.createdAt=N.now();const p={autoplay:t,delay:n,type:o,repeat:i,repeatDelay:r,repeatType:s,name:c,motionValue:u,element:d,...h},m=(d==null?void 0:d.KeyframeResolver)||zn;this.keyframeResolver=new m(l,(g,b,y)=>this.onKeyframesResolved(g,b,p,!y),c,u,d),(x=this.keyframeResolver)==null||x.scheduleResolve()}onKeyframesResolved(t,n,o,i){var y,v;this.keyframeResolver=void 0;const{name:r,type:s,velocity:l,delay:c,isHandoff:u,onUpdate:d}=o;this.resolvedAt=N.now();let h=!0;gc(t,r,s,l)||(h=!1,(ue.instantAnimations||!c)&&(d==null||d(Ft(t,o,n))),t[0]=t[t.length-1],ln(o),o.repeat=0);const m={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>jc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...o,keyframes:t},x=h&&!u&&Sc(m),g=(v=(y=m.motionValue)==null?void 0:y.owner)==null?void 0:v.current;let b;if(x)try{b=new mc({...m,element:g})}catch{b=new yt(m)}else b=new yt(m);b.finished.then(()=>{this.notifyFinished()}).catch(Z),this.pendingTimeline&&(this.stopTimeline=b.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=b}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),ac()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function Os(e,t,n,o=0,i=1){const r=Array.from(e).sort((u,d)=>u.sortNodePosition(d)).indexOf(t),s=e.size,l=(s-1)*o;return typeof n=="function"?n(r,s):i===1?r*o:l-r*o}const Fc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Tc(e){const t=Fc.exec(e);if(!t)return[,];const[,n,o,i]=t;return[`--${n??o}`,i]}const kc=4;function Ws(e,t,n=1){se(n<=kc,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[o,i]=Tc(e);if(!o)return;const r=window.getComputedStyle(t).getPropertyValue(o);if(r){const s=r.trim();return ns(s)?parseFloat(s):s}return Pn(i)?Ws(i,t,n+1):i}const Bc={type:"spring",stiffness:500,damping:25,restSpeed:10},Ac=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Dc={type:"keyframes",duration:.8},Ec={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Pc=(e,{keyframes:t})=>t.length>2?Dc:ze.has(e)?e.startsWith("scale")?Ac(t[1]):Bc:Ec;function Hs(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...o}=e;return{...t,...o}}return e}function On(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?Hs(n,e):n}const Mc=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function Rc(e){for(const t in e)if(!Mc.has(t))return!0;return!1}const Wn=(e,t,n,o={},i,r)=>s=>{const l=On(o,e)||{},c=l.delay||o.delay||0;let{elapsed:u=0}=o;u=u-$(c);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:p=>{t.set(p),l.onUpdate&&l.onUpdate(p)},onComplete:()=>{s(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:r?void 0:i};Rc(l)||Object.assign(d,Pc(e,d)),d.duration&&(d.duration=$(d.duration)),d.repeatDelay&&(d.repeatDelay=$(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let h=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(ln(d),d.delay===0&&(h=!0)),(ue.instantAnimations||ue.skipAnimations||i!=null&&i.shouldSkipAnimations)&&(h=!0,ln(d),d.delay=0),d.allowFlatten=!l.type&&!l.ease,h&&!r&&t.get()!==void 0){const p=Ft(d.keyframes,l);if(p!==void 0){M.update(()=>{d.onUpdate(p),d.onComplete()});return}}return l.isSync?new yt(d):new Cc(d)};function jo(e){const t=[{},{}];return e==null||e.values.forEach((n,o)=>{t[0][o]=n.get(),t[1][o]=n.getVelocity()}),t}function Hn(e,t,n,o){if(typeof t=="function"){const[i,r]=jo(o);t=t(n!==void 0?n:e.custom,i,r)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,r]=jo(o);t=t(n!==void 0?n:e.custom,i,r)}return t}function Ce(e,t,n){const o=e.getProps();return Hn(o,t,n!==void 0?n:o.custom,e)}const Ns=new Set(["width","height","top","left","right","bottom",...Ie]),Co=30,Vc=e=>!isNaN(parseFloat(e));class Lc{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=o=>{var r;const i=N.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&((r=this.events.change)==null||r.notify(this.current),this.dependents))for(const s of this.dependents)s.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=N.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Vc(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&An(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Bn);const o=this.events[t].add(n);return t==="change"?()=>{o(),M.read(()=>{this.events.change.getSize()||this.stop()})}:o}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,o){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-o}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=N.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Co)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Co);return rs(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Me(e,t){return new Lc(e,t)}const cn=e=>Array.isArray(e);function Ic(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Me(n))}function zc(e){return cn(e)?e[e.length-1]||0:e}function Oc(e,t){const n=Ce(e,t);let{transitionEnd:o={},transition:i={},...r}=n||{};r={...r,...o};for(const s in r){const l=zc(r[s]);Ic(e,s,l)}}const H=e=>!!(e&&e.getVelocity);function Wc(e){return!!(H(e)&&e.add)}function dn(e,t){const n=e.getValue("willChange");if(Wc(n))return n.add(t);if(!n&&ue.WillChange){const o=new ue.WillChange("auto");e.addValue("willChange",o),o.add(t)}}function Nn(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Hc="framerAppearId",_s="data-"+Nn(Hc);function $s(e){return e.props[_s]}function Nc({protectedKeys:e,needsAnimating:t},n){const o=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,o}function Us(e,t,{delay:n=0,transitionOverride:o,type:i}={}){let{transition:r,transitionEnd:s,...l}=t;const c=e.getDefaultTransition();r=r?Hs(r,c):c;const u=r==null?void 0:r.reduceMotion;o&&(r=o);const d=[],h=i&&e.animationState&&e.animationState.getState()[i];for(const p in l){const m=e.getValue(p,e.latestValues[p]??null),x=l[p];if(x===void 0||h&&Nc(h,p))continue;const g={delay:n,...On(r||{},p)},b=m.get();if(b!==void 0&&!m.isAnimating()&&!Array.isArray(x)&&x===b&&!g.velocity){M.update(()=>m.set(x));continue}let y=!1;if(window.MotionHandoffAnimation){const C=$s(e);if(C){const j=window.MotionHandoffAnimation(C,p,M);j!==null&&(g.startTime=j,y=!0)}}dn(e,p);const v=u??e.shouldReduceMotion;m.start(Wn(p,m,x,v&&Ns.has(p)?{type:!1}:g,e,y));const S=m.animation;S&&d.push(S)}if(s){const p=()=>M.update(()=>{s&&Oc(e,s)});d.length?Promise.all(d).then(p):p()}return d}function un(e,t,n={}){var c;const o=Ce(e,t,n.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const r=o?()=>Promise.all(Us(e,o,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:h,staggerDirection:p}=i;return _c(e,t,u,d,h,p,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[u,d]=l==="beforeChildren"?[r,s]:[s,r];return u().then(()=>d())}else return Promise.all([r(),s(n.delay)])}function _c(e,t,n=0,o=0,i=0,r=1,s){const l=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),l.push(un(c,t,{...s,delay:n+(typeof o=="function"?0:o)+Os(e.variantChildren,c,o,i,r)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(l)}function $c(e,t,n={}){e.notify("AnimationStart",t);let o;if(Array.isArray(t)){const i=t.map(r=>un(e,r,n));o=Promise.all(i)}else if(typeof t=="string")o=un(e,t,n);else{const i=typeof t=="function"?Ce(e,t,n.custom):t;o=Promise.all(Us(e,i,n))}return o.then(()=>{e.notify("AnimationComplete",t)})}const Uc={test:e=>e==="auto",parse:e=>e},Gs=e=>t=>t.test(e),Ks=[Le,B,oe,le,xl,ml,Uc],Fo=e=>Ks.find(Gs(e));function Gc(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||is(e):!0}const Kc=new Set(["brightness","contrast","saturate","opacity"]);function Yc(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[o]=n.match(Mn)||[];if(!o)return e;const i=n.replace(o,"");let r=Kc.has(t)?1:0;return o!==n&&(r*=100),t+"("+r+i+")"}const Xc=/\b([a-z-]*)\(.*?\)/gu,fn={...Q,getAnimatableNone:e=>{const t=e.match(Xc);return t?t.map(Yc).join(" "):e}},hn={...Q,getAnimatableNone:e=>{const t=Q.parse(e);return Q.createTransformer(e)(t.map(o=>typeof o=="number"?0:typeof o=="object"?{...o,alpha:1}:o))}},To={...Le,transform:Math.round},Zc={rotate:le,rotateX:le,rotateY:le,rotateZ:le,scale:tt,scaleX:tt,scaleY:tt,scaleZ:tt,skew:le,skewX:le,skewY:le,distance:B,translateX:B,translateY:B,translateZ:B,x:B,y:B,z:B,perspective:B,transformPerspective:B,opacity:Ue,originX:fo,originY:fo,originZ:B},_n={borderWidth:B,borderTopWidth:B,borderRightWidth:B,borderBottomWidth:B,borderLeftWidth:B,borderRadius:B,borderTopLeftRadius:B,borderTopRightRadius:B,borderBottomRightRadius:B,borderBottomLeftRadius:B,width:B,maxWidth:B,height:B,maxHeight:B,top:B,right:B,bottom:B,left:B,inset:B,insetBlock:B,insetBlockStart:B,insetBlockEnd:B,insetInline:B,insetInlineStart:B,insetInlineEnd:B,padding:B,paddingTop:B,paddingRight:B,paddingBottom:B,paddingLeft:B,paddingBlock:B,paddingBlockStart:B,paddingBlockEnd:B,paddingInline:B,paddingInlineStart:B,paddingInlineEnd:B,margin:B,marginTop:B,marginRight:B,marginBottom:B,marginLeft:B,marginBlock:B,marginBlockStart:B,marginBlockEnd:B,marginInline:B,marginInlineStart:B,marginInlineEnd:B,fontSize:B,backgroundPositionX:B,backgroundPositionY:B,...Zc,zIndex:To,fillOpacity:Ue,strokeOpacity:Ue,numOctaves:To},qc={..._n,color:I,backgroundColor:I,outlineColor:I,fill:I,stroke:I,borderColor:I,borderTopColor:I,borderRightColor:I,borderBottomColor:I,borderLeftColor:I,filter:fn,WebkitFilter:fn,mask:hn,WebkitMask:hn},Ys=e=>qc[e],Jc=new Set([fn,hn]);function Xs(e,t){let n=Ys(e);return Jc.has(n)||(n=Q),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Qc=new Set(["auto","none","0"]);function ed(e,t,n){let o=0,i;for(;o<e.length&&!i;){const r=e[o];typeof r=="string"&&!Qc.has(r)&&Pe(r).values.length&&(i=e[o]),o++}if(i&&n)for(const r of t)e[r]=Xs(n,i)}class td extends zn{constructor(t,n,o,i,r){super(t,n,o,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:o}=this;if(!n||!n.current)return;super.readKeyframes();for(let d=0;d<t.length;d++){let h=t[d];if(typeof h=="string"&&(h=h.trim(),Pn(h))){const p=Ws(h,n.current);p!==void 0&&(t[d]=p),d===t.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!Ns.has(o)||t.length!==2)return;const[i,r]=t,s=Fo(i),l=Fo(r),c=uo(i),u=uo(r);if(c!==u&&de[o]){this.needsMeasurement=!0;return}if(s!==l)if(vo(s)&&vo(l))for(let d=0;d<t.length;d++){const h=t[d];typeof h=="string"&&(t[d]=parseFloat(h))}else de[o]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,o=[];for(let i=0;i<t.length;i++)(t[i]===null||Gc(t[i]))&&o.push(i);o.length&&ed(t,o,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:o}=this;if(!t||!t.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=de[o](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(o,i).jump(i,!1)}measureEndState(){var l;const{element:t,name:n,unresolvedKeyframes:o}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const r=o.length-1,s=o[r];o[r]=de[n](t.measureViewportBox(),window.getComputedStyle(t.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),(l=this.removedTransforms)!=null&&l.length&&this.removedTransforms.forEach(([c,u])=>{t.getValue(c).set(u)}),this.resolveNoneKeyframes()}}function Zs(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let o=document;const i=(n==null?void 0:n[e])??o.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(o=>o!=null)}const qs=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function rt(e){return os(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:$n}=gs(queueMicrotask,!1),J={x:!1,y:!1};function Js(){return J.x||J.y}function nd(e){return e==="x"||e==="y"?J[e]?null:(J[e]=!0,()=>{J[e]=!1}):J.x||J.y?null:(J.x=J.y=!0,()=>{J.x=J.y=!1})}function Qs(e,t){const n=Zs(e),o=new AbortController,i={passive:!0,...t,signal:o.signal};return[n,i,()=>o.abort()]}function od(e){return!(e.pointerType==="touch"||Js())}function id(e,t,n={}){const[o,i,r]=Qs(e,n);return o.forEach(s=>{let l=!1,c=!1,u;const d=()=>{s.removeEventListener("pointerleave",x)},h=b=>{u&&(u(b),u=void 0),d()},p=b=>{l=!1,window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",p),c&&(c=!1,h(b))},m=()=>{l=!0,window.addEventListener("pointerup",p,i),window.addEventListener("pointercancel",p,i)},x=b=>{if(b.pointerType!=="touch"){if(l){c=!0;return}h(b)}},g=b=>{if(!od(b))return;c=!1;const y=t(s,b);typeof y=="function"&&(u=y,s.addEventListener("pointerleave",x,i))};s.addEventListener("pointerenter",g,i),s.addEventListener("pointerdown",m,i)}),r}const er=(e,t)=>t?e===t?!0:er(e,t.parentElement):!1,Un=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,sd=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function rd(e){return sd.has(e.tagName)||e.isContentEditable===!0}const ad=new Set(["INPUT","SELECT","TEXTAREA"]);function ld(e){return ad.has(e.tagName)||e.isContentEditable===!0}const at=new WeakSet;function ko(e){return t=>{t.key==="Enter"&&e(t)}}function zt(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const cd=(e,t)=>{const n=e.currentTarget;if(!n)return;const o=ko(()=>{if(at.has(n))return;zt(n,"down");const i=ko(()=>{zt(n,"up")}),r=()=>zt(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",r,t)});n.addEventListener("keydown",o,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",o),t)};function Bo(e){return Un(e)&&!Js()}const Ao=new WeakSet;function dd(e,t,n={}){const[o,i,r]=Qs(e,n),s=l=>{const c=l.currentTarget;if(!Bo(l)||Ao.has(l))return;at.add(c),n.stopPropagation&&Ao.add(l);const u=t(c,l),d=(m,x)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",p),at.has(c)&&at.delete(c),Bo(m)&&typeof u=="function"&&u(m,{success:x})},h=m=>{d(m,c===window||c===document||n.useGlobalTarget||er(c,m.target))},p=m=>{d(m,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",p,i)};return o.forEach(l=>{(n.useGlobalTarget?window:l).addEventListener("pointerdown",s,i),rt(l)&&(l.addEventListener("focus",u=>cd(u,i)),!rd(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),r}function Gn(e){return os(e)&&"ownerSVGElement"in e}const lt=new WeakMap;let ce;const tr=(e,t,n)=>(o,i)=>i&&i[0]?i[0][e+"Size"]:Gn(o)&&"getBBox"in o?o.getBBox()[t]:o[n],ud=tr("inline","width","offsetWidth"),fd=tr("block","height","offsetHeight");function hd({target:e,borderBoxSize:t}){var n;(n=lt.get(e))==null||n.forEach(o=>{o(e,{get width(){return ud(e,t)},get height(){return fd(e,t)}})})}function pd(e){e.forEach(hd)}function md(){typeof ResizeObserver>"u"||(ce=new ResizeObserver(pd))}function xd(e,t){ce||md();const n=Zs(e);return n.forEach(o=>{let i=lt.get(o);i||(i=new Set,lt.set(o,i)),i.add(t),ce==null||ce.observe(o)}),()=>{n.forEach(o=>{const i=lt.get(o);i==null||i.delete(t),i!=null&&i.size||ce==null||ce.unobserve(o)})}}const ct=new Set;let De;function gd(){De=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};ct.forEach(t=>t(e))},window.addEventListener("resize",De)}function yd(e){return ct.add(e),De||gd(),()=>{ct.delete(e),!ct.size&&typeof De=="function"&&(window.removeEventListener("resize",De),De=void 0)}}function Do(e,t){return typeof e=="function"?yd(e):xd(e,t)}function bd(e){return Gn(e)&&e.tagName==="svg"}const vd=[...Ks,I,Q],wd=e=>vd.find(Gs(e)),Eo=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ee=()=>({x:Eo(),y:Eo()}),Po=()=>({min:0,max:0}),z=()=>({x:Po(),y:Po()}),Sd=new WeakMap;function Tt(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ge(e){return typeof e=="string"||Array.isArray(e)}const Kn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Yn=["initial",...Kn];function kt(e){return Tt(e.animate)||Yn.some(t=>Ge(e[t]))}function nr(e){return!!(kt(e)||e.variants)}function jd(e,t,n){for(const o in t){const i=t[o],r=n[o];if(H(i))e.addValue(o,i);else if(H(r))e.addValue(o,Me(i,{owner:e}));else if(r!==i)if(e.hasValue(o)){const s=e.getValue(o);s.liveStyle===!0?s.jump(i):s.hasAnimated||s.set(i)}else{const s=e.getStaticValue(o);e.addValue(o,Me(s!==void 0?s:i,{owner:e}))}}for(const o in n)t[o]===void 0&&e.removeValue(o);return t}const pn={current:null},or={current:!1},Cd=typeof window<"u";function Fd(){if(or.current=!0,!!Cd)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>pn.current=e.matches;e.addEventListener("change",t),t()}else pn.current=!1}const Mo=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let bt={};function ir(e){bt=e}function Td(){return bt}class kd{scrapeMotionValuesFromProps(t,n,o){return{}}constructor({parent:t,props:n,presenceContext:o,reducedMotionConfig:i,skipAnimations:r,blockInitialAnimation:s,visualState:l},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=zn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const m=N.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,M.render(this.render,!1,!0))};const{latestValues:u,renderState:d}=l;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=d,this.parent=t,this.props=n,this.presenceContext=o,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=r,this.options=c,this.blockInitialAnimation=!!s,this.isControllingVariants=kt(n),this.isVariantNode=nr(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:h,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in p){const x=p[m];u[m]!==void 0&&H(x)&&x.set(u[m])}}mount(t){var n,o;if(this.hasBeenMounted)for(const i in this.initialValues)(n=this.values.get(i))==null||n.jump(this.initialValues[i]),this.latestValues[i]=this.initialValues[i];this.current=t,Sd.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((i,r)=>this.bindToMotionValue(r,i)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(or.current||Fd(),this.shouldReduceMotion=pn.current),process.env.NODE_ENV!=="production"&&An(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(o=this.parent)==null||o.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),fe(this.notifyUpdate),fe(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const o=this.features[n];o&&(o.unmount(),o.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&zs.has(t)&&this.current instanceof HTMLElement){const{factory:s,keyframes:l,times:c,ease:u,duration:d}=n.accelerate,h=new Ls({element:this.current,name:t,keyframes:l,times:c,ease:u,duration:$(d)}),p=s(h);this.valueSubscriptions.set(t,()=>{p(),h.cancel()});return}const o=ze.has(t);o&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&M.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;typeof window<"u"&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),r&&r(),n.owner&&n.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 bt){const n=bt[t];if(!n)continue;const{isEnabled:o,Feature:i}=n;if(!this.features[t]&&i&&o(this.props)&&(this.features[t]=new i(this)),this.features[t]){const r=this.features[t];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):z()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let o=0;o<Mo.length;o++){const i=Mo[o];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r="on"+i,s=t[r];s&&(this.propEventSubscriptions[i]=this.on(i,s))}this.prevMotionValues=jd(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}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){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const o=this.values.get(t);n!==o&&(o&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let o=this.values.get(t);return o===void 0&&n!==void 0&&(o=Me(n===null?void 0:n,{owner:this}),this.addValue(t,o)),o}readValue(t,n){let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(ns(o)||is(o))?o=parseFloat(o):!wd(o)&&Q.test(n)&&(o=Xs(t,n)),this.setBaseTarget(t,H(o)?o.get():o)),H(o)?o.get():o}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var r;const{initial:n}=this.props;let o;if(typeof n=="string"||typeof n=="object"){const s=Hn(this.props,n,(r=this.presenceContext)==null?void 0:r.custom);s&&(o=s[t])}if(n&&o!==void 0)return o;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!H(i)?i:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Bn),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){$n.render(this.render)}}class sr extends kd{constructor(){super(...arguments),this.KeyframeResolver=td}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const o=t.style;return o?o[n]:void 0}removeValueFromRenderState(t,{vars:n,style:o}){delete n[t],delete o[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;H(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class he{constructor(t){this.isMounted=!1,this.node=t}update(){}}function rr({top:e,left:t,right:n,bottom:o}){return{x:{min:t,max:n},y:{min:e,max:o}}}function Bd({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Ad(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),o=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:o.y,right:o.x}}function Ot(e){return e===void 0||e===1}function mn({scale:e,scaleX:t,scaleY:n}){return!Ot(e)||!Ot(t)||!Ot(n)}function xe(e){return mn(e)||ar(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function ar(e){return Ro(e.x)||Ro(e.y)}function Ro(e){return e&&e!=="0%"}function vt(e,t,n){const o=e-n,i=t*o;return n+i}function Vo(e,t,n,o,i){return i!==void 0&&(e=vt(e,i,o)),vt(e,n,o)+t}function xn(e,t=0,n=1,o,i){e.min=Vo(e.min,t,n,o,i),e.max=Vo(e.max,t,n,o,i)}function lr(e,{x:t,y:n}){xn(e.x,t.translate,t.scale,t.originPoint),xn(e.y,n.translate,n.scale,n.originPoint)}const Lo=.999999999999,Io=1.0000000000001;function Dd(e,t,n,o=!1){var l;const i=n.length;if(!i)return;t.x=t.y=1;let r,s;for(let c=0;c<i;c++){r=n[c],s=r.projectionDelta;const{visualElement:u}=r.options;u&&u.props.style&&u.props.style.display==="contents"||(o&&r.options.layoutScroll&&r.scroll&&r!==r.root&&(ne(e.x,-r.scroll.offset.x),ne(e.y,-r.scroll.offset.y)),s&&(t.x*=s.x.scale,t.y*=s.y.scale,lr(e,s)),o&&xe(r.latestValues)&&dt(e,r.latestValues,(l=r.layout)==null?void 0:l.layoutBox))}t.x<Io&&t.x>Lo&&(t.x=1),t.y<Io&&t.y>Lo&&(t.y=1)}function ne(e,t){e.min+=t,e.max+=t}function zo(e,t,n,o,i=.5){const r=R(e.min,e.max,i);xn(e,t,n,r,o)}function Oo(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function dt(e,t,n){const o=n??e;zo(e.x,Oo(t.x,o.x),t.scaleX,t.scale,t.originX),zo(e.y,Oo(t.y,o.y),t.scaleY,t.scale,t.originY)}function cr(e,t){return rr(Ad(e.getBoundingClientRect(),t))}function Ed(e,t,n){const o=cr(e,n),{scroll:i}=t;return i&&(ne(o.x,i.offset.x),ne(o.y,i.offset.y)),o}const Pd={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Md=Ie.length;function Rd(e,t,n){let o="",i=!0;for(let r=0;r<Md;r++){const s=Ie[r],l=e[s];if(l===void 0)continue;let c=!0;if(typeof l=="number")c=l===(s.startsWith("scale")?1:0);else{const u=parseFloat(l);c=s.startsWith("scale")?u===1:u===0}if(!c||n){const u=qs(l,_n[s]);if(!c){i=!1;const d=Pd[s]||s;o+=`${d}(${u}) `}n&&(t[s]=u)}}return o=o.trim(),n?o=n(t,i?"":o):i&&(o="none"),o}function Xn(e,t,n){const{style:o,vars:i,transformOrigin:r}=e;let s=!1,l=!1;for(const c in t){const u=t[c];if(ze.has(c)){s=!0;continue}else if(bs(c)){i[c]=u;continue}else{const d=qs(u,_n[c]);c.startsWith("origin")?(l=!0,r[c]=d):o[c]=d}}if(t.transform||(s||n?o.transform=Rd(t,e.transform,n):o.transform&&(o.transform="none")),l){const{originX:c="50%",originY:u="50%",originZ:d=0}=r;o.transformOrigin=`${c} ${u} ${d}`}}function dr(e,{style:t,vars:n},o,i){const r=e.style;let s;for(s in t)r[s]=t[s];i==null||i.applyProjectionStyles(r,o);for(s in n)r.setProperty(s,n[s])}function Wo(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Oe={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(B.test(e))e=parseFloat(e);else return e;const n=Wo(e,t.target.x),o=Wo(e,t.target.y);return`${n}% ${o}%`}},Vd={correct:(e,{treeScale:t,projectionDelta:n})=>{const o=e,i=Q.parse(e);if(i.length>5)return o;const r=Q.createTransformer(e),s=typeof i[0]!="number"?1:0,l=n.x.scale*t.x,c=n.y.scale*t.y;i[0+s]/=l,i[1+s]/=c;const u=R(l,c,.5);return typeof i[2+s]=="number"&&(i[2+s]/=u),typeof i[3+s]=="number"&&(i[3+s]/=u),r(i)}},gn={borderRadius:{...Oe,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Oe,borderTopRightRadius:Oe,borderBottomLeftRadius:Oe,borderBottomRightRadius:Oe,boxShadow:Vd};function ur(e,{layout:t,layoutId:n}){return ze.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!gn[e]||e==="opacity")}function Zn(e,t,n){var s;const o=e.style,i=t==null?void 0:t.style,r={};if(!o)return r;for(const l in o)(H(o[l])||i&&H(i[l])||ur(l,e)||((s=n==null?void 0:n.getValue(l))==null?void 0:s.liveStyle)!==void 0)&&(r[l]=o[l]);return r}function Ld(e){return window.getComputedStyle(e)}class Id extends sr{constructor(){super(...arguments),this.type="html",this.renderInstance=dr}readValueFromInstance(t,n){var o;if(ze.has(n))return(o=this.projection)!=null&&o.isProjecting?nn(n):nc(t,n);{const i=Ld(t),r=(bs(n)?i.getPropertyValue(n):i[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(t,{transformPagePoint:n}){return cr(t,n)}build(t,n,o){Xn(t,n,o.transformTemplate)}scrapeMotionValuesFromProps(t,n,o){return Zn(t,n,o)}}const zd={offset:"stroke-dashoffset",array:"stroke-dasharray"},Od={offset:"strokeDashoffset",array:"strokeDasharray"};function Wd(e,t,n=1,o=0,i=!0){e.pathLength=1;const r=i?zd:Od;e[r.offset]=`${-o}`,e[r.array]=`${t} ${n}`}const Hd=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function fr(e,{attrX:t,attrY:n,attrScale:o,pathLength:i,pathSpacing:r=1,pathOffset:s=0,...l},c,u,d){if(Xn(e,l,u),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:p}=e;h.transform&&(p.transform=h.transform,delete h.transform),(p.transform||h.transformOrigin)&&(p.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),p.transform&&(p.transformBox=(d==null?void 0:d.transformBox)??"fill-box",delete h.transformBox);for(const m of Hd)h[m]!==void 0&&(p[m]=h[m],delete h[m]);t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),o!==void 0&&(h.scale=o),i!==void 0&&Wd(h,i,r,s,!1)}const hr=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"]),pr=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Nd(e,t,n,o){dr(e,t,void 0,o);for(const i in t.attrs)e.setAttribute(hr.has(i)?i:Nn(i),t.attrs[i])}function mr(e,t,n){const o=Zn(e,t,n);for(const i in e)if(H(e[i])||H(t[i])){const r=Ie.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;o[r]=e[i]}return o}class _d extends sr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=z}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ze.has(n)){const o=Ys(n);return o&&o.default||0}return n=hr.has(n)?n:Nn(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,o){return mr(t,n,o)}build(t,n,o){fr(t,n,this.isSVGTag,o.transformTemplate,o.style)}renderInstance(t,n,o,i){Nd(t,n,o,i)}mount(t){this.isSVGTag=pr(t.tagName),super.mount(t)}}const $d=Yn.length;function xr(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?xr(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<$d;n++){const o=Yn[n],i=e.props[o];(Ge(i)||i===!1)&&(t[o]=i)}return t}function gr(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let o=0;o<n;o++)if(t[o]!==e[o])return!1;return!0}const Ud=[...Kn].reverse(),Gd=Kn.length;function Kd(e){return t=>Promise.all(t.map(({animation:n,options:o})=>$c(e,n,o)))}function Yd(e){let t=Kd(e),n=Ho(),o=!0,i=!1;const r=u=>(d,h)=>{var m;const p=Ce(e,h,u==="exit"?(m=e.presenceContext)==null?void 0:m.custom:void 0);if(p){const{transition:x,transitionEnd:g,...b}=p;d={...d,...b,...g}}return d};function s(u){t=u(e)}function l(u){const{props:d}=e,h=xr(e.parent)||{},p=[],m=new Set;let x={},g=1/0;for(let y=0;y<Gd;y++){const v=Ud[y],S=n[v],C=d[v]!==void 0?d[v]:h[v],j=Ge(C),F=v===u?S.isActive:null;F===!1&&(g=y);let D=C===h[v]&&C!==d[v]&&j;if(D&&(o||i)&&e.manuallyAnimateOnMount&&(D=!1),S.protectedKeys={...x},!S.isActive&&F===null||!C&&!S.prevProp||Tt(C)||typeof C=="boolean")continue;if(v==="exit"&&S.isActive&&F!==!0){S.prevResolvedValues&&(x={...x,...S.prevResolvedValues});continue}const A=Xd(S.prevProp,C);let T=A||v===u&&S.isActive&&!D&&j||y>g&&j,k=!1;const E=Array.isArray(C)?C:[C];let P=E.reduce(r(v),{});F===!1&&(P={});const{prevResolvedValues:U={}}=S,G={...U,...P},K=O=>{T=!0,m.has(O)&&(k=!0,m.delete(O)),S.needsAnimating[O]=!0;const Y=e.getValue(O);Y&&(Y.liveStyle=!1)};for(const O in G){const Y=P[O],pe=U[O];if(x.hasOwnProperty(O))continue;let Fe=!1;cn(Y)&&cn(pe)?Fe=!gr(Y,pe):Fe=Y!==pe,Fe?Y!=null?K(O):m.add(O):Y!==void 0&&m.has(O)?K(O):S.protectedKeys[O]=!0}S.prevProp=C,S.prevResolvedValues=P,S.isActive&&(x={...x,...P}),(o||i)&&e.blockInitialAnimation&&(T=!1);const ee=D&&A;T&&(!ee||k)&&p.push(...E.map(O=>{const Y={type:v};if(typeof O=="string"&&(o||i)&&!ee&&e.manuallyAnimateOnMount&&e.parent){const{parent:pe}=e,Fe=Ce(pe,O);if(pe.enteringChildren&&Fe){const{delayChildren:Gr}=Fe.transition||{};Y.delay=Os(pe.enteringChildren,e,Gr)}}return{animation:O,options:Y}}))}if(m.size){const y={};if(typeof d.initial!="boolean"){const v=Ce(e,Array.isArray(d.initial)?d.initial[0]:d.initial);v&&v.transition&&(y.transition=v.transition)}m.forEach(v=>{const S=e.getBaseTarget(v),C=e.getValue(v);C&&(C.liveStyle=!0),y[v]=S??null}),p.push({animation:y})}let b=!!p.length;return o&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(b=!1),o=!1,i=!1,b?t(p):Promise.resolve()}function c(u,d){var p;if(n[u].isActive===d)return Promise.resolve();(p=e.variantChildren)==null||p.forEach(m=>{var x;return(x=m.animationState)==null?void 0:x.setActive(u,d)}),n[u].isActive=d;const h=l(u);for(const m in n)n[m].protectedKeys={};return h}return{animateChanges:l,setActive:c,setAnimateFunction:s,getState:()=>n,reset:()=>{n=Ho(),i=!0}}}function Xd(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!gr(t,e):!1}function me(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ho(){return{animate:me(!0),whileInView:me(),whileHover:me(),whileTap:me(),whileDrag:me(),whileFocus:me(),exit:me()}}function yn(e,t){e.min=t.min,e.max=t.max}function q(e,t){yn(e.x,t.x),yn(e.y,t.y)}function No(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const yr=1e-4,Zd=1-yr,qd=1+yr,br=.01,Jd=0-br,Qd=0+br;function _(e){return e.max-e.min}function eu(e,t,n){return Math.abs(e-t)<=n}function _o(e,t,n,o=.5){e.origin=o,e.originPoint=R(t.min,t.max,e.origin),e.scale=_(n)/_(t),e.translate=R(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Zd&&e.scale<=qd||isNaN(e.scale))&&(e.scale=1),(e.translate>=Jd&&e.translate<=Qd||isNaN(e.translate))&&(e.translate=0)}function Ne(e,t,n,o){_o(e.x,t.x,n.x,o?o.originX:void 0),_o(e.y,t.y,n.y,o?o.originY:void 0)}function $o(e,t,n,o=0){const i=o?R(n.min,n.max,o):n.min;e.min=i+t.min,e.max=e.min+_(t)}function tu(e,t,n,o){$o(e.x,t.x,n.x,o==null?void 0:o.x),$o(e.y,t.y,n.y,o==null?void 0:o.y)}function Uo(e,t,n,o=0){const i=o?R(n.min,n.max,o):n.min;e.min=t.min-i,e.max=e.min+_(t)}function wt(e,t,n,o){Uo(e.x,t.x,n.x,o==null?void 0:o.x),Uo(e.y,t.y,n.y,o==null?void 0:o.y)}function Go(e,t,n,o,i){return e-=t,e=vt(e,1/n,o),i!==void 0&&(e=vt(e,1/i,o)),e}function nu(e,t=0,n=1,o=.5,i,r=e,s=e){if(oe.test(t)&&(t=parseFloat(t),t=R(s.min,s.max,t/100)-s.min),typeof t!="number")return;let l=R(r.min,r.max,o);e===r&&(l-=t),e.min=Go(e.min,t,n,l,i),e.max=Go(e.max,t,n,l,i)}function Ko(e,t,[n,o,i],r,s){nu(e,t[n],t[o],t[i],t.scale,r,s)}const ou=["x","scaleX","originX"],iu=["y","scaleY","originY"];function Yo(e,t,n,o){Ko(e.x,t,ou,n?n.x:void 0,o?o.x:void 0),Ko(e.y,t,iu,n?n.y:void 0,o?o.y:void 0)}function Xo(e){return e.translate===0&&e.scale===1}function vr(e){return Xo(e.x)&&Xo(e.y)}function Zo(e,t){return e.min===t.min&&e.max===t.max}function su(e,t){return Zo(e.x,t.x)&&Zo(e.y,t.y)}function qo(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function wr(e,t){return qo(e.x,t.x)&&qo(e.y,t.y)}function Jo(e){return _(e.x)/_(e.y)}function Qo(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function te(e){return[e("x"),e("y")]}function ru(e,t,n){let o="";const i=e.x.translate/t.x,r=e.y.translate/t.y,s=(n==null?void 0:n.z)||0;if((i||r||s)&&(o=`translate3d(${i}px, ${r}px, ${s}px) `),(t.x!==1||t.y!==1)&&(o+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:h,rotateY:p,skewX:m,skewY:x}=n;u&&(o=`perspective(${u}px) ${o}`),d&&(o+=`rotate(${d}deg) `),h&&(o+=`rotateX(${h}deg) `),p&&(o+=`rotateY(${p}deg) `),m&&(o+=`skewX(${m}deg) `),x&&(o+=`skewY(${x}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(o+=`scale(${l}, ${c})`),o||"none"}const Sr=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],au=Sr.length,ei=e=>typeof e=="string"?parseFloat(e):e,ti=e=>typeof e=="number"||B.test(e);function lu(e,t,n,o,i,r){i?(e.opacity=R(0,n.opacity??1,cu(o)),e.opacityExit=R(t.opacity??1,0,du(o))):r&&(e.opacity=R(t.opacity??1,n.opacity??1,o));for(let s=0;s<au;s++){const l=Sr[s];let c=ni(t,l),u=ni(n,l);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||ti(c)===ti(u)?(e[l]=Math.max(R(ei(c),ei(u),o),0),(oe.test(u)||oe.test(c))&&(e[l]+="%")):e[l]=u}(t.rotate||n.rotate)&&(e.rotate=R(t.rotate||0,n.rotate||0,o))}function ni(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const cu=jr(0,.5,hs),du=jr(.5,.95,Z);function jr(e,t,n){return o=>o<e?0:o>t?1:n($e(e,t,o))}function uu(e,t,n){const o=H(e)?e:Me(e);return o.start(Wn("",o,t,n)),o.animation}function Ke(e,t,n,o={passive:!0}){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n)}const fu=(e,t)=>e.depth-t.depth;class hu{constructor(){this.children=[],this.isDirty=!1}add(t){kn(this.children,t),this.isDirty=!0}remove(t){pt(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(fu),this.isDirty=!1,this.children.forEach(t)}}function pu(e,t){const n=N.now(),o=({timestamp:i})=>{const r=i-n;r>=t&&(fe(o),e(r-t))};return M.setup(o,!0),()=>fe(o)}function ut(e){return H(e)?e.get():e}class mu{constructor(){this.members=[]}add(t){kn(this.members,t);for(let n=this.members.length-1;n>=0;n--){const o=this.members[n];if(o===t||o===this.lead||o===this.prevLead)continue;const i=o.instance;(!i||i.isConnected===!1)&&!o.snapshot&&(pt(this.members,o),o.unmount())}t.scheduleRender()}remove(t){if(pt(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){var n;for(let o=this.members.indexOf(t)-1;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1&&((n=i.instance)==null?void 0:n.isConnected)!==!1)return this.promote(i),!0}return!1}promote(t,n){var i;const o=this.lead;if(t!==o&&(this.prevLead=o,this.lead=t,t.show(),o)){o.updateSnapshot(),t.scheduleRender();const{layoutDependency:r}=o.options,{layoutDependency:s}=t.options;(r===void 0||r!==s)&&(t.resumeFrom=o,n&&(o.preserveOpacity=!0),o.snapshot&&(t.snapshot=o.snapshot,t.snapshot.latestValues=o.animationValues||o.latestValues),(i=t.root)!=null&&i.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,o,i,r,s;(o=(n=t.options).onExitComplete)==null||o.call(n),(s=(i=t.resumingFrom)==null?void 0:(r=i.options).onExitComplete)==null||s.call(r)})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){var t;(t=this.lead)!=null&&t.snapshot&&(this.lead.snapshot=void 0)}}const ft={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Wt=["","X","Y","Z"],xu=1e3;let gu=0;function Ht(e,t,n,o){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),o&&(o[e]=0))}function Cr(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=$s(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",M,!(i||r))}const{parent:o}=e;o&&!o.hasCheckedOptimisedAppear&&Cr(o)}function Fr({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:o,resetTransform:i}){return class{constructor(s={},l=t==null?void 0:t()){this.id=gu++,this.animationId=0,this.animationCommitId=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.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(vu),this.nodes.forEach(Tu),this.nodes.forEach(ku),this.nodes.forEach(wu)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new hu)}addEventListener(s,l){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Bn),this.eventHandlers.get(s).add(l)}notifyListeners(s,...l){const c=this.eventHandlers.get(s);c&&c.notify(...l)}hasListeners(s){return this.eventHandlers.has(s)}mount(s){if(this.instance)return;this.isSVG=Gn(s)&&!bd(s),this.instance=s;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||l)&&(this.isLayoutDirty=!0),e){let d,h=0;const p=()=>this.root.updateBlockedByResize=!1;M.read(()=>{h=window.innerWidth}),e(s,()=>{const m=window.innerWidth;m!==h&&(h=m,this.root.updateBlockedByResize=!0,d&&d(),d=pu(p,250),ft.hasAnimatedSinceResize&&(ft.hasAnimatedSinceResize=!1,this.nodes.forEach(si)))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeLayoutChanged:p,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const x=this.options.transition||u.getDefaultTransition()||Pu,{onLayoutAnimationStart:g,onLayoutAnimationComplete:b}=u.getProps(),y=!this.targetLayout||!wr(this.targetLayout,m),v=!h&&p;if(this.options.layoutRoot||this.resumeFrom||v||h&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const S={...On(x,"layout"),onPlay:g,onComplete:b};(u.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S),this.setAnimationOrigin(d,v)}else h||si(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),fe(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(Bu),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Cr(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const h=this.path[d];h.shouldResetTransform=!0,(typeof h.latestValues.x=="string"||typeof h.latestValues.y=="string")&&(h.isLayoutDirty=!0),h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const c=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),c&&this.nodes.forEach(ju),this.nodes.forEach(oi);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(ii);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Cu),this.nodes.forEach(Fu),this.nodes.forEach(yu),this.nodes.forEach(bu)):this.nodes.forEach(ii),this.clearAllSnapshots();const l=N.now();W.delta=ie(0,1e3/60,l-W.timestamp),W.timestamp=l,W.isProcessing=!0,Pt.update.process(W),Pt.preRender.process(W),Pt.render.process(W),W.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,$n.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Su),this.sharedNodes.forEach(Au)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,M.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){M.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!_(this.snapshot.measuredBox.x)&&!_(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=z()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(l=!1),l&&this.instance){const c=o(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!i)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!vr(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;s&&this.instance&&(l||xe(this.latestValues)||d)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return s&&(c=this.removeTransform(c)),Mu(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:s}=this.options;if(!s)return z();const l=s.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(Ru))){const{scroll:d}=this.root;d&&(ne(l.x,d.offset.x),ne(l.y,d.offset.y))}return l}removeElementScroll(s){var c;const l=z();if(q(l,s),(c=this.scroll)!=null&&c.wasRoot)return l;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:h,options:p}=d;d!==this.root&&h&&p.layoutScroll&&(h.wasRoot&&q(l,s),ne(l.x,h.offset.x),ne(l.y,h.offset.y))}return l}applyTransform(s,l=!1,c){var d,h;const u=c||z();q(u,s);for(let p=0;p<this.path.length;p++){const m=this.path[p];!l&&m.options.layoutScroll&&m.scroll&&m!==m.root&&(ne(u.x,-m.scroll.offset.x),ne(u.y,-m.scroll.offset.y)),xe(m.latestValues)&&dt(u,m.latestValues,(d=m.layout)==null?void 0:d.layoutBox)}return xe(this.latestValues)&&dt(u,this.latestValues,(h=this.layout)==null?void 0:h.layoutBox),u}removeTransform(s){var c;const l=z();q(l,s);for(let u=0;u<this.path.length;u++){const d=this.path[u];if(!xe(d.latestValues))continue;let h;d.instance&&(mn(d.latestValues)&&d.updateSnapshot(),h=z(),q(h,d.measurePageBox())),Yo(l,d.latestValues,(c=d.snapshot)==null?void 0:c.layoutBox,h)}return xe(this.latestValues)&&Yo(l,this.latestValues),l}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==W.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var m;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(s||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:h}=this.options;if(!this.layout||!(d||h))return;this.resolvedRelativeTargetAt=W.timestamp;const p=this.getClosestProjectingParent();p&&this.linkedParentVersion!==p.layoutVersion&&!p.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&p&&p.layout?this.createRelativeTarget(p,this.layout.layoutBox,p.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=z(),this.targetWithTransforms=z()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),tu(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):q(this.target,this.layout.layoutBox),lr(this.target,this.targetDelta)):q(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?this.createRelativeTarget(p,this.target,p.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||mn(this.parent.latestValues)||ar(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(s,l,c){this.relativeParent=s,this.linkedParentVersion=s.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=z(),this.relativeTargetOrigin=z(),wt(this.relativeTargetOrigin,l,c,this.options.layoutAnchor||void 0),q(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var x;const s=this.getLead(),l=!!this.resumingFrom||this!==s;let c=!0;if((this.isProjectionDirty||(x=this.parent)!=null&&x.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===W.timestamp&&(c=!1),c)return;const{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;q(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,p=this.treeScale.y;Dd(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=z());const{target:m}=s;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(No(this.prevProjectionDelta.x,this.projectionDelta.x),No(this.prevProjectionDelta.y,this.projectionDelta.y)),Ne(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==p||!Qo(this.projectionDelta.x,this.prevProjectionDelta.x)||!Qo(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){var l;if((l=this.options.visualElement)==null||l.scheduleRender(),s){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ee(),this.projectionDelta=Ee(),this.projectionDeltaWithTransform=Ee()}setAnimationOrigin(s,l=!1){const c=this.snapshot,u=c?c.latestValues:{},d={...this.latestValues},h=Ee();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const p=z(),m=c?c.source:void 0,x=this.layout?this.layout.source:void 0,g=m!==x,b=this.getStack(),y=!b||b.members.length<=1,v=!!(g&&!y&&this.options.crossfade===!0&&!this.path.some(Eu));this.animationProgress=0;let S;this.mixTargetDelta=C=>{const j=C/1e3;ri(h.x,s.x,j),ri(h.y,s.y,j),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(wt(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Du(this.relativeTarget,this.relativeTargetOrigin,p,j),S&&su(this.relativeTarget,S)&&(this.isProjectionDirty=!1),S||(S=z()),q(S,this.relativeTarget)),g&&(this.animationValues=d,lu(d,u,this.latestValues,j,v,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=j},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){var l,c,u;this.notifyListeners("animationStart"),(l=this.currentAnimation)==null||l.stop(),(u=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||u.stop(),this.pendingAnimation&&(fe(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=M.update(()=>{ft.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Me(0)),this.motionValue.jump(0,!1),this.currentAnimation=uu(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:d=>{this.mixTargetDelta(d),s.onUpdate&&s.onUpdate(d)},onStop:()=>{},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(xu),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:l,target:c,layout:u,latestValues:d}=s;if(!(!l||!c||!u)){if(this!==s&&this.layout&&u&&Tr(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||z();const h=_(this.layout.layoutBox.x);c.x.min=s.target.x.min,c.x.max=c.x.min+h;const p=_(this.layout.layoutBox.y);c.y.min=s.target.y.min,c.y.max=c.y.min+p}q(l,c),dt(l,d),Ne(this.projectionDeltaWithTransform,this.layoutCorrected,l,d)}}registerSharedNode(s,l){this.sharedNodes.has(s)||this.sharedNodes.set(s,new mu),this.sharedNodes.get(s).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var l;const{layoutId:s}=this.options;return s?((l=this.getStack())==null?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:s}=this.options;return s?(l=this.getStack())==null?void 0:l.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:l,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),s&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let l=!1;const{latestValues:c}=s;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const u={};c.z&&Ht("z",s,u,this.animationValues);for(let d=0;d<Wt.length;d++)Ht(`rotate${Wt[d]}`,s,u,this.animationValues),Ht(`skew${Wt[d]}`,s,u,this.animationValues);s.render();for(const d in u)s.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);s.scheduleRender()}applyProjectionStyles(s,l){if(!this.instance||this.isSVG)return;if(!this.isVisible){s.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,s.visibility="",s.opacity="",s.pointerEvents=ut(l==null?void 0:l.pointerEvents)||"",s.transform=c?c(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(s.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,s.pointerEvents=ut(l==null?void 0:l.pointerEvents)||""),this.hasProjected&&!xe(this.latestValues)&&(s.transform=c?c({},""):"none",this.hasProjected=!1);return}s.visibility="";const d=u.animationValues||u.latestValues;this.applyTransformsToTarget();let h=ru(this.projectionDeltaWithTransform,this.treeScale,d);c&&(h=c(d,h)),s.transform=h;const{x:p,y:m}=this.projectionDelta;s.transformOrigin=`${p.origin*100}% ${m.origin*100}% 0`,u.animationValues?s.opacity=u===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:s.opacity=u===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const x in gn){if(d[x]===void 0)continue;const{correct:g,applyTo:b,isCSSVariable:y}=gn[x],v=h==="none"?d[x]:g(d[x],u);if(b){const S=b.length;for(let C=0;C<S;C++)s[b[C]]=v}else y?this.options.visualElement.renderState.vars[x]=v:s[x]=v}this.options.layoutId&&(s.pointerEvents=u===this?ut(l==null?void 0:l.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var l;return(l=s.currentAnimation)==null?void 0:l.stop()}),this.root.nodes.forEach(oi),this.root.sharedNodes.clear()}}}function yu(e){e.updateLayout()}function bu(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:i}=e.layout,{animationType:r}=e.options,s=t.source!==e.layout.source;if(r==="size")te(h=>{const p=s?t.measuredBox[h]:t.layoutBox[h],m=_(p);p.min=o[h].min,p.max=p.min+m});else if(r==="x"||r==="y"){const h=r==="x"?"y":"x";yn(s?t.measuredBox[h]:t.layoutBox[h],o[h])}else Tr(r,t.layoutBox,o)&&te(h=>{const p=s?t.measuredBox[h]:t.layoutBox[h],m=_(o[h]);p.max=p.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[h].max=e.relativeTarget[h].min+m)});const l=Ee();Ne(l,o,t.layoutBox);const c=Ee();s?Ne(c,e.applyTransform(i,!0),t.measuredBox):Ne(c,o,t.layoutBox);const u=!vr(l);let d=!1;if(!e.resumeFrom){const h=e.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:p,layout:m}=h;if(p&&m){const x=e.options.layoutAnchor||void 0,g=z();wt(g,t.layoutBox,p.layoutBox,x);const b=z();wt(b,o,m.layoutBox,x),wr(g,b)||(d=!0),h.options.layoutRoot&&(e.relativeTarget=b,e.relativeTargetOrigin=g,e.relativeParent=h)}}}e.notifyListeners("didUpdate",{layout:o,snapshot:t,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:o}=e.options;o&&o()}e.options.transition=void 0}function vu(e){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 wu(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Su(e){e.clearSnapshot()}function oi(e){e.clearMeasurements()}function ju(e){e.isLayoutDirty=!0,e.updateLayout()}function ii(e){e.isLayoutDirty=!1}function Cu(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function Fu(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function si(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Tu(e){e.resolveTargetDelta()}function ku(e){e.calcProjection()}function Bu(e){e.resetSkewAndRotation()}function Au(e){e.removeLeadSnapshot()}function ri(e,t,n){e.translate=R(t.translate,0,n),e.scale=R(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function ai(e,t,n,o){e.min=R(t.min,n.min,o),e.max=R(t.max,n.max,o)}function Du(e,t,n,o){ai(e.x,t.x,n.x,o),ai(e.y,t.y,n.y,o)}function Eu(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Pu={duration:.45,ease:[.4,0,.1,1]},li=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ci=li("applewebkit/")&&!li("chrome/")?Math.round:Z;function di(e){e.min=ci(e.min),e.max=ci(e.max)}function Mu(e){di(e.x),di(e.y)}function Tr(e,t,n){return e==="position"||e==="preserve-aspect"&&!eu(Jo(t),Jo(n),.2)}function Ru(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const Vu=Fr({attachResizeListener:(e,t)=>Ke(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),Nt={current:void 0},kr=Fr({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Nt.current){const e=new Vu({});e.mount(window),e.setOptions({layoutScroll:!0}),Nt.current=e}return Nt.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),qn=w.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function ui(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Lu(...e){return t=>{let n=!1;const o=e.map(i=>{const r=ui(i,t);return!n&&typeof r=="function"&&(n=!0),r});if(n)return()=>{for(let i=0;i<o.length;i++){const r=o[i];typeof r=="function"?r():ui(e[i],null)}}}}function Iu(...e){return L.useCallback(Lu(...e),e)}class zu extends L.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(rt(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const o=n.offsetParent,i=rt(o)&&o.offsetWidth||0,r=rt(o)&&o.offsetHeight||0,s=getComputedStyle(n),l=this.props.sizeRef.current;l.height=parseFloat(s.height),l.width=parseFloat(s.width),l.top=n.offsetTop,l.left=n.offsetLeft,l.right=i-l.width-l.left,l.bottom=r-l.height-l.top}return null}componentDidUpdate(){}render(){return this.props.children}}function Ou({children:e,isPresent:t,anchorX:n,anchorY:o,root:i,pop:r}){var p;const s=w.useId(),l=w.useRef(null),c=w.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:u}=w.useContext(qn),d=((p=e.props)==null?void 0:p.ref)??(e==null?void 0:e.ref),h=Iu(l,d);return w.useInsertionEffect(()=>{const{width:m,height:x,top:g,left:b,right:y,bottom:v}=c.current;if(t||r===!1||!l.current||!m||!x)return;const S=n==="left"?`left: ${b}`:`right: ${y}`,C=o==="bottom"?`bottom: ${v}`:`top: ${g}`;l.current.dataset.motionPopId=s;const j=document.createElement("style");u&&(j.nonce=u);const F=i??document.head;return F.appendChild(j),j.sheet&&j.sheet.insertRule(`
|
|
178
|
-
[data-motion-pop-id="${
|
|
177
|
+
`,fill:e})})}function jt({variant:e="blue",type:t="full",height:n=32,className:o,style:i}){const a=ba(),r=xa[e],l=a?ya[e]:ga[e],u={display:"inline-flex",alignItems:"center",gap:`${Math.round(n*.3)}px`,lineHeight:1,...i};return s.jsxs("span",{className:o,style:u,role:"img","aria-label":"MedixDeck logo",children:[s.jsx(va,{color:r,height:n}),t==="full"&&s.jsx(wa,{color:l,height:n})]})}const Pt={sm:{h:"8",px:"3",fontSize:"sm"},md:{h:"10",px:"4",fontSize:"md"},lg:{h:"12",px:"4",fontSize:"lg"}},kn=S.forwardRef(({size:e="md",leftElement:t,rightElement:n,isInvalid:o,errorMessage:i,...a},r)=>{const l=!!t,c=!!n;return s.jsxs(f.Box,{w:"100%",children:[s.jsxs(f.Box,{position:"relative",children:[l&&s.jsx(f.Box,{position:"absolute",left:"3",top:"50%",transform:"translateY(-50%)",zIndex:"1",color:"text.muted",display:"flex",alignItems:"center",children:t}),s.jsx(f.Input,{ref:r,...Pt[e],pl:l?"10":Pt[e].px,pr:c?"10":Pt[e].px,bg:"bg.surface",border:"1px solid",borderColor:o?"red.500":"border",borderRadius:"md",color:"text.heading",fontFamily:"var(--font-body)",_placeholder:{color:"text.muted"},_focus:{borderColor:o?"red.500":"blue.500",boxShadow:o?"0 0 0 3px rgba(220, 38, 38, 0.15)":"0 0 0 3px rgba(6, 133, 255, 0.15)",outline:"none"},_dark:{bg:"bg.surface",borderColor:o?"red.500":"border",color:"text.heading"},...a}),c&&s.jsx(f.Box,{position:"absolute",right:"3",top:"50%",transform:"translateY(-50%)",zIndex:"1",color:"text.muted",display:"flex",alignItems:"center",children:n})]}),o&&i&&s.jsx(f.Text,{mt:"1",fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:i})]})});kn.displayName="MedixInput";const Hi=S.forwardRef(({placeholder:e="Search…",...t},n)=>s.jsx(kn,{ref:n,type:"search",placeholder:e,leftElement:s.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[s.jsx("circle",{cx:"11",cy:"11",r:"8"}),s.jsx("path",{d:"m21 21-4.35-4.35"})]}),...t}));Hi.displayName="MedixSearchInput";const _i=S.forwardRef(({isInvalid:e,errorMessage:t,maxLength:n,showCount:o=!1,onChange:i,value:a,...r},l)=>{const[c,u]=S.useState(typeof a=="string"?a.length:0),d=h=>{u(h.target.value.length),i==null||i(h)};return s.jsxs(f.Box,{w:"100%",children:[s.jsx(f.Textarea,{ref:l,bg:"bg.surface",border:"1px solid",borderColor:e?"red.500":"border",borderRadius:"md",color:"text.heading",fontFamily:"var(--font-body)",fontSize:"md",px:"4",py:"3",resize:"vertical",maxLength:n,value:a,onChange:d,_placeholder:{color:"text.muted"},_focus:{borderColor:e?"red.500":"blue.500",boxShadow:e?"0 0 0 3px rgba(220, 38, 38, 0.15)":"0 0 0 3px rgba(6, 133, 255, 0.15)",outline:"none"},_dark:{bg:"bg.surface",borderColor:e?"red.500":"border",color:"text.heading",_placeholder:{color:"text.muted"}},...r}),s.jsxs(f.Box,{display:"flex",justifyContent:"space-between",mt:"1",children:[e&&t?s.jsx(f.Text,{fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:t}):s.jsx("span",{}),o&&n&&s.jsxs(f.Text,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:[c,"/",n]})]})]})});_i.displayName="MedixTextarea";const Sa={sm:{h:"8",px:"3",fontSize:"sm"},md:{h:"10",px:"4",fontSize:"md"},lg:{h:"12",px:"4",fontSize:"lg"}},Ni=S.forwardRef(({options:e=[],placeholder:t,isInvalid:n,errorMessage:o,size:i="md",children:a,...r},l)=>{const c=Sa[i];return s.jsxs(f.Box,{w:"100%",children:[s.jsxs(f.NativeSelect.Root,{...r,children:[s.jsxs(f.NativeSelect.Field,{ref:l,h:c.h,px:c.px,fontSize:c.fontSize,bg:"bg.surface",border:"1px solid",borderColor:n?"red.500":"border",borderRadius:"md",color:"text.heading",fontFamily:"var(--font-body)",_focus:{borderColor:n?"red.500":"blue.500",boxShadow:n?"0 0 0 3px rgba(220,38,38,0.15)":"0 0 0 3px rgba(6,133,255,0.15)",outline:"none"},_dark:{bg:"bg.surface",borderColor:n?"red.500":"border",color:"text.heading"},children:[t&&s.jsx("option",{value:"",disabled:!0,children:t}),e.map(u=>s.jsx("option",{value:u.value,disabled:u.disabled,children:u.label},u.value)),a]}),s.jsx(f.NativeSelect.Indicator,{})]}),n&&o&&s.jsx(f.Text,{mt:"1",fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:o})]})});Ni.displayName="MedixSelect";const $i={blue:{solid:"#0685FF",ring:"rgba(6,133,255,0.30)",tint:"#E8F3FF"},purple:{solid:"#7700CC",ring:"rgba(119,0,204,0.25)",tint:"#F9F0FF"},green:{solid:"#1B7A38",ring:"rgba(27,122,56,0.25)",tint:"#F0FDF4"}},Ui=S.forwardRef(({colorScheme:e="blue",checked:t,defaultChecked:n=!1,onChange:o,disabled:i=!1,indeterminate:a=!1,children:r,description:l,name:c,value:u,id:d},h)=>{const p=$i[e],m=d??S.useId(),[x,g]=S.useState(n),[v,b]=S.useState(!1),y=t!==void 0?t:x,w=C=>{t===void 0&&g(C.target.checked),o==null||o(C.target.checked)},j={width:18,height:18,borderRadius:4,border:`2px solid ${y||a?p.solid:"var(--medix-form-border, #CBD5E1)"}`,background:y||a?p.solid:"transparent",display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,marginTop:2,transition:"background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease",boxShadow:v?`0 0 0 3px ${p.ring}`:"none",pointerEvents:"none"};return s.jsxs(f.Box,{opacity:i?.55:1,children:[s.jsxs("label",{htmlFor:m,style:{display:"inline-flex",alignItems:"flex-start",gap:10,cursor:i?"not-allowed":"pointer",userSelect:"none"},children:[s.jsx("input",{ref:h,id:m,type:"checkbox",name:c,value:u,checked:y,disabled:i,onChange:w,onFocus:()=>b(!0),onBlur:()=>b(!1),style:{position:"absolute",width:1,height:1,opacity:0,margin:0,padding:0,pointerEvents:"none"}}),s.jsx("span",{style:j,"aria-hidden":"true",children:a?s.jsx("svg",{width:"10",height:"2",viewBox:"0 0 10 2",fill:"none",children:s.jsx("rect",{width:"10",height:"2",rx:"1",fill:"#fff"})}):y?s.jsx("svg",{width:"11",height:"9",viewBox:"0 0 11 9",fill:"none",children:s.jsx("path",{d:"M1 4.5L4 7.5L10 1",stroke:"#fff",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):null}),r&&s.jsxs(f.Box,{children:[s.jsx(f.Text,{as:"span",fontFamily:"var(--font-body)",fontSize:"md",color:"text.body",lineHeight:"1.5",children:r}),l&&s.jsx(f.Text,{display:"block",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:l})]})]}),!r&&l&&s.jsx(f.Text,{mt:"1",ml:"7",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:l})]})});Ui.displayName="MedixCheckbox";function Ca({name:e,value:t,onChange:n,options:o,colorScheme:i="blue",direction:a="column"}){const r=$i[i],[l,c]=S.useState(""),u=t!==void 0?t:l,d=h=>{t===void 0&&c(h),n==null||n(h)};return s.jsx(f.Box,{display:"flex",flexDirection:a,gap:a==="row"?"5":"3",role:"radiogroup",children:o.map(h=>{const p=u===h.value;return s.jsx(ja,{option:h,name:e,isSelected:p,onChange:d,solidColor:r.solid,ring:r.ring},h.value)})})}function ja({option:e,name:t,isSelected:n,onChange:o,solidColor:i,ring:a}){const[r,l]=S.useState(!1);return s.jsxs("label",{style:{display:"inline-flex",alignItems:"flex-start",gap:10,cursor:e.disabled?"not-allowed":"pointer",opacity:e.disabled?.55:1,userSelect:"none"},children:[s.jsx("input",{type:"radio",name:t,value:e.value,checked:n,disabled:e.disabled,onChange:()=>o(e.value),onFocus:()=>l(!0),onBlur:()=>l(!1),style:{position:"absolute",width:1,height:1,opacity:0,margin:0,padding:0,pointerEvents:"none"}}),s.jsx("span",{"aria-hidden":"true",style:{width:18,height:18,borderRadius:"50%",border:`2px solid ${n?i:"var(--medix-form-border, #CBD5E1)"}`,display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,marginTop:2,transition:"border-color 0.15s ease, box-shadow 0.15s ease",boxShadow:r?`0 0 0 3px ${a}`:"none",pointerEvents:"none"},children:s.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:i,transform:n?"scale(1)":"scale(0)",transition:"transform 0.15s ease"}})}),s.jsxs(f.Box,{children:[s.jsx(f.Text,{as:"span",fontFamily:"var(--font-body)",fontSize:"md",color:"text.body",lineHeight:"1.5",children:e.label}),e.description&&s.jsx(f.Text,{display:"block",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:e.description})]})]})}const ka={blue:{solid:"#0685FF",ring:"rgba(6,133,255,0.30)",track:"#0685FF"},purple:{solid:"#7700CC",ring:"rgba(119,0,204,0.25)",track:"#7700CC"},green:{solid:"#1B7A38",ring:"rgba(27,122,56,0.25)",track:"#1B7A38"}},Fa={sm:{width:32,height:18,thumbSize:12,thumbOffset:2},md:{width:42,height:24,thumbSize:16,thumbOffset:3},lg:{width:52,height:30,thumbSize:20,thumbOffset:4}},Gi=S.forwardRef(({colorScheme:e="blue",size:t="md",checked:n,defaultChecked:o=!1,onChange:i,disabled:a=!1,label:r,description:l,name:c,id:u},d)=>{const h=ka[e],p=Fa[t],m=u??S.useId(),[x,g]=S.useState(o),[v,b]=S.useState(!1),y=n!==void 0?n:x,w=k=>{n===void 0&&g(k.target.checked),i==null||i(k.target.checked)},j={position:"relative",display:"inline-flex",alignItems:"center",width:p.width,height:p.height,borderRadius:p.height,background:y?h.track:"var(--medix-form-border, #CBD5E1)",transition:"background 0.2s ease, box-shadow 0.2s ease",boxShadow:v?`0 0 0 3px ${h.ring}`:"none",cursor:a?"not-allowed":"pointer",flexShrink:0},C={position:"absolute",width:p.thumbSize,height:p.thumbSize,borderRadius:"50%",background:"#fff",boxShadow:"0 1px 4px rgba(0,0,0,0.22)",top:p.thumbOffset,left:y?p.width-p.thumbSize-p.thumbOffset:p.thumbOffset,transition:"left 0.18s ease"};return s.jsxs(f.Box,{display:"flex",alignItems:"flex-start",gap:"3",opacity:a?.55:1,children:[s.jsxs("label",{htmlFor:m,style:{display:"inline-flex",cursor:a?"not-allowed":"pointer"},children:[s.jsx("input",{ref:d,id:m,type:"checkbox",role:"switch",name:c,checked:y,disabled:a,onChange:w,onFocus:()=>b(!0),onBlur:()=>b(!1),style:{position:"absolute",width:1,height:1,opacity:0,margin:0,padding:0,pointerEvents:"none"}}),s.jsx("span",{style:j,"aria-hidden":"true",children:s.jsx("span",{style:C})})]}),(r||l)&&s.jsxs(f.Box,{children:[r&&s.jsx("label",{htmlFor:m,style:{display:"block",fontSize:"1rem",fontWeight:500,color:"inherit",fontFamily:"var(--font-body)",lineHeight:"1.4",cursor:a?"not-allowed":"pointer",userSelect:"none"},children:r}),l&&s.jsx(f.Text,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:l})]})]})});Gi.displayName="MedixSwitch";function Ta({id:e,label:t,helperText:n,errorMessage:o,isRequired:i=!1,isDisabled:a=!1,children:r}){const l=!!o;return s.jsxs(f.Box,{display:"flex",flexDirection:"column",gap:"1.5",opacity:a?.5:1,pointerEvents:a?"none":void 0,w:"100%",children:[t&&s.jsxs(f.Box,{as:"label",htmlFor:e,display:"flex",alignItems:"center",gap:"1",children:[s.jsx(f.Text,{as:"span",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:t}),i&&s.jsx(f.Text,{as:"span",color:"red.500",fontSize:"sm",lineHeight:"1",children:"*"})]}),S.cloneElement(r,{id:e,isInvalid:l||void 0}),n&&!l&&s.jsx(f.Text,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:n}),l&&o&&s.jsx(f.Text,{fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:o})]})}function Ki({length:e=6,value:t="",onChange:n,onComplete:o,isInvalid:i=!1,isDisabled:a=!1,mask:r=!1,label:l,helperText:c,errorMessage:u}){const d=t.split("").slice(0,e),h=S.useRef([]),p=i?"#DC2626":"var(--medix-form-border)",m=i?"#DC2626":"#0685FF",x=(b,y)=>{var w,j,C;if(b.key==="Backspace"){b.preventDefault();const k=[...d];k[y]?(k[y]="",n==null||n(k.join(""))):y>0&&((w=h.current[y-1])==null||w.focus(),k[y-1]="",n==null||n(k.join("")))}else b.key==="ArrowLeft"&&y>0?(j=h.current[y-1])==null||j.focus():b.key==="ArrowRight"&&y<e-1&&((C=h.current[y+1])==null||C.focus())},g=(b,y)=>{var k,D;const w=b.target.value.replace(/\D/g,"");if(!w)return;if(w.length>1){const A=w.split("").slice(0,e),F=[...Array(e).fill("")];A.forEach((E,U)=>{F[U]=E});const T=F.join("");n==null||n(T);const P=Math.min(A.length,e-1);(k=h.current[P])==null||k.focus(),T.length===e&&(o==null||o(T));return}const j=[...d];for(;j.length<e;)j.push("");j[y]=w;const C=j.join("");n==null||n(C),y<e-1&&((D=h.current[y+1])==null||D.focus()),C.replace(/\s/g,"").length===e&&(o==null||o(C))},v=b=>b.target.select();return s.jsxs(f.Box,{w:"fit-content",children:[l&&s.jsx(f.Text,{mb:"2",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:l}),s.jsx(f.Box,{display:"flex",gap:"2",alignItems:"center",children:Array.from({length:e}).map((b,y)=>s.jsx("input",{ref:w=>{h.current[y]=w},type:r?"password":"text",inputMode:"numeric",pattern:"\\d*",maxLength:1,value:d[y]??"",onChange:w=>g(w,y),onKeyDown:w=>x(w,y),onFocus:v,disabled:a,"aria-label":`Digit ${y+1} of ${e}`,style:{width:"48px",height:"48px",borderRadius:"10px",border:`1.5px solid ${p}`,background:"var(--medix-form-bg)",color:"var(--medix-form-text)",fontSize:"20px",fontWeight:600,textAlign:"center",fontFamily:"var(--font-body)",outline:"none",transition:"border-color 0.15s, box-shadow 0.15s",cursor:a?"not-allowed":"text",opacity:a?.5:1},onFocusCapture:w=>{w.target.style.borderColor=m,w.target.style.boxShadow=`0 0 0 3px ${i?"rgba(220,38,38,0.15)":"rgba(6,133,255,0.15)"}`},onBlurCapture:w=>{w.target.style.borderColor=p,w.target.style.boxShadow="none"}},y))}),(c||u)&&s.jsx(f.Text,{mt:"2",fontSize:"xs",color:i?"red.500":"text.muted",fontFamily:"var(--font-body)",children:i?u:c})]})}const Ba=Ki,Et=[{code:"+234",flag:"🇳🇬",country:"NG"},{code:"+1",flag:"🇺🇸",country:"US"},{code:"+44",flag:"🇬🇧",country:"GB"},{code:"+233",flag:"🇬🇭",country:"GH"},{code:"+254",flag:"🇰🇪",country:"KE"},{code:"+27",flag:"🇿🇦",country:"ZA"},{code:"+251",flag:"🇪🇹",country:"ET"},{code:"+255",flag:"🇹🇿",country:"TZ"}];function Aa({value:e="",onChange:t,showCountryCode:n=!0,defaultCountryCode:o="+234",placeholder:i="80 000 0000",isInvalid:a=!1,errorMessage:r,label:l,helperText:c,isDisabled:u=!1,id:d}){const[h,p]=S.useState(o),[m,x]=S.useState(e),[g,v]=S.useState(!1),b=Et.find(k=>k.code===h)??Et[0],y=k=>{const D=k.target.value.replace(/[^\d\s\-]/g,"");x(D),t==null||t(`${h}${D.replace(/\s/g,"")}`)},w=k=>{p(k.target.value),t==null||t(`${k.target.value}${m.replace(/\s/g,"")}`)},j=a?"#DC2626":g?"#0685FF":"var(--medix-form-border)",C=g?`0 0 0 3px ${a?"rgba(220,38,38,0.15)":"rgba(6,133,255,0.15)"}`:"none";return s.jsxs(f.Box,{w:"100%",children:[l&&s.jsx(f.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:l}),s.jsxs(f.Box,{display:"flex",alignItems:"center",overflow:"hidden",borderRadius:"10px",transition:"border-color 0.15s, box-shadow 0.15s",opacity:u?.5:1,pointerEvents:u?"none":void 0,style:{border:`1.5px solid ${j}`,boxShadow:C,background:"var(--medix-form-bg)"},children:[n&&s.jsxs("label",{htmlFor:`${d}-country`,style:{display:"flex",alignItems:"center",gap:"4px",padding:"10px 12px",background:"var(--medix-form-bg-subtle)",borderRight:"1px solid var(--medix-form-border)",cursor:"pointer",flexShrink:0,minWidth:"80px"},children:[s.jsx(f.Text,{fontSize:"lg",lineHeight:"1",children:b.flag}),s.jsx("select",{id:`${d}-country`,value:h,onChange:w,"aria-label":"Country code",style:{background:"transparent",border:"none",outline:"none",fontSize:"14px",fontFamily:"var(--font-body)",color:"var(--medix-form-text)",cursor:"pointer",width:"42px"},children:Et.map(k=>s.jsx("option",{value:k.code,style:{background:"var(--medix-form-bg)",color:"var(--medix-form-text)"},children:k.code},k.code))})]}),s.jsx("input",{id:d,type:"tel",value:m,onChange:y,onFocus:()=>v(!0),onBlur:()=>v(!1),placeholder:i,disabled:u,"aria-invalid":a,style:{flex:1,border:"none",outline:"none",background:"transparent",fontSize:"15px",fontFamily:"var(--font-body)",color:"var(--medix-form-text)",padding:"10px 16px",minWidth:0}})]}),(c||r)&&s.jsx(f.Text,{mt:"1.5",fontSize:"xs",color:a?"red.500":"text.muted",fontFamily:"var(--font-body)",children:a?r:c})]})}function Da({value:e,onChange:t,min:n,max:o,label:i,helperText:a,errorMessage:r,isInvalid:l=!1,isDisabled:c=!1,placeholder:u,id:d,includeTime:h=!1}){const[p,m]=S.useState(!1),x=l?"#DC2626":p?"#0685FF":"var(--medix-form-border)",g=p?`0 0 0 3px ${l?"rgba(220,38,38,0.15)":"rgba(6,133,255,0.15)"}`:"none";return s.jsxs(f.Box,{w:"100%",children:[i&&s.jsx(f.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:i}),s.jsxs(f.Box,{position:"relative",children:[s.jsx("input",{id:d,type:h?"datetime-local":"date",value:e??"",onChange:v=>t==null?void 0:t(v.target.value),min:n,max:o,placeholder:u,disabled:c,"aria-invalid":l,onFocus:()=>m(!0),onBlur:()=>m(!1),style:{width:"100%",height:"40px",padding:"0 40px 0 16px",borderRadius:"10px",border:`1.5px solid ${x}`,boxShadow:g,background:"var(--medix-form-bg)",color:"var(--medix-form-text)",fontSize:"15px",fontFamily:"var(--font-body)",outline:"none",transition:"border-color 0.15s, box-shadow 0.15s",cursor:c?"not-allowed":"pointer",opacity:c?.5:1,colorScheme:"auto"}}),s.jsx(f.Box,{position:"absolute",right:"3",top:"50%",transform:"translateY(-50%)",pointerEvents:"none",fontSize:"md",color:"text.muted",children:"📅"})]}),(a||r)&&s.jsx(f.Text,{mt:"1.5",fontSize:"xs",color:l?"red.500":"text.muted",fontFamily:"var(--font-body)",children:l?r:a})]})}function Pa({startValue:e,onStartChange:t,endValue:n,onEndChange:o,min:i,max:a,label:r,helperText:l,errorMessage:c,isInvalid:u=!1,isDisabled:d=!1,startPlaceholder:h,endPlaceholder:p,id:m}){const[x,g]=S.useState(null),v=u?"#DC2626":x?"#0685FF":"var(--medix-form-border)",b=x?`0 0 0 3px ${u?"rgba(220,38,38,0.15)":"rgba(6,133,255,0.15)"}`:"none",y={flex:1,height:"100%",padding:"0 10px",background:"transparent",color:"var(--medix-form-text)",fontSize:"15px",fontFamily:"var(--font-body)",border:"none",outline:"none",cursor:d?"not-allowed":"pointer",colorScheme:"auto",width:"100%"};return s.jsxs(f.Box,{w:"100%",children:[r&&s.jsx(f.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:r}),s.jsxs(f.Box,{display:"flex",alignItems:"center",style:{width:"100%",height:"40px",borderRadius:"10px",border:`1.5px solid ${v}`,boxShadow:b,background:"var(--medix-form-bg)",transition:"border-color 0.15s, box-shadow 0.15s",opacity:d?.5:1,overflow:"hidden"},children:[s.jsx("input",{id:m,type:"date",value:e??"",onChange:w=>t==null?void 0:t(w.target.value),min:i,max:n||a,placeholder:h,disabled:d,"aria-invalid":u,onFocus:()=>g("start"),onBlur:()=>g(null),style:y}),s.jsx(f.Box,{color:"text.muted",px:"1",fontSize:"sm",children:"—"}),s.jsx("input",{type:"date",value:n??"",onChange:w=>o==null?void 0:o(w.target.value),min:e||i,max:a,placeholder:p,disabled:d,"aria-invalid":u,onFocus:()=>g("end"),onBlur:()=>g(null),style:y})]}),(l||c)&&s.jsx(f.Text,{mt:"1.5",fontSize:"xs",color:u?"red.500":"text.muted",fontFamily:"var(--font-body)",children:u?c:l})]})}const Ea=s.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("polyline",{points:"6 9 12 15 18 9"})});function Ma({options:e,value:t,onChange:n,placeholder:o="Search...",label:i,helperText:a,errorMessage:r,isInvalid:l=!1,isDisabled:c=!1}){const[u,d]=S.useState(!1),[h,p]=S.useState(""),m=S.useRef(null);S.useEffect(()=>{if(t){const b=e.find(y=>y.value===t);b&&p(b.label)}},[t,e]),S.useEffect(()=>{function b(y){if(m.current&&!m.current.contains(y.target))if(d(!1),t){const w=e.find(j=>j.value===t);w&&p(w.label)}else p("")}return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[t,e]);const x=e.filter(b=>b.label.toLowerCase().includes(h.toLowerCase())),g=l?"#DC2626":u?"#0685FF":"var(--medix-form-border)",v=u?`0 0 0 3px ${l?"rgba(220,38,38,0.15)":"rgba(6,133,255,0.15)"}`:"none";return s.jsxs(f.Box,{w:"100%",position:"relative",ref:m,children:[i&&s.jsx(f.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:i}),s.jsxs(f.Box,{position:"relative",children:[s.jsx("input",{type:"text",value:h,placeholder:o,disabled:c,onChange:b=>{p(b.target.value),d(!0),b.target.value||n==null||n("")},onFocus:()=>d(!0),style:{width:"100%",height:"40px",padding:"0 40px 0 16px",borderRadius:"10px",border:`1.5px solid ${g}`,boxShadow:v,background:"var(--medix-form-bg)",color:"var(--medix-form-text)",fontSize:"15px",fontFamily:"var(--font-body)",outline:"none",transition:"border-color 0.15s, box-shadow 0.15s",cursor:c?"not-allowed":"text",opacity:c?.5:1}}),s.jsx(f.Box,{position:"absolute",right:"3",top:"50%",transform:"translateY(-50%)",pointerEvents:"none",color:"text.muted",children:Ea})]}),u&&!c&&s.jsx(f.Box,{position:"absolute",zIndex:10,top:"100%",left:"0",right:"0",mt:"1",bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"md",boxShadow:"sm",maxH:"200px",overflowY:"auto",py:"1",children:x.length>0?x.map(b=>s.jsx(f.Box,{px:"3",py:"2",fontSize:"sm",fontFamily:"var(--font-body)",color:"text.body",cursor:"pointer",_hover:{bg:"bg.subtle"},onClick:()=>{n==null||n(b.value),p(b.label),d(!1)},children:b.label},b.value)):s.jsx(f.Box,{px:"3",py:"2",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:"No options found"})}),(a||r)&&s.jsx(f.Text,{mt:"1.5",fontSize:"xs",color:l?"red.500":"text.muted",fontFamily:"var(--font-body)",children:l?r:a})]})}const Ra=s.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),s.jsx("polyline",{points:"17 8 12 3 7 8"}),s.jsx("line",{x1:"12",y1:"3",x2:"12",y2:"15"})]});function Va({accept:e,multiple:t=!1,maxSize:n,label:o,helperText:i,errorMessage:a,isInvalid:r=!1,isDisabled:l=!1,onChange:c,dropzoneTitle:u="Click or drag to upload",id:d}){const[h,p]=S.useState(!1),[m,x]=S.useState([]),g=S.useRef(null),v=D=>{D.preventDefault(),l||p(!0)},b=D=>{D.preventDefault(),p(!1)},y=D=>{if(!D||D.length===0)return;const A=Array.from(D).filter(F=>!(n&&F.size>n));x(A.map(F=>F.name)),c==null||c(A)},w=D=>{D.preventDefault(),p(!1),!l&&y(D.dataTransfer.files)},j=D=>{y(D.target.files)},C=r?"red.500":h?"blue.500":"border",k=h?"bg.subtle":"transparent";return s.jsxs(f.Box,{w:"100%",children:[o&&s.jsx(f.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:o}),s.jsxs(f.Box,{position:"relative",border:"1.5px dashed",borderColor:C,borderRadius:"xl",bg:k,px:"6",py:"8",textAlign:"center",transition:"all 0.2s ease",opacity:l?.5:1,cursor:l?"not-allowed":"pointer",_hover:l?void 0:{borderColor:"blue.500",bg:"bg.subtle"},onDragEnter:v,onDragOver:v,onDragLeave:b,onDrop:w,onClick:()=>{var D;return!l&&((D=g.current)==null?void 0:D.click())},children:[s.jsx("input",{ref:g,id:d,type:"file",accept:e,multiple:t,disabled:l,style:{display:"none"},onChange:j}),s.jsx(f.Box,{color:"text.muted",display:"flex",justifyContent:"center",mb:"3",children:Ra}),s.jsx(f.Text,{fontSize:"sm",fontWeight:"medium",color:h?"blue.500":"text.heading",fontFamily:"var(--font-body)",children:u}),s.jsxs(f.Text,{fontSize:"xs",color:"text.muted",mt:"1",fontFamily:"var(--font-body)",children:[e?`Accepts ${e}`:"All file types supported",n&&` up to ${Math.round(n/1024/1024)}MB`]}),m.length>0&&s.jsxs(f.Box,{mt:"4",pt:"3",borderTop:"1px solid",borderColor:"border",children:[s.jsxs(f.Text,{fontSize:"xs",fontWeight:"semibold",color:"text.heading",mb:"1",fontFamily:"var(--font-body)",children:["Selected file",m.length>1?"s":"",":"]}),m.map((D,A)=>s.jsx(f.Text,{fontSize:"xs",color:"text.muted",truncate:!0,fontFamily:"var(--font-body)",children:D},A))]})]}),(i||a)&&s.jsx(f.Text,{mt:"1.5",fontSize:"xs",color:r?"red.500":"text.muted",fontFamily:"var(--font-body)",children:r?a:i})]})}const Yi=S.forwardRef(({noPadding:e=!1,hoverable:t=!1,children:n,...o},i)=>s.jsx(f.Box,{ref:i,bg:"bg.surface",borderRadius:"card",border:"1px solid",borderColor:"border",boxShadow:"card-light",_dark:{boxShadow:"card-dark"},overflow:"hidden",transition:"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",...t&&{_hover:{transform:"translateY(-2px)",boxShadow:"lg",borderColor:"blue.200"},cursor:"pointer"},...o,children:S.Children.map(n,a=>a||null)}));Yi.displayName="MedixCard";function La({title:e,subtitle:t,action:n,children:o,...i}){return s.jsxs(f.Box,{px:"6",py:"4",borderBottom:"1px solid",borderColor:"border",display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:"4",...i,children:[s.jsxs(f.Box,{flex:"1",children:[e&&s.jsx(f.Box,{as:"h3",fontSize:"lg",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"1.3",children:e}),t&&s.jsx(f.Box,{as:"p",mt:"0.5",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t}),o]}),n&&s.jsx(f.Box,{flexShrink:0,children:n})]})}function Ia({children:e,...t}){return s.jsx(f.Box,{px:"6",py:"5",...t,children:e})}function za({children:e,...t}){return s.jsx(f.Box,{px:"6",py:"4",borderTop:"1px solid",borderColor:"border",display:"flex",alignItems:"center",gap:"3",...t,children:e})}const Xi=S.forwardRef(({value:e,label:t,unit:n,change:o,trend:i,icon:a,accentColor:r="blue.500",...l},c)=>{const u=i??(o!==void 0?o>=0?"up":"down":"neutral"),d=u==="up"?"green.500":u==="down"?"red.500":"text.muted";return s.jsxs(f.Box,{ref:c,bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"6",boxShadow:"card-light",_dark:{boxShadow:"card-dark"},...l,children:[a&&s.jsx(f.Box,{w:"10",h:"10",borderRadius:"md",bg:`${r.split(".")[0]}.100`,color:r,display:"flex",alignItems:"center",justifyContent:"center",mb:"3",fontSize:"xl",children:a}),s.jsxs(f.Box,{fontSize:"4xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"1.1",children:[e,n&&s.jsx(f.Box,{as:"span",fontSize:"xl",fontWeight:"medium",color:"text.muted",ml:"1",children:n})]}),s.jsx(f.Box,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t}),o!==void 0&&s.jsxs(f.Box,{mt:"2",display:"inline-flex",alignItems:"center",gap:"1",fontSize:"xs",fontWeight:"medium",color:d,children:[s.jsx(f.Box,{as:"span",children:u==="up"?"↑":u==="down"?"↓":"→"}),s.jsxs(f.Box,{as:"span",children:[Math.abs(o),"%"]})]})]})});Xi.displayName="MedixStatCard";const Oa={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1440px",full:"100%"},Zi=S.forwardRef(({maxWidth:e="xl",children:t,...n},o)=>s.jsx(f.Box,{ref:o,w:"100%",maxW:Oa[e],mx:"auto",px:{base:"4",md:"6",lg:"8"},...n,children:t}));Zi.displayName="MedixContainer";function Wa({eyebrow:e,title:t,description:n,align:o="center",action:i,eyebrowColor:a="blue.500",...r}){const l=o,c=o==="center"?"center":o==="right"?"flex-end":"flex-start";return s.jsxs(f.Box,{display:"flex",flexDirection:"column",alignItems:c,textAlign:l,gap:"3",...r,children:[e&&s.jsx(f.Box,{as:"span",fontSize:"xs",fontWeight:"bold",color:a,letterSpacing:"wider",textTransform:"uppercase",fontFamily:"var(--font-body)",children:e}),s.jsx(f.Box,{as:"h2",fontSize:{base:"3xl",md:"4xl"},fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"snug",maxW:o==="center"?"720px":void 0,children:t}),n&&s.jsx(f.Box,{as:"p",fontSize:"md",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",maxW:o==="center"?"640px":void 0,children:n}),i&&s.jsx(f.Box,{mt:"2",children:i})]})}const Je="#0685FF",qi="rgba(6,133,255,0.08)",Ha="rgba(6,133,255,0.12)",_a="rgba(6,133,255,0.10)",Na="rgba(6,133,255,0.15)",Se="#EF4444",Ji="rgba(239,68,68,0.08)",$a=()=>s.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),s.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),s.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]}),Ua=()=>s.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),s.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),Ga=({open:e})=>s.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",style:{transition:"transform 0.2s ease",transform:e?"rotate(180deg)":"rotate(0deg)"},children:s.jsx("polyline",{points:"6 9 12 15 18 9"})}),Qi=()=>s.jsxs("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("path",{d:"M9 21H5a2 2 0 01-2-2V5a2 2 0 012-2h4"}),s.jsx("polyline",{points:"16 17 21 12 16 7"}),s.jsx("line",{x1:"21",y1:"12",x2:"9",y2:"12"})]}),Ka=()=>s.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("path",{d:"M20 21v-2a4 4 0 00-4-4H8a4 4 0 00-4 4v2"}),s.jsx("circle",{cx:"12",cy:"7",r:"4"})]}),Ya=()=>s.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("circle",{cx:"12",cy:"12",r:"3"}),s.jsx("path",{d:"M19.4 15a1.65 1.65 0 00.33 1.82l.06.06a2 2 0 010 2.83 2 2 0 01-2.83 0l-.06-.06a1.65 1.65 0 00-1.82-.33 1.65 1.65 0 00-1 1.51V21a2 2 0 01-4 0v-.09A1.65 1.65 0 009 19.4a1.65 1.65 0 00-1.82.33l-.06.06a2 2 0 01-2.83-2.83l.06-.06A1.65 1.65 0 004.68 15a1.65 1.65 0 00-1.51-1H3a2 2 0 010-4h.09A1.65 1.65 0 004.6 9a1.65 1.65 0 00-.33-1.82l-.06-.06a2 2 0 012.83-2.83l.06.06A1.65 1.65 0 009 4.68a1.65 1.65 0 001-1.51V3a2 2 0 014 0v.09a1.65 1.65 0 001 1.51 1.65 1.65 0 001.82-.33l.06-.06a2 2 0 012.83 2.83l-.06.06A1.65 1.65 0 0019.4 9a1.65 1.65 0 001.51 1H21a2 2 0 010 4h-.09a1.65 1.65 0 00-1.51 1z"})]}),Xa=(e,t)=>s.jsx("a",{href:e.href,style:{textDecoration:"none",display:"block"},children:t});function Za(){const e=new Date().getHours();return e<12?"Good morning":e<17?"Good afternoon":"Good evening"}function qa({item:e,renderLink:t,onClick:n}){const[o,i]=S.useState(!1),a=e.isActive??!1,r=s.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"3",px:"3",py:"2.5",borderRadius:"lg",borderLeftRadius:"none",borderTopLeftRadius:"none",borderBottomLeftRadius:"none",position:"relative",cursor:"pointer",onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),onClick:n,style:{background:a?_a:o?qi:"transparent",boxShadow:a?`inset 3px 0 0 ${Je}`:void 0,transition:"background 0.15s ease, box-shadow 0.15s ease"},_dark:{bg:a?Na:o?Ha:"transparent"},children:[e.icon&&s.jsx(f.Box,{flexShrink:0,style:{color:a?Je:void 0,opacity:a?1:o?.85:.6,transition:"color 0.15s ease, opacity 0.15s ease"},color:a?"blue.500":"text.body",children:e.icon}),s.jsx(f.Box,{as:"span",flex:"1",fontSize:"sm",fontWeight:a?"600":"500",fontFamily:"var(--font-body)",style:{color:a?Je:void 0,transition:"color 0.15s ease"},color:a?"blue.500":"text.body",children:e.label}),typeof e.badge=="number"&&s.jsx(f.Box,{as:"span",display:"inline-flex",alignItems:"center",justifyContent:"center",minW:"20px",h:"20px",px:"1",borderRadius:"full",fontSize:"xs",fontWeight:"700",lineHeight:"1",style:{background:Je,color:"#fff"},children:e.badge}),e.hasDot&&s.jsx(f.Box,{as:"span",display:"inline-block",w:"7px",h:"7px",borderRadius:"full",flexShrink:0,style:{background:Se},"aria-label":"New notification"})]});return t(e,r)}function Ja({logo:e,navGroups:t,isOpen:n,onClose:o,onLogout:i,renderLink:a,sidebarWidth:r}){const[l,c]=S.useState(!1);return s.jsxs(s.Fragment,{children:[n&&s.jsx(f.Box,{display:{base:"block",md:"none"},position:"fixed",inset:"0",zIndex:"overlay",bg:"blackAlpha.500",onClick:o,"aria-hidden":"true"}),s.jsxs(f.Box,{as:"aside","aria-label":"Main navigation",position:"fixed",top:"0",left:"0",bottom:"0",w:`${r}px`,zIndex:{base:"modal",md:"sticky"},bg:"bg",borderRight:"1px solid",borderColor:"border",display:"flex",flexDirection:"column",transform:{base:n?"translateX(0)":`translateX(-${r+10}px)`,md:"translateX(0)"},transition:"transform 0.25s cubic-bezier(0.22,1,0.36,1)",children:[s.jsx(f.Box,{px:"5",pt:"5",pb:"4",flexShrink:0,borderBottom:"1px solid",borderColor:"border",display:"flex",alignItems:"center",children:e}),s.jsx(f.Box,{flex:"1",overflowY:"auto",py:"3",px:"3",children:t.map((u,d)=>s.jsxs(f.Box,{mb:"4",children:[u.groupLabel&&s.jsx(f.Box,{px:"3",pb:"2",pt:d>0?"2":void 0,fontSize:"10px",fontWeight:"700",letterSpacing:"widest",textTransform:"uppercase",color:"text.muted",fontFamily:"var(--font-body)",children:u.groupLabel}),s.jsx(f.Box,{display:"flex",flexDirection:"column",gap:"0.5",children:u.items.map(h=>s.jsx(qa,{item:h,renderLink:a,onClick:o},h.href))})]},d))}),s.jsx(f.Box,{px:"3",pb:"4",pt:"2",flexShrink:0,borderTop:"1px solid",borderColor:"border",children:s.jsxs(f.Box,{as:"button",display:"flex",alignItems:"center",gap:"3",w:"full",px:"3",py:"2.5",borderRadius:"lg",border:"none",bg:"transparent",cursor:"pointer",onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),onClick:()=>{o(),i==null||i()},style:{background:l?Ji:"transparent",color:Se,transition:"background 0.15s ease"},children:[s.jsx(f.Box,{flexShrink:0,style:{color:Se},children:s.jsx(Qi,{})}),s.jsx(f.Box,{as:"span",fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",style:{color:Se},children:"Log out"})]})})]})]})}function Qa({user:e,greeting:t,isSidebarOpen:n,onMenuToggle:o,sidebarWidth:i,topBarSlot:a,dropdownItems:r,onLogout:l}){const[c,u]=S.useState(!1),d=S.useRef(null),h=S.useId(),p=`user-menu-button-${h}`,m=`user-menu-dropdown-${h}`;return S.useEffect(()=>{const x=g=>{d.current&&!d.current.contains(g.target)&&u(!1)};return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[]),s.jsxs(f.Box,{as:"header",role:"banner",position:"sticky",top:"0",zIndex:"docked",bg:"bg",borderBottom:"1px solid",borderColor:"border",h:"16",display:"flex",alignItems:"center",px:{base:"4",md:"6"},gap:"4",children:[s.jsx(f.Box,{as:"button",display:{base:"flex",md:"none"},alignItems:"center",justifyContent:"center",border:"none",bg:"transparent",p:"1",cursor:"pointer",color:"text.body",borderRadius:"md",_hover:{bg:"bg.subtle"},onClick:o,"aria-label":n?"Close navigation menu":"Open navigation menu","aria-expanded":n,children:n?s.jsx(Ua,{}):s.jsx($a,{})}),s.jsx(f.Box,{flex:"1",children:s.jsxs(f.Box,{as:"p",fontSize:{base:"sm",md:"md"},fontWeight:"500",fontFamily:"var(--font-body)",color:"text.body",children:[t,","," ",s.jsx(f.Box,{as:"span",fontWeight:"700",color:"text.heading",children:e.name})]})}),a,s.jsxs(f.Box,{position:"relative",ref:d,children:[s.jsxs(f.Box,{as:"button",id:p,display:"flex",alignItems:"center",gap:"2",bg:"transparent",border:"none",cursor:"pointer",borderRadius:"full",p:"1",_hover:{bg:"bg.subtle"},onClick:()=>u(x=>!x),"aria-haspopup":"menu","aria-expanded":c,"aria-controls":c?m:void 0,"aria-label":"User menu",children:[s.jsx(jn,{name:e.name,src:e.avatarSrc,size:"sm"}),s.jsx(f.Box,{color:"text.muted",children:s.jsx(Ga,{open:c})})]}),c&&s.jsxs(f.Box,{role:"menu","aria-labelledby":p,id:m,position:"absolute",top:"calc(100% + 8px)",right:"0",minW:"200px",bg:"bg",border:"1px solid",borderColor:"border",borderRadius:"xl",boxShadow:"0 8px 32px rgba(0,0,0,0.12)",zIndex:"popover",overflow:"hidden",py:"1",children:[s.jsxs(f.Box,{px:"4",py:"3",borderBottom:"1px solid",borderColor:"border",children:[s.jsx(f.Box,{fontSize:"sm",fontWeight:"700",color:"text.heading",fontFamily:"var(--font-body)",children:e.name}),e.email&&s.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:e.email})]}),!r&&s.jsxs(s.Fragment,{children:[s.jsx(Qe,{icon:s.jsx(Ka,{}),label:"My Profile",onClick:()=>u(!1)}),s.jsx(Qe,{icon:s.jsx(Ya,{}),label:"Settings",onClick:()=>u(!1)})]}),r==null?void 0:r.map((x,g)=>s.jsx(Qe,{icon:x.icon,label:x.label,isDanger:x.isDanger,onClick:()=>{var v;u(!1),(v=x.onClick)==null||v.call(x)}},g)),s.jsx(f.Box,{borderTop:"1px solid",borderColor:"border",my:"1"}),s.jsx(Qe,{icon:s.jsx(Qi,{}),label:"Log out",isDanger:!0,onClick:()=>{u(!1),l==null||l()}})]})]})]})}function Qe({icon:e,label:t,isDanger:n,onClick:o}){const[i,a]=S.useState(!1);return s.jsxs(f.Box,{as:"button",role:"menuitem",display:"flex",alignItems:"center",gap:"2.5",w:"full",px:"4",py:"2.5",border:"none",bg:"transparent",cursor:"pointer",textAlign:"left",onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),onClick:o,style:{background:i?n?Ji:qi:"transparent",color:n?Se:void 0,transition:"background 0.12s ease"},children:[e&&s.jsx(f.Box,{flexShrink:0,style:{color:n?Se:void 0},color:"text.muted",children:e}),s.jsx(f.Box,{as:"span",fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",style:{color:n?Se:void 0},color:n?void 0:"text.body",children:t})]})}function es({children:e,logo:t,navGroups:n,user:o,greeting:i,onLogout:a,renderLink:r=Xa,dropdownItems:l,topBarSlot:c,sidebarWidth:u=220,...d}){const[h,p]=S.useState(!1),m=i??Za();return s.jsxs(f.Box,{display:"flex",minH:"100vh",bg:"bg",...d,children:[s.jsx(Ja,{logo:t??s.jsx(jt,{height:26}),navGroups:n,isOpen:h,onClose:()=>p(!1),onLogout:a,renderLink:r,sidebarWidth:u}),s.jsxs(f.Box,{flex:"1",display:"flex",flexDirection:"column",minW:"0",ml:{base:"0",md:`${u}px`},transition:"margin-left 0.25s cubic-bezier(0.22,1,0.36,1)",children:[s.jsx(Qa,{user:o,greeting:m,isSidebarOpen:h,onMenuToggle:()=>p(x=>!x),sidebarWidth:u,topBarSlot:c,dropdownItems:l,onLogout:a}),s.jsx(f.Box,{as:"main",id:"main-content",role:"main",flex:"1",overflowY:"auto",bg:"bg.subtle",p:{base:"4",md:"6",lg:"8"},children:e})]})]})}es.displayName="MedixDashboardLayout";const Fn=S.createContext({});function Tn(e){const t=S.useRef(null);return t.current===null&&(t.current=e()),t.current}const el=typeof window<"u",ts=el?S.useLayoutEffect:S.useEffect,kt=S.createContext(null);function Bn(e,t){e.indexOf(t)===-1&&e.push(t)}function pt(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const ie=(e,t,n)=>n>t?t:n<e?e:n;function Zt(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Ve=()=>{},se=()=>{};var Bi;typeof process<"u"&&((Bi=process.env)==null?void 0:Bi.NODE_ENV)!=="production"&&(Ve=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(Zt(t,n))},se=(e,t,n)=>{if(!e)throw new Error(Zt(t,n))});const ue={},ns=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function os(e){return typeof e=="object"&&e!==null}const is=e=>/^0[^.\s]+$/u.test(e);function ss(e){let t;return()=>(t===void 0&&(t=e()),t)}const Z=e=>e,tl=(e,t)=>n=>t(e(n)),Ye=(...e)=>e.reduce(tl),$e=(e,t,n)=>{const o=t-e;return o===0?1:(n-e)/o};class An{constructor(){this.subscriptions=[]}add(t){return Bn(this.subscriptions,t),()=>pt(this.subscriptions,t)}notify(t,n,o){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,o);else for(let a=0;a<i;a++){const r=this.subscriptions[a];r&&r(t,n,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const $=e=>e*1e3,X=e=>e/1e3;function rs(e,t){return t?e*(1e3/t):0}const lo=new Set;function Dn(e,t,n){e||lo.has(t)||(console.warn(Zt(t,n)),lo.add(t))}const as=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,nl=1e-7,ol=12;function il(e,t,n,o,i){let a,r,l=0;do r=t+(n-t)/2,a=as(r,o,i)-e,a>0?n=r:t=r;while(Math.abs(a)>nl&&++l<ol);return r}function Xe(e,t,n,o){if(e===t&&n===o)return Z;const i=a=>il(a,0,1,e,n);return a=>a===0||a===1?a:as(i(a),t,o)}const ls=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,cs=e=>t=>1-e(1-t),ds=Xe(.33,1.53,.69,.99),Pn=cs(ds),us=ls(Pn),fs=e=>e>=1?1:(e*=2)<1?.5*Pn(e):.5*(2-Math.pow(2,-10*(e-1))),En=e=>1-Math.sin(Math.acos(e)),hs=cs(En),ps=ls(En),sl=Xe(.42,0,1,1),rl=Xe(0,0,.58,1),ms=Xe(.42,0,.58,1),al=e=>Array.isArray(e)&&typeof e[0]!="number",xs=e=>Array.isArray(e)&&typeof e[0]=="number",co={linear:Z,easeIn:sl,easeInOut:ms,easeOut:rl,circIn:En,circInOut:ps,circOut:hs,backIn:Pn,backInOut:us,backOut:ds,anticipate:fs},ll=e=>typeof e=="string",uo=e=>{if(xs(e)){se(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,o,i]=e;return Xe(t,n,o,i)}else if(ll(e))return se(co[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),co[e];return e},et=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function cl(e,t){let n=new Set,o=new Set,i=!1,a=!1;const r=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1};function c(d){r.has(d)&&(u.schedule(d),e()),d(l)}const u={schedule:(d,h=!1,p=!1)=>{const x=p&&i?n:o;return h&&r.add(d),x.add(d),d},cancel:d=>{o.delete(d),r.delete(d)},process:d=>{if(l=d,i){a=!0;return}i=!0;const h=n;n=o,o=h,n.forEach(c),n.clear(),i=!1,a&&(a=!1,u.process(d))}};return u}const dl=40;function gs(e,t){let n=!1,o=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,r=et.reduce((w,j)=>(w[j]=cl(a),w),{}),{setup:l,read:c,resolveKeyframes:u,preUpdate:d,update:h,preRender:p,render:m,postRender:x}=r,g=()=>{const w=ue.useManualTiming,j=w?i.timestamp:performance.now();n=!1,w||(i.delta=o?1e3/60:Math.max(Math.min(j-i.timestamp,dl),1)),i.timestamp=j,i.isProcessing=!0,l.process(i),c.process(i),u.process(i),d.process(i),h.process(i),p.process(i),m.process(i),x.process(i),i.isProcessing=!1,n&&t&&(o=!1,e(g))},v=()=>{n=!0,o=!0,i.isProcessing||e(g)};return{schedule:et.reduce((w,j)=>{const C=r[j];return w[j]=(k,D=!1,A=!1)=>(n||v(),C.schedule(k,D,A)),w},{}),cancel:w=>{for(let j=0;j<et.length;j++)r[et[j]].cancel(w)},state:i,steps:r}}const{schedule:M,cancel:fe,state:W,steps:Mt}=gs(typeof requestAnimationFrame<"u"?requestAnimationFrame:Z,!0);let st;function ul(){st=void 0}const _={now:()=>(st===void 0&&_.set(W.isProcessing||ue.useManualTiming?W.timestamp:performance.now()),st),set:e=>{st=e,queueMicrotask(ul)}},ys=e=>t=>typeof t=="string"&&t.startsWith(e),bs=ys("--"),fl=ys("var(--"),Mn=e=>fl(e)?hl.test(e.split("/*")[0].trim()):!1,hl=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function fo(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Le={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ue={...Le,transform:e=>ie(0,1,e)},tt={...Le,default:1},He=e=>Math.round(e*1e5)/1e5,Rn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function pl(e){return e==null}const ml=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Vn=(e,t)=>n=>!!(typeof n=="string"&&ml.test(n)&&n.startsWith(e)||t&&!pl(n)&&Object.prototype.hasOwnProperty.call(n,t)),vs=(e,t,n)=>o=>{if(typeof o!="string")return o;const[i,a,r,l]=o.match(Rn);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(r),alpha:l!==void 0?parseFloat(l):1}},xl=e=>ie(0,255,e),Rt={...Le,transform:e=>Math.round(xl(e))},ye={test:Vn("rgb","red"),parse:vs("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:o=1})=>"rgba("+Rt.transform(e)+", "+Rt.transform(t)+", "+Rt.transform(n)+", "+He(Ue.transform(o))+")"};function gl(e){let t="",n="",o="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),o=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),o=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,o+=o,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(o,16),alpha:i?parseInt(i,16)/255:1}}const qt={test:Vn("#"),parse:gl,transform:ye.transform},Ze=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),le=Ze("deg"),oe=Ze("%"),B=Ze("px"),yl=Ze("vh"),bl=Ze("vw"),ho={...oe,parse:e=>oe.parse(e)/100,transform:e=>oe.transform(e*100)},Be={test:Vn("hsl","hue"),parse:vs("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:o=1})=>"hsla("+Math.round(e)+", "+oe.transform(He(t))+", "+oe.transform(He(n))+", "+He(Ue.transform(o))+")"},I={test:e=>ye.test(e)||qt.test(e)||Be.test(e),parse:e=>ye.test(e)?ye.parse(e):Be.test(e)?Be.parse(e):qt.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ye.transform(e):Be.transform(e),getAnimatableNone:e=>{const t=I.parse(e);return t.alpha=0,I.transform(t)}},vl=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function wl(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Rn))==null?void 0:t.length)||0)+(((n=e.match(vl))==null?void 0:n.length)||0)>0}const ws="number",Ss="color",Sl="var",Cl="var(",po="${}",jl=/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 Ee(e){const t=e.toString(),n=[],o={color:[],number:[],var:[]},i=[];let a=0;const l=t.replace(jl,c=>(I.test(c)?(o.color.push(a),i.push(Ss),n.push(I.parse(c))):c.startsWith(Cl)?(o.var.push(a),i.push(Sl),n.push(c)):(o.number.push(a),i.push(ws),n.push(parseFloat(c))),++a,po)).split(po);return{values:n,split:l,indexes:o,types:i}}function kl(e){return Ee(e).values}function Cs({split:e,types:t}){const n=e.length;return o=>{let i="";for(let a=0;a<n;a++)if(i+=e[a],o[a]!==void 0){const r=t[a];r===ws?i+=He(o[a]):r===Ss?i+=I.transform(o[a]):i+=o[a]}return i}}function Fl(e){return Cs(Ee(e))}const Tl=e=>typeof e=="number"?0:I.test(e)?I.getAnimatableNone(e):e,Bl=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:Tl(e);function Al(e){const t=Ee(e);return Cs(t)(t.values.map((o,i)=>Bl(o,t.split[i])))}const Q={test:wl,parse:kl,createTransformer:Fl,getAnimatableNone:Al};function Vt(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Dl({hue:e,saturation:t,lightness:n,alpha:o}){e/=360,t/=100,n/=100;let i=0,a=0,r=0;if(!t)i=a=r=n;else{const l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;i=Vt(c,l,e+1/3),a=Vt(c,l,e),r=Vt(c,l,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(r*255),alpha:o}}function mt(e,t){return n=>n>0?t:e}const R=(e,t,n)=>e+(t-e)*n,Lt=(e,t,n)=>{const o=e*e,i=n*(t*t-o)+o;return i<0?0:Math.sqrt(i)},Pl=[qt,ye,Be],El=e=>Pl.find(t=>t.test(e));function mo(e){const t=El(e);if(Ve(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===Be&&(n=Dl(n)),n}const xo=(e,t)=>{const n=mo(e),o=mo(t);if(!n||!o)return mt(e,t);const i={...n};return a=>(i.red=Lt(n.red,o.red,a),i.green=Lt(n.green,o.green,a),i.blue=Lt(n.blue,o.blue,a),i.alpha=R(n.alpha,o.alpha,a),ye.transform(i))},Jt=new Set(["none","hidden"]);function Ml(e,t){return Jt.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Rl(e,t){return n=>R(e,t,n)}function Ln(e){return typeof e=="number"?Rl:typeof e=="string"?Mn(e)?mt:I.test(e)?xo:Il:Array.isArray(e)?js:typeof e=="object"?I.test(e)?xo:Vl:mt}function js(e,t){const n=[...e],o=n.length,i=e.map((a,r)=>Ln(a)(a,t[r]));return a=>{for(let r=0;r<o;r++)n[r]=i[r](a);return n}}function Vl(e,t){const n={...e,...t},o={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(o[i]=Ln(e[i])(e[i],t[i]));return i=>{for(const a in o)n[a]=o[a](i);return n}}function Ll(e,t){const n=[],o={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const a=t.types[i],r=e.indexes[a][o[a]],l=e.values[r]??0;n[i]=l,o[a]++}return n}const Il=(e,t)=>{const n=Q.createTransformer(t),o=Ee(e),i=Ee(t);return o.indexes.var.length===i.indexes.var.length&&o.indexes.color.length===i.indexes.color.length&&o.indexes.number.length>=i.indexes.number.length?Jt.has(e)&&!i.values.length||Jt.has(t)&&!o.values.length?Ml(e,t):Ye(js(Ll(o,i),i.values),n):(Ve(!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.`,"complex-values-different"),mt(e,t))};function ks(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?R(e,t,n):Ln(e)(e,t)}const zl=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>M.update(t,n),stop:()=>fe(t),now:()=>W.isProcessing?W.timestamp:_.now()}},Fs=(e,t,n=10)=>{let o="";const i=Math.max(Math.round(t/n),2);for(let a=0;a<i;a++)o+=Math.round(e(a/(i-1))*1e4)/1e4+", ";return`linear(${o.substring(0,o.length-2)})`},xt=2e4;function In(e){let t=0;const n=50;let o=e.next(t);for(;!o.done&&t<xt;)t+=n,o=e.next(t);return t>=xt?1/0:t}function Ol(e,t=100,n){const o=n({...e,keyframes:[0,t]}),i=Math.min(In(o),xt);return{type:"keyframes",ease:a=>o.next(i*a).value/t,duration:X(i)}}const L={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Qt(e,t){return e*Math.sqrt(1-t*t)}const Wl=12;function Hl(e,t,n){let o=n;for(let i=1;i<Wl;i++)o=o-e(o)/t(o);return o}const It=.001;function _l({duration:e=L.duration,bounce:t=L.bounce,velocity:n=L.velocity,mass:o=L.mass}){let i,a;Ve(e<=$(L.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let r=1-t;r=ie(L.minDamping,L.maxDamping,r),e=ie(L.minDuration,L.maxDuration,X(e)),r<1?(i=u=>{const d=u*r,h=d*e,p=d-n,m=Qt(u,r),x=Math.exp(-h);return It-p/m*x},a=u=>{const h=u*r*e,p=h*n+n,m=Math.pow(r,2)*Math.pow(u,2)*e,x=Math.exp(-h),g=Qt(Math.pow(u,2),r);return(-i(u)+It>0?-1:1)*((p-m)*x)/g}):(i=u=>{const d=Math.exp(-u*e),h=(u-n)*e+1;return-It+d*h},a=u=>{const d=Math.exp(-u*e),h=(n-u)*(e*e);return d*h});const l=5/e,c=Hl(i,a,l);if(e=$(e),isNaN(c))return{stiffness:L.stiffness,damping:L.damping,duration:e};{const u=Math.pow(c,2)*o;return{stiffness:u,damping:r*2*Math.sqrt(o*u),duration:e}}}const Nl=["duration","bounce"],$l=["stiffness","damping","mass"];function go(e,t){return t.some(n=>e[n]!==void 0)}function Ul(e){let t={velocity:L.velocity,stiffness:L.stiffness,damping:L.damping,mass:L.mass,isResolvedFromDuration:!1,...e};if(!go(e,$l)&&go(e,Nl))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,o=2*Math.PI/(n*1.2),i=o*o,a=2*ie(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:L.mass,stiffness:i,damping:a}}else{const n=_l({...e,velocity:0});t={...t,...n,mass:L.mass},t.isResolvedFromDuration=!0}return t}function gt(e=L.visualDuration,t=L.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:o,restDelta:i}=n;const a=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],l={done:!1,value:a},{stiffness:c,damping:u,mass:d,duration:h,velocity:p,isResolvedFromDuration:m}=Ul({...n,velocity:-X(n.velocity||0)}),x=p||0,g=u/(2*Math.sqrt(c*d)),v=r-a,b=X(Math.sqrt(c/d)),y=Math.abs(v)<5;o||(o=y?L.restSpeed.granular:L.restSpeed.default),i||(i=y?L.restDelta.granular:L.restDelta.default);let w,j,C,k,D,A;if(g<1)C=Qt(b,g),k=(x+g*b*v)/C,w=T=>{const P=Math.exp(-g*b*T);return r-P*(k*Math.sin(C*T)+v*Math.cos(C*T))},D=g*b*k+v*C,A=g*b*v-k*C,j=T=>Math.exp(-g*b*T)*(D*Math.sin(C*T)+A*Math.cos(C*T));else if(g===1){w=P=>r-Math.exp(-b*P)*(v+(x+b*v)*P);const T=x+b*v;j=P=>Math.exp(-b*P)*(b*T*P-x)}else{const T=b*Math.sqrt(g*g-1);w=G=>{const K=Math.exp(-g*b*G),ee=Math.min(T*G,300);return r-K*((x+g*b*v)*Math.sinh(ee)+T*v*Math.cosh(ee))/T};const P=(x+g*b*v)/T,E=g*b*P-v*T,U=g*b*v-P*T;j=G=>{const K=Math.exp(-g*b*G),ee=Math.min(T*G,300);return K*(E*Math.sinh(ee)+U*Math.cosh(ee))}}const F={calculatedDuration:m&&h||null,velocity:T=>$(j(T)),next:T=>{if(!m&&g<1){const E=Math.exp(-g*b*T),U=Math.sin(C*T),G=Math.cos(C*T),K=r-E*(k*U+v*G),ee=$(E*(D*U+A*G));return l.done=Math.abs(ee)<=o&&Math.abs(r-K)<=i,l.value=l.done?r:K,l}const P=w(T);if(m)l.done=T>=h;else{const E=$(j(T));l.done=Math.abs(E)<=o&&Math.abs(r-P)<=i}return l.value=l.done?r:P,l},toString:()=>{const T=Math.min(In(F),xt),P=Fs(E=>F.next(T*E).value,T,30);return T+"ms "+P},toTransition:()=>{}};return F}gt.applyToOptions=e=>{const t=Ol(e,100,gt);return e.ease=t.ease,e.duration=$(t.duration),e.type="keyframes",e};const Gl=5;function Ts(e,t,n){const o=Math.max(t-Gl,0);return rs(n-e(o),t-o)}function en({keyframes:e,velocity:t=0,power:n=.8,timeConstant:o=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:r,min:l,max:c,restDelta:u=.5,restSpeed:d}){const h=e[0],p={done:!1,value:h},m=A=>l!==void 0&&A<l||c!==void 0&&A>c,x=A=>l===void 0?c:c===void 0||Math.abs(l-A)<Math.abs(c-A)?l:c;let g=n*t;const v=h+g,b=r===void 0?v:r(v);b!==v&&(g=b-h);const y=A=>-g*Math.exp(-A/o),w=A=>b+y(A),j=A=>{const F=y(A),T=w(A);p.done=Math.abs(F)<=u,p.value=p.done?b:T};let C,k;const D=A=>{m(p.value)&&(C=A,k=gt({keyframes:[p.value,x(p.value)],velocity:Ts(w,A,p.value),damping:i,stiffness:a,restDelta:u,restSpeed:d}))};return D(0),{calculatedDuration:null,next:A=>{let F=!1;return!k&&C===void 0&&(F=!0,j(A),D(A)),C!==void 0&&A>=C?k.next(A-C):(!F&&j(A),p)}}}function Kl(e,t,n){const o=[],i=n||ue.mix||ks,a=e.length-1;for(let r=0;r<a;r++){let l=i(e[r],e[r+1]);if(t){const c=Array.isArray(t)?t[r]||Z:t;l=Ye(c,l)}o.push(l)}return o}function Yl(e,t,{clamp:n=!0,ease:o,mixer:i}={}){const a=e.length;if(se(a===t.length,"Both input and output ranges must be the same length","range-length"),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];const r=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=Kl(t,o,i),c=l.length,u=d=>{if(r&&d<e[0])return t[0];let h=0;if(c>1)for(;h<e.length-2&&!(d<e[h+1]);h++);const p=$e(e[h],e[h+1],d);return l[h](p)};return n?d=>u(ie(e[0],e[a-1],d)):u}function Xl(e,t){const n=e[e.length-1];for(let o=1;o<=t;o++){const i=$e(0,t,o);e.push(R(n,1,i))}}function Zl(e){const t=[0];return Xl(t,e.length-1),t}function ql(e,t){return e.map(n=>n*t)}function Jl(e,t){return e.map(()=>t||ms).splice(0,e.length-1)}function Ae({duration:e=300,keyframes:t,times:n,ease:o="easeInOut"}){const i=al(o)?o.map(uo):uo(o),a={done:!1,value:t[0]},r=ql(n&&n.length===t.length?n:Zl(t),e),l=Yl(r,t,{ease:Array.isArray(i)?i:Jl(t,i)});return{calculatedDuration:e,next:c=>(a.value=l(c),a.done=c>=e,a)}}const Ql=e=>e!==null;function Ft(e,{repeat:t,repeatType:n="loop"},o,i=1){const a=e.filter(Ql),l=i<0||t&&n!=="loop"&&t%2===1?0:a.length-1;return!l||o===void 0?a[l]:o}const ec={decay:en,inertia:en,tween:Ae,keyframes:Ae,spring:gt};function Bs(e){typeof e.type=="string"&&(e.type=ec[e.type])}class zn{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const tc=e=>e/100;class yt extends zn{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var o,i;const{motionValue:n}=this.options;n&&n.updatedAt!==_.now()&&this.tick(_.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(o=this.options).onStop)==null||i.call(o))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Bs(t);const{type:n=Ae,repeat:o=0,repeatDelay:i=0,repeatType:a,velocity:r=0}=t;let{keyframes:l}=t;const c=n||Ae;process.env.NODE_ENV!=="production"&&c!==Ae&&se(l.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${l}`,"spring-two-frames"),c!==Ae&&typeof l[0]!="number"&&(this.mixKeyframes=Ye(tc,ks(l[0],l[1])),l=[0,100]);const u=c({...t,keyframes:l});a==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...l].reverse(),velocity:-r})),u.calculatedDuration===null&&(u.calculatedDuration=In(u));const{calculatedDuration:d}=u;this.calculatedDuration=d,this.resolvedDuration=d+i,this.totalDuration=this.resolvedDuration*(o+1)-i,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:o,totalDuration:i,mixKeyframes:a,mirroredGenerator:r,resolvedDuration:l,calculatedDuration:c}=this;if(this.startTime===null)return o.next(0);const{delay:u=0,keyframes:d,repeat:h,repeatType:p,repeatDelay:m,type:x,onUpdate:g,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const b=this.currentTime-u*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?b<0:b>i;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let w=this.currentTime,j=o;if(h){const A=Math.min(this.currentTime,i)/l;let F=Math.floor(A),T=A%1;!T&&A>=1&&(T=1),T===1&&F--,F=Math.min(F,h+1),!!(F%2)&&(p==="reverse"?(T=1-T,m&&(T-=m/l)):p==="mirror"&&(j=r)),w=ie(0,1,T)*l}let C;y?(this.delayState.value=d[0],C=this.delayState):C=j.next(w),a&&!y&&(C.value=a(C.value));let{done:k}=C;!y&&c!==null&&(k=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const D=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&k);return D&&x!==en&&(C.value=Ft(d,this.options,v,this.speed)),g&&g(C.value),D&&this.finish(),C}then(t,n){return this.finished.then(t,n)}get duration(){return X(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+X(t)}get time(){return X(this.currentTime)}set time(t){t=$(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const n=this.generator.next(t).value;return Ts(o=>this.generator.next(o).value,t,n)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(_.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=X(this.currentTime))}play(){var i,a;if(this.isStopped)return;const{driver:t=zl,startTime:n}=this.options;this.driver||(this.driver=t(r=>this.tick(r))),(a=(i=this.options).onPlay)==null||a.call(i);const o=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=o):this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime||(this.startTime=n??o),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(_.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function nc(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const be=e=>e*180/Math.PI,tn=e=>{const t=be(Math.atan2(e[1],e[0]));return nn(t)},oc={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:tn,rotateZ:tn,skewX:e=>be(Math.atan(e[1])),skewY:e=>be(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},nn=e=>(e=e%360,e<0&&(e+=360),e),yo=tn,bo=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),vo=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),ic={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:bo,scaleY:vo,scale:e=>(bo(e)+vo(e))/2,rotateX:e=>nn(be(Math.atan2(e[6],e[5]))),rotateY:e=>nn(be(Math.atan2(-e[2],e[0]))),rotateZ:yo,rotate:yo,skewX:e=>be(Math.atan(e[4])),skewY:e=>be(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function on(e){return e.includes("scale")?1:0}function sn(e,t){if(!e||e==="none")return on(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let o,i;if(n)o=ic,i=n;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);o=oc,i=l}if(!i)return on(t);const a=o[t],r=i[1].split(",").map(rc);return typeof a=="function"?a(r):r[a]}const sc=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return sn(n,t)};function rc(e){return parseFloat(e.trim())}const Ie=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ze=new Set(Ie),wo=e=>e===Le||e===B,ac=new Set(["x","y","z"]),lc=Ie.filter(e=>!ac.has(e));function cc(e){const t=[];return lc.forEach(n=>{const o=e.getValue(n);o!==void 0&&(t.push([n,o.get()]),o.set(n.startsWith("scale")?1:0))}),t}const de={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:o})=>{const i=e.max-e.min;return o==="border-box"?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:o})=>{const i=e.max-e.min;return o==="border-box"?i:i-parseFloat(t)-parseFloat(n)},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:(e,{transform:t})=>sn(t,"x"),y:(e,{transform:t})=>sn(t,"y")};de.translateX=de.x;de.translateY=de.y;const Ce=new Set;let rn=!1,an=!1,ln=!1;function As(){if(an){const e=Array.from(Ce).filter(o=>o.needsMeasurement),t=new Set(e.map(o=>o.element)),n=new Map;t.forEach(o=>{const i=cc(o);i.length&&(n.set(o,i),o.render())}),e.forEach(o=>o.measureInitialState()),t.forEach(o=>{o.render();const i=n.get(o);i&&i.forEach(([a,r])=>{var l;(l=o.getValue(a))==null||l.set(r)})}),e.forEach(o=>o.measureEndState()),e.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}an=!1,rn=!1,Ce.forEach(e=>e.complete(ln)),Ce.clear()}function Ds(){Ce.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(an=!0)})}function dc(){ln=!0,Ds(),As(),ln=!1}class On{constructor(t,n,o,i,a,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=o,this.motionValue=i,this.element=a,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(Ce.add(this),rn||(rn=!0,M.read(Ds),M.resolveKeyframes(As))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:o,motionValue:i}=this;if(t[0]===null){const a=i==null?void 0:i.get(),r=t[t.length-1];if(a!==void 0)t[0]=a;else if(o&&n){const l=o.readValue(n,r);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=r),i&&a===void 0&&i.set(t[0])}nc(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Ce.delete(this)}cancel(){this.state==="scheduled"&&(Ce.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const uc=e=>e.startsWith("--");function Ps(e,t,n){uc(t)?e.style.setProperty(t,n):e.style[t]=n}const fc={};function Es(e,t){const n=ss(e);return()=>fc[t]??n()}const hc=Es(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Ms=Es(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),We=([e,t,n,o])=>`cubic-bezier(${e}, ${t}, ${n}, ${o})`,So={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:We([0,.65,.55,1]),circOut:We([.55,0,1,.45]),backIn:We([.31,.01,.66,-.59]),backOut:We([.33,1.53,.69,.99])};function Rs(e,t){if(e)return typeof e=="function"?Ms()?Fs(e,t):"ease-out":xs(e)?We(e):Array.isArray(e)?e.map(n=>Rs(n,t)||So.easeOut):So[e]}function pc(e,t,n,{delay:o=0,duration:i=300,repeat:a=0,repeatType:r="loop",ease:l="easeOut",times:c}={},u=void 0){const d={[t]:n};c&&(d.offset=c);const h=Rs(l,i);Array.isArray(h)&&(d.easing=h);const p={delay:o,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:a+1,direction:r==="reverse"?"alternate":"normal"};return u&&(p.pseudoElement=u),e.animate(d,p)}function Vs(e){return typeof e=="function"&&"applyToOptions"in e}function mc({type:e,...t}){return Vs(e)&&Ms()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Ls extends zn{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:o,keyframes:i,pseudoElement:a,allowFlatten:r=!1,finalKeyframe:l,onComplete:c}=t;this.isPseudoElement=!!a,this.allowFlatten=r,this.options=t,se(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=mc(t);this.animation=pc(n,o,i,u,a),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){const d=Ft(i,this.options,l,this.speed);this.updateMotionValue&&this.updateMotionValue(d),Ps(n,o,d),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,o,i;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((i=(o=this.animation).commitStyles)==null||i.call(o))}get duration(){var n,o;const t=((o=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:o.call(n).duration)||0;return X(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+X(t)}get time(){return X(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=$(t),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:n,rangeEnd:o,observe:i}){var a;return this.allowFlatten&&((a=this.animation.effect)==null||a.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&hc()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),o&&(this.animation.rangeEnd=o),Z):i(this)}}const Is={anticipate:fs,backInOut:us,circInOut:ps};function xc(e){return e in Is}function gc(e){typeof e.ease=="string"&&xc(e.ease)&&(e.ease=Is[e.ease])}const zt=10;class yc extends Ls{constructor(t){gc(t),Bs(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:o,onComplete:i,element:a,...r}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const l=new yt({...r,autoplay:!1}),c=Math.max(zt,_.now()-this.startTime),u=ie(0,zt,c-zt),d=l.sample(c).value,{name:h}=this.options;a&&h&&Ps(a,h,d),n.setWithVelocity(l.sample(Math.max(0,c-u)).value,d,u),l.stop()}}const Co=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Q.test(e)||e==="0")&&!e.startsWith("url("));function bc(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function vc(e,t,n,o){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const a=e[e.length-1],r=Co(i,t),l=Co(a,t);return Ve(r===l,`You are trying to animate ${t} from "${i}" to "${a}". "${r?a:i}" is not an animatable value.`,"value-not-animatable"),!r||!l?!1:bc(e)||(n==="spring"||Vs(n))&&o}function cn(e){e.duration=0,e.type="keyframes"}const zs=new Set(["opacity","clipPath","filter","transform"]),wc=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Sc(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&wc.test(e[t]))return!0;return!1}const Cc=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),jc=ss(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function kc(e){var h;const{motionValue:t,name:n,repeatDelay:o,repeatType:i,damping:a,type:r,keyframes:l}=e;if(!(((h=t==null?void 0:t.owner)==null?void 0:h.current)instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:d}=t.owner.getProps();return jc()&&n&&(zs.has(n)||Cc.has(n)&&Sc(l))&&(n!=="transform"||!d)&&!u&&!o&&i!=="mirror"&&a!==0&&r!=="inertia"}const Fc=40;class Tc extends zn{constructor({autoplay:t=!0,delay:n=0,type:o="keyframes",repeat:i=0,repeatDelay:a=0,repeatType:r="loop",keyframes:l,name:c,motionValue:u,element:d,...h}){var x;super(),this.stop=()=>{var g,v;this._animation&&(this._animation.stop(),(g=this.stopTimeline)==null||g.call(this)),(v=this.keyframeResolver)==null||v.cancel()},this.createdAt=_.now();const p={autoplay:t,delay:n,type:o,repeat:i,repeatDelay:a,repeatType:r,name:c,motionValue:u,element:d,...h},m=(d==null?void 0:d.KeyframeResolver)||On;this.keyframeResolver=new m(l,(g,v,b)=>this.onKeyframesResolved(g,v,p,!b),c,u,d),(x=this.keyframeResolver)==null||x.scheduleResolve()}onKeyframesResolved(t,n,o,i){var b,y;this.keyframeResolver=void 0;const{name:a,type:r,velocity:l,delay:c,isHandoff:u,onUpdate:d}=o;this.resolvedAt=_.now();let h=!0;vc(t,a,r,l)||(h=!1,(ue.instantAnimations||!c)&&(d==null||d(Ft(t,o,n))),t[0]=t[t.length-1],cn(o),o.repeat=0);const m={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Fc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...o,keyframes:t},x=h&&!u&&kc(m),g=(y=(b=m.motionValue)==null?void 0:b.owner)==null?void 0:y.current;let v;if(x)try{v=new yc({...m,element:g})}catch{v=new yt(m)}else v=new yt(m);v.finished.then(()=>{this.notifyFinished()}).catch(Z),this.pendingTimeline&&(this.stopTimeline=v.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=v}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),dc()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function Os(e,t,n,o=0,i=1){const a=Array.from(e).sort((u,d)=>u.sortNodePosition(d)).indexOf(t),r=e.size,l=(r-1)*o;return typeof n=="function"?n(a,r):i===1?a*o:l-a*o}const Bc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ac(e){const t=Bc.exec(e);if(!t)return[,];const[,n,o,i]=t;return[`--${n??o}`,i]}const Dc=4;function Ws(e,t,n=1){se(n<=Dc,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[o,i]=Ac(e);if(!o)return;const a=window.getComputedStyle(t).getPropertyValue(o);if(a){const r=a.trim();return ns(r)?parseFloat(r):r}return Mn(i)?Ws(i,t,n+1):i}const Pc={type:"spring",stiffness:500,damping:25,restSpeed:10},Ec=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Mc={type:"keyframes",duration:.8},Rc={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Vc=(e,{keyframes:t})=>t.length>2?Mc:ze.has(e)?e.startsWith("scale")?Ec(t[1]):Pc:Rc;function Hs(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...o}=e;return{...t,...o}}return e}function Wn(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?Hs(n,e):n}const Lc=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function Ic(e){for(const t in e)if(!Lc.has(t))return!0;return!1}const Hn=(e,t,n,o={},i,a)=>r=>{const l=Wn(o,e)||{},c=l.delay||o.delay||0;let{elapsed:u=0}=o;u=u-$(c);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:p=>{t.set(p),l.onUpdate&&l.onUpdate(p)},onComplete:()=>{r(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:a?void 0:i};Ic(l)||Object.assign(d,Vc(e,d)),d.duration&&(d.duration=$(d.duration)),d.repeatDelay&&(d.repeatDelay=$(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let h=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(cn(d),d.delay===0&&(h=!0)),(ue.instantAnimations||ue.skipAnimations||i!=null&&i.shouldSkipAnimations)&&(h=!0,cn(d),d.delay=0),d.allowFlatten=!l.type&&!l.ease,h&&!a&&t.get()!==void 0){const p=Ft(d.keyframes,l);if(p!==void 0){M.update(()=>{d.onUpdate(p),d.onComplete()});return}}return l.isSync?new yt(d):new Tc(d)};function jo(e){const t=[{},{}];return e==null||e.values.forEach((n,o)=>{t[0][o]=n.get(),t[1][o]=n.getVelocity()}),t}function _n(e,t,n,o){if(typeof t=="function"){const[i,a]=jo(o);t=t(n!==void 0?n:e.custom,i,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,a]=jo(o);t=t(n!==void 0?n:e.custom,i,a)}return t}function je(e,t,n){const o=e.getProps();return _n(o,t,n!==void 0?n:o.custom,e)}const _s=new Set(["width","height","top","left","right","bottom",...Ie]),ko=30,zc=e=>!isNaN(parseFloat(e));class Oc{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=o=>{var a;const i=_.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&((a=this.events.change)==null||a.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=_.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=zc(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Dn(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new An);const o=this.events[t].add(n);return t==="change"?()=>{o(),M.read(()=>{this.events.change.getSize()||this.stop()})}:o}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,o){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-o}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=_.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>ko)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,ko);return rs(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Me(e,t){return new Oc(e,t)}const dn=e=>Array.isArray(e);function Wc(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Me(n))}function Hc(e){return dn(e)?e[e.length-1]||0:e}function _c(e,t){const n=je(e,t);let{transitionEnd:o={},transition:i={},...a}=n||{};a={...a,...o};for(const r in a){const l=Hc(a[r]);Wc(e,r,l)}}const H=e=>!!(e&&e.getVelocity);function Nc(e){return!!(H(e)&&e.add)}function un(e,t){const n=e.getValue("willChange");if(Nc(n))return n.add(t);if(!n&&ue.WillChange){const o=new ue.WillChange("auto");e.addValue("willChange",o),o.add(t)}}function Nn(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const $c="framerAppearId",Ns="data-"+Nn($c);function $s(e){return e.props[Ns]}function Uc({protectedKeys:e,needsAnimating:t},n){const o=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,o}function Us(e,t,{delay:n=0,transitionOverride:o,type:i}={}){let{transition:a,transitionEnd:r,...l}=t;const c=e.getDefaultTransition();a=a?Hs(a,c):c;const u=a==null?void 0:a.reduceMotion;o&&(a=o);const d=[],h=i&&e.animationState&&e.animationState.getState()[i];for(const p in l){const m=e.getValue(p,e.latestValues[p]??null),x=l[p];if(x===void 0||h&&Uc(h,p))continue;const g={delay:n,...Wn(a||{},p)},v=m.get();if(v!==void 0&&!m.isAnimating()&&!Array.isArray(x)&&x===v&&!g.velocity){M.update(()=>m.set(x));continue}let b=!1;if(window.MotionHandoffAnimation){const j=$s(e);if(j){const C=window.MotionHandoffAnimation(j,p,M);C!==null&&(g.startTime=C,b=!0)}}un(e,p);const y=u??e.shouldReduceMotion;m.start(Hn(p,m,x,y&&_s.has(p)?{type:!1}:g,e,b));const w=m.animation;w&&d.push(w)}if(r){const p=()=>M.update(()=>{r&&_c(e,r)});d.length?Promise.all(d).then(p):p()}return d}function fn(e,t,n={}){var c;const o=je(e,t,n.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const a=o?()=>Promise.all(Us(e,o,n)):()=>Promise.resolve(),r=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:h,staggerDirection:p}=i;return Gc(e,t,u,d,h,p,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[u,d]=l==="beforeChildren"?[a,r]:[r,a];return u().then(()=>d())}else return Promise.all([a(),r(n.delay)])}function Gc(e,t,n=0,o=0,i=0,a=1,r){const l=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),l.push(fn(c,t,{...r,delay:n+(typeof o=="function"?0:o)+Os(e.variantChildren,c,o,i,a)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(l)}function Kc(e,t,n={}){e.notify("AnimationStart",t);let o;if(Array.isArray(t)){const i=t.map(a=>fn(e,a,n));o=Promise.all(i)}else if(typeof t=="string")o=fn(e,t,n);else{const i=typeof t=="function"?je(e,t,n.custom):t;o=Promise.all(Us(e,i,n))}return o.then(()=>{e.notify("AnimationComplete",t)})}const Yc={test:e=>e==="auto",parse:e=>e},Gs=e=>t=>t.test(e),Ks=[Le,B,oe,le,bl,yl,Yc],Fo=e=>Ks.find(Gs(e));function Xc(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||is(e):!0}const Zc=new Set(["brightness","contrast","saturate","opacity"]);function qc(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[o]=n.match(Rn)||[];if(!o)return e;const i=n.replace(o,"");let a=Zc.has(t)?1:0;return o!==n&&(a*=100),t+"("+a+i+")"}const Jc=/\b([a-z-]*)\(.*?\)/gu,hn={...Q,getAnimatableNone:e=>{const t=e.match(Jc);return t?t.map(qc).join(" "):e}},pn={...Q,getAnimatableNone:e=>{const t=Q.parse(e);return Q.createTransformer(e)(t.map(o=>typeof o=="number"?0:typeof o=="object"?{...o,alpha:1}:o))}},To={...Le,transform:Math.round},Qc={rotate:le,rotateX:le,rotateY:le,rotateZ:le,scale:tt,scaleX:tt,scaleY:tt,scaleZ:tt,skew:le,skewX:le,skewY:le,distance:B,translateX:B,translateY:B,translateZ:B,x:B,y:B,z:B,perspective:B,transformPerspective:B,opacity:Ue,originX:ho,originY:ho,originZ:B},$n={borderWidth:B,borderTopWidth:B,borderRightWidth:B,borderBottomWidth:B,borderLeftWidth:B,borderRadius:B,borderTopLeftRadius:B,borderTopRightRadius:B,borderBottomRightRadius:B,borderBottomLeftRadius:B,width:B,maxWidth:B,height:B,maxHeight:B,top:B,right:B,bottom:B,left:B,inset:B,insetBlock:B,insetBlockStart:B,insetBlockEnd:B,insetInline:B,insetInlineStart:B,insetInlineEnd:B,padding:B,paddingTop:B,paddingRight:B,paddingBottom:B,paddingLeft:B,paddingBlock:B,paddingBlockStart:B,paddingBlockEnd:B,paddingInline:B,paddingInlineStart:B,paddingInlineEnd:B,margin:B,marginTop:B,marginRight:B,marginBottom:B,marginLeft:B,marginBlock:B,marginBlockStart:B,marginBlockEnd:B,marginInline:B,marginInlineStart:B,marginInlineEnd:B,fontSize:B,backgroundPositionX:B,backgroundPositionY:B,...Qc,zIndex:To,fillOpacity:Ue,strokeOpacity:Ue,numOctaves:To},ed={...$n,color:I,backgroundColor:I,outlineColor:I,fill:I,stroke:I,borderColor:I,borderTopColor:I,borderRightColor:I,borderBottomColor:I,borderLeftColor:I,filter:hn,WebkitFilter:hn,mask:pn,WebkitMask:pn},Ys=e=>ed[e],td=new Set([hn,pn]);function Xs(e,t){let n=Ys(e);return td.has(n)||(n=Q),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const nd=new Set(["auto","none","0"]);function od(e,t,n){let o=0,i;for(;o<e.length&&!i;){const a=e[o];typeof a=="string"&&!nd.has(a)&&Ee(a).values.length&&(i=e[o]),o++}if(i&&n)for(const a of t)e[a]=Xs(n,i)}class id extends On{constructor(t,n,o,i,a){super(t,n,o,i,a,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:o}=this;if(!n||!n.current)return;super.readKeyframes();for(let d=0;d<t.length;d++){let h=t[d];if(typeof h=="string"&&(h=h.trim(),Mn(h))){const p=Ws(h,n.current);p!==void 0&&(t[d]=p),d===t.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!_s.has(o)||t.length!==2)return;const[i,a]=t,r=Fo(i),l=Fo(a),c=fo(i),u=fo(a);if(c!==u&&de[o]){this.needsMeasurement=!0;return}if(r!==l)if(wo(r)&&wo(l))for(let d=0;d<t.length;d++){const h=t[d];typeof h=="string"&&(t[d]=parseFloat(h))}else de[o]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,o=[];for(let i=0;i<t.length;i++)(t[i]===null||Xc(t[i]))&&o.push(i);o.length&&od(t,o,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:o}=this;if(!t||!t.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=de[o](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(o,i).jump(i,!1)}measureEndState(){var l;const{element:t,name:n,unresolvedKeyframes:o}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const a=o.length-1,r=o[a];o[a]=de[n](t.measureViewportBox(),window.getComputedStyle(t.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),(l=this.removedTransforms)!=null&&l.length&&this.removedTransforms.forEach(([c,u])=>{t.getValue(c).set(u)}),this.resolveNoneKeyframes()}}function Zs(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let o=document;const i=(n==null?void 0:n[e])??o.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(o=>o!=null)}const qs=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function rt(e){return os(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:Un}=gs(queueMicrotask,!1),J={x:!1,y:!1};function Js(){return J.x||J.y}function sd(e){return e==="x"||e==="y"?J[e]?null:(J[e]=!0,()=>{J[e]=!1}):J.x||J.y?null:(J.x=J.y=!0,()=>{J.x=J.y=!1})}function Qs(e,t){const n=Zs(e),o=new AbortController,i={passive:!0,...t,signal:o.signal};return[n,i,()=>o.abort()]}function rd(e){return!(e.pointerType==="touch"||Js())}function ad(e,t,n={}){const[o,i,a]=Qs(e,n);return o.forEach(r=>{let l=!1,c=!1,u;const d=()=>{r.removeEventListener("pointerleave",x)},h=v=>{u&&(u(v),u=void 0),d()},p=v=>{l=!1,window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",p),c&&(c=!1,h(v))},m=()=>{l=!0,window.addEventListener("pointerup",p,i),window.addEventListener("pointercancel",p,i)},x=v=>{if(v.pointerType!=="touch"){if(l){c=!0;return}h(v)}},g=v=>{if(!rd(v))return;c=!1;const b=t(r,v);typeof b=="function"&&(u=b,r.addEventListener("pointerleave",x,i))};r.addEventListener("pointerenter",g,i),r.addEventListener("pointerdown",m,i)}),a}const er=(e,t)=>t?e===t?!0:er(e,t.parentElement):!1,Gn=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,ld=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function cd(e){return ld.has(e.tagName)||e.isContentEditable===!0}const dd=new Set(["INPUT","SELECT","TEXTAREA"]);function ud(e){return dd.has(e.tagName)||e.isContentEditable===!0}const at=new WeakSet;function Bo(e){return t=>{t.key==="Enter"&&e(t)}}function Ot(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const fd=(e,t)=>{const n=e.currentTarget;if(!n)return;const o=Bo(()=>{if(at.has(n))return;Ot(n,"down");const i=Bo(()=>{Ot(n,"up")}),a=()=>Ot(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",a,t)});n.addEventListener("keydown",o,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",o),t)};function Ao(e){return Gn(e)&&!Js()}const Do=new WeakSet;function hd(e,t,n={}){const[o,i,a]=Qs(e,n),r=l=>{const c=l.currentTarget;if(!Ao(l)||Do.has(l))return;at.add(c),n.stopPropagation&&Do.add(l);const u=t(c,l),d=(m,x)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",p),at.has(c)&&at.delete(c),Ao(m)&&typeof u=="function"&&u(m,{success:x})},h=m=>{d(m,c===window||c===document||n.useGlobalTarget||er(c,m.target))},p=m=>{d(m,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",p,i)};return o.forEach(l=>{(n.useGlobalTarget?window:l).addEventListener("pointerdown",r,i),rt(l)&&(l.addEventListener("focus",u=>fd(u,i)),!cd(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),a}function Kn(e){return os(e)&&"ownerSVGElement"in e}const lt=new WeakMap;let ce;const tr=(e,t,n)=>(o,i)=>i&&i[0]?i[0][e+"Size"]:Kn(o)&&"getBBox"in o?o.getBBox()[t]:o[n],pd=tr("inline","width","offsetWidth"),md=tr("block","height","offsetHeight");function xd({target:e,borderBoxSize:t}){var n;(n=lt.get(e))==null||n.forEach(o=>{o(e,{get width(){return pd(e,t)},get height(){return md(e,t)}})})}function gd(e){e.forEach(xd)}function yd(){typeof ResizeObserver>"u"||(ce=new ResizeObserver(gd))}function bd(e,t){ce||yd();const n=Zs(e);return n.forEach(o=>{let i=lt.get(o);i||(i=new Set,lt.set(o,i)),i.add(t),ce==null||ce.observe(o)}),()=>{n.forEach(o=>{const i=lt.get(o);i==null||i.delete(t),i!=null&&i.size||ce==null||ce.unobserve(o)})}}const ct=new Set;let De;function vd(){De=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};ct.forEach(t=>t(e))},window.addEventListener("resize",De)}function wd(e){return ct.add(e),De||vd(),()=>{ct.delete(e),!ct.size&&typeof De=="function"&&(window.removeEventListener("resize",De),De=void 0)}}function Po(e,t){return typeof e=="function"?wd(e):bd(e,t)}function Sd(e){return Kn(e)&&e.tagName==="svg"}const Cd=[...Ks,I,Q],jd=e=>Cd.find(Gs(e)),Eo=()=>({translate:0,scale:1,origin:0,originPoint:0}),Pe=()=>({x:Eo(),y:Eo()}),Mo=()=>({min:0,max:0}),z=()=>({x:Mo(),y:Mo()}),kd=new WeakMap;function Tt(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ge(e){return typeof e=="string"||Array.isArray(e)}const Yn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Xn=["initial",...Yn];function Bt(e){return Tt(e.animate)||Xn.some(t=>Ge(e[t]))}function nr(e){return!!(Bt(e)||e.variants)}function Fd(e,t,n){for(const o in t){const i=t[o],a=n[o];if(H(i))e.addValue(o,i);else if(H(a))e.addValue(o,Me(i,{owner:e}));else if(a!==i)if(e.hasValue(o)){const r=e.getValue(o);r.liveStyle===!0?r.jump(i):r.hasAnimated||r.set(i)}else{const r=e.getStaticValue(o);e.addValue(o,Me(r!==void 0?r:i,{owner:e}))}}for(const o in n)t[o]===void 0&&e.removeValue(o);return t}const mn={current:null},or={current:!1},Td=typeof window<"u";function Bd(){if(or.current=!0,!!Td)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>mn.current=e.matches;e.addEventListener("change",t),t()}else mn.current=!1}const Ro=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let bt={};function ir(e){bt=e}function Ad(){return bt}class Dd{scrapeMotionValuesFromProps(t,n,o){return{}}constructor({parent:t,props:n,presenceContext:o,reducedMotionConfig:i,skipAnimations:a,blockInitialAnimation:r,visualState:l},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=On,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const m=_.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,M.render(this.render,!1,!0))};const{latestValues:u,renderState:d}=l;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=d,this.parent=t,this.props=n,this.presenceContext=o,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=a,this.options=c,this.blockInitialAnimation=!!r,this.isControllingVariants=Bt(n),this.isVariantNode=nr(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:h,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in p){const x=p[m];u[m]!==void 0&&H(x)&&x.set(u[m])}}mount(t){var n,o;if(this.hasBeenMounted)for(const i in this.initialValues)(n=this.values.get(i))==null||n.jump(this.initialValues[i]),this.latestValues[i]=this.initialValues[i];this.current=t,kd.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((i,a)=>this.bindToMotionValue(a,i)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(or.current||Bd(),this.shouldReduceMotion=mn.current),process.env.NODE_ENV!=="production"&&Dn(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(o=this.parent)==null||o.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),fe(this.notifyUpdate),fe(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const o=this.features[n];o&&(o.unmount(),o.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&zs.has(t)&&this.current instanceof HTMLElement){const{factory:r,keyframes:l,times:c,ease:u,duration:d}=n.accelerate,h=new Ls({element:this.current,name:t,keyframes:l,times:c,ease:u,duration:$(d)}),p=r(h);this.valueSubscriptions.set(t,()=>{p(),h.cancel()});return}const o=ze.has(t);o&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",r=>{this.latestValues[t]=r,this.props.onUpdate&&M.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let a;typeof window<"u"&&window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),a&&a(),n.owner&&n.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 bt){const n=bt[t];if(!n)continue;const{isEnabled:o,Feature:i}=n;if(!this.features[t]&&i&&o(this.props)&&(this.features[t]=new i(this)),this.features[t]){const 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):z()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let o=0;o<Ro.length;o++){const i=Ro[o];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const a="on"+i,r=t[a];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=Fd(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}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){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const o=this.values.get(t);n!==o&&(o&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let o=this.values.get(t);return o===void 0&&n!==void 0&&(o=Me(n===null?void 0:n,{owner:this}),this.addValue(t,o)),o}readValue(t,n){let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(ns(o)||is(o))?o=parseFloat(o):!jd(o)&&Q.test(n)&&(o=Xs(t,n)),this.setBaseTarget(t,H(o)?o.get():o)),H(o)?o.get():o}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var a;const{initial:n}=this.props;let o;if(typeof n=="string"||typeof n=="object"){const r=_n(this.props,n,(a=this.presenceContext)==null?void 0:a.custom);r&&(o=r[t])}if(n&&o!==void 0)return o;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!H(i)?i:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new An),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Un.render(this.render)}}class sr extends Dd{constructor(){super(...arguments),this.KeyframeResolver=id}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const o=t.style;return o?o[n]:void 0}removeValueFromRenderState(t,{vars:n,style:o}){delete n[t],delete o[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;H(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class he{constructor(t){this.isMounted=!1,this.node=t}update(){}}function rr({top:e,left:t,right:n,bottom:o}){return{x:{min:t,max:n},y:{min:e,max:o}}}function Pd({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Ed(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),o=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:o.y,right:o.x}}function Wt(e){return e===void 0||e===1}function xn({scale:e,scaleX:t,scaleY:n}){return!Wt(e)||!Wt(t)||!Wt(n)}function xe(e){return xn(e)||ar(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function ar(e){return Vo(e.x)||Vo(e.y)}function Vo(e){return e&&e!=="0%"}function vt(e,t,n){const o=e-n,i=t*o;return n+i}function Lo(e,t,n,o,i){return i!==void 0&&(e=vt(e,i,o)),vt(e,n,o)+t}function gn(e,t=0,n=1,o,i){e.min=Lo(e.min,t,n,o,i),e.max=Lo(e.max,t,n,o,i)}function lr(e,{x:t,y:n}){gn(e.x,t.translate,t.scale,t.originPoint),gn(e.y,n.translate,n.scale,n.originPoint)}const Io=.999999999999,zo=1.0000000000001;function Md(e,t,n,o=!1){var l;const i=n.length;if(!i)return;t.x=t.y=1;let a,r;for(let c=0;c<i;c++){a=n[c],r=a.projectionDelta;const{visualElement:u}=a.options;u&&u.props.style&&u.props.style.display==="contents"||(o&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(ne(e.x,-a.scroll.offset.x),ne(e.y,-a.scroll.offset.y)),r&&(t.x*=r.x.scale,t.y*=r.y.scale,lr(e,r)),o&&xe(a.latestValues)&&dt(e,a.latestValues,(l=a.layout)==null?void 0:l.layoutBox))}t.x<zo&&t.x>Io&&(t.x=1),t.y<zo&&t.y>Io&&(t.y=1)}function ne(e,t){e.min+=t,e.max+=t}function Oo(e,t,n,o,i=.5){const a=R(e.min,e.max,i);gn(e,t,n,a,o)}function Wo(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function dt(e,t,n){const o=n??e;Oo(e.x,Wo(t.x,o.x),t.scaleX,t.scale,t.originX),Oo(e.y,Wo(t.y,o.y),t.scaleY,t.scale,t.originY)}function cr(e,t){return rr(Ed(e.getBoundingClientRect(),t))}function Rd(e,t,n){const o=cr(e,n),{scroll:i}=t;return i&&(ne(o.x,i.offset.x),ne(o.y,i.offset.y)),o}const Vd={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Ld=Ie.length;function Id(e,t,n){let o="",i=!0;for(let a=0;a<Ld;a++){const r=Ie[a],l=e[r];if(l===void 0)continue;let c=!0;if(typeof l=="number")c=l===(r.startsWith("scale")?1:0);else{const u=parseFloat(l);c=r.startsWith("scale")?u===1:u===0}if(!c||n){const u=qs(l,$n[r]);if(!c){i=!1;const d=Vd[r]||r;o+=`${d}(${u}) `}n&&(t[r]=u)}}return o=o.trim(),n?o=n(t,i?"":o):i&&(o="none"),o}function Zn(e,t,n){const{style:o,vars:i,transformOrigin:a}=e;let r=!1,l=!1;for(const c in t){const u=t[c];if(ze.has(c)){r=!0;continue}else if(bs(c)){i[c]=u;continue}else{const d=qs(u,$n[c]);c.startsWith("origin")?(l=!0,a[c]=d):o[c]=d}}if(t.transform||(r||n?o.transform=Id(t,e.transform,n):o.transform&&(o.transform="none")),l){const{originX:c="50%",originY:u="50%",originZ:d=0}=a;o.transformOrigin=`${c} ${u} ${d}`}}function dr(e,{style:t,vars:n},o,i){const a=e.style;let r;for(r in t)a[r]=t[r];i==null||i.applyProjectionStyles(a,o);for(r in n)a.setProperty(r,n[r])}function Ho(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Oe={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(B.test(e))e=parseFloat(e);else return e;const n=Ho(e,t.target.x),o=Ho(e,t.target.y);return`${n}% ${o}%`}},zd={correct:(e,{treeScale:t,projectionDelta:n})=>{const o=e,i=Q.parse(e);if(i.length>5)return o;const a=Q.createTransformer(e),r=typeof i[0]!="number"?1:0,l=n.x.scale*t.x,c=n.y.scale*t.y;i[0+r]/=l,i[1+r]/=c;const u=R(l,c,.5);return typeof i[2+r]=="number"&&(i[2+r]/=u),typeof i[3+r]=="number"&&(i[3+r]/=u),a(i)}},yn={borderRadius:{...Oe,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Oe,borderTopRightRadius:Oe,borderBottomLeftRadius:Oe,borderBottomRightRadius:Oe,boxShadow:zd};function ur(e,{layout:t,layoutId:n}){return ze.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!yn[e]||e==="opacity")}function qn(e,t,n){var r;const o=e.style,i=t==null?void 0:t.style,a={};if(!o)return a;for(const l in o)(H(o[l])||i&&H(i[l])||ur(l,e)||((r=n==null?void 0:n.getValue(l))==null?void 0:r.liveStyle)!==void 0)&&(a[l]=o[l]);return a}function Od(e){return window.getComputedStyle(e)}class Wd extends sr{constructor(){super(...arguments),this.type="html",this.renderInstance=dr}readValueFromInstance(t,n){var o;if(ze.has(n))return(o=this.projection)!=null&&o.isProjecting?on(n):sc(t,n);{const i=Od(t),a=(bs(n)?i.getPropertyValue(n):i[n])||0;return typeof a=="string"?a.trim():a}}measureInstanceViewportBox(t,{transformPagePoint:n}){return cr(t,n)}build(t,n,o){Zn(t,n,o.transformTemplate)}scrapeMotionValuesFromProps(t,n,o){return qn(t,n,o)}}const Hd={offset:"stroke-dashoffset",array:"stroke-dasharray"},_d={offset:"strokeDashoffset",array:"strokeDasharray"};function Nd(e,t,n=1,o=0,i=!0){e.pathLength=1;const a=i?Hd:_d;e[a.offset]=`${-o}`,e[a.array]=`${t} ${n}`}const $d=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function fr(e,{attrX:t,attrY:n,attrScale:o,pathLength:i,pathSpacing:a=1,pathOffset:r=0,...l},c,u,d){if(Zn(e,l,u),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:p}=e;h.transform&&(p.transform=h.transform,delete h.transform),(p.transform||h.transformOrigin)&&(p.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),p.transform&&(p.transformBox=(d==null?void 0:d.transformBox)??"fill-box",delete h.transformBox);for(const m of $d)h[m]!==void 0&&(p[m]=h[m],delete h[m]);t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),o!==void 0&&(h.scale=o),i!==void 0&&Nd(h,i,a,r,!1)}const hr=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"]),pr=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Ud(e,t,n,o){dr(e,t,void 0,o);for(const i in t.attrs)e.setAttribute(hr.has(i)?i:Nn(i),t.attrs[i])}function mr(e,t,n){const o=qn(e,t,n);for(const i in e)if(H(e[i])||H(t[i])){const a=Ie.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;o[a]=e[i]}return o}class Gd extends sr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=z}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ze.has(n)){const o=Ys(n);return o&&o.default||0}return n=hr.has(n)?n:Nn(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,o){return mr(t,n,o)}build(t,n,o){fr(t,n,this.isSVGTag,o.transformTemplate,o.style)}renderInstance(t,n,o,i){Ud(t,n,o,i)}mount(t){this.isSVGTag=pr(t.tagName),super.mount(t)}}const Kd=Xn.length;function xr(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?xr(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Kd;n++){const o=Xn[n],i=e.props[o];(Ge(i)||i===!1)&&(t[o]=i)}return t}function gr(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let o=0;o<n;o++)if(t[o]!==e[o])return!1;return!0}const Yd=[...Yn].reverse(),Xd=Yn.length;function Zd(e){return t=>Promise.all(t.map(({animation:n,options:o})=>Kc(e,n,o)))}function qd(e){let t=Zd(e),n=_o(),o=!0,i=!1;const a=u=>(d,h)=>{var m;const p=je(e,h,u==="exit"?(m=e.presenceContext)==null?void 0:m.custom:void 0);if(p){const{transition:x,transitionEnd:g,...v}=p;d={...d,...v,...g}}return d};function r(u){t=u(e)}function l(u){const{props:d}=e,h=xr(e.parent)||{},p=[],m=new Set;let x={},g=1/0;for(let b=0;b<Xd;b++){const y=Yd[b],w=n[y],j=d[y]!==void 0?d[y]:h[y],C=Ge(j),k=y===u?w.isActive:null;k===!1&&(g=b);let D=j===h[y]&&j!==d[y]&&C;if(D&&(o||i)&&e.manuallyAnimateOnMount&&(D=!1),w.protectedKeys={...x},!w.isActive&&k===null||!j&&!w.prevProp||Tt(j)||typeof j=="boolean")continue;if(y==="exit"&&w.isActive&&k!==!0){w.prevResolvedValues&&(x={...x,...w.prevResolvedValues});continue}const A=Jd(w.prevProp,j);let F=A||y===u&&w.isActive&&!D&&C||b>g&&C,T=!1;const P=Array.isArray(j)?j:[j];let E=P.reduce(a(y),{});k===!1&&(E={});const{prevResolvedValues:U={}}=w,G={...U,...E},K=O=>{F=!0,m.has(O)&&(T=!0,m.delete(O)),w.needsAnimating[O]=!0;const Y=e.getValue(O);Y&&(Y.liveStyle=!1)};for(const O in G){const Y=E[O],pe=U[O];if(x.hasOwnProperty(O))continue;let ke=!1;dn(Y)&&dn(pe)?ke=!gr(Y,pe):ke=Y!==pe,ke?Y!=null?K(O):m.add(O):Y!==void 0&&m.has(O)?K(O):w.protectedKeys[O]=!0}w.prevProp=j,w.prevResolvedValues=E,w.isActive&&(x={...x,...E}),(o||i)&&e.blockInitialAnimation&&(F=!1);const ee=D&&A;F&&(!ee||T)&&p.push(...P.map(O=>{const Y={type:y};if(typeof O=="string"&&(o||i)&&!ee&&e.manuallyAnimateOnMount&&e.parent){const{parent:pe}=e,ke=je(pe,O);if(pe.enteringChildren&&ke){const{delayChildren:Kr}=ke.transition||{};Y.delay=Os(pe.enteringChildren,e,Kr)}}return{animation:O,options:Y}}))}if(m.size){const b={};if(typeof d.initial!="boolean"){const y=je(e,Array.isArray(d.initial)?d.initial[0]:d.initial);y&&y.transition&&(b.transition=y.transition)}m.forEach(y=>{const w=e.getBaseTarget(y),j=e.getValue(y);j&&(j.liveStyle=!0),b[y]=w??null}),p.push({animation:b})}let v=!!p.length;return o&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(v=!1),o=!1,i=!1,v?t(p):Promise.resolve()}function c(u,d){var p;if(n[u].isActive===d)return Promise.resolve();(p=e.variantChildren)==null||p.forEach(m=>{var x;return(x=m.animationState)==null?void 0:x.setActive(u,d)}),n[u].isActive=d;const h=l(u);for(const m in n)n[m].protectedKeys={};return h}return{animateChanges:l,setActive:c,setAnimateFunction:r,getState:()=>n,reset:()=>{n=_o(),i=!0}}}function Jd(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!gr(t,e):!1}function me(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function _o(){return{animate:me(!0),whileInView:me(),whileHover:me(),whileTap:me(),whileDrag:me(),whileFocus:me(),exit:me()}}function bn(e,t){e.min=t.min,e.max=t.max}function q(e,t){bn(e.x,t.x),bn(e.y,t.y)}function No(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const yr=1e-4,Qd=1-yr,eu=1+yr,br=.01,tu=0-br,nu=0+br;function N(e){return e.max-e.min}function ou(e,t,n){return Math.abs(e-t)<=n}function $o(e,t,n,o=.5){e.origin=o,e.originPoint=R(t.min,t.max,e.origin),e.scale=N(n)/N(t),e.translate=R(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Qd&&e.scale<=eu||isNaN(e.scale))&&(e.scale=1),(e.translate>=tu&&e.translate<=nu||isNaN(e.translate))&&(e.translate=0)}function _e(e,t,n,o){$o(e.x,t.x,n.x,o?o.originX:void 0),$o(e.y,t.y,n.y,o?o.originY:void 0)}function Uo(e,t,n,o=0){const i=o?R(n.min,n.max,o):n.min;e.min=i+t.min,e.max=e.min+N(t)}function iu(e,t,n,o){Uo(e.x,t.x,n.x,o==null?void 0:o.x),Uo(e.y,t.y,n.y,o==null?void 0:o.y)}function Go(e,t,n,o=0){const i=o?R(n.min,n.max,o):n.min;e.min=t.min-i,e.max=e.min+N(t)}function wt(e,t,n,o){Go(e.x,t.x,n.x,o==null?void 0:o.x),Go(e.y,t.y,n.y,o==null?void 0:o.y)}function Ko(e,t,n,o,i){return e-=t,e=vt(e,1/n,o),i!==void 0&&(e=vt(e,1/i,o)),e}function su(e,t=0,n=1,o=.5,i,a=e,r=e){if(oe.test(t)&&(t=parseFloat(t),t=R(r.min,r.max,t/100)-r.min),typeof t!="number")return;let l=R(a.min,a.max,o);e===a&&(l-=t),e.min=Ko(e.min,t,n,l,i),e.max=Ko(e.max,t,n,l,i)}function Yo(e,t,[n,o,i],a,r){su(e,t[n],t[o],t[i],t.scale,a,r)}const ru=["x","scaleX","originX"],au=["y","scaleY","originY"];function Xo(e,t,n,o){Yo(e.x,t,ru,n?n.x:void 0,o?o.x:void 0),Yo(e.y,t,au,n?n.y:void 0,o?o.y:void 0)}function Zo(e){return e.translate===0&&e.scale===1}function vr(e){return Zo(e.x)&&Zo(e.y)}function qo(e,t){return e.min===t.min&&e.max===t.max}function lu(e,t){return qo(e.x,t.x)&&qo(e.y,t.y)}function Jo(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function wr(e,t){return Jo(e.x,t.x)&&Jo(e.y,t.y)}function Qo(e){return N(e.x)/N(e.y)}function ei(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function te(e){return[e("x"),e("y")]}function cu(e,t,n){let o="";const i=e.x.translate/t.x,a=e.y.translate/t.y,r=(n==null?void 0:n.z)||0;if((i||a||r)&&(o=`translate3d(${i}px, ${a}px, ${r}px) `),(t.x!==1||t.y!==1)&&(o+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:h,rotateY:p,skewX:m,skewY:x}=n;u&&(o=`perspective(${u}px) ${o}`),d&&(o+=`rotate(${d}deg) `),h&&(o+=`rotateX(${h}deg) `),p&&(o+=`rotateY(${p}deg) `),m&&(o+=`skewX(${m}deg) `),x&&(o+=`skewY(${x}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(o+=`scale(${l}, ${c})`),o||"none"}const Sr=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],du=Sr.length,ti=e=>typeof e=="string"?parseFloat(e):e,ni=e=>typeof e=="number"||B.test(e);function uu(e,t,n,o,i,a){i?(e.opacity=R(0,n.opacity??1,fu(o)),e.opacityExit=R(t.opacity??1,0,hu(o))):a&&(e.opacity=R(t.opacity??1,n.opacity??1,o));for(let r=0;r<du;r++){const l=Sr[r];let c=oi(t,l),u=oi(n,l);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||ni(c)===ni(u)?(e[l]=Math.max(R(ti(c),ti(u),o),0),(oe.test(u)||oe.test(c))&&(e[l]+="%")):e[l]=u}(t.rotate||n.rotate)&&(e.rotate=R(t.rotate||0,n.rotate||0,o))}function oi(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const fu=Cr(0,.5,hs),hu=Cr(.5,.95,Z);function Cr(e,t,n){return o=>o<e?0:o>t?1:n($e(e,t,o))}function pu(e,t,n){const o=H(e)?e:Me(e);return o.start(Hn("",o,t,n)),o.animation}function Ke(e,t,n,o={passive:!0}){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n)}const mu=(e,t)=>e.depth-t.depth;class xu{constructor(){this.children=[],this.isDirty=!1}add(t){Bn(this.children,t),this.isDirty=!0}remove(t){pt(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(mu),this.isDirty=!1,this.children.forEach(t)}}function gu(e,t){const n=_.now(),o=({timestamp:i})=>{const a=i-n;a>=t&&(fe(o),e(a-t))};return M.setup(o,!0),()=>fe(o)}function ut(e){return H(e)?e.get():e}class yu{constructor(){this.members=[]}add(t){Bn(this.members,t);for(let n=this.members.length-1;n>=0;n--){const o=this.members[n];if(o===t||o===this.lead||o===this.prevLead)continue;const i=o.instance;(!i||i.isConnected===!1)&&!o.snapshot&&(pt(this.members,o),o.unmount())}t.scheduleRender()}remove(t){if(pt(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){var n;for(let o=this.members.indexOf(t)-1;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1&&((n=i.instance)==null?void 0:n.isConnected)!==!1)return this.promote(i),!0}return!1}promote(t,n){var i;const o=this.lead;if(t!==o&&(this.prevLead=o,this.lead=t,t.show(),o)){o.updateSnapshot(),t.scheduleRender();const{layoutDependency:a}=o.options,{layoutDependency:r}=t.options;(a===void 0||a!==r)&&(t.resumeFrom=o,n&&(o.preserveOpacity=!0),o.snapshot&&(t.snapshot=o.snapshot,t.snapshot.latestValues=o.animationValues||o.latestValues),(i=t.root)!=null&&i.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,o,i,a,r;(o=(n=t.options).onExitComplete)==null||o.call(n),(r=(i=t.resumingFrom)==null?void 0:(a=i.options).onExitComplete)==null||r.call(a)})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){var t;(t=this.lead)!=null&&t.snapshot&&(this.lead.snapshot=void 0)}}const ft={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Ht=["","X","Y","Z"],bu=1e3;let vu=0;function _t(e,t,n,o){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),o&&(o[e]=0))}function jr(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=$s(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",M,!(i||a))}const{parent:o}=e;o&&!o.hasCheckedOptimisedAppear&&jr(o)}function kr({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:o,resetTransform:i}){return class{constructor(r={},l=t==null?void 0:t()){this.id=vu++,this.animationId=0,this.animationCommitId=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.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Cu),this.nodes.forEach(Au),this.nodes.forEach(Du),this.nodes.forEach(ju)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new xu)}addEventListener(r,l){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new An),this.eventHandlers.get(r).add(l)}notifyListeners(r,...l){const c=this.eventHandlers.get(r);c&&c.notify(...l)}hasListeners(r){return this.eventHandlers.has(r)}mount(r){if(this.instance)return;this.isSVG=Kn(r)&&!Sd(r),this.instance=r;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||l)&&(this.isLayoutDirty=!0),e){let d,h=0;const p=()=>this.root.updateBlockedByResize=!1;M.read(()=>{h=window.innerWidth}),e(r,()=>{const m=window.innerWidth;m!==h&&(h=m,this.root.updateBlockedByResize=!0,d&&d(),d=gu(p,250),ft.hasAnimatedSinceResize&&(ft.hasAnimatedSinceResize=!1,this.nodes.forEach(ri)))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeLayoutChanged:p,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const x=this.options.transition||u.getDefaultTransition()||Vu,{onLayoutAnimationStart:g,onLayoutAnimationComplete:v}=u.getProps(),b=!this.targetLayout||!wr(this.targetLayout,m),y=!h&&p;if(this.options.layoutRoot||this.resumeFrom||y||h&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const w={...Wn(x,"layout"),onPlay:g,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(d,y)}else h||ri(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),fe(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(Pu),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&jr(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const h=this.path[d];h.shouldResetTransform=!0,(typeof h.latestValues.x=="string"||typeof h.latestValues.y=="string")&&(h.isLayoutDirty=!0),h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const c=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),c&&this.nodes.forEach(Fu),this.nodes.forEach(ii);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(si);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Tu),this.nodes.forEach(Bu),this.nodes.forEach(wu),this.nodes.forEach(Su)):this.nodes.forEach(si),this.clearAllSnapshots();const l=_.now();W.delta=ie(0,1e3/60,l-W.timestamp),W.timestamp=l,W.isProcessing=!0,Mt.update.process(W),Mt.preRender.process(W),Mt.render.process(W),W.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Un.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ku),this.sharedNodes.forEach(Eu)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,M.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){M.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!N(this.snapshot.measuredBox.x)&&!N(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=z()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,r?r.layoutBox:void 0)}updateScroll(r="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(l=!1),l&&this.instance){const c=o(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!i)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!vr(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;r&&this.instance&&(l||xe(this.latestValues)||d)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return r&&(c=this.removeTransform(c)),Lu(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:r}=this.options;if(!r)return z();const l=r.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(Iu))){const{scroll:d}=this.root;d&&(ne(l.x,d.offset.x),ne(l.y,d.offset.y))}return l}removeElementScroll(r){var c;const l=z();if(q(l,r),(c=this.scroll)!=null&&c.wasRoot)return l;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:h,options:p}=d;d!==this.root&&h&&p.layoutScroll&&(h.wasRoot&&q(l,r),ne(l.x,h.offset.x),ne(l.y,h.offset.y))}return l}applyTransform(r,l=!1,c){var d,h;const u=c||z();q(u,r);for(let p=0;p<this.path.length;p++){const m=this.path[p];!l&&m.options.layoutScroll&&m.scroll&&m!==m.root&&(ne(u.x,-m.scroll.offset.x),ne(u.y,-m.scroll.offset.y)),xe(m.latestValues)&&dt(u,m.latestValues,(d=m.layout)==null?void 0:d.layoutBox)}return xe(this.latestValues)&&dt(u,this.latestValues,(h=this.layout)==null?void 0:h.layoutBox),u}removeTransform(r){var c;const l=z();q(l,r);for(let u=0;u<this.path.length;u++){const d=this.path[u];if(!xe(d.latestValues))continue;let h;d.instance&&(xn(d.latestValues)&&d.updateSnapshot(),h=z(),q(h,d.measurePageBox())),Xo(l,d.latestValues,(c=d.snapshot)==null?void 0:c.layoutBox,h)}return xe(this.latestValues)&&Xo(l,this.latestValues),l}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==W.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){var m;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(r||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:h}=this.options;if(!this.layout||!(d||h))return;this.resolvedRelativeTargetAt=W.timestamp;const p=this.getClosestProjectingParent();p&&this.linkedParentVersion!==p.layoutVersion&&!p.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&p&&p.layout?this.createRelativeTarget(p,this.layout.layoutBox,p.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=z(),this.targetWithTransforms=z()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),iu(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):q(this.target,this.layout.layoutBox),lr(this.target,this.targetDelta)):q(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?this.createRelativeTarget(p,this.target,p.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||xn(this.parent.latestValues)||ar(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(r,l,c){this.relativeParent=r,this.linkedParentVersion=r.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=z(),this.relativeTargetOrigin=z(),wt(this.relativeTargetOrigin,l,c,this.options.layoutAnchor||void 0),q(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var x;const r=this.getLead(),l=!!this.resumingFrom||this!==r;let c=!0;if((this.isProjectionDirty||(x=this.parent)!=null&&x.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===W.timestamp&&(c=!1),c)return;const{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;q(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,p=this.treeScale.y;Md(this.layoutCorrected,this.treeScale,this.path,l),r.layout&&!r.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(r.target=r.layout.layoutBox,r.targetWithTransforms=z());const{target:m}=r;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(No(this.prevProjectionDelta.x,this.projectionDelta.x),No(this.prevProjectionDelta.y,this.projectionDelta.y)),_e(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==p||!ei(this.projectionDelta.x,this.prevProjectionDelta.x)||!ei(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){var l;if((l=this.options.visualElement)==null||l.scheduleRender(),r){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Pe(),this.projectionDelta=Pe(),this.projectionDeltaWithTransform=Pe()}setAnimationOrigin(r,l=!1){const c=this.snapshot,u=c?c.latestValues:{},d={...this.latestValues},h=Pe();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const p=z(),m=c?c.source:void 0,x=this.layout?this.layout.source:void 0,g=m!==x,v=this.getStack(),b=!v||v.members.length<=1,y=!!(g&&!b&&this.options.crossfade===!0&&!this.path.some(Ru));this.animationProgress=0;let w;this.mixTargetDelta=j=>{const C=j/1e3;ai(h.x,r.x,C),ai(h.y,r.y,C),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(wt(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Mu(this.relativeTarget,this.relativeTargetOrigin,p,C),w&&lu(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=z()),q(w,this.relativeTarget)),g&&(this.animationValues=d,uu(d,u,this.latestValues,C,y,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){var l,c,u;this.notifyListeners("animationStart"),(l=this.currentAnimation)==null||l.stop(),(u=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||u.stop(),this.pendingAnimation&&(fe(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=M.update(()=>{ft.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Me(0)),this.motionValue.jump(0,!1),this.currentAnimation=pu(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:d=>{this.mixTargetDelta(d),r.onUpdate&&r.onUpdate(d)},onStop:()=>{},onComplete:()=>{r.onComplete&&r.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(bu),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:l,target:c,layout:u,latestValues:d}=r;if(!(!l||!c||!u)){if(this!==r&&this.layout&&u&&Fr(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||z();const h=N(this.layout.layoutBox.x);c.x.min=r.target.x.min,c.x.max=c.x.min+h;const p=N(this.layout.layoutBox.y);c.y.min=r.target.y.min,c.y.max=c.y.min+p}q(l,c),dt(l,d),_e(this.projectionDeltaWithTransform,this.layoutCorrected,l,d)}}registerSharedNode(r,l){this.sharedNodes.has(r)||this.sharedNodes.set(r,new yu),this.sharedNodes.get(r).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){var l;const{layoutId:r}=this.options;return r?((l=this.getStack())==null?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:r}=this.options;return r?(l=this.getStack())==null?void 0:l.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:l,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),r&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let l=!1;const{latestValues:c}=r;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const u={};c.z&&_t("z",r,u,this.animationValues);for(let d=0;d<Ht.length;d++)_t(`rotate${Ht[d]}`,r,u,this.animationValues),_t(`skew${Ht[d]}`,r,u,this.animationValues);r.render();for(const d in u)r.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);r.scheduleRender()}applyProjectionStyles(r,l){if(!this.instance||this.isSVG)return;if(!this.isVisible){r.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,r.visibility="",r.opacity="",r.pointerEvents=ut(l==null?void 0:l.pointerEvents)||"",r.transform=c?c(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(r.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,r.pointerEvents=ut(l==null?void 0:l.pointerEvents)||""),this.hasProjected&&!xe(this.latestValues)&&(r.transform=c?c({},""):"none",this.hasProjected=!1);return}r.visibility="";const d=u.animationValues||u.latestValues;this.applyTransformsToTarget();let h=cu(this.projectionDeltaWithTransform,this.treeScale,d);c&&(h=c(d,h)),r.transform=h;const{x:p,y:m}=this.projectionDelta;r.transformOrigin=`${p.origin*100}% ${m.origin*100}% 0`,u.animationValues?r.opacity=u===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:r.opacity=u===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const x in yn){if(d[x]===void 0)continue;const{correct:g,applyTo:v,isCSSVariable:b}=yn[x],y=h==="none"?d[x]:g(d[x],u);if(v){const w=v.length;for(let j=0;j<w;j++)r[v[j]]=y}else b?this.options.visualElement.renderState.vars[x]=y:r[x]=y}this.options.layoutId&&(r.pointerEvents=u===this?ut(l==null?void 0:l.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>{var l;return(l=r.currentAnimation)==null?void 0:l.stop()}),this.root.nodes.forEach(ii),this.root.sharedNodes.clear()}}}function wu(e){e.updateLayout()}function Su(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:i}=e.layout,{animationType:a}=e.options,r=t.source!==e.layout.source;if(a==="size")te(h=>{const p=r?t.measuredBox[h]:t.layoutBox[h],m=N(p);p.min=o[h].min,p.max=p.min+m});else if(a==="x"||a==="y"){const h=a==="x"?"y":"x";bn(r?t.measuredBox[h]:t.layoutBox[h],o[h])}else Fr(a,t.layoutBox,o)&&te(h=>{const p=r?t.measuredBox[h]:t.layoutBox[h],m=N(o[h]);p.max=p.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[h].max=e.relativeTarget[h].min+m)});const l=Pe();_e(l,o,t.layoutBox);const c=Pe();r?_e(c,e.applyTransform(i,!0),t.measuredBox):_e(c,o,t.layoutBox);const u=!vr(l);let d=!1;if(!e.resumeFrom){const h=e.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:p,layout:m}=h;if(p&&m){const x=e.options.layoutAnchor||void 0,g=z();wt(g,t.layoutBox,p.layoutBox,x);const v=z();wt(v,o,m.layoutBox,x),wr(g,v)||(d=!0),h.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=g,e.relativeParent=h)}}}e.notifyListeners("didUpdate",{layout:o,snapshot:t,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:o}=e.options;o&&o()}e.options.transition=void 0}function Cu(e){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 ju(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function ku(e){e.clearSnapshot()}function ii(e){e.clearMeasurements()}function Fu(e){e.isLayoutDirty=!0,e.updateLayout()}function si(e){e.isLayoutDirty=!1}function Tu(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function Bu(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function ri(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Au(e){e.resolveTargetDelta()}function Du(e){e.calcProjection()}function Pu(e){e.resetSkewAndRotation()}function Eu(e){e.removeLeadSnapshot()}function ai(e,t,n){e.translate=R(t.translate,0,n),e.scale=R(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function li(e,t,n,o){e.min=R(t.min,n.min,o),e.max=R(t.max,n.max,o)}function Mu(e,t,n,o){li(e.x,t.x,n.x,o),li(e.y,t.y,n.y,o)}function Ru(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Vu={duration:.45,ease:[.4,0,.1,1]},ci=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),di=ci("applewebkit/")&&!ci("chrome/")?Math.round:Z;function ui(e){e.min=di(e.min),e.max=di(e.max)}function Lu(e){ui(e.x),ui(e.y)}function Fr(e,t,n){return e==="position"||e==="preserve-aspect"&&!ou(Qo(t),Qo(n),.2)}function Iu(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const zu=kr({attachResizeListener:(e,t)=>Ke(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),Nt={current:void 0},Tr=kr({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Nt.current){const e=new zu({});e.mount(window),e.setOptions({layoutScroll:!0}),Nt.current=e}return Nt.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Jn=S.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function fi(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ou(...e){return t=>{let n=!1;const o=e.map(i=>{const a=fi(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<o.length;i++){const a=o[i];typeof a=="function"?a():fi(e[i],null)}}}}function Wu(...e){return V.useCallback(Ou(...e),e)}class Hu extends V.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(rt(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const o=n.offsetParent,i=rt(o)&&o.offsetWidth||0,a=rt(o)&&o.offsetHeight||0,r=getComputedStyle(n),l=this.props.sizeRef.current;l.height=parseFloat(r.height),l.width=parseFloat(r.width),l.top=n.offsetTop,l.left=n.offsetLeft,l.right=i-l.width-l.left,l.bottom=a-l.height-l.top}return null}componentDidUpdate(){}render(){return this.props.children}}function _u({children:e,isPresent:t,anchorX:n,anchorY:o,root:i,pop:a}){var p;const r=S.useId(),l=S.useRef(null),c=S.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:u}=S.useContext(Jn),d=((p=e.props)==null?void 0:p.ref)??(e==null?void 0:e.ref),h=Wu(l,d);return S.useInsertionEffect(()=>{const{width:m,height:x,top:g,left:v,right:b,bottom:y}=c.current;if(t||a===!1||!l.current||!m||!x)return;const w=n==="left"?`left: ${v}`:`right: ${b}`,j=o==="bottom"?`bottom: ${y}`:`top: ${g}`;l.current.dataset.motionPopId=r;const C=document.createElement("style");u&&(C.nonce=u);const k=i??document.head;return k.appendChild(C),C.sheet&&C.sheet.insertRule(`
|
|
178
|
+
[data-motion-pop-id="${r}"] {
|
|
179
179
|
position: absolute !important;
|
|
180
180
|
width: ${m}px !important;
|
|
181
181
|
height: ${x}px !important;
|
|
182
|
-
${
|
|
183
|
-
${
|
|
182
|
+
${w}px !important;
|
|
183
|
+
${j}px !important;
|
|
184
184
|
}
|
|
185
|
-
`),()=>{var D;(D=l.current)==null||D.removeAttribute("data-motion-pop-id"),F.contains(j)&&F.removeChild(j)}},[t]),a.jsx(zu,{isPresent:t,childRef:l,sizeRef:c,pop:r,children:r===!1?e:L.cloneElement(e,{ref:h})})}const Wu=({children:e,initial:t,isPresent:n,onExitComplete:o,custom:i,presenceAffectsLayout:r,mode:s,anchorX:l,anchorY:c,root:u})=>{const d=Tn(Hu),h=w.useId();let p=!0,m=w.useMemo(()=>(p=!1,{id:h,initial:t,isPresent:n,custom:i,onExitComplete:x=>{d.set(x,!0);for(const g of d.values())if(!g)return;o&&o()},register:x=>(d.set(x,!1),()=>d.delete(x))}),[n,d,o]);return r&&p&&(m={...m}),w.useMemo(()=>{d.forEach((x,g)=>d.set(g,!1))},[n]),L.useEffect(()=>{!n&&!d.size&&o&&o()},[n]),e=a.jsx(Ou,{pop:s==="popLayout",isPresent:n,anchorX:l,anchorY:c,root:u,children:e}),a.jsx(Ct.Provider,{value:m,children:e})};function Hu(){return new Map}function Br(e=!0){const t=w.useContext(Ct);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:o,register:i}=t,r=w.useId();w.useEffect(()=>{if(e)return i(r)},[e]);const s=w.useCallback(()=>e&&o&&o(r),[r,o,e]);return!n&&o?[!1,s]:[!0]}const nt=e=>e.key||"";function fi(e){const t=[];return w.Children.forEach(e,n=>{w.isValidElement(n)&&t.push(n)}),t}const bn=({children:e,custom:t,initial:n=!0,onExitComplete:o,presenceAffectsLayout:i=!0,mode:r="sync",propagate:s=!1,anchorX:l="left",anchorY:c="top",root:u})=>{const[d,h]=Br(s),p=w.useMemo(()=>fi(e),[e]),m=s&&!d?[]:p.map(nt),x=w.useRef(!0),g=w.useRef(p),b=Tn(()=>new Map),y=w.useRef(new Set),[v,S]=w.useState(p),[C,j]=w.useState(p);ts(()=>{x.current=!1,g.current=p;for(let A=0;A<C.length;A++){const T=nt(C[A]);m.includes(T)?(b.delete(T),y.current.delete(T)):b.get(T)!==!0&&b.set(T,!1)}},[C,m.length,m.join("-")]);const F=[];if(p!==v){let A=[...p];for(let T=0;T<C.length;T++){const k=C[T],E=nt(k);m.includes(E)||(A.splice(T,0,k),F.push(k))}return r==="wait"&&F.length&&(A=F),j(fi(A)),S(p),null}process.env.NODE_ENV!=="production"&&r==="wait"&&C.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:D}=w.useContext(Fn);return a.jsx(a.Fragment,{children:C.map(A=>{const T=nt(A),k=s&&!d?!1:p===C||m.includes(T),E=()=>{if(y.current.has(T))return;if(b.has(T))y.current.add(T),b.set(T,!0);else return;let P=!0;b.forEach(U=>{U||(P=!1)}),P&&(D==null||D(),j(g.current),s&&(h==null||h()),o&&o())};return a.jsx(Wu,{isPresent:k,initial:!x.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:r,root:u,onExitComplete:k?void 0:E,anchorX:l,anchorY:c,children:A},T)})})},Ar=w.createContext({strict:!1}),hi={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"]};let pi=!1;function Nu(){if(pi)return;const e={};for(const t in hi)e[t]={isEnabled:n=>hi[t].some(o=>!!n[o])};ir(e),pi=!0}function Dr(){return Nu(),Td()}function _u(e){const t=Dr();for(const n in e)t[n]={...t[n],...e[n]};ir(t)}const $u=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","propagate","ignoreStrict","viewport"]);function St(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||$u.has(e)}let Er=e=>!St(e);function Uu(e){typeof e=="function"&&(Er=t=>t.startsWith("on")?!St(t):e(t))}try{Uu(require("@emotion/is-prop-valid").default)}catch{}function Gu(e,t,n){const o={};for(const i in e)i==="values"&&typeof e.values=="object"||H(e[i])||(Er(i)||n===!0&&St(i)||!t&&!St(i)||e.draggable&&i.startsWith("onDrag"))&&(o[i]=e[i]);return o}const Bt=w.createContext({});function Ku(e,t){if(kt(e)){const{initial:n,animate:o}=e;return{initial:n===!1||Ge(n)?n:void 0,animate:Ge(o)?o:void 0}}return e.inherit!==!1?t:{}}function Yu(e){const{initial:t,animate:n}=Ku(e,w.useContext(Bt));return w.useMemo(()=>({initial:t,animate:n}),[mi(t),mi(n)])}function mi(e){return Array.isArray(e)?e.join(" "):e}const Jn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Pr(e,t,n){for(const o in t)!H(t[o])&&!ur(o,n)&&(e[o]=t[o])}function Xu({transformTemplate:e},t){return w.useMemo(()=>{const n=Jn();return Xn(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Zu(e,t){const n=e.style||{},o={};return Pr(o,n,e),Object.assign(o,Xu(e,t)),o}function qu(e,t){const n={},o=Zu(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=o,n}const Mr=()=>({...Jn(),attrs:{}});function Ju(e,t,n,o){const i=w.useMemo(()=>{const r=Mr();return fr(r,t,pr(o),e.transformTemplate,e.style),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};Pr(r,e.style,e),i.style={...r,...i.style}}return i}const Qu=["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 Qn(e){return typeof e!="string"||e.includes("-")?!1:!!(Qu.indexOf(e)>-1||/[A-Z]/u.test(e))}function ef(e,t,n,{latestValues:o},i,r=!1,s){const c=(s??Qn(e)?Ju:qu)(t,o,i,e),u=Gu(t,typeof e=="string",r),d=e!==w.Fragment?{...u,...c,ref:n}:{},{children:h}=t,p=w.useMemo(()=>H(h)?h.get():h,[h]);return w.createElement(e,{...d,children:p})}function tf({scrapeMotionValuesFromProps:e,createRenderState:t},n,o,i){return{latestValues:nf(n,o,i,e),renderState:t()}}function nf(e,t,n,o){const i={},r=o(e,{});for(const p in r)i[p]=ut(r[p]);let{initial:s,animate:l}=e;const c=kt(e),u=nr(e);t&&u&&!c&&e.inherit!==!1&&(s===void 0&&(s=t.initial),l===void 0&&(l=t.animate));let d=n?n.initial===!1:!1;d=d||s===!1;const h=d?l:s;if(h&&typeof h!="boolean"&&!Tt(h)){const p=Array.isArray(h)?h:[h];for(let m=0;m<p.length;m++){const x=Hn(e,p[m]);if(x){const{transitionEnd:g,transition:b,...y}=x;for(const v in y){let S=y[v];if(Array.isArray(S)){const C=d?S.length-1:0;S=S[C]}S!==null&&(i[v]=S)}for(const v in g)i[v]=g[v]}}}return i}const Rr=e=>(t,n)=>{const o=w.useContext(Bt),i=w.useContext(Ct),r=()=>tf(e,t,o,i);return n?r():Tn(r)},of=Rr({scrapeMotionValuesFromProps:Zn,createRenderState:Jn}),sf=Rr({scrapeMotionValuesFromProps:mr,createRenderState:Mr}),rf=Symbol.for("motionComponentSymbol");function af(e,t,n){const o=w.useRef(n);w.useInsertionEffect(()=>{o.current=n});const i=w.useRef(null);return w.useCallback(r=>{var l;r&&((l=e.onMount)==null||l.call(e,r));const s=o.current;if(typeof s=="function")if(r){const c=s(r);typeof c=="function"&&(i.current=c)}else i.current?(i.current(),i.current=null):s(r);else s&&(s.current=r);t&&(r?t.mount(r):t.unmount())},[t])}const Vr=w.createContext({});function ke(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function lf(e,t,n,o,i,r){var S,C;const{visualElement:s}=w.useContext(Bt),l=w.useContext(Ar),c=w.useContext(Ct),u=w.useContext(qn),d=u.reducedMotion,h=u.skipAnimations,p=w.useRef(null),m=w.useRef(!1);o=o||l.renderer,!p.current&&o&&(p.current=o(e,{visualState:t,parent:s,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:d,skipAnimations:h,isSVG:r}),m.current&&p.current&&(p.current.manuallyAnimateOnMount=!0));const x=p.current,g=w.useContext(Vr);x&&!x.projection&&i&&(x.type==="html"||x.type==="svg")&&cf(p.current,n,i,g);const b=w.useRef(!1);w.useInsertionEffect(()=>{x&&b.current&&x.update(n,c)});const y=n[_s],v=w.useRef(!!y&&typeof window<"u"&&!((S=window.MotionHandoffIsComplete)!=null&&S.call(window,y))&&((C=window.MotionHasOptimisedAnimation)==null?void 0:C.call(window,y)));return ts(()=>{m.current=!0,x&&(b.current=!0,window.MotionIsMounted=!0,x.updateFeatures(),x.scheduleRenderMicrotask(),v.current&&x.animationState&&x.animationState.animateChanges())}),w.useEffect(()=>{x&&(!v.current&&x.animationState&&x.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var j;(j=window.MotionHandoffMarkAsComplete)==null||j.call(window,y)}),v.current=!1),x.enteringChildren=void 0)}),x}function cf(e,t,n,o){const{layoutId:i,layout:r,drag:s,dragConstraints:l,layoutScroll:c,layoutRoot:u,layoutAnchor:d,layoutCrossfade:h}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Lr(e.parent)),e.projection.setOptions({layoutId:i,layout:r,alwaysMeasureLayout:!!s||l&&ke(l),visualElement:e,animationType:typeof r=="string"?r:"both",initialPromotionConfig:o,crossfade:h,layoutScroll:c,layoutRoot:u,layoutAnchor:d})}function Lr(e){if(e)return e.options.allowProjection!==!1?e.projection:Lr(e.parent)}function _t(e,{forwardMotionProps:t=!1,type:n}={},o,i){o&&_u(o);const r=n?n==="svg":Qn(e),s=r?sf:of;function l(u,d){let h;const p={...w.useContext(qn),...u,layoutId:df(u)},{isStatic:m}=p,x=Yu(u),g=s(u,m);if(!m&&typeof window<"u"){uf(p,o);const b=ff(p);h=b.MeasureLayout,x.visualElement=lf(e,g,p,i,b.ProjectionNode,r)}return a.jsxs(Bt.Provider,{value:x,children:[h&&x.visualElement?a.jsx(h,{visualElement:x.visualElement,...p}):null,ef(e,u,af(g,x.visualElement,d),g,m,t,r)]})}l.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=w.forwardRef(l);return c[rf]=e,c}function df({layoutId:e}){const t=w.useContext(Fn).id;return t&&e!==void 0?t+"-"+e:e}function uf(e,t){const n=w.useContext(Ar).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const o="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Ve(!1,o,"lazy-strict-mode"):se(!1,o,"lazy-strict-mode")}}function ff(e){const t=Dr(),{drag:n,layout:o}=t;if(!n&&!o)return{};const i={...n,...o};return{MeasureLayout:n!=null&&n.isEnabled(e)||o!=null&&o.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function hf(e,t){if(typeof Proxy>"u")return _t;const n=new Map,o=(r,s)=>_t(r,s,e,t),i=(r,s)=>(process.env.NODE_ENV!=="production"&&An(!1,"motion() is deprecated. Use motion.create() instead."),o(r,s));return new Proxy(i,{get:(r,s)=>s==="create"?o:(n.has(s)||n.set(s,_t(s,void 0,e,t)),n.get(s))})}const pf=(e,t)=>t.isSVG??Qn(e)?new _d(t):new Id(t,{allowProjection:e!==w.Fragment});class mf extends he{constructor(t){super(t),t.animationState||(t.animationState=Yd(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Tt(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let xf=0;class gf extends he{constructor(){super(...arguments),this.id=xf++,this.isExitComplete=!1}update(){var r;if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===o)return;if(t&&o===!1){if(this.isExitComplete){const{initial:s,custom:l}=this.node.getProps();if(typeof s=="string"){const c=Ce(this.node,s,l);if(c){const{transition:u,transitionEnd:d,...h}=c;for(const p in h)(r=this.node.getValue(p))==null||r.jump(h[p])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const yf={animation:{Feature:mf},exit:{Feature:gf}};function qe(e){return{point:{x:e.pageX,y:e.pageY}}}const bf=e=>t=>Un(t)&&e(t,qe(t));function _e(e,t,n,o){return Ke(e,t,bf(n),o)}const Ir=({current:e})=>e?e.ownerDocument.defaultView:null,xi=(e,t)=>Math.abs(e-t);function vf(e,t){const n=xi(e.x,t.x),o=xi(e.y,t.y);return Math.sqrt(n**2+o**2)}const gi=new Set(["auto","scroll"]);class zr{constructor(t,n,{transformPagePoint:o,contextWindow:i=window,dragSnapToOrigin:r=!1,distanceThreshold:s=3,element:l}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=m=>{this.handleScroll(m.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=ot(this.lastRawMoveEventInfo,this.transformPagePoint));const m=$t(this.lastMoveEventInfo,this.history),x=this.startEvent!==null,g=vf(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!x&&!g)return;const{point:b}=m,{timestamp:y}=W;this.history.push({...b,timestamp:y});const{onStart:v,onMove:S}=this.handlers;x||(v&&v(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),S&&S(this.lastMoveEvent,m)},this.handlePointerMove=(m,x)=>{this.lastMoveEvent=m,this.lastRawMoveEventInfo=x,this.lastMoveEventInfo=ot(x,this.transformPagePoint),M.update(this.updatePoint,!0)},this.handlePointerUp=(m,x)=>{this.end();const{onEnd:g,onSessionEnd:b,resumeAnimation:y}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=$t(m.type==="pointercancel"?this.lastMoveEventInfo:ot(x,this.transformPagePoint),this.history);this.startEvent&&g&&g(m,v),b&&b(m,v)},!Un(t))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=o,this.distanceThreshold=s,this.contextWindow=i||window;const c=qe(t),u=ot(c,this.transformPagePoint),{point:d}=u,{timestamp:h}=W;this.history=[{...d,timestamp:h}];const{onSessionStart:p}=n;p&&p(t,$t(u,this.history)),this.removeListeners=Ye(_e(this.contextWindow,"pointermove",this.handlePointerMove),_e(this.contextWindow,"pointerup",this.handlePointerUp),_e(this.contextWindow,"pointercancel",this.handlePointerUp)),l&&this.startScrollTracking(l)}startScrollTracking(t){let n=t.parentElement;for(;n;){const o=getComputedStyle(n);(gi.has(o.overflowX)||gi.has(o.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const o=t===window,i=o?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},r={x:i.x-n.x,y:i.y-n.y};r.x===0&&r.y===0||(o?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=r.x,this.lastMoveEventInfo.point.y+=r.y):this.history.length>0&&(this.history[0].x-=r.x,this.history[0].y-=r.y),this.scrollPositions.set(t,i),M.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),fe(this.updatePoint)}}function ot(e,t){return t?{point:t(e.point)}:e}function yi(e,t){return{x:e.x-t.x,y:e.y-t.y}}function $t({point:e},t){return{point:e,delta:yi(e,Or(t)),offset:yi(e,wf(t)),velocity:Sf(t,.1)}}function wf(e){return e[0]}function Or(e){return e[e.length-1]}function Sf(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,o=null;const i=Or(e);for(;n>=0&&(o=e[n],!(i.timestamp-o.timestamp>$(t)));)n--;if(!o)return{x:0,y:0};o===e[0]&&e.length>2&&i.timestamp-o.timestamp>$(t)*2&&(o=e[1]);const r=X(i.timestamp-o.timestamp);if(r===0)return{x:0,y:0};const s={x:(i.x-o.x)/r,y:(i.y-o.y)/r};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function jf(e,{min:t,max:n},o){return t!==void 0&&e<t?e=o?R(t,e,o.min):Math.max(e,t):n!==void 0&&e>n&&(e=o?R(n,e,o.max):Math.min(e,n)),e}function bi(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function Cf(e,{top:t,left:n,bottom:o,right:i}){return{x:bi(e.x,n,i),y:bi(e.y,t,o)}}function vi(e,t){let n=t.min-e.min,o=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,o]=[o,n]),{min:n,max:o}}function Ff(e,t){return{x:vi(e.x,t.x),y:vi(e.y,t.y)}}function Tf(e,t){let n=.5;const o=_(e),i=_(t);return i>o?n=$e(t.min,t.max-o,e.min):o>i&&(n=$e(e.min,e.max-i,t.min)),ie(0,1,n)}function kf(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const vn=.35;function Bf(e=vn){return e===!1?e=0:e===!0&&(e=vn),{x:wi(e,"left","right"),y:wi(e,"top","bottom")}}function wi(e,t,n){return{min:Si(e,t),max:Si(e,n)}}function Si(e,t){return typeof e=="number"?e:e[t]||0}const Af=new WeakMap;class Df{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=z(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:o}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const r=h=>{n&&this.snapToCursor(qe(h).point),this.stopAnimation()},s=(h,p)=>{const{drag:m,dragPropagation:x,onDragStart:g}=this.getProps();if(m&&!x&&(this.openDragLock&&this.openDragLock(),this.openDragLock=nd(m),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=p,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),te(y=>{let v=this.getAxisMotionValue(y).get()||0;if(oe.test(v)){const{projection:S}=this.visualElement;if(S&&S.layout){const C=S.layout.layoutBox[y];C&&(v=_(C)*(parseFloat(v)/100))}}this.originPoint[y]=v}),g&&M.update(()=>g(h,p),!1,!0),dn(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},l=(h,p)=>{this.latestPointerEvent=h,this.latestPanInfo=p;const{dragPropagation:m,dragDirectionLock:x,onDirectionLock:g,onDrag:b}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:y}=p;if(x&&this.currentDirection===null){this.currentDirection=Pf(y),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",p.point,y),this.updateAxis("y",p.point,y),this.visualElement.render(),b&&M.update(()=>b(h,p),!1,!0)},c=(h,p)=>{this.latestPointerEvent=h,this.latestPanInfo=p,this.stop(h,p),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>{const{dragSnapToOrigin:h}=this.getProps();(h||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:d}=this.getProps();this.panSession=new zr(t,{onSessionStart:r,onStart:s,onMove:l,onSessionEnd:c,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:o,contextWindow:Ir(this.visualElement),element:this.visualElement.current})}stop(t,n){const o=t||this.latestPointerEvent,i=n||this.latestPanInfo,r=this.isDragging;if(this.cancel(),!r||!i||!o)return;const{velocity:s}=i;this.startAnimation(s);const{onDragEnd:l}=this.getProps();l&&M.postRender(()=>l(o,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,o){const{drag:i}=this.getProps();if(!o||!it(t,i,this.currentDirection))return;const r=this.getAxisMotionValue(t);let s=this.originPoint[t]+o[t];this.constraints&&this.constraints[t]&&(s=jf(s,this.constraints[t],this.elastic[t])),r.set(s)}resolveConstraints(){var r;const{dragConstraints:t,dragElastic:n}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(r=this.visualElement.projection)==null?void 0:r.layout,i=this.constraints;t&&ke(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&o?this.constraints=Cf(o.layoutBox,t):this.constraints=!1,this.elastic=Bf(n),i!==this.constraints&&!ke(t)&&o&&this.constraints&&!this.hasMutatedConstraints&&te(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=kf(o.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ke(t))return!1;const o=t.current;se(o!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const r=Ed(o,i.root,this.visualElement.getTransformPagePoint());let s=Ff(i.layout.layoutBox,r);if(n){const l=n(Bd(s));this.hasMutatedConstraints=!!l,l&&(s=rr(l))}return s}startAnimation(t){const{drag:n,dragMomentum:o,dragElastic:i,dragTransition:r,dragSnapToOrigin:s,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},u=te(d=>{if(!it(d,n,this.currentDirection))return;let h=c&&c[d]||{};(s===!0||s===d)&&(h={min:0,max:0});const p=i?200:1e6,m=i?40:1e7,x={type:"inertia",velocity:o?t[d]:0,bounceStiffness:p,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...r,...h};return this.startAxisValueAnimation(d,x)});return Promise.all(u).then(l)}startAxisValueAnimation(t,n){const o=this.getAxisMotionValue(t);return dn(this.visualElement,t),o.start(Wn(t,o,0,n,this.visualElement,!1))}stopAnimation(){te(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,o=this.visualElement.getProps(),i=o[n];return i||this.visualElement.getValue(t,(o.initial?o.initial[t]:void 0)||0)}snapToCursor(t){te(n=>{const{drag:o}=this.getProps();if(!it(n,o,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(n);if(i&&i.layout){const{min:s,max:l}=i.layout.layoutBox[n],c=r.get()||0;r.set(t[n]-R(s,l,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:o}=this.visualElement;if(!ke(n)||!o||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};te(s=>{const l=this.getAxisMotionValue(s);if(l&&this.constraints!==!1){const c=l.get();i[s]=Tf({min:c,max:c},this.constraints[s])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.constraints=!1,this.resolveConstraints(),te(s=>{if(!it(s,t,null))return;const l=this.getAxisMotionValue(s),{min:c,max:u}=this.constraints[s];l.set(R(c,u,i[s]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Af.set(this.visualElement,this);const t=this.visualElement.current,n=_e(t,"pointerdown",u=>{const{drag:d,dragListener:h=!0}=this.getProps(),p=u.target,m=p!==t&&ld(p);d&&h&&!m&&this.start(u)});let o;const i=()=>{const{dragConstraints:u}=this.getProps();ke(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),o||(o=Ef(t,u.current,()=>this.scalePositionWithinConstraints())))},{projection:r}=this.visualElement,s=r.addEventListener("measure",i);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),M.read(i);const l=Ke(window,"resize",()=>this.scalePositionWithinConstraints()),c=r.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:d})=>{this.isDragging&&d&&(te(h=>{const p=this.getAxisMotionValue(h);p&&(this.originPoint[h]+=u[h].translate,p.set(p.get()+u[h].translate))}),this.visualElement.render())}));return()=>{l(),n(),s(),c&&c(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:o=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:s=vn,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:o,dragPropagation:i,dragConstraints:r,dragElastic:s,dragMomentum:l}}}function ji(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function Ef(e,t,n){const o=Do(e,ji(n)),i=Do(t,ji(n));return()=>{o(),i()}}function it(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Pf(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Mf extends he{constructor(t){super(t),this.removeGroupControls=Z,this.removeListeners=Z,this.controls=new Df(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Z}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Ut=e=>(t,n)=>{e&&M.update(()=>e(t,n),!1,!0)};class Rf extends he{constructor(){super(...arguments),this.removePointerDownListener=Z}onPointerDown(t){this.session=new zr(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ir(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:o,onPanEnd:i}=this.node.getProps();return{onSessionStart:Ut(t),onStart:Ut(n),onMove:Ut(o),onEnd:(r,s)=>{delete this.session,i&&M.postRender(()=>i(r,s))}}}mount(){this.removePointerDownListener=_e(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Gt=!1;class Vf extends w.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o,layoutId:i}=this.props,{projection:r}=t;r&&(n.group&&n.group.add(r),o&&o.register&&i&&o.register(r),Gt&&r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),ft.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:o,drag:i,isPresent:r}=this.props,{projection:s}=o;return s&&(s.isPresent=r,t.layoutDependency!==n&&s.setOptions({...s.options,layoutDependency:n}),Gt=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==r?s.willUpdate():this.safeToRemove(),t.isPresent!==r&&(r?s.promote():s.relegate()||M.postRender(()=>{const l=s.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:o}=t;o&&(o.options.layoutAnchor=n,o.root.didUpdate(),$n.postRender(()=>{!o.currentAnimation&&o.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o}=this.props,{projection:i}=t;Gt=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),o&&o.deregister&&o.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Wr(e){const[t,n]=Br(),o=w.useContext(Fn);return a.jsx(Vf,{...e,layoutGroup:o,switchLayoutGroup:w.useContext(Vr),isPresent:t,safeToRemove:n})}const Lf={pan:{Feature:Rf},drag:{Feature:Mf,ProjectionNode:kr,MeasureLayout:Wr}};function Ci(e,t,n){const{props:o}=e;e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,r=o[i];r&&M.postRender(()=>r(t,qe(t)))}class If extends he{mount(){const{current:t}=this.node;t&&(this.unmount=id(t,(n,o)=>(Ci(this.node,o,"Start"),i=>Ci(this.node,i,"End"))))}unmount(){}}class zf extends he{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=Ye(Ke(this.node.current,"focus",()=>this.onFocus()),Ke(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Fi(e,t,n){const{props:o}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&o.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),r=o[i];r&&M.postRender(()=>r(t,qe(t)))}class Of extends he{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:o}=this.node.props;this.unmount=dd(t,(i,r)=>(Fi(this.node,r,"Start"),(s,{success:l})=>Fi(this.node,s,l?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(o==null?void 0:o.tap)===!1})}unmount(){}}const wn=new WeakMap,Kt=new WeakMap,Wf=e=>{const t=wn.get(e.target);t&&t(e)},Hf=e=>{e.forEach(Wf)};function Nf({root:e,...t}){const n=e||document;Kt.has(n)||Kt.set(n,{});const o=Kt.get(n),i=JSON.stringify(t);return o[i]||(o[i]=new IntersectionObserver(Hf,{root:e,...t})),o[i]}function _f(e,t,n){const o=Nf(t);return wn.set(e,n),o.observe(e),()=>{wn.delete(e),o.unobserve(e)}}const $f={some:0,all:1};class Uf extends he{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var c;(c=this.stopObserver)==null||c.call(this);const{viewport:t={}}=this.node.getProps(),{root:n,margin:o,amount:i="some",once:r}=t,s={root:n?n.current:void 0,rootMargin:o,threshold:typeof i=="number"?i:$f[i]},l=u=>{const{isIntersecting:d}=u;if(this.isInView===d||(this.isInView=d,r&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:h,onViewportLeave:p}=this.node.getProps(),m=d?h:p;m&&m(u)};this.stopObserver=_f(this.node.current,s,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(Gf(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function Gf({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Kf={inView:{Feature:Uf},tap:{Feature:Of},focus:{Feature:zf},hover:{Feature:If}},Yf={layout:{ProjectionNode:kr,MeasureLayout:Wr}},Xf={...yf,...Kf,...Lf,...Yf},ge=hf(Xf,pf),Hr=[0,0,.2,1],Zf=[.4,0,1,1],qf=[.22,1,.36,1],Jf={hidden:{opacity:0,y:-8,scaleY:.96,transformOrigin:"top"},visible:{opacity:1,y:0,scaleY:1,transformOrigin:"top",transition:{duration:.22,ease:qf}},exit:{opacity:0,y:-6,scaleY:.97,transformOrigin:"top",transition:{duration:.16,ease:Zf}}},Qf={hidden:{},visible:{transition:{staggerChildren:.045,delayChildren:.06}}},eh={hidden:{opacity:0,x:-10},visible:{opacity:1,x:0,transition:{duration:.2,ease:Hr}}},th={hidden:{opacity:0,y:10},visible:{opacity:1,y:0,transition:{duration:.22,ease:Hr,delay:.18}}},nh=()=>a.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("line",{x1:"7",y1:"17",x2:"17",y2:"7"}),a.jsx("polyline",{points:"7 7 17 7 17 17"})]}),oh=()=>a.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[a.jsx("rect",{width:"32",height:"32",rx:"8",fill:"#0685FF"}),a.jsx("path",{d:"M9.25 10.75H22.75",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),a.jsx("path",{d:"M9.25 16H22.75",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),a.jsx("path",{d:"M9.25 21.25H22.75",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),ih=()=>a.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[a.jsx("rect",{width:"32",height:"32",rx:"8",fill:"#0685FF"}),a.jsx("path",{d:"M13.8801 16.71L8.93005 21.66L10.3401 23.07L13.1701 20.24L16.0001 17.41L18.1201 19.54L21.6601 23.07L23.0701 21.66L18.1201 16.71L17.4101 16L23.0701 10.34L21.6601 8.92999L16.0001 14.59L10.3401 8.92999L8.93005 10.34L14.5901 16L13.8801 16.71Z",fill:"white"})]}),sh=(e,t)=>a.jsx("a",{href:e.href,style:{textDecoration:"none"},children:t});function Yt({href:e,children:t,target:n,rel:o}){return e?a.jsx("a",{href:e,target:n,rel:o,style:{textDecoration:"none",display:"contents"},children:t}):a.jsx(a.Fragment,{children:t})}function rh({logo:e,navItems:t=[],navItemsAlign:n="center",ctaLabel:o="Get Started",ctaHref:i,onCtaClick:r,ctaIconHref:s,onCtaIconClick:l,secondaryCtaLabel:c,secondaryCtaHref:u,onSecondaryCtaClick:d,ctaSlot:h,renderLink:p=sh,isSticky:m=!1,variant:x="solid",...g}){const[b,y]=w.useState(!1),v=s??i,S=l??r,C=x==="blur"?{background:"rgba(10,18,32,0.85)",backdropFilter:"blur(12px)"}:{},j=({mobile:F=!1})=>a.jsxs(f.Box,{display:"flex",gap:"2",alignItems:"center",flexDirection:F?"column":"row",children:[c&&a.jsx(Yt,{href:u,children:a.jsx(we,{variant:F?"outline":"ghost",colorScheme:"blue",size:F?"md":"sm",onClick:()=>{d==null||d(),F&&y(!1)},style:F?{width:"100%"}:void 0,children:c})}),a.jsx(Yt,{href:i,children:a.jsx(we,{variant:"solid",colorScheme:"blue",size:F?"md":"sm",onClick:()=>{r==null||r(),F&&y(!1)},style:F?{width:"100%"}:void 0,children:o})}),!F&&a.jsx(Yt,{href:v,target:v&&v!==i?"_blank":void 0,rel:v&&v!==i?"noopener noreferrer":void 0,children:a.jsx(we,{variant:"solid",colorScheme:"blue",size:"sm",onClick:S,"aria-label":"Open",style:{width:34,height:34,padding:0,borderRadius:8,flexShrink:0},children:a.jsx(nh,{})})})]});return a.jsxs(f.Box,{as:"nav",role:"navigation","aria-label":"Main navigation",position:m?"sticky":"relative",top:m?"0":void 0,zIndex:m?"sticky":void 0,bg:x==="transparent"?"transparent":x==="blur"?void 0:"bg",style:C,borderBottom:"1px solid",borderColor:x==="transparent"?"transparent":"border",transition:"background 0.2s ease, border-color 0.2s ease",...g,children:[a.jsxs(f.Box,{maxW:"1280px",mx:"auto",px:{base:"4",md:"6",lg:"8"},h:"16",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"8",children:[a.jsx(f.Box,{flexShrink:0,children:e??a.jsx(jn,{height:28})}),a.jsx(f.Box,{as:"ul",display:{base:"none",md:"flex"},alignItems:"center",justifyContent:n==="left"?"flex-start":n==="right"?"flex-end":"center",gap:"1",listStyleType:"none",m:"0",p:"0",flex:"1",children:t.map(F=>a.jsx(f.Box,{as:"li",children:p(F,a.jsx(f.Box,{as:"span",display:"block",px:"3",py:"2",fontSize:"sm",fontWeight:"medium",fontFamily:"var(--font-body)",color:F.isActive?"blue.500":"text.body",borderRadius:"md",transition:"all 0.15s",_hover:{color:"blue.500",bg:"blue.50"},_dark:{_hover:{bg:"rgba(6,133,255,0.10)"}},cursor:"pointer",children:F.label}))},F.href))}),a.jsx(f.Box,{display:{base:"none",md:"flex"},alignItems:"center",flexShrink:0,children:h??a.jsx(j,{})}),a.jsx(f.Box,{as:"button",display:{base:"flex",md:"none"},alignItems:"center",justifyContent:"center",border:"none",bg:"transparent",p:"0",cursor:"pointer",onClick:()=>y(!b),"aria-label":b?"Close menu":"Open menu","aria-expanded":b,style:{flexShrink:0,position:"relative",width:32,height:32},children:a.jsx(bn,{mode:"wait",initial:!1,children:b?a.jsx(ge.span,{initial:{opacity:0,rotate:-45,scale:.7},animate:{opacity:1,rotate:0,scale:1},exit:{opacity:0,rotate:45,scale:.7},transition:{duration:.18,ease:"easeOut"},style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},children:a.jsx(ih,{})},"close"):a.jsx(ge.span,{initial:{opacity:0,rotate:45,scale:.7},animate:{opacity:1,rotate:0,scale:1},exit:{opacity:0,rotate:-45,scale:.7},transition:{duration:.18,ease:"easeOut"},style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},children:a.jsx(oh,{})},"hamburger")})})]}),a.jsx(bn,{children:b&&a.jsx(ge.div,{variants:Jf,initial:"hidden",animate:"visible",exit:"exit",style:{overflow:"hidden"},children:a.jsxs(f.Box,{display:{base:"block",md:"none"},bg:"bg",borderTop:"1px solid",borderColor:"border",py:"4",px:"4",children:[a.jsx(ge.ul,{variants:Qf,initial:"hidden",animate:"visible",style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",gap:4},children:t.map(F=>a.jsx(ge.li,{variants:eh,children:p(F,a.jsx(f.Box,{as:"span",display:"block",px:"3",py:"2.5",fontSize:"md",fontWeight:"medium",fontFamily:"var(--font-body)",color:F.isActive?"blue.500":"text.body",borderRadius:"md",_hover:{color:"blue.500",bg:"bg.subtle"},cursor:"pointer",onClick:()=>y(!1),children:F.label}))},F.href))}),a.jsx(ge.div,{variants:th,initial:"hidden",animate:"visible",children:a.jsx(f.Box,{mt:"4",children:h??a.jsx(j,{mobile:!0})})})]})},"mobile-menu")})]})}const ah=a.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:a.jsx("path",{d:"m9 18 6-6-6-6"})}),lh=(e,t)=>e.href?a.jsx("a",{href:e.href,style:{textDecoration:"none"},children:t}):a.jsx(a.Fragment,{children:t});function ch({items:e,separator:t=ah,renderLink:n=lh,...o}){return a.jsx(f.Box,{as:"nav","aria-label":"Breadcrumb",display:"flex",alignItems:"center",gap:"1.5",...o,children:e.map((i,r)=>{const s=r===e.length-1;return a.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"1.5",children:[n(i,a.jsx(f.Box,{as:"span",fontSize:"sm",fontFamily:"var(--font-body)",fontWeight:s?"medium":"normal",color:s?"text.heading":"text.muted",_hover:s?void 0:{color:"blue.500"},cursor:!s&&i.href?"pointer":"default",transition:"color 0.15s",children:i.label})),!s&&a.jsx(f.Box,{color:"text.muted",display:"flex",alignItems:"center",children:t})]},r)})})}const dh={sm:{px:"3",py:"1.5",fontSize:"sm"},md:{px:"4",py:"2",fontSize:"md"},lg:{px:"5",py:"2.5",fontSize:"lg"}};function uh({tabs:e,defaultActiveId:t,activeId:n,onChange:o,variant:i="line",size:r="md",renderContent:s=!0,...l}){var x;const[c,u]=w.useState(t??((x=e[0])==null?void 0:x.id)),d=n??c,h=g=>{u(g),o==null||o(g)},p=e.find(g=>g.id===d),m=dh[r];return a.jsxs(f.Box,{...l,children:[a.jsx(f.Box,{role:"tablist",display:"flex",gap:i==="pill"?"1":"0",borderBottom:i==="line"?"1px solid":"none",borderColor:"border",bg:i==="pill"?"bg.subtle":"transparent",p:i==="pill"?"1":"0",borderRadius:i==="pill"?"md":"none",overflowX:"auto",flexWrap:"nowrap",style:{scrollbarWidth:"none"},children:e.map(g=>{const b=g.id===d;return a.jsxs(f.Box,{role:"tab","aria-selected":b,"aria-disabled":g.disabled,tabIndex:g.disabled?-1:0,onClick:()=>!g.disabled&&h(g.id),onKeyDown:y=>{(y.key==="Enter"||y.key===" ")&&!g.disabled&&h(g.id)},display:"flex",alignItems:"center",gap:"2",px:m.px,py:m.py,fontFamily:"var(--font-body)",fontWeight:b?"semibold":"medium",fontSize:m.fontSize,color:g.disabled?"text.muted":b?"blue.500":"text.body",cursor:g.disabled?"not-allowed":"pointer",opacity:g.disabled?.5:1,transition:"all 0.15s",whiteSpace:"nowrap",flexShrink:0,bg:i==="pill"&&b?"bg":"transparent",borderRadius:i==="pill"?"md":"none",boxShadow:i==="pill"&&b?"sm":"none",borderBottom:i==="line"?"2px solid":"none",borderColor:i==="line"?b?"blue.500":"transparent":void 0,mb:i==="line"?"-1px":"0",_hover:g.disabled?void 0:i==="line"?{color:"blue.500"}:{bg:"bg"},_focusVisible:{outline:"2px solid",outlineColor:"blue.500",outlineOffset:"2px",borderRadius:"sm"},children:[g.label,g.badge!==void 0&&a.jsx(f.Box,{as:"span",display:"inline-flex",alignItems:"center",justifyContent:"center",minW:"5",h:"5",px:"1",borderRadius:"full",fontSize:"2xs",fontWeight:"bold",bg:b?"blue.100":"bg.subtle",color:b?"blue.700":"text.muted",children:g.badge})]},g.id)})}),s&&(p==null?void 0:p.content)&&a.jsx(f.Box,{role:"tabpanel",mt:"4",children:p.content})]})}function fh(e,t,n){if(n*2+5>=t)return Array.from({length:t},(c,u)=>u+1);const i=Math.max(e-n,1),r=Math.min(e+n,t),s=i>2,l=r<t-2;if(!s&&l){const c=3+2*n;return[...Array.from({length:c},(u,d)=>d+1),"...",t]}if(s&&!l){const c=3+2*n;return[1,"...",...Array.from({length:c},(u,d)=>t-c+1+d)]}return[1,"...",...Array.from({length:r-i+1},(c,u)=>i+u),"...",t]}function hh({total:e,pageSize:t=10,currentPage:n=1,onChange:o,siblingCount:i=1,showEdges:r=!0,compact:s=!1,...l}){const c=Math.ceil(e/t);if(c<=1)return null;const u=fh(n,c,i),d={display:"inline-flex",alignItems:"center",justifyContent:"center",w:"9",h:"9",borderRadius:"md",fontSize:"sm",fontFamily:"var(--font-body)",fontWeight:"medium",cursor:"pointer",transition:"all 0.15s",border:"1px solid",userSelect:"none"},h=({children:p,disabled:m,onClick:x,label:g})=>a.jsx(f.Box,{as:"button",...d,borderColor:"border",bg:"bg.surface",color:m?"text.muted":"text.body",opacity:m?.4:1,pointerEvents:m?"none":void 0,onClick:x,"aria-label":g,_hover:{borderColor:"blue.400",color:"blue.500"},children:p});return a.jsxs(f.Box,{as:"nav",role:"navigation","aria-label":"Pagination",display:"flex",alignItems:"center",gap:"1",flexWrap:"wrap",...l,children:[r&&a.jsx(h,{disabled:n===1,onClick:()=>o==null?void 0:o(1),label:"First page",children:"«"}),a.jsx(h,{disabled:n===1,onClick:()=>o==null?void 0:o(n-1),label:"Previous page",children:"‹"}),!s&&u.map((p,m)=>p==="..."?a.jsx(f.Box,{...d,border:"none",bg:"transparent",color:"text.muted",cursor:"default",pointerEvents:"none",children:"…"},`dots-${m}`):a.jsx(f.Box,{as:"button",...d,borderColor:n===p?"blue.500":"border",bg:n===p?"blue.500":"bg.surface",color:n===p?"white":"text.body",onClick:()=>o==null?void 0:o(p),"aria-label":`Page ${p}`,"aria-current":n===p?"page":void 0,_hover:n!==p?{borderColor:"blue.400",color:"blue.500"}:void 0,children:p},p)),s&&a.jsxs(f.Box,{px:"3",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",whiteSpace:"nowrap",children:[n," / ",c]}),a.jsx(h,{disabled:n===c,onClick:()=>o==null?void 0:o(n+1),label:"Next page",children:"›"}),r&&a.jsx(h,{disabled:n===c,onClick:()=>o==null?void 0:o(c),label:"Last page",children:"»"})]})}const Ti=a.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:a.jsx("path",{d:"M2 7L5.5 10.5L12 4",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})});function ph({steps:e,currentStep:t,variant:n="default",orientation:o="horizontal",colorScheme:i="blue",...r}){const s=i==="blue"?"#0685FF":"#7700CC",l=i==="blue"?"rgba(6,133,255,0.10)":"rgba(119,0,204,0.10)";return o==="vertical"?a.jsx(f.Box,{display:"flex",flexDirection:"column",alignItems:"flex-start",...r,children:e.map((u,d)=>{const h=d+1<t,p=d+1===t,m=d===e.length-1,x=h||p?s:"var(--chakra-colors-border, #E2E8F0)";return a.jsxs(f.Box,{display:"flex",flexDirection:"row",alignItems:"flex-start",gap:"3",children:[a.jsxs(f.Box,{display:"flex",flexDirection:"column",alignItems:"center",children:[a.jsx(f.Box,{w:"8",h:"8",borderRadius:"full",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",bg:h||p?s:"bg.subtle",border:"2px solid",borderColor:x,color:"white",fontSize:"sm",fontWeight:"bold",fontFamily:"var(--font-body)",transition:"all 0.25s",children:h?Ti:u.icon??d+1}),!m&&a.jsx(f.Box,{w:"2px",flex:"1",minH:"8",bg:h?s:"border",my:"1",transition:"background 0.25s"})]}),n!=="compact"&&a.jsxs(f.Box,{pt:"1",pb:m?"0":"8",children:[a.jsx(f.Box,{fontSize:"sm",fontWeight:p?"semibold":"medium",color:h||p?s:"text.muted",fontFamily:"var(--font-body)",transition:"color 0.25s",children:u.title}),u.description&&a.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:u.description})]})]},u.id)})}):a.jsx(f.Box,{display:"inline-flex",alignItems:"center",gap:"0",role:"list","aria-label":"Progress steps",...r,children:e.map((u,d)=>{const h=d+1<t,p=d+1===t,m=d+1>t,x=d===e.length-1,g=m?"bg.subtle":s,b=h?Ti:u.icon?u.icon:a.jsx(f.Box,{as:"span",fontSize:"13px",fontWeight:"700",fontFamily:"var(--font-body)",color:m?"text.muted":"white",lineHeight:"1",children:d+1}),y=!m&&n!=="compact",v=m?"text.muted":s;return a.jsxs(w.Fragment,{children:[a.jsx(f.Box,{role:"listitem","aria-current":p?"step":void 0,display:"inline-flex",alignItems:"center",gap:"0",children:a.jsxs(f.Box,{display:"inline-flex",alignItems:"center",gap:"2",px:y?"2":"0",py:y?"1.5":"0",bg:y?l:"transparent",borderRadius:"full",transition:"all 0.25s ease",children:[a.jsx(f.Box,{w:"7",h:"7",borderRadius:"full",flexShrink:0,display:"inline-flex",alignItems:"center",justifyContent:"center",bg:g,border:m?"1.5px solid":"none",borderColor:"var(--chakra-colors-border, #E2E8F0)",transition:"all 0.25s ease",flexDirection:"row",children:b}),n!=="compact"&&a.jsx(f.Box,{as:"span",fontSize:"sm",fontWeight:p||h?"semibold":"medium",fontFamily:"var(--font-body)",color:v,whiteSpace:"nowrap",transition:"color 0.25s",children:u.title})]})}),!x&&a.jsx(f.Box,{display:"inline-flex",alignItems:"center",px:"1",flexShrink:0,children:a.jsx(f.Box,{h:"1.5px",w:"10",bg:h?s:"var(--chakra-colors-border, #E2E8F0)",borderRadius:"full",transition:"background 0.25s ease"})})]},u.id)})})}const mh={info:{bg:"rgba(6, 133, 255, 0.08)",border:"rgba(6, 133, 255, 0.3)",color:"#0685FF",icon:"ℹ"},success:{bg:"rgba(27, 122, 56, 0.08)",border:"rgba(27, 122, 56, 0.3)",color:"#1B7A38",icon:"✓"},warning:{bg:"rgba(217, 119, 6, 0.08)",border:"rgba(217, 119, 6, 0.3)",color:"#D97706",icon:"⚠"},error:{bg:"rgba(220, 38, 38, 0.08)",border:"rgba(220, 38, 38, 0.3)",color:"#DC2626",icon:"✕"}},Nr=w.forwardRef(({status:e="info",variant:t="subtle",title:n,description:o,icon:i,onClose:r,closable:s=!1,children:l,...c},u)=>{const d=mh[e],h=t==="solid"?d.color:d.bg,p=t==="solid"?"white":"inherit",m=t==="left-accent"?`4px solid ${d.color}`:void 0,x=t==="subtle"?`1px solid ${d.border}`:void 0;return a.jsxs(f.Box,{ref:u,role:"alert",display:"flex",alignItems:"flex-start",gap:"3",p:"4",borderRadius:"md",bg:h,border:x,borderLeft:m,color:p,...c,children:[a.jsx(f.Box,{flexShrink:0,w:"5",h:"5",borderRadius:"full",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"xs",fontWeight:"bold",bg:t==="solid"?"rgba(255,255,255,0.2)":d.color,color:"white",mt:"0.5",children:i??d.icon}),a.jsxs(f.Box,{flex:"1",children:[n&&a.jsx(f.Box,{fontWeight:"semibold",fontSize:"sm",fontFamily:"var(--font-body)",color:t==="solid"?"white":d.color,children:n}),o&&a.jsx(f.Box,{mt:n?"0.5":"0",fontSize:"sm",fontFamily:"var(--font-body)",color:t==="solid"?"rgba(255,255,255,0.85)":"text.body",lineHeight:"1.5",children:o}),l]}),s&&a.jsx(f.Box,{as:"button",flexShrink:0,w:"6",h:"6",border:"none",bg:"transparent",cursor:"pointer",color:t==="solid"?"rgba(255,255,255,0.7)":"text.muted",fontSize:"lg",lineHeight:"1",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"sm",_hover:{color:t==="solid"?"white":"text.heading"},onClick:r,"aria-label":"Dismiss alert",children:"×"})]})});Nr.displayName="MedixAlert";const xh=`
|
|
185
|
+
`),()=>{var D;(D=l.current)==null||D.removeAttribute("data-motion-pop-id"),k.contains(C)&&k.removeChild(C)}},[t]),s.jsx(Hu,{isPresent:t,childRef:l,sizeRef:c,pop:a,children:a===!1?e:V.cloneElement(e,{ref:h})})}const Nu=({children:e,initial:t,isPresent:n,onExitComplete:o,custom:i,presenceAffectsLayout:a,mode:r,anchorX:l,anchorY:c,root:u})=>{const d=Tn($u),h=S.useId();let p=!0,m=S.useMemo(()=>(p=!1,{id:h,initial:t,isPresent:n,custom:i,onExitComplete:x=>{d.set(x,!0);for(const g of d.values())if(!g)return;o&&o()},register:x=>(d.set(x,!1),()=>d.delete(x))}),[n,d,o]);return a&&p&&(m={...m}),S.useMemo(()=>{d.forEach((x,g)=>d.set(g,!1))},[n]),V.useEffect(()=>{!n&&!d.size&&o&&o()},[n]),e=s.jsx(_u,{pop:r==="popLayout",isPresent:n,anchorX:l,anchorY:c,root:u,children:e}),s.jsx(kt.Provider,{value:m,children:e})};function $u(){return new Map}function Br(e=!0){const t=S.useContext(kt);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:o,register:i}=t,a=S.useId();S.useEffect(()=>{if(e)return i(a)},[e]);const r=S.useCallback(()=>e&&o&&o(a),[a,o,e]);return!n&&o?[!1,r]:[!0]}const nt=e=>e.key||"";function hi(e){const t=[];return S.Children.forEach(e,n=>{S.isValidElement(n)&&t.push(n)}),t}const vn=({children:e,custom:t,initial:n=!0,onExitComplete:o,presenceAffectsLayout:i=!0,mode:a="sync",propagate:r=!1,anchorX:l="left",anchorY:c="top",root:u})=>{const[d,h]=Br(r),p=S.useMemo(()=>hi(e),[e]),m=r&&!d?[]:p.map(nt),x=S.useRef(!0),g=S.useRef(p),v=Tn(()=>new Map),b=S.useRef(new Set),[y,w]=S.useState(p),[j,C]=S.useState(p);ts(()=>{x.current=!1,g.current=p;for(let A=0;A<j.length;A++){const F=nt(j[A]);m.includes(F)?(v.delete(F),b.current.delete(F)):v.get(F)!==!0&&v.set(F,!1)}},[j,m.length,m.join("-")]);const k=[];if(p!==y){let A=[...p];for(let F=0;F<j.length;F++){const T=j[F],P=nt(T);m.includes(P)||(A.splice(F,0,T),k.push(T))}return a==="wait"&&k.length&&(A=k),C(hi(A)),w(p),null}process.env.NODE_ENV!=="production"&&a==="wait"&&j.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:D}=S.useContext(Fn);return s.jsx(s.Fragment,{children:j.map(A=>{const F=nt(A),T=r&&!d?!1:p===j||m.includes(F),P=()=>{if(b.current.has(F))return;if(v.has(F))b.current.add(F),v.set(F,!0);else return;let E=!0;v.forEach(U=>{U||(E=!1)}),E&&(D==null||D(),C(g.current),r&&(h==null||h()),o&&o())};return s.jsx(Nu,{isPresent:T,initial:!x.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:u,onExitComplete:T?void 0:P,anchorX:l,anchorY:c,children:A},F)})})},Ar=S.createContext({strict:!1}),pi={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"]};let mi=!1;function Uu(){if(mi)return;const e={};for(const t in pi)e[t]={isEnabled:n=>pi[t].some(o=>!!n[o])};ir(e),mi=!0}function Dr(){return Uu(),Ad()}function Gu(e){const t=Dr();for(const n in e)t[n]={...t[n],...e[n]};ir(t)}const Ku=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","propagate","ignoreStrict","viewport"]);function St(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Ku.has(e)}let Pr=e=>!St(e);function Yu(e){typeof e=="function"&&(Pr=t=>t.startsWith("on")?!St(t):e(t))}try{Yu(require("@emotion/is-prop-valid").default)}catch{}function Xu(e,t,n){const o={};for(const i in e)i==="values"&&typeof e.values=="object"||H(e[i])||(Pr(i)||n===!0&&St(i)||!t&&!St(i)||e.draggable&&i.startsWith("onDrag"))&&(o[i]=e[i]);return o}const At=S.createContext({});function Zu(e,t){if(Bt(e)){const{initial:n,animate:o}=e;return{initial:n===!1||Ge(n)?n:void 0,animate:Ge(o)?o:void 0}}return e.inherit!==!1?t:{}}function qu(e){const{initial:t,animate:n}=Zu(e,S.useContext(At));return S.useMemo(()=>({initial:t,animate:n}),[xi(t),xi(n)])}function xi(e){return Array.isArray(e)?e.join(" "):e}const Qn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Er(e,t,n){for(const o in t)!H(t[o])&&!ur(o,n)&&(e[o]=t[o])}function Ju({transformTemplate:e},t){return S.useMemo(()=>{const n=Qn();return Zn(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Qu(e,t){const n=e.style||{},o={};return Er(o,n,e),Object.assign(o,Ju(e,t)),o}function ef(e,t){const n={},o=Qu(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=o,n}const Mr=()=>({...Qn(),attrs:{}});function tf(e,t,n,o){const i=S.useMemo(()=>{const a=Mr();return fr(a,t,pr(o),e.transformTemplate,e.style),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};Er(a,e.style,e),i.style={...a,...i.style}}return i}const nf=["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 eo(e){return typeof e!="string"||e.includes("-")?!1:!!(nf.indexOf(e)>-1||/[A-Z]/u.test(e))}function of(e,t,n,{latestValues:o},i,a=!1,r){const c=(r??eo(e)?tf:ef)(t,o,i,e),u=Xu(t,typeof e=="string",a),d=e!==S.Fragment?{...u,...c,ref:n}:{},{children:h}=t,p=S.useMemo(()=>H(h)?h.get():h,[h]);return S.createElement(e,{...d,children:p})}function sf({scrapeMotionValuesFromProps:e,createRenderState:t},n,o,i){return{latestValues:rf(n,o,i,e),renderState:t()}}function rf(e,t,n,o){const i={},a=o(e,{});for(const p in a)i[p]=ut(a[p]);let{initial:r,animate:l}=e;const c=Bt(e),u=nr(e);t&&u&&!c&&e.inherit!==!1&&(r===void 0&&(r=t.initial),l===void 0&&(l=t.animate));let d=n?n.initial===!1:!1;d=d||r===!1;const h=d?l:r;if(h&&typeof h!="boolean"&&!Tt(h)){const p=Array.isArray(h)?h:[h];for(let m=0;m<p.length;m++){const x=_n(e,p[m]);if(x){const{transitionEnd:g,transition:v,...b}=x;for(const y in b){let w=b[y];if(Array.isArray(w)){const j=d?w.length-1:0;w=w[j]}w!==null&&(i[y]=w)}for(const y in g)i[y]=g[y]}}}return i}const Rr=e=>(t,n)=>{const o=S.useContext(At),i=S.useContext(kt),a=()=>sf(e,t,o,i);return n?a():Tn(a)},af=Rr({scrapeMotionValuesFromProps:qn,createRenderState:Qn}),lf=Rr({scrapeMotionValuesFromProps:mr,createRenderState:Mr}),cf=Symbol.for("motionComponentSymbol");function df(e,t,n){const o=S.useRef(n);S.useInsertionEffect(()=>{o.current=n});const i=S.useRef(null);return S.useCallback(a=>{var l;a&&((l=e.onMount)==null||l.call(e,a));const r=o.current;if(typeof r=="function")if(a){const c=r(a);typeof c=="function"&&(i.current=c)}else i.current?(i.current(),i.current=null):r(a);else r&&(r.current=a);t&&(a?t.mount(a):t.unmount())},[t])}const Vr=S.createContext({});function Te(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function uf(e,t,n,o,i,a){var w,j;const{visualElement:r}=S.useContext(At),l=S.useContext(Ar),c=S.useContext(kt),u=S.useContext(Jn),d=u.reducedMotion,h=u.skipAnimations,p=S.useRef(null),m=S.useRef(!1);o=o||l.renderer,!p.current&&o&&(p.current=o(e,{visualState:t,parent:r,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:d,skipAnimations:h,isSVG:a}),m.current&&p.current&&(p.current.manuallyAnimateOnMount=!0));const x=p.current,g=S.useContext(Vr);x&&!x.projection&&i&&(x.type==="html"||x.type==="svg")&&ff(p.current,n,i,g);const v=S.useRef(!1);S.useInsertionEffect(()=>{x&&v.current&&x.update(n,c)});const b=n[Ns],y=S.useRef(!!b&&typeof window<"u"&&!((w=window.MotionHandoffIsComplete)!=null&&w.call(window,b))&&((j=window.MotionHasOptimisedAnimation)==null?void 0:j.call(window,b)));return ts(()=>{m.current=!0,x&&(v.current=!0,window.MotionIsMounted=!0,x.updateFeatures(),x.scheduleRenderMicrotask(),y.current&&x.animationState&&x.animationState.animateChanges())}),S.useEffect(()=>{x&&(!y.current&&x.animationState&&x.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var C;(C=window.MotionHandoffMarkAsComplete)==null||C.call(window,b)}),y.current=!1),x.enteringChildren=void 0)}),x}function ff(e,t,n,o){const{layoutId:i,layout:a,drag:r,dragConstraints:l,layoutScroll:c,layoutRoot:u,layoutAnchor:d,layoutCrossfade:h}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Lr(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!r||l&&Te(l),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:o,crossfade:h,layoutScroll:c,layoutRoot:u,layoutAnchor:d})}function Lr(e){if(e)return e.options.allowProjection!==!1?e.projection:Lr(e.parent)}function $t(e,{forwardMotionProps:t=!1,type:n}={},o,i){o&&Gu(o);const a=n?n==="svg":eo(e),r=a?lf:af;function l(u,d){let h;const p={...S.useContext(Jn),...u,layoutId:hf(u)},{isStatic:m}=p,x=qu(u),g=r(u,m);if(!m&&typeof window<"u"){pf(p,o);const v=mf(p);h=v.MeasureLayout,x.visualElement=uf(e,g,p,i,v.ProjectionNode,a)}return s.jsxs(At.Provider,{value:x,children:[h&&x.visualElement?s.jsx(h,{visualElement:x.visualElement,...p}):null,of(e,u,df(g,x.visualElement,d),g,m,t,a)]})}l.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=S.forwardRef(l);return c[cf]=e,c}function hf({layoutId:e}){const t=S.useContext(Fn).id;return t&&e!==void 0?t+"-"+e:e}function pf(e,t){const n=S.useContext(Ar).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const o="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Ve(!1,o,"lazy-strict-mode"):se(!1,o,"lazy-strict-mode")}}function mf(e){const t=Dr(),{drag:n,layout:o}=t;if(!n&&!o)return{};const i={...n,...o};return{MeasureLayout:n!=null&&n.isEnabled(e)||o!=null&&o.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function xf(e,t){if(typeof Proxy>"u")return $t;const n=new Map,o=(a,r)=>$t(a,r,e,t),i=(a,r)=>(process.env.NODE_ENV!=="production"&&Dn(!1,"motion() is deprecated. Use motion.create() instead."),o(a,r));return new Proxy(i,{get:(a,r)=>r==="create"?o:(n.has(r)||n.set(r,$t(r,void 0,e,t)),n.get(r))})}const gf=(e,t)=>t.isSVG??eo(e)?new Gd(t):new Wd(t,{allowProjection:e!==S.Fragment});class yf extends he{constructor(t){super(t),t.animationState||(t.animationState=qd(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Tt(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let bf=0;class vf extends he{constructor(){super(...arguments),this.id=bf++,this.isExitComplete=!1}update(){var a;if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===o)return;if(t&&o===!1){if(this.isExitComplete){const{initial:r,custom:l}=this.node.getProps();if(typeof r=="string"){const c=je(this.node,r,l);if(c){const{transition:u,transitionEnd:d,...h}=c;for(const p in h)(a=this.node.getValue(p))==null||a.jump(h[p])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const wf={animation:{Feature:yf},exit:{Feature:vf}};function qe(e){return{point:{x:e.pageX,y:e.pageY}}}const Sf=e=>t=>Gn(t)&&e(t,qe(t));function Ne(e,t,n,o){return Ke(e,t,Sf(n),o)}const Ir=({current:e})=>e?e.ownerDocument.defaultView:null,gi=(e,t)=>Math.abs(e-t);function Cf(e,t){const n=gi(e.x,t.x),o=gi(e.y,t.y);return Math.sqrt(n**2+o**2)}const yi=new Set(["auto","scroll"]);class zr{constructor(t,n,{transformPagePoint:o,contextWindow:i=window,dragSnapToOrigin:a=!1,distanceThreshold:r=3,element:l}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=m=>{this.handleScroll(m.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=ot(this.lastRawMoveEventInfo,this.transformPagePoint));const m=Ut(this.lastMoveEventInfo,this.history),x=this.startEvent!==null,g=Cf(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!x&&!g)return;const{point:v}=m,{timestamp:b}=W;this.history.push({...v,timestamp:b});const{onStart:y,onMove:w}=this.handlers;x||(y&&y(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,m)},this.handlePointerMove=(m,x)=>{this.lastMoveEvent=m,this.lastRawMoveEventInfo=x,this.lastMoveEventInfo=ot(x,this.transformPagePoint),M.update(this.updatePoint,!0)},this.handlePointerUp=(m,x)=>{this.end();const{onEnd:g,onSessionEnd:v,resumeAnimation:b}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=Ut(m.type==="pointercancel"?this.lastMoveEventInfo:ot(x,this.transformPagePoint),this.history);this.startEvent&&g&&g(m,y),v&&v(m,y)},!Gn(t))return;this.dragSnapToOrigin=a,this.handlers=n,this.transformPagePoint=o,this.distanceThreshold=r,this.contextWindow=i||window;const c=qe(t),u=ot(c,this.transformPagePoint),{point:d}=u,{timestamp:h}=W;this.history=[{...d,timestamp:h}];const{onSessionStart:p}=n;p&&p(t,Ut(u,this.history)),this.removeListeners=Ye(Ne(this.contextWindow,"pointermove",this.handlePointerMove),Ne(this.contextWindow,"pointerup",this.handlePointerUp),Ne(this.contextWindow,"pointercancel",this.handlePointerUp)),l&&this.startScrollTracking(l)}startScrollTracking(t){let n=t.parentElement;for(;n;){const o=getComputedStyle(n);(yi.has(o.overflowX)||yi.has(o.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const o=t===window,i=o?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},a={x:i.x-n.x,y:i.y-n.y};a.x===0&&a.y===0||(o?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=a.x,this.lastMoveEventInfo.point.y+=a.y):this.history.length>0&&(this.history[0].x-=a.x,this.history[0].y-=a.y),this.scrollPositions.set(t,i),M.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),fe(this.updatePoint)}}function ot(e,t){return t?{point:t(e.point)}:e}function bi(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ut({point:e},t){return{point:e,delta:bi(e,Or(t)),offset:bi(e,jf(t)),velocity:kf(t,.1)}}function jf(e){return e[0]}function Or(e){return e[e.length-1]}function kf(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,o=null;const i=Or(e);for(;n>=0&&(o=e[n],!(i.timestamp-o.timestamp>$(t)));)n--;if(!o)return{x:0,y:0};o===e[0]&&e.length>2&&i.timestamp-o.timestamp>$(t)*2&&(o=e[1]);const a=X(i.timestamp-o.timestamp);if(a===0)return{x:0,y:0};const r={x:(i.x-o.x)/a,y:(i.y-o.y)/a};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function Ff(e,{min:t,max:n},o){return t!==void 0&&e<t?e=o?R(t,e,o.min):Math.max(e,t):n!==void 0&&e>n&&(e=o?R(n,e,o.max):Math.min(e,n)),e}function vi(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function Tf(e,{top:t,left:n,bottom:o,right:i}){return{x:vi(e.x,n,i),y:vi(e.y,t,o)}}function wi(e,t){let n=t.min-e.min,o=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,o]=[o,n]),{min:n,max:o}}function Bf(e,t){return{x:wi(e.x,t.x),y:wi(e.y,t.y)}}function Af(e,t){let n=.5;const o=N(e),i=N(t);return i>o?n=$e(t.min,t.max-o,e.min):o>i&&(n=$e(e.min,e.max-i,t.min)),ie(0,1,n)}function Df(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const wn=.35;function Pf(e=wn){return e===!1?e=0:e===!0&&(e=wn),{x:Si(e,"left","right"),y:Si(e,"top","bottom")}}function Si(e,t,n){return{min:Ci(e,t),max:Ci(e,n)}}function Ci(e,t){return typeof e=="number"?e:e[t]||0}const Ef=new WeakMap;class Mf{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=z(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:o}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const a=h=>{n&&this.snapToCursor(qe(h).point),this.stopAnimation()},r=(h,p)=>{const{drag:m,dragPropagation:x,onDragStart:g}=this.getProps();if(m&&!x&&(this.openDragLock&&this.openDragLock(),this.openDragLock=sd(m),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=p,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),te(b=>{let y=this.getAxisMotionValue(b).get()||0;if(oe.test(y)){const{projection:w}=this.visualElement;if(w&&w.layout){const j=w.layout.layoutBox[b];j&&(y=N(j)*(parseFloat(y)/100))}}this.originPoint[b]=y}),g&&M.update(()=>g(h,p),!1,!0),un(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},l=(h,p)=>{this.latestPointerEvent=h,this.latestPanInfo=p;const{dragPropagation:m,dragDirectionLock:x,onDirectionLock:g,onDrag:v}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:b}=p;if(x&&this.currentDirection===null){this.currentDirection=Vf(b),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",p.point,b),this.updateAxis("y",p.point,b),this.visualElement.render(),v&&M.update(()=>v(h,p),!1,!0)},c=(h,p)=>{this.latestPointerEvent=h,this.latestPanInfo=p,this.stop(h,p),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>{const{dragSnapToOrigin:h}=this.getProps();(h||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:d}=this.getProps();this.panSession=new zr(t,{onSessionStart:a,onStart:r,onMove:l,onSessionEnd:c,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:o,contextWindow:Ir(this.visualElement),element:this.visualElement.current})}stop(t,n){const o=t||this.latestPointerEvent,i=n||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!i||!o)return;const{velocity:r}=i;this.startAnimation(r);const{onDragEnd:l}=this.getProps();l&&M.postRender(()=>l(o,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,o){const{drag:i}=this.getProps();if(!o||!it(t,i,this.currentDirection))return;const a=this.getAxisMotionValue(t);let r=this.originPoint[t]+o[t];this.constraints&&this.constraints[t]&&(r=Ff(r,this.constraints[t],this.elastic[t])),a.set(r)}resolveConstraints(){var a;const{dragConstraints:t,dragElastic:n}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(a=this.visualElement.projection)==null?void 0:a.layout,i=this.constraints;t&&Te(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&o?this.constraints=Tf(o.layoutBox,t):this.constraints=!1,this.elastic=Pf(n),i!==this.constraints&&!Te(t)&&o&&this.constraints&&!this.hasMutatedConstraints&&te(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=Df(o.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Te(t))return!1;const o=t.current;se(o!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const a=Rd(o,i.root,this.visualElement.getTransformPagePoint());let r=Bf(i.layout.layoutBox,a);if(n){const l=n(Pd(r));this.hasMutatedConstraints=!!l,l&&(r=rr(l))}return r}startAnimation(t){const{drag:n,dragMomentum:o,dragElastic:i,dragTransition:a,dragSnapToOrigin:r,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},u=te(d=>{if(!it(d,n,this.currentDirection))return;let h=c&&c[d]||{};(r===!0||r===d)&&(h={min:0,max:0});const p=i?200:1e6,m=i?40:1e7,x={type:"inertia",velocity:o?t[d]:0,bounceStiffness:p,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...a,...h};return this.startAxisValueAnimation(d,x)});return Promise.all(u).then(l)}startAxisValueAnimation(t,n){const o=this.getAxisMotionValue(t);return un(this.visualElement,t),o.start(Hn(t,o,0,n,this.visualElement,!1))}stopAnimation(){te(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,o=this.visualElement.getProps(),i=o[n];return i||this.visualElement.getValue(t,(o.initial?o.initial[t]:void 0)||0)}snapToCursor(t){te(n=>{const{drag:o}=this.getProps();if(!it(n,o,this.currentDirection))return;const{projection:i}=this.visualElement,a=this.getAxisMotionValue(n);if(i&&i.layout){const{min:r,max:l}=i.layout.layoutBox[n],c=a.get()||0;a.set(t[n]-R(r,l,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:o}=this.visualElement;if(!Te(n)||!o||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};te(r=>{const l=this.getAxisMotionValue(r);if(l&&this.constraints!==!1){const c=l.get();i[r]=Af({min:c,max:c},this.constraints[r])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.constraints=!1,this.resolveConstraints(),te(r=>{if(!it(r,t,null))return;const l=this.getAxisMotionValue(r),{min:c,max:u}=this.constraints[r];l.set(R(c,u,i[r]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Ef.set(this.visualElement,this);const t=this.visualElement.current,n=Ne(t,"pointerdown",u=>{const{drag:d,dragListener:h=!0}=this.getProps(),p=u.target,m=p!==t&&ud(p);d&&h&&!m&&this.start(u)});let o;const i=()=>{const{dragConstraints:u}=this.getProps();Te(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),o||(o=Rf(t,u.current,()=>this.scalePositionWithinConstraints())))},{projection:a}=this.visualElement,r=a.addEventListener("measure",i);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),M.read(i);const l=Ke(window,"resize",()=>this.scalePositionWithinConstraints()),c=a.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:d})=>{this.isDragging&&d&&(te(h=>{const p=this.getAxisMotionValue(h);p&&(this.originPoint[h]+=u[h].translate,p.set(p.get()+u[h].translate))}),this.visualElement.render())}));return()=>{l(),n(),r(),c&&c(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:o=!1,dragPropagation:i=!1,dragConstraints:a=!1,dragElastic:r=wn,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:o,dragPropagation:i,dragConstraints:a,dragElastic:r,dragMomentum:l}}}function ji(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function Rf(e,t,n){const o=Po(e,ji(n)),i=Po(t,ji(n));return()=>{o(),i()}}function it(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Vf(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Lf extends he{constructor(t){super(t),this.removeGroupControls=Z,this.removeListeners=Z,this.controls=new Mf(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Z}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Gt=e=>(t,n)=>{e&&M.update(()=>e(t,n),!1,!0)};class If extends he{constructor(){super(...arguments),this.removePointerDownListener=Z}onPointerDown(t){this.session=new zr(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ir(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:o,onPanEnd:i}=this.node.getProps();return{onSessionStart:Gt(t),onStart:Gt(n),onMove:Gt(o),onEnd:(a,r)=>{delete this.session,i&&M.postRender(()=>i(a,r))}}}mount(){this.removePointerDownListener=Ne(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Kt=!1;class zf extends S.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o,layoutId:i}=this.props,{projection:a}=t;a&&(n.group&&n.group.add(a),o&&o.register&&i&&o.register(a),Kt&&a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),ft.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:o,drag:i,isPresent:a}=this.props,{projection:r}=o;return r&&(r.isPresent=a,t.layoutDependency!==n&&r.setOptions({...r.options,layoutDependency:n}),Kt=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==a?r.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?r.promote():r.relegate()||M.postRender(()=>{const l=r.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:o}=t;o&&(o.options.layoutAnchor=n,o.root.didUpdate(),Un.postRender(()=>{!o.currentAnimation&&o.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o}=this.props,{projection:i}=t;Kt=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),o&&o.deregister&&o.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Wr(e){const[t,n]=Br(),o=S.useContext(Fn);return s.jsx(zf,{...e,layoutGroup:o,switchLayoutGroup:S.useContext(Vr),isPresent:t,safeToRemove:n})}const Of={pan:{Feature:If},drag:{Feature:Lf,ProjectionNode:Tr,MeasureLayout:Wr}};function ki(e,t,n){const{props:o}=e;e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,a=o[i];a&&M.postRender(()=>a(t,qe(t)))}class Wf extends he{mount(){const{current:t}=this.node;t&&(this.unmount=ad(t,(n,o)=>(ki(this.node,o,"Start"),i=>ki(this.node,i,"End"))))}unmount(){}}class Hf extends he{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=Ye(Ke(this.node.current,"focus",()=>this.onFocus()),Ke(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Fi(e,t,n){const{props:o}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&o.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),a=o[i];a&&M.postRender(()=>a(t,qe(t)))}class _f extends he{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:o}=this.node.props;this.unmount=hd(t,(i,a)=>(Fi(this.node,a,"Start"),(r,{success:l})=>Fi(this.node,r,l?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(o==null?void 0:o.tap)===!1})}unmount(){}}const Sn=new WeakMap,Yt=new WeakMap,Nf=e=>{const t=Sn.get(e.target);t&&t(e)},$f=e=>{e.forEach(Nf)};function Uf({root:e,...t}){const n=e||document;Yt.has(n)||Yt.set(n,{});const o=Yt.get(n),i=JSON.stringify(t);return o[i]||(o[i]=new IntersectionObserver($f,{root:e,...t})),o[i]}function Gf(e,t,n){const o=Uf(t);return Sn.set(e,n),o.observe(e),()=>{Sn.delete(e),o.unobserve(e)}}const Kf={some:0,all:1};class Yf extends he{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var c;(c=this.stopObserver)==null||c.call(this);const{viewport:t={}}=this.node.getProps(),{root:n,margin:o,amount:i="some",once:a}=t,r={root:n?n.current:void 0,rootMargin:o,threshold:typeof i=="number"?i:Kf[i]},l=u=>{const{isIntersecting:d}=u;if(this.isInView===d||(this.isInView=d,a&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:h,onViewportLeave:p}=this.node.getProps(),m=d?h:p;m&&m(u)};this.stopObserver=Gf(this.node.current,r,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(Xf(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function Xf({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Zf={inView:{Feature:Yf},tap:{Feature:_f},focus:{Feature:Hf},hover:{Feature:Wf}},qf={layout:{ProjectionNode:Tr,MeasureLayout:Wr}},Jf={...wf,...Zf,...Of,...qf},ge=xf(Jf,gf),Hr=[0,0,.2,1],Qf=[.4,0,1,1],eh=[.22,1,.36,1],th={hidden:{opacity:0,y:-8,scaleY:.96,transformOrigin:"top"},visible:{opacity:1,y:0,scaleY:1,transformOrigin:"top",transition:{duration:.22,ease:eh}},exit:{opacity:0,y:-6,scaleY:.97,transformOrigin:"top",transition:{duration:.16,ease:Qf}}},nh={hidden:{},visible:{transition:{staggerChildren:.045,delayChildren:.06}}},oh={hidden:{opacity:0,x:-10},visible:{opacity:1,x:0,transition:{duration:.2,ease:Hr}}},ih={hidden:{opacity:0,y:10},visible:{opacity:1,y:0,transition:{duration:.22,ease:Hr,delay:.18}}},sh=()=>s.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("line",{x1:"7",y1:"17",x2:"17",y2:"7"}),s.jsx("polyline",{points:"7 7 17 7 17 17"})]}),rh=()=>s.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("rect",{width:"32",height:"32",rx:"8",fill:"#0685FF"}),s.jsx("path",{d:"M9.25 10.75H22.75",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M9.25 16H22.75",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M9.25 21.25H22.75",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),ah=()=>s.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("rect",{width:"32",height:"32",rx:"8",fill:"#0685FF"}),s.jsx("path",{d:"M13.8801 16.71L8.93005 21.66L10.3401 23.07L13.1701 20.24L16.0001 17.41L18.1201 19.54L21.6601 23.07L23.0701 21.66L18.1201 16.71L17.4101 16L23.0701 10.34L21.6601 8.92999L16.0001 14.59L10.3401 8.92999L8.93005 10.34L14.5901 16L13.8801 16.71Z",fill:"white"})]}),lh=(e,t)=>s.jsx("a",{href:e.href,style:{textDecoration:"none"},children:t});function Xt({href:e,children:t,target:n,rel:o}){return e?s.jsx("a",{href:e,target:n,rel:o,style:{textDecoration:"none",display:"contents"},children:t}):s.jsx(s.Fragment,{children:t})}function ch({logo:e,navItems:t=[],navItemsAlign:n="center",ctaLabel:o="Get Started",ctaHref:i,onCtaClick:a,ctaIconHref:r,onCtaIconClick:l,secondaryCtaLabel:c,secondaryCtaHref:u,onSecondaryCtaClick:d,ctaSlot:h,renderLink:p=lh,isSticky:m=!1,variant:x="solid",...g}){const[v,b]=S.useState(!1),y=r??i,w=l??a,j=x==="blur"?{background:"rgba(10,18,32,0.85)",backdropFilter:"blur(12px)"}:{},C=({mobile:k=!1})=>s.jsxs(f.Box,{display:"flex",gap:"2",alignItems:"center",flexDirection:k?"column":"row",children:[c&&s.jsx(Xt,{href:u,children:s.jsx(we,{variant:k?"outline":"ghost",colorScheme:"blue",size:k?"md":"sm",onClick:()=>{d==null||d(),k&&b(!1)},style:k?{width:"100%"}:void 0,children:c})}),s.jsx(Xt,{href:i,children:s.jsx(we,{variant:"solid",colorScheme:"blue",size:k?"md":"sm",onClick:()=>{a==null||a(),k&&b(!1)},style:k?{width:"100%"}:void 0,children:o})}),!k&&s.jsx(Xt,{href:y,target:y&&y!==i?"_blank":void 0,rel:y&&y!==i?"noopener noreferrer":void 0,children:s.jsx(we,{variant:"solid",colorScheme:"blue",size:"sm",onClick:w,"aria-label":"Open",style:{width:34,height:34,padding:0,borderRadius:8,flexShrink:0},children:s.jsx(sh,{})})})]});return s.jsxs(f.Box,{as:"nav",role:"navigation","aria-label":"Main navigation",position:m?"sticky":"relative",top:m?"0":void 0,zIndex:m?"sticky":void 0,bg:x==="transparent"?"transparent":x==="blur"?void 0:"bg",style:j,borderBottom:"1px solid",borderColor:x==="transparent"?"transparent":"border",transition:"background 0.2s ease, border-color 0.2s ease",...g,children:[s.jsxs(f.Box,{maxW:"1280px",mx:"auto",px:{base:"4",md:"6",lg:"8"},h:"16",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"8",children:[s.jsx(f.Box,{flexShrink:0,children:e??s.jsx(jt,{height:28})}),s.jsx(f.Box,{as:"ul",display:{base:"none",md:"flex"},alignItems:"center",justifyContent:n==="left"?"flex-start":n==="right"?"flex-end":"center",gap:"1",listStyleType:"none",m:"0",p:"0",flex:"1",children:t.map(k=>s.jsx(f.Box,{as:"li",children:p(k,s.jsx(f.Box,{as:"span",display:"block",px:"3",py:"2",fontSize:"sm",fontWeight:"medium",fontFamily:"var(--font-body)",color:k.isActive?"blue.500":"text.body",borderRadius:"md",transition:"all 0.15s",_hover:{color:"blue.500",bg:"blue.50"},_dark:{_hover:{bg:"rgba(6,133,255,0.10)"}},cursor:"pointer",children:k.label}))},k.href))}),s.jsx(f.Box,{display:{base:"none",md:"flex"},alignItems:"center",flexShrink:0,children:h??s.jsx(C,{})}),s.jsx(f.Box,{as:"button",display:{base:"flex",md:"none"},alignItems:"center",justifyContent:"center",border:"none",bg:"transparent",p:"0",cursor:"pointer",onClick:()=>b(!v),"aria-label":v?"Close menu":"Open menu","aria-expanded":v,style:{flexShrink:0,position:"relative",width:32,height:32},children:s.jsx(vn,{mode:"wait",initial:!1,children:v?s.jsx(ge.span,{initial:{opacity:0,rotate:-45,scale:.7},animate:{opacity:1,rotate:0,scale:1},exit:{opacity:0,rotate:45,scale:.7},transition:{duration:.18,ease:"easeOut"},style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},children:s.jsx(ah,{})},"close"):s.jsx(ge.span,{initial:{opacity:0,rotate:45,scale:.7},animate:{opacity:1,rotate:0,scale:1},exit:{opacity:0,rotate:-45,scale:.7},transition:{duration:.18,ease:"easeOut"},style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},children:s.jsx(rh,{})},"hamburger")})})]}),s.jsx(vn,{children:v&&s.jsx(ge.div,{variants:th,initial:"hidden",animate:"visible",exit:"exit",style:{overflow:"hidden"},children:s.jsxs(f.Box,{display:{base:"block",md:"none"},bg:"bg",borderTop:"1px solid",borderColor:"border",py:"4",px:"4",children:[s.jsx(ge.ul,{variants:nh,initial:"hidden",animate:"visible",style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",gap:4},children:t.map(k=>s.jsx(ge.li,{variants:oh,children:p(k,s.jsx(f.Box,{as:"span",display:"block",px:"3",py:"2.5",fontSize:"md",fontWeight:"medium",fontFamily:"var(--font-body)",color:k.isActive?"blue.500":"text.body",borderRadius:"md",_hover:{color:"blue.500",bg:"bg.subtle"},cursor:"pointer",onClick:()=>b(!1),children:k.label}))},k.href))}),s.jsx(ge.div,{variants:ih,initial:"hidden",animate:"visible",children:s.jsx(f.Box,{mt:"4",children:h??s.jsx(C,{mobile:!0})})})]})},"mobile-menu")})]})}const dh={facebook:()=>s.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("rect",{width:"26",height:"26",rx:"5",fill:"#0685FF"}),s.jsx("g",{clipPath:"url(#clip0_1217_192)",children:s.jsx("path",{d:"M11.0972 21V13.4923H9.112V10.7892H11.0972V8.4804C11.0972 6.66611 12.2698 5 14.9719 5C16.0659 5 16.8749 5.10488 16.8749 5.10488L16.8111 7.62914C16.8111 7.62914 15.9861 7.6211 15.0858 7.6211C14.1114 7.6211 13.9553 8.07014 13.9553 8.81544V10.7892H16.8886L16.761 13.4923H13.9553V21H11.0972Z",fill:"white"})}),s.jsx("defs",{children:s.jsx("clipPath",{id:"clip0_1217_192",children:s.jsx("rect",{width:"8",height:"16",fill:"white",transform:"translate(9 5)"})})})]}),twitter:()=>s.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("rect",{width:"26",height:"26",rx:"5",fill:"#0685FF"}),s.jsx("g",{clipPath:"url(#clip0_1217_186)",children:s.jsx("path",{d:"M14.8963 11.3512L20.3606 5H19.0656L14.3213 10.515L10.5319 5H6.16125L11.8913 13.3394L6.16125 20H7.45625L12.4663 14.1763L16.4681 20H20.8388L14.8963 11.3512ZM13.1231 13.4131L12.5425 12.5825L7.9225 5.975H9.91125L13.6394 11.3075L14.22 12.1381L19.0663 19.0694H17.0775L13.1231 13.4131Z",fill:"white"})}),s.jsx("defs",{children:s.jsx("clipPath",{id:"clip0_1217_186",children:s.jsx("rect",{width:"15",height:"15",fill:"white",transform:"translate(6 5)"})})})]}),linkedin:()=>s.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("rect",{width:"26",height:"26",rx:"5",fill:"#0685FF"}),s.jsx("g",{clipPath:"url(#clip0_1217_198)",children:s.jsx("path",{d:"M18.4298 5.31982H7.57025C6.97368 5.32059 6.40177 5.55791 5.97993 5.97975C5.55809 6.40158 5.32077 6.9735 5.32001 7.57006V18.4296C5.32077 19.0262 5.55809 19.5981 5.97993 20.0199C6.40177 20.4417 6.97368 20.6791 7.57025 20.6798H18.4298C19.0263 20.6791 19.5982 20.4417 20.0201 20.0199C20.4419 19.5981 20.6792 19.0262 20.68 18.4296V7.57006C20.6792 6.9735 20.4419 6.40158 20.0201 5.97975C19.5982 5.55791 19.0263 5.32059 18.4298 5.31982ZM10.7498 17.5003H8.94977V11.1998H10.7498V17.5003ZM10.7498 10.3003H8.94977V8.5003H10.7498V10.3003ZM17.0502 17.5003H15.2502V13.9003C15.2372 13.6704 15.1367 13.4542 14.9694 13.2961C14.802 13.1379 14.5805 13.0498 14.3502 13.0498C14.12 13.0498 13.8985 13.1379 13.7311 13.2961C13.5637 13.4542 13.4633 13.6704 13.4502 13.9003V17.5003H11.6502V11.1998H13.4502V11.5387C13.9216 11.3928 14.2278 11.1998 14.8 11.1998C16.0211 11.2008 17.0502 12.2961 17.0502 13.5902V17.5003Z",fill:"white"})}),s.jsx("defs",{children:s.jsx("clipPath",{id:"clip0_1217_198",children:s.jsx("rect",{width:"16",height:"16",fill:"white",transform:"translate(5 5)"})})})]}),instagram:()=>s.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("rect",{width:"26",height:"26",rx:"5",fill:"#0685FF"}),s.jsx("g",{clipPath:"url(#clip0_1217_183)",children:s.jsx("path",{d:"M10.3938 5.05251C9.5958 5.09014 9.05086 5.21751 8.57443 5.40464C8.08143 5.59682 7.66349 5.85464 7.24768 6.27195C6.83193 6.68926 6.5758 7.10745 6.38505 7.60132C6.20043 8.0787 6.0753 8.62414 6.04005 9.42257C6.0048 10.221 5.99699 10.4777 6.00093 12.5144C6.0048 14.5511 6.0138 14.8064 6.05249 15.6065C6.09061 16.4043 6.21749 16.9491 6.40468 17.4257C6.59718 17.9188 6.85468 18.3365 7.27218 18.7524C7.68961 19.1684 8.10749 19.4239 8.60249 19.6149C9.07949 19.7993 9.62505 19.925 10.4234 19.9599C11.2217 19.9949 11.4786 20.0031 13.5147 19.9991C15.5509 19.9953 15.8072 19.9862 16.6071 19.9483C17.4071 19.9103 17.949 19.7825 18.4257 19.5962C18.9188 19.4033 19.3369 19.1462 19.7525 18.7286C20.1681 18.311 20.4241 17.8925 20.6147 17.3984C20.7995 16.9214 20.925 16.3759 20.9597 15.5781C20.9947 14.7776 21.0029 14.522 20.9991 12.4856C20.9951 10.4492 20.9859 10.1939 20.948 9.39407C20.9101 8.59426 20.783 8.05114 20.5959 7.57426C20.4032 7.0812 20.1459 6.66376 19.7287 6.24751C19.3114 5.83126 18.8925 5.57551 18.3986 5.38532C17.9212 5.20064 17.3761 5.07482 16.5777 5.04032C15.7794 5.00582 15.5225 4.99689 13.4856 5.00089C11.4487 5.00476 11.1937 5.01351 10.3938 5.05251ZM10.4814 18.6107C9.75018 18.5789 9.35311 18.4574 9.08849 18.3557C8.73811 18.2207 8.48849 18.0575 8.2248 17.7963C7.96105 17.5352 7.79911 17.2847 7.6623 16.9351C7.55955 16.6704 7.4358 16.2738 7.40161 15.5426C7.36443 14.7523 7.35661 14.5149 7.35224 12.5126C7.34786 10.5103 7.35555 10.2732 7.39018 9.48257C7.42143 8.75195 7.54368 8.35445 7.64518 8.08995C7.78018 7.73914 7.9428 7.48995 8.20455 7.22645C8.4663 6.96289 8.71605 6.80057 9.06599 6.66376C9.33036 6.56057 9.72693 6.43789 10.4579 6.40307C11.2488 6.36557 11.4858 6.35807 13.4879 6.3537C15.4899 6.34932 15.7275 6.35682 16.5188 6.3917C17.2494 6.42345 17.6471 6.54451 17.9113 6.6467C18.2618 6.7817 18.5113 6.94382 18.7748 7.20607C19.0384 7.4682 19.2008 7.71707 19.3376 8.06776C19.4409 8.33132 19.5637 8.72776 19.5982 9.4592C19.6358 10.2501 19.6444 10.4873 19.6479 12.4892C19.6516 14.4911 19.6445 14.7288 19.6098 15.5192C19.5779 16.2504 19.4567 16.6476 19.3548 16.9126C19.2198 17.2628 19.0571 17.5126 18.7952 17.7759C18.5333 18.0394 18.2839 18.2016 17.9337 18.3384C17.6697 18.4415 17.2727 18.5645 16.5424 18.5993C15.7514 18.6365 15.5144 18.6443 13.5116 18.6487C11.5087 18.6531 11.2724 18.6449 10.4814 18.6107ZM16.5956 8.49151C16.5959 8.66953 16.649 8.84346 16.7481 8.99131C16.8473 9.13916 16.9881 9.25428 17.1527 9.32211C17.3173 9.38994 17.4983 9.40744 17.6728 9.37239C17.8473 9.33735 18.0076 9.25132 18.1332 9.12521C18.2588 8.9991 18.3443 8.83855 18.3787 8.66389C18.413 8.48922 18.3949 8.30828 18.3264 8.14395C18.258 7.97962 18.1423 7.83927 17.9941 7.74067C17.8459 7.64207 17.6718 7.58964 17.4937 7.59001C17.2551 7.59051 17.0264 7.68575 16.858 7.85481C16.6896 8.02386 16.5952 8.25288 16.5956 8.49151ZM9.64905 12.5075C9.65324 14.6345 11.3807 16.3548 13.5072 16.3508C15.6338 16.3468 17.3553 14.6195 17.3513 12.4925C17.3472 10.3655 15.6194 8.6447 13.4926 8.64889C11.3657 8.65307 9.64505 10.3808 9.64905 12.5075ZM11 12.5048C10.999 12.0104 11.1447 11.5267 11.4186 11.1151C11.6925 10.7034 12.0823 10.3822 12.5387 10.1921C12.9951 10.002 13.4977 9.95146 13.9828 10.047C14.468 10.1425 14.9139 10.3797 15.2642 10.7286C15.6146 11.0775 15.8535 11.5225 15.951 12.0073C16.0484 12.492 15.9999 12.9948 15.8116 13.452C15.6233 13.9092 15.3036 14.3003 14.8931 14.5758C14.4825 14.8513 13.9994 14.9989 13.505 14.9999C13.1767 15.0006 12.8514 14.9366 12.5478 14.8116C12.2443 14.6865 11.9683 14.5029 11.7357 14.2712C11.503 14.0395 11.3183 13.7643 11.1921 13.4612C11.0659 13.1581 11.0006 12.8331 11 12.5048Z",fill:"white"})}),s.jsx("defs",{children:s.jsx("clipPath",{id:"clip0_1217_183",children:s.jsx("rect",{width:"15",height:"15",fill:"white",transform:"translate(6 5)"})})})]}),youtube:()=>s.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("rect",{width:"26",height:"26",rx:"5",fill:"#0685FF"}),s.jsx("g",{clipPath:"url(#clip0_1217_195)",children:s.jsx("path",{d:"M20.6653 9.12395C20.5749 8.78346 20.3967 8.47271 20.1484 8.22279C19.9001 7.97287 19.5905 7.79258 19.2507 7.69995C18.0033 7.36328 13 7.36328 13 7.36328C13 7.36328 7.99667 7.36328 6.74867 7.69995C6.40894 7.79274 6.09953 7.9731 5.85139 8.223C5.60324 8.4729 5.42506 8.78357 5.33467 9.12395C5 10.3799 5 12.9999 5 12.9999C5 12.9999 5 15.6199 5.33467 16.8759C5.42506 17.2164 5.60332 17.5272 5.85159 17.7771C6.09987 18.027 6.40945 18.2073 6.74933 18.2999C7.99667 18.6366 13 18.6366 13 18.6366C13 18.6366 18.0033 18.6366 19.2513 18.2999C19.5912 18.2074 19.9009 18.0271 20.1491 17.7772C20.3974 17.5273 20.5757 17.2165 20.666 16.8759C21 15.6199 21 12.9999 21 12.9999C21 12.9999 21 10.3799 20.6653 9.12395ZM11.3633 15.3786V10.6213L15.5453 12.9999L11.3633 15.3786Z",fill:"white"})}),s.jsx("defs",{children:s.jsx("clipPath",{id:"clip0_1217_195",children:s.jsx("rect",{width:"16",height:"12",fill:"white",transform:"translate(5 7)"})})})]}),threads:()=>s.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("rect",{width:"26",height:"26",rx:"5",fill:"#0685FF"}),s.jsx("g",{clipPath:"url(#clip0_1217_189)",children:s.jsx("path",{d:"M13.6162 20H13.6119C11.3737 19.985 9.65312 19.2469 8.49687 17.8069C7.46875 16.525 6.9375 14.7413 6.92 12.5063V12.4956C6.93875 10.2587 7.46937 8.47688 8.49812 7.19438C9.65312 5.75312 11.375 5.015 13.6125 5H13.6212C15.3375 5.0125 16.7731 5.45312 17.8875 6.31125C18.9356 7.1175 19.6737 8.2675 20.0806 9.72813L18.8056 10.0837C18.1156 7.60875 16.3694 6.34375 13.6156 6.32437C11.7969 6.33812 10.4219 6.90937 9.52812 8.0225C8.69187 9.065 8.26 10.5712 8.24312 12.5C8.26 14.4288 8.69187 15.935 9.52875 16.9775C10.4225 18.0919 11.7981 18.6638 13.6162 18.6756C15.2556 18.6631 16.34 18.2812 17.2412 17.3975C18.2706 16.3894 18.2525 15.1519 17.9225 14.3988C17.7287 13.955 17.3769 13.5863 16.9012 13.305C16.7812 14.15 16.5125 14.8337 16.0987 15.35C15.545 16.0387 14.7612 16.415 13.7675 16.4688C13.0162 16.5094 12.2919 16.3325 11.7306 15.9681C11.0662 15.5375 10.6775 14.8806 10.6356 14.1156C10.595 13.3719 10.8906 12.6875 11.4669 12.1894C12.0169 11.7144 12.7912 11.435 13.7062 11.3825C14.3368 11.3431 14.9697 11.3729 15.5937 11.4713C15.515 11.0075 15.3594 10.6388 15.125 10.3731C14.8044 10.0069 14.3075 9.82125 13.6506 9.81687H13.6325C13.105 9.81687 12.3875 9.96188 11.9319 10.6419L10.8337 9.90438C11.4462 8.99563 12.4387 8.49437 13.6325 8.49437H13.66C15.6562 8.50688 16.8456 9.72875 16.9644 11.8619C17.0319 11.8906 17.0994 11.9206 17.165 11.9506C18.0962 12.3881 18.7775 13.0513 19.1362 13.8694C19.6344 15.0069 19.6806 16.8631 18.1687 18.3431C17.0125 19.4744 15.61 19.9856 13.6206 19.9994L13.6162 20ZM14.2431 12.6938C14.0919 12.6938 13.9387 12.6981 13.7812 12.7069C12.6337 12.7713 11.9187 13.2981 11.9587 14.0463C12.0006 14.8313 12.8662 15.1956 13.6987 15.1506C14.4637 15.11 15.46 14.8112 15.6275 12.8319C15.1722 12.7369 14.7082 12.6906 14.2431 12.6938Z",fill:"white"})}),s.jsx("defs",{children:s.jsx("clipPath",{id:"clip0_1217_189",children:s.jsx("rect",{width:"15",height:"15",fill:"white",transform:"translate(6 5)"})})})]})},uh="Nigeria's premium digital sanctuary for specialist healthcare. Bridging the gap between expert care and patient convenience.",fh=[{title:"COMPANY",links:[{label:"Home",href:"/"},{label:"About Us",href:"/about"},{label:"For Doctors",href:"/doctors"},{label:"For Businesses",href:"/businesses"}]},{title:"RESOURCES",links:[{label:"Blog",href:"/blog"},{label:"Careers",href:"/careers"},{label:"Contact",href:"/contact"}]}],hh=[{platform:"instagram",href:"https://instagram.com/medixdeck"},{platform:"twitter",href:"https://twitter.com/medixdeck"},{platform:"threads",href:"https://threads.net/@medixdeck"},{platform:"facebook",href:"https://facebook.com/medixdeck"},{platform:"youtube",href:"https://youtube.com/medixdeck"},{platform:"linkedin",href:"https://linkedin.com/company/medixdeck"}],ph=[{label:"Terms",href:"/terms"},{label:"Privacy",href:"/privacy"},{label:"Cookies",href:"/cookies"}],mh=(e,t)=>s.jsx("a",{href:e.href,target:e.isExternal?"_blank":void 0,rel:e.isExternal?"noopener noreferrer":void 0,style:{textDecoration:"none"},children:t});function _r({description:e=uh,logo:t,sections:n=fh,socialLinks:o=hh,copyright:i,bottomLinks:a=ph,newsletter:r,renderLink:l=mh,...c}){const u=new Date().getFullYear(),d=i??`© ${u} MedixDeck. MDCN & FMoH Certified Platform.`,[h,p]=S.useState(""),{resolvedTheme:m,setTheme:x}=Jr(),[g,v]=S.useState(!1);S.useEffect(()=>{v(!0)},[]);const b=y=>{y.preventDefault(),r!=null&&r.onSubmit&&h&&(r.onSubmit(h),p(""))};return s.jsx(f.Box,{as:"footer",bg:"bg",py:{base:12,md:16},...c,children:s.jsxs(f.Container,{maxWidth:"7xl",children:[s.jsxs(f.Grid,{templateColumns:{base:"1fr",lg:"1.5fr 1fr 1.5fr"},gap:{base:12,lg:16},mb:16,children:[s.jsxs(f.Box,{children:[s.jsx(f.Box,{mb:4,children:t??s.jsx(jt,{variant:"blue",height:28})}),s.jsx(f.Text,{fontSize:"sm",color:"text.muted",maxW:"320px",lineHeight:"1.6",fontFamily:"var(--font-body)",children:e}),s.jsx(f.HStack,{mt:6,gap:2,flexWrap:"wrap",children:o.map(y=>{const w=dh[y.platform];return s.jsx(f.Link,{href:y.href,target:"_blank",rel:"noopener noreferrer",display:"inline-flex",transition:"transform 0.2s ease, opacity 0.2s ease",_hover:{transform:"translateY(-2px)",opacity:.9},title:y.platform,"aria-label":y.platform,children:s.jsx(w,{})},y.platform)})})]}),s.jsx(f.Grid,{templateColumns:"1fr 1fr",gap:8,children:n.map(y=>s.jsxs(f.Box,{children:[s.jsx(f.Text,{fontWeight:"700",color:"text.heading",mb:4,fontSize:"xs",fontFamily:"var(--font-heading)",letterSpacing:"0.05em",textTransform:"uppercase",children:y.title}),s.jsx(f.VStack,{align:"flex-start",gap:3,children:y.links.map(w=>s.jsx(f.Box,{w:"full",children:l(w,s.jsx(f.Box,{as:"span",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",_hover:{color:"blue.500"},transition:"color 0.2s ease",cursor:"pointer",display:"block",children:w.label}))},w.label))})]},y.title))}),!(r!=null&&r.hide)&&s.jsx(f.Box,{children:s.jsxs(f.Box,{p:6,borderRadius:"2xl",border:"1px solid",borderColor:"border",bg:"bg",_dark:{bg:"rgba(255,255,255,0.02)"},children:[s.jsx(f.Text,{fontWeight:"700",color:"text.heading",mb:2,fontSize:"md",fontFamily:"var(--font-heading)",children:(r==null?void 0:r.title)??"Newsletter"}),s.jsx(f.Text,{fontSize:"sm",color:"text.muted",mb:5,fontFamily:"var(--font-body)",lineHeight:"1.5",children:(r==null?void 0:r.description)??"Get monthly health tips from our verified specialists."}),s.jsxs(f.Box,{as:"form",onSubmit:b,position:"relative",display:"flex",children:[s.jsx(f.Box,{as:"input",type:"email",value:h,onChange:y=>p(y.target.value),placeholder:(r==null?void 0:r.placeholder)??"email@address.com",w:"full",h:"44px",pl:4,pr:"50px",borderRadius:"lg",border:"1px solid",borderColor:"border",bg:"bg.surface",fontSize:"sm",fontFamily:"var(--font-body)",color:"text.body",_placeholder:{color:"text.muted"},_focus:{outline:"none",borderColor:"blue.500",boxShadow:"0 0 0 1px var(--chakra-colors-blue-500)"},transition:"all 0.2s",required:!0}),s.jsx(f.Button,{type:"submit",position:"absolute",right:"4px",top:"4px",bottom:"4px",w:"36px",minW:"36px",h:"36px",p:0,bg:"blue.500",color:"white",borderRadius:"md",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",_hover:{bg:"blue.600"},transition:"background 0.2s ease","aria-label":"Subscribe",border:"none",children:(r==null?void 0:r.buttonIcon)??s.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),s.jsx("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]})]})})]}),s.jsx(f.Box,{borderTop:"1px solid",borderColor:"border",pt:6,children:s.jsxs(f.Flex,{justify:"space-between",align:{base:"center",md:"flex-start"},flexDir:{base:"column-reverse",md:"row"},gap:4,children:[s.jsx(f.Text,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",textAlign:{base:"center",md:"left"},children:d}),s.jsxs(f.HStack,{gap:6,flexWrap:"wrap",justify:"center",alignItems:"center",children:[a.map(y=>s.jsx(f.Box,{children:l(y,s.jsx(f.Box,{as:"span",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",_hover:{color:"text.heading"},transition:"color 0.2s ease",cursor:"pointer",children:y.label}))},y.label)),g&&s.jsx(f.Box,{as:"button",onClick:()=>x(m==="dark"?"light":"dark"),display:"inline-flex",alignItems:"center",justifyContent:"center",w:"28px",h:"28px",borderRadius:"full",bg:"bg.surface",border:"1px solid",borderColor:"border",color:"text.muted",_hover:{color:"text.heading",bg:"bg"},cursor:"pointer",transition:"all 0.2s","aria-label":"Toggle theme",ml:2,children:m==="dark"?s.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("circle",{cx:"12",cy:"12",r:"5"}),s.jsx("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),s.jsx("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),s.jsx("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),s.jsx("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),s.jsx("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),s.jsx("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),s.jsx("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),s.jsx("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]}):s.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})})})]})]})})]})})}_r.displayName="MedixFooter";const xh=s.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:s.jsx("path",{d:"m9 18 6-6-6-6"})}),gh=(e,t)=>e.href?s.jsx("a",{href:e.href,style:{textDecoration:"none"},children:t}):s.jsx(s.Fragment,{children:t});function yh({items:e,separator:t=xh,renderLink:n=gh,...o}){return s.jsx(f.Box,{as:"nav","aria-label":"Breadcrumb",display:"flex",alignItems:"center",gap:"1.5",...o,children:e.map((i,a)=>{const r=a===e.length-1;return s.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"1.5",children:[n(i,s.jsx(f.Box,{as:"span",fontSize:"sm",fontFamily:"var(--font-body)",fontWeight:r?"medium":"normal",color:r?"text.heading":"text.muted",_hover:r?void 0:{color:"blue.500"},cursor:!r&&i.href?"pointer":"default",transition:"color 0.15s",children:i.label})),!r&&s.jsx(f.Box,{color:"text.muted",display:"flex",alignItems:"center",children:t})]},a)})})}const bh={sm:{px:"3",py:"1.5",fontSize:"sm"},md:{px:"4",py:"2",fontSize:"md"},lg:{px:"5",py:"2.5",fontSize:"lg"}};function vh({tabs:e,defaultActiveId:t,activeId:n,onChange:o,variant:i="line",size:a="md",renderContent:r=!0,...l}){var x;const[c,u]=S.useState(t??((x=e[0])==null?void 0:x.id)),d=n??c,h=g=>{u(g),o==null||o(g)},p=e.find(g=>g.id===d),m=bh[a];return s.jsxs(f.Box,{...l,children:[s.jsx(f.Box,{role:"tablist",display:"flex",gap:i==="pill"?"1":"0",borderBottom:i==="line"?"1px solid":"none",borderColor:"border",bg:i==="pill"?"bg.subtle":"transparent",p:i==="pill"?"1":"0",borderRadius:i==="pill"?"md":"none",overflowX:"auto",flexWrap:"nowrap",style:{scrollbarWidth:"none"},children:e.map(g=>{const v=g.id===d;return s.jsxs(f.Box,{role:"tab","aria-selected":v,"aria-disabled":g.disabled,tabIndex:g.disabled?-1:0,onClick:()=>!g.disabled&&h(g.id),onKeyDown:b=>{(b.key==="Enter"||b.key===" ")&&!g.disabled&&h(g.id)},display:"flex",alignItems:"center",gap:"2",px:m.px,py:m.py,fontFamily:"var(--font-body)",fontWeight:v?"semibold":"medium",fontSize:m.fontSize,color:g.disabled?"text.muted":v?"blue.500":"text.body",cursor:g.disabled?"not-allowed":"pointer",opacity:g.disabled?.5:1,transition:"all 0.15s",whiteSpace:"nowrap",flexShrink:0,bg:i==="pill"&&v?"bg":"transparent",borderRadius:i==="pill"?"md":"none",boxShadow:i==="pill"&&v?"sm":"none",borderBottom:i==="line"?"2px solid":"none",borderColor:i==="line"?v?"blue.500":"transparent":void 0,mb:i==="line"?"-1px":"0",_hover:g.disabled?void 0:i==="line"?{color:"blue.500"}:{bg:"bg"},_focusVisible:{outline:"2px solid",outlineColor:"blue.500",outlineOffset:"2px",borderRadius:"sm"},children:[g.label,g.badge!==void 0&&s.jsx(f.Box,{as:"span",display:"inline-flex",alignItems:"center",justifyContent:"center",minW:"5",h:"5",px:"1",borderRadius:"full",fontSize:"2xs",fontWeight:"bold",bg:v?"blue.100":"bg.subtle",color:v?"blue.700":"text.muted",children:g.badge})]},g.id)})}),r&&(p==null?void 0:p.content)&&s.jsx(f.Box,{role:"tabpanel",mt:"4",children:p.content})]})}function wh(e,t,n){if(n*2+5>=t)return Array.from({length:t},(c,u)=>u+1);const i=Math.max(e-n,1),a=Math.min(e+n,t),r=i>2,l=a<t-2;if(!r&&l){const c=3+2*n;return[...Array.from({length:c},(u,d)=>d+1),"...",t]}if(r&&!l){const c=3+2*n;return[1,"...",...Array.from({length:c},(u,d)=>t-c+1+d)]}return[1,"...",...Array.from({length:a-i+1},(c,u)=>i+u),"...",t]}function Sh({total:e,pageSize:t=10,currentPage:n=1,onChange:o,siblingCount:i=1,showEdges:a=!0,compact:r=!1,...l}){const c=Math.ceil(e/t);if(c<=1)return null;const u=wh(n,c,i),d={display:"inline-flex",alignItems:"center",justifyContent:"center",w:"9",h:"9",borderRadius:"md",fontSize:"sm",fontFamily:"var(--font-body)",fontWeight:"medium",cursor:"pointer",transition:"all 0.15s",border:"1px solid",userSelect:"none"},h=({children:p,disabled:m,onClick:x,label:g})=>s.jsx(f.Box,{as:"button",...d,borderColor:"border",bg:"bg.surface",color:m?"text.muted":"text.body",opacity:m?.4:1,pointerEvents:m?"none":void 0,onClick:x,"aria-label":g,_hover:{borderColor:"blue.400",color:"blue.500"},children:p});return s.jsxs(f.Box,{as:"nav",role:"navigation","aria-label":"Pagination",display:"flex",alignItems:"center",gap:"1",flexWrap:"wrap",...l,children:[a&&s.jsx(h,{disabled:n===1,onClick:()=>o==null?void 0:o(1),label:"First page",children:"«"}),s.jsx(h,{disabled:n===1,onClick:()=>o==null?void 0:o(n-1),label:"Previous page",children:"‹"}),!r&&u.map((p,m)=>p==="..."?s.jsx(f.Box,{...d,border:"none",bg:"transparent",color:"text.muted",cursor:"default",pointerEvents:"none",children:"…"},`dots-${m}`):s.jsx(f.Box,{as:"button",...d,borderColor:n===p?"blue.500":"border",bg:n===p?"blue.500":"bg.surface",color:n===p?"white":"text.body",onClick:()=>o==null?void 0:o(p),"aria-label":`Page ${p}`,"aria-current":n===p?"page":void 0,_hover:n!==p?{borderColor:"blue.400",color:"blue.500"}:void 0,children:p},p)),r&&s.jsxs(f.Box,{px:"3",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",whiteSpace:"nowrap",children:[n," / ",c]}),s.jsx(h,{disabled:n===c,onClick:()=>o==null?void 0:o(n+1),label:"Next page",children:"›"}),a&&s.jsx(h,{disabled:n===c,onClick:()=>o==null?void 0:o(c),label:"Last page",children:"»"})]})}const Ti=s.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:s.jsx("path",{d:"M2 7L5.5 10.5L12 4",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})});function Ch({steps:e,currentStep:t,variant:n="default",orientation:o="horizontal",colorScheme:i="blue",...a}){const r=i==="blue"?"#0685FF":"#7700CC",l=i==="blue"?"rgba(6,133,255,0.10)":"rgba(119,0,204,0.10)";return o==="vertical"?s.jsx(f.Box,{display:"flex",flexDirection:"column",alignItems:"flex-start",...a,children:e.map((u,d)=>{const h=d+1<t,p=d+1===t,m=d===e.length-1,x=h||p?r:"var(--chakra-colors-border, #E2E8F0)";return s.jsxs(f.Box,{display:"flex",flexDirection:"row",alignItems:"flex-start",gap:"3",children:[s.jsxs(f.Box,{display:"flex",flexDirection:"column",alignItems:"center",children:[s.jsx(f.Box,{w:"8",h:"8",borderRadius:"full",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",bg:h||p?r:"bg.subtle",border:"2px solid",borderColor:x,color:"white",fontSize:"sm",fontWeight:"bold",fontFamily:"var(--font-body)",transition:"all 0.25s",children:h?Ti:u.icon??d+1}),!m&&s.jsx(f.Box,{w:"2px",flex:"1",minH:"8",bg:h?r:"border",my:"1",transition:"background 0.25s"})]}),n!=="compact"&&s.jsxs(f.Box,{pt:"1",pb:m?"0":"8",children:[s.jsx(f.Box,{fontSize:"sm",fontWeight:p?"semibold":"medium",color:h||p?r:"text.muted",fontFamily:"var(--font-body)",transition:"color 0.25s",children:u.title}),u.description&&s.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:u.description})]})]},u.id)})}):s.jsx(f.Box,{display:"inline-flex",alignItems:"center",gap:"0",role:"list","aria-label":"Progress steps",...a,children:e.map((u,d)=>{const h=d+1<t,p=d+1===t,m=d+1>t,x=d===e.length-1,g=m?"bg.subtle":r,v=h?Ti:u.icon?u.icon:s.jsx(f.Box,{as:"span",fontSize:"13px",fontWeight:"700",fontFamily:"var(--font-body)",color:m?"text.muted":"white",lineHeight:"1",children:d+1}),b=!m&&n!=="compact",y=m?"text.muted":r;return s.jsxs(S.Fragment,{children:[s.jsx(f.Box,{role:"listitem","aria-current":p?"step":void 0,display:"inline-flex",alignItems:"center",gap:"0",children:s.jsxs(f.Box,{display:"inline-flex",alignItems:"center",gap:"2",px:b?"2":"0",py:b?"1.5":"0",bg:b?l:"transparent",borderRadius:"full",transition:"all 0.25s ease",children:[s.jsx(f.Box,{w:"7",h:"7",borderRadius:"full",flexShrink:0,display:"inline-flex",alignItems:"center",justifyContent:"center",bg:g,border:m?"1.5px solid":"none",borderColor:"var(--chakra-colors-border, #E2E8F0)",transition:"all 0.25s ease",flexDirection:"row",children:v}),n!=="compact"&&s.jsx(f.Box,{as:"span",fontSize:"sm",fontWeight:p||h?"semibold":"medium",fontFamily:"var(--font-body)",color:y,whiteSpace:"nowrap",transition:"color 0.25s",children:u.title})]})}),!x&&s.jsx(f.Box,{display:"inline-flex",alignItems:"center",px:"1",flexShrink:0,children:s.jsx(f.Box,{h:"1.5px",w:"10",bg:h?r:"var(--chakra-colors-border, #E2E8F0)",borderRadius:"full",transition:"background 0.25s ease"})})]},u.id)})})}const jh={info:{bg:"rgba(6, 133, 255, 0.08)",border:"rgba(6, 133, 255, 0.3)",color:"#0685FF",icon:"ℹ"},success:{bg:"rgba(27, 122, 56, 0.08)",border:"rgba(27, 122, 56, 0.3)",color:"#1B7A38",icon:"✓"},warning:{bg:"rgba(217, 119, 6, 0.08)",border:"rgba(217, 119, 6, 0.3)",color:"#D97706",icon:"⚠"},error:{bg:"rgba(220, 38, 38, 0.08)",border:"rgba(220, 38, 38, 0.3)",color:"#DC2626",icon:"✕"}},Nr=S.forwardRef(({status:e="info",variant:t="subtle",title:n,description:o,icon:i,onClose:a,closable:r=!1,children:l,...c},u)=>{const d=jh[e],h=t==="solid"?d.color:d.bg,p=t==="solid"?"white":"inherit",m=t==="left-accent"?`4px solid ${d.color}`:void 0,x=t==="subtle"?`1px solid ${d.border}`:void 0;return s.jsxs(f.Box,{ref:u,role:"alert",display:"flex",alignItems:"flex-start",gap:"3",p:"4",borderRadius:"md",bg:h,border:x,borderLeft:m,color:p,...c,children:[s.jsx(f.Box,{flexShrink:0,w:"5",h:"5",borderRadius:"full",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"xs",fontWeight:"bold",bg:t==="solid"?"rgba(255,255,255,0.2)":d.color,color:"white",mt:"0.5",children:i??d.icon}),s.jsxs(f.Box,{flex:"1",children:[n&&s.jsx(f.Box,{fontWeight:"semibold",fontSize:"sm",fontFamily:"var(--font-body)",color:t==="solid"?"white":d.color,children:n}),o&&s.jsx(f.Box,{mt:n?"0.5":"0",fontSize:"sm",fontFamily:"var(--font-body)",color:t==="solid"?"rgba(255,255,255,0.85)":"text.body",lineHeight:"1.5",children:o}),l]}),r&&s.jsx(f.Box,{as:"button",flexShrink:0,w:"6",h:"6",border:"none",bg:"transparent",cursor:"pointer",color:t==="solid"?"rgba(255,255,255,0.7)":"text.muted",fontSize:"lg",lineHeight:"1",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"sm",_hover:{color:t==="solid"?"white":"text.heading"},onClick:a,"aria-label":"Dismiss alert",children:"×"})]})});Nr.displayName="MedixAlert";const kh=`
|
|
186
186
|
@keyframes medix-shimmer {
|
|
187
187
|
0% { transform: translateX(-100%); }
|
|
188
188
|
100% { transform: translateX(100%); }
|
|
189
189
|
}
|
|
190
|
-
`;if(typeof document<"u"){const e="medix-skeleton-keyframes";if(!document.getElementById(e)){const t=document.createElement("style");t.id=e,t.textContent=
|
|
190
|
+
`;if(typeof document<"u"){const e="medix-skeleton-keyframes";if(!document.getElementById(e)){const t=document.createElement("style");t.id=e,t.textContent=kh,document.head.appendChild(t)}}const ve=S.forwardRef(({isLoaded:e=!1,children:t,...n},o)=>e?s.jsx(s.Fragment,{children:t}):s.jsx(f.Box,{ref:o,position:"relative",overflow:"hidden",borderRadius:"md",bg:"#E2E8F0",_dark:{bg:"rgba(255,255,255,0.08)"},_before:{content:'""',position:"absolute",inset:"0",backgroundImage:"linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.65) 50%, transparent 100%)",animation:"medix-shimmer 1.6s ease-in-out infinite",transform:"translateX(-100%)"},...n}));ve.displayName="MedixSkeleton";function $r({lines:e=3,spacing:t="3",lastLineWidth:n="60%",...o}){return s.jsx(f.Box,{display:"flex",flexDirection:"column",gap:t,...o,children:Array.from({length:e}).map((i,a)=>s.jsx(ve,{h:"3",w:a===e-1?n:"100%",borderRadius:"full"},a))})}function Fh({...e}){return s.jsxs(f.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",...e,children:[s.jsx(ve,{h:"48",borderRadius:"md",mb:"4"}),s.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"3",mb:"3",children:[s.jsx(ve,{w:"10",h:"10",borderRadius:"full"}),s.jsxs(f.Box,{flex:"1",children:[s.jsx(ve,{h:"3",w:"60%",borderRadius:"full",mb:"2"}),s.jsx(ve,{h:"2.5",w:"40%",borderRadius:"full"})]})]}),s.jsx($r,{lines:2})]})}const Th={blue:"#0685FF",purple:"#7700CC",green:"#1B7A38",amber:"#D97706",red:"#DC2626"},Bh={xs:"2px",sm:"4px",md:"8px",lg:"12px"};if(typeof document<"u"){const e="medix-progress-keyframes";if(!document.getElementById(e)){const t=document.createElement("style");t.id=e,t.textContent=`
|
|
191
191
|
@keyframes medix-indeterminate {
|
|
192
192
|
0% { left: -40%; }
|
|
193
193
|
100% { left: 100%; }
|
|
194
194
|
}
|
|
195
|
-
`,document.head.appendChild(t)}}const $r=w.forwardRef(({value:e,colorScheme:t="blue",size:n="md",showLabel:o=!1,animated:i=!0,isIndeterminate:r=!1,...s},l)=>{const c=Math.min(100,Math.max(0,e)),u=yh[t],d=bh[n];return a.jsxs(f.Box,{ref:l,w:"100%",...s,children:[o&&a.jsxs(f.Box,{display:"flex",justifyContent:"space-between",mb:"1",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:[a.jsx("span",{children:"Progress"}),a.jsxs("span",{children:[c,"%"]})]}),a.jsx(f.Box,{w:"100%",h:d,bg:"bg.subtle",borderRadius:"full",overflow:"hidden",position:"relative",children:r?a.jsx(f.Box,{position:"absolute",h:"100%",w:"40%",bg:u,borderRadius:"full",style:{animation:"medix-indeterminate 1.5s linear infinite"}}):a.jsx(f.Box,{h:"100%",w:`${c}%`,bg:u,borderRadius:"full",transition:i?"width 0.6s cubic-bezier(0.4, 0, 0.2, 1)":"none",position:"relative"})})]})});$r.displayName="MedixProgress";const vh={xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"xl",full:"full"};function wh({isOpen:e,onClose:t,title:n,description:o,size:i="md",closeOnOverlayClick:r=!0,footer:s,children:l}){return a.jsxs(f.DialogRoot,{open:e,onOpenChange:c=>{c.open||t()},closeOnInteractOutside:r,size:vh[i],children:[a.jsx(f.DialogBackdrop,{bg:"rgba(10, 18, 32, 0.7)",backdropFilter:"blur(4px)"}),a.jsx(f.DialogPositioner,{children:a.jsxs(f.DialogContent,{bg:"bg",border:"1px solid",borderColor:"border",borderRadius:"modal",boxShadow:"xl",children:[(n||o)&&a.jsxs(f.DialogHeader,{borderBottom:"1px solid",borderColor:"border",px:"6",py:"4",children:[n&&a.jsx(f.DialogTitle,{fontFamily:"var(--font-heading)",fontSize:"xl",fontWeight:"semibold",color:"text.heading",children:n}),o&&a.jsx(f.DialogDescription,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:o}),a.jsx(f.DialogCloseTrigger,{position:"absolute",top:"4",right:"4",w:"8",h:"8",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"md",color:"text.muted",_hover:{bg:"bg.subtle",color:"text.heading"},transition:"all 0.15s"})]}),a.jsx(f.DialogBody,{px:"6",py:"5",children:l}),s&&a.jsx(f.DialogFooter,{borderTop:"1px solid",borderColor:"border",px:"6",py:"4",display:"flex",justifyContent:"flex-end",gap:"3",children:s})]})})]})}function Sh({label:e,children:t,placement:n="top",...o}){return a.jsxs(f.Tooltip.Root,{positioning:{placement:n},...o,children:[a.jsx(f.Tooltip.Trigger,{asChild:!0,children:a.jsx("span",{style:{display:"inline-flex"},children:t})}),a.jsx(f.Tooltip.Positioner,{children:a.jsx(f.Tooltip.Content,{bg:"gray.900",color:"white",borderRadius:"md",px:"3",py:"1.5",fontSize:"xs",fontFamily:"var(--font-body)",boxShadow:"lg",children:e})})]})}function jh({icon:e,title:t,description:n,actionLabel:o,onAction:i,secondaryLabel:r,onSecondaryAction:s,...l}){return a.jsxs(f.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",py:"16",px:"8",gap:"4",...l,children:[e&&a.jsx(f.Box,{w:"16",h:"16",borderRadius:"full",bg:"bg.subtle",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"3xl",color:"text.muted",mb:"2",children:e}),a.jsxs(f.Box,{children:[a.jsx(f.Box,{fontSize:"xl",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",mb:"2",children:t}),n&&a.jsx(f.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",maxW:"360px",lineHeight:"loose",children:n})]}),(o||r)&&a.jsxs(f.Box,{display:"flex",gap:"3",mt:"2",children:[o&&a.jsx(we,{variant:"solid",colorScheme:"blue",onClick:i,children:o}),r&&a.jsx(we,{variant:"ghost",colorScheme:"blue",onClick:s,children:r})]})]})}function Ch({isOpen:e,onClose:t,title:n,placement:o="right",size:i="md",closeOnOverlayClick:r=!0,footer:s,children:l}){return a.jsxs(f.DrawerRoot,{open:e,onOpenChange:c=>{c.open||t()},placement:o,size:i,closeOnInteractOutside:r,children:[a.jsx(f.DrawerBackdrop,{bg:"rgba(10, 18, 32, 0.6)",backdropFilter:"blur(2px)"}),a.jsx(f.DrawerPositioner,{children:a.jsxs(f.DrawerContent,{bg:"bg",borderColor:"border",boxShadow:"2xl",children:[n&&a.jsxs(f.DrawerHeader,{borderBottom:"1px solid",borderColor:"border",px:"6",py:"4",children:[a.jsx(f.DrawerTitle,{fontFamily:"var(--font-heading)",fontSize:"xl",fontWeight:"semibold",color:"text.heading",children:n}),a.jsx(f.DrawerCloseTrigger,{position:"absolute",top:"4",right:"4",w:"8",h:"8",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"md",color:"text.muted",_hover:{bg:"bg.subtle",color:"text.heading"},transition:"all 0.15s"})]}),a.jsx(f.DrawerBody,{px:"6",py:"5",children:l}),s&&a.jsx(f.DrawerFooter,{borderTop:"1px solid",borderColor:"border",px:"6",py:"4",display:"flex",justifyContent:"flex-end",gap:"3",children:s})]})})]})}let Re=[],ht=[];const Ur=()=>ht.forEach(e=>e([...Re])),Fh=()=>Math.random().toString(36).substring(2,9),re=e=>{const t=Fh(),n={id:t,...e};return Re=[...Re,n],Ur(),e.duration!==1/0&&e.duration!==0&&setTimeout(()=>{eo(t)},e.duration||4e3),t},eo=e=>{Re=Re.filter(t=>t.id!==e),Ur()};re.success=(e,t)=>re({title:e,type:"success",...t});re.error=(e,t)=>re({title:e,type:"error",...t});re.info=(e,t)=>re({title:e,type:"info",...t});re.warning=(e,t)=>re({title:e,type:"warning",...t});const Th={success:a.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#10B981",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),a.jsx("polyline",{points:"22 4 12 14.01 9 11.01"})]}),error:a.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#EF4444",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("circle",{cx:"12",cy:"12",r:"10"}),a.jsx("line",{x1:"15",y1:"9",x2:"9",y2:"15"}),a.jsx("line",{x1:"9",y1:"9",x2:"15",y2:"15"})]}),warning:a.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#F59E0B",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("path",{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),a.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),a.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),info:a.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#3B82F6",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("circle",{cx:"12",cy:"12",r:"10"}),a.jsx("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),a.jsx("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]})};function kh(){const[e,t]=w.useState([]);return w.useEffect(()=>{t([...Re]);const n=o=>t(o);return ht.push(n),()=>{ht=ht.filter(o=>o!==n)}},[]),a.jsx(f.Box,{position:"fixed",bottom:"4",right:"4",zIndex:9999,display:"flex",flexDirection:"column",gap:"3",pointerEvents:"none",children:a.jsx(bn,{children:e.map(n=>a.jsx(ge.div,{initial:{opacity:0,y:20,scale:.9},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.9},transition:{duration:.2},style:{pointerEvents:"auto"},children:a.jsxs(f.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",boxShadow:"lg",borderRadius:"lg",p:"4",display:"flex",minW:"300px",maxW:"400px",gap:"3",alignItems:"flex-start",children:[a.jsx(f.Box,{mt:"0.5",children:Th[n.type||"info"]}),a.jsxs(f.Box,{flex:"1",children:[a.jsx(f.Text,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-body)",children:n.title}),n.description&&a.jsx(f.Text,{fontSize:"sm",color:"text.muted",mt:"1",fontFamily:"var(--font-body)",children:n.description})]}),a.jsx(f.Box,{as:"button",onClick:()=>eo(n.id),color:"text.muted",ml:"2",_hover:{color:"text.heading"},cursor:"pointer",bg:"transparent",border:"none",children:a.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),a.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]})},n.id))})})}function Bh({items:e,allowMultiple:t=!1,defaultOpenIds:n=[],...o}){const[i,r]=w.useState(new Set(n)),s=l=>{r(c=>{const u=new Set(c);return u.has(l)?u.delete(l):(t||u.clear(),u.add(l)),u})};return a.jsx(f.Box,{display:"flex",flexDirection:"column",gap:"4",...o,children:e.map(l=>{const c=i.has(l.id);return a.jsxs(f.Box,{bg:"bg.primary",border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",transition:"border-color 0.2s",_hover:{borderColor:c?"blue.500":"border"},children:[a.jsxs(f.Box,{as:"button",w:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"4",px:"6",py:"5",bg:"transparent",border:"none",cursor:"pointer",textAlign:"left",onClick:()=>s(l.id),"aria-expanded":c,children:[a.jsx(f.Box,{fontSize:"lg",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",flex:"1",lineHeight:"short",children:l.question}),a.jsx(f.Box,{flexShrink:0,w:"10",h:"10",borderRadius:"full",display:"flex",alignItems:"center",justifyContent:"center",transition:"background 0.2s, border-color 0.2s, color 0.2s","aria-hidden":"true",style:{border:c?"none":"1.5px solid var(--medix-form-text)",background:c?"#0685FF":"transparent",color:c?"#ffffff":"inherit",flexShrink:0},children:c?a.jsx("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",children:a.jsx("rect",{x:"3",y:"8.25",width:"12",height:"1.5",rx:"0.75",fill:" var(--medix-form-text)"})}):a.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",children:[a.jsx("rect",{x:"3",y:"8.25",width:"12",height:"1.5",rx:"0.75",fill:" var(--medix-form-text)"}),a.jsx("rect",{x:"8.25",y:"3",width:"1.5",height:"12",rx:"0.75",fill:" var(--medix-form-text)"})]})})]}),a.jsx(f.Box,{overflow:"hidden",maxH:c?"800px":"0px",opacity:c?1:0,transition:"max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease",children:a.jsx(f.Box,{px:"6",pb:"6",pt:"0",fontSize:"md",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",children:l.answer})})]},l.id)})})}function Ah({quote:e,authorName:t,authorTitle:n,authorAvatar:o,rating:i,...r}){return a.jsxs(f.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",boxShadow:"card-light",_dark:{boxShadow:"card-dark"},...r,children:[i!==void 0&&a.jsx(f.Box,{display:"flex",gap:"0.5",children:Array.from({length:5}).map((s,l)=>a.jsx(f.Box,{as:"span",fontSize:"sm",color:l<i?"#F59E0B":"text.muted",children:"★"},l))}),a.jsxs(f.Box,{as:"blockquote",m:"0",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",fontStyle:"italic",children:['"',e,'"']}),a.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"3",mt:"auto",children:[o?a.jsx("img",{src:o,alt:t,style:{width:36,height:36,borderRadius:"50%",objectFit:"cover"}}):a.jsx(f.Box,{w:"9",h:"9",borderRadius:"full",bg:"blue.500",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"sm",fontWeight:"semibold",color:"white",flexShrink:0,children:t.charAt(0).toUpperCase()}),a.jsxs(f.Box,{children:[a.jsx(f.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-body)",children:t}),n&&a.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:n})]})]})]})}function Dh(e){if(!e)return null;try{const t=new Date(e);return isNaN(t.getTime())?null:{day:String(t.getUTCDate()),weekday:t.toLocaleDateString("en-US",{weekday:"short",timeZone:"UTC"}).toUpperCase()}}catch{return null}}function Eh({title:e,excerpt:t,category:n,date:o,coverImage:i,href:r,onClick:s,...l}){const c=!!(r||s),u=Dh(o),d={display:"block",textDecoration:"none",background:"transparent",border:"none",padding:0,cursor:c?"pointer":"default",width:"100%",textAlign:"left"},h=a.jsxs(f.Box,{bg:"bg.primary",borderRadius:"card",overflow:"hidden",transition:"transform 0.22s ease, box-shadow 0.22s ease",_dark:{bg:"bg.primary"},_hover:c?{transform:"translateY(-4px)"}:void 0,...l,children:[a.jsxs(f.Box,{position:"relative",overflow:"hidden",children:[i?a.jsx("img",{src:i,alt:e,style:{width:"100%",height:220,objectFit:"cover",display:"block"}}):a.jsx(f.Box,{borderRadius:"card",h:"220px",style:{background:"linear-gradient(135deg, #0685FF 0%, #7700CC 100%)"}}),u&&a.jsxs(f.Box,{position:"absolute",bottom:"3",right:"3",bg:"white",borderRadius:"10px",px:"3",py:"2",display:"flex",flexDirection:"column",alignItems:"center",minW:"44px",boxShadow:"0 2px 8px rgba(0,0,0,0.16)",children:[a.jsx(f.Box,{style:{fontSize:22,fontWeight:700,color:"#0685FF",lineHeight:1,fontFamily:"var(--font-heading)"},children:u.day}),a.jsx(f.Box,{style:{fontSize:10,fontWeight:600,color:"#6B7280",letterSpacing:"0.08em",marginTop:2,fontFamily:"var(--font-body)"},children:u.weekday})]})]}),a.jsxs(f.Box,{px:"4",pt:"3",pb:"4",children:[n&&a.jsx(f.Box,{display:"inline-flex",alignItems:"center",px:"3",py:"1",mb:"3",borderRadius:"full",bg:"blue.500",color:"white",fontSize:"xs",fontWeight:"medium",fontFamily:"var(--font-body)",letterSpacing:"wide",children:n}),a.jsx(f.Box,{fontSize:"md",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"snug",mb:t?"2":"0",children:e}),t&&a.jsx(f.Box,{fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"relaxed",style:{display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:t})]})]});return r?a.jsx("a",{href:r,style:d,onClick:s,children:h}):s?a.jsx("button",{type:"button",style:d,onClick:s,children:h}):h}function Ph({columns:e,data:t,rowKey:n="id",isLoading:o=!1,emptyMessage:i="No data available",sortable:r=!1,sortKey:s,sortDirection:l="asc",onSort:c,striped:u=!1,onRowClick:d,caption:h,style:p,className:m}){const[x,g]=w.useState(s),[b,y]=w.useState(l),v=s??x,S=s?l:b,C=T=>{const k=v===T&&S==="asc"?"desc":"asc";g(T),y(k),c==null||c(T,k)},j=w.useMemo(()=>!v||c?t:[...t].sort((T,k)=>{const E=T[v],P=k[v],U=String(E??""),G=String(P??""),K=U.localeCompare(G,void 0,{numeric:!0,sensitivity:"base"});return S==="asc"?K:-K}),[t,v,S,c]),F=({colKey:T})=>v!==T?a.jsx("span",{style:{opacity:.3,marginLeft:4},children:"↕"}):a.jsx("span",{style:{marginLeft:4},children:S==="asc"?"↑":"↓"}),D={padding:"12px 16px",textAlign:"left",fontSize:"12px",fontWeight:600,letterSpacing:"0.05em",textTransform:"uppercase",color:"var(--chakra-colors-text-muted, #6B7280)",fontFamily:"var(--font-body)",borderBottom:"1px solid var(--chakra-colors-border, #E2E8F0)",whiteSpace:"nowrap",userSelect:"none"},A={padding:"14px 16px",fontSize:"14px",color:"var(--chakra-colors-text-body, #374151)",fontFamily:"var(--font-body)",verticalAlign:"middle"};return a.jsx(f.Box,{border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",bg:"bg.surface",boxShadow:"card-light",_dark:{boxShadow:"card-dark"},style:p,className:m,children:a.jsx(f.Box,{overflowX:"auto",children:a.jsxs("table",{style:{width:"100%",borderCollapse:"collapse"},"aria-label":h,children:[h&&a.jsx("caption",{style:{display:"none"},children:h}),a.jsx("thead",{children:a.jsx("tr",{style:{background:"var(--chakra-colors-bg-subtle, #F6F6F6)"},children:e.map(T=>a.jsx("th",{style:{...D,textAlign:T.align??"left",minWidth:T.minWidth,cursor:T.sortable||r?"pointer":"default"},onClick:()=>T.sortable||r?C(T.key):void 0,"aria-sort":v===T.key?S==="asc"?"ascending":"descending":void 0,children:a.jsxs("span",{style:{display:"inline-flex",alignItems:"center"},children:[T.label,(T.sortable||r)&&a.jsx(F,{colKey:T.key})]})},T.key))})}),a.jsx("tbody",{children:o?Array.from({length:5}).map((T,k)=>a.jsx("tr",{children:e.map(E=>a.jsx("td",{style:A,children:a.jsx(f.Box,{h:"4",bg:"bg.subtle",borderRadius:"full",w:`${60+Math.random()*30}%`,style:{animation:"medix-shimmer 1.5s infinite"}})},E.key))},k)):j.length===0?a.jsx("tr",{children:a.jsx("td",{colSpan:e.length,style:{...A,textAlign:"center",padding:"48px 16px"},children:a.jsx(f.Text,{color:"text.muted",fontFamily:"var(--font-body)",children:i})})}):j.map((T,k)=>{const E=String(T[n]??k);return a.jsx("tr",{onClick:()=>d==null?void 0:d(T,k),style:{background:u&&k%2===1?"var(--chakra-colors-bg-subtle, #F6F6F6)":void 0,cursor:d?"pointer":"default",borderBottom:"1px solid var(--chakra-colors-border, #E2E8F0)",transition:"background 0.1s"},onMouseEnter:P=>{d&&(P.currentTarget.style.background="var(--chakra-colors-bg-subtle, #F6F6F6)")},onMouseLeave:P=>{d&&(P.currentTarget.style.background="")},children:e.map(P=>a.jsx("td",{style:{...A,textAlign:P.align??"left"},children:P.render?P.render(T[P.key],T,k):String(T[P.key]??"—")},P.key))},E)})})]})})})}function Mh({name:e,specialty:t,location:n,avatar:o,rating:i,reviewCount:r,consultationFee:s,isVerified:l=!1,isAvailable:c=!1,availabilityLabel:u="Available today",onBookClick:d,onViewClick:h,...p}){return a.jsxs(f.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",boxShadow:"card-light",_dark:{boxShadow:"card-dark"},transition:"all 0.2s ease",_hover:{transform:"translateY(-2px)",boxShadow:"lg",borderColor:"blue.200"},...p,children:[a.jsxs(f.Box,{display:"flex",gap:"3",alignItems:"flex-start",children:[a.jsxs(f.Box,{position:"relative",flexShrink:0,children:[o?a.jsx("img",{src:o,alt:e,style:{width:56,height:56,borderRadius:"50%",objectFit:"cover",border:"2px solid var(--chakra-colors-border)",display:"block"}}):a.jsx(f.Box,{w:"14",h:"14",borderRadius:"full",bg:"blue.500",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"xl",fontWeight:"bold",color:"white",border:"2px solid",borderColor:"blue.200",children:e.charAt(0)}),c&&a.jsx(f.Box,{position:"absolute",bottom:"0",right:"0",w:"3.5",h:"3.5",bg:"green.500",borderRadius:"full",border:"2px solid",borderColor:"bg.surface"})]}),a.jsxs(f.Box,{flex:"1",children:[a.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"1.5",flexWrap:"wrap",children:[a.jsx(f.Box,{fontSize:"md",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),l&&a.jsx(f.Box,{color:"blue.500",fontSize:"md",title:"MDCN Verified",children:"✓"})]}),a.jsx(f.Box,{fontSize:"sm",color:"blue.500",fontFamily:"var(--font-body)",mt:"0.5",children:t}),n&&a.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"1",mt:"0.5",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:[a.jsx(f.Box,{as:"span",children:"📍"}),a.jsx(f.Box,{as:"span",children:n})]})]}),c&&a.jsx(jt,{status:"success",size:"sm",children:u})]}),i!==void 0&&a.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2",children:[a.jsx(f.Box,{display:"flex",gap:"0.5",children:Array.from({length:5}).map((m,x)=>a.jsx(f.Box,{as:"span",fontSize:"sm",color:x<Math.round(i)?"#F59E0B":"text.muted",children:"★"},x))}),a.jsx(f.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-body)",children:i.toFixed(1)}),r!==void 0&&a.jsxs(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:["(",r," reviews)"]})]}),s&&a.jsxs(f.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",pt:"3",borderTop:"1px solid",borderColor:"border",mt:"auto",children:[a.jsxs(f.Box,{children:[a.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Consultation fee"}),a.jsx(f.Box,{fontSize:"lg",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:s})]}),a.jsxs(f.Box,{display:"flex",gap:"2",children:[h&&a.jsx(f.Box,{as:"button",px:"3",py:"1.5",fontSize:"sm",fontWeight:"medium",fontFamily:"var(--font-body)",border:"1px solid",borderColor:"border",borderRadius:"md",bg:"transparent",color:"text.body",cursor:"pointer",transition:"all 0.15s",_hover:{borderColor:"blue.400",color:"blue.500"},onClick:h,children:"View"}),d&&a.jsx(f.Box,{as:"button",px:"4",py:"1.5",fontSize:"sm",fontWeight:"semibold",fontFamily:"var(--font-body)",bg:"blue.500",color:"white",borderRadius:"md",border:"none",cursor:"pointer",transition:"all 0.15s",_hover:{bg:"blue.600"},onClick:d,children:"Book"})]})]})]})}const Rh={normal:{bg:"rgba(27, 122, 56, 0.08)",dot:"#1B7A38",text:"#1B7A38"},warning:{bg:"rgba(217, 119, 6, 0.08)",dot:"#D97706",text:"#D97706"},critical:{bg:"rgba(220, 38, 38, 0.08)",dot:"#DC2626",text:"#DC2626"}};function Vh({label:e,value:t,unit:n,status:o="normal",...i}){const r=Rh[o];return a.jsxs(f.Box,{display:"inline-flex",alignItems:"center",gap:"2",px:"3",py:"2",borderRadius:"md",bg:r.bg,border:"1px solid",borderColor:`${r.dot}33`,...i,children:[a.jsx(f.Box,{w:"2",h:"2",borderRadius:"full",bg:r.dot,flexShrink:0}),a.jsxs(f.Box,{children:[a.jsx(f.Box,{fontSize:"2xs",color:"text.muted",fontFamily:"var(--font-body)",textTransform:"uppercase",letterSpacing:"wide",children:e}),a.jsxs(f.Box,{display:"flex",alignItems:"baseline",gap:"1",children:[a.jsx(f.Box,{fontSize:"md",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-mono, monospace)",children:t}),n&&a.jsx(f.Box,{fontSize:"xs",color:r.text,fontFamily:"var(--font-body)",children:n})]})]})]})}const Lh={upcoming:{label:"Upcoming",color:"info"},completed:{label:"Completed",color:"success"},cancelled:{label:"Cancelled",color:"error"}};function Ih({doctorName:e,doctorSpecialty:t,doctorAvatar:n,date:o,time:i,type:r="video",status:s="upcoming",onCancel:l,onReschedule:c,onJoin:u,...d}){const h=Lh[s];return a.jsxs(f.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",...d,children:[a.jsxs(f.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[a.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"3",children:[n?a.jsx("img",{src:n,alt:e,style:{width:40,height:40,borderRadius:"50%",objectFit:"cover",display:"block"}}):a.jsx(f.Box,{w:"10",h:"10",borderRadius:"full",bg:"blue.500",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"md",fontWeight:"bold",color:"white",children:e.charAt(0)}),a.jsxs(f.Box,{children:[a.jsx(f.Box,{fontSize:"md",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),t&&a.jsx(f.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t})]})]}),a.jsx(jt,{status:h.color,size:"sm",children:h.label})]}),a.jsxs(f.Box,{display:"flex",gap:"4",py:"3",borderTop:"1px solid",borderBottom:"1px solid",borderColor:"border",children:[a.jsxs(f.Box,{children:[a.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Date"}),a.jsx(f.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:o})]}),a.jsxs(f.Box,{children:[a.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Time"}),a.jsx(f.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:i})]}),a.jsxs(f.Box,{children:[a.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Type"}),a.jsx(f.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",textTransform:"capitalize",children:r==="video"?"🎥 Video Call":"🏥 In-Person"})]})]}),s==="upcoming"&&a.jsxs(f.Box,{display:"flex",gap:"2",children:[u&&a.jsx(f.Box,{as:"button",flex:"1",py:"2",bg:"blue.500",color:"white",borderRadius:"md",border:"none",fontSize:"sm",fontWeight:"semibold",fontFamily:"var(--font-body)",cursor:"pointer",_hover:{bg:"blue.600"},transition:"all 0.15s",onClick:u,children:"Join Call"}),c&&a.jsx(f.Box,{as:"button",flex:"1",py:"2",bg:"transparent",color:"text.body",border:"1px solid",borderColor:"border",borderRadius:"md",fontSize:"sm",fontWeight:"medium",fontFamily:"var(--font-body)",cursor:"pointer",_hover:{borderColor:"blue.400",color:"blue.500"},transition:"all 0.15s",onClick:c,children:"Reschedule"}),l&&a.jsx(f.Box,{as:"button",py:"2",px:"3",bg:"transparent",color:"red.500",border:"1px solid",borderColor:"red.200",borderRadius:"md",fontSize:"sm",fontFamily:"var(--font-body)",cursor:"pointer",_hover:{bg:"red.50"},transition:"all 0.15s",onClick:l,children:"Cancel"})]})]})}Object.defineProperty(exports,"Box",{enumerable:!0,get:()=>f.Box});Object.defineProperty(exports,"Center",{enumerable:!0,get:()=>f.Center});Object.defineProperty(exports,"Flex",{enumerable:!0,get:()=>f.Flex});Object.defineProperty(exports,"Grid",{enumerable:!0,get:()=>f.Grid});Object.defineProperty(exports,"GridItem",{enumerable:!0,get:()=>f.GridItem});Object.defineProperty(exports,"HStack",{enumerable:!0,get:()=>f.HStack});Object.defineProperty(exports,"Heading",{enumerable:!0,get:()=>f.Heading});Object.defineProperty(exports,"Icon",{enumerable:!0,get:()=>f.Icon});Object.defineProperty(exports,"Image",{enumerable:!0,get:()=>f.Image});Object.defineProperty(exports,"Link",{enumerable:!0,get:()=>f.Link});Object.defineProperty(exports,"SimpleGrid",{enumerable:!0,get:()=>f.SimpleGrid});Object.defineProperty(exports,"Stack",{enumerable:!0,get:()=>f.Stack});Object.defineProperty(exports,"Text",{enumerable:!0,get:()=>f.Text});Object.defineProperty(exports,"VStack",{enumerable:!0,get:()=>f.VStack});Object.defineProperty(exports,"Wrap",{enumerable:!0,get:()=>f.Wrap});Object.defineProperty(exports,"WrapItem",{enumerable:!0,get:()=>f.WrapItem});exports.Accordion=Bh;exports.Alert=Nr;exports.AppointmentCard=Ih;exports.Avatar=Sn;exports.AvatarGroup=ua;exports.Badge=jt;exports.BlogCard=Eh;exports.Breadcrumb=ch;exports.Button=we;exports.Card=Yi;exports.CardBody=Ra;exports.CardFooter=Va;exports.CardHeader=Ma;exports.Checkbox=Ui;exports.Combobox=Da;exports.Container=Zi;exports.DashboardLayout=es;exports.DataTable=Ph;exports.DatePicker=ka;exports.DateRangePicker=Ba;exports.Divider=Wi;exports.DoctorCard=Mh;exports.Drawer=Ch;exports.EmptyState=jh;exports.FileUpload=Pa;exports.FormControl=Ca;exports.FullPageSpinner=fa;exports.IconButton=Li;exports.Input=Cn;exports.Logo=jn;exports.MedixProvider=ra;exports.Modal=wh;exports.Navbar=rh;exports.OTPInput=Ki;exports.Pagination=hh;exports.PhoneInput=Ta;exports.PinInput=Fa;exports.Progress=$r;exports.RadioGroup=va;exports.SearchInput=Hi;exports.SectionHeader=Ia;exports.Select=_i;exports.Skeleton=ve;exports.SkeletonCard=gh;exports.SkeletonText=_r;exports.Spinner=zi;exports.StatCard=Xi;exports.Stepper=ph;exports.Switch=Gi;exports.Tabs=uh;exports.Tag=Oi;exports.TestimonialCard=Ah;exports.Textarea=Ni;exports.Toaster=kh;exports.Tooltip=Sh;exports.VitalBadge=Vh;exports.colorTokens=ae;exports.dismissToast=eo;exports.medixConfig=Ri;exports.radiiTokens=Pi;exports.shadowTokens=Mi;exports.spacingTokens=Ei;exports.system=Vi;exports.textStyleTokens=Di;exports.toast=re;exports.typographyTokens=Te;
|
|
195
|
+
`,document.head.appendChild(t)}}const Ur=S.forwardRef(({value:e,colorScheme:t="blue",size:n="md",showLabel:o=!1,animated:i=!0,isIndeterminate:a=!1,...r},l)=>{const c=Math.min(100,Math.max(0,e)),u=Th[t],d=Bh[n];return s.jsxs(f.Box,{ref:l,w:"100%",...r,children:[o&&s.jsxs(f.Box,{display:"flex",justifyContent:"space-between",mb:"1",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:[s.jsx("span",{children:"Progress"}),s.jsxs("span",{children:[c,"%"]})]}),s.jsx(f.Box,{w:"100%",h:d,bg:"bg.subtle",borderRadius:"full",overflow:"hidden",position:"relative",children:a?s.jsx(f.Box,{position:"absolute",h:"100%",w:"40%",bg:u,borderRadius:"full",style:{animation:"medix-indeterminate 1.5s linear infinite"}}):s.jsx(f.Box,{h:"100%",w:`${c}%`,bg:u,borderRadius:"full",transition:i?"width 0.6s cubic-bezier(0.4, 0, 0.2, 1)":"none",position:"relative"})})]})});Ur.displayName="MedixProgress";const Ah={xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"xl",full:"full"};function Dh({isOpen:e,onClose:t,title:n,description:o,size:i="md",closeOnOverlayClick:a=!0,footer:r,children:l}){return s.jsxs(f.DialogRoot,{open:e,onOpenChange:c=>{c.open||t()},closeOnInteractOutside:a,size:Ah[i],children:[s.jsx(f.DialogBackdrop,{bg:"rgba(10, 18, 32, 0.7)",backdropFilter:"blur(4px)"}),s.jsx(f.DialogPositioner,{children:s.jsxs(f.DialogContent,{bg:"bg",border:"1px solid",borderColor:"border",borderRadius:"modal",boxShadow:"xl",children:[(n||o)&&s.jsxs(f.DialogHeader,{borderBottom:"1px solid",borderColor:"border",px:"6",py:"4",children:[n&&s.jsx(f.DialogTitle,{fontFamily:"var(--font-heading)",fontSize:"xl",fontWeight:"semibold",color:"text.heading",children:n}),o&&s.jsx(f.DialogDescription,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:o}),s.jsx(f.DialogCloseTrigger,{position:"absolute",top:"4",right:"4",w:"8",h:"8",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"md",color:"text.muted",_hover:{bg:"bg.subtle",color:"text.heading"},transition:"all 0.15s"})]}),s.jsx(f.DialogBody,{px:"6",py:"5",children:l}),r&&s.jsx(f.DialogFooter,{borderTop:"1px solid",borderColor:"border",px:"6",py:"4",display:"flex",justifyContent:"flex-end",gap:"3",children:r})]})})]})}function Ph({label:e,children:t,placement:n="top",...o}){return s.jsxs(f.Tooltip.Root,{positioning:{placement:n},...o,children:[s.jsx(f.Tooltip.Trigger,{asChild:!0,children:s.jsx("span",{style:{display:"inline-flex"},children:t})}),s.jsx(f.Tooltip.Positioner,{children:s.jsx(f.Tooltip.Content,{bg:"gray.900",color:"white",borderRadius:"md",px:"3",py:"1.5",fontSize:"xs",fontFamily:"var(--font-body)",boxShadow:"lg",children:e})})]})}function Eh({icon:e,title:t,description:n,actionLabel:o,onAction:i,secondaryLabel:a,onSecondaryAction:r,...l}){return s.jsxs(f.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",py:"16",px:"8",gap:"4",...l,children:[e&&s.jsx(f.Box,{w:"16",h:"16",borderRadius:"full",bg:"bg.subtle",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"3xl",color:"text.muted",mb:"2",children:e}),s.jsxs(f.Box,{children:[s.jsx(f.Box,{fontSize:"xl",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",mb:"2",children:t}),n&&s.jsx(f.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",maxW:"360px",lineHeight:"loose",children:n})]}),(o||a)&&s.jsxs(f.Box,{display:"flex",gap:"3",mt:"2",children:[o&&s.jsx(we,{variant:"solid",colorScheme:"blue",onClick:i,children:o}),a&&s.jsx(we,{variant:"ghost",colorScheme:"blue",onClick:r,children:a})]})]})}function Mh({isOpen:e,onClose:t,title:n,placement:o="right",size:i="md",closeOnOverlayClick:a=!0,footer:r,children:l}){return s.jsxs(f.DrawerRoot,{open:e,onOpenChange:c=>{c.open||t()},placement:o,size:i,closeOnInteractOutside:a,children:[s.jsx(f.DrawerBackdrop,{bg:"rgba(10, 18, 32, 0.6)",backdropFilter:"blur(2px)"}),s.jsx(f.DrawerPositioner,{children:s.jsxs(f.DrawerContent,{bg:"bg",borderColor:"border",boxShadow:"2xl",children:[n&&s.jsxs(f.DrawerHeader,{borderBottom:"1px solid",borderColor:"border",px:"6",py:"4",children:[s.jsx(f.DrawerTitle,{fontFamily:"var(--font-heading)",fontSize:"xl",fontWeight:"semibold",color:"text.heading",children:n}),s.jsx(f.DrawerCloseTrigger,{position:"absolute",top:"4",right:"4",w:"8",h:"8",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"md",color:"text.muted",_hover:{bg:"bg.subtle",color:"text.heading"},transition:"all 0.15s"})]}),s.jsx(f.DrawerBody,{px:"6",py:"5",children:l}),r&&s.jsx(f.DrawerFooter,{borderTop:"1px solid",borderColor:"border",px:"6",py:"4",display:"flex",justifyContent:"flex-end",gap:"3",children:r})]})})]})}let Re=[],ht=[];const Gr=()=>ht.forEach(e=>e([...Re])),Rh=()=>Math.random().toString(36).substring(2,9),re=e=>{const t=Rh(),n={id:t,...e};return Re=[...Re,n],Gr(),e.duration!==1/0&&e.duration!==0&&setTimeout(()=>{to(t)},e.duration||4e3),t},to=e=>{Re=Re.filter(t=>t.id!==e),Gr()};re.success=(e,t)=>re({title:e,type:"success",...t});re.error=(e,t)=>re({title:e,type:"error",...t});re.info=(e,t)=>re({title:e,type:"info",...t});re.warning=(e,t)=>re({title:e,type:"warning",...t});const Vh={success:s.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#10B981",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),s.jsx("polyline",{points:"22 4 12 14.01 9 11.01"})]}),error:s.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#EF4444",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("circle",{cx:"12",cy:"12",r:"10"}),s.jsx("line",{x1:"15",y1:"9",x2:"9",y2:"15"}),s.jsx("line",{x1:"9",y1:"9",x2:"15",y2:"15"})]}),warning:s.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#F59E0B",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("path",{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),s.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),s.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),info:s.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#3B82F6",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("circle",{cx:"12",cy:"12",r:"10"}),s.jsx("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),s.jsx("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]})};function Lh(){const[e,t]=S.useState([]);return S.useEffect(()=>{t([...Re]);const n=o=>t(o);return ht.push(n),()=>{ht=ht.filter(o=>o!==n)}},[]),s.jsx(f.Box,{position:"fixed",bottom:"4",right:"4",zIndex:9999,display:"flex",flexDirection:"column",gap:"3",pointerEvents:"none",children:s.jsx(vn,{children:e.map(n=>s.jsx(ge.div,{initial:{opacity:0,y:20,scale:.9},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.9},transition:{duration:.2},style:{pointerEvents:"auto"},children:s.jsxs(f.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",boxShadow:"lg",borderRadius:"lg",p:"4",display:"flex",minW:"300px",maxW:"400px",gap:"3",alignItems:"flex-start",children:[s.jsx(f.Box,{mt:"0.5",children:Vh[n.type||"info"]}),s.jsxs(f.Box,{flex:"1",children:[s.jsx(f.Text,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-body)",children:n.title}),n.description&&s.jsx(f.Text,{fontSize:"sm",color:"text.muted",mt:"1",fontFamily:"var(--font-body)",children:n.description})]}),s.jsx(f.Box,{as:"button",onClick:()=>to(n.id),color:"text.muted",ml:"2",_hover:{color:"text.heading"},cursor:"pointer",bg:"transparent",border:"none",children:s.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),s.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]})},n.id))})})}function Ih({items:e,allowMultiple:t=!1,defaultOpenIds:n=[],...o}){const[i,a]=S.useState(new Set(n)),r=l=>{a(c=>{const u=new Set(c);return u.has(l)?u.delete(l):(t||u.clear(),u.add(l)),u})};return s.jsx(f.Box,{display:"flex",flexDirection:"column",gap:"4",...o,children:e.map(l=>{const c=i.has(l.id);return s.jsxs(f.Box,{bg:"bg.primary",border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",transition:"border-color 0.2s",_hover:{borderColor:c?"blue.500":"border"},children:[s.jsxs(f.Box,{as:"button",w:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"4",px:"6",py:"5",bg:"transparent",border:"none",cursor:"pointer",textAlign:"left",onClick:()=>r(l.id),"aria-expanded":c,children:[s.jsx(f.Box,{fontSize:"lg",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",flex:"1",lineHeight:"short",children:l.question}),s.jsx(f.Box,{flexShrink:0,w:"10",h:"10",borderRadius:"full",display:"flex",alignItems:"center",justifyContent:"center",transition:"background 0.2s, border-color 0.2s, color 0.2s","aria-hidden":"true",style:{border:c?"none":"1.5px solid var(--medix-form-text)",background:c?"#0685FF":"transparent",color:c?"#ffffff":"inherit",flexShrink:0},children:c?s.jsx("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",children:s.jsx("rect",{x:"3",y:"8.25",width:"12",height:"1.5",rx:"0.75",fill:" var(--medix-form-text)"})}):s.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",children:[s.jsx("rect",{x:"3",y:"8.25",width:"12",height:"1.5",rx:"0.75",fill:" var(--medix-form-text)"}),s.jsx("rect",{x:"8.25",y:"3",width:"1.5",height:"12",rx:"0.75",fill:" var(--medix-form-text)"})]})})]}),s.jsx(f.Box,{overflow:"hidden",maxH:c?"800px":"0px",opacity:c?1:0,transition:"max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease",children:s.jsx(f.Box,{px:"6",pb:"6",pt:"0",fontSize:"md",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",children:l.answer})})]},l.id)})})}function zh({quote:e,authorName:t,authorTitle:n,authorAvatar:o,rating:i,...a}){return s.jsxs(f.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",boxShadow:"card-light",_dark:{boxShadow:"card-dark"},...a,children:[i!==void 0&&s.jsx(f.Box,{display:"flex",gap:"0.5",children:Array.from({length:5}).map((r,l)=>s.jsx(f.Box,{as:"span",fontSize:"sm",color:l<i?"#F59E0B":"text.muted",children:"★"},l))}),s.jsxs(f.Box,{as:"blockquote",m:"0",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",fontStyle:"italic",children:['"',e,'"']}),s.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"3",mt:"auto",children:[o?s.jsx("img",{src:o,alt:t,style:{width:36,height:36,borderRadius:"50%",objectFit:"cover"}}):s.jsx(f.Box,{w:"9",h:"9",borderRadius:"full",bg:"blue.500",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"sm",fontWeight:"semibold",color:"white",flexShrink:0,children:t.charAt(0).toUpperCase()}),s.jsxs(f.Box,{children:[s.jsx(f.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-body)",children:t}),n&&s.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:n})]})]})]})}function Oh(e){if(!e)return null;try{const t=new Date(e);return isNaN(t.getTime())?null:{day:String(t.getUTCDate()),weekday:t.toLocaleDateString("en-US",{weekday:"short",timeZone:"UTC"}).toUpperCase()}}catch{return null}}function Wh({title:e,excerpt:t,category:n,date:o,coverImage:i,href:a,onClick:r,...l}){const c=!!(a||r),u=Oh(o),d={display:"block",textDecoration:"none",background:"transparent",border:"none",padding:0,cursor:c?"pointer":"default",width:"100%",textAlign:"left"},h=s.jsxs(f.Box,{bg:"bg.primary",borderRadius:"card",overflow:"hidden",transition:"transform 0.22s ease, box-shadow 0.22s ease",_dark:{bg:"bg.primary"},_hover:c?{transform:"translateY(-4px)"}:void 0,...l,children:[s.jsxs(f.Box,{position:"relative",overflow:"hidden",children:[i?s.jsx("img",{src:i,alt:e,style:{width:"100%",height:220,objectFit:"cover",display:"block"}}):s.jsx(f.Box,{borderRadius:"card",h:"220px",style:{background:"linear-gradient(135deg, #0685FF 0%, #7700CC 100%)"}}),u&&s.jsxs(f.Box,{position:"absolute",bottom:"3",right:"3",bg:"white",borderRadius:"10px",px:"3",py:"2",display:"flex",flexDirection:"column",alignItems:"center",minW:"44px",boxShadow:"0 2px 8px rgba(0,0,0,0.16)",children:[s.jsx(f.Box,{style:{fontSize:22,fontWeight:700,color:"#0685FF",lineHeight:1,fontFamily:"var(--font-heading)"},children:u.day}),s.jsx(f.Box,{style:{fontSize:10,fontWeight:600,color:"#6B7280",letterSpacing:"0.08em",marginTop:2,fontFamily:"var(--font-body)"},children:u.weekday})]})]}),s.jsxs(f.Box,{px:"4",pt:"3",pb:"4",children:[n&&s.jsx(f.Box,{display:"inline-flex",alignItems:"center",px:"3",py:"1",mb:"3",borderRadius:"full",bg:"blue.500",color:"white",fontSize:"xs",fontWeight:"medium",fontFamily:"var(--font-body)",letterSpacing:"wide",children:n}),s.jsx(f.Box,{fontSize:"md",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"snug",mb:t?"2":"0",children:e}),t&&s.jsx(f.Box,{fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"relaxed",style:{display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:t})]})]});return a?s.jsx("a",{href:a,style:d,onClick:r,children:h}):r?s.jsx("button",{type:"button",style:d,onClick:r,children:h}):h}function Hh({columns:e,data:t,rowKey:n="id",isLoading:o=!1,emptyMessage:i="No data available",sortable:a=!1,sortKey:r,sortDirection:l="asc",onSort:c,striped:u=!1,onRowClick:d,caption:h,style:p,className:m}){const[x,g]=S.useState(r),[v,b]=S.useState(l),y=r??x,w=r?l:v,j=F=>{const T=y===F&&w==="asc"?"desc":"asc";g(F),b(T),c==null||c(F,T)},C=S.useMemo(()=>!y||c?t:[...t].sort((F,T)=>{const P=F[y],E=T[y],U=String(P??""),G=String(E??""),K=U.localeCompare(G,void 0,{numeric:!0,sensitivity:"base"});return w==="asc"?K:-K}),[t,y,w,c]),k=({colKey:F})=>y!==F?s.jsx("span",{style:{opacity:.3,marginLeft:4},children:"↕"}):s.jsx("span",{style:{marginLeft:4},children:w==="asc"?"↑":"↓"}),D={padding:"12px 16px",textAlign:"left",fontSize:"12px",fontWeight:600,letterSpacing:"0.05em",textTransform:"uppercase",color:"var(--chakra-colors-text-muted, #6B7280)",fontFamily:"var(--font-body)",borderBottom:"1px solid var(--chakra-colors-border, #E2E8F0)",whiteSpace:"nowrap",userSelect:"none"},A={padding:"14px 16px",fontSize:"14px",color:"var(--chakra-colors-text-body, #374151)",fontFamily:"var(--font-body)",verticalAlign:"middle"};return s.jsx(f.Box,{border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",bg:"bg.surface",boxShadow:"card-light",_dark:{boxShadow:"card-dark"},style:p,className:m,children:s.jsx(f.Box,{overflowX:"auto",children:s.jsxs("table",{style:{width:"100%",borderCollapse:"collapse"},"aria-label":h,children:[h&&s.jsx("caption",{style:{display:"none"},children:h}),s.jsx("thead",{children:s.jsx("tr",{style:{background:"var(--chakra-colors-bg-subtle, #F6F6F6)"},children:e.map(F=>s.jsx("th",{style:{...D,textAlign:F.align??"left",minWidth:F.minWidth,cursor:F.sortable||a?"pointer":"default"},onClick:()=>F.sortable||a?j(F.key):void 0,"aria-sort":y===F.key?w==="asc"?"ascending":"descending":void 0,children:s.jsxs("span",{style:{display:"inline-flex",alignItems:"center"},children:[F.label,(F.sortable||a)&&s.jsx(k,{colKey:F.key})]})},F.key))})}),s.jsx("tbody",{children:o?Array.from({length:5}).map((F,T)=>s.jsx("tr",{children:e.map(P=>s.jsx("td",{style:A,children:s.jsx(f.Box,{h:"4",bg:"bg.subtle",borderRadius:"full",w:`${60+Math.random()*30}%`,style:{animation:"medix-shimmer 1.5s infinite"}})},P.key))},T)):C.length===0?s.jsx("tr",{children:s.jsx("td",{colSpan:e.length,style:{...A,textAlign:"center",padding:"48px 16px"},children:s.jsx(f.Text,{color:"text.muted",fontFamily:"var(--font-body)",children:i})})}):C.map((F,T)=>{const P=String(F[n]??T);return s.jsx("tr",{onClick:()=>d==null?void 0:d(F,T),style:{background:u&&T%2===1?"var(--chakra-colors-bg-subtle, #F6F6F6)":void 0,cursor:d?"pointer":"default",borderBottom:"1px solid var(--chakra-colors-border, #E2E8F0)",transition:"background 0.1s"},onMouseEnter:E=>{d&&(E.currentTarget.style.background="var(--chakra-colors-bg-subtle, #F6F6F6)")},onMouseLeave:E=>{d&&(E.currentTarget.style.background="")},children:e.map(E=>s.jsx("td",{style:{...A,textAlign:E.align??"left"},children:E.render?E.render(F[E.key],F,T):String(F[E.key]??"—")},E.key))},P)})})]})})})}function _h({name:e,specialty:t,location:n,avatar:o,rating:i,reviewCount:a,consultationFee:r,isVerified:l=!1,isAvailable:c=!1,availabilityLabel:u="Available today",onBookClick:d,onViewClick:h,...p}){return s.jsxs(f.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",boxShadow:"card-light",_dark:{boxShadow:"card-dark"},transition:"all 0.2s ease",_hover:{transform:"translateY(-2px)",boxShadow:"lg",borderColor:"blue.200"},...p,children:[s.jsxs(f.Box,{display:"flex",gap:"3",alignItems:"flex-start",children:[s.jsxs(f.Box,{position:"relative",flexShrink:0,children:[o?s.jsx("img",{src:o,alt:e,style:{width:56,height:56,borderRadius:"50%",objectFit:"cover",border:"2px solid var(--chakra-colors-border)",display:"block"}}):s.jsx(f.Box,{w:"14",h:"14",borderRadius:"full",bg:"blue.500",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"xl",fontWeight:"bold",color:"white",border:"2px solid",borderColor:"blue.200",children:e.charAt(0)}),c&&s.jsx(f.Box,{position:"absolute",bottom:"0",right:"0",w:"3.5",h:"3.5",bg:"green.500",borderRadius:"full",border:"2px solid",borderColor:"bg.surface"})]}),s.jsxs(f.Box,{flex:"1",children:[s.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"1.5",flexWrap:"wrap",children:[s.jsx(f.Box,{fontSize:"md",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),l&&s.jsx(f.Box,{color:"blue.500",fontSize:"md",title:"MDCN Verified",children:"✓"})]}),s.jsx(f.Box,{fontSize:"sm",color:"blue.500",fontFamily:"var(--font-body)",mt:"0.5",children:t}),n&&s.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"1",mt:"0.5",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:[s.jsx(f.Box,{as:"span",children:"📍"}),s.jsx(f.Box,{as:"span",children:n})]})]}),c&&s.jsx(Ct,{status:"success",size:"sm",children:u})]}),i!==void 0&&s.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2",children:[s.jsx(f.Box,{display:"flex",gap:"0.5",children:Array.from({length:5}).map((m,x)=>s.jsx(f.Box,{as:"span",fontSize:"sm",color:x<Math.round(i)?"#F59E0B":"text.muted",children:"★"},x))}),s.jsx(f.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-body)",children:i.toFixed(1)}),a!==void 0&&s.jsxs(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:["(",a," reviews)"]})]}),r&&s.jsxs(f.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",pt:"3",borderTop:"1px solid",borderColor:"border",mt:"auto",children:[s.jsxs(f.Box,{children:[s.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Consultation fee"}),s.jsx(f.Box,{fontSize:"lg",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:r})]}),s.jsxs(f.Box,{display:"flex",gap:"2",children:[h&&s.jsx(f.Box,{as:"button",px:"3",py:"1.5",fontSize:"sm",fontWeight:"medium",fontFamily:"var(--font-body)",border:"1px solid",borderColor:"border",borderRadius:"md",bg:"transparent",color:"text.body",cursor:"pointer",transition:"all 0.15s",_hover:{borderColor:"blue.400",color:"blue.500"},onClick:h,children:"View"}),d&&s.jsx(f.Box,{as:"button",px:"4",py:"1.5",fontSize:"sm",fontWeight:"semibold",fontFamily:"var(--font-body)",bg:"blue.500",color:"white",borderRadius:"md",border:"none",cursor:"pointer",transition:"all 0.15s",_hover:{bg:"blue.600"},onClick:d,children:"Book"})]})]})]})}const Nh={normal:{bg:"rgba(27, 122, 56, 0.08)",dot:"#1B7A38",text:"#1B7A38"},warning:{bg:"rgba(217, 119, 6, 0.08)",dot:"#D97706",text:"#D97706"},critical:{bg:"rgba(220, 38, 38, 0.08)",dot:"#DC2626",text:"#DC2626"}};function $h({label:e,value:t,unit:n,status:o="normal",...i}){const a=Nh[o];return s.jsxs(f.Box,{display:"inline-flex",alignItems:"center",gap:"2",px:"3",py:"2",borderRadius:"md",bg:a.bg,border:"1px solid",borderColor:`${a.dot}33`,...i,children:[s.jsx(f.Box,{w:"2",h:"2",borderRadius:"full",bg:a.dot,flexShrink:0}),s.jsxs(f.Box,{children:[s.jsx(f.Box,{fontSize:"2xs",color:"text.muted",fontFamily:"var(--font-body)",textTransform:"uppercase",letterSpacing:"wide",children:e}),s.jsxs(f.Box,{display:"flex",alignItems:"baseline",gap:"1",children:[s.jsx(f.Box,{fontSize:"md",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-mono, monospace)",children:t}),n&&s.jsx(f.Box,{fontSize:"xs",color:a.text,fontFamily:"var(--font-body)",children:n})]})]})]})}const Uh={upcoming:{label:"Upcoming",color:"info"},completed:{label:"Completed",color:"success"},cancelled:{label:"Cancelled",color:"error"}};function Gh({doctorName:e,doctorSpecialty:t,doctorAvatar:n,date:o,time:i,type:a="video",status:r="upcoming",onCancel:l,onReschedule:c,onJoin:u,...d}){const h=Uh[r];return s.jsxs(f.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",...d,children:[s.jsxs(f.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[s.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"3",children:[n?s.jsx("img",{src:n,alt:e,style:{width:40,height:40,borderRadius:"50%",objectFit:"cover",display:"block"}}):s.jsx(f.Box,{w:"10",h:"10",borderRadius:"full",bg:"blue.500",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"md",fontWeight:"bold",color:"white",children:e.charAt(0)}),s.jsxs(f.Box,{children:[s.jsx(f.Box,{fontSize:"md",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),t&&s.jsx(f.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t})]})]}),s.jsx(Ct,{status:h.color,size:"sm",children:h.label})]}),s.jsxs(f.Box,{display:"flex",gap:"4",py:"3",borderTop:"1px solid",borderBottom:"1px solid",borderColor:"border",children:[s.jsxs(f.Box,{children:[s.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Date"}),s.jsx(f.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:o})]}),s.jsxs(f.Box,{children:[s.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Time"}),s.jsx(f.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:i})]}),s.jsxs(f.Box,{children:[s.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Type"}),s.jsx(f.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",textTransform:"capitalize",children:a==="video"?"🎥 Video Call":"🏥 In-Person"})]})]}),r==="upcoming"&&s.jsxs(f.Box,{display:"flex",gap:"2",children:[u&&s.jsx(f.Box,{as:"button",flex:"1",py:"2",bg:"blue.500",color:"white",borderRadius:"md",border:"none",fontSize:"sm",fontWeight:"semibold",fontFamily:"var(--font-body)",cursor:"pointer",_hover:{bg:"blue.600"},transition:"all 0.15s",onClick:u,children:"Join Call"}),c&&s.jsx(f.Box,{as:"button",flex:"1",py:"2",bg:"transparent",color:"text.body",border:"1px solid",borderColor:"border",borderRadius:"md",fontSize:"sm",fontWeight:"medium",fontFamily:"var(--font-body)",cursor:"pointer",_hover:{borderColor:"blue.400",color:"blue.500"},transition:"all 0.15s",onClick:c,children:"Reschedule"}),l&&s.jsx(f.Box,{as:"button",py:"2",px:"3",bg:"transparent",color:"red.500",border:"1px solid",borderColor:"red.200",borderRadius:"md",fontSize:"sm",fontFamily:"var(--font-body)",cursor:"pointer",_hover:{bg:"red.50"},transition:"all 0.15s",onClick:l,children:"Cancel"})]})]})}Object.defineProperty(exports,"Box",{enumerable:!0,get:()=>f.Box});Object.defineProperty(exports,"Center",{enumerable:!0,get:()=>f.Center});Object.defineProperty(exports,"Flex",{enumerable:!0,get:()=>f.Flex});Object.defineProperty(exports,"Grid",{enumerable:!0,get:()=>f.Grid});Object.defineProperty(exports,"GridItem",{enumerable:!0,get:()=>f.GridItem});Object.defineProperty(exports,"HStack",{enumerable:!0,get:()=>f.HStack});Object.defineProperty(exports,"Heading",{enumerable:!0,get:()=>f.Heading});Object.defineProperty(exports,"Icon",{enumerable:!0,get:()=>f.Icon});Object.defineProperty(exports,"Image",{enumerable:!0,get:()=>f.Image});Object.defineProperty(exports,"Link",{enumerable:!0,get:()=>f.Link});Object.defineProperty(exports,"SimpleGrid",{enumerable:!0,get:()=>f.SimpleGrid});Object.defineProperty(exports,"Stack",{enumerable:!0,get:()=>f.Stack});Object.defineProperty(exports,"Text",{enumerable:!0,get:()=>f.Text});Object.defineProperty(exports,"VStack",{enumerable:!0,get:()=>f.VStack});Object.defineProperty(exports,"Wrap",{enumerable:!0,get:()=>f.Wrap});Object.defineProperty(exports,"WrapItem",{enumerable:!0,get:()=>f.WrapItem});exports.Accordion=Ih;exports.Alert=Nr;exports.AppointmentCard=Gh;exports.Avatar=jn;exports.AvatarGroup=pa;exports.Badge=Ct;exports.BlogCard=Wh;exports.Breadcrumb=yh;exports.Button=we;exports.Card=Yi;exports.CardBody=Ia;exports.CardFooter=za;exports.CardHeader=La;exports.Checkbox=Ui;exports.Combobox=Ma;exports.Container=Zi;exports.DashboardLayout=es;exports.DataTable=Hh;exports.DatePicker=Da;exports.DateRangePicker=Pa;exports.Divider=Wi;exports.DoctorCard=_h;exports.Drawer=Mh;exports.EmptyState=Eh;exports.FileUpload=Va;exports.Footer=_r;exports.FormControl=Ta;exports.FullPageSpinner=ma;exports.IconButton=Li;exports.Input=kn;exports.Logo=jt;exports.MedixProvider=ca;exports.Modal=Dh;exports.Navbar=ch;exports.OTPInput=Ki;exports.Pagination=Sh;exports.PhoneInput=Aa;exports.PinInput=Ba;exports.Progress=Ur;exports.RadioGroup=Ca;exports.SearchInput=Hi;exports.SectionHeader=Wa;exports.Select=Ni;exports.Skeleton=ve;exports.SkeletonCard=Fh;exports.SkeletonText=$r;exports.Spinner=zi;exports.StatCard=Xi;exports.Stepper=Ch;exports.Switch=Gi;exports.Tabs=vh;exports.Tag=Oi;exports.TestimonialCard=zh;exports.Textarea=_i;exports.Toaster=Lh;exports.Tooltip=Ph;exports.VitalBadge=$h;exports.colorTokens=ae;exports.dismissToast=to;exports.medixConfig=Ri;exports.radiiTokens=Ei;exports.shadowTokens=Mi;exports.spacingTokens=Pi;exports.system=Vi;exports.textStyleTokens=Di;exports.toast=re;exports.typographyTokens=Fe;
|
|
196
196
|
//# sourceMappingURL=index.cjs.map
|